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,499,079
1
5,499,714
null
0
938
I have to doubts regarding to calling images that are stored in my project: 1-If i have an image stored at MyApp/images/image.gif How can i tell the component h:graphicImage to find that image? I tried this but it didn't work ``` <h:graphicImage value="MyApp/images/image.gif"/> ``` 2- I am interested in knowing how to call images that are stored under WEB-INF/images I read somewhere that I need a servlet for that because cannot be accessed directly. Is that true? How can i do that? This is a print screen of my projectStructure, so you can see where are the files where i need to access. ![enter image description here](https://i.stack.imgur.com/MdqUt.png)
How to access image resources in JEE6 project?
CC BY-SA 2.5
0
2011-03-31T11:28:36.100
2011-03-31T12:17:42.570
2011-03-31T11:44:59.763
614,141
614,141
[ "java", "image", "jsf", "resources", "jakarta-ee" ]
5,499,318
1
null
null
0
49
On many pages in facebook I have seen this![](https://i.stack.imgur.com/1YRfX.png) It looks like it is embedded html code. What is the name of that functionality in facebook and how to build my own ?
facebook functionality
CC BY-SA 2.5
null
2011-03-31T11:46:42.180
2011-03-31T12:01:16.823
2011-03-31T11:50:28.937
152,422
634,072
[ "facebook", "fbml" ]
5,499,354
1
5,500,875
null
5
2,725
I have the situation that my C# WPF application contains a ListView whose elements are Expanders. Each of those expanders contains a ListView with ListViewItems. Here is a picture: ![enter image description here](https://i.stack.imgur.com/kBLMb.jpg) On the right you can see a Scrollbar. And that ScrollBar is my problem. It has got two issues: 1. The ScrollBar does not work when using the MouseWheel over the expanded list. By that I mean the area from "Controller" down to "FullInstallation". If hovering over the header ("All Tests"), the ScrollBar does scroll. I think that the ListView inside the Expander by default has a ScrollBar which "steals" the MouseWheel event. However, I don't know what to do against it. 2. The ScrollBar scrolls over the Expander items and not the content of the expanders. By that I mean, that it is not possible to scroll a little bit down, instead you always scroll at least 1 Expander item down. I would like the scrollbar to scroll such that it is possible to see for instance one half of the "All Tests" Expander. The picture shows a disabled scrollbar, but by making the window smaller, the scrollbar gets enabled. What I have tried so far: 1. ScrollViewer outside the outer ListView: This solves Problem 1, however it means that the MouseWheel does not work at all! That is because the outer ListView generates its own ScrollViewer (used Snoop to find this out) which "steals" the MouseWheel events. 2. Redirected all the MouseWheel events of all the controls (ListView, Expander, ListViewItem) to the ScrollViewer: Again I used a ScrollViewer outside of the outer ListView and this time I used the MouseWheel event for all my controls to call the MouseWheel event of the outer ScrollViewer. This did work, however for some locations of the mouse pointer it didn't. For instance between two ListViewItems there is a small 1 millimeter space where the MouseWheel event is not catched. Or at the bottom after the last Expander ("Short Tests"). There I do not get any event. I tried a couple more things but did not get any further. Does anyone have an idea how to solve this? Best wishes, Christian
Scrolling of ListView containing Expanders which contain ListViews does not work
CC BY-SA 2.5
0
2011-03-31T11:50:46.427
2011-03-31T13:46:23.793
null
null
490,230
[ "c#", "wpf", "listview" ]
5,499,424
1
11,350,549
null
1
127
The following is a default rule with standard Resharper (without plugins) indicating a naming rule violation. ![one of the naming rules in Resharper](https://i.stack.imgur.com/dGkHJ.jpg) I would like to understand how custom naming rules are implemented in Resharper using Open API. So would like to deassemble (using Reflector) the corresponding dll file in which this rule is implemented. Can you pls guide me which dll file(s) I need to check/deassemble for checking how this naming rule is implemented. Thank you.
Using .NET Reflector to see how naming rules are implemented in Resharper
CC BY-SA 3.0
0
2011-03-31T11:56:19.753
2012-07-05T18:42:07.563
2011-04-15T12:36:27.603
659,735
659,735
[ "resharper", "reflector" ]
5,499,786
1
5,500,089
null
0
419
![When I build the solution](https://i.stack.imgur.com/fgViu.png) Okay! I really need your help or some tips I need a program that I will recieve a raise on my previous years salary. I need to calculate and display the amount of annual raises for the next three years. I want to use the rates o 3% 4% 5% and 6%. This is what I have so far but its not working ``` #include <iostream> #include <iomanip> using namespace std; int main() { int beginSalary = 0; double newSalary = 0.0; double raise = 0.0; double theRate = 0.0; cout << "Beginning Salary (negative number or 0 to end): "; cin >> beginSalary; do { // 3 percent newSalary = (beginSalary+(beginSalary*3/100)); raise = newSalary-beginSalary; cout << raise << endl; cout << endl; // 4 percent newSalary = (beginSalary+(beginSalary*4/100)); raise = newSalary-beginSalary; cout << raise << endl; // 5 percent newSalary = (beginSalary+(beginSalary*5/100)); raise = newSalary-beginSalary; cout << raise << endl; cout << endl; // 6 percent newSalary = (beginSalary+(beginSalary*6/100)); raise = newSalary-beginSalary; cout << raise << endl; cout << endl; } while ( newSalary != 0); return 0; } //end of main function ```
Hello! a beginner with C++ Programming& I need help
CC BY-SA 2.5
null
2011-03-31T12:24:19.123
2011-03-31T13:15:56.110
2011-03-31T13:15:56.110
1,288
680,610
[ "c++" ]
5,499,881
1
null
null
3
902
I have an `<asp:ComboBox>` filled with `<asp:CheckBoxes>`. The Combobox is 200px wide. The Checkboxes are also 200px wide. I can check the checkbox only if I click on 'box' or the checkbox text label. I want to be able to check the item even when I click anywhere on the row. Is there any way to extend this area to the whole row? update: ![enter image description here](https://i.stack.imgur.com/37KMN.png) On the green area, everything is fine. But on the red area when i click, checkbox is not checked and drop downlist goes up. ``` <telerik:RadComboBox runat="server" EnableTextSelection="false" ID="rcb_Something" Width="200px" HighlightTemplatedItems="true" AllowCustomText="true" Text="Select Something" MaxHeight="250px"> <ItemTemplate> <telerik:RadBinaryImage ID="RadBinaryImage1" runat="server" Width="24px" Height="24px" DataValue='<%# Eval("Something") %>' ResizeMode="Fit" /> <asp:CheckBox ID="CheckBox1" runat="server" Text='<%# Eval("Something") %>' ToolTip='<%# Eval("SomethingId") %>' /> </ItemTemplate> ```
CheckBox selection area
CC BY-SA 2.5
null
2011-03-31T12:30:53.470
2011-03-31T13:35:06.200
2011-03-31T13:14:38.707
480,231
480,231
[ "asp.net", "css", "combobox", "checkbox" ]
5,500,266
1
5,500,336
null
0
593
I would like to make a window as a container base window for the other windows just like the SQL Management Studio main window ![enter image description here](https://i.stack.imgur.com/IG9S9.jpg) I remember it is a just property in the windows application project..How can i do this in WPF
How to make a window as a container base window
CC BY-SA 2.5
null
2011-03-31T13:02:58.380
2016-08-21T04:03:19.350
2020-06-20T09:12:55.060
-1
401,507
[ "wpf" ]
5,500,302
1
5,503,323
null
10
6,417
I have elements of different sizes that are arranged somewhat acording to a grid (like in the image below) and I want to drag and drop properly those elements. Is there a plugin that would do that? Sortable does not do it properly... EDIT: By "properly" I mean it should act normal (meaning if I drag and drop the big one on the right it should rearrange inteligently). Maybe I just need to see one that does what I want and I'll make it do stuff "properly" ![sortable grid](https://i.stack.imgur.com/jslVj.png) EDIT: If you move the big block on the right (how it should look like). ![sortable grid 2](https://i.stack.imgur.com/NMzAe.png) EDIT: I just want a way to rearrange a grid-like layout like this one. I can accept other ideas..
A different kind of jquery sortable
CC BY-SA 2.5
0
2011-03-31T13:05:33.580
2013-02-10T22:55:59.187
2011-03-31T13:37:54.513
625,627
625,627
[ "jquery", "plugins", "jquery-ui-sortable" ]
5,500,436
1
5,517,081
null
1
4,036
I'm trying to deploy a weeb-service, generated from an EJB into glassfish, but, for some reason, my web service is never visible in Glassfish. The web-service is defined from an EJB interface as follows : ``` @Remote @WebService public interface TemplateEJBRemote { public abstract @WebResult(name="found") Template find(@WebParam(name="templateId", mode=Mode.IN) Long id); } ``` This EJB interface has a Local implementation : ``` @Local @Stateless public class TemplateEJBImpl implements TemplateEJBRemote { @PersistenceContext(unitName=NamingConstants.PERSISTENCE_CONTEXT) private EntityManager entityManager; @Override public Template find(Long id) { return entityManager.find(Template.class, id); } } ``` And they're both defined in a `war` module, which an `ear` module sends to Glassfish. Those module produce correctly looking artefacts, including an `ear` with the correct `application.xml` : ``` <application xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/application_6.xsd" version="6"> <description>This is the project that will deliver a full usable EAR including all delivered components. All the project dependencies here will be included in this</description> <display-name>my-ear</display-name> <module> <web> <web-uri>my-war-0.0.1-SNAPSHOT.war</web-uri> <context-root>/my-war</context-root> </web> </module> </application> ``` When deployed in Glassfish, all infos I can get is ``` E:\java-ext\glassfish3>bin\asadmin list-components --subcomponents my-ear-0.0.1-SNAPSHOT <ear, ejb, webservices, web> my-war-0.0.1-SNAPSHOT.war <WebModule> Command list-components executed successfully. ``` it seems to me that, were my web-service really deployed, it would appear below my `war` submodule, no ? If not, what can I do to ensure my web-service is correctly defined and deployed ? In order to give some more informations, i created a smaller web-service endpoint, the famous Hello world, coded as such : ``` @WebService public class Hello { public String hello(String world) { return "Salut, "+world+" !"; } } ``` using this definition, it is a perfect Glassfiosh web-service : ![enter image description here](https://i.stack.imgur.com/yTKqU.png) But, as soon as I make it a bean, as such : ``` @WebService @Stateless public class Hello { public String hello(String world) { return "Salut, "+world+" !"; } } ``` Things become a little different : ![enter image description here](https://i.stack.imgur.com/4bH5W.png) However, as log files told me, HelloService is still present : ``` [#|2011-03-31T17:55:55.059+0200|INFO|glassfish3.1|javax.enterprise.webservices.org.glassfish.webservices|_ThreadID=339;_ThreadName=Thread-1;|WS00019: EJB Endpoint deployed ``` autocat-ear-0.0.1-SNAPSHOT listening at address at [http://perigee-567125f:8080/HelloService/Hello|#]](http://perigee-567125f:8080/HelloService/Hello|#]) I tried to apply the same logic to my initial bean, but with an infortunate result (a 404 error, of course). So I guess there is another issue hidden beneath. But which on ? I can't have any idea. To make things clear, the EJb I try to deploy is not visible as a web-service in Glassfish console, and its URL can't be pinged by any web client.
Unable to deploy ejb-based WSDL web-service in Glassfish 3
CC BY-SA 2.5
0
2011-03-31T13:14:30.883
2013-01-05T11:03:25.113
2011-04-01T07:53:58.913
15,619
15,619
[ "web-services", "jakarta-ee", "maven", "glassfish" ]
5,500,908
1
5,500,947
null
1
11,986
I have successfully styled spinner background like here: [How to set font custom font to Spinner text programmatically?](https://stackoverflow.com/questions/5483495/how-to-set-font-custom-font-to-spinner-text-programmatically) My opened spinner looks like this: ![enter image description here](https://i.stack.imgur.com/4XY7R.png) Only thing that is left to style is spinner prompt box (and text inside). How can i change background color and font of spinner prompt? EDIT:Based on 2red13 advice i created style: ``` <?xml version="1.0" encoding="utf-8"?> <resources> <style name="spinner_style"> <item name="android:layout_width">fill_parent</item> <item name="android:layout_height">wrap_content</item> <item name="android:textColor">#00FF00</item> <item name="android:typeface">monospace</item> <item name="android:background">#8b4513</item> </style> ``` and aplied it to spinner like this: ``` <Spinner android:id="@+id/spinner" style="@style/spinner_style" android:layout_width="fill_parent" android:layout_height="wrap_content" android:prompt="@string/header_prompt" android:background="@drawable/spinaca" android:layout_margin="5dip"/> ``` But nothing has changed. I guess i don't understand something :(
How to style spinner prompt?
CC BY-SA 2.5
null
2011-03-31T13:48:47.110
2011-09-18T23:08:35.357
2017-05-23T10:31:07.723
-1
324,417
[ "android", "spinner", "prompt" ]
5,501,202
1
5,501,231
null
2
1,377
Using tomcat 7.0.11 and eclipse 3.6.1. I'm trying to debug a jsp file that uses log4j but I get a class not found error at runtime because tomcat isn't seeing log4j-1.2.16.jar. When I was running outside of eclipse I had to add a reference to all external jars in catalina.properties. Is there a way for me to specify this runtime reference in eclipse? Update: Here are screenshots of my current settings: ![screenshot 1](https://i.stack.imgur.com/kyrcU.png) ![enter image description here](https://i.stack.imgur.com/xvJEZ.png) With the settings like this the tomcat catalina.properties file gets overwritten when I start up tomcat in eclipse (which wipes out the changes I made to shared.loader)
External jar configuration when debugging JSP in eclipse
CC BY-SA 2.5
null
2011-03-31T14:07:21.193
2011-04-01T03:45:09.573
2011-04-01T03:45:09.573
549,226
549,226
[ "eclipse", "jsp", "tomcat" ]
5,501,385
1
5,501,473
null
0
2,346
Is it possible to create a treeview in visual studio which resembles the following figure : ![Customized TreeView](https://i.stack.imgur.com/oJHN8.png) The ROOT , CHILD and Sub-Child , all three would be LinkLabels , and on clicking them a new Form would be opened.
customizing treeview in winforms
CC BY-SA 2.5
null
2011-03-31T14:23:26.510
2011-04-06T04:17:41.597
null
null
613,929
[ "c#", ".net", "winforms", "treeview", "customization" ]
5,501,491
1
null
null
0
1,334
I'm working on a calendar system. We are using Derby. I'm writing a script to ask (in my opinion) a very hard logic statement. I have been reading in derbys instructions but cant seem to find some instruction. I have used 'Antijoin' when I made the logic and it seems derby dose not support this. To my question. In the picture below. What would that statement be? It would suck to change the database tables because Derby dose not support 'Antijoin' because we have made so many other queries. Im sorry it is not written in English but the signs are international. I'm also comparing some variables from the script. The logic works as it is there it's just I am having a hard time to write it in Derby sql. In the picture there are the relations. I don't have to use antijoin but cant get my head around another way to solve it. ![enter image description here](https://i.stack.imgur.com/SvW1e.jpg) There was a question to not use the picture so i will explain. It's now in english so if you see different names on the pictures i translated it. There are two tables involved. Room roomName numberOfPeople description Meeting (There is more here but i will only write what is important) roomName meetingStart meetingEnd The query is to find witch rooms are available too use for the meeting. What I have designed is that I will select from the meeting table only the meetings that are conflicting with the new reservation of the room your are trying to make. You cant do it the other way around in my opinion. It looks like this: reservationStart > meetingStart AND meetingEnd > reservationEnd Then i will 'antijoin' with the lists of all the rooms. This will make a list of all the available rooms. The problem is that it seems Derby cant antijoin. Is there another way to construct a antijoin with other joins? Hope you understand what I'm writing I'mnot getting any error because I have not tried any queries. I have been working on making the query and what i got thus far is this: ``` SELECT roomName, numberOfPeople, description FROM ROOM WHERE roomName NOT IN (SELECT roomName, meetingStart, meetingEnd FROM Meeting WHERE reservationEnd > meetingStart AND meetingEnd > reservationStart); ``` But from what i have been reading there is no 'NOT IN' in Derby. How can I rephrase the query? I have got the query. The error code I'm getting now is this: ERROR 42X39: Subquery is only allowed to return a single column.
Derby database query
CC BY-SA 3.0
null
2011-03-31T14:31:18.723
2015-07-12T18:16:47.930
2011-12-01T09:09:54.043
644,450
388,573
[ "derby" ]
5,501,607
1
5,538,076
null
4
2,758
I created a .pkg file of my Mac app using XCode 4. I installed it using the terminal successfully, however when I double click on the .pkg file, I get a message that says, "... can't be installed on this computer". Any suggestions? Thanks. This is the error message that I get. I created package by going to . Then in the Organizer I clicked and then save the package to the desktop. ![enter image description here](https://i.stack.imgur.com/sQIpy.png) This is what's inside the package. ![enter image description here](https://i.stack.imgur.com/5pmUk.png) Furthermore, I've inspected the build settings between XCode 3 and 4 is the following ``` Path to Link Map File Debug build/Alarm Pro.build/Debug/Alarm Pro.build/Alarm Pro-LinkMap--x86_64.txt Release build/Alarm Pro.build/Release/Alarm Pro.build/Alarm Pro-LinkMap--i386.txt ``` ``` Path to Link Map File Debug build/Alarm Pro.build/Debug/Alarm Pro.build/Alarm Pro-LinkMap--x86_64.txt Release build/Alarm Pro.build/Release/Alarm Pro.build/Alarm Pro-LinkMap--x86_64.txt ```
Created a .pkg file in Xcode 4 and cannot run it on my computer
CC BY-SA 3.0
0
2011-03-31T14:38:47.740
2011-04-24T21:53:41.110
2011-04-09T15:01:36.497
378,698
378,698
[ "macos", "xcode4", "pkg-file" ]
5,501,686
1
5,501,806
null
1
383
Hey guys I have a confusing question, I have a user table and it stores all the usual data for a user that you would expect but im trying to figure out how a user could add another user? Sounds strange but each user in the User table has his own UI which is UserID how could I add another table where UserID can have a relationship with another UserID? ![enter image description here](https://i.stack.imgur.com/fqyHR.jpg) I will give the answer to those that could take the time to upload a table diagram and who can help with some examples for sqlsyntax related to this question, i.e how would I right the syntax for the above question if I wanted to display all the UserIDs friends on a page. How would I add a friend.
confusion over relationships
CC BY-SA 2.5
null
2011-03-31T14:44:04.433
2011-03-31T15:11:38.360
null
null
477,228
[ "c#", "asp.net", "mysql", "sql", "html" ]
5,501,702
1
5,522,780
null
2
1,885
Discovering JFreeChart, I hit a problem using [SpiderWebPlot](http://www.jfree.org/jfreechart/api/javadoc/org/jfree/chart/plot/SpiderWebPlot.html). This is what I have today ![enter image description here](https://i.stack.imgur.com/Gr4QN.png) My values are {2, 2, 1.5} By default max value is set to the max value of my dataset (here 2) but I want to set it to 5 which as you can see it did but it did not draw the lines for the value between 2 and 5. How can I progamatically draw them ? : ``` SpiderWebPlot plot = (SpiderWebPlot)chart.getPlot(); plot.setMaxValue(5.00); plot.setHeadPercent(0.01); return chart; ``` I am using JFreeChart through another application that gives me the hand directly on the chart variable. So that the piece of code I introduced.
How to deal with SpiderWebPlot in JFreeChart?
CC BY-SA 2.5
null
2011-03-31T14:45:10.873
2019-04-28T14:49:11.107
2011-04-01T07:41:17.033
290,613
290,613
[ "java", "jfreechart", "jfreereport" ]
5,502,330
1
5,749,220
null
8
4,173
In the system-wide search on my HTC Desire (Froyo), I see a little drop down left to the search input field that allows to select where I want to search (All, web, apps). How can I implement this ? The search tutorial on the Google developer site does not address this. So in a scenario like the following, taken from the Android docs, ![](https://developer.android.com/images/search/search-ui.png) I would like to click on the books and then get some sort of menu to e.g. select "words", "headings" as search mode. : I am not looking for the QuickAction dialog itself, but rather how to attach something to the books icon that reacts on touch, so that I could attach the QuickAction or a new activity or ... And I want to use the standard Android Search Dialog as described in [http://developer.android.com/guide/topics/search/search-dialog.html](http://developer.android.com/guide/topics/search/search-dialog.html)
How to add a drop down next to the search input field in Android?
CC BY-SA 3.0
null
2011-03-31T15:28:36.130
2017-07-26T12:36:34.203
2017-02-08T14:31:53.343
-1
100,957
[ "android", "search" ]
5,502,513
1
5,502,574
null
17
32,038
I need to create a TreeView that hold synchronized data, like a DataGrid. To clarify, take a look at this image: ![DataTreeGrid Custom Control](https://i.stack.imgur.com/rDEBw.png) So, I have a TreeView at left side with columns at right side. The data will come from objects like this: ``` public NodeData Parent; public List<NodeData> Children; public String Label; public Boolean DataA; public Boolean DataB; public Boolean DataC; public Boolean DataX; public Boolean DataY; public Boolean DataZ; ``` How can I create this?
Creating a WPF Hybrid Control (TreeView + DataGrid = DataTreeGrid)
CC BY-SA 2.5
0
2011-03-31T15:40:32.240
2020-06-26T16:42:02.180
2011-03-31T18:23:14.600
1,288
608,068
[ "wpf", "datagrid", "treeview", "custom-controls" ]
5,502,632
1
5,509,764
null
0
2,348
I have a remote GlassFish server that has a node agent configured. The instance I want to start in profiling mode is controlled by the node agent. I've installed and calibrated the remote pack and I've modified my domain.xml for the specific instance as follows: ``` <profiler enabled="true" name="NetBeansProfiler"> <jvm-options>-agentpath:/home/glassfish/glassfish/profiler-server-6.0rc1-linux/lib/deployed/jdk16/linux/libprofilerinterface.so=/home/glassfish/glassfish/profiler-server-6.0rc1-linux/lib,5140</jvm-options> </profiler> ``` Now at this point NetBeans tells you to start the domain with the --verbose command but in my case I'm trying to start an instance and "asadmin start-instance" doesn't support --verbose. I've checked the server.log but I'm not seeing any error nor any language that says it's waiting when I try to start the instances. However, I think GlassFish is properly configured and my NetBeans setup is the issue. Where I think the issue might be is trying to specify the port. If I leave the port off, it just tries to connect forever. If I put the port on it just closes the dialog and the status shows "Inactive". ![NetBeans Profiler setup page 1](https://i.stack.imgur.com/I17up.jpg) ![NetBeans Profiler setup page 2](https://i.stack.imgur.com/wEjp1.jpg) UPDATE: It seems there might be a bug with GF2. After verifying everything and getting the server so that it was listening, the following exception is thrown Could not load Logmanager "com.sun.enterprise.server.logging.ServerLogManager" java.lang.ClassNotFoundException: com.sun.enterprise.server.logging.ServerLogManager at java.net.URLClassLoader$1.run(URLClassLoader.java:200) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:188) at java.lang.ClassLoader.loadClass(ClassLoader.java:307) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301) at java.lang.ClassLoader.loadClass(ClassLoader.java:252) at java.util.logging.LogManager$1.run(LogManager.java:166) at java.security.AccessController.doPrivileged(Native Method) at java.util.logging.LogManager.(LogManager.java:156) According to this URL, [http://java.net/jira/browse/GLASSFISH-3256](http://java.net/jira/browse/GLASSFISH-3256) it's a known issue and won't be fixed until GF3. Anyway, my question was about how to connect to a specific instance and I think that was answered.
How do I connect the NetBeans profiler to a specic remote instance
CC BY-SA 2.5
null
2011-03-31T15:50:44.457
2011-04-05T19:41:23.757
2011-04-05T19:41:23.757
57,907
57,907
[ "netbeans", "glassfish", "profiler" ]
5,503,009
1
5,505,014
null
1
881
I am on a time crunch, and I can't seem to get Netbeans (6.9.1) to find a library I need to incorporate a memory allocator form [libcds](http://sourceforge.net/projects/libcds/), I have coded what I believe to be a correct incorporation of the ~/cds-0.8.0/cds/memory/michael/allocator.h file. The problem I have is that in my Netbeans project, it can't find the library. I have `#include <cds/memory/michael/allocator.h>` but it says it can't find the file. I placed the cds folder next to my main.cpp file. I also ran the "build-linux-ia64.sh" script in the build folder as well. I have the boost library installed through apt-get command `sudo apt-get install libboost1.40-all` Lastly I am runing UBUNTU (Latest build, fully up to date). Here is a picture of my project settings as well. ![enter image description here](https://i.stack.imgur.com/PyZUW.png)
Netbeans 6.9.1 problem finding library on Ubuntu
CC BY-SA 2.5
0
2011-03-31T16:18:11.850
2011-04-01T00:09:06.797
2011-03-31T19:19:33.090
null
640,261
[ "c++", "include", "netbeans-6.9" ]
5,503,027
1
5,503,137
null
0
384
Hi I keep getting this error using a sqldatasource in asp.net, I can connect and see mysql schema and it lists everything fine but every query I test is returned with an error even the manualy inputted ones. ![enter image description here](https://i.stack.imgur.com/1gJVP.jpg)
mysql sntax error using sqldatasource in asp.net
CC BY-SA 2.5
null
2011-03-31T16:19:23.707
2011-03-31T16:27:19.507
null
null
477,228
[ "c#", "asp.net", "mysql", "sql" ]
5,503,931
1
5,504,030
null
0
2,723
I'm following tutorial here [http://www.graphicsxone.com/checkbox-and-as3-in-flash-cs4.html](http://www.graphicsxone.com/checkbox-and-as3-in-flash-cs4.html) This is my code in main.as ``` package { import flash.display.Sprite; // import the CheckBox class import fl.controls.CheckBox; mport flash.events.*; public class main extends Sprite { addEventListener( Event.ADDED_TO_STAGE, init ); // create the CheckBoxes var NS = new CheckBox(); var SS = new CheckBox(); var ES = new CheckBox(); var WS = new CheckBox(); } private function init( e:Event ):void { removeEventListener( Event.ADDED_TO_STAGE, init ); response_txt.text = 'foo bar baz etc'; } } ``` When I test it says Access of undefined properties response_txt. New picture [http://img217.imageshack.us/i/responsetxt2.jpg/](http://img217.imageshack.us/i/responsetxt2.jpg/) ![enter image description here](https://i.stack.imgur.com/I6CF8.jpg)
Access of undefined properties in flash
CC BY-SA 2.5
null
2011-03-31T17:36:01.013
2011-03-31T20:00:30.650
2011-03-31T20:00:30.650
310,291
310,291
[ "flash", "actionscript" ]
5,503,967
1
null
null
2
6,681
I tried to make a order with a product with an inventory of 1. When the order is completed, the stock is 0. It's ok. However, the `Stock Availability` is set to "`In stock`". And the option `Qty for Item's Status to become Out of Stock` is set to `0` too. Do you have any ideas? I don't understand. ![enter image description here](https://i.stack.imgur.com/LvXjs.png) ![enter image description here](https://i.stack.imgur.com/ivy4f.png)
Why my products don't go out of stock when qty = 0 in Magento?
CC BY-SA 2.5
null
2011-03-31T17:38:57.427
2014-05-17T21:51:52.967
2011-03-31T17:57:00.850
672,923
672,923
[ "php", "magento", "stock" ]
5,504,237
1
5,505,076
null
3
100
I am creating a simple DB application for reports. According to DB design theory, you should never store the same information twice. This makes sense for most DB applications, but I need something that you can simply select a generic topic, you could then keep the new instance copy of the generic topic untouched or change the information but the generic topic should not be modified by modifying the instance copy, but the relationship needs to be tracked between the original topic and the instance copy of the topic. Confusing, I know. Here is a diagram that may help: ![Diagram 1](https://i.stack.imgur.com/lMlKG.png) I need the report to be immutable or mutable based off of the situation. A quick example would be you select a customer, then you finish your report. A month later the customer's phone number changes so you update the customer portion of the DB, but you do not want to pull up a finished report and have the new information update into the already completed report. What would be the most elegant solution to this scenario? This may work: ![Diagram 2](https://i.stack.imgur.com/ugprG.png) But by utilizing this approach I would find myself using looping statements and if statements to identify the relationships between Generic, Checked Off and Report. ``` for (NSManagedObject *managedObject in checkedOffTaskObjects) { if ([[reportObject valueForKeyPath:@"tasks"] containsObject:managedObject]) { if ([[managedObject valueForKeyPath:@"tasks"] containsObject:genericTaskObjectAtIndexPath]) { cell.backgroundView = [[[UIImageView alloc] initWithImage:[UIImage imageNamed:@"cellbackground.png"]] autorelease]; } } } ``` I know a better solution exists, but I cannot see it. Thank you for time.
Data Base Design Dilemma
CC BY-SA 2.5
0
2011-03-31T18:00:43.257
2011-04-01T19:59:23.593
2011-03-31T21:52:29.547
635,592
635,592
[ "iphone", "database", "ipad", "core-data" ]
5,504,295
1
5,521,575
null
5
3,191
I'm implementing a ListBox whose ItemsPanel is a WrapPanel [as per this answer](https://stackoverflow.com/questions/908089/using-wrappanel-and-scrollviewer-to-give-a-multi-column-listbox-in-wpf/923697#923697), but there's a twist: my ItemsSource is a CollectionView. With a `GroupStyle` applied to my ListBox, the wrapping shown in that question doesn't work: the groups are always displayed vertically. [Snoop](http://www.blois.us/Snoop/)ing on my app, here's why: ![Snoop displaying WrapPanel in GroupItem](https://i.stack.imgur.com/ij1Nb.png) As you can see, the WrapPanel, defined as my ListBox's ItemsPanelTemplate, appears in the ItemsPresenter each GroupItem; an implicit, vertically-oriented StackPanel (top item in the pink box) is created to contain the GroupItems themselves. To illustrate what I'm actually doing with my ListBox and the CollectionView grouping, let me post a little XAML: ``` <Grid> <ListBox ItemsSource="{Binding}" ScrollViewer.VerticalScrollBarVisibility="Disabled" SelectionMode="Multiple" ItemContainerStyle="{StaticResource itemStyle}"> <ListBox.GroupStyle> <GroupStyle> <GroupStyle.HeaderTemplate> <DataTemplate> <TextBlock Text="{Binding Name}" FontWeight="Bold"/> </DataTemplate> </GroupStyle.HeaderTemplate> </GroupStyle> </ListBox.GroupStyle> <ListBox.ItemTemplate> <DataTemplate DataType="{x:Type WpfApplication1:Item}"> <StackPanel Orientation="Vertical"> <TextBlock Text="{Binding Name}" FontSize="10"/> <TextBlock Text="{Binding Amount, StringFormat={}{0:C}}" FontSize="10"/> </StackPanel> </DataTemplate> </ListBox.ItemTemplate> <ListBox.ItemsPanel> <ItemsPanelTemplate> <WrapPanel Orientation="Vertical"/> </ItemsPanelTemplate> </ListBox.ItemsPanel> </ListBox> </Grid> ``` The `GroupStyle` is at the heart of it: if you remove that, the GroupItems don't get rendered, and the WrapPanel (which you can see appearing beneath the GroupItem in the screenshot above) appears in place of (StackPanel) 98 in the screenshot.
Can the groups of a grouped CollectionView be presented horizontally?
CC BY-SA 2.5
null
2011-03-31T18:05:32.000
2017-07-05T21:14:11.363
2017-05-23T12:01:16.000
-1
238,688
[ "wpf", "grouping", "collectionview", "itemspaneltemplate" ]
5,504,401
1
5,505,406
null
0
274
I'm trying to cement my understanding of template template parameters. In (Vandervoorde, Josuttis), they have an example on page 52 that I want to use as indicated in this image: ![codeSnippet](https://lh3.googleusercontent.com/_8WbLM5HMd2A/TZS9UTtVqwI/AAAAAAAAAtk/57OxWhJDgeA/TemplateTemplate.png) (I'm also trying to learn how to use images from Picasa on stackoverflow so if the above doesn't work, here's a slightly more verbose version) ``` template <typename T, template <typename ELEM, typename ALLOC=std::allocator<ELEM> > class CONT=std::vector> class Stack { private: CONT<T > elems; //Why doesn't CONT<T, ALLOC> elems; compile? }; ``` The don't show you how to use this for a different allocator. They do show a different container as: ``` Stack<int, std::deque> my_deque_stack; ``` and in my naivete I tried: ``` Stack<int, std::deque<int, std::allocator<int> > > my_deque_int_stack; ``` I also tried in the private section defining CONT as ``` CONT<T, ALLOC> ``` but that too generates a compiler error. I'm wondering what the correct syntax is for using the Stack template where I want to use a deque but want to specify a different allocator. I read some similar posts here that indicate sprinkling typename or template qualifiers around and I tried a couple but couldn't seem to find the magic formula.
How to instantiate with other than defaulted parameters in a template template parameter
CC BY-SA 2.5
null
2011-03-31T18:14:17.487
2011-03-31T19:44:01.027
2011-03-31T18:49:28.083
21,234
633,267
[ "c++", "templates", "parameters" ]
5,504,433
1
5,517,864
null
46
59,402
Whenever a word is typed in the EditText box, I always see an underline under the word being typed. But when I press a space after that word I no longer see the underline. My reqirement is to remove that underline when the user is typing the message. Added is the screenshot and we see that Smith is underlined. But I don't want this to happen. Below is the xml that I use for the AlertDialog box. ``` <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="vertical"> <TextView android:id="@+id/name_view" android:layout_height="wrap_content" android:layout_width="wrap_content" android:layout_marginLeft="20dip" android:layout_marginRight="20dip" android:text="@string/alert_dialog_name" android:gravity="left" android:textAppearance="?android:attr/textAppearanceMedium" /> <EditText android:id="@+id/username_edit" android:layout_height="wrap_content" android:layout_width="match_parent" android:layout_marginLeft="20dip" android:layout_marginRight="20dip" android:scrollHorizontally="true" android:autoText="false" android:inputType="textPersonName" android:capitalize="none" android:gravity="fill_horizontal" android:textAppearance="?android:attr/textAppearanceMedium" /> </LinearLayout> ``` ![enter image description here](https://i.stack.imgur.com/Nu5O3.png)
How to remove the underline from the EditText field in Android?
CC BY-SA 2.5
0
2011-03-31T18:17:42.970
2019-05-27T09:33:19.630
2011-04-01T03:26:42.713
402,637
402,637
[ "android", "android-edittext" ]
5,504,463
1
5,504,545
null
1
1,750
I want to delete Tomahawk libraries from one of my Eclipse projects, but I get this error: ![enter image description here](https://i.stack.imgur.com/mKjKX.png) Is this some kind of library pollution? Why cant I delete it? I did remove all xmlns calls I had on my pages and also removed calls to all classes from that .jar file.
Can't delete project libraries
CC BY-SA 3.0
null
2011-03-31T18:20:04.490
2011-08-29T22:01:03.853
2011-08-29T22:01:03.853
31,100
614,141
[ "java", "eclipse", "jakarta-ee", "refactoring" ]
5,504,608
1
null
null
0
2,922
![error](https://i.stack.imgur.com/yzkmr.jpg) I got this error ,as the above image show, while trying to download a file by IDM from my site. the limit of requesting this page one time only after entering Captcha Code and if you request the page again must enter the captcha code again. How to support IDM in this case The download code as the following
How to support IDM without allow request the page two times
CC BY-SA 2.5
null
2011-03-31T18:34:14.150
2017-11-21T12:05:08.840
2011-04-01T21:55:04.417
317,849
686,295
[ "php", "download", "accelerator" ]
5,505,166
1
null
null
0
1,273
I'm new in Android dev apps and trying to use JUnit test framework to test the code below, with ActivityInstrumentationTestCase2 class, with lectures on [TestingFundamentals](http://developer.android.com/guide/topics/testing/testing_android.html) in Android Docs. But when Test runs, I'm not getting any info about the tests (the red, green, blue bars in JUnit interface in Eclipse) (in fact, I believe that the tests are not occurring, even with the console saying yes). ![](https://i.stack.imgur.com/LLiF7.png) Here are the JUnit code and Manifest Files: ``` package gml.android.mixdroid.test; import java.util.ArrayList; import gml.android.mixdroid.SeekbarActivity; import android.test.ActivityInstrumentationTestCase2; import android.widget.SeekBar; import android.widget.TextView; public class SeekBarActivityTest extends ActivityInstrumentationTestCase2<SeekbarActivity> { private SeekbarActivity mActivity; private ArrayList<SeekBar> mSeekBars; private ArrayList<TextView> mProgress; private ArrayList<TextView> mTracks; public SeekBarActivityTest(String pkg, Class<SeekbarActivity> activityClass) { super("gml.android.mixdroid", SeekbarActivity.class); } public void setUp() throws Exception{ super.setUp(); mActivity = getActivity(); mSeekBars = mActivity.getSeekBars(); mProgress = mActivity.getProgressTextViews(); mTracks = mActivity.getTrackingTextViews(); } public void testPreconditions(){ assertNotNull(mSeekBars); assertNotNull(mProgress); assertNotNull(mTracks); for(SeekBar s : mSeekBars){ assertNotNull(s); } for(TextView p : mProgress){ assertNotNull(p); } for(TextView t : mTracks){ assertNotNull(t); } } public void testInitSeekBars() { assertEquals(SeekbarActivity.NUMBER_OF_SEEK_BARS, mSeekBars.size()); } public void testInitTextViews() { assertEquals(SeekbarActivity.NUMBER_OF_SEEK_BARS, mTracks.size()); assertEquals(SeekbarActivity.NUMBER_OF_SEEK_BARS, mProgress.size()); } } ``` Manifest (Activity): ``` <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="gml.android.mixdroid" android:versionCode="1" android:versionName="1.0"> <application android:icon="@drawable/icon" android:label="@string/app_name"> <activity android:name=".SeekbarActivity" android:label="@string/app_name"> <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> </application> <uses-sdk android:minSdkVersion="7" /> </manifest> ``` Manifest( JUnit): ``` <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="1" android:versionName="1.0" package="gml.android.mixdroid.test"> <application android:icon="@drawable/icon" android:label="@string/app_name"> <uses-library android:name="android.test.runner" /> </application> <uses-sdk android:minSdkVersion="7" /> <instrumentation android:targetPackage="gml.android.mixdroid.test" android:name="android.test.InstrumentationTestRunner" android:label="Tests for MixDroid App"/> <activity android:name="gml.android.SeekbarActivity"/> </manifest> ``` In Logcat I receive this: ``` [2011-04-03 03:51:48 - SeekbarTest] Project dependency found, installing: SeekbarActivity [2011-04-03 03:51:50 - SeekbarActivity] Application already deployed. No need to reinstall. [2011-04-03 03:51:50 - SeekbarTest] Launching instrumentation android.test.InstrumentationTestRunner on device emulator-5554 [2011-04-03 03:51:53 - SeekbarTest] Collecting test information [2011-04-03 03:51:57 - SeekbarTest] Test run failed: Test run incomplete. Expected 1 tests, received 0 ``` and JUnit View, no info test
Android JUnit test does not show test bars (Eclipse)
CC BY-SA 2.5
null
2011-03-31T19:24:58.623
2011-11-11T09:41:17.150
2011-04-04T01:23:48.083
10,936
686,396
[ "android", "junit", "android-activity", "seekbar" ]
5,505,515
1
5,645,181
null
52
65,474
I need to write a lot of class courses to my programming class, and I constantly need to show (mainly code). ![enter image description here](https://i.stack.imgur.com/W2c1U.png) I don't find a easy way to: 1. Copy my source code from my editor (kate) and 2. Paste it formated and with source highlighted to an Open Office Presentation (OOP). What I use to do is a if the code is small, or to stop presentation and open Kate in the datashow if it is too big. In this [other question](https://stackoverflow.com/questions/281025/how-to-format-a-block-of-code-within-a-presentation) some suggest to embed code. So I installed that easily (also gnu source-highlight, code2html, and so on). None of them can convert source code to a version of a highlighted (rich text format), that would be another way to go. Having HTML doesn't help, because I can't find a easy way to either. This site show a very trick windows [solution](http://www.fauskes.net/nb/syntaxms/). It needs to convert c code to HTML using an specific windows program that has an option to copy the HTML as RTF, after that you need to past the RTF in Word or Wordpad, and after that you special past RTF to PowerPoint. All good, but I'm a user, and I think there might be a better way. Also, there is another possible solution, installing extension to openoffice. I don't know why, but trying to install this extension in my system gives me an error. Synaptic tell's me that openoffice.org-core and a lot of other should be marked. I click next, and it tells me it wants to remove all the packages, and that coooder needs this packages to work, and so it is not going to be installed. Well... Thanks! Beco. PS.: This question is debated in [meta-so](https://meta.stackexchange.com/questions/85493/question-meta-question-meta-meta-question) as possible duplication of the question cited above. But it is my understanding that the older question doesn't solve this problem. PPS.: About the coooder bug, I've launched a bug report [here](https://bugs.launchpad.net/ubuntu/+source/ooo-build-extensions/+bug/577434) --- Edit (2015-08-19) To insert a RTF text to presentation LibreOffice you can use menu `insert`, `file`, and `rtf` (or `HTML`).
How do I embed source code or HTML in Open Office Org Presentations without using screenshots?
CC BY-SA 3.0
0
2011-03-31T19:51:35.230
2017-06-07T01:26:27.520
2017-05-23T12:34:22.307
-1
670,521
[ "syntax-highlighting", "openoffice.org", "libreoffice", "presentation" ]
5,505,709
1
5,505,951
null
0
116
I have this report that I generate in an aspx page. I would like the div containing the "Answer Id:" to be at the bottom of the outlined box for each answer, regardless of how many lines the answer takes up. ![rowOfAnswers](https://i.stack.imgur.com/Oj75X.png) I've included all the css, as an in page style, and one line of answers that demonstrates the problem fairly minimally. ``` <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Test Page</title> <style type="text/css"> body { } table { font-size: smaller; width: 100%; } .alignTop { vertical-align: top; text-align: center; } .userInfo { } .selectUserListBoxDiv { float: left; margin: 0 2em 0 2em; } .nameFilterClass { color: Blue; } .reportDiv { margin-top: 2em; } .versionId { font-size: xx-small; } .testList { float: left; width: 29%; border: thin black solid; } .questionList { margin-left: 30%; width: 69%; border: thin black solid; } .topSpacer { margin-top: 1em; } .bottomSpacer { margin-bottom: 1em; } .fieldName { font-weight: bold; } .fieldId { font-size: xx-small; color:#888; text-align: right; vertical-align: bottom; height: 100%; } .fieldValue { padding-left: 1em; } td.testDate { text-align: left; background-color:#dddddd; border-top-style: double; } th.testDate { background-color:#dddddd } .empAnswerField { float:left; } td .empAnswerField { } .answerFields { } .selectAllLabel { } td.actionCheckBoxTd, th.actionCheckBoxTh { text-align: center; } .correct { color:green; } .incorrect { color: red; } .isCorrectField { float: right; } .isCorrectField.incorrect { display: none; } td .isCorrectField { } .answerText { margin-top: 1.25em; height: 100%; } th .answerText { margin-top: 3.25em; width: 100%; } td.answerBlock { width: 25%; border: thin black solid; vertical-align: text-top; height: 100%; } div.answerBlock { margin-top: 2px; padding: 3px 3px 3px 3px; height: 100%; } .alternate { background-color: #eef; } .bottomborder { border-bottom: 1px black dotted; text-align: left; } .printOnly { visibility: collapse; } @media print { .noPrint { display: none; height: 0; width: 0; } .printOnly { visibility: visible; } .testList { width: 100%; float: none; margin: 0; } .questionList { margin: 0; width: 100%; float: none; } } </style> </head> <body> <table> <thead> </thead> <tbody> <tr> <td class="answerBlock"> <div class="answerBlock"> <div class="answerFields"> <span id="ContentPlaceHolder1_quizListView_questionListView_3_answerListView_2_empAnswerFieldLabel_0" class="empAnswerField"></span><span id="ContentPlaceHolder1_quizListView_questionListView_3_answerListView_2_isCorrectFieldLabel_0" class="isCorrectField incorrect">Incorrect Answer</span> </div> <div class="answerText"> <span id="ContentPlaceHolder1_quizListView_questionListView_3_answerListView_2_answerTextLabel_0"> A number pulled out of the air and used just to mathematically sketch out a hypothetical.</span> </div> <div class="fieldId"> Answer Id: <span id="ContentPlaceHolder1_quizListView_questionListView_3_answerListView_2_answerIdLabel_0"> 16.16</span> </div> </div> </td> <td class="answerBlock"> <div class="answerBlock"> <div class="answerFields"> <span id="ContentPlaceHolder1_quizListView_questionListView_3_answerListView_2_empAnswerFieldLabel_1" class="empAnswerField correct">Employee Answer</span> <span id="ContentPlaceHolder1_quizListView_questionListView_3_answerListView_2_isCorrectFieldLabel_1" class="isCorrectField correct">Correct Answer</span> </div> <div class="answerText"> <span id="ContentPlaceHolder1_quizListView_questionListView_3_answerListView_2_answerTextLabel_1"> The square root of negative one.</span> </div> <div class="fieldId"> Answer Id: <span id="ContentPlaceHolder1_quizListView_questionListView_3_answerListView_2_answerIdLabel_1"> 17.17</span> </div> </div> </td> <td class="answerBlock"> <div class="answerBlock"> <div class="answerFields"> <span id="ContentPlaceHolder1_quizListView_questionListView_3_answerListView_2_empAnswerFieldLabel_2" class="empAnswerField"></span><span id="ContentPlaceHolder1_quizListView_questionListView_3_answerListView_2_isCorrectFieldLabel_2" class="isCorrectField incorrect">Incorrect Answer</span> </div> <div class="answerText"> <span id="ContentPlaceHolder1_quizListView_questionListView_3_answerListView_2_answerTextLabel_2"> A number that hasn't been communicated yet.</span> </div> <div class="fieldId"> Answer Id: <span id="ContentPlaceHolder1_quizListView_questionListView_3_answerListView_2_answerIdLabel_2"> 18.18</span> </div> </div> </td> <td class="answerBlock"> <div class="answerBlock"> <div class="answerFields"> <span id="ContentPlaceHolder1_quizListView_questionListView_3_answerListView_2_empAnswerFieldLabel_3" class="empAnswerField"></span><span id="ContentPlaceHolder1_quizListView_questionListView_3_answerListView_2_isCorrectFieldLabel_3" class="isCorrectField incorrect">Incorrect Answer</span> </div> <div class="answerText"> <span id="ContentPlaceHolder1_quizListView_questionListView_3_answerListView_2_answerTextLabel_3"> The natural log of pi.</span> </div> <div class="fieldId"> Answer Id: <span id="ContentPlaceHolder1_quizListView_questionListView_3_answerListView_2_answerIdLabel_3"> 19.19</span> </div> </div> </td> </tr> </tbody> </table> </body> </html> ```
I'm having an alignment problem with some html I generate in a report
CC BY-SA 2.5
null
2011-03-31T20:09:19.727
2011-03-31T20:31:24.890
null
null
307,105
[ "html", "css" ]
5,506,137
1
null
null
0
1,431
I am getting a warning like this when testing with selenium rc on IE Browser. Is there a command I can use to wait for it and click yes? Changing the Trusted Sites is not an option. [http://windowsxp.mvps.org/images/elevdialog.JPG](http://windowsxp.mvps.org/images/elevdialog.JPG)![sdfion here](https://i.stack.imgur.com/OVu3C.jpg)
How to handle https security warning in IE for selenium rc test on ie
CC BY-SA 2.5
null
2011-03-31T20:48:33.143
2011-04-07T18:15:54.767
null
null
59,508
[ "selenium", "selenium-rc" ]
5,506,417
1
5,506,429
null
11
6,000
![Indexes](https://i.stack.imgur.com/wiqBY.png) What does this mean and how can I fix it?
What does "The indexes PRIMARY and id seem to be equal and one of them could possibly be removed." mean?
CC BY-SA 2.5
0
2011-03-31T21:12:38.530
2014-02-24T23:19:49.907
null
null
652,722
[ "mysql", "indexing" ]
5,506,578
1
5,506,706
null
1
2,183
I want to find geographic names that starts with characters entered in a search box. Some geographic names have alternative names in other languages. These alternative names are stored in a separate table. ``` GN_Name 1 - 0:N GN_AlternateName ``` (PK)GN_Name.GeoNameId == (FK)GN_AlternateName.GeoNameId I want to search the name in GN_AlternateName.AlternateName first and if that doesn't exist, use the corresponding GN_Name.Name. I wrote following LINQ query: ``` return (from name in db.GN_Name where name.CountryCode == "se" join alt in db.GN_AlternateName on name.GeoNameId equals alt.GeoNameId into outer from alt in outer.DefaultIfEmpty() where ((alt.IsoLanguage == "sv" && alt.AlternateName.StartsWith(query)) || name.Name.StartsWith(query)) select new GeoNameModel { Language = alt.IsoLanguage, Name = (alt == null ? name.Name : alt.AlternateName), FeatureClass = name.FeatureClass, FeatureCode = name.FeatureCode, GeoNameId = name.GeoNameId, UniqueName = name.UniqueName, UniqueCount = name.UniqueCount}).Take(HB.AutoCompleteCount); ``` That translates into the following SQL: ``` exec sp_executesql N'SELECT [Limit1].[GeoNameId] AS [GeoNameId], [Limit1].[IsoLanguage] AS [IsoLanguage], [Limit1].[C1] AS [C1], [Limit1].[FeatureClass] AS [FeatureClass], [Limit1].[FeatureCode] AS [FeatureCode], [Limit1].[UniqueName] AS [UniqueName], [Limit1].[UniqueCount] AS [UniqueCount] FROM ( SELECT TOP (5) [Extent1].[GeoNameId] AS [GeoNameId], [Extent1].[FeatureClass] AS [FeatureClass], [Extent1].[FeatureCode] AS [FeatureCode], [Extent1].[UniqueName] AS [UniqueName], [Extent1].[UniqueCount] AS [UniqueCount], CASE WHEN ([Extent2].[AlternateNameId] IS NULL) THEN [Extent1].[Name] ELSE [Extent2].[AlternateName] END AS [C1], [Extent2].[IsoLanguage] AS [IsoLanguage] FROM [dbo].[GN_Name] AS [Extent1] LEFT OUTER JOIN [dbo].[GN_AlternateName] AS [Extent2] ON [Extent1].[GeoNameId] = [Extent2].[GeoNameId] WHERE (''se'' = [Extent1].[CountryCode]) AND (((''sv'' = [Extent2].[IsoLanguage]) AND ([Extent2].[AlternateName] LIKE @p__linq__0 ESCAPE N''~'')) OR ([Extent1].[Name] LIKE @p__linq__1 ESCAPE N''~'')) ) AS [Limit1]',N'@p__linq__0 nvarchar(4000),@p__linq__1 nvarchar(4000)',@p__linq__0=N'ja%',@p__linq__1=N'ja%' ``` I can't really see whats wrong with it, but it takes around 5 seconds to complete. Should i add some index? Maybe set up an indexed view? My SQL server knowledge is limited and i would love to get back to some real coding ;) Any suggestions warmly appreciated! I'm using SQL server 2008. Following the instructions of taylonr i got the following results. ![Client statistics](https://i.stack.imgur.com/DxuR5.png) ![Execution plan](https://i.stack.imgur.com/zhE4c.png) ![Execution plan details](https://i.stack.imgur.com/MM8Lm.png) There are 3 "parts" that make up 100% of the total. I, however, don't have a clue on how to use these statistics. SSMS Execution Plan recommended the following index: ``` CREATE NONCLUSTERED INDEX IX_GN_Name_CountryCode ON [dbo].[GN_Name] ([CountryCode]) INCLUDE ([GeoNameId],[Name],[FeatureClass],[FeatureCode],[UniqueName],[UniqueCount]) ``` I added it and the query now runs much better! taylonr suggests using only one LIKE clause. I'm not sure how to accomplish this. Anyone up for the challenge?
Slow performance on LINQ query against SQL server
CC BY-SA 2.5
null
2011-03-31T21:29:17.897
2011-04-01T10:37:01.080
2011-04-01T10:37:01.080
494,416
494,416
[ "sql", "sql-server", "linq", "entity-framework-4", "geonames" ]
5,506,653
1
5,507,085
null
1
312
I have a block element floated to the left with various block elements to the right of it. These non-floated elements have backgrounds on them which are showing behind the floated element. I'd like to prevent that from happening. Normally I'd achieve this with a margin-left on the elements but I'd like the elements which are below the floated element to use the full width of the container (otherwise it'll just look like two columns with white-space beneath the floated element). ![example of the issue I'd like to solve](https://i.stack.imgur.com/2Hiry.png) I can't determine before hand which elements will be below the floated element since it may be different heights (or not there at all) depending on the page. Thanks for reading!
preventing block elements' backgrounds from flowing behind floated content
CC BY-SA 2.5
null
2011-03-31T21:37:36.797
2011-03-31T22:23:39.547
null
null
274,729
[ "html", "css-float" ]
5,507,193
1
5,507,330
null
2
3,541
Just so you know, I'm new to html and CSS and I'm sorry if the question is stupid, but I have a problem that seems simple, and yet I've been searching for a solution for hours and couldn't find any. There are many forums discussing similar issues but none of the solutions applied to my particular issue. I have simplified the page as much as I could to isolate the problem and this is what I got: ![](https://i.stack.imgur.com/A5UYw.jpg) As you can see, Google Chrome and Safari keep the first cell only as high as its content, exactly as I want it to be displayed. Firefox, however, arbitrarily stretches the cell to a random and unnecessarily long height. What I have tried with no success so far: - - - - [http://i.stack.imgur.com/KqBUB.png](https://i.stack.imgur.com/KqBUB.png) How can I specify that I want the cell only as high as its contents? If "auto" doesn't do that, what does? None of the other possible "height" values seem to do the trick. Does anyone have any idea why this happens and how to fix this problem? Here's my code: ``` <html> <body> <table border="1"> <tr> <td> 1st cell 1st cell<br/> 1st cell 1st cell<br/> 1st cell 1st cell<br/> 1st cell 1st cell<br/> </td> <td rowspan="2" style="width: 50%; text-align: center;"> blablablablaabl<br/> blablablalablab<br/> bkababakbakabka<br/> LONG STUFF<br/> blablablablaabl<br/> blablablalablab<br/> bkababakbakabka<br/> blablablablaabl<br/> blablablalablab<br/> bkababakbakabka<br/> LONG STUFF<br/> blablablablaabl<br/> blablablalablab<br/> bkababakbakabka<br/> </td> <td rowspan="2"> right content </td> </tr> <tr> <td> oi </td> </tr> </table> </body> </html> ```
Table cell height longer than content by default in Firefox
CC BY-SA 3.0
null
2011-03-31T22:35:30.193
2017-01-01T18:21:06.593
2017-01-01T18:21:06.593
4,370,109
686,617
[ "firefox", "html-table", "default" ]
5,507,241
1
null
null
4
366
I'm trying to write some Office automation code and I cannot get IntelliSense help for the PIA Office types. The strange thing is that it works fine in C# and also in the Tutorial.vs2010 F# Solution with some of the same code. I'm using VS10 and PIA for Office 14. ![enter image description here](https://i.stack.imgur.com/8siwv.png) VS ![enter image description here](https://i.stack.imgur.com/qdMmu.png) Any ideas?
F#, problems with IntelliSense and Office
CC BY-SA 3.0
null
2011-03-31T22:40:31.870
2016-07-04T09:37:21.900
2015-11-05T22:56:07.640
111,575
659,744
[ "f#", "intellisense", "office-interop" ]
5,507,699
1
5,515,965
null
1
411
The mobile edition of AP News has a sliding band type UI control that allows you to switch between "Headlines", "Most Recent" any number of other sections. It's akin to a sliding segment bar. Does anyone know how one would go about mimicking this? And is there a name for this type of control? ![sliding segment](https://i.stack.imgur.com/l9via.png)
Sliding band-like UI control element for iOS and how do I mimic it?
CC BY-SA 2.5
0
2011-03-31T23:42:00.153
2011-04-01T16:07:19.183
2011-04-01T16:01:38.273
566,281
566,281
[ "iphone", "uicontrol" ]
5,507,764
1
5,519,679
null
1
271
I am was looking for an outlook bar control or the xaml to make it look like one just like the one on the windows azure. I cant imagine that microsoft uses a third party control Thanks in advance ![http://filedb.experts-exchange.com/incoming/2011/03_w14/t438210/Untitled.png](https://i.stack.imgur.com/6wHMX.png)
Silverlight Outlook Bar
CC BY-SA 2.5
null
2011-03-31T23:51:17.723
2011-04-01T22:48:22.340
2011-04-01T04:32:12.290
6,268
686,715
[ "silverlight-4.0", "azure" ]
5,507,885
1
null
null
7
16,360
I am trying to remove background color so as to improve the accuracy of OCR against images. A sample would look like below: ![enter image description here](https://i.stack.imgur.com/Gd3oN.jpg) I'd keep all letters in the post-processed image while just removing the light purple color textured background. Is it possible to use some open source software such as Imagemagick to convert it to a binary image (black/white) to achieve this goal? What if the background has more than one color? Would the solution be the same? Further, what if I also want to remove the purple letters (theater name) and the line so as to only keep the black color letters? Simple cropping might not work because the purple letters could appear at other places as well. I am looking for a solution in programming, rather than via tools like Photoshop.
Remove background color in image processing for OCR
CC BY-SA 3.0
0
2011-04-01T00:13:55.983
2018-01-18T08:37:08.903
2012-06-07T12:14:56.390
667,810
686,731
[ "algorithm", "image-processing", "imagemagick", "ocr" ]
5,507,942
1
5,508,076
null
1
2,439
I am receiving the following warning in a class extending UIView and have no idea why: ![enter image description here](https://i.stack.imgur.com/7odqc.png) Also, does anyone know what those blue arrows are suppose to represent? It is initialised using the following function: ``` - (void)updateIndicators { if (indicator) { [indicator removeFromSuperview]; } if (mode == MBProgressHUDModeDeterminate) { self.indicator = [[[MBRoundProgressView alloc] initWithDefaultSize] autorelease]; } else if (mode == MBProgressHUDModeCustomView && self.customView != nil){ self.indicator = self.customView; } else { self.indicator = [[[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleWhiteLarge] autorelease]; [(UIActivityIndicatorView *)indicator startAnimating]; } [self addSubview:indicator]; } ```
Left operand of + is a garbage value
CC BY-SA 2.5
null
2011-04-01T00:23:35.523
2011-04-01T01:25:48.417
2011-04-01T01:25:48.417
165,495
165,495
[ "objective-c", "xcode" ]
5,508,110
1
5,508,168
null
467
360,838
I am having some difficulty compiling a C++ program that I've written. This program is very simple and, to the best of my knowledge, conforms to all the rules set forth in the C++ Standard. I've read over the entirety of ISO/IEC 14882:2003 twice to be sure. The program is as follows: ![enter image description here](https://i.stack.imgur.com/JQXWL.png) Here is the output I received when trying to compile this program with Visual C++ 2010: ``` c:\dev>cl /nologo helloworld.png cl : Command line warning D9024 : unrecognized source file type 'helloworld.png', object file assumed helloworld.png : fatal error LNK1107: invalid or corrupt file: cannot read at 0x5172 ``` Dismayed, I tried g++ 4.5.2, but it was equally unhelpful: ``` c:\dev>g++ helloworld.png helloworld.png: file not recognized: File format not recognized collect2: ld returned 1 exit status ``` I figured that Clang (version 3.0 trunk 127530) must work, since it is so highly praised for its standards conformance. Unfortunately, it didn't even give me one of its pretty, highlighted error messages: ``` c:\dev>clang++ helloworld.png helloworld.png: file not recognized: File format not recognized collect2: ld returned 1 exit status clang++: error: linker (via gcc) command failed with exit code 1 (use -v to see invocation) ``` To be honest, I don't really know what any of these error message mean. Many other C++ programs have source files with a extension, so I thought perhaps I needed to rename my file. I changed its name to , but that didn't help. I think there is a very serious bug in Clang because when I tried using it to compile the renamed program, it flipped out, printed "84 warnings and 20 errors generated." and made my computer beep a lot! What have I done wrong here? Have I missed some critical part of the C++ Standard? Or are all three compilers really just so broken that they can't compile this simple program?
Why is this program erroneously rejected by three C++ compilers?
CC BY-SA 2.5
0
2011-04-01T00:50:02.503
2013-07-02T18:08:22.880
2012-01-16T03:58:29.933
92,837
151,292
[ "c++", "visual-c++", "compiler-errors", "clang" ]
5,508,129
1
5,511,985
null
3
3,901
I started learning how to use Selenium today. I have never used it before. I downloaded the Selenium IDE (1.0.10) plugin for FireFox (3.5.16). The way it's behaving is not matching up to the docs. 1. When I click the record button and perform actions in my browser, nothing happens in the IDE (nothing is recorded). (Actually, initially it did record, but now it doesn't) I tried restarting FireFox and that had no effect. 2. Also, the main controls are now inactive. I've included a screen shot to show what I mean by that. The controls remain inactive even it I click or double click on the name of a test case in the panel on the left. 3. And one final question -- it appears that a Selenium test case mentions Chrome in its default configuration even though the docs say you can only record tests using FireFox. Should I do anything about that? If anyone can shed light on any of the above mysteries I would appreciate it. Thanks! ![enter image description here](https://i.stack.imgur.com/ZViCY.jpg) UPDATE I restarted FireFox again and now it's recording actions, but the controls are still greyed-out as in the screenshot, so I can't play back the test.
Why are Selenium IDE playback controls inactive? (How can I run recorded tests?)
CC BY-SA 2.5
null
2011-04-01T00:54:20.430
2014-05-08T11:22:31.500
2011-04-01T01:22:39.170
42,595
42,595
[ "testing", "selenium", "selenium-ide" ]
5,508,326
1
5,508,826
null
3
4,398
sts2.6.0 release, grails1.3.7 work fine at commond run-app but error warning at sts. ![enter image description here](https://i.stack.imgur.com/wBH2t.png)
missing required source folder: '.link_to_grails_plugins/tomcat-1.3.6/src/groovy'
CC BY-SA 2.5
0
2011-04-01T01:33:28.823
2011-04-01T03:28:36.097
2020-06-20T09:12:55.060
-1
537,353
[ "grails", "sts-springsourcetoolsuite" ]
5,508,432
1
null
null
0
3,112
I have multiple fields on a form that have no values associated with them until data is entered into that field. At which point those controls have the value. All I'm trying to do is hide the fields using a loop as opposed to writing If statements. Here is the code working with a single If statement to hide said field/fields. ``` If Not Me.txtField.ControlSource = "#Name?" Then Me.txtField.ColumnHidden = True End If ``` I can't seem to figure out how to hide multiple controls that have the #Name? flag. Any help would be appreciated. ``` Dim ctl As Control Dim ctlError As String ctlError = "#Name?" For Each ctl In Me.Controls If Not ctl.ItemsSelected(txtField) = ctlError Then ctl.ColumnHidden = True End If Next ctl ``` EDIT: On the main form there is a subform with a cross tab query. But the problem is results on the query are populated from a combobox. So I've added fields that are not yet available in the query to the subform and end up with #Name? Attached is a screenshot to better illustrate the issue. There is a 90% chance I'm going about this process wrong, so it's a learning process right now. ![ScreenShot](https://i.stack.imgur.com/OnZ9Y.jpg)
Access 2010 VBA ControlSource Loop
CC BY-SA 2.5
null
2011-04-01T01:57:49.627
2015-07-27T03:07:26.133
2015-07-27T03:07:26.133
64,046
195,901
[ "ms-access" ]
5,508,600
1
5,508,627
null
0
1,203
I have MAMP installed in my Applications folder on my Mac, and the project files inside the htdocs folder on MAMP. If I want to connect to MySQL from the command line, what would I type into the command line? Note, it says that to connect to MySQL from my scripts I need to use the following, but I'm not sure how it will look from the command line Host localhost Port 8889 User root Password root EDIT - after running `sudo ps -aef | grep mysqld` in my terminus, I got the following. ``` 501 528 1 0 0:00.02 ?? 0:00.02 /bin/sh /Applications/MAMP/Library/bin/mysqld_safe --port=8889 --socket=/Applications/MAMP/tmp/mysql/mysql.sock --lower_case_table_names=0 --pid-file=/Applications/MAMP/tmp/mysql/mysql.pid --log-error=/Applications/MAMP/logs/mysql_error_log 501 598 528 0 0:00.77 ?? 0:03.72 /Applications/MAMP/Library/libexec/mysqld --basedir=/Applications/MAMP/Library --datadir=/Applications/MAMP/db/mysql --user=mysql --lower_case_table_names=0 --log-error=/Applications/MAMP/logs/mysql_error_log.err --pid-file=/Applications/MAMP/tmp/mysql/mysql.pid --socket=/Applications/MAMP/tmp/mysql/mysql.sock --port=8889 501 6083 4176 0 0:00.00 ttys000 0:00.00 grep mysqld ``` EDIT ![mysql](https://i.stack.imgur.com/2E0vI.png) working answer $ mysql --host=127.0.0.1 --port=8889 --user=root -p Enter password:
Connecting to locally hosted MySQL from terminus in Mac
CC BY-SA 2.5
null
2011-04-01T02:36:29.410
2011-04-01T03:50:30.370
2011-04-01T03:50:30.370
577,455
577,455
[ "mysql" ]
5,508,755
1
5,532,198
null
2
622
I two sets of intervals that correspond to the same 1-dimensional (linear) space. Here is a rough visual--in reality, there are many more intervals and they are much more spread out, but this gives the basic idea. ![interval graphic](https://i.stack.imgur.com/6imCl.png) Each of these intervals contains information, and I am writing a program to compare the information in one set of intervals (the red) to the information contained in the other set (the blue). Here is my problem. I would like to partition the space into chunks such that there is roughly an equal amount of comparison work to be done in each chunk (the amount of work depends on the number of intervals in that portion of the space). Also, the partition should not split any red or blue interval across two chunks. So the input is two sets of intervals, and the desired output is a partition of the space such that - - Can anyone suggest an approach or an algorithm for doing this?
Algorithm for partitioning 1-dimensional space
CC BY-SA 2.5
null
2011-04-01T03:13:17.597
2011-06-23T17:49:32.780
2011-06-23T17:49:32.780
19,750
459,780
[ "algorithm", "intervals", "space-partitioning" ]
5,508,786
1
null
null
0
630
: I am going to access external web service [ExternalWS] using AJAX. So obviously, need to create local proxy service [LocalProxyWS] first, which in turn will access the external web service. Now, the external service webmethod [Process] basically redirects the current page on our site to their site, does some work and then return back to our site. : I want that when the user clicks the button ('Process') on our site, it should open a new window and then starts executing the request on the new window, so that I can have the page on my website to be displayed permanently (which will poll a request every 15 seconds to the external service (via local proxy) for the status). Hope I am clear in my explanation. Below is my code so far, please feel free to comment if there is any other way which is an efficient alternative.. Local Proxy service which calls external service is as follows.. ``` [ServiceContract(Namespace = "LocalProxy")] [AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Allowed)] public class LocalProxyToExternalService { [OperationContract] public void InitiateTransaction(string amount) { //NOTE: Basically want to call the external service from here in a new window..... //HttpContext.Current.Response.Redirect("www.google.com", false); } } ``` My Page code is as follows... ``` function PayWithXYZ() { var newWindow = window.open('', '_blank', 'width=500,height=500', false); newWindow.focus(); var service = new LocalProxy.LocalProxyToExternalService(); service.InitiateTransaction($('input[id*=TextBox1]').val()); //, OnPayWithXYZCompleted, OnPayWithXYZError); } function OnPayWithXYZCompleted(result) { $('span[id*=Label1]').text(result); } function OnPayWithXYZError(result) { alert(result.get_message()); } </script> <asp:ScriptManager ID="ScriptManager1" runat="server"> <Services> <asp:ServiceReference Path="~/Services/LocalProxyToExternalService.svc" /> </Services> </asp:ScriptManager> <div> <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox> <asp:Button ID="Button1" runat="server" Text="Pay with XYZ" OnClick="Button1_Click" /> <input id="Button2" type="button" value="Client Button" onclick="PayWithXYZ();" /> </div> <asp:Label ID="Label1" runat="server" ForeColor="Red" Text="Label"></asp:Label> ``` Basically, I am opening a new window from the button click and then want to process the new request in that new window, so that I can show the status to the user from the current page on my website So far, it opens the new window, but doesn't transfer the request on to that, but I get an error message in firebug as follows... ![enter image description here](https://i.stack.imgur.com/dwXXc.png)
AJAX enabled WCF Service function to redirect to a new window
CC BY-SA 2.5
null
2011-04-01T03:19:55.883
2011-04-01T05:56:37.243
null
null
375,777
[ "javascript", "asp.net", "ajax", "wcf" ]
5,508,820
1
5,508,847
null
0
358
[I'm redoing a question I made earlier](https://stackoverflow.com/questions/5465849/ext-js-quicktips-not-working-correctly), I want to ask it in a different way focusing more on the concept rather then my specific problem. I'm looking at [Saki's Form Examples](http://examples.extjs.eu/), specifically, Displaying Form Submit Errors. I'm running Ext-JS 3.3.0, and I'm looking for pretty much the same functionality in my design (mine would be inline however, and the tips would appear as the user defocuses from the textbox). My Question is: what are the minimum REQ files that I need to include in my HTML to get Quicktips up and running like Saki's. Now before you say did you look at Saki's example, I have...a lot. He's using an older version of Ext-JS and I am having trouble determining what files are important and which ones are not in his HTML... specified below: ``` <link rel="stylesheet" type="text/css" href="./ext/resources/css/ext-all.css" /> <link id="theme" rel="stylesheet" type="text/css" href="./css/empty.css" /> <link rel="stylesheet" type="text/css" href="./css/icons.css" /> <link rel="stylesheet" type="text/css" href="./css/formerrors.css" /> <link rel="shortcut icon" href="./img/extjs.ico" /> <script type="text/javascript" src="./ext/adapter/ext/ext-base.js"></script> <script type="text/javascript" src="./ext/ext-all-debug.js"></script> <script type="text/javascript" src="./js/Ext.ux.form.XCheckbox.js"></script> <script type="text/javascript" src="./formerrors.js"></script> ``` Empty.css, icons.css, extjs.ico, and Ext.us.form.XCheckbox.js are the ones I'm unsure where he got. I'm researching how [CSS Specificity](http://www.smashingmagazine.com/2007/07/27/css-specificity-things-you-should-know/) works, so I won't need help fixing the overall style of it (hopefully). I just want to know what I need to make sure I include in my HTML so that I KNOW its my fault js wise that the tooltip isn't appearing and look correct. As it stands right now the style of the tooltip looks like this: ![Style of To: Field thus far](https://i.stack.imgur.com/KZQk7.jpg) To utllize msgTarget='side' do I need to have it enclosed within a form? Or could I do it to a xtype:'textarea'?
What are the Bare Minimum Reqs to implement Ext.QuickTips() fully?
CC BY-SA 2.5
null
2011-04-01T03:25:42.590
2011-04-01T04:55:42.853
2017-05-23T10:32:35.693
-1
594,801
[ "javascript", "css", "extjs", "validation" ]
5,509,114
1
5,511,801
null
0
573
I build a webshop, but the client wants a second currency, HKD. In the node-record.tpl.php file I found the line responsible for displaying the price: ``` print uc_currency_format($node->sell_price); ``` I looked into the Drupal documentation, and found the function . To use it, I thought it should be like this: `print ' ('. currency_api_convert('RMB', 'EUR', $node->sell_price) .')</div>';` But for some reason, all I get is a sort of Array error: ![enter image description here](https://i.stack.imgur.com/VqY2g.png) What am I doing wrong?
Currency API in Drupal
CC BY-SA 4.0
null
2011-04-01T04:18:42.083
2022-12-11T20:53:51.897
2022-12-11T20:53:51.897
3,689,450
452,421
[ "arrays", "drupal", "currency" ]
5,509,151
1
5,509,234
null
10
33,709
I'm trying to figure out how to get the distance from two circles relative to the corners of their square container boxes. I need some help with the maths here. ![Finding distance between two circles](https://i.stack.imgur.com/hF8XA.png) How can I work out the number of pixels for the line marked with a question mark? Appreciate the help as always.
Finding the distance between two circles
CC BY-SA 2.5
0
2011-04-01T04:25:43.923
2017-07-13T03:39:24.487
null
null
239,036
[ "math", "distance", "geometry" ]
5,509,256
1
5,509,309
null
0
5,882
I have an UIViewController with a table in it. Tapping a blue disclosure icon makes the view controller present a UINavigationController. This works fine and does make the navigation controller show up, but without a navigation bar, as below: ![enter image description here](https://i.stack.imgur.com/pp90n.png) ![enter image description here](https://i.stack.imgur.com/GFSB4.png) How would I go about making that magical Navbar showing up again? I really need it to present a map in the nav controller, and right now, that does not work. Here's the code I use to show it: ``` // scanned recently table view thing - (void)tableView:(UITableView *)tableVieww didSelectRowAtIndexPath:(NSIndexPath *)indexPath { [tableVieww deselectRowAtIndexPath:indexPath animated:YES]; if(indexPath.section == 0) { NSString *info = [[scannedBackups objectAtIndex:indexPath.row] objectForKey:@"data"]; NSArray *items = [info componentsSeparatedByString:@"&"]; scanCodeViewCohntroller.dict = [[NSMutableDictionary alloc] init]; int o; for (o = 0; o < [items count]; o++) { NSArray *secondItems = [[items objectAtIndex:o] componentsSeparatedByString:@"="]; [scanCodeViewCohntroller.dict setObject:[secondItems objectAtIndex:1] forKey:[secondItems objectAtIndex:0]]; } /*NSError *err; scanCodeViewCohntroller.dict = [NSPropertyListSerialization propertyListWithData:[foo dataUsingEncoding:NSUnicodeStringEncoding] options:NSPropertyListMutableContainersAndLeaves format:kCFPropertyListXMLFormat_v1_0 error:&err]; if(err != nil) { UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Corrupted Data" message:[NSString stringWithFormat:@"Your Scanned Backup Data Store is corrupted. It will now be erased. %@", [err localizedDescription]] delegate:nil cancelButtonTitle:@"Dismiss" otherButtonTitles:nil]; [alert show]; [alert release]; scannedBackups = [[NSMutableArray alloc] init]; NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); NSString *documentsDirectory = [paths objectAtIndex:0]; NSString *fullFileName = [NSString stringWithFormat:@"%@/scannedCodes.plist", documentsDirectory]; [scannedBackups writeToFile:fullFileName atomically:NO]; [tableView reloadData]; }*/ [scanCodeViewCohntroller.dict setObject:[[scannedBackups objectAtIndex:indexPath.row] objectForKey:@"date"] forKey:@"date"]; [scanCodeViewCohntroller initalizeData]; [self presentModalViewController:scanCodeViewCohntroller animated:YES]; } } ```
UIViewController presents a UINavigationController - no Nav Bar?
CC BY-SA 3.0
null
2011-04-01T04:47:57.787
2011-07-24T10:31:05.630
2011-07-24T10:31:05.630
1
219,515
[ "cocoa-touch", "ios4", "uiviewcontroller", "uinavigationcontroller", "uinavigationbar" ]
5,509,340
1
null
null
0
150
i have jquery plugin jquery-1.4.2.min.js. while loading this file the following error is showing. but if i use it in another screen or another program it is loading successfully... i am unable to find the reason. Can any one help me please. Thank you Mihir ![enter image description here](https://i.stack.imgur.com/SasRS.png)
Error while loading jquery plugin
CC BY-SA 2.5
null
2011-04-01T05:00:45.560
2011-04-01T05:23:51.607
null
null
526,095
[ "javascript", "jquery" ]
5,509,376
1
5,509,423
null
0
1,167
I have the following query: ``` ALTER TABLE ROUTE ADD FOREIGN KEY (RID) REFERENCES RESERVATION(RID) ON DELETE CASCADE ``` but it generates me an error: ``` #1452 - Cannot add or update a child row: a foreign key constraint fails (`SmarTrek`.`#sql-91e_d09`, CONSTRAINT `FK_RID` FOREIGN KEY (`RID`) REFERENCES `RESERVATION` (`RID`) ON DELETE CASCADE) ``` In designer mode, here's what it looks like: ![enter image description here](https://i.stack.imgur.com/sGaiN.jpg)
error adding a foreign key constraint
CC BY-SA 2.5
null
2011-04-01T05:08:02.700
2011-04-01T05:16:12.873
null
null
95,265
[ "mysql", "phpmyadmin" ]
5,509,431
1
null
null
0
2,013
I'm using onLongClickListener and it's doing something unexpected. I've attached sample code for reference. I consumed the event so that no further action is taken. When the EditText is empty or you click in the whitespace, everything works as expected. When you click directly on any text in the EditText, a white "balloon" pops up with text included. I have not been able to find a reference to this behavior or how to override it. Maybe I'm just not using the right keywords. Can anyone give me a nudge in the right direction? From the xml: ``` <EditText android:id="@+id/editText1" android:text="" android:layout_height="wrap_content" android:layout_width="fill_parent" ></EditText> ``` From the Activity: ``` public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); EditText edit = (EditText) findViewById(R.id.editText1); edit.setOnLongClickListener(longClickListener); } OnLongClickListener longClickListener = new OnLongClickListener() { @Override public boolean onLongClick(View v) { doSomething(); return true; } }; ``` EDIT: I'm using a Droid X as my test device running 2.2 if that makes any difference. Here's a screen shot. If I knew what this was called, I could find it and override it. Maybe I need to find the source code? ![Long Click](https://i.stack.imgur.com/nyV1N.png)
android onLongClickListener undesirable behavior
CC BY-SA 2.5
null
2011-04-01T05:16:17.867
2011-06-11T22:37:14.953
2011-04-01T19:14:46.030
607,118
607,118
[ "java", "android", "behavior", "onlongclicklistener" ]
5,509,464
1
5,509,549
null
1
48
how to prevent navigation and saving button functionality in this window. although i know its pre added functionality..???? ![to stop the working of save and to prevent navigation](https://i.stack.imgur.com/b0V20.png)
to prevent the user from saving and navigating in field
CC BY-SA 2.5
null
2011-04-01T05:23:48.380
2011-04-01T05:39:05.373
2011-04-01T05:28:22.310
49,485
10,441,561
[ "iphone" ]
5,509,492
1
5,509,562
null
5
23,837
I want to give a div a glassy reflection appearance as well as a semi transparent effect. How can I combine these two effects so that the div will look like a glassy transparent gadget? Is there a way to do this? The div's bgcolor is lightskyblue and no background image is set yet. ![enter image description here](https://i.stack.imgur.com/5LVKb.png)
How to make a div with glassy and semi transparent effect?
CC BY-SA 3.0
0
2011-04-01T05:28:13.140
2020-02-18T22:09:25.383
2012-02-29T21:53:30.607
431,053
569,497
[ "javascript", "jquery", "css" ]
5,509,494
1
5,509,820
null
9
19,120
My question might be, "How does one create a single-line horizontal LinearLayout with two single-line non-wrapping TextViews, where the left TextView always occupies 1/3 of the available screen width, the right TextView always occupies 2/3 of the available screen width, and the text labels truncate with ... when they are too long to display?" (If that question is clear enough and the reader -- that's you -- already has in mind a solution they are willing to share, further reading of the problem and question description may be unnecessary.) A ListView populated with four such LinearLayouts would then look something like this:``` medium length text ---- short text short text ---- text that is too loooooooooooooo... loooooooooooooo... ---- short text loooooooooooooo... ---- text that is too loooooooooooooo... ``` In this mock-up, , the left and right text labels were short enough to display completely, , the left label was short enough to display completely, while the text of the right label was too long and was thus truncated, and the start of the text of the right label aligned vertically with the right text of the first row, visually creating a column as if this were in a TableLayout, , the text of the left label was too long and was truncated so as to vertically align with the left text of the second and first rows, and the text of the right label started vertically aligned with the right text of the second and first rows, , the text of the left label was too long and thus was displayed similarly to the left text of the third row, and the text of the right label was too long and thus was displayed similarly to the right text of the second row. From various posts on stackoverflow and other places, I gather that while using a TableLayout with an ArrayAdapter is somewhat possible, there are downsides, and it is probably not ever the right approach to take. I've certainly tried many combinations of layout parameters, but nothing has yet come very close to the goal. I'm trying to figure out a solution that will work on many different screen sizes, so specifying specific pixel widths probably wouldn't work very well. Perhaps the following simple code example (with screenshot) is a good starting point for the solution, and just needs some small modifications. (The stackoverflow code formatter was freaking out about this code. So, please forgive any funky formatting.) ``` public class TableLayoutLikeListView extends ListActivity { @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.list); List<Datum> data = new ArrayList<Datum>(); data.add(new Datum("short", "short")); data.add(new Datum("short", "loooooooooooooooooooooooooooooooooooooooooonnnnnnnnnnnnnnnnnnnnnng")); data.add(new Datum("loooooooooooooooooooooooooooooooooooooooooonnnnnnnnnnnnnnnnnnnnnng", "short")); data.add(new Datum("loooooooooooooooooooooooooooooooooooooooooonnnnnnnnnnnnnnnnnnnnnng", "loooooooooooooooooooooooooooooooooooooooooonnnnnnnnnnnnnnnnnnnnnng")); setListAdapter(new MyAdapter(this, R.layout.row, data)); } } ``` ``` class Datum { String left, right; Datum(String left, String right) { this.left = left; this.right = right; } } class MyAdapter extends ArrayAdapter<Datum> { List<Datum> data; int textViewResourceId; MyAdapter(Context context, int textViewResourceId, List<Datum> data) { super(context, textViewResourceId, data); this.data = data; this.textViewResourceId = textViewResourceId; } @Override public View getView(int position, View convertView, ViewGroup parent) { if (convertView == null) { LayoutInflater inflater = (LayoutInflater) getContext().getSystemService(Context.LAYOUT_INFLATER_SERVICE); convertView = inflater.inflate(textViewResourceId, null); } Datum datum = data.get(position); if (datum != null) { TextView leftView = (TextView) convertView.findViewById(R.id.left); TextView rightView = (TextView) convertView.findViewById(R.id.right); if (leftView != null) { leftView.setText(datum.left); } if (rightView != null) { rightView.setText(datum.right); } } return convertView; } } ``` ``` list.xml: <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="wrap_content" android:layout_height="wrap_content"> <ListView android:id="@+id/android:list" android:layout_width="wrap_content" android:layout_height="wrap_content" /> </LinearLayout> ``` ``` row.xml: <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="horizontal" android:layout_width="fill_parent" android:layout_height="wrap_content" android:weightSum="3"> <TextView android:id="@+id/left" android:layout_width="0dip" android:layout_height="wrap_content" android:layout_weight="1" android:singleLine="true" /> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="----" /> <TextView android:id="@+id/right" android:layout_width="0dip" android:layout_height="wrap_content" android:layout_weight="2" android:singleLine="true" /> </LinearLayout> ``` (Note that while TextView does have the ellipsize attribute, it doesn't appear necessary to alter, as setting singleLine to true truncates and ellipsizes the labels already. I may be wrong about this.) Following is a screenshot of this code in action:![](https://lh3.googleusercontent.com/_VZJksQ6kepc/TZViOfuA9EI/AAAAAAAAADs/HmnijDEXJ2g/s800/TableLayout-Like_ListView_--_Fugly.png) Any advice is of course appreciated.
WANTED: TableLayout-Like ListView
CC BY-SA 2.5
0
2011-04-01T05:28:49.297
2014-01-20T00:29:29.073
null
null
519,818
[ "android", "user-interface", "listview", "android-layout" ]
5,509,765
1
null
null
2
968
i want to display data in Gridview in a format like in the image. any ideas folks? ![enter image description here](https://i.stack.imgur.com/5E91X.png) the datas in table is stored in this way ``` Qsn1 A train running at the speed of 60 km/hr crosses a pole in 9 seconds. What is the length of the train? Option1 150 metres 5 Qsn1 A train running at the speed of 60 km/hr crosses a pole in 9 seconds. What is the length of the train? Option1 152 metres 5 Qsn1 A train running at the speed of 60 km/hr crosses a pole in 9 seconds. What is the length of the train? Option1 154 metres 5 Qsn1 A train running at the speed of 60 km/hr crosses a pole in 9 seconds. What is the length of the train? Option1 155 metres 5 ``` thank you
display data in gridview
CC BY-SA 2.5
null
2011-04-01T06:11:39.830
2011-04-01T08:05:23.820
2011-04-01T07:14:02.320
391,446
391,446
[ "c#", "asp.net", "gridview" ]
5,509,793
1
5,509,942
null
1
4,955
`Integer.parseInt("5")` and `Long.parseLong("5")` are throwing an `UnsupportedOperationException` in the Eclipse Expressions Window. ![Eclipse Environment Screenshot](https://i.stack.imgur.com/d5Yjj.png) I think this is also the Exception I'm getting at runtime, but being new to Eclipse, I'm not sure how to find the type of `e` within a debug session: ``` public static long longTryParse(String text, long fallbackValue) { try { return Long.parseLong(text); } catch (Exception e) { return fallbackValue; // When stopping at a breakpoint here, Eclipse says that e is of type 'Exception'. Well, that's informative. } } ``` So ... 1. Are these valid statements? 2. If so, why am I getting an exception? 3. (Of lesser importance) Why won't Eclipse say that e is of type UnsupportedOperationException rather than Exception during my debug session? Thanks!
parseInt and parseLong throwing an UnsupportedOperationException
CC BY-SA 2.5
null
2011-04-01T06:15:06.667
2011-04-01T07:06:39.850
2011-04-01T07:06:39.850
23,566
23,566
[ "java", "eclipse" ]
5,509,808
1
5,509,859
null
2
904
I've been given a design to implement in an Asp.net website, and I'm struggling with some elements, particularly the DropDownList. What's the best way to change the look? I'd prefer to do something server-side as opposed to javascript, but I understand at least some javascript may be necessary. In the end, it should look like this: ![The list box as it should look](https://i.stack.imgur.com/SEqE1.png)
How do I to customize the look of an asp.net DropDownList?
CC BY-SA 2.5
null
2011-04-01T06:18:07.150
2011-04-01T06:31:42.380
null
null
304,786
[ "asp.net", "customization", "styling" ]
5,509,806
1
null
null
0
856
I have a signal that cycles twice from 0 to 4 seconds and I would like to interpolate the signal to cycle twice when it goes from 0 to 1 second. I know it's an issue with my `xi` variable; I'm just not sure how to fix it. The example is just a simple sine wave equation but I'll be importing an audio wav file in the real one; that's why I chose to use interpolate. Unfortunately it can't just be a simple plot change due to the fact it will be an audio file that will be imported, some calculations done on it, then exported back out as another audio file. ``` %Interpolation test clear all, clc,clf,tic x= linspace(0,2*pi,400); %from 0 to 4 sec fs_rate=100 freq=2; y=sin(freq*(x)); xo=linspace(0,length(y)/fs_rate,length(y)); %go from 0 to x sec xi=linspace(0,1,length(y)); %go from 0 to 1 sec new_y=interp1(xo,y,xi,'linear'); subplot(2,2,1),plot(xo,y),title('Orginal signal over 4 sec') subplot(2,2,3),plot(xi,new_y),title('Entire signal over 1 sec') ``` --- I went back and did what Sergei recommended and used resample and repmat, but I'm noticing that on some of the values the rows aren't the same as the sample rate (see image below). Notice the top image value for rows says 1000 and the bottom image says rows = 1008. This happens when I change the values of resample and repmat (freq_new) but only for certain values. How can I fix this? I could just delete everything after 1000 but I'm not sure if this is a bug or just the way resample/repmat works. ![http://dl.dropbox.com/u/6576402/questions/rows_different.png](https://i.stack.imgur.com/do32o.png) Here's the code I used to test this: ``` %resample_repmat signal clear all, clf Fs = 1000; % Sampling rate Ts = 1/Fs; %sampling interval t=0:Ts:1-Ts; %sampling period freq_orig=1; y=sin(2*pi*t*freq_orig)'; %gives a short wave freq_new=9; y2=resample(y,1,freq_new); %resample matrix y3=repmat (y2,freq_new,1); %replicate matrix [r_orig,c_orig] = size(y) %get orig number of rows and cols [r_new,c_new] = size(y3) %get new number of rows and cols subplot(2,1,1),plot(y),title('Orginal signal') title(['rows=',num2str(r_orig),' cols=',num2str(c_orig)]) subplot(2,1,2),plot(y3),title('New signal') title(['rows=',num2str(r_new),' cols=',num2str(c_new)]) ```
Interpolating signal from 4 sec to 1 sec
CC BY-SA 3.0
null
2011-04-01T06:17:28.977
2011-08-16T18:26:02.753
2011-08-16T18:26:02.753
496,830
676,430
[ "matlab", "interpolation" ]
5,509,922
1
5,509,975
null
4
2,330
In my iPhone app, I am facing some problems related to keyboard show/hide behavior. I have three text fields; when the third text field is clicked, I want to display a `UIPickerView` and hide the keyboard for that text field. That I can do. Now the problem is that, if the keyboard of either first or second text field is visible, and I click on the third text field, the picker becomes visible, but it appears behind the keyboard (it is only behind the keyboard of the first or second text field). So what should I do to make the picker visible by itself and not to display any keyboard at that time? Here is the code:- -(void) textFieldDidBeginEditing:(UITextField *)textField{ ``` if (textField==thirdTextField) { [scroll setFrame:CGRectMake(00, 48, 320, 160)]; [scroll setContentSize:CGSizeMake(320,335)]; [picker setHidden:NO]; [tool1 setFrame:CGRectMake(0,180,320,44)]; [tool1 setHidden:NO]; [self.picker reloadAllComponents]; [firtTextField resignFirstResponder]; [secondTextField resignFirstResponder]; [thirdTextField resignFirstResponder]; } else { [scroll setFrame:CGRectMake(00, 48, 320, 200)]; [scroll setContentSize:CGSizeMake(320,335)]; [tool1 setHidden:NO]; [tool1 setFrame:CGRectMake(0,220,320,44)]; } } ``` the problem is like ![enter image description here](https://i.stack.imgur.com/cx1yR.png)
Problem showing/hiding keyboard in iPhone app
CC BY-SA 2.5
0
2011-04-01T06:34:52.207
2011-04-11T13:28:15.663
2011-04-01T10:21:10.467
531,783
531,783
[ "iphone", "objective-c", "cocoa", "ios4" ]
5,509,962
1
5,552,570
null
5
7,501
. When I tested on localhost, APC cached all files I used. But it doesn't work on my shared hosting. Is this a configuration issue? These are the stats from my apc.php (APC 3.0.19): ![apc.php stats](https://i.stack.imgur.com/FBmJd.png) On the above picture, APC doesn't use any memory. This is what phpinfo() gives me: ![phpinfo() output](https://i.stack.imgur.com/lVLn1.png) On localhost, i only access [http://localhost/test.php](http://localhost/test.php). Apc will cache localhost/test.php ( type file ) imediately. but on shared host, i don't see it cache file ( it can cache variable, if i store but don't with file ); ``` apc_add('APC TEST', '123'); echo apc_fetch('APC TEST'); //-- it work with this code ``` i want Apc cache test.php if i access test.php. Is there a configure make APC can't cache file type or it is limit of shared hosting?.
APC doesn't cache files, but caches user data
CC BY-SA 2.5
0
2011-04-01T06:39:30.743
2011-04-15T20:11:38.813
2011-04-07T19:26:42.027
385,378
329,424
[ "php", "linux", "apc" ]
5,510,048
1
null
null
3
1,003
I have a table named 'Soum'. this table has `NVARCHAR(100)` field named `'Name'`. But sort by `name`, that wrong working. Please see picture. After executing query. ![enter image description here](https://i.stack.imgur.com/i7Nsk.png) First red row is wrong sorted. I don't understand that why this is wrong working. I was checked character is same or not. But 'Ө' character is same in red rows. I'm trying to reinsert this 3 rows. But result is same. How can I fix this error? I don't want to add Order field. What's wrong?
SQL Server 2005 Unicode string sorting problem
CC BY-SA 2.5
null
2011-04-01T06:51:48.770
2020-10-02T08:24:42.020
2011-04-01T07:28:17.697
13,302
60,200
[ "sql-server-2005", "sorting" ]
5,510,106
1
5,514,237
null
3
1,488
I am trying to implement somewhat of a simple geofence algorithm that basically does the following: > 1. Say I have two point A and B (each point has a latitude and longitude value in earth). 2. I can draw a straight line from point A to point B 3. I can set a perimeter, which is a rectangle, around that line (see drawing below for more clarity) ![enter image description here](https://i.stack.imgur.com/jNkiD.png) What I want to do is as follows, if the phone current location is outside of this red perimeter then it triggers something, basically a delegate. The perimeter size should be able to be adjusted to a percentage size, so 5% would be a small perimeter around the line and 70% would be a large perimeter around the line. Be aware that the perimeter should be a rectangle, not circle with radius. I am guessing that there will be a bunch of if statements involved in building this... if anyone could come up with a simple and elegant solution to this (would be great if I can see code in objective-C) that would be awesome. Or any guidance would be helpful as well
implementing a simple geofence in objective-C
CC BY-SA 2.5
0
2011-04-01T06:59:59.913
2011-04-01T19:48:55.127
null
null
95,265
[ "iphone", "objective-c", "algorithm", "geolocation" ]
5,510,209
1
null
null
2
340
In the iPad when you have to fill in a password, like in the dropbox app. I know I have to create my own view, but is this view inside a UIPopoverController? If so, can somebody tell me how to create the popover to place my passcode view in so it looks like this: ![enter image description here](https://i.stack.imgur.com/U3g0R.png) Thanks in advance!
UIPopoverController to handle password box?
CC BY-SA 2.5
null
2011-04-01T07:11:50.773
2012-03-30T08:06:26.097
null
null
387,556
[ "iphone", "xcode", "ios4", "ipad" ]
5,510,196
1
5,510,543
null
1
339
# update, solved I have the following 2 array's (with the same length), I want to display these values in a table. The problem is he prints just my first array ($gPositionStudents) and not the values of array $gPositionInternships. The goal is to link each student to a different internship, but I know there is no relationship between these two array's. I'm looking for a function that can shift these 2 array's so that each time I shift the student has a other internship. Importend to know, I did a small modification on array $gStartPositionInternship, I made this array equal in size as the length of array $gStartPositionStudents. With following code: `enter code here`// Make items in $gStartPositionInternships as long as array $gStartPositionStudents $gStartPositionInternships = array_pad($internships, $lengthStudentArray, 'null'); I included my current output, see image: ![enter image description here](https://i.stack.imgur.com/1RCoU.png) ``` enter code here// Make table $header = array(); $header[] = array('data' => 'Internship'); $header[] = array('data' => 'UGentID'); // this big array will contains all rows // global variables. global $gStartPositionStudents; global $gStartPositionInternships; $rows = array(); foreach($gStartPositionStudents as $value) { foreach($gStartPositionInternships as $key=>$value2) { // each loop will add a row here. $row = array(); // build the row $row[] = array('data' => $value[0]['value']); $row[] = array('data' => $value2); } // add the row to the "big row data (contains all rows) $rows[] = array('data' => $row); } $output = theme('table', $header, $rows); return $output; ``` var_dump of $gPositionStudents ``` array(148) { [0]=> array(1) { [0]=> array(1) { ["value"]=> string(6) "804868" } } [1]=> array(1) { [0]=> array(1) { ["value"]=> string(6) "804869" } } [2]=> array(1) { [0]=> array(1) { ["value"]=> string(6) "705169" } } [3]=> array(1) { [0]=> array(1) { ["value"]=> string(6) "805148" } } [4]=> array(1) { [0]=> array(1) { ["value"]=> string(6) "702342" } } [5]=> array(1) { [0]=> array(1) { ["value"]=> string(6) "803176" } } [6]=> array(1) { [0]=> array(1) { ["value"]=> string(6) "706651" } } [7]=> array(1) { [0]=> array(1) { ["value"]=> string(6) "706333" } } [8]=> array(1) { [0]=> array(1) { ["value"]=> string(6) "806026" } } [9]=> array(1) { [0]=> array(1) { ["value"]=> string(6) "702808" } } ``` var_dump of: $gPositionInternships ``` array(148) { [0]=> string(18) "Pcv (campus Aalst)" [1]=> string(53) "Mss ( Privaatpraktijk kinesitherapie Walravens Marc )" [2]=> string(54) "Mss ( Privaatpraktijk kinesitherapie Peeters Stefaan )" [3]=> string(35) "psychiatrie (campus Vercruysselaan)" [4]=> string(39) "interne geneeskunde (campus Loofstraat)" [5]=> string(40) "interne geneeskunde (campus Kennedylaan)" [6]=> string(29) "heelkunde (campus Loofstraat)" [7]=> string(30) "heelkunde (campus Kennedylaan)" [8]=> string(33) "heelkunde (campus Vercruysselaan)" [9]=> string(38) "logopedie (groepspraktijk Logomatopee)" [10]=> string(41) "logopedie (Koninklijk Instituut Spermali)" [11]=> string(34) "Fysieke activiteit (To Walk Again)" [12]=> string(53) "algemene en plastische heelkunde ( AZ AZ Oudenaarde )" [13]=> string(38) "dermatologie (campus Maria Middelares)" [14]=> string(29) "NKO (campus Maria Middelares)" [15]=> string(38) "dermatologie (campus Maria Middelares)" [16]=> string(38) "Fysieke activiteit (Beweegkamp Vlabus)" [17]=> string(43) "Hoofdverpleegkundige ( UZ UZ Gent Urologie)" [18]=> string(66) "Opleidingscoördinator ( Onderwijsinstelling Arteveldehogeschool )" [19]=> string(90) "Verpleegkundig Specialist ( UMC Universitair Medisch Centrum Universitair Medisch Centrum)" [20]=> string(31) "Mss ( AZ Nikolaas campus Hamme)" [21]=> string(74) "Mss ( Privaatpraktijk kinesitherapie Cuigniez Pascale PR Cuigniez Pascale)" ```
Foreach loop prints to many values
CC BY-SA 2.5
null
2011-04-01T07:10:00.640
2011-04-06T13:08:42.317
2011-04-06T13:08:42.317
642,760
642,760
[ "php", "drupal", "drupal-6" ]
5,510,238
1
5,510,351
null
10
3,101
![enter image description here](https://i.stack.imgur.com/CZazS.png) I've got 3 `divs` lined up; the center `div` has many `position:absolute` images (which overlap -- one image is visible at a time; the rest are `display:none;` for jQuery cross-fading, which is not germane). I changed the center div to be `position:relative` to enable its child images to be `position:absolute`. if I set the left, center, and right `div` to `float:left`, it doesn't display in the order: left, center, right div (the left and right are bunched up on the left). If I take out `position: relative` on the center div, it works (but the images can't be absolutely positioned within the parent `div`, of course). How do I position these divs so that I have left, center, right, while the images can be absolutely positioned inside the center? Do I have to set relative for the left and right divs, too?
CSS relative + float
CC BY-SA 2.5
0
2011-04-01T07:15:52.700
2011-04-01T07:48:27.273
null
null
100,208
[ "css" ]
5,510,440
1
5,510,553
null
0
1,564
i am playing with git on mac and i did commit the first time and couldnt figure out how to save my commit so i closed the console then re-opened console and went back to commit again i did git status and i see myself logged in twice. and it says to press enter to continue and when i do i keep going back to the commit page to enter my comments im kind of in a loop and cant get out. this is what i see ``` 0:32 up 1:47, 2 users, load averages: 0.20 0.24 0.26 USER TTY FROM LOGIN@ IDLE WHAT sarmenhb console - Thu22 1:46 - sarmenhb s000 - 0:18 - w ``` here is the commit page. ![enter image description here](https://i.stack.imgur.com/CPBuq.png) i see this when i do :w (to save) it says for me to type :!w to override and when i do that i see myself logged in twice. what do i do? i am really stuck thanks
how to logout 2 users in git (two of the same users are logged in)
CC BY-SA 2.5
null
2011-04-01T07:38:04.967
2011-04-01T07:54:58.790
null
null
451,725
[ "git" ]
5,510,435
1
null
null
-1
394
i am developing Android application. In my application I have table layout for creating keyboard imitation. Each letter has own image, for displaying it. For wraping images row to current screen size I use "android:layout_height="wrap_content"" parameter, but it isn't resising images to fit the screen. Here is cut of my layout: ``` <TableLayout android:id="@+id/keyBoard" android:layout_height="wrap_content" android:layout_width="wrap_content" android:layout_gravity="center" android:stretchColumns="*"> <TableRow android:id="@+id/action_buttons" android:layout_width="fill_parent" android:layout_height="wrap_content" xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="horizontal" android:gravity="center_horizontal" android:paddingBottom="5px"> <ImageView android:id="@+id/let_q" android:src="@drawable/q" android:padding="1px" android:layout_gravity="center" /> <ImageView android:id="@+id/let_w" android:src="@drawable/w" android:padding="3px" android:layout_gravity="center" /> <ImageView android:id="@+id/let_e" android:src="@drawable/e" android:padding="3px" android:layout_gravity="center" /> <ImageView android:id="@+id/let_r" android:src="@drawable/r" android:padding="3px" android:layout_gravity="center" /> <ImageView android:id="@+id/let_t" android:src="@drawable/t" android:padding="3px" android:layout_gravity="center" /> <ImageView android:id="@+id/let_y" android:src="@drawable/y" android:padding="3px" android:layout_gravity="center" /> <ImageView android:id="@+id/let_u" android:src="@drawable/u" android:padding="3px" android:layout_gravity="center" /> <ImageView android:id="@+id/let_i" android:src="@drawable/i" android:padding="3px" android:layout_gravity="center" /> <ImageView android:id="@+id/let_o" android:src="@drawable/o" android:padding="3px" android:layout_gravity="center" /> <ImageView android:id="@+id/let_p" android:src="@drawable/p" android:padding="1px" android:layout_gravity="center" /> </TableRow> <TableRow android:id="@+id/action_buttons" android:layout_width="fill_parent" android:layout_height="wrap_content" xmlns:android="http://schemas.android.com/apk/res/android" android:gravity="center_horizontal" android:paddingBottom="5px"> <ImageView android:id="@+id/let_a" android:src="@drawable/a" android:padding="5px" /> <ImageView android:id="@+id/let_s" android:src="@drawable/s" android:padding="5px" /> <ImageView android:id="@+id/let_d" android:src="@drawable/d" android:padding="5px" /> <ImageView android:id="@+id/let_f" android:src="@drawable/f" android:padding="5px" /> <ImageView android:id="@+id/let_g" android:src="@drawable/g" android:padding="5px" /> <ImageView android:id="@+id/let_h" android:src="@drawable/h" android:padding="5px" /> <ImageView android:id="@+id/let_j" android:src="@drawable/j" android:padding="5px" /> <ImageView android:id="@+id/let_k" android:src="@drawable/k" android:padding="5px" /> <ImageView android:id="@+id/let_l" android:src="@drawable/l" android:padding="5px" /> </TableRow> <TableRow android:id="@+id/action_buttons" android:layout_width="fill_parent" android:layout_height="wrap_content" xmlns:android="http://schemas.android.com/apk/res/android" android:gravity="center_horizontal" android:paddingBottom="5px"> <ImageView android:id="@+id/let_z" android:src="@drawable/z" android:padding="5px" android:layout_gravity="center" /> <ImageView android:id="@+id/let_x" android:src="@drawable/x" android:padding="5px" android:layout_gravity="center" /> <ImageView android:id="@+id/let_c" android:src="@drawable/c" android:padding="5px" android:layout_gravity="center" /> <ImageView android:id="@+id/let_v" android:src="@drawable/v" android:padding="5px" android:layout_gravity="center" /> <ImageView android:id="@+id/let_b" android:src="@drawable/b" android:padding="5px" android:layout_gravity="center" /> <ImageView android:id="@+id/let_n" android:src="@drawable/n" android:padding="5px" android:layout_gravity="center" /> <ImageView android:id="@+id/let_m" android:src="@drawable/m" android:padding="5px" android:layout_gravity="center" /> </TableRow> </TableLayout> ``` What I am doing wrong? Because I am getting this result for some phones: Port view: ![enter image description here](https://i.stack.imgur.com/5PZ5L.png) And for Land view: ![enter image description here](https://i.stack.imgur.com/UDjsQ.png)
How to create correct layout, to dsplay correctly in different screens?
CC BY-SA 2.5
null
2011-04-01T07:37:39.947
2011-04-29T13:24:32.217
null
null
389,299
[ "android", "testing", "android-emulator", "android-layout" ]
5,510,756
1
null
null
0
527
> [Display unicode characters in android?](https://stackoverflow.com/questions/5129098/display-unicode-characters-in-android) hi, How Can I read an arabic caracter on android. I have a webview in my application. But when I open a link contain arabic, arabic letters appear as tiles. Can I add an instruction or to install an application to support this caracter? ![enter image description here](https://i.stack.imgur.com/xTQtT.jpg)
reading arabic char in android
CC BY-SA 2.5
null
2011-04-01T08:19:20.720
2012-07-01T06:16:04.963
2017-05-23T11:48:23.740
-1
654,985
[ "android", "arabic" ]
5,510,974
1
5,511,052
null
10
40,082
I've been renaming some classes and packages in my aspx project and now i have this error: > "Type '_Default' already defines a member called 'Page_Load' with the same parameter types" I have two aspx pages. In the default.aspx codebehind i see: Default.aspx: ``` <%@ Page Title="Home Page" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="_Default" %> ``` Default.aspx.cs: ``` public partial class _Default : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) //error line under 'Page_Load' } ``` search.aspx: ``` <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="search.aspx.cs" Inherits="_Default" %> ``` search.aspx.cs: ``` public partial class _Default : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) } ``` Every new ASPX page I add to my project is automaticly added to some namespace. I've tried changing the inherits attribuut. But i couldn't find a way to fix this error and to get rid of the namespace. I'm using Visual Studio 2010. ![My project structure](https://i.stack.imgur.com/IP5Qz.png)
Type '_Default' already defines a member called 'Page_Load' with the same parameter types
CC BY-SA 3.0
null
2011-04-01T08:41:09.153
2013-11-27T13:04:07.110
2012-04-04T14:22:40.247
681,803
681,803
[ "asp.net", "pageload" ]
5,511,194
1
5,512,792
null
4
561
In an ASP.NET application, what happens if an error occurs when returning the results of a stored procedure. For example: ![Situation](https://i.stack.imgur.com/QaETN.jpg) In the diagram above, the ASP.NET application calls a stored procedure to obtain some data, the stored procedure executes and SQL server tries to send back the results. But what if IIS is not reachable, what does SQL server do? - - - -
How does SQL Server and IIS handle broken connections?
CC BY-SA 2.5
null
2011-04-01T08:58:10.313
2011-04-01T11:37:24.850
2011-04-01T11:37:24.850
419
142,234
[ "asp.net", "sql-server-2008", "iis", "stored-procedures" ]
5,511,225
1
5,573,326
null
1
2,483
I Have Create the webMethod ``` [WebMethod] public void GetCommission(List <BOLibrary.Flight.DTContract>Loc) { } ``` At the client side i am Passing the parameter ``` List<BOLibrary.Flight.DTContract> BoList = new List<BOLibrary.Flight.DTContract>(); BOLibrary.Flight.DTContract dtConboj = new BOLibrary.Flight.DTContract(); dtConboj.ValidatingCarrier = "AA"; BoList.Add(dtConboj); BOLibrary.Flight.DTContract[] pass = BoList.ToArray(); service.GetCommission(pass); ``` But the Problem is that the service.GetCommission(pass) accpect the argument of servicenameSpace.DTContract but in client in client i have BOLibrary.Flight.DTContract so how can i pass the parameter to the to the Service. Pleae see the snapshot of the error message![Error i am getting while passing the parameter](https://i.stack.imgur.com/0Ck3L.jpg)
Webservice remove the NameSpace from the webMethod Parameter Problem
CC BY-SA 2.5
null
2011-04-01T09:01:09.497
2011-04-12T01:03:30.480
2011-04-01T09:07:41.763
397,868
397,868
[ "c#", "asp.net", "wcf", "web-services", "namespaces" ]
5,511,275
1
null
null
3
10,621
I'm using `Qt creator 2.0.1`, and when entering this line: `#include <QLabel>` I get the following error: `QLabel: No such file or directory` Why is that? And, how can I include a label in this case? @maverik showed me how to solve the `QLabel` error, but I'm now getting this error: ![enter image description here](https://i.stack.imgur.com/I00QK.png) The program I'm trying to run is: ``` #include <QtCore/QCoreApplication> #include <QtGui/QLabel> int main(int argc, char *argv[]) { QCoreApplication myapp(argc, argv); QLabel *label = new QLabel("Hello"); label->show(); return myapp.exec(); } ``` Any ideas? Thanks.
Qt create and QLabel, why is there an error?
CC BY-SA 2.5
0
2011-04-01T09:06:31.043
2019-07-05T16:44:11.843
2011-04-01T09:29:43.223
588,855
588,855
[ "c++", "qt", "qlabel" ]
5,511,493
1
null
null
1
220
I have Created a webService. ``` [WebMethod] public void GetCommission(ArrayList Loc) { } ``` Now I am trying to call the Service I am getting the Xml Error. Please see the snapshot. ![enter image description here](https://i.stack.imgur.com/gxqlX.jpg) ``` [XmlInclude(typeof(BOLibrary.Flight.DTContract))] [SoapInclude(typeof(BOLibrary.Flight.DTContract))] protected void btn_click(object sender, EventArgs e) { ArrayList boArrayList = getList(); Object[] obj = boArrayList.ToArray(); CommissionService service = new CommissionService(); service.GetCommission(obj); } ``` Please Help.. What is the solution of this.. ![enter image description here](https://i.stack.imgur.com/v28ME.jpg)
WebService Calling Problem
CC BY-SA 2.5
0
2011-04-01T09:26:19.530
2011-04-01T11:34:31.307
2011-04-01T11:34:31.307
397,868
397,868
[ "c#", "xml", "web-services", "xml-serialization" ]
5,511,630
1
5,511,661
null
-1
226
i am working on a messaging application for iphone , can anyone tell me how to achieve the green color for the messages received like in the image shown below![enter image description here](https://i.stack.imgur.com/sD0CF.jpg)
iphone text message colours
CC BY-SA 2.5
null
2011-04-01T09:41:15.810
2011-04-01T09:49:55.333
null
null
540,103
[ "iphone", "objective-c" ]
5,511,622
1
5,512,197
null
2
7,516
I am newbie for hibernate,i am using mysql database,with two tables serviceTypeDetails,validateConfig.In serviceTypeDetails,it's having four types of services and another table validateconfig contain 31 row with respect to each servicetypeid,using hibernate how i am able to select data from validateConfig and what are required mapping association and query for it.![enter image description here](https://i.stack.imgur.com/chfZP.png) ## ServiceTypeDetails.java ## ValidateConfiguration.java ## Main.java
how to select value from database using hibernate?
CC BY-SA 2.5
null
2011-04-01T09:40:34.970
2011-04-01T10:36:43.173
2011-04-01T10:10:11.370
423,620
423,620
[ "mysql", "hibernate" ]
5,511,945
1
null
null
2
882
We have an ASP.NET / Silveright web application. The silverlight client displays user specific data in a graphical form - it requests the data from the server: ![enter image description here](https://i.stack.imgur.com/oiZcj.jpg) Problem: Getting this data is expensive, due to the underlying database queries that the server has to perform - so the client has to wait... We run the database queries at regular intervals on the server, writing the results to a 'userdata' table in a database 'close' to where the ASP.NET server runs. The process of running the queries and writing the data to the tables is performed by a 'data collection' service, which is separated from the ASP.NET server. ![enter image description here](https://i.stack.imgur.com/OEP5n.jpg) When the client requests data the server retrieves it from a 'userdata' table. This should be nice and quick - we probably have the 'userdata' tables on the same machine as the ASP.NET server. We also have the added benefit that the client sees data even if the underlying database is offline. Of course the data is not live - but all data is potentially old as soon as it reaches the client. So now my Problem: The 'data collection' service needs the user credentials in order to perform these database queries (because each user gets different results for the same query). How can I store user credentials in a database, in an acceptable 'secure' way? Such that the 'data collection' can impersonate a user to perform the database queries. Our initial scenario is based upon using windows integrated login to the database.
how to save user credentials on server for running queries in background
CC BY-SA 2.5
0
2011-04-01T10:12:35.080
2011-04-01T11:08:42.827
null
null
144,486
[ "asp.net", "security", "architecture", "credentials" ]
5,511,961
1
5,545,786
null
0
2,920
I've come across this 3MB malloc done by CoreVideo on my iPad app after releasing an MPMoviePlayerController object. I've made sure that the player is stopped before released, so it does actually release memory and deallocs properly. The thing is that instruments keeps showing this malloc that hasn't been released (and is not used directly by me in my code) This is the call that's shown in instruments as responsible caller for the 3.52MB Malloc that's never released. ``` CVPixelBufferBacking::initWithPixelBufferDescription ``` Here's the code where the players are stopped and the array that contains them released ``` - (void)dealloc { ... [self stopAllPlayers]; [_moviePlayerViewControllerArray release]; [super dealloc]; } -(void)stopAllPlayers { for (MPMoviePlayerController *mp in _moviePlayerViewControllerArray) { [mp stop]; } } ``` here's the method that adds the video ``` -(void)addVideo:(NSString*) videoName onRect:(CGRect)rect { ...... MPMoviePlayerController * movieController= [[MPMoviePlayerController alloc]initWithContentURL:(NSURL *)videoURL]; // set frame for player movieController.view.frame = rect; // set auto resizing masks [movieController.view setAutoresizingMask:UIViewAutoresizingFlexibleWidth|UIViewAutoresizingFlexibleHeight]; // don't auto play. [movieController setShouldAutoplay:NO]; [pdfView addSubview:movieController.view]; [pdfView bringSubviewToFront: movieController.view]; [_moviePlayerViewControllerArray addObject:movieController]; [movieController release]; } ``` EDIT: added image![instruments zombies on simulator (obviously)](https://i.stack.imgur.com/hYL4w.png). the beautiful 3MB malloc in all it's glory. ![This other screenshot is the allocations instruments running on the ipad.e](https://i.stack.imgur.com/1wzgT.png) as you can see the other chunk of memory is no longer there but I still have a major problem. thanks in advance for your help
Huge memory leak after using MPMoviePlayerController
CC BY-SA 2.5
null
2011-04-01T10:14:29.090
2012-01-26T01:48:59.430
2011-04-01T11:42:01.623
456,311
456,311
[ "iphone", "objective-c", "memory-management", "memory-leaks", "instruments" ]
5,512,258
1
5,525,761
null
2
15,828
I'm trying to pass arguments to my jboss server on start up, its a string, but it always gets null when war is deployed here is how I do it: ``` ./run.sh -Dfile.config=/home/stats/config.xml -c default -b 192.168.1.102 ``` Strange this is that I don't this property passed to VM when looking at log : ``` [ServerInfo] VM arguments: -Dprogram.name=run.sh -Xms1303m -Xmx1303m -XX:MaxPermSize=256m -Dorg.jboss.resolver.warning=true -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000 -Dsun.lang.ClassLoader.allowArraySyntax=true -Djava.net.preferIPv4Stack=true -Djava.endorsed.dirs=/apps/jboss/lib/endorsed ``` Can anyone figure out what I'm doing wrong? thank you This is how I reference this property in the code : ``` Properties property = System.getProperties(); String fileName = (String)property.get("file.config"); ``` This works for me on windows, starting jboss from eclipse : ![enter image description here](https://i.stack.imgur.com/5j0qB.jpg) I'm trying to run this server from linux box this time.
Passing jboss argument on startup
CC BY-SA 2.5
0
2011-04-01T10:42:41.083
2011-04-02T20:49:09.217
2011-04-01T12:08:05.213
282,383
282,383
[ "java", "jboss" ]
5,512,514
1
5,512,817
null
1
147
Please take a look at www.microsoft.com website. I am also attaching a screenshot here. The UI is created like the new Windows Phone 7 interface where if you click the arrow on the far right of the screen, the entire display changes with a different div. I think that this is a great way of using up space to show very large forms or articles. Can someone suggest how to create this kind of layout? Can you do this through jQuery? Pratik![enter image description here](https://i.stack.imgur.com/boLVw.png)
UI creation ideas
CC BY-SA 2.5
null
2011-04-01T11:07:18.380
2011-04-01T12:56:43.367
null
null
208,081
[ "jquery", "user-interface" ]
5,512,466
1
5,512,916
null
2
14,130
A few weeks ago I went on holidays and I paused one of my projects. When I came back I was just checking the registration page and was surprised when I got an SQLException saying that a table does not exist. I don't understand it because that table exists, I created it from an entity. I pasted the code here so you can see that everything seems to be ok. I think it probably has something to do with the database (I use glassfish 3 app server). Here is an image from the user interface that says that the problem has to do with some validation methods (Checking if a user exists already and checking if an email already exists): ![enter image description here](https://i.stack.imgur.com/pdsRk.png) Just in case I will also print the stackTrace: ``` WARNING: Local Exception Stack: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.0.1.v20100213-r6600): org.eclipse.persistence.exceptions.DatabaseException Internal Exception: java.sql.SQLSyntaxErrorException: Table/View 'BUYER' does not exist. Error Code: -1 Call: SELECT COUNT(NICKNAME) FROM BUYER WHERE (NICKNAME = ?) bind => [test] Query: ReportQuery(referenceClass=Buyer sql="SELECT COUNT(NICKNAME) FROM BUYER WHERE (NICKNAME = ?)") at org.eclipse.persistence.exceptions.DatabaseException.sqlException(DatabaseException.java:333) at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.basicExecuteCall(DatabaseAccessor.java:687) at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.executeCall(DatabaseAccessor.java:530) at org.eclipse.persistence.sessions.server.ServerSession.executeCall(ServerSession.java:529) at org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.executeCall(DatasourceCallQueryMechanism.java:205) at org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.executeCall(DatasourceCallQueryMechanism.java:191) at org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.executeSelectCall(DatasourceCallQueryMechanism.java:262) at org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.selectAllRows(DatasourceCallQueryMechanism.java:618) at org.eclipse.persistence.internal.queries.ExpressionQueryMechanism.selectAllRowsFromTable(ExpressionQueryMechanism.java:2537) at org.eclipse.persistence.internal.queries.ExpressionQueryMechanism.selectAllReportQueryRows(ExpressionQueryMechanism.java:2480) at org.eclipse.persistence.queries.ReportQuery.executeDatabaseQuery(ReportQuery.java:838) at org.eclipse.persistence.queries.DatabaseQuery.execute(DatabaseQuery.java:675) at org.eclipse.persistence.queries.ObjectLevelReadQuery.execute(ObjectLevelReadQuery.java:958) at org.eclipse.persistence.queries.ReadAllQuery.execute(ReadAllQuery.java:432) at org.eclipse.persistence.queries.ObjectLevelReadQuery.executeInUnitOfWork(ObjectLevelReadQuery.java:1021) at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.internalExecuteQuery(UnitOfWorkImpl.java:2857) at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1225) at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1207) at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1181) at org.eclipse.persistence.internal.jpa.EJBQueryImpl.executeReadQuery(EJBQueryImpl.java:453) at org.eclipse.persistence.internal.jpa.EJBQueryImpl.getSingleResult(EJBQueryImpl.java:714) at ejbs.BuyersRegistratorEJB.nickNameAlreadyExists(BuyersRegistratorEJB.java:82) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.glassfish.ejb.security.application.EJBSecurityManager.runMethod(EJBSecurityManager.java:1056) at org.glassfish.ejb.security.application.EJBSecurityManager.invoke(EJBSecurityManager.java:1128) at com.sun.ejb.containers.BaseContainer.invokeBeanMethod(BaseContainer.java:5292) at com.sun.ejb.EjbInvocation.invokeBeanMethod(EjbInvocation.java:615) at com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:797) at com.sun.ejb.EjbInvocation.proceed(EjbInvocation.java:567) at org.jboss.weld.ejb.SessionBeanInterceptor.aroundInvoke(SessionBeanInterceptor.java:47) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at com.sun.ejb.containers.interceptors.AroundInvokeInterceptor.intercept(InterceptorManager.java:858) at com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:797) at com.sun.ejb.EjbInvocation.proceed(EjbInvocation.java:567) at com.sun.ejb.containers.interceptors.SystemInterceptorProxy.doAround(SystemInterceptorProxy.java:157) at com.sun.ejb.containers.interceptors.SystemInterceptorProxy.aroundInvoke(SystemInterceptorProxy.java:139) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at com.sun.ejb.containers.interceptors.AroundInvokeInterceptor.intercept(InterceptorManager.java:858) at com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:797) at com.sun.ejb.containers.interceptors.InterceptorManager.intercept(InterceptorManager.java:367) at com.sun.ejb.containers.BaseContainer.__intercept(BaseContainer.java:5264) at com.sun.ejb.containers.BaseContainer.intercept(BaseContainer.java:5252) at com.sun.ejb.containers.EJBLocalObjectInvocationHandler.invoke(EJBLocalObjectInvocationHandler.java:190) at com.sun.ejb.containers.EJBLocalObjectInvocationHandlerDelegate.invoke(EJBLocalObjectInvocationHandlerDelegate.java:84) at $Proxy174.nickNameAlreadyExists(Unknown Source) at managedbeans.RegistrationController.validateNickName(RegistrationController.java:170) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at com.sun.el.parser.AstValue.invoke(AstValue.java:234) at com.sun.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:297) at org.jboss.weld.util.el.ForwardingMethodExpression.invoke(ForwardingMethodExpression.java:43) at org.jboss.weld.el.WeldMethodExpression.invoke(WeldMethodExpression.java:72) at com.sun.faces.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:98) at javax.faces.validator.MethodExpressionValidator.validate(MethodExpressionValidator.java:95) at javax.faces.component.UIInput.validateValue(UIInput.java:1127) at javax.faces.component.UIInput.validate(UIInput.java:941) at javax.faces.component.UIInput.executeValidate(UIInput.java:1189) at javax.faces.component.UIInput.processValidators(UIInput.java:691) at javax.faces.component.UIForm.processValidators(UIForm.java:243) at javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:1080) at javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:1080) at javax.faces.component.UIViewRoot.processValidators(UIViewRoot.java:1180) at com.sun.faces.lifecycle.ProcessValidationsPhase.execute(ProcessValidationsPhase.java:76) at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101) at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118) at javax.faces.webapp.FacesServlet.service(FacesServlet.java:312) at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1523) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:279) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:188) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:641) at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:97) at com.sun.enterprise.web.PESessionLockingStandardPipeline.invoke(PESessionLockingStandardPipeline.java:85) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:185) at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:325) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:226) at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:165) at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:791) at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:693) at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:954) at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:170) at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:135) at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:102) at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:88) at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:76) at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:53) at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:57) at com.sun.grizzly.ContextTask.run(ContextTask.java:69) at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:330) at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:309) at java.lang.Thread.run(Thread.java:662) Caused by: java.sql.SQLSyntaxErrorException: Table/View 'BUYER' does not exist. at org.apache.derby.client.am.SQLExceptionFactory40.getSQLException(Unknown Source) at org.apache.derby.client.am.SqlException.getSQLException(Unknown Source) at org.apache.derby.client.am.Connection.prepareStatement(Unknown Source) at com.sun.gjc.spi.base.ConnectionHolder.prepareStatement(ConnectionHolder.java:535) at com.sun.gjc.spi.jdbc40.ConnectionWrapper40.prepareCachedStatement(ConnectionWrapper40.java:251) at com.sun.gjc.spi.jdbc40.ConnectionWrapper40.prepareCachedStatement(ConnectionWrapper40.java:48) at com.sun.gjc.spi.ManagedConnection.prepareCachedStatement(ManagedConnection.java:880) at com.sun.gjc.spi.jdbc40.ConnectionWrapper40.prepareStatement(ConnectionWrapper40.java:169) at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.prepareStatement(DatabaseAccessor.java:1404) at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.prepareStatement(DatabaseAccessor.java:1353) at org.eclipse.persistence.internal.databaseaccess.DatabaseCall.prepareStatement(DatabaseCall.java:645) at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.basicExecuteCall(DatabaseAccessor.java:580) ... 99 more Caused by: org.apache.derby.client.am.SqlException: Table/View 'BUYER' does not exist. at org.apache.derby.client.am.Statement.completeSqlca(Unknown Source) at org.apache.derby.client.net.NetStatementReply.parsePrepareError(Unknown Source) at org.apache.derby.client.net.NetStatementReply.parsePRPSQLSTTreply(Unknown Source) at org.apache.derby.client.net.NetStatementReply.readPrepareDescribeOutput(Unknown Source) at org.apache.derby.client.net.StatementReply.readPrepareDescribeOutput(Unknown Source) at org.apache.derby.client.net.NetStatement.readPrepareDescribeOutput_(Unknown Source) at org.apache.derby.client.am.Statement.readPrepareDescribeOutput(Unknown Source) at org.apache.derby.client.am.PreparedStatement.readPrepareDescribeInputOutput(Unknown Source) at org.apache.derby.client.am.PreparedStatement.flowPrepareDescribeInputOutput(Unknown Source) at org.apache.derby.client.am.PreparedStatement.prepare(Unknown Source) at org.apache.derby.client.am.Connection.prepareStatementX(Unknown Source) ... 109 more ``` Here is the EJB that the error says is making the problem: ``` @Stateless(name = "ejbs/BuyersRegistratorEJB") public class BuyersRegistratorEJB implements IBuyersRegistratorEJB { @PersistenceContext private EntityManager em; @Override public Buyer createBuyer(Buyer buyer) { Date date = new Date(); DateFormat dateFormat = new SimpleDateFormat("dd/MM/yyyy HH:mm:ss"); buyer.setRegistrationDate(dateFormat.format(date)); boolean textPatterCorrect = false; // TODO: Prepare regular expresion also for serbian latin characters String simpleTextPatternText = "^[a-zA-Z0-9]+$"; Pattern textPattern = null; Matcher nameMatcher = null; Matcher secondNameMatcher = null; Matcher nickNameMatcher = null; Matcher passwordMatcher = null; textPattern = Pattern.compile(simpleTextPatternText); nameMatcher = textPattern.matcher(buyer.getName()); secondNameMatcher = textPattern.matcher(buyer.getSecondName()); nickNameMatcher = textPattern.matcher(buyer.getNickName()); passwordMatcher = textPattern.matcher(buyer.getPassword()); if (nameMatcher.matches() && secondNameMatcher.matches() && nickNameMatcher.matches() && passwordMatcher.matches()) { textPatterCorrect = true; } else { System.out .println("SOME OF THE INPUT DO NOT MATCH THE REGULAR EXPRESION FOR TEXT!"); } if (textPatterCorrect) { em.persist(buyer);// EJB validation passed. Handle the input to the // next layer. return buyer; } else { throw new RuntimeException( "[BuyersRegistrationEJB] Text format validation FAILED!"); } } // This will check if the email already exists! @Override public boolean emailAlreadyExists(String value) { Query checkEmailExists = em .createQuery("SELECT COUNT(b.email) FROM Buyer b WHERE b.email=:emailparam"); checkEmailExists.setParameter("emailparam", value); long matchCounter = 0; matchCounter = (Long) checkEmailExists.getSingleResult(); if (matchCounter > 0) { return true; } return false; } // This will check if the nickName already exists! @Override public boolean nickNameAlreadyExists(String value) { Query nickNameExists = em.createQuery("SELECT COUNT(n.nickName) FROM Buyer n WHERE n.nickName=:nicknameparam"); nickNameExists.setParameter("nicknameparam", value); long matchCounter = 0; matchCounter = (Long) nickNameExists.getSingleResult(); if (matchCounter > 0) { return true; } return false; } } ``` I will post my configuration files also: sun-resources.xml ``` <?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_groupbuydb_userPool"/> <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_groupbuydb_userPool" 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="groupbuydb"/> <property name="User" value="user"/> <property name="Password" value="pwd"/> <property name="URL" value="jdbc:derby://localhost:1527/groupbuydb;create=true"/> <property name="driverClass" value="org.apache.derby.jdbc.ClientDriver"/> </jdbc-connection-pool> </resources> ``` ``` <?xml version="1.0" encoding="UTF-8"?> <persistence version="2.0" xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd"> <persistence-unit name="GroupBuySystem"> <jta-data-source>jdbc/myDatasource</jta-data-source> <class>entities.Administ</class> <class>entities.Buyer</class> <class>entities.Comment</class> <class>entities.Log</class> <class>entities.Offer</class> <class>entities.Seller</class> </persistence-unit> </persistence> ``` This all worked correctly 3 weeks ago, but now it doesn't. I dont know what is wrong.
SQLSyntaxErrorException: Table/View 'BUYER' does not exist. What is missing?
CC BY-SA 3.0
0
2011-04-01T11:03:01.033
2015-12-30T17:38:11.833
2013-09-11T22:50:56.937
1,248,365
614,141
[ "java", "sql", "orm", "jpa", "glassfish" ]
5,512,526
1
5,618,235
null
1
3,720
Big question update before continue: Is Items.SortDescription getting fired INotifyPropertyChanged events? From the code of another question: [Programmatically WPF listbox.ItemsSource update](https://stackoverflow.com/questions/5431761/programmatically-wpf-listbox-itemssource-update/5434630#5434630), I solved to use Items.Refres() that are slowing down execution... But after I start to sort items, problem happened again. As I tell in the other topic, I need to refresh the state of each changed user but that, need re-grouping the changed items of the listbox. I get lost inputs like mouse and keyboard problem if I call cyclically a function to Clear() and re-add SortDescriptions. Some code: Threaded Timer: ``` void StatusUpdater(object sender, EventArgs e) { ContactData[] contacts = ((Contacts)contactList.Resources["Contacts"]).ToArray<ContactData>(); XDocument doc = XDocument.Load("http://localhost/contact/xml/status.php"); foreach (XElement node in doc.Descendants("update")) { var item = contacts.Where(i => i.UserID.ToString() == node.Element("UserID").Value); ContactData[] its = item.ToArray(); if (its.Length > 0) { its[0].UpdateFromXML(node); } } Dispatcher.Invoke(DispatcherPriority.Normal, new Action( () => { contactList.SortAndGroup(); } )); } ``` SortAndGroup() //It's making my problem: ``` public void SortAndGroup() { MyListBox.Items.SortDescriptions.Clear(); MyListBox.Items.SortDescriptions.Add(new SortDescription("State", ListSortDirection.Ascending)); } ``` ItemsSource: ``` public class Contacts : ObservableCollection<ContactData>, INotifyPropertyChanged { private ContactData.States _state = ContactData.States.Online | ContactData.States.Busy; public new event PropertyChangedEventHandler PropertyChanged; public ContactData.States Filter { get { return _state; } set { _state = value; NotifyPropertyChanged("Filter"); NotifyPropertyChanged("FilteredItems"); } } public IEnumerable<ContactData> FilteredItems { get { return Items.Where(o => o.State == _state || (_state & o.State) == o.State).ToArray(); } } public Contacts() { XDocument doc = XDocument.Load("http://localhost/contact/xml/contactlist.php"); foreach (ContactData data in ContactData.ParseXML(doc)) Add(data); } public void NotifyPropertyChanged(string propertyName) { if (PropertyChanged != null) { PropertyChanged(this, new PropertyChangedEventArgs(propertyName)); } } } ``` Source data class : ``` public class ContactData : INotifyPropertyChanged { public enum States { Online = 1, Away = 2, Busy = 4, Offline = 128 } public event PropertyChangedEventHandler PropertyChanged; public int UserID { get { return int.Parse(Data["UserID"]); } set { Data["UserID"] = value.ToString(); NotifyPropertyChanged("UserID"); } } public States State { get { return (Data.Keys.Contains("State")) ? (States)Enum.Parse(typeof(States), Data["State"]) : States.Offline; } set { Data["State"] = value.ToString(); NotifyStateChanged(); } } public Dictionary<string, string> Data { get; set; } public void Set(string name, string value) { if (Data.Keys.Contains(name)) Data[name] = value; else Data.Add(name, value); NotifyPropertyChanged("Data"); } public Color ColorState { get { return UserStateToColorState(State); } } public Brush BrushState { get { return new SolidColorBrush(ColorState); } } public string FullName { get { return Data["Name"] + ' ' + Data["Surname"]; } } public System.Windows.Media.Imaging.BitmapImage Avatar { get { return Utilities.Stream.Base64ToBitmapImage(Data["Avatar"]); } set { Data["Avatar"] = Utilities.Stream.BitmapImageToBase64( value ); NotifyPropertyChanged("Avatar"); } } public ContactData() {} public override string ToString() { try { return FullName; } catch (Exception e) { Console.WriteLine(e.Message); return base.ToString(); } } Color UserStateToColorState(States state) { switch (state) { case States.Online: return Colors.LightGreen; case States.Away: return Colors.Orange; case States.Busy: return Colors.Red; case States.Offline: default: return Colors.Gray; } } public void UpdateFromXML(XElement xEntry) { var result = xEntry.Elements().ToDictionary(e => e.Name.ToString(), e => e.Value); foreach (string key in result.Keys) if (key != "UserID") { if (Data.Keys.Contains(key)) Data[key] = result[key]; else Data.Add(key, result[key]); char[] property = key.ToCharArray(); property[0] = char.ToUpper(property[0]); NotifyPropertyChanged(new string(property)); } } public void NotifyStateChanged() { if (PropertyChanged != null) { PropertyChanged(this, new PropertyChangedEventArgs("State")); PropertyChanged(this, new PropertyChangedEventArgs("ColorState")); PropertyChanged(this, new PropertyChangedEventArgs("BrushState")); } } public void NotifyPropertyChanged(string propertyName) { if (PropertyChanged != null) { if (this.GetType().GetProperty(propertyName) != null) { if (propertyName != "State") PropertyChanged(this, new PropertyChangedEventArgs(propertyName)); else NotifyStateChanged(); } } } public static ContactData[] ParseXML(XDocument xmlDocument) { var result = from entry in xmlDocument.Descendants("contact") select new ContactData { Data = entry.Elements().ToDictionary(e => e.Name.ToString(), e => e.Value) }; return result.ToArray<ContactData>(); } } ``` ![enter image description here](https://i.stack.imgur.com/26bYB.jpg)
ListBox sort after items update, is Items.SortDescriptions binding INotifyPropertyChanged?
CC BY-SA 3.0
null
2011-04-01T11:08:12.297
2013-12-23T20:15:33.410
2017-05-23T12:30:36.930
-1
628,738
[ "c#", "wpf", "sorting" ]
5,512,565
1
null
null
0
1,410
I need help with Object detection. I habe to detect position of a Fork and a Knife on a Plate. The Plate is on a Tray. The Objects are always the same but the Positions can vary. I'm wokring with c# and [AForge](http://code.google.com/p/aforge/) + [EmguCV](http://www.emgu.com/wiki/index.php/Main_Page) Can someone help me with this? Here is a sample pic: ![enter image description here](https://i.stack.imgur.com/gfv4x.jpg)
Detection of a known Object (By Template)
CC BY-SA 2.5
null
2011-04-01T11:11:06.253
2014-08-18T14:51:35.523
2011-04-01T12:00:15.783
46,594
687,461
[ "c#", "computer-vision", "emgucv", "aforge" ]
5,512,698
1
null
null
0
3,130
![enter image description here](https://i.stack.imgur.com/q6FI2.jpg) Hi All, I am creating a PDF document using ITEXTSHARP. I need to add some content to PDF toolbar while creating the PDF document. How can i achieve this using C#. Please see the attached image for reference. Thanks in advance.
How to add dynamic text to PDF toolbar using ITEXTSHARP
CC BY-SA 2.5
null
2011-04-01T11:25:16.490
2011-04-01T19:44:52.543
null
null
231,317
[ "c#", "pdf-generation", "itext" ]
5,512,704
1
5,512,879
null
0
255
can i show table view in this way ![enter image description here](https://i.stack.imgur.com/IMJzk.png) specification 000001,s able to hide all. 000003 is able to hide from 3 to 14.. 000011 able to hide only 12,13 and 14.. Thanks, Shyam
file structure in table view
CC BY-SA 2.5
null
2011-04-01T11:26:20.193
2011-04-01T11:43:54.290
2020-06-20T09:12:55.060
-1
563,848
[ "iphone", "cocoa-touch", "ipad", "uitableview" ]
5,513,219
1
5,519,378
null
2
220
Ok so when I go to create a new project in Visual C# 2010 Express i have several options, to create a normal WPF App or to create a WPF RIBBON App. As you can see below, every time I want to add SOMETHING to the ribbon, it's disabled. Why? What use is a ribbon that won't let you add stuff? How can I get this beast to let me add stuff to my ribbon? Thanks! ![enter image description here](https://i.stack.imgur.com/0thSR.png)
WpfRibbonApplication - Does not let me add stuff to the ribbon!
CC BY-SA 2.5
null
2011-04-01T12:15:07.363
2011-04-01T22:08:46.237
2020-06-20T09:12:55.060
-1
null
[ "c#", ".net", "wpf", "controls", "ribbon" ]
5,513,583
1
null
null
3
952
I have one problem. In ASP.NET application i created link to some document, document name is stored in database and when user click on link File Download dialog appears. Problem occurs when file name is Serbian Cyrilic, File Download dialog shows file name with some strange characters. See image ![File download file name strange characters](https://i.stack.imgur.com/Z88mV.jpg) Whene i use HtmlEncode for file name IE works fine (shows right file name), but then problem is in FireFox. Thanks.
File Download Dialog
CC BY-SA 2.5
null
2011-04-01T12:48:08.737
2015-06-22T10:56:22.220
null
null
109,922
[ "c#", "asp.net", "encoding", "localization" ]
5,513,708
1
5,514,273
null
7
595
![MSDN Extensibility Platfrom Description](https://i.stack.imgur.com/iWjRb.jpg) Recently I found the above displayed Visual Studio Extensibility Platform chart from microsoft. Most of the things are clear to me. However, I am wondering about the Package API and the VSL (Visual Studio Library). I tried to find more, but was not able to find any information. Things I do not quite understand: - What exactly is the Package API? - What exactly is the VSL? - What is the relation between the InteropAssemblies/ VSL and the Package API? Do the InteropAssemblies wrap the access to the Package API? - Why should one use the VSL when implementing a native package? What are the benefits? Does anybody have more information about these subjects or does somebody know some resources?
VS Extensibility Architecture (Package API/ Visual Studio Library)
CC BY-SA 3.0
0
2011-04-01T12:58:44.407
2020-06-28T07:09:51.137
2012-10-09T17:23:54.150
203,458
450,711
[ "visual-studio-2010", "visual-studio", "vs-extensibility", "vspackage", "mpf" ]
5,513,779
1
13,982,755
null
6
1,263
When sending email, if I set `MFMailComposeViewController` recipients using standard RFC822 recipient format with "name" , `MFMailComposeViewController` will format recipients in the view to show the names with the email addresses hidden. So doing this: ``` MFMailComposeViewController *composer = [[MFMailComposeViewController alloc] init]; NSArray *recipients = [NSArray arrayWithObjects: @"\"Bob Paulsen"\ <[email protected]>", @"\"Sally"\ <[email protected]>", nil ]; [composer setToRecipients:recipients]; ``` results in this: ![enter image description here](https://i.stack.imgur.com/TYVFN.png) Is there a magic format I can use to do the same thing in with SMS recipients in MFMessageComposeViewController? I tried using the same format as email but it includes all the text (name and number) in the recipient field. I've tried a few other permutations but so far haven't lucked onto a solution.
Can recipients sent to MFMessageComposeViewController be formatted to show name instead of phone number?
CC BY-SA 3.0
0
2011-04-01T13:04:49.133
2016-04-11T02:20:26.307
2012-11-30T12:50:00.470
537,544
480,641
[ "iphone", "cocoa-touch", "ios4" ]
5,513,809
1
5,513,834
null
1
90
I've been using a table to display a list of items in a webmail inbox. The issue here is that `:hover` on a `tr` doesn't work in IE (and it's stupid to do it anyway, hence the question). The list has multiple columns, much like GMail's format. What I want to do is be able to set the background of each row on hover, among other things. Can someone give me a good solution to a table (say, a list with multiple columns) so that I can get the following behavior: ![Ignore the buttons along the top - I'm only on about the list behaviour.](https://i.stack.imgur.com/FUpbC.png) Ideally, I don't want to use something like JQGrid; I'd like to do this using pure HTML and as clean markup as possible. CSS is, obviously, fine.
Simple way to use a list with columns
CC BY-SA 3.0
null
2011-04-01T13:07:34.157
2017-11-18T18:41:12.670
2017-11-18T18:41:12.670
4,370,109
383,609
[ "html", "html-table" ]
5,513,962
1
5,514,022
null
1
253
Can anybody please help me creating the same horizontal accordian menu with all the tabs default right side with small arrow images on those tabs. The main idea is to change the arrow directions as and when moving right to left. I googled jquery accordians but found without arrows. Thanks in advance Ramesh.T. ![enter image description here](https://i.stack.imgur.com/rpZeW.jpg)
Create horizontal accordion as in the attached image
CC BY-SA 3.0
null
2011-04-01T13:21:00.550
2015-06-05T17:48:33.737
2015-06-05T17:48:33.737
1,331,425
505,689
[ "jquery", "asp.net", "jquery-ui-accordion" ]
5,514,093
1
5,555,364
null
10
4,490
I have a xamDataGrid with two levels of data. (see [other question](https://stackoverflow.com/questions/5487544/infragistics-xamdatagrid-bound-to-hierarchical-data-how-to-notify-grid-of-chang) on SO). There is very little visually that shows where one level of data starts and a seconds begins. Take a look at this snippet from the xamFeatureBrowser: ![enter image description here](https://i.stack.imgur.com/ol9hZ.png) What I want, is to indent the second level a little. RecordPresenter has a [NestedContentMargin](http://help.infragistics.com/Help/NetAdvantage/WPF/2010.3/CLR4.0/html/InfragisticsWPF4.DataPresenter.v10.3~Infragistics.Windows.DataPresenter.RecordPresenter~NestedContentMargin.html) property, but it's read-only... An alternative, would be to display some kind of thin footer for each second level grid.
xamDataGrid - indenting nested levels
CC BY-SA 2.5
0
2011-04-01T13:31:00.490
2017-04-13T02:15:22.110
2017-05-23T10:30:55.627
-1
11,956
[ "wpf", "infragistics", "xamdatagrid" ]
5,514,260
1
5,514,838
null
10
1,265
I have a very simple image processing application. > I am trying to remove the pixels which do not involve red tones. So far a basic code seems to achieve what I want. ``` private void removeUnRedCellsBtn_Click(object sender, EventArgs e) { byte threshold = Convert.ToByte(diffTxtBox.Text); byte r, g, b; for (int i = 0; i < m_Bitmap.Width; i++) { for (int j = 0; j < m_Bitmap.Height; j++) { r = im_matrix[i, j].R; g = im_matrix[i, j].G; b = im_matrix[i, j].B; if ((r - b) < threshold || (r - g) < threshold) { m_Bitmap.SetPixel(i, j, Color.White); } } } pictureArea_PictureBox.Image = m_Bitmap; } ``` Basically if the difference of (red and blue) or (red and green) is less than a threshold it sets the pixel to white. > My results seems to be promising however I am wondering if there is a better solution for determining whether a pixel involves red tones in it. My results for a threshold value of 75 is ![before](https://i.stack.imgur.com/97Y6h.jpg) ![after](https://i.stack.imgur.com/XKsII.jpg) Any algorithm or thought will be very appreciated. Thanks in advance ![matlab imtool](https://i.stack.imgur.com/mJPxo.jpg)
Removing non red toned pixels
CC BY-SA 2.5
0
2011-04-01T13:45:54.263
2011-04-01T14:35:58.480
2011-04-01T14:10:27.940
542,810
542,810
[ "c#", "image-processing" ]
5,514,607
1
5,516,865
null
7
1,804
I have a problem connecting my Web app to the database using Eclipses datasource explorer. This is what I did: ![enter image description here](https://i.stack.imgur.com/Ttw38.png) Maybe i did configure wrong the driver. This is how i configurated the driver definition from eclipse Helios. Window->Preferences->DataManagement->Conectivity->Driver Definitions: ![enter image description here](https://i.stack.imgur.com/fgWgx.png) ![enter image description here](https://i.stack.imgur.com/QY2bq.png) ![enter image description here](https://i.stack.imgur.com/kAuvi.png) ![enter image description here](https://i.stack.imgur.com/IeAXD.png) I am able to start the application server and even access the application throgh the browser. But i cannot interact with the db. This is how the config files of the webapp look like: ``` <?xml version="1.0" encoding="UTF-8"?> <persistence version="2.0" xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd"> <persistence-unit name="jdbc/GroupBuySystem"> <class>entities.Administ</class> <class>entities.Buyer</class> <class>entities.Comment</class> <class>entities.Log</class> <class>entities.Offer</class> <class>entities.Seller</class> </persistence-unit> </persistence> ``` ``` <?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_groupbuydb_userPool"/> <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_groupbuydb_userPool" 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="groupbuydb"/> <property name="User" value="user"/> <property name="Password" value="pwd"/> <property name="URL" value="jdbc:derby://localhost:1527/groupbuydb;create=true"/> <property name="driverClass" value="org.apache.derby.jdbc.ClientDriver"/> </jdbc-connection-pool> </resources> ``` Also i want to mention that i start the database from the console with this command: > C:\glassfishv3\bin>asadmin start-database ![enter image description here](https://i.stack.imgur.com/66zoJ.png) What am I doing wrong? Why can't I connect to the DB?
Can't connect application to database
CC BY-SA 3.0
0
2011-04-01T14:14:04.900
2011-04-27T20:54:31.827
2011-04-27T20:54:31.827
614,141
614,141
[ "java", "eclipse", "jpa", "jdbc", "derby" ]
5,514,830
1
5,518,558
null
8
5,561
I cannot seem to get py2exe to work properly. I have run "python setup.py py2exe" in cmd, as well as "python setup.py install"... and When I try to run my executable setup, I get this same error over and over: ![enter image description here](https://i.stack.imgur.com/TdxHr.png) After a week I'm starting to get quite frustrated and I'm hoping to be able to resolve the issue today. I'm using Python 2.7 and py2exe v0.6.9. 64-bit Windows7
py2exe throws ImportError: DLL load failed: The specified module could not be found
CC BY-SA 3.0
0
2011-04-01T14:34:53.560
2020-10-08T19:24:37.810
2017-05-22T23:53:15.210
null
687,761
[ "python", "py2exe" ]
5,515,029
1
5,515,166
null
0
274
Been struggling with a Person Search application in Adobe Flex for the over the last few days. Basically I have the following: ``` private var persons:ArrayCollection = new ArrayCollection(); public function init():void{ var p1:PersonSummary = new PersonSummary("Joe Smith", "9/9/1987", "img1.jpg"); var p2:PersonSummary = new PersonSummary("Ben Smith", "9/5/1987", "img2.jpg"); var p3:PersonSummary = new PersonSummary("John Doe", "9/9/1967", "img3.jpg"); persons.add(p1); persons.add(p2); persons.add(p3); } ``` ``` class PersonSummary{ private var name:String; private var dob:String; private var image:String; public function PersonSummary(n:String,d:String,i:String){ this.name = n; this.dob = d; this.image = i; } ... } ``` The interface I'm looking for: ![enter image description here](https://i.stack.imgur.com/vEX9w.jpg) What is the MXML? Ill forever be in the debt of anyone that can solve this problem for me! Thanks Phil
Custom List Design - Adobe Flex
CC BY-SA 2.5
null
2011-04-01T14:51:23.047
2011-04-01T15:01:50.870
2020-06-20T09:12:55.060
-1
653,331
[ "apache-flex", "actionscript", "adobe", "mxml" ]