Id
int64 1.68k
75.6M
| PostTypeId
int64 1
2
| AcceptedAnswerId
int64 1.7k
75.6M
⌀ | ParentId
int64 1.68k
75.6M
⌀ | Score
int64 -60
3.16k
| ViewCount
int64 8
2.68M
⌀ | Body
stringlengths 1
41.1k
| Title
stringlengths 14
150
⌀ | ContentLicense
stringclasses 3
values | FavoriteCount
int64 0
1
⌀ | CreationDate
stringlengths 23
23
| LastActivityDate
stringlengths 23
23
| LastEditDate
stringlengths 23
23
⌀ | LastEditorUserId
int64 -1
21.3M
⌀ | OwnerUserId
int64 1
21.3M
⌀ | Tags
list |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
5,053,186 | 1 | 5,053,283 | null | 14 | 15,750 | In work and in home I have VS2010 installed. But in work I have this one cool feature. On the code behind file I have two drop downs. When I select some object in the left one lets say a testButton or Default2 (a page class), on the right one I get all available events for that object and when I select an event Visual Studio autogenerates it in my code-behind file. In my home VS I actually have does 2 drop downs but they work different. I have available objects on the right one but when I select for example the testButton it shows me the aspx page and points this button :/ Should I set sommething in the VS configuration or maybe in work I have some addon which I'm not aware of? Any ideas?

| Visual studio 2010 showing available events from code behind | CC BY-SA 2.5 | 0 | 2011-02-19T20:02:07.247 | 2019-09-11T15:13:10.940 | 2011-02-21T09:02:34.470 | 358,996 | 358,996 | [
"c#",
".net",
"visual-studio",
"visual-studio-2010",
"events"
]
|
5,053,608 | 1 | 5,053,624 | null | 0 | 1,224 | In VS 2010 i do not have possibility to choose x86 platform. There is always ANY CPU. How can i change this. I need x86 because some dll works only in x86.

| Can't choose x86 platform in VS 2010 | CC BY-SA 3.0 | null | 2011-02-19T21:21:02.723 | 2013-10-17T19:33:21.460 | 2013-10-17T19:33:21.460 | 76,337 | 267,679 | [
"visual-studio-2010"
]
|
5,053,707 | 1 | 5,053,731 | null | 2 | 6,996 | I want to make a button like this.

