Id
int64
1.68k
75.6M
PostTypeId
int64
1
2
AcceptedAnswerId
int64
1.7k
75.6M
ParentId
int64
1.68k
75.6M
Score
int64
-60
3.16k
ViewCount
int64
8
2.68M
Body
stringlengths
1
41.1k
Title
stringlengths
14
150
ContentLicense
stringclasses
3 values
FavoriteCount
int64
0
1
CreationDate
stringlengths
23
23
LastActivityDate
stringlengths
23
23
LastEditDate
stringlengths
23
23
LastEditorUserId
int64
-1
21.3M
OwnerUserId
int64
1
21.3M
Tags
list
5,620,561
1
5,620,694
null
4
4,504
I want to create a JDBC Realm for my web app. Since my users are very different from each other i need to have just one table, with the usernames and passwords for the realm, i decided to create a new table in my database called ROLE(oneToOne relationship with the other users table). This is how my users domain model looks like: ![enter image description here](https://i.stack.imgur.com/dmDcp.png) I am following this tutorial [http://blog.gamatam.com/2009/11/jdbc-realm-setup-with-glassfish-v3.html](http://blog.gamatam.com/2009/11/jdbc-realm-setup-with-glassfish-v3.html) but i am stuck, i dont know how to continue. I will post the configuration i made at the glassfish server and also my file sun.resources.xml so you can correct me if i am making any mistake: ![enter image description here](https://i.stack.imgur.com/xV9vs.png) ``` <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE resources PUBLIC "-//Sun Microsystems, Inc.//DTD Application Server 9.0 Resource Definitions //EN" "http://www.sun.com/software/appserver/dtds/sun-resources_1_3.dtd"> <resources> <jdbc-resource enabled="true" jndi-name="jdbc/myDatasource" object-type="user" pool- name="Derby_grupovina_grupovinauserPool"/> <jdbc-connection-pool allow-non-component-callers="false" associate-with-thread="false" connection-creation-retry-attempts="0" connection-creation-retry-interval-in-seconds="10" connection-leak-reclaim="false" connection-leak-timeout-in-seconds="0" connection-validation-method="auto-commit" datasource-classname="org.apache.derby.jdbc.ClientDataSource" fail-all-connections="false" idle-timeout-in-seconds="300" is-connection-validation-required="false" is-isolation-level-guaranteed="true" lazy-connection-association="false" lazy-connection-enlistment="false" match-connections="false" max-connection-usage-count="0" max-pool-size="32" max-wait-time-in-millis="60000" name="Derby_grupovina_grupovinauserPool" non-transactional-connections="false" pool-resize-quantity="2" res-type="javax.sql.DataSource" statement-timeout-in-seconds="-1" steady-pool-size="8" validate-atmost-once-period-in-seconds="0" wrap-jdbc-objects="false"> <property name="serverName" value="localhost"/> <property name="PortNumber" value="1527"/> <property name="DatabaseName" value="grupovina"/> <property name="User" value="grupovinauser"/> <property name="Password" value="grupovina"/> <property name="URL" value="jdbc:derby://localhost:1527/grupovina;create=true"/> <property name="driverClass" value="org.apache.derby.jdbc.ClientDriver"/> </jdbc-connection-pool> </resources> ``` In the above comfiguration i have a few doubts, I dont really understand what should i ad at Group table and Group name Column. The tutorial im following says that i should add security roles at the file sun-web.xml, and i wanted to do it but i dont know what to put in the configuratio. This is just what i added to that file but i think it is not correct. Where in that file should i add the role mapping and how should i configure it? ``` <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE sun-web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Application Server 9.0 Servlet 2.5//EN" "http://www.sun.com/software/appserver/dtds/sun-web-app_2_5-0.dtd"> <sun-web-app error-url=""> <context-root>/GroupBuySystem</context-root> <class-loader delegate="true"/> <jsp-config> <property name="keepgenerated" value="true"> <description>Keep a copy of the generated servlet class java code.</description> </property> </jsp-config> <security-role-mapping> <role-name> </role-name> <group-name> </group-name> </security-role-mapping> </sun-web-app> ``` The guy of the tutorial said he had not need for a web.xml, but i do need that file. What should i add my web.xml? This is my first jdbc realm, i am very confused :)
Creating my first JDBC Realm(Glassfish V3)
CC BY-SA 3.0
0
2011-04-11T11:23:14.627
2012-11-16T10:12:38.773
null
null
614,141
[ "java", "security", "jdbc", "jakarta-ee", "glassfish" ]
5,620,574
1
null
null
1
109
I have Main menu in my app with 4th submenus. I need the user could go to each of the sub menu from other submenu, example sub1-sub2, sub2-sub3, sub3-sub4, sub4-sub1, not sub2-sub4! ![Menus](https://i.stack.imgur.com/H7B9g.png) But I don't use navigation and tabbar controllers. I tried to do something like this [self.view addSubview:sub1.view]; [self.view removeFromSuperview]; but is works really awful. How could I make it better?
Going through UIViewController without nav
CC BY-SA 3.0
0
2011-04-11T11:24:30.623
2011-04-11T11:32:31.900
null
null
607,178
[ "objective-c", "xcode", "ios" ]
5,620,580
1
5,627,761
null
4
187
In an expert, I'd like to re-use the dialog that Delphi displays to edit a project's library path and for similar purposes: ![enter image description here](https://i.stack.imgur.com/b8mcS.png) I found a [hack for using it](http://tondrej.blogspot.com/2006/06/more-subversion.html) (look for TOrderedListEditDlg on the page). As I think [the guy who wrote](https://stackoverflow.com/users/11480/tondrej) the linked article knows what he does I don't have too much hope for a less hacky solution, but who knows... So: Do you know an official interface (most probably OTA) to TOrderedListEditDlg? PS: I'm aware that it's probably trivial to recreate the whole dialog but I like consistency and the DRY principle.
Is there an official interface to TOrderedListEditDlg?
CC BY-SA 3.0
null
2011-04-11T11:25:28.150
2015-04-10T16:40:21.983
2017-05-23T12:30:38.833
-1
1,431,618
[ "delphi", "ide", "toolsapi" ]
5,620,849
1
5,620,898
null
1
4,546
I need to download an .mp3 audio file from a server to save in my app and play it without downloading, exactly like the screenshot below, with a progress bar for the download (I found this in the App Store). Can anyone help me to do this in my app, with source code? Any help will be appreciated! Thanks in advance! I used `NSURLConnection` but it does not really work for me. Here is the screenshot of what I am trying to do. ![Screenshot of download with progress bar](https://i.stack.imgur.com/W8iM2.png)
Download music file from server and save in my app
CC BY-SA 3.0
0
2011-04-11T11:52:59.907
2012-10-10T03:20:25.080
2011-04-14T21:09:57.477
603,977
644,821
[ "iphone", "ios4", "mp3", "download", "nsurlconnection" ]
5,621,355
1
73,925,627
null
8
12,356
I’m trying to create a table in my document that resembles more or less the table in the picture below: ![Example table with alternate row coloring](https://i.stack.imgur.com/Dz3pO.png) This table is supposed to be stretched horizontally to `\textwidth`. My first attempt with `tabular*` looked like this: ``` \documentclass{scrartcl} \usepackage[table]{xcolor} \definecolor{tableShade}{gray}{0.9} \begin{document} \rowcolors{3}{tableShade}{white} %% start alternating shades from 3rd row \noindent\begin{tabular*}{\textwidth}{@{\extracolsep{\fill}}lrrr} Something & foo & bar & baz \\ Something & foo & bar & baz \\ Something & foo & bar & baz \\ Something & foo & bar & baz \\ Something & foo & bar & baz \\ \end{tabular*} \end{document} ``` The result was: ![Example table with tabular*](https://i.stack.imgur.com/OUFhV.png) Well, the alternate row coloring works but `tabular*` inserts space between columns to stretch the whole table to `\textwidth`. Browsing through my LaTeX companion I found that `tabularx` should be able to do what I want. So I changed my code to look like that: ``` \documentclass{scrartcl} \usepackage[table]{xcolor} \usepackage{tabularx} \definecolor{tableShade}{gray}{0.9} \begin{document} \rowcolors{3}{tableShade}{white} %% start alternating shades from 3rd row \noindent\begin{tabularx}{\textwidth}{Xrrr} Something & foo & bar & baz \\ Something & foo & bar & baz \\ Something & foo & bar & baz \\ Something & foo & bar & baz \\ Something & foo & bar & baz \\ \end{tabularx} \end{document} ``` Now, this looks more like it. But `tabularx` ignores the starting row for the coloring and starts with the first row. ![Example table with tabularx](https://i.stack.imgur.com/dDw63.png) Now I’ve run out of ideas. Any suggestions?
Alternating row colors in tabular(*|x)?
CC BY-SA 3.0
null
2011-04-11T12:37:19.387
2022-10-02T11:59:51.360
2022-10-01T11:38:56.533
2,777,074
323,293
[ "latex" ]
5,621,397
1
5,621,604
null
3
144
I need some help with implementing these formulas. I think I implemented them correctly but for some reason I don't get the expected results: ![enter image description here](https://i.stack.imgur.com/pOWn3.png) This is the code for NMI, I, and H functions respectively. Are the formulas implemented correctly ? Thanks ``` int totalN = getTotalN(events); double h1 = H(clusters, totalN); double h2 = H(events, totalN); double valueI = I(clusters, events, totalN); double value_NMI = valueI / (double) ((h1 + h2) / (double) 2); System.out.println("NMI: " + value_NMI); static public double I(HashMap<String, ArrayList<String>> clusters, HashMap<String, ArrayList<String>> events, int totalN) { //store sorted content to contents Iterator<Map.Entry<String, ArrayList<String>>> it = events.entrySet().iterator(); Iterator<Map.Entry<String, ArrayList<String>>> it2 = clusters.entrySet().iterator(); String key; ArrayList<String> event; ArrayList<String> cluster; double valueI = 0; while (it.hasNext()) { Map.Entry<String, ArrayList<String>> mapItem = it.next(); key = mapItem.getKey(); //if cluster doesn't exist //if(!clusters.containsKey(key)) continue; //cluster = clusters.get(key); event = mapItem.getValue(); while (it2.hasNext()) { Map.Entry<String, ArrayList<String>> mapItem2 = it2.next(); cluster = mapItem2.getValue(); float common_docs = 0; for (int i=0; i< event.size(); i++) { for (int j=0; j< cluster.size(); j++) { if (event.get(i).equals(cluster.get(j))) { common_docs = common_docs + 1; break; } } } if (common_docs != 0) valueI = valueI + ( ( common_docs / (float) totalN) * Math.log((common_docs * totalN) / (float) (event.size() * cluster.size())) ); } } return valueI; } static public double H(HashMap<String, ArrayList<String>> clusters, int totalN) { //store sorted content to contents Iterator<Map.Entry<String, ArrayList<String>>> it = clusters.entrySet().iterator(); ArrayList<String> cluster; double entropy = 0; while (it.hasNext()) { Map.Entry<String, ArrayList<String>> mapItem = it.next(); cluster = mapItem.getValue(); double ratio = cluster.size() / (float) totalN; entropy = entropy + ratio * Math.log(ratio); } return -entropy; } static public int getTotalN(HashMap<String, ArrayList<String>> dataset) { int totalN = 0; Iterator<Map.Entry<String, ArrayList<String>>> it = dataset.entrySet().iterator(); ArrayList<String> item; while (it.hasNext()) { Map.Entry<String, ArrayList<String>> mapItem = it.next(); item = mapItem.getValue(); for (int i=0; i< item.size(); i++) { totalN = totalN + 1; } } return totalN ; } ```
I need some help on these formulas implementation
CC BY-SA 3.0
null
2011-04-11T12:40:55.573
2011-04-11T13:01:14.927
2011-04-11T12:47:33.893
680,406
680,406
[ "java" ]
5,621,670
1
null
null
20
3,971
There have been a couple of questions about Hg sub-repo dependencies in the past ([here](https://stackoverflow.com/questions/4786667/mercurial-subrepositories-managing-more-complex-dependency-hierarchies) and [here](https://stackoverflow.com/questions/4457538/does-a-mercurial-subrepository-have-to-be-a-subdirectory-of-the-main-repository)) but the accepted answers don't seem to address the problem for me. A project of mine has 4 dependencies: A, B, C, D. D is dependent on A, B and C; and B and C are dependent on A: ![dependency graph of A,B,C,D](https://i.stack.imgur.com/7B02f.png) I want to use Hg sub-repositories to store them so I can track what version of each they rely on. This is because, while I am using A,B,C and D in this project, . Therefore B and C must track what version of A they need independently of D. At the same time, in my application the versions of B and C referenced by a given version of D must always use the same version of A as that referenced by the given version of D (otherwise it will just fall over at runtime). What I really want is to allow them to reference each other as siblings in the same directory - i.e. D's .hgsub would look like the following, and B and C's would look like the first line. ``` ..\A = https:(central kiln repo)\A ..\B = https:(central kiln repo)\B ..\C = https:(central kiln repo)\C ``` However this doesn't seem to work: I can see why (it'd be easy to give people enough rope to hang themselves with) but its a shame as I think its the neatest solution to my dependencies. I've read a few suggested solutions which I'll quickly outline and why they don't work for me: 1. Include copies as nested sub-directories, reference these as Hg sub-repositories. This yields the following directory structure (I've removed the primary copies of A, B, C, B\A, C\A as I can accept referencing the copies inside \D instead): project\ (all main project files) project\D project\D\A project\D\B project\D\B\A project\D\C project\D\C\A Problems with this approach: I now have 3 copies of A on disk, all of which could have independent modifications which must be synced and merged before pushing to a central repo. I have to use other mechanisms to ensure that B, C and D are referencing the same version of A (e.g. D could use v1 while D\B could use v2) 2. A variation: use the above but specify the RHS of the .hgsub to point to a copy in the parent copy (i.e. B and C should have the .hgsub below): A = ..\A Problems with this approach: I still have three copies on disk The first time I clone B or C it will attempt to recursively pull the referenced version of A from "..\A", which may not exist, presumably causing an error. If it doesn't exist it gives no clue as to where the repo should be found. When I do a recursive push of changes, the changes in D\B\A do not go into the shared central repo; they just get pushed to D\A instead. So if I push twice in a row I can guarantee that all changes will have propagated correctly, but this is quite a fudge. Similarly if I do a (manual) recursive pull, I have to get the order right to get the latest changes (i.e. pull D\A before I pull D\B\A) 3. Use symlinks to point folder \D\B\A to D\A etc. Problems with this approach: symlinks cannot be encoded in the Hg repo itself so every time a team member clones the repo, they have to manually/with a script re-create the symlinks. This may be acceptable but I'd prefer a better solution. Also (personal preference) I find symlinks highly unintuitive. Are these the best available solutions? Is there a good reason why my initial .hgsub (see top) is a pipe-dream, or is there a way I can request/implement this change? to better explain the wider usage of A,B,C,D
Hg sub-repository dependencies
CC BY-SA 3.0
0
2011-04-11T12:59:50.767
2017-06-20T08:49:48.800
2017-05-23T10:30:21.980
-1
360,494
[ "mercurial", "dependencies", "subrepos" ]
5,621,686
1
5,652,688
null
1
589
I'm attempting to customise the look of a Button using a 9-patch drawable with no padding defined within in (no pixels on the right or bottom inside the 9-patch editor). Is there a simple way to apply a 9-patch drawable to a button and maintain the button's default size. For example, when I apply the 9-patch to the Easy button shown below, it is a different size to the other default styled buttons, which share the same layout, except for the 9-patch style. Mdpi layout: ![mdpi layout](https://i.stack.imgur.com/fdlau.png) Hdpi layout: ![enter image description here](https://i.stack.imgur.com/HklNf.png) So basically, is there a way to make the Easy button the same size as Medium and Hard, on both mdpi and hdpi screens, without making a new 9-patch for each density, and working out the correct padding. Thanks in advance for your help, I can provide more information if required.
Apply 9-patch drawable to Button, keeping default padding
CC BY-SA 3.0
0
2011-04-11T13:00:31.947
2011-04-13T16:44:07.860
2011-04-12T19:08:08.167
603,199
603,199
[ "java", "android", "layout", "button", "drawable" ]
5,621,907
1
null
null
241
361,060
I'm working on web application that needs to render a page and make a screenshot on the client (browser) side. I don't need the screenshot to be saved on the local HDD though, just kept it in RAM and send it to the application server later. I researched: 1. BrowserShots alike services... 2. Mechanized browsers... 3. wkhtmltoimage... 4. Python WebKit2PNG... But none of those gives me all I need, which is: 1. Processing at browser side (generate screenshot of page). Don't need to be saved on HDD! Just... 2. ...send image to Server for further processing. 3. Capturing whole page (not only visible part) Eventually I came upon Google's Feedback Tool (click "feedback" on YouTube footer to see this). It contains [JavaScript for JPG encoding](http://code.google.com/p/closure-library/source/browse/trunk/third_party/closure/goog/jpeg_encoder/jpeg_encoder_basic.js?spec=svn463&r=440) and two other huge scripts which I can't determine what exactly they do... But it's processed on the Client side - otherwise there would be no point putting this huge JPEG encoder in the code! Anyone have any idea how did they made it / how I can make it? Here is an example of the feedback (report a bug on some screens) ![Feedback/report bug example](https://i.stack.imgur.com/9Wj0x.jpg)
How to screenshot website in JavaScript client-side / how Google did it? (no need to access HDD)
CC BY-SA 3.0
0
2011-04-11T13:17:29.243
2021-07-09T09:08:29.827
2016-01-25T04:22:14.560
5,299,236
702,185
[ "javascript", "screenshot", "capture", "google-search" ]
5,622,202
1
7,435,225
null
40
36,446
I have a `AlertDialog` box with approximately 10 controls (text and `TextView`) on it. These controls are in a `ScrollView` with `AlertDialog`, plus I got 2 buttons positive and negative. The issue I have is when the soft keyboard pops up the two buttons are hidden behind the keyboard. I was looking for something like redraw function on my inner View or the dialog box. Below is the screen shot of what I am talking about. ![enter image description here](https://i.stack.imgur.com/gRQw3.png)
How to resize AlertDialog on the Keyboard display
CC BY-SA 4.0
0
2011-04-11T13:43:20.930
2021-04-15T13:25:36.753
2018-06-25T09:22:22.090
6,618,622
685,754
[ "android", "view", "resize", "android-alertdialog", "android-softkeyboard" ]
5,622,299
1
null
null
1
545
I have a path: ``` var original_param = 'M '+p1.x+' '+p1.y+'L '+p2.x+' '+p2.y; var path = paper.path(original_param); ``` I have defined another path attribute for animation: ``` var animation_param={M: p11.x+' '+p11.y, L: p22.x+' '+p22.y} ``` where `p1` and `p2` are points, I do not put their definitions here, since they return the proper values correctly here. Then I animate the path with the parameters by: ``` path.animate(animation_param, 1000); ``` But I got error message ![enter image description here](https://i.stack.imgur.com/B0zL1.png) What is the reason of this error?
Raphael JS, Path animation
CC BY-SA 4.0
null
2011-04-11T13:51:22.830
2020-09-11T12:14:00.693
2020-09-11T12:14:00.693
4,370,109
475,850
[ "javascript", "raphael" ]
5,622,512
1
5,622,768
null
2
1,794
I've deployed a couple of app versions which I can't delete now. I tried to delete it using "[AppEngine](https://appengine.google.com/) 〉Administration 〉Versions" ![AppEngine Versions](https://i.stack.imgur.com/yYAsW.png) When I press "delete" to delete version 99: ![Deletion request window](https://i.stack.imgur.com/hzCvm.png) An attempt to delete a version always causes 500 error: ![enter image description here](https://i.stack.imgur.com/oGCof.png) I've tried to overwrite them with new ones, but it didn't helped. I've tried to delete them a week ago and yesterday but it always fails. I'm afraid that after some time all versions will became undeletable (now I have 2 undeletable versions and deployed versions limit is ≈11). How am I supposed to delete that versions? Are there alternative ways to delete deployed versions (appcfg wouldn't help)?
Appengine: can't delete deployed version
CC BY-SA 3.0
0
2011-04-11T14:10:10.853
2011-04-11T14:27:31.053
null
null
66,473
[ "google-app-engine" ]
5,622,608
1
5,623,492
null
7
7,638
In some code I want to choose `n` random numbers in `[0,1)` which sum to `1`. I do so by choosing the numbers independently in `[0,1)` and normalizing them by dividing each one by the total sum: ``` numbers = [random() for i in range(n)] numbers = [n/sum(numbers) for n in numbers] ``` My "problem" is, that the distribution I get out is quite skew. Choosing a million numbers not a single one gets over `1/2`. By some effort I've calculated the pdf, and it's not nice. Here is the weird looking pdf I get for 5 variables: ![enter image description here](https://i.stack.imgur.com/DZkY3.png) Do you have an idea for a nice algorithm to choose the numbers, that result in a more uniform or simple distribution?
Choosing n numbers with fixed sum
CC BY-SA 3.0
0
2011-04-11T14:16:39.897
2017-04-13T17:04:13.897
2011-04-11T21:52:48.987
205,521
205,521
[ "algorithm", "math", "random", "probability", "sample" ]
5,622,663
1
5,623,354
null
1
1,809
Hy. I know that there are no server controls and server-side events, but...: My app is like an email box and the unread items are bold displayed. ![enter image description here](https://i.stack.imgur.com/Atqgh.jpg) Ok... the bold items are the unread `(isRead==false)`. I want to update the item to `(isRead=true)` without any click.. just before the page is rendered. How should I do it? Is there a way in ASP.NET MVC or will I have to do it with JQuery? . What is the best way to call a method AFTER "View" rendered? . Tks, guys!
after render Event on MVC. Possible?
CC BY-SA 3.0
null
2011-04-11T14:20:19.850
2011-04-11T15:08:21.320
2011-04-11T14:39:24.430
552,422
552,422
[ "asp.net-mvc" ]
5,622,955
1
5,623,629
null
7
276
I would like to be able to design something to what you see when you get an exception in Visual Studio, a sort of window with a line connecting the window to a point in the code window. I've included a picture of this below: ![Example](https://imgur.com/JiMcT.png) I notice that whenever the code window loses focus, the exception window disappears. When focused, though, I can move the window around, and the arrow continues to point at the target. How is this being done? Specifically, ? I'm coding in C# and using Windows Forms.
How can I create a window with an arrow pointing to another window?
CC BY-SA 3.0
0
2011-04-11T14:40:09.227
2011-04-11T15:29:25.657
null
null
37,971
[ "c#", "winforms", "user-interface" ]
5,622,997
1
5,623,108
null
1
9,280
I'm just trying to create a tab buttons by putting some hyper links inside list within unordered list. After then i want to change the color of tab when mouse is hovered over it. In my below code i was able to change the color to green but it's not covering the tab, instead some space exists on right and left side of link `<a>` ![enter image description here](https://i.stack.imgur.com/7MWQC.png) ``` <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <title>Insert title here</title> <style type="text/css"> #header ul { list-style: none; margin: 0; } #header li { float: left; padding:10px; padding-left:12px; border: 1px solid #bbb; background:red; margin: 0; } #content { clear:both; } #header a { text-decoration: none; padding: 10px; text-align: center; color:#000000; } #header a:hover { background:#00FF00; } #header{ position:relative; top:20px; } #content{ position:relative; top:60px; } </style> </head> <body> <div id="header"> <h1></h1> <ul> <li><a href="#">This</a></li> <li id="selected"><a href="#">That</a></li> <li><a href="#">The Other</a></li> <li><a href="#">Banana</a></li> </ul> </div> <div id="content"> <p>CONTENT HERE .....</p> </div> </body> </html> ```
background color of <a href> not displaying properly inside list
CC BY-SA 3.0
0
2011-04-11T14:43:09.030
2011-04-11T14:49:42.323
null
null
413,816
[ "html", "css" ]
5,623,072
1
5,624,017
null
90
60,466
I just came across a neat CSS trick. Check out the fiddle... ``` .tooltiptail { display: block; border-color: #ffffff #a0c7ff #ffffff #ffffff; border-style: solid; border-width: 20px; width: 0px; height: 0px; } .anothertail { background-image: url(http://static.jqueryfordesigners.com/demo/images/coda/bubble-tail2.png); display: block; height: 29px; width: 30px; } ``` ``` <div>Cool Trick: <br /> <div class="tooltiptail"></div> </div> <br /> <div>How do I get this effect with only CSS? <br /> <div class="anothertail"></div> </div> ``` This creates a little arrow/triangle-like effect, a "tooltip tail". This blows my mind! Further, is there a way to extend this CSS trick to create an effect as follows: ![enter image description here](https://i.stack.imgur.com/zRBKQ.png) This is an interesting problem. Can this be done using only CSS, ignoring the shadow for now? --- ## UPDATE 1 I figured out a solution to my initial question. Here's the fiddle... [http://jsfiddle.net/duZAx/7/](http://jsfiddle.net/duZAx/7/) HTML ``` <div style="position: relative;">Cool Trick:<br /> <div class="tooltiptail"></div> <div class="tooltiptail2"></div> </div> ``` CSS ``` .tooltiptail { display: block; border-color: #ffffff #a0c7ff #ffffff #ffffff; border-style: solid; border-width: 20px; width: 0px; height: 0px; } .tooltiptail2 { display: block; border-color: transparent #ffffff transparent transparent; border-style: solid; border-width: 18px; width: 0px; height: 0px; position: relative; left: 4px; top: -38px; } ``` Now, how do I exactly mimic the little picture above using pure CSS, including the shadow and having it cross-browser compatible? --- ## UPDATE 2 Here's my solution after a combination of the answers below. I haven't tested it across multiple browsers, but it looks great in Chrome. [http://jsfiddle.net/UnsungHero97/MZXCj/688/](http://jsfiddle.net/UnsungHero97/MZXCj/688/) HTML ``` <div id="toolTip"> <p>i can haz css tooltip</p> <div id="tailShadow"></div> <div id="tail1"></div> <div id="tail2"></div> </div> ``` CSS ``` #toolTip { background-color: #ffffff; border: 1px solid #73a7f0; width: 200px; height: 100px; margin-left: 32px; position:relative; border-radius: 4px; -moz-border-radius: 4px; -webkit-border-radius: 4px; box-shadow: 0px 0px 8px -1px black; -moz-box-shadow: 0px 0px 8px -1px black; -webkit-box-shadow: 0px 0px 8px -1px black; } #toolTip p { padding:10px; } #tailShadow { background-color: transparent; width: 4px; height: 4px; position: absolute; top: 16px; left: -8px; z-index: -10; box-shadow: 0px 0px 8px 1px black; -moz-box-shadow: 0px 0px 8px 1px black; -webkit-box-shadow: 0px 0px 8px 1px black; } #tail1 { width: 0px; height: 0px; border: 10px solid; border-color: transparent #73a7f0 transparent transparent; position:absolute; top: 8px; left: -20px; } #tail2 { width: 0px; height: 0px; border: 10px solid; border-color: transparent #ffffff transparent transparent; position:absolute; left: -18px; top: 8px; } ``` ---
How can I create a "tooltip tail" using pure CSS?
CC BY-SA 3.0
0
2011-04-11T14:46:49.483
2017-01-31T12:50:34.317
2015-12-14T12:42:30.357
2,889,988
196,921
[ "css", "tooltip", "css-shapes" ]
5,623,144
1
null
null
0
3,012
I have been trying this tutorial. It doent show any errors but on emulator only the url that i gave is appearing! my connection string was: ``` public static final String KEY_121 = "http://10.0.2.2/index.php"; ``` (i used 10.0.2.2 as i am working on local host) when i checked my logcat it showed me dis: ``` error parsing data org.json.JsonException: Value <br of type java.lang.String cannot be converted to JSONArray ``` I really dont know whats wrong with my code. Can anyone please help me. I really need help on this for my final year project. This is my android java code ``` import java.io.BufferedReader; import java.io.InputStream; import java.io.InputStreamReader; import java.util.ArrayList; import org.apache.http.HttpEntity; import org.apache.http.HttpResponse; import org.apache.http.NameValuePair; import org.apache.http.client.HttpClient; import org.apache.http.client.methods.HttpPost; import org.apache.http.impl.client.DefaultHttpClient; import org.apache.http.message.BasicNameValuePair; import org.json.JSONArray; import org.json.JSONException; import org.json.JSONObject; import android.app.Activity; import android.os.Bundle; import android.util.Log; import android.widget.LinearLayout; import android.widget.TextView; public class main extends Activity { /** Called when the activity is first created. */ TextView txt1, txt2; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); // Create a crude view - this should really be set via the layout // resources // but since its an example saves declaring them in the XML. txt1 = (TextView) findViewById(R.id.ip); LinearLayout rootLayout = new LinearLayout(getApplicationContext()); txt1 = new TextView(getApplicationContext()); rootLayout.addView(txt1); setContentView(rootLayout); // Set the text and call the connect function. txt1.setText("Connecting..."); // call the method to run the data retreival txt1.setText(getServerData(KEY_121)); } public static final String KEY_121 = "http://10.0.2.2/index.php"; private String getServerData(String returnString) { InputStream is = null; String result = ""; // the year data to send ArrayList<NameValuePair> nameValuePairs = new ArrayList<NameValuePair>(); nameValuePairs.add(new BasicNameValuePair("year", "1970")); try { HttpClient httpclient = new DefaultHttpClient(); HttpPost httppost = new HttpPost(KEY_121); HttpResponse response = httpclient.execute(httppost); HttpEntity entity = response.getEntity(); is = entity.getContent(); } catch (Exception e) { Log.e("log_tag", "Error in http connection " + e.toString()); } // convert response to string try { BufferedReader reader = new BufferedReader(new InputStreamReader( is, "iso-8859-1"), 8); StringBuilder sb = new StringBuilder(); String line = null; while ((line = reader.readLine()) != null) { sb.append(line + "\n"); } is.close(); result = sb.toString(); } catch (Exception e) { Log.e("log_tag", "Error converting result " + e.toString()); } // parse json data try { JSONArray jArray = new JSONArray(result); for (int i = 0; i < jArray.length(); i++) { JSONObject json_data = jArray.getJSONObject(i); Log.i("log_tag", "longitude: " + json_data.getDouble("longitude") + ", latitude: " + json_data.getDouble("latitude")); // Get an output to the screen returnString += "\n\t" + jArray.getJSONObject(i); } } catch (JSONException e) { Log.e("log_tag", "Error parsing data " + e.toString()); } return returnString; } } ``` This is my php code ``` <?php mysql_connect("localhost","root","sugi"); mysql_select_db("android"); $q=mysql_query("SELECT * FROM people WHERE birthyear>'".$_REQUEST['year']."'"); while($e=mysql_fetch_assoc($q)) $output[]=$e; print(json_encode($output)); mysql_close(); ?> ``` This is mysql query ``` CREATE TABLE people ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY , name VARCHAR( 100 ) NOT NULL , sex BOOL NOT NULL DEFAULT '1', birthyear INT NOT NULL ) ``` This is what its display when i type "[http://10.0.2.2/index.php](http://10.0.2.2/index.php)" on IE ![enter image description here](https://i.stack.imgur.com/S49cb.png)
connecting android to mysql database
CC BY-SA 3.0
0
2011-04-11T14:51:54.837
2011-09-23T05:11:18.170
2011-04-11T14:54:07.507
473,070
546,829
[ "android", "mysql" ]
5,623,504
1
5,623,587
null
1
210
I am running a SQL query that only returns a portion of the entire data. In other words, the data is 'framed.' I have an 'ORDER(ORDER BY' part and for whatever reason, that part isn't working all of the time. Sometimes I get what I expect, and other times I don't. The query: ``` SELECT * FROM ( SELECT ROW_NUMBER() OVER(ORDER BY [datetime] DESC, timeMicroSec DESC) AS rowNum, ... FROM ... WHERE ... ) AS TempTbl WHERE rowNum BETWEEN @startRow AND @endRow; ``` The whole data query works when it is not framed and I use an 'ORDER BY' clause at the end. In the image below, the [datetime] column and the [timeMicroSec] column are joined with string concatenation. ![View of ordering of results from this query](https://i.stack.imgur.com/1rZn1.png) As you can see, the ordering is all messed up. Any help would be appreciated.
SQL Framing Query Problem
CC BY-SA 3.0
null
2011-04-11T15:18:00.137
2011-04-11T16:19:43.680
null
null
539,211
[ "sql", "sql-server", "sql-server-2008" ]
5,623,635
1
5,624,377
null
6
11,925
How do I add some spaces between each row of the table. I try this ``` <p:dataTable styleClass="yourTableClass"> <p:column style="background-color: ##EFF2F9"> //Content here </p:column> </p:dataTable> ``` but it does not work I used primefaces 2.2.1 ![enter image description here](https://i.stack.imgur.com/I0ZVf.png)
How to add spaces between each row in dataTable
CC BY-SA 3.0
null
2011-04-11T15:28:52.437
2011-04-11T17:03:43.810
2011-04-11T16:52:49.727
240,337
240,337
[ "css", "jsf", "primefaces" ]
5,623,815
1
5,623,950
null
1
287
In the case where my user uploads an excel file with only one worksheet, I want to intelligently use only that worksheet. However, when I pull the schema for this file I see an unexpected worksheet (circled): ![Unexpected worksheet in an excel schema](https://i.stack.imgur.com/xbcbh.png) The schema is retrieved via: ``` OleDBConnection.GetSchema("Tables") ``` In this case, it looks like the second worksheet is a filter defined by the user to "peg" two columns from scrolling. : Is it safe for me to ignore worksheets with "$<filter>" appended? Put another way, if I run through all the worksheets, throwing out the "$<filter>" types, and find that there is only one left, is it a reasonable default to use that worksheet? Does anyone have a reference? Thanks!
How to select the default worksheet from an excel file
CC BY-SA 3.0
null
2011-04-11T15:41:11.777
2011-06-15T13:45:38.873
2011-06-15T13:20:38.717
188,474
188,474
[ "excel", "oledb" ]
5,624,367
1
5,625,059
null
3
2,653
I am using blockui for "Wait ... loading" pop up. It is working fine, but has one small issue: the overlay is covering only captured screen, not scroll window. If I scroll right, the width is not fully covered (but height is covered fully). I have only width has problem. ``` <script language="javascript" type="text/javascript"> $(document).ready(function () { jQuery('#myAlert').click(function () { jQuery.blockUI({ message: '<center> <img src="/_layouts/1033/styles/ajax-loaderbar.gif" alt="Loading.." /> <br /> <font size="2" face="Arial" > <b> Please wait... </b></font></center><br /> <font size="2" face="Arial" ><b>while we load all your information.</b></font>'}); }); }); </script> ``` ![enter image description here](https://i.stack.imgur.com/zioZe.jpg)
blockui overlay not covering whole page?
CC BY-SA 3.0
null
2011-04-11T16:22:23.117
2011-11-14T01:21:51.307
2011-11-14T01:21:51.307
286,340
158,008
[ "javascript", "jquery", "asp.net" ]
5,624,660
1
5,624,841
null
3
539
I’m building a simple web application consisting of a canvas and elements on the canvas. The canvas supports the following operations: load, save The elements support the following operations: move, resize JavaScript on the web page sends a message to the server for each operation and the server sends an appropriate response. ![enter image description here](https://i.stack.imgur.com/dLPSz.png) Note: the arrow between the Canvas and Element objects is supposed to denote that the Canvas object contains a list of Element objects. I didn't have the right symbols for the diagram. 1. An element on the canvas is moved generating an element_moved message. 2. The front controller manages the session and passes the message to the canvas controller with the correct canvas object. 3. The canvas controller inspects the message and sees that it is for an element on the canvas and passes it on to the element controller. 4. The element controller parses the message and updates the appropriate element object directly. Is this hierarchical arrangement of controllers common place in MVC designs or am I completely missing the point? I've searched for several hours but haven't found any sites which discuss MVC design in more depth than simply returning a page view. My motivation behind the design was that each object that the client needs to interact with has a controller so that if the interface changes (to support new methods) then the corresponding controller can be updated without impacting the other parts of the design.
MVC Design - How many controllers?
CC BY-SA 3.0
null
2011-04-11T16:46:33.290
2021-02-03T12:30:05.767
null
null
338,173
[ "model-view-controller", "servlets" ]
5,624,754
1
5,624,943
null
1
1,486
I want to get the pitch of a song at any point. I plan on storing the pitches later. How can I read say... an mp3 file or wav file to get the pitch played at a certain point? Here is a visual example: ![enter image description here](https://i.stack.imgur.com/6w0BW.jpg) Say I wanted to get the pitch that is here at ^this point of the song. Thanks if you can!
Getting Pitch with VB.net
CC BY-SA 3.0
0
2011-04-11T16:56:42.610
2011-04-11T17:12:54.457
2011-04-11T17:03:23.227
595,437
595,437
[ "vb.net", "audio", "mp3", "wav" ]
5,625,146
1
5,625,213
null
0
1,632
I have a date picker control that I use for a data collection application. It is using MvvM data binding. When going through a list of dates (see fig1) it will populate the date picker correctly. Whenever I hit new, the date pickers are nulled out. When I pull up the popup, it selects the month and year from the previous date that was set to. (fig 2) Is there anyway to default the pop up show the current month in the current year? Note : I would like to keep the selected date to null on a new entry to force some validation. ![Fig 1](https://i.stack.imgur.com/IyLam.png) Fig 1 ![Fig 2](https://i.stack.imgur.com/VJXdn.png) Fig 2 The following image is to show what happens when I set the DisplayDateStart.![fig 3](https://i.stack.imgur.com/fTWVg.png)
Configuring the Date Popup on the WPF DatePicker Control
CC BY-SA 3.0
null
2011-04-11T17:32:21.470
2011-04-11T18:07:50.687
2011-04-11T17:53:08.340
271,977
271,977
[ "c#", "wpf", "datepicker" ]
5,625,153
1
5,625,346
null
0
505
I'm using Entity Framework 4 as my ORM on a Windows Forms application. I have a series of UserControls that function as if they were forms or areas inside my MainForm.cs. The reason I did this was to easily interchange what to display in the 'content' block of the form. ![enter image description here](https://i.stack.imgur.com/Eepl6.png) So when I click on the buttons (on the left), I .Clear() whatever controls is currently in the 'content' block and add the select form. Here's the relevant code: ``` private void navigationBar_Click(object sender, EventArgs e) { //panelHolder is a regular Winforms Panel control. panelHolder.Controls.Clear(); switch (sender.ToString()) { case "alumnos": var studentForm = new Students.StudentListerForm(); panelHolder.Controls.Add(studentForm); break; case "personal": var personalForm = new Personal.PersonalListerForm(); panelHolder.Controls.Add(personalForm); break; case "atendencia": var atendenciaForm = new Attendance.StudentAttendanceForm(); atendenciaForm.ShowDialog(); break; case "cursos": var gradeForm = new Grades.GradeListerForm(); panelHolder.Controls.Add(gradeForm); break; case "centralizador": MessageBox.Show("est"); break; case "libretas": Scores.StudentScores scores = new Scores.StudentScores(); panelHolder.Controls.Add(scores); break; } } ``` Now, each UserControl manages it's own creation and usage of the data context. Inside of each of these controls I have code for example: ``` using (GradeRepository repo = new GradeRepository()) { cmbGrade.DataSource = repo.FindAllGrades(); } ``` And here's the code for GradeRepository: ``` public class GradeRepository : IDisposable { ColegioDBV2Entities db = new ColegioDBV2Entities(); public IQueryable<Grade> FindAllGrades() { return db.Grades; } public void Add(Grade grade) { db.AddToGrades(grade); } public void SaveChanges() { db.SaveChanges(); } public void Dispose() { db.Dispose(); } } ``` This ensure I use the context, get data, close it and dispose of it. My problem lies when I click on one of the buttons I told you about up top, the `panelHolder.Controls.Clear();` line fires [ObjectDisposedException](http://msdn.microsoft.com/en-us/library/system.objectdisposedexception.aspx). I've temporarily solved this by removing the using statements in the relevant areas, so it now looks like: ``` GradeRepository repo = new GradeRepository(); cmbGrade.DataSource = repo.FindAllGrades(); ``` Can anybody suggest a correct way to tackle this problem? Will the .Clear() method successfully dispose of any objects, so using a `using` statement is not needed? Thank you for your time.
How to correctly solve this situation regarding DataContext, IDisposable and Controls.Clear()
CC BY-SA 3.0
null
2011-04-11T17:33:04.257
2011-04-11T17:52:18.010
2011-04-11T17:45:19.503
699,978
699,978
[ "c#", "winforms", "entity-framework-4", "datacontext", "idisposable" ]
5,625,330
1
5,625,423
null
2
143
I want to create a good looking separator for my web app: ![enter image description here](https://i.stack.imgur.com/7YF71.png) Here is the code: [http://jsfiddle.net/sAUvk/](http://jsfiddle.net/sAUvk/) It works fine with Firefox (v4) but Chrome (v10) just shows the middle column. When I set the width of the left and right column manually it works too, but I want them to fill the space which is left. Any ideas? ``
Dynamic width in table column for webkit
CC BY-SA 3.0
null
2011-04-11T17:50:48.513
2017-05-19T07:30:50.680
2017-05-19T07:30:50.680
4,370,109
578,325
[ "html", "css", "webkit" ]
5,625,380
1
5,626,752
null
0
380
UserForm 2 = 36 buttons (btn1 thru btn36) Each button has an image on it. When I click the "ADD" button I would like for three randon images that are on the buttons to show up in UserForm 1 three lables where it says Random Image 1. ![Right now when I click the "ADD" button, it brings up UserForm1. When I click "OK" on UserForm1 I would like to state which three buttons were inserted into UserForm1 on a spreadsheet.](https://i.stack.imgur.com/NVcLZ.png)
Add random images to labels
CC BY-SA 3.0
null
2011-04-11T17:56:05.927
2011-04-11T19:54:27.570
2011-04-11T19:42:00.697
640,015
640,015
[ "excel", "vba", "userform" ]
5,625,402
1
5,625,595
null
2
2,633
![three rows, the first and third with no image, and the second with an image](https://i.stack.imgur.com/v0aDq.png) So I've got a DataGrid with an image column and I want to be able to hide the "Browse..." hyperlink when the Image has a valid (non-null) Source. How can that be done? Here's my XAML: ``` <DataGridTemplateColumn Header="Image"> <DataGridTemplateColumn.CellTemplate> <DataTemplate> <Button Command="{Binding ChangeImageCommand}"> <Button.Template> <ControlTemplate> <Grid> <TextBlock HorizontalAlignment="Center" VerticalAlignment="Center"> <Hyperlink Command="{Binding ChangeImageCommand}">Browse...</Hyperlink> </TextBlock> <Image Source="{Binding Image}" Margin="0"/> </Grid> </ControlTemplate> </Button.Template> </Button> </DataTemplate> </DataGridTemplateColumn.CellTemplate> </DataGridTemplateColumn> ``` Oh, and if there's an easier way to achieve an image button with alternate text, please let me know! :-)
Trigger to hide text when image source is valid (not null)
CC BY-SA 3.0
0
2011-04-11T17:57:42.830
2011-04-11T18:51:19.780
null
null
116,891
[ ".net", "wpf" ]
5,625,460
1
null
null
1
1,222
We have a .NET 2.0 application using WinForms and Infragistics 7.2. The title bar for our application has what appears to a black bar layered on it which is covering the minimize, maximize and close buttons. The buttons are still there (as evidenced by the hover colouring and tooltips in the screen shot) and still work when you click in the correct location, but the buttons themselves are not visible. ![Black Title Bar](https://i.stack.imgur.com/3wQrF.png) This is only happening on a few Win7 machines, and may be theme related? We have other applications using the same framework/technology running on the same machine, but they don't have this problem. At one point a PC had this problem in a debug build running through VS2010, but an installed release (same source code) didn't. We've tried exporting themes from one PC to the other but the problem doesn't appear to be exported with it. Any suggestions would be greatly appreciated!
Black layer on top of title bar (minimize/maximize/close) in Win7
CC BY-SA 3.0
0
2011-04-11T18:02:14.487
2012-01-13T12:45:14.627
null
null
1,484
[ "c#", "windows-7", "infragistics", "aero", "titlebar" ]
5,625,528
1
5,630,146
null
0
1,239
I'm really new to iPhone development and Stack Overflow questions. I've been doing my first app since January. My app has a memory leak related to SBJsonParser. After some googling I found another [post](https://stackoverflow.com/questions/4983534/iphone-objective-c-memory-leak-with-sbjsonparser) here on stackoverflow. Thanks to the function that Konrad77 posted on his [answer](https://stackoverflow.com/questions/4983534/iphone-objective-c-memory-leak-with-sbjsonparser/4983610#4983610), I changed some lines of my app. But I'm still getting memory leaks. I would appreciate some help. I'm using AsiHttpRequest 1.8 and JSONframework 3.0beta1. Instruments tell me that the leak is on the following line of MyLists.m for 99.2%: ``` resultObject = [self.model JSONObjectForRequest:request]; ``` The other 0.8% goes to the following line of MyLists.m: ``` [self.model.myLists addObject:userData]; ``` Both of previous lines are inside listaGetRequestOnResult function. Here you have all related code: ``` #import <UIKit/UIKit.h> #import "Model.h" #import "ASIFormDataRequest.h" @interface MyLists : UITableViewController { Model *model; NSObject *resultObject; } @property (assign) Model *model; @property (nonatomic,assign) NSObject *resultObject; @end ``` ``` #import "MyLists.h" #import "ASIFormDataRequest.h" @implementation MyLists @synthesize model; @synthesize resultObject; -(void)loadListData {     [self showWaitPopup:CARGANDO];     //Remote listaGet operation     NSURL *url = [NSURL URLWithString:self.model.operationsURL];     ASIFormDataRequest *postRequest = [ASIFormDataRequest requestWithURL:url];     [postRequest setPostValue:@"listaGet" forKey:@"action"];     [postRequest setPostValue:@"JSON" forKey:@"format"];     [postRequest setDelegate:self];     [postRequest setDidFinishSelector:@selector(listaGetRequestOnResult:)];     [postRequest setDidFailSelector:@selector(listaGetRequestOnFault:)];     [postRequest startAsynchronous]; } - (void)listaGetRequestOnResult:(ASIFormDataRequest *)request {     [self hideWaitPopup:CARGANDO];     resultObject = [self.model JSONObjectForRequest:request];     NSDictionary *data = (NSDictionary *)resultObject;     NSNumber *errorCode = [data valueForKey:@"errorCode"];     if ([errorCode intValue] == 0) {         //Remote operation did end successfully         NSMutableArray *userData = [data valueForKey:@"data"];         //Set list into model For now, only one component for the table         [self reinitializeTableList:FALSE];         self.model.myLists = [[NSMutableArray alloc] init];         [self.model.myLists addObject:userData];         [self.model.myLists retain];     } else {         //Remote operation did end succesfully but returned and error         [model reportError:[data valueForKey:@"errorText"] withTitle:@"Error"];         [self reinitializeTableList:FALSE];     }     [self.tableView reloadData]; } - (void)listaGetRequestOnFault:(ASIFormDataRequest *)request {     [self hideWaitPopup:CARGANDO];     NSError *error = [request error];     [model reportError:[error localizedDescription] withTitle:@"Error de conexión"];     [self reinitializeTableList:TRUE]; } -(void)reinitializeTableList:(BOOL)reloadTableData {     if (self.model.myLists) {         [self.model.myLists release];     }     self.model.myLists = nil;     if (reloadTableData) {         [self.tableView reloadData];     } } - (void)viewDidLoad { self.model = [Model getModel]; [super viewDidLoad]; } - (void)viewWillAppear:(BOOL)animated { [self loadListData]; [super viewWillAppear:animated]; } - (void)dealloc {     model = nil;     resultObject = nil;     [super dealloc]; } @end ``` ``` #import <Foundation/Foundation.h> #import "ASIHTTPRequest.h" @interface Model : NSObject { NSString *operationsURL; NSString *imagesBaseURL; NSMutableArray *myLists; } @property (retain) NSString *operationsURL; @property (retain) NSString *imagesBaseURL; @property (retain) NSMutableArray *myLists; + (Model*) getModel; //+ (id) allocWithZone:(NSZone *) zone; + (void) initModel; - (void)reportError:(NSString*)mensaje withTitle:(NSString*)withTitle; - (NSObject*)JSONObjectForRequest:(ASIFormDataRequest *)request; @end ``` ``` #import "Model.h" #import "ASIHTTPRequest.h" #import "JSON.h" @implementation Model static Model *uniqueInstance = nil; @synthesize operationsURL; @synthesize imagesBaseURL; @synthesize myLists; + (Model*) getModel { @synchronized(self) { if (uniqueInstance == nil) { uniqueInstance = [[Model alloc] init]; [self initModel]; } } return uniqueInstance; } /*+ (id) allocWithZone:(NSZone *) zone { @synchronized(self) { if (uniqueInstance == nil) { uniqueInstance = [super allocWithZone:zone]; return uniqueInstance; } } return nil; }*/ + (void) initModel { //URL uniqueInstance.operationsURL=[NSString stringWithFormat:@"SOME_URL"]; uniqueInstance.imagesBaseURL=[NSString stringWithFormat:@"SOME_URL"]; } -(void)reportError:(NSString*)mensaje withTitle:(NSString*)withTitle { UIAlertView *alertDialog; alertDialog = [[UIAlertView alloc] initWithTitle:withTitle message:[NSString stringWithFormat:@"%@",mensaje] delegate: nil cancelButtonTitle: @"Aceptar" otherButtonTitles:nil]; [alertDialog show]; [alertDialog release]; } - (NSObject*)JSONObjectForRequest:(ASIFormDataRequest *)request { SBJsonParser *jsonParser = [SBJsonParser new]; NSObject *object=[jsonParser objectWithString:[request responseString] error:nil]; if (object == nil) { [self reportError:[jsonParser error] withTitle:@"Error librería JSON"]; } [jsonParser release], jsonParser = nil; return object; } - (void)dealloc { [operationsURL release]; [imagesBaseURL release]; [myLists release]; [super dealloc]; } @end ``` Here you have screenshots of Instruments: ![Instruments leaks 1](https://i.stack.imgur.com/KSx7c.png) ![Instruments leaks 2](https://i.stack.imgur.com/dZ46F.png) Thanks in advance!
iPhone - Another Objective-C Memory leak with SBJsonParser
CC BY-SA 3.0
null
2011-04-11T18:09:23.853
2011-04-12T03:54:07.367
2017-05-23T12:24:45.570
-1
687,785
[ "iphone", "objective-c", "json", "memory-leaks", "asihttprequest" ]
5,625,723
1
5,625,853
null
0
387
Background: I have a winForm app that registers a user in the database based on the information provided, auto-generates a random password and username, and e-mails the user a link to take an application based on the marketing company selected. Problem: - How do I fix this issue Here's a screenshot of the web app: ![web app screenshot](https://i.stack.imgur.com/An6Qf.jpg) Here's the code of the Send_Button_Click method off default.asx.vb: ``` Private Sub Send_Button_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Send_Button.Click 'TODO Add code to validate that all selections that are reaquired are met. 'ccemail and the additional message are not required Dim firstname As String = txtFirstName.Text Dim lastname As String = txtLastName.Text Dim ccEmail As String = txtccEmail.Text Dim sb As New StringBuilder sb.AppendLine("<?xml version=""1.0"" encoding=""utf-8""?>") sb.AppendLine("<root>") sb.AppendLine("<MarketingCompany>") sb.AppendLine("<MarketingCompanyName>") ''Get Marketing Company Short Name Dim splitMC As String() = Split(marketingCo.SelectedItem, "|") Dim MCShort As String = Trim(splitMC(0)) sb.AppendLine(String.Format("<MCNAme>{0}</MCNAme>", MCShort)) 'sb.AppendLine(String.Format("<MCNAme>{0}</MCNAme>", My.Settings.MarketingCompanyShortName)) sb.AppendLine(String.Format("<ccEmail>{0}</ccEmail>", txtccEmail.Text)) sb.AppendLine(String.Format("<emailMessage>{0}</emailMessage>", txtMessage.Text)) sb.AppendLine(String.Format("<MarketerName>{0}</MarketerName>", txtMarketerName.Text)) sb.AppendLine("<agent>") sb.AppendLine(String.Format("<FirstName>{0}</FirstName>", txtFirstName.Text)) sb.AppendLine(String.Format("<LastName>{0}</LastName>", txtLastName.Text)) sb.AppendLine(String.Format("<Email>{0}</Email>", txtEmail.Text)) sb.AppendLine("<CRMGuid>123456</CRMGuid>") Dim spltBundles() As String For Each item In bundles.Items If Trim(item) <> "" Then spltBundles = Split(item, "|") sb.AppendLine("<ContractingOpportunity>") sb.AppendLine(String.Format("<Carrier>{0}</Carrier>", Trim(spltBundles(0)))) sb.AppendLine(String.Format("<ContractingOpportunityName>{0}</ContractingOpportunityName>", Trim(spltBundles(1)))) sb.AppendLine("</ContractingOpportunity>") End If Next sb.AppendLine("</agent>") sb.AppendLine("</MarketingCompanyName>") sb.AppendLine(" </MarketingCompany>") sb.AppendLine(" </root>") Dim xmlStr = sb.ToString Dim int1 As Boolean = proxy.AddContractOpportunity(xmlStr.ToString, "test", "test") MsgBox("aComp Invitation Sent! :)") End Sub ```
ASP.NET w/ VB.NET - Winforms to Web - NullReferenceException Error on string split / string builder
CC BY-SA 3.0
null
2011-04-11T18:27:25.943
2011-04-11T20:48:19.323
2011-04-11T18:41:39.803
606,805
606,805
[ "vb.net", "error-handling", "stringbuilder", "split", "winforms-to-web" ]
5,625,899
1
5,626,229
null
0
154
I want to create images at runtime with different format and color, here are some sample images that I want to create and my text in it.. ![enter image description here](https://i.stack.imgur.com/pJIB8.png) ![enter image description here](https://i.stack.imgur.com/REgLU.png) ![enter image description here](https://i.stack.imgur.com/4hbNw.png) ![enter image description here](https://i.stack.imgur.com/Mxljw.png) ![enter image description here](https://i.stack.imgur.com/9uEWM.png) I will write text to any format and particular format will be created Please give me some clue, so that I solve. here is an running [Example](http://cheerzone.com/Lettering/ImageGenerator.aspx?text=AKHTAR&font_family=Broadway&layout_style=DoubleArch&background_style=TwoColorOval&color_style=TwoColors&color1=FFD700&color2=32CD32&color3=800080&width=400) Thanks
Create images with Different format with Text
CC BY-SA 3.0
null
2011-04-11T18:41:59.057
2011-04-11T19:09:13.147
null
null
97,010
[ "c#", "asp.net", "shapes" ]
5,626,059
1
5,626,133
null
0
1,007
Background: I have a winForm app that registers a user in the database based on the information provided, auto-generates a random password and username, and e-mails the user a link to take an application based on the marketing company selected. Problem: - ![web app screenshot](https://i.stack.imgur.com/4UWXU.jpg) Code from default.aspx.vb: ``` Private Sub lbCarriers_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles lbCarriers.LostFocus Dim splt() As String Dim ac1 As Array bundles.Items.Clear() For Each item In lbCarriers.Items splt = Split(item.text, "|") ac1 = proxy.GetContractingBundles("test", "test", Trim(splt(0))) For Each Pitem In ac1 bundles.Items.Add(Trim(splt(2)) & " | " & Pitem.FormBundleName) Next Next End Sub Protected Sub lbCarriers_SelectedIndexChanged(ByVal sender As Object, ByVal e As EventArgs) Handles lbCarriers.SelectedIndexChanged End Sub ```
ASP.NET VB.NET - Winforms to Web - implementing LostFocus listview control equivalent for web
CC BY-SA 3.0
null
2011-04-11T18:53:34.853
2011-04-12T12:47:42.623
2011-04-12T12:47:42.623
606,805
606,805
[ "vb.net", "listview", "autopostback", "winforms-to-web", "lostfocus" ]
5,626,311
1
5,626,431
null
5
2,754
I'm at a client site where they have an application which began in SharePoint and is slowly migrating away to a very custom ASP.NET application. Some of their data elements are still hosted within SharePoint lists, two of which currently in question are some "Notes" and "Tasks" (fairly simple data elements in their SharePoint setup, nothing special about them). One of the things I need to be able to do from within ASP.NET is to automatically create some new items for these lists and add them from code. So far it's pretty easy. I found the existing web part which handled the editing for those items, attached the debugger to it, tracked how it got its values and what it added to the list, etc. However, one of the fields being added to the list item isn't quite as obvious. In the existing web part UI, the field looks like this: ![Assigned To field](https://i.stack.imgur.com/XSGWj.png) Essentially, it's a field for entering a user from the current Windows domain. The book icon opens a pop-up which allows the user to search for a name, etc. In my current testing, I'm running as local Administrator on a development machine. So I just look for "admin" in the pop-up and it populates the field with "[machine name]\Administrator" as expected. Then, in debugging, the value that gets pulled from the field and entered into the SharePoint list item is "1" as opposed to a name or anything like that. I assume that "1" is an identifier for the local admin account. Makes sense, after all. But my question is, how can I get that identifier for the current logged-in user in code? I've found code to get the current user's name, but not any kind of numeric (even though it's a string) ID. Additionally, this wouldn't just be happening inside of an ASP.NET application context. There's also a WPF client application for laptops which would be generating these list items and synchronizing them back to the server when connected. I'm currently operating on the assumption that the client user would be logged in with a proper domain account known to the server. I imagine this is pretty easy, I just haven't stumbled across what I need quite yet.
Get the ID? of the current user like SharePoint can?
CC BY-SA 3.0
null
2011-04-11T19:16:20.033
2011-04-11T19:32:32.680
null
null
328,193
[ "asp.net", "wpf", "sharepoint", "windowsdomainaccount" ]
5,626,409
1
null
null
6
1,633
I'm currently upgrading an app from Flex 4.1 to 4.5 We've noticed that the Arial font is rendered differently between the two versions when used at small sizes. Here's a simple app example: ``` <?xml version="1.0" encoding="utf-8"?> <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600"> <fx:Style> @namespace s "library://ns.adobe.com/flex/spark"; @namespace mx "library://ns.adobe.com/flex/mx"; @font-face { src: url("/assets/fonts/ARIAL.ttf"); fontFamily: arial; embedAsCFF: true; } @font-face { src: url("/assets/fonts/ARIALBD.ttf"); fontFamily: arial; embedAsCFF: true; font-weight: bold; } global { font-family: arial; } </fx:Style> <s:Label text="Hello world" fontWeight="bold" x="20" y="20" /> </s:Application> ``` When run against the 2 different sdks, here's an image of the font rendering we get: ![Example of font issues](https://i.stack.imgur.com/IgL0A.png) Note that in 4.5 the font looks slightly squashed. What's the cause of this, and how do we resolve it?
Flex font rendering differences from 4.1 to 4.5
CC BY-SA 3.0
0
2011-04-11T19:25:37.610
2011-05-19T15:18:12.017
null
null
59,015
[ "apache-flex", "flex4" ]
5,626,494
1
5,626,723
null
0
1,136
I am having trouble centering these two elements. I'm not sure what my problem is. Hopefully someone can help me out. First here is an screenshot of what is going on: ![enter image description here](https://i.stack.imgur.com/8auiZ.png) So how do I get these elements vertically centered? Here is my HTML and CSS: ``` <div class="vcenter"> <p> <a href="http://www.google.com">JimDaniel</a> <a href="http://www.cnn.com"><img src="icon.png"/></a> </p> </div> .vcenter { padding:10px; background-color:darkBlue; min-height: 25px; display: table-cell; vertical-align: middle; } ``` Thanks for the help!
How can I vertically center side-by-side anchor and anchor-image tags?
CC BY-SA 3.0
null
2011-04-11T19:32:35.387
2011-04-11T19:51:40.633
null
null
63
[ "html", "css", "vertical-alignment" ]
5,626,596
1
5,626,742
null
0
199
What I am trying to achieve is showing a view during a couple of seconds without user intervention. Is the same effect as the ringer volume view that appears when pressing the volume controls on iphone: ![ringer](https://i.stack.imgur.com/thiyz.png) I have a scroll view with an image, taping in the image, sound begin to play, another tap and it pauses. I would like to implement the above effect just to inform of the action (showing a play/pause images). I hope that I have explained the problem perfectly. Many thanks for your help. Regards Javi
Showing a subview temporary
CC BY-SA 3.0
0
2011-04-11T19:41:01.800
2011-04-11T19:59:01.700
2011-04-11T19:59:01.700
355,130
131,937
[ "iphone", "objective-c", "cocoa-touch", "ios", "uiview" ]
5,627,190
1
5,627,577
null
4
795
We're having an issue with layered windows and system menus in Delphi 2009. That is, our layered windows (which have no border) have no system menu. When I say system menu, I am referring to the menu you get when clicking an application's icon, right clicking it's title-bar or (in Windows 7, with the addition of the shift key,) right clicking an application in the task-bar: ![Control Menus](https://i.stack.imgur.com/1zVqY.png) When you attempt to access the system menu, e.g. by right-clicking on the task-bar icon, of such a layered window, instead the layered window is risen. Why is this? Is there some sort of style to set, or some sort of event to handle? Here's a hastily made demo showing the issue. It can really be reproduced with any form with a bsNone borderstyle, though. [http://ompldr.org/vODd5dw](http://ompldr.org/vODd5dw)
System Menu for Layered Windows?
CC BY-SA 3.0
null
2011-04-11T20:30:46.147
2011-04-11T21:29:27.587
2011-04-11T21:29:27.587
505,088
610,744
[ "delphi", "winapi", "vcl", "layered-windows", "systemmenu" ]
5,627,361
1
5,627,506
null
2
1,355
How is this possible? I configured my iPhone app like this: ![enter image description here](https://i.stack.imgur.com/Zq8bW.png) ![enter image description here](https://i.stack.imgur.com/xJroO.png) ![enter image description here](https://i.stack.imgur.com/oN7gs.png) ![enter image description here](https://i.stack.imgur.com/PVH4g.png) I pushed it into the App Store and now Apple says: > You have indicated that your binary requires iOS 4.3 or later. Apps that require iOS 4.3 or later will not be available to Verizon iPhone users. Do I have to change the Base SDK to target iPhone 3.0 platform??? How can I do this? Thx! ANSWER: If you leave the default 3.0 value the iOS Deployment Target is not shown/set which means the latest iOS will be selected? This is the xcode4 bug I beleave.
iphone: deployment target
CC BY-SA 3.0
null
2011-04-11T20:46:54.167
2011-04-12T07:37:34.473
2011-04-12T07:37:34.473
132,257
132,257
[ "iphone", "deployment", "appstore-approval" ]
5,627,482
1
5,699,814
null
1
159
I have created a custom ListActivity that shows a list of skills and buttons next to them as well as a number. The list looks something like this: ![enter image description here](https://i.stack.imgur.com/m3qgU.png) The skill names are drawn from a database as are the points (PTS). I need help figuring out how to set the buttons on the side so they are clickable and they increase or decrease their related points column number. I'll try for the double bonus and ask if anyone knows how I can then retrieve all these values and update the database they are drawn from, possibly on a "Finalize" button at the bottom of the screen.
Change number in listview with button(s) on same row
CC BY-SA 3.0
null
2011-04-11T20:57:37.197
2011-05-21T20:03:39.413
null
null
16,631
[ "java", "android", "xml", "click" ]
5,627,558
1
5,628,739
null
0
173
Is it possible to alter the line that the user is currently on in a textarea, separate from any other line in the textarea? Image demonstration: [Click here for the image...](https://i.stack.imgur.com/TwFED.png) ![enter image description here](https://i.stack.imgur.com/HCrYN.png) If it is possible, would you mind showing it to me on [http://jsfiddle.net/](http://jsfiddle.net/) ? Thanks in advance.
How do you alter editing line of textarea?
CC BY-SA 3.0
0
2011-04-11T21:04:33.497
2011-04-12T00:34:10.663
2011-04-11T21:06:10.623
451,969
699,610
[ "javascript", "focus", "textarea" ]
5,627,750
1
5,650,682
null
1
945
I examine heterogeneous trees in ANTLR (using ANTLRWorks 1.4.2). Here is the example of what I have already done in ANTLR. ``` grammar test; options { language = java; output = AST; } tokens { PROGRAM; VAR; } @members { class Program extends CommonTree { public Program(int ttype) { token = new CommonToken(ttype, "<start>"); } } } start : program var function // Works fine: //-> ^(PROGRAM program var function) // Does not work (described below): -> ^(PROGRAM<Program> program var function) ; program : 'program'! ID ';'! ; var : TYPE^ ID ';'! ; function : ID '('! ')'! ';'! ; TYPE : 'int' | 'string' ; ID : ('a'..'z' | 'A'..'Z')+ ; WHITESPACE : (' ' | '\t' '\n'| '\r' | '\f')+ {$channel = HIDDEN;} ; ``` Sample input: ``` program foobar; int foo; bar(); ``` When I use rewrite rule `^(PROGRAM<Program> program var function)`, ANTLR stumbles over and I get AST like this: ![AntLR](https://i.stack.imgur.com/4ijK5.png) Whereas when I use this rewrite rule `^(PROGRAM program var function)` it works: ![enter image description here](https://i.stack.imgur.com/ZorlY.png) 1. Could anyone explain where am I wrong, please? Frankly, I do not really get the idea of heterogeneous trees and how do I use <…> syntax in ANTLR. 2. What do r0 and r1 mean (first picture)?
ANTLR, heterogeneous AST problem
CC BY-SA 3.0
null
2011-04-11T21:24:40.983
2011-04-13T19:54:54.637
2011-04-12T06:20:24.683
50,476
327,761
[ "antlr", "antlr3" ]
5,628,454
1
5,632,365
null
1
1,925
The next code is a part of jBitTorrent API for Java a bit modified by me: ````` if (!torr.saveAs.matches("")) info.put("name", torr.saveAs); else info.put("name", "noDirSpec"); ArrayList files = new ArrayList(); for (int i = 0; i < torr.name.size(); i++) { SortedMap file = new TreeMap(); file.put("length", (Integer) torr.length.get(i)); // String[] path = ((String) torr.name.get(i)).split("\\"); String[] path = ((String) torr.name.get(i)).split("/"); File f = new File((String)(torr.name.get(i))); ArrayList pathList = new ArrayList(path.length); if(f.isFile()) { pathList.add(path[path.length - 1]); } else if(f.isDirectory()) { // ??? } ``` This is torrent file(s) generation. So the «String[] path» is commented because of «\\» doesn't match linux slashes and generate invalid paths. Specification for multiple files is: > And for single file is: > So if I will use the previous code for single file here will be generated this torrent: ![enter image description here](https://i.stack.imgur.com/CthyL.png) And torrent files contains: > Okay. But how I should generate torrent for directory? The problem is that in unmodified API will be generated files with full path from root. But I need something like this: ![enter image description here](https://i.stack.imgur.com/ssZvE.png) And the valid torrent file is: >
Java: How to create torrent file for multiple files or directories?
CC BY-SA 3.0
0
2011-04-11T22:49:36.317
2011-04-12T08:26:15.627
2011-04-11T22:56:54.817
393,186
393,186
[ "java", "bittorrent" ]
5,628,558
1
5,628,648
null
4
2,045
I've been playing with Huffman Compression on images to reduce size while maintaining a lossless image, but I've also read that you can use predictive coding to further compress image data by reducing entropy. From what I understand, in the lossless JPEG standard, each pixel is predicted as the weighted average of the adjacent 4 pixels already encountered in raster order (three above and one to the left). e.g., trying to predict the value of a pixel a based on preceding pixels, x, to the left as well as above a : ``` x x x x a ``` Then calculate and encode the residual (difference between predicted and actual value). But what I don't get is if the average 4 neighbor pixels aren't a multiple of 4, you'd get a fraction right? Should that fraction be ignored? If so, would the proper encoding of an 8 bit image (saved in a `byte[]`) be something like: ``` public static void Encode(byte[] buffer, int width, int height) { var tempBuff = new byte[buffer.Length]; for (int i = 0; i < buffer.Length; i++) { tempBuff[i] = buffer[i]; } for (int i = 1; i < height; i++) { for (int j = 1; j < width - 1; j++) { int offsetUp = ((i - 1) * width) + (j - 1); int offset = (i * width) + (j - 1); int a = tempBuff[offsetUp]; int b = tempBuff[offsetUp + 1]; int c = tempBuff[offsetUp + 2]; int d = tempBuff[offset]; int pixel = tempBuff[offset + 1]; var ave = (a + b + c + d) / 4; var val = (byte)(ave - pixel); buffer[offset + 1] = val; } } } public static void Decode(byte[] buffer, int width, int height) { for (int i = 1; i < height; i++) { for (int j = 1; j < width - 1; j++) { int offsetUp = ((i - 1) * width) + (j - 1); int offset = (i * width) + (j - 1); int a = buffer[offsetUp]; int b = buffer[offsetUp + 1]; int c = buffer[offsetUp + 2]; int d = buffer[offset]; int pixel = buffer[offset + 1]; var ave = (a + b + c + d) / 4; var val = (byte)(ave - pixel); buffer[offset + 1] = val; } } } ``` I don't see how this really will reduce entropy? How will this help compress my images further while still being lossless? Thanks for any enlightenment EDIT: So after playing with the predictive coding images, I noticed that the histogram data shows a lot of +-1's of the varous pixels. This reduces entropy quite a bit in some cases. Here is a screenshot: ![enter image description here](https://i.stack.imgur.com/LiPn6.png)
C# predictive coding for image compression
CC BY-SA 3.0
0
2011-04-11T23:01:46.717
2017-11-20T15:10:42.687
2011-04-12T02:38:56.590
490,326
490,326
[ "c#", "image-processing", "encoding" ]
5,628,958
1
5,630,448
null
0
3,104
My website URL is [http://www.hentaireader.com](http://www.hentaireader.com) At the bottom right corner, I wish to put a small link on the red footer bar. I have created a simple image of what I wish to do. ![http://i53.tinypic.com/2lu2o1l.jpg](https://i.stack.imgur.com/L6awa.jpg) How can I achieve this??
Text on footer Bar
CC BY-SA 3.0
null
2011-04-12T00:08:27.417
2011-04-13T00:30:58.910
2011-04-13T00:30:58.910
428,142
428,142
[ "css", "html" ]
5,629,073
1
5,629,211
null
5
9,537
Does anyone know a way to mimic the UIDatePicker and the even more general UIPicker iOS controls in HTML & JavaScript? ![UIDatePicker](https://i.stack.imgur.com/50VZq.jpg) ![UIPicker](https://i.stack.imgur.com/A4oJg.jpg) Does anyone know of a solution like this? I've seen JavaScript mimics of other iPhone/iPad controls, such as the UIPopoverController. I would really like to be able to offer this way of entering dates (compared to solutions like jQuery UI's datepicker). It looks like it would be easy to use both on a mouse scroll-wheel and on the iPad. So, any advice?
JavaScript Mimics of the iPad's UI (specifically, UIDatePicker and UIPicker)
CC BY-SA 3.0
0
2011-04-12T00:28:56.253
2018-10-09T10:04:35.887
2011-04-12T00:35:21.353
203,104
203,104
[ "javascript", "html", "ipad", "uidatepicker", "jquery-ui-datepicker" ]
5,629,348
1
5,629,367
null
1
705
I've been searching a css form design that looks like below. Could any one tell me whether anyone has already created this? ![enter image description here](https://i.stack.imgur.com/r7p2i.jpg)
Ipad like CSS Form
CC BY-SA 3.0
0
2011-04-12T01:16:30.583
2011-04-12T01:19:20.887
null
null
656,348
[ "css" ]
5,629,583
1
5,629,634
null
0
467
``` <?php // Insert Comments into Database that user provides $comm = mysql_real_escape_string($_POST['addComment']); // following line has changed: $pID4 = filter_var( $_POST['pID'], FILTER_SANITIZE_STRING ); $commentDetail = $_POST['addComment']; $username = "###"; $password = "###"; $pdo4 = new PDO('mysql:host=localhost;dbname=####', $username, $password); $pdo4->setAttribute( PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION ); $sth4 = $pdo4->prepare(' INSERT INTO Comment (info, pID, cID) VALUES(?,?,?) SELECT Comm.cID FROM Professor P, Comment Comm, Course Cou WHERE P.pID = Comm.pID AND Cou.cID = Comm.cID; '); $sth4->execute(array($commentDetail, $pID4, $cID )); ?> ``` ``` <form action='inc/q/prof.php' method='post'> <input type='text' id='addComment' name='addComment' tabindex='3' value='Enter comment' /> <input type='hidden' name='pID' value='<?php echo $pID4; ?>'> </form> ``` ![comm](https://i.stack.imgur.com/WuiT2.png) ![course](https://i.stack.imgur.com/G3DyD.png) ![prof](https://i.stack.imgur.com/ueF56.png) Error still received - I am still getting error: `You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'SELECT Comm.cID FROM Professor P, Comment Comm, Course Cou WHERE P.pID = Comm.p' at line 2\PDOStatement->execute(Array) #1`
How to Update this Table? using Php / Mysql
CC BY-SA 3.0
null
2011-04-12T01:58:05.550
2011-04-12T21:23:46.057
2011-04-12T21:23:46.057
700,070
700,070
[ "php", "mysql" ]
5,629,849
1
5,630,402
null
3
2,477
I need to modify the focus-box's border color of TVirtualStringTree, just like this pic: ![from gray color to red color](https://i.stack.imgur.com/wVyvD.jpg)
How to modify the focus-box color in TVirtualStringTree?
CC BY-SA 3.0
null
2011-04-12T02:47:14.147
2012-03-30T13:14:11.290
2012-03-30T13:14:11.290
744,588
130,075
[ "delphi", "virtualtreeview", "tvirtualstringtree" ]
5,629,838
1
5,630,005
null
0
212
Its been like 3 weeks now that I've been seeking help on this site for this simple save/fetch feature using Core Data but I can't get it to work. I keep getting different suggestions from people and change my code accordingly but can never get it working properly. Its very discouraging that its taken me this long for this simple error yet I did 100x the work in only the week prior to hit. Its really a bummer when learning how to program. TableView blank by default until user inputs a name string via the + button in nav bar. String entered should add a cell to the view with the name as the title. It should be saved to memory and fetched upon relaunch of application. I get the following error @ line: `cell.textLabel.text = [eventsArray objectAtIndex:indexPath.row];` in method of: `- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath` ``` 2011-04-11 22:40:49.824 Curl[2244:207] -[Routine isEqualToString:]: unrecognized selector sent to instance 0x5c09ad0 2011-04-11 22:40:50.005 Curl[2244:207] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[Routine isEqualToString:]: unrecognized selector sent to instance 0x5c09ad0' ``` ![enter image description here](https://i.stack.imgur.com/Bm10k.png) ``` `@implementation RoutineTableViewController @synthesize tableView; @synthesize eventsArray; @synthesize entered; @synthesize managedObjectContext; #pragma mark - View lifecycle - (void)viewDidLoad { if (managedObjectContext == nil) { managedObjectContext = [(CurlAppDelegate *)[[UIApplication sharedApplication] delegate] managedObjectContext]; } NSFetchRequest *request = [[NSFetchRequest alloc] init]; NSEntityDescription *entity = [NSEntityDescription entityForName:@"Routine" inManagedObjectContext:managedObjectContext]; [request setEntity:entity]; NSError *error = nil; NSMutableArray *mutableFetchResults = [[managedObjectContext executeFetchRequest:request error:&error] mutableCopy]; if (mutableFetchResults == nil) { // Handle the error. } [self setEventsArray:mutableFetchResults]; [mutableFetchResults release]; [request release]; UIBarButtonItem * addButton = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemAdd target:self action:@selector(showPrompt)]; [self.navigationItem setLeftBarButtonItem:addButton]; [addButton release]; UIBarButtonItem *editButton = [[UIBarButtonItem alloc]initWithTitle:@"Edit" style:UIBarButtonItemStyleBordered target:self action:@selector(toggleEdit)]; self.navigationItem.rightBarButtonItem = editButton; [editButton release]; [super viewDidLoad]; } - (void)viewDidUnload { self.eventsArray = nil; [super viewDidUnload]; } -(void)toggleEdit { [self.tableView setEditing: !self.tableView.editing animated:YES]; if (self.tableView.editing) [self.navigationItem.rightBarButtonItem setTitle:@"Done"]; else [self.navigationItem.rightBarButtonItem setTitle:@"Edit"]; } - (void)dealloc { [managedObjectContext release]; [eventsArray release]; [super dealloc]; } - (void)didReceiveMemoryWarning { [super didReceiveMemoryWarning]; } #pragma mark - #pragma mark Add an event -(void)addEvent { Routine *routine = (Routine *)[NSEntityDescription insertNewObjectForEntityForName:@"Routine" inManagedObjectContext:managedObjectContext]; routine.name=entered; NSError *error = nil; if (![managedObjectContext save:&error]) { // Handle the error. } NSLog(@"%@", error); [eventsArray insertObject:routine atIndex:0]; NSIndexPath *indexPath = [NSIndexPath indexPathForRow:0 inSection:0]; [self.tableView insertRowsAtIndexPaths:[NSArray arrayWithObject:indexPath] withRowAnimation:UITableViewRowAnimationFade]; [self.tableView scrollToRowAtIndexPath:[NSIndexPath indexPathForRow:0 inSection:0] atScrollPosition:UITableViewScrollPositionTop animated:YES]; } -(void)showPrompt { AlertPrompt *prompt = [AlertPrompt alloc]; prompt = [prompt initWithTitle:@"Add Workout Day" message:@"\n \n Please enter title for workout day" delegate:self cancelButtonTitle:@"Cancel" okButtonTitle:@"Add"]; [prompt show]; [prompt release]; } - (void)alertView:(UIAlertView *)alertView willDismissWithButtonIndex:(NSInteger)buttonIndex { if (buttonIndex != [alertView cancelButtonIndex]) { entered = [(AlertPrompt *)alertView enteredText]; if(eventsArray && entered) { [eventsArray addObject:entered]; [tableView reloadData]; [self addEvent]; } } } #pragma mark - Table view data source - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView { return 1; } - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { return [eventsArray count]; } - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { static NSString *CellIdentifier = @"Cell"; // Dequeue or create a new cell. UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier]; if (cell == nil) { cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:CellIdentifier] autorelease]; } cell.textLabel.text = [eventsArray objectAtIndex:indexPath.row]; cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator; return cell; } // Override to support conditional editing of the table view. - (BOOL)tableView:(UITableView *)tableView canEditRowAtIndexPath:(NSIndexPath *)indexPath { // Return NO if you do not want the specified item to be editable. return YES; } -(void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath { if (editingStyle == UITableViewCellEditingStyleDelete) { // Delete the managed object at the given index path. NSManagedObject *eventToDelete = [eventsArray objectAtIndex:indexPath.row]; [managedObjectContext deleteObject:eventToDelete]; // Update the array and table view. [eventsArray removeObjectAtIndex:indexPath.row]; [tableView deleteRowsAtIndexPaths:[NSArray arrayWithObject:indexPath] withRowAnimation:YES]; // Commit the change. NSError *error = nil; if (![managedObjectContext save:&error]) { // Handle the error. } } }` ```
Can't Seem To Fix This Basic Save/Fetch Request
CC BY-SA 3.0
null
2011-04-12T02:45:07.707
2011-04-12T04:31:31.670
null
null
null
[ "iphone", "objective-c", "core-data" ]
5,629,877
1
5,629,930
null
0
979
This page: [http://alexchen.info/brianfunshine/2011/04/suscipit-lobortis/](http://alexchen.info/brianfunshine/2011/04/suscipit-lobortis/) has the the following output: (I'm using Firefox 4.0) ``` <ul> <li><a href="#">Fred</a></li> <li><a href="#">Killin Brain Cells</a></li> <li><a href="#">Prodigal Son</a></li> <li><a href="#">The Cramper</a></li> <li><a href="#">3 Sheets To The Wind (What&#8217;s My Name)</a></li> <li><a href="#">My Oedipus Complex</a></li> <li><a href="#">Rollin&#8217; On The Island</a></li> <li><a href="#">Rain Check</a></li> <li><a href="#">Trippin With Dick Vitale</a></li> <li><a href="#">T.V. Dinner</a></li> </ul> ``` The unordered list doesn't have any style, but it is invisible! reference picture: ![enter image description here](https://i.stack.imgur.com/qwHO1.png) What's the problem?
Invisible unordered list (and there's no CSS rules on it)?
CC BY-SA 3.0
null
2011-04-12T02:52:59.857
2011-04-12T03:04:03.473
null
null
122,536
[ "html", "css" ]
5,629,944
1
6,224,546
null
4
2,096
I have Eclipse Helios SR1 installed on Windows XP. I am writing/debugging Java code using JDK 1.6. When I debug and I hit a breakpoint, Eclipse is fast to show me the stacktrace. (See #1 in attached image.) However, the source code line highlight (light green, see #2 in attached image) is very slow to appear. Oddly, when I first installed Eclipse, this was very fast. Now it is very slow. It takes about 15 seconds to highlight as light green. Any ideas what is wrong with my Eclipse install/config? FYI: Very fast processor + 4GB of RAM. Plenty of disk space. I have tried a "Hello, World" test Java project. Just a few lines of code... still the same issue when hitting a vanilla breakpoint. ![enter image description here](https://i.stack.imgur.com/l6dRz.jpg)
Helios Eclipse java debugger on Windows is very slow to highlight source code
CC BY-SA 3.0
0
2011-04-12T03:04:38.760
2012-09-13T09:49:23.877
null
null
257,299
[ "java", "windows", "eclipse", "debugging", "performance" ]
5,630,219
1
5,630,300
null
2
252
I have a bitmap where two large blocks of colors intersect, and I would like to find the intersection of these two blocks. ![enter image description here](https://i.stack.imgur.com/bg0Yz.png) Note that I do not know the actual geometry of the two shapes, because this is all just raw pixel data. Is there any algorithm I could use to do this?
Algorithm to find the coordinates of a corner in a simple image
CC BY-SA 3.0
null
2011-04-12T03:54:44.510
2011-04-12T04:39:06.250
2011-04-12T04:39:06.250
571,433
561,309
[ "algorithm", "graphics", "detection", "pixel", "intersection" ]
5,630,511
1
5,630,882
null
1
116
I have an ItemsControl presenting a list of buttons. Each button has an image as it's content (png), but the image looks slightly different for each row. The below image is magnified version of what I'm seeing: ![enter image description here](https://i.stack.imgur.com/6cOex.png) Here is the xaml: ``` <ItemsControl ItemsSource="{Binding Items}"> <ItemsControl.ItemTemplate> <DataTemplate> <StackPanel Orientation="Horizontal"> <TextBlock Name="tb1">hello</TextBlock> <Button Height="{Binding ElementName=tb1, Path=ActualHeight}" Padding="0,-3,-3,-3" BorderBrush="Transparent" Background="Transparent" > <Image Stretch="Fill" Source="stock_standard_filter.png" Margin="0"> </Image> </Button> </StackPanel> </DataTemplate> </ItemsControl.ItemTemplate> </ItemsControl> ``` I've had a [similar issue previously](https://stackoverflow.com/q/5255071/503969) and was able to solve it using `SnapsToDevicePixels="True"`, but that solution is not working this time. I've also tried `UseLayoutRounding="True"` and `RenderOptions.EdgeMode="Aliased"`
Image renders differently depending on position
CC BY-SA 3.0
null
2011-04-12T04:44:07.787
2011-04-12T05:43:34.320
2017-05-23T11:48:22.880
-1
503,969
[ "wpf", "image", "rendering" ]
5,630,561
1
5,637,327
null
1
4,282
Alright, I have a problem on my hands. I'm trying to convert my project to a universal app for the iPhone and the iPad. I'm trying to make iPad-specific versions of my XIB files. As it's not possible to `Create iPad version using autoresizing masks` in Xcode 4, I assumed I'd just be able to pop my XIB into Xcode 3's version of IB, and let that do the magic. No dice. Here's the error I get when i try to open the XIB file in IB: ![enter image description here](https://i.stack.imgur.com/IPtiy.png) To be honest I don't know where to proceed from here. I guess I could just resize my views manually, but that's quite tedious and I don't really have the time to be doing that. Any ideas?
Can't create iPad XIB with Xcode 4
CC BY-SA 3.0
0
2011-04-12T04:52:54.710
2011-04-12T14:59:15.200
null
null
456,851
[ "xcode", "ipad", "interface-builder", "xcode4" ]
5,630,655
1
5,632,034
null
0
3,245
Programmatic setting the window title bar icon is causing every list view item has tile bar icon as background. `setFeatureDrawableResource(Window.FEATURE_LEFT_ICON, R.drawable.ball);` How can i remove the listview background image or set the window title bar icon any other way than programmatic? With window title icon set ![enter image description here](https://i.stack.imgur.com/RXT9x.png) With out window title icon ![enter image description here](https://i.stack.imgur.com/gvsCw.png) --UPDATE ``` <?xml version="1.0" encoding="utf-8"?> <!-- Sets the text styles --> <resources> <style name="CustomWindowTitleText" parent="android:TextAppearance.WindowTitle"> <item name="android:textSize">24dip</item> <item name="android:textColor">#ffffff</item> <item name="android:textStyle">bold</item> <item name="android:typeface">normal</item> </style> <!-- Changes the background color of the title bar --> <style name="CustomWindowTitleBackground"> <item name="android:background">@drawable/bg_gradient_05</item> <item name="android:paddingLeft">10dp</item> </style> <!-- Set the theme for the window title --> <!-- NOTE: setting android:textAppearence to style defined above --> <style name="CustomWindowTitle" parent="android:WindowTitle"> <item name="android:textAppearance">@style/CustomWindowTitleText</item> <item name="android:shadowDx">0</item> <item name="android:shadowDy">0</item> <item name="android:shadowRadius">0</item> <item name="android:shadowColor">#a0a0a0</item> </style> <!-- Override properties in the default theme --> <!-- NOTE: you must explicitly the windowTitleSize property, the title bar will not re-size automatically, text will be clipped --> <style name="CustomTheme" parent="android:Theme"> <item name="android:windowTitleSize">50dip</item> <item name="android:windowTitleStyle">@style/CustomWindowTitle</item> <item name="android:windowTitleBackgroundStyle">@style/CustomWindowTitleBackground</item> </style> </resources> ```
Android window title bar icon is causing background for list view items
CC BY-SA 3.0
0
2011-04-12T05:08:50.733
2011-04-18T10:01:33.403
2011-04-18T10:01:33.403
174,261
174,261
[ "android", "android-layout" ]
5,630,697
1
5,631,143
null
0
328
I have written an action method in the ReservationController class. To get this code to work I should move the GetCoreTab file to the Reservation folder. I do not want to do that since I give the path of the GetCoreTab file in the ReservationController class. I want to give the path, such that the code for the GetCoreTab method would work from the Reservation controller class. Structure: ![enter image description here](https://i.stack.imgur.com/lvuWF.jpg) Code: ``` public PartialViewResult GetCoreTab() { return PartialView("Tabs/GetCoreTab"); } ``` HTML: ``` <a href="<%= Url.Action("GetCoreTab", "Reservation") %>" class="a"> <b> <div id="home" class="menu"> </div> </b> </a> ``` Any ideas? Thanks
How to write an action method in a controller to reference a partial view?
CC BY-SA 3.0
null
2011-04-12T05:16:11.863
2011-04-12T06:19:07.500
2020-06-20T09:12:55.060
-1
350,648
[ "asp.net-mvc-2", "partial-views", "actionmethod" ]
5,630,719
1
5,630,740
null
1
343
I'm not sure if this is a glitch/quirk in the latest Firefox and Chrome, but I've got a `<img>` tag that's been encapsulated by an `<a>` tag to turn the image into a link. The problem arises in that the click box for the link sits below the image. The image is also clickable, but the dead space under the image is clickable as well. The `<img>` has a left and bottom margin rule applied to it, which I think is what's causing the issue, but I don't understand why... I've also tried using explicit `</img>` closing tags as that didn't solve the issue either. Internet Explore 8 works as expected! Does not display the issue below. It shows the box below the image, but the dead space is not clickable in IE 8. Which is how I think it should work. Here's an image to clarify what I mean: ![Image](https://i.stack.imgur.com/G28GH.gif) I've just added a rule to border all `<a>` tags. And 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" /> <title>Untitled Document</title> <style type="text/css"> a { text-decoration: none; border: 1px solid #F00; } #testimg { margin-left: 20%; margin-bottom: 25px; } </style> </head> <body> <div><a href="#"><img id="testimg" alt="" src="imgs/landing/popup_sendbtn.png" /></a></div> </body> </html> ``` This is driving me crazy! Any help would be appreciated.
Why does the <a> tag sit BELOW an <img> on screen (Firefox 4 + Chrome only!)
CC BY-SA 3.0
null
2011-04-12T05:18:39.790
2011-04-12T05:29:12.500
2011-04-12T05:29:12.500
419,032
419,032
[ "html", "css", "xhtml", "hyperlink", "image" ]
5,630,738
1
5,631,148
null
0
540
Console Message: Had to use picture because wasn't formatting correctly in post as text. the received memory warning level 2 showed up before the app crashed. errror comes at this line - `cell.textLabel.text = tempRoutine.name;` link to full-size picture ([http://www.box.net/shared/static/7igj3r4trh.png](http://www.box.net/shared/static/7igj3r4trh.png)) ![enter image description here](https://i.stack.imgur.com/oAQry.png) ViewController: ``` @implementation RoutineTableViewController @synthesize tableView; @synthesize eventsArray; @synthesize entered; @synthesize managedObjectContext; #pragma mark - View lifecycle - (void)viewDidLoad { if (managedObjectContext == nil) { managedObjectContext = [(CurlAppDelegate *)[[UIApplication sharedApplication] delegate] managedObjectContext]; } NSFetchRequest *request = [[NSFetchRequest alloc] init]; NSEntityDescription *entity = [NSEntityDescription entityForName:@"Routine" inManagedObjectContext:managedObjectContext]; [request setEntity:entity]; NSError *error = nil; NSMutableArray *mutableFetchResults = [[managedObjectContext executeFetchRequest:request error:&error] mutableCopy]; if (mutableFetchResults == nil) { // Handle the error. } [self setEventsArray:mutableFetchResults]; [mutableFetchResults release]; [request release]; UIBarButtonItem * addButton = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemAdd target:self action:@selector(showPrompt)]; [self.navigationItem setLeftBarButtonItem:addButton]; [addButton release]; UIBarButtonItem *editButton = [[UIBarButtonItem alloc]initWithTitle:@"Edit" style:UIBarButtonItemStyleBordered target:self action:@selector(toggleEdit)]; self.navigationItem.rightBarButtonItem = editButton; [editButton release]; [super viewDidLoad]; } - (void)viewDidUnload { self.eventsArray = nil; [super viewDidUnload]; } -(void)toggleEdit { [self.tableView setEditing: !self.tableView.editing animated:YES]; if (self.tableView.editing) [self.navigationItem.rightBarButtonItem setTitle:@"Done"]; else [self.navigationItem.rightBarButtonItem setTitle:@"Edit"]; } - (void)dealloc { [managedObjectContext release]; [eventsArray release]; [entered release]; [super dealloc]; } - (void)didReceiveMemoryWarning { [super didReceiveMemoryWarning]; } #pragma mark - #pragma mark Add an event -(void)addEvent { Routine *routine = (Routine *)[NSEntityDescription insertNewObjectForEntityForName:@"Routine" inManagedObjectContext:managedObjectContext]; routine.name=entered; NSError *error = nil; if (![managedObjectContext save:&error]) { // Handle the error. } NSLog(@"%@", error); [eventsArray insertObject:routine atIndex:0]; NSIndexPath *indexPath = [NSIndexPath indexPathForRow:0 inSection:0]; [self.tableView insertRowsAtIndexPaths:[NSArray arrayWithObject:indexPath] withRowAnimation:UITableViewRowAnimationFade]; [self.tableView scrollToRowAtIndexPath:[NSIndexPath indexPathForRow:0 inSection:0] atScrollPosition:UITableViewScrollPositionTop animated:YES]; } -(void)showPrompt { AlertPrompt *prompt = [AlertPrompt alloc]; prompt = [prompt initWithTitle:@"Add Workout Day" message:@"\n \n Please enter title for workout day" delegate:self cancelButtonTitle:@"Cancel" okButtonTitle:@"Add"]; [prompt show]; [prompt release]; } - (void)alertView:(UIAlertView *)alertView willDismissWithButtonIndex:(NSInteger)buttonIndex { if (buttonIndex != [alertView cancelButtonIndex]) { entered = [(AlertPrompt *)alertView enteredText]; if(eventsArray && entered) { Routine *tempRoutine = (Routine *)[NSEntityDescription insertNewObjectForEntityForName:@"Routine" inManagedObjectContext:managedObjectContext]; tempRoutine.name = entered; // Routine *tempRoutine = [[Routine alloc]init]; //tempRoutine.name = entered; [eventsArray addObject:tempRoutine]; [tempRoutine release]; [tableView reloadData]; [self addEvent]; } /* if(eventsArray && entered) { [eventsArray addObject:entered]; [tableView reloadData]; [self addEvent]; } */ } } #pragma mark - Table view data source - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView { return 1; } - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { return [eventsArray count]; } - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { static NSString *CellIdentifier = @"Cell"; // Dequeue or create a new cell. UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier]; if (cell == nil) { cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:CellIdentifier] autorelease]; } Routine *tempRoutine = (Routine *)[eventsArray objectAtIndex:indexPath.row]; cell.textLabel.text = tempRoutine.name; cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator; return cell; } // Override to support conditional editing of the table view. - (BOOL)tableView:(UITableView *)tableView canEditRowAtIndexPath:(NSIndexPath *)indexPath { // Return NO if you do not want the specified item to be editable. return YES; } -(void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath { if (editingStyle == UITableViewCellEditingStyleDelete) { // Delete the managed object at the given index path. NSManagedObject *eventToDelete = [eventsArray objectAtIndex:indexPath.row]; [managedObjectContext deleteObject:eventToDelete]; // Update the array and table view. [eventsArray removeObjectAtIndex:indexPath.row]; [tableView deleteRowsAtIndexPaths:[NSArray arrayWithObject:indexPath] withRowAnimation:YES]; // Commit the change. NSError *error = nil; if (![managedObjectContext save:&error]) { // Handle the error. } } } ```
App Crashing- Core Data Problem Or Memory Management?
CC BY-SA 3.0
null
2011-04-12T05:21:24.347
2011-04-12T06:19:32.787
2011-04-12T05:49:10.483
null
null
[ "iphone", "objective-c", "memory", "core-data" ]
5,630,976
1
5,631,030
null
1
2,003
I have the following entities in core data as shown in the figure below. ![Core Data Model](https://i.stack.imgur.com/F6yUC.png) Questions: When ever i delete the any one of the entity object at level 2 and do `[context save:&error];` all other objects in Table Entity1 gets the data fault and the app crashes due to not able to read the Entity1 object any more, giving `EXC_BAD_ACCESS` error. I am using this code ``` for(Entity1 *entity in listOfEntitys) { if(entity.Relation1) [context deleteObject:entity.Relation1]; if(entity.Relation2) [context deleteObject:entity.Relation2]; if(entity.Relation3) [context deleteObject:entity.Relation3]; } [context save:&error]; ``` Its not like I have never deleted any object from core data but this is the only place where problem is occurring. Can anyone Help. Thanks. PS. I have seen other questions on SO but none has the same kind of situation as i do. ``` Printing description of listOfEntitys: ( "<Entity1: 0x4dc3d80> (entity: Entity1; id: 0x4dc2d60 <x-coredata://DF11191D-0BE9-4A63-955D-0A43153290A4/Entity1/p5> ; data: <fault>)", "<Entity1: 0x5b06ea0> (entity: Entity1; id: 0x5b077d0 <x-coredata://DF11191D-0BE9-4A63-955D-0A43153290A4/Entity1/p6> ; data: <fault>)", "<Entity1: 0x4dc2cf0> (entity: Entity1; id: 0x4dc2df0 <x-coredata://DF11191D-0BE9-4A63-955D-0A43153290A4/Entity1/p7> ; data: <fault>)", "<Entity1: 0x4dc2b80> (entity: Entity1; id: 0x4dc3640 <x-coredata://DF11191D-0BE9-4A63-955D-0A43153290A4/Entity1/p8> ; data: <fault>)" ) ```
Core Data `deleteObject:` problem!
CC BY-SA 3.0
null
2011-04-12T05:59:15.527
2011-04-12T07:09:08.307
2011-04-12T06:15:30.777
567,929
567,929
[ "iphone", "objective-c", "ios", "core-data", "entity-relationship" ]
5,631,281
1
5,631,341
null
0
63
I have these 4 tables: ![enter image description here](https://i.stack.imgur.com/RW10P.png) This query ``` var query = db.Authors .Where(x=> x.ItemAuthors .Any(z=> z.Item.CategoryItems .Any(b=> b.categoryID == 10))) .Select(ci=> new { authorText = string.Format("{0} ({1})", ci.text, ci.ItemAuthors.Count()), authorId = ci.authorID }); ``` Which populates an Authors drop down list which works as expected. The problem is when I try to count the number of items assigned to each author it counts item the author has in the entire items table. So for example if author one has 10 books total, but only 2 of these books show up in the above query, I still get a count for 10 books. When I bind that same query to a control I get back the correct data, it's just the count operation that won't work correctly. To reiterate I bound it to a gridview and I only see one book per author, not all of the books the author wrote. So it appears my query should be correct. @Jon Skeet, I wasn't able to use the `let` operator as I'm conditionally building my query. I solved my problem by using the original query to get the count. Here's how I modified my original `Count()` syntax: ``` var query = authors2.Select(x => new { authorText = string.Format("{0} ({1})",x.text, x.ItemAuthors .Where(qq=> qq.Item.CategoryItems .Any(xt=> xt.categoryID == 10)) .Count()), authorId = x.authorID }); ```
Help with unexpected LINQ query results
CC BY-SA 3.0
null
2011-04-12T06:36:59.737
2011-04-12T15:34:06.773
2011-04-12T15:34:06.773
445,303
445,303
[ "linq-to-sql" ]
5,631,461
1
null
null
5
3,039
I'm using [White](http://white.codeplex.com/) to automate the BDD testing of our C# WPF UI. My first couple of tests are working well on my development machine (running Windows 7). However, when I try and run the same code on the build server (virtual machine running Windows server 2003 R2) it doesn't work correctly. In both cases the tests are run from the command line and the tests are using the Cuke4Nuke framework. In the case of the server I am accessing the server via Remote Desktop Connection. The code looks like: ``` var application = Application.Launch("whiteApp.exe"); var initializeOption = InitializeOption.NoCache; var windowCriteria = SearchCriteria.ByText("whiteApp"); var window = application.GetWindow(criteria, initializeOption); var criteria = SearchCriteria.ByAutomationId("rightButton"); var button = (Button) window.Get(criteria); button.click(); ``` The problem is that the buttons click event is not fired when it is run on the server. The button can be clicked (using the mouse) if the UI is left open after White has finished executing. One interesting point is that after the click method is run that the button does show evidence of being clicked as in the picture below, in the case of other buttons the mouse over effect is shown. ![Button before and after click](https://i.stack.imgur.com/lIGAj.png)
White UIAutomation click() stops working on different platform
CC BY-SA 3.0
0
2011-04-12T06:54:36.623
2013-04-25T08:26:34.370
null
null
649,023
[ "c#", "wpf", "bdd", "ui-automation", "white-framework" ]
5,631,533
1
6,208,644
null
57
16,302
I've got an existing C# 4 project which I've checked the test coverage for by using TestDriven.Net and the Visual Studio coverage feature, i.e. Test With -> Coverage from the context menu. The project contains some code I don't want covered, and I've solved that by adding the `[ExcludeFromCodeCoverage]` for those types and methods. We've just upgraded TeamCity to 6.0.3, and I've added dotCover coverage to the NUnit build step. I've managed to remove coverage for external assemblies such as NHibernate in the "Filters" section (by explicitly state the assemblies for which I want coverage), but I'm struggling with how to exclude types and methods from covered assemblies. ![enter image description here](https://i.stack.imgur.com/Q4iNJ.png)
How do I exclude types and methods from being covered by dotCover in TeamCity?
CC BY-SA 3.0
0
2011-04-12T07:01:35.760
2020-04-17T08:51:07.853
2014-06-08T22:58:06.403
634,576
46,343
[ "c#", "teamcity", "code-coverage", "dotcover" ]
5,631,553
1
5,637,060
null
0
2,471
As per the screenshot below, why won't my widgets line up using a vertical layout inside a splitter? ![Window screenshot](https://i.stack.imgur.com/LH5Sf.png) ``` /******************************************************************************** ** Form generated from reading UI file 'test.ui' ** ** Created: Tue Apr 12 16:51:51 2011 ** by: Qt User Interface Compiler version 4.6.2 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! ********************************************************************************/ #ifndef UI_TEST_H #define UI_TEST_H #include <QtCore/QVariant> #include <QtGui/QAction> #include <QtGui/QApplication> #include <QtGui/QButtonGroup> #include <QtGui/QGridLayout> #include <QtGui/QHeaderView> #include <QtGui/QLineEdit> #include <QtGui/QListWidget> #include <QtGui/QMainWindow> #include <QtGui/QSplitter> #include <QtGui/QTreeWidget> #include <QtGui/QVBoxLayout> #include <QtGui/QWidget> QT_BEGIN_NAMESPACE class Ui_MainWindow { public: QWidget *centralwidget; QGridLayout *gridLayout; QSplitter *splitter; QTreeWidget *treeWidget; QWidget *widget; QVBoxLayout *verticalLayout; QLineEdit *lineEdit; QListWidget *listWidget; void setupUi(QMainWindow *MainWindow) { if (MainWindow->objectName().isEmpty()) MainWindow->setObjectName(QString::fromUtf8("MainWindow")); MainWindow->resize(800, 600); centralwidget = new QWidget(MainWindow); centralwidget->setObjectName(QString::fromUtf8("centralwidget")); gridLayout = new QGridLayout(centralwidget); gridLayout->setObjectName(QString::fromUtf8("gridLayout")); splitter = new QSplitter(centralwidget); splitter->setObjectName(QString::fromUtf8("splitter")); splitter->setOrientation(Qt::Horizontal); treeWidget = new QTreeWidget(splitter); QTreeWidgetItem *__qtreewidgetitem = new QTreeWidgetItem(); __qtreewidgetitem->setText(0, QString::fromUtf8("1")); treeWidget->setHeaderItem(__qtreewidgetitem); treeWidget->setObjectName(QString::fromUtf8("treeWidget")); splitter->addWidget(treeWidget); widget = new QWidget(splitter); widget->setObjectName(QString::fromUtf8("widget")); verticalLayout = new QVBoxLayout(widget); verticalLayout->setObjectName(QString::fromUtf8("verticalLayout")); verticalLayout->setContentsMargins(0, 0, 0, 0); lineEdit = new QLineEdit(widget); lineEdit->setObjectName(QString::fromUtf8("lineEdit")); verticalLayout->addWidget(lineEdit); listWidget = new QListWidget(widget); listWidget->setObjectName(QString::fromUtf8("listWidget")); verticalLayout->addWidget(listWidget); splitter->addWidget(widget); gridLayout->addWidget(splitter, 0, 0, 1, 1); MainWindow->setCentralWidget(centralwidget); retranslateUi(MainWindow); QMetaObject::connectSlotsByName(MainWindow); } // setupUi void retranslateUi(QMainWindow *MainWindow) { MainWindow->setWindowTitle(QApplication::translate("MainWindow", "MainWindow", 0, QApplication::UnicodeUTF8)); } // retranslateUi }; namespace Ui { class MainWindow: public Ui_MainWindow {}; } // namespace Ui QT_END_NAMESPACE #endif // UI_TEST_H ``` This is just a dummy ui uploaded here for the purpose of the question. In my real ui design I've tried every imaginable combination, but as soon as I start using splitters, it all goes out of alignment.
Qt - Why won't my widgets line up using a vertical layout inside a splitter?
CC BY-SA 3.0
0
2011-04-12T07:03:36.133
2011-04-12T15:19:44.970
null
null
269,469
[ "c++", "qt", "widget", "qt-designer" ]
5,631,691
1
5,635,551
null
0
1,163
On Windows XP in device explorer view while I explore the content of my connected via Active Sync Motorola MC55 device I can see strange content. Look at the attached file. ![enter image description here](https://i.stack.imgur.com/s1dVn.jpg) What may be wrong? Regards
windows mobile 6.5 - Motorola MC55 - strange directory names in device explorer view
CC BY-SA 3.0
null
2011-04-12T07:16:39.507
2011-04-12T12:58:17.913
2011-04-12T08:10:16.830
26,961
138,125
[ "windows-mobile", "activesync" ]
5,631,846
1
5,634,344
null
2
297
I have a use case where I need the and Performance data of the Azure Web-Role to be monitored remotely which is to be done without any Storage Account. ![Azure Remote Data Monitoring](https://i.stack.imgur.com/rfvrZ.jpg)
Collecting the Azure Diagnosis Log Remotely without the support of Storage Account
CC BY-SA 3.0
null
2011-04-12T07:32:14.180
2011-04-12T11:21:31.243
null
null
649,408
[ "performance", "logging", "azure", "diagnostics" ]
5,631,895
1
null
null
1
3,601
I have a list view which contains some 20 odd items from database along with a two Buttons and an extra TextView as a counter enclosed within linear layout. The two buttons usually for increment and decrement the value in an extra TextView. What i want is when i press button outside the listView should fetch all items along with an value of an extra text. Right now I can fetch Linear layouts and there child items which are visible on screen i.e. out 20 items 10 are visible on screen, so my question is how to fetch the remaining items along with extra Textview values enclosed within linear layout which are not visible which can be viewed when we scroll the Listview? Here is main.xml file ``` <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation= "horizontal" android:layout_width="match_parent" android:layout_height="match_parent" android:background="#CBCBCB"> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/widget64" android:background="@drawable/toolbar_color" android:layout_x="0px" android:layout_y="0px" android:layout_width="match_parent" android:layout_height="40dip"> <Button android:id="@+id/save_creature_for_encounter" android:layout_marginTop="5px" android:textSize="10dip" android:textColor="#ffffff" android:textStyle="bold" android:layout_centerVertical="true" android:layout_alignParentRight="true" android:background="@drawable/onclick_button_bg" android:layout_width="40dip" android:layout_height="50dip" android:text="Save"/> <Button android:id="@+id/back_show_encounter" android:layout_width="80dip" android:layout_marginTop="5px" android:text="Cancel" android:textSize="10dip" android:textColor="#ffffff" android:textStyle="bold" android:layout_centerVertical="true" android:layout_alignParentLeft="true" android:background="@drawable/button_color" android:layout_height="50dip"> </Button> </RelativeLayout> <ListView android:id="@+id/list_view" android:background="#ffffff" android:fadingEdge="none" android:cacheColorHint="#ffffff" android:layout_weight="1" android:layout_gravity="center" android:scrollbars="vertical" android:layout_marginTop="28dip" android:layout_width="fill_parent" android:layout_height="fill_parent"/> </FrameLayout> ``` And here is my custom_list.xml file ``` <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:gravity="left|center" android:paddingBottom="5px" android:paddingTop="5px" android:paddingLeft="5px" android:layout_width="wrap_content" android:layout_height="wrap_content"> <TextView android:text="test" android:id="@+id/item_creatures_to_encounter" android:layout_marginLeft="10px" android:layout_width="180dip" android:layout_height="wrap_content"></TextView> <Button android:id="@+id/desc" android:layout_width="30px" android:layout_height="30px" android:layout_marginTop="5px" android:text="-" android:textSize="10dip" android:textColor="#ffffff" android:textStyle="bold" android:layout_alignTop="@+id/widget66" android:layout_alignParentRight="true" android:onClick="myDescClickHandler"> > </Button> <Button android:id="@+id/asc" android:layout_width="30px" android:layout_height="30px" android:layout_marginTop="5px" android:text="+" android:textSize="10dip" android:textColor="#ffffff" android:textStyle="bold" android:layout_alignTop="@+id/widget66" android:layout_alignParentRight="true" android:onClick="myAscClickHandler"> > </Button> <TextView android:text="@string/counter" android:id="@+id/counter" android:layout_height="wrap_content" android:layout_marginLeft="10dip" android:layout_width="30dip"></TextView> </LinearLayout> ``` ![enter image description here](https://i.stack.imgur.com/0BcPb.png) Here is my custom Adapter file ``` public class DomainAdapter extends SimpleCursorAdapter{ private LayoutInflater mInflater; public DomainAdapter(Context context, int layout, Cursor c, String[] from, int[] to) { super(context, layout, c, from, to); mInflater = LayoutInflater.from(context); } public View getView(int position, View convertView, ViewGroup parent, Cursor data) { // A ViewHolder keeps references to children views to avoid unneccessary calls // to findViewById() on each row. //final ViewHolder holder; View row = super.getView(position, convertView, parent); ViewHolder holder=(ViewHolder)row.getTag(); if (holder == null) { holder = new ViewHolder(row); row.setTag(holder); holder.add = (Button) row.findViewById(R.id.asc); Button.OnClickListener b = new Button.OnClickListener() { public void onClick(View v) { LinearLayout parent = (LinearLayout)v.getParent(); TextView label=(TextView)parent.findViewById(R.id.counter); Log.d("AAAAJJJAAA", ""+ parent); CharSequence value = ((TextView) label).getText(); int count = Integer.parseInt((String) value); count++; String inc = String.format("%d", count); label.setText(inc); //parent.refreshDrawableState(); } }; holder.add.setOnClickListener(b); } return row; } ``` }
Android :: How To Read Not Visible Child Elements Of List View?
CC BY-SA 3.0
0
2011-04-12T07:38:00.077
2014-07-23T10:26:27.020
2011-04-13T12:18:21.830
453,986
453,986
[ "android", "android-emulator", "android-listview" ]
5,632,266
1
null
null
0
682
I'm really at a loss here, I am trying to use the UIViewAnimationOptionTransitionCurlDown on a view that has some transparency, and here is the result (visually), the code is below. What I want is for the transition to happen without the weird shadow. Any insight as to why that shadow is displaying would also be helpful. It only happens during the animation. ![first image](https://i.stack.imgur.com/OqKOV.png) ![second image](https://i.stack.imgur.com/DvoF0.png) ![third image](https://i.stack.imgur.com/Fts9W.png) ``` [UIView transitionWithView:sender duration:15.0f options:UIViewAnimationOptionTransitionCurlDown animations:^{ [self modifyContentOfPageWith:sender]; } completion:nil]; ```
IOS: Weird color in UIView transition : UIViewAnimationOptionTransitionCurlDown
CC BY-SA 3.0
null
2011-04-12T08:16:52.473
2011-10-05T22:38:53.097
null
null
375,658
[ "objective-c", "ios", "uiview", "uiviewanimation" ]
5,632,518
1
5,645,961
null
0
2,011
I'm trying to alter the behaviour of autocomplete a little. I've got a mock up here [http://jsfiddle.net/ekzMN/6/](http://jsfiddle.net/ekzMN/6/) which is producing the desired result (a la chrome address bar) - as pictured below (currently case sensitive). ![enter image description here](https://i.stack.imgur.com/7L5Tk.jpg) The problem I'm having is when the autocomplete list is showing and I hover over the items in the list, the input value changes back to the inputted term rather than staying on the adjusted term with autofill. i.e. in the above image it would change from to . I guess it is a bit of default autocomplete behaviour that I need to overide but I can't work it out. I've tried `focus: false` and `blur: false` but to no avail. Thanks.
Autocomplete hover removing autofill
CC BY-SA 3.0
null
2011-04-12T08:40:58.647
2011-04-13T07:45:15.750
null
null
null
[ "javascript", "jquery", "jquery-ui", "jquery-ui-autocomplete" ]
5,632,557
1
null
null
2
4,204
I want to enable drag and drop in my application to be able to create connections between components. That doesn't sound too hard, but the problem is the type of components I want connections between. The reason I want to be able to make connections is to be able to make a graph and calculate shortest path, etc. What I have is a ListBox with Components which are placed on a Canvas. The reason I use ListBox is to make the components selectable. I've also made them draggable. ``` <DataTemplate DataType="{x:Type ViewModels:DocumentViewModel}"> <DataTemplate.Resources> <Converters:GuiSizeConverter x:Key="SizeConverter"/> </DataTemplate.Resources> <ListBox ItemsSource="{Binding Components}" SelectedItem="{Binding SelectedItem}" Background="Transparent" HorizontalAlignment="Left" VerticalAlignment="Top" BorderThickness="0" Margin="0"> <ListBox.ItemsPanel> <ItemsPanelTemplate> <Canvas ClipToBounds="True" Height="{Binding CurrentProject.Height, Converter={StaticResource SizeConverter}}" Width="{Binding CurrentProject.Width, Converter={StaticResource SizeConverter}}"> <Canvas.Background> <SolidColorBrush Color="{DynamicResource {x:Static SystemColors.WindowFrameColorKey}}"/> </Canvas.Background> </Canvas> </ItemsPanelTemplate> </ListBox.ItemsPanel> <ListBox.ItemContainerStyle> <Style TargetType="{x:Type ListBoxItem}"> <Setter Property="HorizontalAlignment" Value="Stretch" /> <Setter Property="Background" Value="Transparent" /> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="{x:Type ListBoxItem}"> <Grid> <Border Background="{TemplateBinding Background}" /> <ContentPresenter/> </Grid> <ControlTemplate.Triggers> <MultiTrigger> <MultiTrigger.Conditions> <Condition Property="IsMouseOver" Value="True" /> <Condition Property="IsSelected" Value="False"/> </MultiTrigger.Conditions> <Setter Property="Background" Value="#8868D5FD" /> </MultiTrigger> <Trigger Property="IsSelected" Value="True"> <Setter Property="Background" Value="#4468D5FD" /> </Trigger> </ControlTemplate.Triggers> </ControlTemplate> </Setter.Value> </Setter> <Setter Property="Utils:DraggableExtender.CanDrag" Value="True" /> <Setter Property="Canvas.Top" Value="{Binding Path=Y, Converter={StaticResource SizeConverter},Mode=TwoWay}" /> <Setter Property="Canvas.Left" Value="{Binding Path=X, Converter={StaticResource SizeConverter},Mode=TwoWay}" /> </Style> </ListBox.ItemContainerStyle> </ListBox> </DataTemplate> ``` The tricky thing now though is that it is not the Components in my ViewModel I want to use drag and drop on, but components within those components. To illustrate this better, see the example picture of a train station and tracks below. I have PlaceableComponents (which are the ones that are in the listbox), i.e. the Track and a Station. A Track is built up of TrackSections, which can be regular track sections and electrified tracks sections). A Station is build up of Platforms, which is built up of Tracks which are built up of TrackSections. ![canvas in action](https://i.stack.imgur.com/TZnBU.png) So the components(or nodes) I want to connect are the TrackSections, so I want to drag and drop (using right mousebutton) a section onto another section, and this should call a method (command) in my DocumentViewModel (the viewmodel that holds items on the canvas) and not on the sections since the sections doesn't have a clue about other components, nor should they hold the connection. The goal is to create a list of connections(containing from and to components) which should be able to be rendered ontop of everything as lines, using an adornment layer or similar). I might also add that the components which can be used to create connections all implement a INode interface to be able to identify them. I hope I described my question and situation clear enough. I can add that I've found plenty of good posts about drag & dropping but I wasn't able to apply any of them to my case, which is why I'm asking here.
C# WPF Drag & Drop ListBox MVVM
CC BY-SA 3.0
null
2011-04-12T08:44:01.860
2018-03-22T15:04:52.270
2012-09-21T18:58:31.277
13,531
676,309
[ "c#", "wpf", "mvvm", "drag-and-drop", "listbox" ]
5,632,839
1
5,636,390
null
4
988
I'm porting I am having source code of Chicken of VNC Mac application which take vnc of any LAN connected mac. I have to do same with iphone app. So while debugging mac source code I am not able to figure out how that mac app establish an authenticated VNC connection? I have done some progress. Now i am able to connect any LAN connected MAC and can take VNC of it. But i think the way i am doing is wrong. Actually now i am calling unstoppable timer again & again for [conn startTalking] and making RFBConnection with server on every mseconds for uninterrupted connection. Is this is a right way ? But this arise a new problem i cannot scroll my vnc view because on every mseconds screen is refreshing with new RFBConnection. Can any one guide me ? > ![enter image description here](https://i.stack.imgur.com/4kJIO.png)
Problem in porting Chicken of VNC Mac application into iphone application
CC BY-SA 3.0
0
2011-04-12T09:10:02.883
2017-04-07T06:55:44.993
2011-04-18T11:42:37.193
213,532
213,532
[ "iphone", "macos", "sockets", "vnc", "chicken-scheme" ]
5,632,871
1
null
null
5
891
I'm trying to create a datagrid with grouping and I'm getting display corruption (blank areas) during horizontal scrolling. The issue appears when there is a GroupStyle.ContainerStyle defined. The datagrid should contain 200 rows or more to reproduce the problem. [Related Microsoft Connect feedback](https://connect.microsoft.com/VisualStudio/feedback/details/677198/render-glitches-in-wpf4-datagrid-with-disabled-virtualization). Microsoft guy at [social.msdn.com](http://social.msdn.microsoft.com/Forums/en-US/wpf/thread/cf47f2e9-e488-42f0-9407-5a668d5c086f/) pointed out that adding grouping turns off datagrid virtualization. Possibly that's the root of the problem. I removed grouping from my sample and set `VirtualizingStackPanel.IsVirtualizing` to `false` and got exactly the same kind of corruption. Code to reproduce the problem: ``` <DataGrid ItemsSource="{Binding Source={StaticResource ResourceKey=cvsGoods}}" CanUserAddRows="False" CanUserReorderColumns="False" CanUserDeleteRows="False" CanUserResizeRows="False" CanUserSortColumns="False" AutoGenerateColumns="True"> <DataGrid.GroupStyle> <GroupStyle> <GroupStyle.ContainerStyle> <Style TargetType="{x:Type GroupItem}"> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="{x:Type GroupItem}"> <ItemsPresenter /> </ControlTemplate> </Setter.Value> </Setter> </Style> </GroupStyle.ContainerStyle> </GroupStyle> </DataGrid.GroupStyle> </DataGrid> ``` After several horizontal scrolls to the right and back to the left blank areas appear on the left side. I tried it on WinXP and Win7. The question is: how to get rid of that bug? Is there any workaround? Any suggestions? Screenshot illustrating the problem: ![Display corruption](https://i.stack.imgur.com/yEd7x.jpg)
How to get rid of display corruption during horizontal scroll in WPF4 DataGrid with grouping?
CC BY-SA 3.0
0
2011-04-12T09:12:44.423
2014-02-13T07:09:53.727
2014-02-13T07:09:53.727
1,774,011
703,630
[ "wpf", "xaml", "wpfdatagrid" ]
5,632,967
1
5,633,443
null
18
39,689
As you can notice ![enter image description here](https://i.stack.imgur.com/uc6uV.png) Symbols are been correctly loaded. I just created a view `GetCompanies.cshtml` using the `AddView` shortlink ![enter image description here](https://i.stack.imgur.com/GaKQs.png) But, no matter what I do, I can't debug in the View. What I did so far: - - - - `.pdb`- - did not (yet) shutdown Windows 7 x64 :-/
"No symbols have been loaded for this document." But they have!
CC BY-SA 3.0
0
2011-04-12T09:19:47.560
2022-05-17T07:15:00.387
null
null
28,004
[ "visual-studio", "visual-studio-2010", "debugging", "debug-symbols" ]
5,633,281
1
null
null
3
2,079
For example this is gradient which I want to make in CSS3 ![enter image description here](https://i.stack.imgur.com/miPgq.jpg) I can use 1 px image cut and repeat in x axis as we were doing before. But now if I want to make same exact gradient using CSS3. I know many free CSS3 Gradient Generator , Maker available on Internet. My questions is Which Generator is most preferred and how to make needed gradients with that. ![enter image description here](https://i.stack.imgur.com/BVgtz.gif) ![enter image description here](https://i.stack.imgur.com/1jRUt.png) ![enter image description here](https://i.stack.imgur.com/FNNGP.gif)
How to make exact CSS3 Linear gradient like it's in the image?
CC BY-SA 3.0
null
2011-04-12T09:47:12.767
2012-05-23T13:54:03.893
2011-04-12T10:12:10.060
84,201
84,201
[ "css" ]
5,633,287
1
5,633,346
null
3
2,220
when I click on the tableView it displays something like this to show details How can I do this?: ![enter image description here](https://i.stack.imgur.com/wPpsH.png) ![enter image description here](https://i.stack.imgur.com/7jZJy.png)
effect or animation in UItableVIew
CC BY-SA 3.0
0
2011-04-12T09:47:36.480
2011-04-12T09:51:58.490
null
null
673,352
[ "iphone", "objective-c" ]
5,633,502
1
null
null
8
2,623
I have implemented a simple Dijkstra's algorithm for finding the shortest path on an .osm map with Java. The pathfinding in a graph which is created from an .osm file works pretty well. But in case the user's current location and/or destination is not a node of this graph (just raw coordinates) how do we 'link' those coordinates to the graph to make pathfinding work? The simple straightforward solution "find the nearest to the current location node and draw a straight line" doesn't seem to be realistic. What if we have a situation like on the attached picture? (UPD) ![enter image description here](https://i.stack.imgur.com/wG3NM.jpg) The problem here is that before we start any 'smart' pathfinding algorithms (like Dijkstra's) we 'link' the current position to the graph, but it is just dumb formula (a hypotenuse from Pythagorean theorem) of finding the nearest node in terms of geographical coordinates and this formula is not 'pathinding' - it can not take obstacles and types of nodes into account. To paraphrase it - how do we find the shortest path between A and B if B is a node in a graph, and A is not a node? Have you heard of any other solutions to this problem?
Shortest path between raw geo coordinates and a node of a graph
CC BY-SA 3.0
0
2011-04-12T10:03:55.603
2012-10-12T08:15:07.243
2011-04-12T12:29:01.813
703,734
703,734
[ "java", "geospatial", "shortest-path", "dijkstra", "pythagorean" ]
5,633,516
1
5,633,820
null
1
215
I'm trying to get the div `wrapper` to surround all the divs within it so depending on the amount of content the height of `wrapper` will grow. I guessed that the way of doing this would be to set `height: 100%` but as you can see from the screen grab below, this is not the case. ![Screengrab of height:100% issue](https://i.stack.imgur.com/QJ61Z.jpg) Where it says 'No :-(' is what having `height: 100%` is doing where ideally I would like `wrapper` to be at the bottom where it says 'Yes' and I have drawn a red line. Any help is much appreciated.
CSS Height:100% issue
CC BY-SA 3.0
null
2011-04-12T10:05:12.493
2011-04-12T11:23:16.220
2011-04-12T11:23:16.220
58,792
418,878
[ "html", "css" ]
5,633,945
1
null
null
0
878
I've got the table in picture. According to post field checkbox , if its checked I write into a file and delete those records from my database. if its not checked records will remain in my database.Problem is when I then try to access to those records I get an exception(cant find that onject) because I am trying to access with datagrid.SelectedIndex its giving me datagrid index and not record index. Is there any way of getting record index? I ve got automatic index as incremented by 1 as unique Id for each record. ![enter image description here](https://i.stack.imgur.com/rvnJM.png) Thanks in Advance
Get selected record from datagrid wpf?
CC BY-SA 3.0
null
2011-04-12T10:41:40.753
2011-04-12T14:04:04.887
null
null
565,530
[ "c#", "wpf", "datagrid", "indexing" ]
5,634,122
1
5,634,204
null
0
734
I'm making a UNIX web-based terminal for learning purposes. So far I have made a text box and the output is being displayed. Sort of like this. ``` <?php $output = shell_exec('ls'); echo "<pre>$output</pre>"; ?> ``` ![](https://localhostr.com/files/GTOD0YL/Capture.PNG) Form ``` <html> <head> <link href="/css/webterminal.css" rel="stylesheet" type="text/css" /> <script type="text/javascript"> function shell_execute(str) { if (str.length==0) { document.getElementById("txtOut").innerHTML=""; return; } if (window.XMLHttpRequest) {// code for IE7+, Firefox, Chrome, Opera, Safari xmlhttp=new XMLHttpRequest(); } else {// code for IE6, IE5 xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); } xmlhttp.onreadystatechange=function() { if (xmlhttp.readyState==4 && xmlhttp.status==200) { document.getElementById("txtOut").innerHTML=xmlhttp.responseText; } } xmlhttp.open("GET","exec.php?q="+str,true); xmlhttp.send(); } </script> </head <body onLoad="setUser();"> <div class="container"> <h2>UNIX Web Based Terminal 1.0</h2> <br /> <p><b>output</b></p> <form> <span id="User"></span>< <input type="text" class="textbox" onkeyup="shell_execute(this.value)" size="20" /> </form> <div class="output"> <p><span id="txtOut"></span></p> </div> </div> </body> </html> ``` But I want it to look as if the page was really a terminal. When I type a command, it should store the result of the shell command, and then append it to a div tag. So as I am typing in commands, it will keep on showing the output. Just like in the UNIX terminal. How can I append the output of the commands to a div tag?
Appending the contents of a UNIX command to a div tag
CC BY-SA 3.0
null
2011-04-12T11:00:13.363
2011-04-12T12:32:51.673
2017-02-08T14:31:56.157
-1
478,636
[ "php", "ajax", "shell", "unix", "html" ]
5,634,254
1
5,634,340
null
1
105
A PHP application is offering binary data as a download: ``` header("Content-Type: application/octet-stream"); header("Pragma: public"); header("Cache-Control: private"); header("Content-Disposition: attachment; filename=\"$filename\""); header("expires: 0"); set_time_limit(0); ob_clean(); flush(); @readfile($completefilename); exit; ``` $completefilename is a stream like "[ftp://user:pwd@](ftp://user:pwd@)..." The size of the data can be several MByte. It works fine, but sporadically I get the following error: ![Error](https://i.stack.imgur.com/pcguN.png)
Sporadic error downloading data from PHP application
CC BY-SA 3.0
null
2011-04-12T11:13:14.643
2011-04-12T11:21:28.820
2011-04-12T11:19:37.117
298,479
426,133
[ "php", "internet-explorer" ]
5,634,586
1
5,634,729
null
0
2,763
![enter image description here](https://i.stack.imgur.com/C99zq.png) How can I remove that line from my tab view? Or can I set height or colors for it?
How to remove bottom line of custom Tab view
CC BY-SA 3.0
0
2011-04-12T11:41:26.027
2011-04-12T11:51:41.867
2020-06-20T09:12:55.060
-1
550,966
[ "android" ]
5,634,743
1
5,739,278
null
38
8,040
Now Im customizing title bar of my application. My aim is to add one extra button on title bar. Im my [previous question](https://stackoverflow.com/questions/5571072/how-to-add-an-extra-button-to-the-window-title-bar-so-it-will-be-work-as-standar) people have adviced me the way I can customize non client area. Thats works perfectly except one small thing - ! I can draw glowing in nonclient area but . I also cant find any resource about this subj. I looked into [this](http://www.codeproject.com/KB/dialog/AeroNonClientAreaButtons.aspx) sample and made my own test app for investigating non client drawing facilities. Screen shot of my app's window: ![my app's window](https://i.stack.imgur.com/3huiO.png) So you can see that system button glows out of the windows when my is clipped by borderframe. For example, Skype's window have four custom buttons in title bar and they can "glow" out of the window frame: ![Skype's window](https://i.stack.imgur.com/gEw3E.png) Can anybody advise me to find out the way to draw button's glowing out of the window? Thanks in advance! Thank you everybody for answers!
Non client painting on aero glass window
CC BY-SA 3.0
0
2011-04-12T11:52:53.640
2011-04-21T14:38:51.667
2017-05-23T12:13:26.330
-1
592,835
[ "c#", "c++", "user-interface", "aero", "nonclient" ]
5,635,163
1
5,647,052
null
7
4,091
I can't configurate Code Contracts in my class. I've followed the documentation and the example but it doesn't work. I would to insert Code Contracts condition into my interface, here my code The interface ``` [ContractClass(typeof(ArticleBLLContract))] public interface IArticleBLL { int getArticleNSheet(string IdBox); IEnumerable<IArticle> getArticleValue(string IdBox, string IdLanguage); } ``` The Contract Class ``` [ContractClassFor(typeof(IArticleBLL))] public sealed class ArticleBLLContract : IArticleBLL { int IArticleBLL.getArticleNSheet(string IdBox) { Contract.Requires<ArgumentOutOfRangeException>(!String.IsNullOrEmpty(IdBox),"IdBox has no valid value"); return default(int); } IEnumerable<Base.Article.IArticle> IArticleBLL.getArticleValue(string IdBox, string IdLanguage) { Contract.Requires<ArgumentOutOfRangeException>(!String.IsNullOrEmpty(IdBox), "IdBox has no valid value"); Contract.Requires<ArgumentOutOfRangeException>(!String.IsNullOrEmpty(IdLanguage), "IdLanguagehas no valid value"); Contract.Ensures(Contract.Result<IEnumerable<Base.Article.IArticle>>() != null, "Return value is out of Range"); return default(IEnumerable<Base.Article.IArticle>); } } ``` The class to apply Contract ``` public class ArticleBLL : IArticleBLL { public int getArticlNSheet(string IdBox) { try { return _Dal... } catch (Exception ex) { throw ex; } } public IEnumerable<IArticle> getArticleValue(string IdBox, string IdLanguage) { IEnumerable<IArticle> article = null; try { article = _Dal... return article; } catch (Exception ex) { throw ex; } } } ``` I've tried to insert a breakpoint in this line ``` Contract.Requires<ArgumentOutOfRangeException>(!String.IsNullOrEmpty(IdBox),"IdBox has no valid value"); ``` but when I call the method it never passes here This is my project configuration ![Code Contracts Config](https://i.stack.imgur.com/4apK7.jpg) Is there something wrong? Thank you!
how to config Code Contracts in Interface
CC BY-SA 3.0
0
2011-04-12T12:28:41.137
2011-04-14T12:49:12.583
null
null
525,798
[ "c#", "interface", "code-contracts" ]
5,635,877
1
5,635,943
null
2
1,491
Is it possible to create a "generic" as in "adaptable" routing service, which will NOT have any public methods to call. Instead, you'd be able to call any command, which would then be mapped in the service and will pass it to appropriate end point with simple message transformation where required. It may be hard to understand and idea might seem a bit crazy (it came from a colleague of mine), but it's clearer if you look at the example: ![WCF 4.0 Routing Service –Content Based Routing (CBR).](https://i.stack.imgur.com/fC1TT.png) similar to what's described in [this article](http://mstecharchitect.blogspot.com/2010/04/wcf-40-routing-service-content-based.html), only difference is that our service should not have a "SubmitTimeSheet" public method, in fact it should have no public methods to call. We'd have to "intercept" an incoming call on a much lower level before it returns "Method Not Found" error. Is this at all possible? The reason for this is obvious: possibility of adding new clients without having to change the code. All we'd have to do is to add a new mapping entry in some sort of config file or even database, e.g. ``` <Client address="newClientAddress" method="DoAnything" transformation="NewClientDoAnything.xslt" endPoint="endPointClientAddress" endPointMethod="endPointClientDoAnything" /> ```
Generic WCF Routing/Forwarding/Proxy Server
CC BY-SA 3.0
0
2011-04-12T13:22:28.853
2011-05-05T00:48:38.957
2011-05-05T00:48:38.957
76,337
115,466
[ "wcf", "routes", "proxy" ]
5,635,934
1
5,636,099
null
0
64
PFA screenshot The widget below symbol 'G' with three options "All", "Web", "Apps"..Whats the name of the widget?.![enter image description here](https://i.stack.imgur.com/tbXxs.png)
Can any one point me which widget is this?
CC BY-SA 3.0
null
2011-04-12T13:26:44.597
2011-04-12T13:37:46.990
null
null
478,700
[ "android" ]
5,635,939
1
null
null
21
45,850
I have an HTML page that is right-to-left. When I don't use any doctype, my numbers are in Arabic/Persian, but when I use strict mode they turn to English. ``` <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Final//EN"> ``` Before adding doctype: ![Before adding doctype](https://i.stack.imgur.com/hSg8O.png) After adding doctype: ![After adding doctype](https://i.stack.imgur.com/RpEIX.png) also I added these meta tags to my page: ``` <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <meta http-equiv="Content-Language" content="fa" /> ``` So how can I view Arabic numbers in a page with strict doctype (in IE because Firefox doesn't show Arabic numbers anyway)?
How can I view Arabic/Persian numbers in a HTML page with strict doctype?
CC BY-SA 3.0
0
2011-04-12T13:27:05.220
2022-08-31T09:23:03.490
2011-04-12T14:21:20.380
33,732
161,505
[ "html", "numbers", "doctype", "arabic", "xhtml-1.0-strict" ]
5,636,182
1
5,636,676
null
1
350
I am currently using the VLOOKUP function for excel and I was wondering does the VLOOKUP actually compare cells or does it just use the cell straight across from it? This is my formula "=VLOOKUP(A2,Sheet3!A2:B1814,2,FALSE)" ![Sheet 1 and sheet 2 of my excel document](https://i.stack.imgur.com/2mlNO.png) As you can see the VLOOKUP function works find for the first product image but it doesnt for the rest of them( it will give #N/A for most of them because the cell in the pic in the right is empty which is ok), but if you look at the picture on the left, cell A4 is the same as cell A3 on the picture on the right and it is still given me #N/A(this is because they are not in the same cells) So my question is, is there a way for excel to check the table 1(left pic) to see is there a matching name on table2(right pic) by searching the rows? Thanks
Does VLOOKUP compare cells
CC BY-SA 3.0
null
2011-04-12T13:43:18.760
2011-04-14T18:44:10.887
2011-04-14T18:44:10.887
13,295
670,994
[ "excel", "worksheet-function" ]
5,636,364
1
5,636,400
null
0
42
please i have a problem with Map displaying, although, in the simulator it`s displayed well, on the iPhone i see this (the left one is with mode and the right is with mode): ![enter image description here](https://i.stack.imgur.com/BTSiD.jpg) here is some of my code : ``` - (void)locationManager:(CLLocationManager *)manager didUpdateToLocation:(CLLocation *)newLocation fromLocation:(CLLocation *)oldLocation{ location = newLocation.coordinate; MKCoordinateSpan span; if (shouldAdjustZoom) { //use the manually defined span span.latitudeDelta=.005; span.longitudeDelta=.005; mapRegion.span = span; } else { mapRegion=mapView.region; mapRegion.center=newLocation.coordinate; mapView.region=mapRegion; } // Apply new coordinates [mapView setRegion:mapRegion animated:TRUE]; } ```
Map hasn`t been displayed
CC BY-SA 3.0
null
2011-04-12T13:55:46.990
2011-04-12T14:01:16.877
2011-04-12T14:01:16.877
602,257
602,257
[ "iphone", "sdk" ]
5,636,416
1
5,636,656
null
0
157
I opened a project (Visual C# - Windows Forms) and profiled it, and got the "hottest" methods. Now I can't understand the results because the hottest method is "collapsed methods without source". How can i understand what to fix if I can't see the method? What should i do? Here is a pic so you can understand. ![enter image description here](https://i.stack.imgur.com/4LNkQ.jpg)
What does this profiling result mean?
CC BY-SA 3.0
null
2011-04-12T13:58:36.347
2011-04-12T15:18:33.893
2011-04-12T15:18:33.893
480,937
682,446
[ "c#", ".net", "winforms", "optimization", "profiling" ]
5,636,422
1
5,636,807
null
3
6,513
Background: I have a winForm app that registers a user in the database based on the user input provided in the form, auto-generates a random password and username for the user, and e-mails the user a link to take an application based on the marketing company selected. Problem: I got the bundles listbox to populate w/ autopostback set to true but the bundles listbox populates as soon as you click on an lbcarrier and it doesn't allow you select more than one carrier. Do you have any ideas on how to allow multiselect with the postback feature on? Here's a screenshot of the interface: ![screenshot](https://i.stack.imgur.com/4EmLV.jpg) code on default.aspx: ``` <td class="style1"> Carriers:</td> <td bgcolor="#ffffff" class="style2"> <asp:ListBox AutoPostback="true" ID="lbCarriers" runat="server" Height="86px" Width="250px"> </asp:ListBox> </td> </tr> <td class="style1"> Bundles:</td> <td bgcolor="#ffffff" class="style2"> <asp:ListBox ID="bundles" runat="server" Height="86px" Width="250px"> </asp:ListBox> </td> </tr> ``` code on default.aspx.vb: ``` Protected Sub lbCarriers_SelectedIndexChanged(ByVal sender As Object, ByVal e As EventArgs) Handles lbCarriers.SelectedIndexChanged Dim splt() As String Dim ac1 As Array bundles.Items.Clear() Dim item As ListItem = lbCarriers.SelectedItem splt = item.ToString().Split("|") ac1 = proxy.GetContractingBundles("test", "test", Trim(splt(0))) For Each Pitem In ac1 bundles.Items.Add(Trim(splt(2)) & " | " & Pitem.FormBundleName) Next End Sub ``` Thanks for looking!
ASP.NET w/ VB.NET - MultiSelect on ListBox Or CheckBoxList w/ AutoPostback enabled
CC BY-SA 3.0
null
2011-04-12T13:58:58.130
2011-04-25T12:41:28.503
2011-04-25T12:41:28.503
606,805
606,805
[ "asp.net", "vb.net", "listbox", "checkboxlist", "autopostback" ]
5,636,451
1
5,647,550
null
0
389
I think everything speaks for itself in the image below. I'm not sure how to write the code to acomplish it. ![enter image description here](https://i.stack.imgur.com/fdRTK.png)
Capturing random images
CC BY-SA 3.0
null
2011-04-12T14:00:37.927
2011-04-15T07:46:10.760
null
null
640,015
[ "excel", "vba", "userform" ]
5,636,592
1
5,703,031
null
17
4,525
According to [a poll here on StackOverflow](https://stackoverflow.com/questions/6166/any-good-php-ide-preferably-free-or-cheap), is the best PHP IDE available. This is all fine and good, except for one thing: It appears to be terrible at checking syntax. I'm sure I must be doing something wrong? I've previously used , which is a great program, but I've only got version 2007, and it doesn't support xDebug (I'd have to buy the new version if I wanted that). So I thought I'd try the much vaunted (and free) NetBeans. But, as far as I can tell, it's syntax checking is . For example: Note how the same file is handled by the two different IDEs. First : ![phpDesigner](https://i.stack.imgur.com/WsDDw.jpg) Pretty obvious where the problem is, right? Then : ![NetBeans](https://i.stack.imgur.com/6d2d0.jpg) Here there is nothing but a vague error message at the very bottom of the class, and it's not even near the function causing the error(!). Is it possible to get better syntax checking in NetBeans? I'm presuming there must be a way, and I'm just being really dumb. If this is not possible in NetBeans, what other free IDEs are available that have this level of syntax checking? Thanks for any help. --- Some people have suggested as a replacement, so I thought I'd test it. ![Eclipse](https://i.stack.imgur.com/Prn5i.jpg) It too correctly recognises the syntax error. (Makes me wonder if NetBeans is bugged.) I may just switch to Eclipse. Are there any other IDEs people think are worth trying?
NetBeans: PHP Syntax Checking
CC BY-SA 3.0
0
2011-04-12T14:10:22.943
2011-05-05T12:45:31.613
2017-05-23T10:32:36.017
-1
199,700
[ "php", "debugging", "syntax", "ide" ]
5,637,368
1
null
null
2
1,009
I have a nine-patch png that I'm using as a popup bubble. It looks like this: ![yellow popup bubble with pointer](https://i.stack.imgur.com/mplKM.png) I'm putting it in an TextView of width fill_parent so the bubble expands the width of the screen. As one might expect, the pointer at the top is then centered horizontally in the middle of the screen. What is the easiest way to adjust the location of the pointer so that it's, say, 5/8ths of the way over from the left instead of centered? I can re-cut the png if necessary. Cubic has a very simple solution to the problem that I can't believe I missed. It works very effectively for my current problem. However, one downside with this solution is that it can't be adjusted on the fly. If I need to put the pointer in one place for one view, but a different place for another view, I need to cut two different PNGs. Is there a solution that can be adjusted at runtime?
Adjusting center of nine-patch png
CC BY-SA 3.0
null
2011-04-12T15:02:10.923
2011-04-12T15:42:00.033
2011-04-12T15:42:00.033
82,156
82,156
[ "android", "nine-patch" ]
5,637,509
1
5,638,069
null
0
2,499
![enter image description here](https://i.stack.imgur.com/r4ABX.jpg)
How can I plot this kind of smoothed probability distribution in Matlab?
CC BY-SA 3.0
null
2011-04-12T15:12:39.067
2011-04-14T16:42:37.263
null
null
null
[ "matlab", "plot", "distribution", "probability" ]
5,637,566
1
5,646,063
null
3
257
My app is in the App Store and I had pulled it up so I can share the link with someone. I looked at the languages and saw something really strange. The app was listed as localized for several languages which I didn't use. I don't even know what half of those languages sound like. Here's a screenshot: ![Meh. My App is in Serbian.](https://i.stack.imgur.com/UQyxV.png) ![enter image description here](https://i.stack.imgur.com/Fu8Sb.png)
Are all apps localized to, say, Serbian by default?
CC BY-SA 3.0
0
2011-04-12T14:44:16.547
2011-05-09T13:41:59.283
2011-04-12T16:26:39.267
224,988
224,988
[ "internationalization", "itunes" ]
5,637,937
1
null
null
9
11,421
I test the exceptions interception, so, I don't need that Visual Studio breaks on thinkgs like `thrown new NullReferenceException("myVar")`. I have the following under Debug=>Exceptions ![enter image description here](https://i.stack.imgur.com/ERh6S.jpg) however, VS breaks on the exceptions. What should I do? for the application unhandled exception, I "catch" them using the `Application.UnhandledException` as in the the following: ``` ''' <summary>Occurs when the application encounters an unhandled exception.</summary> ' Private Sub Application_UnhandledException(ByVal sender As Object, ByVal e As Microsoft.VisualBasic.ApplicationServices.UnhandledExceptionEventArgs) Handles Me.UnhandledException Dim message As String = String.Format("An application UnhandledException were thrown.{1}The application will now terminate.{1}'{0}'{1}{1}StackTrace:{1}{2}", e.Exception.Message, Environment.NewLine, e.Exception.StackTrace) MessageBox.Show(message) End Sub ```
Prevent Visual Studio from breaking when throwing exceptions
CC BY-SA 4.0
null
2011-04-12T15:42:11.450
2021-05-13T00:45:00.687
2021-05-13T00:45:00.687
2,063,755
185,593
[ "visual-studio", "visual-studio-2010", "debugging" ]
5,637,967
1
5,638,029
null
1
899
I have 3 timers running on my application which takes care of different action. Timer 1 will deals with automatic logout of the application, timer 2 deals with updating a table, timer 3 deals with updating the color of swing buttons. First timer uses the calculation based on the variables and its values, second and third timers works out of MYSQL queries. Now when i run this application on an average performance machine the application is not moving .I need to wait for few seconds to a normal click to happen or a window to open. Is it something to do with the timers ? If yes do I have any alternative suggestions to get rid of this timer problem?![enter image description here](https://i.stack.imgur.com/1Yu49.jpg)
Issues with Swing timers
CC BY-SA 3.0
null
2011-04-12T15:44:12.717
2011-04-12T16:33:18.067
2011-04-12T16:33:18.067
402,610
402,610
[ "java", "swing", "timer" ]
5,638,129
1
5,639,627
null
11
35,707
I'm using a userForm in vba and I have a list box. I want to remove the horoz. scroll bar from the bottom. Is there a way to do this? I don't see any option in the properties box. ![enter image description here](https://i.stack.imgur.com/jwpYo.png)
Remove the scroll bar on a list box
CC BY-SA 3.0
0
2011-04-12T15:54:24.923
2023-02-10T21:19:53.510
null
null
640,015
[ "excel", "vba", "userform" ]
5,638,212
1
5,638,915
null
1
1,274
I have a two-column layout with two 'absolute' positioned divs. ``` #left { position: absolute; top: 0; left: 0; z-index: 0; } #right { position: absolute; top: 0; left: 0 z-index: 0; } ``` In each column I have images and would like them to be able to overlap one another in differing configurations with z-index. Using wordpress, #left is populated with posts from one category then subsequently, #right is populated. I have assigned z-index for images in higher than that of , but images in are always on top. I assume it is something to do with the fact that #left appears first in the code? ![enter image description here](https://i.stack.imgur.com/B6lIN.png)
z-index between two absolutely positioned columns?
CC BY-SA 3.0
null
2011-04-12T15:59:18.723
2011-04-12T16:58:34.663
null
null
436,014
[ "html", "css", "positioning", "z-index" ]