Id
int64
1.68k
75.6M
PostTypeId
int64
1
2
AcceptedAnswerId
int64
1.7k
75.6M
ParentId
int64
1.68k
75.6M
Score
int64
-60
3.16k
ViewCount
int64
8
2.68M
Body
stringlengths
1
41.1k
Title
stringlengths
14
150
ContentLicense
stringclasses
3 values
FavoriteCount
int64
0
1
CreationDate
stringlengths
23
23
LastActivityDate
stringlengths
23
23
LastEditDate
stringlengths
23
23
LastEditorUserId
int64
-1
21.3M
OwnerUserId
int64
1
21.3M
Tags
list
4,861,359
1
null
null
3
933
I have 4 buttons that I want to show in a gridview. I want them to fill the screen as much as possible, but I never made it. I've tried all kind of ScaleTypes and it won't work. Right now I have the scale type in FIT_CENTER but i get an unexpected result. Here's the code I have so far: ``` @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); Display screenSize = getWindowManager().getDefaultDisplay(); int screenWidth = screenSize.getWidth(); int screenHeight = screenSize.getHeight(); int iconWidth = screenWidth/4; int iconHeight= screenHeight/2; GridView gridview = (GridView) findViewById(R.id.gridview); gridview.setAdapter(new ImageAdapter(this, iconWidth, iconHeight)); } ``` ``` public View getView(final int position, View convertView, ViewGroup parent) { ImageView imageView; if (convertView == null) { imageView = new ImageView(m_Context); imageView.setLayoutParams(new GridView.LayoutParams(m_width, m_height)); imageView.setScaleType(ImageView.ScaleType.FIT_CENTER); imageView.setPadding(8, 8, 8, 8); } else { imageView = (ImageView) convertView; } imageView.setImageResource(mThumbIds[position]); return imageView; } ``` ``` <?xml version="1.0" encoding="utf-8"?> <GridView xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/gridview" android:layout_width="fill_parent" android:layout_height="fill_parent" android:verticalSpacing="10dp" android:horizontalSpacing="10dp" android:columnWidth="90dp" android:stretchMode="columnWidth" android:gravity="center" android:numColumns="2" android:background="#FFFFFF"/> ``` ![wrong result](https://i.stack.imgur.com/hrve7.jpg) ![desired result](https://i.stack.imgur.com/5fsWA.jpg) Note that the last screen shot is hard coded which is obviously not my wish. I want this to work in every screen size without hard coding.
Button resize issue Android
CC BY-SA 3.0
0
2011-02-01T10:22:19.410
2017-09-28T17:30:54.793
2017-09-28T17:14:59.170
7,443,287
526,924
[ "android", "gridview" ]
4,861,380
1
null
null
15
102,235
I've been using Eclipse for some time already, and I didn't have any problems with it. However, when I tried to generate some javadoc, I found that I didn't have the SDK installed. I installed jdk 6u23, and from then on, Eclipse hasn't been working. At first it told me it couldn't find a JRE/SDK. After copying and placing the JRE in the Eclipse folder, the error changed to this: ![http://i258.photobucket.com/albums/hh261/magical_7/Eclipse.png](https://i.stack.imgur.com/rWqy4.png) I've searched around for some solutions, and found a few of varying nature. However, none of them seemed to work. I've tried emptying my eclipse.ini file without success. Altering some values in eclipse.ini didn't work either. Installing Java SDK 1.5 didn't work. Does anyone have other possible solutions? : I tried reinstalling Eclipse, but it didn't fix the problem. I did notice that it's a 32bit version, while I'm running a 64bit system. However, if this were to be the problem, I find it strange that it hasn't been an issue earlier. I've reinstalled both Eclipse and Java once more, and everything works again.
JVM terminated. Exit code = -1
CC BY-SA 3.0
0
2011-02-01T10:24:11.237
2022-12-11T00:10:10.423
2011-11-26T07:19:57.600
234,976
598,207
[ "eclipse", "jvm" ]
4,861,438
1
null
null
6
1,113
After installing an update on Android SDK and moving to Eclipse 3.6, when an exception occurs while my code is running, I'm only prompted for what seems to be Android source code, in stread of showing the line in my code and the exception details in logcat. I now resort to try..catch - ing everything, but it's not practical. Why is it prompting for the source code? Many thanks for any help!! Nothing in Log Cat: ![Nothing in the log cat](https://i.stack.imgur.com/i9I1e.jpg) Prompting for source file: ![Prompting for source file](https://i.stack.imgur.com/JIljX.jpg)
Android: Eclipse - Not showing exceptions
CC BY-SA 2.5
0
2011-02-01T10:30:24.947
2011-02-01T11:07:57.660
null
null
181,098
[ "android", "eclipse" ]
4,861,595
1
null
null
1
5,903
Suppose random points scattered in a plane. Then is there any way to sort those points in either or . ![enter image description here](https://i.stack.imgur.com/tF8ON.png) Here because you can see from the image many points can have same degree. E.g, here acquire the same degree.
Sorting of Points in 2D space
CC BY-SA 2.5
0
2011-02-01T10:46:43.777
2011-02-01T11:25:19.740
2011-02-01T11:17:51.900
468,968
468,968
[ "algorithm", "math", "geometry" ]
4,861,702
1
4,865,381
null
4
2,939
I have a couple of areas in my MVC 3 application Auth and Users. I am using [Phil Haacks Route Debugging tool](http://haacked.com/archive/2008/03/13/url-routing-debugger.aspx) to view a list of my routes and see which one gets selected based on my url. However there are a couple of routes present that I have not created in either my AreaRegistration file or Globalasax and I don’t know where they have come from or how to get rid of them. The routes are highlighted in yellow below. You can also see that I have created a default route in my Auth area (highlighted in green) which simply points to the Login action of my Auth controller. I have debugged the RouteTable and it gets added when the AreaRegistration.RegisterAllAreas(); method is called. However it does not get added in the AreaRegistration as have stepped through this also. Does ASP.NET MVC add this as a default and if so can I remove it somehow? ![enter image description here](https://i.stack.imgur.com/RX50b.jpg)
Does ASP.NET MVC create default routes for areas
CC BY-SA 2.5
0
2011-02-01T11:00:26.763
2013-03-18T22:53:09.977
2013-03-18T22:53:09.977
727,208
109,288
[ "asp.net-mvc", "asp.net-mvc-routing", "asp.net-mvc-areas" ]
4,861,793
1
4,862,119
null
1
34,619
I have coded a horizontal navigation as shown below. ![enter image description here](https://i.stack.imgur.com/U1trW.jpg) But I am having a hard time trying to code a drop down menu for it. If someone can help me with coding a plain simple drop down menu below (highlight in the navigation bar in sea blue), I can improve on that. ## Thanks ``` <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link href="css/layout.css" rel="stylesheet" type="text/css" /> <title>Untitled Document</title> </head> <body> <ul class="glossymenu"> <li class="separator"><a href="#"><b>Reservations</b></a></li> /* Added for the drop down */ <ul class="child"> <li><a href="#"><b>New Reservation</b></a></li> <li><a href="#"><b>Search Reservation</b></a></li> <li><a href="#"><b>Search Customer</b></a></li> <li><a href="#"><b>Search Vehicle</b></a></li> </ul> <li class="separator"><a href="#"><b>Rentals</b></a></li> <li class="separator"><a href="#"><b>Tariffs</b></a></li> <li class="separator"><a href="#"><b>Fleet</b></a></li> <li class="separator"><a href="#"><b>Tools</b></a></li> <li class="separator"><a href="#"><b>Reports</b></a></li> <li class="separator"><a href="#"><b>System Management</b></a></li> </ul> </body> ``` ## ``` .glossymenu{ padding: 0 0 0 0px; margin: 0 auto 0 auto; background: url(../images/menur_bg.gif) repeat-x; height: 36px; list-style: none; border:solid 1px #CCC; } .glossymenu li{ float:left; } .glossymenu li a{ float: left; display: block; color:#000; text-decoration: none; font-family: sans-serif; font-size: 13px; font-weight: bold; height: 36px; line-height: 36px; text-align: center; cursor: pointer; padding-top: 0; padding-right: 0; padding-bottom: 0; padding-left: 20px; } .glossymenu li a b{ float: left; display:block; padding: 0 28px 0 8px; } .glossymenu li a:hover{ color: #fff; background: url(../images/menur_hover_left.gif) no-repeat; background-position: left bottom;; } .glossymenu li a:hover b{ color: #fff; background-image: url(../images/menur_hover_right.gif); background-repeat: no-repeat; background-position: right bottom; } .glossymenu li.separator { background:url(../images/separator.gif) no-repeat; background-position:right; padding: 0 5px 0 3.5px; } /* Added for the drop down */ .glossymenu .child { position:absolute; visibility:hidden; top:100px; } .glossymenu ul li:hover { visibility:visible; z-index:9999; } ```
How to code a drop down menu in css?
CC BY-SA 2.5
0
2011-02-01T11:11:33.650
2011-02-02T04:19:02.920
2011-02-01T11:38:01.120
405,015
350,648
[ "html", "css", "menu", "drop-down-menu" ]
4,862,132
1
4,862,372
null
6
973
I'm developing a web application and I'm using PHP and Javascript. Today, I'm starting to draw all the design class diagrams, but I don't know exactly how to mix both technologies. I think that something like the following should be good: ![UML example diagram](https://i.stack.imgur.com/MZ1kC.jpg) But, really, I'm not sure if typing the .php extension in the class name is sufficiently clear, or what I need is to separate diagrams in two: one for Javascript classes and another one for PHP classes. I'm using CodeIgniter (MVC pattern) and Javascript. Any suggestion will be really appreciated. Thanks!
Mix Javascript and PHP in my design model
CC BY-SA 2.5
0
2011-02-01T11:47:45.673
2014-11-24T13:40:13.820
null
null
552,669
[ "php", "javascript", "design-patterns", "uml" ]
4,862,339
1
null
null
8
1,219
We have a problem by build because of long path created by TFS Team Build when parameter is set to . In directory (see picture later) the package is stored, but I don't understand why this directory structure is necessary and how it can be customized. The problem is that the deployment or new TFS build generates error because of long path. I will be grateful for your help. Regards Anton Kalcik This is the (anonymised) tree structure created by TFS Team Build: ![enter image description here](https://i.stack.imgur.com/iE019.jpg)
Problems with long path in TFS Team Build when CreatePackageOnPublish is set to true.
CC BY-SA 3.0
0
2011-02-01T12:07:25.360
2012-01-20T13:06:38.937
2012-01-20T13:06:38.937
233,053
53,496
[ "msbuild", "tfsbuild" ]
4,862,375
1
4,862,493
null
2
2,286
scrollRectToVisible doesn't work with keyboard and (next/previous/done)toolbar. Please see the picture. ``` [scrollview scrollRectToVisible: textFieldRect animated:YES]; ``` ![screenshot](https://i.stack.imgur.com/y5Rlr.png)
scrollRectToVisible doesn't work with keyboard and (next/previous)toolbar. Please see the picture
CC BY-SA 3.0
null
2011-02-01T12:10:32.053
2011-09-26T17:10:32.220
2011-09-26T17:10:32.220
115,845
499,825
[ "iphone", "uiscrollview" ]
4,862,594
1
null
null
0
2,649
i am unable to Start Profile Synchronization in sharepoint 2010 from central admin due to which the `Compile Audiences` does not work an error message pop up when i click on `Start Profile Synchronization` ![Error Message](https://i.stack.imgur.com/KwsQ3.png) " " can not navigate to the requested page while user profile synchronization is running please wait for current synchronization run to finish. "" please help regarding this problem thanks in advance `this problem occurred in windows 7` how ever it worked fine with Server2008
unable to Start Profile Synchronization in sharepoint 2010
CC BY-SA 2.5
null
2011-02-01T12:31:16.587
2011-02-27T15:30:37.443
2011-02-01T13:21:31.963
575,235
575,235
[ "sharepoint-2010", "target-audience" ]
4,862,831
1
4,862,935
null
2
4,551
Is there a way to alter either the color or the alpha of the text that is displayed on the navigationItem? Currently its bright white and I would (if possible) like to knock it back a little so its not so bright. Any info would be much appreciated. ``` - (void)loadView { [[self navigationItem]setTitle:@"Location List"]; ... ... ``` ![enter image description here](https://i.stack.imgur.com/RZRnY.png)
navigationItem change font color / alpha?
CC BY-SA 2.5
null
2011-02-01T12:55:29.367
2013-11-07T06:50:53.270
null
null
164,216
[ "iphone", "objective-c", "cocoa-touch" ]
4,862,927
1
4,863,372
null
0
2,088
This is a weird issue. I have a List view with 2 Link buttons. "Edit" and "Delete" Iam able to attach an event handler for the first linkbutton(Update). Code in the event handler executed fine. But If I try to attach a event handler for the second link button(Delete) , I get an error. My Item Template Looks like this. ``` <ItemTemplate> <tr> <td> <asp:Label ID="MessageLabel" runat="server" Text='<%# Eval("Item") %>' /> </td> <td> <asp:Label ID="URLLabel" runat="server" Text='<%# Eval("URL") %>' /> </td> <td> <asp:LinkButton ID="EditLinkButton" runat="server" OnClick="EditLinkButtonClicked" CommandArgument='<%# Eval("ItemID") %>'> Edit</asp:LinkButton> </td> <td> <asp:LinkButton ID="DeleteLinkButton" runat="server" OnClick="DeleteLinkButtonClicked" CommandArgument='<%# Eval("ItemID") %>'>Delete</asp:LinkButton> </td> </tr> </ItemTemplate> ``` The Event handler declared in the codebehind file are public void EditLinkButtonClicked(object sender, EventArgs e) { ----- } public void DeleteLinkButtonClicked(object sender, EventArgs e) { ----- } [Exactly same] First Item works absolutely fine. But If I attach the second handler, I get the following error ![enter image description here](https://i.stack.imgur.com/E6P93.png) Am I missing some thing ? Note - There is no error if I try to attach the 1st event handler to the second link button.[ie EditLinkButtonClicked to DeleteLinkButtonClicked ] Issue occurs only when I try to attach DeleteLinkButtonClicked to DeleteLinkButton Any help? Thanks in Advance
Unable to Create Event Handler for a LinkButton inside a ListView ItemTemplate
CC BY-SA 2.5
0
2011-02-01T13:07:49.570
2020-08-20T14:28:12.190
null
null
277,087
[ "c#", ".net", "asp.net", "listview", "event-handling" ]
4,863,031
1
4,863,369
null
3
3,114
I want to create a Tool which is something similar to this ![Screenshot](https://i.stack.imgur.com/yH4QN.jpg) I don't want to create with this many options, but just a basic set of 2/3 options like drawing lines. How do they build this kind of things? Can I build something similar in C# or Java? Also what I want to do is when ever someone draws something I will generate code in the background which will not be related to the drawing the person has created.
How to create a tool/GUI Builder like this in C# java or any language
CC BY-SA 2.5
0
2011-02-01T13:18:43.090
2011-02-01T14:31:25.393
2011-02-01T13:21:46.500
28,169
443,694
[ "c#", "java", "user-interface", "opengl" ]
4,863,036
1
4,863,070
null
0
2,853
I have two DIVs one contain new release and must, another one contain whole data. both div have a red border. I remove bottom border of first div. I want to remove the border where I marked with red rectangle: ![enter image description here](https://i.stack.imgur.com/pr8Pg.png)
remove top border
CC BY-SA 3.0
null
2011-02-01T13:19:09.330
2012-05-12T06:43:15.357
2020-06-20T09:12:55.060
-1
585,484
[ "html", "css" ]
4,863,312
1
4,863,739
null
0
1,121
HI, I want to create simple floor plans like this and render it on iphone not as image. ![enter image description here](https://i.stack.imgur.com/q0OJm.gif) My problem is how should i create this floor plans so that i can render it on phone?? Should I use OpenGL?? or Quartz??. If I use any of them can I create a Tool which will help people to create simple floor plans by drag drop and then view it on there Iphone??
How would i render 2D floor plans on iphone
CC BY-SA 2.5
0
2011-02-01T13:45:17.490
2011-02-01T15:35:12.207
2011-02-01T15:35:12.207
44,729
443,694
[ "iphone", "opengl-es", "quartz-graphics" ]
4,863,644
1
4,863,754
null
2
3,919
Hi I have a website with 2 columns, one for main content(green box) and one for sidebar(blue box). How can a create a div that fills the width of the two columns? and overlaps them? or atleast if i can create the red div inside the green div it can somehow overlap into the blue one. ![enter image description here](https://i.stack.imgur.com/MjLXN.gif)
overlap across width of two divs
CC BY-SA 2.5
null
2011-02-01T14:19:53.150
2011-02-01T14:43:44.363
null
null
66,975
[ "css", "html" ]
4,863,848
1
4,865,526
null
3
3,308
I#m looking for a solution to sort all grouped colums in advancedDatagrid. It should be the same behavior like clicking in a columns head. Please note, i'm not looking for a solution to sort the fields IN a the grouping. There is working solution named compareFunction. But I'm not able to sort the two rows in my picture by column "Einnahmen". Sorry for the german word. Do you have an Idea? ![enter image description here](https://i.stack.imgur.com/j9vmQ.jpg) Thank you Frank
Sort Grouped Columns in AdvancedDatagrid
CC BY-SA 2.5
null
2011-02-01T14:37:04.633
2011-02-02T21:01:38.690
2020-06-20T09:12:55.060
-1
535,542
[ "apache-flex", "sorting", "advanceddatagrid" ]
4,863,862
1
4,864,468
null
6
893
I would like to fit a whole lattice plot in a small region of an existing plot. ``` xyplot(decrease ~ treatment, OrchardSprays, groups = rowpos, type = "a") pushViewport(viewport(.2, .7, .2, .2)) grid.rect(gp=gpar(fill="white")) ``` gives me this: ![enter image description here](https://i.stack.imgur.com/CqdMB.png) So viewport is pushed. But when if a lattice function is called again, it uses the whole device, as if calling `grid.newpage()`: ``` xyplot(decrease ~ treatment, OrchardSprays, groups = rowpos, type = "a") ``` Is there a way to limit lattice plots to a predefined region on a device like in my example above?
Limit lattice plots to viewports?
CC BY-SA 2.5
null
2011-02-01T14:38:12.947
2015-01-14T18:30:12.573
2015-01-14T18:30:12.573
134,830
453,735
[ "r", "plot", "viewport", "lattice", "r-grid" ]
4,863,900
1
4,864,762
null
0
266
I got the database to update, but it only does it for the first row selected not for the others. ``` Protected Sub btnUpdate_Click(ByVal sender As Object, ByVal e As EventArgs) For Each row As GridViewRow In GridView6.Rows ' Selects the text from the TextBox Dim selectedcheck As CheckBox = CType(row.FindControl("chkselect"), CheckBox) If selectedcheck.Checked = True Then Dim id As Label = CType(row.FindControl("id"), Label) cmd.Parameters.AddWithValue("@id", id.Text) cmd.Parameters.AddWithValue("@compby", txtagent.Text) cmd.Parameters.AddWithValue("@compdate", lbldate.Text) cmd.Parameters.AddWithValue("@comments", txtcomments.Text) cmd.CommandText = "dbo.updatetasks" cmd.CommandType = CommandType.StoredProcedure cmd.Connection = conn conn.Open() cmd.BeginExecuteNonQuery() conn.Close() End If Next End Sub ``` ![enter image description here](https://i.stack.imgur.com/1NtFB.jpg) ``` UPDATE dashboardtasks SET compby = @compby, comments = @comments, compdate = @compdate WHERE id = @id; ```
my update button only updates first checked row not others
CC BY-SA 2.5
null
2011-02-01T14:42:14.203
2011-02-01T15:54:55.900
2011-02-01T15:46:58.747
497,470
497,470
[ "asp.net", "vb.net", "gridview", "sqldatasource" ]
4,863,915
1
4,864,057
null
1
772
I am adding user control to listbox. Everything works fine but i have a problem that when i add 10 user controls then i am expecting that listbox should show scroll so that i can select items at the end of listbox but this never happens even after setting show scroll property to true. here is my code ``` UserControl1 button = new UserControl1(); button.Location = new Point(10, 100 * i + 10); button.Size = new System.Drawing.Size(560, 59); button.MessageUsername = "Wao this is great"; listBox1.Controls.Add(button); ``` I am open to ideas here is the picture you can see that there is no scroll ![enter image description here](https://i.stack.imgur.com/Q3Mnj.gif)
How to show scroll button in ListBox
CC BY-SA 2.5
0
2011-02-01T14:43:30.377
2011-02-01T15:00:18.673
2011-02-01T14:53:03.810
249,933
430,167
[ "c#", "winforms", "custom-controls", "scroll" ]
4,863,977
1
4,871,569
null
3
615
below is my memory leakeage . i cant identify were its leaking but 6 leakage is there. ( in image lefthand side bottom u een this grouping column). problem is my sytem libraries or something else. ![enter image description here](https://i.stack.imgur.com/Fxn2H.png) i already wasted 2 days so only am asking here. help in this. Were is leakege?
memory leakage in system libraries
CC BY-SA 2.5
0
2011-02-01T14:49:10.387
2011-02-02T06:55:12.920
2011-02-01T18:03:48.783
554,683
554,683
[ "iphone", "objective-c", "xcode", "memory-management" ]
4,864,255
1
5,022,076
null
10
3,053
In my mind, one of the bigger goals of Markdown is to prevent the user from typing potentially malformed HTML directly. Well that isn't exactly working for me in MarkdownSharp. This example works properly when you have the extra line break immediately after "abc"... ![enter image description here](https://i.stack.imgur.com/yUkKW.png) But when that line break isn't there, I think it should still be HtmlEncoded, but that isn't happening here... ![enter image description here](https://i.stack.imgur.com/StLq2.png) Behind the scenes, the rendered markup is coming from an iframe. And this is the code behind it... ``` <% var md = new MarkdownSharp.Markdown(); %> <%= md.Transform(Request.Form[0]) %> ``` Surely I must be missing something. Oh, and I am using v1.13 (the latest version as of this writing). --- EDIT (this is a test for StackOverflow's implementation) abc this shouldn't be red
Why isn't MarkdownSharp encoding my HTML?
CC BY-SA 2.5
0
2011-02-01T15:12:31.003
2011-03-21T16:44:52.927
2011-02-01T15:33:58.340
102,896
102,896
[ "c#", "asp.net-mvc-2", "markdown", "markdownsharp" ]
4,864,786
1
4,864,983
null
0
3,252
I'm trying to make a WinForms program such that a TextBox is normally hidden (Visible = false) until the user starts typing on the keyboard, at which point the TextBox should become visible and the keyboard input should go into the TextBox. Here's the program, reduced to the essential parts: ``` using System.Windows.Forms; namespace TestTextEditPopup { public partial class Form1 : Form { public Form1() { InitializeComponent(); this.KeyPreview = true; textBox1.Visible = false; } protected override bool ProcessCmdKey(ref Message msg, Keys keyData) { if (keyData != Keys.Escape) return base.ProcessCmdKey(ref msg, keyData); textBox1.Visible = false; return true; // Key has been processed } private void Form1_KeyDown(object sender, KeyEventArgs e) { textBox1.Visible = true; textBox1.Focus(); } } } ``` And here's a series of screen shots: ![And here's a series of screen shots](https://i.stack.imgur.com/KmYm6.png) First I hit "a" on the keyboard. This does cause the TextBox to become visible and get focus, but the "a" is apparently lost somewhere. Then I hit Esc. This correctly makes the TextBox invisible again. Then I hit "b". This time (and for all, or at least almost all subsequent times) it works - the TextBox becomes visible, gets focus, and the keyboard input is not lost - it shows up in the TextBox. Any suggestions as to why it doesn't work the first time? Or alternative methods of accomplishing what I'm trying to do? Thanks. Edit: Just adding KeyPress as an additional tag.
WinForms KeyDown event losing keyboard input on first usage
CC BY-SA 2.5
null
2011-02-01T15:57:04.947
2011-02-01T22:56:41.557
2011-02-01T22:56:41.557
253,938
253,938
[ "c#", "winforms", "keypress", "keydown" ]
4,864,809
1
4,864,921
null
0
163
I want to recreate this image for exercise purposes. ![](https://www.w3schools.com/css/box-model.gif) For that I'm nesting `div`s, and add a padding to them, like so (excerpt): ``` div { width: 150px; height: 150px; border: 1px solid black; padding-right: 1em; padding-bottom: 1em; padding-left: 1em; } ... <body> <div> Content <div></div> </div> </body> ``` But this doesn't quite seem to work. Is this actually the way to go?
How to recreate this image using css
CC BY-SA 3.0
null
2011-02-01T15:58:20.113
2017-06-19T18:52:03.580
2017-06-19T18:52:03.580
3,470,353
1,178,669
[ "css", "html" ]
4,865,113
1
null
null
11
4,386
I have an existing Winforms app that has several forms with the same button images on the two primary buttons for each form (OK and Cancel). The images are set in the VS Designer by setting Image property of Button to "Local resource" and importing the desired image. I do not have access to the original image files. How do I extract an image from the Image property of a Button control whose Image property has been set this way? ![Screenshot](https://i.stack.imgur.com/2sehR.png)
Extracting Local Resource Image from Winforms Form/Button/Image Property
CC BY-SA 3.0
null
2011-02-01T16:24:11.673
2016-11-16T18:29:09.310
2016-11-16T18:29:09.310
1,366,033
598,721
[ "image", "winforms", "visual-studio", "extract", "resx" ]
4,865,262
1
4,882,908
null
4
1,183
I am working as a single developer on an in house serial terminal application. My goal is to write a framework that is flexible enough that I can use it to create three separate applications: - - - At some point in the future, I would like to merge these three applications into one. However, this is far from a priority. I have separated the framework into three separate pieces - the GUI (View interfaces), the backend (Controller interfaces), and the settings handler (ISettingsHandler interface). However, I have already run into some circular dependency problems (ISettingsView had to be moved to the same namespace as ISettingsHandler), indicating more trouble down the road. My requirements for each application are as follows: - - - Have I made this more complex than it should be? I know I could accomplish the same thing with fewer interfaces, but I'm concerned about the flexibility of this framework for future use. Is there a design pattern that fits this scenario? ![Current pattern diagram](https://i.stack.imgur.com/wwbjW.png) EDIT: To clarify, each of the three 'pieces' of the framework are in different namespaces. I have fixed the circular dependency, however, I'm still not sure that this is the best design pattern for this application. Any recommendations?
Design pattern for serial terminal application
CC BY-SA 2.5
0
2011-02-01T16:37:36.517
2011-06-09T11:29:56.060
2020-06-20T09:12:55.060
-1
505,822
[ "c#", ".net", "design-patterns", "architecture" ]
4,865,555
1
4,865,619
null
4
1,600
I am new to QT. I'm trying to understand the layout mechanism by trying to implement this small window seen below. It has the following elements under the QWidget that's the main window: 1. One big QWidget that stretches on all the client area. 2. Two QWidget containers on the top of the window. Both should have the same height, but the right one stretches horizontally, as the window grows/shrinks. 3. one button container widget on the top right, with fixed height and width 4. Large QWidget container filling the rest of the client area, that should resize as the window resizes. The parent window itself is resizeable. I'm looking for hints as to what layout I should use. How do I achieve this programatically? define what stretches automatically, what stays with a fix size? and how the proportions are kept where they need to be kept. I'd appreciate any pointer you may have. ![What I'm trying to achieve](https://i.stack.imgur.com/Cs7vp.png)
QT Layout - initial directions
CC BY-SA 2.5
null
2011-02-01T17:02:04.687
2011-02-01T18:36:40.080
null
null
282,918
[ "qt" ]
4,865,887
1
4,866,240
null
0
1,745
I want to set 2 tabs in above layout and 4 tab below layout as shown follow is it possible in android.![enter image description here](https://i.stack.imgur.com/U9UOR.png)
Is it possible to set the position of a tab in android?
CC BY-SA 2.5
null
2011-02-01T17:30:26.240
2016-01-15T15:36:08.230
null
null
484,073
[ "android", "android-tabhost", "android-style-tabhost" ]
4,866,474
1
4,900,045
null
1
513
I have a security schema where certain entities are secured by having a SecureEntity reference. A SecureEntity has a collection of RolePermissions, each of which has an Allow flag and a Priority. The idea is to match the user's roles against the RolePermissions on the SecureEntity. For example, a user may be allowed by their lowest priority permission but denied by a higher one, so it is the highest one that we are interested in. In this example the root entity I am querying is called ProcessCategory. ![Schema](https://i.stack.imgur.com/N11l2.jpg) (SecureRoleId is the match for the user's role; SecureRoleName is just a string description.) Assume a user has roles (1,2) and the SecureEntity has RolePermissions: ``` SecureRoleId = 1, Priority = 0, Allow = true SecureRoleId = 2, Priority = 1, Allow = false ``` In this case the entity would not be selected. But if the user only had role 1, the entity would be selected. Of course, the SecureEntity may contain a bunch of other roles that the user does not have and are irrelevant. The sql code below works and does this: 'select the entity if the highest priority role permission that the user also has is Allow=true'. So it basically filters RolePermission on the users own roles (IN clause), sorts by Priority, and takes the highest one if that is an Allow. Here is the Sql: ``` select pc.* from ProcessCategory pc join SecureEntity se join RolePermission rp on se.SecureEntityId = rp.SecureEntityId on pc.SecureEntityId = se.SecureEntityId where rp.RolePermissionId = (select top 1 RolePermissionId from RolePermission where Allow = 1 and SecureEntityId = se.SecureEntityId and SecureRoleId in(0,1) order by Priority desc) ``` There may be another way to write the above Sql but it does what I need. Ideally I would like to achieve this using NHibernate Linq or Criteria. I spent a few hours trying to get Linq to work and failed with various 'invalid operation' exceptions on the inner join to RolePermission. I don't have much experience with ICriteria or MultiCriteria and would be interested if anybody can help me. Note that the Fluent mapping for the objects is straightforward: ``` <some-entity>.References(x => x.SecureEntity) ``` and ``` SecureEntity.HasMany(x => x.RolePermissions).Not.Inverse(); ```
Translate this Sql query into NHibernate Linq or Criteria?
CC BY-SA 2.5
null
2011-02-01T18:29:42.760
2011-02-04T16:00:22.893
2011-02-01T18:36:59.483
81,317
81,317
[ "nhibernate", "linq-to-nhibernate" ]
4,866,562
1
4,866,892
null
1
747
IE version : 8.0.6001.18702 ``` <tr id="week-days"></tr> function displayWeekDay( lang ) { var txt = '<td>num</td>'; for ( i = 0; i < langs[lang].day.length; i++ ) if ( i == 5 ) txt += '<td class="red"><b>' + langs[lang].day[i] + '</b></td>'; else if ( i == 6 ) txt += '<td class="red"><b>' + langs[lang].day[i] + '</b></td>'; else txt += '<td><b>' + langs[lang].day[i] + '</b></td>'; document.getElementById("week-days").innerHTML = txt; } ``` The error is in the last line - document.getElementById("week-days").innerHTML = txt; I`m a little bit confused - there is an error, but everything is displaying properly. There is no error on Mozilla, Chrome, Safari. Any idea will apreciated. edit ![enter image description here](https://i.stack.imgur.com/lXbzX.png)
Mysterious runtime error in IE
CC BY-SA 2.5
null
2011-02-01T18:38:26.803
2011-02-01T20:44:36.833
2011-02-01T18:49:03.880
179,669
179,669
[ "javascript", "internet-explorer", "runtime-error" ]
4,866,684
1
4,982,323
null
0
279
Working on an app that makes heavy use of the Address Book framework. There are a number of View Controllers that interact with Address Book data, and they all work just fine. Except for one, and it's killing me. I have a class that wraps address book access, in a method such as: ``` - (NSDictionary*)labelsToValues:(ABPropertyID)propertyID { ABAddressBookRef addressBook = ABAddressBookCreate(); ABRecordRef aRecord = ABAddressBookGetPersonWithRecordID(addressBook, [self recordIdFromAddressBookId]); NSMutableDictionary *entries = [NSMutableDictionary dictionary]; ABMultiValueRef multiValueProperty = ABRecordCopyValue(aRecord, propertyID); // do some other stuff ``` And then I call it in places like this: ``` - (NSDictionary*)emailProperties { return [self labelsToValues:kABPersonEmailProperty]; } ``` And it works! Of course it does, I'm sending the message with an argument that is a Constant from the Address Book framework. So it should always work! But that's not the case. This particular emailProperties: message is one that I'm calling in several places... and sometimes it works, but sometimes it doesn't. When things go awry, I put it through the debugger and I get something like this: ![enter image description here](https://i.stack.imgur.com/IGvKn.png) How is that possible!? Even odder, if I sort of "prime" the problematic View Controller by viewing other View Controllers where everything behaves as expected, and then I return to the problematic View Controller, everything works fine. So, I'm guessing this is some sort of linking error, but I'm not sure how to even begin with troubleshooting that.
Address Book propertyID - unknown type?
CC BY-SA 2.5
null
2011-02-01T18:50:42.143
2011-02-13T03:49:18.793
null
null
543
[ "iphone", "ipad", "ios", "addressbook" ]
4,866,878
1
5,090,798
null
2
1,901
Does anyone have sources of his pivot table? Sources were hosted at [http://wpf.netfx3.com/files/folders/5672/download.aspx](http://wpf.netfx3.com/files/folders/5672/download.aspx), but now this site is down. Or may be there are similar samples of pivot grid(with source)? Here is a pic of it : ![XAML PivotTable](https://i.stack.imgur.com/VWVC2.png)
XAML PivotTable from Mosha Pasumansky
CC BY-SA 2.5
0
2011-02-01T19:09:13.353
2012-07-05T22:38:07.087
2011-02-12T04:17:20.440
15,168
425,386
[ "c#", "wpf", "olap", "pivot-table" ]
4,867,173
1
4,867,585
null
18
7,053
I have ![enter image description here](https://i.stack.imgur.com/dvWGP.png) I need ![enter image description here](https://i.stack.imgur.com/Fq6Xr.png) XAML: ``` <Image Height="500" MouseLeftButtonDown="image_MouseLeftButtonDown" MouseRightButtonDown="image_MouseRightButtonDown" Name="image" Stretch="Fill" Width="500" />` ``` C#: ``` wbmap = new WriteableBitmap(50, 50, 500, 500, PixelFormats.Indexed8, palette); wbmap.WritePixels(new Int32Rect(0, 0, wbmap.PixelWidth, wbmap.PixelHeight), pixels, wbmap.PixelWidth * wbmap.Format.BitsPerPixel / 8, 0); image.Source = wbmap; ```
WPF Image, how to remove blur?
CC BY-SA 2.5
0
2011-02-01T19:40:52.153
2011-02-01T21:10:48.253
2011-02-01T19:55:58.880
318,425
438,084
[ "wpf", "image-processing", "wpf-controls" ]
4,867,338
1
7,320,604
null
82
68,123
My application shows some notifications, and depending on user preferences it might use a custom layout in a notification. It works well, but there is a small problem -- . Stock Android and almost all manufacturer skins use black text against a light background for notification text, but Samsung doesn't: their notification pulldown has a dark background and the text in the default notification layout is white. So this causes a problem: the notifications that don't use any fancy layouts show up fine, but the one that uses a custom layout is hard to read because the text is black instead of the default white. Even the [official documentation](http://developer.android.com/guide/topics/ui/notifiers/notifications.html#CustomNotification) just sets a `#000` color for a `TextView`, so I couldn't find any pointers there. A user was kind enough to take a screenshot of the problem: ![Screenshot](https://i.stack.imgur.com/znPWN.jpg) So in my layouts? I'd rather not start dynamically altering the text color based on phone model, since that requires a lot of updating and people with custom ROM's might still get the problem, depending on the skin they're using.
Custom notification layouts and text colors
CC BY-SA 3.0
0
2011-02-01T19:57:00.027
2020-09-29T09:22:18.350
2013-11-17T22:33:14.533
1,503,078
235,960
[ "android", "notifications", "android-notifications" ]
4,867,411
1
null
null
1
1,626
I upgraded from Eclipse 3.4.2 + Flex Builder 3.5 to Eclipse Eclise 3.5.1 + Flash Builder 4.1, and for some reason keyboard shortcuts for “open resource” just stopped working. I can click “Navigate -> Open Resource” without any problems, but no matter what I change it to, the keyboard shortcut doesn't work. The only strange thing is that there are two “Open Resource” entries in the “Navigate” menu (see below)… But both open up the correct window when I click them. ![enter image description here](https://i.stack.imgur.com/QD1SM.png) Also note: I only have one plugin, viPlugin, installed… But I still get this problem after removing it. So, how can I fix this? : Checking the log, I see this:
Eclipse + Flex Builder: keyboard shortcuts for “open resource” stopped working?
CC BY-SA 2.5
0
2011-02-01T20:05:40.597
2013-01-30T01:12:17.527
2011-02-03T20:22:07.603
71,522
71,522
[ "eclipse", "flexbuilder", "flash-builder" ]
4,867,596
1
4,868,327
null
1
100
I always use to write my software, occasionally checking back in Xcode 3 to see whether the application still compiles there. It usually does. However, today I found out that Xcode 3 detects the application as iOS and not OS X. I checked the Base SDK, and it's fine. I checked the architectures, deployment target, etc. To illustrate the issue, here's a screenshot ![](https://www.imgdumper.nl/uploads3/4d486bdabbf05/4d486bdab74ce-Screen_shot_2011-02-01_at_9.23.30_PM.png) Again, my application is an iOS application, but an OS X application. What am I doing wrong? PS: Yes, the Target is called "Mac".
Xcode 3 recognizes my OS X application as an iOS app
CC BY-SA 2.5
null
2011-02-01T20:27:14.737
2011-02-01T21:47:07.990
2017-02-08T14:31:28.470
-1
377,037
[ "xcode" ]
4,867,762
1
4,867,837
null
17
13,162
I was setting up a nice environment to present my code in printed documentations. First I was using the lstlisting package for Latex but then I stumbled upon . minted is really great, but is there a way to ? Since minted uses the Pygments library, I assume Pygments is the key to the color, but I haven't found it yet. Could anyone explain how it can be done or post a link that shows how it's done? ![minted highlighted output](https://i.stack.imgur.com/CFXJd.png)
Change highlight colors in minted
CC BY-SA 2.5
0
2011-02-01T20:44:52.617
2011-02-01T20:54:48.353
null
null
453,895
[ "latex", "syntax-highlighting", "pygments" ]
4,868,026
1
4,868,051
null
0
67
I have a website (well, I own a company). I'd like to get my website set up so that when someone searches in Google, it's looks how CNN looks, for example: ![enter image description here](https://i.stack.imgur.com/qkjw3.png) How do I tell Google to do this?
Google display - Company
CC BY-SA 2.5
null
2011-02-01T21:14:53.387
2013-12-07T06:20:29.317
2013-12-07T06:20:29.317
881,229
412,082
[ "google-search" ]
4,868,156
1
4,875,392
null
1
1,567
With some help from you QT sages, I was able to implement this window, with the desired layout and resizeability behavior. Now I have another interesting problem. I want my entire window to have a "repeat-xy" seamless pattern. If I apply it to a simple window without layout and internal widgets, it works perfectly. I do however, now have a "tree" of widgets within widgets, and I can't set the stylesheet to draw my seamless background image to each and every one, cause it looks unnatural. The image must be underlying to all the widget topology I have. The problem is, it's invisible when i apply it to the bottom all-window-covering widget because it has widgets on top of it. Is there a solution? maybe "transparent widgets" that can contain visible widgets? ![My window](https://i.stack.imgur.com/aaNIR.png)
QT: Complex Layout and seamless window background image
CC BY-SA 2.5
null
2011-02-01T21:28:32.440
2011-02-02T14:10:17.453
null
null
282,918
[ "qt" ]
4,868,176
1
4,868,324
null
1
154
I have a class that opens text files to grab first name, last name, email address and username. It does this for multiple files and stores the results in a list. My code for the list is: ``` public class UserInformation { public List<UserRecord> userRecords = new List<UserRecord>(); } public class UserRecord { public string FirstName {get;set;} public string LastName {get;set;} public string Email {get;set;} public string UserName {get;set;} } ``` The xaml code is: ``` <ListView ItemsSource="{Binding}" Name="Users" SelectionChanged="Users_SelectionChanged"> <ListView.View> <GridView> <GridViewColumn Header="First Name" Width="200" DisplayMemberBinding="{Binding FirstName}" /> <GridViewColumn Header="Last Name" Width="200" DisplayMemberBinding="{Binding LastName}" /> <GridViewColumn Header="Email" Width="200" DisplayMemberBinding="{Binding Email}" /> <GridViewColumn Header="User Name" Width="150" DisplayMemberBinding="{Binding UserName}" /> </GridView> </ListView.View> </ListView> ``` And lastly I populate the list with this code: ``` List<UserRecord> userRecords = new List<UserRecord>(); userRecords = UFA.getUserData(); Users.DataContext = userRecords; ``` The listview does correctly load the data, however each property (name, email etc) is on a separate line, with several blank lines between records. Additionally it looks like the properties are being entered into the grid in reverse order of the display (user name first etc). This is what it shows: ![enter image description here](https://i.stack.imgur.com/TG9wa.jpg) Any suggestions on how I can fix this mess? Thanks, Jason
WPF the display of my listview (from a list) is all over the place. How do I fix this output?
CC BY-SA 2.5
null
2011-02-01T21:30:52.570
2011-02-01T21:46:43.637
null
null
580,548
[ "wpf", "list", "listview" ]
4,868,294
1
null
null
1
1,242
I'm developing an Android app targeting Android 2.3 (API9). I want to resize the height of a simple `EditText` but when I set `android:layout_height="10pt"` the border of the `EditText` becomes dislocated. The problem is shown here ![enter image description here](https://i.stack.imgur.com/zX8U1.png) I tried layout_height, height, textsize.. pt, px, sp... but the same problem. I haven't tried the application on real device yet.
Problem with borders when resizing the height of EditText
CC BY-SA 2.5
null
2011-02-01T21:44:39.580
2011-02-16T04:49:43.950
2011-02-01T21:51:53.543
418,183
599,126
[ "android", "android-edittext" ]
4,869,042
1
5,988,458
null
4
2,011
I'm trying to use the printing stuff in iOS 4.2 to print from my iPhone app, but I'm having real trouble getting multi-page content to display nicely. As you can see in the attached screenshots of PDFs generated through the iOS printing API, UIMarkupTextPrintFormatter really likes to use a painfully small top-margin when rendering. Additionally, it doesn't seem to try to split block-elements too nicely either ... it's tough to see in the screenshot but the page break actually occurs halfway through a table row, rather than on a border between rows. I've tried using the CSS @page directives to specify page boundaries, however iOS Webkit doesn't seem to support these at all. Does anyone know of any techniques, either in HTML or through the iOS SDK to make these top-margins bigger? I really don't want to write a custom UIPrintPageRenderer class because I'm trying to give my users the ability to customize their printouts through HTML templates ... going with a custom renderer would almost certainly make this impossible (or really difficult). Any help is much appreciated! ![Top-of-page are really small by default](https://i.stack.imgur.com/vNIj9.png)
Is it possible to control top & bottom page margins when using UIMarkupTextPrintFormatter?
CC BY-SA 2.5
0
2011-02-01T23:10:02.523
2011-05-13T07:07:43.633
null
null
288,502
[ "iphone", "css", "printing", "ios-4.2" ]
4,869,239
1
4,870,780
null
3
260
![enter image description here](https://i.stack.imgur.com/KCxD7.png) Ok so as seen in this picture progression, I have a home screen with a button named "Songs" on it. When this is pressed, it loads a new Nib and .h and .m files as seen in the middle picture. Then the back button brings us back to the home menu. The problem is when I load that new view it shifts everything up 20 pixels (around how much the status bars are). Does anyone have any idea why this is. Let me know. I can provide code too.
When I load a new view in Cocoa Touch, it shifts everything up about 20 pixels
CC BY-SA 2.5
0
2011-02-01T23:36:00.163
2011-02-02T04:28:39.573
2011-02-02T01:28:35.217
106,224
488,317
[ "iphone", "cocoa-touch", "xcode", "ios" ]
4,869,721
1
null
null
64
119,577
When a user visits my website there is a "Login" link on every page. Clicking this uses some JavaScript to show an overlay window where the user is prompted for their credentials. After entering these credentials an Ajax call is made to the web server to validate them; if they are valid, an authentication ticket cookie is sent back and the page is reloaded so that any content on the page that is specific to authenticated users or the (now) currently logged in user is displayed. I am accomplishing the page reload via script using: ``` window.location.reload(); ``` This works wonderfully for pages loaded via a GET request (the vast majority), but some pages use postback forms. So if a user goes to one of these pages, performs a postback, and then chooses to login, when the `window.location.reload()` script runs they are prompted with the dialog box asking if they want to resubmit the POST body. ![Resubmit POST body dialog box](https://i.stack.imgur.com/oNALr.png) I thought to get around this I could just tell the browser to reload the page, so I tried: ``` window.location.href = window.location.href; ``` But the browser doesn't take any action with the above statement, I presume because it's thinking the new URL is the same as the old. If I change the above to: ``` window.location.href = window.location.pathname; ``` It reloads the page, but I lose any querystring parameters. My current workaround is sufficient, but not pretty - in short, I tack on a querystring parameter to the current `window.location.href` value and then assign that back to `window.location.href` by calling `reloadPage("justLoggedIn")`, where the `reloadPage` function is: ``` function reloadPage(querystringTackon) { var currentUrl = window.location.href; if (querystringTackon != null && querystringTackon.length > 0 && currentUrl.indexOf(querystringTackon) < 0) { if (currentUrl.indexOf("?") < 0) currentUrl += "?" + querystringTackon; else currentUrl += "&" + querystringTackon; } window.location.href = currentUrl; } ``` This works, but it results in the URL being `www.example.com/SomeFolder/SomePage.aspx?justLoggedIn`, which seems tacky. Is there a way in JavaScript to get it to do a GET reload and not prompt the user to resubmit the POST data? I need to make sure that any existing querystring parameters are not lost.
Reload browser window after POST without prompting user to resend POST data
CC BY-SA 2.5
0
2011-02-02T00:54:42.607
2021-05-18T19:21:27.783
2011-02-03T20:33:17.973
160,830
160,830
[ "javascript" ]
4,869,784
1
4,869,821
null
4
6,018
In IIS Manager center pane, there is an icon titled "Authentication" as follows: ![enter image description here](https://i.stack.imgur.com/AUKHg.png) Clicking the icon, we get 3 items as follows: ![enter image description here](https://i.stack.imgur.com/hci21.png) Right clicking the `Anonymous Authentication` and select `edit`, we have: ![enter image description here](https://i.stack.imgur.com/lkGeC.png) which one should I use? What is the difference?
Which one should I use for "anonymous user identity"? "specific user: IUSR" or "application pool identity"?
CC BY-SA 2.5
null
2011-02-02T01:09:42.833
2018-06-06T17:42:07.460
null
null
596,314
[ "asp.net", "iis" ]
4,869,823
1
4,870,339
null
3
686
I was wondering when a error message pops up in Firebug, what does that mean? I tried to search in [Firebug Docs](http://getfirebug.com/wiki/index.php/Main_Page) but no luck. Can someone please advise? Thanks. ![enter image description here](https://i.stack.imgur.com/UlgpK.png)
Firebug break on error functionality
CC BY-SA 2.5
null
2011-02-02T01:15:46.317
2011-02-02T03:23:25.647
2011-02-02T02:41:00.737
331,508
248,430
[ "firebug" ]
4,869,891
1
null
null
2
593
Using Android's Bluetooth Chat sample app as my guide [http://developer.android.com/resources/samples/BluetoothChat/index.html](http://developer.android.com/resources/samples/BluetoothChat/index.html), I've tried to create my own bluetooth function for an app I am working on. Last night I tested it with two Android phones and had some issues, but there were no force closes. It simply didn't connect my devices when I asked it to. I went in and added a few Log lines to make sure the program was following the proper course. When I reinstalled and launched the app on my phone today, I got a force close error when attempting to turn on Bluetooth, a problem I did not have at all last night. The only code I changed was the addition of 2-3 log commands. I checked logcat and got the following: ![http://img708.imageshack.us/img708/143/logcatmysternpe.png](https://i.stack.imgur.com/oeB7W.png) As you can see, the problem is caused by an NPE @ line 185. Here is my code for the BluetoothService class, I will repost the specific area of issue below it. ``` package com.tagapp.android; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.util.UUID; import android.bluetooth.BluetoothAdapter; import android.bluetooth.BluetoothDevice; import android.bluetooth.BluetoothServerSocket; import android.bluetooth.BluetoothSocket; import android.content.Context; import android.os.Bundle; import android.os.Handler; import android.os.Message; import android.util.Log; public class BluetoothService { private static final String TAG = "BluetoothService"; private static final boolean D = true; private static final String NAME = "BluetoothTag"; private static final UUID MY_UUID = UUID.fromString("93845760-234e-11e0-ac64-0800200c9a66"); private final BluetoothAdapter mAdapter; private final Handler mHandler; private AcceptThread mAcceptThread; private ConnectThread mConnectThread; private ConnectedThread mConnectedThread; private int mState; public static final int STATE_NONE = 0; public static final int STATE_LISTEN = 1; public static final int STATE_CONNECTING = 2; public static final int STATE_CONNECTED = 3; public BluetoothService(Context context, Handler handler) { mAdapter = BluetoothAdapter.getDefaultAdapter(); mState = STATE_NONE; mHandler = handler; } private synchronized void setState(int state) { if (D) Log.d(TAG, "setState() " + mState + " -> " + state); mState = state; mHandler.obtainMessage(BluetoothTransfer.MESSAGE_STATE_CHANGE, state, -1).sendToTarget(); } public synchronized int getState() { return mState; } public synchronized void start() { if (D) Log.d(TAG, "start"); if(mConnectThread != null) { mConnectThread.cancel(); mConnectThread = null; } if(mConnectedThread != null) { mConnectedThread.cancel(); mConnectedThread = null; } if(mAcceptThread == null) { mAcceptThread = new AcceptThread(); mAcceptThread.start(); } setState(STATE_LISTEN); } public synchronized void connect(BluetoothDevice device) { if (D) Log.d(TAG, "connect to: " + device); if(mState == STATE_CONNECTING) { if(mConnectThread != null) { mConnectThread.cancel(); mConnectThread = null; } } if(mConnectedThread != null) { mConnectedThread.cancel(); mConnectedThread = null; } mConnectThread = new ConnectThread(device); mConnectThread.start(); setState(STATE_CONNECTING); } public synchronized void connected(BluetoothSocket socket, BluetoothDevice device) { if (D) Log.d(TAG, "connected"); if(mConnectThread != null) { mConnectThread.cancel(); mConnectThread = null; } if(mConnectedThread != null) { mConnectedThread.cancel(); mConnectedThread = null; } if(mAcceptThread != null) { mAcceptThread.cancel(); mAcceptThread = null; } mConnectedThread = new ConnectedThread(socket); mConnectedThread.start(); Message msg = mHandler.obtainMessage(BluetoothTransfer.MESSAGE_DEVICE_NAME); Bundle bundle = new Bundle(); bundle.putString(BluetoothTransfer.DEVICE_NAME, device.getName()); msg.setData(bundle); mHandler.sendMessage(msg); setState(STATE_CONNECTED); } public synchronized void stop() { if (D) Log.d(TAG, "stop"); if(mConnectThread != null) { mConnectThread.cancel(); mConnectThread = null; } if(mConnectedThread != null) { mConnectedThread.cancel(); mConnectedThread = null; } if(mAcceptThread != null) { mAcceptThread.cancel(); mAcceptThread = null; } setState(STATE_NONE); } public void write(byte[] out) { ConnectedThread ct; synchronized(this) { if(mState != STATE_CONNECTED) return; ct = mConnectedThread; } ct.write(out); } private void connectionFailed() { setState(STATE_LISTEN); Message msg = mHandler.obtainMessage(BluetoothTransfer.MESSAGE_TOAST); Bundle bundle = new Bundle(); bundle.putString(BluetoothTransfer.TOAST, "Unable to connect device"); msg.setData(bundle); mHandler.sendMessage(msg); } private void connectionLost() { setState(STATE_LISTEN); Message msg = mHandler.obtainMessage(BluetoothTransfer.MESSAGE_TOAST); Bundle bundle = new Bundle(); bundle.putString(BluetoothTransfer.TOAST, "Device connection was lost"); msg.setData(bundle); mHandler.sendMessage(msg); } private class AcceptThread extends Thread { private final BluetoothServerSocket mmServerSocket; public AcceptThread() { BluetoothServerSocket tmp = null; try { tmp = mAdapter.listenUsingRfcommWithServiceRecord(NAME, MY_UUID); } catch (IOException e) { Log.e(TAG, "listen() failed", e); } mmServerSocket = tmp; } public void run() { if (D) Log.d(TAG, "BEGIN mAcceptThread" + this); setName("AcceptThread"); BluetoothSocket socket = null; while (mState != STATE_CONNECTED) { try { socket = mmServerSocket.accept(); } catch (IOException e) { Log.e(TAG, "accept() failed", e); break; } if(socket != null) { synchronized (BluetoothService.this) { switch(mState) { case STATE_LISTEN : case STATE_CONNECTING : connected(socket, socket.getRemoteDevice()); break; case STATE_NONE : case STATE_CONNECTED : try { socket.close(); } catch (IOException e) { Log.e(TAG, "Could not close unwanted socket", e); } break; } } } } if (D) Log.i(TAG, "END mAcceptThread"); } public void cancel() { if (D) Log.d(TAG, "cancel " + this); try { mmServerSocket.close(); } catch (IOException e) { Log.e(TAG, "close() of server failed", e); } } } private class ConnectThread extends Thread { private final BluetoothSocket mmSocket; private final BluetoothDevice mmDevice; public ConnectThread(BluetoothDevice device) { mmDevice = device; BluetoothSocket tmp = null; try { tmp = device.createRfcommSocketToServiceRecord(MY_UUID); } catch (IOException e) { Log.e(TAG, "create() failed", e); } mmSocket = tmp; } public void run() { Log.i(TAG, "BEGIN mConnectThread"); setName("ConnectThread"); mAdapter.cancelDiscovery(); try { mmSocket.connect(); } catch (IOException e) { connectionFailed(); try { mmSocket.close(); } catch (IOException e2) { Log.e(TAG, "unable to close() socket during connection failure", e2); } BluetoothService.this.start(); return; } synchronized (BluetoothService.this) { mConnectThread = null; } connected(mmSocket, mmDevice); } public void cancel() { try { mmSocket.close(); } catch (IOException e) { Log.e(TAG, "close() of connect socket failed", e); } } } private class ConnectedThread extends Thread { private final BluetoothSocket mmSocket; private final InputStream mmInStream; private final OutputStream mmOutStream; public ConnectedThread(BluetoothSocket socket) { Log.d(TAG, "create ConnectedThread"); mmSocket = socket; InputStream tmpIn = null; OutputStream tmpOut = null; try { tmpIn = socket.getInputStream(); tmpOut = socket.getOutputStream(); } catch (IOException e) { Log.e(TAG, "tempt sockets not created", e); } mmInStream = tmpIn; mmOutStream = tmpOut; } public void run() { Log.i(TAG, "BEGIN mConnectedThread"); byte[] buffer = new byte[1024]; int bytes; while (true) { try { bytes = mmInStream.read(buffer); mHandler.obtainMessage(BluetoothTransfer.CONTACT_RECEIVE, bytes, -1, buffer).sendToTarget(); } catch (IOException e) { Log.e(TAG, "disconnected", e); connectionLost(); break; } } } public void write(byte[] buffer) { try { mmOutStream.write(buffer); mHandler.obtainMessage(BluetoothTransfer.CONTACT_SEND, -1, -1, buffer).sendToTarget(); } catch (IOException e) { Log.e(TAG, "exception during write", e); } } public void cancel() { try { mmSocket.close(); } catch (IOException e) { Log.e(TAG, "close() of connect socket failed", e); } } } } ``` The lines which are causing the NPE (the AcceptThread): ``` private class AcceptThread extends Thread { private final BluetoothServerSocket mmServerSocket; public AcceptThread() { BluetoothServerSocket tmp = null; try { tmp = mAdapter.listenUsingRfcommWithServiceRecord(NAME, MY_UUID); } catch (IOException e) { Log.e(TAG, "listen() failed", e); } mmServerSocket = tmp; } public void run() { if (D) Log.d(TAG, "BEGIN mAcceptThread" + this); setName("AcceptThread"); BluetoothSocket socket = null; while (mState != STATE_CONNECTED) { try { socket = mmServerSocket.accept();//THIS LINE CAUSES NPE } catch (IOException e) { Log.e(TAG, "accept() failed", e); break; } ``` The object socket should by initialized @ null, but it is supposed to try socket = mmServerSocket.accept(); This is directly from Google's sample app provided on the Android dev website. I have two concerns: 1, why isn't this working, and 2, why did it work just fine just hours ago? Thanks for your help.
Getting a strange NPE in one of my Bluetooth classes, it didn't happen before
CC BY-SA 2.5
0
2011-02-02T01:27:08.500
2012-09-06T08:13:31.910
2011-02-02T02:51:31.183
116,938
588,758
[ "android", "bluetooth" ]
4,870,082
1
5,078,363
null
9
28,080
I'm using the comments [facebook social plugin](http://developers.facebook.com/docs/reference/plugins/comments) When I embed it, the script created an iFrame that has the text "Facebook social plugin" with the facebook logo at the bottom (as seen in the image attached below). I inspected the element using Firebug and tried to set its class to `display:none;` in my CSS file. However - that does not hide it (I suspect it's because it's in its own iFrame). How can I use CSS or jQuery (or any other method) to disable that text? Thanks! ![Facebook social plugin](https://i.stack.imgur.com/1C0fw.png)
How to remove the "Facebook social plugin" text?
CC BY-SA 2.5
0
2011-02-02T01:59:44.353
2016-06-22T19:09:05.477
null
null
118,175
[ "jquery", "facebook", "css", "fbml" ]
4,870,135
1
4,870,166
null
6
8,697
I have a simple `FileCreator` Ruby class that has 1 method `create` which creates a blank txt file on my desktop. Using RSpec, how would I test this create method to make sure that the file was created, without having to create the file? Would I use `RSpec::Mocks`? Can someone please point me in the right directory? Thanks! ![enter image description here](https://i.stack.imgur.com/sd1au.png)
How to test file creation with RSpec?
CC BY-SA 3.0
0
2011-02-02T02:12:51.230
2021-08-06T21:26:15.967
2017-11-30T09:52:54.737
3,449,673
427,494
[ "ruby", "file-io", "rspec" ]
4,870,202
1
9,371,950
null
1
5,144
How do you rotate the text in the axis from horizontal to vertical? I cant do it through xaml because I am a creating multiple series on the fly and I do not know up front how many I will have until after the control populates. ![enter image description here](https://i.stack.imgur.com/Ne4ja.jpg) I need to display the dates vertical or at a slant and not horz. Thank you again.
wpf toolkit chart rotate axis
CC BY-SA 2.5
null
2011-02-02T02:27:10.923
2013-03-06T16:57:00.033
2013-03-06T16:57:00.033
581,528
329,494
[ "c#", "charts", "wpftoolkit" ]
4,870,205
1
4,872,200
null
0
1,427
I have a MovieClip which contains 4 Buttons: ![resolutions](https://i.stack.imgur.com/4a5Xu.png) When the user mouses out of the container, it should disappear: ``` this.resolutions.addEventListener(MouseEvent.MOUSE_OUT, this.resolutionsClose); ``` When the user mouses out of any of the 4 Buttons, the event bubbles up to the container. This is not the expected behavior. How do I stop this propagation when none of the 4 Buttons have mouse out handlers?
Stop event bubbling in Flash
CC BY-SA 2.5
null
2011-02-02T02:27:47.753
2011-02-02T08:28:44.377
null
null
459,987
[ "actionscript-3", "events" ]
4,870,234
1
4,870,363
null
1
330
I'm working on my first Android app, and wondering what call I can make to show this "contact pane": ![Contact Pane](https://i.stack.imgur.com/hVtXN.png) I am of course, referring to the little pane with the contact's photo, name, and the action icons underneath. As a related question... what is the official name for this little popup window?
How to show the Android "contact pane"?
CC BY-SA 2.5
null
2011-02-02T02:33:48.667
2011-02-04T04:32:10.280
null
null
80,209
[ "contacts", "android", "android-contacts" ]
4,870,232
1
4,870,425
null
4
2,646
I am developing a website that allows the user to upload images. I would like to be able to accept BMP, GIF, JPEG and PNG (and maybe one or two others like TIFF) formats. I am using the Apache Commons FileUpload library to achieve this. In order that all the images end up in the same format, I would like to convert all image formats to JPEG format. What is the easiest way to do this which will work will all of the above image formats? I have tried: - `javax.imageio.IIOException: Unexpected block type 0!``java.awt.color.CMMException: Invalid image format`- Information about the JAI method: > Error: One factory fails for the operation "gif"Occurs in: javax.media.jai.ThreadSafeOperationRegistry followed by literally hundreds of lines of trace. ``` public static void convertToJPG(String originalFile, String newFile) throws Exception { RenderedImage image = JAI.create("fileload", originalFile); JAI.create("filestore", image, newFile, "JPEG"); } ``` ![An image which doesn't work.](https://i.stack.imgur.com/mImha.gif)
Convert uploaded images from various formats to JPEG
CC BY-SA 2.5
0
2011-02-02T02:33:26.983
2011-02-02T03:14:16.263
2020-06-20T09:12:55.060
-1
343,486
[ "java", "image-processing", "jai" ]
4,870,592
1
4,875,298
null
0
1,718
Greetings all, ![http://oi51.tinypic.com/6hrm9w.jpg](https://i.stack.imgur.com/6AY08.png) I have extended my own QAbstractListModel to change the background color of QCombobox. As seen it the image ,I have two issues. 1) As shown in the first image snapshot , background color doesnt appear for the selected item. 2) When selecting items , the background turns in to default highlight color (light blue) Is there anyway to fix these two issues ? Here is my QAbstractListModel implementation. ``` RzContourLabelModel::RzContourLabelModel(RzContourLabelContext *contourLabelCtx,int max,QObject *parent) : QAbstractListModel(parent){ contourCtx=contourLabelCtx; QList contourLabels=contourLabelCtx->getLabels(); for(int i=0;i= colorLabels.size()) return QVariant(); if (role == Qt::DisplayRole){ QString str; str.setNum(colorLabels.at(index.row())); return str; } if (role == Qt::BackgroundRole) { int labelNum=colorLabels.at(index.row()); QColor col= contourCtx->getLabelColor(labelNum); return col; } return QVariant(); } ```
Extrend QAbstractListModel to display custom background color?
CC BY-SA 2.5
null
2011-02-02T03:48:07.477
2011-02-02T14:11:38.980
2011-02-02T05:37:17.503
180,904
180,904
[ "c++", "qt", "qt4" ]
4,870,666
1
4,875,078
null
0
660
Core data is not a database and so I am getting confused as to how to create, manage or even implement Lookup tables in core data. Here is a specific example that relates to my project. > Staff (1) -> (Many) Talents (1) The `talents` table consists of: > TalentSkillName (String)TalentSkillLevel (int) But I do not want to keep entering the `TalentSkillName`, so I want to put this information into another, separate table/entity. But as Core Data is not really a database, I'm getting confused as to what the relationships should look like, or even if Lookup tables should even be stored in core data. One solution I'm thinking of is to use a PLIST of all the TalentSkillNames and then in the Talents entity simply have a numeric value which points to the PLIST version. Thanks. I've added a diagram which I believe is what you're meant to do, but I am unsure if this is correct. ![Entity](https://i.stack.imgur.com/q64cD.png)
Lookup tables in Core Data
CC BY-SA 2.5
null
2011-02-02T04:03:46.403
2011-02-09T09:27:41.963
2020-06-20T09:12:55.060
-1
315,635
[ "core-data", "lookup-tables" ]
4,870,713
1
4,894,384
null
2
467
When displaying Greek symbols with, for example, `&pi;`, I get very different results in Chrome and Safari versus Firefox. As some example text, I have: Chrome: ![Chrome's rendering](https://i.stack.imgur.com/wCiua.png) Firefox: ![Firefox's rendering](https://i.stack.imgur.com/UqrRS.png) Is there a way to get Webkit to render the letters closer to Gecko's style, which I much prefer here? EDIT: Actually, it seems the problem does not have to do with Webkit itself, as it seems to render the way I like it under Chrome in Windows 7: (I was using Snow Leopard and didn't bother to check on my other computers, heh) ![Chrome on Window's rendering](https://i.stack.imgur.com/TJhJo.png) Also, a bit offtopic, but does anyone know why the fonts seem to be rendered a bit more boldly on the Mac than on the PC?
Fixing ugly Greek symbols?
CC BY-SA 2.5
null
2011-02-02T04:13:58.130
2012-05-02T16:43:43.580
2012-04-30T13:14:10.237
159,270
257,583
[ "html", "character-encoding", "webkit", "gecko" ]
4,870,770
1
null
null
1
178
I would like to add a small titleLabel across all pages in my app. titleLabel looks like a tableview section header (as shown in the image) NB: I want this for viewcontrollers other than UITableViewController too ![enter image description here](https://i.stack.imgur.com/7SQue.gif) How to do this in a reusable way ? Thanks for any advise or reference links to read up on.
iOS: how to add a titleview across all ViewControllers?
CC BY-SA 2.5
null
2011-02-02T04:27:31.680
2011-02-02T04:31:56.420
null
null
48,557
[ "iphone", "uiviewcontroller" ]
4,870,912
1
4,870,969
null
0
2,923
All, I have a horizontal menu bar. When the user hovers over each link in the menu bar, I want to show a small triangle underneath the link. This small triangle is not an image but is rendered by CSS border syntax. Image and code below: ![enter image description here](https://i.stack.imgur.com/n59R6.jpg) Here is the CSS code for the triangle: ``` #css_arrow { border-color: transparent transparent rgba(111,46,11,0.0) transparent; border-style: solid; border-width: 8px; height: 0; width: 0; position: absolute; top: 34px; left: 78px; ``` I want to add the triangle to the menu item in hover state. Can someone please advise how to go about adding this id to the hover state. I thought about using two classes for the items in the menu bar but its not working out. Here is the html code: ``` <div id="main_bar"> <ul> <li class="maintabs maintabs_tri"><a href="#">Overview</a></li><li class="maintabs maintabs_tri"><a href="#">Collar/ Neckline</a></li><li class="maintabs maintabs_tri"><a href="#">Sleeves</a> <ul> <li class="s_leftright"><a href="#">Left Sleeves</a></li> <li class="s_leftright"><a href="#">Right Sleeves</a></li> </ul></li><li class="maintabs maintabs_tri"><a href="#">Body</a></li> </ul> </div> ``` And the CSS, which doesnt work: ``` .maintabs_tri:hover { border-color: transparent transparent rgba(111,46,11,1) transparent; border-style: solid; border-width: 8px; position: absolute; height: 0; width: 0; top: 32px; left: 78px; } ```
CSS - adding another elements on hover state
CC BY-SA 2.5
0
2011-02-02T04:56:31.977
2011-02-02T13:11:53.050
null
null
434,697
[ "css", "class", "hover" ]
4,870,951
1
4,870,997
null
1
5,208
i am making a website in php i make left menu like this ![enter image description here](https://i.stack.imgur.com/Rbzwj.png) these menu coming from database in one string. i am printing it with echo. i use image as a background to each menu. now i want like this ![enter image description here](https://i.stack.imgur.com/H8Lh6.png) i have a arrow image. i know i can do it with z-index. but i cant do it with only css. so i need a help to do it with javascript. i want to change the html using javascript or jquery
change z-index with javascript
CC BY-SA 2.5
null
2011-02-02T05:03:05.007
2011-05-19T17:18:31.753
null
null
585,484
[ "php", "javascript", "jquery", "html", "css" ]
4,870,964
1
null
null
1
2,197
> I'd like to take all suggestion either in C# or VB.NET. I have a DB diagram like the image below. I also include the database script here @ [http://pastebin.com/pDC25Gkm](http://pastebin.com/pDC25Gkm) ![Database diagram](https://i.stack.imgur.com/AcEtM.jpg) In the Students table, CountryId and RoomId column are allowed null. Because some records do not have info about room and country yet. Also, some students do not have essays. I'm doing a joint query with all tables. I want to select all students to project the result like this: ![Wanted query result](https://i.stack.imgur.com/cOA4y.jpg) Here's my current query that gives the result like the image below: ``` Dim db As New DBDataContext Dim query = From st In db.Students _ Join c In db.Countries On c.Id Equals st.Id _ Join r In db.Rooms On r.Id Equals st.RoomId _ Join b In db.Buildings On b.Id Equals r.BuildingId _ Join es In db.Essays On es.StudentId Equals st.Id _ Select st, c, r, b, es 'put query result into datatable Dim dt = New DataTable("Result") dt.Columns.Add("Id", GetType(Integer)) dt.Columns.Add("Name", GetType(String)) dt.Columns.Add("Room", GetType(String)) dt.Columns.Add("Building", GetType(String)) dt.Columns.Add("Country", GetType(String)) dt.Columns.Add("Essay", GetType(String)) For Each q In query dt.Rows.Add(New Object() {q.st.Id, q.st.FullName, q.r.RoomNumber, q.b.BuildingName, q.c.CountryName, q.es.Eassay}) Next 'bind to list view lvStudent.DataSource = dt lvStudent.DataBind() ``` ![Current query result](https://i.stack.imgur.com/vuQbL.jpg) I got only one result back because I have (2) William NoMan record in every table. But I don't get anything about others, like (3) Sync Master who has everything but RoomId. What do I need to modify the query above so it will give me all students like in the wanted query image above? Thank you.
Joint query in Linq to SQL to select all records even there are some null in the columns of foreign keys
CC BY-SA 2.5
null
2011-02-02T05:06:14.080
2011-02-02T06:22:10.503
null
null
270,536
[ "c#", "sql-server", "vb.net", "linq-to-sql", "join" ]
4,870,955
1
4,872,533
null
229
210,065
In HTML5, I know that `<nav>` can be used either inside or outside the page's masthead `<header>` element. For websites having both secondary and main navigation, it seems common to include the secondary navigation as a `<nav>` element inside the masthead `<header>` element with the main navigation as a `<nav>` element outside the masthead `<header>` element. However, if the website lacks secondary navigation, it appears common to include the main navigation in a `<nav>` element within the masthead `<header>` element. If I follow these examples, my content structure will be based on the inclusion or exclusion of secondary navigation. This introduces a coupling between the content and the style that feels unnecessary and unnatural. Is there a better way so that I'm not moving the main navigation from inside to outside the masthead `<header>` element based on the inclusion or exclusion of secondary navigation? ## Main and Secondary Navigation Example ``` <header> <nav> <!-- Secondary Navigation inside <header> --> <ul> <li></li> </ul> </nav> <h1>Website Title</h1> </header> <nav> <!-- Main Navigation outside <header> --> <ul> <li></li> </ul> </nav> ``` [OnlineDegrees.org](http://onlinedegrees.org) is an example site that follows the above pattern. ![enter image description here](https://i.stack.imgur.com/jolBc.png) ## Main Only Navigation Example ``` <header> <h1>Website Title</h1> <nav> <!-- Main Navigation inside <header> --> <ul> <li></li> </ul> </nav> </header> ``` [Keyzo.co.uk](http://keyzo.co.uk/) is an example site that follows the above pattern. ![enter image description here](https://i.stack.imgur.com/0JD0t.png) ## Excerpts from Introducing HTML5 — Added on 02-Feb-11, 7:38 AM [Introducing HTML5](http://amzn.com/0321687299) by Bruce Lawson and Remy Sharp has this to say about the subject: > The header can also contain navigation. This can be very useful for site-wide navigation, especially on template-driven sites where the whole of the `<header>` element could come from a template file.Of course, it's not required that the `<nav>` be in the `<header>`.If depends largely on whether you believe the site-wide navigation belongs in the site-wide header and also pragmatic considerations about ease of styling. Based on that last sentence, it appears that Bruce Lawson—author of the chapter those excerpts are from—admits that "pragmatic considerations about ease of styling" yield a coupling between the content and the style.
In HTML5, should the main navigation be inside or outside the <header> element?
CC BY-SA 3.0
0
2011-02-02T05:03:15.927
2023-01-15T08:48:13.587
2016-08-13T22:54:19.620
825,924
95,592
[ "html" ]
4,871,263
1
4,871,370
null
29
67,350
I need help on implementing a circular progress bar like this: ![CircularProgressbar](https://i.stack.imgur.com/91s7z.jpg) How should I implement the Circle to fill by increasing `Value` property?
How to create a Circular Style ProgressBar
CC BY-SA 3.0
0
2011-02-02T06:00:26.647
2020-03-07T20:39:33.233
2017-12-17T16:49:46.820
375,958
375,958
[ "c#", "wpf", "user-controls", "progress-bar" ]
4,871,635
1
4,882,792
null
3
658
What exactly is Eclipse doing here to the symbol `CreateDefaultSource`? ![enter image description here](https://i.stack.imgur.com/yg8D2.png) If I single-click a symbol and hover over it for a short while, it shades the background to an illegible light-grey. Clicking off of the symbol doesn't immediately cause it to go away. I'm using the [Color Theme](http://www.eclipsecolorthemes.org/) plugin to provide syntax coloring. I thought perhaps this was the "Content Assist" background color, but I've changed that under the general prefs and I'm still getting this. And perhaps a slightly more egregious example: ![enter image description here](https://i.stack.imgur.com/K755y.png)
Eclipse syntax coloring makes my code illegible
CC BY-SA 2.5
0
2011-02-02T07:06:23.643
2011-02-06T00:58:22.013
2011-02-02T07:16:51.010
569,124
569,124
[ "eclipse", "syntax-highlighting" ]
4,871,730
1
4,871,857
null
1
962
When should I be releasing `[self.activeLocations]`, which is an `NSMutableArray` inside my custom object? I am also getting memory leaks in `initWithValue`. Also the `Location` object below. Am I calling this and releasing this properly? Method in Custom Object.m: ``` - (id)initWithValue:(NSString *)value { if ((self = [super init])) { self.couponId = [value valueForKey:@"couponId"]; self.couponName = [value valueForKeyPath:@"couponName"]; self.qrCode = [value valueForKeyPath:@"description"]; self.companyName = [value valueForKeyPath:@"companyName"]; self.categoryName = [value valueForKeyPath:@"categoryName"]; self.distance = [value valueForKeyPath:@"distance"]; NSDictionary *activeLocationsDict = [value valueForKeyPath:@"activeLocations"]; //self.activeLocations = [[[NSMutableArray alloc] init] autorelease]; self.activeLocations = [NSMutableArray array]; for (id val in activeLocationsDict) { // Add JSON objects to array. Location *l = [[Location alloc] initWithValue:val]; [self.activeLocations addObject:l]; [l release]; } } return self; } - (void)dealloc { [super dealloc]; couponId = nil; couponName = nil; qrCode = nil; companyName = nil; categoryName = nil; distance = nil; activeLocations = nil; } ``` My Custom Object.h ``` @interface Coupon : NSObject { NSNumber *couponId; NSString *couponName; NSString *qrCode; NSString *companyName; NSString *categoryName; NSString *distance; NSMutableArray *activeLocations; } @property (nonatomic, copy) NSNumber *couponId; @property (nonatomic, copy) NSString *couponName; @property (nonatomic, copy) NSString *qrCode; @property (nonatomic, copy) NSString *companyName; @property (nonatomic, copy) NSString *categoryName; @property (nonatomic, copy) NSString *distance; @property (nonatomic, retain) NSMutableArray *activeLocations; - (id)initWithValue:(NSString *)value; ``` This is how I'm using the above `initWithValue`: ``` - (NSMutableArray *)createArrayOfCoupons:(NSString *)value { NSDictionary *responseJSON = [value JSONValue]; // Loop through key value pairs in JSON response. //NSMutableArray *couponsArray = [[NSMutableArray alloc] init] autorelease]; NSMutableArray *couponsArray = [NSMutableArray array]; for (id val in responseJSON) { // Add JSON objects to array. Coupon *c = [[Coupon alloc] initWithValue:val]; [couponsArray addObject:c]; [c release]; } return couponsArray; } ``` I get memory leaks on `initWithValue` in the above method as well... ![enter image description here](https://i.stack.imgur.com/Zu8zA.png) `Location` Custom Object: ``` - (id)initWithValue:(NSString *)value { if ((self = [super init])) { self.locationId = [value valueForKeyPath:@"locationId"]; self.companyName = [value valueForKeyPath:@"companyName"]; self.street1 = [value valueForKeyPath:@"street1"]; self.street2 = [value valueForKeyPath:@"street2"]; self.suburb = [value valueForKeyPath:@"suburb"]; self.state = [value valueForKeyPath:@"state"]; self.postcode = [value valueForKeyPath:@"postcode"]; self.phoneNo = [value valueForKeyPath:@"phoneNo"]; self.latitude = [value valueForKeyPath:@"latitude"]; self.longitude = [value valueForKeyPath:@"longitude"]; } return self; } - (void)dealloc { [super dealloc]; locationId = nil; companyName = nil; street1 = nil; street2 = nil; suburb = nil; state = nil; postcode = nil; phoneNo = nil; latitude = nil; longitude = nil; } ```
iPhone - NSMutableArray inside a Custom Object. When to release?
CC BY-SA 2.5
0
2011-02-02T07:19:21.647
2011-02-02T10:16:14.883
2011-02-02T10:16:14.883
264,802
264,802
[ "iphone", "objective-c", "object", "memory-management", "nsmutablearray" ]
4,872,185
1
null
null
9
53,886
How can I add JavaDoc or other document to netbeans ? I try with this way : ``` Tools >> Java Platform >> JavaDoc Tab >> JavaDoc.zip (in my desktop) ``` but in editor when I press + in tooltiptext this message shown : > Javadoc not found. Either Javadoc documentation for this item does not exist or you have not added specified Javadoc in the Java Platform Manager or the Library Manager. I tried restarting NetBeans but this was the result: ![enter image description here](https://i.stack.imgur.com/fG6vi.jpg)
how to add javaDoc to my Java code in a NetBeans based project?
CC BY-SA 3.0
0
2011-02-02T08:25:48.177
2017-06-20T06:44:19.967
2016-07-29T21:49:09.690
5,055,401
377,983
[ "java", "netbeans", "javadoc", "document" ]
4,872,196
1
4,969,694
null
16
42,857
I need to get the gateway address of the wifi network I connect with the iPhone. Anyone knows how to get that ? Just to clarify, I am looking for the information of this screen : ![enter image description here](https://i.stack.imgur.com/GxGW2.jpg) Thanks.
How to get the WIFI gateway address on the iPhone?
CC BY-SA 2.5
0
2011-02-02T08:27:36.043
2019-03-14T12:08:32.010
2011-02-03T08:47:06.980
158,768
158,768
[ "iphone", "networking" ]
4,872,259
1
null
null
1
1,218
I followed this guide here to doing background processing: [http://evilrockhopper.com/2010/01/iphone-development-keeping-the-ui-responsive-and-a-background-thread-pattern/](http://evilrockhopper.com/2010/01/iphone-development-keeping-the-ui-responsive-and-a-background-thread-pattern/) And the only 1 line of code which was put to background processing was: sound = flite_text_to_wave([cleanString UTF8String], voice); But for some reason i got a bad access signal. Debugging it shows that it crashes on that line too. This is the code I now have in that part. Bear in mind that most of this is just default Flite stuff from the sfoster project which has had no problems before, when it was all together, not separated into 3. ``` -(void)speakText:(NSString *)text //This is called by my app { cleanString = [NSMutableString stringWithString:@""]; if([text length] > 1) { int x = 0; while (x < [text length]) { unichar ch = [text characterAtIndex:x]; [cleanString appendFormat:@"%c", ch]; x++; } } if(cleanString == nil) { // string is empty cleanString = [NSMutableString stringWithString:@""]; } //The next line i've put in from the link [self performSelectorInBackground:@selector(backgroundTextToSpeech) withObject:nil]; } -(void)backgroundTextToSpeech { NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init]; //The following line is the one it crashes on sound = flite_text_to_wave([cleanString UTF8String], voice); [self performSelectorOnMainThread:@selector(backToForegroundTextToSpeech) withObject:nil waitUntilDone:YES]; [pool release]; } -(void)backToForegroundTextToSpeech { NSArray *filePaths = NSSearchPathForDirectoriesInDomains (NSDocumentDirectory, NSUserDomainMask, YES); NSString *recordingDirectory = [filePaths objectAtIndex: 0]; // Pick a file name tempFilePath = [NSString stringWithFormat: @"%@/%s", recordingDirectory, "temp.wav"]; // save wave to disk char *path; path = (char*)[tempFilePath UTF8String]; cst_wave_save_riff(sound, path); // Play the sound back. NSError *err; [audioPlayer stop]; audioPlayer = [[AVAudioPlayer alloc] initWithContentsOfURL:[NSURL fileURLWithPath:tempFilePath] error:&err]; [audioPlayer setDelegate:self]; [audioPlayer prepareToPlay]; } ``` Any ideas what i've done wrong/what i can do differently to stop this happening? EDIT: A picture of the debugger after changing it round with some code posted below: ![enter image description here](https://i.stack.imgur.com/LBi97.png)
Background processing gives me BAD ACCESS crash?
CC BY-SA 2.5
null
2011-02-02T08:36:40.080
2011-02-02T10:33:28.867
2011-02-02T10:33:28.867
561,395
561,395
[ "iphone", "objective-c", "xcode", "background-process" ]
4,872,454
1
null
null
0
696
I'm currently in the implementation phase of a project () that works as an `aggregator` for datasources form two sources (`database tables` and `sharepoint lists, libraries..`). admin user can generate the report and manage datasources, then a web module going to display the selected datasources for specific report (of course there are relations between the selected datasources.. etc) final output must often like this: ![enter image description here](https://i.stack.imgur.com/WQAFl.png) ![enter image description here](https://i.stack.imgur.com/nUNWc.png) if you noticed the `Click here` link which must navigate the end-user to the source sharepoint item in the sharepoint website, now the problem is whenever a user clicked this link it prompts a credential window in order to proceed with the navigation i want to get red of this issue and I know i cant do much with `html link` so any suggestions? im open to new ideas Thank you in advance
login to a SharePoint Site using HTML Link thorugh passing the credential
CC BY-SA 2.5
null
2011-02-02T09:02:08.880
2011-02-02T09:12:03.580
null
null
480,107
[ "c#", "sharepoint", "navigation", "credentials" ]
4,872,706
1
null
null
0
178
Is it possible to add different timeline for each resource group in telerik scheduler? I have used resource to group doctors. I am getting only single timeline for both of the group. In following way--> ![enter image description here](https://i.stack.imgur.com/uQg38.jpg)
Is it possible to create different timeline for each Resource group in telerik scheduler?
CC BY-SA 2.5
null
2011-02-02T09:32:33.140
2011-02-04T13:56:48.607
null
null
578,083
[ "telerik", "telerik-scheduler" ]
4,873,344
1
4,875,335
null
-1
545
HTML Code: ``` <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>CSS Test Page</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <style type="text/css"> body { margin: 0; padding: 0; } #int { width: 1000px; text-align: justify; border: solid 1px #000; } </style> </head> <body> <div id="int"> Some simple text... </div> </body> </html> ``` And the results: ![enter image description here](https://i.stack.imgur.com/CYoLR.png) Here it works! But... ![enter image description here](https://i.stack.imgur.com/TRKFF.png) ...and ![enter image description here](https://i.stack.imgur.com/mHsSJ.png) The problem is only if this code using as layout for Yii Web App... Where I am wrong? Help, please. P.S. kennel.cms.ua - this site is running on local web-server :)
Why margin and padding work properly in Opera but not in IE 8 and FF 3.6?
CC BY-SA 2.5
null
2011-02-02T10:34:26.110
2011-02-02T14:03:58.997
2011-02-02T13:53:39.050
497,485
497,485
[ "css", "internet-explorer", "firefox" ]
4,873,488
1
7,385,889
null
1
769
I want to display PDF file in iPad using CATiled Layer All is well but when i use CATiledLayer in my app and run it , PDF file will display like this shown in image![Here i saw in iPad the top left corner full of gray color in PDF file displayed in red rounded rectangle](https://i.stack.imgur.com/gBq1N.png) Here is my Code ``` tiledLayer = [CATiledLayer layer]; tiledLayer.delegate = self; //Set load block of tiled layer tiledLayer.tileSize = CGSizeMake(1024.0, 1024.0); tiledLayer.levelsOfDetail = 1000; tiledLayer.levelsOfDetailBias = 1000; ``` ``` CGContextSetRGBFillColor(ctx, 1.0, 1.0, 1.0, 1.0); CGContextFillRect(ctx, CGContextGetClipBoundingBox(ctx)); CGContextTranslateCTM(ctx, 0.0, layer.bounds.size.height); CGContextScaleCTM(ctx, 1.0, -1.0); CGContextConcatCTM(ctx, CGPDFPageGetDrawingTransform(myPageRef, kCGPDFCropBox, layer.bounds, 0, true)); CGContextDrawPDFPage(ctx, myPageRef); ``` Please help me to solve this problem.Thank u in advance.
iPad Question : Display pdf file using CATiledLayer in iPad application
CC BY-SA 3.0
0
2011-02-02T10:49:12.997
2011-09-12T09:39:57.450
2011-06-02T08:38:24.653
537,544
537,544
[ "ipad" ]
4,873,518
1
4,873,575
null
1
862
I have an annoying display issue in IE (7/8). I have some tabs that serve as navigation, the tabs have the top and bottom sections cut off for some reason in spite of my efforts to make the box bigger. In Chrome and Firefox this all displays correctly as you can see in the images below. Note I have artificially moved the tabs into an empty area of the page so its easier to see whats going on. ![enter image description here](https://i.stack.imgur.com/WBMaW.jpg) ![enter image description here](https://i.stack.imgur.com/zNfqv.png) Now obviously IE doesn't render the rounded corners, that's fine (unless someone knows something I dont) but as you can see the height of the links in IE are smaller than Chrome and actually clip the top border off. The HTML is simply `<a>` elements within a `<div>` like so ``` <div id="topnavcontainer"> <a href='/web/link1.html' class='current'>Link 1</a> <a href='/web/link2.html'>Link 2</a> <a href='/web/link3.html'>Link 3</a> </div> ``` ``` #topnavcontainer { display: block; color: #fff; font-size: 14px; position: absolute; right: 0; bottom: 0; height: 40px; } #topnavcontainer a { color: #555; text-decoration: none; padding: 5px 12px; font-weight: 800; overflow: visible; background-color: transparent; border: 0; line-height: normal; bottom: 0; height: 40px; } ``` As you can see I have tried to overcome the problem by specifying normal `line-height` as well as making the `overflow` visible. I have also tried making the links and containing div much higher than they should be just in case there was a weird height issue. Nothing seems to solve it.
CSS: IE clips top and bottom off element
CC BY-SA 2.5
null
2011-02-02T10:53:06.940
2011-02-02T11:06:46.107
null
null
94,278
[ "html", "css", "internet-explorer", "cross-browser" ]
4,873,564
1
8,058,218
null
7
1,646
I have encountered strange issue. From Activity onStart() I request Bluetooth activation and 120s discoverability via intent: ``` Intent activateBTIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_DISCOVERABLE); startActivityForResult(activateBTIntent, BT_ACTIVATE_INTENT); ``` I use it no matter if the Bluetooth is already activated or not. Android documentation says that Bluetooth will be activated if it was not, and that works fine. In both cases I get system Alert dialog ![enter image description here](https://i.stack.imgur.com/9cDHZ.png) When I rotate the screen I observe flickering. Press on Yes/No removes one dialog, but there is still another one below. Performing screen rotation I can get a pile of Alert dialogs, and have to press Yes/No on each to get rid of them. Described issue is present only if Bluetooth was not already started when intent was sent, otherwise it works correctly. Tried on different 2.2 phones, and issue is present on all. Looks to me like Android system issue. Has anybody encountered it also, and maybe have some useful hint how to avoid this? Thanks and regards.
Bluetooth activation Alert dialog multiplication after screen rotation
CC BY-SA 3.0
0
2011-02-02T10:57:23.147
2019-05-05T11:50:23.500
2011-04-18T07:23:24.367
423,823
423,823
[ "android" ]
4,873,712
1
4,895,794
null
1
643
I am developing Mac app. In this app, I am using a NSScrollView's instance as scrollView. And I have set a customView which is an instance of NSView in this ScrollView as: ``` [scrollView setDocumentView:customView]; ``` But, the NSScrollView's vertical Slider always points to the bottom of the view as: ![enter image description here](https://i.stack.imgur.com/n4Ahh.png) I want that the slider always points to the top of the custom View as: ![enter image description here](https://i.stack.imgur.com/cIEnC.png) How can I make this change? Plz help.
In NSScrollView the vertical slider always points to bottom of the view
CC BY-SA 2.5
null
2011-02-02T11:11:15.467
2011-02-04T08:33:08.390
2011-02-04T08:33:08.390
191,596
457,316
[ "cocoa" ]
4,873,992
1
4,874,290
null
3
3,838
I'm trying to manage about multi-touch. So, I'm trying to separate the behavior of touchs. Suppose the person want to zoom their picture, they need to pinch in order to zoom it. However, two fingers which two touch points are so distance will not be allow to zoom as I shown with figure below: ![enter image description here](https://i.stack.imgur.com/wNiD9.jpg) How can I separate that. Is there any function to do that ? Regards, C.Porawat
How to pinch in WPF
CC BY-SA 2.5
null
2011-02-02T11:37:35.840
2011-02-02T12:08:51.783
null
null
564,090
[ "c#", "wpf", "touch" ]
4,874,095
1
6,086,264
null
11
1,373
I am working on an app that will show reverse view from camera. For example, if current view from camera is like: ![enter image description here](https://i.stack.imgur.com/hylaW.jpg), the app should reverse view like: ![enter image description here](https://i.stack.imgur.com/fR5O4.jpg) so user will see constantly reverse view from camera through this app. I am not very sure how to achieve this. Any help or idea would be highly appreciated. Thanks!
How to slice & reverse camera view?
CC BY-SA 3.0
0
2011-02-02T11:47:51.797
2011-05-22T05:38:04.130
2011-05-13T10:11:50.490
7,604
7,604
[ "java", "android", "android-layout" ]
4,874,226
1
4,874,416
null
2
2,348
Ok, so I've finally come to my senses and stopped trying to reinvent the wheel whenever I see something that I think can look much better :P How can I make the Toolbar Control look nicer. Would I use GDI/GDI+ (I haven't really used them much, at all), or would I somehow inherit from the Toolbar Control and do some magic coding there to change Visual Appearance options, if that's at all possible? I'm not looking for code (although it would be helpful, and appreciated), but rather some simple, yet in-depth articles/tutorials or maybe even some free, sample apps with source code I can read/play around with. Anybody have any ideas as to how I should go about this? Just to give you an idea of what I'm trying to accomplish, I've uploaded a screenshot that I drew-up in Real-Draw Pro: ![Screenshot sample of desired toolbar](https://i.stack.imgur.com/Sbv0d.png)
Re-styling the Standard toolbar in Windows Forms Applications (C# only)
CC BY-SA 2.5
null
2011-02-02T12:01:52.910
2011-02-02T12:31:54.233
null
null
null
[ "c#", "winforms", "user-controls", "controls", "toolbar" ]
4,874,266
1
null
null
8
1,856
I want to implement the same nature type of control on text selection on a Activity with various text fields. Any ideas of implementing the behavior shown in Picture ![enter image description here](https://i.stack.imgur.com/oXZP3.png)
What Text Selection Control is this?
CC BY-SA 2.5
0
2011-02-02T12:05:36.880
2011-02-02T12:47:26.117
2011-02-02T12:43:25.803
12,855
392,574
[ "android", "textselection" ]
4,874,956
1
null
null
1
429
![Screenshot](https://i.stack.imgur.com/VFRpS.jpg) Let'say, I've 2 entities in the Core Data's Model file, one being all "transactions" ever done by X company. The "transactions" entity has among other properties, a "DATE" property and a to-one relationship "COMPANY"(specifying the company with which X company has done that particular transaction). The other entity:"companies" of course contains all the companies' info ,with which X company has done transaction. The "companies" entity has a to-many relationships "TRANSACTIONS" which is an inverse relationship to "transactions" entity's "COMPANY" relationship. So within IB, I created a `NSTableView` (with its own `NSArrayController`) showing all the transactions on a particular Date (with the help of `NSPredicate`). Then I create another table view showing the to-many relationship "TRANSACTIONS" of the company of the selected transaction in the first table view(which shows transactions on a particular date). The 2nd table view's `NSArrayController` binding is like this: ** bind to: "name of the first tableview's controller", Controller Key: selection, Model Key Path:COMPANY.TRANSACTIONS(the to-many relationship in the "companies" entity)** Everythings work fine up to this moment, the 2nd tableview shows all the transactions X company has done with the company of the selected transactions in the 1st table view. But I have a group of textfields showing details of a particular transactions. Binding the these textfields with the controller of the 1st table view(the one showing transactions on a particular date) is pretty straightforward. But what I want to do are: 1/ Look up the transactions on a particular date in the first table view, select any one of them 2/ Then, check all previous transactions of the company of that transaction( selected in the first table view) from the 2nd table view 3/ Select any previous transactions and check the details of the transaction from that group of textfields So naturally I should have bind the textfields' gp to the 2nd table view's controller. But I found the default selected row in the 2nd table view(the one show all previous transactions of a company) wasn't the transaction I've selected in the 1st tableView for a particular date. Of course, i can manually select that transaction in the 2nd table view again.... So I just want to know if it's possible to have the 2nd table view automatically select the transaction according to the transaction I've selected in the 1st table view thr binding?? After hours of googling, I solved the problem by implementing the tableview Delegate protocol: ``` - (void)tableViewSelectionDidChange:(NSNotification *)aNotification { if (["nameOf1stTableView" selectedRow] > -1) { NSArray *objsArray = ["nameOf2ndTableView'sController" arrangedObjects]; for (id obj in objsArray) { if ([[obj valueForKey:@"DATE"] isEqualToDate: ["nameOf1stTableView'sController".selection valueForKey:@"DATE"]]) { ["nameOf2ndTableView" selectRowIndexes:[NSIndexSet indexSetWithIndex:[objsArray indexOfObject:obj]] byExtendingSelection:NO]; } } } ``` } But,this just look too cumbersome... can it be done with binding alone?
Is it possible to bind a NSTableView's selection to another tableview's selection?
CC BY-SA 3.0
null
2011-02-02T13:23:48.280
2012-05-19T09:24:54.077
2012-05-19T09:24:54.077
1,028,709
599,954
[ "cocoa", "cocoa-bindings" ]
4,875,288
1
4,875,421
null
1
1,683
hi i am working on UITableView custom cell for twitter, for each cell i am adding UIImageView(userPhoto), UILabel(name), UILabel(tweet), UILabel(Data), This i have to dealloc all elements, please go through the attached Image of INSTRUMENT TOOL alloc screen shot when i run the Instrument tool, it showing some are not dealloc, how to dealloc, this is my code //Customize the appearance of table view cells. - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { ``` static NSString *identifier = @"Cell"; UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:identifier]; if(!cell) { cell = [[UITableViewCell alloc] initWithStyle:UITableViewStyleGrouped reuseIdentifier:nil]; //cell.selectionStyle = UITableViewCellSelectionStyleNone; UILabel *name = [[UILabel alloc]initWithFrame:CGRectMake(72,3,242,15)] ; name.text = (NSString*)[(Tweet*)[tweetArray objectAtIndex:indexPath.row] userName]; [name setFont:[UIFont fontWithName:@"Helvetica" size:13]]; name.textColor=[UIColor colorWithRed:250 green:250 blue:210 alpha:0.5]; [name setBackgroundColor:[UIColor clearColor]]; UILabel *date = [[[UILabel alloc]initWithFrame:CGRectMake(200,3,130,15)] autorelease]; date.text = (NSString*)[(Tweet*)[tweetArray objectAtIndex:indexPath.row] created_at]; [date setFont:[UIFont fontWithName:@"Helvetica" size:12]]; date.textColor=[UIColor colorWithRed:250 green:250 blue:210 alpha:0.5]; [date setBackgroundColor:[UIColor clearColor]]; UILabel * tweetLabel = [[UILabel alloc]initWithFrame:CGRectMake(72,20,242,60)] ; tweetLabel.text = (NSString*)[(Tweet*)[tweetArray objectAtIndex:indexPath.row] tweet]; tweetLabel.numberOfLines = 3; tweetLabel.textColor=[UIColor colorWithRed:252 green:148 blue:31 alpha:1]; [tweetLabel setFont:[UIFont fontWithName:@"Helvetica" size:12]]; [tweetLabel setBackgroundColor:[UIColor clearColor]]; UIImageView *myImage = [[UIImageView alloc]initWithFrame:CGRectMake(6,10,58,60)] ; NSURL *url = [NSURL URLWithString:[(Tweet*)[tweetArray objectAtIndex:indexPath.row] image_url]]; NSData *data = [NSData dataWithContentsOfURL:url]; [myImage setImage: [UIImage imageWithData:data]]; [cell.contentView addSubview:myImage]; [cell.contentView addSubview:tweetLabel]; [cell.contentView addSubview:name]; [cell.contentView addSubview:date]; ``` [myTweetActivityIndicator stopAnimating]; [myTweetActivityIndicator setHidesWhenStopped:YES]; ``` return cell; ``` } please guide me Thank you![This image for instrument tools one](https://i.stack.imgur.com/VKYie.png)
iPhone: how to dealloc custom cell labels
CC BY-SA 2.5
null
2011-02-02T14:00:00.120
2011-02-02T15:07:00.260
null
null
543,208
[ "iphone", "uitableview" ]
4,875,665
1
4,875,881
null
0
1,335
I want to create a sticky footer menu for a web application (-webkit/-moz). Check out the screenshot. Blue area border of the iphone, red area representing content, gray area at bottom is footer. ![enter image description here](https://i.stack.imgur.com/MYyUl.png) Screen 1: Start screen. Full content with a sticky footer at bottom of window, I can do this via position: fixed. Screen 2: Actual Required Behavior If the content of page is scrolled down the footer should remained stick to the bottom of the window. Thats what I need. Screen 3: Current behavior with position: fixed This is the current behavior, if i scroll page the whole thing is moved up including the sticky footer at bottom. I want a web application, behavior similar to ipod library. Fixed menu at bottom and scroll-able content above it. Any solution?
webkit sticky footer menu
CC BY-SA 2.5
null
2011-02-02T14:35:01.090
2011-02-02T14:54:44.030
null
null
277,696
[ "javascript", "html", "webkit", "css", "mozilla" ]
4,876,433
1
4,876,616
null
2
4,764
I am [playing around with jqgrid](http://trirand.com/blog/jqgrid/jqgrid.html) and I want to edit a row entry. One of the cells is a list so I want some sort of multiselect editor inside a cell. i dont see support for a cell edit where i can choose multiple entries from a list. select (either multiselect list or even better a dropdown of checkboxes) is there any support for something like this?? ![enter image description here](https://i.stack.imgur.com/KQHPm.png)
does jqgrid support a multiple checkbox list for editing
CC BY-SA 2.5
null
2011-02-02T15:39:23.973
2014-12-05T18:00:41.600
2011-02-02T15:53:34.903
4,653
4,653
[ "jquery", "checkbox", "jqgrid" ]
4,876,737
1
4,876,883
null
2
5,091
Hi there im using a ListView in wpf and have a few columns that have auto width, now i want some padding on them but im a bit unsure how to do this? i have a red background on my header and then text in there, but i want to have some space between the border of the box and the text... ![Sample image](https://i.stack.imgur.com/f6e6E.png)
WPF ListView padding on header columns
CC BY-SA 2.5
null
2011-02-02T16:03:05.663
2017-07-28T12:15:01.240
null
null
58,553
[ "wpf", "listview" ]
4,877,109
1
4,883,657
null
2
203
I have the following code on a standalone PHP file: ``` $conn = mysql_connect("localhost", "", ""); mysql_select_db("name", $conn); $result = mysql_fetch_array(mysql_query("SELECT EVENT_PRIVATE FROM events WHERE EVENT_ID = 68")); var_dump($result); ``` result is `NULL` However, if I copy the exact same query to phpMyAdmin, you can see that EVENT_PRIVATE has a value 1 in it. ![enter image description here](https://i.stack.imgur.com/80ZGw.gif) I have only one db, so I'm definitely using the same db, also, if I select a different column, I can see the correct value. I don't get it, do you?
Weird issue with an SQL query
CC BY-SA 2.5
0
2011-02-02T16:37:30.463
2011-02-03T11:56:11.537
2011-02-02T17:45:11.580
407,943
407,943
[ "php", "mysql" ]
4,877,117
1
4,879,073
null
2
654
I have an absolute positioned combo box in my ExtJS screen. All is cool under FF, but IE6 (and 7) show the drop down box a couple of pixels down so it does not line up with the arrow button. I tried wrapping the combo in a positioned div container and took off the x,y from the combo - didn't help. If I set the style to margin: '-2px' it fixes it for IE but screws it up for FF. Is this a known problem? The control looks like this: ![screen glitch](https://i.stack.imgur.com/FjwYf.jpg) Update: This solution below would fix the problem but I chose to use the ExtJs framework's CSS to fix this. The exact CSS I added to fix this was: ``` .ext-ie .x-form-field-wrap{height:22px;} .ext-ie .x-form-text{margin:-2px 0;height:18px;} ``` Some of this may be specific to my app, but the ext-ie stuff seems to plug into the ExtJS framework.
ExtJS IE6 Combox box displays the drop-box down 2 pixels
CC BY-SA 2.5
null
2011-02-02T16:37:58.987
2011-02-03T16:13:01.170
2011-02-03T16:13:01.170
271,588
271,588
[ "extjs" ]
4,877,229
1
null
null
2
155
In the AdvancedDataGrid shown bellow I have one groupingField as one can see. I would like to have the ability to click in a record (let´s say the 26/01/2011 - Pag.) and right bellow it to have some action buttons. How can I do it? Would it be by using a AdvancedDataGridRendererProvider? I´ve tried to do it but didn´t get the expected result. ![enter image description here](https://i.stack.imgur.com/Pqfvj.jpg)
How to have some area rendered below records in a AdvancedDataGrid
CC BY-SA 3.0
null
2011-02-02T16:47:09.453
2013-10-01T22:58:33.560
2013-10-01T22:58:33.560
307,260
19,224
[ "apache-flex" ]
4,877,694
1
4,886,871
null
15
38,854
In my Android App I have a Activity which show images which have following size `244 x 330`. I want to show those images in full device width. My layout file looks like this: ``` <?xml version="1.0" encoding="utf-8"?> <ScrollView xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent"> <LinearLayout android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="vertical"> <ImageView android:id="@+id/news_image" android:layout_height="fill_parent" android:layout_width="fill_parent" android:layout_marginLeft="18dip" android:layout_marginRight="18dip" android:background="#aaaaaa" /> </LinearLayout> </ScrollView> ``` I tried to set the ScaleType of the ImageView but there is no ScalingType which scales the ImageView proportional. How can I scale the image proportionally to fit the whole screen in landscape mode AND portrait mode? Basically what I want is something like ScaleType.CENTER_CORP but which also sets the proportional height for the image so I can see all of it and not just a part of the image. I want to show it to you with a image. This is what I get at the moment with my layout. I want to fill the whole grey area by scaling the image as big as needed. How can I accomplish that? ![](https://i.stack.imgur.com/5vhMM.png) When I set the `ScaleType` to `CENTER_CROP` I get this ![](https://i.stack.imgur.com/jMS4f.png) but this is not what I want cause you are not seeing the whole image just a part from the center. And this is what I want it to be: ![](https://i.stack.imgur.com/52Mt1.png) I hope this helps you to understand what I'm trying to accomplish. Anyone knows how to do that? It might look weird and little confusing that I'm trying to display a image which is bigger in the height than the screen size but since I'm using a `ScrollView` in my example layout this should be ok and the user could scroll if he want to see the not displayed area. Hope this helps to understand what I'm trying to do.
Scaling ImageView to device width
CC BY-SA 2.5
0
2011-02-02T17:30:16.357
2018-10-15T21:15:02.150
2011-02-03T08:23:30.043
138,584
138,584
[ "android", "layout", "imageview" ]
4,877,883
1
4,878,025
null
1
380
I am looking for a jQuery plugin which shows div's in a stacked formation like the formation below. Each div is shifted by a few pixels horizontally and vertically than the one above it. When I click on any div's edge, it gets focus and it becomes the one on top. (they change their z-index). Very similar to how a user switches between the windows in Windows in the image below. Any suggestions? ![enter image description here](https://i.stack.imgur.com/jBqqC.png)
jQuery Plugin to show stacked panels or div's?
CC BY-SA 2.5
null
2011-02-02T17:44:57.320
2011-02-02T20:14:31.227
null
null
5,232
[ "jquery-ui", "jquery-plugins" ]
4,878,292
1
4,923,799
null
6
2,749
The default configuration of the Team Build Number Format is: ``` $(BuildDefinitionName)_$(Date:yyyyMMdd)$(Rev:.r) ``` It drops all output to `\\foo\bar\MyBuildDef_20111031.1` Great stuff so far! The small in that directory without a good indication of the dependencies of the binaries. ![TFS drop files](https://i.stack.imgur.com/5CPXa.png) How can you modify this property, or otherwise, to have the solution's binaries dropped in their respective project directories? In the case above, I had expected the MVC website (complete with its bin directory) to be dropped. Instead, we got that PLUS the extra drop of the binaries in the root. In other words: TFS, please stop dropping all binaries in the root; it looks messy, and it's confusing on which files belong/associated with what.
prevent Team Build dropping all binaries to the root of the drop folder
CC BY-SA 2.5
0
2011-02-02T18:25:30.857
2012-04-25T13:17:42.180
null
null
23,199
[ "tfs", "tfsbuild" ]
4,878,412
1
4,924,669
null
-1
1,242
I have the following situation. ![enter image description here](https://i.stack.imgur.com/7cNyJ.jpg) Need: - `A`- `B`- `Form1`- - Apparently it is simple, but I tried some hours and posted this topic.
"Expander" in Windows Forms
CC BY-SA 2.5
0
2011-02-02T18:38:24.123
2011-02-11T17:57:54.640
2011-02-11T17:54:41.087
63,550
185,593
[ ".net", "winforms" ]
4,878,618
1
null
null
4
1,922
I can't find where this setting is ``` #if !DEBUG // some code #endif ``` when I change the configuration dropdown from debug to release, I see no changes in my code, which suggests that my DEBUG symbol is not defined EDIT I do not see the setting in the Buid screen as Mark suggests: ![enter image description here](https://i.stack.imgur.com/WwLIa.png)
define DEBUG symbol on a VS2010 Website?
CC BY-SA 2.5
null
2011-02-02T18:59:31.823
2013-07-02T03:31:33.300
2011-02-02T20:20:56.700
375,814
375,814
[ "visual-studio-2010", "web", "debug-symbols" ]
4,878,677
1
null
null
0
334
I'm working on a 3D game project with a bunch of people. The project runs fine on all of their machines but mine. On my computer the skybox texture intermittently disappears and the rendering goes awfully bad. We've all been working on Windows XP with Visual Studio 2008, and the only significant difference between my machine and my co-workers is that my computer has a Nvidia 9400 GT graphics card, which, I guess, is the thing to blame. Here's a screenshot, skybox-less. Is there any setting in OpenGL or the Nvidia video manager that I can tweak to avoid this? ![enter image description here](https://i.stack.imgur.com/8NKYC.png)
OpenGL rendering glitch
CC BY-SA 2.5
null
2011-02-02T19:04:43.247
2011-02-02T19:10:37.737
null
null
45,963
[ "opengl", "nvidia" ]
4,878,750
1
null
null
1
509
Visual Studio 2010 is prompting to login to a Team Foundation Server. How can I remove this? ![enter image description here](https://i.stack.imgur.com/W4hIb.png)
Visual Studio 2010 is prompting to login to Team Foundation Server
CC BY-SA 2.5
null
2011-02-02T19:10:48.513
2011-02-02T19:14:43.160
2011-02-02T19:14:43.160
23,199
267,679
[ "visual-studio-2010" ]
4,878,915
1
4,879,038
null
0
1,512
I'm trying to have 2 seperate DIV's, one with Right aligned content (the labels) and the other div with Left aligned content (the content for each label). I am hoping to make each label "connected" with it's child content on the right so that if it gets pushed down by content from above they will still remain together. What would be the best way to approach setting this type of layout that is cross-browser? (I have provided in a JPG below). ![enter image description here](https://i.stack.imgur.com/lRZyR.jpg)
How would you setup this DIV layout (Right aligned div on left, Left aligned Div on right)?
CC BY-SA 2.5
null
2011-02-02T19:28:09.327
2012-01-22T00:54:23.023
null
null
594,646
[ "css", "html" ]
4,879,047
1
4,880,083
null
2
2,122
I have an application which resides in menu bar, pretty much like this one ![menu app](https://i.stack.imgur.com/KxIRv.png) And I'm trying to create a preference pane for it, as described in [the apple docs](http://developer.apple.com/library/mac/#documentation/UserExperience/Conceptual/PreferencePanes/PreferencePanes.html#//apple_ref/doc/uid/10000110-SW1). That guide shows how to create both prefpane plugin for System Preferences and preference window for standalone application. Yet, in the second case, it seems to be missing something. So, I have main application class with `-(IBAction) displayPreferences:(id)sender;` action called when user clicks 'Preferences...' in the menu. And I also have controller extending `NSPreferencePane` and connected to `NSWindow` object in Interface Builder (just likes docs describe). The question is, how to connect them? I.e., ``` -(IBAction) displayPreferences:(id)sender { // what do we write here to display preferences window? } ``` Thank you!
adding preference pane to an application
CC BY-SA 2.5
0
2011-02-02T19:43:11.253
2017-08-11T06:34:18.123
null
null
330,565
[ "objective-c", "cocoa", "macos", "nspreferencepane" ]
4,879,087
1
4,879,319
null
5
1,261
I have 4 elements inside a container element. The container element will have its height set to 100% of the browser window. The 4 inner elements will appear vertically stacked on each other (as normal). The first two elements and the last element should have a "natural" height (ie: enough to fit their contents). The 3rd element should expand to fill the space available in the container, after the other 3 eat all they need to. So, it would look something like this: ![CSS Stacked Elements](https://i.stack.imgur.com/tEssz.png) I cannot set explicit heights for Element-1, Element-2, or Element-4, nor do I know the height of the Container. I don't know the natural height of Element-3 either; I plan on using `overflow-scroll` if it gets larger then what's available. I've added spacing between the elements for illustration, but there will be spacing (margins/padding) between the real elements too. How do you achieve this using HTML/CSS? If compromises have to be made to get a decent layout, I'll consider them. Bonus points if the technique also applies horizontally (which I've needed on occasion).
"Whatever is Left" in a CSS layout
CC BY-SA 2.5
null
2011-02-02T19:47:03.387
2011-02-03T12:50:38.737
null
null
3,488
[ "html", "css", "layout", "positioning" ]
4,879,541
1
4,879,803
null
0
156
I want to show only the top 5 comments for a specific post (Like the post on facebook where people cant comment them). gbn was kind enough to help figure out that issue by doing the following: But since I'm no sql grand master I would need your help to put that into my real sql statement. So my question is could you rearrange my sql to put the OUTER APPLY in my real sql statement. Assuming that my table comments reprensent tblComment and that actioncomments represent the table tblPost ![enter image description here](https://i.stack.imgur.com/uXg3b.png)
Top 5 comments from a specific post. How to write my SQL
CC BY-SA 2.5
null
2011-02-02T20:32:07.400
2011-02-02T21:21:02.223
2011-02-02T21:21:02.223
490,570
490,570
[ "sql", "tsql", "sql-server-2008" ]
4,879,630
1
4,879,769
null
0
182
![enter image description here](https://i.stack.imgur.com/iS1te.png) ![enter image description here](https://i.stack.imgur.com/6W78N.png) Can anyone explain this error? It works fine if I use [equipment valueForKey:@"name"]; or another property yet I can't use the Core Data generated accessors.
Core Data Property Not Found on Type Equipment
CC BY-SA 2.5
null
2011-02-02T20:43:44.670
2011-02-02T20:57:26.690
null
null
519,493
[ "core-data" ]
4,879,638
1
null
null
5
812
I have try my app (dev on Windows 7) on the Windows XP Mode (SP3). And my Tbutton (and other) pictures related to TImageList are very awfull (rounded of black).Do you have an explanation ? Or a solution ? ![enter image description here](https://i.stack.imgur.com/Uog3S.png) Thanks a lot, Have a nice day ! EDIT : @Ken The same EXE, compiled on Windows XP or Windows 7 with D2009 gives me the same result. No transparency on XP Mode SP3 (maybe it is a problem on the virtual machine, but it is strange) and transparency on Windows 7... @Ken With Delphi 2010 same problem : Test file (source+Exe) : [http://www.onkeysoft.com/Test.zip](http://www.onkeysoft.com/Test.zip) @David : One with Facebook, and the other don't know why, i have just enter my name and email... I thought i was login but not... (This is the first time I use stackoverflow sorry for problems)
Nasty Png in Tbutton on Windows XP SP3 (XP mode Windows 7)
CC BY-SA 2.5
0
2011-02-02T20:44:23.867
2011-04-28T17:55:47.510
2011-02-02T21:26:33.520
600,199
600,199
[ "windows", "delphi", "image", "png", "timagelist" ]
4,879,723
1
4,881,104
null
7
6,667
Whenever I save a pcolor or quiver plot as an EPS or PDF, I get this faint white grid that seems to be some sort of rendering problem. The first images shows the problem, the second one is how it looks in the figure window. I'm simply using the "Save As" menu item to save as an eps. Any suggestions on how I can get a nice looking vector image? I'm on OS X. Thanks! ![Annoying ugly white grid](https://i.stack.imgur.com/QyIvC.png) ![No white grid](https://i.stack.imgur.com/x42id.png)
White grid saving MATLAB plot as EPS or PDF
CC BY-SA 2.5
0
2011-02-02T20:54:18.880
2013-09-09T13:41:13.173
2011-02-05T00:47:15.507
7,920
91,181
[ "pdf", "matlab", "vector", "plot", "eps" ]