Id
int64 1.68k
75.6M
| PostTypeId
int64 1
2
| AcceptedAnswerId
int64 1.7k
75.6M
⌀ | ParentId
int64 1.68k
75.6M
⌀ | Score
int64 -60
3.16k
| ViewCount
int64 8
2.68M
⌀ | Body
stringlengths 1
41.1k
| Title
stringlengths 14
150
⌀ | ContentLicense
stringclasses 3
values | FavoriteCount
int64 0
1
⌀ | CreationDate
stringlengths 23
23
| LastActivityDate
stringlengths 23
23
| LastEditDate
stringlengths 23
23
⌀ | LastEditorUserId
int64 -1
21.3M
⌀ | OwnerUserId
int64 1
21.3M
⌀ | Tags
list |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
4,375,831 | 1 | null | null | 2 | 2,738 | I have done an MS SQL Query in excel.
I have added extra colums in the excel sheet which I want to enter manual
data in.
When I refresh the data, these manually inputted columns become misaligned
to the imported data they refer to.
Is there any around this happening.
I have tried to link the imported data sheet to a manual data sheet via
`vlookup` but this isn't working as there are no unique fields to link together.
Please help!
Thanks
Excel version is 2010.
MS SQL version is 2005.
There is no unique data.
Because excel firstly looks like this.

when we entered a new order in to database Excel looks like this

| Manual Entered Data On Excel Ms Query Is Misaligned After Refresh | CC BY-SA 3.0 | 0 | 2010-12-07T10:51:36.367 | 2019-09-13T12:30:33.090 | 2016-06-14T12:08:27.597 | 1,771,479 | 533,548 | [
"sql-server",
"excel",
"refresh"
] |
4,375,873 | 1 | 4,379,019 | null | 1 | 679 | Can i develop widgets on gwt for html5 web site? And if yes, what do you think about such compilation of technologies?

| HTML5 website widgets on GWT? | CC BY-SA 2.5 | null | 2010-12-07T10:55:35.650 | 2011-02-15T15:37:55.213 | null | null | 352,555 | [
"gwt",
"html",
"widget"
] |
4,375,900 | 1 | 16,054,978 | null | 5 | 3,228 | How to draw an [image histogram](http://en.wikipedia.org/wiki/Image_histogram) of a UIImage on iPhone programmatically? e.g.:

Thanks!
| How to draw a histogram of a UIImage programmatically? | CC BY-SA 4.0 | 0 | 2010-12-07T10:59:01.450 | 2019-02-16T12:27:38.617 | 2019-02-16T12:27:38.617 | 846,275 | 88,597 | [
"iphone",
"objective-c",
"cocoa-touch",
"image-processing"
] |
4,376,393 | 1 | null | null | 6 | 8,553 | I'm trying to get `NSPopUpButton` to render like a standard `NSButton` with only an image set, but not having any luck.
Much like the "+" button in Mail.app:


I assume they did this with `NSPopUpButton`. The obvious thing I've tried is:
```
NSMenuItem *imageItem = [[[NSMenuItem alloc] init] autorelease];
[imageItem setImage:[NSImage imageNamed:NSImageNameAddTemplate]];
[[popUpButton cell] setUsesItemFromMenu:NO];
[[popUpButton cell] setMenuItem:imageItem];
[[popUpButton cell] setImagePosition:NSImageOnly];
```
This doesn't show the image however, instead it just shows a pair of arrows (I suspect they're drawn over where the image would be). Calling `[popUpButton setImage:...]` also does nothing.
Is there a documented way to do this, or does it come down to some custom subclassing?
| How can I create a NSPopUpButton that uses a fixed Image, and no arrows? | CC BY-SA 2.5 | 0 | 2010-12-07T12:07:35.727 | 2016-11-08T11:39:01.667 | null | null | 322,122 | [
"objective-c",
"cocoa",
"macos",
"nspopupbutton"
] |
4,376,636 | 1 | null | null | 3 | 4,344 | Edit: Actually this is not unexpected behaviour, but I still need a solution.
`findpeaks compares each element of data to its neighboring values.`
I have data which contains peaks which I detect with the function [findpeaks](http://www.mathworks.com/help/toolbox/signal/findpeaks.html) from the Signal Processing Toolbox. Sometimes the function seems not to detect the peaks properly, when I have the same value twice next to each other. This occurs very rarly in my data, but here is a sample to illustrate my problem:
```
>> values
values =
-0.0324
-0.0371
-0.0393
-0.0387
-0.0331
-0.0280
-0.0216
-0.0134
-0.0011
0.0098
0.0217
0.0352
0.0467
0.0548
0.0639
0.0740
0.0813
0.0858 <-- here should be another peak
0.0858 <--
0.0812
0.0719
0.0600
0.0473
0.0353
0.0239
0.0151
0.0083
0.0034
-0.0001
-0.0025
-0.0043
-0.0057
-0.0048
-0.0038
-0.0026
0.0007
0.0043
0.0062
0.0083
0.0106
0.0111
0.0116
0.0102
0.0089
0.0057
0.0025
-0.0025
-0.0056
```
Now the findpeaks function only finds one peak:
```
>> [pks loc] = findpeaks(values)
pks =
0.0116
loc =
42
```
If I plot the data, it becomes obvious that findpeaks misses one of the peaks at the location `18/19` because they both have the value `0.08579`.

What is the best way to find those missing peaks?
| Unexpected behaviour of function findpeaks in MATLAB's Signal Processing Toolbox | CC BY-SA 2.5 | null | 2010-12-07T12:36:11.277 | 2019-02-11T21:03:00.707 | 2010-12-07T13:07:49.477 | 74,660 | 74,660 | [
"matlab",
"signal-processing"
] |
4,376,553 | 1 | 4,399,624 | null | 25 | 18,788 | I've upgraded from 2.2 to 2.3. I originally thought that I had just a problem with my own Google maps application not working and posted a question [link text](https://stackoverflow.com/questions/4370205/upgraded-to-sdk2-3-now-maps-wont-display)
I now realise that the problem is much wider, in that non of the built in applications present when a new AVD is created will work. For example the 'maps' application gives "Network failure - This application requires a working data connection". The browser won't connect to Google or anything else. This happens with the AVDs that existed before I upgraded and with those created from the command line after the upgrade, for all API levels. I have all the necessary components I think:
I've tried to describe this problem in it's simplest terms by decoupling it from any reference to Eclipse and to applications that I have written. The logcat for a newly created AVD set to filter out all but errors is very long but I'm posting those that I might be relevant:
```
12-07 12:05:42.048: ERROR/System(61): Failure starting core service
12-07 12:05:42.048: ERROR/System(61): java.lang.SecurityException
12-07 12:05:42.048: ERROR/System(61): at android.os.BinderProxy.transact(Native Method)
12-07 12:05:42.048: ERROR/System(61): at android.os.ServiceManagerProxy.addService(ServiceManagerNative.java:146)
12-07 12:05:42.048: ERROR/System(61): at android.os.ServiceManager.addService(ServiceManager.java:72)
12-07 12:05:42.048: ERROR/System(61): at com.android.server.ServerThread.run(SystemServer.java:206)
12-07 12:07:22.553: ERROR/CheckinTask(382): Checkin failed: https://android.clients.google.com/checkin (request #0)
12-07 12:07:22.553: ERROR/CheckinTask(382): java.net.UnknownHostException: android.clients.google.com
12-07 12:07:22.553: ERROR/CheckinTask(382): at java.net.InetAddress.lookupHostByName(InetAddress.java:506)
12-07 12:07:22.553: ERROR/CheckinTask(382): at java.net.InetAddress.getAllByNameImpl(InetAddress.java:294)
12-07 12:07:22.553: ERROR/CheckinTask(382): at java.net.InetAddress.getAllByName(InetAddress.java:256)
12-07 12:07:22.553: ERROR/CheckinTask(382): at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:136)
12-07 12:07:22.553: ERROR/CheckinTask(382): at org.apache.http.impl.conn.AbstractPoolEntry.open(AbstractPoolEntry.java:164)
12-07 12:07:22.553: ERROR/CheckinTask(382): at org.apache.http.impl.conn.AbstractPooledConnAdapter.open(AbstractPooledConnAdapter.java:119)
12-07 12:07:22.553: ERROR/CheckinTask(382): at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:348)
12-07 12:07:22.553: ERROR/CheckinTask(382): at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:555)
12-07 12:07:22.553: ERROR/CheckinTask(382): at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:487)
12-07 12:07:22.553: ERROR/CheckinTask(382): at android.net.http.AndroidHttpClient.execute(AndroidHttpClient.java:248)
12-07 12:07:22.553: ERROR/CheckinTask(382): at com.google.android.common.http.GoogleHttpClient.executeWithoutRewriting(GoogleHttpClient.java:203)
12-07 12:07:22.553: ERROR/CheckinTask(382): at com.google.android.common.http.GoogleHttpClient.execute(GoogleHttpClient.java:245)
12-07 12:07:22.553: ERROR/CheckinTask(382): at com.google.android.common.http.GoogleHttpClient.execute(GoogleHttpClient.java:313)
12-07 12:07:22.553: ERROR/CheckinTask(382): at com.google.android.gsf.checkin.CheckinTask.sendRequest(CheckinTask.java:254)
12-07 12:07:22.553: ERROR/CheckinTask(382): at com.google.android.gsf.checkin.CheckinTask.doInBackground(CheckinTask.java:150)
12-07 12:07:22.553: ERROR/CheckinTask(382): at com.google.android.gsf.checkin.CheckinService$1.doInBackground(CheckinService.java:221)
12-07 12:07:22.553: ERROR/CheckinTask(382): at com.google.android.gsf.checkin.CheckinService$1.doInBackground(CheckinService.java:214)
12-07 12:07:22.553: ERROR/CheckinTask(382): at android.os.AsyncTask$2.call(AsyncTask.java:185)
12-07 12:07:22.553: ERROR/CheckinTask(382): at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:306)
12-07 12:07:22.553: ERROR/CheckinTask(382): at java.util.concurrent.FutureTask.run(FutureTask.java:138)
12-07 12:07:22.553: ERROR/CheckinTask(382): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1088)
12-07 12:07:22.553: ERROR/CheckinTask(382): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:581)
12-07 12:07:22.553: ERROR/CheckinTask(382): at java.lang.Thread.run(Thread.java:1019)
12-07 12:08:43.802: ERROR/CheckinTask(382): Checkin failed: https://android.clients.google.com/checkin (request #0)
12-07 12:08:43.802: ERROR/CheckinTask(382): java.net.UnknownHostException: android.clients.google.com
12-07 12:08:43.802: ERROR/CheckinTask(382): at java.net.InetAddress.lookupHostByName(InetAddress.java:506)
12-07 12:08:43.802: ERROR/CheckinTask(382): at java.net.InetAddress.getAllByNameImpl(InetAddress.java:294)
12-07 12:08:43.802: ERROR/CheckinTask(382): at java.net.InetAddress.getAllByName(InetAddress.java:256)
12-07 12:08:43.802: ERROR/CheckinTask(382): at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:136)
12-07 12:08:43.802: ERROR/CheckinTask(382): at org.apache.http.impl.conn.AbstractPoolEntry.open(AbstractPoolEntry.java:164)
12-07 12:08:43.802: ERROR/CheckinTask(382): at org.apache.http.impl.conn.AbstractPooledConnAdapter.open(AbstractPooledConnAdapter.java:119)
12-07 12:08:43.802: ERROR/CheckinTask(382): at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:348)
12-07 12:08:43.802: ERROR/CheckinTask(382): at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:555)
12-07 12:08:43.802: ERROR/CheckinTask(382): at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:487)
12-07 12:08:43.802: ERROR/CheckinTask(382): at android.net.http.AndroidHttpClient.execute(AndroidHttpClient.java:248)
12-07 12:08:43.802: ERROR/CheckinTask(382): at com.google.android.common.http.GoogleHttpClient.executeWithoutRewriting(GoogleHttpClient.java:203)
12-07 12:08:43.802: ERROR/CheckinTask(382): at com.google.android.common.http.GoogleHttpClient.execute(GoogleHttpClient.java:245)
12-07 12:08:43.802: ERROR/CheckinTask(382): at com.google.android.common.http.GoogleHttpClient.execute(GoogleHttpClient.java:313)
12-07 12:08:43.802: ERROR/CheckinTask(382): at com.google.android.gsf.checkin.CheckinTask.sendRequest(CheckinTask.java:254)
12-07 12:08:43.802: ERROR/CheckinTask(382): at com.google.android.gsf.checkin.CheckinTask.doInBackground(CheckinTask.java:150)
12-07 12:08:43.802: ERROR/CheckinTask(382): at com.google.android.gsf.checkin.CheckinService$1.doInBackground(CheckinService.java:221)
12-07 12:08:43.802: ERROR/CheckinTask(382): at com.google.android.gsf.checkin.CheckinService$1.doInBackground(CheckinService.java:214)
12-07 12:08:43.802: ERROR/CheckinTask(382): at android.os.AsyncTask$2.call(AsyncTask.java:185)
12-07 12:08:43.802: ERROR/CheckinTask(382): at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:306)
12-07 12:08:43.802: ERROR/CheckinTask(382): at java.util.concurrent.FutureTask.run(FutureTask.java:138)
12-07 12:08:43.802: ERROR/CheckinTask(382): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1088)
12-07 12:08:43.802: ERROR/CheckinTask(382): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:581)
12-07 12:08:43.802: ERROR/CheckinTask(382): at java.lang.Thread.run(Thread.java:1019)
12-07 12:10:10.643: ERROR/CheckinTask(382): Checkin failed: https://android.clients.google.com/checkin (request #0)
12-07 12:10:10.643: ERROR/CheckinTask(382): java.net.UnknownHostException: android.clients.google.com
12-07 12:10:10.643: ERROR/CheckinTask(382): at java.net.InetAddress.lookupHostByName(InetAddress.java:506)
12-07 12:10:10.643: ERROR/CheckinTask(382): at java.net.InetAddress.getAllByNameImpl(InetAddress.java:294)
12-07 12:10:10.643: ERROR/CheckinTask(382): at java.net.InetAddress.getAllByName(InetAddress.java:256)
12-07 12:10:10.643: ERROR/CheckinTask(382): at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:136)
12-07 12:10:10.643: ERROR/CheckinTask(382): at org.apache.http.impl.conn.AbstractPoolEntry.open(AbstractPoolEntry.java:164)
12-07 12:10:10.643: ERROR/CheckinTask(382): at org.apache.http.impl.conn.AbstractPooledConnAdapter.open(AbstractPooledConnAdapter.java:119)
12-07 12:10:10.643: ERROR/CheckinTask(382): at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:348)
12-07 12:10:10.643: ERROR/CheckinTask(382): at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:555)
12-07 12:10:10.643: ERROR/CheckinTask(382): at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:487)
12-07 12:10:10.643: ERROR/CheckinTask(382): at android.net.http.AndroidHttpClient.execute(AndroidHttpClient.java:248)
12-07 12:10:10.643: ERROR/CheckinTask(382): at com.google.android.common.http.GoogleHttpClient.executeWithoutRewriting(GoogleHttpClient.java:203)
12-07 12:10:10.643: ERROR/CheckinTask(382): at com.google.android.common.http.GoogleHttpClient.execute(GoogleHttpClient.java:245)
12-07 12:10:10.643: ERROR/CheckinTask(382): at com.google.android.common.http.GoogleHttpClient.execute(GoogleHttpClient.java:313)
12-07 12:10:10.643: ERROR/CheckinTask(382): at com.google.android.gsf.checkin.CheckinTask.sendRequest(CheckinTask.java:254)
12-07 12:10:10.643: ERROR/CheckinTask(382): at com.google.android.gsf.checkin.CheckinTask.doInBackground(CheckinTask.java:150)
12-07 12:10:10.643: ERROR/CheckinTask(382): at com.google.android.gsf.checkin.CheckinService$1.doInBackground(CheckinService.java:221)
12-07 12:10:10.643: ERROR/CheckinTask(382): at com.google.android.gsf.checkin.CheckinService$1.doInBackground(CheckinService.java:214)
12-07 12:10:10.643: ERROR/CheckinTask(382): at android.os.AsyncTask$2.call(AsyncTask.java:185)
12-07 12:10:10.643: ERROR/CheckinTask(382): at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:306)
12-07 12:10:10.643: ERROR/CheckinTask(382): at java.util.concurrent.FutureTask.run(FutureTask.java:138)
12-07 12:10:10.643: ERROR/CheckinTask(382): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1088)
12-07 12:10:10.643: ERROR/CheckinTask(382): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:581)
12-07 12:10:10.643: ERROR/CheckinTask(382): at java.lang.Thread.run(Thread.java:1019)
12-07 12:11:41.652: ERROR/CheckinTask(382): Checkin failed: https://android.clients.google.com/checkin (request #0)
12-07 12:11:41.652: ERROR/CheckinTask(382): java.net.UnknownHostException: android.clients.google.com
12-07 12:11:41.652: ERROR/CheckinTask(382): at java.net.InetAddress.lookupHostByName(InetAddress.java:506)
12-07 12:11:41.652: ERROR/CheckinTask(382): at java.net.InetAddress.getAllByNameImpl(InetAddress.java:294)
12-07 12:11:41.652: ERROR/CheckinTask(382): at java.net.InetAddress.getAllByName(InetAddress.java:256)
12-07 12:11:41.652: ERROR/CheckinTask(382): at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:136)
12-07 12:11:41.652: ERROR/CheckinTask(382): at org.apache.http.impl.conn.AbstractPoolEntry.open(AbstractPoolEntry.java:164)
12-07 12:11:41.652: ERROR/CheckinTask(382): at org.apache.http.impl.conn.AbstractPooledConnAdapter.open(AbstractPooledConnAdapter.java:119)
12-07 12:11:41.652: ERROR/CheckinTask(382): at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:348)
12-07 12:11:41.652: ERROR/CheckinTask(382): at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:555)
12-07 12:11:41.652: ERROR/CheckinTask(382): at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:487)
12-07 12:11:41.652: ERROR/CheckinTask(382): at android.net.http.AndroidHttpClient.execute(AndroidHttpClient.java:248)
12-07 12:11:41.652: ERROR/CheckinTask(382): at com.google.android.common.http.GoogleHttpClient.executeWithoutRewriting(GoogleHttpClient.java:203)
12-07 12:11:41.652: ERROR/CheckinTask(382): at com.google.android.common.http.GoogleHttpClient.execute(GoogleHttpClient.java:245)
12-07 12:11:41.652: ERROR/CheckinTask(382): at com.google.android.common.http.GoogleHttpClient.execute(GoogleHttpClient.java:313)
12-07 12:11:41.652: ERROR/CheckinTask(382): at com.google.android.gsf.checkin.CheckinTask.sendRequest(CheckinTask.java:254)
12-07 12:11:41.652: ERROR/CheckinTask(382): at com.google.android.gsf.checkin.CheckinTask.doInBackground(CheckinTask.java:150)
12-07 12:11:41.652: ERROR/CheckinTask(382): at com.google.android.gsf.checkin.CheckinService$1.doInBackground(CheckinService.java:221)
12-07 12:11:41.652: ERROR/CheckinTask(382): at com.google.android.gsf.checkin.CheckinService$1.doInBackground(CheckinService.java:214)
12-07 12:11:41.652: ERROR/CheckinTask(382): at android.os.AsyncTask$2.call(AsyncTask.java:185)
12-07 12:11:41.652: ERROR/CheckinTask(382): at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:306)
12-07 12:11:41.652: ERROR/CheckinTask(382): at java.util.concurrent.FutureTask.run(FutureTask.java:138)
12-07 12:11:41.652: ERROR/CheckinTask(382): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1088)
12-07 12:11:41.652: ERROR/CheckinTask(382): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:581)
12-07 12:11:41.652: ERROR/CheckinTask(382): at java.lang.Thread.run(Thread.java:1019)
```
I'm using Vista 64 bit, JDK and Eclipse are 32 bits (I have had no problems before following the SDK from 0.0 right up to 2.2). I noticed in another post that it's necessary to add ...platform-tools to the PATH. I couldn't find any reference to this in the release notes, but I did it anyway.
I'm totally stuck now. Please can anyone suggest what the problem might be?
Turned off Norton Internet Security
Deleted the sdk folder, installed the starter pack and all the API levels.
Deleted c:\users\nick.android (Got rid of all the AVDS)
Recreated one AVD (Level 9 with Google maps)from the SDK Manager and started it.
Net result - just the same errors, browser won't connect, nor will the built in maps application.
I had an older SDK saved to a memory stick. I copied this to a temp directory

