Id
int64
1.68k
75.6M
PostTypeId
int64
1
2
AcceptedAnswerId
int64
1.7k
75.6M
ParentId
int64
1.68k
75.6M
Score
int64
-60
3.16k
ViewCount
int64
8
2.68M
Body
stringlengths
1
41.1k
Title
stringlengths
14
150
ContentLicense
stringclasses
3 values
FavoriteCount
int64
0
1
CreationDate
stringlengths
23
23
LastActivityDate
stringlengths
23
23
LastEditDate
stringlengths
23
23
LastEditorUserId
int64
-1
21.3M
OwnerUserId
int64
1
21.3M
Tags
list
6,574,608
1
6,767,412
null
0
1,033
I have signed up for office 365 which provides sharepoint site. I have created a simple master page and content page, however i'm unable to edit the content of the page from sharepoint designer MasterPage.master ``` <%@Master language="C#"%> <%@ Register tagprefix="SharePoint" namespace="Microsoft.SharePoint.WebControls" assembly="Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %> <!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 id="Head1" runat="server"> <SharePoint:RobotsMetaTag runat="server"></SharePoint:RobotsMetaTag> </head> <body> <form id="frmMain" runat="server"> <asp:ContentPlaceHolder ID="cphMain" runat="server"> </asp:ContentPlaceHolder> </form> </body> </html> ``` default.aspx ``` <%@ Page Language="C#" MasterPageFile="~site/MasterPage.master" inherits="Microsoft.SharePoint.WebPartPages.WebPartPage, Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" meta:progid="SharePoint.WebPartPage.Document" meta:webpartpageexpansion="full" %> <%@ Register tagprefix="SharePoint" namespace="Microsoft.SharePoint.WebControls" assembly="Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %> <asp:Content ID="content1" runat="server" ContentPlaceHolderID="cphMain"> My custom html </asp:Content> ``` ![enter image description here](https://i.stack.imgur.com/Lmo6U.png)
Editing content of page having custom master page in office365 sharepoint site
CC BY-SA 3.0
null
2011-07-04T17:47:44.130
2011-07-20T19:32:46.270
2011-07-05T10:27:50.270
223,752
223,752
[ "c#", "asp.net", "sharepoint", "office365" ]
6,574,712
1
6,589,071
null
1
4,353
I'm using VS2010 and I'm going through some examples in my book and I'm trying to find the preInit method. I seem to recall in VS2008 for VB.Net all the Page LifeCycle methods were in the upper right hand side drop down for the "Page" element (upper left hand side). Like I said . In my upper left drop down all I see is _Default. The only PLC event I see is Page_Load. Do I have to manually type out the preInit method or is there a way to get it to auto populate like I've seen in VB using 2008? ![enter image description here](https://i.stack.imgur.com/tpiqM.png) I followed Kirill answer and it did everything he said it would. However, this is what it produced (Default.aspx is the name of the page I'm using): ``` private void _Default_PreInit(object sender, EventArgs e) { ... } ``` When I put a break point in there, it never got into that code block and the code was never run... However, when I manually wrote it out using the following: ``` protected void Page_PreInit(object sender,EventsArgs) { ... } ``` The break point and the code in that block worked! Any ideas?
visual studio 2010 - preInit method
CC BY-SA 3.0
null
2011-07-04T17:59:13.147
2011-07-05T21:27:10.647
2011-07-05T21:27:10.647
380,317
380,317
[ "asp.net", "visual-studio-2010", "c#-4.0" ]
6,574,791
1
6,575,337
null
3
566
How to compare two black curves on a white background? How to do it as fast? For example this ![http://i.stack.imgur.com/xUcwc.jpg](https://i.stack.imgur.com/f6JI5.jpg) and this ![enter image description here](https://i.stack.imgur.com/6TFxx.jpg) are similar, but this ![enter image description here](https://i.stack.imgur.com/da2NG.jpg) and this ![enter image description here](https://i.stack.imgur.com/w1tdJ.jpg) are not First curve I'll draw on JPanel, second is image.
how to check if curves are similar
CC BY-SA 3.0
null
2011-07-04T18:10:20.253
2011-07-05T06:11:32.120
2011-07-05T06:11:32.120
14,149
828,558
[ "java", "algorithm", "image-processing", "image-recognition" ]
6,574,948
1
6,575,161
null
0
163
does anyone know of a simple script to have a list of items and show/hide one `<li>` at a time without engaging ALL of them in the list? Just seeing if anyone had something clever. ![enter image description here](https://i.stack.imgur.com/lWIaG.png) I want to find the parent of each link in a list so it only slideToggle's the appropriate `<li>` as you go down. I'm trying to list classes for a school and you can open them and see more as you go along, but not open ALL of them at once, and without writing 200 click statements ;) ``` $('.link').click(function() { $('.li').slideToggle(); }); $(this).parent().parent().next('.toggle').toggle('slow') or $(this).closest('tr').next('.toggle').toggle('slow'); ```
List of hidden divs with buttons to show-hide each one
CC BY-SA 3.0
null
2011-07-04T18:29:12.380
2011-07-04T19:16:49.020
2011-07-04T19:16:49.020
764,653
764,653
[ "jquery", "hide", "show" ]
6,575,282
1
6,575,472
null
2
3,426
I'm using the following code: ``` x = linspace(0, 9, 10); y1 = x; y2 = x.^2; y3 = x.^4; myfig = figure('Position', [500 500 400 320]); %[left, bottom, width, height]: ax1 = gca; hold on p1 = plot(x,y1,'x--r'); p2 = plot(x,y2,'*-b'); xlabel('blaaa'); ylabel('fooo'); xlim([0 max(x)]); ax2 = axes('Position',get(ax1,'Position'),... 'XAxisLocation','top',... 'YAxisLocation','right',... 'Color','none',... 'XTickLabel', [],... 'XColor','k','YColor','k'); ylabel(ax2, 'asdasd'); linkaxes([ax1 ax2],'x'); hold on p3 = plot(x,y3,'s:g','Parent',ax2); legend([p1 p2 p3], {'one', 'two', 'three'}, 'Location', 'NorthWest'); ``` whereas the right y-label isnt shown: Is there a way to show it by decreasing either the margin between the left-edge and the left y-label or by decreasing the width of the actual plotted data without resizing the figure window? Thanks : Added an image: ![enter image description here](https://i.stack.imgur.com/HHWlq.jpg) Either decrease the red margin or the 'green' size, because wherre the blue arrow is, the y-label is now shown anymore since it doesn't fit!
Matlab: y-label isn't shown in small figure window
CC BY-SA 3.0
null
2011-07-04T19:13:00.057
2011-07-04T19:42:41.587
2011-07-04T19:29:23.170
701,049
701,049
[ "matlab", "size", "label", "figure" ]
6,575,293
1
6,578,814
null
4
722
I am looking for an algorithm that can connect points together with a continuous curve line. Imagine drawing from point a to b to c until the last point, and when you draw from point to point, the line must be a curve and is continuous with respect to the previous point and next point, as if the given points are just samples of a closed loop. Please see figure below for illustration. Are there such algorithm for something like this? ![close_encircle](https://i.stack.imgur.com/B1hMC.png) *The circles in the figure are my list of points.
Looking for a "closing curves connecting with respect to points" algorithm
CC BY-SA 3.0
0
2011-07-04T19:15:23.927
2011-07-05T07:24:30.650
null
null
144,201
[ "algorithm", "image-processing" ]
6,575,360
1
6,575,444
null
0
204
When a user clicks on a Table View Cell, I would like to push a UIView into the place of the Table View, swap out the current top bar items to just have a "back" button to return to the original view, and remove the bottom bar. How could I do that? Here is structure: ![enter image description here](https://i.stack.imgur.com/SJj9l.png) This is what it looks like: ![enter image description here](https://i.stack.imgur.com/yuKgo.png) This is what is should look like after a table view cell is clicked: ![enter image description here](https://i.stack.imgur.com/sMn54.png) Thanks for the help!
Table view load subview?
CC BY-SA 3.0
null
2011-07-04T19:26:07.663
2011-07-04T19:56:32.850
null
null
487,060
[ "iphone", "objective-c", "xcode", "uitableview", "uiview" ]
6,575,366
1
6,576,340
null
3
9,894
I'm building an "" system. so far the system is capable to identify licence plates in good quality without any noise. what I want in the next level is to be able to identify licence plates in poor quality beacuse of different reasons. for example, let's look at the next plate: ![enter image description here](https://i.stack.imgur.com/JmHKJ.jpg) as you see, the numbers are not look clearly, because of light returns or something else. for my question: how can I improve the image quality, so when I move to binary image the numbers will not fade away? thanks in advance.
How to improve image quality in Matlab
CC BY-SA 3.0
0
2011-07-04T19:26:44.817
2014-06-26T22:24:23.577
2013-11-14T21:27:21.850
null
556,011
[ "matlab", "image-processing" ]
6,575,409
1
13,366,783
null
51
64,658
Ok, First of all, I searched all the internet, but nobody has a similar problem like this. So, all I want is to have 3 textViews, bottom aligned with the screen and with the same width. Here is an image representing what I want: ![enter image description here](https://i.stack.imgur.com/aVhkF.png) And here is my code: ``` <RelativeLayout android:layout_width="match_parent" android:layout_height="match_parent"> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_alignParentBottom="true"> <TextView android:text="@string/help_1" android:layout_weight="0.33" android:layout_width="match_parent" android:layout_height="wrap_content" android:background="@drawable/mynicebg1" android:layout_gravity="bottom"/> <TextView android:text="@string/help_2" android:layout_weight="0.33" android:layout_width="match_parent" android:layout_height="wrap_content" android:background="@drawable/mynicebg2" android:layout_gravity="bottom"/> <TextView android:text="@string/help_3" android:layout_weight="0.33" android:layout_width="match_parent" android:layout_height="wrap_content" android:background="@drawable/mynicebg3" android:layout_gravity="bottom"/> </LinearLayout> </RelativeLayout> ``` Well, it works when the 3 textViews have the same height, but when their size differ, I get the following result: ![problem](https://i.stack.imgur.com/FvEsu.png) Another strange behavior, is that when I set the layout_gravity of the biggest text to "center-vertical", I get the following result: ![first workaround](https://i.stack.imgur.com/Yq6bI.png) So obviously, I went crazy and tried another combinations with center-vertical, but nothing worked as I wanted initially: ![desperation workaround](https://i.stack.imgur.com/qZbVy.png) So, any tips on how to solve this?
LinearLayout: layout_gravity="bottom" not working on Horizontal LinearLayout
CC BY-SA 3.0
0
2011-07-04T19:32:49.203
2018-10-27T12:38:45.687
2011-07-04T20:16:00.243
691,169
691,169
[ "android" ]
6,575,428
1
null
null
3
3,051
I'm generating html files whit this data (stored in postgres): ![my data in postgres](https://i.stack.imgur.com/IisKt.jpg) The html files are generated as UTF-8, but the string looks like they appear in the DB. ![generated html file](https://i.stack.imgur.com/JNQBI.jpg) How I can do to make the text appear correctly? Like: Note. I'm not able to change postgres configuration, I'm using Java 1.6, Postgres 8.4, JDBC I use this code to create the html files: ``` public static void stringToFile (String file_name, String file_content) throws IOException { OutputStream out = new FileOutputStream(file_name); OutputStreamWriter writer = new OutputStreamWriter(out, "UTF-8"); try { try { writer.write(file_content); } finally { writer.close(); } } finally { out.close(); } } ``` And I use it like: ``` StringBuilder html_content = new StringBuilder(); ResultSet result_set = statement.executeQuery(sql_query); while (result_set.next()) { html_content.append(String.format('<li>%s</li>', result_set.getString(1))); } Utils.stringToFile('thehtmlfile.html', html_content.toString()); ``` This works for me: ``` new String(str.getBytes("ISO-8859-1"), "UTF-8") ```
java convert to utf-8 from postgres
CC BY-SA 3.0
0
2011-07-04T19:35:49.253
2011-07-06T19:14:09.480
2011-07-06T19:14:09.480
407,658
407,658
[ "java", "encoding", "utf-8" ]
6,575,424
1
6,575,763
null
10
8,709
How can i include the entire certification path when signing code using [signtool](http://msdn.microsoft.com/en-us/library/8s9b9yaz%28v=vs.80%29.aspx)? Older versions of signtool would include the entire certification path in a digital signature. As it is now if i sign an executable with `signtool`: ``` signtool.exe" sign /v /f avatar.pfx -t "http://timestamp.verisign.com/scripts/timstamp.dll" app.exe ``` the signature is not valid: [](https://i.stack.imgur.com/T8l35.png) This is because there is no certification path: ![enter image description here](https://i.stack.imgur.com/2qQtd.png) Binaries signed with the older version of signtool worked fine: ![enter image description here](https://i.stack.imgur.com/4uQFM.png) How do i tell signcode to include the entire certification path when signing? What is the proper way to sign a binary? --- : SignTool version `6.1.7600.16385`: ![enter image description here](https://i.stack.imgur.com/k8xQV.png) ## See also - [How can I sign an ActiveX control with a code signing certificate and be a verified publisher?](https://stackoverflow.com/questions/2814233/how-can-i-sign-an-activex-control-with-a-code-signing-certificate-and-be-a-verifi)- [Signing WinForms ClickOnce app with Certificate Chain](http://www.pcreview.co.uk/forums/signing-winforms-clickonce-app-certificate-chain-t3522706.html)- [ClickOnce: Certificate cannot be validated](http://groups.google.com/group/microsoft.public.dotnet.framework.windowsforms/browse_thread/thread/8c46df2acf25d54/4c1c4221f69fa09e?pli=1)
How to include entire certification path when signing code with signtool?
CC BY-SA 3.0
0
2011-07-04T19:34:20.290
2019-06-07T16:59:28.823
2017-05-23T11:48:22.880
-1
12,597
[ "code-signing" ]
6,575,742
1
6,575,863
null
15
11,669
I have project that depends on commons-httpclient [2.0] (compile). I would like to write some jbehave tests - jbehave-core 3.4.5 (test). Both this dependencies depend on commons-lang but in different versions - 1.0.1 and 2.5. ![dependency](https://i.stack.imgur.com/eUC76.png) When I execute I get [BUID FAILURE] in tests section. There is an exception for my testcase in surefire-plugin output: ``` java.lang.NoSuchMethodError: org.apache.commons.lang.StringUtils.substringBeforeLast(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String; ``` As I looked in source code - in commons-lang 1.0.1 - indeed, there is no StringUtils.substringBeforeLast(...) method. Why maven uses commons-lang from commons-httpclient (compile) and not from jbehave-core in testing? I can't afford to exclude this conflicting dependency in commons-httpclient so it must stay in compile time. So how can this be resolved - commons-lang 2.5 version in testing and 1.0.1 in compile time?
Maven 2 - different dependency versions in test and compile
CC BY-SA 4.0
0
2011-07-04T20:19:26.357
2022-05-22T01:30:00.300
2022-05-22T01:30:00.300
1,318,479
639,753
[ "java", "maven", "version", "maven-2" ]
6,575,885
1
6,603,740
null
0
238
How to extend the sharing feature with checkbox for default app? here is my code: ``` final Intent emailIntent = new Intent(android.content.Intent.ACTION_SEND); emailIntent.setType("plain/text"); emailIntent.putExtra(android.content.Intent.EXTRA_EMAIL, developers); emailIntent.putExtra(android.content.Intent.EXTRA_SUBJECT, subject); emailIntent.putExtra(android.content.Intent.EXTRA_TEXT, message); ``` and the screencast herefor (without checkbox): ![](https://i.imgur.com/vejtG.jpg) I want to make posible to set one app as default app.
Checkbox for sharing feature
CC BY-SA 3.0
0
2011-07-04T20:37:16.300
2011-07-06T22:18:53.583
null
null
597,624
[ "android", "checkbox", "default" ]
6,575,889
1
25,971,833
null
6
1,968
![http://dl.dropbox.com/u/3724424/Programming/Gifs/game6.gif](https://i.stack.imgur.com/OZZp1.gif) I have a problem with AABB collision resolution. --- I resolve AABB intersection by resolving the X axis first, then the Y axis. This is done to prevent this bug: [http://i.stack.imgur.com/NLg4j.png](https://i.stack.imgur.com/NLg4j.png) --- The current method works fine when an object moves into the player and the player has to be pushed horizontally. As you can see in the .gif, the horizontal spikes push the player correctly. --- When the vertical spikes move into the player, however, the X axis is still resolved first. This makes "using the spikes as a lift" impossible. When the player moves into the vertical spikes (affected by gravity, falls into them), he's pushed on the Y axis, because there was no overlap on the X axis to begin with. --- Something I tried was the method described in the [first answer of this link](https://gamedev.stackexchange.com/questions/13774/2d-rectangular-object-collision-detect-direction). However the spikes and moving objects move by having their position changed, not velocity, and I don't calculate their next predicted position until their Update() method is called. Needless to say this solution didn't work either. :( --- I need to solve AABB collision in a way that both of the cases described above work as intended. This is my current collision source code: [http://pastebin.com/MiCi3nA1](http://pastebin.com/MiCi3nA1) I'd be really grateful if someone could look into this, since this bug has been present in the engine all the way back from the beginning, and I've been struggling to find a good solution, without any success. This is seriously making me spend nights looking at the collision code and preventing me from getting to the "fun part" and coding the game logic :( --- I tried implementing the same collision system as in the XNA AppHub platformer demo (by copy-pasting most of the stuff). However the "jumping" bug occurs in my game, while it doesn't occur in the AppHub demo. [ jumping bug: [http://i.stack.imgur.com/NLg4j.png](https://i.stack.imgur.com/NLg4j.png) ] To jump I check if the player is "onGround", then add -5 to Velocity.Y. Since the player's Velocity.X is higher than Velocity.Y (refer to the fourth panel in the diagram), onGround is set to true when it shouldn't be, and thus lets the player jump in mid-air. I believe this doesn't happen in the AppHub demo because the player's Velocity.X will never be higher than Velocity.Y, but I may be mistaken. I solved this before by resolving on the X axis first, then on the Y axis. But that screws up the collision with the spikes as I stated above.
2D Platformer AABB collision problems
CC BY-SA 3.0
0
2011-07-04T20:37:49.710
2014-09-22T10:25:17.057
2017-04-13T12:18:41.660
-1
598,696
[ "c#", "2d", "collision-detection", "physics" ]
6,575,958
1
6,588,178
null
1
3,308
I create my window using CreateWindowEx, but I only get an icon in the task bar; both the window's title bar and the icon that shows when I Alt+Tab show this type of dummy icon: ![default Windows icon](https://lh5.googleusercontent.com/-BjKJGPbgO80/ThIlaUvZubI/AAAAAAAAAGM/NySiWQrLkzo/s128/bad_icon.png). I set both the `hIcon` and the `hIconSm` fields in the `WNDCLASSEX` to the value returned from `::LoadIcon(hInstance, IDI_APPLICATION)` (not NULL). The .ico file itself was made out of a .png which I genereated through [http://converticon.com](http://converticon.com) to 16x16, 32x32 and 96x96 (what are the recommended sizes btw?). Could it be that I'm using the wrong sizes or color depth? If so, why does it work in the task bar (different size)? Thanks!
Win32 CreateWindowEx() window icon not showing properly
CC BY-SA 3.0
null
2011-07-04T20:50:47.357
2011-07-05T19:59:44.993
2011-07-05T19:54:36.407
87,973
87,973
[ "c", "winapi", "icons", "titlebar" ]
6,576,071
1
6,576,281
null
1
889
I can't understand where i go wrong here. My problem is that the texture is not aligned. The image on the left is the OpenGl textured quad, and the right is the original. Notice how the columns are offset in the textured quad. ![Mis-aligned texture](https://i.stack.imgur.com/5vJNN.jpg) I don't know if i am not loading the texture properly, or make a mistake during uploading it to videomemory, or simply use the wrong texCoords... The image is a bmp (R8 G8 B8 A8) and the mistake lies somewhere in here: (Loading of bitmap and uploading of texture) ``` Bitmap fontBmp = new Bitmap("font2.bmp"); MemoryStream ms = new MemoryStream(); fontBmp.Save(ms, ImageFormat.Bmp); int imageWidth = fontBmp.Width; int imageHeight = fontBmp.Height; byte[] fontBytes = ms.GetBuffer(); fontBmp.Dispose(); ms.Dispose(); Gl.glBindTexture(Gl.GL_TEXTURE_2D, (int)TexId.font); Gl.glPixelStorei(Gl.GL_UNPACK_ALIGNMENT, 1); Gl.glTexParameteri(Gl.GL_TEXTURE_2D, Gl.GL_TEXTURE_WRAP_S, Gl.GL_CLAMP_TO_EDGE); Gl.glTexParameteri(Gl.GL_TEXTURE_2D, Gl.GL_TEXTURE_WRAP_T, Gl.GL_CLAMP_TO_EDGE); Gl.glTexParameteri(Gl.GL_TEXTURE_2D, Gl.GL_TEXTURE_MAG_FILTER, Gl.GL_NEAREST); Gl.glTexParameteri(Gl.GL_TEXTURE_2D, Gl.GL_TEXTURE_MIN_FILTER, Gl.GL_NEAREST); Gl.glTexEnvf(Gl.GL_TEXTURE_ENV, Gl.GL_TEXTURE_ENV_MODE, Gl.GL_MODULATE); // Try GL_DECAL... Gl.glTexImage2D(Gl.GL_TEXTURE_2D, 0, Gl.GL_RGBA, imageWidth, imageHeight, 0, Gl.GL_RGBA, Gl.GL_UNSIGNED_BYTE, fontBytes); ``` (The quad...) ``` Gl.glTexCoord2f(0f + (0.5f / 128f), (127f / 128f) + (0.5f / 128f)); Gl.glVertex2i(50, 50); Gl.glTexCoord2f(0f + (0.5f / 128f), 0f + (0.5f / 128f)); Gl.glVertex2i(50, this.Height - 50); Gl.glTexCoord2f((127f / 128f) + (0.5f / 128f), 0f + (0.5f / 128f)); Gl.glVertex2i(this.Width - 50, this.Height - 50); Gl.glTexCoord2f((127f / 128f) + (0.5f / 128f), (127f / 128f) + (0.5f / 128f)); Gl.glVertex2i(this.Width - 50, 50); ``` Does anyone spot anything causing this?
OpenGl texture questions
CC BY-SA 3.0
null
2011-07-04T21:07:31.427
2011-07-04T21:39:51.123
null
null
628,993
[ "c#", "opengl", "textures" ]
6,576,089
1
6,576,133
null
0
891
I have a shape on a background. I have one jQuery color picker to chose the color of the shape, and one jQuery color picker to change the background color. I need ie6 support. The shape can be any kind of image. Changing a div background color behind a negative image of the shape doesn't work, because this way i can only change the color of the shape. ![enter image description here](https://i.stack.imgur.com/GoCZD.png) Any ideas ?
Best way to change multiple images color with jQuery
CC BY-SA 3.0
null
2011-07-04T21:10:22.723
2011-07-06T12:59:37.887
2011-07-06T12:59:37.887
311,744
311,744
[ "jquery", "html", "css", "image", "color-picker" ]
6,576,285
1
6,582,381
null
7
379
I am using R#6 and when I edit some razor views, R#6 suggests that I "use directory". (Whine :)) I dont want to! How do I turn off this annoyance? I have searched through R#6 options. It is definitely R# since the annoyance goes away when i suspend R#. In the printscreen, R# wants to change /SignUp to ../Signup. It is incorrect because the view is the layout and could be in any directory structure. So i want it to be /Signup ![enter image description here](https://i.stack.imgur.com/Ayagd.png) As derigel states. Wait for the warning to show. Hit escape. Then CTRL+Enter. A mini menu appears where you can suppress or change the warning severity. I changed the warning severity to "do not show"
R#6 - Suggests "Use directory" in razor views. How to disable?
CC BY-SA 3.0
0
2011-07-04T21:40:57.053
2013-09-11T19:48:46.543
2011-07-05T22:22:33.103
511,438
511,438
[ "asp.net-mvc-3", "razor", "resharper", "resharper-6.0" ]
6,576,321
1
6,576,449
null
4
2,343
I am using the [Obsidian theme](http://www.eclipsecolorthemes.org/?view=theme&id=21) with the [Eclipse Color Theme plugin](http://www.eclipsecolorthemes.org/?view=plugin). When coding I am very happy with how everything looks: ![Obsidian on screen](https://i.stack.imgur.com/GCdbU.png) However, printed code is rather hard to read: ![Obsidian print out](https://i.stack.imgur.com/h7Z4l.png) Is there any way to make Eclipse print with different colors than it displays?
Eclipse - Using different colors for printing
CC BY-SA 3.0
null
2011-07-04T21:47:57.557
2014-02-19T15:14:57.547
2011-07-04T21:50:26.623
21,234
355,325
[ "eclipse", "printing" ]
6,576,520
1
null
null
-3
116
> [what does the exclamation mark in Objective C means in “if (![”](http://stackoverflow.com/questions/6576413/what-does-the-exclamation-mark-in-objective-c-means-in-if) in my previous question I wasn't quite clear. What puzzles me is why in this line: ``` if (![txtOperator.text isEqualToString: @"+"]) { int sum=a+b; [result setText: [NSString stringWithFormat:@"%d", sum]]; } ``` the operands are added and result displayed even though with the NOT operator it was not supposed to happen and when I add the following lines the calculator continues to do addition only doesn't matter what operator you put there. ``` else if (![txtOperator.text isEqualToString: @"-"]) { int sum=a-b; [result setText: [NSString stringWithFormat:@"%d", sum]]; } else if (![txtOperator.text isEqualToString: @"/"]) { int sum=a/b; [result setText: [NSString stringWithFormat:@"%d", sum]]; } else if (![txtOperator.text isEqualToString: @"*"]) { int sum=a * b; [result setText: [NSString stringWithFormat:@"%d", sum]]; } ```
why a line with logical NOT still does what a YES would do?
CC BY-SA 3.0
null
2011-07-04T22:24:05.383
2017-06-30T14:01:40.710
2017-06-30T14:01:40.710
1,873,567
828,767
[ "iphone", "objective-c" ]
6,576,604
1
6,576,864
null
5
25,454
There's something very irritating going on with my TIMESTAMPS ... I have a "createdat", "deletedat" and "updatedat" column in my Table... I've set my deletedat and updated at to NULL and DEFAULT NULL ... however, when a new record is added, the NOW() function is always executed for deletedat and updatedat instead of just leaving it as NULL. So I end up with: 00:00:00 ... Why isn't it just defaulting to NULL? Here's my Table: ![enter image description here](https://i.stack.imgur.com/sJVgn.png) Here's when Inserting (notice the NOW function is selected): ![enter image description here](https://i.stack.imgur.com/qvwAB.png) The following SQL is executed: ``` INSERT INTO `MYTABLE_DEV`.`messages` (`id`, `fromUserId`, `toUserId`, `subject`, `body`, `createdat`, `updatedat`, `deletedat`) VALUES (NULL, '1', '3', 'Message', 'This is another message.', CURRENT_TIMESTAMP, NOW(), NOW()); ```
MySQL, phpMyAdmin: TIMESTAMP Always Executes NOW Function
CC BY-SA 3.0
0
2011-07-04T22:39:58.370
2013-04-05T20:29:14.960
2011-07-04T22:57:48.847
337,806
337,806
[ "mysql", "database", "timestamp", "phpmyadmin" ]
6,576,660
1
6,636,584
null
16
13,762
I can't seem to figure out how to properly export my cert for use in my iOS app with push notifications. I'm using the following cert, downloaded from the section of the . ![enter image description here](https://i.stack.imgur.com/F0Z8s.png) I'm then following one of the many tutorials I've found all over the web that are all different by the way, to get my cert into a format for use in [ruby-apns](http://code.google.com/p/ruby-apns-daemon/). First I export it from the Keychain: ![enter image description here](https://i.stack.imgur.com/z6GvN.png) After I give it a name and a password I perform the following commands in the terminal*: ``` openssl pkcs12 -in cert.p12 -out apple_push_notification_dev.pem -nodes -clcerts ``` - [http://blog.boxedice.com/2010/06/05/how-to-renew-your-apple-push-notification-push-ssl-certificate/](http://blog.boxedice.com/2010/06/05/how-to-renew-your-apple-push-notification-push-ssl-certificate/)- [http://blog.boxedice.com/2009/07/10/how-to-build-an-apple-push-notification-provider-server-tutorial/](http://blog.boxedice.com/2009/07/10/how-to-build-an-apple-push-notification-provider-server-tutorial/)- [http://code.google.com/p/apns-sharp/wiki/HowToCreatePKCS12Certificate](http://code.google.com/p/apns-sharp/wiki/HowToCreatePKCS12Certificate)- [http://wiki.cs.unh.edu/wiki/index.php/Using_the_Apple_Push_Notification_Service](http://wiki.cs.unh.edu/wiki/index.php/Using_the_Apple_Push_Notification_Service) Not a single one of these solutions work. I'm sitting here looking at the following error from the console when I try to use ruby-apns: ``` read finished A: sslv3 alert certificate unknown (OpenSSL::SSL::SSLError) ``` And essentially every other server solution I've found has told me my certificate is incorrect or that there's a problem with it as well. Am I doing this wrong? =============================== ## Overnight Courtesy Bump Stealth Edit So I beat my head against the wall last night, and actually came across Apple's own instructions for doing this. It's almost the exact same, and I tried it to the same tune. Nevertheless, here is the latest attempt from [this link](http://developer.apple.com/library/ios/#documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/ProvisioningDevelopment/ProvisioningDevelopment.html#//apple_ref/doc/uid/TP40008194-CH104-SW1): ``` openssl pkcs12 -in CertificateName.p12 -out CertificateName.pem -nodes ```
Apple Push Notifications, how do I properly export my cert?
CC BY-SA 3.0
0
2011-07-04T22:52:30.907
2015-04-28T11:32:01.660
2020-06-20T09:12:55.060
-1
50,391
[ "iphone", "certificate", "openssl", "push" ]
6,576,987
1
null
null
0
202
I want to replicate the functionality of this view in this app. It has a UIPageControl at the bottom with 3 views that only changes the view at the bottom, and not the whole view. Any basic advice on how to accomplish this? ![enter image description here](https://i.stack.imgur.com/8IZde.jpg)
How To Replicate This UIPageControl Look?
CC BY-SA 3.0
0
2011-07-05T00:02:15.877
2011-11-13T22:00:54.183
null
null
815,767
[ "iphone", "objective-c", "cocoa-touch", "uipagecontrol" ]
6,577,090
1
6,593,256
null
9
2,268
I have a 32-page PDF of my family tree. Instead of having the family tree all on one really big PDF page (which is what I want), it is formatted so a group of 8 individual US letter-sized pages are supposed to be stitched across the width; 4 rows of this completes the tree. The margins of each page are all 22px. If you visualize it in table form (where the numbers represent PDF page numbers): ![table](https://i.stack.imgur.com/oD0u8.png) I've tried to whip up some Python code to do this, but haven't gotten very far. How can I stitch the PDF so it can be one big page instead of smaller individual pages? Thanks for the help. EDIT: Here's the code I wrote. Sorry for not originally posting it. ``` from pyPdf import PdfFileWriter, PdfFileReader STITCHWIDTH = 8; currentpage = 1; output = PdfFileWriter() input1 = PdfFileReader(file("familytree.pdf", "rb")) for(i=0; i<=4; i++) output.addPage(input1.getPage(currentpage)) currentpage++; #do something to add other pages to width print "finished with stitching" outputStream = file("familytree-stitched.pdf", "wb") output.write(outputStream) outputStream.close() ```
How to stitch several PDF pages into one big canvas-like PDF?
CC BY-SA 3.0
0
2011-07-05T00:36:24.893
2022-04-22T13:43:05.613
2015-03-31T19:43:44.957
359,307
547,398
[ "python", "pdf", "pdflatex" ]
6,577,101
1
6,577,626
null
1
2,114
I have a ground object and a spear shaped object(dynamic). When a button is pressed, a linear velocity is applied to the spear. It works fine but sometimes, it gets stuck on the ground. This happens most of the time (not always) when the side opposite of spear hide collides straight down with the ground. I am attaching some images so you guys get the picture: ![enter image description here](https://i.stack.imgur.com/7jpSU.png) Here my code: ``` #import "HelloWorldLayer.h" #define PTM_RATIO 32 @implementation HelloWorldLayer +(CCScene *) scene{ CCScene *scene = [CCScene node]; HelloWorldLayer *layer = [HelloWorldLayer node]; [scene addChild: layer]; return scene; } -(id) init { if( (self=[super init])) { isSimulating = NO; CGSize winSize = [CCDirector sharedDirector].winSize; self.isAccelerometerEnabled = YES; self.isTouchEnabled = YES; // Create sprite and add it to the layer _spear = [CCSprite spriteWithFile:@"image_SPEAR.png"]; _spear.position = ccp(40, 30); [self addChild:_spear]; label = [CCLabelTTF labelWithString:@"Hello World" fontName:@"Marker Felt" fontSize:20]; CGSize size = [[CCDirector sharedDirector] winSize]; label.position = ccp( size.width /2 , size.height/2 ); [self addChild: label]; CCMenuItem *starMenuItem = [CCMenuItemImage itemFromNormalImage:@"ball.png" selectedImage:@"ball.png" target:self selector:@selector(starButtonTapped:)]; starMenuItem.position = ccp(60, 250); CCMenu *starMenu = [CCMenu menuWithItems:starMenuItem, nil]; starMenu.position = CGPointZero; [self addChild:starMenu]; // Create a world b2Vec2 gravity = b2Vec2(0.0f, -20.0f); bool doSleep = true; _world = new b2World(gravity, doSleep); // Create edges around the entire screen b2BodyDef groundBodyDef; groundBodyDef.position.Set(0,0); b2Body *groundBody = _world->CreateBody(&groundBodyDef); b2PolygonShape groundBox; b2FixtureDef boxShapeDef; boxShapeDef.shape = &groundBox; groundBox.SetAsEdge(b2Vec2(0,0), b2Vec2(winSize.width/PTM_RATIO, 0)); groundBody->CreateFixture(&boxShapeDef); groundBox.SetAsEdge(b2Vec2(0,0), b2Vec2(0, winSize.height/PTM_RATIO)); groundBody->CreateFixture(&boxShapeDef); groundBox.SetAsEdge(b2Vec2(0, winSize.height/PTM_RATIO), b2Vec2(winSize.width/PTM_RATIO, winSize.height/PTM_RATIO)); groundBody->CreateFixture(&boxShapeDef); groundBox.SetAsEdge(b2Vec2(winSize.width/PTM_RATIO, winSize.height/PTM_RATIO), b2Vec2(winSize.width/PTM_RATIO, 0)); groundBody->CreateFixture(&boxShapeDef); boxShapeDef.friction = 0.3f; [self setup]; } return self; } - (void)setup { NSLog(@"Setting up..."); //set the sprite's initial position _spear.position = ccp(40, 30); _spear.rotation = 0.0f; //row 1, col 1 int num = 7; b2Vec2 verts[] = { b2Vec2(-36.0f / PTM_RATIO, -2.7f / PTM_RATIO), b2Vec2(20.1f / PTM_RATIO, -2.1f / PTM_RATIO), b2Vec2(24.4f / PTM_RATIO, -4.6f / PTM_RATIO), b2Vec2(36.7f / PTM_RATIO, -1.4f / PTM_RATIO), b2Vec2(23.9f / PTM_RATIO, 2.7f / PTM_RATIO), b2Vec2(20.7f / PTM_RATIO, 0.0f / PTM_RATIO), b2Vec2(-36.0f / PTM_RATIO, -0.5f / PTM_RATIO) }; // Create spear body and shape b2BodyDef spearBodyDef; spearBodyDef.type = b2_dynamicBody; spearBodyDef.position.Set(40.0/PTM_RATIO, 30.0/PTM_RATIO); //spearBodyDef.angle = 45.0 * (180.0f/b2_pi); spearBodyDef.userData = _spear; _spearBody = _world->CreateBody(&spearBodyDef); b2PolygonShape spearShape; spearShape.Set(verts, num); b2FixtureDef spearShapeDef; spearShapeDef.shape = &spearShape; spearShapeDef.density = 0.75f; spearShapeDef.friction = 0.2f; spearShapeDef.restitution = 0.2f; _spearBody->CreateFixture(&spearShapeDef); } - (void)starButtonTapped:(id)sender { if (isSimulating) { NSLog(@"Not simulating now..."); [self unschedule:@selector(tick:)]; _world->DestroyBody(_spearBody); _spearBody = NULL; [self setup]; } else { NSLog(@"Simulating now..."); [self schedule:@selector(tick:)]; float angle = _spearBody->GetAngle(); b2Vec2 force; force.Set(cos(angle) * 15.0f , sin(angle) * 15.0f); _spearBody->SetLinearVelocity(force); } isSimulating = !isSimulating; } - (void)ccTouchesMoved:(NSSet *)touches withEvent:(UIEvent *)event { if (!isSimulating) { UITouch* touch = [touches anyObject]; CGPoint location = [touch locationInView: [touch view]]; location = [[CCDirector sharedDirector] convertToGL: location]; float angleRadians = atanf((float)location.y / (float)location.x); float angleDegrees = CC_RADIANS_TO_DEGREES(angleRadians); _spear.rotation = -1 * angleDegrees; _spearBody->SetTransform(_spearBody->GetPosition(), angleRadians); [label setString:[NSString stringWithFormat:@"Angle: %f X: %f Y:%f", angleDegrees, location.x, location.y]]; NSLog(@"%@", @"touched"); } } - (void)tick:(ccTime) dt { _world->Step(dt, 10, 10); for(b2Body *b = _world->GetBodyList(); b; b=b->GetNext()) { if (b->GetUserData() != NULL) { CCSprite *ballData = (CCSprite *)b->GetUserData(); ballData.position = ccp(b->GetPosition().x * PTM_RATIO, b->GetPosition().y * PTM_RATIO); ballData.rotation = -1 * CC_RADIANS_TO_DEGREES(b->GetAngle()); } } } - (void) dealloc { delete _world; _world = NULL; [super dealloc]; } @end ``` I am guessing it has to do with friction and restitution but I have tried a lot of values and nothing makes this behavior go away. Thanks. **UPDATE:**I figured out what's causing this. Everytime it gets stuck, it's when the spear goes outside of groundBody. Everytime. But, why would it go outside of groundBody in the first place? Here's an image showing this. At the bottom, the spear is outside of body: ![enter image description here](https://i.stack.imgur.com/xMm7R.png)
Box2D dynamic body getting stuck (iPhone)
CC BY-SA 3.0
null
2011-07-05T00:40:02.400
2013-04-26T22:48:51.470
2011-07-05T01:21:22.193
635,064
635,064
[ "objective-c", "ios", "cocoa-touch", "box2d", "game-physics" ]
6,577,178
1
6,612,259
null
0
169
I need to know what control I can use in Symbian to view SMS' or any text but seems like the one in Symbian S60 devices, to seem like the image below. I'm going to use it in Symbian S60 5th Ed, Symbian^3 and Symbian Anna. I'm coding with Symbian C++, Using Symbian S60 5th Ed SDK, And Carbide.C++ 2.7 ![enter image description here](https://i.stack.imgur.com/haROf.jpg) Many thanks in advance.
What control to create sms viewer in Symbian
CC BY-SA 3.0
null
2011-07-05T00:59:16.680
2011-07-07T14:30:31.840
2011-07-05T06:57:10.767
488,433
749,796
[ "sms", "symbian", "s60" ]
6,577,227
1
6,577,449
null
8
3,401
Implementing "" (glorified multiplayer Solitaire) in Java. I'm trying to allow a player to drag a card (image) from their hand to somewhere else on the table. The problem is that the player's hand is "fanned" so the images of the cards are rotated and they overlap. ![enter image description here](https://i.stack.imgur.com/HgtJe.png) I've considered making each card a `JPanel`, but the issue then is that I'd have to paint the card rotated inside its `JPanel`, as they themselves can't be rotated. Ideally I'd like to avoid mouse-x,y formulas to determine which card is being chosen. Using an event-driven approach, how can I determine which card is chosen from the hand?
How can you detect a mouse-click event on an Image object in Java?
CC BY-SA 3.0
0
2011-07-05T01:16:47.480
2011-07-05T02:11:00.830
2011-07-05T01:36:37.970
418,556
828,867
[ "java", "events", "drag-and-drop", "mouse" ]
6,577,293
1
null
null
4
2,729
Im developing a website with some indian unicode characters, I have xampp installed on my pc and when I test on my local server, unicode characters are showing fine, but when i upload it to web server all the unicode characters are showing like ?? marks.... My web server is Linux based, So Can anybody help.... This is from my website: > ![enter image description here](https://i.stack.imgur.com/ldrsw.png) This is from my local web server: > ![enter image description here](https://i.stack.imgur.com/3wJyk.png)
Unicode fonts in php page in web browser showing as ? marks, how can i correct it?
CC BY-SA 3.0
null
2011-07-05T01:30:39.913
2014-08-14T21:18:17.453
2014-08-14T21:18:17.453
2,432,317
276,660
[ "php", "html", "unicode" ]
6,577,329
1
6,577,360
null
2
813
Notice this app: ![enter image description here](https://i.stack.imgur.com/b7O5T.png) How can I draw that sort of triangle above an existing `NSWindow`? I know the app in question probably draws the whole thing as a custom window, but I want to keep the existing title bar. Is there any way to draw a triangle and attach it above a `NSWindow`? Please note that the solution has to be MAS-compatible (i.e. no private frameworks or classes).
How to draw a "speech bubble" above NSWindow?
CC BY-SA 3.0
null
2011-07-05T01:39:16.563
2011-07-05T10:20:11.830
2011-07-05T03:00:13.410
169,394
456,851
[ "objective-c", "cocoa", "macos" ]
6,577,373
1
6,577,656
null
2
58
I came across this kind of table layout once upon a time (Unfortunately, I forget where I had seen this), which enable me to perform viewing, editing, deleting and newing. ![Useful table layout](https://i.stack.imgur.com/7izJf.png) Note that, click on `Edit` will turn the static label into an editable text field. Pressing `Enter` or `ESC`, with either commit changes to database or cancel the text changes. 1. Do you know any javascript library which enable me to do this? 2. Do you know any web site which employ this kind of user interface? I surf several of Google web site, but unable to find something similar.
Is there any javascript library which helps me to create this table layout for viewing, editing, deleting and newing
CC BY-SA 3.0
null
2011-07-05T01:50:35.530
2011-07-05T03:04:52.283
null
null
72,437
[ "javascript", "jquery" ]
6,577,509
1
6,577,682
null
3
973
Please consider : ``` dalist = {{1, 1, 1}, {2, 2, 2}, {3, 3, 3}, {4, 4, 4}, {5, 5, 5}, {1, 2, 1}, {2, 3, 1}, {3, 4, 1}, {4, 5, 1}, {5, 6, 1}} ``` I use the following to plot the above where `#2` & `#3` are x & y coordinates ``` Graphics@MapThread[Point[{#2, #3}] &, Transpose@dalist] ``` ![enter image description here](https://i.stack.imgur.com/KC8A7.png) - `#1` a timing reference I would like to use to color the points.- It can range from 1 to 30 in my data.- `#1 =1` should always yield to the same color. -
Conditional coloring using graphics in Mathematica
CC BY-SA 3.0
null
2011-07-05T02:26:51.717
2011-08-19T01:33:34.450
2011-08-19T01:33:34.450
618,728
769,551
[ "graphics", "wolfram-mathematica" ]
6,577,670
1
6,577,680
null
11
3,295
How can I use aero glass to cover my entire forms? Here is an example of what I mean: ![enter image description here](https://i.stack.imgur.com/Iebh5.png)
C#: Glass Forms?
CC BY-SA 3.0
0
2011-07-05T03:08:52.870
2021-10-25T07:07:42.780
2011-07-05T03:24:59.013
106,224
711,416
[ "c#", "windows", "winforms", "themes", "aero" ]
6,577,667
1
6,578,460
null
0
261
jQuery mobile has 5 inbuilt themes [http://jquerymobile.com/demos/1.0a4.1/#docs/toolbars/../../docs/api/themes.html](http://jquerymobile.com/demos/1.0a4.1/#docs/toolbars/../../docs/api/themes.html) ![enter image description here](https://i.stack.imgur.com/WxQZf.jpg) But design of the mobile website which I'm making is different an icons are also different. How and where to write custom css and change default icon to custom icon? Should i choose any default theme's CSS and make changes in that? Should i replace the default icons with my icons to keep the same name?
What is the proper way to use my own theme (style) design and icons using jQuery Mobile powered website?
CC BY-SA 3.0
null
2011-07-05T03:07:50.537
2011-10-29T00:15:02.043
null
null
84,201
[ "jquery", "css", "jquery-mobile", "mobile-website" ]
6,577,761
1
6,601,979
null
0
2,285
I'm trying to use the Jquery UI autocomplete plugin, and i'd like to render some html in the suggest box, with clickable links. The html seems to render ok, however when I click the links, they don't work and I get in my developer log: ``` jquery-ui.min.js:239Uncaught TypeError: Cannot call method 'data' of null Uncaught TypeError: Cannot call method 'data' of null a.widget._create.menu.a.addClass.appendTo.mousedown.menu.selectedjquery-ui.min.js:239 a.Widget._triggerjquery-ui.min.js:23 a.widget.selectjquery-ui.min.js:252 a.widget._createjquery-ui.min.js:247 f.event.handlejquery.min.js:17 f.event.add.k.i.handle.k jquery.min.js:16 ``` I'm using the following code in the HTML and Jquery side, the syntax is Haml as its in Rails. In the first script tag, I just define a template that I then render with Underscore.js. [This question](https://stackoverflow.com/questions/2497076/add-a-link-to-a-jqueryui-autocomplete-item) seems to reference a similar problem, but I don't understand the answer `"I think autocomplete uses an <a> for the element that provides the click event. In that case, you'll need to unset that click handler"` I'd appreciate any guidance! Its been 2 days I've been stuck on this. Thanks! ![rendered autocomplete menu screenshot](https://i.stack.imgur.com/zNrwp.png) ``` = text_field_tag :search, nil, :class => "jq_watermark", :id => "product-search-input", :title => "Keywords, Tags, Items, SKU..." %script(type="text/html" id="product-autocomplete-result-template") .cell.img %img(src='{{ main_image_thumb }}') .cell %h2= link_to '{{ label }}', CGI::unescape(product_path('{{ id }}')) .clear = link_to '{{ customer_count }} people have this', '#' %span Rating {{ rating }} %div{:id => "stars-wrapper-{{ id }}"} %select= options_for_select([1, 2, 3, 4, 5]) %a(href='http://www.google.com') Click Me .cell = link_to "I have this", '#', :class => "button" = link_to "I want this", '#', :class => "button" :javascript $(document).ready(function(){ $.ui.autocomplete.prototype._renderItem = function( ul, item ) { var template = $('#product-autocomplete-result-template').html(); var parsed_template = _.template(template, item); var target_option = 'value="' + item.rating + '"'; // do simple string replace to select option, as I can't get Jquery var selected_option = target_option + ' selected="selected"'; var autocomplete_html = parsed_template.replace(target_option, selected_option); var returnVal = $( "<li></li>" ) .data( "item.autocomplete", item ) .append('<a>' + autocomplete_html+'</a>') .appendTo( ul ); $("#stars-wrapper-"+item.id).stars({ inputType: "select", disabled: true }); return returnVal; }; $('#product-search-input').autocomplete({ delay: 50, source: function(request, response) { $.ajax({ url: "#{search_products_path}", dataType: 'json', data: { term: request.term }, success: function(data) { if (data.length < 1) { console.log("Juuusstt right"); // show submit button } else { console.log("Too long"); // hide submit button } response(data); } }); }, select: function( event, ui ) { console.log( ui.item ? "Selected: " + ui.item.label : "Nothing selected, input was " + this.value); } }) }); ```
How can I make this link clickable in JQuery UI Autocomplete? Uncaught TypeError
CC BY-SA 3.0
null
2011-07-05T03:39:16.360
2012-03-06T10:20:06.810
2017-05-23T12:07:02.087
-1
262,972
[ "jquery", "jquery-ui", "autocomplete", "jquery-autocomplete", "underscore.js" ]
6,577,822
1
6,578,276
null
3
2,081
I have an image like this: ![Input image containing noise](https://i.stack.imgur.com/ViAfs.jpg) I would like to remove the background(part A) near the edge of the object. I plan to use color detection since the color of object and noise are a little bit different. But maybe it is not a good idea. I would appreciate if you could have any idea for me. Thanks
How to remove noise near the edge of an object in an image
CC BY-SA 3.0
0
2011-07-05T03:54:29.860
2011-07-05T08:42:41.830
2011-07-05T08:42:41.830
7,531
496,837
[ "matlab", "image-processing", "computer-vision", "background-color", "image-segmentation" ]
6,577,824
1
null
null
2
1,734
When I’m trying to do picking on webgl, I use the framebuffer and read the pixel color to do this. And it throw the (SECURITY_ERR : Dom Exception 18) while the function gl.readpixels run. ![screenshot](https://i.stack.imgur.com/aYpBj.jpg) [http://imageshack.us/f/94/readpxielerror.jpg/](http://imageshack.us/f/94/readpxielerror.jpg/) I don’t know how to solve this problem. So help me please !!!
Dom Security Error 18 when readpixels on webgl
CC BY-SA 3.0
0
2011-07-05T03:55:15.383
2011-11-29T01:46:52.507
2011-11-29T01:46:52.507
905,093
828,961
[ "javascript", "dom", "google-chrome", "webgl" ]
6,578,499
1
null
null
0
298
I have a web app in which I use hibernate and deploy on tomcat using ant .I have created a hibernate.cfg.xml in source directory with all mapping values . My app has a ShoppingCart ,CartItem and ItemForSale classes.I need to map the relation between CartItem and ItemForSale classes which are represented by database tables.I tried to work it out as shown below..I am not sure if this is the right way.. I would like your advice /opinion in this matter..Please help.. A CartItem has an ItemForSale field and quantity . ``` class CartItem{ ItemForSale item; int quantity; ... } class ItemForSale{ String name; double price; } ``` Suppose I have some instances of both these classes, ``` saleitem1 = new ItemForSale("pizza",20.0); saleitem2 = new ItemForSale("pastry",10.0); saleitem3 = new ItemForSale("cake",30.0); cartitem1 = new CartItem(saleitem1,1); cartitem2 = new CartItem(saleitem1,2); cartitem3 = new CartItem(saleitem2,1); ``` A cartitem cannot contain more than one saleitem at a time, I have shown the mappings in a diagram below..the green lines show valid relations while red line shows an invalid relation between these two sets ![relation between sets](https://i.stack.imgur.com/xKGQ5.png) From this,I deduce that ,there is a relation between CartItem and ItemForSale.So,in my CartItem.hbm.xml file,I have to write ``` <class name="shop.cart.CartItem" table="CARTITEM"> <id name="cartItem_id" column="CARTITEM_ID" type="long"> <generator class="native"/> </id> <property name="quantity" type="int" column="QUANTITY" /> <many-to-one name="saleitem" class="shop.domain.ItemForSale" column="ITEM_FOR_SALE_ID" lazy="false" /> </class> ``` Is this the correct representation? Or is there something wrong with the way I worked it out? thanks mark
help to identify relation between database entites (for hibernate mapping)
CC BY-SA 3.0
0
2011-07-05T06:04:15.820
2011-07-05T06:11:49.827
null
null
479,003
[ "java", "hibernate", "relation" ]
6,578,761
1
null
null
0
141
If you have two divs. The main 'div 1' (yellow) is the container, while the inner 'div'(blue) id is generated dynamically, e.g. ![layout](https://i.stack.imgur.com/CG0g9.jpg) How can you get the id of the dynamically generated div?
Getting Inner Div Container ID Dynamically
CC BY-SA 3.0
null
2011-07-05T06:38:03.907
2011-07-05T07:12:58.923
2011-07-05T07:12:58.923
720,346
829,112
[ "css", "layout", "html", "drag-and-drop" ]
6,578,940
1
6,579,013
null
5
5,598
![enter image description here](https://i.stack.imgur.com/KG2dl.png) I am looking for some code snippet which will render a gridview into `<div>` instead of table. Anyone can help me on this? I need to draw a graph like the one I have attached and need some features like select the graph area with mouse and provide copy paste operation.
Render gridview as <div> instead of table
CC BY-SA 3.0
null
2011-07-05T06:56:19.857
2017-11-02T16:55:28.883
2017-11-02T16:55:28.883
4,370,109
811,567
[ "jquery", "html", "css", "gridview" ]
6,579,026
1
6,579,108
null
0
384
I'm looking for a GUI guideline, especially for Windows Phone 7. Does anybody know the name of it (it isn't AERO i think?). thank you! ![enter image description here](https://i.stack.imgur.com/bSxac.jpg)
Where can I find the Windows Phone 7 GUI Standard?
CC BY-SA 3.0
null
2011-07-05T07:07:26.217
2011-12-01T15:07:15.690
2011-07-05T07:35:24.887
400,223
365,265
[ "windows-phone-7", "user-interface" ]
6,579,087
1
null
null
0
2,101
There is a pretty strange error with setting look and feel. For setting look-and-feel I use the following: ``` ... String scheme = "net.sourceforge.atunes.gui.substance.SubstanceATunesSunLookAndFeel"; try { UIManager.setLookAndFeel(scheme); UIManager.put(LafWidget.ANIMATION_KIND, LafConstants.AnimationKind.NONE); UIManager.put(SubstanceLookAndFeel.TABBED_PANE_CONTENT_BORDER_KIND, SubstanceConstants.TabContentPaneBorderKind.SINGLE_FULL); JFrame.setDefaultLookAndFeelDecorated(true); JDialog.setDefaultLookAndFeelDecorated(true); } catch (ClassNotFoundException e) { ExceptionHandler.handleSilently(e); } catch (InstantiationException e) { ExceptionHandler.handleSilently(e); } catch (IllegalAccessException e) { ExceptionHandler.handleSilently(e); } catch (UnsupportedLookAndFeelException e) { ExceptionHandler.handleSilently(e); } ``` which is placed in main function in: ``` SwingUtilities.invokeAndWait(new Runnable(){ public void run(){ ... } ``` There is no gui elements right before setting look-and-feel, therefore there is no need to execute SwingUtilities.updateComponentTreeUI(...). So, everything is ok, but some users reported very strange bag which is comprises unhandled windows like: ![](https://habrastorage.org/storage1/1595d664/92f4af80/3dd81863/3e305f59.jpeg) When starting program User sees the following screen (the buttons appear only when he moves with the mouse over this area; before doing that the window does not show these buttons. --- So, could anybody help me to find the right solution (I don't ask a solution, I just ask the right way to fix it). Firstly, I thought that it happens because of Out of memory error, but the configuration of user's computer is: So, I guess Out Of Memory is not the case. Any suggestions, pls. --- UPD: so, every GUI creating statements were moved to one SwingUtilities.invokeLater() statement in main function! But, the problem is still reproduced by some users. Also, it's now known, that only view is so weird, but every buttons on it behave as expected! (I mean after pressing Ok button, next MVC is showed and looks well). This bug happens only with very first window which is created right after setting look-and-feel. So, I guess it's not the case of incorrect EDT usig, because of well buttons Listener's execution. Besides, our log (log4j) looks great as nothing weird happens! Could anyone suggest possible cause? see [http://java.sun.com/products/java-media/2D/perf_graphics.html](http://java.sun.com/products/java-media/2D/perf_graphics.html) As commandline parameter where was added: ``` -Dsun.java2d.noddraw=true ```
Gui problem with java substance Look And Feel
CC BY-SA 3.0
null
2011-07-05T07:13:59.090
2011-10-17T15:57:42.637
2017-02-08T14:32:35.257
-1
206,350
[ "java", "swing", "user-interface", "look-and-feel" ]
6,579,158
1
6,579,739
null
10
15,894
> [Use Visual Studio web.config transform for debugging](https://stackoverflow.com/questions/3922291/use-visual-studio-web-config-transform-for-debugging) I have an asp.net application with three web.config transformations. ![enter image description here](https://i.stack.imgur.com/5EagR.jpg) I was thinking when I launch debug running (F5 with Debug mode selected) the transformations written in the Web.Debug.config will apply.. But it doesn't work.. the Web.config used is the "Base" one. You will tell me : "The transformation aren't right".. But they are because when I make a deploy (right click/publish) with debug release config : ![enter image description here](https://i.stack.imgur.com/CjDuz.jpg) The rendered web.config have modifications! So it works, but the debug running is using the base web.config.. Is there a place I can configure that?
Why my web app doesn't use Web.Debug.config in debug running?
CC BY-SA 3.0
0
2011-07-05T07:21:09.387
2011-07-05T08:28:13.907
2017-05-23T11:54:28.677
-1
142,234
[ ".net", "asp.net", "web-config" ]
6,579,352
1
null
null
0
231
I wanna shoe two point in a iphone's view This is my code ``` UIImageView *center; center = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"point.png"]]; [center setFrame:CGRectMake(0, 0, 10, 10)]; float r_rect_center_x = [r_img frame].size.width/2; float r_rect_center_y = [r_img frame].size.height/2; [center setCenter:CGPointMake(r_rect_center_x,r_rect_center_y)]; [r_img addSubview:center]; [center release]; ``` This is center, I got result center point is (X:50,Y:60) ``` float point1_x = 60.0f; float point1_y = 60.0f; UIImageView *point1 = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"point.png"]]; [point1 setFrame:CGRectMake(0, 0, 10, 10)]; [point1 setCenter:CGPointMake(point1_x,point1_y)]; [r_img addSubview:point1]; [point1 release]; ``` This is point1 , I set the center is X:60,Y:60 It should be looks like this ![enter image description here](https://i.stack.imgur.com/J6NfI.png) But it run on the simulator is like this... ![enter image description here](https://i.stack.imgur.com/iOJ1o.png) Many Thanks Webber.
Y-axis opposite in iphone's view , how to adjust it like Y-axis mathematics?
CC BY-SA 3.0
null
2011-07-05T07:42:26.063
2011-07-05T07:55:41.650
null
null
437,132
[ "iphone", "objective-c", "ios", "cgpoint" ]
6,579,379
1
6,593,788
null
6
9,712
I am setting up a load test controller and agents. I followed these guidelines: - [Installing and Configuring Visual Studio Agents and Test and Build Controllers](http://msdn.microsoft.com/library/dd648127%28VS.100%29.aspx)- [Walkthrough: Using a Test Controller and Test Agents in a Load Test](http://msdn.microsoft.com/en-us/library/ff400223.aspx) Setting up the controller and agents was quite straightforward. Both of these services run under a local user named "LoadTest" which is member of the local Administrators group. As the next step, [Create a new Test Setting that Uses the Test Controller and Test Agents and Data and Diagnostic adapters](http://msdn.microsoft.com/en-us/library/ff400223.aspx#21fbe8ca-2431-4807-b11a-d4bb97411f64), I added a new "Test Settings" file to the solution items of my Visual Studio 2010 solution. Thereby I fail when trying to define the controller to be used in the Roles tab: ![Roles tab of the Test Settings](https://i.stack.imgur.com/w5mB5.png) I entered "localhost:6901" as the controller, then a warning icon appeared to the right. If I hover over that, it says: > Cannot connect with controller 'localhost'. If the controller service is not started you may be able to start it by clicking the restart rig button.The following error was received: You do not have the appropriate permissions to perform this action. I am running Visual Studio in my personal user account, which is different to the user that runs the test controller ("LoadTest"). But I reckon that this should be the normal usage scenario. Further, me as well as the "LoadTest" user are members of the administrators group. Can anybody tell me why this wouldn't work?
VS2010 Load Test: Cannot connect to test controller
CC BY-SA 3.0
0
2011-07-05T07:44:50.203
2012-01-12T14:10:00.933
2011-07-06T08:00:06.060
55,787
55,787
[ "visual-studio-2010", "load-testing" ]
6,579,420
1
null
null
8
18,421
If i want to set an image to the bottom of any screen then we can use `android:layout_alignParentBottom="true"` in relative layout. But because of some reason i am bound to use LinearLayout. There are other views (button, image button, listview) in the screen also. I want to place image at the bottom of my screen. Whatever may be the situation user wil be able to see this imageview at the bottom of the screen. How to achieve `alignParentBottom="true"` property in LinearLayout. See the folowing sample xml. I am using example1.xml but i want look and file that of example2.xml ![enter image description here](https://i.stack.imgur.com/Xj9rJ.png) ``` <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent"> <TextView android:id="@+id/textview1" android:layout_width="fill_parent" android:layout_height="40dip" android:background="#ffffff" android:textColor="#000000" android:text="I am sunil" android:gravity="bottom"/> </LinearLayout> ``` ``` < ?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent"> <TextView android:id="@+id/textview1" android:layout_width="fill_parent" android:layout_height="40dip" android:background="#ffffff" android:textColor="#000000" android:text="I am sunil" android:layout_alignParentBottom="true"/> </RelativeLayout> ``` Thanks
How to achieve alignParentBottom="true" property in LinearLayout
CC BY-SA 3.0
0
2011-07-05T07:49:46.570
2020-05-06T08:41:51.087
2011-07-05T08:55:22.720
624,069
111,988
[ "android" ]
6,579,601
1
6,586,716
null
0
2,101
I am trying to install PIWIK ([http://piwik.org](http://piwik.org)) on Windows 2008 server and IIS 7. PIWIK is using PHP and MySQL. When I run the install process, I got the following error. ![enter image description here](https://i.stack.imgur.com/oh18u.jpg) I don't know how can I enable mod_security and HTTP Authentication for Piwik. At present, I am using Anonymous Authentication. Please advice me.
How to enable mod_security on Windows 2008 IIS
CC BY-SA 3.0
null
2011-07-05T08:09:00.727
2011-07-05T17:46:11.183
null
null
296,074
[ "php", "iis-7", "mod-security", "matomo" ]
6,579,610
1
null
null
2
2,481
After compiled, my solution has a warning as below snapshot. ![enter image description here](https://i.stack.imgur.com/hxbKP.png) Double clicking the warning will popup a question which I have no idea what it is. ![enter image description here](https://i.stack.imgur.com/cpES1.png) If you understand what VS is talking about, please share.
Visual Studio C# reference-warning
CC BY-SA 3.0
null
2011-07-05T08:10:07.553
2011-07-06T08:33:40.773
null
null
248,616
[ "visual-studio", "configuration", "reference", "warnings" ]
6,579,638
1
6,579,932
null
1
4,050
What is the best way to place/layout the google+1 and facebook Like buttons so they align neatly? Currently, the first "thing" in my body is this heading, appearing on top of all pages (slightly modified after logging in): (linebreaks added for readability) : ``` <table align="center" width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td align="left"> &nbsp; <g:plusone size="small" href="https://www.apebroker.com/"> </g:plusone> <iframe src="https://www.facebook.com/plugins/like.php?href=https%3A%2F%2Fwww.apebroker.com%2Findex.php&amp;send=false&amp;layout=button_count&amp;width=100&amp;show_faces=false&amp;action=like&amp;colorscheme=light&amp;font=arial&amp;height=21" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:100px; height:21px;" allowTransparency="true"></iframe> &nbsp; </td> <td align="left"></td><td align="right">It's more fun after you <a href="https://www.apebroker.com/loginform.php">login</a>&nbsp; </td> </tr> </table> ``` My problem is that this looks like crap. I know that pages don't need to look exactly the same in every browser, but acceptable ugliness has its limits. The google button is nicely "vertically centered", while the facebook stuff kind of sticks to the top of the page, 0px down. See this example: ![no offset to facebook iframe](https://i.stack.imgur.com/eJssi.png) I tried adding `padding:2px;` to the style in the facebook iframe, and sure, it came down a bit, but so did the google button too, and the entire heading grew, pushing down the `<hr>` below. I obviously don't know much about iframes, but I've managed fine on my own until now. In my global style sheet I have (amongst other things) this: ``` body { margin:0px; padding:0px; background-color:#e0e0b0; color:#302010; font-family:"Trebuchet MS",Helvetica,Sans-serif; font-size:100%; } ``` And I don't want to change that, as it cascades to all sorts of things that I'm reluctant to break. If you want to check out the complete style sheet and HTML source, an example page can be found [here](https://www.apebroker.com/index.php?cmd=view&gameid=7). Thank you in advance for any hints/suggestions!
Tricky CSS layout of external (facebook like and google plusone) buttons
CC BY-SA 3.0
null
2011-07-05T08:12:34.313
2011-09-25T09:55:27.000
null
null
385,571
[ "html", "css", "layout", "facebook-like", "google-plus-one" ]
6,579,644
1
6,580,284
null
22
1,177
`SaveDefinitions` is a nice option of `Manipulate`. It causes `Manipulate` to store any definitions used for its creation inside the Manipulate panel. A Manipulate made this way can be copied to an empty notebook and will still work on its own. Additionally, your working notebook containing many such Manipulates also doesn't turn into a flurry of pink boxes with printed error messages below it upon opening. Great! However, all this goodness has its dark side which can bite you real hard if you are not aware of it. I've had this in a notebook I had been working on for a few days, but I present you with a step-by-step toy example scenario which recreates the problem. In this scenario you want to create a `Manipulate` showing a plot of a nice wavy function, so you define this (please make a window size like this, this is important): ![enter image description here](https://i.stack.imgur.com/sVRrx.png) The definition is nice, so we keep it for the next time and make it an initialization cell. Next we add the `Manipulate`, and execute it too. ``` f[x_] := x^2 Manipulate[ Plot[n f[x], {x, -3, 3}], {n, 1, 4}, SaveDefinitions -> True ] ``` All works great, the Manipulate really shines, it is a good day. ![enter image description here](https://i.stack.imgur.com/vEwiV.png) Just being your paranoid self you check whether the definition is OK: ![enter image description here](https://i.stack.imgur.com/E3QX7.png) Yeah, everything still checks out. Fine. But now it occurs to you that a better wavy function would be a sine, so you change the definition, execute, and being paranoid, check: ![enter image description here](https://i.stack.imgur.com/K9mm0.png) Everything still fine. You're ready from a day's hard work you save your work and quit. [Quit kernel] Next day. You start your work again. You evaluate the initialization cells in your notebook. Definition still good? Check. ![enter image description here](https://i.stack.imgur.com/uIt1G.png) Now, you scroll down to your Manipulate box (no need to re-execute thanks to the `SaveDefinitions`), play a little with the slider. And scroll back up. ![enter image description here](https://i.stack.imgur.com/LeEBY.png) Being the paranoid you, you once more check the definition of f: ![enter image description here](https://i.stack.imgur.com/fvhlD.png) Lo and behold, someone has changed the definition behind your back! And nothing executed between your first and second `Information`(?) check according to the In[] numbers (`In[1]`: def of f, `In[2]` first ?, `In[3]` second ?). What happened? Well, it's the `Manipulate` of course. A `FullForm` reveals its internal structure: ``` Manipulate[Plot[n*f[x],{x, -3, 3}],{{n, 2.44}, 1, 4},Initialization:>{f[x_] := x^2}] ``` There you have the culprit. The initialization part of the box defines f again, but it's the old version because we didn't re-evaluate the `Manipulate` after modifying its definition. As soon as the manipulate box gets on the screen, it is evaluated and you've got your old definition back. Globally! Of course, in this toy example it is immediately clear something strange is happening. In my case, I had a larger module in a larger notebook in which I, after some debugging, had changed a small part. It seemed to work, but the next day, the same bug that had bugged me before hit again. It took me a couple of hours before I realized that one of the several Manipulates that I used to study the problem at hand from all sides was doing this. Clearly, I'm tempted to say, this is unwanted behavior. Now, for the obligatory question: `Manipulate``Manipulate`
SaveDefinitions considered dangerous
CC BY-SA 3.0
0
2011-07-05T08:13:09.630
2011-07-07T16:39:59.963
null
null
615,464
[ "wolfram-mathematica", "mathematica-frontend" ]
6,580,073
1
null
null
0
1,913
So what I have is a list box which display 3 images in a row before moving to the next line, this is the code I have used to do it. ``` <ListBox Name="lbListOfItemsOnHDD" Grid.Row="1" Grid.Column="0" Width="600" Height="450" Margin="5" BorderThickness="0" ScrollViewer.HorizontalScrollBarVisibility="Hidden" HorizontalAlignment="Left" VerticalAlignment="Top"> <ListBox.ItemsPanel> <ItemsPanelTemplate> <WrapPanel IsItemsHost="True" Orientation="Horizontal" Width="600" VerticalAlignment="Top" /> </ItemsPanelTemplate> </ListBox.ItemsPanel> <ListBox.ContextMenu> <ContextMenu Name="cmLibraryImages" x:Uid="cmLibraryImages"> <MenuItem Name="cmCmdDelete" Header="Delete Selected Image" Click="cmCmdDelete_Click" /> </ContextMenu> </ListBox.ContextMenu> </ListBox> ``` The image widths are always the same so this always displays 3 images before moving the next row, only problem is I'd like the image title below the image, this causes an issue with the top alignment of the pictures not being level (see screenshot below). The images are added at run time using a simple for loop to go through a list that contains the path to the image, image title etc.... The image and text box are added to a stack panel which is then itself added to the listbox. ![Unaligned at the top images in WPF list box](https://i.stack.imgur.com/ey0rx.jpg) I've tried using the valign top on the various different parts and altering the margins but haven't managed to align them at the top. Any help would be appreciated.
WPF Listbox, Multiple rows and columns top align issue
CC BY-SA 3.0
null
2011-07-05T08:50:48.817
2011-07-05T09:14:39.587
null
null
440,904
[ "c#", ".net", "wpf" ]
6,580,238
1
6,580,786
null
1
212
in my app i am placing 4 image buttons at the botton of the page. But according to my layout the image looks different in each device. I want the image to be the same in all devices. Following is the layout of my image buttons ``` <LinearLayout android:layout_height="wrap_content" android:id="@+id/tabLayout" android:layout_width="match_parent" android:background="@drawable/tab_bar" android:orientation="horizontal" android:layout_weight="0.1"> <RelativeLayout android:id="@+id/relativeLayout1" android:layout_height="match_parent" android:layout_width="match_parent"> <ImageButton android:layout_marginLeft="35dip" android:layout_height="wrap_content" android:id="@+id/homeBtn" android:background="@drawable/home" android:layout_width="wrap_content" android:layout_gravity="center"></ImageButton> <ImageButton android:layout_marginLeft="35dip" android:layout_toRightOf="@+id/homeBtn" android:layout_height="wrap_content" android:id="@+id/addBtn" android:background="@drawable/add" android:layout_width="wrap_content" android:layout_gravity="center"></ImageButton> <ImageButton android:layout_marginLeft="35dip" android:layout_toRightOf="@+id/addBtn" android:layout_height="wrap_content" android:id="@+id/srchBtn" android:background="@drawable/search" android:layout_width="wrap_content" android:layout_gravity="center"></ImageButton> <ImageButton android:layout_marginLeft="35dip" android:layout_toRightOf="@+id/srchBtn" android:layout_height="wrap_content" android:id="@+id/helpBtn" android:background="@drawable/help" android:layout_width="wrap_content" android:layout_gravity="center"></ImageButton> </RelativeLayout> ``` Following are the images of my layout. I want my layout to be as in image1 and image2 is currently the image i am getting. ![enter image description here](https://i.stack.imgur.com/1jtMw.png) How to get as like the image 1 in all android devices. Please help me friends
problem with UI of image buttons in android app
CC BY-SA 3.0
null
2011-07-05T09:04:53.370
2011-07-05T09:53:39.450
null
null
596,364
[ "android", "user-interface", "android-relativelayout" ]
6,580,274
1
6,582,631
null
13
48,324
I'm using the following to display the minor grid in my plot: ``` grid(gca,'minor') set(gca,'MinorGridLineStyle','-') ``` but I'd like to change the color of the grid lines to a nice greyscale. I can't find any option 'grid color' in matlab... Do you know any or any workaround? I found this: [http://www.mathworks.com/matlabcentral/fileexchange/9815-gridcolor](http://www.mathworks.com/matlabcentral/fileexchange/9815-gridcolor) but as I read of the comments, it doesn't work very well and further it only changes gridcolor, not the color of the minor grid... Thanks! --- : Problem with `semilogx` as posting here now: ``` x = [1e-9 1e-8 1e-7 1e-6 1e-5 1e-4 1e-3 1e-2]'; y1 = linspace(20, 90, 8); y2 = y1.^2; y3 = y1./y2+5; % plotte: http://www.mathworks.com/help/techdoc/ref/linespec.html myfig = figure('Position', [500 500 445 356]); %[left, bottom, width, height]: p1 = semilogx(x,y1,'x--r',x,y2,'*-b'); ax1 = gca; set(ax1, 'Position',[0.13 0.18 0.75 0.75]); xlim([0 max(x)]); ylim([0 max([max(y1) max(y2)])]); col=.85*[1 1 1]; %# create a second transparent axis, same position/extents, same ticks and labels ax2 = axes('Position',get(ax1,'Position'), ... 'Color','none', 'Box','on', ... 'XTickLabel',get(ax1,'XTickLabel'), 'YTickLabel',get(ax1,'YTickLabel'), ... 'XTick',get(ax1,'XTick'), 'YTick',get(ax1,'YTick'), ... 'XLim',get(ax1,'XLim'), 'YLim',get(ax1,'YLim'),... 'XScale', 'log'); %# show grid-lines of first axis, give them desired color, but hide text labels set(ax1, 'XColor',col, 'YColor',col, ... 'XMinorGrid','on', 'YMinorGrid','on', ... 'MinorGridLineStyle','-', ... 'XTickLabel',[], 'YTickLabel',[],'XScale', 'log'); %# link the two axes to share the same limits on pan/zoom linkaxes([ax1 ax2],'xy'); ``` Displaying like this: ![enter image description here](https://i.stack.imgur.com/0zsRh.jpg) --- A problem occurs when adding a second y-axes as in the following picture, look at the ticks of the right y-axes: ![enter image description here](https://i.stack.imgur.com/RUPHD.jpg) this will be discussed here to have a better overview! [Matlab: Problem with ticks when setting minor grid style and two y-axis](https://stackoverflow.com/questions/6584105/matlab-problem-with-ticks-when-setting-minor-grid-style-and-two-y-axis)
Minor grid with solid lines & grey-color
CC BY-SA 3.0
0
2011-07-05T09:08:06.677
2014-05-27T14:47:24.630
2017-05-23T12:01:09.563
-1
701,049
[ "matlab", "colors", "grid", "plot" ]
6,580,493
1
6,826,460
null
3
1,863
I have some images that are not visible other are (background images or img tags indifferently ) If I check in firebug everything is fine, the image appears. It is as if they were a display:none applied to certain images while other are perfectly ok. In Safari/Chrome everything is just perfect. Does any one has met this problem already? ![enter image description here](https://i.stack.imgur.com/6duSS.png) ![enter image description here](https://i.stack.imgur.com/mbYgL.png)
Firefox some images do not show but they are correctly loaded if looking at firebug
CC BY-SA 3.0
0
2011-07-05T09:28:44.383
2011-07-26T07:06:00.900
2011-07-05T09:48:52.540
736,348
736,348
[ "firefox", "firebug" ]
6,580,600
1
6,583,405
null
1
928
What I'm looking for, should give me something like this -> ![enter image description here](https://i.stack.imgur.com/4sACd.jpg)
Is there a python module which web scrapes the image, title and a description of any link?
CC BY-SA 3.0
0
2011-07-05T09:36:42.087
2013-01-05T02:14:09.517
null
null
478,377
[ "python", "django", "beautifulsoup", "web-scraping" ]
6,580,626
1
6,580,982
null
1
278
I'm creating image gallery with drag functionality (like on iPhone). It gets data from html div (more than 15 images possible): ``` <div class="mySlideshow"> <img src="img1.jpg"/> <img src="img2.jpg"/> <img src="img3.jpg"/> ... <img src="img15.jpg"/> </div> ``` Now I see two ways how create it (transition using drag): -Create 15 divs with background-image and show all them as one big strip. ![enter image description here](https://i.stack.imgur.com/PInWO.png) -Create 3 div-containers and change their background-image property and position after transition complete. ![enter image description here](https://i.stack.imgur.com/43rra.png) What is the best way to create this kind of gallery?
Javascript Gallery Performance
CC BY-SA 3.0
null
2011-07-05T09:38:08.750
2011-07-05T10:44:39.730
2011-07-05T09:56:34.217
331,460
331,460
[ "javascript", "jquery", "image-gallery" ]
6,580,672
1
6,582,017
null
0
40
I don't know why the below checkbox is greyed out, I have general development settings and VS Ultimate as shown. ![enter image description here](https://i.stack.imgur.com/Yo3K4.png)
Why can't I create a UI for my Add-In in Visual Studio 2010 Ultimate?
CC BY-SA 3.0
null
2011-07-05T09:42:23.020
2011-07-05T11:36:10.587
null
null
128,386
[ "visual-studio", "visual-studio-2010", "add-in" ]
6,580,758
1
6,580,828
null
3
1,801
Is there any way to find out if a LineString intersects itself in JTS? Like in the following image how can i find if the line intersects itself? I am creating that line by just giving coordinates of its 4 edges. ![enter image description here](https://i.stack.imgur.com/h2TeP.png) Thanks in advance.
How to find if a line intersects itself in JTS?
CC BY-SA 3.0
0
2011-07-05T09:50:44.867
2015-04-24T13:07:25.147
2011-07-05T09:53:41.447
37,213
608,588
[ "java", "geometry", "computational-geometry", "jts" ]
6,580,823
1
6,580,943
null
-1
2,326
Can you guys install it? I am not sure about whether that is a connectivity problem for me... ![enter image description here](https://i.stack.imgur.com/nskRA.png)
eclipse indigo can not install windowbuilder UI toolkit for SWT?
CC BY-SA 3.0
null
2011-07-05T09:56:05.430
2011-07-06T13:59:22.657
2011-07-06T13:59:22.657
139,985
703,261
[ "eclipse" ]
6,580,940
1
null
null
1
448
I’m getting a strange problem with an ASP.NET web application that is in production. The problem is that pages intermittently don’t render correctly (see screen shot below). It isn’t one particular page in the application or one particular use that is having the problem. More information: The web server is IIS and the pages were published using the publish option in VS2008. I wondered if anyone else has had a similar problem or has any ideas of how to pin this down? ![enter image description here](https://i.stack.imgur.com/SkIuO.jpg)
ASP.NET Pages Not Rendering Correctly
CC BY-SA 3.0
null
2011-07-05T10:04:49.763
2011-07-05T14:53:51.673
2011-07-05T10:40:51.963
183,523
183,523
[ "c#", ".net", "asp.net", "vb.net", "iis" ]
6,580,951
1
null
null
2
223
I want to list items by defined order.so my table has order column it'll keep the order number. so, i can list items using that order number.If the number of items are less means no problem,But while it is getting more. i'm getting troubles. Item table:- ``` id item varorder 1 A1 1 2 A2 2 3 A3 5 4 A4 3 5 A5 4 ...... 1000 A1k 1000 ``` Using varorder, I can list items in defined order like bellow ``` SELECT item FROM tbl_item ORDER BY varorder ASC ``` The query results me correct order of items like `A1,A2,A4,A5,A2,...,A1K` # My Problems Problem occurring while i try to make A1K varorder as 1. - ![enter image description here](https://i.stack.imgur.com/fS51Z.png) - So suggest me. Is there another good idea to keep order in defined order ? Thanks
Best way to list the items by order
CC BY-SA 3.0
null
2011-07-05T10:06:44.053
2011-07-05T10:23:50.817
null
null
430,112
[ "php", "mysql", "performance" ]
6,581,260
1
null
null
0
1,278
I have a scenario in which user select multiple products and select multiple locations now if user select 2 products and 2 locations i want to generate 2 X 2 = 4. 4 charts and show each product particular location daily prices in chart? Daily prices of products per locations are saved in database. I want to know can i generate charts like this and how? ![enter image description here](https://i.stack.imgur.com/LsiQY.png) for example If this is the data, I want to generate Apple location F chart then Apple location M chart then Mango Location M chart and last Mango location F chart. I am using sql server 2008 R2 with C#
How to generate multiple chart in sql server report
CC BY-SA 3.0
null
2011-07-05T10:30:57.230
2011-07-05T22:58:30.667
null
null
347,790
[ "sql-server-2008", "reporting-services" ]
6,581,402
1
6,651,445
null
15
9,612
How to get mouse cursor coordinates in raphaeljs library? I'm trying something like: ``` rect.mousemove(function (event) { thisGrid.Popup.Show(event.layerX, event.layerY, ["clientX:", event.clientX, " clientY:", event.clientY, "\n", "layerX:", event.layerX, "layerY:", event.layerY, "\n", "pageX:", event.pageX, "pageY:", event.pageY].join(' ')); } ); ``` But all this properties return coordinates relative left upper corner of window or something. Here is screenshot ![enter image description here](https://i.stack.imgur.com/p3w2Z.png)
Get cursor coordinates in raphael
CC BY-SA 3.0
0
2011-07-05T10:44:13.287
2011-07-11T14:14:53.587
2011-07-05T13:24:57.813
290,082
290,082
[ "javascript", "raphael" ]
6,581,540
1
6,705,732
null
5
8,641
I'm trying to play an HTML5 audio track a few seconds after the page has loaded using the .play() JavaScript function. Sometimes, when the audio loads slowly, and .play() is triggered when the player looks like this: ![enter image description here](https://i.stack.imgur.com/HTs2N.gif) The audio does not play when it is buffered. Sometimes, when the audio loads quickly and the player looks like this, .play() works fine. ![enter image description here](https://i.stack.imgur.com/3wbtr.gif) What is the quickest way around this issue? (Using a listener? I holding out for a 'play when loaded' function).
Triggering an HTML5 audio track to play whenever it has loaded
CC BY-SA 3.0
0
2011-07-05T10:56:21.903
2014-09-13T17:25:14.910
null
null
473,141
[ "javascript", "html", "buffering", "html5-audio" ]
6,581,756
1
6,582,070
null
0
476
I'm trying to read some text from a .txt file, here's my code: ``` String filePath = bundle.getString("filepath"); StringBuilder st = new StringBuilder(); try { File sd = Environment.getExternalStorageDirectory(); File f = new File(sd, filePath); FileInputStream fileis = new FileInputStream(f); BufferedReader buf = new BufferedReader(new InputStreamReader( fileis)); String line = new String(); while ((line = buf.readLine()) != null) { st.append(line); st.append('\n'); } Log.i("egor", "reading finished, line is " + line); } catch (FileNotFoundException e) { Log.i("egor", "file not found"); } catch (IOException e) { Log.i("egor", "io exception"); } reader.setText(st.toString()); ``` The text looks like this: > This is a sample text to test The .txt file is created in Windows notepad. And here's what I'm getting: ![enter image description here](https://i.stack.imgur.com/wySrO.png) What's wrong with my code? Thanks in advance.
Problems reading text from file
CC BY-SA 3.0
null
2011-07-05T11:15:24.580
2011-07-05T11:41:01.023
null
null
543,539
[ "android", "text", "stream", "inputstream" ]
6,581,785
1
6,582,128
null
6
3,300
I have tried all that i could to generate the R.java file but in vain. I have just created an android project and while creating the android project it isn't creating R.java file ! There were compilation errors in my project as i still had to add the android.jar file to my project but even after adding the jar file, cleaning the existing build and again building it didn't work. Then i checked the 'build automatically' option in eclipse. Even that didn't help ! Few things to be noted : 1)I have created the android project with build-target android 2.2 and API version 8. 2)I would like to tell is while creating the project it gives an error saying proguard.cfg not found ! I couldn't locate 'default.properties' file to delete the entry which refers to proguard.cfg entry. 3)JAVA_HOME in my environment variables is pointing to jdk1.4. Dunno whether this should be the reason ! 4)Contents of 1.main.xml ``` <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent" > <TextView android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="@string/hello" /> </LinearLayout> ``` 2.strings.xml ``` <?xml version="1.0" encoding="utf-8"?> <resources> <string name="hello">Hello World, HelloAndroidActivity!</string> <string name="app_name">Hello, Android !!</string> </resources> ``` 3.AndroidManifest.xml ``` <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.pack.android.test" android:versionCode="1" android:versionName="1.0"> <uses-sdk android:minSdkVersion="8" /> <application android:icon="@drawable/icon" android:label="@string/app_name"> <activity android:name=".HelloAndroidActivity" android:label="@string/app_name"> <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> </application> </manifest> ``` 4.Code for HelloWorldActivity.java ``` package com.pack.android.test; import android.app.Activity; import android.os.Bundle; public class HelloAndroidActivity extends Activity { /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); } } ``` Attached are the images for ![Folder structure in eclipse (Eclipse 3.6)](https://i.stack.imgur.com/dAuwd.jpg) ![res/drawable-hdpi/icon.png](https://i.stack.imgur.com/xSFoJ.png) ![res/drawable-ldpi/icon.png](https://i.stack.imgur.com/J3ZCw.png) ![res/drawable-mdpi/icon.png](https://i.stack.imgur.com/ehDSC.png) Please help me out. I have just started with the Hello World application :) Thanks, Adithya
First time itself R.java is not getting generated
CC BY-SA 3.0
0
2011-07-05T11:17:49.230
2013-08-23T10:12:00.120
2011-07-05T11:47:18.813
729,415
533,463
[ "android" ]
6,582,015
1
null
null
1
2,026
I have a layout in which two divs appear stacked vertically inside a parent div which will be a specific height (due to containing a left hand menu). I wish the two divs to take up all the available vertical space. However, they must resize depending on their content. The easiest way to explain is with a diagram: ![enter image description here](https://i.stack.imgur.com/lyfeT.jpg) Reading the diagrams from top to bottom, this is the scenario: 1. both divs take up 50% of available height as this is sufficient to contain their content (this is the default). 2. there is a lot of content in top div and less content in bottom div. Top div expands to fit content and squashes bottom div. 3. reverse situation of (2). 4. both divs must expand to fit their content. Containing div must expand to accomadate. I think I could figure out how to do this with a table, see the [example here](http://jsfiddle.net/shooter/BWfNd/) which is correct (in chrome anyway) except the outer div doesn't expand properly. Is there a better CSS solution to this without using a table? I cannot use JavaScript and solution must work in all browsers... including IE6 :( .
CSS layout for vertical stacked divs to use 100% of available height
CC BY-SA 3.0
0
2011-07-05T11:35:51.010
2011-09-23T02:44:53.183
2011-07-05T11:58:25.093
405,015
207,752
[ "css", "internet-explorer-6", "html" ]
6,582,022
1
6,707,204
null
1
875
![enter image description here](https://i.stack.imgur.com/zX10o.png) into ![enter image description here](https://i.stack.imgur.com/aCkpf.png) ![enter image description here](https://i.stack.imgur.com/pOR0b.png) how can they do that? 1. re-size animation 2. stack and animate. just CSS3 ? any example? Thanks Adam Ramadhan
google plus photo animation with css3 or jquery?
CC BY-SA 3.0
0
2011-07-05T11:36:35.337
2012-01-15T19:37:13.220
2011-07-05T12:16:50.903
320,486
320,486
[ "javascript", "jquery", "html", "css", "google-plus" ]
6,582,062
1
6,585,724
null
3
1,056
If I use the google analytics [async site tracking script](http://code.google.com/apis/analytics/docs/tracking/asyncTracking.html), in the end of head section of my page, everything works as expected: ``` <head> <script type="text/javascript"> var _gaq = _gaq || []; _gaq.push(['_setAccount', 'UA-XXXXX-X']); _gaq.push(['_setDomainName', 'test.com']); _gaq.push(['_trackPageview', '/title=ied&action=fire']); (function () { var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); })(); </script> </head> ``` In the fiddler there can be seen 2 requests: ![enter image description here](https://i.stack.imgur.com/BHqKL.jpg) ![enter image description here](https://i.stack.imgur.com/SQQR1.jpg) For some reason I need the script to be parametrized, so I wrap it within custom `googleAnalytics` function which gets 2 parameters: ``` function googleAnalytics(domain, queryString) { var _gaq = _gaq || []; _gaq.push(['_setAccount', 'UA-XXXXX-X']); _gaq.push(['_setDomainName', domain]); _gaq.push(['_trackPageview', queryString]); (function () { var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); })(); } ``` Abowe code has been saved to file. I loaded it to the page in the head section like below: ``` <head> <script src="/script/GoogleAnalytics.js" type="text/javascript" language="javascript"></script> <script type="text/javascript">googleAnalytics('test.com', '/title=ied&action=fire');</script> </head> ``` But this time fiddler shows only 1 request: ![enter image description here](https://i.stack.imgur.com/BHqKL.jpg) The [Google Analytics Tracking Code Debugger](https://chrome.google.com/webstore/detail/jnkmfdileelhofjcijamephohjechhna) also shows nothing. Only script is downloaded but there is no other request which populates data for google analytics report. What is wrong in this approach and how it can be fixed ? Btw: I need this 2 parameters and the async version of the tracking script. Regards
loading google analytics parametrized async page tracking script
CC BY-SA 3.0
null
2011-07-05T11:40:32.900
2013-06-21T23:56:09.467
2013-06-21T23:56:09.467
172,322
270,315
[ "javascript", "google-analytics" ]
6,582,166
1
null
null
1
1,109
I debug a solution that contains a WPF module. I use the OutputWindow to trace some variable values. However, once I open the WPF component I recieve in the output Window a lot of "Errors" like "...Value produced by BindingExpression is not valid for target property...." etc. How to avoid that messages? ![enter image description here](https://i.stack.imgur.com/5TydW.jpg) ![enter image description here](https://i.stack.imgur.com/qOqn6.jpg) ![enter image description here](https://i.stack.imgur.com/a5KFF.jpg) --- Microsoft Visual Studio 2010 Version 10.0.30319.1 RTMRel Microsoft .NET Framework Version 4.0.30319 RTMRel Installed Version: Ultimate I should the "Program Output" (???) in order to see just the "Program output"... never know...
No WPF messages in the Visual Studio Output Window!
CC BY-SA 3.0
null
2011-07-05T11:49:35.863
2018-09-25T16:49:44.927
2011-07-06T20:17:57.450
null
185,593
[ ".net", "wpf", "visual-studio-2010", "data-binding" ]
6,582,191
1
6,582,329
null
9
33,780
I have two relations(tables in SQL Database) having purely numbers. These two relations are to be imagined as Matrices. The Question is to write an SQL query to multiply there two relations as we do with normal matrix multiplication. I have been racking my brains for this.... But to no use :O Can anyone please help me out????? ![enter image description here](https://i.stack.imgur.com/6z8ne.png) @ Aaron Bertrand : I am using SQL Server 2008 R2 The Screenshots of the tables are : ![enter image description here](https://i.stack.imgur.com/EQdO1.png) ![enter image description here](https://i.stack.imgur.com/6W4aq.png) ``` select t1.A,t2.B,SUM(t1.C*t2.C) from Table_1 as t1 join Table_2 as t2 on t1.B=t2.A group by t1.A,t2.B order by t1.A ``` ![enter image description here](https://i.stack.imgur.com/f3gph.png) This way is quite Easy rather than my original Matrix way as suggested by @Marcelo Cantos and @ypercube...
SQL Query for Multiplication
CC BY-SA 3.0
0
2011-07-05T11:51:53.667
2011-07-05T15:26:22.717
2011-07-05T14:30:31.700
825,901
825,901
[ "sql-server" ]
6,582,187
1
6,601,066
null
4
1,115
In a recent [SO discussion](https://stackoverflow.com/questions/6563407/classification-tree-implementation-in-mathematica/6563644#6563644) I displayed a binary classification tree that needed some pruning of vertices 6 and 7: ![needs pruning](https://i.stack.imgur.com/mOciK.png) Below is the code I used: ``` KaryTree[9, 2, VertexLabels -> {1 -> "Blood pressure > 91 ?", 2 -> "Age > 62.5?", 4 -> "Sinus tachycardia ?", 8 -> "< 30 days"}, EdgeLabels -> {1 \[UndirectedEdge] 2 -> "yes", 1 \[UndirectedEdge] 3 -> "no", 2 \[UndirectedEdge] 4 -> "yes", 2 \[UndirectedEdge] 5 -> "no", 4 \[UndirectedEdge] 8 -> "yes", 4 \[UndirectedEdge] 9 -> "no"}, ImagePadding -> 20] ``` If leaves 6 and 7 are pruned by `VertexDelete`, vertices 8 and 9 are also clipped: ``` VertexDelete[ KaryTree[7, 2, VertexLabels -> {1 -> "Blood pressure > 91 ?", 2 -> "Age > 62.5?", 4 -> "Has sinus tachycardia ?"}, EdgeLabels -> {1 \[UndirectedEdge] 2 -> "yes", 1 \[UndirectedEdge] 3 -> "no", 2 \[UndirectedEdge] 4 -> "yes", 2 \[UndirectedEdge] 5 -> "no"}, ImagePadding -> 20], {6, 7}] ``` ![VertexDelete](https://i.stack.imgur.com/2EXsD.png) TreeGraph is willing to plot the graph, but it has its own mind about how the graph should be laid out: ``` TreeGraph[{1 \[UndirectedEdge] 2, 1 \[UndirectedEdge] 3, 2 \[UndirectedEdge] 4, 2 \[UndirectedEdge] 5, 4 \[UndirectedEdge] 6, 4 \[UndirectedEdge] 7}, VertexLabels -> {1 -> "Blood pressure > 91 ?", 2 -> "Age > 62.5?", 4 -> "Has sinus tachycardia ?", 6 -> "< 30 days"}, EdgeLabels -> {1 \[UndirectedEdge] 2 -> "yes", 1 \[UndirectedEdge] 3 -> "no", 2 \[UndirectedEdge] 4 -> "yes", 2 \[UndirectedEdge] 5 -> "no", 4 \[UndirectedEdge] 6 -> "yes", 4 \[UndirectedEdge] 7 -> "no"}, ImagePadding -> 20] ``` ![TreeGraph](https://i.stack.imgur.com/pYzMs.png) I'd like vertex 1 to be displayed at the top as the root of the graph. I've played around with various `GraphLayout` settings but not found a solution. Any ideas?
Mathematica: How do I make a partial binary tree appear binary?
CC BY-SA 3.0
0
2011-07-05T11:51:42.247
2011-07-06T21:18:43.963
2017-05-23T12:19:48.617
-1
638,130
[ "wolfram-mathematica" ]
6,582,645
1
6,582,839
null
1
4,136
I have a vector of fixed length 9 with some objects. each object has a variable value:Point and the vector shall be sorted such that objects with a higher value.x appear first - and if theyr value.x is the same, then the one with the smaller value.y shall be first. this is my compare function: ``` private function cmpr(h1:HelpObj, h2:HelpObj):Number{ var res:Number; if(h1.value.x==h2.value.x){ res = h1.value.y-h2.value.y; return res; } else{ res = h2.value.x-h1.value.x; return res; } } ``` but as you can see on this screenshot, the resulting order is not what it's supposed to be: ![problem](https://i.stack.imgur.com/Qczh5.png) what am I doing wrong?
AS3 sort on Vector doesn't behave as expected
CC BY-SA 3.0
0
2011-07-05T12:27:27.233
2013-05-12T05:24:01.520
2011-07-05T12:32:34.867
677,406
677,406
[ "actionscript-3", "sorting", "vector" ]
6,583,579
1
6,583,665
null
0
564
From the image below. ![enter image description here](https://i.stack.imgur.com/VAp79.png) It can be seen that I have three table User, User_group and group. I am trying to link a user to user_group and Group to user_group in other words link a user to a user_group. Currently in my user model I have the following: has_and_belongs_to_many :group has_and_belongs_to_many :user What I am basically trying to do is import the data into the User_group table. What is the best way around this. Tried searching online and have had no luck. ![enter image description here](https://i.stack.imgur.com/p75LO.png) Form Layout The user should be able to assign themselves to a group. When they click update the information entered should be saved to the user_group table
Many to Many relationship ruby on rails 3
CC BY-SA 3.0
null
2011-07-05T13:40:52.643
2012-06-06T15:02:45.060
2011-07-05T13:56:37.377
529,640
529,640
[ "ruby-on-rails-3" ]
6,584,105
1
6,584,986
null
0
3,637
with help of the community in this thread: [Minor grid with solid lines & grey-color](https://stackoverflow.com/questions/6580274/matlab-minor-grid-with-solid-lines-grey-color) I got it to work to set minor grid lines as solid and coloured style. But when adding a second y-axes it just messes up the y-ticks on the right axis! heres the example code: ``` x = linspace(0, 10, 11); y1 = x.^3+1; y2 = x+1; y3 = y1./y2+5; % plotte: http://www.mathworks.com/help/techdoc/ref/linespec.html myfig = figure('Position', [500 500 445 356]); %[left, bottom, width, height]: ax1 = axes('Position',[0.13 0.18 0.75 0.75]); hold on p1 = plot(x,y1,'x--r'); p2 = plot(x,y2,'*-b'); xlim([0 max(x)]); ylim([0 max([max(y1) max(y2)])]); col=.85*[1 1 1]; %# create a second transparent axis, same position/extents, same ticks and labels ax2 = axes('Position',get(ax1,'Position'), ... 'Color','none', 'Box','on', ... 'XTickLabel',get(ax1,'XTickLabel'), 'YTickLabel',get(ax1,'YTickLabel'), ... 'XTick',get(ax1,'XTick'), 'YTick',get(ax1,'YTick'), ... 'XLim',get(ax1,'XLim'), 'YLim',get(ax1,'YLim')); %# show grid-lines of first axis, give them desired color, but hide text labels set(ax1, 'XColor',col, 'YColor',col, ... 'XMinorGrid','on', 'YMinorGrid','on', ... 'MinorGridLineStyle','-', ... 'XTickLabel',[], 'YTickLabel',[]); %# link the two axes to share the same limits on pan/zoom linkaxes([ax1 ax2],'xy'); ax3 = axes('Position',get(ax1,'Position'),... 'XAxisLocation','top',... 'YAxisLocation','right',... 'Color','none',... 'XTickLabel', [],... 'XColor','k','YColor','k'); %# link the two axes to share the same limits on pan/zoom linkaxes([ax1 ax2 ax3], 'x'); ylabel(ax3, 'Speedup []'); ylim(ax3, [0 max(y3)]); hold on p3 = plot(x,y3,'s-.m','Parent',ax3); hleg = legend([p1 p2 p3], {'CPU', 'GPU', 'Speedup'}, 'Location', 'NorthWest'); xlabel(ax2, 'N_{Funcs}'); ylabel(ax2, 't [s]'); set(hleg, 'FontAngle', 'italic') ``` and how it looks like: ![enter image description here](https://i.stack.imgur.com/RBRTS.jpg)
Matlab: Problem with ticks when setting minor grid style and two y-axis
CC BY-SA 3.0
0
2011-07-05T14:13:44.657
2012-09-18T12:32:17.690
2017-05-23T12:19:02.560
-1
701,049
[ "matlab", "colors", "grid", "plot", "axis" ]
6,584,352
1
6,584,908
null
0
2,549
If you see the picture below, what I want is for the graph to start at 0 on the y axis and 6/28 on the x axis. How can I do this using core data? I can't find a way anywhere. Both these values are 0 for each axis, so why doesn't the graph start at 0? Plus I don't want negative values or dates. I want it to start from a corner, like normal graphs. `|_` Thanks for your help. ![enter image description here](https://i.stack.imgur.com/uccZ8.png)
Core plot - start origin of graph at (0,0)
CC BY-SA 3.0
null
2011-07-05T14:31:11.307
2013-11-21T06:51:29.167
2011-07-05T14:38:48.450
414,972
414,972
[ "iphone", "ios", "core-plot" ]
6,584,394
1
null
null
0
488
I have embebed .swf symbols in my flex 4.5 application like so: ``` <s:Image source="@Embed(source='GaugeSkin.swf', symbol='reflection')"/> ``` and they look awful! even when with "smooth=true" ``` <s:Image source="@Embed(source='GaugeSkin.swf', symbol='reflection')" smooth="true"/> ``` But, if i use the "old" mx component: ``` <mx:Image source="@Embed(source='GaugeSkin.swf', symbol='reflection')"/> ``` The image looks beautiful, like it should. Anyone knows why is this? should i use the mx component to get the quality i need/want? added images ![side to side ugly comparison](https://i.stack.imgur.com/Kk622.jpg)
Why is there a diference in the quality of embeded swf symbols between mx.image and spark.image
CC BY-SA 3.0
null
2011-07-05T14:33:21.610
2011-07-05T17:36:20.747
2011-07-05T17:36:20.747
32,374
32,374
[ "apache-flex", "image", "flash", "flex4.5" ]
6,584,428
1
6,584,514
null
2
164
RegexBuddy shows the matches are OK, but in C# when I try use replace, a semicolon and a curly bracket are not replaced. The expression I am using is the following: ``` @"({\\)(.+?)(}+)|(\s?\\)(.+?)(\b)|}$" ``` and the input text (rtf) is included in the screenshot. This the code: ``` Regex reg2 = new Regex(@"\\b([\s\S]+?)\\b0"); MatchCollection matches = reg2.Matches(text); foreach (Match match in matches) { string output = reg.Replace(match.Value, ""); MessageBox.Show(output); } ``` ![RegexBuddy screenshot](https://i.stack.imgur.com/IYJzj.png)
Regular Expression question
CC BY-SA 3.0
null
2011-07-05T14:36:02.927
2011-07-05T14:46:50.613
2011-07-05T14:46:04.013
340,760
731,901
[ "c#", ".net", "regex" ]
6,584,530
1
7,075,449
null
0
1,568
The admins for my application can make extra properties for the userprofiles. So UserA can have 1 Cellphone number , while UserB can have 5. Or UserA can have a Creditcard number while UserB doesn't have any. I want to make this work with Azure Table Storage. I'm making generic entities and inserting them into Table Storage. I know every entity/row can only have 255 filled in properties ( Partition Key, Row Key, Timestamp and your own properties.) In my situation there is a high chance there will be more columns but a very very small chance 1 user will actually use 255 properties. Now here is the problem, when the user reads his entity all the other properties that he doesn't use will be `'m:null="true'`. As you can see he still takes the extra properties he doesn't need. I can of course ignore them in my `ReadingEntity` Event but it's still overhead right? Imagine you want to get the profiles of 100 users and you have like 500 columns. There will be a lot of useless data in that xml file & network traffic. Is there any way to ignore those null and don't send them back at all? Instead of sending them back and marking the column as null? ![enter image description here](https://i.stack.imgur.com/XlHSb.png)
Ignore null properties Azure Table Storage
CC BY-SA 3.0
null
2011-07-05T14:42:33.217
2012-06-25T13:38:30.223
2012-06-25T13:38:30.223
272,109
624,400
[ "c#", "azure", "azure-storage", "azure-table-storage" ]
6,584,610
1
6,589,951
null
3
308
I'm using PHP in some HAML templates, so I've got a lot of `<?php echo ...?>` going on. Vim is highlighting all the greater-than signs with the ErrorMsg highlighting group, but it gets quite annoying, as you can see: ![Bad syntax highlighting](https://i.stack.imgur.com/b8BpE.png) What's the best way to disable this for HAML templates?
Disable vim angle bracket highlighting in HAML template
CC BY-SA 3.0
null
2011-07-05T14:47:45.497
2011-07-05T23:21:49.410
null
null
218,094
[ "php", "vim", "haml" ]
6,584,675
1
6,590,502
null
0
654
I'm basically trying to create the following set of code dynamically/programmatically but I'm unsure of how to do it. ``` <Grid x:Name="LayoutRoot"> <Grid.RowDefinitions> <RowDefinition Height="Auto"/> <RowDefinition Height="Auto"/> <RowDefinition/> </Grid.RowDefinitions> <smf:SMFPlayer x:Name="player" Grid.Row="0" AutoPlay="False"> <smf:SMFPlayer.Playlist> <media:PlaylistItem DeliveryMethod="AdaptiveStreaming" MediaSource="http://video3.smoothhd.com.edgesuite.net/ondemand/Big%20Buck%20Bunny%20Adaptive.ism/Manifest"/> <media:PlaylistItem DeliveryMethod="AdaptiveStreaming" SelectedCaptionStreamName="textstream_eng" MediaSource="http://streams.smooth.vertigo.com/elephantsdream/Elephants_Dream_1024-h264-st-aac.ism/manifest"/> </smf:SMFPlayer.Playlist> </smf:SMFPlayer> <StackPanel Grid.Row="1" Orientation="Horizontal" Background="Transparent"> <Button x:Name="test1" Height="30" Width="70" Content="Test 1"/> <Button x:Name="test2" Height="30" Width="70" Content="Test 2"/> </StackPanel> </Grid> ``` Here's how it looks statically: ![](https://i.imgur.com/uz1O8.png)
How to dynamically add buttons and Silverlight player in a Grid?
CC BY-SA 4.0
null
2011-07-05T14:52:15.230
2019-04-11T18:59:08.407
2019-04-11T18:59:08.407
10,607,772
752,895
[ "silverlight", "media-player", "media" ]
6,584,781
1
6,585,996
null
0
297
Can anyone help me,how to make the preprocessor settings starting from 4.5 OS in Blackberry? if i use preprocessors such as JDE_4_7 and NOT_JDE_4_5(For eg)I am getting the error as unreachable code, Is there any condition that we should not use preprocessors in a single location? How can i rectify it? ![Preprocessor Blackberry](https://i.stack.imgur.com/txDIo.jpg)
UnReachable code-How to use preprocessor settings
CC BY-SA 3.0
null
2011-07-05T15:00:31.053
2011-07-05T16:41:41.130
2011-07-05T16:36:22.907
75,204
138,030
[ "blackberry", "java-me", "preprocessor", "blackberry-eclipse-plugin", "blackberry-jde" ]
6,584,794
1
6,584,961
null
6
12,365
I am new to . I was used to *.asmx but it will become deprecated, so I decided to dive into WCF. I want a simple username + password authentication for my service, but everywhere on the web it's all about X509 certificates. I'd like to host my service in , so I will enable there. I have followed some hello world tutorials on WCF but am a bit confused with all the new things, datacontract, OperationContract, ServiceContract, required interfaces, all the bindings in `web.config`, basicHttpBinding etc. I am currently at `File -> New project -> Visual C# -> WCF -> WCF Service Application` I have a kind of hello world app, and would like to know what the best and easiest way is to secure it. I have read so much different things that I just don't have a clue what is the best for my situation. The service hosted in IIS will be available on the internet (with ssl enabled) and the usernames and passwords i'd like to send out to several trusted people. Please advice me for the easiest and suitable security. I am trying to follow this blogpost: [http://codebetter.com/petervanooijen/2010/03/22/a-simple-wcf-service-with-username-password-authentication-the-things-they-don-t-tell-you/](http://codebetter.com/petervanooijen/2010/03/22/a-simple-wcf-service-with-username-password-authentication-the-things-they-don-t-tell-you/) but I have trouble with publishing the metadata. I assume that there is an error in my `web.config` ``` <system.serviceModel> <services> <service behaviorConfiguration="WcfServiceSimStars.MyServiceTypeBehaviors" name="FarmService.CustomerDeskOperations"> <endpoint address="" binding="wsHttpBinding" bindingConfiguration="RequestUserName" contract="WcfServiceSimStars.ISimService" /> <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"/> </service> </services> <bindings> <wsHttpBinding> <binding name="RequestUserName" > <security mode="Message"> <message clientCredentialType="UserName"/> </security> </binding> </wsHttpBinding> </bindings> <client> <endpoint address="http://mytestserver/simservice.svc" binding="WSHttpBinding" bindingConfiguration="WSHttpBinding_ISimService" contract="WcfServiceSimStars.ISimService" name="WSHttpBinding_ISimService" /> </client> <behaviors> <serviceBehaviors> <behavior name="WcfServiceSimStars.MyServiceTypeBehaviors"> <serviceMetadata httpGetEnabled="true"/> <serviceCredentials> <userNameAuthentication userNamePasswordValidationMode="Custom" customUserNamePasswordValidatorType="WcfServiceSimStars.UserValidatorr, WcfServiceSimStars" /> <serviceCertificate findValue="Farm" storeLocation="LocalMachine" storeName="TrustedPeople" x509FindType="FindBySubjectName" /> </serviceCredentials> </behavior> </serviceBehaviors> </behaviors> <serviceHostingEnvironment multipleSiteBindingsEnabled="true" /> </system.serviceModel> ``` and my solution explorer: ![solution explorer](https://i.stack.imgur.com/orTxH.jpg) I tried to open my web.config with the `Microsoft Service Configuration Editor` from visual studio tools menu and got this error: ![Microsoft Service Configuration Editor](https://i.stack.imgur.com/WdLy9.jpg)
WCF security, username password without certificate
CC BY-SA 3.0
0
2011-07-05T15:01:43.953
2011-07-07T06:48:17.743
2011-07-07T06:48:17.743
169,714
169,714
[ "wcf", "iis-7.5", "wcf-binding", "wcf-security" ]
6,585,141
1
null
null
-1
4,286
I am developing a tsql query below. How do I identify the records which contain "1900%" in them? ``` SELECT DISTINCT TICKET, COMPLAINT_LEVEL, COMPLETION_DATE, DATE_FILTER, YEAR(DATE_FILTER) AS YEAR_FILTER, MONTH(DATE_FILTER) AS MONTH_FILTER, left(datename(month, DATE_FILTER), 3) + ' ''' + RIGHT(year(DATE_FILTER), 2) AS SHORT_DATE_FILTER, CASE WHEN DATE_FILTER < MONTH_END AND MONTH_END < CURRENT_DATE_END AND COMPLETION_DATE IS NULL THEN DATE_FILTER WHEN DATE_FILTER < MONTH_END AND MONTH_END < CURRENT_DATE_END AND COMPLETION_DATE IS NOT NULL AND ABS(DATEDIFF(DAY, COMPLETION_DATE, MONTH_END)) >= 1 AND DATE_FILTER < CURRENT_DATE_END THEN DATE_FILTER ELSE 0 END AS ROW_TYPE FROM #TEMP --WHERE row_type = 0 --line above does not work ``` And this is what my output looks like ![enter image description here](https://i.stack.imgur.com/nfpOr.png)
How to identify DATETIME NULL record in T-SQL?
CC BY-SA 3.0
null
2011-07-05T15:26:40.610
2011-07-05T16:32:46.213
null
null
371,819
[ "tsql", "datetime", "null" ]
6,585,212
1
6,585,474
null
1
3,431
I have tooptips show up when hovering over a link. These tooltips show filtering options for column headers. A tooltip contains text, a drop down list or a text box. In Firefox and Chrome the CSS works fine, however in IE7+ there are problems. 1. The tooltip appears over top all other objects on the page (as it's supposed to) except the original anchor link and image that you hover over. These get rendered over top the tooltip and it's contents. 2. The tooltip, when containing a dropdown list, disappears when the mouse cursor opens the drop down list and moves onto the DDL's listing box. I'm assuming that when the cursor moves over the list, it no longer is hovering over the tooltip, and it closes. IE has problems with telling the tooltip that when hovering over the DDL's list, that its actually hovering over the tooltip itself. My CSS is very straight forward: ``` ul li a:hover { background: #88f; border-style: none; } .tooltip{ z-index:25; border: none; color: inherit; } .tooltip:hover { z-index:25; position:relative;} .tooltip span.tooltip_actual { display: none; } .tooltip:hover span.tooltip_actual { display:block; position:absolute; top:-1em; left: -42em; width: 40em; border:1px solid #000; background-color: #fff; color:#000; text-align: left; padding: 1em; } ``` Has anyone run into this issue before and is there a work around? EDIT: this is the tooltip bug: ![enter image description here](https://i.stack.imgur.com/gSmdl.png) EDIT #2: Here is an example of my code: [http://jsfiddle.net/NAXrc/](http://jsfiddle.net/NAXrc/)
CSS Tooltips rendering problem in IE7+
CC BY-SA 3.0
null
2011-07-05T15:32:35.377
2011-07-06T13:26:39.570
2011-07-06T13:26:39.570
318,811
318,811
[ "css", "internet-explorer", "hover", "tooltip" ]
6,585,258
1
6,585,403
null
2
100
Below is the query which works but with some errors: ``` SELECT dbo.Booking.Cost, dbo.Booking.StatusID, dbo.Account.FirstName, dbo.Attendee.HelmetsPurchased AS ProductsPurchased, dbo.Attendee.GaragesPurchased, dbo.Attendee.SecondDriver AS [Driver Name] FROM dbo.Booking JOIN dbo.Attendee ON dbo.Booking.EventID = dbo.Attendee.EventID JOIN dbo.Account ON dbo.Booking.UserID = dbo.Account.UserID WHERE (dbo.Booking.EventID = 15) ``` Output: ![output of the above query](https://i.stack.imgur.com/SZGZ9.png) The issue with the generated table is the column product purchased and driver name is populated with text for every row which in this case it should be populated for only the rows which has `Drivername` and product purchased. There is only one row in the attendee table which has `drivername`, product purchase fields populated for username mark, while all the other rows has null value for both the `drivername` and products.
Problem with join query in SQL Server
CC BY-SA 3.0
null
2011-07-05T15:35:12.733
2011-07-05T15:58:30.777
2011-07-05T15:50:48.213
13,302
638,007
[ "sql", "sql-server", "tsql" ]
6,585,270
1
6,816,352
null
7
1,068
I have been playing around with MVC-Mini-Profiler, and found it very useful. However, on all pages I trace on, I get reports of duplicate queries, like the one below. However, I have traced the queries in SQL Server Profiler, and there is not doubt it only hits the DB once. Am I missing a concept here or have I set it up the wrong way? I have searched high and low for people with similar problems, with no luck, so I doubt there is a bug. ![Trace](https://i.stack.imgur.com/lTwop.png) ``` http://localhost:27941/clubs T+175.2 ms Reader 13.6 ms utePageHierarchy Execute System.Collections.Generic.IEnumerable<T>.GetEnumerator GetResults Execute ExecuteStoreCommands SELECT [Extent1].[TeamId] AS [TeamId], [Extent1].[Title] AS [Title], [Extent1].[TitleShort] AS [TitleShort], [Extent1].[LogoImageId] AS [LogoImageId], [Extent1].[Slug] AS [Slug], (SELECT COUNT(1) AS [A1] FROM [dbo].[Athletes] AS [Extent2] WHERE [Extent1].[TeamId] = [Extent2].[TeamId]) AS [C1] FROM [dbo].[Teams] AS [Extent1] WHERE 352 = [Extent1].[CountryId] http://localhost:27941/clubs T+175.4 ms DUPLICATE Reader 13.4 ms utePageHierarchy Execute System.Collections.Generic.IEnumerable<T>.GetEnumerator GetResults Execute ExecuteStoreCommands SELECT [Extent1].[TeamId] AS [TeamId], [Extent1].[Title] AS [Title], [Extent1].[TitleShort] AS [TitleShort], [Extent1].[LogoImageId] AS [LogoImageId], [Extent1].[Slug] AS [Slug], (SELECT COUNT(1) AS [A1] FROM [dbo].[Athletes] AS [Extent2] WHERE [Extent1].[TeamId] = [Extent2].[TeamId]) AS [C1] FROM [dbo].[Teams] AS [Extent1] WHERE 352 = [Extent1].[CountryId ``` I use EF4 and have implemented the context like this: ``` public class BaseController : Controller { public ResultsDBEntities _db; public BaseController() { var rootconn = ProfiledDbConnection.Get(GetStoreConnection(ConfigurationManager.ConnectionStrings["ResultsDBEntities"].ConnectionString)); var conn = ProfiledDbConnection.Get(rootconn); _db = ObjectContextUtils.CreateObjectContext<ResultsDBEntities>(conn); } public static DbConnection GetStoreConnection<T>() where T : System.Data.Objects.ObjectContext { return GetStoreConnection("name=" + typeof(T).Name); } public static DbConnection GetStoreConnection(string entityConnectionString) { DbConnection storeConnection; // Let entity framework do the heavy-lifting to create the connection. using (var connection = new EntityConnection(entityConnectionString)) { // Steal the connection that EF created. storeConnection = connection.StoreConnection; // Make EF forget about the connection that we stole (HACK!) connection.GetType().GetField("_storeConnection", BindingFlags.NonPublic | BindingFlags.Instance).SetValue(connection, null); // Return our shiny, new connection. return storeConnection; } } } ```
MVC-Mini-Profiler falsely showing duplicate queries
CC BY-SA 3.0
null
2011-07-05T15:35:55.537
2011-07-25T12:48:19.897
null
null
77,884
[ "asp.net-mvc-3", "mvc-mini-profiler" ]
6,585,286
1
6,585,633
null
2
5,064
![enter image description here](https://i.stack.imgur.com/134gO.png)Using instruments I found a strange problem regarding memory leaks. My app has a log mechanism which record events through the app and the whole communication with the server(request-response). Each event object that is been wrote has a timestamp. This timestamp is get as follows: ``` [NSDate descriptionWithLocale:[NSLocale systemLocale]] ``` Using instruments, I saw that descriptionWithLocale cause leaks. Below is the code: ``` -(id)initEvent:(NSString*)eventStr details:(NSString*)detailsStr{ eventString = [[NSMutableString alloc] initWithString:eventStr]; detailsString = [[NSString alloc] initWithString:detailsStr]; date =[[NSMutableString alloc] init]; NSDate* currentDate = [NSDate date]; NSString *dateDescStr = [currentDate descriptionWithLocale:[NSLocale systemLocale]]; [date appendString:dateDescStr]; return [super init]; ``` Thanks, Alex.
[NSDate descriptionWithLocale:[NSLocale systemLocale]] leak?
CC BY-SA 3.0
0
2011-07-05T15:36:58.333
2011-07-06T10:03:08.757
2011-07-05T15:42:03.080
285,553
285,553
[ "objective-c", "memory-leaks", "nsdate", "instruments" ]
6,585,300
1
6,585,636
null
0
1,051
I'm working on a Nexus S and the phone theme uses Black and Orange. I started with a custom button - changing the background from `@android:drawable/btn_default` to my own 9 Patch image. This is fine and dandy and there are 100's of tutorials and examples of such littering Google. The problem is I don't want to create a different style of button. I want the UI in my app to as insofar as possible to stay true to the phones own buttons and UI elements. What I want is to create a custom button which looks exactly like `android:state_pressed="true"` and `android:state_focused="true"` but instead of orange, blue. I also want to do this for selected EditText & Spinners and the like. Am I doomed to backwards engineer each element, guessing each pixel, one for each state and create 9 patch images of them? That's what I've done below for the blue button - as you can see, close but not exact. Has android given these buttons out somewhere - if that was true it would take an afternoon but it wouldn't be unreasonable to create the same UI set in a different colour. Or is the a programmatic way of saying "For this app use this theme" that I've just never heard of (Big ask). ![Origional Button](https://i.stack.imgur.com/xnLxu.png)![Sample Button](https://i.stack.imgur.com/YfiV6.png)
Change colour scheme of phone specific UI elements (Selected Buttons / Selected EditText)
CC BY-SA 3.0
null
2011-07-05T15:37:36.607
2011-07-05T16:06:59.870
2011-07-05T15:45:08.550
726,954
726,954
[ "android", "user-interface", "themes" ]
6,585,309
1
6,604,130
null
0
290
I have some text that looks like this: ``` Some Text&nbsp;&middot;&nbsp;SomeMoreText ``` In all Windows browsers, this shows up like: ![enter image description here](https://i.stack.imgur.com/sAATM.png) But on the Mac, it shows up like: ![enter image description here](https://i.stack.imgur.com/GIPW9.png) Why does the Mac trim the space following the dot? Even `&nbsp;` doesn't work.
Safari / Firefox on Mac not rendering &middot; properly
CC BY-SA 3.0
null
2011-07-05T15:37:59.747
2011-07-06T23:14:41.260
null
null
34,942
[ "macos", "fonts" ]
6,585,344
1
6,586,466
null
1
25,248
Using a list, I want to create a list of links as in the image ![HTML List with CSS background images](https://i.stack.imgur.com/H66En.jpg) ``` <div id="toolbarbottom" class="toolbar" style="position: fixed; clear: both; overflow: visible; bottom: 0px; left: 0px; width: 100%;"> <ul> <li id="active"><span><a id="current" href="#add" class="button">News</a></span></li> <li><span> <a href="#Updates" class="button">Updates</a></span> </li> <li><span><a href="#Contact" class="button">Contact Us</a></span></li> <li><span><a href="#Website" class="button">Website</a> </span></li> <li><span><a href="#Refresh" id="#Refresh" class="button">Refresh</a></span> </li> </ul> </div> ``` I am kind of stuck on the CSS (button) and probably the spacing between the list elements. to make the list appear in this form. Anyone with an idea of how I can tackle this please?
Styling List Buttons
CC BY-SA 3.0
null
2011-07-05T15:40:23.590
2011-07-05T17:23:21.340
2011-07-05T17:00:39.883
669,044
123,367
[ "html", "css", "image", "hyperlink", "html-lists" ]
6,585,580
1
6,587,198
null
1
347
Is there a simple way to script the TFS powertools "get latest version" feature ? I am refering to this window: ![screenshot](https://i.stack.imgur.com/vPPga.png) I just want to get it via a script, rather than by right clicking on a folder. I am aware of `tf get` but I like the powertools window better ![screenshot](https://i.stack.imgur.com/WZyaS.png)
Script TFS Powertools shell extension getter
CC BY-SA 3.0
null
2011-07-05T16:01:32.070
2011-07-05T18:31:06.227
2011-07-05T16:02:56.147
225,647
67,824
[ "scripting", "tfs-power-tools" ]
6,585,585
1
6,585,642
null
31
32,612
I have a basic ViewModel with a property that is a List of complex types. When binding, I seem to be stuck with getting either the list of values, OR the other model properties depending on the posted values (i.e. the view arrangement). The view model: ``` public class MyViewModel { public int Id { get; set; } public string Property1 { get; set; } public string Property2 { get; set; } public List<MyDataItem> Data { get; set; } } public class MyDataItem { public int Id { get; set; } public int ParentId { get; set; } public string Name { get; set; } public string Value { get; set; } } ``` The controller actions: ``` public ActionResult MyForm() { MyViewModel model = new MyViewModel(); model.Id = 1; model.Data = new List<MyDataItem>() { new MyDataItem{ Id = 1, ParentId = 1, Name = "MyListItem1", Value = "SomeValue"} }; return View(model); } [HttpPost] public ActionResult MyForm(MyViewModel model) { //... return View(model); } ``` Here is the basic view (without the list mark-up) ``` @using (Html.BeginForm()) { @Html.ValidationSummary(true) <fieldset> <legend>My View Model</legend> @Html.HiddenFor(model => model.Id) <div class="editor-label"> @Html.LabelFor(model => model.Property1) </div> <div class="editor-field"> @Html.EditorFor(model => model.Property1) @Html.ValidationMessageFor(model => model.Property1) </div> <div class="editor-label"> @Html.LabelFor(model => model.Property2) </div> <div class="editor-field"> @Html.EditorFor(model => model.Property2) @Html.ValidationMessageFor(model => model.Property2) </div> <p> <input type="submit" value="Save" /> </p> </fieldset> } ``` When posted back to the controller, I get the 2 property values and a null value for the 'Data' property as expected. ![Without List Mark-up](https://i.stack.imgur.com/Uspzv.gif) If I add the mark-up for the List as follows (based on the information in this [Scott Hanselman post](http://www.hanselman.com/blog/ASPNETWireFormatForModelBindingToArraysListsCollectionsDictionaries.aspx) and [Phil Haack's post](http://haacked.com/archive/2008/10/23/model-binding-to-a-list.aspx)): ``` <div class="editor-field"> @for (int i = 0; i < Model.Data.Count(); i++) { MyDataItem data = Model.Data[i]; @Html.Hidden("model.Data[" + i + "].Id", data.Id) @Html.Hidden("model.Data[" + i + "].ParentId", data.ParentId) @Html.Hidden("model.Data[" + i + "].Name", data.Name) @Html.TextBox("model.Data[" + i + "].Value", data.Value) } </div> ``` The 'Data' property of the model is successfully bound but the other properties are null. ![With List Mark-up](https://i.stack.imgur.com/CAIKg.gif) The form values posted are as follows: ``` Id=1&Property1=test1&Property2=test2&model.Data%5B0%5D.Id=1&model.Data%5B0%5D.ParentId=1&model.Data%5B0%5D.Name=MyListItem1&model.Data%5B0%5D.Value=SomeValue ``` Is there a way to get both sets of properties populated or am I just missing something obvious? For those of you who are curious. Based on the answer from [MartinHN](https://stackoverflow.com/users/2972/martinhn), the original generated mark-up was: ``` <div class="editor-field"> <input id="model_Data_0__Id" name="model.Data[0].Id" type="hidden" value="1" /> <input id="model_Data_0__ParentId" name="model.Data[0].ParentId" type="hidden" value="1" /> <input id="model_Data_0__Name" name="model.Data[0].Name" type="hidden" value="MyListItem1" /> <input id="model_Data_0__Value" name="model.Data[0].Value" type="text" value="SomeValue" /> </div> ``` The new generated mark-up is: ``` <div class="editor-field"> <input id="Data_0__Id" data-val="true" name="Data[0].Id" type="hidden" value="1" data-val-number="The field Id must be a number." data-val-required="The Id field is required." /> <input id="Data_0__ParentId" name="Data[0].ParentId" type="hidden" value="1" data-val="true" data-val-number="The field ParentId must be a number." data-val-required="The ParentId field is required." /> <input id="Data_0__Name" name="Data[0].Name" type="hidden" value="MyListItem1" /> <input id="Data_0__Value" name="Data[0].Value" type="text" value="SomeValue" /> </div> ``` Which results in the following posted values: ``` Id=1&Property1=test1&Property2=test2&Data%5B0%5D.Id=1&Data%5B0%5D.ParentId=1&Data%5B0%5D.Name=MyListItem1&Data%5B0%5D.Value=SomeValue ``` Notice there's no 'model.' in the name and posted values...
MVC binding to model with list property ignores other properties
CC BY-SA 3.0
0
2011-07-05T16:01:55.443
2012-11-03T18:40:27.960
2017-05-23T10:32:32.450
-1
194,626
[ "asp.net-mvc-3" ]
6,585,681
1
null
null
3
2,344
Okay, first off - how I want my cells to look in my UItableView in editing mode (with some nicer buttons): ![enter image description here](https://i.stack.imgur.com/zekkk.png) However - this is how it looks right now: ![enter image description here](https://i.stack.imgur.com/pFB2u.png) My problem is that my custom EditingAccessoryView only appears on the cell that I first created, and that those circle-thingies (what are those called?) appears. Which doesn't do much good. Now, my code looks like this (which seems like the common way of doing this, seen at this question for example: [How to add Custom EditingAccessoryView for UITableView?](https://stackoverflow.com/questions/4012751/how-to-add-custom-editingaccessoryview-for-uitableview)) ``` UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier]; if (cell == nil) { cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:CellIdentifier] autorelease]; cell.editingAccessoryView = AccessoryView; AccessoryView.backgroundColor = [UIColor clearColor]; } ``` I have read that you are supposed to be able to call your custom editingAccessoryView by swiping, even if `- (BOOL)tableView:(UITableView *)tableView canEditRowAtIndexPath:(NSIndexPath *)indexPath` returns "NO". This however I have not been able to achieve. So, to sum it upp; I want my editingAccessoryView to be displayed at all cells - and, if possible, remove the red circle. Or, alternatively, call my editingAccessoryView when I swipe - what method gets called when the user does this? Any help would be much appreciated.
Custom editingAccessoryView behaving unpredictable
CC BY-SA 3.0
0
2011-07-05T16:11:25.300
2012-08-29T12:18:14.680
2017-05-23T12:08:19.480
-1
684,195
[ "iphone", "objective-c", "ios", "ios4" ]
6,585,835
1
6,585,978
null
1
83
I have 2 divs nested within a parent div. Im having a problem setting the Schedule Div and PhoneNumber Div correctly. I've tried adding .clear and float tags. [http://www.virtualpetstore.com](http://www.virtualpetstore.com) ![enter image description here](https://i.stack.imgur.com/zfOIh.jpg) The 2 Divs appear as is in the Illustration, but when I view this with a larger monitor, the 2 Divs are way off to the right I've tried to change the floats to right, then change the position to relative which completely breaks the page. ``` *{ margin:0; padding:0 } body { background-color: #9EB0C8; font-family: Arial,Helvetica,sans-serif; font-size: 62.5%; } #top-wrap { height: 133px; margin: 0 auto; width: 882px; position: relative; z-index:100; background-color: Yellow; } #head-logo { height: 133px; width: 214px; float:left; position:relative; /*margin: 0px 0 0 58px;*/ background: url("/images/Home/Logo7.png") no-repeat scroll 0 0 transparent; background-position:bottom; background-color: Green; } #head-title { height: 55px; width: 385px; float:left; position:relative; margin: 9px 0 0 18px; background: url("/images/Home/LogoTitle1.png") no-repeat scroll 0 0 transparent; background-color:Red; } #contact-button { height: 28px; width: 165px; float:left; position:absolute; margin: 7px 0 0 715px; background-color:orange; } #contact-phone { height: 20px; width: 134px; margin: 28px 0 0 745px; float:left; position:absolute; color:#FFFFFF; font-family: Arial,Impact,Impact5,Charcoal6,sans-serif; font-size: 2.1em; text-align: right; background-color:Blue; } a.contact { background-image: url("/images/Home/RapidButtonSprite4.png"); background-position:left bottom; /* 0px -27px; */ display: block; font-size: 11px; text-align: center; width: 165px; height: 27px; } a.contact:hover { background-position:left top; /*0px 0px;*/ } #navigation-primary { float:left; position:relative; margin: 18px 0 0 4px; } ``` Here is the Relevent HTML: ``` <div id="top-wrap"> <div id="head-logo"> <a href="/"></a> </div> <div id="head-title"> </div> <div id="contact-button"> <div id='contact-form'> <a class="contact" href="#"></a> </div> </div> <br style="clear: right" /> <div id="contact-phone"> 703-425-6000 </div> <div id="navigation-primary"> .... </div> </div> ```
Issue with 2 Divs not aligning correct
CC BY-SA 3.0
null
2011-07-05T16:24:22.763
2011-07-05T21:33:19.673
2011-07-05T21:33:19.673
598,931
598,931
[ "css" ]
6,585,891
1
6,586,467
null
0
100
I have a databse table with some columns of data (area inside green), I want to retrieve table data in such layout with paging support, how can I create this layout? (there is no problem for retrieving data from DB) does GridView support such layout? ![enter image description here](https://i.stack.imgur.com/Sf6ql.png)
Creating custom layout for DB records
CC BY-SA 3.0
null
2011-07-05T16:30:21.037
2011-07-05T17:23:31.523
null
null
689,779
[ "asp.net" ]
6,586,289
1
6,586,348
null
21
18,950
In my main view, I do some gesture action causing some new view to be shown. At this time I want to dim the entire background (except this new view) as a good UI practice. In HTML, Javascript it looks like so - How do I get this same effect in iOS ? ![enter image description here](https://i.stack.imgur.com/2MVUQ.png)
iOS Dim background when a view is shown
CC BY-SA 3.0
0
2011-07-05T17:07:32.307
2017-02-28T07:29:30.873
2011-07-06T06:02:55.580
147,019
147,019
[ "objective-c", "ios", "animation", "uiview" ]
6,586,302
1
6,586,429
null
81
400,662
I want to add some space to the right of an `<input type="text" />` so that there's some empty space on the right of the field. So, instead of ![](https://i.imgur.com/jCdxV.jpg), I'd get ![](https://i.imgur.com/Bhyvc.jpg). So, same behavior just some empty space to the right. I've tried using `padding-right`, but that doesn't seem to do anything. Is there a way to do this (or fake it)?
Add padding to HTML text input field
CC BY-SA 3.0
0
2011-07-05T17:08:31.137
2017-07-24T08:29:56.843
null
null
515,160
[ "html", "css", "text", "input", "textbox" ]
6,586,337
1
6,641,757
null
4
3,856
Is it possible to remove the axes from a `pyplot.figure()`? Using the `pyplot.imsave()` to create an image without axes works OK ``` plt.imsave(file, zi) ``` ![Image produces with pyplot.imsave()](https://i.stack.imgur.com/dfNwz.png) but it's limited because it only works with grid data. When I use `pyplot.figure()` and save it using `pyplot.savefig()` as follows ``` ... # create figure fig = plt.figure(figsize=(1.0,1.0)) # apply contour plot plt.contour(zi,15,linewidths=0.1,colors='k') plt.contourf(zi,15,cmap=plt.cm.jet) # flip the y-axis ax = plt.gca() ax.set_ylim(ax.get_ylim()[::-1]) # save to file, 256x256 pixels plt.savefig(file1, dpi=256) ``` ![Image produces with pyplot.savefix()](https://i.stack.imgur.com/5BTyN.png) the saved image keeps it's axis, as seen on image above.
Remove axes from a figure
CC BY-SA 3.0
null
2011-07-05T17:11:43.757
2013-05-20T09:26:01.167
2013-05-20T09:26:01.167
2,022,086
10,814
[ "python", "matplotlib", "figure", "axes" ]
6,586,379
1
null
null
5
404
I am trying to do a really basic sharing on Facebook from my app, with ShareKit. Most things looks ok, but I don't understand why there's no icon to the left, just the small one in the footer. I can't find a way to put it there. How do I customize it? For me it looks like the left picture I attach, but I would like to have it like the right. ``` NSURL *url = [NSURL URLWithString:@"http://itunes.apple.com/us/app/...?mt=8"]; item = [SHKItem URL:url title:[NSString stringWithFormat:@"I'm playing someGame on my iPhone! My Highscore is %i, think you can beat it?", 456]]; [SHKFacebook shareItem:item]; ``` ![For me it's like the left, but I would like to have like the right one.](https://i.stack.imgur.com/NyjMq.png)
No icon when sharing with Sharekit
CC BY-SA 3.0
0
2011-07-05T17:15:27.783
2012-03-26T13:03:33.237
2011-07-05T17:35:25.277
694,670
694,670
[ "objective-c", "facebook", "sharekit" ]
6,586,496
1
6,586,531
null
0
2,215
This is not your average session failed to start question, there is no whitespace, i have not called it in another file etc. Im currently working on an application as I have started to build my session library, now when I call `session_start` I get the following error: > A session had already been started - ignoring `session_start()` For those who wish to see the source: [https://github.com/AdminSpot/ASFramework/blob/master/system/libraries/session.php](https://github.com/AdminSpot/ASFramework/blob/master/system/libraries/session.php) This usually means that the session.autostart directive is set to `1`, but that's the thing.. it's not, it's set to 0 and I have verified this by doing the following: - `php.ini*`- `php --ini`- `php -i | grep session.auto_start``session.auto_start => Off => Off`- - - - `grep -lir "session_start" *`- I have created a basic test script to test where i have just called session start on it's own. The `phpinfo()` call stats the active php.ini is `/etc/php5/cgi/php.ini` so after running `cat /etc/php5/cgi/php.ini | grep session.auto_start` I get `session.auto_start = 0`, so it disabled, Could it be NGinx ? Has anyone got any idea what's going on, some server information below: - - - PHPInfo screen: ![enter image description here](https://i.stack.imgur.com/pRySy.png)
Session Start Failure
CC BY-SA 3.0
0
2011-07-05T17:26:41.443
2011-11-13T12:41:47.987
2011-11-13T12:41:47.987
603,200
353,790
[ "php", "session", "autostart" ]