As you can see, there is 2 lines and lines' font size is different . Is this possible with using CSS + HTML (and maybe JS) ? I don't want to use image for button.
(Font face doens't matter)
Thank you ;)
| 2 Line Button Value | CC BY-SA 2.5 | null | 2011-02-19T21:37:00.860 | 2012-05-25T07:56:57.807 | null | null | 556,169 | [
"html",
"css",
"button"
]
|
5,053,834 | 1 | 19,796,639 | null | 421 | 742,669 | Is there any way to completely turn Eclipse to a dark IDE?
Here's a [Picture](http://www.matthewimrie.ca/wp-content/uploads/2010/10/OmegaTheme.png) of what I'm asking:
I don't mind doing 1 hour of work to do something like this :D
As Konstantin Komissarchik said, I had to modify my OS colors. This is possible by adding a custom Visual Style to the Windows. With the aid of a [Custom Theme](http://www.eclipsecolorthemes.org/) and a [Custom Visual Style for Windows 7](http://jaycee13.deviantart.com/art/Mango-XB-K-Visual-Style-7-244943275) (Which I have changed a little bit), my Eclipse looks like the picture below:

## Update 2019:
The latest versions of Eclipse now come with a dark theme. Just go to `Window -> Preferences -> General -> Appearance -> Theme` and select "Dark" or another appropriate version based on your operating system.
[](https://i.stack.imgur.com/MbWSj.png)
Of course you can still enable dark visual styles to your Windows or change your theme on other operating systems but the default dark theme is good enough for the most part.
| Eclipse IDE for Java - Full Dark Theme | CC BY-SA 4.0 | 0 | 2011-02-19T22:05:15.657 | 2022-07-29T12:11:27.077 | 2021-05-27T06:21:29.320 | 136,285 | 603,200 | [
"eclipse",
"themes"
]
|
5,054,277 | 1 | null | null | 1 | 3,429 | There is many plugins for zooming image (like [jqzoom](http://www.mind-projects.it/projects/jqzoom/index.php)). But I want to zoom image with hovering on image in another div:

Is there any way to have an effect like jqzoom (inner zoom)but with mouseover on another element?
I want this effect : seavello.com/r/zoom/zoom.html, but with mouseover on thumbnial not main image
Thanks in advance
| Zoom an image with mouseover on image in another div | CC BY-SA 2.5 | 0 | 2011-02-19T23:48:47.040 | 2014-08-25T18:33:10.043 | 2011-02-20T01:39:37.277 | 361,635 | 361,635 | [
"jquery"
]
|
5,054,339 | 1 | null | null | 4 | 513 | I'm developing my "Hello, World" application for Android and came around something that annoys me.
The theme used for my app's `AlertDialog` isn't the same used for other such dialogs presented on the device. The device is a HTC Desire HD on which I've changed the theme, but I was expecting that standard UI elements (like `AlertDialog`) would somehow reflect the device theme. It's something that I'm missing or maybe a know problem with some vendors/models?
Here's my code:
```
final AlertDialog.Builder confirm = new AlertDialog.Builder(this);
confirm.setTitle("Delete")
.setMessage("Really Delete?")
.setPositiveButton("Delete", new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
// ...
}
})
.setNegativeButton("Cancel", null)
.show();
```
And here's how the dialog looks like in different situations:
### Device's AlertDialog with default theme (Messages app)

### Device's AlertDialog with changed theme (Messages app)

### My app's AlertDialog (with both default and changed theme)

Thanks.
| How to use vendor theme in Android application | CC BY-SA 2.5 | 0 | 2011-02-20T00:03:12.133 | 2011-02-22T08:20:13.143 | null | null | 58,808 | [
"android",
"themes",
"vendor"
]
|
5,054,415 | 1 | 5,054,432 | null | 23 | 64,767 | given a div that is 500px wide, is there a way to fill the background with 2 different colors using css? I know it can be done with a background image, but just wondering if it can be done with bg color.
eg :

| fill div with 2 colors? | CC BY-SA 2.5 | 0 | 2011-02-20T00:16:16.760 | 2020-07-22T11:00:36.767 | null | null | 66,975 | [
"html",
"css"
]
|
5,054,522 | 1 | 5,062,862 | null | 1 | 1,109 | I think I must be having a brain freeze because for the life of me, I can't seem to understand this. I am using CodeIgniter to set cookie for a Facebook status. When a user first lands on a fan page and isn't a fan, I set the cookie to "NOT LIKED YET". Then, when the user likes the page, the page is reloaded and the cookie is checked for a value. If the cookie exists and the value is "NOT LIKED YET", I set the cookie to "ALREADY LIKED".
Somehow, when I trace the cookie in Firebug, it always says "NOT LIKED YET" although the headers for the page clearly shows the cookie value has changed. Any ideas what I am doing incorrectly?
```
if ($fan_page_liked == '')
{
$this->_set_cookie_for_conversion('NOT LIKED YET');
$data['before_like'] = $this->config->item('before_like_image');
} else if($fan_page_liked == 1)
{
$after_like_cookie = get_cookie($facebook_cookie);
if ($after_like_cookie == 'NOT LIKED YET')
{
$this->_set_cookie_for_conversion('ALREADY LIKED');
}
}
private function _set_cookie_for_conversion($value)
{
$this->load->helper('cookie');
$facebook_cookie = $this->config->item('facebook_like_cookie');
$cookie = array(
'name' => $facebook_cookie,
'value' => $value,
'expire' => '86500'
);
set_cookie($cookie);
}
```

| Cookie issues (Codeigniter) | CC BY-SA 2.5 | null | 2011-02-20T00:42:11.870 | 2011-02-21T06:04:25.360 | 2011-02-20T01:00:29.867 | 81,711 | 81,711 | [
"php",
"codeigniter",
"cookies"
]
|
5,055,007 | 1 | 5,055,028 | null | 0 | 23 | 
I want to reference header.inc in register.php how do I do it?
| How does one reference files that are on the same level on a web server? | CC BY-SA 2.5 | null | 2011-02-20T03:15:49.403 | 2011-02-20T03:20:45.963 | null | null | 407,756 | [
"file",
"reference",
"filesystems",
"include",
"include-path"
]
|
5,055,124 | 1 | 5,081,852 | null | 0 | 1,320 | I'm trying to submit a mac app store and during the testing/submitting step it ask's for an identity.

My understanding is that this should be the app store identity, however the only option I have available is Don't sign.
I have verified that my keychain has both my '3rd party developer application' and the 'Apple Worldwide developer relations certificate authority'. Has anyone else ever ran into this problem? What am I missing?
| xcode validate/submit app has no identities available | CC BY-SA 2.5 | null | 2011-02-20T03:46:17.127 | 2011-02-22T17:52:22.327 | null | null | 127,853 | [
"xcode",
"macos",
"app-store",
"identity"
]
|
5,055,159 | 1 | 5,057,365 | null | 6 | 1,579 | I am trying to implement redraw regions with up to 3 regions but can't think of an efficient way to find the best set of regions given a set of rectangles.
So there would be a set of rectangles and I would need to calculate up to 3 bounding rectangles that produce the smallest area.

The black rectangles are the set of rectangles whereas the red rectangles are the bounding boxes (up to 3) that produce the smallest possible area. Need to work out the best possible combination of bounding boxes.
| Given a set of rectangles, find 3 bounding rectangles with the smallest area | CC BY-SA 2.5 | null | 2011-02-20T03:58:34.670 | 2011-02-22T16:11:01.630 | 2011-02-20T06:58:56.893 | 233,427 | 233,427 | [
"algorithm",
"math",
"area"
]
|
5,055,156 | 1 | 5,055,194 | null | 2 | 1,277 | I have a case where I have a ul li menu that I would like some of the elements to be aligned to the right.
I can't put a defined size because the menu changes and sometimes there are more or less nav elements. Also sometimes there may be more then one item I want aligned right.

Here is a jsfiddle I started to demonstrate what I am trying to do in code.
[http://jsfiddle.net/bjPAt/](http://jsfiddle.net/bjPAt/)
```
<ul>
<li><a href="#">Nav 1</a></li>
<li><a href="#">Nav 2</a></li>
<li><a href="#" class="right_nav">Right Nav</a></li>
</ul>
```
** This may not be possible and I will have to change the html around.
| ul li List Style Navigation with some items right aligned | CC BY-SA 2.5 | 0 | 2011-02-20T03:58:08.033 | 2011-02-20T04:11:01.420 | null | null | 428,579 | [
"html",
"css",
"navigation",
"html-lists"
]
|
5,055,433 | 1 | 5,055,733 | null | 5 | 1,777 | 
In my .NET applications, context menus look like the left one.
How can I apply the Windows 7 style on them in order to make them look like the right one?
| How to display a Windows 7 style context menu? | CC BY-SA 2.5 | 0 | 2011-02-20T05:32:22.600 | 2011-02-20T08:14:13.007 | 2011-02-20T08:14:13.007 | 366,904 | null | [
".net",
"winforms",
"windows-7",
"contextmenu",
"aero"
]
|
5,055,417 | 1 | null | null | 2 | 7,657 | How to customize the default `html` output of javascript of default twitter widget?
[http://twitter.com/about/resources/widgets/widget_profile](http://twitter.com/about/resources/widgets/widget_profile)
In the default widget I want to remove Header and footer from output source `display:none`)** )** of this, just want to keep the tweet area.

This is default twitter code.
```
<script src="http://widgets.twimg.com/j/2/widget.js"></script>
<script>
new TWTR.Widget({
version: 2,
type: 'profile',
rpp: 1,
interval: 6000,
width: 'auto',
height: 300,
theme: {
shell: {
background: '#333333',
color: '#ffffff'
},
tweets: {
background: 'transparent',
color: '#ffffff',
links: '#4aed05'
}
},
features: {
scrollbar: false,
loop: false,
live: false,
hashtags: false,
timestamp: false,
avatars: false,
behavior: 'all'
}
}).render().setUser('tutsplus').start();
</script>
```
And this is the output of default code
```
<div id="twtr-widget-1" class="twtr-widget twtr-widget-profile">
<div style="width: 100%;" class="twtr-doc">
<div class="twtr-hd">
<a class="twtr-profile-img-anchor" href="http://twitter.com/tutsplus" target="_blank">
<img src="http://a2.twimg.com/profile_images/63581538/tutsplus_normal.jpg" class="twtr-profile-img" alt="profile"></a>
<h3>
Tuts+</h3>
<h4>
<a href="http://twitter.com/tutsplus" target="_blank">tutsplus</a></h4>
</div>
<div class="twtr-bd">
<div style="height: auto;" class="twtr-timeline">
<div class="twtr-tweets">
<div class="twtr-reference-tweet">
</div>
<div id="tweet-id-1" class="twtr-tweet">
<div class="twtr-tweet-wrap">
<div class="twtr-avatar">
<div class="twtr-img">
<a href="http://twitter.com/tutsplus" target="_blank">
<img src="http://a2.twimg.com/profile_images/63581538/tutsplus_normal.jpg" alt="tutsplus profile"></a></div>
</div>
<div class="twtr-tweet-text">
<p>
<a class="twtr-user" href="http://twitter.com/tutsplus" target="_blank">tutsplus</a> If you like Rockable books, consider following Rockable on Twitter (@<a href="http://twitter.com/rockablepress" class="twtr-atreply" target="_blank">rockablepress</a>) or Facebook (<a href="http://www.facebook.com/rockablepress" target="_blank" class="twtr-hyperlink">http://www.facebook.com/...</a>) <em><a href="http://twitter.com/tutsplus/status/38368449310760960" time="Thu Feb 17 22:45:25 +0000 2011" class="twtr-timestamp" target="_blank">2 days ago</a> · <a href="http://twitter.com/?status=@tutsplus%20&in_reply_to_status_id=38368449310760960&in_reply_to=tutsplus" class="twtr-reply" target="_blank">reply</a> </em>
</p>
</div>
</div>
</div>
<!-- tweets show here -->
</div>
</div>
</div>
<div class="twtr-ft">
<div>
<a href="http://twitter.com" target="_blank">
<img src="http://widgets.twimg.com/i/widget-logo.png" alt=""></a> <span><a href="http://twitter.com/tutsplus" style="color: rgb(255, 255, 255);" class="twtr-join-conv" target="_blank">Join the conversation</a></span>
</div>
</div>
</div>
</div>
```
And I want to get this part only as a output in source from the above default source.
```
<div class="twtr-tweet-text">
<p>
<a class="twtr-user" href="http://twitter.com/tutsplus" target="_blank">tutsplus</a> If you like Rockable books, consider following Rockable on Twitter (@<a href="http://twitter.com/rockablepress" class="twtr-atreply" target="_blank">rockablepress</a>) or Facebook (<a href="http://www.facebook.com/rockablepress" target="_blank" class="twtr-hyperlink">http://www.facebook.com/...</a>) <em><a href="http://twitter.com/tutsplus/status/38368449310760960" time="Thu Feb 17 22:45:25 +0000 2011" class="twtr-timestamp" target="_blank">2 days ago</a> · <a href="http://twitter.com/?status=@tutsplus%20&in_reply_to_status_id=38368449310760960&in_reply_to=tutsplus" class="twtr-reply" target="_blank">reply</a> </em>
</p>
</div>
```
[http://jsfiddle.net/ZUVzd/](http://jsfiddle.net/ZUVzd/)
| How to customize the default html output of javascript of default twitter widget? | CC BY-SA 2.5 | 0 | 2011-02-20T05:26:46.887 | 2011-12-14T14:05:01.537 | null | null | 84,201 | [
"javascript",
"css",
"xhtml",
"twitter"
]
|
5,055,587 | 1 | 5,055,938 | null | 2 | 2,994 | I'm using `post` to send info to my page. I'm using that to create a variable and pass that variable to a new `<input>`. However, when I submit the new form, the variable is blank.
The variable is created from post data:
```
$timenotstarted = $_POST["placeholder"];
```
Then inline in the html:
```
<form name="newform" method="post" action="insert.php">
<input type="text" name="timerset" value="<?php echo $timenotstarted; ?>">
<input type="submit" value="Submit"><
</form>
```
When the new form is submitted, the variable whose `name="timerset"`, is blank.
When I echo `$timenotstarted` on the same page that this form is,
it will show its value. It just "goes away" when I try to use it in the new form.
Edit: Here's what's happeneing:

Not sure if this helps: [http://forexguruguide.com/timer/insert.php](http://forexguruguide.com/timer/insert.php)
And here's the whole shabang:
```
<?php include 'connect.php';
$timenotstarted = $_GET["placeholder"];
$start = $_POST["start"];
$timerset = $_post["timerset"];
echo $timenotstarted . '<br />';
echo $start . '<br />';
echo $timerset . '<br />';
?>
<form name="timeform" method="get" action="insert.php">
<select name="placeholder">
<option value="1">1 min</option>
<option value="3">3 min</option>
<option value="5">5 min</option>
<option value="10">10 min</option>
</select>
<input type="submit" value="Set timer">
</form>
<form name="startform" method="post" action="insert.php">
<input type="hidden" value="1" name="start">
Timer set to: <input type="text" name="timerset" value="<?php print $timenotstarted?>">
<input type="Submit" value="Start Timer">
</form>
<?php
if ($start==1) {
$target = time() + ($timerset * 60);
mysql_query("UPDATE countdowntimer SET target='$target' WHERE id='0'");
mysql_query("UPDATE countdowntimer SET timenotstarted='null' WHERE id='0'");
echo 'Timer started' . '<br />';
echo $target . '<br />';
echo time(); }
else if (!empty($timenotstarted)) {
$timenotstarted .= ":00";
mysql_query("UPDATE countdowntimer SET timenotstarted='$timenotstarted'");
echo 'Timer set to: ' . $timenotstarted; }
else {
echo 'Set the timer then start the timer'; }
?>
```
| Using $_POST data to create a new html form value | CC BY-SA 2.5 | null | 2011-02-20T06:15:19.463 | 2011-02-20T08:03:47.473 | 2011-02-20T07:11:11.940 | 607,569 | 607,569 | [
"php",
"mysql",
"forms",
"input",
"echo"
]
|
5,055,741 | 1 | 5,055,816 | null | 3 | 495 | Normally Table data bind from top to bottom with column headers at the top of the table.Is there way to change the data binding from left to right and headers in the first column of the table?

| How to change data binding from left to right in Asp.net table? | CC BY-SA 2.5 | 0 | 2011-02-20T07:06:34.760 | 2011-02-20T07:27:20.367 | 2011-02-20T07:13:14.160 | 2,558,060 | 2,558,060 | [
"c#",
"asp.net",
"data-binding"
]
|
5,055,851 | 1 | 5,055,879 | null | 6 | 4,150 | I was writing an app using the Windows API, and I wanted to know how to make a listview with subitems that contain multi-colored text.
To clarify, here is a picture of how it is implemented in API Monitor:

Notice that in the "API" column, the text has multiple colors, like it is rich text or something. I was wondering how I would do this.
Someone told me to do something with custom-drawing, but he wasn't sure. I looked into it, and I handled `NM_CUSTOMDRAW`. Here is the result of my test:

And here is the code:
```
inline LRESULT HandleWM_NOTIFY(LPARAM lParam)
{
switch (((LPNMHDR)lParam)->code)
{
case NM_CUSTOMDRAW:
{
switch (((LPNMHDR)lParam)->idFrom)
{
case ID_LISTVIEW1:
{
LPNMLVCUSTOMDRAW lpNMLVCD = (LPNMLVCUSTOMDRAW)lParam;
if (lpNMLVCD->nmcd.dwDrawStage == CDDS_PREPAINT)
{
return CDRF_NOTIFYITEMDRAW;
}
else if (lpNMLVCD->nmcd.dwDrawStage == CDDS_ITEMPREPAINT)
{
COLORREF crText;
switch (lpNMLVCD->nmcd.dwItemSpec % 3)
{
case 0:
crText = RGB(255, 0, 0);
break;
case 1:
crText = RGB(0, 255, 0);
break;
case 2:
crText = RGB(0, 0, 255);
break;
}
lpNMLVCD->clrText = crText;
lpNMLVCD->
}
return CDRF_DODEFAULT;
}
default: break;
}
break;
}
default: break;
}
return 0;
}
```
Using the `NM_CUSTOMDRAW` method, I can't modify the font colors of individual characters; I can only modify the font color of everything in the subitem, which is not what I want.
How can I achieve what API monitor does? I have a feeling this is going to be very difficult, but any suggestions are welcome.
| How can I modify the font colors of individual characters in a ListView subitem? | CC BY-SA 2.5 | 0 | 2011-02-20T07:39:04.383 | 2021-07-07T13:01:28.443 | 2021-07-07T13:01:28.443 | 3,195,477 | 388,225 | [
"c",
"windows",
"listview",
"winapi",
"apimonitor"
]
|
5,055,984 | 1 | 5,058,160 | null | 4 | 950 | I'm trying to build this:

Where the white background is in fact transparent. I know how to clip a CGPath to a set region, but this seems to be to other way around, since I need to regions from a filled CGPath.
I guess the right way to go would be to substract the whole outer-circles from the CGPath and then to draw circles at my CGPoints, but I'm not sure how to execute the former. Can anyone point me in the right direction?
| CGPath masked off CGPoints | CC BY-SA 2.5 | null | 2011-02-20T08:20:28.977 | 2013-05-08T18:02:48.897 | 2011-02-20T08:27:46.400 | 87,158 | 87,158 | [
"iphone",
"core-graphics",
"cgpath"
]
|
5,056,084 | 1 | 5,126,645 | null | 5 | 6,813 | My site has an index page, and that page checks if a php session is set with:
```
session_start();
$name = $_SESSION["name"];
if (!$name) {
header('Location: name.php');
}
```
name.php has a simple form to set the name (no php), with an action of setName.php.
setName.php:
```
session_start();
$_SESSION["name"] = $_POST["name"];
header('Location: index.php');
```
In every browser except safari (and Webkit Nightly), the user sets their name, and is taken back to the index. However, in S(&WN) Submitting the name form loops back to the same page.
Cookies are enabled for all sites, and the session id is being set:

Edit: In case this makes any difference, my server is a macbook running MAMP with php 5.3.
If you want to try it yourself, the url is 121.73.150.105/questions, but it is often offline.
| PHP session not working in Safari, Webkit Nightly | CC BY-SA 2.5 | null | 2011-02-20T08:53:57.343 | 2011-03-22T09:43:42.910 | 2011-02-21T04:16:57.640 | 492,025 | 492,025 | [
"php",
"session"
]
|
5,056,202 | 1 | 5,058,278 | null | 0 | 1,360 | I want to read xml file in asp.net use c# and also to write I tried this code
```
using (XmlReader reader = XmlReader.Create(Server.MapPath("TestXml.xml")))
{
reader.Read();
while (reader.Read())
{
Response.Write( reader.Value.ToString());
Response.Write("<br />");
}
}
```
and the output is:

and the xml is
```
<?xml version="1.0" encoding="utf-8" ?>
<note>
<to>Chayem</to>
<from>Shaul</from>
<heading>Way?</heading>
<body>because</body>
</note>
```
What do I do? Thank you.
| xml in asp read and write | CC BY-SA 2.5 | null | 2011-02-20T09:28:07.313 | 2011-03-03T03:37:29.503 | 2011-02-20T16:10:00.647 | 19,403 | 599,046 | [
"c#",
"asp.net",
"xml"
]
|
5,056,209 | 1 | 5,056,610 | null | 2 | 1,631 | I need to create control wich can show items over itself (just dont clip them if there is no space)

All textblocks added to grid. Grid and control has property .
Why items clipped by control in my case?
```
<Style TargetType="{x:Type local:SomeControl}">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type local:SomeControl}">
<!-- Root Grid-->
<Grid x:Name="LayoutRoot"
Background="{TemplateBinding Background}">
<Grid x:Name="TicksHolder"
ClipToBounds="False"
Background="Transparent" >
<!-- Items Dynamically added here-->
</Grid>
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
```
And as you can see from image only right border clips items. rectangles out of right border doesnot clipped!
```
<Grid HorizontalAlignment="Left" Height="112" VerticalAlignment="Top" Width="52">
<TextBlock TextWrapping="Wrap" Text="TextBlock" Width="78" Margin="37,0,0,0"/>
</Grid>
```
And also i noticed that Grid clips content and Canvas is not
| Wpf show items over control | CC BY-SA 2.5 | null | 2011-02-20T09:29:49.557 | 2011-02-20T11:06:34.373 | 2011-02-20T10:40:35.047 | 508,330 | 508,330 | [
"c#",
".net",
"wpf"
]
|
5,056,336 | 1 | 5,056,351 | null | 35 | 58,961 | I need very fast conversion from byte array to string.
Byte array is Unicode string.
---

| C# Byte[] Byte array to Unicode string | CC BY-SA 2.5 | 0 | 2011-02-20T10:04:21.410 | 2018-08-30T15:56:28.400 | null | null | 465,408 | [
"c#",
".net",
"string",
"memory",
"arrays"
]
|
5,056,450 | 1 | 5,056,974 | null | 1 | 502 | I am trying to write an algorithm that determines whether a graph is connected or not. I think my code is almost correct, although I keep getting StackOverFlowError. I personally think because there's a cycle in the graph I'm testing my algorithm with, my code doesn't understand that and comes in a loop. But I'm using an array to see if a node was already visited! So that should not happen! Anyways this is my code:
```
public int isConnected(String s)
{
int in = nodes.indexOf(s);
visited[in] = true;
counter++;
for(int i = 0; i < listOfChildren(s).size(); i++)
{
int ind = nodes.indexOf(listOfChildren(s).get(i));
if(visited[ind] == false)
{
isConnected(listOfChildren(s).get(i));
}
}
System.out.println(counter);
if(counter == nodes.size())
return 1;
return 0;
}
```
s is some node I begin with, nodes is an ArrayList of nodes and has the same size(5 in this case) as the array visited. In the beginning visited looks like this: [false false false false false], so none of the nodes was visited. listOfChildren() return an ArrayList of the children(not all of them, just the ones adjacent to the node) of a particular node. I am sure that listOfChildren() works, since I tested it 43545454 times.
Any help is appreciated(with minimum change of the code, if possible). Thanks.
My graph is directed..
I define visited like this:
```
private boolean[] visited;
```
and I set everything in it to false in my constructor this code:
```
public void setUnvisited()
{
visited = new boolean[nodes.size()];
for(int i = 0; i < nodes.size(); i++)
{
visited[i] = false;
}
}
```
The nodes are strings! visited and nodes have the same length. That's why I can use nodes.indexOf(blabla) for the array visited.
This is how the graph looks like:

I'm sure the problem is after N3, the algorithm goes in a loop after N3, because it doesn't understand that N1 was already visited. I really don't understand why this happens!
String have different names and there are no duplicates.. so for example indexOf(nodes.get(2)) gives 2 and not 0 or anything else..
| Why do I get StackOverFlowError when trying to DFS this graph? | CC BY-SA 2.5 | null | 2011-02-20T10:31:57.163 | 2011-10-25T12:45:04.973 | 2011-10-25T12:45:04.973 | 58,074 | 163,799 | [
"java",
"graph",
"depth-first-search",
"stack-overflow"
]
|
5,056,535 | 1 | 5,057,197 | null | -1 | 1,131 | I have this simple table in MSWord 2003:

I want to append one more line to this table:
```
turtle dog rooster maple
```
Which VBScript commands (or set of commands) would I need here to do it automatically?
(I am using "Windows XP")
| Which script would append a new line to a table in "MS Word" 2003? | CC BY-SA 3.0 | null | 2011-02-20T10:51:16.407 | 2017-08-13T17:22:17.350 | 2017-08-13T17:22:17.350 | 4,370,109 | 206,857 | [
"vbscript",
"ms-word",
"newline",
"windows-xp"
]
|
5,056,699 | 1 | 5,954,488 | null | 2 | 3,977 | I am trying to update my application , but after uploading the binary , Itunes connect sends me this email :
> Dear Developer, Thank you for your
recent binary submission for "MY APP"
to the App Store. Unfortunately we
discovered an issue with your binary
that you will need to correct in order
for your application to proceed to the
review stage. The specific issue is
outlined below: Invalid Signature -
Make sure you have signed your
application with a distribution
certificate, not an ad hoc certificate
or a development certificate. Verify
that the code signing settings in
Xcode are correct at the target level
(which override any values at the
project level). Additionally, make
sure the bundle you are uploading was
built using a Release target in Xcode,
not a Simulator target. If you are
certain your code signing settings are
correct, choose "Clean All" in Xcode,
delete the "build" directory in the
Finder, and rebuild your release
target. Once you have corrected the
issue, please return to the
application's version details page in
the iTunes Connect Manage Your
Applications module and click on the
Ready to Submit Binary button. This
will take you through the binary
submission flow and return your
application version status to Waiting
for Upload. You can then use
Application Loader to upload your new
binary. If any other issues are found
with your submission you will be
contacted. Thanks, The iTunes
Connect Team

I am sure that my binary signed application with a distribution certificate NOT AD HOC !!!
what is your suggestion to solve this problem ! I NEVER HAD THIS PROBLEM !!!!!
I download the app distribution CER again but nothing change ! I have 6 apps on app store and never faced with this
| Invalid Signature error ! | CC BY-SA 2.5 | null | 2011-02-20T11:21:56.867 | 2016-08-11T17:11:01.317 | null | null | 319,097 | [
"ios",
"ios4",
"app-store-connect"
]
|
5,056,746 | 1 | null | null | 1 | 202 | I have the tree of my tree outline show below:

From the picture, I have to touch at scaleCanvas for 2 second, then the wsMenu will appear at this touch point. But when menu appeared, I hope the TouchEventArgs to found wsMenu which appear on my finger but it still found scaleCanvas at lower level. I want that finger to routed again and found wsMenu which shown in the red line. If it still like this I can choose menu at the next touch only.
Best Regards,
C.Porawat
| Call menu on canvas problem in WPF | CC BY-SA 2.5 | null | 2011-02-20T11:30:57.850 | 2011-02-20T14:32:51.050 | 2011-02-20T13:47:20.893 | 564,090 | 564,090 | [
"c#",
"wpf",
"touch"
]
|
5,056,752 | 1 | 5,057,014 | null | 3 | 5,507 | I am using Ghostscript9.0, I try to generate a LZW TIFF images with from pdf file, I always get bit depth = 1 using this `GS` command:
```
gswin32.exe -dSAFER -dBATCH -dNOPAUSE -r200 -sDEVICE=tifflzw -sOutputFile=tmp.tiff myfile.pdf
```
I searched in several manuals:
[http://ghostscript.com/doc/current/Devices.htm](http://ghostscript.com/doc/current/Devices.htm)
[http://www.ghostscript.com/doc/8.54/Use.htm](http://www.ghostscript.com/doc/8.54/Use.htm)
but I didn't find anything of parameters to do that.
I add an image example proporties that I would like to produce with `gs`:

Here we can see the bit depth (profondeur de couleur) = 24 and the image is compressed with LZW
| How to get a LZW tiff with 24 bit depth from pdf file using Ghostscript | CC BY-SA 2.5 | null | 2011-02-20T11:33:13.210 | 2011-02-20T13:36:25.273 | 2020-06-20T09:12:55.060 | -1 | 321,714 | [
"image",
"pdf",
"tiff",
"ghostscript"
]
|
5,057,072 | 1 | 5,057,095 | null | 3 | 2,820 | I'm not sure this is the right place to go, maybe some other stackexchange, tell me I would post somewhere else.
Here is my problem, I found an old game at my friends place, it's supposed to be a mind game : 9 small square cards, and you have to place them so that they all fit together, here is a picture :

After a few hours in front of the game i gathered that there was no real easy fair way to finish the game, and so I went the programmatical way.
This is where I'm having a hard time, I though I could just use some random functions, a big loop, and get it over with. But there is something like (4*9)^9 solutions, so it seems not that easy.
Here is the code I wrote, which is pretty useless for now :
Every time I go into the loop, I shuffle my array, rotate my cards by a random value and check if the puzzle is right, a lot of wasted cycles, but I don't know where to start to make it more efficient.
EDIT :
Fixed code, i get a few deck with 8 cards, but no 9 cards deck, if anyone has a fix to my code, or maybe there is no solution ?
```
require 'json'
class Array
def rotate n
a =dup
n.times do a << a.shift end
a
end
end
@grid = [[{"type"=>"p", "head" => 1},{"type"=>"c", "head" => 1},{"type"=>"a", "head" => 2},{"type"=>"o", "head" => 2}],
[{"type"=>"o", "head" => 1},{"type"=>"a", "head" => 2},{"type"=>"c", "head" => 2},{"type"=>"p", "head" => 1}],
[{"type"=>"c", "head" => 1},{"type"=>"p", "head" => 2},{"type"=>"o", "head" => 2},{"type"=>"a", "head" => 1}],
[{"type"=>"p", "head" => 1},{"type"=>"c", "head" => 2},{"type"=>"o", "head" => 2},{"type"=>"a", "head" => 1}],
[{"type"=>"p", "head" => 2},{"type"=>"c", "head" => 2},{"type"=>"a", "head" => 1},{"type"=>"c", "head" => 1}],
[{"type"=>"a", "head" => 1},{"type"=>"p", "head" => 2},{"type"=>"o", "head" => 2},{"type"=>"p", "head" => 1}],
[{"type"=>"a", "head" => 1},{"type"=>"o", "head" => 1},{"type"=>"a", "head" => 2},{"type"=>"c", "head" => 2}],
[{"type"=>"o", "head" => 1},{"type"=>"a", "head" => 2},{"type"=>"c", "head" => 2},{"type"=>"p", "head" => 1}],
[{"type"=>"p", "head" => 1},{"type"=>"c", "head" => 2},{"type"=>"o", "head" => 2},{"type"=>"a", "head" => 1}]]
@new_grid = [nil, nil, nil,nil, nil, nil,nil, nil, nil]
@used = [false, false, false,false, false, false,false, false, false]
def check_validity(card, position, orientation)
# since I'm adding from top left to bottom, I only need to check top and left
try_card = @grid[card].rotate orientation
valid = true
# top
if (@new_grid[position-3])
if (try_card[0]["type"] != @new_grid[position-3][2]["type"] || try_card[0]["head"] == @new_grid[position-3][2]["head"])
valid = false
end
end
# left
if (@new_grid[position-1] && (position % 3) != 0)
if (try_card[3]["type"] != @new_grid[position-1][1]["type"] || try_card[3]["head"] == @new_grid[position-1][1]["head"])
valid = false
end
end
return valid
end
def solve_puzzle(position)
(0..8).each do |card|
unless (@used[card])
(0..3).each do |orientation|
if (check_validity(card, position, orientation))
@used[card] = true
@new_grid[position] = @grid[card].rotate orientation
if position == 7
puts @new_grid.to_json
end
if (position < 8)
solve_puzzle(position + 1)
else
puts "I WON"
puts @new_grid.to_json
end
@new_grid[position] = nil
@used[card] = false
end
end
end
end
end
solve_puzzle(0)
```
| Logic game, 9 square cards and one big square | CC BY-SA 3.0 | null | 2011-02-20T12:36:48.530 | 2011-09-22T15:42:12.040 | 2011-09-22T15:42:12.040 | 764,846 | 300,115 | [
"algorithm",
"logic"
]
|
5,057,183 | 1 | 5,218,853 | null | 0 | 268 | i am using a jquery plugin called fcbkcomplete which shows up fine in chrome and firefox (see here):

but when i pull it up in IE6, the height shows up weird in internet explorer 6. (height of main entry box is very tiny).

i just confirmed its not an overlay issue and definitely a height of input issue as when you add a top margin to the dropdown the height is still small on IE6. See image below:

here is my code:
```
$("#select3").fcbkcomplete({
json_url: "/Scripts/fcbkcomplete/data.txt",
addontab: true,
newel: true,
firstselected: true,
height: 2
});
```
Does anyone know is there is a workaround using css, etc to get IE to work here?
| height on select is weird in IE 6 | CC BY-SA 2.5 | null | 2011-02-20T13:02:38.310 | 2011-03-07T11:01:13.537 | 2011-02-20T21:08:09.667 | 4,653 | 4,653 | [
"jquery",
"css",
"internet-explorer-6"
]
|
5,057,647 | 1 | 5,057,667 | null | 0 | 5,498 | I have a .bat file like that:
```
msg userA System will be restarted
msg userB System will be restarted
msg userC System will be restarted
msg userD System will be restarted
msg userE System will be restarted
msg userF System will be restarted
msg userG System will be restarted
```
Can I define a variable for message part as like:
```
message = System will be restarted
msg userA message
msg userB message
msg userC message
msg userD message
msg userE message
msg userF message
```
Also is it possible to define users as an array? As like:
```
users= [userA, userB, userC, userD, userE, userF]
message = System will be restarted
msg users message
```
Thanks for your suggestions.
I wrote that lines to a bat file:
```
set MESSAGE = System will be restarted
msg userA %MESSAGE%
```
When I click the bat file I got that screenshot: 
| Windows 7 defining variable for bat files and msg command | CC BY-SA 2.5 | null | 2011-02-20T14:38:04.900 | 2011-02-20T15:15:12.997 | 2011-02-20T15:15:12.997 | 453,596 | 453,596 | [
"windows-7",
"batch-file",
"messaging"
]
|
5,057,693 | 1 | 5,057,703 | null | 1 | 1,258 | I'm wondering which would be more semantic when writing the markup for a list of recently active forum threads: A table, some kind of definition list, or a mixture of both?
To give you an example of what I mean:

I'm thinking that the best way would be to let each thread be an unordered list item containing a defintion list that contains the thread title, number of posts, etc. But I wanted to get other people's input as well, because I'm honestly not sure.
| Table or lists for forum threads | CC BY-SA 2.5 | null | 2011-02-20T14:45:07.003 | 2020-03-03T10:01:49.930 | null | null | 133,416 | [
"html",
"semantics",
"markup"
]
|
5,057,775 | 1 | 5,057,791 | null | 1 | 6,665 | I hava a MySQL Statement which joins 2 tables and shows the result in Desc order of field 'touch'. This is my SQL Statement
```
SELECT @rownum := @rownum +1 rownum,
(IF( dm.Brand_FULL = '1', dd.Device_Brand, dm.Brand_Full )) AS Brand,
dd.Device_Model AS Model,
CONCAT( dm.Service_provider, ' ', dm.Model_Full ) AS 'Marketing Name',
max( Touch_Count ) AS Touch FROM Device_Details dd
JOIN Device_Models dm ON dd.Device_Model = dm.Model_Short,
(SELECT @rownum :=0 )r GROUP BY dd.Device_Model ORDER BY Touch_Count DESC
```
This give me a result like this

The result is perferct, and its based on the descending order of Touch field.Now the problem is that the rownum is not in order. So how to modify the mySQL statement so that i can get the rownum in order without changing the DESC order of Touch field.
| MySql : How to use rownumber with a join Query statement? | CC BY-SA 2.5 | 0 | 2011-02-20T14:58:12.623 | 2011-02-20T15:10:42.933 | 2020-06-20T09:12:55.060 | -1 | 466,474 | [
"mysql",
"rownum"
]
|
5,057,798 | 1 | 5,057,829 | null | 7 | 5,297 | Goal: Don't want the user to make changes in the program's size.
Problem: Don't know how to remove that icone thing that allows user to resize the screen.

| Remove the ability to resize | CC BY-SA 3.0 | null | 2011-02-20T15:03:38.500 | 2011-12-13T14:21:15.610 | 2011-12-13T14:21:15.610 | 142,162 | 484,390 | [
"c#",
"winforms"
]
|
5,058,688 | 1 | 5,061,163 | null | 9 | 2,690 | I have a canvas that you can paint on. I need to save it's contents to the server so it can be resumed later.
To do this, I `xMLHttpReq.send(*)` the `encodeURIComponent(canvasP.toDataURL())*` via a `xMLHttpReq.open("POST", url, false);`
In my php script, I take the $_POST and `base64_decode(json_decode($_POST[data]))` and I save it to a .png file on the server.
NOW, this works fine and dandy if the canvas has a small doodle on it. BUT if the 1600x1200px canvas has a lot of stuff drawn on it, and it's like 600kB in size, my script fails, and I get a 0kB png on my server.
How do I fix this? How can I send a large canvas to the server?
Is the problem a limitation to _POST size? Because, no matter how large the canvas is, I can always download it via a `window.open(canvasP.toDataURL(), "blabla");`.
This is quite the dilemma for me. Any help will be much appreciated!
[EDIT] The PHP simply receives empty `$_POST[data]` for anything over ~50-something kB...
So the problem has to occur between `canvasP.toDataURL()` and the POST-ing...
[EDIT2] Browser says "Uploading...(xx%)" until it's "done". SO WHERE DOES THE DATA GO? :C
[EDIT3] Here's the app, try it for yourself (use google chrome): [http://students.info.uaic.ro/~tudor.berechet/](http://students.info.uaic.ro/~tudor.berechet/)
[EDIT4] Mike's answer seems to be right about suhosin 
| Can't POST large html5 canvas to server? | CC BY-SA 2.5 | 0 | 2011-02-20T17:29:24.477 | 2011-02-21T20:43:34.900 | 2011-02-21T08:48:47.217 | 480,859 | 480,859 | [
"php",
"javascript",
"html",
"canvas",
"http-post"
]
|
5,058,828 | 1 | null | null | 1 | 924 | i'm trying to write the following func:
Given a matrix with all zeros but an objects outer border(equales 1),
i want to generate a the border chain code.
the hole object is not in the matrix, just its outer border.
*in the example picture - all matrix cells are 0 ,but the blue ones which are 1.
any help is most appreciated!
| generate chain code from binary outer border matrix | CC BY-SA 2.5 | null | 2011-02-20T17:53:35.950 | 2011-02-20T22:13:29.863 | null | null | 349,063 | [
"algorithm",
"image-processing",
"computer-vision",
"graph-algorithm"
]
|
5,058,887 | 1 | 5,060,173 | null | 3 | 6,082 | I'm developing an app for Facebook pages and, as usual, I've stumbled upon a strange bug today. I know that tab width is supposed to be 520px, but for some reason this is not happening on these new pages which are using IFrame canvas instead of the old FBML.
Here is a screenshot documenting this bug: 
As you can see the content is cropped (I used overflow: hidden; to hide the scrollbars) at a total width of 504px. Any idea about how to solve it?
| Facebook: new IFrame canvas for page tabs width is lower than 520px? | CC BY-SA 2.5 | 0 | 2011-02-20T18:04:20.130 | 2012-01-03T01:39:46.837 | null | null | 559,940 | [
"facebook",
"iframe",
"facebook-iframe"
]
|
5,058,929 | 1 | 5,058,954 | null | 0 | 962 | I'm writing a plug-in for an app; the plug-in is to display a modal dialog. It displays just fine, but when I move it, it leaves a trail on the screen, i.e. the window below doesn't redraw. Some parts of it do redraw (all standard Windows controls, e.g. toolbar or scrollbar), but the rest of the client area does not.
I'm using `DialogBoxIndirectParam`; the `hWnd` is the top window of the app, the template I construct on the fly and the dialog flags are `WS_POPUP | WS_CAPTION | DS_MODALFRAME | DS_SETFONT | WS_SYSMENU`, plus the function sets some flags itself, e.g. `WS_CLIPSIBLINGS`. The dialog class is standard (CS+DBLCLKS,CS_SAVEBITS) The dialog procedure is very basic, it only handles the `WM_CLOSE` message at the moment.
I tried Google but didn't manage find anything directly relevant. I tried to compare my dialog class with other dialogs of the same app and also checked the messages logs, but I didn't see any drastic differences.
Why doesn't the parent/owner redraw and how do I fix it?
. Here's the relevant calls.
Calling the dialog:
```
class Dialog(object):
def run(self):
t = cast(c_char_p(self.template()), LPCDLGTEMPLATE)
p = GetActiveWindow()
r = DialogBoxIndirectParamW(0, t, p, dialog_proc_2, py_object(self))
```
Window procedure:
```
def dialog_proc(window, message, wparam, lparam):
if message == WM_CLOSE:
EndDialog(window, IDCANCEL);
return 1
return 0
```
This is Python code :) it's embedded Python working via `ctypes`. The plug-in runs in the main thread; the host application makes a synchronous call, i.e it waits for the called function to return. `self.template()` returns `DLGTEMPLATEEX` data I prepare on the fly; I believe I do this correctly, because the dialog displays and when I check it with Spy all flags seems to be set (except that there's a few more). I don't use the instance handle, because I don't load anything from resources. I believe I correctly wrapped all functions and constants, but I can post the definitions too. `GetActiveWindow` (or `GetForegroundWindow`) returns the pointer to the app's main window; it's a MDI app and it repaints everything except the client area of a MDI window:

Here I moved the window over all the visible windows (toolbars, buttons, etc.) and the only part that doesn't repaint is the client area of the MDI doc.
| Win32: modal dialog leaves a trail in the client area of parent/owner | CC BY-SA 2.5 | 0 | 2011-02-20T18:10:30.490 | 2011-02-20T19:36:26.270 | 2011-02-20T18:55:40.430 | 478,521 | 478,521 | [
"winapi",
"modal-dialog",
"dialog"
]
|
5,059,210 | 1 | 5,059,361 | null | 1 | 721 | I've been trying to use `a:hover` pseduo class so that when you hover over the image, you get a border to appear so that it looks clickable.
However, when I do this the border appears below the image in the space below but I'm unsure why.
```
#overlay a:hover {
border: solid 2px #666;
}
```

As you can see the border is not around the image, it's below it.
Hope someone can help me with this problem.
| a:hover border not working, border appears under image in the space below? | CC BY-SA 3.0 | null | 2011-02-20T18:56:46.553 | 2016-12-26T12:57:39.070 | 2016-12-26T12:57:39.070 | 3,478,852 | 595,855 | [
"html",
"css"
]
|
5,059,268 | 1 | 5,074,468 | null | 15 | 47,758 | I am trying to integrate a Serial-port device into my application, which needs CRC-CCTT validation for the bytes that I send to it.
I'm kinda new into managing byte packets, and need help for this.
It uses this formula for making the CRC calculus:
```
[CRC-CCITT P(X)= X16 + C12 + C8 + 1]
```
So for example for the packet: 0xFC 0x05 0x11, the CRC is 0x5627.
Then I send this packet to the device: 0xFC 0x05 0x11 0x27 0x56
Also, packet lenghts will vary from 5 to 255 (including CRC checks bytes)
I don't know how to implement this, so any idea/suggestions will be welcome.
Hope I made myself clear,
Thanks in Advance.
EDIT:
here is the specification of what I need to do:

| C# CRC implementation | CC BY-SA 2.5 | 0 | 2011-02-20T19:04:04.890 | 2016-01-05T13:59:28.737 | 2011-02-21T11:57:15.997 | 314,728 | 314,728 | [
"c#",
"algorithm",
"crc"
]
|
5,059,288 | 1 | 5,059,914 | null | 0 | 585 | On my web app, I want to be able to remove the Flash context menu and only leave the ones really needed like the textarea contextmenu.

| How do I remove the Flex 4 context menu? | CC BY-SA 2.5 | null | 2011-02-20T19:07:08.913 | 2011-02-20T20:53:34.870 | null | null | 388,473 | [
"apache-flex",
"contextmenu",
"flash-builder"
]
|
5,059,410 | 1 | 5,059,497 | null | 1 | 1,144 | I am trying to display an image on a [Canvas](http://developer.android.com/reference/android/graphics/Canvas.html), but when I call the `drawBitmap` method, I get only the VERY top left corner, the image doesn't scale to the the screen height and width. Here is my code that involves the custom view:
```
private class ImageOverlay extends View {
public ImageOverlay(Context context) {
super(context);
}
@Override
protected void onDraw(Canvas canvas) {
Bitmap image = BitmapFactory.decodeFile(getPath(baseImage));
Paint paint = new Paint();
paint.setAlpha(200);
canvas.drawBitmap(image, 0, 0, paint);
Log.v(TAG, "Drew picture");
super.onDraw(canvas);
}
private String getPath(Uri uri) {
String[] projection = { MediaStore.Images.Media.DATA };
Cursor cursor = managedQuery(uri, projection, null, null, null);
if(cursor!=null)
{
int column_index = cursor
.getColumnIndexOrThrow(MediaStore.Images.Media.DATA);
cursor.moveToFirst();
return cursor.getString(column_index);
}
else return null;
}
```
`baseImage` is a `Uri` object that is passed to my activity and it is null! Here is the actual image:

And here is the `Canvas` image:

| Bitmap image displaying VERY top left corner, not scaling | CC BY-SA 2.5 | null | 2011-02-20T19:24:54.013 | 2011-02-20T19:40:23.013 | null | null | 200,477 | [
"java",
"android",
"canvas",
"bitmap"
]
|
5,060,976 | 1 | 5,061,000 | null | 5 | 472 | Let's imagine we got the following:
A) Factory interface such as
```
public interface IEmployeeFactory
{
IEmployee CreateEmployee(Person person, Constants.EmployeeType type, DateTime hiredate);
}
```
B) Concrete factory such as
```
public sealed class EmployeeFactory : Interfaces.IEmployeeFactory
{
public Interfaces.IEmployee CreateEmployee(Person person, Constants.EmployeeType type, DateTime hiredate)
{
switch(type)
{
case BusinessObjects.Common.Constants.EmployeeType.MANAGER:
{
return new Concrete.Manager(person, hiredate);
}
case BusinessObjects.Common.Constants.EmployeeType.SALES:
{
return new Concrete.Sales(person, hiredate);
}
default:
{
throw new ArgumentException("Invalid employee type");
}
}
}
}
```
C) Employees family: `Manager` and `Sales` inherited from an abstract Employee.

Some client code
```
public sealed class EmployeeFactoryClient
{
private Interfaces.IEmployeeFactory factory;
private IDictionary<String, Interfaces.IEmployee> employees;
public Interfaces.IEmployee this[String key]
{
get { return this.employees[key]; }
set { this.employees[key] = value; }
}
public EmployeeFactoryClient(Interfaces.IEmployeeFactory factory)
{
this.factory = factory;
this.employees = new Dictionary<String, Interfaces.IEmployee>();
}
public void AddEmployee(Person person, Constants.EmployeeType type, DateTime hiredate, String key)
{
this.employees.Add(
new KeyValuePair<String, Interfaces.IEmployee>(
key,
this.factory.CreateEmployee(
person,
type,
hiredate
)
)
);
}
public void RemoveEmployee(String key)
{
this.employees.Remove(key);
}
public void ListAll()
{
foreach(var item in this.employees)
{
Console.WriteLine(
"Employee ID: " + item.Key.ToString() +
"; Details: " + item.Value.ToString()
);
}
}
}
class ApplicationShell
{
public static void Main()
{
var client = new EmployeeFactoryClient(new EmployeeFactory());
client.AddEmployee(
new Person {
FirstName = "Walter",
LastName = "Bishop",
Gender = BusinessObjects.Common.Constants.SexType.MALE,
Birthday = new DateTime()
},
BusinessObjects.Common.Constants.EmployeeType.MANAGER,
new DateTime(),
"A0001M"
);
Console.WriteLine(client["A0001M"].ToString());
Console.ReadLine();
}
}
```
I wanted to ask about some business logic architecture details.
Using the architecture I can't design what the Company class should be, don't know how do I integrate it.
I have read that it more appropriate to use Role-based architecture in such cases. Could you provide an example (Company, Employees entities)?
---
Thanks!
| Roles, Abstract Pattern, Loose Coupling | CC BY-SA 2.5 | 0 | 2011-02-20T23:47:59.237 | 2011-02-21T00:23:23.443 | 2011-02-21T00:19:46.677 | 532,675 | 532,675 | [
"c#",
"interface",
"factory-pattern"
]
|
5,061,285 | 1 | 5,061,295 | null | 13 | 10,138 | In the affirmation text field I press the newline button and it puts spaces.
However after I click done the field actually has the correct new lines (second screen capture).
Its not a problem with the device as it works correctly for the compose mail filed in the gmail app. Which is how I would like this to work.


```
<TextView
android:inputType="textMultiLine"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dip"
android:text="@string/edit_affimation"
/>
<EditText
android:id="@+id/affText"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text=""
android:textSize="18sp"
android:singleLine="false"
>
</EditText>
```
| Android EditText keyboard newline not working (only on input view) | CC BY-SA 2.5 | null | 2011-02-21T00:48:15.220 | 2016-10-24T12:41:47.167 | null | null | 97,464 | [
"android"
]
|
5,061,279 | 1 | 5,073,006 | null | 2 | 1,041 | I am creating an application that reads in SVG files, parses them, and redraws them in Cocoa using NSBezierPath. The following vector path:
```
M0 126C0.0507812 106.402 0.443359 78.6089 24.0781 76.0034 29.9937 75.3516 34.063 75.6162 39.6509 74 50.0083 71.0044 48.9268 69.8765 54.7329 60.0034 64.9927 42.5586 75.5684 42.8237 94.0801 42.0195 120.367 40.8779 127.438 2.28662 155.885 2.85254 156.091 1.86523 155.896 0.98877 156 0
```
looks perfectly fine in Illustrator; it is a short, wavy segment. In my application, the position is correct, but the curve shows up as a straight line (see images below).


What could I be missing? Below is my drawing routine, which gets fed from an array that holds all of the values saved in different vector models.
```
- (void)processImage
{
float factorX = 1;
float factorY = 1;
debugLog(@"[sharedValues paths] is %lu long.", [[sharedValues paths]count]);
NSArray *objectArray = [sharedValues paths];
[[NSColor blackColor] set];
aPath = [NSBezierPath bezierPath];
[aPath moveToPoint:NSMakePoint(0.0, 0.0)];
for(int i=0; i<[objectArray count]; i++) {
debugLog(@"I am in iteration %i", i);
if([[[objectArray objectAtIndex:i] type]isEqualToString:@"AbsoluteMoveTo"]){
AbsoluteMoveToModel *model = [objectArray objectAtIndex:i];
[aPath moveToPoint:NSMakePoint([model x] * factorX, [model y] * factorY)];
} else if([[[objectArray objectAtIndex:i] type]isEqualToString:@"RelativeMoveTo"]){
debugLog(@"Drawing a relative path moveto");
RelativeMoveToModel *model = [objectArray objectAtIndex:i];
[aPath relativeMoveToPoint:NSMakePoint([model x] * factorX, [model y] * factorY)];
} else if([[[objectArray objectAtIndex:i] type]isEqualToString:@"AbsoluteLineTo"]){
debugLog(@"Drawing an absolute path lineto");
AbsoluteLineToModel *model = [objectArray objectAtIndex:i];
[aPath lineToPoint:NSMakePoint([model x] * factorX, [model y] * factorY)];
} else if([[[objectArray objectAtIndex:i] type]isEqualToString:@"RelativeLineTo"]){
debugLog(@"Drawing a relative path lineto");
RelativeLineToModel *model = [objectArray objectAtIndex:i];
[aPath relativeLineToPoint:NSMakePoint([model x] * factorX, [model y] * factorY)];
//[model release];
} else if([[[objectArray objectAtIndex:i] type]isEqualToString:@"AbsoluteCurveTo"]){
debugLog(@"Drawing an absolute path lineto");
AbsoluteCubicBezierCurveToModel *model = [objectArray objectAtIndex:i];
[aPath curveToPoint:NSMakePoint([model x] * factorX, [model y] * factorY) controlPoint1:NSMakePoint([model c1x] * factorX, [model c1y] * factorY) controlPoint2:NSMakePoint([model c2x] * factorX, [model c2y] * factorY)];
} else if([[[objectArray objectAtIndex:i] type]isEqualToString:@"RelativeCurveTo"]){
RelativeCubicBezierCurveToModel *model = [objectArray objectAtIndex:i];
[aPath relativeCurveToPoint:NSMakePoint([model x] * factorX, [model y] * factorY) controlPoint1:NSMakePoint([model c1x] * factorX, [model c1y] * factorY) controlPoint2:NSMakePoint([model c2x] * factorX, [model c2y] * factorY)];
} else if([[[objectArray objectAtIndex:i] type]isEqualToString:@"ClosePath"]){
[aPath closePath];
}
}
[aPath retain];
//debugLog(@"%@", aPath);
[self setNeedsDisplay:YES];
}
- (void)drawRect:(NSRect)rect
{
//debugLog(@"%@", aPath);
[[NSColor whiteColor] set];
NSRectFill( rect );
[[NSColor blackColor] set];
[aPath stroke];
}
```
| NSBezierPath Cubic Bezier CurveTo looks like a straight line | CC BY-SA 2.5 | null | 2011-02-21T00:47:42.160 | 2011-03-11T04:58:21.650 | 2011-02-21T01:54:50.723 | 239,318 | 239,318 | [
"objective-c",
"cocoa",
"svg",
"nsbezierpath"
]
|
5,061,321 | 1 | 5,061,579 | null | 4 | 4,599 | 
I'm using GNU Emacs on 64bit Ubuntu. Monaco font works well, except the gap between each letter is too wide, thus causing each line of codes to spread too widely. I thought maybe it was a problem with the font, but then Ubuntu terminal was capable of handling the exactly same font with a narrower horizontal margin.
Is there any method I can try to adjust the horizontal linespacing in Emacs?
| Letterspacing in GNU Emacs | CC BY-SA 2.5 | 0 | 2011-02-21T00:57:01.540 | 2011-11-04T13:24:49.060 | null | null | 556,384 | [
"emacs",
"fonts"
]
|
5,061,334 | 1 | 5,158,035 | null | 0 | 477 | I've read many of the answers here about 1-1 relationships, modeling object-type relationships, etc. I am trying to do something that I'm just not sure what is the right way.
I have 2 different tables that both need to reference/contain lists of polygons (the polygon is actually represented as an outer loop and any number of inner loops to represent holes in the surface). Each of the 2 tables is a completely different set of attributes.
Here is a view of the model with only 1 table referencing the polygons:

Now I want to have a second table that each row also represents a collection of of polygons. I know how to do this from an Object-oriented point of view, but the relational view has me confused as to what is the right way.
One way is to add another foreign key to the polygonwitholes table, and one is null while the other is populated. That is shown here:

This just doesn't seem right. So I thought about an intermediate table, but the relationships seem more object-oriented than relational. Is this an unreasonable way to do it, to have an either/or on those foreign keys? or I could have one field that is an integer and not add any constraint to the database that it is a foreign key to another table, and use it for whichever table is used at that time? From a query perspective, I will have to retrieve all the points in each of the polygons for a row in either table1 or table2.
So one of the options I came up with was this, but then I think about how to do queries, and something just doesn't seem right:

I know that for a true data modeler, this will be an obvious question! This site has been great for me, this is my first question, and I hope it makes sense! So are there any suggestions of how this should be modeled?
(Ok, I tried to post, but the images didn't come up. Going to try to get someone to post them for me)
| Relational Data Modeling question - 2 different tables needing the same "sub-data" | CC BY-SA 2.5 | null | 2011-02-21T00:59:39.540 | 2011-03-06T03:29:07.220 | 2011-02-21T01:22:07.723 | 73,501 | 491,686 | [
"database-design",
"data-modeling",
"relational-database"
]
|
5,061,388 | 1 | 5,062,105 | null | 0 | 868 | I want to have a series of posts with titles and other information. The problem is, depending on how much space the containing div has and how long the titles are, it is causing my "post-summary" (title, date, etc) div to wrap to the next line making it look like:
Here is what it is doing:

Here is what I want it to do (note the title wrapped, but didn't cause the whole "post-summary" to wrap to the next line like in the previous example):

I don't care how much the title wraps or how many lines it wraps to. I just don't want it to force the parent div which also contains the post-info to drop below the post number like it does in the first example.
I've created an example jsfiddle to further illustrate what I'm doing:
[http://jsfiddle.net/aZvVU/6/](http://jsfiddle.net/aZvVU/6/)
How can I make the post-titles simply wrap when it doesn't have enough space and not cause it to make the whole "post-summary" div from dropping to the next line? I don't want to make the title width fixed if I can avoid it.
| How can I make a div's contents wrap without setting an explicit width? | CC BY-SA 2.5 | null | 2011-02-21T01:11:24.907 | 2011-02-21T03:51:11.070 | 2011-02-21T02:44:27.750 | 560,735 | 619,052 | [
"html",
"css",
"layout",
"width"
]
|
5,061,467 | 1 | 5,061,617 | null | 2 | 111 | I am designing a page where it displays the staff details in following structure :

user can click anywhere in the details box and the checkbox will get selected along with the change in the className of the details `<div>` box.
The problem i m facing is when i click anywhere in the details box it works fine.. but when i click on checkbox it only changes the className but doesnt make any changes to checkbox.
Also there is one condition, few users are allowed to selected limited staff at a time and few are allowed to select all of them..
I have assigned a myClick() function to the outer `<div>` box (one with red border)
and the function is :
```
var selectedCount = 0;
myClick = function(myObj,event)
{
var trgt =(event.srcElement) ? event.srcElement : event.target;
tgName = trgt.tagName;
//following statement gives me correct details element event though i clicked on any child tags
theElem = (tgName == 'DIV') ? trgt : ( (tgName == 'B') ? trgt.parentNode.parentNode : trgt.parentNode);
if(allowed_selection == 'unlimited')
{
if(theElem.className == 'details_clicked')
{
theElem.className = 'details';
theElem.getElementsByTagName('input')[0].checked = false;
}
else if(theElem.className == 'details_hover')
{
theElem.className = 'details_clicked';
if(tgName != 'INPUT') theElem.getElementsByTagName('input')[0].checked = true;
}
}
else
{
if(theElem.className == 'details_clicked')
{
theElem.className = 'details';
theElem.getElementsByTagName('input')[0].checked = false;
selectedCount--;
}
else if(theElem.className == 'details_hover')
{
if(selectedCount == allowed_selection ) return false;
theElem.className = 'details_clicked';
//i think, this is the suspicious area for errors
theElem.getElementsByTagName('input')[0].checked = true;
selectedCount++;
}
}
return false;
};
```
| Javascript: How to make this function working for click effects | CC BY-SA 2.5 | null | 2011-02-21T01:29:27.947 | 2011-02-21T02:10:43.450 | 2011-02-21T01:50:15.680 | 222,155 | 547,573 | [
"javascript",
"html",
"javascript-framework"
]
|
5,061,796 | 1 | 5,063,838 | null | 2 | 4,187 | I'm trying to create a user control which will allow me to pass in a list of column definitions and which will create a grid for me.
So far nothing is displaying. Here is the code:
```
List<GridColumn> colList = new List<GridColumn>();
GridColumn col1 = new GridColumn(200, "AAA");
colList.Add(col1);
GridColumn col2 = new GridColumn(200, "BBB");
colList.Add(col2);
BuildColumns(MainGrid, colList)
private void BuildColumns(Grid mainGrid, List<GridColumn> gridColumnList)
{
// create grid columns
foreach (GridColumn gridColumn in gridColumnList)
{
GridLength len = new GridLength(gridColumn.ColumnWidth);
ColumnDefinition col = new ColumnDefinition {Width = len};
mainGrid.ColumnDefinitions.Add(col);
}
// add 2 rows
GridLength height = new GridLength(100);
RowDefinition rowDef1 = new RowDefinition {Height = height};
mainGrid.RowDefinitions.Add(rowDef1);
RowDefinition rowDef2 = new RowDefinition {Height = height};
mainGrid.RowDefinitions.Add(rowDef2);
// add text blocks to cells
int colNum = -1;
foreach (GridColumn gridColumn in gridColumnList)
{
colNum++;
TextBlock textBlock = new TextBlock();
textBlock.Text = gridColumn.ColumnName;
Grid.SetRow(textBlock, 0);
Grid.SetColumn(textBlock, colNum);
}
}
```
I have tried increasing the row/column size and refreshing the grid.
This is the same as [this earlier question](https://stackoverflow.com/questions/3975948/wp7-silverlight-grid-not-showing-content) but the answer did not fix my problem.
This is what it looks like on the phone

| Problem creating Silverlight Grid columns programmatically on WP7 | CC BY-SA 2.5 | null | 2011-02-21T02:47:35.410 | 2011-02-21T08:43:31.090 | 2017-05-23T12:30:36.590 | -1 | 4,149 | [
"silverlight",
"windows-phone-7",
"grid"
]
|
5,062,118 | 1 | null | null | 0 | 273 | I want to display image in NSTableView, but it seems blurry.

in another window, I show it using NSButton, then it's OK,

I tried to scale the image to fit in NSTableView, but it's still blurry, anyone know why?
I found a way to resolve it: add a border to NSImageCell, the default border is none. I don't know why.
| Image is blurry when show in NSTableView | CC BY-SA 2.5 | null | 2011-02-21T03:52:50.077 | 2015-04-05T18:26:21.867 | 2011-02-24T05:01:45.453 | 383,421 | 383,421 | [
"cocoa",
"macos",
"nsimage"
]
|
5,062,244 | 1 | null | null | 0 | 179 | Hopefully I can explain this correctly.

I am currently using MSSQL 2008 and I have two databases with 2 tables. In DB1, Table 1 has a username and a UserID. Table 2 has a GUID and a UserID. The UserID in table 2 is added to show which user added the row. I have migrated tables 1 and 2 from DB1 to DB2 but the UserID from Table 1 in DB2 is different from DB1. I want to keep the UserID and match up the users from DB1 into DB2 correctly to match up with table 2 in DB2. The UserID in Table 2 in DB2 should change. Is there an easy way of doing this?
| Syncing table between two different databases after migration with a small twist | CC BY-SA 2.5 | null | 2011-02-21T04:17:51.760 | 2012-01-31T11:03:12.967 | 2011-02-21T19:50:41.333 | 192,604 | 192,604 | [
"sql",
"sql-server-2005"
]
|
5,062,522 | 1 | 5,070,003 | null | 1 | 2,011 | I'm having troubles figuring out why Chrome and Firefox are rendering some things differently. Below are images of a part of my project as seen in Firefox (top) and Chrome (bottom). [MathJax](http://www.mathjax.org/) renders everything as the page is loading and once everything has been processed and typeset, it is displayed on the page. So I'm not sure if this is my fault of MathJax's fault. Anyway here are the images...


... if you would notice, the square with black border is different in Chrome, and in a bad way. Any ideas as to why this might be happening? The following is output from Chrome's console...
```
Resource interpreted as font but transferred with MIME type image/svg+xml. /MathJax/fonts/HTML-CSS/TeX/svg/MathJax_Main-Regular.svg#MathJax_Main-Regular:-1
Resource interpreted as font but transferred with MIME type image/svg+xml. /MathJax/fonts/HTML-CSS/TeX/svg/MathJax_Main-Bold.svg#MathJax_Main-Bold:-1
Resource interpreted as font but transferred with MIME type image/svg+xml. /MathJax/fonts/HTML-CSS/TeX/svg/MathJax_Main-Italic.svg#MathJax_Main-Italic:-1
Resource interpreted as font but transferred with MIME type image/svg+xml. /MathJax/fonts/HTML-CSS/TeX/svg/MathJax_Math-Italic.svg#MathJax_Math-Italic:-1
etc...
```
The code for rendering the square alone, without all the other fancy stuff, is relatively simple...
```
<div id="square">
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
<mo id="tag0" class="expand">◻</mo>
</math>
</div>
```
... and then I tell MathJax to render it...
```
MathJax.Hub.Queue(["Typeset", MathJax.Hub, "square"]);
```
... and MathJax does its thing (I have no control over the rendering MathJax does). So I don't quite know where the problem is.
I know this is a very strange and very specific question but I'm hoping someone in the Stack Overflow community might have some idea or has dealt with MathJax previously. Hopefully some brainstorming will help resolve this issue.
| Chrome vs. Firefox rendering differences of unicode characters - MathJax | CC BY-SA 3.0 | null | 2011-02-21T05:06:57.233 | 2011-08-06T22:34:25.870 | 2011-08-06T22:34:25.870 | null | 196,921 | [
"firefox",
"unicode",
"google-chrome",
"mathjax"
]
|
5,062,484 | 1 | 5,065,449 | null | 1 | 918 | I've managed to develop a dynamic jQuery tabbing system but I'm having trouble sorting out tab overflow. Currently I can have only six tabs on display and the seventh goes missing.
How do you set up a "tab scroll" method to allow for the user to click back and forth to show the tabs that are "off-screen"? I've included a picture below to show this, as you can see Document 1 to Document 6 tabs are selected but you cannot see Document 7!:

My [code here](http://jsfiddle.net/vBRW4/) may explain my situation a lot better.
CSS
```
<style type="text/css">
body {
font-family:Lucida Sans, Lucida Sans Unicode, Arial, Sans-Serif;
font-size:13px;
margin:0px auto;
}
#tabs {
margin:0;
padding:0;
list-style:none;
overflow:hidden;
height: 24px;
}
#tabs li {
float:left;
display:block;
background-color:#bbb;
margin-right:5px;
height: 24px;
}
#tabs li a {
color:#fff;
text-decoration: none;
}
#tabs li.current {
background-color:#e1e1e1;
text-decoration: none;
}
#tabs li.current a {
color:#000;
text-decoration:none;
}
#tabs li a.remove {
color:#f00;
margin-left:10px;
text-decoration: none;
}
#content {
background-color:#e1e1e1;
}
#content p {
margin: 0;
padding:20px 20px 100px 20px;
}
#main {
width:900px;
margin:0px auto;
overflow:hidden;
background-color:#F6F6F6;
margin-top:20px;
-moz-border-radius:10px;
-webkit-border-radius:10px;
padding:30px;
}
#wrapper, #doclist {
float:left;
margin:0 20px 0 0;
}
#doclist {
width:150px;
border-right:solid 1px #dcdcdc;
}
#doclist ul {
margin:0;
list-style:none;
}
#doclist li {
margin:10px 0;
padding:0;
}
#wrapper {
width:700px;
margin-top:20px;
}
#header {
background-color:#F6F6F6;
width:900px;
margin:0px auto;
margin-top:20px;
-moz-border-radius:10px;
-webkit-border-radius:10px;
padding:30px;
position:relative;
}
#header h2 {
font-size:16px;
font-weight:normal;
margin:0px;
padding:0px;
}
#jsddm {
margin: 0;
padding: 0
}
#jsddm li {
float: left;
list-style: none;
font: 12px Tahoma, Arial;
}
#jsddm li a {
display: block;
background: #20548E;
padding: 5px 12px;
text-decoration: none;
border-right: 1px solid white;
width: 70px;
color: #EAFFED;
white-space: nowrap;
}
#jsddm li a:hover {
background: #1A4473;
text-decoration: none;
}
#jsddm li ul {
margin: 0;
padding: 0;
position: absolute;
visibility: hidden;
text-decoration: none;
}
#jsddm li ul li {
float: none;
display: inline;
text-decoration: none;
}
#jsddm li ul li a {
width: auto;
display: block;
padding: 5px 12px;
text-decoration: none;
width: 70px;
color: #EAFFED;
white-space: nowrap
}
#jsddm li ul li a:hover {
background: #7F1616;
text-decoration: none;
}
</style>
```
JavaScript
```
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
<script type="text/javascript">
var timeout = 500;
var closetimer = 0;
var ddmenuitem = 0;
function jsddm_open()
{ jsddm_canceltimer();
jsddm_close();
ddmenuitem = $(this).find('ul').css('visibility', 'visible');}
function jsddm_close()
{ if(ddmenuitem) ddmenuitem.css('visibility', 'hidden');}
function jsddm_timer()
{ closetimer = window.setTimeout(jsddm_close, timeout);}
function jsddm_canceltimer()
{ if(closetimer)
{ window.clearTimeout(closetimer);
closetimer = null;}}
$(document).ready(function()
{ $('#jsddm > li').bind('mouseover', jsddm_open)
$('#jsddm > li').bind('mouseout', jsddm_timer)});
document.onclick = jsddm_close;
$(document).ready(function() {
$("#documents a").click(function() {
addTab($(this));
});
$('#tabs a.tab').live('click', function() {
// Get the tab name
var contentname = $(this).attr("id") + "_content";
// hide all other tabs
$("#content p").hide();
$("#tabs li").removeClass("current");
// show current tab
$("#" + contentname).show();
$(this).parent().addClass("current");
});
$('#tabs a.remove').live('click', function() {
// Get the tab name
var tabid = $(this).parent().find(".tab").attr("id");
// remove tab and related content
var contentname = tabid + "_content";
$("#" + contentname).remove();
$(this).parent().remove();
// if there is no current tab and if there are still tabs left, show the first one
if ($("#tabs li.current").length == 0 && $("#tabs li").length > 0) {
// find the first tab
var firsttab = $("#tabs li:first-child");
firsttab.addClass("current");
// get its link name and show related content
var firsttabid = $(firsttab).find("a.tab").attr("id");
$("#" + firsttabid + "_content").show();
}
});
});
function addTab(link) {
// If tab already exist in the list, return
if ($("#" + $(link).attr("rel")).length != 0)
return;
// hide other tabs
$("#tabs li").removeClass("current");
$("#content p").hide();
// add new tab and related content
$("#tabs").append("<li class='current'><a class='tab' id='" +
$(link).attr("rel") + "' href='#'>" + $(link).html() +
"</a><a href='#' class='remove'>x</a></li>");
$("#content").append("<p id='" + $(link).attr("rel") + "_content'>" +
$(link).attr("title") + "</p>");
// set the newly added tab as current
$("#" + $(link).attr("rel") + "_content").show();
}
</script>
```
html
```
<body>
<div id="main">
<div id="wrapper">
<ul id="tabs">
<!-- Tabs go here -->
<div style="float: right">
<ul id="jsddm">
<li><a href="#">select</a>
<ul id="documents">
<li><a href="#" rel="Document1" title="This is the content of Document1">Document1</a></li>
<li><a href="#" rel="Document2" title="This is the content of Document2">Document2</a></li>
<li><a href="#" rel="Document3" title="This is the content of Document3">Document3</a></li>
<li><a href="#" rel="Document4" title="This is the content of Document4">Document4</a></li>
<li><a href="#" rel="Document5" title="This is the content of Document5">Document5</a></li>
<li><a href="#" rel="Document6" title="This is the content of Document6">Document6</a></li>
<li><a href="#" rel="Document7" title="This is the content of Document7">Document7</a></li>
</ul>
</li>
</ul>
</div>
</ul>
<div id="content">
<div></div>
</div>
</div>
</div>
</body>
```
| Dynamic jQuery tabbing (sorting out tab overflow) | CC BY-SA 3.0 | 0 | 2011-02-21T05:00:16.077 | 2017-02-24T23:27:42.143 | 2017-02-24T23:27:42.143 | 472,495 | 436,493 | [
"jquery",
"html",
"css"
]
|
5,062,531 | 1 | 5,135,511 | null | 1 | 2,004 | I am using ri_cal gem to generate ics file.
In my mailer:--
```
def appointment_book(appointment,recipient,appointment_with)
event = RiCal.Event do
description "MA-6 First US Manned Spaceflight"
dtstart DateTime.parse(appointment.slot.date_on.strftime("%m/%d/%Y").to_s + " " + appointment.slot.start_time.strftime("%I.%M %p").to_s)
dtend DateTime.parse(appointment.slot.date_on.strftime("%m/%d/%Y").to_s + " " + appointment.slot.end_time.strftime("%I.%M %p").to_s)
add_attendee appointment_with.full_name
alarm do
description "Segment 51"
end
end
attachments['event.ics'] = {
:mime_type => 'text/calendar',
:content => event.export
}
@recipient = recipient
@appointment = appointment
mail(:to => recipient.email, :subject => "Appointment book")
end
```
in appintment_book.text.erb file
```
(some simple variable values or plain text.)
```
Issue is (In Yahoo, specifically newer version. I am adding screenshots in edit part):--
attachment is there is mail, but apart from gmail content of the mail is having some vcard and other content. If i remove ics_generation code then its gone. Please check screenshots
In gmail it looks like (Also working on hotmail):--

##

| Rails 3 ActionMailer attachments incorrectly shown inline by Yahoo! Mail | CC BY-SA 2.5 | null | 2011-02-21T05:08:14.440 | 2011-11-17T01:40:26.837 | 2011-03-01T14:58:35.363 | 437,273 | 179,855 | [
"ruby-on-rails",
"email",
"ruby-on-rails-3",
"yahoo",
"icalendar"
]
|
5,062,573 | 1 | null | null | 0 | 374 | I'm trying to rearrange the value of columns and rows with some scenario, but I'm unable to do that. I tried with pivot as well.
Following are the scenario of table.

| ReArrange the rows and columns in SQL Server | CC BY-SA 2.5 | 0 | 2011-02-21T05:14:45.720 | 2011-02-21T05:40:38.450 | 2011-02-21T05:35:42.967 | 13,302 | 584,200 | [
"sql-server-2005"
]
|
5,062,734 | 1 | 5,063,031 | null | 0 | 106 | Im importing some files to make a [calendar](http://blog.webscale.co.in/?p=244) in my app, but I get the following error,
```
"_OBJC_CLASS_$_CheckmarkTile", referenced from:
objc-class-ref-to-CheckmarkTile in RosterCrViewController.o
"_OBJC_CLASS_$_KLCalendarView", referenced from:
objc-class-ref-to-KLCalendarView in RosterCrViewController.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
```
wich looks exactly like this post solution
[Linking Error: Symbol Not Found](http://iphonedevelopertips.com/xcode/linking-error-symbol-not-found.html)

but the problem (basic, noob here!, ;p )
is I dont know how to bring this screen to show the "files that make up the final executable" (to check that and hopefully fix the error)

[EDIT] OK thanks to Rajender, now I have my files checked, but now I get 8 errors!, why o why (all files are ticked now)

Thanks a lot!!
| iphone is this error about linking? | CC BY-SA 2.5 | null | 2011-02-21T05:41:06.280 | 2011-02-21T06:57:10.953 | 2011-02-21T06:57:10.953 | 523,507 | 523,507 | [
"iphone",
"object",
"file",
"hyperlink"
]
|
5,062,876 | 1 | 13,426,345 | null | 3 | 3,022 | > [http://androidapt.wordpress.com/2010/11/19/pulse-news-reader-an-android-app-that-kicks-rss/](http://androidapt.wordpress.com/2010/11/19/pulse-news-reader-an-android-app-that-kicks-rss/)
Gallery inside ListView it's clear, but:
1. What is the technology that allows you to show a ScrollView under opening ListView?
2. How to make gallery and top bar move down by touching screen inside opened Scrollview?
I don't need the direct code, just show me where to lurk for this info.

I though that it uses [SlideDrawer](https://github.com/commonsguy/cw-android/tree/master/Fancy/DrawerDemo), but it reacts only on touches, then i think it is something similar to [SlidingPanel](https://github.com/commonsguy/cw-advandroid/tree/master/Animation/SlidingPanel)
| How to make an app similar to Pulse News Reader for Android | CC BY-SA 2.5 | 0 | 2011-02-21T06:07:13.003 | 2014-07-14T14:14:23.243 | 2011-02-21T16:16:13.173 | 464,328 | 464,328 | [
"android"
]
|
5,063,282 | 1 | 5,101,254 | null | 3 | 16,033 | I am having problems redering an grid in a a tab panel (Its made with Ext Designer.). the hierarchy is as follows ,
Viewport. -> tabPanel -> Panel -> Container -> Grid.
This is how its displayed now

Here is the code for viewport
```
mainWindowUi = Ext.extend(Ext.Viewport, {
layout: 'border',
id: 'mainWindow',
initComponent: function() {
this.items = [
{
xtype: 'panel',
title: 'Navigation',
region: 'west',
width: 200,
frame: true,
split: true,
titleCollapse: true,
collapsible: true,
id: 'navigation',
items: [
{
flex: 1,
xtype: 'mytreepanel'
}
]
},
{
xtype: 'tabpanel',
layoutOnTabChange: true,
resizeTabs: true,
defaults: {
layout: 'fit',
autoScroll: true
},
region: 'center',
tpl: '',
id: 'mainTabPanel',
layoutConfig: {
deferredRender: true
}
}
];
mainWindowUi.superclass.initComponent.call(this);
}
});
```
here is the code to create the tab.. (created from a nav panel programmatically)
```
var currentTab = tabPanel.findById(node.id);
// If not yet created, create the tab
if (!currentTab){
currentTab = tabPanel.add({
title:node.id,
id:node.id,
closable:true,
items:[{
xtype: 'phasePanel',
layout: 'fit',
autoscroll: true,
}],
autoScroll:true,
});
}
// Activate tab
tabPanel.setActiveTab(currentTab);
```
here is the code for the panel/container/grid
```
PhasePanelUi = Ext.extend(Ext.Panel, {
frame: true,
layout: 'anchor',
autoScroll: true,
autoWidth: true,
defaults: '',
initComponent: function() {
this.items = [
{
xtype: 'container',
autoScroll: true,
layout: 'fit',
defaults: {
layout: 'fit',
autoScroll: true
},
id: 'gridHolder',
items: [
{
xtype: 'grid',
title: 'Current Phases',
store: 'PhaseStore',
autoDestroy: false,
viewConfig: '',
deferRowRender: false,
autoLoad: '',
ref: '../phaseGrid',
id: 'phaseGrid',
columns: [
{
xtype: 'gridcolumn',
header: 'Name',
dataIndex: 'name',
sortable: true,
width: 200
},
{
xtype: 'gridcolumn',
header: 'Estate',
dataIndex: 'estate_name',
sortable: true,
width: 500
}
]
}
]
}
];
PhasePanelUi.superclass.initComponent.call(this);
}
});
```
i have tried all sorts of combinations. but just cant get the grid to render correctly any sort of assistance will be appreciated.
| ExtJs Grid in TabPanel auto Fit issue | CC BY-SA 2.5 | 0 | 2011-02-21T07:18:53.893 | 2011-02-24T07:21:07.943 | null | null | 349,518 | [
"javascript",
"extjs"
]
|
5,063,397 | 1 | null | null | 0 | 91 | Could anyone help me with this? I've two classes in my project: User and Article. It looks like this:

```
public class User
{
public virtual int UserID { set; get; }
public virtual string Name { set; get; }
public virtual IList<Article> Articles { set; get; }
public User() { }
}
public class Article
{
public virtual int ArticleID { set; get; }
public virtual string Title { set; get; }
public virtual string Body { set; get; }
public virtual User User { set; get; }
public Article() { }
}
```
Now, I would like that tables in the database looked like this:

I have use XML mapping. Please help me.
| NHibernate mappings | CC BY-SA 2.5 | 0 | 2011-02-21T07:35:44.383 | 2011-02-21T11:56:09.617 | null | null | 345,969 | [
"nhibernate",
"orm",
"nhibernate-mapping"
]
|
5,063,544 | 1 | 5,063,586 | null | 2 | 1,220 | Does anyone know how the DropBox app is able to add a toolbar button to the Finder window? I'm asking because I'd like to do this in some of my apps.
The dropbox toolbar button is more then a droplet or an app, it gets added to the Finders toolbar buttons list and acts exactly like the other toolbar items. It fades when Finder is inactive(on Snow Leopard) and it has a dropdown menu.

| DropBox finder button | CC BY-SA 2.5 | 0 | 2011-02-21T07:56:59.607 | 2011-04-02T23:39:48.273 | 2011-02-21T09:30:05.627 | 239,380 | 239,380 | [
"cocoa",
"macos"
]
|
5,063,730 | 1 | 5,063,774 | null | 4 | 10,066 | I am using my layout code as
```
<LinearLayout android:orientation="horizontal" android:background="@android:drawable/bottom_bar"
android:paddingLeft="4.0dip" android:paddingTop="5.0dip"
android:paddingRight="4.0dip" android:paddingBottom="1.0dip"
android:id="@+id/select_names_tags_ll1"
android:layout_width="fill_parent" android:layout_height="wrap_content"
android:layout_alignParentBottom="true">
<Button android:id="@+id/button1"
android:layout_width="0.0dip"
android:text="ZZZZZZZZZZZZZ"
android:layout_weight="1.0"
android:layout_height="wrap_content"
android:padding="5dp" />
<Button android:id="@+id/button2"
android:layout_width="10.0dip"
android:text="KKKKK"
android:layout_weight="1.0"
android:layout_height="wrap_content"
android:padding="5dp"/>
<Button android:id="@+id/button3"
android:layout_width="10.0dip"
android:text="YYY"
android:layout_weight="1.0"
android:layout_height="wrap_content"
android:padding="5dp"/>
```
its output as

I want to fix width of buttons depends on their text length. How it will be possible?
| Resizing buttons in android | CC BY-SA 2.5 | 0 | 2011-02-21T08:28:14.433 | 2011-02-21T08:35:33.863 | 2020-06-20T09:12:55.060 | -1 | 550,966 | [
"android",
"android-layout"
]
|
5,064,060 | 1 | 5,087,345 | null | 2 | 262 | How do I get this equation to multiply by itself?
```
*/-.%~.q:36
```
other than repeating the number 36 again. It's Euler's Totient Function by the way.

I'm lacking the last step of multiplying this by itself.
Yes, I know they already have the code for this function at jsoftware. But I'm trying to break down the codes and learn.
Sorry to ask such simple questions. It's really hard to find help for J on Google.
| J How to get equation to multiply by itself? | CC BY-SA 2.5 | null | 2011-02-21T09:08:15.577 | 2011-02-26T02:03:21.587 | null | null | 607,455 | [
"j"
]
|
5,064,090 | 1 | 5,064,543 | null | 0 | 60 | I am making an application the user uploads a file and then choose all the categories associated with the file.
the first view the user has the option to upload a file then a group of checkboxes appears for adding the required categories
the problem comes when editing a file you can choose to check/uncheck the checkboxes uncheck means delete the record if it was there and check means add if it wasn't
i can't figure out how to make the linq query for this scenario to add/delete if it was or wasn't

| adding/removing records if it was or wasn't there | CC BY-SA 2.5 | null | 2011-02-21T09:11:52.610 | 2011-02-21T10:16:35.170 | null | null | 386,941 | [
"linq",
"entity-framework-4",
"asp.net-mvc-3"
]
|
5,064,143 | 1 | null | null | 0 | 396 | Any idea how to copy: name, content from rows where language_id = 1 to rows where language_id = 2?
How should SQL command look like?

I want to achive:
| SQL command to copy selected content from selected rows into other rows? | CC BY-SA 2.5 | null | 2011-02-21T09:18:13.680 | 2011-02-21T10:24:31.917 | 2011-02-21T10:24:31.917 | 217,681 | 217,681 | [
"php",
"sql",
"mysql",
"phpmyadmin"
]
|
5,064,230 | 1 | 5,064,280 | null | 0 | 137 | I have a rather bizarre situation, and it's not the first time I this has happened. I have a web site I am developing (a Wordpress template, but that's irrelevant in this context).
I have noticed a distinct shift in the baseline grid of the typography, as well as the SIZE of the type used in my web site template.
I have attached two screenshots. The first one is a preview of the web site on my local testing server (windows XP SP3 Apache 2.2.8) and the second is of the live site, hosted on a Debian Linux machine running Apache web server.
Can anyone throw some ideas around as to why this is happening? Is it a doctype issue? The doctype declared in the latest Wordpress header file is:
```
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
```
Screenshots:


Many thanks to all who contribute.
| Typography basline & size changing when web site on live server | CC BY-SA 2.5 | null | 2011-02-21T09:27:48.840 | 2011-02-21T09:32:55.810 | null | null | 302,341 | [
"css",
"apache",
"xhtml",
"web"
]
|
5,064,250 | 1 | 5,064,337 | null | 5 | 11,495 | The other day I came accross this SO question : [Bash script plugin for Eclipse?](https://stackoverflow.com/questions/1356827/bash-script-plugin-for-eclipse) , the idea is great.
So I went to the download site downloaded this plugin but I didn't install any eclipse plugin manually so I don't really have a clue how to install one.
I extracted this zip file I downloaded and it looks like this :

What should I do next, how do I install this plugin ? thank you
When I try to install it using install new software from local dir I get this error :
```
Cannot complete the install because one or more required items could not be found.
Software being installed: ShellEd 2.0.0.201007201532-1--773533H735D97 (net.sourceforge.shelled.feature.group 2.0.0.201007201532-1--773533H735D97)
Missing requirement: ShellEd UI 0.0.0.201007201532 (net.sourceforge.shelled.ui 0.0.0.201007201532) requires 'bundle org.eclipse.dltk.launching [2.0.0,3.0.0)' but it could not be found
Cannot satisfy dependency:
From: ShellEd 2.0.0.201007201532-1--773533H735D97 (net.sourceforge.shelled.feature.group 2.0.0.201007201532-1--773533H735D97)
To: net.sourceforge.shelled.ui [0.0.0.201007201532]
```
```
Cannot complete the install because one or more required items could not be found.
Software being installed: ShellEd 2.0.0.201007201532-1--773533H735D97 (net.sourceforge.shelled.feature.group 2.0.0.201007201532-1--773533H735D97)
Missing requirement: ShellEd UI 0.0.0.201007201532 (net.sourceforge.shelled.ui 0.0.0.201007201532) requires *'bundle org.eclipse.linuxtools.man 0.0.0'* but it could not be found
Cannot satisfy dependency:
From: ShellEd 2.0.0.201007201532-1--773533H735D97 (net.sourceforge.shelled.feature.group 2.0.0.201007201532-1--773533H735D97)
To: net.sourceforge.shelled.ui [0.0.0.201007201532]
```
I don't know what it means
| Question on installing eclipse plugin | CC BY-SA 2.5 | null | 2011-02-21T09:29:34.923 | 2012-05-14T19:17:33.803 | 2017-05-23T12:01:09.563 | -1 | 282,383 | [
"java",
"eclipse",
"eclipse-plugin"
]
|
5,064,292 | 1 | 5,203,131 | null | 0 | 95 | 
I add the tweet jump project high score source code in my project, and when I use this the output of my project is the screenshot
| how can I set this score board | CC BY-SA 2.5 | null | 2011-02-21T09:33:57.410 | 2017-01-05T08:17:01.133 | null | null | 2,075,384 | [
"iphone",
"cocos2d-iphone"
]
|
5,064,360 | 1 | 5,064,427 | null | 1 | 322 | I am trying to write a space invaders game in XNA, and have made a class diagram representing the game. It uses the strategy pattern for the bullet. In most examples it shows using an interface, but because I want to add behavior to them, I made it an abstract class. Don't know if that's allowed or not.
Anyways, I wanted to know what your thoughts on it is, and if there could be anything that could be improved. I try to read up a lot on designing, but trying to design always have things that are a bit off from the things you read and you start to wonder if it is correct or not.
I present:

| My application design: can I ask for a review? | CC BY-SA 2.5 | null | 2011-02-21T09:42:42.493 | 2011-02-21T09:49:19.580 | null | null | 543,269 | [
"design-patterns"
]
|
5,064,635 | 1 | null | null | 0 | 67 | Hello all when i am trying to run the application i am getting error like this one..

The service.svc file has the following code..
```
<%@ ServiceHost Language="C#" Debug="true" Service="prodcuts.ProductServiceImpl" CodeBehind="~/App_Code/ProductsService.cs" %>
```
Please help me..
Thankyou
| error while running the WCF application | CC BY-SA 2.5 | null | 2011-02-21T10:10:54.603 | 2011-02-21T10:14:50.033 | null | null | 526,095 | [
"asp.net",
"wcf"
]
|
5,064,875 | 1 | 5,064,967 | null | 2 | 247 | 
How can we show this dialler in our application to initiate a call
| How can we show this UI in our application | CC BY-SA 2.5 | null | 2011-02-21T10:35:04.353 | 2011-02-21T14:46:44.980 | null | null | 548,218 | [
"android",
"android-layout"
]
|
5,065,051 | 1 | 5,065,624 | null | 4 | 7,728 | I have been working with MATLAB's [treeplot](http://www.mathworks.com/help/techdoc/ref/treeplot.html) function, but it seems to provide surprisingly little plotting functionality and/or extendibility.
I am plotting a tree like so:
```
tree = [0 1 2 2 2 2 2 1 8 8 1 11 11 1 14];
treeplot(tree)
```
Giving:

What I would like to do is add annotations or labels to specific nodes. A good starter would be to add the node numbers to each node, as in the example from the help file:

As they state, though:
>
Is there a way to get the locations of the plotted nodes, or at the very least to plot the node numbers? I couldn't find any FEX submissions with more advanced tree plots.
Ultimately, I'd like to plot small pictures at the nodes (using methods from [answers to a previous question of mine](https://stackoverflow.com/questions/4850002/plot-images-as-axis-labels-in-matlab/4851060#4851060)).
| Add node numbers/get node locations from MATLAB's treeplot | CC BY-SA 2.5 | 0 | 2011-02-21T10:51:41.983 | 2012-02-21T16:53:00.387 | 2017-05-23T12:01:39.123 | -1 | 279,858 | [
"matlab",
"tree",
"plot"
]
|
5,065,160 | 1 | 5,065,264 | null | 0 | 5,141 | I need to design the blow given UI using a list view
```
I have to xml conf.xml
<?xml version="1.0" encoding="UTF-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical" android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:paddingLeft="5dp"
android:paddingRight="5dp">
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:paddingTop="15dp"
android:gravity="center"
android:textColor="#FFFFFF"
android:text="">
</TextView>
<ListView android:id="@+id/ListView01"
android:layout_height="wrap_content"
android:layout_width="fill_parent">
</ListView>
<TextView
android:id="@+id/TextViewEmpty"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:paddingTop="10dp"
android:gravity="center"
android:textColor="#FFFFFF"
android:typeface="sans"
android:text="No Entries available">
</TextView>
</LinearLayout>
```
conf1.xml for the List View
```
<?xml version="1.0" encoding="utf-8"?>
```
```
<LinearLayout
android:id="@+id/layout1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal"
>
<TableRow android:id="@+id/ConfRow" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:orientation="horizontal">
<ImageView
android:id="@+id/imgPicture1"
android:layout_width="wrap_content"
android:layout_height="50dp"
android:src="@drawable/conf_line">
</ImageView>
</TableRow>
<LinearLayout
android:id="@+id/layout1"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
>
<TextView android:text="@+id/TextView02" android:id="@+id/TextView02"
android:layout_width="wrap_content" android:layout_height="wrap_content"
android:layout_marginLeft="10dp" android:textColor="#FFFFFF"
android:textAppearance="?android:attr/textAppearanceMedium"></TextView>
<TextView android:text="@+id/TextView04" android:id="@+id/TextView04"
android:layout_width="wrap_content" android:layout_height="wrap_content"
android:layout_marginLeft="10dp" android:textColor="#FFFFFF"
android:textAppearance="?android:attr/textAppearanceSmall"></TextView>
</LinearLayout>
```
But the expected out put is not the same as the given image layout..Pls Help
| How can we design the List View layout | CC BY-SA 2.5 | 0 | 2011-02-21T11:03:29.343 | 2011-09-25T17:31:17.203 | null | null | 548,218 | [
"android",
"android-layout"
]
|
5,065,226 | 1 | 5,065,258 | null | 3 | 1,397 | HI there,
Using vim and whenever I make a change and save a file vim seems to create a backup file. I can see that it's the file before I made my change and saved.
How can I prevent this or hide these files?
I type to save and quit.

| vim creates copies of my files after saving? | CC BY-SA 2.5 | null | 2011-02-21T11:10:42.523 | 2011-02-21T12:58:25.847 | null | null | 234,543 | [
"vim"
]
|
5,065,235 | 1 | null | null | 0 | 103 | 
This [Chrome scraping tool](https://chrome.google.com/webstore/detail/mbigbapnjcgaffohmbkdlecaccepngjd) has open sourced its code here:
[https://github.com/mnmldave/scraper](https://github.com/mnmldave/scraper)
How would one verify that the code in this tool doesn't misuse your Google Account credentials when it uploads the scraped data to Google Spreadsheets?
| How to verify that the code in this open source tool doesn't misuse your Google Account credentials? | CC BY-SA 2.5 | null | 2011-02-21T11:11:23.220 | 2011-02-22T10:58:58.027 | 2011-02-22T10:58:58.027 | 559,894 | 559,894 | [
"javascript",
"jquery",
"security",
"google-chrome",
"screen-scraping"
]
|
5,065,362 | 1 | 5,067,542 | null | 67 | 95,792 | This is driving me crazy.
Just testing a site on IE9 and discovered that the 'live' version is rendering a web font I am using smaller than on the dev version.
Here is a selection of screen grabs:

I am using the Font Squirrel @font-face kit. As you can see, it is fine on Firefox, Chrome and even IE9 when viewing a local version of the site.
The only difference between the local and live versions is that the font is being loaded from a different domain on the live site (I have set up the cross-domain policy correctly, as illustrated by the fact it works on Firefox and Chrome).
I can't remember what it looked like in IE8 (Microsoft, yet again, haven't thought of developers and have installed IE9 over the top of IE8 with no option to run them simultaneously)
The site is at [http://enplanner.com](http://enplanner.com) so you can view the source.
Any help on this would be most appreciated - thank you in advance.
I have removed IE9 and discovered that is looks exactly the same on both local and live in IE8. It appears IE8 has a superior rendering engine that is closer to FF/Chrome than IE9. This is quite a depressing discovery.
| IE9 blocks download of cross-origin web font | CC BY-SA 3.0 | 0 | 2011-02-21T11:26:07.113 | 2022-06-18T17:23:04.510 | 2013-03-18T09:02:53.287 | 1,581,050 | null | [
"internet-explorer",
"cross-domain",
"internet-explorer-9",
"webfonts"
]
|
5,065,371 | 1 | 9,899,904 | null | 16 | 8,180 | Does anybody know how to properly identify CMYK images in ASP.NET using C#? When I check the `Flags` attribute of a `Bitmap` instance, I get incorrect results.
I have created three images to test this: cmyk.jpg, rgb.jpg and gray.jpg. These are respectively CMYK, RGB and Grayscale images.
This is my test code:
```
static void Main(string[] args)
{
Bitmap bmpCMYK = new Bitmap("cmyk.jpg");
Bitmap bmpRGB = new Bitmap("rgb.jpg");
Bitmap bmpGray = new Bitmap("gray.jpg");
Console.WriteLine("\t\tRgb\tCmyk\tGray\tYcbcr\tYcck\tPixelFormat");
Console.WriteLine("cmyk.jpg\t{0}\t{1}\t{2}\t{3}\t{4}\t{5}",
IsSet(bmpCMYK, System.Drawing.Imaging.ImageFlags.ColorSpaceRgb),
IsSet(bmpCMYK, System.Drawing.Imaging.ImageFlags.ColorSpaceCmyk),
IsSet(bmpCMYK, System.Drawing.Imaging.ImageFlags.ColorSpaceGray),
IsSet(bmpCMYK, System.Drawing.Imaging.ImageFlags.ColorSpaceYcbcr),
IsSet(bmpCMYK, System.Drawing.Imaging.ImageFlags.ColorSpaceYcck),
bmpCMYK.PixelFormat);
Console.WriteLine("rgb.jpg\t\t{0}\t{1}\t{2}\t{3}\t{4}\t{5}",
IsSet(bmpRGB, System.Drawing.Imaging.ImageFlags.ColorSpaceRgb),
IsSet(bmpRGB, System.Drawing.Imaging.ImageFlags.ColorSpaceCmyk),
IsSet(bmpRGB, System.Drawing.Imaging.ImageFlags.ColorSpaceGray),
IsSet(bmpRGB, System.Drawing.Imaging.ImageFlags.ColorSpaceYcbcr),
IsSet(bmpRGB, System.Drawing.Imaging.ImageFlags.ColorSpaceYcck),
bmpRGB.PixelFormat);
Console.WriteLine("gray.jpg\t{0}\t{1}\t{2}\t{3}\t{4}\t{5}",
IsSet(bmpGray, System.Drawing.Imaging.ImageFlags.ColorSpaceRgb),
IsSet(bmpGray, System.Drawing.Imaging.ImageFlags.ColorSpaceCmyk),
IsSet(bmpGray, System.Drawing.Imaging.ImageFlags.ColorSpaceGray),
IsSet(bmpGray, System.Drawing.Imaging.ImageFlags.ColorSpaceYcbcr),
IsSet(bmpGray, System.Drawing.Imaging.ImageFlags.ColorSpaceYcck),
bmpGray.PixelFormat);
bmpCMYK.Dispose();
bmpRGB.Dispose();
bmpGray.Dispose();
Console.ReadLine();
}
private static bool IsSet(Bitmap bitmap, System.Drawing.Imaging.ImageFlags flag)
{
return (bitmap.Flags & (int)flag) == (int)flag;
}
```
This produces the following output:

I have checked the actual images and cmyk.jpg really a CMYK image.
Apparently, this is a "known issue". Alex Gil had the same problem in WPF (see this question: [How to identify CMYK images using C#](https://stackoverflow.com/questions/4315335/how-to-identify-cmyk-images-using-c)) and he managed to solve it by using a `BitmapDecoder` class to load the images. I'm a bit uncomfortable using that solution in ASP.NET because it requires me to add references to WindowsBase.dll and PresentationCore.dll and I'm not sure I want those in a web project.
Does anyone know of any other pure .NET solutions to check if an image is in the CMYK format that I can safely use in ASP.NET?
| How to identify CMYK images in ASP.NET using C# | CC BY-SA 2.5 | 0 | 2011-02-21T11:27:06.827 | 2015-03-25T15:15:03.660 | 2017-05-23T10:30:24.107 | -1 | 259,106 | [
"asp.net",
"image-processing",
"bitmap",
"cmyk"
]
|
5,065,954 | 1 | null | null | 2 | 1,039 | I have a centered container div, containing a content div to the left and a nav div to the right. I want the nav div to be fixed, as in not scrolling with content. See image below. Is this doable?

| Fixed nav div in centered content | CC BY-SA 2.5 | null | 2011-02-21T12:32:18.097 | 2011-02-21T21:16:00.503 | 2011-02-21T21:16:00.503 | 185,076 | 185,076 | [
"css",
"html",
"fixed",
"centering",
"non-scrolling"
]
|
5,066,018 | 1 | null | null | 0 | 436 | I would like to register my custom protocol with Y! Messenger.
Please see the image below. Y! Messenger understands `mailto:`, `ymsgr:`, but not my custom protocol `myapp:`. The custom protocol is registered on both the machine sending the IM, and that receiving.

| How to show Custom Url Protocol as a Link in the Y! Messenger? | CC BY-SA 2.5 | 0 | 2011-02-21T12:37:42.903 | 2011-02-21T14:45:17.223 | 2011-02-21T14:45:17.223 | 505,088 | 381,979 | [
"protocols",
"instant-messaging",
"yahoo-messenger"
]
|
5,066,020 | 1 | 5,066,799 | null | 0 | 220 | We have a Chat Service which is written in WCF and we have hosted it in a separate IIS site. Now I'm planning to add logging features (in a MS SQL Server database) across the entire chat application and I don't want to affect the performance of the core chat service. I'm writing a separate WCF service which take cares of writing entries in the database.
My question is that can I host the new logging service as a separate IIS site to handle incoming requests without sharing the load with the regular service or can I host in a separate virtual directory under the same site?
Since the chat application is real time want to be very careful in the performance since
> Requesting logging service + accessing
database = some latency
which I don't want to be included in the main service. Any suggestions?
Let me tell you why I want to go for a separate service.
If log and chat are in the same service -

Now my point is that if both the services are hosted under same site (which has a single entry point to IIS) will it be better? Or hosting them as different sites is better?
| IIS - Handling the load for a Chat service | CC BY-SA 2.5 | null | 2011-02-21T12:38:00.800 | 2011-02-22T09:48:42.950 | 2011-02-22T09:48:42.950 | 250,524 | 250,524 | [
"wcf",
"web-services",
"performance",
"iis"
]
|
5,066,154 | 1 | 5,066,893 | null | 0 | 1,150 | I’m trying to implement suggestions ComboBox like Google’s one:

User enters several symbols and a list with suggestions appears.
So I have the following code:
```
<!--Search query textBox-->
<ComboBox x:Name="txtMain" IsEditable="True" TextBoxBase.SelectionChanged="txtMain_SelectionChanged"
TextBoxBase.TextChanged=" txtMain_TextChanged"
KeyDown="txtMain_PreviewKeyDown"
SelectionChanged=" txtMain_SelectionChanged" IsTextSearchEnabled="False" />
public SearchControl()
{
InitializeComponent();
_search = new SearchViewModel(doc);
_suggestionCom = new SuggestionsCommand(
(object s, RunWorkerCompletedEventArgs evarg) =>
{
List<string> results = _suggestionCom.Suggestions;
if (results != null && results.Count() > 0)
{
txtMain.ItemsSource = results;
}
else
{
txtMain.ItemsSource = null;
}
txtMain.IsDropDownOpen = true;
});
}
void autoTextBox_TextChanged(object sender, TextChangedEventArgs e)
{
try
{
if (_prevText.Equals(txtMain.Text))
return;
// Only autocomplete when there is text
if (txtMain.Text.Length > 0)
{
string lastInput = txtMain.Text;
_prevText = lastInput;
_suggestionCom.Execute(lastInput); //it starts a new thread which download suggestions from the service
}
else
{
txtMain.ItemsSource = null;
}
}
catch (Exception err)
{
}
}
void txtMain_PreviewKeyDown(object sender, KeyEventArgs e)
{
if (e.Key == Key.Down)
{
if (txtMain.SelectedIndex < txtMain.Items.Count)
{
txtMain.SelectedIndex = txtMain.SelectedIndex + 1;
}
}
if (e.Key == Key.Up)
{
if (txtMain.SelectedIndex > -1)
{
txtMain.SelectedIndex = txtMain.SelectedIndex - 1;
}
}
if (e.Key == Key.Enter)
{
// Commit the selection
//txtMain.Visibility = Visibility.Collapsed;
e.Handled = (e.Key == Key.Enter);
//Perform search here
}
if (e.Key == Key.Escape)
{
// Cancel the selection
txtMain.ItemsSource = null;
//suggestionListBox.Visibility = Visibility.Collapsed;
}
}
```
Lambda described in the constructor is called when suggestions have been downloaded.
I have the following problems with this code. First, I can’t handle Key.Down (txtMain_PreviewKeyDown is not called when it is pressed). So in order to choose suggestion from a list user need to use mouse. Second, when some suggestions have been found and list has been dropped the text in ComboBox becomes selected (blue) which is not what I want(I don't want to have the text beeing selected when suggestion have been chosen):

| Problems with ComboBox used for showing suggestions | CC BY-SA 2.5 | 0 | 2011-02-21T12:48:45.747 | 2011-02-22T08:16:10.090 | null | null | 212,730 | [
"c#",
"wpf",
"xaml",
"combobox"
]
|
5,066,481 | 1 | 5,069,501 | null | 2 | 209 | Using python, which may be the best algorithm or the best strategy to detect the presence of colored bands as in image?
The image is scanned and cropped, the problem is that the crop not to be precise and I can not make use of a control that makes use of Cartesian coordinates to determine if the lines are present.
The strips may be present or not.

| What algorithm can be used to determine the presence of multiple stripes? | CC BY-SA 2.5 | 0 | 2011-02-21T13:23:28.940 | 2011-02-21T18:04:45.930 | 2011-02-21T18:04:45.930 | 353,410 | 405,471 | [
"python",
"image",
"image-processing"
]
|
5,066,450 | 1 | 5,066,955 | null | 8 | 11,000 | I am having a form in maximize mode, within the form contains a HeaderContentControl.
Within the HeaderContentControl.Content, i added a DockLayout, but the problem is that DockLayout is not fit to the form height.

How can I resolve this problem? Here's the xaml file:
```
<Window x:Class="Prototype.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:Prototype"
Title="XXX"
x:Name="frmMain"
Width="581" Height="340" ResizeMode="CanMinimize"
WindowStartupLocation="CenterScreen" WindowState="Maximized"
WindowStyle="None" IsHitTestVisible="True" Topmost="False" AllowsTransparency="True" Background="Transparent" Loaded="frmMain_Loaded">
<!-- Copyright Microsoft Corporation. All Rights Reserved. -->
<Window.Resources>
<Style TargetType="{x:Type local:MainWindow}">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type local:MainWindow}">
<Border Background="#FF333333"
BorderBrush="#FFCCCCCC"
BorderThickness="1"
CornerRadius="5"
Padding='2'>
<HeaderedContentControl>
<HeaderedContentControl.Header>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="19*" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="212*" />
<ColumnDefinition Width="84*" />
<ColumnDefinition Width='Auto' />
</Grid.ColumnDefinitions>
<Rectangle Grid.ColumnSpan="3" Fill="#FF505050" />
<TextBlock FontSize="13"
FontWeight='Bold'
VerticalAlignment='Center'
Margin="6,5,3,6"
Text="XXX" Grid.ColumnSpan="2" OpacityMask="#FFCECECE" Foreground="#FFF3F3F3" Height="20" />
<Button x:Name='WindowCloseButton'
Grid.Column="2"
Width="17"
Height="17"
Cursor='Hand'
Margin="8,6,6,8"
VerticalAlignment='Center'
Click='WindowCloseButton_Click' FontFamily="Lucida Console">
<Button.Background>
<ImageBrush />
</Button.Background>
<Image Source="/Prototype;component/Resource/window-close.png"></Image>
</Button>
</Grid>
</HeaderedContentControl.Header>
<!-- New Content Area -->
<HeaderedContentControl.Content>
<ContentPresenter Content="{TemplateBinding Content}" />
</HeaderedContentControl.Content>
</HeaderedContentControl>
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style TargetType="{x:Type MenuItem}">
<Setter Property="Foreground" Value="#FF7B7B7B"></Setter>
<Style.Triggers>
<Trigger Property="IsHighlighted" Value="True">
<Setter Property="Foreground" Value="#333333"></Setter>
</Trigger>
<Trigger Property="IsEnabled" Value="False">
<Setter Property="Foreground" Value="#333333"></Setter>
</Trigger>
</Style.Triggers>
</Style>
</Window.Resources>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="23" />
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<Menu Height="23" Name="menuContext" Margin="0,0" Background="#FF7B7B7B" Foreground="White" Grid.Row="0">
<MenuItem Header="File" Background="#FF7B7B7B" Foreground="White">
<MenuItem Header="Open" Margin="0,1"/>
<MenuItem Header="Save" Margin="0,1"/>
<MenuItem Header="Exit" Margin="0,1" UseLayoutRounding="True" />
</MenuItem>
</Menu>
<Grid Grid.Row="1" ShowGridLines="True">
<DockPanel LastChildFill="True">
<Border Height="25"
Background="SkyBlue"
BorderBrush="Black"
BorderThickness="1"
DockPanel.Dock="Top">
<TextBlock Foreground="Black">Dock = "Top"</TextBlock>
</Border>
<Border Height="25"
Background="SkyBlue"
BorderBrush="Black"
BorderThickness="1"
DockPanel.Dock="Top">
<TextBlock Foreground="Black">Dock = "Top"</TextBlock>
</Border>
<Border Height="25"
Background="LemonChiffon"
BorderBrush="Black"
BorderThickness="1"
DockPanel.Dock="Bottom">
<TextBlock Foreground="Black">Dock = "Bottom"</TextBlock>
</Border>
<Border Width="200"
Background="PaleGreen"
BorderBrush="Black"
BorderThickness="1"
DockPanel.Dock="Left">
<TextBlock Foreground="Black">Dock = "Left"</TextBlock>
</Border>
<Border Background="White"
BorderBrush="Black"
BorderThickness="1">
<TextBlock Foreground="Black">This content will "Fill" the remaining space</TextBlock>
</Border>
</DockPanel>
</Grid>
</Grid>
</Window>
```
| WPF: How to make HeaderedContentControl.Content fit height? | CC BY-SA 2.5 | 0 | 2011-02-21T13:20:59.247 | 2019-01-04T05:01:32.407 | null | null | 168,501 | [
"wpf",
"wpf-controls"
]
|
5,066,624 | 1 | 5,066,791 | null | 0 | 2,425 | This is my ListView structure and element :
```
// Get a cursor with all phones
Cursor c = getContentResolver().query(Phones.CONTENT_URI, null, null, null, ContactsContract.CommonDataKinds.Phone.DISPLAY_NAME);
startManagingCursor(c);
/** ----Display the Contacts on the device----- */
ListAdapter adapter = new SimpleCursorAdapter(this,
android.R.layout.simple_list_item_2, c,
new String[] { Phones.NAME, Phones.NUMBER },
new int[] { android.R.id.text1, android.R.id.text2 });
setListAdapter(adapter);
```
and my implementation of the setOnItemClickListener is as follows:
```
/** ----Defining the ItemOnClickListener for the displayed List---- */
final ListView contactlistview = getListView();
contactlistview.setTextFilterEnabled(true);
contactlistview.setOnItemClickListener(new OnItemClickListener() {
public void onItemClick(AdapterView<?> parent, View view,
int position, long id) {
Log.d(TAG, String.valueOf(position));
// When clicked, show a toast with the TextView text
Toast.makeText(getApplicationContext(),
contactlistview.getItemAtPosition(position).toString(),
Toast.LENGTH_SHORT).show();
Log.d(TAG, contactlistview.getItemAtPosition(position).toString());
}
});
```
and finally got the ListView as :

and when i clicked on any of the item i get the Toast Displaying the Following:

but i want my toast to display the contact name of the selected item
can u pls help me with the code :)
sorry for the inconvenience :)
THANKS :) :)
| ListView items with two rows | CC BY-SA 2.5 | null | 2011-02-21T13:36:37.640 | 2011-02-23T04:59:37.297 | 2011-02-23T04:59:37.297 | 457,982 | 601,142 | [
"android",
"eclipse",
"listview",
"onclick"
]
|
5,066,806 | 1 | 5,070,293 | null | 1 | 2,527 | I have a core data model with an entity called that is made up of the following attributes:

If I click on an '' button and bring up the following window:

what would be the correct method to programmatically add a new entry for each property simultaneously (in a similar fashion to how a bound IB 'add' button would work with an `NSArrayController`) and have them appear in the textfields of the '' window to edit? The textfields in the '' window are bound to the corresponding properties (with one or two still missing) of the entity. The code I have at the moment is:
```
- (IBAction)addNewClient:(id)sender;
{
[addClientsWindow makeKeyAndOrderFront:self];
//NSManagedObjectContext *clientsMoc= [clientsController managedObjectContext];
//[clientsMoc addObject:[clientsMoc newObject]];
[clientsController addObject:[clientsController newObject]];
}
```
Which worked for other entities in this project but isn't working for since I added relationship types (it throws up KVC errors in the console). I imagine it's because I am addressing the `NSArrayController` rather than the `NSManagedObjectContext` but the commented out code isn't working for me. This attempt follows on from a [previous question](https://stackoverflow.com/questions/5050732/specifying-which-object-to-get-the-super-of) as the question has changed a lot and I'm struggling to implement the advice given. I really need a good starting point and the apple dev docs aren't helping me make sense of this.
Thanks in advance!
Am I explaining things badly in this question? I'm new here but thought there might be an attempt at an answer. Googling this was hard for some reason. I may have found something similar to a solution through an unrelated Google search. Luckily it was relevant to this.
```
- (IBAction)addNewClient:(id)sender;
{
[addClientsWindow makeKeyAndOrderFront:self];
NSManagedObjectContext *clientsMoc= [clientsController managedObjectContext];
NSManagedObject *clientsEntity = [NSEntityDescription
insertNewObjectForEntityForName:@"Clients"
inManagedObjectContext:clientsMoc];
[clientsEntity setValue:@"name" forKey:@"clientName"];
[clientsEntity setValue:@"company" forKey:@"clientCompany"];
[clientsEntity setValue:@"address" forKey:@"clientAddress"];
[clientsEntity setValue:@"11111111" forKey:@"clientLandline"];
[clientsEntity setValue:@"[email protected]" forKey:@"clientEmail"];
}
```
This created a full new entry for the clients entity - I didn't realise I would have to do an individual value for each property. The KVC errors continued though and I couldn't find a solution at all. Apple dev docs were actually helpful on this one, [here](http://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/CocoaBindings/Concepts/Troubleshooting.html), and adding `NSBindingDebugLogLevel 1` to the “Arguments to be passed at launch” list gave me details of exactly what was causing the problem. It was an old binding to an `NSTableColumn` that hadn't been updated.
| Programmatically adding to a Core Data entity (like IB binding 'add') | CC BY-SA 2.5 | null | 2011-02-21T13:54:43.953 | 2011-02-21T19:25:13.447 | 2017-05-23T12:07:02.087 | -1 | 613,305 | [
"objective-c",
"xcode",
"macos",
"nsarraycontroller",
"nsmanagedobjectcontext"
]
|
5,066,887 | 1 | 7,388,371 | null | 0 | 619 | I wanted to know if you were aware of any other name for debuggers (I mean, tools like GDB)? `debugger` sounds to me like something which will remove bugs for you, something like:

but GDB is nothing like that! GDB can
- inspect the memory, read and right each bit of the address-space at your convenience, - control the CPU, display and change its registers, including the `Program Counter` which can be jumped anywhere in the code- understand your high-level source code and match one line/function/variable to its memory address- command the CPU to execute a specific function (`print malloc(sizeof(int))`)- ... and so many other things ...
all of that has nothing to do 'directly' with bugs, what's why I was wondering if any better world had been coined somewhere?
personally, I like the idea of "software voltmeter and iron-solder", but that's a bit cumbersome !
| Any better word than "Debugger" for tools like GDB? | CC BY-SA 2.5 | 0 | 2011-02-21T14:02:15.453 | 2011-09-23T14:20:27.230 | null | null | 341,106 | [
"gdb",
"debugging"
]
|
5,066,924 | 1 | 5,067,050 | null | 7 | 16,018 | I am trying to set items for a navigationController using the following call
```
NSArray *items = [NSArray arrayWithObjects: shareButton, nil];
[self.navigationController.toolbar setItems:items animated:NO];
```
This adds nothing to the toolbar.
I can hide and show the toolbar using
```
[self.navigationController setToolbarHidden:NO];
```
But cant make the items appear.
How does one set the items. ?
Update:

| Setting toolbar items for a navigationController | CC BY-SA 2.5 | 0 | 2011-02-21T14:06:04.140 | 2011-02-21T15:34:24.850 | 2011-02-21T15:27:15.020 | 356,387 | 356,387 | [
"iphone"
]
|
5,067,064 | 1 | null | null | 3 | 2,559 | I am creating a 2D sprite game in Unity, which is a 3D game development environment.
I have constrained all translation of objects to the XY-plane and rotation to the Z-axis.
My problem is that the meshes that are used to detect collisions between objects must still be in 3D. I have the need to detect collisions between the player object (a capsule collider) and a sprite (that has its collision volume defined by a polygonal prism).
I am currently writing the level editor and I have the need to let the user define the collision area for any given tile. In the image below the user clicks the points P1, P2, P3, P4 in that order.

Obviously the points join up to form a quadrilateral. This is the collision area I want, however I must then convert that to a 3D mesh. Basically I need to generate an extrusion of the polygon, then assign the vertex winding and triangles etc. The vertex positions is not a problem to figure out as it is merely a translation of the polygon down the z-axis.

I am having trouble creating an algorithm for assigning the winding order of the vertices, especially since the mesh must consist only of triangles.
Obviously the structure I have illustrated is not important, the polygon may be any 2d shape and will always need to form a prism.
Does anyone know any methods for this?
Thank you all very much for your time.
| Generating a 3D prism from any 2D polygon | CC BY-SA 2.5 | 0 | 2011-02-21T14:18:25.557 | 2011-02-28T22:56:08.940 | 2011-02-21T14:46:17.557 | 274,340 | 626,737 | [
"math",
"3d",
"geometry",
"computational-geometry",
"unity3d"
]
|
5,067,283 | 1 | 5,565,733 | null | 1 | 473 | I have a zend framework layout like this:
```
...
<div id="div1"></div>
<?php echo $this->layout()->content; ?>
...
```
The problem is a space between `div1` and `content` about 15px.
How can i remove it?
I use inspect element in chrome, there is a " " (spaces between double quotations) above content that i don't add it.
Please see below picture, I don't add the selected area.

| Remove the space above content in zendframework layout | CC BY-SA 2.5 | null | 2011-02-21T14:43:05.213 | 2011-04-06T11:40:57.540 | 2011-02-23T10:44:36.477 | 184,756 | 184,756 | [
"php",
"html",
"zend-framework",
"layout"
]
|
5,067,368 | 1 | 5,067,427 | null | 31 | 53,668 | I want to create an outer glow effect for arc shapes in my canvas tag.
This is what it's supposed to look like:

So far I have the circles in white. I tried using a dropShadow that has an Offset of '0', but this doesn't look right.
What do you suggest? Maybe shapes underneath that have a gradient from blue to black?
Thanks in advance!
Edit: Finally got it working. Used a for loop to draw circles with different radius and alpha.

| HTML5 canvas create outer glow effect of shape | CC BY-SA 2.5 | 0 | 2011-02-21T14:52:38.943 | 2017-03-31T06:04:34.160 | 2011-03-05T20:01:55.300 | 338,476 | 338,476 | [
"html",
"canvas"
]
|
5,067,717 | 1 | 5,068,036 | null | 2 | 201 | I'd like to find some examples, of how to implement a scrollable tab bar as found in the htc's desk clock app as seen below

Not sure what I should be looking for though? What's it called?
| Desk clock scrollable tab bar - what's it called? | CC BY-SA 2.5 | 0 | 2011-02-21T15:22:49.147 | 2011-02-21T15:49:41.543 | 2011-02-21T15:33:31.840 | 564,045 | 564,045 | [
"java",
"android",
"widget"
]
|
5,067,886 | 1 | null | null | 2 | 2,265 | I have a RadPageView which I use with a RadMultiPage and RadTabStrip inside of a RadWindow. The problem is that my RadPageView does not stretch to fill the RadWindow. I set the Height and Width to 100%, and for the Width it works fine... (when I resize the window, the PageView is also resized). However, the height of the PageView only stretches down to the height of the controls that it contains. I spent a lot of time playing with the properties trying to get this to work... Is there an easy way to achieve this? Or do I have to handle client side OnResize events... It works for the width though.. shouldn't it be easy to also work for the height?


| How can i stretch a PageView to fit the height of a RadWindow? | CC BY-SA 2.5 | 0 | 2011-02-21T15:37:17.940 | 2012-05-11T09:20:29.487 | null | null | 327,575 | [
"c#",
"asp.net",
"telerik"
]
|
5,067,978 | 1 | 5,378,857 | null | 0 | 1,996 | Good day to all... I have some "little" problems with ffserver and ffmpeg...
What I need to do is to broadcast a live video. So I got the cam... used vlc and used send stream option. I sent it to 192.168.1.9:64555, which is a virtual machine on the same computer, running centos.
On the virtual machine I run the command ffmpeg -i 192.168.1.9:64555 output.mpg.
The response is "unable to find file whatever".
Can any1 tell me what I did wrong?
Thank you and have a great day.
Print-screen with error:

| ffmpeg, vlc - Unable to find input stream | CC BY-SA 2.5 | 0 | 2011-02-21T15:45:23.620 | 2011-03-21T14:17:29.543 | 2011-02-21T16:11:23.490 | 569,872 | 569,872 | [
"stream",
"streaming",
"ffmpeg",
"vlc"
]
|
5,068,086 | 1 | 5,073,428 | null | 10 | 13,537 | If I have an undirected graph, how can I get a list of all cycles?
For example, from the following graph, I would want the cycles:
```
(a,b,d,e,c)
(a,b,c)
(b,d,e)
```

| Finding all cycles in an undirected graph | CC BY-SA 2.5 | 0 | 2011-02-21T15:54:36.763 | 2013-04-22T09:27:23.447 | 2011-02-21T15:58:52.740 | 553,404 | 553,404 | [
"algorithm",
"graph-theory"
]
|
5,068,093 | 1 | 5,068,273 | null | 0 | 208 | I posted not so long ago a class diagram for an application that I am making. Got some helpful tips and went to work. Designing sure is tough! Anyways, I made a version 2.0, but ran into other things. Maybe somebody could give pointers, or comments, or advice concerning my class diagram :-)

First I had 'Speed' in SomeInterface as part of the abstract class. After consideration I figured that this was not the best place to put 'Speed'. A not so good thing was that I was not able to give a proper name to the interface, and that I didn't know where to put 'Speed', in the Attribute or Operations compartment since it is a property...
Each object (Bullet, Invader, Ship) moves at it's own rate, so I put 'Speed' into an interface. All objects inherit from super class , and only override the Update() method. The abstract class does nothing with the Update method it got from , it's just there to show that it got it from there. I do not know if this is the correct way, or that I should leave it out and only show it in the classes that override it?
Another problem that I do not know how to handle is the animation that is done by the invaders. I got the following properties: SheetSize, FrameSize, and CurrentFrame. Sheet contains the alien pictures (like a flip book), FrameSize is for selecting just on frame on the sheet, and CurrentFrame... well, holds the current frame. Since Ship and Bullet do not animate, these properties are not usefull for them. Where to put them?
Finally, I didn't where to implement IBulletBehavior. First I had each bullet behavior implement IBulletBehavior, but switched to letting the abstract Bullet class implement it. Is there any rule that says which one to take?
| Comments on my design v2 | CC BY-SA 2.5 | 0 | 2011-02-21T15:55:16.380 | 2012-07-28T17:51:31.403 | 2012-07-28T17:51:31.403 | 50,776 | 543,269 | [
"design-patterns",
"design-principles"
]
|
5,068,232 | 1 | 5,068,978 | null | 1 | 1,261 | I want to do a simple form layout, labels and inputs, without tables. It works fine like this:
```
<!DOCTYPE html>
<html>
<head>
<style type="text/css">
form {
display: table;
}
form>div {
display: table-row;
}
form>div>* {
display: table-cell;
}
</style>
</head>
<body>
<form>
<div>
<label>Hello</label>
<input type="text"/>
</div>
<div>
<label>World</label>
<input type="text"/>
</div>
</form>
</body>
</html>
```
However, it doesn't work in IE7. What is the cleanest way to make table layouts that display correctly in IE7, IE8, Firefox, Chrome and Safari?
I've added a mock up of the layout I want to achieve:

| Table layout without tables in IE7 | CC BY-SA 2.5 | 0 | 2011-02-21T16:07:52.960 | 2012-08-04T16:17:06.410 | 2011-02-22T08:27:18.503 | 606,036 | 606,036 | [
"html",
"css",
"layout",
"internet-explorer-7"
]
|
5,068,323 | 1 | 5,068,729 | null | 0 | 294 | I'm working on a new application to perform certain steps on certain order defined by the user.
My issue now is that I want to build a SSIS-like interface on Visual C++, something like this:

The main idea is let the users to drag and drop elements on a blank section, and allow them also to rearrange them and create relations between them with arrows or lines.
Obviously SSIS designer UI allows to do much more than that, but at least something basic will help me to start.
I don't know how to make my search (I haven't found anything yet) or if anyone knows some tools or tutorials of this, I will really appreciate it.
I'm open to any suggestions, even if they are in other programming languages. This application is intended to be for Windows.
| C++ advance user interface building | CC BY-SA 3.0 | null | 2011-02-21T16:14:50.510 | 2013-03-29T10:40:45.087 | 2013-03-29T10:40:45.087 | 1,204,143 | 219,408 | [
"visual-c++",
"user-interface"
]
|
5,068,904 | 1 | 5,075,713 | null | 2 | 3,135 | If I have a table in Excel, populated via an external data connection, how can I refresh the data in such a way as to insert new rows for new data, but keep the old rows as well?
For example, this is my table:

Unfortunately the database that I'm working with , so if I refresh, I'll only get February 2011's data back. The end result I want is:
 Are there any built-in Excel options that I'm missing (similar to "External Data Properties"->"Insert entire rows for new data, clear unused cells") or should I go the programmatic route and save the old data in a temp table, etc?
| Append new data to an External Data table in Excel | CC BY-SA 2.5 | null | 2011-02-21T17:05:47.070 | 2011-02-22T08:26:44.503 | null | null | 180,424 | [
"excel",
"excel-external-data"
]
|
5,069,166 | 1 | 5,069,468 | null | 7 | 4,955 | How would I go about designing a website which has a fixed height header and footer (attached to the top and bottom of the browser window) but an expanding middle. The scroll bars would be only for the middle (orange section in diagram) so that the rest of the page would never need to scroll. I have drawn a mock-up below to explain more clearly.
Ideally it needs to be entirely implemented in CSS and HTML (no javascript fiddles!). I've got quite far with this problem but I can't force the orange section to fill up the remaining space when it isn't full(whatever it's content) and start scrolling if it overflows.

| An expanding middle in CSS | CC BY-SA 2.5 | 0 | 2011-02-21T17:28:25.107 | 2017-04-13T18:48:26.327 | null | null | 160,793 | [
"html",
"css",
"browser"
]
|
5,069,180 | 1 | null | null | 0 | 2,965 | I have to describe the structure of the system of dining philosophers using a uml component diagram in a client server architectural style.
I did this:

but i have many doubts on its correctness:
- is it correct to show every philosopher or should i draw only a generic one? and what about the forks?- should the forks be included in the table/server component?
| UML component diagram of dining philosopher problem in client server architecture | CC BY-SA 2.5 | null | 2011-02-21T17:29:40.300 | 2011-02-22T15:10:20.770 | 2011-02-22T15:10:20.770 | 1,288 | 354,696 | [
"components",
"uml"
]
|
5,069,318 | 1 | 8,480,455 | null | 4 | 21,120 | When getting a product collection in Magento, I would expect the StoreFilter to do just that, filter by the current store. But I can't get it to work.
Say I have 2 stores set up like so: 
And both stores have a different root category. Main Store is the default sample data, Store2 has just one product I added. I would have thought that using the store filter, only products within the root category of the current store would show up. But I'm getting every product showing. I'm testing this by placing the following in my category view template:
```
$store_id = Mage::app()->getStore()->getId();
$_testproductCollection = Mage::getResourceModel('reports/product_collection')
->setStoreId($storeId)
->addStoreFilter($store_id)
->addAttributeToSelect('*');
$_testproductCollection->load();
foreach($_testproductCollection as $_testproduct){
echo $this->htmlEscape($_testproduct->getName());
};
```
If I echo the store ID, it's giving me the correct number. I have only one product in Store 2, so why am I getting every product from all stores returned? I can set every product in Main Store to not show in Store2 and then add a visibility filter, but that would take forever.
Also, I just noticed, if I echo the products store ID, I get the current ID, not the store it's assigned to:
```
echo $_testproduct->getStoreId()
```
What's going on?
OK, so I tried joining the fields so that the store_id is included (as suggested below), the section of code is just setting all the products to have a store_id of 1. How can I just get the store_id associated with the product?
```
$_testproductCollection = Mage::getResourceModel('catalog/product_collection');
$_testproductCollection->joinField('store_id', 'catalog_category_product_index', 'store_id', 'product_id=entity_id', '{{table}}.store_id = 1', 'left');
$_testproductCollection->getSelect()->distinct(true);
$_testproductCollection->addAttributeToSelect('*')->load();
foreach($_testproductCollection as $_testproduct){
echo $this->htmlEscape($_testproduct->getName())."<br/>";
echo "STORE IS ".$_testproduct->getData('store_id')."<br/>";
};
```
If I check the table of my db, the store_id's are correct.
| Magento - addStoreFilter not working? | CC BY-SA 3.0 | 0 | 2011-02-21T17:44:44.103 | 2015-07-15T23:44:49.893 | 2011-04-08T16:59:00.510 | 161,056 | 161,056 | [
"magento"
]
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.