I didn't change PATH, but clicked on the SDK Manager in this temp folder and started up an existing API level 7 AVD. The browser and the built in maps application both worked fine.
Filed bug report
[link text](http://code.google.com/p/android/issues/detail?id=13031&sort=-id&colspec=ID%20Type%20Status%20Owner%20Summary%20Stars)
I managed to roll back to SDK 2.1 and found an old ADT plugin (0.9.9). I've got Eclipse 3.5 set up to use SDK 2.1 and Eclipse 3.6 to use SDK 2.3. (I know 3.6 isn't recommended but it used to work OK with SDK 2.1 although code completion was slow). SDK 2.3 emulators are still failing to connect.
If you are thinking of investigating this problem, please backup your earlier SDK and plugin, else you might end up with a useless development environment.
A brand newly created AVD in 2.3 gives:
```
12-09 13:09:08.823: ERROR/ActivityThread(213): Failed to find provider info for com.google.settings
12-09 13:09:30.193: ERROR/browser(213): onReceivedError -2 http://www.google.com/m?client=ms-android-google&source=android-home The URL could not be found.
```
when you start the browser
| Upgraded to SDK 2.3 - now no emulators have connectivity | CC BY-SA 2.5 | 0 | 2010-12-07T12:26:24.627 | 2022-01-19T23:31:10.680 | 2017-05-23T12:26:17.050 | -1 | 440,010 | [
"android",
"android-sdk-2.3"
] |
4,376,732 | 1 | 4,376,900 | null | 0 | 1,580 | I have an image library in a site and its subsite and I want to access its properties using the SharePoint object model. I don't know how to achieve that using SharePoint Object Model. Here is the image of that Library
Note here is the structure of my SharePoint sites and subsites. You can see the 'Images' Library in each of sites and subsite.

| How to get an image library properties in a site and all its subsites in SharePoint? | CC BY-SA 2.5 | null | 2010-12-07T12:49:49.550 | 2010-12-21T22:37:54.043 | 2010-12-21T22:37:54.043 | 63,550 | 395,198 | [
"sharepoint",
"list"
] |
4,376,837 | 1 | 4,376,988 | null | 1 | 170 | ```
List<MyClass> SampleList = new List<MyClass>() { new MyClass(), new MyClass(), new MyClass() };
string AggCount = SampleList.Aggregate((counter, next) => counter.f_ToString() += next.f_ToString());
}
}
internal class MyClass
{
public string f_ToString()
{
Random rnd = new Random();
return rnd.Next(1000).ToString();
}
}
```

| Aggregate function problem | CC BY-SA 2.5 | null | 2010-12-07T13:01:37.000 | 2010-12-07T13:30:34.750 | 2010-12-07T13:17:19.087 | 104,085 | 104,085 | [
"linq",
"aggregate"
] |
4,376,894 | 1 | 4,376,974 | null | 0 | 406 | i need to get 3 views for an iphone App. Each view should contain several icons . when i swipe the first view it should take me to the second view(which also has several icons). see the below image to get an idea.

at the bottom it has 3 dots which tells the user that there are 3 screens to swipe. what is this called. This is just like the our normal apps in the iphone. when i swipe it should take me to the next screen with different icons.
i was not able to figure out what kind of view controller it is and how to implement it. i just need some idea.
Thank you.
| iphone multiple views | CC BY-SA 2.5 | null | 2010-12-07T13:07:04.267 | 2010-12-07T13:16:40.043 | null | null | 291,397 | [
"iphone",
"view"
] |
4,377,031 | 1 | 4,382,977 | null | 3 | 660 | I have created a graph using ggplot2. Now I want to have the legend not onto the graph but in the grid outside the graph.
My question is now if someone knows if there is a possibility to use the pch symbols in grid.text?
Here is an image to show what I want ;)

Best regards
| Using pch Characters in grid.text | CC BY-SA 2.5 | null | 2010-12-07T13:22:33.820 | 2015-01-14T18:29:51.697 | 2015-01-14T18:29:51.697 | 134,830 | 1,848,552 | [
"r",
"ggplot2",
"r-grid"
] |
4,377,108 | 1 | null | null | 3 | 2,155 | Is it possible to develop a chart along with a table as a single control in SSRS?
If possible can somebody tell me how to get it? I mean what type of chart we need to select and all.

