Id
int64
1.68k
75.6M
PostTypeId
int64
1
2
AcceptedAnswerId
int64
1.7k
75.6M
ParentId
int64
1.68k
75.6M
Score
int64
-60
3.16k
ViewCount
int64
8
2.68M
Body
stringlengths
1
41.1k
Title
stringlengths
14
150
ContentLicense
stringclasses
3 values
FavoriteCount
int64
0
1
CreationDate
stringlengths
23
23
LastActivityDate
stringlengths
23
23
LastEditDate
stringlengths
23
23
LastEditorUserId
int64
-1
21.3M
OwnerUserId
int64
1
21.3M
Tags
list
6,049,021
1
6,049,476
null
0
115
See the image below. For the first item it shows value for a few seconds, then changes it (scrolls to) , then back to and so on. How to implement the same on Android? ![image](https://i.stack.imgur.com/q0g82.jpg)
How to create ListView element with changing values?
CC BY-SA 3.0
null
2011-05-18T18:00:16.777
2011-05-18T18:38:54.917
null
null
604,388
[ "android", "android-listview" ]
6,049,282
1
6,049,507
null
-4
1,077
i would like be able to input a dataset and get SMOOTH graph. for example i have the following graph how would i smooth this out: ![enter image description here](https://i.stack.imgur.com/saPIT.png)
generating chart using python or google charts
CC BY-SA 3.0
null
2011-05-18T18:22:28.900
2011-05-18T18:41:16.160
2011-05-18T18:35:40.970
117,700
117,700
[ "python", "graph", "charts", "google-visualization" ]
6,049,358
1
6,070,238
null
5
4,470
I've written a test case using the Selenium IDE. I would like to run the test (using the play button) and I would like to switch to the Table tab so I can see the commands. As seen in the screenshot, I can neither click the play button nor switch to the Table tab. Why? ![selenium capture](https://i.stack.imgur.com/00kAp.jpg)
Selenium IDE: cannot run a test case or switch to the command table
CC BY-SA 3.0
null
2011-05-18T18:29:46.330
2011-05-20T09:55:10.113
2011-05-18T18:36:00.010
110,028
110,028
[ "firefox", "testing", "selenium" ]
6,049,615
1
6,065,662
null
0
175
I have a custom TreeView for which I'd like to hide the ImageList dropdown from the designer tasks popup. Is there any (relatively simple) way to do that? ![enter image description here](https://i.stack.imgur.com/oWpb5.png)
Hiding items from the 'tasks' popup in visual studio designer
CC BY-SA 3.0
null
2011-05-18T18:50:14.620
2011-05-19T22:44:19.400
null
null
300,212
[ "winforms", "visual-studio", "controls", "windows-forms-designer" ]
6,049,682
1
6,052,438
null
2
6,468
Please provide the code to make a tip balloon programmatically, like Grindr has. I want it to be sized automatically, based on the text & font-size. And, I want to be able to change the location of the arrow. If it's on an end, it should be a right triangle. Otherwise, it should be an eqilateral triangle. ![tip balloon](https://i.stack.imgur.com/E3kmA.png)
iPhone: How to make a tip balloon programmatically?
CC BY-SA 3.0
0
2011-05-18T18:57:25.150
2011-07-13T16:33:05.300
2011-05-19T00:18:56.343
242,933
242,933
[ "iphone", "uiview", "uilabel" ]
6,049,861
1
6,049,987
null
5
1,662
I have a lab values table that I would like to query and get the difference between the last value and the most recent value if its >= 0.2. How do I go around doing that. Here is the query I have so far. Any help would be appreciated. Database is Oracle 10g. See screenshot for details. ``` SELECT DISTINCT VISITLAB.DATEOFENTRY, VISITLAB.LABVALUE, VISITLAB.CODE FROM(XCX.PATIENTVISIT PATIENTVISIT INNER JOIN XCX.MASTERPATIENT MASTERPATIENT ON (PATIENTVISIT.MASTERPATIENTID = MASTERPATIENT.MASTERPATIENTID)) INNER JOIN XCX.VISITLAB VISITLAB ON (VISITLAB.MASTERPATIENTID = PATIENTVISIT.MASTERPATIENTID) AND (VISITLAB.VISITNUMBER = PATIENTVISIT.VISITNUMBER) WHERE (MASTERPATIENT.MASTERPATIENTID = 'xxxxxxxx') AND (VISITLAB.CODE = 'UQN0') AND (PATIENTVISIT.DISCHARGEDATE IS NULL) AND (PATIENTVISIT.FACILITYCODE = 'x') ``` ![enter image description here](https://i.stack.imgur.com/GdM4q.png)
Difference in two row values of the same table
CC BY-SA 3.0
null
2011-05-18T19:13:32.543
2011-05-19T13:19:38.327
2011-05-19T04:12:38.010
146,325
684,899
[ "sql", "oracle", "oracle10g" ]
6,050,094
1
6,050,133
null
8
2,768
I am getting a List of Points from the user clicking on the screen. And I want to draw a polygon based on this points. The problem is that the user might not be clicking in the right order () to form a correct polygon, therefor I'm looking for a code snippet which would sort that List and arrange the points in the right order to form a good polygon... Thanks! picture = BAD POLY! ![enter image description here](https://i.stack.imgur.com/drqjI.jpg) - picture = GOOD POLY! ![enter image description here](https://i.stack.imgur.com/XrNRu.jpg)
How can I order a list of Points so that no lines drawn intersect?
CC BY-SA 3.0
0
2011-05-18T19:35:27.797
2023-02-15T21:25:01.373
2011-05-18T19:43:13.377
651,418
651,418
[ "c#" ]
6,050,265
1
6,050,889
null
0
155
So I'm trying to do more than just one left expression, and one right expression. Is this possible with an NSPredicate? Here is the "custom" solution I'm using now, but I don't think it's ideal: ![Conditions](https://i.stack.imgur.com/KLsD5.png) Is it possible to re use this? Note: the Health dropdown has about 9 options, I'd rather not have like 9*4 permutations. Thanks!
Multiple expressions for an NSPredicate?
CC BY-SA 3.0
null
2011-05-18T19:54:55.637
2011-05-18T20:54:18.497
null
null
524,481
[ "objective-c", "xcode", "interface-builder", "nspredicate" ]
6,050,808
1
6,050,850
null
6
1,027
I have a standard jQuery UI dialog. Inside that dialog, I have a custom jQuery UI button that allows me to select an event type for a calendar event. I'm using the jQuery UI position utility to absolutely position a div that contains the list of available event types, as you can see in the image. When the event type div is showing, any content that is longer than the available space disappears under the edge of the dialog. I would expect this if the it was an iframe, or if the absolutely positioned parent had a higher z-index. However, the jQuery UI dialog is a simple absolutely positioned div with a z-index of 1002 (the default), and my widget's div that displays the event types is an absolutely positioned div that has a z-index of 1003. I would expect that my div would take higher precedence in the stacking order. My question is: what's happening here? Why is my div being hidden by the bottom edge of the dialog? ![screenshot of issue](https://i.stack.imgur.com/RKW5R.png)
jQuery UI dialog with absolutely positioned child partially hides overflowing child
CC BY-SA 3.0
0
2011-05-18T20:47:56.973
2011-05-18T20:52:30.680
null
null
769
[ "jquery", "jquery-ui", "dialog", "z-index", "css-position" ]
6,050,966
1
6,051,258
null
1
121
What's the best way to get rid of row_labels? My program should work with CSV files, and I need only col_labels. ![enter image description here](https://i.stack.imgur.com/rTvKA.jpg) I'm going to make this column's width 0px. But is it the best possible solution?
How to get rid of row labels?
CC BY-SA 3.0
0
2011-05-18T21:00:56.827
2011-05-19T10:05:18.407
2011-05-19T03:23:17.453
128,421
322,020
[ "ruby", "wxwidgets", "wxruby" ]
6,051,115
1
6,056,897
null
0
1,169
I'm trying to implement an upload with progress bar code i found [here](https://github.com/drogus/jquery-upload-progress). But when i run my example code i get the following error in IIS7 Windows7: [Click here for larger image](https://i.stack.imgur.com/CU1oW.png) ![My Error:](https://i.stack.imgur.com/CU1oW.png) I tried messing with my handlers but only messed it up more as i don't know what i'm doing. Can someone help me get this working?
Post Verb not allowed iis7
CC BY-SA 3.0
null
2011-05-18T21:14:26.497
2011-05-19T09:59:23.920
null
null
442,580
[ "asp.net", "file-upload", "httphandler" ]
6,051,178
1
6,051,505
null
1
1,735
I am trying to implement UpNP in C++, I found a few sources on google but none worked. I found this one working ([http://www.codeproject.com/KB/IP/upnplib.aspx](http://www.codeproject.com/KB/IP/upnplib.aspx)) but it's for .NET, so I decided to sniff the network to see what the code was doing and then do the same with sockets. Here are the results (full size: [http://i.stack.imgur.com/eLoHK.jpg](https://i.stack.imgur.com/eLoHK.jpg)): ![enter image description here](https://i.stack.imgur.com/eLoHK.jpg) That shows me that the packet doesn't look bad, everything seems to be the same, everything but the of my code, which I don't know how to control (both my code and finder.net.exe are being tested on the same computer connected to the same network). Here's my code: ``` #define upnp_broadcast_ip "239.255.255.250" #define upnp_broadcast_port 1900 #define upnp_search_request "M-SEARCH * HTTP/1.1\r\n" \ "Host:239.255.255.250:1900\r\n" \ "ST:upnp:rootdevice\r\n" \ "Man:\"ssdp:discover\"\r\n" \ "MX:3\r\n" \ "\r\n" WSAStartup(MAKEWORD(2, 2), &WsaData); BOOL discover( ) { SOCKET ConnectSocket; struct sockaddr_in Addr; char Buffer[1450]; int t = 0, iResult = 0, TrueLen = sizeof(bool); bool True = true; ulong One = 1; // Open datagram socket ConnectSocket = socket( AF_INET, SOCK_DGRAM, IPPROTO_UDP ); // Clear out struct memset( &Addr, 0, sizeof(Addr) ); // Specify the address family, IP address, and port Addr.sin_family = AF_INET; Addr.sin_port = htons( upnp_broadcast_port ); Addr.sin_addr.s_addr = inet_addr( upnp_broadcast_ip ); iResult = setsockopt( ConnectSocket, SOL_SOCKET, SO_BROADCAST, (char*)&True, TrueLen ); // Not sure what is this for // Transmit data int sent = sendto( ConnectSocket, upnp_search_request, strlen(upnp_search_request), 0, (struct sockaddr*)&Addr, sizeof(Addr) ); // Try to receive data 10 times for( t = 0; t < 10; t++ ) { ioctlsocket( ConnectSocket, FIONBIO, &One ); // Clear out buffer memset( &Buffer, 0, sizeof(Buffer) ); int length = sizeof(Addr); // Receive data iResult = recvfrom( ConnectSocket, Buffer, (sizeof(Buffer) - 1), 0, (struct sockaddr*)&Addr, &length ); if( iResult == SOCKET_ERROR) { Sleep( 1000 ); continue; } else { // Do stuff with received data } } closesocket( ConnectSocket ); return FALSE; } ``` I removed all the WSAGetLastError() error checking to make the code easier to read, everything goes fine until recvfrom, that always returns -1 and strerror(WSAGetLastError()) prints "Unknown error". I hope someone could guide me in the right direction, I've been the last two days trying to make this work.
Socket transmit data but can't receive response
CC BY-SA 3.0
null
2011-05-18T21:20:01.900
2011-05-19T08:09:52.420
2011-05-19T00:32:01.570
700,568
700,568
[ "c++", "sockets", "winsock", "raw-sockets", "winsockets" ]
6,051,313
1
null
null
0
306
![enter image description here](https://i.stack.imgur.com/p0Pdp.jpg) This is my DB in PostgreSQL. All the id fields are serial. The problem is when I try to save data from datagridviews when I have entered values in all 3 tables, its not saving and shows error: Failed to enable constraints. One or more rows contain values violating non-null, unique, or foreign-key constraints. The code with what I am saving: ``` adptDelivery.Update((DataTable)DGV_Delivery.DataSource); adptProduct.Update((DataTable)DGV_Product.DataSource); adptProduct_Delivery.Update((DataTable)DGV_Product_Delivery.DataSource); ```
Saving data with autonumber primary key fields
CC BY-SA 3.0
null
2011-05-18T21:36:44.573
2014-11-05T16:45:50.757
2014-11-05T16:45:50.757
58,074
655,960
[ "c#", "database", "postgresql", "primary-key", "auto-increment" ]
6,051,397
1
8,403,796
null
0
369
I have installed VS2010 Professional on my machine and now I need to install the latest FxCop. However, I don't know which package listed in the win7.1 sdk should be selected. I really don't want to install the files that are not related. ![Screenshot of Installation Options dialog](https://i.stack.imgur.com/iSuHI.png) Thank you
Which package I should select for FxCop when installing Windows SDK 7.1?
CC BY-SA 3.0
0
2011-05-18T21:45:36.243
2013-04-16T21:49:08.440
2013-04-16T21:45:52.400
1,812,922
391,104
[ "fxcop" ]
6,051,509
1
6,051,582
null
17
9,582
I am reinventing the wheel and creating my own JSON parse methods in Java. I am going by the (very nice!) documentation on [json.org](http://www.json.org/). The only part I am unsure about is where it says Since the documentation is so clear, and JSON is so simple and easy to implement, I thought I would go ahead and require the spec instead of being loose. How would I strip out control characters in Java? Perhaps there is a unicode range? ![enter image description here](https://i.stack.imgur.com/IsqlB.gif) --- ## Edit: A (commonly?) missing peice to the puzzle I [have been informed](https://security.stackexchange.com/a/11097/764) that there are other control characters outside of [the defined range](http://download.oracle.com/javase/6/docs/api/java/lang/Character.html#isISOControl%28int%29) [1](https://stackoverflow.com/a/6051582/463304) [2](https://stackoverflow.com/a/6051594/463304) that can be troublesome in `<script>` tags. > Most notably the characters U+2028 and U+2029, Line and Paragraph Separator, which act as newlines. Injecting a newline into the middle of a string literal will most likely cause a syntax error (unterminated string literal). [3](https://security.stackexchange.com/a/11097/764) Though I believe this does not pose an XSS threat, it is still a good idea to add extra rules for the use in `<script>` tags. - `\u`- `</script``</script><script src=http://tinyurl.com/abcdef>`
Java: detect control characters which are not correct for JSON
CC BY-SA 3.0
0
2011-05-18T21:56:16.723
2016-07-08T13:50:12.100
2017-05-23T11:46:18.963
-1
463,304
[ "java", "json", "unicode", "control-characters" ]
6,051,542
1
6,051,940
null
5
14,312
It seems that this question [first appeared](http://r.789695.n4.nabble.com/ggplot2-Change-color-of-grid-lines-td827813.html) around 2007. The question is this: How to change the gridline and background color when plotting with ggplot2 in R? I add two pictures as an example of what I mean by background and gridline color. Back in 2007, Hadley Wickham said that appearance functionalities were missing (this included changing the color of the background). Does anybody know if there's an update that allows changing the background color and the color of the gridlines? Thanks in advance ![before](https://i.stack.imgur.com/Gw0hs.png) ![enter image description here](https://i.stack.imgur.com/unfRA.png)
Color of gridlines and background
CC BY-SA 4.0
0
2011-05-18T21:59:39.743
2023-01-14T10:14:21.383
2023-01-14T10:14:21.383
14,282,714
740,564
[ "r", "ggplot2" ]
6,051,663
1
6,051,679
null
5
344
![enter image description here](https://i.stack.imgur.com/nGo5l.png) I am helping a friend from first year to prepare his exam on Java. The teacher asked them to create a method that can cast a Musicians to a Poets. No one knew how to do it. After thinking a good while, I came to the conclusion that it is impossible to do that(), because the fact that Musician and Poet Share an Interface is not enough to cast them to the other. I think that would be possible only, if they were in the same inheritance chain. Now I have three questions: 1. Am I right? 2. If I am right, what is what the professor wanted from them to do? I really doubt that he would ask for such a thing. 3. If I am wrong, could you write code that can cast a Musician into a Poet?
Doubts about object Casting
CC BY-SA 3.0
null
2011-05-18T22:13:21.937
2012-09-21T17:21:18.520
2012-09-21T17:21:18.520
1,288
614,141
[ "java" ]
6,051,706
1
6,051,742
null
6
16,998
I`m trying to customize my TabBar in xcode,ios, however I just found ppl saying that this is not customizable! also, i did find some sort of solutions, but none of them are working for me. I tried to iterate inside my UITabBar subviews to see if I find something, but any success: ``` for (UIView *view in [self.tabBarController tabBar].subviews) { NSLog(@"Class: %@",[view class]); } ``` the output of this was: ``` 2011-05-18 18:15:24.031 EventApp[52235:207] Class: UIImageView 2011-05-18 18:15:24.032 EventApp[52235:207] Class: UITabBarButton 2011-05-18 18:15:24.032 EventApp[52235:207] Class: UITabBarButton 2011-05-18 18:15:24.033 EventApp[52235:207] Class: UITabBarButton 2011-05-18 18:15:24.033 EventApp[52235:207] Class: UITabBarButton 2011-05-18 18:15:24.034 EventApp[52235:207] Class: UITabBarButton ``` and I cannot import that UITabBarButton obj to work with it! Some solution for that?! also I posted some links bellow which I`ve looked, but didnt work! [Custom UITabBarItem Image/Title on iPhone](https://stackoverflow.com/questions/292041/custom-uitabbaritem-image-title-on-iphone) [changing text color of uitabbaritem](https://stackoverflow.com/questions/3051958/changing-text-color-of-uitabbaritem/3052390#3052390) What I wanna do is somethink like the follow: ![enter image description here](https://i.stack.imgur.com/g1OcO.png)
UITabBarItem with custom title color and images
CC BY-SA 3.0
0
2011-05-18T22:18:25.877
2013-03-01T01:08:47.107
2017-05-23T11:52:17.120
-1
534,150
[ "iphone", "xcode", "view", "uitabbar" ]
6,051,902
1
6,052,139
null
0
1,230
I have a 9 patch png in a RelativeLayout and everything looks great! However, when i create a textView in the RL, the textView is not at the top of the parent... I also tested this on the phone, same result... why does it do this? Thanks for your assistance! ``` <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/testLL" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent" android:background="@drawable/backrepeat" > <RelativeLayout android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_margin="15dp" android:layout_gravity="center_vertical|center_horizontal" android:background="@drawable/contentbox"> <TextView android:text="Test" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_alignParentTop="true"/> </RelativeLayout> </LinearLayout> ``` ![RelativeView](https://i.stack.imgur.com/Nkr4C.png) ![TextView](https://i.stack.imgur.com/GeQs9.png)
Alignment weirdness in relativelayout with a background image
CC BY-SA 3.0
null
2011-05-18T22:49:01.393
2011-05-18T23:58:18.577
null
null
700,414
[ "android", "textview", "alignment", "patch", "android-relativelayout" ]
6,052,032
1
null
null
1
443
I'm trying to understand what the mechanism is for getting a string from a c++ daemon I've written to Java for use by a UI. I'll post a picture of what I envision, then continue the question afterward: ![enter image description here](https://i.stack.imgur.com/Frkay.jpg) There are two issues that I envision here: 1) The semaphore needs to be available to the library. In Windows, that could've been done with a named semaphore and access to it's handle. In Linux, I've been pointed toward using a semaphore in shared memory and making processes aware of it through a key to the shared memory. It's vague to me, but will that concept work to synchronize Java and the daemon? 2) Do I have to place the queue in shared memory in order to make the `???` link in the above chart work? Can and should the queue reside in the .so? So those are my concerns. I'd love and welcome any and all help, challenges, and pleas for sanity and will do my best to provide all additionally necessary information. Thanks in advance.
C++ Shared-memory necessary for queue of std::strings to pass through JNI?
CC BY-SA 3.0
0
2011-05-18T23:07:18.050
2011-06-08T12:59:24.623
null
null
416,190
[ "c++", "linux", "java-native-interface", "semaphore", "shared-memory" ]
6,052,035
1
6,052,123
null
0
522
Where have a i gone wrong here ``` ul.bullet { list-style-image:url('../images/bullet-blue-icon.png');vertical-align:middle;line-height:16px; } ul.bullet li { line-height:16px;font-size:14px;} ``` The image is 16px x 16px Should dispplay absolutley inline with the li text so like this [ image ] text here But the image is off cock, ![enter image description here](https://i.stack.imgur.com/l3E2X.png)
icon and text inline css issue
CC BY-SA 3.0
null
2011-05-18T23:07:40.757
2011-05-18T23:17:55.237
null
null
501,173
[ "css" ]
6,052,108
1
null
null
1
2,803
I have an Excel file with multiple columns. If you observe the attached image the 1st column is coupons (repeated with different settlement dates). I need to write a macro which will loop through the file, and find one record for each coupon with the minimum date of all the dates that particular coupon has. For example, coupon 2 has 4 records in the attached image. I should delete three off them, and have only one record with the earliest date among those four. Can someone please provide me an example? ![Ir](https://i.stack.imgur.com/Vbg1a.jpg)
Excel Min Date in a given range
CC BY-SA 3.0
null
2011-05-18T23:15:54.490
2012-09-26T13:52:31.453
2012-09-26T13:52:31.453
564,184
564,184
[ "excel", "vba" ]
6,052,133
1
6,053,932
null
4
672
I use this feature in Geany: ![](https://habrastorage.org/storage/c0a6139c/6a326ad4/fd070c52/3fd9838f.png) How can I enable it in gvim?
How to get margin indicators (see image) in gvim
CC BY-SA 3.0
0
2011-05-18T23:19:49.150
2011-05-19T09:40:08.033
2017-02-08T14:32:14.847
-1
344,347
[ "vim", "indentation", "highlighting" ]
6,052,150
1
6,059,060
null
1
912
im trying to use google Map in my android application. I have added two permission for user :INTERNET and ACCESS_FINE_LOCATION" and also : "uses-library android:name="com.google.android.maps" here is my activity for showing the map: ``` public class SportEventActivity extends MapActivity { private MapController mapController; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.sportevent); Bundle extras = getIntent().getExtras(); if (extras != null) { // Reads the parameters to this view String sportName = extras.getString(Utility.SPORT_NAME); String venueName = extras.getString(Utility.VENUE_NAME); String startDate = extras.getString(Utility.START_DATE); String endDate = extras.getString(Utility.END_DATE); final String latitude = extras.getString(Utility.LATITUDE); final String longitude = extras.getString(Utility.LONGITUDE); TextView text1 = (TextView) findViewById(R.id.sedSportName); text1.setText("Sport: " + sportName); TextView text2 = (TextView) findViewById(R.id.sedVenue); text2.setText("Venue: " + venueName); TextView text3 = (TextView) findViewById(R.id.sedStartDate); text3.setText("Start date: " + startDate); TextView text4 = (TextView) findViewById(R.id.sedEndDate); text4.setText("End date: " + endDate); MapView mapView = (MapView) findViewById(R.id.mapview2); mapView.setBuiltInZoomControls(true); mapView.setStreetView(true); this.mapController = mapView.getController(); this.mapController.setZoom(16); Double lat = getCoordinate(latitude) * 1E6; Double lng = getCoordinate(longitude) * 1E6; mapController.setCenter(new GeoPoint(lat.intValue(), lng.intValue())); } } @Override protected boolean isRouteDisplayed() { return false; } private Double getCoordinate(String coordinate) { return Double.parseDouble(coordinate); } } ``` and also you can find the layout code related to this activity : ``` <?xml version="1.0" encoding="utf-8"?> <TableLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:stretchColumns="1" android:id="@+id/sedLayout"> <TableRow> </TableRow> <TableRow> <TextView android:layout_column="1" android:padding="3dip" android:text="Sport name" android:id="@+id/sedSportName" /> <TextView android:gravity="right" android:padding="3dip" /> </TableRow> <TableRow> <TextView android:layout_column="1" android:padding="3dip" android:text="Venue" android:id="@+id/sedVenue" /> <TextView android:gravity="right" android:padding="3dip" /> </TableRow> <TableRow> <TextView android:padding="3dip" /> <TextView android:padding="3dip" android:text="Start Date" android:id="@+id/sedStartDate" /> </TableRow> <TableRow> <TextView android:padding="3dip" /> <TextView android:padding="3dip" android:text="End Date" android:id="@+id/sedEndDate" /> <TextView android:gravity="right" android:padding="3dip" /> </TableRow> <TableRow> <TextView android:padding="3dip" /> <View android:layout_height="2dip" android:background="#FF909090" /> <TextView android:padding="3dip" /> </TableRow> <TableRow> </TableRow> <com.google.android.maps.MapView xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/mapview2" android:layout_width="fill_parent" android:layout_height="fill_parent" android:clickable="true" android:apiKey="0aULnfycQonb-l_B1QlcK8u4POo4_oKjnmqMU1Q" /> </TableLayout> ``` I can see the map, but the problem is that when I see the map, it show one chess chart on the map. I have attached a screenshot form the result. if any body why it show me the map with a borders, please give me a solution. ![here is the screen shot of ](https://i.stack.imgur.com/55fOX.png)
Display Google Map in Android Emulator
CC BY-SA 3.0
null
2011-05-18T23:21:13.470
2011-05-21T04:18:13.083
2011-05-19T05:28:42.857
261,002
261,002
[ "android", "google-maps" ]
6,052,304
1
null
null
1
1,273
If I have any file and I want to chage the summary property infromation set of that file how can I do that , I am mainly concerned for this attributes "Title , Subject , Category , Keywords, Comments , Source , Author , Revision No." ""![enter image description here](https://i.stack.imgur.com/5f9xs.jpg)
how to change summary property information set of a file using powershell
CC BY-SA 3.0
0
2011-05-18T23:44:34.700
2013-10-24T12:20:07.467
null
null
758,663
[ "powershell" ]
6,052,533
1
6,057,336
null
2
1,714
I'm having a lot of difficulty with the Entity Model Framework. I'm just learning how to use this, so please bear with me. This is the exception, along with the line of code that it gets thrown on: ![enter image description here](https://i.stack.imgur.com/h6LrS.png) This is what the model looks like, along with the model that it inherits from ![enter image description here](https://i.stack.imgur.com/7DXhs.png) This is what the mapping details looks like: (Top of if statement was cut off) ![enter image description here](https://i.stack.imgur.com/COZ7I.png) Here's what AccountContext looks like ![enter image description here](https://i.stack.imgur.com/56C6e.png) If I didn't provide enough information then please let me know How do I map the "User" Entity?
Entity Not Mapped - Entity Model Framework
CC BY-SA 3.0
0
2011-05-19T00:28:25.597
2011-05-19T10:56:53.150
2011-05-19T01:18:12.933
185,292
185,292
[ "c#", "visual-studio-2010", "asp.net-mvc-3", "mapping", "entity-framework-4.1" ]
6,052,693
1
6,062,208
null
3
3,289
![Muntz Coffman example](https://i.stack.imgur.com/uCfZR.png) I'm wondering how exactly do you calculate the time slices (2, 4, 5.5, 7, 8.5).
Muntz-Coffman Algorithm (Scheduling)
CC BY-SA 3.0
0
2011-05-19T01:00:39.783
2011-05-19T17:03:02.407
2011-05-19T01:43:58.763
505,259
505,259
[ "algorithm", "scheduling", "job-scheduling" ]
6,052,875
1
6,052,885
null
1
282
i'm trying to do some practices on command line.. ![enter image description here](https://i.stack.imgur.com/DNOnl.jpg) as you see in the pic the command is not triggering. i'm pressing Enter. (as described in practicing book)
mysql command line help (windows)
CC BY-SA 3.0
null
2011-05-19T01:37:15.693
2011-05-19T01:45:25.033
null
null
755,035
[ "mysql", "command-line" ]
6,052,866
1
6,078,389
null
0
480
In MVC 2 I am working on something and have ran into a snag. I got my repository put instead of putting in the same class the interface is I have it same project as the EDMX file. Initializing StructureMap is what's killing me at this point. Here's where I'm initizing StructureMap (in Global.asax.cs.) ``` ObjectFactory.Initialize(x => { x.ForRequestedType<IUnitOfWorkFactory>() .TheDefaultIsConcreteType<EFUnitOfWorkFactory>() .CacheBy(InstanceScope.HttpContext); x.ForRequestedType(typeof(IRepository<>)) .CacheBy(InstanceScope.HttpContext) .TheDefaultIsConcreteType(typeof(GenericRepository<>)); }); ``` The Namespace for this project is GpdsCreationTaxidermy.Data (which is the same Namespace as my GenericRepository.cs). I would post the code for this file but I dont believe that is the problem here. In my Global.asax I import the proper Namespace ``` using GodsCreationTaxidermy.Data; ``` The error I'm getting is: > Error 3 The type or namespace name 'GenericRepository' could not be found (are you missing a using directive or an assembly reference?) Also attached is an image showing this particular projects layout ![enter image description here](https://i.stack.imgur.com/Dk96t.png) Can someone help with this issue, or what I'm doing wrong here I have even tried adding GodsCreationTaxidermy.Data to the file name and still no luck.
StructureMap cannot find GenericRepository
CC BY-SA 3.0
null
2011-05-19T01:36:07.690
2011-05-20T23:02:12.687
2011-05-19T01:41:08.157
88,230
88,230
[ "asp.net-mvc-2", "structuremap" ]
6,052,985
1
6,053,046
null
0
180
Just redoing our captcha. Demo: [http://sitehelp.com.au/demos/ttt/422.php](http://sitehelp.com.au/demos/ttt/422.php) Anyhoo the css is as follows: ``` .funcaptcha { width: 81px; overflow: hidden; float: left; margin-right: 0px; } .funcaptcha a { display: inline-block; background: url("http://sitehelp.com.au/demos/ttt/images/ttt-small.png"); margin: 2px 2px 0 0; float: left; } .funcaptcha a.circle { background-position: 0px -29px; } .funcaptcha a.cross { background-position: -29px -83px; } .funcaptcha a.empty { background-position: -0px 0px; } .funcaptcha a.marked, .funcaptcha a:hover { background-position: -29px 0px; } .funcaptcha .box { display: block; cursor: pointer; overflow: hidden; width: 25px; height: 25px; } ``` Contains php, so unable to do a fiddle. But My css positioning is just off a tad, any suggestions ? the ttt-small.png is: ![enter image description here](https://i.stack.imgur.com/Z6iDj.png)
tic tac toe capture css ( assistance )
CC BY-SA 3.0
null
2011-05-19T01:57:11.720
2011-05-19T02:39:56.330
2011-05-19T01:59:04.903
476
501,173
[ "css" ]
6,053,003
1
null
null
0
1,415
I have tried everything but no luck. I am using Watin and C# .NET What I am doing is going to: > https ://adwords.google.com/o/Targeting/Explorer?__u=1000000000&__c=1000000000&ideaRequestType=KEYWORD_IDEAS#search.none There's no space between `https` and `://`, but I had to add it because of a markdown problem Entering the captcha manually (typing the text from Watin). After you search for keywords, you will see that in the bottom of the page you have a and a button. I would like from WatiN to go to page 2, 3,... It sounds simple, click on the `div` (with `gwt-debug-aw-paging-next` ) and it will go to next page, but it does not happen. I tried `FireEvent`, `click`, `KeyDown`, everything ... but it's not working. I also tried to select 100 results from the `Selectlist`, but again, it does not work. I tried it in all ways: ``` browser.DomContainer.SelectList("gwt-debug-aw-paging-list-box").Option("100").Select(); ``` Nothing seems to work when talking about the buttons from the bottom right of the page. I managed to "simulate" the click on or , but not with the bottom buttons. Any suggestions? : I uploaded an image so you can see exactly the button I am talking about: ![example](https://i.stack.imgur.com/hX7Yi.jpg) Click [here](https://i.stack.imgur.com/hX7Yi.jpg) to view it larger. ``` <div id="gwt-debug-aw-paging-next" class="goog-button-base goog-inline-block goog-button aw-btn aw-pagination-button" tabindex="0" title="Next page"> <input type="text" tabindex="-1" style="opacity: 0; height: 1px; width: 1px; z-index: -1; overflow: hidden; position: absolute;"> <div class="goog-button-base-outer-box goog-inline-block"> <div class="goog-button-base-inner-box goog-inline-block"> <div class="goog-button-base-pos"> <div class="goog-button-base-top-shadow">&nbsp;</div> <div class="goog-button-base-content"> <span id="gwt-debug-aw-paging-next-content" class="aw-pagination-next">&nbsp;</span> </div> </div> </div> </div> ```
WatiN SelectList or DIV Click from Google Adwords Keywords Page
CC BY-SA 3.0
null
2011-05-19T02:00:34.963
2011-06-06T19:15:19.723
2011-05-20T07:32:13.353
297,114
760,227
[ "watin", "web-scraping", "selectlist", "google-ads-api" ]
6,053,160
1
6,053,220
null
6
23,962
I have been trying to set the background color of my table view but am facing an issue This is what I am trying to do. ``` //Set background color of table view (translucent) self.tableView.backgroundColor = [UIColor colorWithRed:0.0 green:0.2 blue:0.5 alpha:0.7]; //Set frame for tableview [self.tableView setFrame:CGRectMake(0, 0, self.view.frame.size.width, self.view.frame.size.height-self.picker.frame.size.height)]; ``` After setting the table cells, I saw that there is an inconsistency in the alpha level around the table view cell (see screenshot below) ![tableView BackgroundColor](https://i.stack.imgur.com/DGUtW.jpg) Is there anyway to make the color / alpha level consistent for the background? (Note: I am not setting a background image, only color and alpha level) Thanks! Zhen Hoe
Objective C: How to make background color of UITableView Consistent
CC BY-SA 3.0
null
2011-05-19T02:31:38.307
2015-10-16T17:33:21.193
null
null
683,898
[ "objective-c", "ios", "uitableview" ]
6,053,378
1
null
null
0
105
I have a svn server installed in my local machine and configured xcode to use it. I can do import, checkout, commit etc, but can't see the version tree in SCM tab in any file's Info window. ![it shows the current revision though](https://i.stack.imgur.com/fEYyu.png) Is there anything else I need to set up to see the versions?
xcode can't show version tree but commit and everything works just fine
CC BY-SA 3.0
null
2011-05-19T03:19:37.190
2011-05-20T14:00:42.143
2011-05-19T03:38:54.720
null
665,564
[ "xcode", "svn" ]
6,053,391
1
6,053,562
null
0
403
![UIMenuItem](https://i.stack.imgur.com/vADx5.png) I know that the `UIMenuController` can show a popover containing Cut, Copy, Paste, Select/All, and other system menu items. But I don't know what the last item is, visible in the screenshot above. What is its function? Does it call anything within the application, and if so, what? Can it be disabled? In this case, I would like to disable or remove the item programmatically, without disabling any international keyboards.
What is the name of this segment on UIMenuItem?
CC BY-SA 3.0
null
2011-05-19T03:22:43.090
2012-05-26T09:09:23.423
2011-05-19T04:07:15.753
null
515,986
[ "ios", "uimenucontroller" ]
6,053,546
1
6,053,583
null
1
1,998
I am trying to default the top cell in my table view to be highlighted whenever the subview appears. I tried to do this: ``` switch(indexPath.row) { // assuming there is only one section case 0: cell.textLabel.text = @"First Cell:"; cell.highlighted = YES break; ``` But this doesn't work as I get a black overlay on my first cell instead. EDIT (added screenshot) ![enter image description here](https://i.stack.imgur.com/xOm4i.jpg) Any advise on this will be greatly appreciated! Thanks Zhen
Objective C: How to highlight the first cell in table view when view loads?
CC BY-SA 3.0
0
2011-05-19T03:51:41.513
2012-08-19T11:56:07.983
2011-08-30T10:17:22.647
491,980
683,898
[ "iphone", "objective-c", "ios", "uitableview", "highlight" ]
6,053,649
1
6,053,731
null
0
748
I am working with Internet Explorer (8) and it seems that the images grow slightly bigger. Actually it seems the whole template grows slightly bigger on Internet Explorer and makes the background images bigger and thus... blurry. In Firefox, Chrome, Opera, Safariit's all good! Here's an image to illustrate my horrible dilemma. ![oh... IE.](https://i.stack.imgur.com/MUJ3E.png) This happens EVEN with a simple image on the page and a full XHTML template.
CSS - Internet Explorer makes image sizes slightly bigger
CC BY-SA 3.0
null
2011-05-19T04:07:35.887
2011-05-19T16:01:57.360
2011-05-19T16:01:57.360
74,757
272,501
[ "css", "internet-explorer" ]
6,053,644
1
6,053,703
null
0
1,830
I have some serverside script for check user: ``` function passlog($use,$pass){ $Use = mysql_real_escape_string($use); $Pass= mysql_real_escape_string($pass); $res=mysql_query($sql) or die(_ERROR26.":".mysql_error()); $dat=mysql_fetch_array($res,MYSQL_NUM); //it will get result ex. "3" if(mysql_affected_rows()>0) { echo $dat[0]; }else{ echo "No specified data"; } return 0; } ``` after that if that script get result as "3" it will return to ajax success function. Then do the next job, there is if show result as "3" It will send some value to another variable. ``` $.ajax({ type:"post", url:"process3.php", data:params, cache:false, async:false, success: function(res){ $("#dialog").dialog('close'); var now = new Date(); var months = new Array('01','02','03','04','05','06','07','08','09','10','11','12'); var date = ((now.getDate()<10) ? "0" : "")+ now.getDate(); function fourdigits(number) { return (number < 1000) ? number + 1900 : number; } var today = months[now.getMonth()] + "/" +date+ "/" + (fourdigits(now.getYear())); switch(parseInt(res)){ case "3": $("#appdate").text(today); //not work $("#app").text($("#user").val()); //not work break; } $.ajax({ type:"post", url:"process1.php", data:"tversion="+matches+"&action=tunermatches", cache:false, async:false, success: function(res){ $('#tunedat').replaceWith( "<div id='tunedat'><h6>" + res + "</h6></div>" ); } }); }, error:function (xhr, ajaxOptions, thrownError){ alert(xhr.status); alert(thrownError); } }); ``` but, its not work and i get no error message. Whether my ajax wrong? --- i have ajax inside ajax too. ![div id= app inside a cell below "issue by"](https://i.stack.imgur.com/KHQlQ.png)
Confusing in ajax success function
CC BY-SA 3.0
null
2011-05-19T04:07:20.980
2011-05-19T04:32:03.750
2011-05-19T04:32:03.750
751,947
751,947
[ "php", "javascript", "jquery", "ajax" ]
6,054,003
1
6,055,343
null
0
332
> jwysiwyg text editor to my zend application , i gave the path to the editor in my phtml , it doestn't load the images of text editor , only show as links , this is my phtml . ``` <?php if ($this->errors) { echo "<div class='error'><ul>"; foreach ($this->errors as $key => $value) { foreach($value as $l => $msg){ echo '<li>' . $msg . '</li>'; } } echo "</ul></div>"; } $registry = Zend_Registry::get("cacheserver"); $formdata = $this->formdata; ?> <script type="text/javascript" src="<?php echo $registry->tinymceurl ; ?>jquery.wysiwyg.js"></script> <script language="javascript" type="text/javascript"> var baseUrl = "<?php echo $this->baseUrl(); ?>"; var divtwodata = "<?php echo $this->divtwodata ; ?>"; $(document).ready(function(){ if(!divtwodata) { $('#divtwo').hide(); } else { $('#divone').hide(); } $("#back").live('click',function() { $('#divtwo').hide(); $('#divone').show(); }); $('#save').live('click',function() { var invoice_no = $('#invoiceno').val(); var payer_name = $('#payername').val(); var amount = $('#amount').val(); var payer_email = $('#email').val(); //var email_subject = $('#').val(); var email_body = $('#body').html(); var property_id = $("#hotels option:selected").val(); var property_name = $("#hotels option:selected").text(); $.ajax({ type: "POST", url: baseUrl + '/admin/customerinvoice/addcustomerinvoice', data: { invoice_no:invoice_no, payer_name:payer_name, amount:amount, payer_email:payer_email, email_body:email_body, property_id:property_id }, async: false, success: function(data){ if(data){ //error_list += '<li>Room type name already used. Try another name</li>'; //error = true; alert("true"); } else{ alert("false"); } } }); }); $('.tinymce').wysiwyg({ css: '<?php echo $registry->tinymceurl ; ?>jquery.wysiwyg.css' , icon: '<?php echo $registry->tinymceurl ; ?>jquery.wysiwyg.gif' , controls: { strikeThrough: { visible: true }, underline: { visible: true }, subscript: { visible: true }, superscript: { visible: true } } }); }); </script> <?php echo '<div id="divone"><div id="divHeader"> <div class="floatleft"> <h3>Add Customer invoice</h3> </div> <div class="clear"></div> </div> <fieldset class="coloredfield"><div class="box275">'; echo $this->form ; echo '</div></fieldset></div>'; ?> <div id="divtwo"> <table class="wid100"> <thead> <tr class="header"> <th></th> <th></th> </tr> </thead> <tbody> <tr class="even"> <td class="textalignleft wid30"><strong>Invoice number :</strong></td> <td class="textalignright wid65"><?php echo $formdata['invoice']; ?></td> </tr> <tr class="even"> <td class="textalignleft wid30"><strong>Payer name :</strong></td> <td class="textalignleft wid65"><?php echo $formdata['payer']; ?></td> </tr> <tr class="even"> <td class="textalignleft wid30"><strong>Amount :</strong></td> <td class="textalignright wid65"><?php echo $formdata['amount']; ?></td> </tr> <tr class="even"> <td class="textalignleft wid30"><strong>payer Email :</strong></td> <td class="textalignleft wid65"><?php echo $formdata['email'] ?></td> </tr> <tr class="even"> <td class="textalignleft wid30"><strong>Email subject :</strong></td> <td class="textalignleft wid65"><?php echo $formdata['subject'] ?></td> </tr> <tr class="even"> <td class="textalignleft wid30"><strong>Email body :</strong></td> <td class="textalignleft wid65"><?php echo $formdata['body'] ?></td> </tr> </tbody> </table> <div class="w135 floatright margin-top20"> <div class="floatright"><a href="#" id="back" class="linkbutton">Back</a></div> <div class="floatleft"><a href="#" id="save" class="linkbutton">save</a></div> </div> </div> ``` this is my cacheserver.ini ``` ![production] cacheserver.url = "http://localhost:4000/jetwing-ibestatic/public/" cacheserver.tinymceurl ="http://localhost:4000/jetwing-ibestatic/public/js/jwysiwyg/" cacheserver.js.path = "js" cacheserver.style.path = "css" cacheserver.js.files[] = "jquery-1.4.4.min.js" cacheserver.js.files[] = "jquery-ui-1.8.6.custom.min.js" cacheserver.js.files[] = "jquery.emeCalendar.js" cacheserver.js.files[] = "jquery.emeDataProcessor.js" cacheserver.js.files[] = "jquery.emeSearchValidator.js" cacheserver.js.files[] = "jquery.emeValidator.js" cacheserver.js.files[] = "json2.min.js" cacheserver.style.files[] = "ie6.css" cacheserver.style.files[] = "ie7.css" cacheserver.style.files[] = "jquery-ui-1.8.6.custom.css" cacheserver.style.files[] = "styles.css" cacheserver.admin.js.files[] = "jquery-1.4.4.min.js" cacheserver.admin.js.files[] = "jquery-ui-1.8.6.custom.min.js" cacheserver.admin.js.files[] = "jquery.emeCalendar.js" cacheserver.admin.js.files[] = "jquery.emeActivator.js" cacheserver.admin.js.files[] = "scripts.js" cacheserver.admin.js.files[] = "jquery.validate.js" cacheserver.admin.js.files[] = "jquery.livequery.js" cacheserver.admin.js.files[] = "jquery.form.js" cacheserver.admin.style.files[] = "styles.css" cacheserver.admin.style.files[] = "jquery-ui-1.8.6.custom.css" cacheserver.admin.style.files[] = "admin-custom.css" cacheserver.images.path = APPLICATION_PATH "/../images"; [staging : production] [testing : production] [development : production][1] ``` i am sure i gave the correct path , i have a textarea with class tinymce in my zend form , please help me . ![enter image description here](https://i.stack.imgur.com/COhwE.png)
jwysiwyg editer does not work properly when added to zend framework
CC BY-SA 3.0
null
2011-05-19T05:05:03.127
2011-05-19T07:39:16.323
null
null
733,287
[ "jquery", "zend-framework" ]
6,054,085
1
null
null
1
983
I'm displaying some photos on website. . I tried many ways but it still doesn't work. This is html and css: ``` <div id="albumListContent"> <img id="a42" class="albumImg" width="150px" alt="not found" src="photo_with_any_size.jpg"> <img id="a56" class="albumImg" width="150px" alt="not found" src="photo_with_any_size.jpg"> <img id="a59" class="albumImg" width="150px" alt="not found" src="photo_with_any_size.jpg"> <img id="a62" class="albumImg" width="150px" alt="not found" src="photo_with_any_size.jpg"> <img id="a63" class="albumImg" width="150px" alt="not found" src="photo_with_any_size.jpg"> <img id="a64" class="albumImg" width="150px" alt="not found" src="photo_with_any_size.png"> </div> .albumImg, { /* center photos */ vertical-align: middle; /* add some margin for elegance */ margin: 1em; /* Photo hover effects */ opacity: 0.8; /* Border style and border color */ padding:8px; border:solid; border-color: #dddddd #aaaaaa #aaaaaa #dddddd; border-width: 1px 2px 2px 1px; background-color:white; } ``` ![enter image description here](https://i.stack.imgur.com/JXZh6.jpg) This is my Jquery which generates the above html: ``` var albumListHTML = ''; albumListHTML += '<div id="albumListContent">'; if(num > 0) { for(var i = 0; i < num; ++i) { albumListHTML += '<img id="a' + data[i].album_id + '" class="albumImg" width="150px" src="' + data[i].album_cover + '" alt="not found" title="' + data[i].album_name + '"/>'; } } else { albumListHTML += 'No album found.'; } albumListHTML += '</div>'; $('#albumListContentWrapper').append(albumListHTML); ``` I tried adding < span > which wraps < img > and set "float: left" to force the text to be below the < img >, then center text with text-align. The problem is the < img > is "float:none" so the text is floating away. ``` for(var i = 0; i < num; ++i) { albumListHTML += '<span style="">'; albumListHTML += '<img id="a' + data[i].album_id + '" class="albumImg" width="150px" src="' + data[i].album_cover + '" alt="not found" title="' + data[i].album_name + '"/>'; albumListHTML += '<span style="float: left; text-align: center">' + data[i].album_name + '</span>'; albumListHTML += '</span>'; } ```
Adding title below photo
CC BY-SA 3.0
null
2011-05-19T05:14:00.580
2011-05-19T06:16:58.987
2011-05-19T06:13:22.110
238,190
238,190
[ "html", "css" ]
6,054,124
1
6,054,567
null
4
2,845
I have 2 models, Deck and Slide. Slide has foreign key to Deck. (there is also an intermediate model--its a m2m relationship--but to simplify an already complex discussion, I'm going to pretend its a simpler many-to-one relationship.) The interface i am implementing displays a page with a form to enter or edit Deck fields which also includes an embedded list of Slides in the Deck, with some fields (which I'm in the process of making text inputs) and also with an "edit" and a "remove" anchor link for each Slide. (see img) If you click an "edit" link, it takes you to a new page with a detailed form to input all the information representing the content for the corresponding slide. If you click submit in that form, it takes you back to the page for the deck. ![Screen shot](https://i.stack.imgur.com/XNW8T.png) As the title question proposes, I obviously don't want to commit any Deck or Slides to the DB until a user clicks Submit for the entire Deck, i.e. they can add or edit many slides in the interim and may decide to cancel the whole process. What is the best, cleanest way of doing this? I've looked at Django's FormWizard class ( [http://docs.djangoproject.com/en/dev/ref/contrib/formtools/form-wizard/](http://docs.djangoproject.com/en/dev/ref/contrib/formtools/form-wizard/) ), but seems to be geared towards a multi-step linear flow, not my situation. I already had to implement this for a demo, and I've gotten most of the way there by creating an inline FormSet for the Slides and a Form for the Deck, and then writing subclasses for my Forms that hide the form and the formset as I pass back and forth between the two pages. Here's some code demonstrating how I use a hidden form for the deck in the slide page: ``` class DeckForm(ModelForm): class Meta: #stuff here class HiddenDeckForm(DeckForm): def __init__(self, *args, **kwargs): super(DeckHiddenForm, self).__init__(*args, **kwargs) for name, field in self.fields.iteritems(): field.widget = field.hidden_widget() field.required = False ``` So in my views, every time I go to the slide form page, I generate a HiddenDeckForm from the POST data and pass it in, and then in my view going back to the deck page, I regenerate the DeckForm (not hidden subclass) from the POST data. Not going to post all my Slide form code, since I'm basically asking whether there is a better way of doing it, but similarly, I have a HiddenSlideForm class, and pass a formset of those between my templates to save the state. Then when the user clicks submit on the Deck page, the Deck form and Slides formset are all saved to the DB. It works, but is this a good way to do it? Its been a good bit of code, and I've really had to dig into some Django internals--feel's like I'm using things in a way they weren't designed to be used. Or is there already a more standard way of handling this scenario? I'll post more code if its helpful. Thanks for the help!
Django: How to carry model form data from one page to another, and back, without commiting to the DB?
CC BY-SA 3.0
0
2011-05-19T05:19:11.733
2013-10-22T20:41:08.930
2011-05-19T06:14:11.013
652,693
652,693
[ "python", "django", "django-models", "django-forms" ]
6,054,486
1
6,059,565
null
3
3,235
Im using the following code to travel though the pixels of a BMP as this ![enter image description here](https://i.stack.imgur.com/jLPvv.png) ``` for (int i = 0; i <= Image.Width; i++) { for (int j = 0; j <= Image.Height; j++) { color = Image.GetPixel(i, j); //get } } ``` but im getting a exception ``` System.ArgumentOutOfRangeException was unhandled Message="Parameter must be positive and < Height.\r\nParameter name: y" Source="System.Drawing" ParamName="y" ``` I have no clue why im getting this.. im using a `BMP` with valid heights and same code with hard-coded values working correctly @Odded No:1 Shows what i needed and no 2 is whats happening with ur code any idea? ![enter image description here](https://i.stack.imgur.com/m4C1T.png)
Exception on traveling through pixels BMP C#
CC BY-SA 3.0
0
2011-05-19T06:04:33.840
2011-05-19T15:17:18.253
2011-05-19T13:05:23.773
296,231
296,231
[ "c#" ]
6,054,580
1
6,064,424
null
0
5,933
This is related to: [excel function to get value of another cell](https://stackoverflow.com/questions/2442808/excel-function-to-get-value-of-another-cell) (but slightly different) I want to get the date (on Row D), that corresponds to the last non-blank value in another row. See below for what I am trying to describe. ``` | D2 | D3 | D4 | D5 <- Dates ------------------------- A | X2 | X3* | X4* | X5 <- A should get D4, X4 is the last non-blank value B | Y2* | Y3* | Y4* | Y5* <- B should get D5, Y5 is the last non-blank value ``` Asterisk (*) denotes a non-blank cell/value. Can somebody please help me with the formula? Thanks. ![enter image description here](https://i.stack.imgur.com/EDJA7.jpg)
Get value from a row that corresponds (in the same column) to a cell in another row
CC BY-SA 3.0
0
2011-05-19T06:17:02.803
2011-05-20T14:00:25.707
2017-05-23T12:30:37.427
-1
90,513
[ "excel" ]
6,054,601
1
6,054,671
null
0
1,272
I want a UITableView with a UIToolBar at the bottom of the screen that does not scroll. I created a custom UIToolBar in IB. (I use Xcode 4, so is it still IB?) Anyway, I linked the `toolbar` instance variable in IB, therefore it's instantiated once the nib is loaded. ``` - (void)viewDidLoad { [super viewDidLoad]; [[NSBundle mainBundle] loadNibNamed:@"customToolbar" owner:self options:nil]; [[[UIApplication sharedApplication] keyWindow] addSubview:toolbar]; //toolbar is IBOutlet instance variable } ``` But it draws at the very top of the screen and is partially cut off by the status bar. Do I need to customize setting its frame? Or is there a better way? I thought the default was to position the UIToolBar at the bottom. Here's my IB configuration: ![IB Config](https://i.stack.imgur.com/6mSrM.png) Thanks!
UIToolBar does not draw at bottom of iPhone screen
CC BY-SA 3.0
null
2011-05-19T06:19:13.583
2011-05-19T07:27:12.150
null
null
455,265
[ "iphone", "cocoa-touch", "ios", "uitableview", "uitoolbar" ]
6,054,610
1
6,055,032
null
0
2,268
I am designing a pretty complex webform with Master/Detail structure. Is it a good move to keep the add/edit form on the same webpage ? My current scenario has 2 separate web pages (add new & edit), On add new page the add details is disabled until user saves the master. On edit page everything works out of the box. ![Current Scenario Add web form](https://i.stack.imgur.com/S1Byi.jpg) ![Current scenario Edit web form](https://i.stack.imgur.com/OxXEA.jpg) > 1. Both the forms have exactly similar controls 2. I am thinking about the following new structure - Same webpage for Add/Edit (User adds master record (add mode) -> Saves -> Gets redirected to the same page with edit mode-> Can add,update delete new Details or Update the master he just entered 3. What do you guys prefer in such scenarios ? On a note, separate webform for edit page means duplicating everything with just some minor changes to Save/Edit functionality. Also for the details I have to provide Add/Edit/Delete on the same page anyway Thanks Damien.
Add/Edit webform on same page?
CC BY-SA 3.0
0
2011-05-19T06:20:33.507
2011-05-19T09:25:59.937
2011-05-19T09:25:59.937
521,201
521,201
[ "asp.net", "design-patterns", "webforms" ]
6,054,724
1
null
null
0
208
I am trying to make a sentence-filling like interface, where I can have `TextView`s and `EditText`s mixed arbitrarily in a paragraph. I have had a look at [this question](https://stackoverflow.com/questions/549451/line-breaking-widget-layout-for-android), but the problem was that when I have [ `TextView1`, `EditText`, `TextView2` ] and the content of `TextView1` consumes 1 full line and 1 fifth of the second line, then `TextView1` will have to span the entire width because it is a rectangle. This pushes `EditText` to the next line, which is ugly. So is it possible to create such kind of ViewGroup/Layout from existing stuff in Android, or I'd have to make a custom `View` from scratch? In case I'm too bad at explaining, this screenshot describes my problem: ![enter image description here](https://i.stack.imgur.com/PGsMi.png) Thank you very much.
Reflowable mix of TextViews and EditTexts?
CC BY-SA 3.0
null
2011-05-19T06:35:10.673
2011-05-19T06:44:58.453
2017-05-23T12:30:37.427
-1
159,759
[ "android", "forms", "layout", "user-interface", "reflow" ]
6,054,815
1
6,054,914
null
3
805
How can I create a ellipse (path, ...) with a hole in it: ![Ellipse with hole](https://i.stack.imgur.com/oOWh5.png) The task is to create a visualization of a three-state-indicator. The different states are visualized by rotating the control several degrees to the left or the right.
Ellipse with a hole
CC BY-SA 3.0
null
2011-05-19T06:45:04.080
2011-05-19T06:56:56.883
null
null
128,886
[ "wpf", "xaml", "wpf-controls" ]
6,054,880
1
6,151,565
null
10
20,919
I currently work on the following page: ![schema of the page](https://i.stack.imgur.com/EUVuB.jpg) divResizable has been modified by jQuery using the following code in `$().ready()` ``` $("#divResizable").resizable({ handles: 'e' }); $("#divResizable").bind("resize", function (event, ui) { $('#divContent').width(850 -(ui.size.width - 175)); }); ``` As you can see, I try to increase the width of divContent when divResizable gets smaller and the other way around. However, with this code, divContent doesn't always "grow" to the left side only, it sometimes extends to the right side to the irrelevant div, which doesn't make the resizing look good at all. Is there any input for a more sophisticated method to let the width of those 2 divs correspond? Something I could think of would be to set width of divContent to ``` (start of irrelevant - divResizable.width) == 850px ^ e.g 1025px ^ e.g. 175px ``` How exactly would I do this using jQuery?
Adjust the width of 2 divs using jQuery-Resizable
CC BY-SA 3.0
0
2011-05-19T06:53:02.893
2017-09-07T15:43:43.430
2017-09-07T15:43:43.430
1,007,939
600,024
[ "javascript", "jquery", "css", "resizable", "jquery-ui-resizable" ]
6,055,360
1
6,055,607
null
0
372
I am having a requirement to create a page which contains dynamic check box controls. I am handling this by adding controls to Placeholder in page_init event. Now, i have to change the controls to render in this way ![Expected rendering of checkbox list](https://i.stack.imgur.com/ATbYl.png) One option contains 3 checkboxes and first 2 checkboxes are disabled and gives a kind of suggestion to the user to select the 3rd checkbox How can i achieve this kind of requirement?
Creating checkbox control with two or more checkbox button
CC BY-SA 3.0
null
2011-05-19T07:40:52.120
2011-05-19T08:04:43.887
2011-05-19T07:58:35.097
5,772,384
322,022
[ "c#", ".net", "dynamic", "user-controls", "checkbox" ]
6,055,371
1
6,055,716
null
1
7,877
I have written android class which will call RESTful web service. If request is successful, response will be JSON object. I write android class like this: public class android extends Activity { ``` public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); TextView txt = (TextView) findViewById(R.id.textView1); txt.setText(getInputStreamFromUrl("http://localhost:8080/kyaw")); } public static String getInputStreamFromUrl(String url) { InputStream content = null; try { HttpClient httpclient = new DefaultHttpClient(); HttpResponse response = httpclient.execute(new HttpGet(url)); content = response.getEntity().getContent(); } catch (Exception e) { Log.e("[GET REQUEST]", "Network exception"); } String result=convert(content); return result; } private static String convert(InputStream in) { BufferedReader reader=new BufferedReader(new InputStreamReader(in)); StringBuilder sb=new StringBuilder(); String line=null; try{ while((line=reader.readLine())!=null){ sb.append(line+"\n"); } }catch(Exception e) { e.printStackTrace(); }finally{ try{ in.close(); }catch(IOException e){ e.printStackTrace(); } } return sb.toString(); } ``` } I have a problem after i run.I will get exception coz i return as a string.But response is JSON .How should I convert JSON to String or other way and then how to show result in android screen? thanks![enter image description here](https://i.stack.imgur.com/FnHzf.jpg)
how to convert JSON response to String and show in screen?
CC BY-SA 3.0
null
2011-05-19T07:41:53.723
2011-05-19T08:29:42.360
2011-05-19T08:09:26.383
682,302
682,302
[ "android", "web-services", "json", "rest", "httpresponse" ]
6,055,477
1
6,057,898
null
1
254
Thanks in advance. I used `CGAffineTransformMakeScale(-1.0, 1.0)` tranform on an image ![normal image](https://i.stack.imgur.com/co7OC.png) And i got the image ![scale image](https://i.stack.imgur.com/WZoSL.png) like this. I am displaying that in an imageview. Now, if i try to access that image and display in another imageview it is displaying normally like first image. But i want the scaled image to access. Can any one help me how to save and get the scaled image. Here this `CGAffineTransformMakeScale(-1.0, 1.0)` method will not effect on image.
How to save the scaled image in iphone
CC BY-SA 3.0
null
2011-05-19T07:50:56.467
2016-04-05T08:56:43.733
2016-04-05T08:56:43.733
2,298,998
345,936
[ "ios", "objective-c", "iphone", "uiimage" ]
6,055,596
1
6,055,630
null
0
286
Where can I learn more about Conceptual Data Model? I have to create a schema based on the convention in the image below. ![enter image description here](https://i.stack.imgur.com/StQLu.jpg) I don't understand the "bubble" (or relationship) between the two entities. What should be the name of a relationship (verb, nom, etc.)? Is there books or websites which cover this data modelisation theory? What is the name of those diagram? I googled as much as I can around "Conceptual Data Model" and I didn't find anything similar to the image above. Thanks for the help. P.S. I will be using Open ModelSphere "Conceptual Data Model".
Where can I learn more about Conceptual Data Model?
CC BY-SA 3.0
null
2011-05-19T08:03:13.910
2011-05-19T08:14:23.540
null
null
42,024
[ "database", "database-design", "database-schema", "conceptual-model" ]
6,055,692
1
6,055,745
null
3
338
I have a working SQLite database that holds information about video files. The current design is as pictured below. However, the boss has decided to make some changes. ![enter image description here](https://i.stack.imgur.com/fdFOf.png) The table currently uses the file name as the primary key. However, the PK now must be a compound key of both and (file) , which makes more sense anyway. If this is done, what would be the best way to reference this compound key as a foreign key in the other tables? I was thinking of either creating a separate table that holds an auto-incrementing primary key, and . Then the PK can be used as a foreign key reference with all the other tables. Or, make and a composite key in the current table and add a new field that can be used as a reference and this field must be auto-incrementing and unique in the table. I haven't had much practical experience with designing databases so any advice with my problem or my current design would be very welcome.
Database design advice
CC BY-SA 3.0
null
2011-05-19T08:14:52.103
2011-05-19T08:20:38.940
null
null
429,423
[ "sql", "database-design" ]
6,055,736
1
null
null
1
1,317
I have a gridview, that I made editable. That works... sort of. Now I'm trying to a row with new data. The row has columns like: ========================= | Time | Date | Project | etc etc | ========================= I'm trying to save the contents of the edit boxes that appear as i a row. The way I do it is like this: `TextBox time = (TextBox) GridView1.Rows[e.RowIndex].FindControl("txtTime");` `--linq-object-reference--.time = Convert.ToInt32(time.Text);` But I recieve an error... Anyone know why? To clarify my problem... I wanna find out how to fetch the of those `TextBoxes`, like in this picture: ![enter image description here](https://i.stack.imgur.com/rW7e1.png) Okay, here's the error...![enter image description here](https://i.stack.imgur.com/Gviub.png)
ASP.NET GridView - Object reference not set to an instance of an object
CC BY-SA 3.0
null
2011-05-19T08:19:53.030
2011-05-19T09:28:07.850
2011-05-19T09:26:36.307
515,772
515,772
[ "asp.net", "linq" ]
6,055,875
1
6,177,302
null
0
1,204
I'm building an app with some tabs for the iPhone. rephrased the question in the appcelerator website [here](http://developer.appcelerator.com/question/120038/on-orientationchange-navbar-image-is-streched-when-switching-tabs) When i change from portrait to landscape i want to hide the navbar. it works fine if i don't switch to another tab. But when i view 1 tab in portrait, switch to another tab, change to landscape view, switch back to the first tab, and then change to back portrait the navbar (window.barImage) is all stretched out ( to the size of a landscape navBar ) Also when i remove all my code for hiding the navbar the same problem occurs. I've tried setting the barImage again on orientationchange but that does not help either. a site note: I'm using the same image on every tab for the navBar could that be the problem?![portrait view of the app showing my problem](https://i.stack.imgur.com/WJSeb.png) I marked in green the navbar image, the blue part is where the image normally should be. Also note that the image is the right size for a portrait view of the navbar. code: ``` var windowWidth = Ti.Platform.displayCaps.platformWidth; var catWin = Ti.UI.createWindow({ title:'', barImage: 'images/barImage.png', url:'vacancies/categories.js', width: windowWidth }); catWin.orientationModes = [ Titanium.UI.PORTRAIT, Titanium.UI.LANDSCAPE_LEFT, Titanium.UI.LANDSCAPE_RIGHT ]; Titanium.Gesture.addEventListener('orientationchange', function(e) { if(e.orientation == Titanium.UI.LANDSCAPE_RIGHT){ catWin.hideNavBar(); } else if(e.orientation == Titanium.UI.LANDSCAPE_LEFT){ catWin.hideNavBar(); } else if(e.orientation == Titanium.UI.PORTRAIT){ catWin.showNavBar(); } }); ```
appcelerator orientationchange navbar image hide / show
CC BY-SA 3.0
null
2011-05-19T08:33:33.010
2011-05-30T17:23:09.977
2011-05-25T13:35:12.710
286,143
286,143
[ "javascript", "appcelerator", "navbar", "orientation-changes" ]
6,056,049
1
6,056,251
null
1
1,809
I have a question about the minimax algorithm. Lets say I have the following game tree, and I've added some random heuristic values to it. ![enter image description here](https://i.stack.imgur.com/dtmgc.png) As I've understood the minimax algorithm, it will choose the green path. However, this might not be the best thing to choose in the situation. Because the right child of the top node, has the HIGHEST value that it can get, it's not the best move... Since if the other player does the other move, my win chance is much less... I'm sorry, I'm having a hard time expressing what I mean on this question. But how am I thinking wrong here?
What is it that I don't understand about the minimax algorithm
CC BY-SA 3.0
null
2011-05-19T08:49:22.203
2011-05-19T09:16:21.380
null
null
241,513
[ "algorithm", "minimax" ]
6,056,152
1
null
null
4
1,577
I am running Delphi 7 on Windows 7 x64. Everything is working fine except this thing. When I start the IDE the enhancement modules for key mappings are enabled and working in the default blank project but when I load one of my projects, Delphi disables the keyboard shortcuts from my 2 installed extensions. ![Delphi key mapping bug](https://i.stack.imgur.com/Pimbv.gif) I don't have any other extensions installed except the two visible in the above screenshot. Do anyone have any idea how to get around this issue? It is really driving me crazy ... Thanks a lot! I think that it can be related to a crash. I have just installed madExcept and the IDE crashes whenever I load a project. Exception is: EOSError with "A call to an OS function failed." The callstack is: ``` main thread ($284): 40018cee +0007a rtl70.bpl Sysutils RaiseLastOSError 00834214 +00130 vcl70.bpl Controls TWinControl.CreateWnd 00837454 +00038 vcl70.bpl Controls TWinControl.AdjustSize 008345e2 +00016 vcl70.bpl Controls TWinControl.CreateHandle 00837334 +0001c vcl70.bpl Controls TWinControl.HandleNeeded 00837341 +00005 vcl70.bpl Controls TWinControl.GetHandle 402322e6 +001ba vclx70.bpl Tabs TTabSet.Paint 008391bf +00057 vcl70.bpl Controls TCustomControl.PaintWindow 00834e2e +0004e vcl70.bpl Controls TWinControl.PaintHandler 0083535b +0003f vcl70.bpl Controls TWinControl.WMPaint 00839158 +00010 vcl70.bpl Controls TCustomControl.WMPaint 00831a98 +00188 vcl70.bpl Controls TControl.WndProc 00834c97 +00157 vcl70.bpl Controls TWinControl.WndProc 00834914 +0002c vcl70.bpl Controls TWinControl.MainWndProc 778f0117 +0002b ntdll.dll KiUserCallbackDispatcher 75053598 +0003f user32.dll UpdateWindow 75057945 +00016 user32.dll CallWindowProcA 00834d7b +000d7 vcl70.bpl Controls TWinControl.DefaultHandler 00831a98 +00188 vcl70.bpl Controls TControl.WndProc 00834c97 +00157 vcl70.bpl Controls TWinControl.WndProc 00834914 +0002c vcl70.bpl Controls TWinControl.MainWndProc 778f0117 +0002b ntdll.dll KiUserCallbackDispatcher 75056175 +00047 user32.dll SendMessageA 007f4921 +00145 vcl70.bpl Comctrls TCustomStatusBar.UpdatePanel 007f4a64 +00100 vcl70.bpl Comctrls TCustomStatusBar.UpdatePanels 007f4bd4 +0000c vcl70.bpl Comctrls TCustomStatusBar.WMPaint 00831a98 +00188 vcl70.bpl Controls TControl.WndProc 00834c97 +00157 vcl70.bpl Controls TWinControl.WndProc 00834914 +0002c vcl70.bpl Controls TWinControl.MainWndProc 778f0117 +0002b ntdll.dll KiUserCallbackDispatcher 75057945 +00016 user32.dll CallWindowProcA 00834d7b +000d7 vcl70.bpl Controls TWinControl.DefaultHandler 00831a98 +00188 vcl70.bpl Controls TControl.WndProc 00834c97 +00157 vcl70.bpl Controls TWinControl.WndProc 00834914 +0002c vcl70.bpl Controls TWinControl.MainWndProc 778f0117 +0002b ntdll.dll KiUserCallbackDispatcher 75080d0f +2aa8a user32.dll CallNextHookEx 00831a98 +00188 vcl70.bpl Controls TControl.WndProc 00834c97 +00157 vcl70.bpl Controls TWinControl.WndProc 00834914 +0002c vcl70.bpl Controls TWinControl.MainWndProc 778f0117 +0002b ntdll.dll KiUserCallbackDispatcher 0083723a +0000e vcl70.bpl Controls TWinControl.Repaint 007f4c01 +00019 vcl70.bpl Comctrls TCustomStatusBar.WMSize 00831a98 +00188 vcl70.bpl Controls TControl.WndProc 00834c97 +00157 vcl70.bpl Controls TWinControl.WndProc 00834914 +0002c vcl70.bpl Controls TWinControl.MainWndProc 778f0117 +0002b ntdll.dll KiUserCallbackDispatcher 75057945 +00016 user32.dll CallWindowProcA 00834d7b +000d7 vcl70.bpl Controls TWinControl.DefaultHandler 0083218c +0000c vcl70.bpl Controls TControl.WMWindowPosChanged 008356fe +00096 vcl70.bpl Controls TWinControl.WMWindowPosChanged 00831a98 +00188 vcl70.bpl Controls TControl.WndProc 00834c97 +00157 vcl70.bpl Controls TWinControl.WndProc 00834914 +0002c vcl70.bpl Controls TWinControl.MainWndProc 778f0117 +0002b ntdll.dll KiUserCallbackDispatcher 008338db +000b7 vcl70.bpl Controls TWinControl.AlignControls 0083398b +00063 vcl70.bpl Controls TWinControl.AlignControl 008339e6 +00002 vcl70.bpl Controls TWinControl.Realign 00835790 +00018 vcl70.bpl Controls TWinControl.WMSize 00831a98 +00188 vcl70.bpl Controls TControl.WndProc 00834c97 +00157 vcl70.bpl Controls TWinControl.WndProc 00834914 +0002c vcl70.bpl Controls TWinControl.MainWndProc 778f0117 +0002b ntdll.dll KiUserCallbackDispatcher 75057945 +00016 user32.dll CallWindowProcA 00834d7b +000d7 vcl70.bpl Controls TWinControl.DefaultHandler 0083218c +0000c vcl70.bpl Controls TControl.WMWindowPosChanged 008356fe +00096 vcl70.bpl Controls TWinControl.WMWindowPosChanged 007cee41 +000d5 vcl70.bpl Extctrls TCustomPanel.WMWindowPosChanged 00831a98 +00188 vcl70.bpl Controls TControl.WndProc 00834c97 +00157 vcl70.bpl Controls TWinControl.WndProc 00834914 +0002c vcl70.bpl Controls TWinControl.MainWndProc 778f0117 +0002b ntdll.dll KiUserCallbackDispatcher 008338ae +0008a vcl70.bpl Controls TWinControl.AlignControls 0083398b +00063 vcl70.bpl Controls TWinControl.AlignControl 008339e6 +00002 vcl70.bpl Controls TWinControl.Realign 00835790 +00018 vcl70.bpl Controls TWinControl.WMSize 00831a98 +00188 vcl70.bpl Controls TControl.WndProc 00834c97 +00157 vcl70.bpl Controls TWinControl.WndProc 00834914 +0002c vcl70.bpl Controls TWinControl.MainWndProc 778f0117 +0002b ntdll.dll KiUserCallbackDispatcher 75057945 +00016 user32.dll CallWindowProcA 00834d7b +000d7 vcl70.bpl Controls TWinControl.DefaultHandler 0083218c +0000c vcl70.bpl Controls TControl.WMWindowPosChanged 008356fe +00096 vcl70.bpl Controls TWinControl.WMWindowPosChanged 007cee41 +000d5 vcl70.bpl Extctrls TCustomPanel.WMWindowPosChanged 00831a98 +00188 vcl70.bpl Controls TControl.WndProc 00834c97 +00157 vcl70.bpl Controls TWinControl.WndProc 00834914 +0002c vcl70.bpl Controls TWinControl.MainWndProc 778f0117 +0002b ntdll.dll KiUserCallbackDispatcher 00831868 +00024 vcl70.bpl Controls TControl.Perform 0082fafe +0008a vcl70.bpl Controls TControl.SetBounds 008338c9 +000a5 vcl70.bpl Controls TWinControl.AlignControls 0084c86a +00016 vcl70.bpl Forms TScrollingWinControl.AlignControls 0084eb0e +0000e vcl70.bpl Forms TCustomForm.AlignControls 0083398b +00063 vcl70.bpl Controls TWinControl.AlignControl 0082f8cc +00008 vcl70.bpl Controls TControl.RequestAlign 00837454 +00038 vcl70.bpl Controls TWinControl.AdjustSize 0083391d +000f9 vcl70.bpl Controls TWinControl.AlignControls 0083398b +00063 vcl70.bpl Controls TWinControl.AlignControl 008339e6 +00002 vcl70.bpl Controls TWinControl.Realign 00835790 +00018 vcl70.bpl Controls TWinControl.WMSize 00831a98 +00188 vcl70.bpl Controls TControl.WndProc 00834c97 +00157 vcl70.bpl Controls TWinControl.WndProc 0083bc63 +003bf vcl70.bpl Controls TDockTree.WindowProc 00834914 +0002c vcl70.bpl Controls TWinControl.MainWndProc 778f0117 +0002b ntdll.dll KiUserCallbackDispatcher 75057945 +00016 user32.dll CallWindowProcA 00834d7b +000d7 vcl70.bpl Controls TWinControl.DefaultHandler 0083218c +0000c vcl70.bpl Controls TControl.WMWindowPosChanged 008356fe +00096 vcl70.bpl Controls TWinControl.WMWindowPosChanged 007cee41 +000d5 vcl70.bpl Extctrls TCustomPanel.WMWindowPosChanged 00831a98 +00188 vcl70.bpl Controls TControl.WndProc 00834c97 +00157 vcl70.bpl Controls TWinControl.WndProc 0083bc63 +003bf vcl70.bpl Controls TDockTree.WindowProc 00834914 +0002c vcl70.bpl Controls TWinControl.MainWndProc 778f0117 +0002b ntdll.dll KiUserCallbackDispatcher 0082fc87 +00013 vcl70.bpl Controls TControl.SetWidth 00943216 +0004a designide70.bpl Idedockpanel TEditorDockPanel.CMDockNotification 00831a98 +00188 vcl70.bpl Controls TControl.WndProc 00834c97 +00157 vcl70.bpl Controls TWinControl.WndProc 0083bc63 +003bf vcl70.bpl Controls TDockTree.WindowProc 00831868 +00024 vcl70.bpl Controls TControl.Perform 00837179 +00009 vcl70.bpl Controls TWinControl.Invalidate 0083bc63 +003bf vcl70.bpl Controls TDockTree.WindowProc 00831868 +00024 vcl70.bpl Controls TControl.Perform 008300d5 +00055 vcl70.bpl Controls TControl.SendDockNotification 00831a8d +0017d vcl70.bpl Controls TControl.WndProc 00834c97 +00157 vcl70.bpl Controls TWinControl.WndProc 0084e87d +00421 vcl70.bpl Forms TCustomForm.WndProc 008303a7 +0003b vcl70.bpl Controls TControl.SetClientSize 00831868 +00024 vcl70.bpl Controls TControl.Perform 00830427 +00027 vcl70.bpl Controls TControl.SetVisible 0084e372 +0003a vcl70.bpl Forms TCustomForm.SetVisible 00944cf6 +002ce designide70.bpl Deskform TDesktopForm.LoadWindowState 00945ff3 +00067 designide70.bpl Dockform TDockableForm.LoadWindowState 00586e44 +000b8 coreide70.bpl Editors TEditWindow.LoadDesktopFormInstances 0050896a +00036 coreide70.bpl Desktop TDesktopState.Load 005084cf +0003b coreide70.bpl Desktop TDesktopStates.LoadDesktop 0055e332 +0015a coreide70.bpl Modules CreateProjectClass 00512d3c +000a0 coreide70.bpl Docmodul TFilterList.OpenFile 005145e7 +0002b coreide70.bpl Docmodul CallDefaultOpenProc 00831a98 +00188 vcl70.bpl Controls TControl.WndProc 00834c97 +00157 vcl70.bpl Controls TWinControl.WndProc 0084e87d +00421 vcl70.bpl Forms TCustomForm.WndProc 778f0117 +0002b ntdll.dll KiUserCallbackDispatcher 00834914 +0002c vcl70.bpl Controls TWinControl.MainWndProc 75047bc5 +0000a user32.dll DispatchMessageA 0085568b +00083 vcl70.bpl Forms TApplication.ProcessMessage 008556aa +0000a vcl70.bpl Forms TApplication.ProcessMessages 008805a9 +0000d vcl70.bpl Appevnts TCustomApplicationEvents.DoActivate 00854f26 +0055a vcl70.bpl Forms TApplication.WndProc 75047bc5 +0000a user32.dll DispatchMessageA 0085568b +00083 vcl70.bpl Forms TApplication.ProcessMessage 008556c2 +0000a vcl70.bpl Forms TApplication.HandleMessage 008558f2 +00096 vcl70.bpl Forms TApplication.Run 765233c8 +00010 kernel32.dll BaseThreadInitThunk ```
Delphi 7 IDE disables some "Enhancement Modules" on Windows 7 64 bit
CC BY-SA 3.0
null
2011-05-19T09:00:21.493
2012-12-13T14:28:40.627
2011-05-20T07:35:49.313
244,800
244,800
[ "delphi", "ide", "delphi-7" ]
6,056,287
1
6,233,850
null
10
19,039
I'm using jQuery ui Datepicker to display a yearly inline calendar full of "special dates" (with colors). ![enter image description here](https://i.stack.imgur.com/iNEV6.png) This is to allow users to batch special dates by selecting a range and some other details. ``` $('#calendar').datepicker({ ... , onSelect: function (selectedDate, inst) { $('.date_pick').toggleClass('focused'); if ($('.date_pick.end').hasClass('focused')) { $('.date_pick.end').val(''); } # inst.preventDefault() ? <- not a function # inst.stopPropagation() ? <- not a function # return (false) ? <- calendar refreshes anyway } ... }); ``` I'm also using qtip to show the details on each date My problem is when I click on the calendar, it reloads itself entirely, so I loose my qtips. I'd prefer not to use live() with qtip because I don't like the behavior. I'd also prefer that the calendar not refresh each time I click on it (but this does not seem possible anyway) but I would probably no longer be able to highlight my selection anymore. Do you have a suggestion for my problems ?
jQuery ui - datepicker prevent refresh onSelect
CC BY-SA 3.0
0
2011-05-19T09:10:53.367
2015-12-15T20:15:08.377
null
null
305,189
[ "jquery-ui", "datepicker", "refresh", "qtip" ]
6,056,471
1
6,056,609
null
1
5,443
I was able to download this form to my sdcard (from a given URL): ![enter image description here](https://i.stack.imgur.com/PwdAY.jpg) My app can access this form via the android web view. My question is, how to save it to a text file after a user filled data to the form? I want to save in the text file the data inputted by the user, for instance: ``` Address: User address here City: User City Province: User Province here Zip: 4342343 Phone: 4534534534 What is your biggest regret in your life? None. ``` will be saved to the text file... I'm kinda new to java and android dev.
Android: How to save html file with user filled out form
CC BY-SA 3.0
null
2011-05-19T09:23:18.740
2014-02-15T21:26:55.357
2014-02-15T21:26:55.357
759,866
827,530
[ "java", "android", "html", "webview" ]
6,056,510
1
7,330,446
null
0
2,097
I need to know how to change the selected value colori n select box in jQuery Mobile in iPad? Currently, it's ok in native Safari browser. When I render it in iPad Safari browser, it doesn't work. Please check the following Image. I want to change different color to "Pink NRIC" when selected instead of white color. ![enter image description here](https://i.stack.imgur.com/cdg5o.jpg)
how to change selected value color in select box in jQuery Mobile?
CC BY-SA 3.0
null
2011-05-19T09:26:58.660
2011-09-07T07:45:31.667
2011-05-20T03:15:02.480
2,555,911
2,555,911
[ "jquery", "jquery-mobile" ]
6,056,632
1
null
null
-2
65
I think all of you are familiar with this, images on facebook comes with a default background How can i achieve same type of background color for images [without using any div just for the background] As you can see my codes also creates background color but they are not rectangle in size :( This is the preview ![My CSS vs FB CSS](https://i.stack.imgur.com/PwAlA.jpg)
Show image with a background colour - CSS
CC BY-SA 3.0
null
2011-05-19T09:35:45.967
2011-05-19T12:55:35.140
2011-05-19T12:55:35.140
683,233
683,233
[ "css" ]
6,056,846
1
6,057,629
null
2
6,212
I Created the setup for my vb.Net appliaction and installed it on the client systems. The application uses MS Access as the database. So i manually added the file to Setup project under its application directory. Now I have an update for that appliaction. So how can i create an update setup for the application. And I need to keep the Database file as it is ( Dont Delete or Dont install new copy). ![enter image description here](https://i.stack.imgur.com/tz9IT.png) Please help me.
How to create an update setup for a Vb.net application
CC BY-SA 3.0
null
2011-05-19T09:55:32.923
2011-07-25T14:02:20.260
2011-05-19T11:22:05.863
180,430
783,657
[ "vb.net", "visual-studio", "desktop-application", "setup-project" ]
6,057,039
1
6,057,164
null
1
115
This is the code I have so far: ``` public partial class Form2 : Form { public Double X; public Form2() { InitializeComponent(); } private void button2_Click(object sender, EventArgs e) { if(textBox1.Text != "") X = Convert.ToDouble(textBox1.Text); X *= 0.001; label3.Text = "metros"; } private void button3_Click(object sender, EventArgs e) { if (textBox1.Text != "") X = Convert.ToDouble(textBox1.Text); X *= 0.62; label3.Text = "milhas"; } private void button4_Click(object sender, EventArgs e) { if (textBox1.Text != "") X = Convert.ToDouble(textBox1.Text); label3.Text = "quilómetros"; } private void button5_Click(object sender, EventArgs e) { if (textBox1.Text != "") X = Convert.ToDouble(textBox1.Text); X *= 3280,84; label3.Text = "pés"; } private void button6_Click(object sender, EventArgs e) { if (textBox1.Text != "") X = Convert.ToDouble(textBox1.Text); X *= 0.17998560115190784737; label3.Text = "léguas"; } private void button1_Click(object sender, EventArgs e) { textBox2.Text = Convert.ToString(X); } ``` This is how the window looks like: ![Active Form](https://i.stack.imgur.com/9RwVl.jpg) What these do is, when you insert a value on textBox1 (the red one on the middle left of the window), you then select the measurement from the buttons on the right, this will convert the introduced value to kilometres and store it in the variable X and write the chosen measurment on a label to the right of the textBox1. When you press the "Converter" button, (for now) I wanted the textBox2 to show X, however, this only works when I press "metros" or "pés", if I choose one of the other buttons for the conversion it will simply do nothing... Does someone have any idea of what's wrong? And also, side question, how do you select items from the comboBox?
Event Handlers in My Converter App Are Not Working
CC BY-SA 3.0
null
2011-05-19T10:10:40.917
2011-05-19T10:58:12.283
2011-05-19T10:58:12.283
67,392
758,111
[ "c#", "visual-studio-2008" ]
6,057,100
1
6,068,796
null
1
349
OK. Finally, I get the chance to address this problem properly. I came across this problem on SAS EG. First, I have the following dataset: ``` data test; infile datalines; input var1 var2; datalines; 0.01 200 0.02 200 0.03 200 0.04 200 0.05 200 0.06 200 0.07 200 0.08 200 0.09 200 0.10 200 0.11 200 0.12 200 0.13 200 0.14 200 0.15 200 11111111111111111111111111 200 ; run; ``` When I try to plot var1(x-axis) against var2(y-axis) in a gchart hbar, it works fine: ``` PROC GCHART DATA=test; HBAR age / SUMVAR=income missing discrete clipref frame; run;quit; ``` The chart is ![enter image description here](https://i.stack.imgur.com/Ch4k4.jpg) But when I specify goptions reset=all device=gif; The chart becomes: ![enter image description here](https://i.stack.imgur.com/zZms5.gif) Clearly, there is an extreme value and all the other bars overlap with each other. Notice that even that I put discrete option in my hbar statement, when I put goptions in, it seems not working. Obviously, the purpose here is to just put var1 evenly on x-axis, rather than putting them according to their numeric values. So the first chart is what I want. But I need the goptions in order to output the chart to a gif file. Is there anyone having the similar experience and what would be the solution? Many thanks.
sas gchart hbar bars overlap with each other
CC BY-SA 3.0
null
2011-05-19T10:16:05.630
2011-05-20T07:29:43.873
2011-05-19T23:11:46.153
136,733
136,733
[ "sas" ]
6,057,239
1
6,057,761
null
50
40,905
The picture below (enlarged, so you better see the differences) shows Font differences between dynamically created Edit controls (the upper two examples) and Edit Controls created from the Dialog Editor (the lower example). How can I make the font of my dynamically created CEdit controls looking like the default (the lower example)? ![enter image description here](https://i.stack.imgur.com/xozrM.png) I have created the CEdit Controls like following: ``` obj->CreateEx(WS_EX_CLIENTEDGE, _T("EDIT"), _T(""), WS_CHILD | WS_VISIBLE | WS_TABSTOP, rect.left, rect.top, rect.Width(), rect.Height(), GetSafeHwnd(), reinterpret_cast<HMENU>(mId)); obj->SetFont(&mFont); // mFont was created in the Dialog Constructor // with mFont.CreatePointFont(80, _T("MS Shell Dlg")); ``` Thanks for your help!
Which Font is the default for MFC Dialog Controls?
CC BY-SA 3.0
0
2011-05-19T10:30:32.747
2022-09-30T05:50:55.153
2011-05-19T11:21:20.210
366,904
237,483
[ "windows", "visual-studio", "visual-studio-2008", "winapi", "mfc" ]
6,057,555
1
6,057,652
null
0
54
I am trying to display multiple li's under a ul. But by using the below code I am getting gap above the first li. ![enter image description here](https://i.stack.imgur.com/63XKv.png) Screen shot: The gap I mentioned is shown in red colour. I want to remove it. Can anybody solve it? ![enter image description here](https://i.stack.imgur.com/hhCVC.png)
Design issue in CSS
CC BY-SA 3.0
null
2011-05-19T10:54:54.777
2011-05-19T11:04:29.587
null
null
231,317
[ "html", "css" ]
6,057,620
1
6,057,746
null
0
4,689
Is there any way to vertical align the photos in this case with CSS? I tried add vertical-align, but it doesn't work with div. ![enter image description here](https://i.stack.imgur.com/5TyNY.png) ``` <html> <head> <style type="text/css"> .imageWrapper { margin: 1em; float: left; /* vertical-align: middle; */ } .imageTitle { text-align: center; } .row { float: left; } #albumList { width: 600px; } </style> </head> <body> <div id="albumList"> <div class="row"> <div id="w1" class="imageWrapper"> <img src="1.jpg" width="150px"/> <div class="imageTitle">Title1</div> </div> <div id="w2" class="imageWrapper"> <img src="2.jpg" width="150px"//> <div class="imageTitle">Title1</div> </div> <div id="w3" class="imageWrapper"> <img src="3.jpg" width="150px"//> <div class="imageTitle">Title3</div> </div> </div> <div class="row"> <div id="w4" class="imageWrapper"> <img src="4.jpg" width="150px"/> <div class="imageTitle">Title1</div> </div> <div id="w5" class="imageWrapper"> <img src="5.jpg" width="150px"//> <div class="imageTitle">Title1</div> </div> </div> </div> </body> </html> ``` [THIS IS WHAT I TRIED] I can do it with JQuery but some photos added on the fly and some added on error handler (image_not_available.jpg), so this approach too hard to apply. ``` var maxHeight = 0; var maxID = 'nothing'; $('.imageWrapper').each(function(i){ var height = $(this).height(); if(height > maxHeight) { maxHeight = height maxID = $(this).attr('id'); } }); $('.imageWrapper').each(function(i){ var id = $(this).attr('id'); if(id != maxID) { var minus = maxHeight - $(this).height(); $(this).css('margin-top', minus / 2); } }); ```
Vertical align photos on the same row
CC BY-SA 3.0
null
2011-05-19T11:01:11.653
2017-03-30T17:39:39.307
null
null
238,190
[ "html", "css" ]
6,057,755
1
6,057,816
null
0
292
Suppose I have class hierarchy like the one shown in picture. Suppose I need to include a method `doThis()` that would have different implementation in classes `C` and `D`. But the class `B` need not implement this method. Should I declare the contract in Class `A` and provide an empty implementation in class `B` or have another abstract class `X` which extends `A` and is being extended by `C` and `D`? Thanks ![Sample Class Diagram](https://i.stack.imgur.com/rmntz.png)
Inheritance problem Low level Design approach
CC BY-SA 3.0
null
2011-05-19T11:14:42.390
2011-05-20T12:00:43.230
2011-05-19T11:50:23.510
211,026
211,026
[ "java", "oop", "polymorphism" ]
6,057,753
1
null
null
6
1,097
I have followed the following posts completely: [http://support.appharbor.com/discussions/problems/544-error-with-reference-to-systemdatasqlserverceentity-dll](http://support.appharbor.com/discussions/problems/544-error-with-reference-to-systemdatasqlserverceentity-dll) [Using SQL Server CE 4 on a remote host with MVC 3](https://stackoverflow.com/questions/4762857/using-sql-server-ce-4-on-a-remote-host-with-mvc-3) and I am still receiving the following error: What I have done: Fresh File -> New ASP.NET MVC 3 application. Via NuGet added EFCodeFirst.SqLServerCompact v0.8.8482.1 which added the necessary packages. Locally everything works great. I build/clean/rebuild and commit the entire solution via Git and push to AppHarbor. All pages not touching SQL CE work as expected. When I try and load the page that is talking to SQL CE I see the attached exception: ![enter image description here](https://i.stack.imgur.com/FxvvX.png) Below are my packages installed: ![enter image description here](https://i.stack.imgur.com/Bi8A6.png) Below is what my Bin directory looks like: ![enter image description here](https://i.stack.imgur.com/DcDXJ.png)
SQL CE Deploy - AppHarbor - Unable to load the native components of SQL Server Compact
CC BY-SA 3.0
0
2011-05-19T11:14:30.733
2011-08-11T23:57:27.377
2017-05-23T11:55:16.547
-1
20,446
[ "asp.net-mvc-3", "deployment", "sql-server-ce", "appharbor" ]
6,058,118
1
7,009,211
null
0
154
Problem with response from IIS 7. When user do request for a page the IIS server does not return full static content: js, css, jpg, png. But if I do refresh few times(push F5 or Ctrl-F5) the content loads fully and correctly. So what is the problem? Server: Windows Server 2008 SP1, IIS 7.0.6001.18000 I tried a lot of things to fix it but I can't sort out the problem. The simular problem described here [http://forums.iis.net/t/1164186.aspx](http://forums.iis.net/t/1164186.aspx) , but I did not found solution too. Here is example firebug screenshot: ![fire bug fiddler:](https://i.stack.imgur.com/miZc1.jpg)
Static content does not sends by IIS
CC BY-SA 3.0
null
2011-05-19T11:45:15.353
2011-08-10T10:18:32.857
2011-05-19T12:41:59.550
521,542
521,542
[ "iis", "response" ]
6,058,233
1
null
null
6
7,327
I create a tableview with 20 cells. And when I select first row, it will show checkmark on it. ![enter image description here](https://i.stack.imgur.com/JQm7m.png) But when I scroll tableview, then it not only one checkmark on tableview cell. It also show on another cell. ![enter image description here](https://i.stack.imgur.com/bmIG3.png) What's the problem with this? ``` self.dataAry = [NSArray arrayWithObjects:@"0",@"1",@"2",@"3",@"4",@"5",@"6",@"7",@"8",@"9",@"10",@"11",@"12",@"13",@"14",@"15",@"16",@"17",@"18",@"19",nil]; marks = [NSMutableArray new]; for (int i = 0 ; i < [self.dataAry count]; i++) { [marks addObject:@"NO"]; } - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { static NSString *CellIdentifier = @"Cell"; UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier]; if (cell == nil) { cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease]; } cell.textLabel.text = [dataAry objectAtIndex:indexPath.row]; if ([[marks objectAtIndex:indexPath.row] isEqualToString:@"YES"]) { [cell setAccessoryType:UITableViewCellAccessoryCheckmark]; }else { [cell setAccessoryType:UITableViewCellAccessoryNone]; } // Configure the cell. return cell;} - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{ UITableViewCell *thisCell = [tableView cellForRowAtIndexPath:indexPath]; if ([[tableView cellForRowAtIndexPath:indexPath] accessoryType] == UITableViewCellAccessoryCheckmark){ [[tableView cellForRowAtIndexPath:indexPath] setAccessoryType:UITableViewCellAccessoryNone]; [selectArray removeObject:[self.dataAry objectAtIndex:indexPath.row]]; [marks replaceObjectAtIndex:indexPath.row withObject:@"NO"]; } else { [[tableView cellForRowAtIndexPath:indexPath] setAccessoryType:UITableViewCellAccessoryCheckmark]; [selectArray addObject:[self.dataAry objectAtIndex:indexPath.row]]; [marks replaceObjectAtIndex:indexPath.row withObject:@"YES"]; } } ```
Checkmarks in a UITableView
CC BY-SA 3.0
0
2011-05-19T11:55:08.617
2015-06-23T02:11:32.207
2011-11-22T15:36:53.650
496,830
545,768
[ "iphone", "xcode", "uitableview" ]
6,058,281
1
null
null
5
235
Related [A problem in Mathematica 8 with function declaration](https://stackoverflow.com/questions/6046626/a-problem-in-mathematica-8-with-function-declaration) ``` Clear["Global`*"] model = 4/Sqrt[3] - a1/(x + b1) - a2/(x + b2)^2 - a3/(x + b3)^4; fit = {a1 -> 0.27, a2 -> 0.335, a3 -> -0.347, b1 -> 4.29, b2 -> 0.435, b3 -> 0.712}; functionB1[x_] = model /. fit; functionB2[x_] := model /. fit; ``` The evaluation difference between functionB1 and functionB2 can be revealed by `Trace` command in mma, as below: ``` functionB1[Sqrt[0.2]] // Trace functionB2[Sqrt[0.2]] // Trace ``` I have no question about functionB1. because `functionB2[Sqrt[0.2]]` doesn't even gives a numeric result but gives a function of x `4/Sqrt[3] - 0.335/(0.435 + x)^2 + 0.347/(0.712 + x)^4 - 0.27/( 4.29 + x)`, and then how its plot `Plot[functionB2[Sqrt[x]], {x, 0, 1}]` is possible? I mean when you run `Plot[functionB2[Sqrt[x]], {x, 0, 1}]`, what happens inside mma is: x takes a number, say, 0.2, then 0.2 is finally passed to functionB2, but functionB2 gives a function, not a number. Then how is the following figure generated? ![enter image description here](https://i.stack.imgur.com/Scrrn.gif) And its trace result ( `Plot[functionB2[Sqrt[x]], {x, 0, 1}] // Trace` ) seems very unreadable. I wonder the clear plotting process of functionB2. Can anybody show it? thanks~ :)
about plotting process -- a further question about "A problem in Mathematica 8 with function declaration"
CC BY-SA 3.0
null
2011-05-19T11:59:18.350
2011-05-19T14:25:33.647
2017-05-23T12:13:39.697
-1
755,685
[ "wolfram-mathematica" ]
6,058,741
1
null
null
5
1,502
I have the following setup: - - I use MEF as DI framework to connect various parts of my application.- I have 2 regions:- One (the left one) is populated with a list view (e.g. customers)- One (the right one) is populated with a view containing a tabcontrol with a region which I populated (according to which customer is selected) with another view containin a tab control with a region.The right side result: ![enter image description here](https://i.stack.imgur.com/6fcIC.png) To populate the first level tabcontrol I am listening to the "customer changed event" - (this works great) and when I get receive the event I populate the First Level tab area with Views: ``` Dim lReg As IRegion = Me.mRegionManager.Regions("FirstLevelTabReqion") Dim lViewID As String = CommonDefinitions.Constants.BuildFirstLevelViewName(lUniqueID) Dim lFirstLevelView FirstLevelView = TryCast(lReg.GetView(lRqViewID), FirstLevelView) If lFirstLevelView Is Nothing Then lFirstLevelView = New FirstLevelView() Dim lRegMan1 As IRegionManager = lReg.Add(lFirstLevelView, lViewID, True) lFirstLevelView.SetRegionManager(lRegMan1) ... End If ``` When creating the FirstLevelView I have to throw in a `CompositionInitializer.SatisfyImports` call to make sure the FirstLevelView resolves its ViewModel reference. To get an instance of the EventsAggregator in the SecondLevel ViewModel I use: ``` <ImportingConstructor()> Public Sub New(ByVal iEvAggregator As IEventAggregator) EventAggregator = iEvAggregator EventAggregator.GetEvent(Of DoStuffSecondLevel).Subscribe(AddressOf OnDoStuffSecondLevel, True) End Sub ``` My problem is that the EventAggregator instance I get in the second level view model is different from the EventAggregator instance in the first level so if I publish DoStuffSecondLevel on the first level it will not be caught in the second level. Why do I get 2 different instances of the EventAggregator? What can I do to share the same instance of the EventAggregator across the application? Thanks in advance
Prism:EventAggregator and MEF - 2 different instances of EventAggregator
CC BY-SA 3.0
0
2011-05-19T12:42:09.630
2011-07-06T18:03:48.793
null
null
209,407
[ ".net", "silverlight", "prism", "mef", "eventaggregator" ]
6,058,866
1
6,059,956
null
1
3,195
I've been studying how to use anti-alias in OpenGL. [Here](http://glprogramming.com/red/chapter06.html#name2) is a tutorial I found. The Example 6-5 is a small program that is supposed to demonstrate the anti-alias for polygons. ``` #include <GL/gl.h> #include <GL/glu.h> #include <GL/glut.h> #include <stdlib.h> #include <stdio.h> #include <string.h> GLboolean polySmooth = GL_TRUE; static void init(void) { glCullFace(GL_BACK); glEnable(GL_CULL_FACE); glBlendFunc(GL_SRC_ALPHA_SATURATE, GL_ONE); glClearColor(0.0, 0.0, 0.0, 0.0); } #define NFACE 6 #define NVERT 8 void drawCube(GLdouble x0, GLdouble x1, GLdouble y0, GLdouble y1, GLdouble z0, GLdouble z1) { static GLfloat v[8][3]; static GLfloat c[8][4] = { {0.0, 0.0, 0.0, 1.0}, {1.0, 0.0, 0.0, 1.0}, {0.0, 1.0, 0.0, 1.0}, {1.0, 1.0, 0.0, 1.0}, {0.0, 0.0, 1.0, 1.0}, {1.0, 0.0, 1.0, 1.0}, {0.0, 1.0, 1.0, 1.0}, {1.0, 1.0, 1.0, 1.0} }; /* indices of front, top, left, bottom, right, back faces */ static GLubyte indices[NFACE][4] = { {4, 5, 6, 7}, {2, 3, 7, 6}, {0, 4, 7, 3}, {0, 1, 5, 4}, {1, 5, 6, 2}, {0, 3, 2, 1} }; v[0][0] = v[3][0] = v[4][0] = v[7][0] = x0; v[1][0] = v[2][0] = v[5][0] = v[6][0] = x1; v[0][1] = v[1][1] = v[4][1] = v[5][1] = y0; v[2][1] = v[3][1] = v[6][1] = v[7][1] = y1; v[0][2] = v[1][2] = v[2][2] = v[3][2] = z0; v[4][2] = v[5][2] = v[6][2] = v[7][2] = z1; #ifdef GL_VERSION_1_1 glEnableClientState(GL_VERTEX_ARRAY); glEnableClientState(GL_COLOR_ARRAY); glVertexPointer(3, GL_FLOAT, 0, v); glColorPointer(4, GL_FLOAT, 0, c); glDrawElements(GL_QUADS, NFACE * 4, GL_UNSIGNED_BYTE, indices); glDisableClientState(GL_VERTEX_ARRAY); glDisableClientState(GL_COLOR_ARRAY); #else printf("If this is GL Version 1.0, "); printf("vertex arrays are not supported.\n"); exit(1); #endif } /* Note: polygons must be drawn from front to back * for proper blending. */ void display(void) { if (polySmooth) { glClear(GL_COLOR_BUFFER_BIT); glEnable(GL_BLEND); glEnable(GL_POLYGON_SMOOTH); glDisable(GL_DEPTH_TEST); } else { glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); glDisable(GL_BLEND); glDisable(GL_POLYGON_SMOOTH); glEnable(GL_DEPTH_TEST); } glPushMatrix(); glTranslatef(0.0, 0.0, -8.0); glRotatef(30.0, 1.0, 0.0, 0.0); glRotatef(60.0, 0.0, 1.0, 0.0); drawCube(-0.5, 0.5, -0.5, 0.5, -0.5, 0.5); glPopMatrix(); glFlush(); } void reshape(int w, int h) { glViewport(0, 0, (GLsizei) w, (GLsizei) h); glMatrixMode(GL_PROJECTION); glLoadIdentity(); gluPerspective(30.0, (GLfloat) w / (GLfloat) h, 1.0, 20.0); glMatrixMode(GL_MODELVIEW); glLoadIdentity(); } void keyboard(unsigned char key, int x, int y) { switch (key) { case 't': case 'T': polySmooth = !polySmooth; glutPostRedisplay(); break; case 27: exit(0); /* Escape key */ break; default: break; } } int main(int argc, char **argv) { glutInit(&argc, argv); glutInitDisplayMode(GLUT_SINGLE | GLUT_RGB | GLUT_ALPHA | GLUT_DEPTH); glutInitWindowSize(200, 200); glutCreateWindow(argv[0]); init(); glutReshapeFunc(reshape); glutKeyboardFunc(keyboard); glutDisplayFunc(display); glutMainLoop(); return 0; } ``` I copied the code to my computer (Ubuntu 11), compiled it and get this: ![enter image description here](https://i.stack.imgur.com/7gK5x.png) Reading the code, I think when press the `t` button, the polygons are supposed to be anti-aliased. And this picture is taken after I pressed the `t` button. As far as I can see, I don't think these are anti-aliased polygons, is there something wrong in what I did?
Why OpenGL's anti-alias didn't work?
CC BY-SA 3.0
null
2011-05-19T12:50:31.603
2011-05-19T14:13:43.137
2011-05-19T13:33:33.967
667,027
667,027
[ "opengl" ]
6,059,068
1
6,059,132
null
31
45,323
I want to get rid of the border in my dialog box and make it look absolutly transparent, as if the image is on the top of screen. ![enter image description here](https://i.stack.imgur.com/3ekNQ.png) My dialog xml is - ``` <?xml version="1.0" encoding="utf-8"?> ``` ``` <ImageView android:id="@+id/ImageView01" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_centerHorizontal="true" android:visibility="invisible"/> ```
android dialog transparent
CC BY-SA 3.0
0
2011-05-19T13:04:15.917
2022-05-16T07:52:30.840
null
null
418,366
[ "android" ]
6,059,139
1
6,059,567
null
2
11,886
I have some json-code with has multiple objects in it, as such: ![](https://i.stack.imgur.com/MiWlI.png) These are the values inside the object: ![](https://i.stack.imgur.com/KX04e.png) This is the json-code: ``` [{"pk_records_id":"34","record_artist":"Bouncing Souls","record_title":"How I Spent My Summer Vacation","record_added_date":"2011-05-05 17:36:34","record_category":"punkrock","record_price":"11.00","record_cover_link":"img\/Bouncing Souls-How I Spent My Summer Vacation.jpg","record_amount_sold":null,"record_amount_stock":"400","record_description":"A great follow-up to Hopeless Romantic"},{"pk_records_id":"4","record_artist":"Descendents","record_title":"Everything Sucks","record_added_date":"2011-03-11 00:00:00","record_category":"punkrock","record_price":"12.00","record_cover_link":"img\/descendents_everything_sucks.jpg","record_amount_sold":"3124","record_amount_stock":null,"record_description":null}] ``` And this is the code I try to use, so I would be able to retrieve the values (obviously): ``` success: function(obj_records){ $.each(obj_records, function(index, value) { alert(obj_records.index.pk_records_id); }); } ``` But this doesn't work. How can I retrieve the data? Edit: If I use this code, I get an array for every single character in my json-code. ``` $.each(obj_records, function(index, value) { alert(index + " : " + value); }); ```
loop through json with multiple objects
CC BY-SA 3.0
0
2011-05-19T13:08:47.947
2013-06-03T11:57:59.717
2013-06-03T11:57:59.717
170,765
612,762
[ "javascript", "jquery", "json" ]
6,059,211
1
6,059,663
null
18
2,402
In [this video from Google IO 2009](http://www.google.com/events/io/2009/sessions/GoogleWebToolkitBestPractices.html), the presenter very quickly says that signatures of methods should return concrete types instead of interfaces. From what I heard in the video, this has something to do with the GWT Java-to-Javascript compiler. - - - ![Snippet of code from Google IO presentation showing it's better that your method returns ArrayList than List](https://i.stack.imgur.com/S2sYr.png)
In GWT, why shouldn't a method return an interface?
CC BY-SA 3.0
0
2011-05-19T13:13:46.160
2013-06-19T04:35:27.640
null
null
15,649
[ "gwt" ]
6,059,499
1
6,059,544
null
4
112
How to keep the focus in the `textBox` but the Keyboard Return key presses the Send button? ![enter image description here](https://i.stack.imgur.com/rQS5T.jpg)
C# Winforms: How to make Return press Send?
CC BY-SA 3.0
null
2011-05-19T13:32:51.563
2012-10-20T10:22:40.770
2012-10-20T10:22:21.737
967,315
398,460
[ "c#", "winforms" ]
6,059,576
1
6,060,043
null
1
507
I am placing two `CAGradientLayers` on a `UIButton`, and then changing the layers depending on whether the button is highlighted or not (finger down). The problem is that it takes a fraction of a second for the gradient to change. At first it faded, i fixed that by clearing all animations on the layer. Both gradients are created beforehand, and on touchDown the highlight gradient gets it hidden-variable set to FALSE, which i think should be instant? What have i missed? Is there a perhaps better way to accomplish this? [Code is here](http://pastie.org/private/ejckzlst2qanntox4ejhw): The purpose of the code is to create buttons like the Login button showed here: ![enter image description here](https://i.stack.imgur.com/AZ6sM.png)
Delay when changing gradient on a UIButton
CC BY-SA 3.0
null
2011-05-19T13:38:44.703
2012-10-20T10:06:41.350
2012-10-20T10:05:56.433
967,315
481,983
[ "objective-c", "cocoa-touch", "ios4", "uibutton" ]
6,059,630
1
6,076,083
null
4
1,234
Apologies in advance for the length of this question! I have a data structure from which the following Enity Data Model has been created (tables/fields renamed and simplified for ease of understanding!): ![Entity Model](https://i.stack.imgur.com/KUNAm.png) The `PaymentMethod` / `ProductPaymentMethod` structure exists because a `Customer` can have multiple `PaymentMethods` available but may choose from them which to use per `Product`. The `CustomerReference`, `ProductReference` and `VendorReference` are all generated based on the `CustomerId` so must be updated after the initial Save. The `ProductPaymentMethods` need the `PaymentMethodIds` so must be added after the initial Save. The `ADO.NET Self-Tracking Entity Generator` has been run to generate the self-tracking context and object classes. I have a `CreateCustomer` method in the BLL which generates a new Entity as follows (psuedo-code): ``` Customer newCustomer = new Customer() Product newProduct = new Product() Vendor newVendor = new Vendor() List<Currency> newCurrencies = new List<Currency> { new Currency(), new Currency() } List<Frequency> newFrequencies = new List<Frequency> { new Frequency(), new Frequency() } List<PaymentMethod> newPaymentMethods = new List<PaymentMethod> { new PaymentMethod(), new PaymentMethod() } newProduct.Vendors.Add(newVendor) newProduct.Currencies.Add(newCurrencies) newProduct.Frequencies.Add(newFrequencies) newCustomer.Products.Add(newProduct) newCustomer.PaymentMethods.Add(newPaymentMethods) ``` `newCustomer` is then passed to `CreateCustomer` method in the DAL which does this: ``` context.Customers.AddObject(customer) context.SaveChanges() return customer ``` The return is assigned to a new `Customer` object in the BLL and the references generated from the `CustomerId` and added: ``` savedCustomer.CustomerReference = generatedCustomerReference savedCustomer.Products.First().ProductReference = generatedProductReference savedCustomer.Products.First().Vendors.First().VendorReference = generatedVendorReference ``` The `savedCustomer.PaymentMethod` collection is looped through to create `List<ProductPaymentMethod> productPaymentMethods` using the `PaymentMethodIds`. This is then added: ``` savedCustomer.ProductPaymentMethods.Add(productPaymentMethods) ``` `newCustomer` is then passed to `UpdateCustomer` method in the DAL which does this: ``` context.Customers.ApplyChanges(customer) context.SaveChanges() return customer ``` This is then returned to the Presentation layer This resulted in duplicates of everything that had been created and then updated - I'd end up with 2 x `Customer`, 2 x `Product`, 2 x `Vendor`, 4 x `PaymentMethod`, 4 x `Currency` and 4 x `Frequency` records - `UpdateCustomer` was receiving an entity marked as `Added` So after a bit of research I added the following before calling `UpdateCustomer`: ``` savedCustomer.MarkAsModified() savedCustomer.Products.First().MarkAsModified() savedCustomer.Products.First().Vendors.First().MarkAsModified() ``` This stopped the duplicated `Customer`, `Product` and `Vendor` but I was still getting duplicated `Currency`, `Frequency` and `PaymentMethod` records. The solution I came up with was to loop through each of the collections and mark each of the entites as unchanged before calling `UpdateCustomer`: ``` foreach (currency in Customer.Products.First().Currencies) currency.MarkAsUnchanged() ``` (repeated for `Customer.PaymentMethods` and `Customer.Products.First().Frequencies`) I now get no duplication and all my data is created. Finally, on to my question! I can't help but feel that I am missing something here. Do I really have to check each part of the relationship tree and mark as Modified or UnChanged (nice mixture of terms there Microsoft!) as necessary before each and every update? I thought the term 'Self-Tracking' meant that all that should be handled automatically. Is this the correct way to use EF / STE or is there a better way? DAL project - CustomerModel.edmx, CustomerModel.Context.tt and CustomerDAL.cs Model project - CustomerModel.tt BLL project - CustomerBLL.cs WCF project - CustomerWCF.svc.cs Test project CustomerTest.cs CustomerTest.cs uses Private Accessor to call CustomerWCF.svc.cs CustomerWCF.svc.cs calls CustomerBLL.cs CustomerBLL.cs calls CustomerDAL.cs DAL references Model BLL references DAL and Model Service references BLL and Model Test references Service, BLL and Model Should I be testing against a ServiceReference instead of the PrivateAccessor?
How to stop Self-tracking entity performing Add instead of Update
CC BY-SA 3.0
0
2011-05-19T13:42:20.200
2011-05-20T18:19:30.390
2011-05-20T13:39:55.373
413,501
243,189
[ ".net", "entity-framework", "entity-framework-4", "entity-relationship", "self-tracking-entities" ]
6,059,770
1
6,059,861
null
6
784
In Visual Studio 2008, I can see a combo box containing the members/methods defined in my class at the top of the code window: ![](https://i.stack.imgur.com/NrS2O.png) However, I cannot see this in Visual Studio 2010! Was it removed? Can I get it back?
What happened to the Members/Methods combobox in Visual Studio 2010?
CC BY-SA 3.0
0
2011-05-19T13:53:56.973
2011-05-19T14:00:18.543
2011-05-19T14:00:18.543
366,904
138,627
[ "visual-studio", "visual-studio-2008", "visual-studio-2010" ]
6,059,802
1
6,087,882
null
1
274
i am unable to compile the code using bbwp tool. Take a look at the screenshot and please point-out what i am doing wrong Thanks ![enter image description here](https://i.stack.imgur.com/O4QkQ.png) In the screen-shot 1. WARNING: about element, i know its in config.xml but not confirm what to put in it. 2. ERROR: about jvm.dll well that file exists on the path, i have checked it.
compilation error Black Berry WebWordks SDK
CC BY-SA 3.0
null
2011-05-19T13:55:38.583
2014-01-12T09:48:02.377
2011-05-19T17:49:20.900
295,463
295,463
[ "blackberry-playbook", "blackberry-webworks" ]
6,059,797
1
null
null
6
2,630
I'm having a problem figuring out how to "Sign the ClickOnce manifests" of my application from TFS Build. I've configured my signing page in VS 2010 by checking the "Sign the ClickOnce manifests" checkbox and choosing our code-signing key from a file, as pictured in the below screenshot: ![Signing page in VS 2010](https://i.stack.imgur.com/ay7sv.png) Now, when I publish the application from VS 2010, the manifest appears to be signed successfully: ![security warning showing good certificate](https://i.stack.imgur.com/7y4oG.png) However, when I try to build the application from TFS Build, it doesn't appear to attempt to sign the manifest. In fact, there's not even an error message indicating that something failed. I tried to set up the file so that my build server is aware of the certificate and that I wish to sign my manifests, but I wasn't sure how to do that. I've tried the following: ``` <CustomPropertiesForBuild>SignManifests=true;ManifestCertificateThumbprint=<thumbprint goes here></CustomPropertiesForBuild> ``` But it doesn't seem to make any difference. (No errors are generated, either). I am interested in strong naming my assemblies; just [signing my code](http://msdn.microsoft.com/en-us/library/ms537364%28v=vs.85%29.aspx). Does anyone know how to do this? Has anyone successfully deployed ClickOnce apps from TFS Build?
Signing a ClickOnce manifest through TFS Build 2008?
CC BY-SA 3.0
0
2011-05-19T13:55:24.927
2011-12-14T22:32:42.153
2011-05-19T18:23:51.570
2,273
2,273
[ "visual-studio-2010", "code-signing", "tfsbuild" ]
6,059,894
1
6,060,658
null
19
74,348
I need draw rectangle in canvas. I know how to draw. But I did not get to do so would draw on a 360-degree Example. blue, lilac, green they are one and the same rectangle, I changed the color for example Red point is start position rectangle. ![enter image description here](https://i.stack.imgur.com/z2pmh.jpg) My actions: LeftMouseDown in x=50;y=50 (press) MoveMouse to 100;100 - now it works MoveMouse to 30;150 or MoveMouse to 10;10 - Now I can not do this, but I need it
How Draw rectangle in WPF?
CC BY-SA 3.0
0
2011-05-19T14:02:10.680
2021-01-18T08:47:18.417
2011-05-19T14:41:21.837
450,466
450,466
[ "c#", "wpf" ]
6,060,462
1
6,061,125
null
2
1,072
I'm trying to adjust the standard Redmine theme to solve a problem with wrapping of long project title breadcrumbs in the page header. The problem makes heavily nested project titles show up like this: ![Redmine subprojects with long titles](https://i.stack.imgur.com/VLnM5.png) I've found a couple of [tickets](http://www.redmine.org/issues/7848) and [board posts](http://www.redmine.org/boards/2/topics/22454?r=22459) about similar issues, but nobody with a proper resolution for it. What I'm trying to do is keep `#main-menu` at the bottom of `#header`, and to have `#header` expand when the text wraps. Just making `#header` larger than the initial fixed `height` works, but looks a bit odd for short titles. Is there a nice way of doing this without completely restyling the header? (that's my fallback idea). Ideally I'd also like to do it without just removing items from the list. I think the layout on [the official Redmine site](http://www.redmine.org) uses the same CSS and HTML for reference, but the relevant bits are: ### HTML ``` <div id="header"> <div id="quick-search"></div> <h1> <a href="" class="root">Test Project</a> » … » <a class="ancestor">Really long project title 2</a> » <a class="ancestor">Really long project title 3</a> » Really project title 4 </h1> <div id="main-menu"> <ul> <li>...</li> ... </ul> </div> </div> ``` ### CSS ``` #header { height: 5.3em; margin: 0; padding: 4px 8px 0px 6px; position: relative; } #main-menu { position: absolute; bottom: 0px; left: 6px; margin-right: -500px; } ```
Expanding header for long project titles in Redmine's default theme
CC BY-SA 3.0
null
2011-05-19T14:45:36.000
2011-05-19T15:31:36.117
null
null
480,474
[ "css", "redmine" ]
6,060,525
1
6,587,177
null
8
4,486
Every sample code I've ever found for drawing rounded rectangles using GDI+ goes something like this (lifted and slightly modified from BobPowell.net): ``` Private Sub Panel1_Paint(ByVal sender As Object, ByVal e As PaintEventArgs) Handles Panel1.Paint e.Graphics.Clear(SystemColors.Window) e.Graphics.SmoothingMode = SmoothingMode.None Call DrawRoundRect(e.Graphics, Pens.Red, 10, 10, 48, 24, 6) End Sub Public Sub DrawRoundRect(ByVal g As Graphics, ByVal p As Pen, ByVal x As Single, ByVal y As Single, ByVal width As Single, ByVal height As Single, ByVal radius As Single) Using gp As New GraphicsPath() gp.StartFigure() gp.AddArc(x + width - radius, y, radius * 2, radius * 2, 270, 90) gp.AddArc(x + width - radius, y + height - radius, radius * 2, radius * 2, 0, 90) gp.AddArc(x, y + height - radius, radius * 2, radius * 2, 90, 90) gp.AddArc(x, y, radius * 2, radius * 2, 180, 90) gp.CloseFigure() g.DrawPath(p, gp) End Using End Sub ``` This produces a rounded rectangle where only the top left corner is accurate. AntiAliasing has to be turned off because it is going through a remote desktop connection, and I can't depend on it being available. Besides, I am looking for a crisp rounded rectangle. ![enter image description here](https://i.stack.imgur.com/OA4Z2.png) I've tried resizing the other corners and changing the pen alignments, but nothing seems to produce a simple, accurate rounded rectangle. Is there a way to draw a better rounded rectangle than this in good old winforms?
Rounded Rectangle Not Accurate
CC BY-SA 3.0
0
2011-05-19T14:49:30.557
2011-07-20T22:01:50.690
2011-07-06T16:35:23.247
719,186
719,186
[ "vb.net", "winforms", "rounded-corners" ]
6,060,578
1
6,060,800
null
2
1,948
I'm using the CoreGraphcis to create a text texture. Unfortunately the text renders like this (Text color is same as background to demonstrate the strange border). ![enter image description here](https://i.stack.imgur.com/O5mZP.png) I've tried playing with stroke colors and borders to I think it is do to OpenGLES 2.0 and not CoreGraphics. ``` // Create default framebuffer object. The backing will be allocated for the current layer in -resizeFromLayer glGenFramebuffers(1, &defaultFramebuffer); glGenRenderbuffers(1, &colorRenderbuffer); glBindFramebuffer(GL_FRAMEBUFFER, defaultFramebuffer); glBindRenderbuffer(GL_RENDERBUFFER, colorRenderbuffer); glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_RENDERBUFFER, colorRenderbuffer); glActiveTexture(GL_TEXTURE0); glUniform1i(uniforms[UNIFORM_SAMPLER], 0); // Set up the texture state. glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); glPixelStorei(GL_UNPACK_ALIGNMENT, 1); texture = [[FW2Texture alloc] initWithString:@"Text"]; glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, texture.width, texture.height, 0, GL_RGBA, GL_UNSIGNED_BYTE, texture.imageData); ``` And the core graphics bit: ``` -(id)initWithString:(NSString*)str { if((self = [super init])) { UIFont *font = [UIFont systemFontOfSize:17]; CGSize size = [str sizeWithFont:font]; NSInteger i; width = size.width; if((width != 1) && (((int)width) & (((int)width) - 1))) { i = 1; while(i < width) i *= 2; width = i; } height = size.height; if((height != 1) && (((int)height) & (((int)height) - 1))) { i = 1; while(i < height) i *= 2; height = i; } NSInteger BitsPerComponent = 8; int bpp = BitsPerComponent / 2; int byteCount = width * height * bpp; uint8_t *data = (uint8_t*) calloc(byteCount, 1); CGColorSpaceRef colorSpace = CGColorSpaceCreateDeviceRGB(); CGBitmapInfo bitmapInfo = kCGImageAlphaPremultipliedLast | kCGBitmapByteOrder32Big; CGContextRef context = CGBitmapContextCreate(data, width, height, BitsPerComponent, bpp * width, colorSpace, bitmapInfo); CGColorSpaceRelease(colorSpace); CGContextSetGrayFillColor(context, 0.5f, 1.0f); CGContextTranslateCTM(context, 0.0f, height); CGContextScaleCTM(context, 1.0f, -1.0f); UIGraphicsPushContext(context); [str drawInRect:CGRectMake(0, 0, size.width, size.height) withFont:font lineBreakMode:UILineBreakModeWordWrap alignment:UITextAlignmentCenter]; UIGraphicsPopContext(); CGContextRelease(context); imageData = (uint8_t*)[[NSData dataWithBytesNoCopy:data length:byteCount freeWhenDone:YES] bytes]; } return self; ``` }
iPhone OpenGLES 2.0 Text Texture w/ strange border (not stroke) issue
CC BY-SA 3.0
null
2011-05-19T14:53:11.377
2011-05-19T15:09:44.937
null
null
269,699
[ "iphone", "objective-c", "opengl-es", "opengl-es-2.0" ]
6,060,616
1
6,216,122
null
2
716
I'm having troubles trying to style my tabs in android. I want to make them look exactly the same as whats in the open source android contacts list (see [https://android.googlesource.com/platform/packages/apps/Contacts](https://android.googlesource.com/platform/packages/apps/Contacts) ). Problem is that when they display on the screen it looks a bit different to the contacts app. ![my tabs](https://i.stack.imgur.com/d0uiE.jpg) When it should look like this: ![enter image description here](https://i.stack.imgur.com/m4Ogc.jpg) Notice how the background colors are a little bit different and the text colors are different. Not sure why this is the case as its basically the same code and icons. My tab layout code is the following: ``` <?xml version="1.0" encoding="utf-8"?> <TabHost xmlns:android="http://schemas.android.com/apk/res/android" android:id="@android:id/tabhost" android:layout_width="fill_parent" android:layout_height="fill_parent"> <LinearLayout android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent" android:padding="0dp"> <TabWidget android:id="@android:id/tabs" android:layout_width="fill_parent" android:layout_height="wrap_content" /> <FrameLayout android:id="@android:id/tabcontent" android:layout_width="fill_parent" android:layout_height="fill_parent" android:padding="0dp" /> </LinearLayout> </TabHost> ``` Which doesn't contain anything special there.. and the TabActivity is as follows: ``` public class TabbedActivity extends TabActivity implements TabHost.OnTabChangeListener { private TabHost tabHost; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); final Intent intent = getIntent(); requestWindowFeature(Window.FEATURE_NO_TITLE); setContentView(R.layout.tab); tabHost = getTabHost(); tabHost.setOnTabChangedListener(this); setupLatestTab(); setupSavedTab(); tabHost.setCurrentTab(0); } private void setupLatestTab() { Intent intent = new Intent().setClass(this, ResultsActivity.class); tabHost.addTab(tabHost .newTabSpec("latest") .setIndicator("Latest", getResources().getDrawable(R.drawable.ic_tab_recent)) .setContent(intent)); } private void setupSavedTab() { Intent intent = new Intent().setClass(this, ResultsActivity.class); tabHost.addTab(tabHost .newTabSpec("saved") .setIndicator("Saved", getResources().getDrawable(R.drawable.ic_tab_starred)) .setContent(intent)); } @Override public void onTabChanged(String tabId) { // Because we're using Activities as our tab children, we trigger // onWindowFocusChanged() to let them know when they're active. This may // seem to duplicate the purpose of onResume(), but it's needed because // onResume() can't reliably check if a keyguard is active. Activity activity = getLocalActivityManager().getActivity(tabId); if (activity != null) { activity.onWindowFocusChanged(true); } } } ``` I am using the same images from the drawable folders too. I know i can set the background of tabs manually by doing something like this in the tabactivity ``` tabHost.getTabWidget().getChildAt(index).setBackgroundColor(Color.parseColor("#ff202020")); ``` But the contacts app isn't doing this sort of thing anywhere (most of the top tab code is in DialtactsActivity), so just want to do what the open source app is doing when displaying tabs - i'm not sure how and why the contacts application tabs look much better when im basically using the same code and resources. I guess im just missing something trivial??
Styling tabs in android like the google open source contacts
CC BY-SA 3.0
0
2011-05-19T14:56:05.630
2017-08-03T09:32:13.393
2017-08-03T09:32:13.393
1,000,551
605,213
[ "java", "android", "android-activity", "android-tabs" ]
6,060,700
1
6,060,807
null
0
521
![enter image description here](https://i.stack.imgur.com/OFcNa.png) I saw table view of an app and would like to replicate this style, but have no idea of how to do this. Could you guide me how to make tableview show only cell with content like a UITalbeViewStyleGrouped, but with cell style like UITableViewStylePlain. About custom footer cell like this I'm thinking of if statement in ``` - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath; ``` to use special xib for the footer. Is this the right idea ?
How to do this kind of custom UITableView
CC BY-SA 3.0
0
2011-05-19T15:02:47.000
2011-05-19T15:10:02.130
null
null
147,564
[ "objective-c", "ios", "uitableview" ]
6,060,709
1
6,060,859
null
2
528
The app I'm developing displays a large-ish (about 1M vertices), static 2D image. Due to memory limitation issues I have been filling the VBOs with new data every time the user scrolls or zooms, giving the impression that the entire image "exists", even though it doesn't. ![enter image description here](https://i.stack.imgur.com/hYWFY.png) There are two problems with this approach: 1) although the responsiveness is "good enough", it would be better if I could make the scrolling zooming faster and less choppy. 2) I've been sticking to the 64k vertex limit that can be done in a single draw, which puts a hard limit of how much of the image can be shown at a time. It would be nice to be able to see more of the image, or even all of it at the same time. Although the performance at the moment is, again, good enough because we are at the prototype stage and have set up the data to work with the limitations, to go to the product level we will have to get rid of this limitation. Recently I discovered that by using the "android:largeHeap" option I can get 256 MB of heap space on a Motorola Xoom, which means that I can store the entire image in VBOs. In my ideal world I would simply pass the the OpenGL engine the VBOs and either tell it that the camera has moved, or use glScale/glTranslate to zoom/scroll. My questions are these: am I on the right track? Should I always "draw" all of the chunks and let OpenGl figure out which will actually be seen, or figure out which chunks are visible myself? Any difference between using something like gluLookAt and glScale/glTranslate? I don't care about aspect ratio distortion (the image is mathematically generated, not a photo), it is much wider than it is high, and in the future the number of vertexes could get much, much larger (e.g. 60M). Thanks for your time. ![enter image description here](https://i.stack.imgur.com/Ii2UW.png)
2D OpenGL ES architecture
CC BY-SA 3.0
null
2011-05-19T15:03:13.817
2011-05-19T15:13:22.717
null
null
724,157
[ "java", "android", "opengl-es" ]
6,061,019
1
6,073,215
null
1
1,324
I am developing the windows based application in which i need to bind the comboboxcolumns inside the datagridview with values from the [Attendance_type] table. And the datasource of this datagridview will be from [Employees table]. I am currently doing this using this code. ``` dgvEmployee.Columns.Clear(); dgvEmployee.AutoGenerateColumns = false; DataGridViewTextBoxColumn branchcolumn = new DataGridViewTextBoxColumn(); branchcolumn.DataPropertyName = "Name"; branchcolumn.HeaderText = "Employee Name"; branchcolumn.Name = "Name"; branchcolumn.Width = 200; dgvEmployee.Columns.Add(branchcolumn); var metaattend = from Metaatt in dataDC.Metaattend where Metaatt.Status == true orderby Metaatt.Metaname select Metaatt; List<Metaattend> obj_ma = new List<Metaattend>(); obj_ma = metaattend.ToList(); var Empvar = from Emp in dataDC.Employees join dept in dataDC.Dept on Emp.Deptid equals dept.Id join branch in dataDC.Branch on Emp.Branchid equals branch.Id where Emp.Status == true & Emp.Name.Contains(txtbranch.Text) & (Emp.Deptid == Convert.ToInt64(cmbDept.SelectedValue) | cmbDept.SelectedValue.ToString() == "0") & (Emp.Branchid == Convert.ToInt64(cmbBranch.SelectedValue) | cmbBranch.SelectedValue.ToString() == "0") orderby Emp.Name select new { Emp.Id, Emp.Name }; DataTable dt_employee = new DataTable(); using (clsGeneral obj_gen = new clsGeneral()) { dt_employee = obj_gen.LINQToDataTable(Empvar); } dgvEmployee.DataSource = dt_employee; string[] datemonth = cmbMonth.Text.Split('-'); int i = DateTime.DaysInMonth(Convert.ToInt32(datemonth[1]), GetMonthNo(datemonth[0])); for (int j = 0; j < i; j++) { DataGridViewComboBoxColumn daycomboColumn = new DataGridViewComboBoxColumn(); daycomboColumn.HeaderText = (j + 1).ToString(); daycomboColumn.Width = 50; daycomboColumn.DataSource = obj_ma; daycomboColumn.DisplayMember = "Metaname"; daycomboColumn.ValueMember = "Id"; dgvEmployee.Columns.Add(daycomboColumn); } ``` Using this the code is executed successfully, but the form does not shows me any record in the column for combobox inside the datagridview. This is the view of my form, when i click on the comboboxes then also it does not shows me anything. ![enter image description here](https://i.stack.imgur.com/VgRkp.png) I have seen many post about this but none was helpfull for me. As that all shows me the same thing that i have done. Please help be with about where i have done the mistake. Thanks
Problem binding the values in combobox inside the datagridview
CC BY-SA 3.0
null
2011-05-19T15:24:24.073
2011-05-20T14:14:40.380
null
null
580,878
[ "c#", "windows", "datagridview" ]
6,061,252
1
6,061,511
null
0
247
i write this code ``` - (void)requestFinished:(ASIHTTPRequest *)request { // Use when fetching text data NSString *responseString = [request responseString]; dataToDisplay = [[NSMutableArray alloc] init]; //NSString *myJSON = [[NSString alloc] initWithString:responseString]; NSDictionary *json = [responseString JSONValue]; Status *statut = [[Status alloc] init]; statut.flyNumber = [json objectForKey:@"flynumber"]; statut.ftatuts = [json objectForKey:@"fstatuts"]; statut.escDepart = [json objectForKey:@"escdepart"]; statut.escArrival = [json objectForKey:@"escarrival"]; statut.proArrival = [json objectForKey:@"proarrival"]; statut.proDepart = [json objectForKey:@"prodepart"]; statut.estDepart = [json objectForKey:@"estdepart"]; statut.estArrival = [json objectForKey:@"estarrival"]; statut.realDepart = [json objectForKey:@"realdepart"]; statut.realArrival = [json objectForKey:@"realarrived"]; [dataToDisplay addObject:statut]; NSLog(@"ok"); } - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView { // Return the number of sections. return 1; } - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { // Return the number of rows in the section. return [dataToDisplay count]; } - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { static NSString *CellIdentifier = @"Cell"; UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier]; if (cell == nil) { cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease]; } // Configure the cell... NSLog(@"1 ok"); Status *statut2 = [dataToDisplay objectAtIndex:indexPath.row]; NSLog(@"2 ok"); cell.textLabel.text = [NSString stringWithFormat:@"%@ - %@",statut2.flyNumber,statut2.ftatuts]; NSLog(@"3 ok"); return cell; } ``` The problem that the table still empty . And i don't have "ok 1" message in the console . This is my controller .h ``` #import <UIKit/UIKit.h> #import "ASIHTTPRequest.h" #import "JSON.h" #import "Status.h" @interface StatusTableViewController : UITableViewController { NSString * Flynumber; NSMutableArray *dataToDisplay; } @property(retain,nonatomic) IBOutlet NSString * Flynumber; @end ``` i added `[self.tableView reloadData];` and it work . ![enter image description here](https://i.stack.imgur.com/ALKzD.png) But how to put each result on a line (cell) ?
Problem to put data in UITableView
CC BY-SA 3.0
null
2011-05-19T15:41:10.787
2011-05-19T16:11:10.340
2011-05-19T16:11:10.340
760,095
760,095
[ "iphone", "objective-c" ]
6,061,312
1
null
null
1
2,400
I recently started using Jenkins to ease application Development. I have an Asp.net website that I am trying to deploy using it. Details about the build: - - - The compile runs fine, no errors, no warnings. When I copy the web application from the PrecompiledWeb folder to the test server, the application crashes when I perform certain operations. The exception I get is the following: > ``` Exception type: FileLoadException Exception message: Could not load file or assembly 'Oracle.DataAccess, Version=2.111.7.20, Culture=neutral, PublicKeyToken=89b483f429c47342' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040) ``` However, if I copy the web application from the website's folder, everything works fine. All non-Microsoft assemblies are stored in a folder called Assemblies at the solution level. All references in the projects point to assemblies that foler. Is there a way I can find where the conflict comes from so I can use the PrecompiledWeb folder for the deployment. It seems that I have more than one assembly referenced in my project, but I don't know how to get only one. I checked in the Object Browser, with My solution selected and I get the following ![Both assemblies in object browser](https://i.stack.imgur.com/oqIPr.png) It seems that the WebSite project is the one causing trouble (When I remove it from the solution, only the right assembly is shown in the Object Browser).
How to get an ASP.NET WebSite to use the right assembly (File reference instead of path/GAC)
CC BY-SA 3.0
null
2011-05-19T15:45:44.793
2011-05-19T22:43:41.780
2011-05-19T20:47:29.460
67,520
67,520
[ ".net", "msbuild", "reference", "jenkins" ]
6,061,438
1
null
null
3
5,882
I am current building an application that graphs streaming data. I can receive and add data points to the chart just fine, but after every point is added, the graph alters its scale to include all the data points automatically(ie. the points get closer together as more are added). How can I turn this off? Ideally, I would like the graph to simply scroll along the x axis rather than setting the scale each time a point is added. What is the best way to do this? Here is the code I use for adding a data point as data arrives on the serial port: ``` chart1.Series["Series1"].Points.AddY(parsed); ``` The graph is just a default fast line plot. Here are screen captures of the graph plotting data over time. As you can see, it just compresses the graph over time rather than just leaving the scale alone and scrolling to the right. ![After a few seconds](https://i.stack.imgur.com/epdMM.png) ![After a few more seconds](https://i.stack.imgur.com/nln0N.png)
.Net Chart Control Auto Scroll/Disable Auto Scale
CC BY-SA 3.0
0
2011-05-19T15:58:06.970
2013-12-31T08:56:12.483
null
null
362,685
[ ".net", "scroll", "charts" ]
6,061,562
1
6,061,815
null
3
9,102
Before I used to open the inspector window ( Segmented Control Attributes) like: ![enter image description here](https://i.stack.imgur.com/3kLRd.png) Now that I upgrated to Xcode 4.0.2 I have this: ![enter image description here](https://i.stack.imgur.com/VNUcs.png) How could I open the Inspector window in Xcode 4.0.2?
Where is the inspector window in Xcode 4.0.2
CC BY-SA 3.0
null
2011-05-19T16:08:21.047
2011-05-19T16:30:39.160
null
null
637,142
[ "xcode", "ios4" ]
6,061,880
1
6,062,196
null
18
18,300
How do I create circle text (text in a circle shape) with canvas? ![Like this](https://i.stack.imgur.com/GlQMI.png)
HTML5 Canvas Circle Text
CC BY-SA 3.0
0
2011-05-19T16:36:43.813
2020-01-29T10:30:24.437
null
null
502,236
[ "javascript", "html", "canvas" ]
6,061,928
1
15,599,152
null
0
10,966
I'm running win7 64bit so I installed the (psqlodbc_09_00_0300-x64.zip) msi [64bit drivers for postgres odbc](http://www.postgresql.org/ftp/odbc/versions/msi/). i also tried launching the odbc manager from the following location "%systemdrive%\Windows\SysWoW64\odbcad32.exe" But i still don't see any postgres drivers i can use. ![enter image description here](https://i.stack.imgur.com/thsb7.png)
PostgreSQL ODBC Drivers on Windows 7 not showing up
CC BY-SA 4.0
0
2011-05-19T16:39:47.387
2018-10-07T14:14:42.790
2018-10-07T14:14:42.790
3,984,221
442,580
[ "postgresql", "odbc" ]
6,061,957
1
null
null
67
173,068
I am creating a backup application where c# scans a directory. Before I use to have something like this in order to get all the files and subfiles in a directory: ``` DirectoryInfo di = new DirectoryInfo("A:\\"); var directories= di.GetFiles("*", SearchOption.AllDirectories); foreach (FileInfo d in directories) { //Add files to a list so that later they can be compared to see if each file // needs to be copid or not } ``` The only problem with that is that sometimes a file could not be accessed and I get several errors. an example of an error that I get is:![error](https://i.stack.imgur.com/5YH4D.png) As a result I created a recursive method that will scan all files in the current directory. If there where directories in that directory then the method will be called again passing that directory. The nice thing about this method is that I could place the files inside a try catch block giving me the option to add those files to a List if there where no errors and adding the directory to another list if I had errors. ``` try { files = di.GetFiles(searchPattern, SearchOption.TopDirectoryOnly); } catch { //info of this folder was not able to get lstFilesErrors.Add(sDir(di)); return; } ``` So this method works great the only problem is that when I scan a large directory it takes to much times. How could I speed up this process? My actual method is this in case you need it. ``` private void startScan(DirectoryInfo di) { //lstFilesErrors is a list of MyFile objects // I created that class because I wanted to store more specific information // about a file such as its comparePath name and other properties that I need // in order to compare it with another list // lstFiles is a list of MyFile objects that store all the files // that are contained in path that I want to scan FileInfo[] files = null; DirectoryInfo[] directories = null; string searchPattern = "*.*"; try { files = di.GetFiles(searchPattern, SearchOption.TopDirectoryOnly); } catch { //info of this folder was not able to get lstFilesErrors.Add(sDir(di)); return; } // if there are files in the directory then add those files to the list if (files != null) { foreach (FileInfo f in files) { lstFiles.Add(sFile(f)); } } try { directories = di.GetDirectories(searchPattern, SearchOption.TopDirectoryOnly); } catch { lstFilesErrors.Add(sDir(di)); return; } // if that directory has more directories then add them to the list then // execute this function if (directories != null) foreach (DirectoryInfo d in directories) { FileInfo[] subFiles = null; DirectoryInfo[] subDir = null; bool isThereAnError = false; try { subFiles = d.GetFiles(); subDir = d.GetDirectories(); } catch { isThereAnError = true; } if (isThereAnError) lstFilesErrors.Add(sDir(d)); else { lstFiles.Add(sDir(d)); startScan(d); } } } ``` Ant the problem if I try to handle the exception with something like: ``` DirectoryInfo di = new DirectoryInfo("A:\\"); FileInfo[] directories = null; try { directories = di.GetFiles("*", SearchOption.AllDirectories); } catch (UnauthorizedAccessException e) { Console.WriteLine("There was an error with UnauthorizedAccessException"); } catch { Console.WriteLine("There was antother error"); } ``` Is that if an exception occurs then I get no files.
Get all files and directories in specific path fast
CC BY-SA 3.0
0
2011-05-19T16:41:50.397
2016-02-19T03:54:02.100
2011-05-19T16:59:41.503
637,142
637,142
[ "c#", "performance", "fileinfo" ]
6,062,074
1
6,064,914
null
2
382
I generate Entity Data Model in Visual studio from the database. However, I noticed that it does not generate neither relationships nor navigation properties from some foreign keys. It occurs when the foreign key contsraints are defined with the disabled option `Enforce Foreign Key Constraint`, like in the following exhibit (from SSMS). Is there any way to deal with this? Unfortunately I cannot alter my database schema. ![enter image description here](https://i.stack.imgur.com/LpBYT.jpg)
Foreign key contraints interpretation problem
CC BY-SA 3.0
null
2011-05-19T16:52:59.843
2011-05-19T21:09:11.067
2011-05-19T21:09:11.067
413,501
695,212
[ "c#", ".net", "entity-framework", "sql-server-2008", "entity-relationship" ]
6,062,223
1
6,065,833
null
1
332
I work on a .NET solution and I want to download source code and binaries from TeamCity. This is why I configured build artifacts. My configuration of the artifacts paths ``` src\app\Debug\* => debug src\**\* => source ``` ![enter image description here](https://i.stack.imgur.com/sLwA5.png) So far so good. But I want to skip some folders in the artifact, for example in the source artifact I want to skip Are there any easy solution for that? Many thanks! P.S. Once this question sorted I will zip the artifacts
How to skip binary files in artifacts configuration in TeamCity
CC BY-SA 3.0
null
2011-05-19T17:04:21.873
2011-05-19T23:09:00.357
null
null
706,456
[ ".net", "continuous-integration", "build-automation", "teamcity", "artifacts" ]
6,062,452
1
null
null
0
188
I have a question about GridView. In my code, I have a HyperLinkField like below: ``` <asp:HyperLinkField DataTextField="DocumentAlbum.Name" HeaderText="Nama Album" SortExpression="Album" DataNavigateUrlFields="AlbumID" DataNavigateUrlFormatString="~/Extras/UploadFile.aspx?DocumentAlbumID={0}" Target="_blank" /> ``` Everything works fine except for 1 thing. If you see from the picture, Document has a relation with DocumentAlbum where Document's AlbumID is taken from DocumentAlbum's ID. My goal is to show DocumentAlbum's name in the HyperLinkFieled. That is why I use `DataTextField="DocumentAlbum.Name"` `instead of DataTextField="AlbumID"`. Apparently, this does not work. Do you guys know how can I retrieve the album's name instead of ID? Thank you soooooooooo much in advance. This problem has been bugging me for a while. ![Document and Document Album](https://i.stack.imgur.com/aR3rp.png)
How to access SQL Relationship/Parent/Foreign-Keys in GridView's HyperLinkField?
CC BY-SA 3.0
null
2011-05-19T17:24:33.970
2012-05-12T21:03:00.780
2012-05-12T21:03:00.780
709,626
448,732
[ "sql", "gridview", "hyperlink", "foreign-keys", "relationship" ]