Id
int64
1.68k
75.6M
PostTypeId
int64
1
2
AcceptedAnswerId
int64
1.7k
75.6M
ParentId
int64
1.68k
75.6M
Score
int64
-60
3.16k
ViewCount
int64
8
2.68M
Body
stringlengths
1
41.1k
Title
stringlengths
14
150
ContentLicense
stringclasses
3 values
FavoriteCount
int64
0
1
CreationDate
stringlengths
23
23
LastActivityDate
stringlengths
23
23
LastEditDate
stringlengths
23
23
LastEditorUserId
int64
-1
21.3M
OwnerUserId
int64
1
21.3M
Tags
list
4,093,956
1
4,095,742
null
1
333
I have a `User` that wants to see his online profile, in a site where he previously has registered at. I am in charge of making a Dataflow Diagram out of this situation. I know for sure that the `System` will return a `Profile`. That is why I put an arrow from `System` to `User`. How can I express that the `User` is requesting his profile to the `System`? I can't think of a way of expressing that in a DFD. I guess it's maybe because you are only supposed to show data flow in a DFD and not actions/requests? Should I completly erase the arrow that goes from `User` to `System`(`?See his profile?`) ? ``` Context Diagram (Level 0 Dataflow Diagram) ``` ![alt text](https://i.stack.imgur.com/CoDhf.jpg) ``` Level 1 Dataflow Diagram ``` ![alt text](https://i.stack.imgur.com/Mj9P1.jpg) Thanks
How should I depict "User wants to see his profile" in a Dataflow Diagram? Maybe I shouldn't?
CC BY-SA 2.5
null
2010-11-04T04:43:43.127
2010-11-04T10:31:46.797
2010-11-04T07:06:34.557
130,758
130,758
[ "oop", "uml", "dataflow-diagram" ]
4,094,134
1
null
null
-6
115
which library tool(round textured,textured button,etc) shall i use for ![alt text](https://i.stack.imgur.com/kEuYo.png) displaying boxes at right corner of uploaded image,also please give me the list of different tools shall i use for all those data(multilined text,clear logs,small images at left corner, etc) from uploaded image. please reply
about using library tools in cocoa
CC BY-SA 2.5
null
2010-11-04T05:34:18.983
2010-11-04T14:54:19.523
null
null
495,581
[ "cocoa" ]
4,094,309
1
null
null
9
254
I'm trying to implement the Cascaded Hough Transform (I have already implemented the 'normal' version.) but I'm having trouble understanding the following: After applying HT on an image, I am left with straight lines in hough space. The Cascaded version of the HT requires me to split the hough space into 3 sub-spaces so that the problem of unbounded values is solved. How can I go about doing this? Here's a picture of how the hough space is split: ![alt text](https://i.stack.imgur.com/Z43VU.gif) > In order to restore the boundedness of the parameter space while preserving the symmetric space duality, we will split the (a, b)-space into three bounded subspaces, as shown in the figure below. The first subspace also has coordinates a and b, but only for | a | <= 1 and | b | <= 1. If | a | > 1 and | b | <= | a | , the point (a, b) turns up in the second subspace, with coordinates 1/a and b/a. If, finally, | b | > 1 and | a | < | b |, we use a third subspace with coordinates 1/b and a/b. Here is where I get seriously confused, suppose I have a line in the hough space. How is it going to be split up if it violates | a | <= 1 and | b | <= 1? Do I simply go through all the pixels in the line and if the pixel in question has coordinates greater than | a | <= 1 and | b | <= 1, I plot it in the 2nd subspace? I apologize if this sort of question is not welcomed on Stack Overlow - is there another site where I can ask questions about algorithms? [Source for the image and the above quote](http://homes.esat.kuleuven.be/~tuytelaa/CHT.html)
Splitting Coordinates into 3 Subspaces To Resolve Unboundedness
CC BY-SA 2.5
0
2010-11-04T06:14:17.033
2011-10-04T01:09:00.203
null
null
452,617
[ "algorithm", "image-processing", "hough-transform" ]
4,094,459
1
null
null
0
121
I want to design a server which loads plug-in assemblies from third party vendors. The third party vendor needs to follow some contract while implementing plug-in assemblies. The third party plug-in assemblies needs to be copied to a specified deployment folder of the server. The server will dynamically load the plug-in assemblies.. As one of the solution, the server could rely on digital certificate technology. The server should load only those assemblies which are digitally signed with a trusted root certificate authority. I am planning to derive test cases from the following diagram: ![alt text](https://i.stack.imgur.com/98uQX.png) The leaf node (highlighted in purple) denotes the possible test cases. I need to get ideas/feedback on the following: - - - Thanks.
Loading only third party trusted assemblies in an Application Server
CC BY-SA 2.5
0
2010-11-04T06:48:54.130
2010-11-16T21:53:56.933
2010-11-04T06:58:02.320
155,755
155,755
[ "security", "architecture", "digital-certificate", "testcase" ]
4,094,889
1
4,095,278
null
1
1,726
i've a `ListView` control like ![listview](https://i.stack.imgur.com/cfV2T.png) and a `Dictionary` ``` Dictionary<String,List<String>> MyDict ``` i need to fill the Dictionary with data in the `ListView` So the Dictionary will be like ``` { "S.No." { "1","2","3" } } {" A" {"A1", "", "" } } {" B" {"B1", "B2", "" } } {" C" {"C1", "C2", "C3" } } ``` using nested for loop we acn do this. But is there any way to do this using LINQ?
How to get data from a ListView in Dictionary format in C# winforms
CC BY-SA 2.5
null
2010-11-04T08:25:26.143
2016-02-08T03:56:09.583
2010-11-04T09:24:38.380
336,940
336,940
[ "c#", "winforms", "linq", "listview" ]
4,095,062
1
4,095,549
null
0
230
I'm trying to implement in jsf something that will serve sort of a 3 way pick list: ![alt text](https://i.stack.imgur.com/7SHwY.jpg) I can do this pretty easily. My only problem is making the buttons rotate as they are in the image. Is it even possible? (Other than doing some clickable image that will only appear rotated)
JSF and rotated components? (Specifically, buttons)
CC BY-SA 2.5
null
2010-11-04T08:54:59.827
2010-11-04T10:05:47.667
null
null
128,076
[ "jsf", "myfaces" ]
4,095,142
1
4,101,549
null
0
3,314
I have the following macro defined which inserts rows into a sheet. After the rows are inserted at specified start addresses, the various ranges are then converted into Tables. My initial thoughts are that the issue lies with the use of `xlDown` - since this is the place in code where rows are inserted. At present I have 7 such ranges, however the issue is that first three always have an additional row inserted - this was previously working with no issues, so the fact that its misbehaving is a puzzle to me. The remaining ranges are correct. The `tableStartAdress` refers to named ranges whose values correspond to the first cell below the green title, ie A4, A12 etc. `rowsToInsert` for this example is always 38. ``` Sub InsertTableRows(tableStartAdress As String, rowsToInsert As Integer) Dim i As Integer Dim rowToCopy As String Application.ScreenUpdating = False Application.DisplayAlerts = False Application.DisplayAlerts = False Range(tableStartAdress).Offset(1, 0).Rows.Copy rowToCopy = Range(tableStartAdress).Offset(1, 0).row & ":" & _ Range(tableStartAdress).Offset(1, 0).row Rows(rowToCopy).Select Selection.Copy Range(tableStartAdress).Offset(1, 0).Select ActiveCell.Resize(rowsToInsert, 1).Select Selection.Insert Shift:=xlDown Application.CutCopyMode = False Application.ScreenUpdating = True Application.DisplayAlerts = True End Sub ``` The following pictures depict what I mean. ![How the wkSheet looks before date population](https://i.stack.imgur.com/IxdaE.png). Once data is populated the first three range/tables have an extra row ![Extra Rows](https://i.stack.imgur.com/d01kl.png), ![Extra Row](https://i.stack.imgur.com/hLAyd.png), ![Correct blank stuff](https://i.stack.imgur.com/Q8RTw.png)
Additional Row inserted using xlDown in Excel
CC BY-SA 2.5
null
2010-11-04T09:05:56.687
2015-02-23T19:24:32.090
2018-07-09T18:41:45.953
-1
268,667
[ "excel", "excel-2007", "vba" ]
4,095,257
1
4,095,298
null
1
148
Please consider this snippet: [http://fruple.com/kemper/test/categorie.html](http://fruple.com/kemper/test/categorie.html) ## Firefox screenshot: ![alt text](https://i.stack.imgur.com/b0tL5.png) ## Chrome screenshot ![alt text](https://i.stack.imgur.com/Fofnn.png) why are some of the right borders not showing up?
Google Chrome eating borders (works fine on firefox)
CC BY-SA 2.5
0
2010-11-04T09:24:10.510
2010-11-04T09:33:36.537
2020-06-20T09:12:55.060
-1
148,968
[ "css", "layout", "cross-browser" ]
4,095,289
1
null
null
11
84,755
I want to learn yii as my first framework. And I'm trying to make the contact form work. But I got this error: ![alt text](https://i.stack.imgur.com/TIGoN.png) I've already configured php.ini file from: ``` C:\wamp\bin\php\php5.3.0 ``` And changed the default to these values: ``` [mail function] ; For Win32 only. ; http://php.net/smtp SMTP = ssl:smtp.gmail.com ; http://php.net/smtp-port smtp_port = 23 ; For Win32 only. ; http://php.net/sendmail-from sendmail_from = [email protected] ``` I've seen from here that gmail doesn't use port 25, which is the default in the php.ini. So I used 23. And also opened that port in the windows 7 firewall. Via inbound rules. Then I also edited the main config in my yii application, to match the email that I'm using: ``` // application-level parameters that can be accessed // using Yii::app()->params['paramName'] 'params'=>array( // this is used in contact page 'adminEmail'=>'[email protected]', ), ); ``` Finally, I restarted wampserver. Then cleared all my browsing data. Why then to I still see that its pointing out port 25 in the error. Have I miss something? Please help.
How to configure php.ini to use gmail as mail server
CC BY-SA 2.5
0
2010-11-04T09:29:08.780
2017-12-10T05:04:38.173
null
null
225,269
[ "smtp", "gmail", "wamp", "php" ]
4,095,307
1
4,095,362
null
1
710
I am trying to implement the following display. ![alt text](https://i.stack.imgur.com/bmW68.jpg) My html & css are like this... ``` <div class="label iepngfix">Nickname</div> <div class="text"> <?php echo $nickname; ?> </div> .label { float: left; font-weight: bold; padding: 0; } .text { float: left; margin: 0 0 0 5px; word-wrap: break-word; } ``` In IE6, 7 it appears fine but, in IE8, Chrome and Firefox, it appears like this... ![alt text](https://i.stack.imgur.com/q7j52.jpg) What am I missing over here? Regards
word-wrap in CSS
CC BY-SA 2.5
null
2010-11-04T09:31:00.243
2010-11-05T03:46:38.930
2010-11-04T09:46:49.000
206,613
206,613
[ "css", "word-wrap" ]
4,095,482
1
4,095,673
null
2
706
I'm attempting to design a system that will allow the processing of multiple types of file. The idea being that there's a single application to handle the actual manipulation of the files on disk, while developers can write custom libraries that will be able to do whatever they want with the files once loaded. I current have a structure that looks like this: [Original Image](http://farm2.static.flickr.com/1179/5144976247_4cb92529a1_b.jpg) ![current class diagram](https://i.stack.imgur.com/AHrRp.jpg) Where the application publishes an `IClient` interface that the custom written libraries are free to implement. `Client1` to `Client3` would each have a different implementation and respond to each type of file in a different way. The `Populate` method on `File` is overriden in the derived classes to call the correct `PopulateFrom` method on the `IClient` interface, passing in the calling file. Therefore the `PopulateFrom` method on the class implementing `IClient` is passed a file of a specific type so that it has to access the underlying data (`CSVDataReader` or `XDocument` in this example) to parse into whatever domain-specific objects it wants. Using this design for every new type of file I add to the system I would have to add a new method to `IClient` which isn't ideal. To preserve compatibility with the client classes that don't have the method accepting the new file type I'm going to have to create a new interface that specifically supports that type and have the new client implement that: [Original Image](http://farm5.static.flickr.com/4111/5145576518_d75c77fc03_b.jpg) ![class diagram with new file type](https://i.stack.imgur.com/1oIDb.jpg) That all works, but I was wondering whether there's a better way of supporting the multiple file types without having to add a new interface every time, possibly using a design pattern?
How to improve polymorphism with design patterns
CC BY-SA 2.5
null
2010-11-04T09:57:12.617
2010-11-04T10:22:50.710
2010-11-04T10:06:45.313
60,340
60,340
[ "c#", "design-patterns" ]
4,095,749
1
4,096,029
null
6
17,988
I have a sort of a one level tree structure as: ![alt text](https://i.stack.imgur.com/fEXEn.png) Where p are parent nodes, c are child nodes and b are branches. I want to find all of branches under the constraint that only parent can branch to only child node, and two branches can not share parent and/or child. E.g. if `combo` is the set of combinations: ``` combo[0] = [b[0], b[3]] combo[1] = [b[0], b[4]] combo[2] = [b[1], b[4]] combo[3] = [b[2], b[3]] ``` I think that's all of them. =) How can this be achived automaticly in Python for arbitrary trees of this structures i.e. the number of p:s, c:s and b:s are arbitrary. EDIT: It is not a tree but rather a [bipartite](http://en.wikipedia.org/wiki/Bipartite_graph) [directed acyclic graph](http://en.wikipedia.org/wiki/Directed_acyclic_graph)
Combinatorics in Python
CC BY-SA 2.5
0
2010-11-04T10:32:13.457
2010-11-04T12:13:15.313
2010-11-04T11:57:01.653
441,337
441,337
[ "python", "combinatorics", "directed-acyclic-graphs", "bipartite" ]
4,095,812
1
4,142,112
null
1
2,153
![Editable area](https://i.stack.imgur.com/jhBni.png) . I use FullCalendar. In Day View I would like to be able to specify an editable area - as shown in white in the screenshot between 13:30 and 20:00. So I should not be able to drag a session outside this area or modify the brown session (outside of the white area)
FullCalendar - Day View editable area
CC BY-SA 2.5
null
2010-11-04T10:39:04.343
2016-12-15T16:12:19.163
null
null
305,189
[ "jquery", "fullcalendar" ]
4,095,827
1
4,098,433
null
-2
164
How to create usa today like News picture scroller? ![alt text](https://i.stack.imgur.com/GALzq.png)
How to create usa today like News picture scroller?
CC BY-SA 3.0
null
2010-11-04T10:41:47.383
2017-07-31T12:08:16.190
2017-07-31T12:08:16.190
1,000,551
472,537
[ "android", "scroll" ]
4,096,005
1
4,099,045
null
15
1,858
## Introduction As part of a larger program (related to rendering of volumetric graphics), I have a small but tricky subproblem where an arbitrary (but finite) triangular 2D mesh needs to be labeled in a specific way. Already a while ago I wrote a solution (see below) which was good enough for the test meshes I had at the time, even though I realized that the approach will probably not work very well for every possible mesh that one could think of. Now I have finally encountered a mesh for which the present solution does not perform that well at all -- and it looks like I should come up with a totally different kind of an approach. Unfortunately, it seems that I am not really able to reset my lines of thinking, which is why I thought I'd ask here. ## The problem Consider the picture below. (The colors are not part of the problem; I just added them to improve (?) the visualization. Also the varying edge width is a totally irrelevant artifact.) ![](https://i.stack.imgur.com/kzryF.png) For every triangle (e.g., the orange ABC and the green ABD), each of the three edges needs to be given one of two labels, say "0" or "1". There are just two requirements: 1. Not all the edges of a triangle can have the same label. In other words, for every triangle there must be two "0"s and one "1", or two "1"s and one "0". 2. If an edge is shared by two triangles, it must have the same label for both. In other words, if the edge AB in the picture is labeled "0" for the triangle ABC, it must be labeled "0" for ABD, too. The mesh is a genuine 2D one, and it is finite: i.e., it does not wrap, and it has a well-defined outer border. Obviously, on the border it is quite easy to satisfy the requirements -- but it gets more difficult inside. Intuitively, it looks like at least one solution should always exist, even though I cannot prove it. (Usually there are several -- any one of them is enough.) ## Current solution My current solution is a really brute-force one (provided here just for completeness -- ): - - - - - - - - - - Usually this approach finds a solution within just a couple of iterations, but recently I encountered a mesh for which the algorithm tends to terminate only after one or two of retries... Which obviously suggests that there may be meshes for which it terminates. --- Now, I would love to have a deterministic algorithm that is guaranteed to always find a solution. Computational complexity is not that big an issue, because the meshes are not very large and the labeling basically only has to be done when a new mesh is loaded, which does not happen all the time -- so an algorithm with (for example) exponential complexity ought to be fine, as long as it works. (But of course: the more efficient, the better.) Thank you for reading this far. Now, any help would be greatly appreciated! --- --- ## Edit: Results based on suggested solutions Unfortunately, I cannot get [the approach suggested by Dialecticus](https://stackoverflow.com/questions/4096005/algorithm-for-labeling-edges-of-a-triangular-mesh/4096189#4096189) to work. Maybe I did not get it right... Anyway, consider the following mesh, with the start point indicated by a green dot: ![](https://i.stack.imgur.com/KOl45.png) Let's zoom in a little bit... ![](https://i.stack.imgur.com/XNofn.png) Now, let's start the algorithm. After the first step, the labeling looks like this (red = "starred paths", blue = "ringed paths"): ![](https://i.stack.imgur.com/m5CD2.png) So far so good. After the second step: ![](https://i.stack.imgur.com/gV9ST.png) And the third: ![](https://i.stack.imgur.com/dfIx9.png) ... fourth: ![](https://i.stack.imgur.com/V9xMW.png) But now we have a problem! Let's do one more round - but please pay attention on the triangle plotted in magenta: ![](https://i.stack.imgur.com/qfnud.png) According to my current implementation, all the edges of the magenta triangle are on a ring path, so they should be blue -- which effectively makes this a counterexample. Now maybe I got it wrong somehow... But in any case the two edges that are nearest to the start node obviously cannot be red; and if the third one is labeled red, then it seems that the solution does not really fit the idea anymore. Btw, [here is the data used](https://www.dropbox.com/s/7z4wiqhtmw5kd1r/edgedata.txt). Each row represents one edge, and the columns are to be interpreted as follows: 1. Index of first node 2. Index of second node 3. x coordinate of first node 4. y coordinate of first node 5. x coordinate of second node 6. y coordinate of second node The start node is the one having index 1. --- I guess that next I should try [the method suggested by Rafał Dowgird](https://stackoverflow.com/questions/4096005/algorithm-for-labeling-edges-of-a-triangular-mesh/4099045#4099045)... But perhaps I ought to do something completely different for a while :)
Algorithm for labeling edges of a triangular mesh
CC BY-SA 3.0
0
2010-11-04T11:07:38.387
2019-03-03T20:39:31.400
2020-06-20T09:12:55.060
-1
19,254
[ "algorithm", "mesh", "edge-detection", "triangular", "labeling" ]
4,096,166
1
4,127,126
null
0
189
![alt text](https://i.stack.imgur.com/TyJYx.png)
How to make the following type of listview in which every row is different
CC BY-SA 2.5
0
2010-11-04T11:28:41.777
2010-11-08T19:12:30.813
null
null
478,535
[ "android", "listview" ]
4,096,335
1
4,096,478
null
2
2,742
how can I start a function after the open* button is pressed? ``` <form id="xxx"> <input id="yyy" type="file" /> </form> ``` ``` $(function(){ $('body').append('jq works <br />'); $("#xxx").submit(function () { $('body').append('start function<br />'); }); }); ``` jsfiddle [http://jsfiddle.net/vGBaK/](http://jsfiddle.net/vGBaK/) edit: I mean this button -> ![alt text](https://i.stack.imgur.com/EuKi1.png)
Jquery - Start a function after open button (from input="file") is pressed
CC BY-SA 4.0
null
2010-11-04T11:51:01.097
2021-02-16T12:53:30.567
2021-02-16T12:53:30.567
1,000,551
2,136,202
[ "jquery", "file-upload", "input" ]
4,096,435
1
null
null
3
1,329
I have tried this in all browsers and works in all - except IE. Here's is the scenario: in Host A Page 1 we will redirect you to host B when you click a link: ``` <%@Page Language="C#"%> <script runat=server> override protected void OnLoad(EventArgs e) { if (Request.QueryString["l"] != null) Response.Redirect(Request.QueryString["l"]); } </script> <a href="tk.aspx?l=http://HOSTB/landingpage.aspx">redirect to a different domain</a> </code> </pre> ``` In Host B landingpage.aspx, when you arrive without a cookie, we set a cookie and redirect you to the url : ``` <%@Page Language="C#"%> <script runat=server> override protected void OnLoad(EventArgs e) { if (Request.Cookies["PHPSESSID"] == null) { Response.Cookies.Add(new HttpCookie("PHPSESSID", "set")); Response.Redirect("/landingpage.aspx"); } } </script> <h1>you made it to <% = Request.Url.Host%></h1> ``` In all browsers I've tried, you arrive at HOSTB/landingpage.aspx. However, in IE, you arrive at HOSTA/landingpage.aspx. I know what's happening and it's that the relative redirect upon landing on HOSTB is interpreted as relative to the original url's path and normally I would just change the relative url to an absolute one, but here's the rub: so I can't do that. For added clarity, here's the entire conversation as seen by fiddler along with the troublesome redirect highlighted using one machine by both IP and Name to substitute for the two domains. You can see that I arrived at 10.0.20.10/landingpage.aspx, but upon that relative redirect, I actually went back to the prior domain XPS730. ![](https://imgur.com/H5AhZ.png)
Internet Explorer not following relative redirect URLs across domains
CC BY-SA 2.5
0
2010-11-04T12:03:54.617
2011-05-03T09:42:11.000
null
null
150,445
[ "internet-explorer", "http", "redirect" ]
4,096,702
1
4,099,825
null
4
5,038
I'm trying to implement the Window Width and level formula from de Dicom specification in my application. Only it's not returning any grayscales at the moment. The dicom specifies the formula as following: ``` if (x <= c - 0.5 - (w-1)/2), then y = ymin else if (x > c - 0.5 + (w-1)/2), then y = ymax, else y = ((x - (c - 0.5)) / (w-1) + 0.5) * (ymax - ymin)+ ymin ``` So i've translated this into the following c# syntax: ``` if (pixelData[i] <= wLevel - 0.5 - (wWidth - 1) / 2) oColor = 0; else if (pixelData[i] > wLevel - 0.5 + (wWidth - 1) / 2) oColor = 255; else oColor = (int)((pixelData[i] - (wLevel - 0.5)) / (wWidth - 1) + 0.5) * (255 - 0) + 0; ``` Howevery, the last part of the formula ``` oColor = (int)((pixelData[i] - (wLevel - 0.5)) / (wWidth - 1) + 0.5) * (255 - 0) + 0; ``` Only seems to return 0 ![Example](https://i.stack.imgur.com/V7YdV.png) Anyone sees how this is possible?
Dicom Window width & level formula not giving greyvalues
CC BY-SA 2.5
0
2010-11-04T12:38:43.613
2014-08-25T12:38:53.217
2010-11-04T12:46:11.037
241,513
241,513
[ "c#", "image", "dicom" ]
4,096,973
1
4,097,609
null
7
5,712
If you right-click on a file in Windows and select , you can manage some properties in de tab, such as Title, Subject and Author, like in this example: ![alt text](https://i.stack.imgur.com/c2FOj.png) I'm trying to find a way to read these properties using . Is there a library for this? Is this even possible? Thanks in advance! Peter
Reading Windows file summary properties (title, subject, author) in Java
CC BY-SA 2.5
0
2010-11-04T13:09:12.740
2010-11-04T14:32:39.427
null
null
430,482
[ "java", "windows", "file", "summary", "author" ]
4,097,242
1
4,097,296
null
5
5,160
I created a simple java function to truncate a string to be displayed in my list view. I am displaying a news title and below this a news summary. I would like to have the same behavior as the image below. Currently, i am truncating the news title with 45 chars and then appending "..." at the end of it. However, when I change the orientation to landscape, the title could appear without being truncated. I dont think the app below truncates the news title, but it keeps the title in a single line and automatically "truncates". ![alt text](https://i.stack.imgur.com/E6OCr.jpg) How can I achieve this behavior in my app?
How to "truncate" a text inside textview in android according to the orientation?
CC BY-SA 2.5
null
2010-11-04T13:44:13.267
2010-11-04T13:49:52.693
null
null
491,604
[ "android", "android-sdk-2.1" ]
4,097,593
1
4,097,758
null
27
28,763
i am using automation (i.e. COM automation) to display some HTML in Internet Explorer (9): ``` ie = CoInternetExplorer.Create; ie.Navigate2("about:blank"); webDocument = ie.Document; webDocument.Write(szSourceHTML); webDocument.Close(); ie.Visible = True; ``` Internet Explorer appears, showing my html, which starts off as: ``` <!DOCTYPE html> <HTML> <HEAD> ... ``` > the html5 standards-mode opt-in doctype `html` Except that the document is not in ie9 standards mode; it's in ie8 standards mode: ![alt text](https://i.stack.imgur.com/gEC5G.png) --- If i save the html to my computer first: ![alt text](https://i.stack.imgur.com/HgyEZ.png) and then view html document, IE is put into standards mode: ![alt text](https://i.stack.imgur.com/Yq2mO.png) My question is how update my `SpawnIEWithSource(String html)` function to throw the browser into standards mode? ``` void SpawnIEWithSource(String html) { Variant ie = CoInternetExplorer.Create(); ie.Navigate2("about:blank"); webDocument = ie.Document; webDocument.Write(html); webDocument.Close(); ie.Visible = true; } ``` --- Edit: A more verbose, less understandable or readable code sample, that doesn't help further the question might be: ``` IWebBrowser2 ie; CoCreateInstance(CLASS_InternetExplorer, null, CLSCTX_INPROC_SERVER | CLSCTX_LOCAL_SERVER, IID_WebBrowser2, ie); ie.AddRef(); ie.Navigate2("about:blank"); IHtmlDocument doc; dispDoc = ie.Document; dispDoc.AddRef(); dispDoc.QueryInterface(IHTMLDocument2, doc); dispDoc.Release() doc.Write(html); doc.Close(); doc.Release(); ie.Visible = true; ie.Release(); ``` --- ## Update Commenter asked on the ieblog entry [Testing sites with Browser Mode vs. Doc Mode](https://learn.microsoft.com/en-us/archive/blogs/ie/): > Can we get a description of how the document mode is determined when the HTML content is within an embedded webcontrol? Seems to be that the document mode is choosen differently - maybe for compatibility reasons? MarkSil [MSFT] responded: > @Thomas: Thanks for raising that question. The WebBrowser Control determines the doc mode the same way that IE does because it contains the same web platform (e.g. there is one shared mshtml.dll across IE and WebBrowser Control hosts). The WebBrowser Control does default to the Compatibility View browser mode, which means that the default doc mode is IE7. Here is a blog post with more detail on this: [blogs.msdn.com/.../more-ie8-extensibility-improvements.aspx](https://learn.microsoft.com/en-us/archive/blogs/ie/more-ie8-extensibility-improvements). To which Thomas responded: > @MarcSil (re: WebBrowser Control)The problem with using registry entries to select document mode for WebControl is that it applies to the application as a whole. I write plugins for Google SketchUp where you have WebDialog windows to create UIs - it's just a WebBrowser control in a window. But that leads to problems as I want to force a document mode for my instance of the WebBrowser control, not for all of SU's WebBrowser controls as a whole.So, my question is: how do you control the document mode per instance for a WebBrowser control?
How to put the WebBrowser control into IE9 into standards?
CC BY-SA 4.0
0
2010-11-04T14:23:27.743
2021-11-06T06:46:21.223
2021-11-06T06:46:21.223
4,751,173
12,597
[ "com", "html", "automation", "standards", "internet-explorer-9" ]
4,098,067
1
4,099,672
null
0
462
Initially asked in SuperUser: [https://superuser.com/questions/206822/specifying-worksheet-name-required-when-identifying-a-cell-by-name-in-excel-2007](https://superuser.com/questions/206822/specifying-worksheet-name-required-when-identifying-a-cell-by-name-in-excel-2007). I don't know if this is a change in the version, but in 2003 this used to work in Access VBA: ``` Dim xlSheet As Excel.Worksheet xlSheet.Range("RangeName").Value = 100 ``` Previously I did not need to identify the worksheet because "RangeName" was unique. Is Excel 2007 not considering this a unique value and requires that the worksheet be specified? [EDIT] Here is the error in Access 2007 VBA: > "Error 1004 (Method 'Range' of object '_Worksheet' failed." Trying to avoid naming the worksheet. I used the Name Manager in Excel. The name is unique and the scope is workbook. ![alt text](https://i.stack.imgur.com/9XDNJ.jpg) When I tried to Edit Name, it does not allow the scope to be changed. ![alt text](https://i.stack.imgur.com/PWSOI.jpg) Note: This workbook is Template that allows macros and the names are a mess.
Specifying worksheet name required when identifying a cell by name in Excel 2007
CC BY-SA 3.0
null
2010-11-04T15:09:30.797
2016-03-10T20:39:20.010
2017-03-20T10:18:27.643
-1
61,339
[ "vba", "excel-2007", "ms-access" ]
4,098,934
1
4,098,954
null
0
1,949
I've googled around, but i can find a way to build json with jQuery and send it to php using a for loop. I have a html table, and i want to take values from each row (i dont know how many rows/values there will be) construct a json string, ie. `[{"row": 1, "supp_short_code" : blah blah....}, {"row": 2, ....} ....]` but i dont know how to keep adding to the json datastring each time jQuery finds more values if that makes sense?? EDIT: So if i have this ``` $('#submit').live('click',function(){ var supp_short_code=$('.supp_short_code').text(); var project_ref=$('.project_ref').text(); var om_part_no=$('.om_part_no').text(); var description=$('.description').text(); var cost_of_items=$('.cost_of_items').text(); var cost_total=$('.cost_total').text(); var dataString = 'string=//' + supp_short_code + '//' + project_ref + '//' + om_part_no + '//' + description + '//' + cost_of_items + '//' + cost_total $.ajax ({ type: "POST", url: "order.php", data: dataString, cache: false, success: function() { alert("Order Submitted"); } }); }); ``` So what (roughly) would i need to change in this code? ![Screenshot](https://i.stack.imgur.com/X9u0r.png) Ok, so as you can see by the screenshot, i'm using jquery to dynamically add the bottom table when a user click a row from the top table, its calculating totals and they can specify which supplier they want to use. I'm then using jquery to grab these values into the $('submit') bit of jquery code at the top. I then want to send these values to a php page that will somehow parse the received data at insert it into a mysql db, as something like "id 1 product blah price blah supplier blah total cost £x, id 2 product blah2 price blah2 supplier blah total cost £x" so some fields, ie the total cost and supplier will be the same, but the php might be receiving 3 different products for the same order if that makes sense? Thanks!
Build json to send to php using a for loop (maybe)
CC BY-SA 2.5
0
2010-11-04T16:35:19.780
2010-11-05T13:41:06.473
2010-11-04T16:59:47.073
478,144
478,144
[ "php", "jquery", "json", "for-loop" ]
4,099,156
1
4,099,287
null
1
1,190
The following data is created by joining two sql tables together: ![My data](https://i.stack.imgur.com/SjP95.png) I would like to group together distinct rows of DateStamp/UserName/StudentName/InstructorName/TableName/PrimaryKey (I'll call this 'group records') and then group under these ColumnName/PreviousValue/NewValue (I'll call this 'subgroup records') The end result would be that I could iterate through the 'group records' - there would be 5. In each 'group record', I could then iterate through the 'subgroup records'. The 5 groups would contain 3, 2, 5, 2 and 1 subgroup records respectively. What would be the syntax to create a query to do this? Ideally this would be in a vb.net linq syntax.
How can I group distinct columns in a linq query?
CC BY-SA 2.5
0
2010-11-04T16:59:12.183
2011-02-20T20:04:40.700
null
null
104,189
[ "vb.net", "linq-to-sql" ]
4,099,641
1
4,099,873
null
3
1,373
I'm new to multithreading and I'm working on parallelizing an area in my application. I've read a number of posts on this site but I'm still confused as to the best way to approach my problem: [1] In .NET 3.5, is `ThreadPool` the only way for a program to exploit the multi-cores in the machine ? i.e. Is it possible to spawn threads on different cores using `new Thread()` ? [2] My case: I have `List<Calculation>`that contains around 80 items, currently processed sequentially. So given that I'm using .NET 3.5 and based on what I've read, `ThreadPool` is probably my best bet for multithreading due to the high number of threads, however: - This is how the dependency of the work items looks like (details not important, just wanted to make a point on the complexity of the dependencies): ![alt text](https://i.stack.imgur.com/W3xej.png) - How do I prioritize the main `Calculations` that have something like 10+ other work items depending on it ? What is the most efficient way of signaling to use ? Thank you. Edit: I should mention that `List<Calculation>` remains fixed. However, computing the 80+ calculations is called x million times. Every time an iterator is updated, Calculate() is invoked on every `Calculation` in the list.
Basic multi-threading questions in C#
CC BY-SA 2.5
0
2010-11-04T17:53:59.517
2010-11-04T18:20:40.607
2010-11-04T18:11:06.797
1,700,998
1,700,998
[ "c#", "multithreading", "threadpool", "worker-thread" ]
4,099,958
1
null
null
2
810
Is there some property or method to set the vertical scroll position of a `DataGridView` the bottom row? What I mean is, say I have a `DataGridView` with enough rows to fill its client area. Then (by default, at least) I cannot scroll down past this point: ![DataGridView scrolled to bottom row](https://i.stack.imgur.com/EzcLx.png) I want to be able to the control to continue scrolling, so that I can display some gray area below the bottom row. What I'm after would hypothetically look like this: ![DataGridView scrolled beyond bottom row](https://i.stack.imgur.com/2PLGR.png) Any ideas?
Scrolling PAST the bottom row of a DataGridView
CC BY-SA 2.5
0
2010-11-04T18:30:30.657
2011-07-04T14:46:30.453
null
null
105,570
[ ".net", "winforms", "datagridview", "scroll" ]
4,100,268
1
null
null
0
1,001
Table columns have weird characters I have this script to generate a table. p.s. This is an ETL table for incoming data - I know about the bad structure, but cannot change it. ![alt text](https://i.stack.imgur.com/S6IjB.jpg) In Toad, the table structure looks like this (with the weird characters shown): ![alt text](https://i.stack.imgur.com/CjkeI.jpg) And when I click on the data tab, I get the following error: ![alt text](https://i.stack.imgur.com/DR38o.jpg) Why are all these weird characters showing up?
Toad Table Structure Issues
CC BY-SA 2.5
null
2010-11-04T19:05:00.587
2010-11-04T22:21:13.960
null
null
109,035
[ "oracle", "plsql", "toad" ]
4,100,272
1
4,103,380
null
11
25,982
I have this ImageView block inside a Relative layout: ``` <ImageView android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentBottom="true" android:layout_marginBottom="50dip" android:layout_marginLeft="81dip" android:src="@drawable/swipehelp" /> ``` This draws the image right where it would be expected in both normal and high density resolution screens on Android 1.6 however on 2.2 it seems to ignore the layout_marginBottom and always draw the image aligned all the way at the bottom. Has anyone seen this before, and if so do you know a fix? ## Edit 1: It sits inside a RelativeLayout declared thusly: ``` <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/excusescreen" android:layout_width="wrap_content" android:layout_height="wrap_content" android:background="@drawable/woodbg"> ``` ## Edit 2: Here's the full layout code: ``` <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/excusescreen" android:layout_width="wrap_content" android:layout_height="wrap_content" android:background="@drawable/woodbg"> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/imlateTopBar" android:layout_width="fill_parent" android:layout_height="44dip" android:background="@drawable/topandbottombars" android:layout_alignParentTop="true" > <ImageView android:id="@+id/excHomeBtn" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginLeft="5dip" android:layout_marginTop="7dip" android:src="@drawable/catexcusehomebtn" > </ImageView> <ImageView android:id="@+id/excBackToCatsBtn" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginLeft="10dip" android:layout_marginTop="7dip" android:src="@drawable/backtocats" > </ImageView> </LinearLayout> <ViewFlipper android:id="@+id/excuses" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_marginTop="50dip" > </ViewFlipper> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/imlateTopBar" android:layout_width="fill_parent" android:layout_height="44dip" android:background="@drawable/topandbottombars" android:layout_alignParentBottom="true" > <ImageView android:id="@+id/emailItBtn" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginLeft="5dip" android:layout_marginTop="7dip" android:src="@drawable/emailit" > </ImageView> <TextView android:id="@+id/numExcusesText" android:layout_width="100dip" android:layout_height="30dip" android:layout_marginLeft="5dip" android:layout_marginTop="7dip" android:textColor="#66ffffff" android:gravity="center" android:textSize="18dip" android:textStyle="bold" android:text="1/13" > </TextView> <ImageView android:id="@+id/shareItBtn" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginLeft="5dip" android:layout_marginTop="7dip" android:src="@drawable/shareit" > </ImageView> </LinearLayout> <ImageView android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentBottom="true" android:layout_marginBottom="50dip" android:layout_marginLeft="81dip" android:src="@drawable/swipehelp" /> </RelativeLayout> ``` ## Edit 3 ![alt text](https://i.stack.imgur.com/dBsX8.png)
android: layout_marginBottom doesn't seem to work properly in 2.2 (Froyo)
CC BY-SA 2.5
0
2010-11-04T19:05:14.537
2013-10-25T13:56:04.717
2010-11-05T01:47:50.560
469,219
469,219
[ "android", "layout" ]
4,100,620
1
null
null
7
7,710
I know that query execution plan visualizer [exists](http://www.pinaldave.com/bimg/persisted1.jpg). ![alt text](https://i.stack.imgur.com/Ppd6S.jpg) But never see it for mysql. Do you know one?
Tools for visualizing mysql explain
CC BY-SA 2.5
null
2010-11-04T19:44:54.303
2019-05-30T23:07:24.703
2010-12-08T21:38:11.197
466,826
421,010
[ "sql", "mysql", "sql-execution-plan" ]
4,100,732
1
4,101,010
null
0
63
I have created a View with multiple page displays. I have specified one as the "default tab" and the other two as "tab" and they all display correctly together on a page similar to this: ![alt text](https://i.stack.imgur.com/ourkH.png) I would like to be able to insert another tab onto this page with module generated code (not from a view). Is this possible?
Can I combine Views page tabs with module generated tabs?
CC BY-SA 2.5
null
2010-11-04T19:56:26.120
2010-11-04T20:25:24.877
null
null
97,101
[ "drupal", "drupal-views", "drupal-modules" ]
4,100,924
1
4,101,063
null
1
381
I'm quite confused by this one. I've build a "read more" button using mostly CSS (following [this tutorial](http://www.leemunroe.com/css-button/)). Everything is working well, but the text is showing as white in Firefox but light blue in webkit (safari, chrome). Here's the CSS: ``` .showcase-readmore { float:right; color:#ffffff; font:2em Futura, ‘Century Gothic’, AppleGothic, sans-serif; padding:14px; background:url(images/overlay.png) repeat-x center #0033cc; border:1px solid #0033cc; background-color:rgba(0,51,204,1); -moz-border-radius:10px; -webkit-border-radius:10px; border-radius:10px; border-bottom:1px solid #0033cc; -moz-box-shadow:inset 0 1px 0 rgba(255,255,255,0.5); -webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,0.5); box-shadow:inset 0 1px 0 rgba(255,255,255,0.5); } .showcase-readmore:hover{background-color:rgba(0,51,204,0.6);} .showcase-readmore:active{position:relative;top:2px;} ``` and the HTML: ``` <a class="showcase-readmore" href="services">Read More</a> ``` This is how I see it in FF: ![FF](https://i.stack.imgur.com/EiTjd.png) and Chrome: ![Chrome](https://i.stack.imgur.com/sqYpL.png) with FF being the desired behavior. My only guess is that the transparency is somehow causing the white font to be opaque and blending with the blue background? I'm stumped!
Button Built in CSS showing different font color in FF and Webkit
CC BY-SA 2.5
null
2010-11-04T20:16:40.520
2010-11-04T20:56:00.070
2010-11-04T20:26:14.847
176,603
491,297
[ "css", "firefox", "webkit" ]
4,100,929
1
4,101,493
null
12
11,925
How can I execute a image_tag method in a Rails console 1. Run the console $ rails c 2. Load helpers include ActionView::Helpers 3. Execute the command image_tag('test.png') I got a strange error. ![alt text](https://i.stack.imgur.com/LkLNU.png) Please help!
Rails console - use image_tag method
CC BY-SA 2.5
0
2010-11-04T20:16:53.867
2010-11-05T02:43:01.760
null
null
132,257
[ "ruby-on-rails", "helper", "irb", "actionview", "actionviewhelper" ]
4,100,959
1
4,101,466
null
2
9,023
How can I calculate the arc between two circles? The arc must be tangent to the two points on the circles. Here is a picture illustrating it. I'm trying to code and calculate the orange arc and the blue arc. ![alt text](https://i.stack.imgur.com/8GsDV.png) more details: Your applet should have 2 modes: 2D and 3D. The user should be able to switch between them by pressing the space bar. In the 2D mode, the user can edit the position of four control points A, B, C and D and should see 4 circular arcs defined by these points as follows. The red arc lies on a circle of center A and radius ||AB||. The green arc lies on a circle of center C and radius ||CD||. The orange arc lies on a supporting circle that is tangent to the supporting circle of the red arc at B and also tangent to the green circle at a point E, which your code must compute. This supporting circle should not separate A and C (i.e., A and C must either be both in that circle or out of it). Similarly, the blue arc lies on a circle that does not separate A and C and that is tangent to the supporting circle of the green arc at D and is also tangent to the supporting circle of the red arc at some point F which your program must compute. The red arc runs clockwise from F to B. The orange arc runs from B to E. The green arc runs from E to D. The blue arc runs from D back to F. These four arcs form a smooth boundary of a region S of the plane. Notice that depending on the position of the control points, the orange and blue arcs may each be either concave or convex. In the figure below, the blue arc is concave. (pictured above)
Calculating a tangent arc between two points on two circles
CC BY-SA 2.5
0
2010-11-04T20:19:51.057
2010-11-08T01:37:28.417
2010-11-08T01:37:28.417
null
497,681
[ "computational-geometry", "geometry", "geometric-arc" ]
4,101,040
1
4,118,431
null
0
121
Ok I'm pretty new to Fluent and NHibernate and I'm not sure how to map this specific relationship that exists in my database. I have the following ER diagram below that outlines my table structure. ![ER Diagram](https://dl.dropbox.com/u/11595074/GroupRightDiagram.PNG) Below are my current C# entity classes and Fluent mappings: ``` public class GroupHeader { public virtual Guid Id { get; private set;} public virtual string Name { get; set; } public virtual string Description { get; set; } public virtual IList<RightHeader> AllowedRights { get; set; } public virtual IList<RightHeader> DeniedRights { get; set; } public virtual IList<RightHeader> UnsetRights { get; set; } } public class RightHeader { public virtual decimal Num { get; private set; } public virtual string Name { get; set; } public virtual string Description { get; set; } } public class GroupHeaderMap : ClassMap<GroupHeader> { public GroupHeaderMap() { Table("GROUP_HEADER"); Id(x => x.Id, "GROUP_ID"); Map(x => x.Name, "GROUP_NAME").Unique(); Map(x => x.Description, "GROUP_DESCRIPTION"); HasManyToMany(x => x.AllowedRights) .Table("GROUP_RIGHT_COMPOSITE") .ParentKeyColumn("GROUP_ID") .ChildKeyColumn("RIGHT_NUM") .Where("RIGHT_VALUE = 1") .Cascade.SaveUpdate(); HasManyToMany(x => x.DeniedRights) .Table("GROUP_RIGHT_COMPOSITE") .ParentKeyColumn("GROUP_ID") .ChildKeyColumn("RIGHT_NUM") .Where("RIGHT_VALUE = -1") .Cascade.SaveUpdate(); HasManyToMany(x => x.UnsetRights) .Table("GROUP_RIGHT_COMPOSITE") .ParentKeyColumn("GROUP_ID") .ChildKeyColumn("RIGHT_NUM") .Where("RIGHT_VALUE = 0") .Cascade.SaveUpdate(); } } public class RightHeaderMap : ClassMap<RightHeader> { public RightHeaderMap() { Table("RIGHT_HEADER"); Id(x => x.Num, "RIGHT_NUM"); Map(x => x.Name, "RIGHT_NAME"); Map(x => x.Description, "RIGHT_DESCRIPTION"); } } ``` Currently whenever I create a new GroupHeader and populate the AllowedRights member variable it fails to insert these records because the RIGHT_VALUE column in GROUP_RIGHT_COMPOSITE doesn't allow nulls. I'm not really sure how to map this in fluent or where I should really handle this in my entities. Any help would be appreciated.
Fluent NHibernate Objectified/Associated Relationship Mapping
CC BY-SA 2.5
null
2010-11-04T20:28:41.893
2010-11-07T15:46:55.047
2017-02-08T14:30:49.717
-1
447,341
[ "c#", "fluent-nhibernate" ]
4,101,301
1
4,288,771
null
0
900
I'm doing a wpf project on a windows embedded standard sp3 operating system and I noticed that occasionally controls disappear or parts of it go missing. This can only be reproduced when using the xp embedded machine so it may have something to do with the drivers or operating system. I thought it might have been related to using the aero theme, but the issue still persists even though it was completely removed. In the screenshot below there should be two buttons under the "24" button but they disappeared for some reason. You can see part of the control being partially rendered. I have also seen text boxes cut in half and progress bars not being rendered properly. Has anyone seen this issue? ![alt text](https://i.stack.imgur.com/PADtp.jpg)
Controls Disappearing
CC BY-SA 2.5
null
2010-11-04T20:55:53.763
2010-11-26T21:56:10.643
null
null
314,087
[ "c#", "wpf" ]
4,101,525
1
4,102,279
null
3
603
As some of you make know, I'm [working on XMPP (Jabber) integration for the StackOverflow chat system](https://meta.stackexchange.com/questions/57316/63420#63420), as an XMPP component written in Ruby using [the xmpp4r package](http://home.gna.org/xmpp4r/). I'm struggling with one issue (well, many issues, but :-) I am taking the JSON feed from the chat and extracting the HTML for the messages. I am using [The Ruby TidyHTML bindings](http://tidy.rubyforge.org/) to convert the HTML from the JSON fed to XHTML, so that I can send it as an XMPP message -- since XMPP messages are just XML, converting the HTML to XHTMl should make it valid XML which I can just stick into the `<message>` stanza. For [most messages](http://chat.meta.stackoverflow.com/transcript/message/263510#263510), it works great! ![My Mind Is Blown](https://i.stack.imgur.com/0kfu2.png) However for other messages, it completely chokes -- the XMPP server closes the stream and the script grinds to a halt. (And rchern and others in The Tavern get upset. Well, maybe not , but they laugh at me. This makes me sad!) I am almost certain that what's happing is, for some reason or other, the messages are not valid XML, and so the XMPP server is closing the connection because it encounters a parse error in the XML stream from the Ruby component. Here's an example of one such message: ``` <message to='[email protected]/Token' type='groupchat' xmlns='jabber:client'><body>&lt;div class=&quot;onebox ob-message&quot;&gt;&lt;a class=&quot;roomname&quot; href=&quot;/transcript/message/263372#263372&quot;&gt;&lt;span title=&quot;2010-11-04 19:20:23Z&quot;&gt;1 hour ago&lt;/span&gt;&lt;/a&gt;, by &lt;span class=&quot;user-name&quot;&gt;Fosco&lt;/span&gt; &lt;br/&gt;&lt;div class=&quot;quote&quot;&gt;&lt;div class=&quot;room-mini&quot;&gt;&lt;div class=&quot;room-mini-header&quot;&gt;&lt;h3&gt;&lt;img class=&quot;small-site-logo&quot; title=&quot;Gaming&quot; alt=&quot;Gaming&quot; width=&quot;16&quot; height=&quot;16&quot; src=&quot;http://sstatic.net/gaming/img/favicon.ico&quot; /&gt;&amp;nbsp;&lt;span class=&quot;room-name&quot;&gt;&lt;a href=&quot;http://chat.stackexchange.com/rooms/28/minecraft-talk&quot;&gt;Minecraft Talk&lt;/a&gt;&lt;/span&gt;&lt;/h3&gt;&lt;div class=&quot;room-mini-description&quot;&gt;Everything Minecraft, including classic and survival mode&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;room-current-user-count&quot; title=&quot;current users&quot;&gt;9&lt;/div&gt;&lt;div class=&quot;mspark&quot; style=&quot;height:25px;width:205px&quot;&gt; &lt;div class=&quot;mspbar&quot; style=&quot;width:8px;height:13px;left:0px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;mspbar&quot; style=&quot;width:8px;height:9px;left:8px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;mspbar&quot; style=&quot;width:8px;height:2px;left:16px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;mspbar&quot; style=&quot;width:8px;height:8px;left:24px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;mspbar&quot; style=&quot;width:8px;height:1px;left:32px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;mspbar&quot; style=&quot;width:8px;height:1px;left:56px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;mspbar&quot; style=&quot;width:8px;height:0px;left:64px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;mspbar&quot; style=&quot;width:8px;height:0px;left:88px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;mspbar&quot; style=&quot;width:8px;height:0px;left:96px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;mspbar&quot; style=&quot;width:8px;height:11px;left:104px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;mspbar&quot; style=&quot;width:8px;height:7px;left:112px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;mspbar&quot; style=&quot;width:8px;height:7px;left:120px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;mspbar&quot; style=&quot;width:8px;height:25px;left:128px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;mspbar&quot; style=&quot;width:8px;height:14px;left:136px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;mspbar&quot; style=&quot;width:8px;height:4px;left:144px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;mspbar&quot; style=&quot;width:8px;height:7px;left:152px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;mspbar&quot; style=&quot;width:8px;height:19px;left:160px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;mspbar&quot; style=&quot;width:8px;height:19px;left:168px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;mspbar&quot; style=&quot;width:8px;height:12px;left:176px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;mspbar&quot; style=&quot;width:8px;height:11px;left:184px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;mspbar now&quot; style=&quot;height:25px;left:154px;&quot;&gt;&lt;/div&gt;&lt;/div&gt; &lt;div class=&quot;clear-both&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;</body><html xmlns='http://jabber.org/protocol/xhtml-im'><body xmlns='http://www.w3.org/1999/xhtml'><div class="onebox ob-message"><a class="roomname" href="/transcript/message/263372#263372"><span title="2010-11-04 19:20:23Z">1 hour ago</span></a>, by <span class="user-name">Fosco</span><br /> <div class="quote"> <div class="room-mini"><div class="room-mini-header"> <h3><img class="small-site-logo" title="Gaming" alt="Gaming" width="16" height="16" src="http://sstatic.net/gaming/img/favicon.ico" />&nbsp;<span class="room-name"><a href="http://chat.stackexchange.com/rooms/28/minecraft-talk">Minecraft Talk</a></span></h3> <div class="room-mini-description">Everything Minecraft, including classic and survival mode</div> </div> <div class="room-current-user-count" title="current users">9</div> <div class="mspark" style="height:25px;width:205px"> <div class="mspbar" style="width:8px;height:13px;left:0px;"></div> <div class="mspbar" style="width:8px;height:9px;left:8px;"></div> <div class="mspbar" style="width:8px;height:2px;left:16px;"></div> <div class="mspbar" style="width:8px;height:8px;left:24px;"></div> <div class="mspbar" style="width:8px;height:1px;left:32px;"></div> <div class="mspbar" style="width:8px;height:1px;left:56px;"></div> <div class="mspbar" style="width:8px;height:0px;left:64px;"></div> <div class="mspbar" style="width:8px;height:0px;left:88px;"></div> <div class="mspbar" style="width:8px;height:0px;left:96px;"></div> <div class="mspbar" style="width:8px;height:11px;left:104px;"></div><div class="mspbar" style="width:8px;height:7px;left:112px;"></div><div class="mspbar" style="width:8px;height:7px;left:120px;"></div><div class="mspbar" style="width:8px;height:25px;left:128px;"></div><div class="mspbar" style="width:8px;height:14px;left:136px;"></div> <div class="mspbar" style="width:8px;height:4px;left:144px;"></div> <div class="mspbar" style="width:8px;height:7px;left:152px;"></div> <div class="mspbar" style="width:8px;height:19px;left:160px;"></div> <div class="mspbar" style="width:8px;height:19px;left:168px;"></div><div class="mspbar" style="width:8px;height:12px;left:176px;"></div> <div class="mspbar" style="width:8px;height:11px;left:184px;"></div> <div class="mspbar now" style="height:25px;left:154px;"></div> </div> <div class="clear-both"></div> </div> </div> </div> </body></html></message> ``` (This message happened to be a quote of a oneboxed link to a chat room) Here was the error Ruby gave me: ``` IOError: stream closed /usr/lib/ruby/1.8/xmpp4r/stream.rb:594:in `empty?' /usr/lib/ruby/1.8/rexml/parsers/baseparser.rb:153:in `empty?' /usr/lib/ruby/1.8/rexml/parsers/baseparser.rb:193:in `pull' /usr/lib/ruby/1.8/rexml/parsers/sax2parser.rb:92:in `parse' /usr/lib/ruby/1.8/xmpp4r/streamparser.rb:79:in `parse' /usr/lib/ruby/1.8/xmpp4r/stream.rb:75:in `start' /usr/lib/ruby/1.8/xmpp4r/stream.rb:72:in `initialize' /usr/lib/ruby/1.8/xmpp4r/stream.rb:72:in `new' /usr/lib/ruby/1.8/xmpp4r/stream.rb:72:in `start' /usr/lib/ruby/1.8/xmpp4r/connection.rb:119:in `start' /usr/lib/ruby/1.8/xmpp4r/component.rb:70:in `start' /usr/lib/ruby/1.8/xmpp4r/connection.rb:77:in `connect' /usr/lib/ruby/1.8/xmpp4r/component.rb:47:in `connect' ./classes/SOXMPP_Bridge.rb:20:in `initialize' ./soxmpp.rb:81:in `new' ./soxmpp.rb:81 ``` ### Finally, my question! Given that sending invalid XML to the XMPP server kicks me off, is there any way using Ruby I can validate (and, preferably, ) the XML before sending it to the XMPP server? Most likely, it will be a matter of my writing additional code for each case where Tidy isn't producing valid XML, but I'd at least like to stop the script from crashing. So, how can I validate the XML before sending it to the XMPP server?
Using Ruby, how can I confirm that an XML snippit is valid?
CC BY-SA 2.5
null
2010-11-04T21:21:26.577
2010-11-04T23:17:13.337
2017-03-20T10:29:34.447
-1
75,801
[ "ruby", "xml", "xmpp", "xmpp4r" ]
4,101,906
1
null
null
3
9,876
Hi I'm writing an app for DroidX which is 480x854. I set up my AVD as follows: target:API level 7 skin:480x854 hw.lcd.density:160 That's it. The emulator loads fine and looks great but my app doesn't fill_parent for some reason. See here: ![alt text](https://i.stack.imgur.com/8oHQZ.png) It doesn't scale all the way up and I'm not sure why. Here is my 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"> <ImageView android:src="@drawable/logo_recruiting" android:background="#FF000000" android:adjustViewBounds="true" android:layout_width="fill_parent" android:layout_height="wrap_content" android:padding="30dip" /> <LinearLayout android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_weight="1" android:gravity="center" android:background="@drawable/menu_background"> <Button android:layout_height="wrap_content" android:layout_width="wrap_content" android:layout_marginBottom="25dip" android:text="@string/events" android:textColor="#FFFFFFFF" android:textSize="22dip" android:paddingBottom="5dip" android:background="@drawable/events_button" android:onClick="launchEventsMap" android:id="@+id/events_button" /> <Button android:layout_height="wrap_content" android:layout_width="wrap_content" android:layout_marginBottom="25dip" android:text="@string/jobs" android:textColor="#FFFFFFFF" android:textSize="22dip" android:paddingBottom="5dip" android:background="@drawable/jobs_button" android:id="@+id/jobs_button" /> <Button android:layout_height="wrap_content" android:layout_width="wrap_content" android:layout_marginBottom="25dip" android:text="@string/applicants" android:textColor="#FFFFFFFF" android:textSize="22dip" android:paddingBottom="5dip" android:background="@drawable/applicants_button" android:id="@+id/applicants_button" /> <Button android:layout_height="wrap_content" android:layout_width="wrap_content" android:layout_marginBottom="25dip" android:text="@string/resumes" android:textColor="#FFFFFFFF" android:textSize="22dip" android:paddingBottom="5dip" android:background="@drawable/resumes_button" android:id="@+id/resumes_button" /> <Button android:layout_height="wrap_content" android:layout_width="wrap_content" android:layout_marginBottom="25dip" android:text="@string/settings" android:textColor="#FFFFFFFF" android:textSize="22dip" android:paddingBottom="5dip" android:background="@drawable/settings_button" android:id="@+id/settings_button" /> </LinearLayout> </LinearLayout> ```
Android LinearLayout not stretching full screen
CC BY-SA 2.5
null
2010-11-04T22:14:17.143
2010-12-08T17:49:01.693
null
null
129,705
[ "android", "layout", "screen" ]
4,102,378
1
null
null
0
1,063
I was troubleshooting some vbscript designed to query the default printer of a remote computer when I discovered the error in the script was actually because WMI is returning conflicting or even erroneous information. Please see this screenshot: ![alt text](https://i.stack.imgur.com/X51f3.png) Both are against the same computer (CLIFGRIFFIN-PC). The left one is run from a Windows Server 2003 install. The right one is run on the PC itself. The left one, in addition to having fewer results, also shows that NONE of the printers are default. Which is what is causing the scripting error that led me to investigate this. Any ideas? It's just bizarre. Here is the code I'm using... ``` Set WshShell = CreateObject("WScript.Shell") Set WshNetwork = WScript.CreateObject("WScript.Network") Set oPrinters = WshNetwork.EnumPrinterConnections Dim strComputer strComputer = WshShell.ExpandEnvironmentStrings("%CLIENTNAME%") Set objWMIService = GetObject("winmgmts:" & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2") Set colInstalledPrinters = objWMIService.ExecQuery ("Select * from Win32_Printer Where Default = True") For Each Printer in colInstalledPrinters For i = 0 to OPrinters.Count - 1 Step 2 If InStr(objPrinters.Item(i+1), Printer.Name) > 0 Then WshNetwork.SetDefaultPrinter(objPrinters.Item(i+1)) Exit For End If Next Next ```
Why is WMI returning different results for the same computer?
CC BY-SA 2.5
null
2010-11-04T23:35:57.843
2010-12-30T05:56:49.443
2010-11-15T13:46:46.783
334,457
334,457
[ "wmi", "wmi-query" ]
4,102,386
1
4,102,405
null
6
26,273
I have implemented a simple Android application that I now would like to test on a real device. I have a Nexus One. In the Android Eclipse plugin, I have downloaded and installed the USB driver (revision 3) package. But when I connect my Nexus One to my PC (running Windows 7) using the USB cable, a message box pops up and shows that "No driver found" for "Nexus One". ![Driver Software Installation](https://i.stack.imgur.com/XALqJ.png) I have activated on my device. And when I run `adb devices` on my PC, it just prints `List of devices attached` and no devices are listed. And if I use in Windows, and tries to update the driver for "Nexus One", I can not select a driver in the "driver directory" of . How can I install a driver for Nexus One on Windows 7 so I can use it for USB debugging my Android applications on a real device? ![Android SDK and AVD Manager](https://i.stack.imgur.com/SE4Kq.png) ![Device Manager](https://i.stack.imgur.com/QQOKL.png)
How do I install the USB driver for Nexus One on Windows 7 for debugging purposes?
CC BY-SA 2.5
0
2010-11-04T23:37:55.523
2013-06-24T09:36:59.570
2010-11-05T00:06:34.793
213,269
213,269
[ "android", "debugging", "usb", "driver", "nexus-one" ]
4,102,423
1
36,794,116
null
23
2,607
Floored division is when the result is always floored down (towards −∞), not towards 0: ![division types](https://i.stack.imgur.com/ME0ZR.png) Is it possible to efficiently implement floored or euclidean integer division in C/C++? (the obvious solution is to check the dividend's sign)
Efficiently implementing floored / euclidean integer division
CC BY-SA 2.5
0
2010-11-04T23:43:54.737
2019-02-25T14:51:42.037
2010-11-08T00:09:20.977
21,501
21,501
[ "c++", "c", "math", "division", "integer-division" ]
4,102,986
1
4,112,783
null
0
217
When I access the [satimage.osax scripting addition](http://www.satimage.fr/software/en/downloads/downloads_companion_osaxen.html) (which I'm using for its regex capability) from a Mail rule on Snow Leopard, I get errors, but it runs fine in Script Editor. The code below illustrates the problem. The first line executes fine, but the line inside the `tell` block throws an error (below), from the mail rule version, which I had catching the error. ``` set substr to find text "a" in "abcd" tell application "Mail" set substr to find text "a" in "abcd" end tell ``` ![alt text](https://i.stack.imgur.com/geWwr.png) So I tried a workaround: `tell application "Finder" to ...` from within the Mail Rule script, but that then threw a security error.
Why won't this Scripting Addition run from a Mail rule?
CC BY-SA 2.5
null
2010-11-05T01:49:44.307
2010-11-08T14:28:19.330
2010-11-05T02:12:14.030
105,717
105,717
[ "macos", "osx-snow-leopard", "applescript" ]
4,103,356
1
4,104,594
null
2
3,431
I want to create a color picker in WPF/C# similar to what I see in Photoshop. ![alt text](https://i.stack.imgur.com/TCGRX.jpg) As I move the Hue Slider, the gradient should update. I 1st want to know how can I create the gradient, where should individual color stops appear and what color values should they contain. The above maybe harder to implement as the gradient composes of - - - I can create individual gradients easily but how can I create a "composite" gradient like this? A simpler alternative is have 3 sliders each for HSB values. ![alt text](https://i.stack.imgur.com/QyH7n.jpg) As I move one slider, colors on the 2 other slider should update. Any links or tips to get me started? I need to find a way to calculate colors on 2 other sliders as I move one. Eg. when I move the Hue slider from Red - Blue, Saturation and Brightness should update from say a unsaturated to saturated red to blue and dark to light red to blue.
Creating a "Dynamic" Gradient for HSB Color Picker
CC BY-SA 2.5
0
2010-11-05T03:19:53.377
2021-12-06T06:48:49.537
null
null
292,291
[ "c#", "wpf", "colors" ]
4,103,671
1
4,104,700
null
0
787
I have the following code: ``` @interface PartyListViewController : UITableViewController <UITableViewDelegate, UITableViewDataSource> { UIBarButtonItem * toggle; //ProfileViewController *profileViewController; } @property(nonatomic, retain) IBOutlet UIBarButtonItem *toggle; - (IBAction)toggleAction:(id)sender; // when the toggle button is clicked @end ``` My interface builder looks like this: ![alt text](https://i.stack.imgur.com/6S9ki.png) I have added: ``` self.navigationItem.rightBarButtonItem = self.toggle; ``` ![alt text](https://i.stack.imgur.com/ZAGmr.png) in my viewDidLoad, why doesn't the button show up? If I create my button via code, it is there...
UIBarButtonItem not showing up
CC BY-SA 2.5
0
2010-11-05T04:53:06.953
2010-11-06T03:14:22.487
2010-11-05T14:49:37.127
95,265
95,265
[ "iphone", "objective-c" ]
4,103,683
1
4,103,806
null
10
13,751
I am getting the following error trying to load a basic project template: `Error 12 Could not load the assembly file://\\psf\home\documents\visual studio 2010\Projects\WindowsPhonePivotApplication1\WindowsPhonePivotApplication1\obj\Debug\WindowsPhonePivotApplication1.dll. This assembly may have been downloaded from the Web. If an assembly has been downloaded from the Web, it is flagged by Windows as being a Web file, even if it resides on the local computer. This may prevent it from being used in your project. You can change this designation by changing the file properties. Only unblock assemblies that you trust. See http://go.microsoft.com/fwlink/?LinkId=179545 for more information. WindowsPhonePivotApplication1` I don't have the Security tab when I try and modify the DLL to unblock the assembly. Any advice? ![alt text](https://i.stack.imgur.com/9vESd.png)
Problem Unblocking Assemblies in Windows 7 Home Premium
CC BY-SA 2.5
0
2010-11-05T04:56:21.403
2013-12-18T12:28:41.493
2020-06-20T09:12:55.060
-1
19,875
[ "visual-studio-2010", "windows-7", "windows-phone-7" ]
4,103,705
1
4,104,488
null
3
212
So, I just wanted to understand why this was happening in my WPF app as it seems to be adding a "space" or faint line without me wanting it... I have the following XAML ``` <Window xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" x:Class="WpfApplication3.MainWindow" x:Name="Window" Title="MainWindow" Width="640" Height="480"> <Grid> <Grid.RowDefinitions> <RowDefinition Height="*"/> <RowDefinition Height="Auto"/> </Grid.RowDefinitions> <Grid x:Name="LayoutRoot" ShowGridLines="False" Grid.Row="0"> <Grid.RowDefinitions> <RowDefinition Height="Auto"/> <RowDefinition Height="*"/> <RowDefinition Height="Auto"/> </Grid.RowDefinitions> <Border Grid.Row="0" CornerRadius="10,10,0,0" Height="10" Background="Black"/> <Border Grid.Row="1" Background="Black"> </Border> <Border Grid.Row="2" CornerRadius="0,0,10,10" Height="10" Background="Black"/> </Grid> <StackPanel Grid.Row="1"> <Button>Some Button</Button> </StackPanel> </Grid> ``` Which renders the following window... ![Window Pic](https://i.stack.imgur.com/d3Ziq.png) The problem is if you look closely at the last row connector you will see a faint gray line... ![Faint Gray Line Pic](https://i.stack.imgur.com/AQ3WA.png) If however I replace the `<RowDefinition Height="*"/>` on the inner grid with a fix pixel size (i.e. `<RowDefinition Height="300"/>`) the line goes away. Why exactly when I am using the * value does it seem to be adding this "grey line" / "space"?
Spacing Question on the * operator for XAML with Grids
CC BY-SA 2.5
0
2010-11-05T05:02:42.933
2010-11-05T08:52:48.663
null
null
215,546
[ "wpf", "xaml" ]
4,103,775
1
4,384,665
null
1
1,180
I thought I'd give Helios a try, so I grabbed the latest Java EE install from [http://www.eclipse.org/downloads/packages/eclipse-ide-java-ee-developers/heliosr](http://www.eclipse.org/downloads/packages/eclipse-ide-java-ee-developers/heliosr). Note, both OSX 32bit and 64bit exhibit the same symptoms. So from a fresh install I run Helios (it launches fine), then the problem comes when I try running an upgrade. I keep getting these two errors errors: 1. Artifact not found: http://download.eclipse.org/releases/helios/compositeContent.jar. http://download.eclipse.org/releases/helios/compositeContent.jar 2. No repository found at http://download.eclipse.org/releases/helios. These are my (default) update sites: 1. Helios http://download.eclipse.org/releases/helios Enabled 2. Mylyn for Eclipse Helios http://download.eclipse.org/tools/mylyn/update/helios Enabled 3. The Eclipse Project Updates http://download.eclipse.org/eclipse/updates/3.6 Enabled 4. The Eclipse Web Tools Platform (WTP) software repository http://download.eclipse.org/webtools/repository/helios Enabled 5. http://download.eclipse.org/tools/mylyn/update/e3.4 Disabled http://download.eclipse.org/tools/mylyn/update/extras Disabled Note, I'm not behind any firewalls/proxies etc, no nothing weird with network connectivity. I've searched all over the place and there are others with the same problem, with no solution that I could find. Has anyone else run into these issues? : Notes: 1. I'm not behind a proxy. 2. I've tried the Java EE, but also bare bones Eclipse 3.6.1. 3. I've tried different mirrors (including the main site), 4. I've tried SpingSource's version. 5. I've tried exporting the update sites to XML, deleting them and reimporting them. 6. I even tried adding forward slashes to the ends of site names. 7. I've made sure I have full write permissions for the eclipse folder, and have even placed it on my desktop. I mention all of these seemingly odd behaviours because these are suggestions I've read around the web on this problem, which many people are having. Once last interesting point I've just tried, is to download the "[http://download.eclipse.org/releases/helios/compositeContent.jar](http://download.eclipse.org/releases/helios/compositeContent.jar)" directly in the browser. It redirects to "[http://www.gtlib.gatech.edu/pub/eclipse/releases/helios/compositeContent.jar](http://www.gtlib.gatech.edu/pub/eclipse/releases/helios/compositeContent.jar)" with a 403 forbidden. :\ Just as I was writing this, I tried one last idea. I discovered "Pulse" by Genuitec, which is a Eclipse install manager. I gave it a shot, and it worked. The site it uses for updates is: "[url=[http://eclipse.poweredbypulse.com/downloads/aux/eclipse-mirror/releases/helios]](http://eclipse.poweredbypulse.com/downloads/aux/eclipse-mirror/releases/helios]) [http://eclipse.poweredbypulse.com/downloads/aux/eclipse-mirr](http://eclipse.poweredbypulse.com/downloads/aux/eclipse-mirr) or/releases/helios[/url]" So, I've wasted enough time on this now. I'd create a bug in Eclipse Bugzilla, but there are already entries with no solution. : Ok, from a fresh install, if I disable: [http://download.eclipse.org/releases/helios/](http://download.eclipse.org/releases/helios/) and add Pulse's update site: [http://eclipse.poweredbypulse.com/downloads/aux/eclipse-mirror/releases/helios/](http://eclipse.poweredbypulse.com/downloads/aux/eclipse-mirror/releases/helios/) I don't get any errors. I really think it's to do with the automatic mirrored update site. Is this possible? Here is a screenshot of my update sites now: ![alt text](https://i.stack.imgur.com/uf2Pr.jpg) Regards, Shane
Show-stopper Eclipse Helios install problems under OSX (10.6) 64bit
CC BY-SA 3.0
null
2010-11-05T05:26:00.917
2013-08-11T10:28:02.913
2013-08-11T10:28:02.913
472,792
123,592
[ "eclipse", "macos", "installation", "eclipse-3.6" ]
4,104,016
1
20,792,020
null
49
16,921
I know W3C just publish their draft version of Web Notification to notify user. So, there is no browser that implement this method in their current or latest build browser. [Web Notifications Overview](https://web.archive.org/web/20120611184909/http://dev.w3.org:80/2006/webapi/WebNotifications/publish/) After I search a lot of webs for finding all possible desktop notification in most browser.I found any 2 major browser that should support this. 1. [](https://i.stack.imgur.com/fN47S.png) [google.com](http://code.google.com/chrome/extensions/images/notification-windows.png) [](https://i.stack.imgur.com/UN8I6.png) [google.com](http://code.google.com/chrome/extensions/images/notification-mac.png) [](https://i.stack.imgur.com/6LzcG.png) [google.com](http://code.google.com/chrome/extensions/images/notification-linux.png) We can use native Desktop notification function to show message like the following picture. More infomation: [The Chromium Projects - Desktop Notifications](https://dev.chromium.org/developers/design-documents/desktop-notifications) 2. For IE 5.5+, we can use createPopup function to notify use like in Google Chrome but it's much flexible more that Google Chrome. ![Create Popup](https://i1142.photobucket.com/albums/n617/Soul_MasterX/ie-createpopup.png) More information: [CreatePopup Method on MSDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference) Moreover, if we pin website to Windows 7 taskbar, we can use overlay icon to notify user too. [](https://i.stack.imgur.com/TIjkW.jpg) [microsoft.com](http://i.msdn.microsoft.com/dynimg/IC432198.jpg) More information: [IE9, Site Specific Browsers, and adding your own Jump List Items to Pinned Tabs](https://www.hanselman.com/blog/IE9SiteSpecificBrowsersAndAddingYourOwnJumpListItemsToPinnedTabs.aspx) I think we can use Pines Notify jQuery plugin to create in-browser notification. ![Pines Notify](https://i1142.photobucket.com/albums/n617/Soul_MasterX/Pine_Notification.png) Or do you have any desktop notification library or idea for suggesting me? PS. If it does not have fine library, I will create it with myself. Since IE8, it does not allow us to display popup outside current browser. For example, when IE is minimized, all popups are not displayed. So, Google Chrome is only one browser that has fully web notification API (FF 4 also has non-documented web notification API but it not work for now).
Are there any JavaScript library for cross browser desktop notification?
CC BY-SA 4.0
0
2010-11-05T06:48:09.847
2020-11-03T01:40:01.280
2019-08-07T11:29:31.977
4,751,173
null
[ "cross-browser", "notifications", "javascript" ]
4,104,189
1
4,112,974
null
10
3,322
How do I make Dired display its files using an arbitrary function or set of columns? Basically I want to change from: ``` -rw-r--r-- 1 konrad konrad 3847863 Out 18 14:17 ClojureinAction.pdf -rw-rw-r-- 1 tamara tamara 27338341 Out 20 07:16 Halliday, Resnick, Walker - Fundamentals of Physics.pdf -rw-r--r-- 1 konrad konrad 3921024 Set 22 11:11 Pragmatic.Programming.Clojure.May.2009.pdf ``` To something like ``` 644 1-5MB ClojureinAction.pdf PDF (5 days ago, 400pgs) 664 10-100MB Halliday, Resnic...pdf PDF (3 days ago, 1000pgs, Tamara's) 644 1-5MB Pragmatic.Progra...pdf PDF (1 min ago, 100 pages) ``` Thanks! --- Thanks for the answer, Gareth, but could you be more verbose, please? Apparently the hook will just allow me to run arbitrary code when the buffer loads up. Dired won't even stop loading up the buffer :( ``` (defun foo (&rest args) (unlocking-buffer (message "foo") (insert "foo\n"))) ``` ![](https://i.stack.imgur.com/v4lO9.png) Glancing at dired's source code, it seems that it gets information from these very formats I'm trying to replace, so I wonder if it's viable to change it this way, or if I'll end up having to rewrite everything.
How to customize dired's display
CC BY-SA 2.5
0
2010-11-05T07:41:30.997
2014-01-28T19:27:38.263
2010-11-06T08:40:50.230
1,130,121
1,130,121
[ "emacs", "dired" ]
4,104,228
1
4,104,369
null
29
69,263
I wish to change the target CPU settings from "Any CPU" to "x86" in Visual Studio 2010. I read on another website that I need to do the following: 1. Go to the startup project of your program. 2. Open the properties window. 3. Click the compile tab. 4. Click advanced compile options. 5. Change the target CPU options to x86. But I don't see the "compile" tab anywhere in the properties. Please help me at the earliest. , ![Platform contains nothing apart from "Any CPU"](https://i.stack.imgur.com/hoD5T.png).
Change target CPU settings in Visual Studio 2010 Express
CC BY-SA 3.0
0
2010-11-05T07:52:09.200
2015-09-17T11:47:53.897
2012-06-23T17:46:02.887
63,550
235,055
[ "visual-studio", "visual-studio-2010", "x86", "anycpu" ]
4,104,259
1
4,104,693
null
1
288
![alt text](https://i.stack.imgur.com/KCu5S.png) I found in my ipod touch and in iphone simulator, the button "return" only respond when touch area inside red rectangle, other places not respond What's the problem?
touch action of UIActionSheet not works fine
CC BY-SA 2.5
0
2010-11-05T07:59:54.337
2010-11-13T11:09:41.273
null
null
216,811
[ "iphone", "uiactionsheet" ]
4,104,356
1
4,104,505
null
1
59
I have the procedure block: ``` begin for i in (select grantee ,table_name ,privilege from user_tab_privs_made where grantee='TEST') loop revoke i.privilege on i.table_name from i.grantee; end loop; end; ``` and the error occurs: ![alt text](https://i.stack.imgur.com/cvo1W.png)
procedure issue(error in syntax)
CC BY-SA 2.5
null
2010-11-05T08:22:05.213
2010-11-05T08:57:30.133
2020-06-20T09:12:55.060
-1
445,540
[ "oracle" ]
4,104,598
1
null
null
0
1,557
How can i include a URL in my tooltip in Google Map? Thanks Here is an image of what exactly i require: ![alt text](https://i.stack.imgur.com/Uewy9.jpg)
Android: How to override Tooltip in Google Map to include URL
CC BY-SA 2.5
null
2010-11-05T09:14:55.503
2010-11-11T10:11:03.577
2010-11-11T10:11:03.577
2,355,649
2,355,649
[ "android" ]
4,104,774
1
4,104,808
null
1
1,490
![alt text](https://i.stack.imgur.com/99Vjs.jpg) From the above image you can see that an error occurs when the function [setAttribute](http://xerces.apache.org/xerces-c/apiDocs-3/classDOMElement.html#1a607d8c619c4aa4a59bc1a7bc5d4692) returns from its call. Does anyone know how to resolve this error shown in the picture? I know that it is an error between calling conventions, but how do I find out what the calling convention for setAttribute is?
The value of ESP was not saved properly
CC BY-SA 2.5
null
2010-11-05T09:40:32.233
2015-01-17T22:44:02.467
null
null
174,614
[ "c++", "calling-convention" ]
4,105,008
1
4,108,174
null
1
179
I'm querying a Lucene index file which structure I didn't build. This index contains Documents with fields structured like this: ![alt text](https://i.stack.imgur.com/1jXgH.png) As you can see the 'type' field is always empty, however the 'all' field contains data formatted in a way so that is searchable and it contains a `type=ta` sort of syntax. The weird thing is that when I query this index using `type:ta` it actually outputs something even though the type field is always empty. What's happening here? After googling a bit more I found out a weird concept (at least for me, coming from SQL database background) that data can be stored (Store.YES and Store.NO) in different ways . [Lucene indexing: Store and indexing modes explained](https://stackoverflow.com/questions/650643/lucene-indexing-store-and-indexing-modes-explained) This is a very unusual concept for me as I don't find many reasons to NOT store data. What's the reason behind using Store.NO? I will most likely always want to have the data there even though I'm not displaying it anywhere... I mean if data is indexed it must be stored anyhow, right?
Lucene query returns things I'm not expecting
CC BY-SA 2.5
null
2010-11-05T10:19:48.657
2010-11-05T16:59:31.073
2017-05-23T12:30:36.930
-1
50,394
[ "java", "indexing", "lucene" ]
4,105,140
1
4,105,170
null
1
97
I have the following [http://jsbin.com/ojeja4/2/edit](http://jsbin.com/ojeja4/2/edit) The button and the expiration date working correct in windows, in but in OS X in (and maybe others) I find out that the button and the expiration date isn't correct. Below I have print screens: ![alt text](https://i.stack.imgur.com/mZ8yb.png) ![alt text](https://i.stack.imgur.com/GJl1C.png) ![alt text](https://i.stack.imgur.com/ywU4g.png) I really can't understand what is the problem. I tried use position instead of margin and padding but the result still the same. I found a jquery script and I [used it](http://jsbin.com/ojeja4/edit), which recognize the os and browser, but I don't see the reason for a css problem to use a jquery script. Is it a common problem between windows and os x or I did a mistake in code that I can't understand? Thanks
windows and macintosh show differently a page
CC BY-SA 2.5
null
2010-11-05T10:43:44.187
2010-11-05T10:48:06.237
null
null
407,382
[ "html", "css", "windows", "macos" ]
4,105,304
1
null
null
0
393
I am using the [jetpack](http://www.silverlight.net/content/samples/sl4/themes/jetpack.html) theme in my silverlight project. Everything is picking up the styles except I do not get the subtle text shadow effect that is visible on all the controls on the jetpack demo page. Here is a screenshot - my project on the left, the demo site on the right. Is there anything I have to do to enable the effect? ![alt text](https://i.stack.imgur.com/cVerm.png)
How to get text 'shadow' effect in Silverlight Toolkit themes to work in my project
CC BY-SA 2.5
null
2010-11-05T11:07:39.790
2011-03-20T05:25:34.080
2010-11-05T13:44:47.157
7,793
7,793
[ "silverlight-4.0", "themes" ]
4,105,338
1
null
null
6
36,272
I want to create the following table-like element in my page: ![alt text](https://i.stack.imgur.com/1WtIu.jpg) I used to do it using `<table>...<table>` tags , but now I am switching all my sites to CSS and I'm using DIVs and such. I would like to know what is the "best" way to achieve this kind of an element (is it still the `<table>` tag?). I don't want to create just 3 columns and separate Items in the same column with `<BR />` since I would like to control the spacing between elements in the same column (such as between Item1 and Item4). Thanks!! Joel
CSS table-like style
CC BY-SA 2.5
0
2010-11-05T11:12:14.247
2017-07-27T03:30:49.447
null
null
508,056
[ "css" ]
4,105,370
1
4,105,490
null
15
32,261
I've only been working on Magento for a few days but already it is so confusing. I'm starting to get my head around it but one problem is doing my head in at the moment. My client wants a shopping basket sort of function NEXT to the top links rather than a "My Cart" in the top links. Simply, all I want to do is move "My Cart" out of the top links and place it in the top right corner next to a hopping bag, but have no idea how to get this link in that position. For a visual example, the clients shopping basket is going to look similar to the one one Next's website. ![alt text](https://i.stack.imgur.com/LnQKu.png) Thank you for any help you offer.
How to have "My Cart" link outside of Top Links?
CC BY-SA 2.5
0
2010-11-05T11:17:20.550
2014-07-16T08:41:28.583
null
null
218,224
[ "magento" ]
4,105,428
1
4,144,575
null
1
410
This is not a technical question but law related. I started developing a Delphi Application which implements a UI similar to Google Chrome: ![alt text](https://i.stack.imgur.com/onPOd.png) Now I want to add a menu in the white space in left top corner (but not like of Microsoft Office UI) Can I develop and deploy my Application like this? It is not UI like Office but related to tabs just as in Ribbon so do I have to get a licence from Microsoft to make such a software (it Royalty free) And other question: is Google Chrome UI a kind of MS Office UI? (if so have they got permisson from MS)
Office ribbon interface and Google chrome interface
CC BY-SA 3.0
null
2010-11-05T11:26:15.693
2011-06-16T20:42:56.480
2011-06-16T20:42:56.480
null
476,609
[ "user-interface", "google-chrome", "licensing", "ribbon", "ribbon-control" ]
4,105,492
1
4,109,296
null
0
189
> [How do I remove the “Personalize this Page” option in WSS 3 with feature code?](https://stackoverflow.com/questions/663828/how-do-i-remove-the-personalize-this-page-option-in-wss-3-with-feature-code) Hi, I have to take out the from the login drop down on the sharepoint site, at the top right hand corner. How can I do that? ![alt text](https://i.stack.imgur.com/Q6b20.png) Thank you
Sharepoint Personalization
CC BY-SA 2.5
null
2010-11-05T11:36:41.967
2010-11-05T19:23:18.667
2017-05-23T12:26:29.837
-1
424,611
[ "sharepoint", "sharepoint-2007" ]
4,105,772
1
4,105,814
null
18
71,201
I need to recreate the following design using only `CSS`: ![image](https://i.stack.imgur.com/zuw0g.jpg) What you're seeing in the picture is the top of a website container - the "links" are part of the main menu. As it stands, I've created the container but I'm not sure how to go about making the slant on the navigation without using an image. For the record: I'd rather not use an image as the chances of the box shadow on the slant matching up with box shadow rendered by the browser are slim-to-none, especially when it comes to multiple browsers. I was thinking along the lines of a positioned and rotated div with a white background and a box shadow, but I haven't been able to build it yet. Any ideas?
45 Degree Angle + Box Shadow - Using nothing but CSS
CC BY-SA 3.0
0
2010-11-05T12:19:08.150
2015-04-17T09:34:15.860
2015-04-17T09:34:15.860
1,811,992
183,028
[ "html", "css", "css-shapes" ]
4,106,287
1
4,106,313
null
0
2,232
![alt text](https://i.stack.imgur.com/TfiLF.png) Here is the source code for this test: ``` var tags = new List<string> {"Portland", "Code","StackExcahnge" }; const string separator = " "; tagString = tags.Aggregate(t => , separator); Console.WriteLine(tagString); // Expecting to see "Portland Code StackExchange" Console.ReadKey(); ``` --- Here is the solution I am now using: ``` var tagString = string.Join(separator, tags.ToArray()); ``` Turns out `string.Join` does what I need.
How do I use the Aggregate function to take a list of strings and output a single string separated by a space?
CC BY-SA 2.5
null
2010-11-05T13:35:27.123
2010-11-05T13:48:27.857
2010-11-05T13:48:27.857
402,098
402,098
[ "c#", "list", "aggregate", "tostring" ]
4,106,805
1
4,106,913
null
3
4,326
1. When programming in Java is it always necessary to code according to the DAO architecture? If so what are advantages of using it? 2. I'm doing a project which has a class diagram like below. what are the disadvantages of this? ![alt text](https://i.stack.imgur.com/8m5D7.png) Entity Class: ``` private void fillSONumber() { try { ZnAlSalesOrder o = new ZnAlSalesOrder(); ArrayList a = o.getPendingSalesOrderIDs(); for (int i = 0; i < a.size(); i++) { cmbSoNo.addItem(a.get(i)); } o.close(); } catch (Terminated ex) { } } ``` EntityTable Class Example: ``` public ResultSet select(String fields, String selection) { db = new Database(); db.select("SELECT " + fields + " FROM " + name + " WHERE " + selection); return rs = db.rs; } ``` and the database class do the connection establishment and destroying.
What is the necessity of DAO Architecture
CC BY-SA 2.5
0
2010-11-05T14:28:16.097
2011-06-12T12:56:19.110
2010-11-05T14:32:30.973
139,010
340,046
[ "java", "asp.net", "design-patterns", "dao" ]
4,107,040
1
4,107,191
null
1
259
Consider user is denied access to a table of financial secrets: ``` SELECT * FROM Transactions SELECT permission denied on object 'Transactions' ``` No problem: ``` CREATE VIEW dbo.Transactions2 AS SELECT * FROM Transactions Command(s) completed succesfully. SELECT * FROM Transactions2 (84,387,982 row(s) affected) ``` Are users supposed to be able to bypass `deny` permissions on a table by aliasing the table? Sauce: ![alt text](https://i.stack.imgur.com/rDmit.png)
Deny read permission can be circumvented with a view?
CC BY-SA 2.5
0
2010-11-05T14:53:38.197
2010-11-05T15:19:48.177
2010-11-05T15:02:51.990
12,597
12,597
[ "security", "sql-server-2000" ]
4,107,160
1
4,125,783
null
0
1,502
I am using Word Automation to create a document from my application, and I need to add three signatures to the footer of a document. That is easy, however, getting them to appear as I would like isn't working. Here's the code I'm using: ``` //add initials to footer if (oWordDoc.Sections.Count > 0) { Range r = oWordDoc.Sections[1].Footers[WdHeaderFooterIndex.wdHeaderFooterPrimary].Range; Object colapseDir = WdCollapseDirection.wdCollapseStart; r.Collapse(ref colapseDir); oWord.ActiveWindow.View.Type = WdViewType.wdPrintView; oWord.ActiveWindow.ActivePane.View.SeekView = WdSeekView.wdSeekCurrentPageFooter; oWord.Selection.TypeParagraph(); oWord.Selection.Paragraphs.Alignment = WdParagraphAlignment.wdAlignParagraphLeft; oWord.ActiveWindow.Selection.Font.Name = "Arial"; oWord.ActiveWindow.Selection.Font.Size = 8; if (!String.IsNullOrEmpty(plaintiffInitialFile)) { r.InlineShapes.AddPicture(plaintiffInitialFile, ref oMissing, ref oTrue, ref oMissing); } oWord.ActiveWindow.Selection.TypeText("Plaintiff's Initals"); oWord.ActiveWindow.Selection.TypeText("\t"); if (!String.IsNullOrEmpty(plaintiffAttInitialFile)) { r.InlineShapes.AddPicture(plaintiffAttInitialFile, ref oMissing, ref oTrue, ref oMissing); } oWord.ActiveWindow.Selection.TypeText("Plaintiff's Attorney's Initals"); oWord.ActiveWindow.Selection.TypeText("\t"); if (!String.IsNullOrEmpty(ekfgInitialFile)) { r.InlineShapes.AddPicture(ekfgInitialFile, ref oMissing, ref oTrue, ref oMissing); } oWord.ActiveWindow.Selection.TypeText("EKFG's Initals"); } ``` Here is what it is producing (I've added annotations) ![Results](https://i.stack.imgur.com/qoClf.jpg) Here is what I want ![Desired Response](https://i.stack.imgur.com/ilv1W.jpg) What do I need to do?
Adding three aligned images to a word document footer
CC BY-SA 2.5
null
2010-11-05T15:04:45.893
2010-11-08T16:27:24.183
null
null
12,243
[ "c#", ".net-3.5", "word-automation" ]
4,107,384
1
4,107,517
null
-1
70
I was just going through some security blogs and I found this image of an major financial entity and I was not sure of what could have caused this kind of error to appear on client facing page and how to fix it so that we do not have any potential security loop hole in the system ? ![alt text](https://i.stack.imgur.com/Bpchk.jpg)
What could cause this kind security issue?
CC BY-SA 2.5
null
2010-11-05T15:29:29.000
2010-11-05T15:44:11.527
null
null
164,299
[ "security" ]
4,107,433
1
4,110,075
null
0
701
I've changed my navigation bar style to black opaque but my done button remains blue, yet the compose button is fine / black. Why is is happening and more importantanly how do I fix this ? The buttons was added in IB and shows blue there, while the nav bar is black. ![alt text](https://i.stack.imgur.com/SkfJn.jpg)
Why and how do I change my buttons style, my the other compose button is fine?
CC BY-SA 2.5
null
2010-11-05T15:35:09.777
2010-11-05T21:03:58.870
2010-11-05T15:41:35.750
450,456
450,456
[ "objective-c", "xcode", "interface-builder" ]
4,107,834
1
4,107,896
null
3
838
I'm using... (although I've tried other things) Before I I tried, it looked like this.. ![alt text](https://i.stack.imgur.com/CBEp2.jpg) ``` tools = [[UIToolbar alloc] initWithFrame:CGRectMake(0, 0, 70, 44.01)]; //tools.backgroundColor = [UIColor blackColor]; //tools.backgroundColor = [UIColor clearColor]; //tools.barStyle = UIBarStyleBlackTranslucent; tools.barStyle = UIBarStyleBlackOpaque; ``` This looks like this.... ![alt text](https://i.stack.imgur.com/e5Yg8.jpg) How can I match the navigation bar black opaque scheme ?
iPhone, how do i make my toolbar the same black opaque as the nav bar?
CC BY-SA 2.5
0
2010-11-05T16:20:26.417
2010-11-05T21:13:24.140
null
null
450,456
[ "iphone", "objective-c", "xcode" ]
4,108,177
1
4,108,201
null
3
1,665
I use this function courtesy of a Stack Overflow user to update controls from a `BackgroundWorker`. ``` static void SynchronizedInvoke(ISynchronizeInvoke sync, Action action) { // If the invoke is not required, then invoke here and get out. if (!sync.InvokeRequired) { // Execute action. action(); // Get out. return; } // Marshal to the required thread. sync.Invoke(action, new object[] { }); } ``` This function has worked perfectly until now. I just got this exception: ![InvalidAsynchronousStateException](https://i.stack.imgur.com/L4wrq.jpg) What does this mean and how do I prevent it?
InvalidAsynchronousStateException in function that checks if invoke is required for control
CC BY-SA 2.5
0
2010-11-05T16:59:42.000
2010-11-05T17:02:30.933
2020-06-20T09:12:55.060
-1
217,649
[ "c#", "backgroundworker" ]
4,108,215
1
4,165,622
null
8
10,280
I've successfully managed to get MSTests running for each of the builds on our TeamCity Server. I've got a couple of projects that use NUnit, so was hoping that getting TeamCity to run NUnit tests would be as simple as running MSTests: ![MS Test Settings in Team City](https://i.stack.imgur.com/Y6791.png) So when I try to do the same for my NUnit Tests the Testing Tab doesn't show up when the Build finishes, so I'm guessing it hasn't run my tests. ![Nunit Test Settings in Team City](https://i.stack.imgur.com/X0Vml.png) Does anyone know what I'm doing wrong? Not sure if this will help, but this is from the build log: ``` [Project "AssemblyName.proj.teamcity.patch.tcprojx" (Build;TeamCity_Generated_NUnitTests target(s)):] C:\Program Files\TeamCity\buildAgent\plugins\dotnetPlugin\bin\JetBrains.BuildServer.NUnitLauncher.exe "@@" "C:\Program Files\TeamCity\buildAgent\temp\buildTmp\tmp2867.tmp" [13:22:57]: Start TeamCity NUnit Test Runner [13:22:59]: Build finished ``` It's like it starts the nunit build runner, then just stops? Thanks Dave
Running NUnit Tests from Team city
CC BY-SA 2.5
0
2010-11-05T17:04:20.577
2010-11-12T14:29:26.637
2010-11-08T13:34:42.233
30,317
30,317
[ "nunit", "teamcity", "teamcity-5.1" ]
4,108,226
1
4,108,425
null
9
3,578
On top of visual studio code editor, There are two drop down lists displays list of classes and members in then selected class. See the picture below. What do you call them and what are the shortcuts? So that I can navigate to methods and members using keyboard. I am using Vs 2010 Thanks ![alt text](https://i.stack.imgur.com/qI6mG.jpg)
Shortcut to navigate members in Visual Studio
CC BY-SA 2.5
0
2010-11-05T17:05:43.570
2012-10-05T10:06:46.813
null
null
339,725
[ "visual-studio", "ide", "keyboard-shortcuts" ]
4,108,501
1
4,108,539
null
2
2,952
I have the following application.xml ``` <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.currency.mobile.android"> <uses-permission android:name="android.permission.INTERNET"/> <application android:icon="@drawable/icon" android:label="@string/app_name" android:theme="@android:style/Theme.Light.NoTitleBar"> <activity android:name=".MainActivity" android:noHistory="true"> <intent-filter> <action android:name="android.intent.action.MAIN"/> <category android:name="android.intent.category.LAUNCHER"/> </intent-filter> </activity> <activity android:name=".LoginActivity"/> <activity android:name=".HomeActivity" /> <activity android:name=".FriendsActivity"/> <activity android:name=".PlacesActivity"/> <activity android:name=".ProfileActivity"/> <activity android:name=".PurchasesActivity"/> </application> </manifest> ``` This is my tab view: ``` <?xml version="1.0" encoding="utf-8"?> <TabHost xmlns:android="http://schemas.android.com/apk/res/android" android:id="@android:id/tabhost" android:layout_width="fill_parent" android:layout_height="fill_parent"> <LinearLayout android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent" android:padding="5dp"> <TabWidget android:id="@android:id/tabs" android:layout_width="fill_parent" android:layout_height="wrap_content"/> <FrameLayout android:id="@android:id/tabcontent" android:layout_width="fill_parent" android:layout_height="fill_parent" android:padding="5dp"/> </LinearLayout> </TabHost> ``` When using Theme.Light.NoTitleBar I get this ugly line in the middle: ![alt text](https://i.stack.imgur.com/nVA0j.png) But when I use Theme.Black it doesn't have such a weird line. Any way to fix it so that I can use light theme?
Where is this top border in Theme.Light.NoTitleBar coming from?
CC BY-SA 2.5
0
2010-11-05T17:37:53.443
2010-11-05T17:43:10.433
null
null
419,075
[ "android" ]
4,108,541
1
4,108,752
null
0
66
At the moment I have a help file view which is displayed but I'd also like to show a tutorial. I want to give the user some to tap on to choose. Something cool, any ideas ? ![alt text](https://i.stack.imgur.com/96SPe.jpg)
iPhone, anything cool I can do to provide two options when someone taps my info button?
CC BY-SA 2.5
null
2010-11-05T17:43:59.030
2010-11-05T18:08:31.610
null
null
450,456
[ "iphone", "objective-c", "xcode" ]
4,108,937
1
4,109,199
null
0
364
I need to represent the following diagram: ![alt text](https://i.stack.imgur.com/f5Yoa.png) Each X will be an image button. I was thinking of making three tables with one column each and have each cell height be half the height of the table. The problem is that the table needs to be able to stretch or shrink because I am worried about getting everything on the screen and the tables are the only part that can change size and have the entire thing still look ok. The problem I am having is that the rows are only as big as the image buttons. While all the image buttons are the same size, the left and right table in particular, need to have some padding around the image buttons to make it alright. I would add margins to the buttons but that defeats the reshaping problem I am having...I think. Any suggestions?
How to represent this in Android Layout
CC BY-SA 2.5
null
2010-11-05T18:32:17.807
2010-11-05T19:07:59.457
null
null
451,037
[ "android", "tablelayout" ]
4,109,257
1
4,112,602
null
1
108
I'm creating a `Notification` table, with the following specification: ``` CREATE TABLE [Notification] ( [NotificationId] [int] NOT NULL IDENTITY (1, 1), [IsActive] [bit] NOT NULL, [TriggerKey] [nvarchar](50) NOT NULL, [ObjectId] [int] NOT NULL, [RecipientType] [tinyint] NOT NULL, CONSTRAINT PK_Notification PRIMARY KEY CLUSTERED ( [NotificationId] ASC ) ) ``` Every time a notification gets changed, rather than updating its values, I want to create a new, "Active" notification and deactivate the previous one. But the previous notification needs to still be accessible when specified by NotificationId. So I expect to eventually have far more inactive notifications than active ones. It will be relatively uncommon for Notifications to be added or changed. Far more common will be: 1. A query on an external table that joins with this table based on the NotificationId, and 2. A query for "Active" notifications with a given TriggerKey and ObjectId For the first case, I figure the primary key index will suffice. For the second case, I am thinking of creating the following filtered index: ``` CREATE NONCLUSTERED INDEX IDX_Notification_ActiveTriggerObject ON [Notification] (IsActive, TriggerKey, ObjectId) WHERE IsActive = 1 ``` However, when I check the execution plan before and after creating this index, it appears to not be getting used. Why? ![alt text](https://i.stack.imgur.com/QcZHZ.png) # Update Thanks to [the article](http://www.simple-talk.com/sql/learn-sql-server/using-covering-indexes-to-improve-query-performance/) linked in the accepted answer, here's the corrected version of the index: ``` CREATE NONCLUSTERED INDEX IDX_Notification_ActiveTriggerObject ON [Notification] (TriggerKey, ObjectId) INCLUDE (IsActive, NotificationId, RecipientType) WHERE IsActive = 1 ```
Need help with Filtered Index
CC BY-SA 2.5
0
2010-11-05T19:17:50.057
2010-11-07T02:10:58.590
2020-06-20T09:12:55.060
-1
120,955
[ "database", "sql-server-2008" ]
4,109,340
1
4,109,508
null
0
2,260
The html / CSS I've been using is below. When the cursor is over .buttonR, there is no :hover effect, nor does it properly submit when clicked. There is a 6-pixel dead area on that right side that I'm trying to get around. Any suggestions? Is there a flaw in my original approach at achieving rounded-corner buttons? Thanks. ``` <span class="buttonR"> <input type="submit" id="updateReview" class="buttonL" value="Save changes" /> </span> .buttonL { font-size: 18px; height: 26px; padding: 0px 0px 8px 6px; background-color: transparent; background-image: url('../Images/buttonL.gif'); background-repeat: no-repeat; cursor: pointer; margin: 0px 0px 0px 6px; } .buttonR { float: left; padding-right: 6px; height: 26px; background-color: transparent; background: url('../Images/buttonR.gif') no-repeat scroll top right; margin: 0px 6px 0px 0px; } ``` So I've managed to solve the "dead area" problem using a variation of zzzz's answer: ``` <button type="submit" class="buttonR"> <span class="buttonL">Save Changes</span> </button> ``` but for the life of me, I cannot get a consistent vertical alignment between browsers. Chrome and IE are aligned, while Firefox will have a 2 pixel variance between .buttonL and .buttonR. I've heard of variances between browsers, but thought for sure there was a workaround somewhere. I can't find it... damnation this is frustrating. Here's what I wound up with after an hour of messing with the padding and margins: ![alt text](https://i.stack.imgur.com/72GU0.jpg)
CSS sliding-window rounded-corner buttons: how to avoid the "dead" area on right side of "window"?
CC BY-SA 2.5
null
2010-11-05T19:31:02.553
2010-11-06T18:02:45.780
2020-06-20T09:12:55.060
-1
405,114
[ "html", "css" ]
4,109,324
1
4,109,406
null
2
2,714
I'm using Flash Builder 4 Premium. My application has a title bar that I don't want to scroll, and a group underneath that should scroll. Here is the group that I want to be able to scroll: ``` <s:Scroller id="scrlMemberManager" includeIn="MemberManager" y="79" width="100%" height="100%" creationComplete="memberManagerInit()"> <s:Group id="grpMemberManager"> <s:Rect top="0" left="0" width="100%" height="100%"> <s:fill> <s:SolidColor color="#bdbec0" /> </s:fill> </s:Rect> <s:Panel id="pnlCenterMembers" width="597" height="444" x="10" y="5" title="Center Members"> <s:Panel x="7" y="9" width="259" height="388" title="Create Member" dropShadowVisible="false"> <s:TextInput x="71" y="11" width="164" id="txtCenterNewMemName" creationComplete="setUpTabKey(txtCenterNewMemName, null, txtCenterNewMemEmail)"/> <s:Label x="6" y="18" text="Name" width="60" textAlign="right"/> <s:TextInput x="71" y="41" width="164" id="txtCenterNewMemEmail" creationComplete="setUpTabKey(txtCenterNewMemEmail, txtCenterNewMemName, cboCenterNewMemGroup)"/> <s:Label x="6" y="48" text="Email" width="60" textAlign="right"/> <s:ComboBox x="71" y="71" width="164" id="cboCenterNewMemGroup" creationComplete="{ newMemGroup_creationCompleteHandler(event); setUpTabKey(cboCenterNewMemGroup, txtCenterNewMemEmail, null); }" textAlign="center" dataProvider="{getCenterGroupNamesResult.lastResult}" /> <s:Button x="165" y="101" label="Create" click="createUser('Center')" id="btnCenterCreateNewMem"/> <s:Label x="6" y="78" text="Group" width="60" textAlign="right"/> </s:Panel> <s:Panel x="274" y="10" width="314" height="388" title="Member List" dropShadowVisible="false" id="pnlCenterMemberList"> <mx:DataGrid x="10" y="10" width="294" height="275" id="grdCenterMemberList" dataProvider="{getCenterMembersResult.lastResult}" allowMultipleSelection ="true" dragEnabled="false"> <mx:columns> <mx:DataGridColumn headerText="Member Name" dataField="username"/> </mx:columns> </mx:DataGrid> <s:Button x="10" y="295" label="Add To / Rem From Group" width="140" id="btnCenterAssignToGroup" click="assignMemberToGroup('Center')" fontSize="9"/> <s:Button x="10" y="324" label="Change Password" width="140" id="btnCenterChangePassword" click="changePassword('Center')" visible="false"/> <s:Button y="295" label="Delete" width="140" id="btnCenterDeleteMember" click="deleteMember_clickHandler(event)" right="9"/> </s:Panel> </s:Panel> <s:Panel id="pnlOnlineMembers" width="597" height="444" x="627" y="5" title="Our Online Members"> <s:Button y="-26" id="btnSwitchOnlineMembers" label="Show All Online Members" width="170" right="7" click="switchOnlineMembers()"/> <s:Panel x="7" y="9" width="259" height="388" title="Create Member" dropShadowVisible="false"> <s:Label x="6" y="18" text="Name" width="60" textAlign="right"/> <s:Label x="6" y="48" text="Password" width="60" textAlign="right"/> <s:Label x="6" y="108" text="Email" width="60" textAlign="right"/> <s:Label x="6" y="138" text="Group" width="60" textAlign="right"/> <s:Label x="6" y="71" text="Confirm Password" width="60" textAlign="right"/> <s:TextInput x="71" y="11" width="164" id="txtOnlineNewMemName" creationComplete="setUpTabKey(txtOnlineNewMemName, null, txtOnlineNewMemPassword1);"/> <s:TextInput x="71" y="41" width="164" id="txtOnlineNewMemPassword1" displayAsPassword="true" creationComplete="setUpTabKey(txtOnlineNewMemPassword1, txtOnlineNewMemName, txtOnlineNewMemPassword2);"/> <s:TextInput x="71" y="71" width="164" id="txtOnlineNewMemPassword2" displayAsPassword="true" creationComplete="setUpTabKey(txtOnlineNewMemPassword2, txtOnlineNewMemPassword1, txtOnlineNewMemEmail);"/> <s:TextInput x="71" y="101" id="txtOnlineNewMemEmail" width="164" creationComplete="setUpTabKey(txtOnlineNewMemEmail, txtOnlineNewMemPassword2, cboOnlineNewMemGroup);"/> <s:ComboBox x="71" y="131" width="164" textAlign="center" id="cboOnlineNewMemGroup" dataProvider="{getCenterGroupNamesResult.lastResult}" creationComplete="setUpTabKey(cboOnlineNewMemGroup, txtOnlineNewMemEmail, null);" /> <s:Button x="165" y="160" label="Create" id="btnOnlineCreateNewMem" click="createUser('Online')"/> </s:Panel> <s:Panel x="274" y="10" width="314" height="388" title="Member List" dropShadowVisible="false"> <mx:DataGrid x="10" y="10" width="294" height="275" id="grdOnlineMemberList" dataProvider="{onlineMembersArray}" allowMultipleSelection="true"> <mx:columns> <mx:DataGridColumn headerText="Member Name" dataField="username"/> </mx:columns> </mx:DataGrid> <s:Button x="10" y="295" label="Add To / Rem From Group" width="140" id="btnOnlineAssignToGroup" click="assignMemberToGroup('Online')" fontSize="9"/> <s:Button x="10" y="324" label="Change Password" width="140" id="btnOnlineChangePassword" click="changePassword('Online')" visible="false"/> <s:Button x="163" y="295" label="Add To Our Center" width="140" id="btnOnlineAssignToCenter" click="assignMemberToCenter()" visible="false"/> <s:Button x="163" y="295" label="Remove From Center" width="140" id="btnOnlineRemoveFromCenter" click="removeMemberFromCenter()"/> </s:Panel> </s:Panel> <s:Button right="10" bottom="10" label="Admin Manager" id="btnAdminManager" visible="false" click="{ goToAdminManager(); }" creationComplete="{if (currentUserRights[center] == 'OWNER' || currentUserRights[center] == 'SUPERUSER') btnAdminManager.visible = true;}"/> </s:Group> </s:Scroller> ``` Everything appears to work fine at first glance, but if you make the screen small enough to where you have to scroll, the background color doesn't fill the entire scroller, only the part that is initially shown before you start scrolling, so you get something that looks like this: ![Background does not scroll](https://i.stack.imgur.com/CDHP7.png) I'm not sure what the best way for me to fix this problem is, but I figure I could resize the background color Rect to match the scroller width...if I could find out what the scroller width is. And by scroller width, I mean the width of the content it contains, not the width of its viewport (hope my terminology is correct). Is there a way to find that width, or is there a better way of doing this? The width of each panel is set, but the size of the window may extend beyond the width of the content, so I want to make sure the background fills the user's window (excluding the title bar, of course), no matter what size their window is.
How can I create a scrolling group with a background color?
CC BY-SA 3.0
null
2010-11-05T19:28:56.047
2017-05-03T10:03:33.317
2017-05-03T10:03:33.317
1,905,949
259,457
[ "apache-flex", "colors", "background", "scroller" ]
4,109,873
1
4,110,984
null
1
224
I have a CustomView (Expand View) in my main view, which is suppose to expand. I have a bunch of other objects at the bottom of my ExpandView. I want to move all these objects down as my ExpandView expands. Is it possible to do this in interface builder, and relate these objects to my ScrollView so that they would move automatically as my ExpandView grows? ![alt text](https://i.stack.imgur.com/J1Jki.png)
iphone - UIView Move objects in the screen?
CC BY-SA 2.5
null
2010-11-05T20:39:22.857
2010-11-05T23:35:21.197
null
null
242,769
[ "iphone", "uiview", "interface-builder" ]
4,110,208
1
null
null
0
1,418
Exist a mode or method to obtained that result? please seem my image in the post![alt text](https://i.stack.imgur.com/laAal.jpg) I want my result is a product of numbers in vertical (black line) multiplied by number horizontal (red line)
In SQL how I can multiply results obtained in rows into results obtained in columns
CC BY-SA 2.5
null
2010-11-05T21:21:16.830
2010-11-08T09:29:09.230
null
null
473,546
[ "sql", "matrix-multiplication" ]
4,110,933
1
4,113,483
null
0
1,207
I'm kind of new to EF and RIA so I'm not sure if this is supposed to work or not. I have a simple model shown here: ![alt text](https://i.stack.imgur.com/y5SqQ.png) I added the [POCO templates for entity framework](http://visualstudiogallery.msdn.microsoft.com/en-us/23df0450-5677-4926-96cc-173d02752313) and everything is wired as it sohould I can get Lazy Loading, Changes Notifications and Relationship Fixup... (I really hope you're still reading) The thing is that while on the server I can load a Component's SubComponents by simply calling `comp.SubComponents`. BUT, for some reason I don't have that feature on the client side... My `Component` class from the `RIAServices.web.g.cs` (generated code) does not have a list of `SubComponent`. Is that how that's suppose to work? Should I have a this function on the RIA Service? ``` public IEnumerable<SubComponent> GetSubComponents(int componentId) { return m_ctx.SubComponents .Where(x => x.Component.Id == componentId) .OrderBy(x => x.Name); } ```
How to get an entity plus its child entities via RIA Services
CC BY-SA 2.5
0
2010-11-05T23:21:16.733
2010-11-11T01:29:14.307
2010-11-11T01:29:14.307
23,893
23,893
[ "entity-framework", "entity-framework-4", "poco", "wcf-ria-services" ]
4,111,170
1
4,111,312
null
7
8,454
This is about how MATLAB can take very different times to plot the same thing — and why. I generate 10000 points in 3D space: ``` X = rand(10000, 1); Y = rand(10000, 1); Z = rand(10000, 1); ``` I then used one of four different methods to plot this, to create a plot like so: ![alt text](https://i.stack.imgur.com/wrkqr.png) I closed all figures and cleared the workspace between each run to try to ensure fairness. ``` >> tic; scatter3(X, Y, Z); drawnow; toc Elapsed time is 0.815450 seconds. ``` ``` >> tic; hold on; for i = 1:10000 scatter3(X(i), Y(i), Z(i), 'b'); end hold off; drawnow; toc Elapsed time is 51.469547 seconds. ``` ``` >> tic; plot3(X, Y, Z, 'o'); drawnow; toc Elapsed time is 0.153480 seconds. ``` ``` >> tic; hold on for i = 1:10000 plot3(X(i), Y(i), Z(i), 'o'); end drawnow; toc Elapsed time is 5.854662 seconds. ``` What is it that MATLAB does behind the scenes in the 'longer' routines to take so long? What are the advantages and disadvantages of using each method? Thanks to advice from Ben Voigt (see answers), I have included `drawnow` commands in the timing — but this has made little difference to the times.
MATLAB scatter3, plot3 speed discrepencies
CC BY-SA 2.5
0
2010-11-06T00:19:44.513
2011-08-04T18:43:25.203
2010-11-06T00:29:42.580
279,858
279,858
[ "matlab", "plot", "timing", "scatter-plot" ]
4,111,199
1
null
null
2
289
Even though my question is very similar to [this one](https://stackoverflow.com/questions/1100167/reading-time-reported-in-the-firebug-net-tab), it's not a duplicate. ![Firebug NET Tab screenshot](https://i.stack.imgur.com/Y3fw2.jpg) The images shows the stats from Firebug's NET tab, each request is taking a fraction of a second (all requests add up to 2.9 sec), yet the total time adds up to 6 seconds. How do I figure out which request took the longest time, and ?
Need help understanging Firebug's Net tab statistics
CC BY-SA 2.5
null
2010-11-06T00:29:12.053
2010-11-06T00:59:15.097
2017-05-23T12:30:36.930
-1
3,661
[ "performance", "firebug", "httprequest" ]
4,111,463
1
4,111,483
null
1
254
I am doing an AI project that currently had the following namespace/package structure: ![alt text](https://i.stack.imgur.com/xNg6g.jpg) My ideia is to have some Unit/Integration tests for each one of the modules (probably not for all of them. Startup probably won't be tested). Each one of these "main" packages is in a different physical file. I'd like to know what you think would be better: - - - Thanks!
How to better organize several projects in one solution and their respective unit/integration tests?
CC BY-SA 2.5
null
2010-11-06T01:45:22.357
2010-11-06T12:59:00.227
2020-06-20T09:12:55.060
-1
130,758
[ "c#", "oop", "unit-testing", "testing" ]
4,111,552
1
4,111,785
null
0
91
I just update xcode to 3.2.4 and I notice that all my frameworks has like I lock in it. Is it suppose to be like this? If not, how do I unlock them? Here is a screen capture. One image is better than a thousand words. ![alt text](https://i.stack.imgur.com/n5h0R.png)
on xcode 3.2.4, are frameworks locked?
CC BY-SA 2.5
null
2010-11-06T02:18:44.593
2010-11-06T03:43:27.023
2010-11-06T03:27:01.003
69,033
69,033
[ "xcode", "iphone-sdk-3.0", "xcode3.2" ]
4,111,629
1
4,112,363
null
1
352
I recently acquired this book from Microsoft Press. I currently have Office Enterprise 2007 (Access included) and have firmly decided to convert my Informix-SQL app to Access 2010. However, I'm not experienced with VBA, Macros and several other functionality my app needs. This is going to be a new learning process for me, but I must modernize my 20 year old char-based app and take advantage of new features. I have begun defining my tables and columns, but not the relationships. With INFORMIX, I join a serial (autoincrement) column with an INT column in another table. Now when I display a customers master row, I would like to automatically display all of the transactions associated with that customer in a sub-form and have the ability to add, update, query, delete on either tables. Can this be accomplished with A'10? EDIT: OK, this is what I have done so far, defined tables and relationships: ![alt text](https://i.stack.imgur.com/yoFSl.jpg) there are more validation lookup tables to follow, but these are the main tables. So if now I create a form and specify the CLIENTES (customer table), LOTES (lot table), ARTICULOS (item table) and TRANSACCIONES (transaction table) it will create a CLIENT table as the master form and the other child tables as subforms on one screen? Also, the reason I created a lot table is because when customers pawn or sell items, the pawnshop groups all these items into one lot, calculates the total loan or purchase amount, stores it all under one transaction and prints the ticket with a description of all the items and total amount. So I want the ability to say, if customer defaults on interest payments or does not redeem pawn, then customer forfeits all items and pawnshop may choose to sell some items to gold refinery and/or transfer other non-gold items to inventory to sell to the public, so would the above ER be adequate for this capability? I also want to ensure that every row in every table has the same store_ID (company ID) while users are working within a specific company, as this system will be multi-company and there will be consolidated reports, etc.
Access 2010 Inside Out
CC BY-SA 2.5
null
2010-11-06T02:46:30.087
2013-05-10T04:40:29.177
2013-05-10T04:40:29.177
299,327
366,797
[ "sql", "ms-access", "database-design", "informix" ]
4,111,803
1
null
null
2
2,447
I recently installed NetBeans (and configured it to work with MinGW) following this directions: [http://netbeans.org/community/releases/69/cpp-setup-instructions.html](http://netbeans.org/community/releases/69/cpp-setup-instructions.html). Those direction gave me direct link to MinGW GCC tools which are older version ( 3.4.5 ) So I updated MinGW to 4.5.0 version and now I can't compile C/C++ projects. I installed mingw from cmd.exe with this command: mingw-get install gcc g++ fortran objc ada gdb msys-base I'll put some photos: What have I forgot to do? ![alt text](https://i.stack.imgur.com/BENC4.jpg) ![alt text](https://i.stack.imgur.com/WxM0B.jpg) ![alt text](https://i.stack.imgur.com/iEPaW.jpg) ![alt text](https://i.stack.imgur.com/RZ8z7.jpg) ![alt text](https://i.stack.imgur.com/FIDVB.jpg) ![alt text](https://i.stack.imgur.com/mNFak.jpg) ![alt text](https://i.stack.imgur.com/IIr4A.jpg) ![alt text](https://i.stack.imgur.com/yL4F6.jpg) ** ## EDIT ** Now netbeans found stdio.h directory but gave me this error ![alt text](https://i.stack.imgur.com/P3XiO.jpg) Just needed to install older version of msys make in saparate directory #
Trouble configuring NetBeans 6.9 with MinGW GCC 4.5.0
CC BY-SA 2.5
0
2010-11-06T03:49:54.187
2011-07-12T22:47:12.590
2010-11-06T04:45:04.417
464,525
464,525
[ "c++", "c", "gcc", "netbeans", "mingw" ]
4,111,951
1
4,112,494
null
0
103
I deployed an ASP.NET MVC app using MSDeploy and ran into this problem i tried every solution that i found over internet and i still can't get this working it's a small basic MVC 2 app that I built while learning. so.. 1. how do you get this thing running under IIS7? 2. what is the exact problem? [](http://screencast.com/t/0tBZoHoN)[http://screencast.com/t/0tBZoHoN](http://screencast.com/t/0tBZoHoN) ![alt text](https://i.stack.imgur.com/pm72C.png)
SQLEXPRESS Failed to generate a user instance of SQL Server
CC BY-SA 2.5
null
2010-11-06T04:49:41.337
2013-04-05T22:17:45.750
2013-04-05T22:17:45.750
727,208
470,237
[ "asp.net-mvc", "asp.net-mvc-2", "sql-server-express", "yellow-screen-of-death" ]
4,111,997
1
4,112,025
null
1
1,558
![alt text](https://i.stack.imgur.com/3ApfN.png) I need some help trying to get floats to display properly in IE. IE wants to add a newline after I try to float it [the arrow] to the right... I would like it to display like Firefox (right), where it all fits in one line, but I can't seem to figure out how... Cheers. ``` background-image: url( '/img/arrow_down.gif' ); background-repeat: no-repeat; height: 8px; width: 15px; display: inline; float: right; ```
Floats are appearing on a newline in IE7
CC BY-SA 2.5
null
2010-11-06T05:05:01.737
2012-06-12T13:38:47.580
2012-06-12T13:38:47.580
44,390
null
[ "css", "internet-explorer-7", "css-float" ]
4,112,128
1
4,112,666
null
24
8,250
I get a grey bar on left side in vim for one file. This does not happen for any other file. What is this? And how to get rid of it? EDIT: This is what it looks like: This goes on for the full height of the file. It does not appear in any other files. The file is a `*.C` which is correctly identified as of `cpp` file type but this thing does not happen to other files where they are being identified as `cpp`. `colourscheme` is `default` ![alt text](https://i.stack.imgur.com/m1c2w.jpg) EDIT2: Here is the view file for the file: ``` let s:so_save = &so | let s:siso_save = &siso | set so=0 siso=0 argglobal setlocal keymap= setlocal noarabic setlocal autoindent setlocal nobinary setlocal bufhidden= setlocal buflisted setlocal buftype= setlocal cindent setlocal cinkeys=0{,0},0),:,0#,!^F,o,O,e setlocal cinoptions= setlocal cinwords=if,else,while,do,for,switch setlocal comments=s1:/*,mb:*,ex:*/,://,b:#,:%,:XCOMM,n:>,fb:- setlocal commentstring=/*%s*/ setlocal complete=.,w,b,u,t,i setlocal completefunc= setlocal nocopyindent setlocal nocursorcolumn setlocal nocursorline setlocal define= setlocal dictionary= setlocal diff setlocal equalprg= setlocal errorformat= setlocal expandtab if &filetype != 'cpp' setlocal filetype=cpp endif setlocal foldcolumn=2 setlocal foldenable setlocal foldexpr=0 setlocal foldignore=# setlocal foldlevel=0 setlocal foldmarker={{{,}}} setlocal foldmethod=diff setlocal foldminlines=1 setlocal foldnestmax=20 setlocal foldtext=foldtext() setlocal formatexpr= setlocal formatoptions=tcq setlocal formatlistpat=^\\s*\\d\\+[\\]:.)}\\t\ ]\\s* setlocal grepprg= setlocal iminsert=0 setlocal imsearch=0 setlocal include= setlocal includeexpr= setlocal indentexpr= setlocal indentkeys=0{,0},:,0#,!^F,o,O,e setlocal noinfercase setlocal iskeyword=@,48-57,_,192-255 setlocal keywordprg= setlocal nolinebreak setlocal nolisp setlocal nolist setlocal makeprg= setlocal matchpairs=(:),{:},[:] setlocal nomodeline setlocal modifiable setlocal nrformats=octal,hex setlocal nonumber setlocal numberwidth=4 setlocal omnifunc= setlocal path= setlocal nopreserveindent setlocal nopreviewwindow setlocal quoteescape=\\ setlocal noreadonly setlocal norightleft setlocal rightleftcmd=search setlocal scrollbind setlocal shiftwidth=4 setlocal noshortname setlocal smartindent setlocal softtabstop=0 setlocal nospell setlocal spellcapcheck=[.?!]\\_[\\])'\"\ \ ]\\+ setlocal spellfile= setlocal spelllang=en setlocal statusline= setlocal suffixesadd= setlocal swapfile setlocal synmaxcol=3000 if &syntax != 'cpp' setlocal syntax=cpp endif setlocal tabstop=4 setlocal tags= setlocal textwidth=0 setlocal thesaurus= setlocal nowinfixheight setlocal nowinfixwidth setlocal nowrap setlocal wrapmargin=0 let s:l = 75 - ((20 * winheight(0) + 29) / 59) if s:l < 1 | let s:l = 1 | endif exe s:l normal! zt 75 normal! 0 let &so = s:so_save | let &siso = s:siso_save doautoall SessionLoadPost " vim: set ft=vim ```
Grey bar on left in vim?
CC BY-SA 2.5
0
2010-11-06T05:58:50.807
2019-06-24T09:53:10.340
2010-11-06T10:41:04.403
466,694
466,694
[ "linux", "vim" ]
4,112,236
1
4,179,121
null
2
378
I can't seem to figure out how to write this query properly. I've tried various combinations but nothing's worked yet. Below is the relevant portion of my database model: ![alt text](https://i.stack.imgur.com/7CHe9.gif) I need to select the products that match a given Category and Group, and that match a given Year, Make, Model, submodel. This I've done below: ``` ItemList = From P In gDataContext.Products.Include("Groups").Include("Groups.Category1").Include("LookupYearMakeModels") From G In P.Groups Where G.Category = Cat And G.Grp = Group From Y In P.LookupYearMakeModels Where Y.Year = YMM.Year And Y.Make = YMM.Make And Y.Model = YMM.Model And Y.Submodel = YMM.Submodel Select P ``` I now also have to select products that match the Category, and Group but are Universal (Product.Univeral = True). I'm currently writing two queries, the one above and the one below. I'm merging the results of the two by simply using ItemList.AddRange(ItemList2) ``` ItemList2 = From P In gDataContext.Products.Include("Groups").Include("Groups.Category1") where P.Universal From G In P.Groups Where G.Category = Cat And G.Grp = Group Select P ``` But I want to combine both queries into one and avoid merging the results. How can I do it? Thanks for your help!
Help with Entity Query
CC BY-SA 2.5
null
2010-11-06T06:47:13.823
2010-11-14T19:09:33.903
2010-11-08T17:01:23.510
124,165
124,165
[ "asp.net", "vb.net", "entity-framework", "linq-to-entities", "entity-framework-4" ]
4,112,558
1
4,112,601
null
0
2,782
I was wondering if this loading screen is a preset or a custom build view. ![alt text](https://i.stack.imgur.com/Aa0iW.png) If it is a preset, how can I add this to a view?
iPhone modal loading view
CC BY-SA 2.5
0
2010-11-06T09:20:15.907
2010-11-06T09:40:23.893
null
null
387,613
[ "iphone", "loading", "uiactivityindicatorview" ]
4,112,582
1
4,112,780
null
2
2,495
Here's the code: ``` <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" > <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <meta http-equiv="X-UA-Compatible" content="IE=7" /> <title>Demo page</title> <style type="text/css"> input { border: 1px solid blue; padding: 0px; margin: 0px; display: inline-block; } td { border: 1px solid red; padding: 0px; margin: 0px; height: 20px; max-height: 20px; } </style> </head> <body> <form method="get" action=""> <table cellspacing="0" cellpadding="0" style="width: 100%"> <tr> <td> <input type="image" style="width: 20px; height: 20px" src="myimg_20x20.png" alt="20x20px"/> </td> </tr> </table> </form> </body> </html> ``` And here's the screenshot: ![IE7 3px bottom bug](https://i.stack.imgur.com/W8LZb.png) This has been tested on IE8, and it appears both in IE7 mode, and in IE8 mode with IE7 standards mode. This does not appear in IE8 mode with IE8 standards. Other browsers (at least Opera and FF) do not show such a behavior. Where does the bottom gap come from and why cannot I get rid of it no matter how many `height: 20px` and `max-height: 20px` I add?
Internet explorer 7 adds a 3 pixel bottom gap to my input type=image
CC BY-SA 2.5
null
2010-11-06T09:30:03.137
2013-01-09T20:03:13.170
2010-11-06T10:11:41.637
41,360
41,360
[ "html", "css", "internet-explorer-7" ]
4,112,626
1
4,112,645
null
2
1,633
So, I've tried looking all around for information on how to recreate a UILabel (ideally, or a UITextField) with a title (for lack of better work). Since it's quite hard to explain (half the reason I couldn't find what I was looking for) I've attached an image from the Facebook App. How would I go about creating labels like this? Either single, or multiple? Sorry for the simple question, still new to iPhone development. ![Image](https://i.stack.imgur.com/DbWRa.png)
UILabel (or UITextField) with Title Label
CC BY-SA 2.5
0
2010-11-06T09:51:01.853
2010-11-07T08:20:15.490
2010-11-06T09:56:11.507
428,381
18,405
[ "iphone", "uitextfield" ]
4,112,701
1
4,112,875
null
12
24,834
![alt text](https://i.stack.imgur.com/Vakzu.gif)Can anyone guide me how to code the arrow line in different direction. wa and wl is positive the rectangle will be on top of the x-axis. Below example shown if wl is negative and wa is positive. The code below shown how i code the rectangle shape. x1 is the varaible to state where to start at x axis. e1 is the length of the shape, wa1 and wl1 is the height. wsign to determine the height wa1 or wl1 should display at negative side or positive side. ``` if (Math.abs(wl1) > Math.abs(wa1)) { y_scale = (load_y0 - 40) / (double) Math.abs(wl1); } else { y_scale = (load_y0 - 40) / (double) Math.abs(wa1); } g.drawLine((int) ((double) x0 + x1 * x_scale), (int) (load_y), (int) ((double) x0 + x1 * x_scale), (int) (load_y + (wa1 * y_scale) * -1)); g.drawLine((int) ((double) x0 + (x1 + e1) * x_scale), (int) (load_y), (int) ((double) x0 + (x1 + e1) * x_scale), (int) (load_y + (wl1 * y_scale) * -1)); g.drawLine((int) ((double) x0 + x1 * x_scale), (int) (load_y + (wa1 * y_scale * -1)), (int) ((double) x0 + (x1 + e1) * x_scale), (int) (load_y + (wl1 * y_scale) * -1)); ```
Drawing a line with arrow in Java
CC BY-SA 2.5
0
2010-11-06T10:18:06.417
2015-07-14T09:33:28.380
2010-11-06T12:20:55.737
236,501
236,501
[ "java", "graphics", "awt" ]
4,112,767
1
5,118,345
null
0
2,116
Its my first time using modal windows. And I'm currently using fancy box. But the problem is I can't style the elements inside of it. Using the usual styling using css. I'm calling regprod.php which is a create form and put it inside the modal window. But I can't see the style that I applied. ``` <a id="inline" href="http://localhost/pos/php/regprod.php" ><img src="http://localhost/pos/img/store/add-icon.png"></img></a> ``` I used the exact url to link the css file to regprod.php: ``` <link rel="stylesheet" href="http://localhost/pos/css/formstyle.css" /> ``` It looks like this: ![alt text](https://i.stack.imgur.com/a5rKQ.png) How am I suppose to put style on it
How to style elements inside fancy box
CC BY-SA 2.5
null
2010-11-06T10:43:46.213
2012-12-21T18:07:37.390
null
null
225,269
[ "php", "html", "fancybox" ]
4,113,056
1
4,113,084
null
27
12,815
I have `InvalidCastException` when I try to cast 0.0 to double, why is that so? It's fine when I do `(float)value` instead. ![alt text](https://i.stack.imgur.com/kVjdk.jpg)
What's wrong with casting 0.0 to double?
CC BY-SA 2.5
0
2010-11-06T12:26:53.057
2010-11-06T14:06:48.513
2010-11-06T14:06:48.513
58,792
292,291
[ "c#", "casting", ".net" ]
4,113,109
1
4,113,170
null
0
1,082
i'm trying to come up with appropriate constant names for two right-angled triangles that can be rotated. ![alt text](https://i.stack.imgur.com/NEeIe.png) the image above shows the two different versions of a right-angled triangle. the right angle of the orange triangle is in the bottom-right while the right angle of the blue triangle is in the bottom-left. from that, let's assume i will name each constant as: ``` public static const RIGHT_ANGLE_BOTTOM_RIGHT:String = "rightAngleBottomRight"; public static const RIGHT_ANGLE_BOTTOM_LEFT:String = "rightAngleBottomLeft"; ``` besides those constant names being quite long and not very descriptive, these triangles can be rotated. therefore, if the orange triangle (`RIGHT_ANGLE_BOTTOM_RIGHT`) is rotated -90º, its name is now misleading (and conflicting) since its right angle is now in the bottom left of the triangle shape. so i'm searching for constant names for these rotatable, right-angled triangles which are clear and distinguishing (and ideally short). currently, my "best" is simply calling them type 1 and type 2. while those names are unmistakably distinguishing, it certainly isn't at all clear of their shape, especially since they can be rotated. ``` package { public final class TriangleStyle { public static const ISOSCELES:String = "isosceles"; public static const RIGHT_Type1:String = "right1"; public static const RIGHT_Type2:String = "right2"; } } ``` any thoughts?
Trouble Naming Constants: Two Right-Angled Triangles
CC BY-SA 2.5
null
2010-11-06T12:43:53.857
2015-03-03T12:44:15.983
2015-03-03T12:44:15.983
1,118,321
336,929
[ "geometry", "naming-conventions", "constants", "terminology" ]
4,113,228
1
4,113,309
null
3
3,961
I'm trying to replicate the functionality of facebook's status update where tags within the post are highlighted. E.g, you hit the '@' character, and autocomplete to a page you are a fan of, and then that tagged piece of the text is highlighted even as you continue to type. After digging into the dom, it looks like they pull this off similar to the technique recommended by this [previous answer](https://stackoverflow.com/questions/3282505/highlight-text-as-you-type-on-textarea/3536762#3536762): overlaying an absolutely positioned div atop a text area with the tag surrounded by `<b>` and css to highlight the `<b>` tags within the overlay. A crucial tweak they add is to use color:transparent on the overlay so that only the highlight shows up. ![alt text](https://i.stack.imgur.com/W3vHW.png) This avoids the ugly darkening of the text being written on top of itself. Notice that without this rule (when I disable it in the dom inspector in chrome), facebook's update bar has the double text effect: ![alt text](https://i.stack.imgur.com/0IACo.png) So far so good, but what I'm running into now is that color:transparent isn't supported in ie, so the ugly double text effect is there. I looked at the status update box in ie8 and facebook seems to get around this, but the developer tools aren't powerful enough to inspect the dom and see what they are doing (css inspection seems to be broken for that page). Here's what I have so far, looking good in chrome: ![alt text](https://i.stack.imgur.com/1moAQ.png) and bad with the double text in IE8: ![alt text](https://i.stack.imgur.com/rFlrV.png) Any ideas? And please, keep suggestions to the specific overlay technique, I know I could try to use some big honking iframe embedding rich text editor, but this is really a simple enhancement that is only going to apply to a couple lines of text at most. Full code below. html: ``` <div class="textarea textareaBorder"> <textarea id="myTextarea" class="textarea realTextarea"></textarea> <div id="myOtherTextarea" class="textarea overlayTextarea"></div> </div> ``` css: ``` .textarea { font-family:monospace; font-size: 12px; border: 0; width: 100%; height: 200px; } .realTextarea { margin: 0; background: transparent; position: absolute; z-index: 999; } .overlayTextarea { margin: 0; position: absolute; color:transparent; top: 1px; left: 1px; z-index: 998; } .overlayTextarea b { background:#add8e6; } .textareaBorder { border: groove 1px #ccc; position: relative; width: 702px; height: 202px; } ``` javascript: ``` $("textarea.realTextarea").keyup(function(e) { var textval = $(e.target).val(); var markedup = textval.replace(/(the magic word)/g, "<b>$1</b>") $("#myOtherTextarea").html(markedup); }); ```
color:transparent on text in ie (highlight text in textarea using overlay technique)?
CC BY-SA 2.5
0
2010-11-06T13:12:15.097
2010-11-11T03:51:57.223
2017-05-23T11:48:22.880
-1
231,589
[ "javascript", "css", "internet-explorer", "textarea" ]
4,113,320
1
null
null
7
6,851
In Firebug, you can > see JSON formatted as an expandable tree of items and also explore them using Firebug's Dom tab. The view is available within Net panel and visible as soon as a JSON request is expanded. As in this screenshot: ![alt text](https://i.stack.imgur.com/1fSxS.png) I'm trying to switch to Chrome but can't find this feature in Dev Tools.
Does Chrome's Dev Tools have a JSON explorer like Firebug's?
CC BY-SA 2.5
0
2010-11-06T13:43:04.827
2011-05-23T19:09:44.893
null
null
498,394
[ "json", "firefox", "google-chrome", "firebug" ]