Thank you
| How to create chart with table in SSRS | CC BY-SA 3.0 | 0 | 2010-12-07T13:30:41.980 | 2014-09-18T20:30:04.127 | 2014-09-18T20:30:04.127 | 346,912 | 225,264 | [
"reporting-services"
] |
4,377,181 | 1 | 4,474,558 | null | 0 | 662 | I have a glaring CSS problem with my website on iphone even though it looks just fine in safari for mac and safari for ipad.
In the attached screens, notice the white background in the upper right corner is only present on the iphone (and it's not supposed to look that way).
What tools and or techniques would you use to try and isolate the cause of this rendering problem?
Here's the iPad version that's OK.

Here's the iPhone rendering of the same page with the extraneous white area in the upper right.

And for easy clicking.. the site is [http://summertown.org/](http://summertown.org/)
tia!
-Darrell
| Techniques for determining iphone vs. ipad CSS rendering problems? | CC BY-SA 2.5 | null | 2010-12-07T13:38:06.223 | 2010-12-17T20:36:11.270 | null | null | 83,879 | [
"css",
"mobile-safari"
] |
4,377,280 | 1 | null | null | 0 | 4,346 | I got the exception as soon I call the SubmitChanges()
The ids assigned are valid and already created in the database
the is refers to Class
All data come from same datacontext

```
GroupingDataMember gdm = new GroupingDataMember();
gdm.DataMemberID = 87;
gdm.FirstLevelDataSourceID = 61;
gdm.CreatedBy = "";
gdm.CreationDate = DateTime.Now;
SelectedReportDataSource.FirstLevelReportDataSource.GroupingDataMembers.Add(gdm);
```
> The INSERT statement conflicted with
the FOREIGN KEY constraint
"FK_GroupingField_ReportDataSource".
The conflict occurred in database
"HumanResourcesDocumentManagement",
table "dbo.ReportDataSource", column
'ID'. The statement has been
terminated.
Any suggestions?
```
[Association(Name="ReportDataSource_GroupingDataMember", Storage="_FirstLevelReportDataSource", ThisKey="FirstLevelDataSourceID", OtherKey="ID", IsForeignKey=true)]
public ReportDataSource FirstLevelReportDataSource
{
get
{
return this._FirstLevelReportDataSource.Entity;
}
set
{
ReportDataSource previousValue = this._FirstLevelReportDataSource.Entity;
if (((previousValue != value)
|| (this._FirstLevelReportDataSource.HasLoadedOrAssignedValue == false)))
{
this.SendPropertyChanging();
if ((previousValue != null))
{
this._FirstLevelReportDataSource.Entity = null;
previousValue.GroupingDataMembers.Remove(this);
}
this._FirstLevelReportDataSource.Entity = value;
if ((value != null))
{
value.GroupingDataMembers.Add(this);
this._FirstLevelDataSourceID = value.ID;
}
else
{
this._FirstLevelDataSourceID = default(int);
}
this.SendPropertyChanged("FirstLevelReportDataSource");
}
}
}
```
| LINQ Exception: "The INSERT statement conflicted with the FOREIGN KEY constraint", afraid of the relations! | CC BY-SA 2.5 | null | 2010-12-07T13:47:27.333 | 2011-01-15T11:33:25.667 | 2010-12-07T14:13:31.257 | 480,107 | 480,107 | [
"c#",
"linq-to-sql",
"foreign-keys"
] |
4,377,472 | 1 | 4,377,960 | null | -2 | 694 | I have Visual Studio 2010, Sql Server 2008, Sql Management Studio and pretty much everything installed.
I can create a local database with Sql Server Compact and Windows authentication just fine. Now I'm a little perplexed, because I still have no idea how all of this works. I didn't use any connection strings, passwords or anything. While coding, I can clearly see that the DataContext class in C# when using LINQ to SQL needs a connection string. How can I test this on my own pc? Is it unreasonable that I want to test this kind of stuff throughly while not currently having hosted services on the Internet yet? And often times, I don't have so much access to the server when using shared hosting, so I can't learn very fast and not fully.
When trying to connect to different services through SQL management studio and Windows authentication and my local pc, I just get a connection error.
Error Number: 2
Severity: 20
State: 0
I don't think that the database engine is the appropiate service to connect to anyway based on what I read, I just thought that you would like to know what I tried.
I checked, and sqlservr.exe is running in the processes in the task manager. Also SQL Server VSS writer.
Basically, I would like to learn how SQl Server databases work. The books, wikipedia and msdn on this topic just enumerate a lot of cryptic services like the database engine, analytical services etc...
I can't find any basic information on how to actally create, connect and program with a real database on my own pc. I'm not even sure whether I'm supposed to work like this?
I read that Sql server compact only supports databases up to 2mb.
Is it not possible for me to work with "the real thing" on my local pc?
I'm very very new to all this, and I'm not getting anywhere with databases...
Thanks for any help!
See: no option for a full sql database.

Server seems to run, but why does it say Server express? I'm sure I have the full one.

| How do I create a SQL server database which is not Sql server compact? | CC BY-SA 2.5 | null | 2010-12-07T14:08:28.743 | 2010-12-07T15:52:46.450 | 2010-12-07T15:52:46.450 | 335,355 | 335,355 | [
"c#",
"sql-server",
"linq-to-sql"
] |
4,377,994 | 1 | 4,378,063 | null | 0 | 402 | I am trying to log into a website to send SMS via a windows phone 7 app. I have 2 providers working but when I try Vodafone I am running into an error.
From what I gather it seems that the response does not contain cookies, or they are not being read. The request logs in ok and the response I get back is the correct page but it contains no cookies.
The Url:
```
RequestUrl = String.Format("https://www.vodafone.ie/myv/services/login/Login.shtml?username={0}&password={1}", userSettings.Username, userSettings.Password),
```
The Request:
```
Request = (HttpWebRequest)WebRequest.Create((requestCollection.CurrentRequest().RequestUrl));
if (Request.CookieContainer == null)
{
Request.CookieContainer = cookieJar.CookieContainer;
Request.AllowAutoRedirect = true;
Request.AllowReadStreamBuffering = true;
Request.UserAgent = "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.6) Gecko/20060728 Firefox/1.5.0.6";
}
```
Where the code errors as the response cookies could not be evaluated:
```
public void AddCookiesToContainer(HttpWebResponse response)
{
CookieCollection.Add(response.Cookies);
CookieContainer.Add(response.ResponseUri, CookieCollection);
}
```
And below is the debugger showing no cookies :(



| Website not returning cookies | CC BY-SA 2.5 | 0 | 2010-12-07T14:54:29.267 | 2010-12-07T15:29:04.290 | 2010-12-07T15:18:07.273 | 207,202 | 207,202 | [
"c#",
"windows-phone-7",
"httpwebrequest"
] |
4,378,037 | 1 | 4,378,206 | null | 2 | 6,549 | I am using a crosstab in crystal reports that has 3 grouping levels this can create a lot of subtotals across the rows. Often the subtotal row is useless if there is only one row it is summing from. Is it possible to supress subtotals where there is only one row of data? Leaving the useful subtotals (I know I can suppress the lot).
Illustration below this is how I currently have it:

This is how I would like it to be:

Notice the sub totals for the Middle Grouping B and T have been removed leaving just C as it has two distinct rows below it. To me that looks much cleared and I would be surprised if this can't be achieved.
| Crystal Reports Crosstab Suppress subtotals when there is one row | CC BY-SA 2.5 | null | 2010-12-07T14:59:03.937 | 2010-12-08T09:14:15.900 | 2010-12-08T09:14:15.900 | 16,989 | 16,989 | [
"crystal-reports",
"crosstab"
] |
4,378,139 | 1 | 4,554,834 | null | 2 | 220 | I need to glue a bar to the bottom of the client view in the web browser. Traditionally I would use position:fixed; except that I need to support my IE 6 clients. I've got a very extensive hack to glue the bar to the bottom of the page and over the content, however when the user scrolls down or right, the bar stays fixed on the page.
To correct this issue I use a javascript event that gets fired using setInterval and when running the function in IE (8)'s debug tools the event fires and changes the position top and position left attributes but the page doesn't redraw the element. The code works but the element is not moving, see below.

Just so you know, the fix has to work in IE quirks mode... it can't work if the other IE versions are trying to use a standard. Believe me, I've tried.
P.S. This is really aggravating because I'm double checking IE9 support as well... get this the element does not move with the scroll bars in IE 6, 7, and 8 but moves in IE 9 and it still displays "IE Quirks Mode." And Microsoft said that this release wouldn't effect anything,...
HTML Structure
```
<body>
<div id="j_zoom_area" style="zoom:100%;">
The Application area the the zoom is changed (by the bar) for accessibility...
</div>
<div id="j_protectorite">
<div class="j_bar">
<div class="j_plate">Zoom Controls, Help, Search, other misc controls</div>
<div class="j_plate">Copyright info, privacy policy, etc...</div>
</div>
</div>
<script type="text/javascript" language="javascript">
j_doBar();
</script>
</body>
```
The CSS for the bar is [https://kscserver.com/ERP-API/Style/includes.css](https://kscserver.com/ERP-API/Style/includes.css).
The particular javascript for the bar correction.
```
//This controls the scrolling of the bar
function j_FixBarSlowly(){
var nTop = 0;
var nLeft = 0;
nTop = (document.body.scrollTop + document.body.clientHeight) - 67;
nLeft = document.body.scrollLeft;
//document.title = document.body.scrollTop + '+' + document.body.clientHeight + '-67' + '=' + nTop + 'px';
document.getElementById("j_protectorite").style.Top = nTop + 'px';
document.getElementById("j_protectorite").style.Left = nLeft + 'px';
document.getElementById("j_protectorite").style.Bottom = '';
document.getElementById("j_protectorite").style.Position = 'absolute';
//Ie6,7,8 hack to force redraw
}
function j_doBar() {
//j_FixBarSlowly();
//if (setInterval != undefined) {
// setTimeout("j_doBar();",5);
//} else {
setInterval("j_FixBarSlowly();",5);
//}
}
```
| How do I keep a bar on the bottom of a page in IE 6,7,8 or how do I force IE to redraw the interface? | CC BY-SA 2.5 | null | 2010-12-07T15:08:48.610 | 2010-12-29T14:13:47.337 | 2010-12-07T15:57:07.763 | 345,442 | 345,442 | [
"javascript",
"internet-explorer-8",
"internet-explorer-7",
"internet-explorer-6"
] |
4,378,350 | 1 | 4,378,532 | null | 0 | 811 | Here is the image :

Now i want to convert a part of it as a textbox and the "Mag Lens" as a clickble button.
But the buggest problem is that both are on the same image but they have different functions..
Can anyone code this for me ? I have no idea to chat.
Thanks
| How to convert this image to textbox and button? | CC BY-SA 2.5 | null | 2010-12-07T15:29:19.083 | 2010-12-07T15:53:34.900 | null | null | 453,871 | [
"php",
"html",
"css"
] |
4,378,539 | 1 | 4,438,462 | null | 3 | 1,148 | Im trying to sort a QFileSystemModel by name, date of creation and date of last access (all ascending and descending). Im using QSortFilterProxyModel for sorting. Somehow there is a strange effect when changing sort order: The number of characters displayed until the name gets elided varies very strong. Depending on the sort order, some items have only three letters (Pro...) while others have up to ten (Programms). I already set the views grid size big enough (100x100), changing the icon size doesnt affect the view.
If I sort the QFileSystemModel directly everything works fine, but I cant sort by other aspects than filename then.
Where can I change the behavior how QSortFilterProxyModel elides text? Why does my proxy affect the view at all? Where can I find any further information about the QFileSystemModel at all? I still dont know what data is stored in the other columns (#1 is filename).

As you can see, depending on the sortorder, filenames get elided or they don't. If im sorting descending, its "twai...", if im sorting ascending its "twain.dll".
```
// initialization
fileNameSortModel = new QSortFilterProxyModel(parent);
fileNameSortModel.sourceModel(originalModel); // originalModel is type of QFileSystemModel
// ...
void PFileListWithHeader::onNameSort(Qt::SortOrder order)
{
currentModel = fileNameSortModel;
view->setModel(currentModel);
view->setRootIndex(translateOriginalIndexToProxy(originalModel->index(path)));
currentModel->sort(0, order);
}
```
Thanks in advance!
| QListView displays different sized items depending on sort order of model | CC BY-SA 2.5 | null | 2010-12-07T15:45:41.477 | 2010-12-14T11:03:07.333 | 2010-12-13T14:16:54.153 | 366,299 | 366,299 | [
"qt",
"qt4"
] |
4,378,538 | 1 | null | null | 0 | 579 | ```
using (EntitiesContainer db = new EntitiesContainer())
{
Language language = db.Languages.SingleOrDefault(x => x.Culture == _session.Language);
Language language2 = new Language { Id = action.Language.Id };
Operation operation = new Operation { Id = action.Operation.Id };
//Operation operation = db.Operations.SingleOrDefault(x => x.Id == action.Operation.Id);
if (!language.Id.Equals(language2.Id))
{
db.Languages.Attach(language2);
action.Language = language2;
}
else
{
action.Language = language;
}
db.Operations.Attach(operation);
//db.ObjectStateManager.ChangeObjectState(operation, System.Data.EntityState.Unchanged);
action.Operation = operation;
//operation.Internals.Add(action);
action.CurrentDetail.Language = language;
action.CurrentDetail.Id = Guid.NewGuid();
action.Id = Guid.NewGuid();
db.SaveChanges();
}
```


Hello I Try all this scenario in commentary, for link my existing operation to the internal action that inherited from action .. but in any of this scenario, he throw me an error like he want to insert a new operation in the DB (dbo.Operations can accept "Action" NULL value) but the Entity already exist.. Can someone please, give me the golden rule .. to insert entity with relation .. existing or not in EF. It's driving me crazy!
Cordialy,
Julien.
| EF 4 insert entity in relationship with existing entity | CC BY-SA 2.5 | null | 2010-12-07T15:45:36.140 | 2010-12-09T15:59:51.173 | 2010-12-09T15:59:51.173 | 280,617 | 280,617 | [
"c#",
"entity-framework",
"ado.net",
"entity-framework-4"
] |
4,378,706 | 1 | null | null | 1 | 10,647 | I have a bunch of SELECT statement scripts where I am pulling data for a bunch of different tables. As far as exporting that data and saving it, I have to manually run each query, right click and "Save Data As" select my options, then click save.
Is there any thing I can wrap my SELECT statment programatically in so that when I run it it will automatically export and save the data eliminating the need for me to manually "Save Data As?"

| TOAD Export Oracle Script To Save Data Programatically | CC BY-SA 2.5 | null | 2010-12-07T16:01:46.090 | 2010-12-21T20:47:32.547 | null | null | 20,446 | [
"oracle",
"export",
"toad"
] |
4,378,860 | 1 | 4,379,030 | null | 4 | 15,517 | I'm using the Netbeans IDE, and I'm currently using a [GlassFish](https://en.wikipedia.org/wiki/GlassFish) server.
What I want to do is .
I looked at some pages, and the code I have now (that is not working as far as I know) looks like:
```
File outputFile = new File(getServletContext().getRealPath("/")
+ "TheFile.txt");
FileWriter fout = new FileWriter(outputFile);
fout.write("The Content");
fout.close();
```
This is my project's structure:

Also where will the file get placed?
---
Edit:
I forgot to mention there are some other folders below the ones in the picture: Test Packages, Libraries, Test Libraries and Configuration Files. However I don't think the file would get placed there.
Edit (newest):
I found out the file is stored in the /build/web folder, but this is not appearing in Netbeans. Even after I restarted it.
| Java Servlets - Writing to file | CC BY-SA 3.0 | null | 2010-12-07T16:15:46.290 | 2014-06-27T20:07:53.380 | 2014-06-27T20:07:53.380 | 642,706 | 490,315 | [
"java",
"servlets",
"file-io"
] |
4,378,829 | 1 | 4,379,078 | null | 3 | 10,237 | How do I prevent a table from wrapping when it is inside of an outer table cell?
My aspx-tablerow:
```
<tr runat="server" id="trButtons">
<td align="left" colspan="9" valign="top" style="white-space:nowrap"><br />
<asp:Button ID="btnImeiLookup" OnClick="btnImeiLookupClick" runat="server" ValidationGroup="VG_RMA_LOOKUP" CausesValidation="true" Text="lookup IMEI" ToolTip="lookup IMEI and check if RMA-Number can be generated" Width="120px" />
<asp:Button ID="BtnEdit" CommandName="Edit" CommandArgument='<%# Eval("idRMA")%>' ValidationGroup="VG_RMA_SAVE" runat="server" CausesValidation="false" Text="Edit" ToolTip="edit" Width="120px" />
<asp:Button ID="BtnAdd" runat="server" CommandName="Add" CausesValidation="false" Text="Add new" Width="130px" ToolTip="add new" />
<asp:Button ID="BtnDelete" runat="server" CommandName="Delete" CommandArgument='<%# Eval("idRMA")%>' CausesValidation="true" Text="Delete" Width="120px" ToolTip="delete" OnClientClick="return confirm('do you really want to delete this RMA?')" />
<uc4:RmaPrinterView ID="RmaPrinterView1" Visible="true" runat="server" />
</td>
</tr>
```
RmaPrinterView1 is an ASP.Net Usercontrol:
```
<table cellpadding="0" cellspacing="0">
<tr>
<td>
<input type="button" style="width:120px; white-space:nowrap" onclick="javascript:$('#TblPrinterView').jqprint();" value="Print" title="Print" />
</td>
</tr>
<tr>
<td>
<table id="TblPrinterView" style="display:none">
<tr>
<td style="width:100px;white-space:nowrap">
<asp:Label ID="LblRmaNumberDesc" runat="server" Text="RMA-Number:"></asp:Label>
</td>
<td>
<asp:Label ID="LblRmaNumber" runat="server" Text="xxxxxxxxxxxxxx"></asp:Label>
</td>
</tr>
<tr>
<td>
<asp:Label ID="LblImeiDesc" runat="server" Text="IMEI:"></asp:Label>
</td>
<td>
<asp:Label ID="LblImei" runat="server" Text="xxxxxxxxxxxxxx"></asp:Label>
</td>
</tr>
<tr>
<td>
<asp:Label ID="LblModelDesc" runat="server" Text="Model:"></asp:Label>
</td>
<td>
<asp:Label ID="LblModel" runat="server" Text="xxxxxxxxxxxxxx"></asp:Label>
</td>
</tr>
<tr>
<td>
<asp:Label ID="LblSiDpyDesc" runat="server" Text="SI/DPY:"></asp:Label>
</td>
<td>
<asp:Label ID="LblSiDpy" runat="server" Text="xxxxxxxxxxxxxx"></asp:Label>
</td>
</tr>
<tr>
<td>
<asp:Label ID="LblSymptomCodesDesc" runat="server" Text="Symptoms:"></asp:Label>
</td>
<td>
<asp:Label ID="LblSymptomCodes" runat="server" Text="xxxxxxxxxxxxxx"></asp:Label>
</td>
</tr>
</table>
</td>
</tr>
</table>
```
As you can see, the Usercontrol with the inner table is wrapped:

I know that I should avoid table layout, but I needed a fast working solution ;-)
: a simplified sample that is also wrapping:
```
<table>
<tr>
<td style="white-space:nowrap">
<input type="button" value="b1" />
<input type="button" value="b2" />
<input type="button" value="b3" />
<table>
<tr>
<td style="white-space:nowrap"><input type="button" value="in table" /></td>
</tr>
</table>
</td>
</tr>
</table>
```
:
The solution - as Jeroen mentioned - was to make the table an inline element with `style="display: inline"`. The next problem was that I used an ASP.Net UpdatePanel inside the UserControl which is normally rendered as a Div. So the next block-element that causes my table to wrap. I only needed to set the [UpdatePanel's RenderMode](http://msdn.microsoft.com/en-us/library/system.web.ui.updatepanel.rendermode.aspx) to `Inline` what causes it to be rendered as Span.
| Prevent table from wrapping | CC BY-SA 3.0 | null | 2010-12-07T16:12:39.077 | 2017-06-15T21:24:45.887 | 2017-06-15T21:24:45.887 | 4,370,109 | 284,240 | [
"html",
"css",
"asp.net",
".net",
"html-table"
] |
4,378,892 | 1 | 4,408,019 | null | 9 | 11,034 | Note this question is was asked in 2001. Things have changed.
I have an iOS device that needs to access a Junos VPN. The opaque instructions from the Junos admin say that I have to retrieve a certificate that has been provisioned to the device using the Apple IPCU. I know that the cert is on the device (I can see it in Settings) and I can access the VPN though Mail, Safari and the Junos App.
The Apple docs state that each app has its own keychain and yet all three of these apps can see the cert. The fact that Jusos can access a cert provisioned by IPCU implies that any app can access this certificate. However when I try to locate it:
```
CFTypeRef certificateRef = NULL; // will hold a ref to the cert we're trying to retrieve
const char *certLabelString = "myCertificateName"; // c string of the certificate we're searching for.
CFStringRef certLabel = CFStringCreateWithCString( NULL, certLabelString, kCFStringEncodingUTF8); // the search we need - a string match for a UTF8 String.
const void *keys[] = { kSecClass, kSecAttrLabel, kSecReturnRef };
const void *values[] = { kSecClassCertificate, certLabel, kCFBooleanTrue };
CFDictionaryRef dict = CFDictionaryCreate(NULL, keys, values, 3, NULL, NULL); // set up a search to retrieve this certificate.
OSStatus status = SecItemCopyMatching(dict, &certificateRef); // Search the keychain, returning in dict
if(status != errSecSuccess)
NSLog(@"keychain find returned %ld", status);
if(dict)
CFRelease(dict);
```
It fails. My questions:
- Is this code correct? Actually I know
it isn't because
`SecItemCopyMatching` returns
`errSecItemNotFound`- What value should I use for
`certLabelString` - I am assuming the
human readable name shown in
Settings.
In Settings, the cert looks like this (sadly obfuscated to death) the search text I specify is exactly the text shown in settings.

Cross posted to [Apple developer forums](https://devforums.apple.com/thread/79552)
| Finding a certificate on iOS | CC BY-SA 3.0 | 0 | 2010-12-07T16:19:49.380 | 2016-03-23T10:19:12.713 | 2016-03-23T10:19:12.713 | 9,827,379 | 9,827,379 | [
"ios",
"certificate",
"keychain"
] |
4,379,525 | 1 | 4,390,335 | null | 5 | 7,508 | I got a problem with tabcontrol.
When I change the DrawMode to ownderdrawfixed, the borderstyle of the tabcontrol changes from "fixedsingle" to "3dfixed" but there's no such a property of tabcontrol borderstyle. the closest thing to borderstyle of tabcontrol is the appearance which didnt change.

look at the picture above to understand what I am talking about.
is there any way to change to color of the tabpage title without ownerdraw so I will not have to use ownerdraw?
or how can I fix the borderstyle of the tabcontrol?
| tabcontrol ownerdraw changes the tabcontrol's border style | CC BY-SA 3.0 | 0 | 2010-12-07T17:17:17.297 | 2016-06-26T16:20:00.620 | 2016-06-26T16:20:00.620 | 3,204,551 | 519,002 | [
"c#",
".net",
"tabcontrol",
"ownerdrawn"
] |
4,380,442 | 1 | 4,381,432 | null | 1 | 176 | HI guys
i built a web based task manager / scheduler using vb.net
i need to add a small communication part to it to allow users to send messages to each other.
below is my concept design. the question is: is this the correct way of building a simple communicator or do you have better ideas?

| any ideas how to add text communication to my web application using asp.net vb.net? | CC BY-SA 2.5 | null | 2010-12-07T18:50:57.843 | 2010-12-07T20:51:41.283 | 2010-12-07T20:24:52.477 | 521,066 | 521,066 | [
"asp.net",
"vb.net",
"email",
"web-applications"
] |
4,380,479 | 1 | 4,417,868 | null | 2 | 2,662 | Given a concave polygon (with no self-intersections), with its nodes in clockwise order, how can we determine all of its inner diagonals (those that are inside the polygon)?
I am interested in a solution that doesn't use any trig functions.
:
In my computational geometry class we were given the following algorithm to test whether `[pi, pj]` is an inner diagonal in a polygon `p0, p1, ... pn-1`:
1. Test if [pi, pj] intersects an edge of the polygon that is not adjacent to it. If yes, it's not an inner diagonal. If not, go to step 2.
2. if pi is a convex point (pi-1, pi, pi+1 make a right turn), then [pi, pj] is an inner diagonal iff pi, pj, pi+1 and pi, pi-1, pj make a left turn. if pi is not a convex point (pi-1, pi, pi+1 make a left turn), then [pi, pj] is an inner diagonal iff pj, pj-1, pi make a left turn.
This algorithm was given to us for a triangulation algorithm involving ear-clipping. I implemented that algorithm and it seems to work fine there, but the catch is that the ear-clipping algorithm only uses diagonals of the form `[pi, pi+2]`.
However, consider the brute force triangulation algorithm that selects all non-intersecting diagonals. Using what I described as a subroutine for checking inner diagonals (together with a segment intersection method), I get the following result:

It's easy to check that the algorithm I posted rejects the inner diagonal `[3, 6]`, when in fact it shouldn't:
3 is not a convex point, and `6, 5, 3` make a right turn instead of a left turn, so it gets rejected.
Note that, when using the ear-clipping algorithm, this polygon is triangulated correctly.
I am interested in how this algorithm can be adapted to detect all diagonals in a polygon. I've had no luck getting it to work.
I have also found other problems with this method, such as polygons for which exterior diagonals are drawn. Again, those work with the ear-clipping algorithm. We were never told that this method only applies for a special form of diagonals however, so I'm looking for clarifications.
: I couldn't decide whether to post this on math.stackexchange.com or here, since computational geometry deals in somewhat equal measure with both programming and mathematics, however I felt that programmers might be more familiar with this kind of algorithms than mathematicians, since someone has probably actually implemented this at some point.
| Finding the diagonals of a polygon | CC BY-SA 2.5 | 0 | 2010-12-07T18:56:02.463 | 2010-12-11T17:09:19.557 | null | null | 270,287 | [
"algorithm",
"computational-geometry"
] |
4,380,652 | 1 | 22,226,022 | null | 7 | 2,646 | How do I get a UITextView to wrap its text around a UIImage like in this image?

The image size is not necessarily previously known.
| iPhone: UITextView wrap around UIImage? | CC BY-SA 2.5 | 0 | 2010-12-07T19:15:45.527 | 2016-02-03T21:56:31.803 | null | null | 534,080 | [
"iphone",
"uiimageview",
"uitextview",
"word-wrap"
] |
4,380,975 | 1 | 4,529,197 | null | 4 | 2,655 | 
Here is my layout:
```
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="#FFFFFFFF">
<RadioGroup
android:id="@+id/choices_group"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_margin="5dp"
android:layout_centerInParent="true"
android:orientation="vertical"
android:background="@drawable/rounded_bg" >
<RadioButton
android:id="@+id/choice_a"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:padding="5dp"
android:text="Choice A" />
<RadioButton
android:id="@+id/choice_b"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:padding="5dp"
android:text="Choice B" />
<RadioButton
android:id="@+id/choice_c"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:padding="5dp"
android:text="Choice C" />
<RadioButton
android:id="@+id/choice_d"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:padding="5dp"
android:text="Choice D" />
</RadioGroup>
</RelativeLayout>
```
Why are the radio buttons superimposed over the text?
| Unexpected RadioButton behavior | CC BY-SA 2.5 | null | 2010-12-07T19:55:13.193 | 2015-10-22T19:00:15.110 | null | null | 421,372 | [
"android",
"layout",
"radio-button"
] |
4,380,982 | 1 | null | null | 2 | 490 | I have a JComboBox. I add a ActionListener using the following code:
```
addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
textComboActionPerformed(evt);
}
});
```
This is what it looks like when it is first displayed. It has a couple options in it.

You will notice that Basic Text Box is the first element, and so it will be the element that shows when the JComboBox is first displayed.
If you click on the JComboBox, you will see the options that are available under it.

However, if I select "Basic Text Box" it will not cause the ActionEvent to fire. It has something to do with it being the first element in the list. If I select any other JComboBox, then the ActionEvent is fired.
EDIT: On Linux, say you select an element, and the event fires. Then you select that element again, it will not fire the second time. It is not isolated to just the first element. It has to do with selecting the already selected element twice.
This behavior only happens on Linux. On Windows, the Event fires not matter which element I click on, even the first. Any ideas on why this would be? Does behavior like this vary from JVM to JVM?
Thanks
| ActionListener differences between Windows and Linux | CC BY-SA 2.5 | null | 2010-12-07T19:56:23.047 | 2010-12-09T13:58:56.147 | 2010-12-07T20:08:02.847 | 489,041 | 489,041 | [
"java",
"user-interface",
"swing",
"jcombobox"
] |
4,381,033 | 1 | 4,381,192 | null | 181 | 119,928 | I'd like to create a shape that's like the following image:

Notice the top half gradients from color 1 to color 2, but theres a bottom half that gradients from color 3 to color 4. I know how to make a shape with a single gradient, but I'm not sure how to split a shape into two halves and make 1 shape with 2 different gradients.
Any ideas?
| Multi-gradient shapes | CC BY-SA 2.5 | 0 | 2010-12-07T20:04:10.293 | 2023-01-08T22:01:12.953 | null | null | 406,790 | [
"android",
"gradient",
"shapes"
] |
4,381,269 | 1 | 12,934,943 | null | 22 | 5,704 | Basically, I want to use a line algo to determine which cells to check for collisions for my raycaster.
[Bresenham](http://en.wikipedia.org/wiki/Bresenham's_line_algorithm) isn't great for this as it uses a unified-thickness approach, meaning that it ignores cells that aren't at least half-covering the line. Not great at all, because it means that some segments of my line aren't being checked for intersections with the cells, leading to errors.
I can't seem to find any "thick-line" algorithms, can anyone help me find one?

Green: What I would like.
Red: What I currently have and don't want.
| Line rasterisation: Cover all pixels, regardless of line gradient? | CC BY-SA 3.0 | 0 | 2010-12-07T20:30:57.877 | 2020-10-25T10:02:26.160 | 2015-01-16T09:19:50.830 | 356,778 | 356,778 | [
"c#",
"algorithm",
"line",
"gradient",
"pixel"
] |
4,381,412 | 1 | null | null | 2 | 527 | I have VS 2010 and Word 2010. In Word 2010 there is sometimes a message/warning bar that pops up under the ribbon but above the body of the document that allows the user to do an action. It looks something like this...

Can I programmatically though VSTO or Interop create a custom bar that allows the user to click a button and then it executes some code.
If not, is there an alternative popup or dialog box that will do something like this?
Thanks,
A
| Add a Message Bar or Info Bar to Word using interop or vsto | CC BY-SA 2.5 | null | 2010-12-07T20:47:15.183 | 2013-06-17T14:15:06.837 | null | null | 57,545 | [
"visual-studio",
"interop",
"vsto"
] |
4,381,594 | 1 | 4,381,892 | null | 1 | 306 | I would like to create a colour using NSColor but none of the static constructors seem to work for me. The screenshot describes the issue I am experiencing.

I am referencing:
```
#import <AppKit/NSBitmapImageRep.h>
```
And have imported the framework "AppKit". What else do I need to do?
| "colorWithCalibratedRed:green:blue:alpha:" will not work | CC BY-SA 2.5 | null | 2010-12-07T21:09:00.680 | 2010-12-07T21:41:05.167 | null | null | 91,414 | [
"cocoa",
"appkit"
] |
4,381,630 | 1 | 9,147,005 | null | 9 | 5,544 | I need a tree structure that supports "and" and "or"ing. For example, given a regular expression like `ab|c(d|e)` I want to turn that into a tree.
So, at first we have two "or" branches... it can either go down `ab`, or `c(d|e)`. If you head down the `ab` branch, you get two nodes, `a` `b` (or `a` followed by `b`, whatever). Then if you go down the `c(d|e)` branch, you get `c` `(d|e)`, then `(d|e)` is split into `d` `e`.
Making a tree structure is easy, you just have something like
```
class Node {
string element;
Node[] children;
}
```
But then how do you know if the children should be "anded" or "ored"? I guess each level of the tree should alternate between "anding" and "oring"

Does that make sense? Can anyone suggest a structure for this?
---
A few people have suggested storing the "operator" on the node, which is fine, but isn't there a way to take advantage of the fact that each level always alternates or,and,or,and,...?
Not quite sure why people keep assuming this is a binary tree. . I was hoping the tiny code snippet would tip you off. The example just to have only 2 branches.
---
Currently leaning towards this:
```
abstract class Node { }
class DataNode : Node
{
string data;
}
abstract class OpNode : Node
{
Node[] children;
}
class OrNode : OpNode { }
class AndNode : OpNode { }
```
| How to build an and-or tree? | CC BY-SA 2.5 | 0 | 2010-12-07T21:11:51.133 | 2012-02-05T04:53:14.527 | 2010-12-07T22:52:42.567 | 65,387 | 65,387 | [
"c#",
"data-structures"
] |
4,381,848 | 1 | 4,412,464 | null | 0 | 401 | Hey all, I am creating an entry form that allows a person to add multiple days to a request. Each request can have 1 or more days attached and each day has a few selections to make before they can submit the form. I am using the [method described here](http://blog.stevensanderson.com/2010/01/28/editing-a-variable-length-list-aspnet-mvc-2-style/) to accomplish this.
Now, I want to start doing some more advanced UI features like using a JSON data source to build my drop down lists with a parent-child relationship. I am still quite new web development (coming from IBM i green-screen development) so I am still learning by examples and with tutorials. I have found many examples of parent-child drop downs when there is only one set, but I need this to work for any number of rows and for all new rows that have been added on the page while being able to display the correct selected value for each row when the edit page loads. To top this off, I want, when certain selections are made, to reveal some new fields.
Here is what I have so far:

(This is screen shot is based on not worrying about the end features and just getting it working. The child drop down currently shows everything.)
Request Type selects the type of leave you want to take. Use Hours Type gets a list based on what is entered into Request Type. The problem I have with the above is getting it to work on new rows added when clicking "Add Day". The challenge then is to show/hide the second row based on the Request Type. If a person selects Sick - Employee Illness, Nature of Illness should show, if they select another option, it show both Nature of Illness and Relationship. If they select Vacation, they shouldn't see either field.
I have JSON setup for these lists. I included the fields that define what gets shown for which option.
```
[{"Id":11,"Title":"Employee Illness","ParentId":10,"MapToCode":"02","HasRelationship":false,"HasNatureOfIllness":true,"ChildRequired":false,"Notes":"","AccrualCode":"S"},
{"Id":1,"Title":"Vacation","ParentId":0,"MapToCode":"04","HasRelationship":false,"HasNatureOfIllness":false,"ChildRequired":false,"Notes":"","AccrualCode":"VAC"}]
```
I know this is a lot for a newbie to learn and figure out. Has anyone done this that is willing to share or know of a tutorial or even can point me in the right direction? (Even the proper terminology) My searches for on this has been a failure thus far.
| Adding jQuery Drop Downs to a Variable Length Data Entry Page | CC BY-SA 2.5 | 0 | 2010-12-07T21:36:34.433 | 2010-12-10T19:19:39.273 | 2010-12-10T15:05:45.483 | 2,535 | 2,535 | [
"jquery",
"asp.net-mvc",
"json",
"drop-down-menu",
"data-entry"
] |
4,382,063 | 1 | 4,382,434 | null | 1 | 1,782 | I've worked with Visual Studio 2008(visual c) to create a php extension, so after writing the c code and compiling the whole project, A dll file has been generated in the debug folder.
I copied this dll file to the php /ext folder ( extensions folder) and I added this line in php.ini
> extension=php_talkphp.dll (php_talkphp.dll is the dll name)
then I restart apache server to initialise php extensions. but an error has occured : and this is the error message:

I know that this is due to the compiler version, but How can I use the Vc6 version in a VS2008?
thank you
| VC compiler version for php extensions creation | CC BY-SA 2.5 | null | 2010-12-07T21:58:18.813 | 2010-12-07T22:44:46.330 | null | null | 519,521 | [
"php",
"c",
"compiler-construction"
] |
4,382,108 | 1 | 4,382,929 | null | 13 | 3,390 | I am exploring some data, so the first thing I wanted to do was try to fit a normal (Gaussian) distribution to it. This is my first time trying this in R, so I'm taking it one step at a time. First I pre-binned my data:
```
myhist = data.frame(size = 10:27, counts = c(1L, 3L, 5L, 6L, 9L, 14L, 13L, 23L, 31L, 40L, 42L, 22L, 14L, 7L, 4L, 2L, 2L, 1L) )
qplot(x=size, y=counts, data=myhist)
```

Since I want counts, I need to add a normalization factor (N) to scale up the density:
```
fit = nls(counts ~ N * dnorm(size, m, s), data=myhist, start=c(m=20, s=5, N=sum(myhist$counts)) )
```
Then I create the fitted data for display and everything works great:
```
x = seq(10,30,0.2)
fitted = data.frame(size = x, counts=predict(fit, data.frame(size=x)) )
ggplot(data=myhist, aes(x=size, y=counts)) + geom_point() + geom_line(data=fitted)
```

I got excited when I found this thread which talks about using geom_smooth() to do it all in one step, but I can't get it to work:
- [http://www.mail-archive.com/[email protected]/msg109882.html](http://www.mail-archive.com/[email protected]/msg109882.html)
Here's what I try... and what I get:
```
ggplot(data=myhist, aes(x=size, y=counts)) + geom_point() + geom_smooth(method="nls", formula = counts ~ N * dnorm(size, m, s), se=F, start=list(m=20, s=5, N=300, size=10))
Error in method(formula, data = data, weights = weight, ...) :
parameters without starting value in 'data': counts
```
The error seems to indicate that it's trying to fit for the observed variable, , but that doesn't make any sense, and it predictably freaks out if I specify a "starting" value for counts too:
```
fitting parameters ‘m’, ‘s’, ‘N’, ‘size’, ‘counts’ without any variables
Error in eval(expr, envir, enclos) : object 'counts' not found
```
Any idea what I'm doing wrong? It's not the end of the world, of course, but fewer steps are always better, and you guys always come up with the most elegant solutions to these common tasks.
Thanks in advance!
Jeffrey
| trying to display original and fitted data (nls + dnorm) with ggplot2's geom_smooth() | CC BY-SA 3.0 | 0 | 2010-12-07T22:03:38.520 | 2014-07-23T09:09:44.880 | 2014-07-23T09:09:44.880 | 139,271 | 402,460 | [
"r",
"ggplot2",
"curve-fitting",
"least-squares",
"model-fitting"
] |
4,382,123 | 1 | null | null | 2 | 1,148 | I've looked at the other custom control creation questions on here, as well as other online resources, but I'm lost as to how to create a custom control that doesn't require a C# code-behind file. Since my project is pure IronPython, I don't know how I would integrate the C# code behind with it.
What I'm trying to do isn't even that complicated; no messy styling or render transformations or anything. I'm merely trying to create a composite control of a bunch of existing ones I have, so that I can add/remove these composite controls procedurally. For example, I have this GroupBox:

As you can see, it's just a GroupBox with a TextBox and a ComboBox in the Header, with its body populated by a UniformGrid containing some CheckBoxes. Here is the XAML:
```
<GroupBox Name="DO1">
<GroupBox.Header>
<DockPanel>
<TextBlock VerticalAlignment="Center">DO1</TextBlock>
<ComboBox Name="DO1DeviceList" Margin="3 0 0 0" ItemsSource="{Binding DOtable}">
</ComboBox>
</DockPanel>
</GroupBox.Header>
<UniformGrid Rows="1">
<StackPanel>
<Label Content="3W1L" HorizontalAlignment="Center" VerticalAlignment="Center" />
<CheckBox Name="DO1o1" IsChecked="{Binding o1}" HorizontalAlignment="Center" VerticalAlignment="Center" />
<Label Content="1" HorizontalAlignment="Center" VerticalAlignment="Center" />
</StackPanel>
<StackPanel>
<Label Content="3W3V" HorizontalAlignment="Center" VerticalAlignment="Center" />
<CheckBox Name="DO1o2" IsChecked="{Binding o2}" HorizontalAlignment="Center" VerticalAlignment="Center" />
<Label Content="2" HorizontalAlignment="Center" VerticalAlignment="Center" />
</StackPanel>
<StackPanel>
<Label Content="Ni" HorizontalAlignment="Center" VerticalAlignment="Center" />
<CheckBox Name="DO1o3" IsChecked="{Binding o3}" HorizontalAlignment="Center" VerticalAlignment="Center" />
<Label Content="3" HorizontalAlignment="Center" VerticalAlignment="Center" />
</StackPanel>
<StackPanel>
<Label Content="2W1" HorizontalAlignment="Center" VerticalAlignment="Center" />
<CheckBox Name="DO1o4" IsChecked="{Binding o4}" HorizontalAlignment="Center" VerticalAlignment="Center" />
<Label Content="4" HorizontalAlignment="Center" VerticalAlignment="Center" />
</StackPanel>
<StackPanel>
<Label Content="Vac2" HorizontalAlignment="Center" VerticalAlignment="Center" />
<CheckBox Name="DO1o5" IsChecked="{Binding o5}" HorizontalAlignment="Center" VerticalAlignment="Center" />
<Label Content="5" HorizontalAlignment="Center" VerticalAlignment="Center" />
</StackPanel>
<StackPanel>
<Label Content="3W4V" HorizontalAlignment="Center" VerticalAlignment="Center" />
<CheckBox Name="DO1o6" IsChecked="{Binding o6}" HorizontalAlignment="Center" VerticalAlignment="Center" />
<Label Content="6" HorizontalAlignment="Center" VerticalAlignment="Center" />
</StackPanel>
<StackPanel>
<Label Content="Cu" HorizontalAlignment="Center" VerticalAlignment="Center" />
<CheckBox Name="DO1o7" IsChecked="{Binding o7}" HorizontalAlignment="Center" VerticalAlignment="Center" />
<Label Content="7" HorizontalAlignment="Center" VerticalAlignment="Center" />
</StackPanel>
<StackPanel>
<Label Content="3W2L" HorizontalAlignment="Center" VerticalAlignment="Center" />
<CheckBox Name="DO1o8" IsChecked="{Binding o8}" HorizontalAlignment="Center" VerticalAlignment="Center" />
<Label Content="8" HorizontalAlignment="Center" VerticalAlignment="Center" />
</StackPanel>
</UniformGrid>
</GroupBox>
```
I've read about control compositing, grouping a bunch of controls into a single control. I'd like to make this whole GroupBox a single control I can add or remove procedurally. How can I accomplish this with IronPython?
| Creating Custom WPF Controls in IronPython: a control made up out of standard controls | CC BY-SA 2.5 | 0 | 2010-12-07T22:05:18.207 | 2011-01-10T17:30:30.927 | null | null | 456,568 | [
"python",
"wpf",
"custom-controls",
"ironpython",
"composite-controls"
] |
4,382,178 | 1 | null | null | 1,234 | 448,040 | I'm trying to install the Android SDK on my Windows 7 x64 System.
`jdk-6u23-windows-x64.exe` is installed, but the setup refuses to proceed because it doesn't find the installation.
Is this a known issue? And is there a solution?

| Android SDK installation doesn't find JDK | CC BY-SA 4.0 | 0 | 2010-12-07T22:12:14.100 | 2023-01-24T13:00:27.740 | 2020-04-19T11:18:42.183 | 806,202 | 534,294 | [
"java",
"android",
"sdk",
"windows-7-x64",
"jdk6"
] |
4,382,332 | 1 | 4,382,588 | null | 2 | 5,037 | I have a problem with layout which won't stretch within high resolution like 1024x600.
As root layout I use RelativeLayout with following style:
```
<style name="DefaultLayout">
<item name="android:layout_width">fill_parent</item>
<item name="android:layout_height">fill_parent</item>
</style>
```
I want to stretch layout to any screen resolution but on emulator with high resolution it looks like this:

If it's important I didn't use images with fixed size, header and footer it's a 1px vertical line which duplicates horizontally and the list items implemented as shapes... so there is no point where it may took some fixed size... maybe I am checking this in a wrong way... Actually I didn't figured out what is the problem
| Android layout doesn't stretch on full screen | CC BY-SA 2.5 | 0 | 2010-12-07T22:33:50.183 | 2010-12-07T23:02:50.607 | 2010-12-07T22:54:02.133 | 390,323 | 390,323 | [
"java",
"android"
] |
4,382,425 | 1 | null | null | 1 | 487 | I'm looking for some help setting up a page with re-positional divs/boxes.
I would like the functionality similar to how you can setup capsules with HubPages, which includes moving boxes:
1. Up
2. Down
3. Float right (making 2 columns)
4. Change to full width (if floated right)
5. Remove box
6. Insert new boxes
See screenshot for example:

I don't want to use drag-n-drop jQuery UI, but rather have buttons to reposition the boxes.
Example video: [http://www.youtube.com/watch?feature=player_detailpage&v=7SnOtOwTYoE#t=74s](http://www.youtube.com/watch?feature=player_detailpage&v=7SnOtOwTYoE#t=74s)
| jQuery div/box reposition (similar to hubpages capsules) | CC BY-SA 3.0 | 0 | 2010-12-07T22:43:58.640 | 2011-12-04T00:11:40.773 | 2011-12-04T00:11:40.773 | 84,042 | 112,796 | [
"jquery",
"jquery-ui"
] |
4,382,781 | 1 | 4,382,921 | null | 2 | 2,662 | i used the following technique to Select multiple items from DropDownList into TextBox with No duplicates, however i dont think it is the most proper way, any ideas.

pressing again with same value selected

choose another value from DDL and press button

here is my code
```
Protected Sub Button2_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button2.Click
If TextBox2.Text.Contains(DropDownList1.SelectedItem.Text) Then
Dim m As New Label
m.Text = "duplicate !"
Me.form1.Controls.Add(m)
Exit Sub
End If
If TextBox2.Text = "" Then
TextBox2.Text = DropDownList1.SelectedItem.Text
Else
TextBox2.Text = TextBox2.Text + " , " + DropDownList1.SelectedItem.Text
End If
End Sub
```
| Select multiple items from DropDownList into TextBox, No duplicates | CC BY-SA 2.5 | null | 2010-12-07T23:34:06.853 | 2010-12-07T23:53:50.487 | null | null | 521,066 | [
"asp.net",
"vb.net",
"web-applications",
"drop-down-menu"
] |
4,382,793 | 1 | 4,382,827 | null | 1 | 942 | Alright here's the deal. I have a `<select multiple>` tag with a background image.
So now whenever I scroll down, the background image does not move up with the text. And I get this effect:

The left pic is before and the right is after I scroll
I want it to move up when I scroll down. So that each line stays with the same color.
Any suggestions on how do I do that?
| Select multiple with background image | CC BY-SA 2.5 | null | 2010-12-07T23:36:02.027 | 2010-12-07T23:44:25.107 | 2010-12-07T23:40:58.167 | 284,685 | 533,991 | [
"html",
"css"
] |
4,382,878 | 1 | 4,382,948 | null | 0 | 95 | I'm trying to optimize the following query but I don't know what to do. I know little of query optimization but doesn't that key_len mean its searching through 386,386 rows? The cities table has 10,053 rows and states only 27.
```
SELECT c.city_name, s.state_name
FROM res_geo_cities AS c, res_geo_states AS s
WHERE c.id_state = s.id_state AND(
(
(c.metaphone_primary IN ($one,$two) OR c.metaphone_secondary IN ($one,$two)) AND
(s.metaphone_primary IN ($three,$four) OR s.metaphone_secondary IN ($three,$four))
) OR (
(c.metaphone_primary IN ($three,$four) OR c.metaphone_secondary IN ($three,$four)) AND
(s.metaphone_primary IN ($one,$two) OR s.metaphone_secondary IN ($one,$two))
))
LIMIT 50
```
This is the explain:

Could somebody be so kind as to point me in the right direction?
| Optimizing this query | CC BY-SA 2.5 | null | 2010-12-07T23:47:08.477 | 2010-12-07T23:59:14.283 | 2010-12-07T23:49:04.717 | 224,346 | 528,813 | [
"mysql",
"optimization",
"join"
] |
4,383,098 | 1 | 4,383,177 | null | 3 | 17,335 | I tried implementing a simple web service into an asp.net application using the tutorial found here: [http://dotnetslackers.com/articles/ajax/JSON-EnabledWCFServicesInASPNET35.aspx#1301](http://dotnetslackers.com/articles/ajax/JSON-EnabledWCFServicesInASPNET35.aspx#1301) and [http://dotnetslackers.com/articles/ajax/Using-jQuery-with-ASP-NET.aspx](http://dotnetslackers.com/articles/ajax/Using-jQuery-with-ASP-NET.aspx)
The problem is, my data is being returned as seen in this screen shot (according to firebug):

```
$("#btnGet").click(function () {
$.ajax({
type: "POST",
contentType: "application/json; charset=utf-8",
url: "TimeService.svc/GetCar",
data: "{}",
dataType: "json",
success: function (data) {
alert(data.d);
}
});
});
});
```
My Web Service method looks like this:
```
[OperationContract]
public string GetCar()
{
using (var sqlc = new SqlConnection(@"Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\CarTracker.mdf;Integrated Security=True;Connect Timeout=30;User Instance=True"))
{
sqlc.Open();
var cmd = sqlc.CreateCommand();
cmd.CommandText = "SELECT CarID, CarName FROM tblCars";
using (var reader = cmd.ExecuteReader())
{
string sCar = "";
int testcount = 1;
for (int i = 0; i < testcount; i++)
{
reader.Read();
sCar += reader["CarName"].ToString();
}
return sCar; // Car_1
}
}
}
```
So my questions are:
1. Where does the 'd' in firebug come from?
2. How do I build 'JSON-style' "strings" based on my db to return back to the jquery ajax function?
Ideally I would wantthe jquery ajax data to look something like this:
```
{"TotalCars": x, "CarList":[{"CarName":"x1", "CarID":"id1"},{"CarName":"x2", "CarID":"id2"}]}
```
So then with jquery I can do things like `alert(data.TotalCars);` and all that sort of stuff.
Please bear in mind that I'm -very- new to this so I appreciate any help you can provide.
Thank you in advance! <3
| Creating JSON return "strings" from a webservice for use with jquery ajax | CC BY-SA 2.5 | 0 | 2010-12-08T00:23:55.533 | 2015-06-23T17:15:58.157 | null | null | 387,285 | [
"c#",
"jquery",
"ajax",
"web-services",
"json"
] |
4,383,148 | 1 | 4,383,159 | null | 18 | 41,928 | I was wondering if it was possible to style a `title`:
```
<a href="#" title="This is a title">Hello</a>
```
The styling question has two aspects:
- -
And the other issue I have is how do you ?
- -
Thanks in advance!
---
*What I ment by text formatting / encoding:

| Is it possible to style a title? (and with CSS or js?) | CC BY-SA 2.5 | 0 | 2010-12-08T00:34:23.420 | 2015-02-01T16:29:52.047 | 2015-02-01T16:29:52.047 | 3,204,551 | 463,065 | [
"javascript",
"html",
"css",
"styling"
] |
4,383,535 | 1 | 4,388,094 | null | 5 | 742 | So I was following the [tiny guide here](http://wiki.mxunit.org/display/default/Running+a+single+method+in+a+test) on how to run a single MXUnit test with Eclipse using the MXUnit plugin for Eclipse. But as you can see in the screen shot below it didn't work out for tests that I know work, because it appears that the application variables are not available using this method. Is that something that will not work? or is there something that I can do to make that application and it's variables accessible when running tests this way?

| application variables are not found when running MXUnit test from Eclipse | CC BY-SA 2.5 | 0 | 2010-12-08T01:59:05.033 | 2010-12-08T13:40:28.630 | null | null | 219,166 | [
"coldfusion",
"mxunit"
] |
4,383,838 | 1 | null | null | 1 | 185 | So I'm trying to do a sliding door CSS menu -- basically one image that you move the background position on when it's hovered or when it's active.
However, usually when I move to the next link using:
```
#xmenu li.ypart {width:80px; height:35px;}
#xmenu li.ypart a {background-position:-33px 0px; }
```
It takes from the last link to whatever width I specify. See the MAP icon on the image below? I'm trying to link it so that the link doesn't go all the way from the SEND FEEDBACK link to the map button. I just want the link to be that square.

So any ideas?
| Issue with sliding door CSS menu... | CC BY-SA 3.0 | null | 2010-12-08T03:12:14.970 | 2011-11-28T21:27:57.950 | 2011-11-28T21:27:57.950 | 234,976 | 534,491 | [
"css",
"menu",
"navigation"
] |
4,384,275 | 1 | null | null | 0 | 625 | i want to Login via twitter, facebook, openid, yahoo, google using a single app.
so i choose django-socialauth
i read this artile : [django-socialauth-login-via-twitter-facebook-openid-yahoo-google/](http://uswaretech.com/blog/2009/08/django-socialauth-login-via-twitter-facebook-openid-yahoo-google/)
but when i download the code , and run it , i cant find the facebook button ,
what can i do ?
thanks
this is my demo image:

and this is the author's demo :[here](http://uswaretech.com/forum/login/)

| Cant find facebook button using django-socialauth | CC BY-SA 2.5 | null | 2010-12-08T04:49:09.133 | 2010-12-23T08:53:10.797 | null | null | 420,840 | [
"python",
"django",
"facebook",
"django-socialauth"
] |
4,384,307 | 1 | null | null | 0 | 378 | 
Recently I updated Parallels, and found myself in a bit of a predicament.
Now when I build/run the app, I get a save, open file dialog box for an html file. Behind the dialog box, is whats present in the embedded image. That's a borderless OOBE app.
The weird thing is, if I open the html file, it keeps that blank page but displays the out of browser content in the browser. The app is even detecting that it's out of the browser, when its really in the browser.
What I do know, is it's localized to the machine, and not the app itself. I've pulled a new clone from the mercurial repo, rerun it, same problem, moved it to another machine, and it has no problem. Displays fine.
I've even set IE as my default browser, I just wonder if Parallels is doing something funky. Attempting to repair my install of Visual Studio but I expect that will not fix the problem. Reinstalled an older version of parallels. No change. Even removed parallels tools, nothing.
It's really weird. Any suggestions on what to do? Right now I'm at my wits end.
| Silverlight OOB Error? File Dialog Box popup? Parallels? Oye? | CC BY-SA 2.5 | 0 | 2010-12-08T04:55:59.363 | 2010-12-16T20:41:16.497 | null | null | 329,360 | [
"silverlight-4.0",
"silverlight-oob",
"parallels"
] |
4,384,433 | 1 | null | null | 11 | 56,160 | >
[Android SDK installation doesn't find JDK](https://stackoverflow.com/questions/4382178/android-sdk-installation-doesnt-find-jdk)
I am unable to install the android SDK. It requests that I have the JDK, which I do. I re-downloaded and reinstalled the Java JDK. I restarted my computer, I ran this install again for the android SDK... nothing... it won't let me get past this point. Here is a screen shot of the screen I'm stuck on:

I've googled my problem, I've spent 2 hours trying to find the answer... the closest I could get would be something about adding a "Path" to my "Environment Variables." I found where the environment variables are in Windows 7, but I don't have the slightest clue what I am supposed to do.
| Installing Android SDK on Windows 7 64-bit: "JDK not found"? | CC BY-SA 3.0 | 0 | 2010-12-08T05:22:17.507 | 2012-04-18T19:13:25.853 | 2017-05-23T11:48:25.477 | -1 | 534,578 | [
"android",
"sdk"
] |
4,384,549 | 1 | null | null | 0 | 1,979 | I would like to add a tick mark to an active menu item, but can't seem to figure out how to with my current code. Here's a graphic of what I'm trying to accomplish (notice the tick mark hanging down (centered):

Any assistance would be greatly appreciated.
You may see the current site at:
[http://www.redone.org/_dev/ski/menu2.html](http://www.redone.org/_dev/ski/menu2.html)
| Looking to add graphic to active menu item | CC BY-SA 2.5 | null | 2010-12-08T05:44:44.697 | 2010-12-08T08:46:20.257 | null | null | 523,309 | [
"css",
"menu"
] |
4,384,608 | 1 | 4,384,636 | null | 0 | 867 | look this:

When the pointer is on the image I want a small dark rect at the bottom of this image with some text. How can I do this? Maybe with jquery?
Thanks guys.
| Effect for image on mouseover | CC BY-SA 2.5 | null | 2010-12-08T05:53:16.737 | 2010-12-08T07:12:16.933 | 2010-12-08T06:00:24.927 | 368,070 | 521,887 | [
"javascript",
"effects",
"onmouseover"
] |
4,384,652 | 1 | 4,479,172 | null | 7 | 3,655 | I'm trying to discover a faster algorithm for testing whether an axis-aligned [conical surface](http://en.wikipedia.org/wiki/Conical_surface) intersects the volume of an axis-aligned bounding box.
The current algorithm I developed is as follows:

- - - - - - - - - -
Can anyone think of a more efficient one? This seems to do a lot of extra work by computing each line intersection.
EDIT:
Above algorithm is bad, for example:

The cone can intersect only one edge of the box in a way that all the axis-line intersections are on one side, so the above algorithm doesn't work unless all edges are tested or the edges to be tested are intelligently chosen (maybe the edges closest to the cone?).
| Infinite cone surface * AABB intersection testing | CC BY-SA 3.0 | 0 | 2010-12-08T06:04:03.657 | 2019-03-12T03:06:07.863 | 2013-11-01T20:20:27.517 | 377,534 | 377,534 | [
"3d",
"geometry",
"collision-detection",
"intersection"
] |
4,384,684 | 1 | 4,429,476 | null | 1 | 370 | In my iPhone app there is a requirement for Twitter API integration.
Here the problem comes when I integrate the Twitter+ OAuth SDK into my app. It gives errors as shown below in the screen shot.
I have added the xml2.dylib library to my app but still it gives some errors.

| Integrating Twitter API into iPhone app gives errors | CC BY-SA 2.5 | null | 2010-12-08T06:09:13.973 | 2021-05-25T20:57:05.093 | 2010-12-13T13:53:05.557 | 463,857 | 463,857 | [
"iphone",
"objective-c",
"cocoa-touch",
"ios4",
"twitter"
] |
4,384,890 | 1 | 4,384,994 | null | 437 | 623,030 | I have created a layout that contains two buttons, Next and Previous. In between the buttons I'm generating some dynamic views. So when I first launch the application I want to disable the "Previous" button since there wont be any previous views. I also want to disable the "Next" button when there are not more views to display. Is there anyway to disable the buttons?

| How to disable an Android button? | CC BY-SA 3.0 | 0 | 2010-12-08T06:48:53.943 | 2021-09-17T02:36:49.973 | 2020-07-24T21:36:48.107 | 792,066 | 395,959 | [
"android",
"android-button"
] |
4,384,945 | 1 | 4,390,140 | null | 2 | 5,769 | I am using eclipse HELIOS. I am getting the following error message whenever I build my project.

Has anyone else experienced such error? Is it a problem of eclipse or the project? It never occured to me before but for this project its happening. It says `NullPointerException` but that should not pop up such message.
Please help, its driving me nuts. I need to check in my codes but I cant test them due to this building error.
Let me know if more details is reqd.
| Build error in eclipse | CC BY-SA 2.5 | 0 | 2010-12-08T06:56:35.667 | 2010-12-08T17:01:54.123 | null | null | 501,767 | [
"eclipse"
] |
4,385,024 | 1 | 4,403,886 | null | 1 | 1,915 | i created a simple advanced search page for web application, i thought sharing it with you might help beginners
the following is an example of an advanced search page for an employee database using VB.Net

the following is the code behind page
```
Imports System.Data.OleDb
Partial Class searchme
Inherits System.Web.UI.Page
Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim mydb As New OleDbConnection
mydb = New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source= |datadirectory|employee.mdb;Persist Security Info=True")
mydb.Open()
Dim sqlstring = "select * from [dataview] where "
If MRNTextBox1.Text <> "" Then sqlstring = sqlstring + "[code] like '%" + CodeNameTextBox1.Text + "%' OR [EmployeeName] like '%" + CodeNameTextBox1.Text + "%' AND "
If GOVDDL.SelectedItem.Text <> "--Please Select--" Then sqlstring = sqlstring + "[Governorate] ='" + GOVDDL.SelectedItem.Text + "' AND "
If genderddl.SelectedItem.Text <> "--Please Select--" Then sqlstring = sqlstring + "[Gender] ='" + genderddl.SelectedItem.Text + "' AND "
If DateEmploymentFrom.Text <> "" And DateEmploymentTo.Text <> "" Then sqlstring = sqlstring + "[DateEmployment] >= #" + DatumKonvert1.DK1(DateEmploymentFrom.Text) + "# AND [Datepresentation] <= #" + DatumKonvert1.DK1(DateEmploymentTo.Text) + "# AND "
If DepartmentDDL.SelectedItem.Text <> "--Please Select--" Then sqlstring = sqlstring + "[Department] ='" + DepartmentDDL.SelectedItem.Text + "' AND "
sqlstring = Left(sqlstring, Len(sqlstring) - 5) + " order by " + OrderByDDL.SelectedItem.Text
Dim myds As New AccessDataSource
myds.DataFile = "~\App_Data\employee.mdb"
myds.SelectCommand = sqlstring
' Dim Mygrid As New GridView
Mygrid.DataSource = myds
Mygrid.DataBind()
' Me.form1.Controls.Add(Mygrid)
mydb.Close()
RecCount.Text = "Filtered Record Count = " + mygrid.Rows.Count.ToString
Session("dsource") = myds
Response.Redirect("sresults.aspx")
End Sub
End Class
```
| advanced search page for web application using vb.net | CC BY-SA 2.5 | null | 2010-12-08T07:14:07.010 | 2010-12-09T22:45:12.480 | null | null | 521,066 | [
"asp.net",
"vb.net",
"web-applications",
"search",
"advanced-search"
] |
4,385,784 | 1 | 4,385,867 | null | 1 | 2,668 | I am trying to find a library that allows me to place the content of an XML into a JavaBean (something like Digester, Jaxb, JIXB etc) but I need it to be runtime (not at compile time, or by byte code generation) and use a mapping file of some sort.
The idea will be something like Hibernate's HBM mapping files, a way to specify which XML element goes into which Java property. I am currently using Digester but I want something simpler for its rules file.
This should also work on a 1.4 JDK so annotations won't really do (but I will consider such responses just for completeness's sake).
To resume, I need a runtime tool that does XML to Java based on a XML descriptor of some sort, something like this (taken from JIXB) but at runtime (i.e. pass it the XML, the Java class to output object and the mapping descriptor):

Do you know of such a library?
Thank you!
| XML to Java mapping tool - with mapping descriptor | CC BY-SA 2.5 | 0 | 2010-12-08T09:13:28.793 | 2010-12-08T14:41:35.687 | 2010-12-08T11:22:07.303 | 533,357 | 533,357 | [
"java",
"xml",
"mapping"
] |
4,385,824 | 1 | 4,386,374 | null | 0 | 452 | I have one asp.net application, in which i am using "Calling WCF Service Operations in AJAX" method. I finished my work without the service hosting in IIS. I got the correct solution. But now, i have another requirement in which i am using the WCF service which is hosted on local host iis. But in clicking the button i got one javascript error like object expected. I don't know why this happened?
My code is shown below.
```
<fieldset style="width: 804px" align="center">
<legend>Consuming WCF Service using Client-Side AJAX</legend>
<div align="left" style="text-align: center">
<form id="form1" runat="server">
<asp:ScriptManager ID="SM1" runat="server">
<Services>
<asp:ServiceReference Path="http://localhost/WCFService/Service1.svc" />
<%--~/Service1.svc--%>
</Services>
</asp:ScriptManager>
<input id="addNum1" type="text" size="3" />
+
<input id="addNum2" type="text" size="3" />
=
<input id="addAnswer" type="text" size="3" /><br />
<input id="btnAddition" type="button" value="Do Addition" onclick="DoAddition()" />
<br />
<br />
<input id="subtractNum1" type="text" size="3" />
-
<input id="subtractNum2" type="text" size="3" />
=
<input id="subtractAnswer" type="text" size="3" /><br />
<input id="btnSubtraction" type="button" value="Do Subtraction" onclick="DoSubtraction()" />
<br />
<br />
</form>
</div>
</fieldset>
<script language="javascript" type="text/javascript">
function DoAddition() {
Service1.Add(document.getElementById('addNum1').value, document.getElementById('addNum2').value, onAddSuccess);
}
function DoSubtraction() {
Service1.Subtract(document.getElementById('subtractNum1').value, document.getElementById('subtractNum2').value, onSubtractSuccess);
}
function onAddSuccess(result) {
document.getElementById('addAnswer').value = result;
}
function onSubtractSuccess(result) {
document.getElementById('subtractAnswer').value = result;
}
```
the javascript error message is like this

Please help me for solving this issue.
| Calling WCF Service Operations in AJAX | CC BY-SA 2.5 | null | 2010-12-08T09:18:48.590 | 2010-12-08T10:20:18.983 | null | null | 124,875 | [
"c#",
"javascript",
"asp.net",
"ajax",
"wcf"
] |
4,385,990 | 1 | null | null | 0 | 31 | ```
<div style="background-color:blue">
<object height="300px" width="100px" type="application/x-shockwave-flash" data="/flash/cameralist.swf" id="cameralist" style="visibility: visible;"></object>
</div>
```

It's taking up `300px` ,but actually only the upside `150px` is in use.
How to show all its items while keeping the page UI normal?
| Why ComboBox in actinoscript 3 take so much space to show all its items? | CC BY-SA 2.5 | null | 2010-12-08T09:36:14.243 | 2010-12-08T10:00:06.793 | null | null | 522,431 | [
"flash"
] |
4,386,194 | 1 | 4,414,815 | null | 0 | 1,682 | I am learning ASP.NET MVC 3 from many sources on the internet. I am worrying whether my settings based on the mixed information contains unnecessary things leading to security risks.
In this topic, I need your suggestion or comment pertaining to my settings explained below. I will assign a number to each step to make it easier to be referenced in your comment or suggestion.
---

---
No image :-)
---
No image :-)
---
No image :-)
---
I put my project file (including NerdDinner.mdb) under C:\
NerdDinner.mdb is already populated with dummy data.

---

---

Shown in IIS Manager, NerdDinner is an application under the default web site.

---

---

---
```
<add name="NerdDinnerEntities"
connectionString="metadata=res://*/Models.NerdDinner.csdl|res://*/Models.NerdDinner.ssdl|res://*/Models.NerdDinner.msl;provider=System.Data.SqlClient;provider connection string="
Data Source=.\sqlexpress;
Initial Catalog=NerdDinner;
Integrated Security=True;
MultipleActiveResultSets=True
""
providerName="System.Data.EntityClient" />
```
---
Everything works well, but I am not sure whether or not these steps contains security issues.
| In my configurations to setup IIS, SQL-Server, & ASP.NET below, are there unnecessary settings leading to security issues? | CC BY-SA 2.5 | 0 | 2010-12-08T10:00:26.463 | 2010-12-11T02:09:50.920 | null | null | 397,524 | [
"asp.net",
"sql-server",
"iis-7.5"
] |
4,386,288 | 1 | 4,386,306 | null | 1 | 173 | I need to show columns from IN
operator
My query is :
```
SELECT prizes.type,prizes.name
FROM lottery_payment_prizes payment
JOIN lottery_prizes prizes ON
prizes.id = payment.prize_id
WHERE payment.payment_id IN
(( SELECT id FROM lottery_payments
WHERE lottery_id = (SELECT id FROM lotteries WHERE abbr = 'TR' AND group_id = '3' )))
```
Result is:
My question : How can show two columns from lottery_payments ,
lottery_payments returns only ID to IN operator
function.I need to show column name "place" from lottery_payemnts table.
Thanks all.
| SQL SHOW one more column name FROM operator in | CC BY-SA 2.5 | null | 2010-12-08T10:11:15.193 | 2010-12-08T10:17:01.673 | 2010-12-08T10:13:30.293 | 329,709 | 329,709 | [
"sql",
"mysql"
] |
4,386,311 | 1 | 4,391,419 | null | 192 | 79,424 | This example of [knockout js](http://knockoutjs.com/) works so when you edit a field and press TAB, the viewmodel data and hence the text below the fields is updated.

```
<!doctype html>
<html>
<title>knockout js</title>
<head>
<script type="text/javascript" src="js/knockout-1.1.1.debug.js"></script>
<script type="text/javascript">
window.onload= function() {
var viewModel = {
firstName : ko.observable("Jim"),
lastName : ko.observable("Smith")
};
viewModel.fullName = ko.dependentObservable(function () {
return viewModel.firstName() + " " + viewModel.lastName();
});
ko.applyBindings(viewModel);
}
</script>
</head>
<body>
<p>First name: <input data-bind="value: firstName" /></p>
<p>Last name: <input data-bind="value: lastName" /></p>
<h2>Hello, <span data-bind="text: fullName"> </span>!</h2>
</body>
</html>
```
| How can I get Knockout JS to data-bind on keypress instead of lost-focus? | CC BY-SA 3.0 | 0 | 2010-12-08T10:14:47.403 | 2017-05-08T13:49:00.837 | 2014-04-09T11:59:19.277 | 447,356 | 4,639 | [
"javascript",
"knockout.js"
] |
4,386,357 | 1 | null | null | 0 | 218 | I have a multi tier application that want to use a RAC to improve the availability of the server.
What we have now is, the client side sending a transaction data to the server side through a webservice. At client level, we need to specify the url address (IP address) as a path to send a data.
As for now, there are 2 oracle instance installed as a RAC at a server.
1. 133.38.52.101
2. 133.38.52.102
Both of the server are connect to same Oracle Database (SAN storage).
Let say, the client side is pointing to .101. Suddenly the .101 machine is down, how can I possible to use the .102 without changing the point URL at the client side. Is there any configuration can be done at RAC or Windows Server 2008 for this type of problem?

| How to have a single IP for Rapid Application Cluster (RAC) oracle cluster and WIndows Server 2008? | CC BY-SA 2.5 | null | 2010-12-08T10:18:31.797 | 2012-07-02T11:45:35.033 | 2012-07-02T11:45:35.033 | 97,160 | 79,364 | [
"windows",
"oracle",
"ip-address",
"cluster-computing"
] |
4,386,446 | 1 | 4,388,542 | null | 51 | 52,417 | I'm using the following code to write a jpg file:
```
String url="http://img01.taobaocdn.com/imgextra/i1/449400070/T2hbVwXj0XXXXXXXXX_!!449400070.jpg";
String to="D:/temp/result.jpg";
ImageIO.write(ImageIO.read(new URL(url)),"jpg", new File(to));
```
But I get the `result.jpg` is a pink background image:

| Issue using ImageIO.write jpg file: pink background | CC BY-SA 4.0 | 0 | 2010-12-08T10:28:41.263 | 2018-11-06T16:34:44.630 | 2018-11-06T16:34:44.630 | 1,033,581 | 165,589 | [
"java",
"image-processing"
] |
4,386,634 | 1 | 4,398,363 | null | 0 | 143 | I use the Open Resource Window (Command-Shift-R) in Flash Builder and it saves me a lot of time. But I can´t seem to get it to work with my projects xml files. I know this has been working on previous projects ut I can´t find any settings for this.

| List xml files in Flash builder Open Resource | CC BY-SA 2.5 | null | 2010-12-08T10:54:25.290 | 2010-12-09T12:49:08.867 | 2010-12-08T12:10:10.617 | 473,841 | 473,841 | [
"flash",
"eclipse",
"eclipse-plugin",
"flash-builder"
] |
4,386,888 | 1 | 4,387,053 | null | 1 | 181 | Here is the image :

So now how do i show only the "Red Boxed" part in my frame.
So is there any way i can position my frame or something to that dimensions ?
| How do i display a part of the frame? | CC BY-SA 2.5 | null | 2010-12-08T11:27:49.787 | 2010-12-08T12:00:14.477 | null | null | 453,871 | [
"php",
"javascript",
"html",
"css"
] |
4,386,959 | 1 | null | null | 208 | 111,598 | What is the difference between the `HEAD` and `master` in Git?
I did a clone of a project on GitHub and want to push my changes to the remote. But to which one should I push?

| Difference between HEAD and master | CC BY-SA 4.0 | 0 | 2010-12-08T11:38:05.920 | 2022-08-09T15:09:29.703 | 2022-08-09T15:09:29.703 | 2,370,483 | 526,212 | [
"git",
"github"
] |
4,387,162 | 1 | 4,387,259 | null | 8 | 1,218 | in twitter
this is the normal

and this is hover glow

is there a jquery plugin or code or css effect can do that
| How can I add a glowing border on a textarea like Twitter? | CC BY-SA 3.0 | 0 | 2010-12-08T12:00:23.520 | 2016-06-08T09:09:43.987 | 2016-06-08T09:09:43.987 | 124,238 | 1,377,781 | [
"jquery",
"css",
"focus",
"textarea"
] |
4,387,213 | 1 | 4,802,800 | null | 3 | 3,487 | I've been piecing together a project of mine, and one of the key aspects will be a draggable "canvas"--an area in which users can create/destroy/drag-n-drop child elements. I've created a diagram below:

Seeing as the user-created elements will be draggable as well, I was thinking about maybe restricting the 'canvas drag' to only when the user presses and holds space bar... but before I get to that, I need help brainstorming ways to accomplish the 'canvas drag.'
I'm wondering if some clever implementation of the Jquery UI draggable could also be used for the canvas, and not just its child elements. Thoughts?
Thanks!
So in an attempt to not "think so hard," I've outlined an approach that appears 'too simple to be true.' I took the same premise from above, but the 'canvas' is a draggable div inside a proportionately larger container:

Does anyone have any experience with [nested draggables](https://stackoverflow.com/questions/2185412/draggable-nested-inside-draggable-drags-both-when-dragging-child-in-ie) (this guy had problems,) and/or draggables larger than their viewing space? This model needs to work, inasmuch as the draggable child elements within the canvas work as well.
Thanks!
. . .
Using [Mapbox](http://wayfarerweb.com/jquery/plugins/mapbox/) and [jQuery UI Draggable](http://jqueryui.com/demos/draggable/), I've successfully created a draggable 'canvas' with a draggable 'node.' The problem is that dragging the 'node' drags the 'canvas' as well--creating an awesome, but unwanted (at least at this stage) parallax effect.
Jquery :
```
$(function() {
$('#viewport').mapbox();
$('.node').draggable({containment:"#canvas", scroll:false});
});
```
HTML :
```
<div id="viewport">
<div id="canvas" style="background: url('image/1k_square.jpg') no-repeat; width: 1000px; height: 1000px;">
<div class="node"> </div>
</div>
</div> <!--viewport-->
```
CSS:
```
.node {
position : relative;
margin : 0 auto;
background : rgba(255,255,255,.2);
width : 118px;
height : 118px;
z-index : 100;
border : 1px dotted black;
}
#viewport {
width: 520px;
height: 520px;
margin: 20px auto;
overflow: hidden;
}
```
I've already tried using a stop propagation:
`$('.node').click(function(e){ e.stopPropagation();});`
but that didn't do anything. A little help? :D
| A way to create a click-and-drag "canvas" user-area with Javascript and Jquery? | CC BY-SA 3.0 | 0 | 2010-12-08T12:06:31.087 | 2013-04-30T05:44:47.187 | 2020-06-20T09:12:55.060 | -1 | 371,525 | [
"javascript",
"jquery",
"web-applications"
] |
4,387,490 | 1 | 4,387,592 | null | 0 | 478 | [ 1 ], [ 2 ] and many other references gives conclusion that BLOBs with size less tha 0.3-1 MB should be stored in database while BLOBs larger than 1 MB - in file system (possibly through FILESTREAM).
FACEBOOK.com stores 6.5 (30 with thumbnails and size versions) billions pictures in files system [ 3 ].
Randal's white paper [ 2 ] reasons it by:

Well, this does not convince me about necessity to store blobs in database but just about the fact that they should not be accessed/streamed externally through T-SQL but rather through Win32.
Other reasons, I did read, also do not look as convincing to me.
What are your reasons to store blobs in database instead of in file system?
[ 1 ]
Ray Barley . Using FILESTREAM to Store BLOBs in the NTFS File System in SQL Server 2008
[http://www.mssqltips.com/tip.asp?tip=1489](http://www.mssqltips.com/tip.asp?tip=1489)
[ 2 ]
Paul S. Randal
FILESTREAM Storage in SQL Server 2008
[http://msdn.microsoft.com/en-us/library/cc949109(SQL.100).aspx](http://msdn.microsoft.com/en-us/library/cc949109(SQL.100).aspx)
[ 3 ]
James Hamilton's Blog article. Facebook: Needle in a Haystack: Efficient Storage of Billions of Photos
[http://perspectives.mvdirona.com/2008/06/30/FacebookNeedleInAHaystackEfficientStorageOfBillionsOfPhotos.aspx](http://perspectives.mvdirona.com/2008/06/30/FacebookNeedleInAHaystackEfficientStorageOfBillionsOfPhotos.aspx)
| your reasons to store blobs less than 0.3 MB in database? | CC BY-SA 2.5 | 0 | 2010-12-08T12:37:24.590 | 2010-12-08T12:49:17.477 | 2010-12-08T12:44:14.373 | 200,449 | 200,449 | [
"sql-server",
"database",
"database-design",
"storage",
"blob"
] |
4,387,488 | 1 | 4,414,274 | null | 13 | 15,746 | I need a very precise algorithm for fitting a circle to the set of data points (actually I need to determine the center). The data comes after the binarization and segmentation of the image.
I tried simple center of mass and weighted center of mass algorithms and also pre-made OpenCv::fitEllipse function. I have obtained the best results from OpenCV function, but still, the accuracy is not sufficient. The results are impaired significantly, when the center is anchored in subpixel regions.
The accuracy I obtained is not sufficient even when dealing with the modeled data, which is bad, as eventually, the procedure will have to deal with the data captured by comeras.
Have you got any suggestions what kind of algorithm should I look for or have you got any ready solution? I would rather refrain from linking any external libs.
Thanks for your help.

edited:
Calibration target can be localizaed in any region of the field of view. Hereunder the best results I acieved with OpenCV procedure:
```
169,367 748,345
167,557 820,788
165,690 893,158
164,047 965,197
162,715 1036,729
161,575 1108,089
160,477 1179,552
233,297 1015,313
232,076 1086,965
220,359 1229,578
268,494 1160,275
339,544 1162,980
362,017 1235,669
433,390 1238,491
482,754 1168,299
505,233 1241,039
554,856 1170,664
577,302 1243,439
627,331 1172,795
649,507 1245,665
713,572 588,896
711,995 661,853
710,440 735,034
708,722 808,856
707,018 882,674
705,377 956,169
703,609 1029,211
701,716 1101,950
699,760 1174,689
721,895 1247,620
785,829 614,754
784,344 687,750
782,819 761,315
781,292 835,225
779,389 908,975
777,619 982,335
775,688 1055,275
773,672 1128,091
771,603 1200,724
```
Editted: The numerically generated model and the real coordinates of the centres:

```
51,1 79,8
51,1 179,8
51,1 279,8
51,1 379,8
51,1 479,8
51,1 579,8
51,1 679,8
51,1 779,8
51,1 879,8
51,1 979,8
51,1 1079,8
51,1 1179,8
51,1 1279,8
51,1 1379,8
51,1 1479,8
151,1 79,8
151,1 179,8
151,1 279,8
151,1 379,8
151,1 479,8
151,1 579,8
151,1 679,8
151,1 779,8
151,1 879,8
151,1 979,8
151,1 1079,8
151,1 1179,8
151,1 1279,8
151,1 1379,8
151,1 1479,8
251,1 79,8
251,1 179,8
251,1 279,8
251,1 379,8
251,1 479,8
251,1 579,8
251,1 679,8
251,1 779,8
251,1 879,8
251,1 979,8
251,1 1079,8
251,1 1179,8
251,1 1279,8
251,1 1379,8
251,1 1479,8
351,1 79,8
351,1 179,8
351,1 279,8
351,1 379,8
351,1 479,8
351,1 579,8
351,1 679,8
351,1 779,8
351,1 879,8
351,1 979,8
351,1 1079,8
351,1 1179,8
351,1 1279,8
351,1 1379,8
351,1 1479,8
451,1 79,8
451,1 179,8
451,1 279,8
451,1 379,8
451,1 479,8
451,1 579,8
451,1 679,8
451,1 779,8
451,1 879,8
451,1 979,8
451,1 1079,8
451,1 1179,8
451,1 1279,8
451,1 1379,8
451,1 1479,8
551,1 79,8
551,1 179,8
551,1 279,8
551,1 379,8
551,1 479,8
551,1 579,8
551,1 679,8
551,1 779,8
551,1 879,8
551,1 979,8
551,1 1079,8
551,1 1179,8
551,1 1279,8
551,1 1379,8
551,1 1479,8
651,1 79,8
651,1 179,8
651,1 279,8
651,1 379,8
651,1 479,8
651,1 579,8
651,1 679,8
651,1 779,8
651,1 879,8
651,1 979,8
651,1 1079,8
651,1 1179,8
651,1 1279,8
651,1 1379,8
651,1 1479,8
751,1 79,8
751,1 179,8
751,1 279,8
751,1 379,8
751,1 479,8
751,1 579,8
751,1 679,8
751,1 779,8
751,1 879,8
751,1 979,8
751,1 1079,8
751,1 1179,8
751,1 1279,8
751,1 1379,8
751,1 1479,8
851,1 79,8
851,1 179,8
851,1 279,8
851,1 379,8
851,1 479,8
851,1 579,8
851,1 679,8
851,1 779,8
851,1 879,8
851,1 979,8
851,1 1079,8
851,1 1179,8
851,1 1279,8
851,1 1379,8
851,1 1479,8
951,1 79,8
951,1 179,8
951,1 279,8
951,1 379,8
951,1 479,8
951,1 579,8
951,1 679,8
951,1 779,8
951,1 879,8
951,1 979,8
951,1 1079,8
951,1 1179,8
951,1 1279,8
951,1 1379,8
951,1 1479,8
1051,1 79,8
1051,1 179,8
1051,1 279,8
1051,1 379,8
1051,1 479,8
1051,1 579,8
1051,1 679,8
1051,1 779,8
1051,1 879,8
1051,1 979,8
1051,1 1079,8
1051,1 1179,8
1051,1 1279,8
1051,1 1379,8
1051,1 1479,8
1151,1 79,8
1151,1 179,8
1151,1 279,8
1151,1 379,8
1151,1 479,8
1151,1 579,8
1151,1 679,8
1151,1 779,8
1151,1 879,8
1151,1 979,8
1151,1 1079,8
1151,1 1179,8
1151,1 1279,8
1151,1 1379,8
1151,1 1479,8
```
| The best circle fitting algorithm | CC BY-SA 2.5 | 0 | 2010-12-08T12:37:22.963 | 2013-07-20T09:06:09.633 | 2010-12-13T09:15:02.660 | 353,410 | 295,643 | [
"image-processing",
"geometry",
"computer-vision"
] |
4,387,631 | 1 | 4,387,864 | null | 2 | 6,179 | I'm trying to integrate twitter to my app, but I can't seem to get it to work.
This is my code:
```
public class OAuthForTwitter extends Activity {
private CommonsHttpOAuthConsumer httpOauthConsumer;
private OAuthProvider httpOauthprovider;
public final static String consumerKey = "{removed}";
public final static String consumerSecret = "{removed}";
private final String CALLBACKURL = "sosInternational:///HierBenIkNu";
private Twitter twitter;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
doOAuth();
}
/**
* Opens the browser using signpost jar with application specific
* consumerkey and consumerSecret.
*/
private void doOAuth() {
try {
httpOauthConsumer = new CommonsHttpOAuthConsumer(consumerKey, consumerSecret);
httpOauthprovider = new DefaultOAuthProvider(
"http://twitter.com/oauth/request_token",
"http://twitter.com/oauth/access_token",
"http://twitter.com/oauth/authorize");
String authUrl = httpOauthprovider.retrieveRequestToken(httpOauthConsumer, CALLBACKURL);
this.startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(authUrl)));
} catch (Exception e) {
Toast.makeText(this, e.getMessage(), Toast.LENGTH_LONG).show();
}
}
@Override
protected void onNewIntent(Intent intent) {
super.onNewIntent(intent);
Uri uri = intent.getData();
if (uri != null && uri.toString().startsWith(CALLBACKURL)) {
String verifier = uri
.getQueryParameter(oauth.signpost.OAuth.OAUTH_VERIFIER);
try {
// this will populate token and token_secret in consumer
httpOauthprovider.retrieveAccessToken(httpOauthConsumer,
verifier);
// TODO: you might want to store token and token_secret in you
// app settings!!!!!!!!
AccessToken a = new AccessToken(httpOauthConsumer.getToken(),
httpOauthConsumer.getTokenSecret());
// initialize Twitter4J
twitter = new TwitterFactory().getInstance();
twitter.setOAuthConsumer(consumerKey, consumerSecret);
twitter.setOAuthAccessToken(a);
// create a tweet
Date d = new Date(System.currentTimeMillis());
String tweet = "#OAuth working! " + d.toLocaleString();
// send the tweet
twitter.updateStatus(tweet);
} catch (Exception e) {
Toast.makeText(this, e.getMessage(), Toast.LENGTH_LONG).show();
}
}
}
}
```
When I'm done authenticating on the Twitter site, it should redirect me back to the app.
But instead, I get this Page not found:

I have this in my AndroidManifest:
```
<intent-filter>
<action android:name="android.intent.action.VIEW"></action>
<category android:name="android.intent.category.DEFAULT"></category>
<category android:name="android.intent.category.BROWSABLE"></category>
<data android:scheme="sosInternational" android:host="HierBenIkNu"></data>
</intent-filter>
```
How can I go back to my app with the keys i get back?
| CallBack after Twitter authentication | CC BY-SA 4.0 | 0 | 2010-12-08T12:53:28.430 | 2019-06-19T13:43:50.863 | 2019-06-19T13:43:50.863 | 517,460 | 517,460 | [
"java",
"android",
"twitter",
"callback",
"twitter4j"
] |
4,387,756 | 1 | 4,387,803 | null | 6 | 3,114 | Nope. Ignore this. The space is put there by browser.
---
This is a HTML snippet from my application:
```
Correct answers:
0 / 6<br /><br />
You have failed to pass the final test.
<a href="/module/controller/course/id/5" class="accessible-link">
Click here
</a>
to return to the training.
```
As you can see, there is a single space after the </a> closing tag. Yet in the browser the space is added inside the anchor. So it looks like this:

This is the PHP code which produces the HTML:
```
<?php if (isset($this->correctAnswersCount) && isset($this->answersCount)): ?>
<?php echo Zend_Registry::get('translate')->_('Počet správnych odpovedí'); ?>:
<?php echo ToHtml($this->correctAnswersCount); ?> / <?php echo ToHtml($this->answersCount); ?><br /><br />
<?php endif; ?>
<?php echo Zend_Registry::get('translate')->_('Záverečný test sa vám nepodarilo úspešne absolvovať.'), "\n"; ?>
<a href="<?php echo ToHtml($this->backToCourseUri); ?>" class="accessible-link">
<?php echo Zend_Registry::get('translate')->_('Kliknite'), "\n"; ?>
</a>
<?php echo Zend_Registry::get('translate')->_('pre návrat do kurzu.'), "\n"; ?>
```
I am completely baffled by this and cannot figure out what's causing this even though I've been staring into the code for 30 minutes now.
This is a relevant part from the translation file:
```
'Kliknite' => 'Click here',
```
As you can see, there should be no space added by Zend_Translate.
| An unexplainable space added inside an anchor | CC BY-SA 4.0 | 0 | 2010-12-08T13:05:36.340 | 2021-08-18T13:59:07.633 | 2021-08-18T13:59:07.633 | 63,550 | 95,944 | [
"html",
"css",
"whitespace",
"webpage-rendering"
] |
4,388,066 | 1 | 4,388,087 | null | 310 | 519,367 | I'm getting this error message when trying to run my application. I don't know how to fix it:
> HTTP Error 404.3 - Not Found The page
you are requesting cannot be served
because of the extension
configuration. If the page is a
script, add a handler. If the file
should be downloaded, add a MIME map.
Here's a screenshot of the error page:

What can I do to fix this error?
| "The page you are requesting cannot be served because of the extension configuration." error message | CC BY-SA 3.0 | 0 | 2010-12-08T13:36:37.563 | 2020-02-18T01:18:52.320 | 2014-04-01T16:59:33.040 | 445,131 | null | [
"asp.net",
"iis"
] |
4,388,260 | 1 | 4,388,376 | null | -1 | 77 | I have created a view and assigned the view to viewcontroller
```
UIView *newView=[[UIView alloc] initWithFrame:CGRectMake(0,0,320,460)];
```
in viewDidLoad method I have assigned the view to the viewcontroller
```
-(void)viewDidLoad{
self.view=newView;
//[view release]; In this case also the application crashing
}
-(void)dealloc{
[newView release];//IN this case also the application crashing.
[super dealloc];
}
```
The crash log is this.

how to release the newView? or else the viewcontroller itself will take care of releasing the newView.
| memory release problem | CC BY-SA 2.5 | null | 2010-12-08T13:56:04.850 | 2010-12-08T14:09:19.247 | null | null | 226,157 | [
"iphone",
"objective-c"
] |
4,388,311 | 1 | null | null | 1 | 1,270 | I have an WPF UserControl in a WinForm:

The green part is the WPF UserControl..
The UserControl code bellow:
```
public partial class UserControl1 : UserControl
{
public UserControl1()
{
InitializeComponent();
}
protected override void OnPreviewKeyUp(KeyEventArgs e)
{
base.OnPreviewKeyUp(e);
MessageBox.Show(e.Key.ToString());
}
}
```
XAML:
```
<UserControl>
<Grid Background="DarkGreen">
<Label Content="Label" Margin="64,105,0,0" Name="label1" />
</Grid>
</UserControl>
```
Every time I open the tabPage2 I need to "listen" to the keyboard commands.
Actual code does not work (any message when pressing keyboard with the tabPage2 open).
Why?
# EDIT 1
Updated some WinForms code:
```
private void tabControl1_SelectedIndexChanged(object sender, EventArgs e)
{
if (this.tabControl1.SelectedIndex == 1)
{
ElementHost elHost = (this.tabControl1.SelectedTab.Controls[0] as ElementHost);
bool success = false;
if (elHost != null)
{
success = elHost.Focus();
Console.WriteLine("Success : {0}", success);
}
}
}
```
Result:
> ```
Function: WindowsFormsApplication2.Form1.tabPage2_Enter
Function: WindowsFormsApplication2.Form1.tabControl1_SelectedIndexChanged
Success : True
```
However, the result is the same: any keyUp is captured by the WPF UserControl.
| Capture Key in a WPF | CC BY-SA 2.5 | null | 2010-12-08T14:01:23.443 | 2013-05-20T18:31:43.107 | 2010-12-08T15:47:59.627 | 185,593 | 185,593 | [
".net",
"wpf",
"winforms",
"keyboard"
] |
4,388,492 | 1 | 4,388,775 | null | 7 | 8,026 | Greetings
I've read WPF utilizes DirectX so I'm wondering if it is possible to create a Game Overlay with WPF. I have tried with Winforms or WPF by itself and the transparent forms or windows always cause problems for streaming software thus I'm wondering is it possible to do the following:

Create a WPF application which shows a Window on the desktop with all the options needed for the overlay. Once all the options is filled in you can press Update and the Overlay is created in the game with all the information on it. The WPF app itself won't be visible on the stream. This means all the viewers will not have any trouble with it when the broadcaster changes settings.
The overlay will be a scoreboard so it will need a set amount of info. For example:

- Can I make a WPF application which
dynamically creates a DirectX overlay
ingame?- Since it needs to work in DirectX9,
is this project possible to make by a
single dev (me) which has little to
no exp with DirectX?- If it is possible, where should I
start?
Thanks in advance for all your possible insights and replies!
| WPF and DirectX - Game Overlay | CC BY-SA 2.5 | 0 | 2010-12-08T14:21:23.097 | 2011-02-09T17:42:09.637 | null | null | null | [
"wpf",
"directx",
"overlay"
] |
4,388,569 | 1 | 4,389,764 | null | 0 | 597 | I need to load url in UIWebview in iPhone. But the url is htm format. So, the url doesn't load in UIWebview.
I used the following url, as parsing : [http://feeds.epicurious.com/latestfeatures](http://feeds.epicurious.com/latestfeatures) and I get image url as a htm format.
The image URL is `http://feedads.g.doubleclick.net/~at/-0LKpwQCz1qAqaaMSvxTK4I9PjA/0/di`.
There is a way to load this URL in UIWebview.
Is there another possible way to load that url in UIImageview? If there is a any way, to load UIImageview, it also OK for me.
I used the following code:
```
UIView* testView = [[[UIView alloc] initWithFrame:CGRectMake(0, 0, 320, 480)] autorelease];
UIWebView* testWebView = [[[UIWebView alloc] initWithFrame:CGRectMake(0, 0, 320, 480)] autorelease];
[testView addSubview:testWebView];
[testWebView setDelegate:self];
[testWebView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:@"http://feedads.g.doubleclick.net/~at/K_fHnmr7a7T0pru2TjQC29TsPYY/1/di"]]];
[self.view addSubview:testView];
```
My URL page is:


| How to load htm file from URL? | CC BY-SA 3.0 | null | 2010-12-08T14:27:48.027 | 2017-11-01T15:37:36.927 | 2017-11-01T15:37:36.927 | 472,495 | 409,571 | [
"iphone"
] |
4,388,652 | 1 | 4,388,872 | null | 1 | 291 | How can I make my inline input fill rest of the div? Obviously, `width: 100%` fills to the whole div and thus makes the input to jump to the next line.
As in this picture, the red input should fit the remaining space on the right.

If the input width is greater than the space left, it should wrap to new line. That works fine. Also, the `some-content` width is dynamic.
| How to make input wider if there is any space left | CC BY-SA 2.5 | null | 2010-12-08T14:36:49.033 | 2010-12-08T14:57:30.213 | 2010-12-08T14:43:55.693 | 326,257 | 326,257 | [
"html",
"css"
] |
4,388,836 | 1 | 4,388,923 | null | 3 | 4,918 | I know this question was answered, in C# and I have been trying to convert and get it to work, but have not been succesful?
I would greatly appreciate if you helped

this is an image from that question, i want to do something similar.
here is the link
[ASP.NET GridView second header row to span main header row](https://stackoverflow.com/questions/314736/asp-net-gridview-second-header-row-to-span-main-header-row)
```
Dim d As Date = Date.Today
d = d.AddDays(-1)
Label1.Text = d
'connects to datawarehouse
saocmd1.Connection = conn1
conn1.Open()
Dim ds As New DataSet
'selects sql query
'saocmd1.CommandText = MYQUERY"
saoda1.Fill(saods1, "salesasoftable")
Dim row As New GridViewRow(0, -1, DataControlRowType.Header, DataControlRowState.Normal)
Dim left As TableCell = New TableHeaderCell()
left.ColumnSpan = 3
row.Cells.Add(left)
Dim totals As TableCell = New TableHeaderCell()
totals.ColumnSpan = gridview1.Columns.Count - 3
totals.Text = "Totals"
row.Cells.Add(totals)
```
my error
```
Specified argument was out of the range of valid values.
Parameter name: index
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values.
Parameter name: index
Source Error:
Line 54: row.Cells.Add(totals)
Line 55:
Line 56: Dim t As Table = TryCast(gridview1.Controls(0), Table)
Line 57: If t IsNot Nothing Then
Line 58: t.Rows.AddAt(0, row)
```
The answer
```
Dim row As New GridViewRow(0, -1, DataControlRowType.Header, DataControlRowState.Normal)
'spanned cell that will span the columns I don't want to give the additional header
Dim left As TableCell = New TableHeaderCell()
left.ColumnSpan = 6
row.Cells.Add(left)
'spanned cell that will span the columns i want to give the additional header
Dim totals As TableCell = New TableHeaderCell()
totals.ColumnSpan = myGridView.Columns.Count - 3
totals.Text = "Additional Header"
row.Cells.Add(totals)
'Add the new row to the gridview as the master header row
'A table is the only Control (index[0]) in a GridView
DirectCast(myGridView.Controls(0), Table).Rows.AddAt(0, row)
```
| Add headers VB.net/asp.net gridview? | CC BY-SA 2.5 | 0 | 2010-12-08T14:54:29.710 | 2010-12-08T15:19:05.483 | 2017-05-23T12:13:29.270 | -1 | 497,470 | [
"asp.net",
"vb.net",
"gridview"
] |
4,389,092 | 1 | 4,390,139 | null | 3 | 981 | I hope you know that in [http://www.jsfiddle.net](http://www.jsfiddle.net) we can resize the table.

So i want wondering how to resize a "Vertical Handler" alone.
Can anyone give me the source ?
Please show an example in [http://www.jsfiddle.net](http://www.jsfiddle.net) if possible.
| How to make a re sizable Vertical handler? | CC BY-SA 2.5 | null | 2010-12-08T15:18:39.320 | 2014-01-16T02:23:55.803 | 2010-12-08T16:44:05.787 | null | 453,871 | [
"javascript",
"html",
"css"
] |
4,389,278 | 1 | 4,394,155 | null | 1 | 410 | We are using GLPaint example for a new app.
We wish to demonstrate the user the way to draw few objects.
We saw apple GLPaint has an example on how to playback data of points to drawings.
So we have managed to supply our own data and it works great beside the problem that it makes it upside down.
When the points supplied are for that -

it will draw that

Is there a simple solution for that?
Thanks, Shani
| CGPoints drawn upside down in GLPaint | CC BY-SA 3.0 | null | 2010-12-08T15:38:03.687 | 2012-05-15T13:59:19.600 | 2012-05-15T13:59:19.600 | 1,002,727 | 358,480 | [
"ios",
"opengl-es",
"drawing"
] |
4,389,634 | 1 | 4,391,516 | null | 1 | 840 | I've just implemented a threaded tree in C++, and now I'm trying to `cout` all the elements in order.
The tree was a binary sorted tree (not balanced) before I've threaded it.
I've tried doing this:
```
E min = _min(root); //returns the minimum element of the tree
E max = _max(root); //returns the maximum element of the tree
while (min != max)
{
std::cout << min << ", ";
min = _successor(root, min);
}
std::cout << max << ", ";
std::cout << std::endl;
```
but since the tree is now threaded, my successor function always returns the minimum of the whole tree (basically, it goes once in the right subtree, and then goes in the left subtree as many times as possible, until it finds a leaf.) So when I try to call this function, it only `cout` 1's (because 1 is the minimum value of my tree).
Also, I've tried something else:
```
E min = _min(root); //returns min element of the tree
E max = _max(root); //returns max element of the tree
Node* tmp = _getNode(root, min); //returns the node of the specified element, therefore the minimum node of the tree
while(tmp->data < max)
{
std::cout << tmp->data << ", ";
tmp = _getNode(root, tmp->data)->rightChild; //gets the right child node of tmp
}
std::cout << tmp->data << ", ";
```
However, by doing this, there are values that are ignored. (See image below)

(Green links have been added after the threading of the tree.)
If you see, for example, the node #6 never gets visited from the very last algorithm, because it's not the right child of any node in the tree...
Here's the output of the previous function:
```
1, 2, 3, 5, 7, 8, 11, 71
```
Does anyone have an idea of how I could fix this, or any tips for my problem?
Thanks
EDIT: After all I just had to traverse the tree from the minimum to the maximum AND modify my _predecessor and _successor methods, so they wouldn't check in subtrees that are threaded. :)
Hope it helps future readers.
| C++ - threaded tree, ordered traversal | CC BY-SA 2.5 | null | 2010-12-08T16:12:57.690 | 2010-12-08T19:37:30.840 | 2010-12-08T18:39:01.060 | 505,810 | 505,810 | [
"c++",
"binary-tree"
] |
4,389,815 | 1 | 20,096,935 | null | 0 | 909 | How to add labels with sum for column. I need to do that with chart stacked series from silverlight toolkit

| Silverlight toolkit. StackedColumnSeries add label over column | CC BY-SA 2.5 | null | 2010-12-08T16:31:17.627 | 2013-11-20T13:10:39.507 | null | null | 508,330 | [
"c#",
".net",
"xaml",
"silverlight-toolkit"
] |
4,389,819 | 1 | 4,390,229 | null | 0 | 2,393 | I have list of images on the web page. I want to click on image to select it and want to display selected image on the same page. By clicking on selected image, i want to deselect it.
I have displayed the sketch below. Can someone please help me with jquery code, how to do it.
Thanks a lot.

| select and deselect images on a web page with jquery | CC BY-SA 2.5 | 0 | 2010-12-08T16:31:29.417 | 2010-12-08T17:10:33.183 | null | null | 523,364 | [
"jquery",
"image"
] |
4,390,014 | 1 | 4,390,209 | null | 1 | 193 | I am trying to populate a jqGrid search form using a SELECT element. In the colModel for the interested column I have
```
searchoptions: {
dataUrl: '<%: Url.Content("~/Contact/GetCustomers") %>',
buildSelect: function (response) {
var theSelect = "<select>";
$.each(response, function (i, data) {
theSelect += '<option value="' + data.Value + '">' + data.Text + '</option';
});
theSelect += "</select>";
},
sopt: ['eq', 'ne']
}
```
the remote method GetCustomers return a json result formatted as
```
[{"Selected":false,"Text":"David Gilmour","Value":"10"},
{"Selected":false,"Text":"Eric Clapton","Value":"26961"},
{"Selected":false,"Text":"Joan Baetz","Value":"26972"}]
```
but with the code that I have used for the each function I am getting the following error

| Problem with $.each in jquery | CC BY-SA 2.5 | null | 2010-12-08T16:50:31.543 | 2010-12-08T17:19:38.843 | null | null | 431,537 | [
"jquery",
"jqgrid"
] |
4,390,192 | 1 | 4,390,258 | null | 0 | 439 | This is the problem:

This is my XAML:
```
<TextBlock>
<TextBlock.Text>
<MultiBinding StringFormat="My binding is: ({0})">
<Binding Path="FieldThatDoesntExistYet"></Binding>
</MultiBinding>
</TextBlock.Text>
</TextBlock>
```
My datacontext is being loaded on run time, so It's end with the problem above.
Is there a simple XAML way to just show a default value ? empty or 0 will be great.
| Wpf String.Format cause dependencyproperty.unsetvalue | CC BY-SA 2.5 | null | 2010-12-08T17:07:06.840 | 2010-12-08T17:13:08.137 | null | null | 138,627 | [
"wpf",
"binding"
] |
4,390,620 | 1 | 4,390,663 | null | 1 | 836 | I have a complex "Dot" in WPF which I need to customize the diameter.

The control code sample:
```
<UserControl>
<Canvas>
<Canvas.RenderTransform>
<TranslateTransform X="-6" Y="-6"/>
</Canvas.RenderTransform>
<Ellipse Width="12" Height="12" x:Name="BigCircle" Fill="Red"/>
<Ellipse Width="8" Height="8" x:Name="MediumCircle" Fill="Green" Canvas.Left="2" Canvas.Top="2"/>
<Ellipse Width="4" Height="4" x:Name="SmallCircle" Fill="Blue" Canvas.Left="4" Canvas.Top="4" />
</Canvas>
</UserControl>
```
What I want to achieve:
```
<UserControl>
<UserControl.Resources>
<sys:Double x:Key="dd">120</sys:Double>
</UserControl.Resources>
<Canvas>
<Canvas.RenderTransform>
<TranslateTransform X="-dd/2" Y="-dd/2"/>
</Canvas.RenderTransform>
<Ellipse Width="{DynamicResource ResourceKey=dd}" Height="{DynamicResource ResourceKey=dd}" x:Name="BigCircle" Fill="Red"/>
<Ellipse Width="dd*2/3" Height="dd*2/3" x:Name="MediumCircle" Fill="Green" Canvas.Left="dd/6" Canvas.Top="dd/6"/>
<Ellipse Width="dd/3" Height="dd/3" x:Name="SmallCircle" Fill="Blue" Canvas.Left="dd/3" Canvas.Top="dd/3" />
</Canvas>
</UserControl>
```
every time I change "dd" then I want that my circles proportionally changes.
# Using Converters
```
[ValueConversion(typeof(double), typeof(double))]
public class LargeToMediumConverter : IValueConverter
{
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{
return ((double)value * 2) / 3;
}
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
{
throw new NotImplementedException();
}
}
/* XAML */
<UserControl.Resources>
<sys:Double x:Key="DotDiameter">12</sys:Double>
</UserControl.Resources>
...
<Ellipse Width="{Binding ElementName=DotDiameter}" Height="{Binding ElementName=DotDiameter}" x:Name="LargeCircle" ...
...
```
so this does not work....
| "Relative" Binding in WPF | CC BY-SA 2.5 | null | 2010-12-08T17:49:49.587 | 2013-01-15T05:24:04.297 | 2013-01-15T05:23:20.007 | 305,637 | 185,593 | [
".net",
"wpf",
"user-controls"
] |
4,391,355 | 1 | null | null | 1 | 2,093 | I would like to manage "Navigate Up" navigation nodes either by code or any available UI. My requirements are simple as i want to hide "Navigation" from the below list as below:


| Manage SharePoint 2010 Navigate Up | CC BY-SA 2.5 | 0 | 2010-12-08T19:18:38.373 | 2010-12-08T19:27:14.130 | null | null | 394,630 | [
"sharepoint",
"sharepoint-2010"
] |
4,391,898 | 1 | 4,392,024 | null | 5 | 485 | In the email app, on the overview page, you can see a summary of the number of new emails you have in your accounts. Does anyone know how to create the numbers on the rounded background?

| How to create numbers with rounded background in UITableViewCell (like the email app)? | CC BY-SA 2.5 | 0 | 2010-12-08T20:21:22.210 | 2010-12-18T23:14:30.353 | null | null | 148,208 | [
"iphone",
"uitableview"
] |
4,391,933 | 1 | 4,392,396 | null | 1 | 330 | I draw a very simple database design for my ASP.NET application and with a little help here and there I managed to implement my design...but I want to insert data to this tables and retrieve from them.

A very important function in my application will need all the information from all the 7 tables for a certain record, and sometimes I'll need to make my application accept all kinds of related data and place each piece of data in the right table
My questions are :
1. is it normal to have such big design ? is it even big for a real application ?
2. if I want to add a new kid, I'll need to fill all the table with related required information in all the tables, I'll have a big form with some inputs to accept the data, but how will I insert them in to my Database ?
3. If I want to select all the kids, what's the select statement based on this design going to be ?
PS: between every two tables having (M:M) relationship, consider a third table (that will have two primary keys of each of the 2 tables in the relation).
I'm familiar with JOINs and everything, but never applied on such a big design...HELP!
Thanks in advance!
| Complicated Database Manipulation | CC BY-SA 2.5 | 0 | 2010-12-08T20:25:06.387 | 2011-03-29T03:08:34.837 | 2011-03-29T03:08:34.837 | 315,625 | 315,625 | [
"c#",
"asp.net",
"sql",
"webforms"
] |
4,392,147 | 1 | 4,392,460 | null | 3 | 849 | In uTorrent 2.2 when a treeview node is selected, the node has a similar appearance of a button. It makes the .NET treeview control seem like so inadequate to me. Now I know utorrent is written in C++, but does anyone know how they might have done this, or does anybody know of libraries out there that would suffice?

| TreeView Control similar to that of utorrent | CC BY-SA 2.5 | null | 2010-12-08T20:47:08.773 | 2011-04-06T07:45:23.667 | 2010-12-08T20:56:29.163 | 60,761 | 141,831 | [
"c#",
".net",
"wpf",
"winforms",
"treeview"
] |
4,392,260 | 1 | 4,399,858 | null | 0 | 1,492 | Is it possible to specify the publisher name for Windows's User Account Control (UAC) when using NSIS (Nullsoft Scriptable Install System)?

| Specify the publisher name for Windows's User Account Control (UAC) when using NSIS? | CC BY-SA 2.5 | null | 2010-12-08T20:58:31.580 | 2010-12-09T15:26:10.007 | null | null | 191,419 | [
"windows",
"installation",
"uac",
"nsis"
] |
4,392,350 | 1 | 4,392,747 | null | 1 | 2,261 | I am modifying my program to get its values from a database and I am having some issues and I am a little bit confused on what to do. I've been stuck for days, I would appreciate the help.
When I select an item on my spinner(populated from database), I need it to pass the INT value along with it so I can send it to another activity.
So far my code looks like this, the database utility:
public class DbUtility {
```
static final String DB_NAME="food";
static final String BEEF_TABLE="beef";
static final String CHICKEN_TABLE="chicken";
SQLiteDatabase db=null;
Context context;
public static class DatabaseHelper extends SQLiteOpenHelper
{
public DatabaseHelper(Context context, String name, CursorFactory factory, int version)
{
super(context, name, factory, version);
// TODO Auto-generated constructor stub
}
@Override
public void onCreate(SQLiteDatabase db)
{
db.execSQL("CREATE TABLE IF NOT EXISTS BEEF_TABLE (_id INT PRIMARY KEY,name VARCHAR, cookTime INT);");
db.execSQL("INSERT INTO BEEF_TABLE values(1,'Skirt Steak', 23000);");
db.execSQL("INSERT INTO BEEF_TABLE values(2,'Flank Steak',23000);");
db.execSQL("INSERT INTO BEEF_TABLE values(3,'Filet Mignon',23000);");
db.execSQL("CREATE TABLE IF NOT EXISTS CHICKEN_TABLE (_id INT PRIMARY KEY,name VARCHAR, cookTime INT);");
db.execSQL("INSERT INTO CHICKEN_TABLE values(1,'Breast',20000);");
db.execSQL("INSERT INTO CHICKEN_TABLE values(2,'Wings',10000);");
db.execSQL("INSERT INTO CHICKEN_TABLE values(3,'Burger',30000);");
}
@Override
public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
}
}
public DbUtility(Context context) {
this.context=context;
}
public SimpleCursorAdapter getBeefAdapter()
{
DatabaseHelper dbhelper=new DatabaseHelper(this.context, DB_NAME, null, 1);
db=dbhelper.getWritableDatabase();
Cursor beefCursor=db.rawQuery("SELECT * FROM BEEF_TABLE", null);
while(!beefCursor.isLast())
beefCursor.moveToNext(); //I don't understand why but it's necessary (alternative call c.getCount() )
String[] beefType=new String[1];
int[] to=new int[1];
beefType[0]="name";
to[0]=android.R.id.text1;
SimpleCursorAdapter beefAdapter=new SimpleCursorAdapter(this.context, android.R.layout.simple_spinner_item, beefCursor, beefType, to);
beefAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
db.close();
return beefAdapter;
}
public SimpleCursorAdapter getChickenAdapter()
{
DatabaseHelper dbhelper=new DatabaseHelper(this.context, DB_NAME, null, 1);
db=dbhelper.getWritableDatabase();
Cursor chickenCursor=db.rawQuery("SELECT * FROM CHICKEN_TABLE", null);
while(!chickenCursor.isLast())
chickenCursor.moveToNext(); //I don't understand why but it's necessary (alternative call c.getCount() )
String[] chickenType=new String[1];
int[] type=new int[1];
chickenType[0]="name";
type[0]=android.R.id.text1;
SimpleCursorAdapter chickenAdapter=new SimpleCursorAdapter(this.context, android.R.layout.simple_spinner_item, chickenCursor, chickenType, type);
chickenAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
db.close();
return chickenAdapter;
}
public int getCookTime(String theTable, String theFood)
{
DatabaseHelper dbhelper=new DatabaseHelper(this.context, DB_NAME, null, 1);
SQLiteDatabase db=dbhelper.getReadableDatabase();
int TheCookTime = 0;
Cursor foodCursor = db.rawQuery("SELECT * FROM " + theTable + " WHERE name='" + theFood + "'", null);
TheCookTime = foodCursor.getInt(foodCursor.getColumnIndex("cookTime"));
return TheCookTime;
}
```
I need to grab, cookTime INT and pass it to my spinner activity:
```
package com.tsilo.grillbuddy;
```
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.SimpleCursorAdapter;
import android.widget.Spinner;
public class ChickenActivity extends Activity {
```
int option1value;
int option2value;
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.spinner);
final DbUtility db=new DbUtility(this);
SimpleCursorAdapter beefAdapter=db.getBeefAdapter();
final Spinner beefSpinner=(Spinner)this.findViewById(R.id.spinner);
beefSpinner.setAdapter(beefAdapter);
SimpleCursorAdapter chickenAdapter=db.getChickenAdapter();
final Spinner chickenSpinner=(Spinner)this.findViewById(R.id.spinner2);
chickenSpinner.setAdapter(chickenAdapter);
Button TimerButton = (Button)findViewById(R.id.TimerActivityButton);
TimerButton.setOnClickListener(new View.OnClickListener(){
public void onClick(View v)
{
String beefSelection = (String) beefSpinner.getSelectedItem();
option1value = db.getCookTime(DbUtility.BEEF_TABLE, beefSelection);
String chickenSelection = (String) chickenSpinner.getSelectedItem();
option2value = db.getCookTime(DbUtility.CHICKEN_TABLE, chickenSelection);
Intent timer = new Intent (ChickenActivity.this,TimerActivity.class);
timer.putExtra("option1", option1value);
timer.putExtra("option2", option2value);
startActivity(timer);
}
});
}
```
: As you can see I incorporated the solution, I was required to change my spinners to final for them to work and change DbUtility to db. It compiles fine with no errors, and I am able to get to my chicken activity when I click it, but I now get a force close when I click my Timer Button, my DDMS looks as follows
---

| Android SQlite, How do you pass two values to another activity? | CC BY-SA 2.5 | 0 | 2010-12-08T21:08:51.380 | 2010-12-10T05:49:29.943 | 2010-12-10T02:54:40.963 | 484,707 | 484,707 | [
"android",
"sqlite",
"android-activity",
"android-intent",
"spinner"
] |
4,392,552 | 1 | 4,392,635 | null | 2 | 1,761 | How can I program hourglass behavior (similar like on picture) for my game?

Should I make something like gravitation and process each grain of sand?
What about digital hourglass (like on this clocks)?

| Hourglass visualization algorithm | CC BY-SA 2.5 | 0 | 2010-12-08T21:28:49.180 | 2010-12-08T22:50:29.610 | null | null | 446,876 | [
"algorithm",
"graphics"
] |
4,392,705 | 1 | null | null | 37 | 17,693 | I've been recently learning some VIM hackery and I have learned a lot of useful commands and gotten pretty efficient at editing text with VIM. I'm using the Finnish qwerty keyboard layout (see image below) which is pretty horrible for programming. All your usual coding special characters `()[]{}/\` happen by pressing either or and a key, but I'm already pretty used to that. I do not want to change my keyboard layout since I do quite a lot of writing and IRC chatting in my native language and for that I need the `ä` and `ö` characters (the `å` is useless for me, only the Swedes use that).
My problem is that some VIM commands have a pretty difficult keymapping by default, for example go-to-tag-under-cursor is ^] which translates to -- on a Finnish keyboard. This requires me to press the key with my left hand, with my right thumb and extending my right index finger to the key. This feels like using emacs and/or playing classical guitar. Not exactly ergonomic.
Here's what the keyboard layout looks like:

NOTE: the keys that are marked blue are written by pressing (right alt) and the appropriate key. The red ones are two-key compose characters or dead keys which do not give out a character by them selves. F.ex. to type the `ü` character you first press the key and then . Same goes for the accent keys. These dead keys are unmappable in VIM.
So basically I have 3 extra alphabetical keys () available, but they cannot be mapped more than once, modifier keys do not work with them (in VIM). I can map something to `ä`, but not `Ä` or `<C-ä>`.
Now I'm looking for ideas for my VIM setup from fellow Finnish/Swedish or other non-US keyboard layout users. Please share your key mappings, .vimrc tips and anything else that might be useful.
| Programmer's VIM setup for Finnish/Swedish or other non-US keyboard layout | CC BY-SA 3.0 | 0 | 2010-12-08T21:46:16.527 | 2022-08-21T14:40:38.060 | 2015-09-07T19:01:23.310 | 3,425,536 | 535,601 | [
"keyboard",
"keyboard-shortcuts",
"vim",
"keymapping"
] |
4,392,731 | 1 | null | null | 2 | 1,665 | 
I am trying to render a birds eye view of a 3d environment to a texture and draw that texture as a HUD to represent a mini map as if it was a camera looking down at the game from above. I am pretty new at 3D programming and the DirextX API so I need help with this. From working with some examples and tutorials this is what I have but still no success.
Pretty much I don't know how to properly draw the texture onto the screen as a HUD. What happens is the engine runs the beginProjectScene() and endProjectScene() methods followed by the beginSuperImpose() method.
beginProjectScene() creates a texture to draw on, creates the appropriate view and projection matrices and back buffer as well a a new viewport and sets them after backing up the current ones. It also sets the appropriate render targets.
endProjectScene() restores the backed up matrices, viewport, back buffer.
beginSuperImpose() is supposed to draw the texture (texH) to screen.
There are some other methods called through the display device (d3dd) to D3D API methods to make this happen. But it doesn't seem to work, in fact nothing happens likely and I am not sure why. Previously before restoring the render target to the backed up back buffer in endProjectScene() the screen just went black (for obvious reasons). I believe much of my problem is working with multiple viewports and much of the concepts are relatively new and I am still trying to fully grasp.
Also when SetTexture(0, texH) call is made after restoring back buffer my white spheres turn blue.
I referred to this a bit: [http://www.two-kings.de/tutorials/dxgraphics/dxgraphics16.html](http://www.two-kings.de/tutorials/dxgraphics/dxgraphics16.html)
Main engine loop:
```
int Engine::run() {
....
// update the model components
design->update(rightNow);
Viewing->update(rightNow);
audio->update(rightNow);
lighting->update();
hud->update(rightNow);
//NEW CODE FOR HUD BEGIN
// create the projection here - this part is new
display->beginProjectScene();
// draw the opaque scene objects
scene->draw(true);
// then the translucent/transparent objects
display->alphaBlendOn();
scene->draw(false);
display->alphaBlendOff();
display->endProjectScene();
//NEW CODE FOR HUD END
// draw the scene
display->beginDraw();
// draw the opaque scene objects
scene->draw(true);
// then the translucent/transparent objects
display->alphaBlendOn();
scene->draw(false);
display->alphaBlendOff();
// draw the HUD
display->beginSuperimpose();
hud->draw();
display->endDraw();
....
}
```
Display:
```
void Display::beginProjectScene() {
// create the texture COM object on which to draw
// if the texture COM object does not yet exist
//
if (!texH && FAILED(D3DXCreateTexture(d3dd, TEXTURE_WIDTH,
TEXTURE_HEIGHT, 0, D3DUSAGE_RENDERTARGET | D3DUSAGE_AUTOGENMIPMAP,
D3DFMT_R5G6B5, D3DPOOL_DEFAULT, &texH)))
error(L"Projection::11 Failed to create projection texture");
// get the interface to the surface for the texture - GetSurfaceLevel
// increases the reference count by 1 so we will have
// to Release the interface when done
//
if (texH && SUCCEEDED(texH->GetSurfaceLevel(0, &textureSurface))) {
// build the view matrix
//
// define position, heading, and up direction of camera and
// create a view matrix and set the view transformationf
//TEMPORTY VALUES
Vector up(0,1,0);
Vector heading(0,0,0);
Vector position(0.5,1,0.5);
Vector view(1,0,0);
// the look at point from the virtual camera
Vector lookAt = position + heading;
Matrix viewH =
::view(view, position+heading, up);
// build the projection matrix
// ...TEST VALUES
Matrix projectionProjection =
::projection(FIELD_OF_VIEW, aspect, NEAR_CLIPPING,
FAR_CLIPPING);
// back up the projection matrix and the viewport, and back buffer
d3dd->GetTransform(D3DTS_PROJECTION, &projBak);
d3dd->GetViewport(&viewportBak);
d3dd->GetRenderTarget(0, &pBackBuffer);
// associate the backbuffer with the texture surface
d3dd->SetRenderTarget(0, textureSurface);
// project the scene onto the texture
d3dd->Clear(0, NULL, D3DCLEAR_TARGET | D3DCLEAR_ZBUFFER,
D3DCOLOR_ARGB(100, 100, 100, alpha), 1.0f, 0);
d3dd->BeginScene();
//d3dd->SetTexture(0, texH);
d3dd->SetTransform(D3DTS_VIEW, (D3DXMATRIX*)&viewH);
d3dd->SetTransform(D3DTS_PROJECTION, (D3DMATRIX*)&projectionProjection);
// define the viewport for the texture
D3DVIEWPORT9 viewport;
viewport.X = 0;
viewport.Y = 0;
viewport.Width = TEXTURE_WIDTH;
viewport.Height = TEXTURE_HEIGHT;
viewport.MinZ = 0.0f;
viewport.MaxZ = 1.0f;
d3dd->SetViewport(&viewport);
//d3dd->EndScene();
}
}
void Display::endProjectScene() {
d3dd->SetRenderTarget(0, pBackBuffer);
d3dd->Clear(0, NULL, D3DCLEAR_TARGET | D3DCLEAR_ZBUFFER,
D3DCOLOR_ARGB(100, 100, 100, alpha), 1.0f, 0);
//d3dd->BeginScene();
//d3dd->SetTexture(0, texH);
// restore the projection and viewport
d3dd->SetTransform(D3DTS_PROJECTION, &projBak);
d3dd->SetViewport(&viewportBak);
d3dd->EndScene();
// release the backbuffer associated with the texture
textureSurface->Release();
pBackBuffer->Release();
//texH->Release();
}
void Display::beginSuperimpose() {
// prepare to draw the hud
//
if (spriteManager_){
// start the sprite manager
spriteManager_->Begin(D3DXSPRITE_ALPHABLEND);
//NEW CODE FOR HUD
Vector topRight(width() * 0.01f, height() * 0.01f, 0);
spriteManager_->Draw(texH, NULL, NULL, (D3DXVECTOR3*)&topRight,
D3DCOLOR_RGBA(SPRITEH_R, SPRITEH_G, SPRITEH_B, 1));
}
}
```
| Render to texture for mini map, dirextX | CC BY-SA 2.5 | null | 2010-12-08T21:48:33.780 | 2013-05-21T13:33:19.793 | 2010-12-08T22:53:15.577 | 448,967 | 448,967 | [
"c++",
"directx",
"direct3d",
"textures"
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.