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
sequence |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
3,870,519 | 1 | null | null | 2 | 409 | Email Match field = '@hotmail.com'
Email Match field entered: Results 1199 - speed of return 40 seconds
Email Match field not entered: Results 429 - speed of return 1.6 seconds
```
SELECT * FROM emails e where e.[From] like '%@hotmail.com%' OR e.[To] like '%@hotmail.com%'order by [id] DESC
```
I have to use % at start and end because i want to search this in email addresses
Edit:



Execution plan of original query
| Search results are very slow when retrieving Varchar Records using like operator | CC BY-SA 3.0 | null | 2010-10-06T08:06:01.070 | 2016-12-28T14:11:18.457 | 2016-12-28T14:11:18.457 | 1,033,581 | 467,710 | [
"sql-server-2005"
] |
3,870,748 | 1 | 3,944,712 | null | 11 | 5,749 | I'm trying to find out what effects the Photoshop "Poster edges" filter is composed of. It seems it's a combination of edge detection and posterization, but I haven't been able to duplicate it, not even close, with these so I guess I'm missing something. The image below shows the same image before and after the Poster edges filter:

I've tried performing posterization (and quantization) on the image, along with edge detection using Sobel, but apparently Photoshop is doing something different as the results are very different. Basically the posterization looks very different and edges are very weak compared to the photoshop filter.
So does anybody know how the Poster edges filter is implemented, or have any idea what image-processing should be done to achieve the latter image from the former.
Not that it really matters, but I'm using Java, and my image filtering code is based for the most part on the filters found here: [http://www.jhlabs.com/ip/filters/index.html](http://www.jhlabs.com/ip/filters/index.html)
Description of the filter from adobe.com:
| Implementing Photoshop's "Poster edges" -filter | CC BY-SA 2.5 | 0 | 2010-10-06T08:37:26.377 | 2013-02-06T15:30:58.333 | 2010-10-14T15:28:55.523 | 319,618 | 251,455 | [
"java",
"image-processing"
] |
3,871,424 | 1 | 3,871,582 | null | 3 | 2,152 | Instead of spawning a separate command window as a child window, is it possible to host a command console as a child control of a form?
Example:

| Is it possible to display a command window inside a windows form? | CC BY-SA 2.5 | 0 | 2010-10-06T10:10:19.347 | 2017-02-27T14:00:37.910 | null | null | 98,389 | [
".net",
"winforms",
"command-line"
] |
3,871,505 | 1 | 3,871,574 | null | 2 | 2,100 | I write code in isolation, that is I work for myself. I need some advice on how you might implement the following functionality or if there are some tools that already exist to help make this task easier to accomplish.
I have a scenario (C# application) in which I would like the user to be able to enter conditional rules which will then be used elsewhere in the program for various calculations.
As a simple example let's say we have a TimeRequiredForJob property and we need to calculate this in the program based upon the users rules. A simple rule might be
TimeRequiredForJob = 200 Balloons multiplied by 5 min each, or
TimeRequiredForJob = 20% of HoursInAfternoon
I am guessing its pretty hard to see what I am looking for so maybe the following image will help:

This is from DevExpress XtraGrid and it allows a user to filter data displayed in the grid based upon the users custom filter rules. I would like to implement something similar but be able to save the rules to a database and use those rules later in the application.
Any suggestions or tips welcome.
[Late Edit]
Actually I am getting some good information from [this question](https://stackoverflow.com/questions/1644146/user-defined-formulas-in-c) but any additional information will be appreciated.
| C# Allow user to enter conditional rules | CC BY-SA 2.5 | 0 | 2010-10-06T10:21:13.430 | 2010-10-07T11:59:33.403 | 2017-05-23T12:24:45.570 | -1 | 467,820 | [
"c#",
"user-interface",
"business-logic",
"conditional-operator",
"conditional-statements"
] |
3,871,506 | 1 | 3,871,660 | null | 0 | 403 | I'm working on a simple widget for the Wordpress CMS. The widget just supposed to render some database records. I put the widget file (`function.php`) into the theme folder (`themes/vigilance/`):
```
if (function_exists('register_sidebar_widget'))
{
register_sidebar_widget('TwiMoldova','twimoldova');
}
function twimoldova()
{
include('widgets/twimoldova.php');
}
```
:
```
<?php
echo "<p>";
?>
<div class="widget" style="border-width:thin; border-style:solid; padding: 7px; font-size: 14px;">
<?php
define('DB_HOST', 'host');
define('DB_NAME', 'name');
define('DB_USER', 'user');
define('DB_PASS', 'pass');
echo '<p align="center"><a href="http://rating.twimoldova.com/"><b>Рейтинг Twitter в Молдове</b></a></p>';
echo "<b>Статистика</b>:<br/>";
$conn = mysql_connect(DB_HOST, DB_USER, DB_PASS);
mysql_select_db(DB_NAME, $conn);
$sql = "SELECT COUNT(username) FROM twitter_users;";
$rs_result = mysql_query($sql, $conn);
$row = mysql_fetch_row($rs_result);
echo "Всего в рейтинге: ".$row[0]."<br/>";
//...
?>
</div>
```
The widget can't display the data because of MySQL error:

But If I run the script without Wordpress it renders table records:

Where is a catch?
| Simple Wordpress widget: resolving MySQL error | CC BY-SA 3.0 | null | 2010-10-06T10:21:17.663 | 2017-08-12T21:29:05.507 | 2020-06-20T09:12:55.060 | -1 | 211,848 | [
"php",
"mysql",
"wordpress"
] |
3,871,656 | 1 | null | null | 1 | 6,575 | As every web-developer I'm tired of Internet Explorer...
I'm working on a new website and use font-face (the problem may not be related but just in case...):
```
@font-face {
font-family: 'ArabicTypesettingRegular';
src: url('arabtype-webfont.eot');
src: local('☺'), url('../../../partilhado/fontes/arabtype-webfont.woff') format('woff'), url('../../../partilhado/fontes/arabtype-webfont.ttf') format('truetype'), url('../../../partilhado/fontes/arabtype-webfont.svg#webfontz5xQb9Ii') format('svg');
font-weight: normal;
font-style: normal;
}
```
The problem that I'm facing with is related w/ anti-alias/font smoothing... It's working fine in every browser but IE8 (I don't care about older versions)... To complicate it a little bit more, it works on some titles, but in some others it fails.. I can assure that the elements share the same classes, as you can see in my example [HIGHER RESOLUTION IMAGE HERE](http://www.dev.multisnet.com/anti-alias-ie-problem/ie-vs-firefox-anti-alias.png)..

Css class:
```
.title{
font-family:"Arabic Typesetting";
font-size:24px;
margin-top:10px;
}
```
I tried to change it from 'px' to 'pt' but it didn't solve my problem...
[EDIT] I remove font-face and with Arial the problem remains the same...[/EDIT]
Do you have any ideas? Or some comments about this issue...
---
Thanks in advance,
Pedro
| IE8 - Font anti-alias strange behaviour (w/ prints. example) | CC BY-SA 2.5 | 0 | 2010-10-06T10:43:53.290 | 2010-10-06T12:57:52.770 | null | null | 444,340 | [
"css",
"internet-explorer",
"internet-explorer-8",
"font-face",
"antialiasing"
] |
3,871,689 | 1 | null | null | 1 | 716 | I am a newbie to Android Development, and facing this particular problem while changing TabBackground Image.
As you can see in the attached Image, there is a thin gray line. And I am unable to figure out where is it coming from. Can you please assist me in removing it.
I have checked there is no padding anywhere, and android:layout_width="wrap_content" and android:layout_height="wrap_content".


| How to properly change Tab Background in Android | CC BY-SA 2.5 | 0 | 2010-10-06T10:48:42.437 | 2013-03-21T12:25:35.460 | null | null | 204,501 | [
"android",
"user-interface",
"tabwidget"
] |
3,871,873 | 1 | null | null | 0 | 411 | I have a asp.net page (page1.aspx), inside that I have a iframe, Inside the iframe I am loading another page(page2.aspx). Inside that page(page2.aspx) I have a button. When I click on that button jqModal pops up. It comes up covering the iframe which is in page2.aspx. How can i make the jqModal div to allocate parent page(page1.aspx) full space.

| jqModal iframe issue | CC BY-SA 2.5 | null | 2010-10-06T11:16:22.087 | 2011-08-07T21:57:25.537 | null | null | 192,901 | [
"asp.net",
"jquery",
"jqmodal"
] |
3,872,112 | 1 | 3,891,968 | null | 10 | 12,568 |
At my work place, passport sized photographs are scanned together, then cut up into individual pictures and saved with unique file numbers. Currently we use Paint.net to manually select, cut and save the pictures.
(from: google image search multiple sources, fairuse)

For eg. In Picasa 3.8, On clicking View > People, all the faces are shown and I am asked to name them, can I save these individual pictures automatically with the names as different pictures?
In the image above, I have shown how Picasa 3.8 detects the images and prompts me to name them. I do not need face recognition, I simply need face detection. Picasa detects the individual images and shows them on the RHS. These individual images are what I need. Picasa creates a .ini file which saves the hex values which contains the co-ordinates of the individual faces.

```
[SAMPLE.jpg]
faces=rect64(c18f4c8ef407851e),d4ff0a020be5c3c0;rect64(534a06d429ae627),dff6163dfd9d4e41;rect64(b9c100fae46b3046),e1059dcf6672a2b3;rect64(7b5105daac3a3cf4),4fc7332c107ffafc;rect64(42a036a27062a6c),ef86c3326c143248;rect64(31f4efe3bd68fd8),90158b3d3b65dc9b;rect64(327904e0614d390d),43cbda6e92fcb63e;rect64(4215507584ae9b8c),15b6a967e857f334;rect64(895d4efeb8b68425),5c4ff70ac70b27d3
backuphash=3660
```
*The ini file seems to be saving the co-ordinates of the face tags as `rect64(534a06d429ae627),dff6163dfd9d4e41` for each tag.
Quoting from [Picasa Help Site](http://www.google.com/support/forum/p/Picasa/thread?tid=36ae553a7b49088e&hl=en) user [Technonath](http://www.google.com/support/forum/p/Picasa/user?userid=02815233294807518823&hl=en) says
> @oedious wrote:- This is going to be
somewhat technical, so hang on.
* The number encased in rect64() is a 64-bit hexadecimal number.
* Break that up into four 16-bit numbers.
* Divide each by the maximum unsigned 16-bit number (65535) and you'll have
four numbers between 0 and 1.
* The four numbers remaining give you relative coordinates for the face
rectangle: (left, top, right, bottom).
* If you want to end up with absolute coordinates, multiple the left and
right by the image width and the top
and bottom by the image height.
The above quote talks about the number encased in rect64() what about the number outside the parentheses after the comma?
I have asked a related question. Answers of which may help you too.
[Get four 16bit numbers from a 64bit hex value](https://stackoverflow.com/questions/3892408/get-four-16bit-numbers-from-a-64bit-hex-value)
> Note: The
ini details are the same which picasa
generated for the particular image.Plus the question has been updated multiple times and may not be clear enough.
There are some responses at the [Picasa Help site](http://www.google.com/support/forum/p/Picasa/thread?tid=36ae553a7b49088e&hl=en), where I asked the same question
One of the answers from that thread to get co-ordinates based on the hex values from the ini file. The following code is in C# from [esac](http://www.google.com/support/forum/p/Picasa/user?userid=06712422887226750608&hl=en) from the help site. Can I do the same in PHP?
```
public static RectangleF GetRectangle(string hashstr)
{
UInt64 hash = UInt64.Parse(hashstr, System.Globalization.NumberStyles.HexNumber);
byte[] bytes = BitConverter.GetBytes(hash);
UInt16 l16 = BitConverter.ToUInt16(bytes, 6);
UInt16 t16 = BitConverter.ToUInt16(bytes, 4);
UInt16 r16 = BitConverter.ToUInt16(bytes, 2);
UInt16 b16 = BitConverter.ToUInt16(bytes, 0);
float left = l16 / 65535.0F;
float top = t16 / 65535.0F;
float right = r16 / 65535.0F;
float bottom = b16 / 65535.0F;
return new RectangleF(left, top, right - left, bottom - top);
}
```
convert 64bit to numbers between 1 and 0
```
<?php
$dim = getimagesize("img.jpg");
$hex64=array();
$b0="c18f4c8ef407851e";
$hex64[]=substr($b0,0,4);
$hex64[]=substr($b0,4,4);
$hex64[]=substr($b0,8,4);
$hex64[]=substr($b0,12,4);
$width=$dim[0];
$height=$dim[1];
foreach($hex64 as $hex16){
$dec=hexdec($hex16);
$divide=65536;
$mod=$dec%$divide;
$result=$dec/$divide;
$cordinate1=$result*$width;
$cordinate2=$result*$height;
echo "Remainder 1 : ".$mod." ; Result 1 : ".$result."<br/>CO-ORDINATES : <B>".$cordinate1." ".$cordinate2."</B><br/>";
}
?>
```
> Remainder 1 : 49551 ; Result 1 :
0.75608825683594 CO-ORDINATES : 371.99542236328 396.94633483887 Remainder 1 : 19598 ; Result 1 :
0.29904174804688 CO-ORDINATES : 147.12854003906 156.99691772461 Remainder 1 : 62471 ; Result 1 :
0.95323181152344 CO-ORDINATES : 468.99005126953 500.4467010498 Remainder 1 : 34078 ; Result 1 :
0.51998901367188 CO-ORDINATES : 255.83459472656 272.99423217773
So I have the co-ordinates too and @Nirmal has [shown how to crop them](https://stackoverflow.com/questions/3872112/automatic-face-detection-using-picasa-api-to-extract-individual-images/3932181#3932181). Now next steps would be to parse picasa.ini for the hex codes and file names and integrate the code. Picasa doesn't currently provide the hex codes via a api(or [Do they?](http://code.google.com/apis/picasa/)). If that were the case, things would have been better.
So we are nearing a solution. Thank you all, I wish I could award the bounty to everyone(I cannot, but fear not and look out for a spike in your rep!)
| Automatic face detection using Picasa API to extract individual images | CC BY-SA 2.5 | 0 | 2010-10-06T11:52:21.217 | 2011-03-08T16:42:06.790 | 2017-05-23T12:00:17.880 | -1 | 405,861 | [
"php",
"api",
"picasa",
"face-recognition"
] |
3,872,209 | 1 | 3,873,684 | null | 1 | 686 | I am doing research about network traffic characterization.
While processing collected data (captured by tcpdump and saved to a database), I stumbled over the weird phenomenon with packet (or flow) inter-arrival times:
Of course, without a DAG card (which would do hardware time stamping of the packets), I can't rely on a precision in dimensions below msec. Nevertheless I'm searching for a reason, why this gaps exists in the following cumulative distribution function:
I've also plotted the number of flows seen with a specific IAT: 
My data basis contains >13 Mio flows, so it's very unlikely that this gap exists by accident - I'm only searching for the reason.
I know the linux kernel scheduler (was a debian machine) uses a frequency of 250Hz, thus each tick is 4ms, which is bigger than my gap of 35-170µsec by factor >200.
Is there any kind of scheduling done by the network card? There are IATs of 0µsec seen, so I assume these packets are processed directly after each other. I can imagine that the kind of scheduler tick I'm searching for is about 40µsec, resulting in IATs of 0<x<40µsec and afterwards other things than my capturing is done (for 120µsec = 3ticks) and I get only ticks >120µsec.
Do you have a clue, how I could explain this gap?
Thanks a lot!
Steffen
| libpcap inter-arrival times and scheduler | CC BY-SA 2.5 | null | 2010-10-06T12:05:34.780 | 2010-10-06T14:41:19.240 | null | null | 400,222 | [
"linux",
"networking",
"pcap",
"libpcap",
"tcpdump"
] |
3,872,920 | 1 | null | null | 0 | 311 | When I try to run my app on the iPad the buttons are too big.
Below is two images One is of the app running on the iPHone sim. The other is the app running on the iPad sim. Notice the button in the iPad apps left hand corner. The button is too big. This is the code I use to create nav buttons.
Any help appreciated.
```
//add back bar button
UIImage *imageBackBtn;
UIButton *btnBack = [UIButton buttonWithType:UIButtonTypeCustom];
imageBackBtn = [[UIImage imageNamed:@"ButtonBack.png"] stretchableImageWithLeftCapWidth:10 topCapHeight:10];
[btnBack setBackgroundImage:imageBackBtn forState:UIControlStateNormal];
[btnBack addTarget:self action:@selector(cancel:)
forControlEvents:UIControlEventTouchUpInside];
btnBack.adjustsImageWhenDisabled = NO;
btnBack.adjustsImageWhenHighlighted = NO;
btnBack.frame = CGRectMake(0, 0, 49, 30);
UIBarButtonItem *btnItemCancel = [[[UIBarButtonItem alloc] initWithCustomView:btnBack] autorelease];
self.navigationItem.leftBarButtonItem = btnItemCancel;
```


| iPhone SDK: Button appears too stretched for iPhone app running on iPad | CC BY-SA 2.5 | null | 2010-10-06T13:26:38.017 | 2011-01-21T10:51:27.153 | 2010-11-18T07:09:04.910 | 58,014 | 352,285 | [
"iphone"
] |
3,872,940 | 1 | 3,872,984 | null | 5 | 9,626 | In the attached picture there's a symbol I don't understand. To understand additive functional dependency I need to know what the symbol means. Please advice?

It's the symbol where it says: "Suppose that X Y and that..."
= ?
Thanks!
| What does the symbol "⊇" mean? | CC BY-SA 2.5 | null | 2010-10-06T13:28:25.227 | 2021-03-03T10:52:49.413 | 2010-10-06T13:35:15.753 | 224,671 | 264,557 | [
"normalization",
"database-theory",
"functional-dependencies"
] |
3,873,307 | 1 | 3,873,467 | null | 2 | 1,530 | These questions relate to the basics of networking, but I have not found an answer yet!
Can a 100Mbps switch handle 2 simultaneous TCP streams running at 100Mbps? To illustrate this if you have 4 PC's on 1 switch (100Mbps with no other connections) and you had two separate streams, what speed would they reach? Would one stream impact on the others speed, or is a switch fast enough internally to deal with many streams?

---
I have set up 1 PC (Linux) on a dedicated network switch, the PC has 2 Network Interface Cards (NIC). Both NIC's have different IP address' and work fine. If I send any data from one NIC to the other absolutely no traffic is send on the network switch. It seams that the kernel is intelligent and works out there's no need to send anything on the network as the IP's are on the same PC. How do I turn this off?

---
As I don't have access to 4 PC's I cannot test question 1 in the real world. These are very simple questions, but at the same time very difficult to answer.
Thanks!
| 1 Linux PC with two network cards cannot produce network traffic for test system | CC BY-SA 2.5 | null | 2010-10-06T14:05:22.530 | 2010-10-06T14:30:59.420 | null | null | 429,383 | [
"linux",
"networking",
"network-programming"
] |
3,873,565 | 1 | 3,873,612 | null | 23 | 23,960 | how can I produce long negation lines in latex.
It should look like on the left of the following equations

I used `\[ \bar{(A \land B)} \]` but that just added a bar over the `\land`
Thank you for your help
| Long Negation Bar in LaTeX | CC BY-SA 2.5 | 0 | 2010-10-06T14:29:31.337 | 2012-01-20T18:27:17.543 | null | null | 328,991 | [
"latex"
] |
3,874,059 | 1 | 3,893,195 | null | 0 | 677 | I installed [NetBeans](http://en.wikipedia.org/wiki/NetBeans) 6.9.1 with C++ support. I also installed [MinGW](http://en.wikipedia.org/wiki/MinGW).
When I create a C++ project and run it, I get this:

I checked the C++ configuration in NetBeans (looks good):

Perl is installed on my PC under `C:\perl`.
I tried reinstalling NetBeans, and I tried removing NetBeans and Perl and then reinstalled NetBeans. It didn't work (`perl` is not recognized as internal command).
Otherwise, I have to work with [Dev-C++](http://en.wikipedia.org/wiki/Dev-C++) :( (I like the NetBeans functionality better:) )
| NetBeans fails to execute a Perl script when compiling C++ project | CC BY-SA 3.0 | null | 2010-10-06T15:17:16.643 | 2011-12-30T11:04:47.893 | 2011-12-30T11:02:40.997 | 63,550 | 373,207 | [
"c++",
"perl",
"netbeans",
"compilation",
"mingw"
] |
3,874,424 | 1 | 3,875,064 | null | 36 | 38,628 | I have the following custom view:

This I have achieved by using the Canvas' `drawArc()` method. However, with this `drawArc()` method I cannot limit the arc's inner radius.
What I'd like to have is something like this:

where there is only an outer ring left.
What I need is an `drawArc()` function where I can set the inner radius of the arc. Anyone an idea how to do that?
(BTW, overpainting the inner area doesn't work, because it needs to be transparent. Painting an inner circle with `Color.TRANSPARENT` after painting the red and blue cones doesn't remove the old color. It just puts another layer on top, which is transparent and through which I can still see the red and blue)
| Android: looking for a drawArc() method with inner & outer radius | CC BY-SA 3.0 | 0 | 2010-10-06T15:54:18.750 | 2019-02-25T07:34:06.707 | 2014-07-15T16:40:56.343 | 85,661 | 184,367 | [
"android",
"2d",
"draw",
"geometric-arc"
] |
3,874,436 | 1 | 3,874,569 | null | 52 | 32,699 | I got a line in fiddler2 looking like this:
```
ICON # status protocol host url
XXX 3 200 HTTP www.myserver.com /images/save.png
```
The icon shown is a forbidden icon like this: 
Actually i am analizing a loading problem in one of our customers intranets.
Can anyone please tell me what this icon stands for?
| What is the meaning of this fiddler icon? | CC BY-SA 3.0 | 0 | 2010-10-06T15:55:29.550 | 2017-07-12T16:29:28.167 | 2013-03-13T12:40:44.650 | 425,736 | 346,063 | [
"icons",
"fiddler"
] |
3,874,512 | 1 | 8,607,768 | null | 7 | 3,059 | We have clustered MSMQ for a set of NServiceBus services, and everything runs great until it doesn't. Outgoing queues on one server start filling up, and pretty soon the whole system is hung.
More details:
We have a clustered MSMQ between servers N1 and N2. Other clustered resources are only services that operate directly on the clustered queues as local, i.e. NServiceBus distributors.
All of the worker processes live on separate servers, Services3 and Services4.
For those unfamiliar with NServiceBus, work goes into a clustered work queue managed by the distributor. Worker apps on Service3 and Services4 send "I'm Ready for Work" messages to a clustered control queue managed by the same distributor, and the distributor responds by sending a unit of work to the worker process's input queue.
At some point, this process can get completely hung. Here is a picture of the outgoing queues on the clustered MSMQ instance when the system is hung:

If I fail over the cluster to the other node, it's like the whole system gets a kick in the pants. Here is a picture of the same clustered MSMQ instance shortly after a failover:

Can anyone explain this behavior, and what I can do to avoid it, to keep the system running smoothly?
| MSMQ messages bound for clustered MSMQ instance get stuck in outgoing queues | CC BY-SA 2.5 | 0 | 2010-10-06T16:03:04.110 | 2021-12-24T06:50:54.303 | 2012-07-02T11:41:15.210 | 97,160 | 10,039 | [
"msmq",
"message-queue",
"nservicebus",
"cluster-computing",
"msdtc"
] |
3,874,548 | 1 | 3,874,576 | null | 2 | 3,083 | I'm using following jQuery function to change the opacity of text (it's color: #999999)
```
$('.small_buttons').css('opacity', 0.3);
```
The effect looks good in Chrome or even Internet Explorer 8, but in current version of Firefox (3.6.10) this text gets really strange greenish colour, instead of nice pale gray.
Screenshots:
Chrome:

Firefox:

Help appreciated!
Update:
example: [http://jsfiddle.net/YnDFr/1/](http://jsfiddle.net/YnDFr/1/)
| CSS gray text opacity and Firefox color issue | CC BY-SA 3.0 | null | 2010-10-06T16:06:22.777 | 2011-12-15T23:37:55.863 | 2011-12-15T23:37:55.863 | 84,042 | 229,695 | [
"css",
"firefox",
"opacity"
] |
3,874,689 | 1 | null | null | 0 | 3,689 | ```
if (!(char.IsDigit(e.KeyChar)))
{
e.Handled = true;
}
```
The above code is not working properly
Below is the image error :

The problem space is "Clipboard"
| Only numbers in the text box | CC BY-SA 2.5 | null | 2010-10-06T16:21:06.967 | 2017-05-15T02:09:54.933 | null | null | 461,057 | [
"c#"
] |
3,874,706 | 1 | 8,313,987 | null | 3 | 639 | After doing some reading on the Model View Controller pattern it seems that the pattern is implemented quite differently in web frameworks vs desktop frameworks. With web based MVC frameworks the view and model never communicate directly. They can only communicate with the controller. But in desktop implementations, it seems that the view and model can communicate directly which doesn't make sense to me. That would seem to defeat the purpose of MVC of having separate, clean, isolated layers. Plus, what does the controller do if the view and model communicate directly?
Here is a diagram from [Wikipedia](http://en.wikipedia.org/wiki/Model%E2%80%93View%E2%80%93Controller) illustrating MVC.

[Model-View-Controller](http://en.wikipedia.org/wiki/Model%E2%80%93View%E2%80%93Controller)
| What are the differences in the MVC pattern on the web vs desktop? | CC BY-SA 2.5 | 0 | 2010-10-06T16:22:35.373 | 2011-11-29T16:12:23.990 | 2011-07-05T22:13:14.683 | 446,591 | 202,240 | [
"model-view-controller",
"design-patterns",
"desktop"
] |
3,875,942 | 1 | null | null | 0 | 163 | First of all some notes:
1. As I realize I'm asking for relatively a lot, I shall offer a (humble 50 rep) bounty ASAP, even if I'll get an answer before doing that.
2. I'm noob at this, so any direction would help.
3. I'd like only Linq2Sql designer or association properties solution, as it seems most elegant.
4. this is a follow-up question to [this](https://stackoverflow.com/questions/3843462/how-do-you-get-values-from-three-different-tables-using-linq-to-sql) question where I got some directions, but couldn't really make it done.
5. I've really looked up this subject thoroughly, but couldn't understand how to do this.
6. I'm using ASP.NET MVC
And now the question:
I have three sql tables:
ID
Body
QuesionID
AnswerID
ID
Body
IsCorrect
Each has a corresponding Class:
```
[Table]
public class Questions
{
[Column]public int ID;
[Column]public string Body;
}
[Table]
public class QuestionsAndAnswers
{
[Column]public int QuestionID;
[Column]public int AnswerID;
}
[Table]
public class Answers
{
[Column]public int AnswerID;
[Column]public string Body;
[Column]public bool IsCorrect;
}
```
I also have object model class that represent a question:
```
public class Question
{
public string Body;
public List<Answer> Answers;
}
```
My question is how do I CRUD over my object model.
How is the mapping between the DB - associated classes - object model is done?
Here's what I started doing using the designer:

But I can't really say I understand how this works.
Is the object model class necessary, or should I lose it?
And how do I make this all as "automatic" as possible?
Thanks for your time.
| CRUDing composite object using association properties / LINQ2SQL desginer | CC BY-SA 2.5 | null | 2010-10-06T18:55:45.590 | 2011-06-24T11:54:55.523 | 2017-05-23T12:13:39.697 | -1 | 424,952 | [
"c#",
"linq",
"linq-to-sql"
] |
3,875,981 | 1 | null | null | 4 | 871 | I'd like Textmate to highlight Ruby syntax inside `<% %>` tags in *.js.erb files (like it does in *.html.erb files). Right now it looks like this:

As you can see, everything within the quotes is treated like a regular JS string – annoying.
| Better syntax highlighting for js.erb files in Textmate | CC BY-SA 2.5 | 0 | 2010-10-06T18:59:22.513 | 2011-02-05T14:12:41.557 | null | null | 25,068 | [
"javascript",
"ruby-on-rails",
"syntax-highlighting",
"textmate",
"erb"
] |
3,876,216 | 1 | 3,876,335 | null | 1 | 301 | Starting today, I noticed that the Exceptions dialog within VS2010 appears empty, and I can therefore not make any selections within it. I am not sure where to go to begin trying to fix this, as I see no error or anything. This has previously worked. Following is a screenshot:

I have tried checking if any updates were installed recently (none were), and no new updates are available. Any help would be appreciated.
| Visual Studio 2010 Exceptions dialog is empty (as of today) | CC BY-SA 2.5 | null | 2010-10-06T19:35:42.013 | 2010-10-06T19:55:14.847 | null | null | 467,210 | [
"visual-studio",
"visual-studio-2010"
] |
3,876,228 | 1 | null | null | 3 | 1,334 | I have a long text message followed by a link and have put this inside a TextView. It's simply like this:
```
<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content" android:layout_height="wrap_content">
<LinearLayout android:orientation="vertical"
android:layout_width="wrap_content" android:layout_height="wrap_content">
<TextView android:id="@+id/details" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:padding="10dp"
android:text="@string/message" android:textSize="16sp" android:autoLink="web"/>
</LinearLayout>![alt text][1]
</ScrollView>
```
The problem is when I select the link the whole text becomes highlighted. How can this be prevented ?

| TextView getting highlighted after using linkify or autolink | CC BY-SA 2.5 | 0 | 2010-10-06T19:36:46.037 | 2015-08-05T15:20:16.490 | null | null | 109,603 | [
"android",
"textview",
"linkify"
] |
3,876,299 | 1 | 3,876,446 | null | 81 | 116,322 | I'm trying to merge two images together with PHP.
For example... how would I go about placing image one on top of image two or merge, with basic PHP?
I have tried something such as watermarking, but it doesn't seem to be working.


...and have it turn into this?

| Merging two images with PHP | CC BY-SA 2.5 | 0 | 2010-10-06T19:48:23.000 | 2020-05-05T12:54:53.637 | null | null | 161,920 | [
"php",
"image",
"merge",
"resize",
"overlay"
] |
3,876,376 | 1 | 3,876,392 | null | 0 | 84 | 
I used `svcutil.exe /t:metadata <url-to-xsd>` to download an xsd file.
Question: What are strange chatacters in the resulting file as displayed by using the 'type' command from the VS CMD prompt?
| What are the strange characters in the XSD downloaded by svcutil.exe | CC BY-SA 2.5 | null | 2010-10-06T20:00:57.877 | 2010-10-06T20:03:24.813 | null | null | 398,546 | [
"xsd",
"svcutil.exe"
] |
3,876,383 | 1 | 3,879,697 | null | 0 | 470 | I would like to know how would i create rollovers for my navigation bar, and also apply some JQuery to set the opacity 0 to 100 once the navigation has been hovered if that is possible.
My navigation when hovered. The glow in the letters.

HTML: (ignore the empty divs)
```
<nav>
<ul>
<div class="ref1"><!-- empty div for reflections --></div>
<li><a href="#">Home</a></li>
<li><a href="#">About Us</a></li>
<li><a href="#">Client Login</a></li>
<li><a href="#">Support</a></li>
<li><a href="#">Contact</a></li>
<div class="ref2"><!-- empty div for reflections --></div>
</ul>
</nav>
```
CSS:
```
nav { background: #282828 url(../images/nav-bg.png) repeat-x; border-radius: 6px; -webkit-border-radius: 6px; -moz-border-radius: 6px; -o-border-radius: 6px; margin: 24px auto; width: 638px; }
nav ul { padding: 18px 0; }
nav ul li { background: url(../images/nav-sep.jpg) left center no-repeat; display: inline; padding: 32px; margin: 0 auto; }
nav ul li:first-of-type { background: none; }
nav ul li:last-of-type { background: url(../images/ref2.png) no-repeat right bottom; margin: 10px 0 0 0; }
nav ul li a { color: #626262; font: 16px Arial, Helvetica, serif; }
nav ul li a:hover { color: #dfdfdf; }
```
| Navigation Rollovers with CSS and apply jQuery | CC BY-SA 2.5 | null | 2010-10-06T20:02:11.857 | 2010-10-07T07:54:43.810 | null | null | 363,551 | [
"jquery",
"css",
"navigation",
"rollovers"
] |
3,876,642 | 1 | 3,876,670 | null | 2 | 1,096 | In a .NET 4 web application I've set the property "renderAllHiddenFieldsAtTopOfForm" to "false" in the web.config. Unfortunately the hidden fields are still at the top.
Why is this? Does some other setting override it?

ide it?
| Why isn't "renderAllHiddenFieldsAtTopOfForm" not working? | CC BY-SA 2.5 | null | 2010-10-06T20:35:31.657 | 2010-10-06T20:39:37.510 | null | null | 12,252 | [
"asp.net",
"forms",
"seo",
"asp.net-4.0"
] |
3,876,646 | 1 | null | null | 5 | 3,096 | I'm trying to build a grouped UITableView cell like the table in user details in Twitter's app (former Tweetie app).
It's a cell with two sides, and you can select any of them separately (and the background turns blue, like a rounded button).
Anyone did something like it or know how they made it?
A screen shot from the view (it's the following, tweets, followers and favorites cells)

| Two cells in one row in UITableView | CC BY-SA 2.5 | 0 | 2010-10-06T20:35:59.547 | 2011-03-20T08:21:58.933 | null | null | 421,827 | [
"iphone",
"uitableview"
] |
3,876,888 | 1 | 3,876,912 | null | 2 | 780 | How do you correctly output PNG images with PHP so their shading, and other transparent effects don't fail.

seems to be outputting as

...is there a way so this doesn't happen?
I merged two images together.
```
<?php
// Create image instances
$dest = imagecreatefrompng('vinyl.png');
$src = imagecreatefromjpeg('cover2.jpg');
// Copy and merge
imagecopymerge($dest, $src, 10, 10, 0, 0, 180, 180, 100);
// Output and free from memory
header('Content-Type: image/png');
imagepng($dest);
imagedestroy($dest);
imagedestroy($src);
?>
```
| Output PNG images with transparency in PHP | CC BY-SA 2.5 | 0 | 2010-10-06T21:05:49.737 | 2010-10-06T21:11:51.100 | 2010-10-06T21:11:51.100 | 102,441 | 161,920 | [
"php",
"image",
"transparency",
"effects"
] |
3,877,323 | 1 | 3,877,401 | null | 3 | 7,297 | Am I missing something here?
I follow the instructions exactly on this page (and some of the other tutorials) but they always seem to be missing some key information as they don't work out of the box.
I added a bunch of packages that seemed like were missing, but now I'm stuck.
[http://developer.android.com/resources/tutorials/views/hello-gridview.html](http://developer.android.com/resources/tutorials/views/hello-gridview.html)
And a whole bunch of these for each of the drawable.sample_* references
```
package com.example.HelloGrid;
import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.widget.AdapterView;
import android.widget.GridView;
import android.widget.Toast;
import android.widget.AdapterView.OnItemClickListener;
import com.example.ImageAdapter.ImageAdapter;
public class HelloGrid extends Activity {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
GridView gridview = (GridView) findViewById(R.id.gridview);
gridview.setAdapter(new ImageAdapter(this));
gridview.setOnItemClickListener(new OnItemClickListener() {
public void onItemClick(AdapterView<?> parent, View v, int position, long id) {
Toast.makeText(HelloGrid.this, "" + position, Toast.LENGTH_SHORT).show();
}
});
}
}
package com.example.ImageAdapter;
import android.R;
import android.R.drawable;
import android.content.Context;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.GridView;
import android.widget.ImageView;
public class ImageAdapter extends BaseAdapter {
private Context mContext;
public ImageAdapter(Context c) {
mContext = c;
}
public int getCount() {
return mThumbIds.length;
}
public Object getItem(int position) {
return null;
}
public long getItemId(int position) {
return 0;
}
// create a new ImageView for each item referenced by the Adapter
public View getView(int position, View convertView, ViewGroup parent) {
ImageView imageView;
if (convertView == null) { // if it's not recycled, initialize some attributes
imageView = new ImageView(mContext);
imageView.setLayoutParams(new GridView.LayoutParams(85, 85));
imageView.setScaleType(ImageView.ScaleType.CENTER_CROP);
imageView.setPadding(8, 8, 8, 8);
} else {
imageView = (ImageView) convertView;
}
imageView.setImageResource(mThumbIds[position]);
return imageView;
}
// references to our images
private Integer[] mThumbIds = {
R.drawable.sample_2, R.drawable.sample_3,
R.drawable.sample_4, R.drawable.sample_5,
R.drawable.sample_6, R.drawable.sample_7,
R.drawable.sample_0, R.drawable.sample_1,
R.drawable.sample_2, R.drawable.sample_3,
R.drawable.sample_4, R.drawable.sample_5,
R.drawable.sample_6, R.drawable.sample_7,
R.drawable.sample_0, R.drawable.sample_1,
R.drawable.sample_2, R.drawable.sample_3,
R.drawable.sample_4, R.drawable.sample_5,
R.drawable.sample_6, R.drawable.sample_7
};
}
```

| Why doesn't the code from the Android SDK tutorials work out of the box? | CC BY-SA 3.0 | 0 | 2010-10-06T22:16:26.643 | 2013-08-14T15:55:11.790 | 2013-08-14T15:55:11.790 | null | 177,389 | [
"android",
"sdk"
] |
3,877,619 | 1 | 3,877,838 | null | 0 | 1,174 | Anyone know how facebook did this:
From what I know we cannot change the height of tabhost. I'm guessing that they laid the "Frank Cho" view over the tabhost to give it the appearance of being shorter but I may be wrong. Anyone know what's going on?
| TabHost on Facebook for Android | CC BY-SA 2.5 | 0 | 2010-10-06T23:24:44.393 | 2010-10-07T00:22:14.313 | null | null | 392,178 | [
"android",
"height",
"customization",
"android-tabhost"
] |
3,877,656 | 1 | 3,879,453 | null | 1 | 5,001 | Trying to run the following HQL with NHibernate:
```
select count(distinct t) as TweetCount
from Tweet t
join t.Tweeter u
left join t.Votes v
left join t.Tags tag
where t.App = :app
having count(distinct v) > 0
```
But for some reason the having clause is being ignored and it's counting all tweets when only 2 tweets have a vote. I basically want to count the number of Tweets that have at least one Vote.
Here is my database
I tried adding a group by to my query like so:
```
select count(distinct t) as TweetCount
from Tweet t
join t.Tweeter u
left join t.Votes v
left join t.Tags tag
where t.App = :app
group by t
having count(distinct v) > 0
```
...but it ended up returning a collection containing 2 integers each set to '1' instead of a unique result.
| NHibernate HQL - select count(*) with having - can't get it to work | CC BY-SA 2.5 | null | 2010-10-06T23:35:07.607 | 2010-10-07T07:17:25.933 | null | null | 143,253 | [
"nhibernate",
"hql",
"aggregate",
"having-clause"
] |
3,877,671 | 1 | 4,263,319 | null | 2 | 860 | I developed a desktop application, it's almost done but still contains some bugs which I'm eliminating.
I use a general [try...catch] block wrapped around my application
```
[STAThread]
static void Main()
{
try
{
program = new Program();
// ...
}
catch (Exception x)
{
// ...
MessageBox.Show(
message,
Resources.MESSAGEBOX_ERROR_CRASH_Caption,
MessageBoxButtons.OK,
MessageBoxIcon.Error);
}
}
```
my Program class constructor being:
```
public Program()
{
// [...]
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
// [...]
frmLogon = new Logon();
Application.Run(frmLogon);
}
```
to ensure that any unhandled exception will bubble all the way up the stack and is at least responded to with some communicative message box.
It works fine when I run the application under Visual Studio (debug mode), but when I deployed it and installed on my PC, it doesn't - that's what I get when the bug (which I've already identified, by the way) causes it to read from a null array

Why? It baffles me really. Why was it "unhandled"? It was my understanding that should work regardless of whether it's release or debug mode, otherwise what would be the point.
| Exceptions not caught in release build (WinForm desktop app, C#, VS 2010) | CC BY-SA 2.5 | 0 | 2010-10-06T23:39:21.183 | 2010-11-24T03:56:16.273 | null | null | 168,719 | [
"c#-4.0",
"release",
"try-catch",
"unhandled-exception"
] |
3,878,061 | 1 | null | null | 2 | 4,300 | I have the following Oracle SQL:
```
Begin
-- tables
for c in (select table_name from user_tables) loop
execute immediate ('drop table '||c.table_name||' cascade constraints');
end loop;
-- sequences
for c in (select sequence_name from user_sequences) loop
execute immediate ('drop sequence '||c.sequence_name);
end loop;
End;
```
It was given to me by another dev, and I have no idea how it works, but it drops all tables in our database.
It works, but it takes forever!

I don't think dropping all of my tables should take that long. What's the deal? And, can this script be improved?
There are somewhere around 100 tables.
| Oracle performance when dropping all tables | CC BY-SA 3.0 | 0 | 2010-10-07T01:20:34.327 | 2020-04-17T12:34:45.553 | 2013-12-13T13:04:43.100 | 6,742 | 2,598 | [
"sql",
"oracle",
"sql-drop"
] |
3,878,354 | 1 | 3,878,459 | null | 2 | 4,216 | ```
CREATE TABLE [dbo].[MembershipModule](
[Id] [uniqueidentifier] ROWGUIDCOL NOT NULL,
[ParentId] [uniqueidentifier] NULL,
[TargetId] [int] NULL,
[WebContentId] [uniqueidentifier] NULL,
[Name] [varchar](35) NOT NULL,
[NameUpper] AS (isnull(upper([Name]),'')) PERSISTED NOT NULL,
[UriPrefix] [varchar](max) NULL,
[UriText] [varchar](max) NULL,
[UriComputed] AS ??? PERSISTED,
[Description] [varchar](100) NULL,
[Created] [date] NOT NULL,
[Modified] [datetime2](7) NOT NULL,
[MenuItem] [bit] NOT NULL,
[Enabled] [bit] NOT NULL,
[Position] [smallint] NULL,
CONSTRAINT [PK_MembershipModule] PRIMARY KEY CLUSTERED
(
[Id] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
```
So far the UriComputed field is computed like this:
```
lower(replace(isnull([UriPrefix],'/')+coalesce([UriText],[Name]),' ','-'))
```
This produces output like the following

Now, I'd want to terminate all UriComputed values with `'/'`. This would be easily accomplished by adding `+ '/'` to the computed field, except for the fact that "textless" uris, would be terminated like //, which I don't want happening.
since the sql I can put into a computed field is quite limited (and I don't really know the extents of these limitations) I thought I'd ask here how to add this.
basically I want the output in the image to be
> ```
/a/login/
/a/announcements/
/a/
/
```
my closest attempt at doing this has been:
```
isnull(convert(varchar(MAX),nullif(len(coalesce([UriText],[Name])),0)),'/')
```
Which does kind of a mess, and adds a number if it should terminate in '/', and adds '/' when it should, what I'd need is the opposite ( that is, '/' when the length is 0, '' otherwise)
If there's an inline if or something like that I could use that would basically be it, but I don't know about that.
Thank you!
| TSQL Computed column limitations | CC BY-SA 2.5 | null | 2010-10-07T02:56:22.470 | 2010-10-07T03:29:09.173 | 2010-10-07T03:29:09.173 | 135,152 | 389,745 | [
"sql",
"sql-server",
"tsql",
"sql-server-2008",
"calculated-columns"
] |
3,878,789 | 1 | 3,878,833 | null | 0 | 38 | I just want to have a check to make sure the user picked a number in the 2x2. So if the user doesnt pick a number in one of the boxes then I want a messagebog to popup telling the user to fill in all boxes.

| Check to make sure a number has been picked in each box | CC BY-SA 2.5 | null | 2010-10-07T04:54:21.470 | 2010-10-07T05:02:21.923 | null | null | 770,022 | [
"c#"
] |
3,878,936 | 1 | 3,879,976 | null | 0 | 1,373 | I spent hours trying to get this right, but it just doesn't work for me.... As you can see in the image:

The navigation just isn't right. Maybe you can help me? The site is [http://elektrikhost.com](http://elektrikhost.com).... I used the Web dev extension fore firefox for the guide lines... I don't know why it just won't work for me.... Heres the CSS:
```
nav { background: #282828 url(../images/nav-bg.png) repeat-x; border-radius: 6px; -webkit-border-radius: 6px; -moz-border-radius: 6px; -o-border-radius: 6px; margin: 24px auto; width: 822px; }
nav ul { padding: 13px 0; }
nav ul li { background: url(../images/nav-sep.jpg) left center no-repeat; display: inline; padding: 0 39px; margin: 0 auto; }
nav ul li:first-of-type { background: none; }
nav ul li:last-of-type { /*background: url(../images/ref2.png)*/ no-repeat right bottom; margin: 10px 0 0 0; }
nav ul li a { color: #626262; font: 1.2em Arial, Helvetica, serif; }
nav ul li a:hover { color: #dfdfdf; }
```
Thanks for any help...
| Navigation will not align right | CC BY-SA 2.5 | null | 2010-10-07T05:29:10.917 | 2010-10-08T13:08:50.117 | 2010-10-07T05:50:25.990 | 1,688,440 | 363,551 | [
"css",
"navigation"
] |
3,879,319 | 1 | null | null | 0 | 2,000 | I ran the command:
```
EXEC sp_spaceused
```
The output was:

So what is the size of my database?
Is it - 4768.25 - 4076.57 = 691.68 MB (1st table)
OR
19896 KB (2nd table)?
I'm using SQL Server 2005 Express which has a "database size" limit of 4 GB. So in this context of "database size", if I were to calculate how far up to the space limit I am - I should consider the unallocated space as what my database can still use?
| SQL Server - what is the size of my database if this is the output from sp_spaceused | CC BY-SA 2.5 | null | 2010-10-07T06:52:11.033 | 2010-10-07T09:54:56.383 | 2010-10-07T09:19:35.253 | 41,745 | 41,745 | [
"database",
"sql-server-2005",
"size"
] |
3,879,371 | 1 | 3,879,511 | null | 5 | 2,331 | I have a MongoDB collection which has a `created_at` stored in each document. These are stored as a MongoDB date object e.g.
```
{ "_id" : "4cacda7eed607e095201df00", "created_at" : "Wed Oct 06 2010 21:22:23 GMT+0100 (BST)", text: "something" }
{ "_id" : "4cacdf31ed607e0952031b70", "created_at" : "Wed Oct 06 2010 21:23:42 GMT+0100 (BST)", text: "something" }
....
```
I would like to count the number of items created between each minute, so I can pass the data into Google Charts to generate something like this:

How do I do this with a map reduce function, or is there a fancy MongoDB aggregate function which I could use instead?
| Map-Reduce count number of documents in each minute MongoDB | CC BY-SA 3.0 | 0 | 2010-10-07T07:03:05.427 | 2017-06-23T21:54:06.193 | 2017-06-23T21:54:06.193 | 2,313,887 | 45,350 | [
"mongodb",
"mapreduce",
"statistics"
] |
3,879,662 | 1 | null | null | 11 | 39,801 | ```
int main(void){
printf("Hello World");
return 0;
}
```
How is passed as return value in assembly level? Is there a dedicated CPU register for this job?
Here's the 2 tables on passing/return data in the pdf, but doesn't seems to have the exact info on how the calling convention of an API is determined and which register is used for storing return address:


| How's return value implemented in assembly level? | CC BY-SA 2.5 | 0 | 2010-10-07T07:50:03.693 | 2010-10-10T09:47:45.867 | 2010-10-10T09:47:45.867 | 417,798 | 417,798 | [
"assembly",
"return-value"
] |
3,879,856 | 1 | 3,880,008 | null | 16 | 2,190 | Being used to how ClearCase draw graphs I find Mercurial's and TortoiseHg's way confusing at first glance.
[This](http://nvie.com/posts/a-successful-git-branching-model/) is how I'd like it to be represented:

With static positions for branches. E.g. Maintenance branch to the left/right always and preferably in a straight line and not the current spaghetti curved branch it is now (see below link).
[This](http://i1177.photobucket.com/albums/x350/magnus80a/hg_graph.png) is how it looks using the TortoiseHg Explorer. The graph is from a test repository. :-)

Is there any way to change how graphs are drawn in Mercurial?
[edit]
Check out [MacHg](http://jasonfharris.com/machg/) and how it draws the graphs. This is more in line of what I'd like to see myself.

| Is there any way to change how graphs are drawn in TortoiseHg? | CC BY-SA 3.0 | 0 | 2010-10-07T08:25:16.327 | 2017-06-20T08:06:49.137 | 2015-07-06T08:05:18.567 | 109,747 | 351,696 | [
"mercurial",
"graph",
"tortoisehg"
] |
3,879,880 | 1 | 3,879,916 | null | 7 | 17,592 | I'm not able to see "Database Explorer" link in view or view-other menu.

Rishi
| Database Explorer option missing in view menu | CC BY-SA 2.5 | null | 2010-10-07T08:29:01.437 | 2013-11-15T13:52:32.433 | null | null | 263,357 | [
"visual-studio-2010"
] |
3,880,078 | 1 | 3,922,563 | null | 0 | 118 | 
Hello, this is the second time that I ask a question about this:(
I think a photo may better explain to you what I want.
Since the last time I asked the question, I have tried several tutorials, but I didn't manage to set up a menu as the photo shows.
In fact, I don't understand very well the use of getView(). One guy told me just to rewrite this method, but I can't really figure it out.
I really appreciate your help! Thanks a lot!
| Custom menu as the photo | CC BY-SA 2.5 | null | 2010-10-07T08:54:22.230 | 2010-10-13T10:09:21.077 | null | null | 453,676 | [
"android",
"user-interface"
] |
3,880,252 | 1 | 3,880,426 | null | 0 | 262 | I have a text field have value `http://localhost/Send/test.php?s/?a=1&o=2`. Another three text boxes. If we enter three values the above url will change like `http://localhost/Send/test.php?s/?a=1&o=2&s1=a&s2=b&s3=c` . The value for `s1,s2` and `s3` will not save anywhere. My question is how we check is the value for `s1` is already set? And how can I update the value of `s1` if iI change the textbox value for `s1`
| Regular expression for url matching | CC BY-SA 4.0 | null | 2010-10-07T09:17:49.843 | 2020-10-17T13:13:30.907 | 2020-10-17T13:13:30.907 | 4,370,109 | 171,995 | [
"javascript",
"jquery",
"regex"
] |
3,880,323 | 1 | 3,880,393 | null | 1 | 1,940 | My current Web Site does not have any designer.cs files. (Yes it is not a Web Application)
The site is complete but now I added 2 Clases to my site and all good but when I want to make use of my GridView it tells me this:

This is because I wrapped my code with the same namespace as in my classes like so....
```
namespace samrasWebPortalSQL
{
public partial class GridView : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
Functions.RemoveCaching(this);
LoadGrid();
}
private void LoadGrid()
{
DataSet dataSet = SQLHelper.GetDataSet("select * from company");
Functions.BindGridView(GridView1, dataSet);
}
}
}
```
I know I need the following code in my .designer.cs file but since I dont have one cant I place it anywhere ells?
```
protected global::System.Web.UI.WebControls.GridView GridView1;
```
| No Default.aspx.designer.cs files in my ASP.NET project | CC BY-SA 3.0 | null | 2010-10-07T09:28:12.463 | 2015-04-19T19:32:05.990 | 2015-04-19T19:32:05.990 | 4,099,593 | 33,584 | [
"c#",
"asp.net",
"class",
"gridview"
] |
3,880,337 | 1 | null | null | 1 | 2,264 | I try to custom my pickerview to be checkable like when you click dropdownlist on webview as in the picture (youtube website).

[http://img830.imageshack.us/img830/3747/screenshot20101004at606.png](http://img830.imageshack.us/img830/3747/screenshot20101004at606.png)
I use viewForRow method to customize view for each row in picker.
```
- (UIView *)pickerView:(UIPickerView *)pickerView viewForRow:(NSInteger)row forComponent:(NSInteger)component reusingView:(UIView *)view
{
UIView *rowView = [[[UIView alloc] initWithFrame:CGRectMake(0, 0, 280, 44)] autorelease];
rowView.backgroundColor = [UIColor clearColor];
rowView.userInteractionEnabled = NO;
UIImageView *checkmarkImageView = [[UIImageView alloc] initWithFrame:CGRectMake(5, 10, 24, 19)];
UIFont *font = [ UIFont boldSystemFontOfSize:18];
UILabel *titleLabel = [[UILabel alloc] initWithFrame:CGRectMake(35, 0, 240, 44) ];
NSString *pickerText = [[Itemlist objectAtIndex:row] objectForKey:@"name"];
titleLabel.text = pickerText;
titleLabel.textAlignment = UITextAlignmentLeft;
titleLabel.backgroundColor = [UIColor clearColor];
titleLabel.font = font;
titleLabel.opaque = NO;
if ([selected_property_id intValue] == row) {
titleLabel.textColor = [UIColor blueColor];
checkmarkImageView.image = [UIImage imageNamed:@"checkmark.png"];
}else {
titleLabel.textColor = [UIColor blackColor];
checkmarkImageView.image = nil;
}
[rowView addSubview:checkmarkImageView];
[rowView addSubview:titleLabel];
[titleLabel release];
[checkmarkImageView release];
return rowView;
}
- (void)pickerView:(UIPickerView *)pickerView didSelectRow:(NSInteger)row inComponent:(NSInteger)component
{
[m_pickerView reloadAllComponents];
}
```
When I select the row that I want, it add checkmark to the selected row perfectly
BUT when I scroll picker up/down the picker will auto select the row at the middle of picker. So, it auto add checkmark in the middle row.
My question is how to disable auto select on the middle row.
It should add checkmark when user tab on the row that they want only (like in youtube).
Should I use touch event method for pickerview?
Thanks for the help.
| Checkable UIPickerView in iPhone Safari | CC BY-SA 3.0 | 0 | 2010-10-07T09:31:28.040 | 2012-02-18T12:22:47.663 | 2011-11-29T04:24:21.530 | 234,976 | 468,887 | [
"iphone",
"uipickerview",
"checkmark"
] |
3,880,925 | 1 | 3,881,948 | null | 1 | 818 | I've found Tapku Graph [http://duivesteyn.net/2010/03/07/iphone-sdk-implementing-the-tapku-graph-in-your-application/?utm_source=twitterfeed&utm_medium=twitter](http://duivesteyn.net/2010/03/07/iphone-sdk-implementing-the-tapku-graph-in-your-application/?utm_source=twitterfeed&utm_medium=twitter)
... which looks cool and fairly simple to implement
```
- (void) thread{
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
srand([[NSDate date] timeIntervalSince1970]);
for(int i=0;i<100;i++){
//int no = rand() % 100 + i;
int no = 10 + i;
//I've changed the above value to prove that heres
//where you supply your data
GraphPoint *gp = [[GraphPoint alloc] initWithID:i value:[NSNumber numberWithFloat:no]];
[data addObject:gp];
[gp release];
}
//Heres where the data is drawn
- (void) drawXAxisLabelsWithContext:(CGContextRef) context{
```
However I'd like to have dates on the horizontal axis instead of numbers...
Any ideas?
| iPhone Tapku Graph, how can I use dates instead on numbers? | CC BY-SA 2.5 | 0 | 2010-10-07T10:55:09.137 | 2010-10-07T13:09:51.170 | null | null | 450,456 | [
"iphone"
] |
3,880,974 | 1 | 3,881,675 | null | 0 | 157 | I have Windows 7 box.
I want to install SQL Server 2005 on it.
The box has following programs already installed:
- - -
I had SQL server 2008 which I uninstalled.
When I try to install SQL Server 2005, I get the following warning message:

If I click on "Check for solutions online", it says no solution exists.
If I click on "Run program", I get this error and SQL server is not installed

Please let me know if you have know of a solution to this.
| Problem installing SQL Server on Win 7 with Visual Studio | CC BY-SA 2.5 | null | 2010-10-07T11:01:32.690 | 2010-10-07T12:36:15.177 | null | null | 442,465 | [
"visual-studio",
"sql-server-2005",
"windows-7"
] |
3,881,780 | 1 | 3,886,997 | null | 3 | 4,544 | I am trying to rotate vectors using matrices, but got confused.
I thought all I needed to do is create a rotation matrix and multiply it to a vector to get the rotated vector.
[Here](http://lifesine.eu/processing/RotationMatrix/) you can see a simple test I've done using [Processing](http://processing.org/):

Use to increment rotation, and to changes the axis.
And here is source:
```
PVector[] clone,face = {new PVector(50,0,50),new PVector(-50,0,50),new PVector(-50, 0, -50),new PVector(50, 0, -50)};
color faceC = color(255,0,0),cloneC = color(0,255,0);
float angle = 90;
PVector x = new PVector(1,0,0),y = new PVector(0,1,0),z = new PVector(0,0,1), axis = x;
PFont ocr;
void setup(){
size(400,400,P3D);
strokeWeight(1.1610855);smooth();
clone = rotateVerts(face,angle,axis);
ocr = loadFont("ocr.vlw");
}
void draw(){
background(255);
fill(0);textFont(ocr,10);text("a = increment rotation\nx/y/z = change axis\nrotation: " + angle + "\naxis: " + axis,10,10,200,200);fill(255);
translate(width*.5,height*.5);
rotateX(map(mouseY,height*.5,-height*.5,0,TWO_PI));
rotateY(map(mouseX,0,width,0,TWO_PI));
drawQuad(face,faceC);
drawQuad(clone,cloneC);
stroke(128,0,0);line(0,0,0,100,0,0);stroke(0,128,0);line(0,0,0,0,-100,0);stroke(0,0,128);line(0,0,0,0,0,100);
}
void keyPressed(){
if(key == 'a') angle += 15;
if(angle > 360) angle -= 360;
if(key == 'x') axis = x;
if(key == 'y') axis = y;
if(key == 'z') axis = z;
clone = rotateVerts(face,angle,axis);
}
PVector[] rotateVerts(PVector[] verts,float angle,PVector axis){
int vl = verts.length;
PVector[] clone = new PVector[vl];
for(int i = 0; i<vl;i++) clone[i] = PVector.add(verts[i],new PVector());
//rotate using a matrix
PMatrix3D rMat = new PMatrix3D();
rMat.rotate(radians(angle),axis.x,axis.y,axis.z);
for(int i = 0; i<vl;i++) rMat.mult(clone[i],clone[i]);
return clone;
}
void drawQuad(PVector[] verts,color c){
stroke(c);
beginShape(QUADS);
for(int i = 0 ; i < 4; i++) vertex(verts[i].x,verts[i].y,verts[i].z);
endShape();
}
```
Processing comes with a [PVector](http://processing.org/reference/PVector.html) and [PMatrix3D](http://processing.googlecode.com/svn/trunk/processing/build/javadoc/core/processing/core/PMatrix3D.html) which I've used.
Am I not using PMatrix they it should be used or is this a bug ?
Any hints ?
| How do I rotate vectors using matrices in Processing? | CC BY-SA 3.0 | 0 | 2010-10-07T12:50:41.840 | 2018-04-02T21:55:45.803 | 2018-04-02T21:55:45.803 | 873,165 | 89,766 | [
"3d",
"vector",
"matrix",
"geometry",
"processing"
] |
3,882,071 | 1 | null | null | 0 | 993 | I have a development directory that contains checkouts from svn repositories that stays in non svn directories. I would like to update all of dirs being in the svns.
Dir structure is similar to one below:

How would you solve the issue?
I am came with "brute force" solution, but it is not very much intelligent:
```
for i in `find . -mindepth 1 -maxdepth 3 -type d | grep -v .svn`; do svn up $i; done
```
It would be nice to have sth like to have:
```
svn --recursive update development_dir.
```
| svn update of directory with muliply repositories checkouts | CC BY-SA 2.5 | null | 2010-10-07T13:24:50.853 | 2016-06-28T14:52:25.233 | null | null | 410,737 | [
"svn",
"bash"
] |
3,882,178 | 1 | 3,894,219 | null | 0 | 106 | I need to get the latest records, which are repeated more than two times.
structure:
```
CREATE TABLE IF NOT EXISTS `tags` (
`tag_n` int(10) NOT NULL AUTO_INCREMENT,
`post_n` int(10) NOT NULL,
`tag` varchar(30) COLLATE utf8_bin DEFAULT NULL,
PRIMARY KEY (`tag_n`),
KEY `tag` (`tag`),
KEY `post_n` (`post_n`),
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
```
Records:
```
SELECT * FROM tags ORDER BY post_n DESC LIMIT 0 , 30
```

My query:
```
SELECT tag, COUNT(post_n) AS tags_count
FROM tags
GROUP BY tag HAVING tags_count>=2
ORDER BY post_n DESC LIMIT 5
```

But I get wrong results, latest must be "xpro", can't understand what`s wrong.
Any ideas?
p.s.
sorry for my english.
| MySQL latest records with condition | CC BY-SA 2.5 | null | 2010-10-07T13:36:56.547 | 2010-10-08T20:50:13.720 | 2010-10-07T13:59:55.450 | 272,762 | 272,762 | [
"mysql"
] |
3,882,628 | 1 | null | null | 1 | 3,710 | > I accept both C# and VB.NET
If you visit this [http://www.eol.org/pages/983558](http://www.eol.org/pages/983558) and then click on the link like the image below you'll see in-line pop-up DIV which displays a busy status of Ajax callback before it displays the information. So, the information is not there yet until you click on the link.

I'd like to do the same but ASP.NET and jQuery. If there's any place to help me get started on the right track? Thanks.
| Making AJAX call back in ASP.NET with jQuery | CC BY-SA 2.5 | null | 2010-10-07T14:24:52.663 | 2010-10-07T14:54:04.520 | null | null | 270,536 | [
"c#",
"asp.net",
"jquery",
"vb.net",
"asp.net-ajax"
] |
3,882,994 | 1 | 3,883,659 | null | 6 | 1,926 | I have an application which uses Spring 2.5 and Hibernate 3.
There's a web application with a presentation layer, a servive layer and a DAO layer, as well as some Quartz jobs sharing the same service and DAO layers.
Transactions are initialized in different layers with @Transactional annotations, like this:

It led me to a problem I described here: [Controlling inner transaction settings from outer transaction with Spring 2.5](https://stackoverflow.com/questions/3843205/controlling-inner-transaction-settings-from-outer-transaction-with-spring-2-5)
I read a bit about how to set-up transactions to wire Spring and Hibernate together. It looks the recommended approach is to initialize transactions in the service layer.
What I don't like is that most transactions exist only because they are required for hibernate to work properly.
And when I really need a transaction for a job calling multiple service methods, it seems I don't have a choice to keep initializing transactions from the jobs. So moving @Transactional annotations from DAO to service doesn't seem to make any difference.
How would you recommend to set-up transactions for this kind of application?
| How to set-up transactions for both web application and batch jobs using Spring and Hibernate | CC BY-SA 2.5 | 0 | 2010-10-07T14:59:59.623 | 2010-10-07T20:11:54.473 | 2017-05-23T10:30:23.117 | -1 | 271,887 | [
"hibernate",
"spring",
"web-applications",
"transactions",
"jobs"
] |
3,883,038 | 1 | 3,883,721 | null | 2 | 1,040 | I need to write an application with Silverlight 4 and need to show images like wrapped on cylinder. I need some HLSL code, as I wont to do that with Effects of Silverlight.
I don't wont to do that with 3D libarries for silverlight. I only need HLSL code for changing pixels.
I need for my image to look like [this](https://i.stack.imgur.com/Tn6gg.jpg) 
Thanks.
| HLSL for getting cylinder effect | CC BY-SA 2.5 | 0 | 2010-10-07T15:04:08.840 | 2010-10-07T16:25:59.937 | 2010-10-07T15:50:33.320 | 205,595 | 205,595 | [
"silverlight",
"silverlight-4.0",
"directx",
"hlsl",
"pixel-shader"
] |
3,883,048 | 1 | 3,883,374 | null | 0 | 1,636 | I haven't been able to find anyway to dynamically add a border around a column in a silverlight datagrid. Here is my xaml of my datagrid:
```
<sdk:DataGrid x:Name="PlannedAndBookedMonthlyTable" ItemsSource="{Binding}" AutoGenerateColumns="False" Margin="5,0,5,5">
<sdk:DataGrid.Columns>
<sdk:DataGridTextColumn x:Name="MonthlyHeaderName" Header="" Binding="{Binding SeriesName}" />
<sdk:DataGridTextColumn x:Name="MonthlyHeaderJan" Header="Jan" Binding="{Binding JanValue}" />
<sdk:DataGridTextColumn x:Name="MonthlyHeaderFeb" Header="Feb" Binding="{Binding FebValue}" />
<sdk:DataGridTextColumn x:Name="MonthlyHeaderMar" Header="Mar" Binding="{Binding MarValue}" />
<sdk:DataGridTextColumn x:Name="MonthlyHeaderApr" Header="Apr" Binding="{Binding AprValue}" />
<sdk:DataGridTextColumn x:Name="MonthlyHeaderMay" Header="May" Binding="{Binding MayValue}" />
<sdk:DataGridTextColumn x:Name="MonthlyHeaderJun" Header="Jun" Binding="{Binding JunValue}" />
<sdk:DataGridTextColumn x:Name="MonthlyHeaderJul" Header="Jul" Binding="{Binding JulValue}" />
<sdk:DataGridTextColumn x:Name="MonthlyHeaderAug" Header="Aug" Binding="{Binding AugValue}" />
<sdk:DataGridTextColumn x:Name="MonthlyHeaderSep" Header="Sep" Binding="{Binding SepValue}" />
<sdk:DataGridTextColumn x:Name="MonthlyHeaderOct" Header="Oct" Binding="{Binding OctValue}" />
<sdk:DataGridTextColumn x:Name="MonthlyHeaderNov" Header="Nov" Binding="{Binding NovValue}" />
<sdk:DataGridTextColumn x:Name="MonthlyHeaderDec" Header="Dec" Binding="{Binding DecValue}" />
<sdk:DataGridTextColumn x:Name="MonthlyHeaderTotal" Header="Total" Binding="{Binding Total}" />
</sdk:DataGrid.Columns>
</sdk:DataGrid>
```
This is the effect that I want to accomplish:

How do I set the border on a column of data that depends on what current calendar month it is?
| Silverlight 4 DataGrid border around a column | CC BY-SA 2.5 | null | 2010-10-07T15:05:33.850 | 2010-10-07T15:43:00.663 | null | null | 299,592 | [
"silverlight",
"datagrid",
"silverlight-4.0",
"border"
] |
3,883,308 | 1 | 3,904,596 | null | 16 | 6,192 | I need to capture a screenshot of the scrolling window's client area, using .NET. My first priority is capturing web page screenshots. But this can be not the only one use case. For example it can be also a text area in the Notepad.
Some applications (FastStone Capture, PicPick) can emulate user behavior to reach hidden part of a scrollable area and capture it. I'm looking for something like this or recommendations for alternative way to get the same result.

| Capture a scrolling window contents screenshot | CC BY-SA 2.5 | 0 | 2010-10-07T15:36:32.110 | 2010-10-11T08:25:04.513 | null | null | 177,194 | [
"c#",
".net",
"browser",
"scroll",
"screenshot"
] |
3,883,388 | 1 | 3,906,464 | null | 3 | 966 | This
```
[MetadataType(typeof(Area_Validation))]
public partial class Area
{
...
}
public class Area_Validation
{
[Required(ErrorMessage = "Please add this field.")]
public int Email { get; set; }
[Required(ErrorMessage = "Please add this field")]
public string Name { get; set; }
}
```
if `Area_Validation` is ? for example that on back-end can be created by the user and end up like this:

How can I set the on each field for ?
Currently I'm doing:
```
public class SubscriberFormViewModel
{
public List<SubscriberFieldModel> Fields { get; private set; }
public Calendar Calendar { get; private set; }
public Company Company { get; private set; }
public SubscriberFormViewModel()
{
// TODO: This is only for testing while validation is not set
}
public SubscriberFormViewModel(Decimal calendarId)
{
if (calendarId > 0)
{
SubscribersRepository db = new SubscribersRepository();
Calendar calendar = db.GetCalendarById(calendarId);
Company company = db.GetCompanyById(calendar.company_id);
this.Fields = db.FindAllSubscriberFieldsByCalendar(calendarId);
this.Calendar = calendar;
this.Company = company;
}
else
this.Fields = new List<SubscriberFieldModel>();
}
}
```
and I want to set the in all `Fields` property
In other words, this `Fields` are filled up from the Database and can have several types, can be a `string`, `number`, `dropdown`, etc ... kinda like MailChimp Fields Properties:

or I need to create a jQuery plugin to validate it and stop using use validation from MVC2 ?
Thank you
| Dynamic validation on MVC 2 | CC BY-SA 2.5 | 0 | 2010-10-07T15:44:55.997 | 2010-10-13T08:28:39.713 | 2010-10-10T07:14:55.160 | 28,004 | 28,004 | [
"asp.net-mvc-2",
"asp.net-mvc-validation"
] |
3,883,793 | 1 | 3,883,969 | null | 1 | 2,178 | I have follow an example of an opengl application and I don't know why is this thing happening...
I have a GLSurfaceView with it's corresponding renderer drawing a triangle. But, instead of getting the whole view on screen, I have just the upper half, and it's also duplicated as you can see on the picture. I'm using a Nexus One

the xml:
```
<?xml version="1.0" encoding="utf-8"?>
<com.forgottenprojects.geoturista.DrawingLayer
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/drawing"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
/>
```
The activity has this in the manifest:
```
android:theme="@android:style/Theme.NoTitleBar.Fullscreen"
```
The DrawingLayer class:
```
public class DrawingLayer extends GLSurfaceView {
private TriangleRenderer renderer;
private Context context;
public DrawingLayer(Context context, AttributeSet attrs) {
super(context, attrs);
init(context);
}
public DrawingLayer(Context context) {
super(context);
init(context);
}
private void init(Context c)
{
this.context = c;
setEGLConfigChooser(false);
this.renderer = new TriangleRenderer(c);
setRenderer(renderer);
setRenderMode(GLSurfaceView.RENDERMODE_CONTINUOUSLY);
getHolder().setFormat(PixelFormat.TRANSLUCENT);
}
}
```
The triangle renderer (most of it from Apress Pro Android 2 book)
```
public class TriangleRenderer implements Renderer {
private final static int VERTS = 3;
private FloatBuffer mFVertexBuffer;
private ShortBuffer mIndexBuffer;
TriangleRenderer(Context context)
{
ByteBuffer vbb = ByteBuffer.allocateDirect(VERTS * 3 * 4);
vbb.order(ByteOrder.nativeOrder());
mFVertexBuffer = vbb.asFloatBuffer();
ByteBuffer ibb = ByteBuffer.allocateDirect(VERTS * 2);
ibb.order(ByteOrder.nativeOrder());
mIndexBuffer = ibb.asShortBuffer();
float[] coords = {
-0.5f, -0.5f, 0, // (x1,y1,z1)
0.5f, -0.5f, 0,
0.0f, 0.5f, 0
};
for (int i = 0; i < VERTS; i++) {
for(int j = 0; j < 3; j++) {
mFVertexBuffer.put(coords[i*3+j]);
}
}
short[] myIndecesArray = {0,1,2};
for (int i=0;i<3;i++)
{
mIndexBuffer.put(myIndecesArray[i]);
}
mFVertexBuffer.position(0);
mIndexBuffer.position(0);
}
protected void draw(GL10 gl)
{
gl.glColor4f(1.0f, 0, 0, 0.5f);
gl.glVertexPointer(3, GL10.GL_FLOAT, 0, mFVertexBuffer);
gl.glDrawElements(GL10.GL_TRIANGLES, VERTS,
GL10.GL_UNSIGNED_SHORT, mIndexBuffer);
}
@Override
public void onSurfaceCreated(GL10 gl, EGLConfig config) {
gl.glDisable(GL10.GL_DITHER);
gl.glHint(GL10.GL_PERSPECTIVE_CORRECTION_HINT, GL10.GL_FASTEST);
gl.glClearColor(0.5f, 0.5f, 0.5f, 1.0f);
gl.glShadeModel(GL10.GL_SMOOTH);
gl.glEnable(GL10.GL_DEPTH_TEST);
}
@Override
public void onDrawFrame(GL10 gl) {
gl.glDisable(GL10.GL_DITHER);
gl.glClear(GL10.GL_COLOR_BUFFER_BIT | GL10.GL_DEPTH_BUFFER_BIT);
gl.glClearColor(1.0f, 0.5f, 0.7f, 1.0f);
gl.glMatrixMode(GL10.GL_MODELVIEW);
gl.glLoadIdentity();
GLU.gluLookAt(gl, 0, 0, -5, 0f, 0f, 0f, 0f, 1f, 0f);
gl.glEnableClientState(GL10.GL_VERTEX_ARRAY);
draw(gl);
}
@Override
public void onSurfaceChanged(GL10 gl, int width, int height) {
gl.glViewport(0, 0, width, height);
gl.glMatrixMode(GL10.GL_PROJECTION);
float ratio = (float)width / (float)height;
gl.glLoadIdentity();
gl.glFrustumf(-ratio, ratio, -1, 1, 3, 7);
}
}
```
Thanks in advance!
| Android OpenGL only renders half the screen | CC BY-SA 3.0 | null | 2010-10-07T16:36:03.353 | 2014-01-06T06:52:29.083 | 2013-01-02T22:21:02.950 | 125,389 | 366,253 | [
"android",
"opengl-es",
"glsurfaceview",
"nexus-one"
] |
3,883,854 | 1 | 3,883,890 | null | 2 | 3,885 | I think I could be doing something wrong in photoshop. I'm trying to create a banner for my website.
I created a new image in photoshop, then filled the background with a color I picked #E06205
I then saved the image as a jpeg.
On my webpage, I created a div and gave it a background color
background-color:#E05206;
When I open the page in Safari and Chrome it's beautiful. Matches perfectly.
However, when I open the page in FireFox, the colors don't match. I can't figure out why that is.

By the way, this is definitely a problem with the image I created. When I compare the same image side by side, Firefox gives me the 'wrong' color

| Why doesn't my image color match background color in FireFox? | CC BY-SA 2.5 | 0 | 2010-10-07T16:43:51.653 | 2010-10-11T12:48:32.687 | 2010-10-07T16:51:39.250 | 28,351 | 28,351 | [
"firefox",
"colors",
"jpeg",
"photoshop"
] |
3,883,935 | 1 | 3,884,781 | null | 13 | 5,068 | I have a JTable as follow.

So, while the JTable is still in editing mode (There is a keyboard cursor blinking at Dividend column), clicking OK directly will not commit the data into table model. Clicking OK merely close the dialog box.
I need to press ENTER explicitly, in order to commit the data into table model.
The source code for this dialog box is as follow [Dialog Box Source Code](http://jstock.cvs.sourceforge.net/viewvc/jstock/jstock/src/org/yccheok/jstock/gui/portfolio/DividendSummaryJDialog.java?revision=1.12&view=markup). Do look at `jButton1ActionPerformed` for the executed code when OK is pressed.
| Force JTable to "commit" data to model while it is still in editing mode | CC BY-SA 2.5 | null | 2010-10-07T16:53:35.697 | 2019-06-04T18:33:48.507 | 2010-10-07T16:58:55.793 | 72,437 | 72,437 | [
"java"
] |
3,883,955 | 1 | 3,884,063 | null | 1 | 4,309 | This is the first time I've posted a pic, so hopefully it turns out well (a picture is worth a thousand words, and I don't want to type a thousand words). But, the image below is what I'm trying to accomplish.
I have a collection of objects that I'm needing grouped by property "Group". I'm using a CollectionViewSource that is bound to my data source that is doing the grouping for me.
I'm using an ItemsControl control (but could easily use another control) to display this information. I'm able to group the information by the property but I'd like to be able to surround the entire group with a border. I'm not wanting to surround each item in the group by the entire group.
How do I accomplish something like the picture below with a border around the entire group?

| WPF ItemsControl ItemTemplate border with GroupStyle | CC BY-SA 2.5 | null | 2010-10-07T16:55:50.607 | 2021-08-03T13:00:34.800 | null | null | 21,828 | [
"wpf",
"grouping",
"itemscontrol"
] |
3,884,337 | 1 | 3,884,363 | null | 1 | 140 | I download my code repository from:
hg clone [https://[email protected]/sergiotapia/sharpdic](https://[email protected]/sergiotapia/sharpdic)
And now I have the folders on my machine; I can open the solution and develop on it. Now when I run hg log I don't see the initial push I made. Shouldn't I be able to see the initial push on the log?
I though cloning a repo got the complete changesets?
Thanks for the help.

| Pulled a repository using hg clone, but when using hg log can't see revisions | CC BY-SA 2.5 | null | 2010-10-07T17:47:02.450 | 2010-10-07T17:51:11.943 | null | null | null | [
"mercurial",
"bitbucket"
] |
3,884,525 | 1 | null | null | 4 | 5,823 | I'm working with some windows API to create a little application.
I already created the buttons, windows, alright.
But the problem is the components I created don't look like the OS theme. They look very simple:

See the button as example.
How do I enable the Windows theme? It can be in C or Delphi.
| How do I make my application use the Windows theme? | CC BY-SA 2.5 | 0 | 2010-10-07T18:08:28.027 | 2015-04-16T12:38:30.153 | 2010-10-09T15:58:39.320 | 33,732 | 225,010 | [
"c++",
"c",
"delphi",
"winapi",
"themes"
] |
3,884,559 | 1 | 3,884,956 | null | 1 | 186 | A generated utf-8 file displays properly in the terminal:

but not in Firefox or gedit:

It looks like the characters are doubled with weird ones?
The file:
[http://maestric.com/shared/other/2004_10_14.txt](http://maestric.com/shared/other/2004_10_14.txt)
Any idea on what is wrong with it?
| utf-8 file displays doubled characters | CC BY-SA 2.5 | null | 2010-10-07T18:12:14.767 | 2010-10-07T19:02:10.380 | null | null | 91,225 | [
"linux",
"unicode"
] |
3,885,045 | 1 | 3,885,079 | null | 1 | 3,646 | What's wrong with this code
```
import java.io.IOException;
import java.net.ServerSocket;
import java.net.Socket;
/**
*
* @author Master
*/
public class Server {
try
{
ServerSocket S = new ServerSocket(3333);
Socket So = S.accept();
}
catch(IOException e)
{
System.out.println("IOError");
}
}
```
Firstly I wrote the code without try catch and I got an `unreported exception java.io.IOException; must be caught or declared to be thrown` Error but Netbeans didn't suggest that I add a try-catch block . Now I added the try-catch block manually but It still shows an error and suggests that I must add another try-catch block !

| unreported exception java.io.IOException | CC BY-SA 2.5 | null | 2010-10-07T19:12:31.527 | 2010-10-07T19:19:14.777 | null | null | 405,539 | [
"java",
"exception"
] |
3,885,104 | 1 | 3,885,190 | null | 1 | 1,541 | 
I have a UIButton of fixed width and I want to place text in it. Since the size of the String is unknown in advance, I will have to resize the font as I read the String from a flat file. How can I do that? A function similar to the following will be great:
```
UIFont resizeFontAs:(UIFont)initialFont andStringAs:(NSString*)string andWidthAs:(int)width
```
Thanks in advance
Edit : This code doesnt seem to work:
```
// Method for creating button, with background image and other properties
- (UIButton *) getCallAgentButtonWithTitleAs:(NSString *)aTitle andImageAs:(UIImage*)bgImg atIndex:(int)index{
UIButton *aButton = [UIButton buttonWithType:UIButtonTypeRoundedRect];
aButton.frame = CGRectMake(10, 2+index*50, 300, 48);
aButton.titleLabel.frame = CGRectMake(aButton.titleLabel.frame.origin.x + 25.0, aButton.titleLabel.frame.origin.y, aButton.titleLabel.frame.size.width - 50.0, aButton.titleLabel.frame.size.height);
aButton.titleLabel.adjustsFontSizeToFitWidth = YES;
[aButton setTitle:aTitle forState:UIControlStateNormal];
//aButton.titleLabel.font = [UIFont boldSystemFontOfSize:12];
[aButton setTitleColor:UIColorFromRGB(0xFDD428) forState:UIControlStateNormal];
[aButton setBackgroundImage:bgImg forState:UIControlStateNormal];
[aButton addTarget:self action:@selector(callAgent:) forControlEvents:UIControlEventTouchUpInside];
// set the tag as the index and use it later to obtain the phoneNo
[aButton setTag:index];
return aButton;
}
```
| objective c finding pixel width of a string | CC BY-SA 2.5 | 0 | 2010-10-07T19:19:39.783 | 2010-10-07T20:24:45.600 | 2010-10-07T20:24:45.600 | 302,351 | 302,351 | [
"objective-c",
"fonts",
"size",
"pixel"
] |
3,885,245 | 1 | 3,885,370 | null | 0 | 2,425 | I'm on Vista and I'm using `Microsoft.Win32.OpenFileDialog` class.
When I call `ShowDialog()` I get XP-style dialog:

How do I get Vista-style dialog with fallback to on WindowsXP?

A bit of rumble:
I don't really understand why they didn't replace the dialog in vista, but kept both of them. Now legacy apps will never open new dialog, unless updated.
| How to open new OpenFileDialog automatically in Vista/Win7? | CC BY-SA 2.5 | null | 2010-10-07T19:37:25.850 | 2010-10-07T23:18:31.917 | 2010-10-07T19:48:56.527 | 177,591 | 177,591 | [
"c#",
"windows-7",
"windows-vista",
"openfiledialog",
"savefiledialog"
] |
3,885,395 | 1 | 3,885,481 | null | 11 | 30,846 | I have a screen shot I take in my mobile app. The screen shot takes about 32 KB when saved as a png on a disk.
I am sending these to a central SQL Server and 32 KB is too big for that amount of times I will need to store that screen shot (approx 2500 times a day).
Is there any kind of trickery that I can do to get it to save smaller?
Here is the code I am using now to take it from `Bitmap` to bytes (to send to the server for storage):
```
MemoryStream stream = new MemoryStream();
_signatureImage.Save(stream, ImageFormat.Png);
return stream.ToArray();
```
`_signatureImage` is a `Bitmap` and is the screenshot in question.
Here is an example of the screen shot I am saving:

Things that pop to mind (but I don't know how to do them):
1. Reduce the actual Height and Width of the image (but hopefully in a way that will not distort it).
2. Change it to a black and white image (not sure if I will see any real space savings from this)
3. Compress it more (I don't like this as much because then it is not readable from the database).
Note, this all has to be done programatically, and cannot take very long, so complex image manipulations are out.
Thanks for any help.
| How to reduce the size of an image in C# and .NET 3.5? | CC BY-SA 2.5 | 0 | 2010-10-07T19:56:40.580 | 2010-10-12T19:09:05.173 | 2010-10-07T20:45:07.887 | 16,241 | 16,241 | [
"c#",
"image",
".net-3.5",
"compact-framework",
"image-manipulation"
] |
3,885,866 | 1 | null | null | 0 | 1,130 | Here is my settings in set.js. I basically don't want the H1 - H3 tags, images etc. So I deleted those lines but my markitup text area appears to not like the settings and shows up like following. I am using the textile set with a basic simple skin.
Also, is there a sprited version of the images?

```
mySettings = {
previewParserPath: '', // path to your Textile parser
onShiftEnter: {keepDefault:false, replaceWith:'\n\n'},
markupSet: [
{name:'Heading 4', key:'4', openWith:'h4(!(([![Class]!]))!). ', placeHolder:'Your title here...' },
{name:'Heading 5', key:'5', openWith:'h5(!(([![Class]!]))!). ', placeHolder:'Your title here...' },
{name:'Heading 6', key:'6', openWith:'h6(!(([![Class]!]))!). ', placeHolder:'Your title here...' },
{name:'Paragraph', key:'P', openWith:'p(!(([![Class]!]))!). '},
{separator:'---------------' },
{name:'Bold', key:'B', closeWith:'*', openWith:'*'},
{name:'Italic', key:'I', closeWith:'_', openWith:'_'},
{name:'Stroke through', key:'S', closeWith:'-', openWith:'-'},
{separator:'---------------' },
{name:'Bulleted list', openWith:'(!(* |!|*)!)'},
{name:'Numeric list', openWith:'(!(# |!|#)!)'},
{separator:'---------------' },
{name:'Link', openWith:'"', closeWith:'([![Title]!])":[![Link:!:http://]!]', placeHolder:'Your text to link here...' },
{separator:'---------------' },
{name:'Quotes', openWith:'bq(!(([![Class]!]))!). '}
]
}
```
| markitup settings issue | CC BY-SA 2.5 | 0 | 2010-10-07T21:02:41.357 | 2012-12-05T13:35:52.890 | null | null | 444,875 | [
"jquery",
"textile",
"markitup"
] |
3,886,526 | 1 | 3,887,831 | null | 3 | 3,481 | I am developing my first Android App. I have an application already running on emulator (Eclipse + Android dev. tools) on Ubuntu 10.04 LTS - the Lucid Lynx - released in April 2010. I have already tryied the [steps provided on Android Developers Portal](http://developer.android.com/guide/developing/device.html) on this link, but whenever I try to list my already connected device using ./adb devices I get the following:
```
mmaia@mmaia-desktop:~/tools/android-sdk-linux_86/tools$ ./adb devices
List of devices attached
???????????? no permissions
```
I have checked and when I run the virtual emulator the same command returns:
```
List of devices attached
???????????? no permissions
emulator-5554 device
```
Also when I ask eclipse to run the emulator it finds the device(galaxy 5), see image below, but can't find serial, probably because of some permission, than I am only able to choose the virtual emulator.

How do I configure permission to use Galaxy 5 as a device while developing for Android under Ubuntu 10.04?
[]s
| How to develop Android Apps using a Samsumg Galaxy 5 device? | CC BY-SA 2.5 | 0 | 2010-10-07T23:02:26.603 | 2012-09-03T18:25:14.063 | null | null | 442,041 | [
"android",
"linux",
"ubuntu",
"device"
] |
3,886,649 | 1 | 3,888,747 | null | 0 | 79 | I have the following sql query for a SQL Server 2008 db.
```
SELECT TOP(@NumberOfStreetResults) LocationType, LocationId, Name
FROM [dbo].[LocationNames]
WHERE CONTAINS(Name, @SearchQuery)
AND LocationType = 7
```
Notice how I'm using the `CONTAINS` keyword? I have an on the `Name` field.
I'm not sure what index(s) I need to manually add to the table because this query is very common in our system.
Do I need to just add an index against `LocationType`?
## Update
Here's the query graphs...


| What indexes will I need to make on this SQL Server table? | CC BY-SA 2.5 | null | 2010-10-07T23:24:14.687 | 2010-10-08T08:06:35.030 | 2020-06-20T09:12:55.060 | -1 | 30,674 | [
"sql-server",
"sql-server-2008",
"full-text-search",
"indexing"
] |
3,886,978 | 1 | null | null | 2 | 10,802 | Suppose I have a simple code like this:
```
public class ExternalizeStringDemo {
public static void main(String[] args) {
System.out.println("Hello world");
}
}
```
Now, I want to externalize the greeting, perhaps to facilitate internationalization/localization/etc. Using Eclipse, I can use the String Externalization wizard (Source/Externalize Strings), and configure it like this:

I can proceed with the wizard and it will propose these changes:
- `Personal Toys/src/Messages.java`- `Personal Toys/src/messages.properties`- `ExternalizeStringDemo.java`- `"Hello World"``Messages.getString("DEMO_GREETING")`
My question is simple: can I ask Eclipse to externalize the access to use the key as field names instead? That is, I want the access to be e.g. `Messages.DEMO_GREETING`.
Note: if the `[Substitution pattern]` is simple `${key}`, then the generated code is `Messages."DEMO_GREETING"`, which is not a valid Java code.
---
If this is not possible, then what's the next best thing? (I'm thinking Eclipse regex find/replace?).
| Configuring string externalization in Eclipse to use ${key} as field name | CC BY-SA 2.5 | 0 | 2010-10-08T00:56:43.473 | 2011-02-10T04:15:37.547 | null | null | 276,101 | [
"java",
"eclipse",
"internationalization",
"string-externalization"
] |
3,887,427 | 1 | null | null | 5 | 3,890 | I encountered a table border line CSS problem in Firefox, when the CSS border-collapse is collapse, and have 2 merged cells, one of them has a 1px border. An extra unwanted border line exists on the right.
This problem does not exist in other browsers, IE and Chrome don't have the problem.
FireFox version is
> Mozilla/5.0 (Windows; U; Windows NT
5.1; zh-CN; rv:1.9.2.8) Gecko/20100722 Firefox/3.6.8 (.NET CLR 3.5.30729)
My tested doctype is:
```
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
```
.
---

```
<table cellspacing="0" cellpadding="0" style="position: absolute; width: 217px; left: 0px;border-collapse:collapse">
<colgroup><col col="0" style="width: 72px;"><col col="1" style="width: 72px;"><col col="2" style="width: 72px;">
</colgroup>
<tbody>
<tr tridx="0" style="height: 19px;">
<td rowspan="2" colspan="2" style="border: 1px solid #000000"></td><td row="0" col="2"></td>
</tr>
<tr tridx="1" style="height: 19px;"><td row="1" col="2"></td></tr>
<tr tridx="2" style="height: 19px;"><td row="2" col="0"></td><td row="2" col="1"></td><td row="2" col="2"></td></tr>
<tr tridx="3" style="height: 19px;"><td rowspan="3" colspan="2" style="border: 1px solid #000000"></td><td></td></tr>
<tr tridx="4" style="height: 19px;"><td ></td></tr>
<tr tridx="5" style="height: 19px;"><td></td></tr>
</tbody>
</table>
```
| FireFox CSS Table Extra Border Line | CC BY-SA 3.0 | null | 2010-10-08T03:09:20.540 | 2017-06-11T11:44:18.533 | 2017-06-11T11:44:18.533 | 4,370,109 | 315,314 | [
"css",
"html-table",
"border",
"firefox3.6"
] |
3,887,626 | 1 | 3,887,725 | null | 0 | 2,012 | Is it possible ?
I used 3 label in cell of UITableView. I want to make to first row is a header and fixed position always when scroll. Section header can't show right position of label.

Lost Angeles, U.S.A should be show on second column but first columns text is too long.
| Top row fixed in UITableView | CC BY-SA 2.5 | 0 | 2010-10-08T04:09:43.467 | 2010-10-08T04:50:52.913 | 2010-10-08T04:50:52.913 | 215,939 | 215,939 | [
"iphone",
"uitableview"
] |
3,887,853 | 1 | 5,778,345 | null | 1 | 1,491 | I have this frame:

Here is what happens:
1. When I'm over the Pinkish panel, the scroll pane works just fine.
2. When I put the mouse over the Darker gray JTextArea the scroll pane does not get the event.
In general my question is how can I make sure the parent of a component receives the event if the component didn't handle that specific event, even if the component has a listener and is enabled?
Perhaps a specific example will do.
You can see the calculator, the calculator is drawn on a scalable image panel, and can zoom in and out by the Ctrl + Wheel event, but when I don't press Ctrl, I would like the scroll pane to receive the event and scroll the view port. (I think this sums it)
Adam.
| Allowing parent to process mouse event if event was not consumed by child | CC BY-SA 2.5 | null | 2010-10-08T05:08:17.983 | 2011-04-25T12:32:01.280 | null | null | 348,189 | [
"java",
"events",
"swing",
"parent-child"
] |
3,887,892 | 1 | 3,887,911 | null | 4 | 3,755 | How to change the property of a control in a flowlayoutpanel assuming that you add the controls programatically and assuming that the name of each controls are the same?
For example this image shows you that there are 2 text boxes and two buttons,
how would I change the back color of button 2? Assuming the controls has been added at runtime.

```
foreach(Controls ctrl in flowlayoutpanel1.Controls)
{
//What should I put here?
}
```
| How to change the property of a control from a flowlayoutpanel? | CC BY-SA 2.5 | 0 | 2010-10-08T05:17:13.257 | 2010-10-08T07:01:38.530 | null | null | 416,801 | [
"c#",
"winforms",
"user-controls",
"flowlayoutpanel"
] |
3,888,241 | 1 | 3,898,151 | null | 2 | 945 | I am working on converting a legacy system to use hibernate (version 3.3.x) instead of using hand crafted SQL. I have run in to some problems mapping my datamodel that pertians to composite keys. I've created a solution I think works, but I am not overly fond of it. Hence, I would like to see how the diagram below could/should be mapped and see if I am on the "right" track.

In the diagram StuffTypes is a pretty static table that don't change (no inserts or updates). Parent is the only table that currently has a DAO class associated to it (the others should be persisted when the parent instance is). Stuff has a StuffType and a number of SubStuff associated with it. Finally, SubStuff is just a many to many mapping table between Stuff and StuffTypes.
What is the best way of mapping these entities to Java objects using annotations?
| Mapping entities with composite keys | CC BY-SA 2.5 | null | 2010-10-08T06:38:04.943 | 2010-10-09T22:33:51.173 | null | null | 355,499 | [
"java",
"hibernate",
"annotations"
] |
3,888,611 | 1 | 3,888,696 | null | 5 | 10,333 | Greetings all,
Is there any widget to separate two QWidgets and also give full focus to a one widget.
As shown in following figure ?

Thanks in advance,
umanga
| QT separator widget? | CC BY-SA 2.5 | 0 | 2010-10-08T07:48:50.790 | 2015-08-24T15:45:44.193 | null | null | 180,904 | [
"c++",
"qt",
"qt4"
] |
3,888,711 | 1 | 3,906,888 | null | 5 | 755 | In a simple canvas test I created for performance and quality measurement purposes, a `canvas` is painted with randomised colors and images during an unlimited period.
A sample is shown here: [http://litterific.com/minisite/](http://litterific.com/minisite/)
> : Only open this in Opera or Chrome, the script is pretty heavy can hang up on slow computers, don't leave the script running while you are getting coffee ;)) It is just a rough prototype and did not optimize it.
What I noticed here is that the results as painted by the script (`js/asset.js`) are different in various browsers. Especially in Opera there is much more in the painting than in Chrome

code is found here: [http://litterific.com/minisite/js/asset.js](http://litterific.com/minisite/js/asset.js)
My question is:
Note: It is exactly the same script in both browsers, so perhaps you could have a look at it in both Chrome and Opera.
| HTML5 canvas: Same code outputs different results in different browsers | CC BY-SA 2.5 | 0 | 2010-10-08T08:00:48.567 | 2010-10-11T14:13:15.487 | 2010-10-11T08:24:13.363 | 313,758 | 400,223 | [
"javascript",
"html",
"google-chrome",
"canvas",
"opera"
] |
3,888,852 | 1 | 3,888,897 | null | 0 | 71 | 
I use thrown in visual studio 2005 while debugging a project to get the possible error.
But when I do it, it stops with an green arrow pointing the error line that is happening, but I want to skip that error to get the next possible error. How can I skip and set the yellow arrow to make it yellow and let it to go on to the part of the code lines..
How can I do it?
| put an exception to an exception to get the next exception on .net | CC BY-SA 2.5 | null | 2010-10-08T08:27:24.343 | 2010-10-08T09:31:23.597 | 2020-06-20T09:12:55.060 | -1 | 173,718 | [
"c#",
".net",
"debugging",
"exception"
] |
3,888,932 | 1 | 3,889,317 | null | 18 | 713 | I'm going through [Bitbucket](http://bitbucket.org) and I can't seem to find any [Mercurial](https://www.mercurial-scm.org/) repositories that look like what I suspect our repository would look like, provided we switch to Mercurial.
As such, I'm wondering, is there a workflow that we're not considering here?
The thing I'm talking about is that I did a small automated test. We're 14 people that work on the same project, split into 4 scrum teams. To simulate 14 (I picked 10, round number) people working in parallel on the code, using Mercurial DVCS, pushing to the same central master repository, I wrote a script.
1. I created a new "master" repository, and then cloned it for 10 virtual people
2. I then ran a 1000 iteration loop, picking a random clone, and doing one of the following: 10% of the time, do a pull from master, merge, commit merge, and push 90% of the time, do a local change and commit
Note that I ensured that there would never be merge conflicts by simply making each virtual person work on his own file.
This would simulate people working locally by doing 1+ commits before pulling, merging, and pushing (to avoid 2+ heads in the master repo). It might be that this workflow is wrong.
This is a sample of what the repository now looks like (screenshot + link to repo):

[http://hg.vkarlsen.no/hgweb.cgi/parallel_test/graph](http://hg.vkarlsen.no/hgweb.cgi/parallel_test/graph)
This looks awfully messy, and as I said, I can't seem to find any repositories that have similar history. By "messy", I mean that it looks like older history of the project will almost always have 10 parallel branches. Close to the top, it tapers off of course, but it will expand as people that are currently working in their local repository pushes to the master.
So I have two questions:
1. Can anyone show me a repository that has similar history? Since I can't seem to find any, I'm starting to wonder about what kind of conclusions I can draw from that...
2. Is there something wrong with our workflow (that is, the workflow I've laid out here)? Should we rebase/squash/transplant, delegate push responsibility to one person, other things, instead of the way it was done here?
| Mercurial repositories with many active developers? | CC BY-SA 4.0 | 0 | 2010-10-08T08:39:17.000 | 2019-08-16T07:27:37.050 | 2019-08-16T07:27:37.050 | 267 | 267 | [
"mercurial"
] |
3,889,347 | 1 | 3,889,587 | null | 0 | 374 | I have a function
```
function setbid(catid)
{
if(catid == 30)
{
document.getElementById('bannerid').value = 1;
}
else if(catid == 31){
document.getElementById('bannerid').value = 2;
}
else if(catid == 32){
document.getElementById('bannerid').value = 6;
}
}
```
this function is being called onchange event of select box.
now when the value of select box is changed IE throws me an error saying
"document.getElementId(....)" is null or not an object..
Now what can i infer from this?
please help..
>
As per David's Reply
how can i check for its existance before the assignment of value to that field,? Also other browsers do not display this error, I have this bannerid field as hidden field in the document... What should be done?
Below is the screen shot of the error displayed onchange of select box

>
Update as per the answer of @haylem
```
<script>
function setbid(catid)
{
var lookup = {
'30' : 1,
'31' : 2,
'32' : 6
};
if (lookup.hasOwnProperty(catid)) {
var el = document.getElementById('bannerid');
if (el) {
el.value = lookup[catid];
}
}
/*if(catid == 30)
{
if(typeof(document.getElementById('bannerid')) == null ){
document.getElementById('bannerid').value = 1;
}
}
else if(catid == 31){
document.getElementById('bannerid').value = 2;
}
else if(catid == 32){
document.getElementById('bannerid').value = 6;
}*/
}
</script>
<div style="margin:0px auto">
<div class="instantprice-popup-bg">
<form name="instantpop" id="instantpop" action="" method="post" style="margin:0px; padding:0px" onsubmit="">
<input type="hidden" name="sessid" id="sessid" value="<?php echo $_GET['osCsid'];?>">
<div class="instantprice">
<ul>
<li class="text12pt" style="color:#FF0000; display:none;" id="appsize">For special low price on sizes over 30ft. wide and 10ft. height contact us on [email protected].</li>
<li class="text12pt" style="color:#FF0000; display:none;" id="vinylsize">Please enter width upto 30 ft & height upto 5 ft for Vinyl Signs/Decals(Posters).</li>
<li class="col1">Select Product</li>
<li class="col2">
<input type="hidden" name="price" id="price" value="<?php echo "15"; ?>" />
<input type="hidden" name="bannerid" id="bannerid" value="" />
<select name="product" class="dropdownfield" id="product" style="width: 180px;" onchange="javascript:setbid(document.getElementById('product').value);">
<option value="">Select Product</option>
<?php
while($result=mysql_fetch_object($sql_query))
{
?><option value="<?php echo $result->categories_id;?>" <?php if($_POST['product'] == $result->categories_id) {?> selected="selected" <?php } ?>><?php echo $result->categories_name;?></option><?php
}
?>
</select>
</li>
<li class="col1">Select Size (in ft.)</li>
<li class="col2">
<div class="sizebox" style="width:250px;">
<div class="sizebox col1"><input name="size_w" id="size_w" type="text" class="sizetextfield1" value="<?php if(isset($_REQUEST['size_w'])){ echo $_REQUEST['size_w']; } else { echo "2"; } ?>" ></div>
<div class="sizebox col2"><img src="images/homepage/up-arrow.jpg" width="12" height="9" border="0" align="top" onclick="increaseCounter('size_w')" /><img src="images/homepage/down-arrow.jpg" width="12" height="9" border="0" onclick="decreaseCounter('size_w');" /></div>
<div class="sizebox col3" style="width:35px;">width</div>
<div class="sizebox col1"><input name="size_h" id="size_h" type="text" class="sizetextfield1" value="<?php if(isset($_REQUEST['size_h'])){ echo $_REQUEST['size_h']; } else { echo "2"; } ?>" style="margin-left:8px" ></div>
<div class="sizebox col2"><img src="images/homepage/up-arrow.jpg" width="12" height="9" border="0" align="top" onclick="increaseCounter('size_h');" /><img src="images/homepage/down-arrow.jpg" width="12" height="9" border="0" onclick="decreaseCounter('size_h');" /></div>
<div class="sizebox col3" style="width:35px;"> height</div>
<input name="size" id="size" type="hidden" value="<?php echo $_REQUEST['size_h'].'x'.$_REQUEST['size_w']; ?>">
</div>
</li>
<li class="col1">Select Quantity</li>
<li class="col2">
<select id="qty" name="qty" >
<?php
for($i=1;$i<=100;$i++)
{
?> <option value="<?php echo $i;?>" <?php if($_POST['qty'] == $i) {?> selected="selected" <?php } ?>><?php echo $i;?></option> <?php
}
?>
</select>
</li>
<li class="col1">Select Shipping</li>
<li class="col2">
<select id="shipping_method" name="shipping_method" class="dropdownfield" >
<option value="">Select Shipping</option>
<option value="standard" <?php if($_POST['shipping_method'] == 'standard') {?> selected="selected" <?php } ?>>Standard (7 - 12 days from proof)</option>
<option value="expedited"<?php if($_POST['shipping_method'] == 'expedited') {?> selected="selected" <?php } ?>>Expedited (5 work days from Proof)</option>
</select>
</li>
<li class="col1" id="sidehead">Two Side Banner</li>
<li class="col2" id="sideval">
<input type="checkbox" id="side" name="side" value="1" />
</li>
<li class="col1">Product Price</li>
<li class="col2"><span class="text15pt" id="total_display">$0</span>
<input type="hidden" id="total" name="total" class="textfield" value="15" readonly="readonly" style="width:60px;"/>
</li>
<li class="col1">Shipping Cost</li>
<li class="col2"><span class="text15pt" id="shipping_display">$0</span>
<input type="hidden" id="shipping" name="shipping" class="textfield" value="" readonly="readonly" style="width:60px;" />
</li>
<li class="bannerprice" id="grand_total_display">TOTAL PRICE : $0
</li><input type="hidden" id="grand_total" name="grand_total" value="" readonly="readonly" style="width:60px;" />
<li style="float:none; text-align:center">
<input type="submit" class="getprice-btn" name="getprice" value="" />
</li>
<li class="text12pt">Final Price, No Hidden Charges</li>
</ul>
<input type="hidden" name="getpriceclick" value="1" />
</div>
</form>
</div>
</div>
```
| IE6 displays JavaScript error for below given function and error is also mentioned below | CC BY-SA 2.5 | null | 2010-10-08T09:38:28.567 | 2010-10-08T10:57:55.577 | 2010-10-08T10:38:32.867 | 184,814 | 184,814 | [
"javascript",
"internet-explorer"
] |
3,889,479 | 1 | 3,889,744 | null | 4 | 2,215 | i search through the google maps api reference, but they provide no method or property for creating a new type of navigation control. i wonder how to create navigator control like image below.

| how to modify google maps navigator control style | CC BY-SA 2.5 | 0 | 2010-10-08T09:57:57.580 | 2010-10-08T10:42:51.300 | null | null | 381,351 | [
"google-maps",
"navigation"
] |
3,889,728 | 1 | 3,889,877 | null | 0 | 10,111 | Im trying to change the default highlight colour of a tab item in a tab control in WPF.
In the image the highlight colour is orange, I just want to know if there is away to change it to another solid colour?

Here is my XAML which declares the TabControl and 2 TabItems
```
<TabControl>
<TabControl.Background>
<LinearGradientBrush EndPoint="0,1" StartPoint="0,0">
<GradientStop Color="#FFCCCCD0"/>
<GradientStop Color="#FF526593" Offset="1"/>
</LinearGradientBrush>
</TabControl.Background>
<TabItem Header="test1">
<TabItem.Content>
<StackPanel Orientation="Horizontal">
<Button Content="Test" VerticalAlignment="Center" />
<Button Content="Test2" />
</StackPanel>
</TabItem.Content>
</TabItem>
<TabItem Header="Test2">
<TabItem.Content>
<TextBox />
</TabItem.Content>
</TabItem>
</TabControl>
```
Please note as well I dont have access to expression blend, so any solutions need be possible in Visual Studio 2010.
Thanks.
| Change default highlight colour of TabItem in TabControl WPF | CC BY-SA 2.5 | 0 | 2010-10-08T10:38:41.540 | 2010-10-08T11:06:25.757 | null | null | 333,943 | [
"c#",
".net",
"wpf",
"xaml",
"tabcontrol"
] |
3,889,785 | 1 | 3,889,823 | null | 0 | 212 | I'm having difficulty with building a HTML email. I currently have converted my entire email to an 8 row table in the below order:
1. Header (image)
2. Date Field
3. Content Field
4. Content Base (rounded bottom image)
5. Footer top (rounded top image)
6. Footer
7. Footer Base (rounded bottom image)
As you can see, four of these fields have an image in them. I've been very strict with the layout of my table, making it 550px wide, the images themselves are 550px wide and I use border-collapse on the table to remove the appearence of field edges.
The problem I'm having is that all the fields without images in them stick out an extra couple of pixels, which as I'm using rounded bottoms and tops it kinda ruins the layout. I simple can't fathom why it's doing this.
The images are added as per the `<img>` tag and what I THINK is happening is that it's putting a spacing between the edge of the field and the image and as the rest of the table is dependent on the width of the largest one it's pushing the others out a couple of pixels. I am struggling to find a solution to this, I've tried lots of different things such as minus margins on the images and tables. Can anybody offer any solutions to this?
The image below demonstrates this "stepping" and although minor, upon exporting to outlook it appears to double. The image starts above the line "Hydref 2010" -

UPDATE: I used the cellspacing and cellpadding commands and reduced them to 0 which fixed the display in a browser, but in Outlook, it's the same
| Issues with Images on HTML Emails | CC BY-SA 2.5 | null | 2010-10-08T10:50:36.553 | 2010-10-08T11:21:23.947 | 2010-10-08T11:21:23.947 | 418,146 | 418,146 | [
"html",
"image",
"email",
"margin"
] |
3,889,965 | 1 | 3,890,026 | null | 4 | 7,343 | I just start to learn web programming using IIS 7.5 in windows 2008 R2, and ASP.Net 4.
I notice that both IIS and ASP.Net can define Authentication rules. In IIS, there is a form authentication setting where I can redirect user to specified page for authentication, like below:

And then, in ASP web.config file, I find similar settings:
```
<authentication mode="Forms">
<forms loginUrl="~/Account/Login.aspx" timeout="2880" />
</authentication>
```
When I finish both settings, I assume any page request will be redirect to the login.aspx page. But it didn't. So I am confused. How do the 2 sets of configs work together? And why page request is not redirected?
Thanks
Finally I get it working and I think I understand it now. My website structure is like below:

It is about modifying Autherization rules. Deny all unauthorized users for root:
```
<authorization>
<deny users="?" />
</authorization>
```
CSS files should be allowed for all users, so I have Styles\web.config:
```
<authorization>
<allow users="*" />
</authorization>
```
and only allow unauthorized users to access register.aspx, so I have Account\web.config:
```
<location path="Register.aspx">
<system.web>
<authorization>
<allow users="*"/>
</authorization>
</system.web>
</location>
<system.web>
<authorization>
<deny users="?"/>
</authorization>
</system.web>
```
| Authentication settings in IIS 7.5 and ASP.Net, what is difference? | CC BY-SA 2.5 | null | 2010-10-08T11:19:37.147 | 2010-10-08T12:43:25.557 | 2010-10-08T12:43:25.557 | 451,875 | 451,875 | [
"asp.net",
"authentication",
"iis-7",
"web-config"
] |
3,890,070 | 1 | 3,891,163 | null | 1 | 475 | 
i need this set RED color. how to do it?
DataTable dtSet = new DataTable();
```
string sql = @"requevst";
using (MySqlConnection connection = ConnectToDataBase.GetConnection())
{
...
int count = adapter.Fill(dtSet);
}
double totalPrice = 0;
foreach (DataRow row in dtSet.Rows)
{
totalPrice += Double.Parse(row["price"].ToString());
}
DataRow lastRow = dtSet.NewRow();
lastRow["price"] = totalPrice;
dtSet.Rows.Add(lastRow);
datagrid.DataContext = dtSet;
```
| How set color for cell (DataGrid WPFtoolKIt)? | CC BY-SA 2.5 | null | 2010-10-08T11:36:06.797 | 2010-10-08T13:46:52.193 | null | null | 450,466 | [
"wpf",
"xaml",
"datagrid",
"wpftoolkit"
] |
3,890,149 | 1 | null | null | 0 | 384 | I use Chrome, background = CSS3
```
<h4 class="title-name clearfix"><a href="****************">Fairy Tail - LUCY</a> </h4>
```
why when i hover mouse over title, background change , it happen only in Chrome.

I found out solve, If `title-name{padding: 7px 15px}` then must change `title-name a{padding:7px 15px}` 'll fixed in Chrome change background when mouse hover
| background change in Chrome when mouse hover | CC BY-SA 2.5 | null | 2010-10-08T11:46:28.017 | 2010-10-14T10:23:35.317 | 2020-06-20T09:12:55.060 | -1 | 329,424 | [
"html",
"css"
] |
3,890,171 | 1 | 3,890,548 | null | 1 | 803 | I have written some matlab code for image analysis that searches for clusters in an image and that builds an adjacency matrix for those clusters, discribing which clusters are touiching eachother in the image.
I can use this adjacency matrix to derive a graph.
For completion of my algorithm I would now have to mine that graph for all nodes of a maximum degree of 2 where the node index is either higher than that of its neigbor (when the degree is 1) or between the indexes of its two neighbors.
Basically as in the image here:

I need to do so in matlab and it is important to know that my try is available as an adjacency matrix looking like:
1 2 3 4
1 0 0 1 1
2 0 0 0 1
3 1 0 0 1
4 1 1 1 0
Probably its quite simple but I just don't see the solution...
| Graph mining matlab | CC BY-SA 2.5 | 0 | 2010-10-08T11:49:58.803 | 2011-09-17T15:33:27.537 | 2011-09-17T15:33:27.537 | 97,160 | 101,812 | [
"image",
"matlab",
"graph",
"graph-theory"
] |
3,890,659 | 1 | null | null | -1 | 1,583 | `document.getElementById('grand_total_display).innerHTML = "Total is : $"+variable;` is displaying error in IE6 and IE7
I have an `<li>`with id as with some text displayed in it.
```
<li class="bannerprice" id="grand_total_display">TOTAL PRICE : $0</li>
```
I am executing a jjavascript function to insert some other value into it.. but I am displayed with the error as given below:

Please help me to rectify the issue
| document.getElementById('grand_total_display').innerHTML = "Total is : $"+variable; is displaying error in IE6 and IE7 | CC BY-SA 2.5 | null | 2010-10-08T12:56:37.313 | 2010-11-18T14:11:27.337 | 2010-11-18T14:11:27.337 | 288,773 | 184,814 | [
"javascript",
"internet-explorer-6"
] |
3,890,967 | 1 | 3,891,010 | null | 0 | 2,199 | I have a web application that utilizes the ReportViewer control in ASP.NET. The reports are defined in the web application, in .rdlc files.
The reports work great, except for the printing functionality. When the user clicks the "print" icon in the header section of the report, it appears that the web app tries to install SQL Server (?!). Here is the file download dialog that appears:

Can anyone offer a guess as to what is going on? I am not sure where to even begin to debug this, cause this is all happening "behind the scenes" in the ReportViewer's code.
Thanks for any advice you can give.
| Problem printing from ReportViewer control in ASP.NET web application | CC BY-SA 2.5 | null | 2010-10-08T13:26:50.913 | 2011-11-02T07:31:13.057 | null | null | 111,234 | [
"asp.net",
"sql",
"reportviewer",
"report"
] |
3,890,986 | 1 | 11,184,073 | null | 2 | 14,706 | i try to use : Microsoft.Exchange.WebServices.dll to use outlook. but connection return error
Error return line:
my codes:
```
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Net.Mail;
using System.Net;
using Microsoft.Exchange.WebServices.Data;
using Microsoft.Exchange.WebServices.Autodiscover;
using System.Net.Security;
using System.Security.Cryptography.X509Certificates;
namespace test
{
class Program
{
static void Main(string[] args)
{
try
{
// Connect to Exchange Web Services as user1 at contoso.com.
ExchangeService service = new ExchangeService(ExchangeVersion.Exchange2007_SP1);
service.Credentials = new WebCredentials("[email protected]", "mypassword", "xxxx.com");
service.TraceEnabled = true;
service.AutodiscoverUrl("[email protected]");
// Create the e-mail message, set its properties, and send it to [email protected], saving a copy to the Sent Items folder.
EmailMessage message = new EmailMessage(service);
message.Subject = "Interesting";
message.Body = "The proposition has been considered.";
message.ToRecipients.Add("[email protected]");
message.SendAndSaveCopy();
// Write confirmation message to console window.
Console.WriteLine("Message sent!");
Console.ReadLine();
}
catch (Exception ex)
{
Console.WriteLine("Error: " + ex.Message);
Console.ReadLine();
}
}
}
}
```

| How to use Microsoft.Exchange.WebServices? | CC BY-SA 2.5 | null | 2010-10-08T13:29:15.607 | 2020-03-13T17:32:54.837 | 2010-10-08T17:09:33.727 | 151,249 | 52,420 | [
"c#",
"visual-studio",
"exchange-server",
"exchange-server-2007",
"ews-managed-api"
] |
3,891,406 | 1 | 3,891,453 | null | 1 | 375 | In Visual Studio 2010 I have applied a different color scheme and installed a productivity tool (Teleriks JustCode)... now where every my cursor is the background color of the entire line is light gray. It's really annoying and I'm not sure what is causing it. Has anyone seen this? If so do you know how to turn it off?

| Annoying Visual Studio IDE Highlighting Question | CC BY-SA 2.5 | null | 2010-10-08T14:11:26.083 | 2010-10-08T14:16:15.900 | null | null | 137,575 | [
"visual-studio"
] |
3,891,505 | 1 | 3,891,566 | null | -4 | 144 | As shown in this screenshot:

I tried looking in the source code , but couldn't find it myself.
| How does google add the light blue colored vertical and horizontal bars (html/Css) | CC BY-SA 3.0 | null | 2010-10-08T14:22:50.767 | 2011-12-07T22:45:11.417 | 2011-12-07T22:45:11.417 | 84,042 | 161,179 | [
"html",
"css"
] |
3,891,559 | 1 | 3,891,606 | null | 0 | 3,889 | I have a sql statement that pulls infomration about tagnum's for individual pidm's. Every pidm can have multiple tagnum's so I am dropping the information into an arraylist. I want to display the contents of this arraylist in a dropdown box on a html page.
Here is the code for the arraylist:
```
<table style="border:transparent" style="width:100%">
<tr>
<td style ="width: 300px;">
<select style="width:150px;"tabindex="5" name="Tag">
<option></option>
<%} rscheck.close();
ResultSet rsTagCheck = stmt.executeQuery("SELECT PARKING.XKRPRMT.XKRPRMT_PIDM, PARKING.XKRPRMT.XKRPRMT_STATUS, PARKING.XKRPRMT.XKRPRMT_EXPIRE_YR, PARKING.XKRPRMT.XKRPRMT_TAG FROM PARKING.XKRPRMT WHERE XKRPRMT_PIDM ='" + BannerID + "'");
while (rsTagCheck.next()){
ArrayList<String> myTag = new ArrayList<String>();
myTag.add(rsTagCheck.getString("XKRPRMT_TAG"));
%>
<option><%= myTag.get(0) %></option>
</select>
</td>
```
I can get the first element to show in the drop down box, but anything after that show an outofbounds exception. I want to know how to display ALL of the information in the arraylist.
@Pointy I did that and all I got was this:

It put the first one in there, but the rest would not populate!!
| How to display the contents of an arraylist in a drop down box | CC BY-SA 2.5 | null | 2010-10-08T14:28:23.063 | 2010-10-08T16:26:24.747 | 2010-10-08T16:26:24.747 | 157,882 | 171,025 | [
"html",
"jsp",
"arraylist"
] |
3,891,603 | 1 | 3,939,202 | null | 4 | 1,417 | There seems to be a bit of an issue with two grids containing elements specified in a certain way, and the SharedSizeGroup.
This question is in response to an [earlier question](https://stackoverflow.com/questions/3865033/grid-height-not-adjusting-properly-when-a-row-height-with-sharedsizegroup-changes/3865406#3865406) from [user D.H.](https://stackoverflow.com/users/310042/d-h) I attempted to answer. Forgive the length, but it helps to demonstrate the problem visually.
His original question asked why two grids with a SharedSizeGroup didn't resize to the same height when certain conditions were met (resizing a TextBlock in the right-side grid). I took his example and expanded it, because I suspected that it had to do with the Measure/Arrange cycle.
It turns out that it does, in fact, have to do with Measure and Arrange. Actually, it has to do with doing a Measure.
Here is a quick overview of what happens (garish colors for demo purposes only).
Both grids have three rows, each containing a TextBlock. The middle row is of SharedSizeGroup. The text of the middle row is bound to the ActualHeight of its TextBlock, with the initial Height property hard-coded to the values you see. The numbers below the grids represent the ActualHeight of that grid. Note that the BackgroundColor of the left grid is Green.

When the right-side grid is increased in size, you can see that both grids resize to the new height, due to the SharedSizeGroup. The column at the right reflects the Measure and Arrange calls of the grids.

When the right-side grid is decreased in size, but still larger than the size of the hard-coded TextBlock of the left side, you can see that both grids again resize to the new height, due to the SharedSizeGroup. The column at the right reflects the Measure and Arrange calls of the grids.

When the right-side grid is decreased in size, less than the size of the hard-coded TextBlock of the left side, you can see that the left-side grid does not decrease to the "proper" size, as evidenced by seeing the Green background of the grid at the bottom, and the fact that the size of the grid is 150, not 130.
If you look at the info on the right, you will notice that the Left grid did an Arrange, but

---
Here is the example code to duplicate the issue.
```
using System.Windows;
using System.Windows.Controls;
namespace GridMeasureExample
{
class InfoGrid : Grid
{
protected override Size ArrangeOverride(Size arrangeSize)
{
CallReportInfoEvent("Arrange");
return base.ArrangeOverride(arrangeSize);
}
protected override Size MeasureOverride(Size constraint)
{
CallReportInfoEvent("Measure");
return base.MeasureOverride(constraint);
}
public event EventHandler<InfoGridEventArgs> ReportInfo;
private void CallReportInfoEvent(string message)
{
if (ReportInfo != null)
ReportInfo(this, new InfoGridEventArgs(message));
}
}
public class InfoGridEventArgs : EventArgs
{
private InfoGridEventArgs()
{
}
public InfoGridEventArgs(string message)
{
this.TimeStamp = DateTime.Now;
this.Message = message;
}
public DateTime TimeStamp
{
get;
private set;
}
public String Message
{
get;
private set;
}
}
}
```
```
<Window x:Class="GridMeasureExample.Window1"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:GridMeasureExample"
Title="SharedSizeGroup" Height="500" Width="500">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="*" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<StackPanel Grid.Column="0"
Grid.Row="0"
Orientation="Horizontal"
HorizontalAlignment="Left"
VerticalAlignment="Top"
Grid.IsSharedSizeScope="True">
<StackPanel Orientation="Vertical" Width="100">
<local:InfoGrid x:Name="grid1" Background="Green" ShowGridLines="True">
<Grid.RowDefinitions>
<RowDefinition Height="15" />
<RowDefinition SharedSizeGroup="Group1" />
<RowDefinition Height="15" />
</Grid.RowDefinitions>
<TextBlock Background="Blue" Grid.Row="0" Text="Row 0"/>
<TextBlock Background="Red" Grid.Row="1" Name="textBlock1" Height="100"
Text="{Binding RelativeSource={RelativeSource Self}, Path=ActualHeight}"/>
<TextBlock Background="Blue" Grid.Row="2" Text="Row 2" />
</local:InfoGrid>
<TextBlock Text="{Binding Path=ActualHeight, ElementName=grid1}" />
</StackPanel>
<StackPanel Orientation="Vertical" Width="100">
<local:InfoGrid x:Name="grid2" Background="Yellow" ShowGridLines="True">
<Grid.RowDefinitions>
<RowDefinition Height="15" />
<RowDefinition SharedSizeGroup="Group1" />
<RowDefinition Height="15" />
</Grid.RowDefinitions>
<TextBlock Background="Orange" Grid.Row="0" Text="Row 0" />
<TextBlock Background="Purple" Grid.Row="1" Name="textBlock2" Height="150"
Text="{Binding RelativeSource={RelativeSource Self}, Path=ActualHeight}"/>
<TextBlock Background="Orange" Grid.Row="2" Text="Row 2" />
</local:InfoGrid>
<TextBlock Text="{Binding Path=ActualHeight, ElementName=grid2}" />
</StackPanel>
</StackPanel>
<ListBox x:Name="lstInfo"
Grid.Column="1"
Grid.Row="0"
Margin="10,0,0,0"
HorizontalAlignment="Stretch"
VerticalAlignment="Stretch" />
<UniformGrid Grid.Column="0"
Grid.Row="1"
Grid.ColumnSpan="2"
Columns="2"
HorizontalAlignment="Center"
Margin="5">
<Button x:Name="btnIncrease" Margin="4,0">Increase</Button>
<Button x:Name="btnDecrease" Margin="4,0">Decrease</Button>
</UniformGrid>
</Grid>
</Window>
```
public Window1()
{
InitializeComponent();
```
btnIncrease.Click += (s, e) =>
{
lstInfo.Items.Add(String.Format("{0} Increase Button Pressed", DateTime.Now.ToString("HH:mm:ss.ffff")));
textBlock2.Height += 30;
};
btnDecrease.Click += (s, e) =>
{
lstInfo.Items.Add(String.Format("{0} Decrease Button Pressed", DateTime.Now.ToString("HH:mm:ss.ffff")));
if (textBlock2.ActualHeight >= 30)
textBlock2.Height -= 30;
};
grid1.ReportInfo += (s, e) => lstInfo.Items.Add(String.Format("{0} Left Grid: {1}", e.TimeStamp.ToString("HH:mm:ss.ffff"), e.Message));
grid2.ReportInfo += (s, e) => lstInfo.Items.Add(String.Format("{0} Right Grid: {1}", e.TimeStamp.ToString("HH:mm:ss.ffff"), e.Message));
}
```
| Measure/Arrange Of Grids with SharedSizeGroup | CC BY-SA 2.5 | 0 | 2010-10-08T14:34:10.553 | 2010-10-15T13:19:56.530 | 2017-05-23T12:13:54.673 | -1 | 285,417 | [
"wpf",
"measurement",
"measure"
] |
3,891,707 | 1 | 3,895,943 | null | 1 | 1,583 | We are trying to setup Jboss 4 to authenticate users using Microsoft Lightweight Active Directory Service (aka ADAM)
user name: admin
CN=admin,CN=Users,CN=donLaptop,DC=don,DC=com
JBoss can connect to ADAM, but somehow cannot validate the password (fig4)
Using Apache Directory Studio, I can verify that CN=admin,CN=Users,CN=donLaptop,DC=don,DC=com can connect successfully to ADAM(fig5)
jboss config - figure3
ADAM config/ADSI - fig1 and fig2
What am I missing?
Please help





| JBoss Ldap Auth LdapExtLoginModule problem | CC BY-SA 2.5 | 0 | 2010-10-08T14:48:57.840 | 2010-10-09T06:29:20.490 | 2010-10-09T05:15:49.403 | 115,988 | 115,988 | [
"java",
"authentication",
"jboss",
"ldap"
] |
3,891,850 | 1 | null | null | 15 | 11,949 |
Images who are projected on the MKMapView using a MKOverlayView use the [Mercator projection](http://en.wikipedia.org/wiki/Mercator_projection), while the image that I use as input data uses a WGS84 projection. Is there a way to convert the input image, to the right projection WGS84 -> Mercator, without tiling the image up and can it done on the fly?
Normally you could convert a image to right projection using the program [gdal2tiles](http://www.gdal.org/gdal2tiles.html).
The input data however changes every fifteen minutes, so the image has to be converted every fifteen minutes. So the conversion has to be done on the fly. I also want the tiling to be done by Mapkit and not by myself using gdal2tiles or the GDAL framework.
I'm currently working on a project which displays a rainfall radar over some part of the world. The radar image is provided by EUMETSAT, they offer a KML file which can be loaded into Google Earth or Google Maps. If I load the KML file in Google Maps it displays perfectly, but if I draw the image using a MKOverlayView on a MKMapView, the image is slightly of.
For example, on the left side, Google Maps and on the right side the same image is displayed at a MKMapView.


The surface that the image covers can be viewed on [Google Maps](http://maps.google.com/maps?f=q&source=s_q&hl=nl&geocode=&q=http:%2F%2Foiswww.eumetsat.org%2FIPPS%2Fhtml%2FGE%2FEUM.kml&sll=37.0625,-95.677068&sspn=48.287373,114.169922&ie=UTF8&ll=32.842674,7.734375&spn=150.886926,96.679687&z=2), the satellite that is used for the image is the "Meteosat 0 Degree" satellite.
The surface that both images cover is of the same size, this is the LatLonBox from the KML file, it specifies where the top, bottom, right, and left sides of a bounding box for the ground overlay are aligned.
```
<LatLonBox id="GE_MET0D_VP-MPE-latlonbox">
<north>57.4922</north>
<south>-57.4922</south>
<east>57.4922</east>
<west>-57.4922</west>
<rotation>0</rotation>
</LatLonBox>
```
I create a new custom MKOverlay object called RadarOverlay with these parameters,
```
[[RadarOverlay alloc] initWithImageData:[[self.currentRadarData objectAtIndex:0] valueForKey:@"Image"] withLowerLeftCoordinate:CLLocationCoordinate2DMake(-57.4922, -57.4922) withUpperRightCoordinate:CLLocationCoordinate2DMake(57.4922, 57.4922)];
```
The implementation of the custom MKOverlay object; RadarOverlay
```
- (id) initWithImageData:(NSData*) imageData withLowerLeftCoordinate:(CLLocationCoordinate2D)lowerLeftCoordinate withUpperRightCoordinate:(CLLocationCoordinate2D)upperRightCoordinate
{
self.radarData = imageData;
MKMapPoint lowerLeft = MKMapPointForCoordinate(lowerLeftCoordinate);
MKMapPoint upperRight = MKMapPointForCoordinate(upperRightCoordinate);
mapRect = MKMapRectMake(lowerLeft.x, upperRight.y, upperRight.x - lowerLeft.x, lowerLeft.y - upperRight.y);
return self;
}
- (CLLocationCoordinate2D)coordinate
{
return MKCoordinateForMapPoint(MKMapPointMake(MKMapRectGetMidX(mapRect), MKMapRectGetMidY(mapRect)));
}
- (MKMapRect)boundingMapRect
{
return mapRect;
}
```
The implementation of the custom MKOverlayView, RadarOverlayView
```
- (void)drawMapRect:(MKMapRect)mapRect zoomScale:(MKZoomScale)zoomScale inContext:(CGContextRef)context
{
RadarOverlay* radarOverlay = (RadarOverlay*) self.overlay;
UIImage *image = [[UIImage alloc] initWithData:radarOverlay.radarData];
CGImageRef imageReference = image.CGImage;
MKMapRect theMapRect = [self.overlay boundingMapRect];
CGRect theRect = [self rectForMapRect:theMapRect];
CGRect clipRect = [self rectForMapRect:mapRect];
NSUserDefaults *preferences = [NSUserDefaults standardUserDefaults];
CGContextSetAlpha(context, [preferences floatForKey:@"RadarTransparency"]);
CGContextAddRect(context, clipRect);
CGContextClip(context);
CGContextDrawImage(context, theRect, imageReference);
[image release];
}
```
When I download the image, I flip the image so it can be easily drawn in the MKOverlayView
```
size_t width = (CGImageGetWidth(imageReference) / self.scaleFactor);
size_t height = (CGImageGetHeight(imageReference) / self.scaleFactor);
// Calculate colorspace for the specified image
CGColorSpaceRef imageColorSpace = CGImageGetColorSpace(imageReference);
// Allocate and clear memory for the data of the image
unsigned char *imageData = (unsigned char*) malloc(height * width * 4);
memset(imageData, 0, height * width * 4);
// Define the rect for the image
CGRect imageRect;
if(image.imageOrientation==UIImageOrientationUp || image.imageOrientation==UIImageOrientationDown)
imageRect = CGRectMake(0, 0, width, height);
else
imageRect = CGRectMake(0, 0, height, width);
// Create the imagecontext by defining the colorspace and the address of the location to store the data
CGContextRef imageContext = CGBitmapContextCreate(imageData, width, height, 8, width * 4, imageColorSpace, kCGImageAlphaPremultipliedLast);
CGContextSaveGState(imageContext);
// Scale the image to the opposite orientation so it can be easylier drawn with CGContectDrawImage
CGContextTranslateCTM(imageContext, 0, height);
CGContextScaleCTM(imageContext, 1.0, -1.0);
if(image.imageOrientation==UIImageOrientationLeft)
{
CGContextRotateCTM(imageContext, M_PI / 2);
CGContextTranslateCTM(imageContext, 0, -width);
}
else if(image.imageOrientation==UIImageOrientationRight)
{
CGContextRotateCTM(imageContext, - M_PI / 2);
CGContextTranslateCTM(imageContext, -height, 0);
}
else if(image.imageOrientation==UIImageOrientationDown)
{
CGContextTranslateCTM(imageContext, width, height);
CGContextRotateCTM(imageContext, M_PI);
}
// Draw the image in the context
CGContextDrawImage(imageContext, imageRect, imageReference);
CGContextRestoreGState(imageContext);
```
After I flipped the image, I manipulate it and then store it in memory as a NSData object.
It looks like the image got stretched, but it looks allright at the center of the image, which is at the equator.
| How to display an image on a MKOverlayView? | CC BY-SA 2.5 | 0 | 2010-10-08T15:07:18.127 | 2011-09-11T08:22:53.133 | 2010-11-13T00:40:32.913 | 281,057 | 281,057 | [
"iphone",
"objective-c",
"cocoa-touch",
"core-graphics",
"mapkit"
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.