Id
int64 1.68k
75.6M
| PostTypeId
int64 1
2
| AcceptedAnswerId
int64 1.7k
75.6M
⌀ | ParentId
int64 1.68k
75.6M
⌀ | Score
int64 -60
3.16k
| ViewCount
int64 8
2.68M
⌀ | Body
stringlengths 1
41.1k
| Title
stringlengths 14
150
⌀ | ContentLicense
stringclasses 3
values | FavoriteCount
int64 0
1
⌀ | CreationDate
stringlengths 23
23
| LastActivityDate
stringlengths 23
23
| LastEditDate
stringlengths 23
23
⌀ | LastEditorUserId
int64 -1
21.3M
⌀ | OwnerUserId
int64 1
21.3M
⌀ | Tags
list |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
4,739,547 | 1 | 4,739,583 | null | 1 | 1,710 | when setting up the the notepad exercise ([http://developer.android.com/resources/tutorials/notepad/notepad-ex1.html](http://developer.android.com/resources/tutorials/notepad/notepad-ex1.html)) i am having problems getting past step 1 point 4. for build target it says no target available.
could someone offer any help please?


| android notepad tutorial - no build target available | CC BY-SA 2.5 | null | 2011-01-19T19:11:11.533 | 2013-08-13T14:31:51.330 | 2013-08-13T14:31:51.330 | null | 229,616 | [
"android",
"notepad"
]
|
4,739,732 | 1 | null | null | 1 | 1,282 | I have an interesting goal that hopefully, with your help, will be achieved.
I have this HTML structure:
```
<li>
<span class="buttonHighlight"></span>
<a href="#buy" class="button">BUY NOW</a>
</li>
```
That HTML + a few CSS lines gives me this:
IMG 1 (see below)
As you can see, the span.buttonHighlight is overlapping the button itself. Now, here comes the interesting part: The button is a simple anchor tag with cufonized text, that has a few CSS styles which give it that rounded-button background.
IMG 2 (see below)
What I've tried so far was to aim at each element separately: The `<span class="buttonHighlight"></span>` as , the CSS-driven background/box as and the cufonized text as . And luckily, the a.button .cufon is properly displaying; you can see it in FireBug:
IMG 3 (see below)
However, adding a z-index (of 101) that is superior to the z-index of span.buttonHighlight (100) did not help, i.e. the Highlight still overlapped the text.
You can find all the CSS styles relevant to this case here: pastie [dot] org/1478291
I really, really appreciate any help provided and your time.
Thank you so much!
Chris
**PS. Since I am not allowed to post images and only 1 hyperlink, i've stacked the 3 images below:
[http://i.stack.imgur.com/Upe63.jpg](https://i.stack.imgur.com/Upe63.jpg):

| Give Cufón a higher z-index | CC BY-SA 2.5 | null | 2011-01-19T19:31:21.857 | 2011-01-19T20:54:11.237 | 2011-01-19T20:28:21.287 | 405,015 | 359,408 | [
"html",
"css",
"background",
"z-index",
"cufon"
]
|
4,739,737 | 1 | 4,740,031 | null | 0 | 133 | I need help in building simple database structure. Kind of stuck.
Here's what I'm trying.
Class means Department+Semester. Eg, Electronics Engineering SemI, Electrical Engg Sem II.. etc..
Student is in class;
Class has a defined group of subjects;
Group consists of multiple subjects.
Class and Subjects, 2 entities depend on same SubjectGroup entity. So isn't this a ternary relationship ?
I've made this image to make picture clear.
[ P = Primary key; F = Foreign Key; Arrows do not mean anything of One-to-many/many to many etc.. they are just showing what referenced where]

I am stuck because I can not refer to GroupId two times.
How should I modify this structure ?
-
Thanks
| Database design help required | CC BY-SA 2.5 | null | 2011-01-19T19:32:05.827 | 2011-01-19T20:47:21.157 | null | null | 132,284 | [
"database-design",
"normalization"
]
|
4,739,746 | 1 | 4,739,771 | null | 3 | 1,843 | I'm having a SQL brainfart moment. I am trying to get a set of records when any of the attribute IDs for that product is a certain value.
Problem is, I need to get all other attributes for that same product along with it.
Here's an illustration for what I mean:

Is there a way to do that? Currently I am doing this
```
select product_id
from mytable
where product_attribute_id = 154
```
But I obviously only get the single record:

Any help would be greatly appreciated. My SQL skills are a bit basic.
There's one condition I forgot to mention. There are times where I need to be able to filter on two attribute IDs. For example, in the first image above, the lower set (product ID 31039) has attribute id 395. I would need to filter on 154, 395. The result would not include the top set (31046) which does not have an attribute id 395.
| MS SQL - Problem selecting a subset of records | CC BY-SA 2.5 | 0 | 2011-01-19T19:32:35.670 | 2011-01-19T21:50:36.763 | 2011-01-19T19:53:41.697 | 150,803 | 150,803 | [
"sql",
"sql-server",
"coldfusion"
]
|
4,739,801 | 1 | 4,740,671 | null | 7 | 10,065 | I am trying to display a UISplitViewController presenting it as a Modal View Controller in my iPad app. I manage to have it display, but for some reason there is a gap to the left of the modal view the size of a Status Bar which is also preserved when the orientation is changed.

Does anybody know why this is happening? Or if this is even possible? Maybe I'm just digging myself a huge hole.
| How to use a UISplitViewController as a Modal View Controller? | CC BY-SA 2.5 | 0 | 2011-01-19T19:36:58.257 | 2015-09-21T11:11:53.190 | 2011-01-19T20:52:47.397 | 117,792 | 117,792 | [
"ipad",
"ios",
"uisplitviewcontroller",
"modalviewcontroller"
]
|
4,739,962 | 1 | null | null | 0 | 484 | I'm in the early stages of creating a 2D game as a something to do in my spare time.
For this game I want to create destructible terrain and was hoping I can get some good ideas on the matter. I plan on using [Farseer Physics](http://farseerphysics.codeplex.com/) for some general physics such as boxes.
My problem is that I'm not sure how I should create the destructible terrain together with a physics engine.
My best idea so far is to keep a black and white image in memory where black represents some type of ground and then drawing and removing to this image as things change during the course of the game.
Then every time the image changes try to extract the vertexes of the edges with a certain distance between them and using them to create polygons in the physics engine.
Not quite sure how should I do this as the image can have multiple small islands of polygons and getting all of these out, or even figuring out where these islands are turns complex rather quickly.

| Extracting edges of a texture into an array for collision detection | CC BY-SA 3.0 | null | 2011-01-19T19:51:14.007 | 2011-11-21T09:06:47.800 | 2011-11-15T14:22:25.767 | 3,205 | 1,008,841 | [
"c#",
"xna",
"2d",
"farseer"
]
|
4,740,330 | 1 | 4,740,449 | null | 2 | 3,221 | My `css` file is not loading.
I have just installed apache2 with `php` on `ubuntu`. (Mysql server already installed.)
I have placed fresh download of cake `php` from official site. But when I am trying to access it, `CSS` file is not loaded.
Here is the screen shot.

| Cake php css load issue on apache2 | CC BY-SA 3.0 | 0 | 2011-01-19T20:28:23.720 | 2016-07-11T04:53:48.627 | 2016-07-11T04:53:48.627 | 6,280,781 | 179,855 | [
"cakephp",
"ubuntu",
"installation"
]
|
4,740,346 | 1 | null | null | 3 | 138 | Need some help with making the following layout work in IE:

Light gray is a browser window. Dark gray is the main content area, centered against the window. To its left is a fixed width yellow box, and to its right is a width green box. The yellow+blue+green triplet is then repeated down to the bottom (it's basically a simple blog layout).
I got this working in Firefox/Chrome by using negative margin-left and floating all three colored boxes. The IE does not understand it. Tried padding dark gray area on both sides by the width of the yellow box (and then do the overflow: visible, white-space: nowrap in the green box) - still no go.
Any ideas or pointers? What the hell the IE understand?
Thanks
| Help making the HTML/CSS layout work in IE | CC BY-SA 2.5 | null | 2011-01-19T20:30:07.343 | 2011-01-20T14:40:37.950 | null | null | 456,788 | [
"html",
"css",
"internet-explorer",
"layout"
]
|
4,740,558 | 1 | 4,740,790 | null | 2 | 1,079 | I'm trying to figure out if it's possible to use different row templates for specific rows in an NSPredicateEditor (or, if need be, an NSRuleEditor). I've got a screenshot that I think helps me explain this more clearly.

In this contrived example, I only want people to generate a filter that looks for a specific path above a certain size. So, in Section A (the Any block), users can only specify path rules (and the users can add additional paths). In section B, I only want the Size option to be available.
Nothing's jumping out at me from the docs (or, the stuff that does jump out at me ends up being something else), but it seems like this is the sort of thing that might come in handy, which makes me think it might be possible.
| Distinct Row Templates for NSPredicateEditor/NSRuleEditor rows | CC BY-SA 2.5 | null | 2011-01-19T20:47:45.467 | 2011-01-19T21:09:19.183 | null | null | 24,168 | [
"objective-c",
"cocoa",
"nspredicate",
"nspredicateeditor"
]
|
4,740,572 | 1 | 4,742,025 | null | 0 | 178 | what is the best way to have JFrames, JDialogs, etc that derive from a common parent but differ some, to be able to have the common parts update automatically when the parent does, but also have new components which are still easily modified in a GUI builder.
One approach I have used before is having placeholder JPanels that populate with existing isolated components at runtime, but I suspect that this is not the best way.
Example frame visual inheritence:

| reusing components in inherited Frame while maintaining GUI builder usage | CC BY-SA 2.5 | null | 2011-01-19T20:48:27.727 | 2011-01-19T23:35:15.650 | null | null | 215,887 | [
"java",
"swing",
"visual-inheritance"
]
|
4,741,300 | 1 | 4,749,394 | null | 0 | 55 | I was wondering if there is a 3rd party control that allows something like this.

highly appreciated,
Kave
| Where do I find a Silverlight browsing-control like this? | CC BY-SA 2.5 | null | 2011-01-19T22:00:58.253 | 2011-01-20T16:00:25.293 | null | null | 92,153 | [
"silverlight"
]
|
4,741,563 | 1 | null | null | 2 | 305 | With most modern browsers is easy to create rounded corners in CSS, so I was wondering if its posible to create a rounded corner that bend outwards or if I still need to fire up PhotoShop for creating such an effect.
The bottom foot in "" from the picture below demonstrates what I am trying to do with CSS:

: I am unsure if is the correct word for this (which have made googling it hard) so if anyone knows the real (or better) term then please let me know and I will update the question accordingly.
| CSS: Howto Create Tab Foot? | CC BY-SA 2.5 | null | 2011-01-19T22:31:20.113 | 2011-01-23T07:03:37.963 | 2011-01-23T07:03:37.963 | 231,211 | 231,211 | [
"css",
"photoshop",
"rounded-corners"
]
|
4,741,671 | 1 | 4,914,580 | null | 2 | 1,981 | I'm working with an Expandable List, like this:

The Expandable list activity has a method called "OnGroupExpand" which allows you to perform some work before the parent expands and it's children are exposed.
In my case, I want to attach a checkChangeHandler to each child's checkbox so that when it's clicked, I can mark the child as complete. I have the list showing up and the children show when the parent expands, but my check box does nothing.
Then, I try to add checkbox handlers dynamically in the "onGroupExpand" method. However, when onGroupExpand is triggered when trying to get a reference to each child view.
```
public void onGroupExpand (int groupPosition) {
int numOfChildren = expListAdapter.getChildrenCount(groupPosition);
for(int i = 0; i < numOfChildren; i++)
{
//Get exception here because getChild() returns Object - but how else can
//can I attach a check box to each child?
View v = (View) expListAdapter.getChild(groupPosition, i);
CheckBox cb = (CheckBox)v.findViewById( R.id.checkComplete );
cb.setOnCheckedChangeListener(new OnCheckedChangeListener(){
public void onCheckedChanged(CompoundButton arg0, boolean arg1) {
Toast.makeText(getBaseContext(), "Check Changed for " + groupPosition, 2000);
}
});
}
```
My primary question is about getting a reference to the Child view so that I can attach a handler dynamically. Please see the code comment where I'm trying to do this.
Thanks for your time...
| Working with children in ExpandableListActivity | CC BY-SA 2.5 | 0 | 2011-01-19T22:43:49.200 | 2011-02-06T21:47:57.323 | 2011-02-06T16:24:28.477 | 462,307 | 462,307 | [
"android"
]
|
4,741,861 | 1 | 4,742,239 | null | 2 | 215 | I'm importing an RSS feed from Tumblr into a Kynetx app. It appears that the RSS feed has some encoding issues, as apostrophes appear like this:

The feed (which you can find [here](http://instancevariable.tumblr.com/rss)) claims to be encoded in UTF-8.
Is there a way to specify the encoding or else replace those characters with regular apostrophes?
| KRL RSS parser: Handle encoding issues? | CC BY-SA 2.5 | null | 2011-01-19T23:08:26.573 | 2011-01-20T00:16:36.127 | null | null | 191,521 | [
"character-encoding",
"krl"
]
|
4,741,863 | 1 | 4,741,972 | null | 1 | 414 | Surfing the net I ran into [Aquabrowser](http://www.serialssolutions.com/aquabrowser/) (no need to click, I'll post a pic of the relevant part).
It has a nice way of presenting search results and discovering semantically linked entities.
Here is a screenshot taken from [one](http://aqua.santacruzpl.org/) of the [demos](http://www.serialssolutions.com/aquabrowser-demos/).
On the left side you have they word you typed and related words.
Clicking them refines your results.

Now as an example project I have a data set of film entities and subjects (like wolrd-war-2 or prison-escape) and their relations.
Now I imagine several use cases, first where a user starts with a keyword.
For example "world war 2".
Then i would somehow like to calculate related keywords and rank them.
I think about some sql query like this:
Lets assume "world war 2" has id 3.
```
select keywordId, count(keywordId) as total from keywordRelations
WHERE movieId IN (select movieId from keywordRelations
join movies using (movieId)
where keywordId=3)
group by keywordId order by total desc
```
which basically should select all movies which also have the keyword world-war-2 and then looks up the keywords which theese films have as well and selects those which occour the most.
I think with theese keywords I can select movies which match best and have a nice tag cloud containing similar movies and related keywords.
I think this should work but its very, very, very inefficient.
And its also only one level or relation.
There must be a better way to do this, but how??
I basically have an collection of entities. They could be different entities (movies, actors, subjects, plot-keywords) etc.
I also have relations between them.
It must somehow be possible to efficiently calculate "semantic distance" for entities.
I also would like to implement more levels of relation.
But I am totally stuck. Well I have tried different approaches but everything ends up in some algorithms that take ages to calculate and the runtime grows exponentially.
Are there any database systems available optimized for that?
Can someone point me in the right direction?
| How to efficiently build and store semantic graph? | CC BY-SA 2.5 | null | 2011-01-19T23:08:49.367 | 2011-01-20T00:36:18.683 | 2011-01-19T23:38:14.837 | 513,838 | 413,910 | [
"sql",
"mysql",
"database",
"algorithm",
"semantics"
]
|
4,742,143 | 1 | 4,983,626 | null | 6 | 4,350 | I'm working on a project that has me approximating text rendered as an image and a DHTML editor for the text. The images are rendered using the .NET 4 DrawingContext object's DrawText method.
The DrawText method will take text along with font information as well as dimensions and calculate the wrapping necessary to get the text to fit as much as possible, placing an ellipsis at the end if the text is too long. So, if I have the following code to draw text in a Rectangle it will abbrevaiate it:
```
string longText = @"A choice of five engines, although the 2-liter turbo diesel, supposedly good for 48 m.p.g. highway, is not coming to America, at least for now. A 300-horsepower supercharged gasoline engine will likely be the first offered in the United States. All models will use start-stop technology, and fuel consumption will decrease by an average of 19 percent across the A6 lineup. A 245-horsepower A6 hybrid was also unveiled, but no decision has yet been made as to its North America sales prospects. Figure later in 2012, if sufficient demand is detected.";
var drawing = new DrawingGroup();
using (var context = drawing.Open())
{
var text = new FormattedText(longText,
CultureInfo.CurrentCulture,
FlowDirection.LeftToRight,
new Typeface("Calibri"),
30,
Brushes.Green);
text.MaxTextHeight = myRect.Height;
text.MaxTextWidth = myRect.Width;
context.DrawText(text, new Point(0, 0));
}
var db = new DrawingBrush(drawing);
db.Stretch = Stretch.None;
myRect.Fill = db;
```
Is there a way to calculate how the text will be wrapped? In this example, the outputted text is wrapped at "2-liter" and "48 m.p.g" etc as seen in the image below:

| Calculating Text Wrapping in the .NET DrawingContext DrawText method | CC BY-SA 2.5 | 0 | 2011-01-19T23:57:59.050 | 2011-02-13T10:30:09.850 | null | null | 64 | [
"c#",
"text",
"system.drawing"
]
|
4,742,565 | 1 | null | null | 1 | 176 | I'm accustomed to writing desktop applications in C#.NET. Where I have a nice little solution folder which is also under version control. So at any time, on any computer I can check out whatever version of my software I want run the compiler and have a working copy of my program.
Now I'm looking into developing websites, where the files and data are a lot more dispersed. I'm using ASP.NET, but really my question is more general and could apply to any website framework.
I'm trying to understand the proper work-flow between developing my website, a version control server, and the actual live website that users will see. Obviously this can vary a lot depending on the type and scale of the website, but I'm only considering a pretty simple site. I'm just getting started with this stuff.
The diagram below shows my current idea. All the source files for the site would be stored on a subversion server, which I would check out onto my local computer. My local computer would have a local database which I would use for development of the site. Next I would publish to a test version on my hosted server, which would point to a separate test database. This test database may periodically be replaced by a copy of the live database.
If all goes well I would then publish to a beta version of the site which points to the live data. Users could then check out the beta version to provide feedback. Finally if there are still no problems the source files for the live site would be updated.

Does this make sense? Does anyone have any comments on how this could be improved? Are there any good books or online tutorials available on developing these kind of workflows?
Also the one thing that I'm really not sure about is how to manage changes to the actual schema of the database. I figure with each version I could generate a SQL script that can be use to update the Test and Live databases on the host. However, I'd also like to be able to easily setup a new database for any version of my site with out having to run every update SQL script for every version up to the desired version. Is the best solution to use an ORM like NHibernate or Subsonic so I could always generate my database schema directly from my code?
| How do I learn how to create/deploy/administer a website? | CC BY-SA 2.5 | 0 | 2011-01-20T01:17:27.700 | 2011-01-20T20:43:54.157 | null | null | 88,427 | [
"asp.net",
"web",
"workflow"
]
|
4,742,773 | 1 | 4,749,555 | null | 9 | 2,723 | What I want is to take a filled rectangle and punch a hole in it using another shape. This is exactly the kind of thing that `NSBezierPath` is designed for. You add a rectangular path, then add the subpath that will "punch" through it and finally fill it. In my case the subpath is actually text. No problem, works great:

Except when I use Helvetica Neue Bold for my font. When I use that, I just end up with a solid blue rectangle without any text at all. But the subpath is indeed drawing--in fact, if I shrink the filled rectangle a bit, you can actually see some of the text path:

I get the same behavior with Helvetica Neue Italic. Helvetica Neue Medium works fine, as does Helvetica Bold, Times New Roman Bold and Arial Bold.
I've tried using both `NSEvenOddWindingRule` and `NSNonZeroWindingRule`. (: Apparently I didn't really try `NSEvenOddWinding` rule, because that does turn out to work after all)
This is the code that I'm using inside the `drawRect` method of my `NSView` subclass.
```
NSLayoutManager *layoutManger = [[[NSLayoutManager alloc] init] autorelease];
NSTextContainer *textContainer = [[[NSTextContainer alloc]
initWithContainerSize:NSMakeSize(300, 100)] autorelease];
NSFont *font = [NSFont fontWithName:@"Helvetica Neue Bold" size:100];
NSDictionary *textAttribs = [NSDictionary dictionaryWithObjectsAndKeys:
font, NSFontAttributeName, nil];
NSTextStorage *textStorage = [[[NSTextStorage alloc] initWithString:@"Hello"
attributes:textAttribs] autorelease];
[layoutManger addTextContainer:textContainer];
[layoutManger setTextStorage:textStorage];
NSRange glyphRange = [layoutManger glyphRangeForTextContainer:textContainer];
NSGlyph glyphArray[glyphRange.length];
NSUInteger glyphCount = [layoutManger getGlyphs:glyphArray range:glyphRange];
NSBezierPath *path = [NSBezierPath bezierPathWithRect:NSMakeRect(0, 0, 200, 100)];
[path appendBezierPathWithGlyphs:glyphArray count:glyphCount inFont:font];
[[NSColor blueColor] setFill];
[path fill];
```
So what's going on here? Why do some fonts behave differently than others when it comes to adding glyphs to a path?
: The solution is to use `NSEvenOddWindingRule`. After the creation of `path` add this line:
```
[path setWindingRule:NSEvenOddWindingRule];
```
Peter Hosey's answer provides the explanation of why this is.
| Why won't Helvetica Neue Bold glyphs draw as a normal subpath in NSBezierPath? | CC BY-SA 2.5 | null | 2011-01-20T01:55:50.643 | 2011-01-21T21:54:41.353 | 2011-01-21T21:54:41.353 | 459,668 | 459,668 | [
"objective-c",
"cocoa",
"fonts",
"core-graphics",
"typography"
]
|
4,742,884 | 1 | 5,379,314 | null | 0 | 482 | I have a main window controller which is a NSWindowController (golden rectangle) with a scrollview(blue rectangle), as well as a subview controlled by a NSViewController (yellow rectangle).
Depending on user selection, the respective nib file will be loaded into the subview via the NSViewController.
Unfortunately due to design limitations, the scroll view will be hidden or unhidden according to the user actions. This scroll view unfortunately has to overlap the view.
One of the views is also a qtmovielayer, so I have layer backed the main window controller and all the elements. Layer backing managed to get the scrollview to appear in front of the qtmovielayer.
When it all works great, it looks like the image on the left. however, 1/5 times when I start the app, the scroll view appears the subview as shown on the right. I've been trying and searching for about a week and a half now as to why this is happening, and I'm going bald from tearing and pulling at my hair.
The only resources that I could find on the net is setting the layer z position, but the problem still persists.
If anyone has any idea on why this is happening or how to solve this will be greatly appreciated.

| CALayer and view controller views overlap intermittent problems | CC BY-SA 2.5 | null | 2011-01-20T02:19:21.810 | 2011-03-21T14:49:18.707 | null | null | 376,209 | [
"objective-c",
"cocoa",
"macos",
"core-animation",
"calayer"
]
|
4,742,901 | 1 | 4,743,671 | null | 2 | 1,169 | Im trying to get a text to appear as though it is too big for the containing box that it is in.
It is a bit hard to describe so here is a picture i made.

I want to try to get around making images for them, but i could if its not possible with css.
I have a scenario setup with jsfiddle, even though there isnt any js involved. Its a useful tool :]
[http://jsfiddle.net/Lv2EE/](http://jsfiddle.net/Lv2EE/)
I tried to do some fancy positioning where the `<span>` tag would be positioned under the `<h4>` but that didnt work because the H4 collapses when i did that.
any ideas?
| make text bigger than containing box - css | CC BY-SA 2.5 | null | 2011-01-20T02:24:17.417 | 2011-01-20T05:14:23.013 | 2011-01-20T02:39:22.080 | 574,923 | 574,923 | [
"css",
"xhtml",
"positioning"
]
|
4,742,918 | 1 | 4,743,151 | null | 0 | 125 | In iTunes 10 Apple switched to a taller table header with a slightly different visual appearance, where the column dividers don't reach the top of the row, and certain cells have extended sorting functionality when clicked.
Here is what i'm refering to:

Are these a custom control created specifically for iTunes or can they be uses by other applications?
| How are the new taller table header rows with extra sorting functionality in iTunes implemented? | CC BY-SA 2.5 | null | 2011-01-20T02:26:55.183 | 2011-01-20T03:24:50.473 | 2011-01-20T03:12:09.890 | 115,730 | 582,312 | [
"cocoa",
"sorting",
"nstableview",
"nstablecolumn"
]
|
4,742,990 | 1 | 4,743,144 | null | 0 | 305 | I'm trying to debug an application that compares up to 9 numbers in a certain way. It's working great for up to 4 or more numbers but once you try an run 3 or less it starts returning a NaN error where it should be returning a zero.
I'm working through the console and ~20% of the numbers are highlighted in red. Before I get to checking the code here I wanted to see what the red vs black numbers mean and if that applies to what I'm looking for. I don't think it applies because when the application is working correctly as I go through the debugger some of the numbers are still red. However I still would like to learn.
If it's something obvious I apologize because I'm both starting out and just letting Xcode do the memory management.
Thanks in advance!
Graham
** Edit
I'm not too worried about debugging right now, I want to give it an honest college try before I come back for help but the error is coming when I use a combination of 5000/3000/5500. It's not limited to that specific arrangement and I have it narrowed down to one of my functions.
As shown it is giving me the correct number in the +/- which is the end and I've run about 10 scenario's that are all correct as long as there is more than 4 stacks.
As asked it is in the test phase and I should have mentioned that it was my variables that are colored.

| Cocoa app, Xcode Console - Red Numbers | CC BY-SA 2.5 | null | 2011-01-20T02:43:52.683 | 2011-01-20T15:47:32.740 | 2011-01-20T15:47:32.740 | 30,461 | 568,552 | [
"xcode",
"debugging"
]
|
4,743,261 | 1 | 4,743,357 | null | 4 | 1,421 | Greetings,
I am trying to make a simple fade in / fade out DIV with text for each button on a navigation bar using jQuery and I'm running into some problems. Here is a screenshot of what I am trying to do:

Basically, when the user hovers over an item on the nav bar, a div appears below the navigation with text related to that button. The markup I have come up with so far is horrendous and I know it is not the correct way to go about this, I also attempted using an array and filling the info div with text from the nav button's title attribute - the latter worked great but then a title also appears.
Apart from being too complex, it does work.. to a point. If the user hovers in and out of the nav bar rapidly it causes the whole thing to flash on and off (without using :hidden and :visible) or does not appear if :hidden and :visible are used.
Here is the current markup:
```
#header-info-text {
width: 480px;
text-align: right;
float: right;
margin-right: 20px;
padding-right: 25px;
background: url('/images/info-arrow.png') top right no-repeat transparent scroll;
color: #fff;
display: none;
}
```
```
<div id="navBar">
<ul>
<li class="nav-first nav-active"><a href="#">Home</a></li>
<li id="navAbout"><a href="#">About</a></li>
<li id="navPort"><a href="#">Portfolio</a></li>
<li id="navServ"><a href="#">Services</a></li>
<li id="navBlog"><a href="#">Blog</a></li>
<li id="navContact" class="nav-last"><a href="#">Contact</a></li>
</ul>
</div>
<div id="header-infoDIV">
<span id="header-info-text"></span>
</div>
```
```
$("#navBar ul li").hover(function() {
var text;
var id = $(this).attr('id');
if (id == 'navAbout') {
text = 'Learn more ..';
} else if (id == 'navPort') {
text = 'View our recent work and ongoing projects';
} else if (id == 'navServ') {
text = 'Learn about our services';
} else if (id == 'navBlog') {
text = 'View the our Blog';
} else if (id == 'navContact') {
text = 'We\'re looking forward to working with you!';
} else {
text = '';
}
$("#header-info-text").text(text);
$("#header-info-text:hidden").fadeIn('slow');
});
$("#navBar ul").hover(function() {
$("#header-info-text:hidden").fadeIn('slow');
}, function() {
$("#header-info-text:visible").delay(500).fadeOut('slow');
});
```
What is the best way to tackle this sort of thing? Basically, I want to fade in the info text's DIV, change its text when the user moves to another button, and hide it when they move out of the nav bar.
Thanks!
```
$("#navBar ul").hover(function() {
$("#header-info-text").stop(true,true).fadeIn('slow');
}, function() {
$("#header-info-text").stop(true,true).delay(500).fadeOut('slow');
});
```
Thanks to mVChr's suggestion, the code has been reduced to a few lines. Combined with the suggestion provided by jmans, it's doing what I wanted it to:
```
$("#navBar ul li a").hover(function() {
var text = $(this).attr('rel');
$("#header-info-text").text(text);
$("#header-info-text").stop(true,true).fadeIn('slow');
},
function() {
$("#header-info-text").stop(true,true).delay(500).fadeOut('slow');
});
```
| Fading a DIV In and Out Based on Nav Bar | CC BY-SA 2.5 | null | 2011-01-20T03:49:39.467 | 2011-01-20T14:45:40.727 | 2011-01-20T14:45:40.727 | 321,597 | 321,597 | [
"jquery",
"jquery-hover"
]
|
4,743,325 | 1 | 4,743,825 | null | 1 | 3,010 | I've merged the XML [Encryption](http://msdn.microsoft.com/en-us/library/ms229746.aspx) and [Decryption](http://msdn.microsoft.com/en-us/library/ms229919.aspx) from MSDN into the same project below, and am getting the error
> "Unable to retrieve the decryption
key".

The strangest thing is that I am able to write the private key before and after the exception, so I'm unsure of what the issue may be. The merged code is below.
```
public static void Encrypt(XmlDocument Doc, string ElementToEncrypt, string EncryptionElementID, RSA Alg, string KeyName)
{
// Check the arguments.
if (Doc == null)
throw new ArgumentNullException("Doc");
if (ElementToEncrypt == null)
throw new ArgumentNullException("ElementToEncrypt");
if (EncryptionElementID == null)
throw new ArgumentNullException("EncryptionElementID");
if (Alg == null)
throw new ArgumentNullException("Alg");
if (KeyName == null)
throw new ArgumentNullException("KeyName");
////////////////////////////////////////////////
// Find the specified element in the XmlDocument
// object and create a new XmlElemnt object.
////////////////////////////////////////////////
XmlElement elementToEncrypt = Doc.GetElementsByTagName(ElementToEncrypt)[0] as XmlElement;
// Throw an XmlException if the element was not found.
if (elementToEncrypt == null)
{
throw new XmlException("The specified element was not found");
}
RijndaelManaged sessionKey = null;
try
{
//////////////////////////////////////////////////
// Create a new instance of the EncryptedXml class
// and use it to encrypt the XmlElement with the
// a new random symmetric key.
//////////////////////////////////////////////////
// Create a 256 bit Rijndael key.
sessionKey = new RijndaelManaged();
sessionKey.KeySize = 256;
EncryptedXml eXml = new EncryptedXml();
byte[] encryptedElement = eXml.EncryptData(elementToEncrypt, sessionKey, false);
////////////////////////////////////////////////
// Construct an EncryptedData object and populate
// it with the desired encryption information.
////////////////////////////////////////////////
EncryptedData edElement = new EncryptedData();
edElement.Type = EncryptedXml.XmlEncElementUrl;
edElement.Id = EncryptionElementID;
// Create an EncryptionMethod element so that the
// receiver knows which algorithm to use for decryption.
edElement.EncryptionMethod = new EncryptionMethod(EncryptedXml.XmlEncAES256Url);
// Encrypt the session key and add it to an EncryptedKey element.
EncryptedKey ek = new EncryptedKey();
byte[] encryptedKey = EncryptedXml.EncryptKey(sessionKey.Key, Alg, false);
ek.CipherData = new CipherData(encryptedKey);
ek.EncryptionMethod = new EncryptionMethod(EncryptedXml.XmlEncRSA15Url);
// Create a new DataReference element
// for the KeyInfo element. This optional
// element specifies which EncryptedData
// uses this key. An XML document can have
// multiple EncryptedData elements that use
// different keys.
DataReference dRef = new DataReference();
// Specify the EncryptedData URI.
dRef.Uri = "#" + EncryptionElementID;
// Add the DataReference to the EncryptedKey.
ek.AddReference(dRef);
// Add the encrypted key to the
// EncryptedData object.
edElement.KeyInfo.AddClause(new KeyInfoEncryptedKey(ek));
// Set the KeyInfo element to specify the
// name of the RSA key.
// Create a new KeyInfo element.
edElement.KeyInfo = new KeyInfo();
// Create a new KeyInfoName element.
KeyInfoName kin = new KeyInfoName();
// Specify a name for the key.
kin.Value = KeyName;
// Add the KeyInfoName element to the
// EncryptedKey object.
ek.KeyInfo.AddClause(kin);
// Add the encrypted element data to the
// EncryptedData object.
edElement.CipherData.CipherValue = encryptedElement;
////////////////////////////////////////////////////
// Replace the element from the original XmlDocument
// object with the EncryptedData element.
////////////////////////////////////////////////////
EncryptedXml.ReplaceElement(elementToEncrypt, edElement, false);
}
catch (Exception e)
{
// re-throw the exception.
throw e;
}
finally
{
if (sessionKey != null)
{
sessionKey.Clear();
}
}
}
public static void Decrypt(XmlDocument Doc, RSA Alg, string KeyName)
{
// Check the arguments.
if (Doc == null)
throw new ArgumentNullException("Doc");
if (Alg == null)
throw new ArgumentNullException("Alg");
if (KeyName == null)
throw new ArgumentNullException("KeyName");
// Create a new EncryptedXml object.
EncryptedXml exml = new EncryptedXml(Doc);
// Add a key-name mapping.
// This method can only decrypt documents
// that present the specified key name.
exml.AddKeyNameMapping(KeyName, Alg);
// Decrypt the element throws Exception: <--------------
//
// Unable to retrieve the decryption key".
//
exml.DecryptDocument();
}
static void Main(string[] args)
{
string containerName = "XML_ENC_RSA_KEY";
////////////////////////////////////////////////////////
// Create and persist a key pair
// Save the Public portion of the keypair in a string we will use later
// Create a new CspParameters object to specify
// a key container.
CspParameters cspParams = new CspParameters();
cspParams.KeyContainerName = containerName;
// Create a new RSA key and save it in the container. This key will encrypt
// a symmetric key, which will then be encryped in the XML document.
RSACryptoServiceProvider rsaKey = new RSACryptoServiceProvider(cspParams);
rsaKey.PersistKeyInCsp = true;
Console.WriteLine(rsaKey.ToXmlString(false));
string PublicKeyTest = rsaKey.ToXmlString(false);
////////////////////////////////////////////////////////
// Encrypt using a new instance of the crypto provider and the public key string
Console.WriteLine();
Console.WriteLine();
Console.WriteLine();
var rsaKey2 = new RSACryptoServiceProvider();
rsaKey2.FromXmlString(PublicKeyTest);
Console.WriteLine(rsaKey2.ToXmlString(false));
PublicKeyTest = rsaKey2.ToXmlString(false);
// Create an XmlDocument object.
XmlDocument xmlDoc = new XmlDocument();
// Load an XML file into the XmlDocument object.
try
{
xmlDoc.PreserveWhitespace = true;
xmlDoc.Load("test.xml");
}
catch (Exception e)
{
Console.WriteLine(e.Message);
}
try
{
// Encrypt the "creditcard" element.
Encrypt(xmlDoc, "creditcard", "EncryptedElement1", rsaKey2, "rsaKey");
// Save the XML document.
xmlDoc.Save("testOUT.xml");
// Display the encrypted XML to the console.
Console.WriteLine("Encrypted XML:");
Console.WriteLine();
Console.WriteLine(xmlDoc.OuterXml);
}
catch (Exception e)
{
Console.WriteLine(e.Message);
}
finally
{
// Clear the RSA key.
rsaKey2.Clear();
}
Console.ReadLine();
////////////////////////////////////////////////////////
// Decrypt the output, using the internal CSP
xmlDoc = new XmlDocument();
// Load an XML file into the XmlDocument object.
try
{
xmlDoc.PreserveWhitespace = true;
xmlDoc.Load("testOUT.xml");
}
catch (Exception e)
{
Console.WriteLine(e.Message);
}
cspParams = new CspParameters();
cspParams.KeyContainerName = containerName;
// Get the RSA key from the key container. This key will decrypt
// a symmetric key that was imbedded in the XML document.
var rsaKey3 = new RSACryptoServiceProvider(cspParams);
Console.WriteLine(rsaKey3.ToXmlString(true));
try
{
// Decrypt the elements, throws exception
Decrypt(xmlDoc, rsaKey3, "rsaKey");
// Save the XML document.
xmlDoc.Save("test3.xml");
// Display the encrypted XML to the console.
Console.WriteLine();
Console.WriteLine("Decrypted XML:");
Console.WriteLine();
Console.WriteLine(xmlDoc.OuterXml);
}
catch (Exception e)
{
Console.WriteLine(e.Message);
}
finally
{
}
Console.ReadLine();
```
Full exception (e)
> System.Security.Cryptography.CryptographicException:
Unable to retrieve the decryption key.
at
System.Security.Cryptography.Xml.EncryptedXml.DecryptDocument()
at RemoteKey.Decrypt(XmlDocument Doc,
RSA Alg, String KeyName) in
C:\Users\me\ClientAgent\Program.cs:line
185 at RemoteKey.Main(String[]
args) in
C:\Users\Me\ClientAgent\Program.cs:line
286
| What is incorrect from this All-In-One XML encryption/decryption MSDN sample? | CC BY-SA 2.5 | null | 2011-01-20T04:05:05.987 | 2011-01-20T05:42:04.983 | 2011-01-20T04:38:35.790 | 328,397 | 328,397 | [
"c#",
"xml",
"encryption",
"rsa",
"encryption-asymmetric"
]
|
4,743,804 | 1 | 4,953,434 | null | 1 | 6,494 | I have problem removing rows from a table according to the checkbox. Below is the screen shot for what I do. It's a table for air flight details.

The maximum row can be added is 15 rows. What I want to do is to give the user access to delete which particular flight or just delete all, by selecting all checkbox and press Delete Row.
The following is the jquery that use to handle this:
```
$("input[id$='_del_flight']").click(function() {
var n = $("#" + this.id.slice(0,1) + "_airline_table tr").length;
$("#" + this.id.slice(0,1) + "_airline_table tr").each(function(){
if ( $("input[type=checkbox]",this).is(':checked') ) {
if ( n > 2 ) {
$(this).remove();
n--;
//alert("Value n-- is: " + n);
} else {
$(this).find("input").val('');
$(this).find("input[type=checkbox]").removeAttr("checked");
$(this).find('option:first').attr('selected', 'selected').parent('select');
}
}
});
});
```
This jquery does what I want very well. The user can select any particular flight details and delete them, or the user can delete them all.
However, when the user decides to delete them all, the jquery I have will delete the row start from row number 2 (where shown is the figure above is Flight 1). I need to come up with another way where the row MUST be deleted from the last row, which is Flight 15, then Flight 14, Flight 13 and so on. I will keep the row number 2 (used by Flight 1) by making all inputs value empty for this row.
I did try use jquery :gt selectors, it does not work like what I want. So if someone out there can help me to delete the row from the very last row (for delete all) and keep the feature where the user can delete particular flight based on the user selection, I would really appreciate it.
Thank you so much for your help.
| Remove Table Row in JQuery | CC BY-SA 2.5 | null | 2011-01-20T05:39:11.197 | 2011-02-10T04:37:52.860 | 2011-01-20T05:58:08.747 | 444,049 | 444,049 | [
"jquery",
"jquery-selectors"
]
|
4,743,973 | 1 | 4,744,024 | null | 2 | 148 | Sorry for the stupid question, but I'm not sure what the name of this Mac OS X Cocoa user interface element is (the modal container that up in a window). Thanks!

| What is the name of this modal interface element? | CC BY-SA 2.5 | 0 | 2011-01-20T06:04:53.897 | 2017-05-13T23:39:29.133 | 2017-05-13T23:39:29.133 | 2,370,483 | 259,900 | [
"macos",
"cocoa"
]
|
4,744,169 | 1 | 4,745,075 | null | 6 | 10,862 | In an iPhone Application, I just write one line to get the complete path for a specific file ( as below ).
```
NSString *strPath=[[NSBundle mainBundle] pathForResource:@"myjavascript" ofType:@"js"];
```
My question is How to get the complete path for a specific file which is located under .
Sample Image.

| How to determine the Absolute path for specific file from Assets? | CC BY-SA 3.0 | 0 | 2011-01-20T06:38:08.477 | 2014-12-21T11:27:14.443 | 2014-12-21T11:27:14.443 | 608,639 | 140,765 | [
"javascript",
"android",
"android-assets"
]
|
4,744,380 | 1 | 4,803,658 | null | 13 | 466 | My query has a join, and it looks like it's using two indexes which makes it more complicated. I'm not sure if I can improve on this, but I thought I'd ask.
The query produces a list of records with similar keywords the record being queried.
Here's my query.
```
SELECT match_keywords.padid,
COUNT(match_keywords.word) AS matching_words
FROM keywords current_program_keywords
INNER JOIN keywords match_keywords
ON match_keywords.word = current_program_keywords.word
WHERE match_keywords.word IS NOT NULL
AND current_program_keywords.padid = 25695
GROUP BY match_keywords.padid
ORDER BY matching_words DESC
LIMIT 0, 11
```
The EXPLAIN

Word is varchar(40).
| I'm not sure if I have the correct indexes or if I can improve the speed of my query in MySQL? | CC BY-SA 2.5 | 0 | 2011-01-20T07:09:37.600 | 2011-03-28T23:12:36.670 | 2011-03-28T23:12:36.670 | 63,550 | 450,456 | [
"mysql",
"sql",
"query-optimization"
]
|
4,744,466 | 1 | 4,747,737 | null | 13 | 21,524 | Can I improve my design on these 2 diagrams below? If so, how?
I am confused by the use of association classes in my diagrams. Should I use them?
Figure 1

---
Figure 2

| When to use UML Association Classes? | CC BY-SA 3.0 | 0 | 2011-01-20T07:22:44.900 | 2013-10-10T21:12:56.513 | 2013-10-10T21:12:56.513 | 283,084 | 499,714 | [
"uml",
"class-diagram",
"erd"
]
|
4,744,849 | 1 | 4,744,918 | null | 1 | 2,836 | I have searched the forums, but none of the solutions proposed cured
my problem.
I cannot compile my project.
I get this error, followed by :
```
Description Resource Path Location Type
Project 'videothumb' is missing required source folder: 'gen' videothumb Build path
Build Path Problem
The project cannot be built until build path errors are resolved videothumb Unknown
Java Problem
Unable to resolve target 'android-5' until the SDK is loaded. MojoGBAMulti Unknown
Android Target Problem
Unable to resolve target 'android-5' until the SDK is loaded. MojoGBAMulti Unknown
Android Target Problem
R cannot be resolved image.java /ImageThumbnailsActivity/src/image/Thumbnailsline27
Java Problem
R cannot be resolved image.java /ImageThumbnailsActivity/src/image/Thumbnailsline36
Java Problem
R cannot be resolved MediaPlayerDemo.java /Media/src/media/media line49 Java Problem
R cannot be resolved MediaPlayerDemo.java /Media/src/media/media line50 Java Problem
R cannot be resolved MediaPlayerDemo.java /Media/src/media/media line52 Java Problem
R cannot be resolved MediaPlayerDemo.java /Media/src/media/media line56 Java Problem
R cannot be resolved MediaPlayerDemo_Audio.java /Media/src/media/media line80
Java Problem
R cannot be resolved MediaPlayerDemo_Video.java /Media/src/media/media line106
Java Problem
R cannot be resolved MediaPlayerDemo_Video.java /Media/src/media/media line107
Java Problem
R cannot be resolved MediaPlayerDemo_Video.java /Media/src/media/media line112
Java Problem
R cannot be resolved MediaPlayerDemo_Video.java /Media/src/media/media line114
Java Problem
R cannot be resolved MediaPlayerDemo_Video.java /Media/src/media/media line116
Java Problem
R cannot be resolved MediaPlayerDemo_Video.java /Media/src/media/media line118
Java Problem
R cannot be resolved MediaPlayerDemo_Video.java /Media/src/media/media line120
Java Problem
R cannot be resolved videothumb.java /Media/src/media/media line 26 Java Problem
R cannot be resolved videothumb.java /Media/src/media/media line 41 Java Problem
```
Something is definitively going wrong here.
Can you help me? I am stuck...
new for android application....







| error messages i do not understand during a build of android project | CC BY-SA 2.5 | null | 2011-01-20T08:25:06.113 | 2011-04-12T11:57:38.080 | 2011-01-20T09:15:59.887 | 486,554 | 486,554 | [
"android",
"build",
"path"
]
|
4,745,181 | 1 | 4,745,280 | null | 6 | 5,641 | I implemented internationalization into my JSF app as described [here](http://jdevelopment.nl/java/internationalization-jsf-utf8-encoded-properties-files/).
But I encountered a problem: When I change the locale all the texts on my page change. But then if I click a navigation-link to get to another page the locale jumps back to standard locale!
I think I miss something here. So I provide my code below and hope you can help:
```
@ManagedBean(name="locale")
@SessionScoped
public class LocaleBean {
private Locale locale = FacesContext.getCurrentInstance().getViewRoot().getLocale();
public Locale getLocale() {
return locale;
}
public void setLanguage(String language) {
locale = new Locale(language);
FacesContext.getCurrentInstance().getViewRoot().setLocale(locale);
}
public String getLanguage() {
return locale.getLanguage();
}
}
```
```
<h:outputText value=" #{text['common.language']}: " />
<h:selectOneMenu value="#{locale.language}" onchange="submit()">
<f:selectItem itemValue="de" itemLabel="Deutsch" />
<f:selectItem itemValue="en" itemLabel="English" />
</h:selectOneMenu>
```
```
<?xml version="1.0" encoding="UTF-8"?>
<faces-config
xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-facesconfig_2_0.xsd"
version="2.0">
<application>
<locale-config>
<default-locale>de</default-locale>
<supported-locale>en</supported-locale>
</locale-config>
<resource-bundle>
<base-name>org.dhbw.stg.wwi2008c.mopro.ui.text</base-name>
<var>text</var>
</resource-bundle>
</application>
</faces-config>
```
I then Text.java from the tutorial and only changed bundle-path.
Here my directory:

If something important is missing ask for it please.
| JSF setLocale doesn't work appropriately | CC BY-SA 3.0 | 0 | 2011-01-20T09:06:32.053 | 2012-02-21T14:22:32.100 | 2012-02-21T14:22:32.100 | 561,309 | 389,430 | [
"java",
"jsf",
"internationalization",
"jsf-2"
]
|
4,745,312 | 1 | 4,745,704 | null | 2 | 44 | I'm trying to improve my query, I'm doing a count of all the records which are in a specific category, I'm also doing a sum to count how many pages each category will need to show all of the records in that category.
I'm looking to improve the speed of the query. I'm not 100% sure if the join and indexes are the most efficient.
I've tried the LIMIT at 5 and it makes no difference.
Heres my query
```
SELECT PageBase, round((count(pads.padid) / 20) + 1) as totpages FROM
categories, pads WHERE pads.catid = categories.catid AND
`RemoveMeDate` = '2001-01-01 00:00:00' group by categories.catid LIMIT 50,50
```
Heres the explain

Heres the structure of the categories table
```
CREATE TABLE categories (
CatID int(11) NOT NULL DEFAULT '0',
NewASP text NOT NULL,
`Specific` text NOT NULL,
PageBase varchar(50) NOT NULL,
PRIMARY KEY (CatID),
KEY PageBase (PageBase)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
```
Heres the query running

| Mysql, need some advice about the join and indexes on my query, also have a round(count(field) / 20 +1) | CC BY-SA 2.5 | null | 2011-01-20T09:21:28.780 | 2011-01-20T10:34:37.710 | null | null | 450,456 | [
"sql",
"mysql",
"query-optimization"
]
|
4,745,325 | 1 | 4,745,379 | null | 18 | 37,302 | I produce a complex HTML summary report from data in a database which could be a summary of maybe 200,000 rows in the database. The user can click a link to request an Excel version.
When they do a JS script extracts the key components of the report and stuffs them into a form in a hidden iframe. This form submits to a server-side script which generates the Excel version of the report (without the graphics etc).
As the calculations for the report are complex and "costly" it makes sense not to run them again to create the Excel version as all the data is on the page already. Also the user may have customised the report once it is loaded and I can use JS to pass those preferences to the form as well so the Excel doc reflects them too.
The way I am doing this is to include the following for each component of the report that transfers to a row in the Excel version. I've hijacked an HTML tag that isn't otherwise used.
```
<code id="xl_row_211865_2_x" class="rowlabel">Musicals}{40%}{28.6%}{6</code>
```
The code element above is a summary of the row below in the HTML report which becomes one row in the Excel doc and includes the label and various data elements. There may be a thousand or more such elements in one report.

As the data contains text I've had to use something like `}{` as a field separator as this is unlikely to occur in any real text in the report. I have `code` set to display:none in the CSS.
When the user wants an Excel version of their report the JS code searches the HTML for any `<code>` elements and puts their className and innerHTML in the form. The className indicates how to format the row in Excel and the data is then put into adjacent cells on the Excel row.

The HTML report shows one percentage base (they can toggle between them) but the user preference when requesting an Excel version was to include both.
Is there a better way of doing this?
(As this is a part of a complex web app no user is going to turn CSS off or lack javascript or they wouldn't get this far)
ADDED: I can't use HTML5 as the users are corporates often on older browsers like IE6
| Including hidden data in an HTML page for javascript to process | CC BY-SA 3.0 | 0 | 2011-01-20T09:23:34.270 | 2015-11-15T23:16:40.110 | 2015-11-15T23:16:40.110 | 4,370,109 | 365,160 | [
"javascript",
"html",
"embed"
]
|
4,745,366 | 1 | 4,745,403 | null | 10 | 53,987 | If I run my project this error will come build path problem how to solve this error.
error:
1. Description Resource Path Location Type Project 'videothumb' is missing required source folder: 'gen' videothumb Build path Build Path Problem
2. The project cannot be built until build path errors are resolved videothumb Unknown Java Problem
Can any one help me?

| How to resolve build path errors? | CC BY-SA 2.5 | 0 | 2011-01-20T09:28:21.600 | 2013-07-26T04:24:09.877 | 2011-01-20T10:48:54.637 | 486,554 | 486,554 | [
"android",
"buildpath"
]
|
4,745,524 | 1 | null | null | 0 | 1,750 | I have a product with Unit price and case price radio button set in the custom options
I want the Unit price to be selected as default in the `view.phtml` page how can I do this?
I have checked the function `getValuesHtml()` in `core\Mage\Catalog\Block\Product\View\Options\Type\select.php`
Where can I change it ?

| Magento custom option price as default | CC BY-SA 2.5 | null | 2011-01-20T09:43:19.390 | 2011-04-20T15:53:55.463 | 2011-01-20T11:35:25.077 | 471,559 | 286,389 | [
"magento"
]
|
4,745,661 | 1 | 4,746,711 | null | 0 | 657 | I want compile an email with HTML content which users can see before send it.
I use an
```
Intent email = new Intent(Intent.ACTION_VIEW);
```
But I cannot see an HTML interpreted, see the image below:


There is a way to show an HTML interpreted email content?
Thanks a lot
| Email View doesn't show interpreted HTML | CC BY-SA 2.5 | null | 2011-01-20T09:56:11.197 | 2011-01-22T05:39:20.220 | 2011-01-20T10:02:37.637 | 554,892 | 554,892 | [
"android"
]
|
4,745,854 | 1 | 4,745,933 | null | 0 | 2,749 | I have installed VS2010 Ultimate on to my freshly installed Windows7 Machine. When I tried to connect to the 2008! express database through the Server Explorer , i get an error message
(Screen Shot Attached)
Then I installed SQL Server 2005 . Now when I try to connect to DB through SQL-Server Management Studio , I get the same error there also .
(Screen Shot Attached)
During the installation process ( of VS 2010 ans SQL Server 2005 ) I never got the usual options that come during the installation of SQL Server like selecting the Authentication or Named/Default Instance etc.
Any Help ? Thanks in advance. Will uninstalling the reinstalling fix the issue ?
Will that cause any issue ?
| Unable to connect to SQl Server 2008 Express / SQl Server 2005 (Local) - Error 40 (Server was not found / not accessable) | CC BY-SA 2.5 | null | 2011-01-20T10:18:19.530 | 2013-02-27T14:01:46.933 | 2011-01-20T11:41:06.527 | 277,087 | 277,087 | [
".net",
"sql-server",
"visual-studio",
"sql-server-2005",
"visual-studio-2010"
]
|
4,745,852 | 1 | 4,751,880 | null | 2 | 768 | So Im trying to create a menu with simple rollovers using CSS:
```
img.fade {
opacity: 1;
-webkit-transition: opacity .08s linear;
}
img.fade:hover {
opacity: 0;
}
```
Html:
```
<a href="#" class="main_menu_option"><span style="position: relative;"><img src="img/home_btn_hover.png" alt="#" class="fade" ><img style="position: absolute; left: 0px;" src="img/home_btn.png" class="fade" /></span></a>
<a href="#" class="main_menu_option"><span style="position: relative;"><img src="img/explore_btn_hover.png" alt="#" class="fade" ><img style="position: absolute; left: 0px;" src="img/explore_btn.png" class="fade" /></span></a>
<a href="#" class="main_menu_option"><span style="position: relative;"><img src="img/dives_btn_hover.png" alt="#" class="fade" ><img style="position: absolute; left: 0px;" src="img/dives_btn.png" class="fade" /></span></a>
```
Works OK in safari/chrome but Firefox is having some alignment issues that I can't seem to fix. Any ideas?
[Check out the issue here (make sure to view with firefox)](http://designvillain.com/diveboard/inner.html)

| CSS3 rollover issue in Firefox | CC BY-SA 2.5 | 0 | 2011-01-20T10:18:11.003 | 2011-01-20T21:35:15.930 | 2011-01-20T10:45:37.947 | 278,533 | 278,533 | [
"html",
"firefox",
"css"
]
|
4,745,853 | 1 | null | null | 25 | 2,539 | Occasionally, I see that `typeof(Foo)` returns null. Why would this happen?
This is in C#, .NET 3.5.
I thought it might have something to do with the assembly containing the type not yet being loaded, but a test app shows that the assembly is loaded at the start of the method where `typeof` is used.
Any ideas?
---
- -
---
The application in question uses a huuuuuge amount of memory and runs on 32bit XP. I'm thinking maybe it's a TypeLoadException or OutOfMemoryException that's somehow being swallowed (but I can't see how, as I've tried this with first-chance exceptions turned on in the debugger).
---
Ran into the same issue just now. Here's the stack trace:

The code up to this point is literally just:
```
Type tradeType = typeof(MyTradeType)
TradeFactory.CreateTrade(tradeType)
```
`..CreateTrade(typeof(MyTradeType))``typeof`
So, it looks like `typeof()` but it's `CreateTrade`.
The exception (`NullReferenceException`) has a `HResult` property of `0x80004003` (`Invalid pointer`). A call to `System.Runtime.InteropServices.Marshal.GetLastWin32Error( )` (in the Immediate Window) returns `127 (The specified procedure could not be found)`.
I've looked in the Modules window and the module that contains this type and method has been loaded and there doesn't look to be any loader errors.
---
| Why would typeof(Foo) ever return null? | CC BY-SA 2.5 | 0 | 2011-01-20T10:18:17.770 | 2017-02-21T10:03:13.563 | 2011-01-24T12:16:46.290 | 28,901 | 28,901 | [
"c#",
".net"
]
|
4,745,926 | 1 | 4,746,566 | null | 0 | 48 | i have one view ,in that i want to show table view with mapview .
my problem is how can i process in both thing same time. i want to show this things same time so speed problem not come.
for more info i added image which i want to show.

| how can i do multitask in one view? | CC BY-SA 2.5 | null | 2011-01-20T10:26:12.593 | 2011-01-20T14:02:54.130 | 2011-01-20T14:02:54.130 | 28,422 | null | [
"iphone",
"objective-c"
]
|
4,746,655 | 1 | null | null | 0 | 2,230 | 
Hi Buddies,
I got the error when I use uploadify only on IE.
the following is my setting
```
<script type="text/javascript" src="script/jquery-1.4.2.min.js"></script>
<script type="text/javascript" src="script/jquery-ui-1.8.5.custom.min.js"></script>
<script type="text/javascript" src="uploadify/jquery.uploadify.js"></script>
$('#upload-upload').uploadify({
'uploader': 'uploadify/uploadify.swf',
'script': 'Upload.ashx',
'cancelImg': 'images/close.png',
'auto': false,
'multi': true,
'queueSizeLimit': 4,
'sizeLimit': 36700160, //35 MB
//'sizeLimit': 4000000,
'buttonImg': 'images/Choose-File.png',
'width': 83,
'height': 23,
'rollover': true,
'displayData': 'speed',
'folder': '/uploads',
'onQueueFull': function (event, queueSizeLimit) {
},
//'onSelectOnce': function (event, data) {
//},
'onAllComplete': function (event, data) {
//Code
}
});
```
and then I called
```
$('#upload-upload').uploadifyUpload();
```
| JQuery uploadify error only on IE | CC BY-SA 2.5 | null | 2011-01-20T11:41:21.163 | 2011-01-21T08:59:48.260 | 2011-01-21T08:59:48.260 | 463,731 | 463,731 | [
"jquery",
"internet-explorer",
"uploadify"
]
|
4,747,263 | 1 | 4,747,399 | null | 0 | 515 | I have an error I couldn't figure where it occues on the following:
I'm acutally using a map with vectors in it:
`map<vector<string> , vector<string> > parameterMap;`
because I need a few of them (how many is decided on runtime) I put them into a list (vector):
vector declaration on head of method:
`vector<map<vector<string> , vector<string> > > listedParameterMap;`
insertion of a map into the vector:
`listedParameterMap.insert(listedParameterMap.end(), 1, parameterMap);`
This procedure works fine on the first time. The second time (map is filled correctly) it down't work.
I noticed a thing: I give out the size of the map:
`cout << "listedParameterMap " << listedParameterMap.size();`
it shown is after the second time, the says it still .
It also shows me wired content:
Screenshot:

`Last` should contain something looking like `First`
The second map which is inserted is defently filled correctly.
Same for the vectors: `part1_input` and `part2_output`
```
for (unsigned int index = 0; index < part1_input.size(); index++) {
map<vector<string> , vector<string> > parameterMap;
parameterMap.insert
(pair<vector<string> , vector<string> > (part1_input[index], part2_output[index]));
listedParameterMap.insert(listedParameterMap.end(), 1, parameterMap);
cout << "listedParameterMap " << listedParameterMap.size();
}
```
I really would appreciate any ideas why this happens...
---
---
"Solution" was printing the stuff out. The watch-window isn't displaying the correct values. That means my Problem is caused somewhere else. But this here is anwsered. Thanks to anyone how tried to help me!
| Insert map into vector fails second time | CC BY-SA 2.5 | null | 2011-01-20T12:45:06.560 | 2011-01-20T14:13:19.187 | 2011-01-20T14:13:19.187 | 560,297 | 560,297 | [
"c++",
"visual-studio-2005",
"vector",
"dictionary"
]
|
4,747,442 | 1 | null | null | 2 | 5,893 | I am facing Out of Memory Exception while retrieving large data using web services. it works fine for small amount of data. now in production using large amount of data more than 3 to 4 GB, facing Out of Memory Exception. here we use xml serialization and deserialization.
any help would be appreciated.

| Out of Memory Exception while retrieving large data using web services | CC BY-SA 2.5 | null | 2011-01-20T13:03:04.487 | 2011-01-20T13:25:31.973 | null | null | 366,947 | [
"c#",
"asp.net",
"web-services"
]
|
4,747,450 | 1 | 4,747,623 | null | 0 | 117 | Suppose I have two tables in SQL Server one is `Emp` and another is `FieldsInfo`.
`Emp` table looks with data like below

`FieldsInfo` table looks with data like below

Now I want to join both the tables in such a way that SQL Server would show data from `Emp` table but field name will be shown from `FieldsInfo` table according to the relation.
I mean `Employee ID` will be shown as Field name instead of ID and `Salary` will be shown as field name instead of Sal but value will be just like `Emp` table.
I am not able to generate this type of output after joining. So please help with right SQL script.
thanks
| SQL and Joining in SQL Server 2005 | CC BY-SA 2.5 | null | 2011-01-20T13:03:45.357 | 2012-03-06T14:43:15.983 | 2011-01-20T14:54:18.930 | 13,302 | 508,127 | [
"sql",
"sql-server-2005"
]
|
4,747,694 | 1 | null | null | 0 | 2,004 | I using Jquery framework Jquery-1.3.2.js , when I calling user defined function in every time interval ( about 5 seconds )
then I getting popup error message :
""
error from script Jquery-1.3.2.js
I used function as below
```
function getMore()
{
$.ajax({
type: "POST",
url: "Service/getList.asmx",
data: "{ }",
contentType: "application/json; charset=utf-8",
dataType: "json",
success: function(msg)
{
if(msg != null)
{
if(msg != null)
{
var dynDiv = document.createElement("div");
dynDiv.id = "divDyna";
dynDiv.innerHTML = msg;
document.getElementById('Div1').appendChild(dynDiv);
$('div#Div1').slideDown();
}
}
}
});
}
```
`How I can solve it or handle error ( if possible in try catch ) ?`
see the attached screen shot .
| I am getting Jquery debugger error it going to stop working | CC BY-SA 2.5 | 0 | 2011-01-20T13:28:32.967 | 2016-09-24T06:34:39.967 | null | null | 568,085 | [
"jquery",
"javascript-framework"
]
|
4,747,835 | 1 | 4,748,116 | null | 5 | 3,096 | Does anyone have any idea why images used for a MKPinAnnotationView should be offset slightly (up and to the right) the code I am using is:
```
pinView = [[MKPinAnnotationView alloc] initWithAnnotation:annotation reuseIdentifier:pinView_ID];
pinView.image = [UIImage imageNamed: @"TEST_Small.png"];
// RedCircleImage = 40px x 40px 72dpi PNG
// GreenDotImage = 2px x 2px 72dpi PNG
```

There are no changes to the code just a change in the filename for the image used, one image is the "the two red rings with a black dot in the center" the other is the "small green dot" I have added the thin blue lines in Photoshop to help show where the green dot is.
I have checked the centerOffset property and its correctly set to 0,0
Any ideas would be welcome.
| MKPinAnnotationView image offset? | CC BY-SA 2.5 | 0 | 2011-01-20T13:43:45.677 | 2011-01-20T14:10:12.783 | 2011-01-20T13:57:24.017 | 164,216 | 164,216 | [
"iphone",
"objective-c",
"cocoa-touch"
]
|
4,747,925 | 1 | 4,748,019 | null | 1 | 127 | Running SQL-server 2005 and having a database model, in a simplified version, that looks like the image below.
The model is working pretty well but my problem is when I would like to add a reference between Subscriptions and Addresses or Ports. If I create an ordinary FK between Subscriptions.port_id and Ports.id it will be possible to like to a Port/Addresses that has a reference to another Customer than the one references by the Subscription.
I would like to know if it's possible to avoid this problem or if I'll have to handle the problem in the code and with the risk of inconsistent data?

The addresses and ports are pre-populate and exists before the Customers are created
Some subscription will be connected to an Address, some to Ports and some Subscriptions will only have the connection to the Customer.
| How to avoid that indirect references that can cause mismatches in the DB | CC BY-SA 2.5 | null | 2011-01-20T13:51:18.483 | 2011-01-20T16:58:14.100 | 2011-01-20T14:48:34.487 | 191,975 | 191,975 | [
"tsql",
"database-design"
]
|
4,748,256 | 1 | null | null | 0 | 299 | I have some strange behavior issues on texture-mapping with OpenGL ES 1.1
1)This is the right picture (Samsung Galaxy S):

2)This an wrong picture (HTC Magic):

3)This is another wrong picture (Ideos):

I am very disappointed for that, could someone help me?
I have mapped a texture in a Sphere using OpenGL ES 1.1, the OpenGL need version is write in the AndroidManifest.xml file.
In the 2th case I can read a lot of this message:
I configured the checkError flag in OpenGLViewRender, but I cannot see the OpenGL call which
cause this message.
Thanks a lot in advance.
pedr0
| openGLES different behavior on different devices | CC BY-SA 2.5 | null | 2011-01-20T14:23:30.890 | 2011-01-21T01:10:05.603 | null | null | 554,892 | [
"android"
]
|
4,748,632 | 1 | 4,807,534 | null | 5 | 21,973 | I built some crystal reports in VS2010, and made a setup project for it. It deploys fine on my dev machine, but I get the following error while trying to install it on the client machine.

I have googled this error for sometime and found that the VC++ 2005 redistributables are a prereq. I have added these merge modules to my setup project but I still get the same error.

I have also added .NET 4.0 as a prerequisite, and still get the same error. Anybody has any ideas?
My dev machine is running Windows 7, and I am trying to deploy it on a Windows server 2008 R2 machine.
| Setup project with crystal reports and VS2010 fails to register crystal dlls | CC BY-SA 2.5 | 0 | 2011-01-20T14:59:33.127 | 2015-01-18T10:16:57.197 | null | null | 327,575 | [
"visual-studio-2010",
"crystal-reports",
"installation"
]
|
4,749,921 | 1 | 4,749,985 | null | 2 | 2,569 | I'm trying to work with the Boost Serialization libraries for some experimenting on upcoming projects
I know that the Boost Serialization library must be compiled separately from the rest of the projects/headers. I've installed a package for this on Ubuntu 10.04 including boost1.40-dev and the Serialization library, libboost-serialization1.40.0.
In my new Net Beans project, I tried a simple example to see if I could get things running. Here's the example:
```
/*
* File: main.C
* Author: Doug Swain
*
* Created on January 20, 2011, 11:05 AM
*/
#include <fstream>
#include <iostream>
#include <boost/archive/xml_iarchive.hpp>
#include <boost/archive/xml_oarchive.hpp>
int main() {
std::ofstream ofs("filename.xml");
boost::archive::xml_oarchive oa(ofs);
return 0;
}
```
And then here are the compiler errors:
```
"/usr/bin/make" -f nbproject/Makefile-Debug.mk QMAKE= SUBPROJECTS= .build-conf
make[1]: Entering directory `/home/doug/BoostSerialization'
"/usr/bin/make" -f nbproject/Makefile-Debug.mk dist/Debug/GNU-Linux-x86/boostserialization
make[2]: Entering directory `/home/doug/BoostSerialization'
mkdir -p build/Debug/GNU-Linux-x86
rm -f build/Debug/GNU-Linux-x86/main.o.d
g++ -c -g -I/usr/include/boost/serialization -I/usr/include/boost -I/usr/include/boost/archive -MMD -MP -MF build/Debug/GNU-Linux-x86/main.o.d -o build/Debug/GNU-Linux-x86/main.o main.C
mkdir -p dist/Debug/GNU-Linux-x86
g++ -o dist/Debug/GNU-Linux-x86/boostserialization build/Debug/GNU-Linux-x86/main.o -L/usr/include/boost/serialization -L/usr/include/boost -L/usr/include/boost/archive
build/Debug/GNU-Linux-x86/main.o: In function `xml_oarchive':
/usr/include/boost/archive/xml_oarchive.hpp:100: undefined reference to `boost::archive::xml_oarchive_impl<boost::archive::xml_oarchive>::xml_oarchive_impl(std::basic_ostream<char, std::char_traits<char> >&, unsigned int)'
build/Debug/GNU-Linux-x86/main.o: In function `~xml_oarchive_impl':
/usr/include/boost/archive/xml_oarchive.hpp:73: undefined reference to `boost::archive::basic_xml_oarchive<boost::archive::xml_oarchive>::~basic_xml_oarchive()'
/usr/include/boost/archive/xml_oarchive.hpp:73: undefined reference to `boost::archive::basic_text_oprimitive<std::basic_ostream<char, std::char_traits<char> > >::~basic_text_oprimitive()'
/usr/include/boost/archive/xml_oarchive.hpp:73: undefined reference to `boost::archive::basic_text_oprimitive<std::basic_ostream<char, std::char_traits<char> > >::~basic_text_oprimitive()'
/usr/include/boost/archive/xml_oarchive.hpp:73: undefined reference to `boost::archive::basic_xml_oarchive<boost::archive::xml_oarchive>::~basic_xml_oarchive()'
/usr/include/boost/archive/xml_oarchive.hpp:73: undefined reference to `boost::archive::basic_text_oprimitive<std::basic_ostream<char, std::char_traits<char> > >::~basic_text_oprimitive()'
/usr/include/boost/archive/xml_oarchive.hpp:73: undefined reference to `boost::archive::basic_text_oprimitive<std::basic_ostream<char, std::char_traits<char> > >::~basic_text_oprimitive()'
/usr/include/boost/archive/xml_oarchive.hpp:73: undefined reference to `boost::archive::basic_xml_oarchive<boost::archive::xml_oarchive>::~basic_xml_oarchive()'
/usr/include/boost/archive/xml_oarchive.hpp:73: undefined reference to `boost::archive::basic_text_oprimitive<std::basic_ostream<char, std::char_traits<char> > >::~basic_text_oprimitive()'
/usr/include/boost/archive/xml_oarchive.hpp:73: undefined reference to `boost::archive::basic_text_oprimitive<std::basic_ostream<char, std::char_traits<char> > >::~basic_text_oprimitive()'
build/Debug/GNU-Linux-x86/main.o:(.rodata._ZTIN5boost7archive6detail15common_oarchiveINS0_12xml_oarchiveEEE[typeinfo for boost::archive::detail::common_oarchive<boost::archive::xml_oarchive>]+0x10): undefined reference to `typeinfo for boost::archive::detail::basic_oarchive'
build/Debug/GNU-Linux-x86/main.o: In function `boost::archive::xml_oarchive& boost::archive::detail::interface_oarchive<boost::archive::xml_oarchive>::operator<< <boost::archive::version_type const>(boost::archive::version_type const&)':
/usr/include/boost/archive/detail/interface_oarchive.hpp:64: undefined reference to `boost::archive::basic_xml_oarchive<boost::archive::xml_oarchive>::save_override(boost::archive::version_type const&, int)'
make[2]: Leaving directory `/home/doug/BoostSerialization'
make[1]: Leaving directory `/home/doug/BoostSerialization'
build/Debug/GNU-Linux-x86/main.o: In function `boost::archive::xml_oarchive& boost::archive::detail::interface_oarchive<boost::archive::xml_oarchive>::operator<< <boost::archive::object_id_type const>(boost::archive::object_id_type const&)':
/usr/include/boost/archive/detail/interface_oarchive.hpp:64: undefined reference to `boost::archive::basic_xml_oarchive<boost::archive::xml_oarchive>::save_override(boost::archive::object_id_type const&, int)'
build/Debug/GNU-Linux-x86/main.o: In function `boost::archive::xml_oarchive& boost::archive::detail::interface_oarchive<boost::archive::xml_oarchive>::operator<< <boost::archive::object_reference_type const>(boost::archive::object_reference_type const&)':
/usr/include/boost/archive/detail/interface_oarchive.hpp:64: undefined reference to `boost::archive::basic_xml_oarchive<boost::archive::xml_oarchive>::save_override(boost::archive::object_reference_type const&, int)'
build/Debug/GNU-Linux-x86/main.o: In function `boost::archive::xml_oarchive& boost::archive::detail::interface_oarchive<boost::archive::xml_oarchive>::operator<< <boost::archive::class_id_type const>(boost::archive::class_id_type const&)':
/usr/include/boost/archive/detail/interface_oarchive.hpp:64: undefined reference to `boost::archive::basic_xml_oarchive<boost::archive::xml_oarchive>::save_override(boost::archive::class_id_type const&, int)'
build/Debug/GNU-Linux-x86/main.o: In function `boost::archive::xml_oarchive& boost::archive::detail::interface_oarchive<boost::archive::xml_oarchive>::operator<< <boost::archive::class_id_optional_type const>(boost::archive::class_id_optional_type const&)':
/usr/include/boost/archive/detail/interface_oarchive.hpp:64: undefined reference to `boost::archive::basic_xml_oarchive<boost::archive::xml_oarchive>::save_override(boost::archive::class_id_optional_type const&, int)'
build/Debug/GNU-Linux-x86/main.o: In function `boost::archive::xml_oarchive& boost::archive::detail::interface_oarchive<boost::archive::xml_oarchive>::operator<< <boost::archive::class_id_reference_type const>(boost::archive::class_id_reference_type const&)':
/usr/include/boost/archive/detail/interface_oarchive.hpp:64: undefined reference to `boost::archive::basic_xml_oarchive<boost::archive::xml_oarchive>::save_override(boost::archive::class_id_reference_type const&, int)'
build/Debug/GNU-Linux-x86/main.o: In function `boost::archive::xml_oarchive& boost::archive::detail::interface_oarchive<boost::archive::xml_oarchive>::operator<< <boost::archive::class_name_type const>(boost::archive::class_name_type const&)':
/usr/include/boost/archive/detail/interface_oarchive.hpp:64: undefined reference to `boost::archive::basic_xml_oarchive<boost::archive::xml_oarchive>::save_override(boost::archive::class_name_type const&, int)'
build/Debug/GNU-Linux-x86/main.o: In function `boost::archive::xml_oarchive& boost::archive::detail::interface_oarchive<boost::archive::xml_oarchive>::operator<< <boost::archive::tracking_type const>(boost::archive::tracking_type const&)':
/usr/include/boost/archive/detail/interface_oarchive.hpp:64: undefined reference to `boost::archive::basic_xml_oarchive<boost::archive::xml_oarchive>::save_override(boost::archive::tracking_type const&, int)'
collect2: ld returned 1 exit status
make[2]: *** [dist/Debug/GNU-Linux-x86/boostserialization] Error 1
make[1]: *** [.build-conf] Error 2
make: *** [.build-impl] Error 2
```
I've verified that the headers do in fact exist (and NetBeans can find it prior to trying to build them). I've also made sure to update the include directories and the library directories to the best of my knowledge:


| Cannot Build Simple Boost XML Serialization Example | CC BY-SA 4.0 | null | 2011-01-20T16:42:03.350 | 2019-09-08T19:26:25.017 | 2019-09-08T19:26:25.017 | 13,860 | 576,975 | [
"c++",
"boost",
"build",
"xml-serialization"
]
|
4,750,088 | 1 | 4,750,179 | null | 6 | 20,929 | I’ve faced with an issue with IE6 & IE7 issue and I was hoping someone had a solution for me other than to not use IE6/7. The cost on the right needs to be on the same line as the label on the left. I'm only able to get to this to work in FireFox, but in IE7, for example, it places cost on the line below even though I'm using inline-block. An yhelp would be greatly appreciated
Note: I turned on borders so I could see what's happening...
Demo of my issue: [http://jsbin.com/ilese4/](http://jsbin.com/ilese4/)
Here's a picture of how it renders in IE7.

| CSS Display inline-block issue with IE | CC BY-SA 2.5 | 0 | 2011-01-20T16:56:09.153 | 2013-06-25T16:13:25.913 | null | null | 229,273 | [
"css",
"internet-explorer",
"inline",
"block"
]
|
4,750,396 | 1 | 4,751,374 | null | -1 | 333 | I am looking to generate a stored proc that will take a CSV string of projectIds and return the following result set.

[sample data](https://fileshare.egnyte.com/h-s/20110120/ecbe749ca1004f72)
the projectId and name fields come from the project table while the rest of the fields are a pivot of the milestone dates for each project. the milestone fields are for certain milestones of CID in (37, 39, 41, 45, 47, 50, 53, 72, 73, 75, 77) where I want each respective milestone to show as the name in the excel file (I am guessing to use an alias for each to convert each milestone name to what I want it to show as)
Also note the first milestone field is the BRS (cid=37) start date and the rest of the milestone fields are all end dates including milestone cid 37 and the rest mentioned above.
The dates should represent the projectMilestone dates where available data is had, if there is no projectMilestone for a particular CID then i need to use the ReleaseSchedule date. i was going to COALESCE(projectmilestone dates, releaseschedual dates) to accomplish this.
the field headers of the milestone names would be such:
```
CID NAME in result set (as field headers)
37 BRS
39 SRS
41 SAD
45 Product Profile Review
47 SE Integration
50 IDE
53 UAT
72 PE Testing
73 Code Freeze
75 Dark Pod
77 Production
```
| SQL Server 2005 how do I pivot or cross tab data to get my resultset? | CC BY-SA 2.5 | null | 2011-01-20T17:24:13.257 | 2011-01-20T19:14:39.527 | 2011-01-20T17:31:41.837 | 352,157 | 352,157 | [
"sql-server",
"sql-server-2005",
"pivot",
"coalesce"
]
|
4,750,707 | 1 | 4,753,599 | null | 4 | 3,373 | 

And this is result when I invert the tangent vector right after transferring it to vertex shader:


(And it works only when I rotate it through Y axis so the last image seem to present a good parallax mapped cube)
Because
I used and as in working demo.
After all, I exported arrays with position/texcoord/normal/tangent data into a .txt file and I saw what I exactly expected (and what I expected is the same pos/tex/norm data as in working demo, including calculated tangents which I managed to export from working demo).
The next argument is, I copied my shader code to a working demo and .
Other one is, I tried multiple ways to render this cube.
I tried VBO with glVertexAttribPointer, I tried VBO with saving tangent as other texture coordinate (as in the demo), I tried DisplayList with glVertexAttrib4f. Result is...
Height map is loading correctly, I tried to set it as a diffuse map and it looked OK.
glGetError() gives me No Errors and shader compile logs says so.
It is probably something with camera or init states.
Maybe posting an init code will help.
```
void CDepthBase::OpenGLSet() {
glEnable( GL_TEXTURE_2D );
glShadeModel( GL_SMOOTH );
glClearColor( 0.0f, 0.0f, 0.0f, 0.0f );
glClearDepth( 1.0f );
glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
glDepthFunc( GL_LEQUAL );
glEnable(GL_DEPTH_TEST);
glBlendFunc( GL_ONE, GL_ONE );
GLfloat ratio;
glViewport(0, 0, ResolutionWidth, ResolutionHeight);
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
gluPerspective(45.0f, ResolutionWidth / (float)ResolutionHeight, 0.1f, 900.0f);
glMatrixMode(GL_MODELVIEW);
glLoadIdentity();
if (GLEW_OK != glewInit()) {
MBX("Failed to init GLEW.", "Error");
}
if (glewIsSupported("GL_ARB_vertex_buffer_object")) {
VBO_supported = true;
} else VBO_supported = false;
glHint( GL_FOG_HINT, GL_DONT_CARE );
glHint( GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST );
glShadeModel(GL_SMOOTH);
glAlphaFunc(GL_ALWAYS, 0);
}
```
By the way, I'm using GL Extension Wrangler with extensions.
Shader code & log (this exported file contains code which was directly passed to glShaderSource):
```
Vertex shader was successfully compiled to run on hardware.
Fragment shader was successfully compiled to run on hardware.
Fragment shader(s) linked, vertex shader(s) linked.
------------------------------------------------------------------------------------------
varying vec3 lightDir;
varying vec3 viewDir;
attribute vec4 tangent;
void main()
{
gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;
gl_TexCoord[0] = gl_MultiTexCoord0;
vec3 vertexPos = vec3(gl_ModelViewMatrix * gl_Vertex);
vec3 tn = tangent.xyz;
vec3 n = normalize(gl_NormalMatrix * gl_Normal);
vec3 t = normalize(gl_NormalMatrix * tangent.xyz);
vec3 b = cross(t, n) * -tangent.w;
mat3 tbnMatrix = mat3(t.x, b.x, n.x,
t.y, b.y, n.y,
t.z, b.z, n.z);
lightDir = (gl_LightSource[0].position.xyz - vertexPos) / 100.0;
lightDir = tbnMatrix * lightDir;
viewDir = -vertexPos;
viewDir = tbnMatrix * viewDir;
}
-----------------------------------------------------------------------------------------
varying vec3 lightDir;
varying vec3 viewDir;
uniform sampler2D diffuseMap;
uniform sampler2D normalMap;
uniform sampler2D heightMap;
uniform float scale;
uniform float bias;
void main()
{
vec3 v = normalize(viewDir);
vec2 TexCoord = gl_TexCoord[0].st;
{
float height = texture2D(heightMap, gl_TexCoord[0].st).r;
height = height * scale + bias;
TexCoord = gl_TexCoord[0].st + (height * v.xy);
}
vec3 l = lightDir;
float atten = max(0.0, 1.0 - dot(l, l));
l = normalize(l);
vec3 n = normalize(texture2D(normalMap, TexCoord).rgb * 2.0 - 1.0);
vec3 h = normalize(l + v);
float nDotL = max(0.0, dot(n, l));
float nDotH = max(0.0, dot(n, h));
float power = (nDotL == 0.0) ? 0.0 : pow(nDotH, gl_FrontMaterial.shininess);
vec4 ambient = gl_FrontLightProduct[0].ambient * atten;
vec4 diffuse = gl_FrontLightProduct[0].diffuse * nDotL * atten;
vec4 specular = gl_FrontLightProduct[0].specular * power * atten;
vec4 color = gl_FrontLightModelProduct.sceneColor + ambient + diffuse + specular;color *= texture2D(diffuseMap,TexCoord);
gl_FragColor = color ;
}
```
Uniforms are working correctly because results are the same if I switch them with constant values.
Compiling shader:
```
void __Shader::import(){
if(imported) __Shader::~__Shader();
v = glCreateShader(GL_VERTEX_SHADER);
f = glCreateShader(GL_FRAGMENT_SHADER);
glShaderSource(v, 1, (const GLchar **)&vsrc.cstr,NULL);
glShaderSource(f, 1, (const GLchar **)&fsrc.cstr,NULL);
glCompileShader(v);
glCompileShader(f);
p = glCreateProgram();
glAttachShader(p,v);
glAttachShader(p,f);
if(_flags & NORMAL_MAPPING)
glBindAttribLocation(p, ATTRIB_TANGENT, "tangent");
glLinkProgram(p);
if(_flags & DIFFUSE_MAPPING)
diffuseUni.loc = glGetUniformLocation(p, "diffuseMap");
if(_flags & NORMAL_MAPPING)
normalUni.loc = glGetUniformLocation(p, "normalMap");
if(_flags & PARALLAX_MAPPING)
heightUni.loc = glGetUniformLocation(p, "heightMap");
if(_flags & SPECULAR_MAPPING)
specularUni.loc = glGetUniformLocation(p, "specularMap");
imported = true;
}
```
Setting attribute in VBO:
```
if(tangents.size() > 0){
buffered |= 3;
glGenBuffers(1, &VBO_tangent);
glBindBuffer(GL_ARRAY_BUFFER, VBO_tangent);
glBufferData(GL_ARRAY_BUFFER, tangents.size()*sizeof(tangent), tangents.get_ptr(), GL_STATIC_DRAW);
}
// and in draw:
if(buffered & 3) {
glBindBuffer(GL_ARRAY_BUFFER, VBO_tangent);
glVertexAttribPointer(__Shader::ATTRIB_TANGENT, 4, GL_FLOAT, GL_FALSE, 0, 0);
glEnableVertexAttribArray(__Shader::ATTRIB_TANGENT);
}
```
and a small note
```
for(int i = 0; i < responders.size(); ++i)
if(strstr(responders[i].idea, "tangent problem"))
responders[i].please_dont_talk();
```
Just tell me your other ideas about what can be the reason of those bad results.
| Parallax mapping glitch in OpenGL | CC BY-SA 3.0 | 0 | 2011-01-20T17:56:40.613 | 2015-05-21T06:56:53.250 | 2015-05-21T06:56:53.250 | 503,776 | 503,776 | [
"c++",
"opengl",
"glsl"
]
|
4,750,789 | 1 | 4,778,161 | null | 0 | 1,955 | I'm having difficulties with an MFC application menu drop down. I want the drop down to display all items when it is clicked. Instead it displays arrows which the user must click in order to show the drop down items.
See the pic below. Any help would be appreciated. Thanks!

| MFC Menu Drop Down (Screenshot included) | CC BY-SA 2.5 | null | 2011-01-20T18:07:15.050 | 2011-01-24T02:50:15.583 | 2011-01-20T19:04:30.977 | 185,814 | 185,814 | [
"c++",
"visual-studio",
"mfc",
"drop-down-menu"
]
|
4,750,851 | 1 | 4,752,470 | null | 4 | 436 | The context menu from dock items is not only translucent but also blurs the contents behind it, Is this effect availible for translucent floating panels? This is the same effect used in Sheet Alert dialogs (e.g. quit with unsaved changes) but in that case the transparency is different, and the background is light rather than dark

Some background, we have a pro app that is frequently used full screen, and our floating palettes have some transparency, but obviously the more transparency we have the harder it is to read the text on them when the background is very active/noisy, if we could have a slight blur we would be able to greatly improve the readability on the text while still allowing some context of "whats behind the palette"
| Is it possible to use the blur behind Core Animation(effect) on an NSPanel? | CC BY-SA 2.5 | null | 2011-01-20T18:13:55.857 | 2011-01-21T04:34:55.993 | 2011-01-21T04:34:55.993 | 582,312 | 582,312 | [
"cocoa",
"core-animation",
"core-graphics",
"transparency",
"nspanel"
]
|
4,750,997 | 1 | null | null | 0 | 1,733 | I have an ancient COM object in VB6 that has been working fine until recently. (Don't they all). The only code change that has been made (as verified by svn) is the inclusion of a new string literal in an array.
The VB6 IDE compiles the object fine. When I hit Run|Start... and execute the following test vb script from the command prompt, the object works fine and I see the dialog boxes I expect:
```
dim o
set o = CreateObject("MyDll.MyClassName")
wscript.Echo "Testing object"
wscript.Echo o.HelloWorld ' runs a test method that returns "Hello World"
wscript.Echo "Done"
```
However, when I stop debugging in the IDE and attempt to run the same vbscript from the same command prompt, I get the error:

(ProgID removed for security reasons, but it is the same as in the script.)
Things I've tried:
1. I suspected that the DLL may have been registered and unregistered by VB when I start and stop the debugger, so I also tried registering the object with regsvr32 before running the test script. This has had no effect.
2. I also removed all references to the DLL from the registry, and re-registered the object. Same error.
3. I deleted the DLL and re-built it from VB (File|Make...) and re-registered the DLL. Same error.
Machine is Win7 Ultimate x64, object built with VB6.
Any suggestions?
And, no, unfortunately, rewriting the object in C# isn't an option.
| VB6 COM Object - only works when IDE is running? | CC BY-SA 2.5 | null | 2011-01-20T18:29:08.917 | 2019-07-08T15:10:09.200 | 2012-04-02T19:30:04.857 | 3,043 | 135,769 | [
"dll",
"com",
"vbscript",
"activex"
]
|
4,751,140 | 1 | null | null | 30 | 20,356 | The goal is to have TFS build and deploy 2+ different configurations, and have the web.config transform files include the intended content in their output. This in an ASP.NET MVC project.

Web.Debug.Config - [see on PasteBin](http://pastebin.com/9ZwbbsBd).
Web.Release.Config - [see on PasteBin](http://pastebin.com/q2aQNrRY)
The 2 transformed config files have their . This was modified because all 3 web.*.config files were being included in the deployment.
TFS is configured correctly to build and deploy both configurations. It deploys to the 2 drop locations as expected. There are no MSBuild Arguments specified in the build definition.

: The 2 built and deployed web sites have the same web.config file. Basically it's as if the transformed files did not exist.
: the changes specified (`xdt:Transform="Replace"` and `xdt:Transform="Remove"`) would be present in the web.config files.
How can you configure your project or TFS to ensure the web.config transformations are processed and their outputs deployed to the correct deployment locations? What else can I check/modify?
- [Vishal's Joshit's tutorial with the MSBuild on the command line](http://vishaljoshi.blogspot.com/2009/03/web-deployment-webconfig-transformation_23.html)- - `xdt`- - -
If I'm missing any important information, please leave a comment, and I'll include any more relevant information!
| TFS Build not transforming web.config as expected | CC BY-SA 2.5 | 0 | 2011-01-20T18:43:32.883 | 2014-06-22T09:44:05.137 | 2011-01-20T20:37:46.340 | 21,234 | 23,199 | [
"visual-studio-2010",
"msbuild",
"web-config",
"tfsbuild"
]
|
4,751,176 | 1 | 4,751,199 | null | 2 | 1,345 | I don't know how my client mocked up their screenshots, but they ended up with an image where the navigation bar has a kind of two-tone metallic look, like this:

But when I build the app, it ends up fading gradually from my tint colour towards white, like this:

The trouble is, the clients really like the way it looks in their mock-up. What can I do?
| How can I make the navigation bar on my iPhone app look metallic? | CC BY-SA 2.5 | 0 | 2011-01-20T18:46:47.350 | 2011-01-20T19:00:51.207 | null | null | 11,575 | [
"iphone",
"ios"
]
|
4,751,249 | 1 | 4,753,422 | null | 1 | 1,399 | I'm using DateTimePicker in my winform application. The DateTimePicker allows a user to select a date that is not larger than DateTime.Now. I did this by set the controls MaxDate to DateTime.Now.
It works fine in XP, the dates that are larger than DateTime.Now are displayed, and user can not select them. But in Windows Server 2008, these dates are not displayed at all.
Is this an expected behavior or a microsoft bug?
XP

Windows Server 2008
| DateTimePicker behaves differently in XP and Windows Server 2008 when MaxDate is set? | CC BY-SA 2.5 | null | 2011-01-20T18:56:13.507 | 2011-01-20T22:31:07.350 | null | null | 198,634 | [
"winforms",
"datetimepicker"
]
|
4,751,571 | 1 | 8,569,134 | null | 2 | 5,227 | I need to encrypt my web.config file on my dev machine (Windows XP SP-3) and export the RSA Key to my QA machine (Windows Server 2003). I used the following command to encrypt my file.
```
aspnet_regiis -pe "appSettings" -app "/VirtualDirectoryName" -prov "RsaProtectedConfigurationProvider"
```
and then i added the following section in my web.config file
```
<configProtectedData>
```
Then i created the RSA container with the name ""
Web.Config was encrypted nicely and i was able to use this file on my dev machine. I however had to turn on "Impersonation" and used my windows userName and password.
I need to export my RSA Key to QA server, so that i can use my the encrypted config file.
So i'm trying to export the RSA key and its failing. I don't understand the reason, as i'm following all the steps that are mentioned in the following link;
[link text](http://msdn.microsoft.com/en-us/library/yxw286t2)
When i try to export the RSA container, i get the error saying that the "RSA container was not found." But when i try to create the RSA container again with the same name, i get the error stating "The RSA container already exists".

even the following command executed successfully.
```
aspnet_regiis -pa "NetFrameworkConfigurationKey" "NT AUTHORITY\NETWORK SERVICE"
```
I however could not execute the following command;
```
aspnet_regiis -pa "SampleKeys" "NT AUTHORITY\NETWORK SERVICE"
```
I got the same error saying that "RSA container was not found."
I also gave read access to ASPNET user on "C:\Document and Settings\All Users\Application Data\Microsoft\Crypto\RSA\MachineKey" folder.
but nothing worked.
Am i missing something?
| Unable to export RSA Key container file | CC BY-SA 2.5 | null | 2011-01-20T19:27:06.483 | 2011-12-19T23:58:20.817 | null | null | 373,459 | [
"asp.net",
"security",
"web-config",
"rsa"
]
|
4,751,633 | 1 | 4,751,692 | null | 7 | 4,857 | I am reading the difference between MVC,MVP,MVVM
Source: [here](http://geekswithblogs.net/dlussier/archive/2009/11/21/136454.aspx)

My doubt is ,the diagrams (MVP) (MVVM) show bidirectional arrow between Modle and Presenter,Model and ViewModel.
Presenter and ViewModel obviously aware of Model.But does it mean Model is aware of Presenter and ViewModel?
| Clarification :MVC,MVP,MVVM | CC BY-SA 2.5 | 0 | 2011-01-20T19:32:20.553 | 2014-05-10T20:10:42.193 | null | null | 573,204 | [
"model-view-controller",
"mvvm",
"mvp"
]
|
4,751,651 | 1 | 4,752,058 | null | 3 | 6,947 | I am using a data set like:
```
1 48434 14566
1 56711 6289
1 58826 4174
2 56626 6374
2 58888 4112
2 59549 3451
2 60020 2980
2 60468 2532
3 56586 6414
3 58691 4309
3 59360 3640
3 59941 3059
.
.
.
10 56757 6243
10 58895 4105
10 59565 3435
10 60120 2880
10 60634 2366
```
I need a plot in R of 3rd column for each value of first column i.e. for above data there would be 10 different plots of (each group 1-10) of values of 3rd column. x-axis is number of Iterations and Y-axis is the values with max 63000. I also need to connect the dots with a line in color red.
I am new to R and have been reading documentation but that confused me more. could any body plz help.

```
library(lattice)
d <- read.delim("c:\\proj58\\positions23.txt",sep="")
d <- do.call(rbind, lapply(split(d, d$V1), function(x) {
x$iterations <- order(x$V3, decreasing=TRUE)
x
}))
xyplot(V3 ~ iterations | V1, type="l", data=d)
```
```
>
> source("C:\\proj58\\plots2.R")
> d
V1 V2 V3 iterations
1.1 1 48434 14566 1
1.2 1 56711 6289 2
1.3 1 58826 4174 3
1.4 1 59528 3472 4
```
OK: Got It. don't know what was wrong. Here it is,

2 more things, how to change V1 labels on the boxes to actual numbers like 1,2,...
secondly I have files that contain 100 groups, I tried one and it made all graphs on a single page (unreadable obviously), can I make these on more than one windows?
| How to Split Dataset and plot in R | CC BY-SA 2.5 | 0 | 2011-01-20T19:33:26.210 | 2014-05-19T11:53:03.033 | 2020-06-20T09:12:55.060 | -1 | 577,066 | [
"r",
"plot",
"split",
"lattice"
]
|
4,751,810 | 1 | 4,752,065 | null | 0 | 255 | Hi i just download the plugin for helios but i am having a problems when it comes to download the icefaces-core library they dont appear.... could it be a firewall?? but why the others appear and the icefaces libs dont!! anyway i can do this manually??

| Icefaces 2 Plugin problem | CC BY-SA 2.5 | null | 2011-01-20T19:47:35.100 | 2011-01-20T20:14:23.690 | 2011-01-20T19:48:44.823 | 21,234 | 382,920 | [
"java",
"eclipse",
"jsf",
"icefaces"
]
|
4,751,915 | 1 | null | null | 1 | 714 | I'm trying to understand how one might automatically generate a Banyan Network for n-inputs in code. I haven't been able to get much help from my research so far.
This is what a 8-input banyan network looks like..

How do I model each node in code? is there an algorithm I can use to generate the nodes and paths for an n-input Banyan network?
Any help would be much appreciated!
| How to generate a Banyan network for n-inputs | CC BY-SA 2.5 | null | 2011-01-20T19:58:20.433 | 2020-04-10T14:23:41.180 | null | null | 169,459 | [
"python",
"networking",
"routes",
"switching"
]
|
4,752,191 | 1 | 4,752,217 | null | 0 | 171 | So we have an ASP.NET MVC 2 application. The problem is, on our front end, a lot of fields don't like up with each other. I'd say with about 90-95% of the fields displayed to the user we are using HTML Helpers. We also mainly use the new ones released in MVC 2, the "for" helpers, for example, `Html.DropDownListFor`
Look at this picture:

These are both using the same HTML Helper, mentioned above. Here is the code for that specific picture:
```
<td class="leftRightBorder">
<%= Html.DropDownListFor(m => m.ResetDayComponent.ResetBusinessDayConvention, DropDownData.BusinessDayConventionList(), "", new { propertyName = "ResetDayComponent.ResetBusinessDayConvention", onchange = "UpdateField(this);" })%>
</td>
</tr>
<tr>
<td>Frequency</td>
<td class="leftRightBorder">
<%= Html.DropDownListFor(m => m.FixedComponent.PaymentFrequency, DropDownData.FrequencyDropList(), "", new { propertyName = "FixedComponent.PaymentFrequency", onchange = "UpdateField(this);" })%>
</td>
<td />
<td>Frequency</td>
<td class="leftRightBorder">
<%= Html.DropDownListFor(m => m.FloatingComponent.PaymentFrequency, DropDownData.FrequencyDropList(), "", new { propertyName = "FloatingComponent.PaymentFrequency", onchange = "UpdateField(this);" })%>
</td>
```
The second frequency is the one you see, the other is in a table to the left of these two dropdowns.
How can I set a common length for dropdowns, text fields, etc. throughout the app so everything looks consistent and not messy?
| Front end field alignment in MVC Application | CC BY-SA 2.5 | null | 2011-01-20T20:26:46.930 | 2011-01-20T20:32:34.923 | 2011-01-20T20:32:34.923 | 68,015 | 534,101 | [
".net",
"html",
"css",
"asp.net-mvc-2",
"html-helper"
]
|
4,752,481 | 1 | 4,752,674 | null | 1 | 4,957 | I've written a client-server c# app and let it run all night , and when i wanted to see if it was still working i've found an error on the server . unfortunately the app is to big to paste in some code, but i get an error at
> Application.Run(form1)
in the program.cs that says 
The first two messageboxes can be ignored (from left to right ) because they are supposed to show , but the other
> delegate buton couldn't be executed
comes from this code ánd mai have a part in this error(this code is in form1.cs) :
```
public void setButonState(inout_buton b, bool t, int q,int contor)
{
try
{
if (b.InvokeRequired)
{
Callback d = new Callback(setButonState);
this.Invoke(d, new object[] { b, t, q, contor });
}
else
{
b.Enabled = t;
if (q == 0) b.setBackgroundGrey();
if (q == 1) b.setBackgroundGreen();
if (q == 2) b.setBackgroundRed();
if (q == 3) b.setBackgroundOrange();
b.setSecondaryLabel(contor);
}
}
catch { new ShowMessageBox("FORM1 : delegate buton couldn't be executed"); }
}
```
My question is : in what conditions does these errors show ?
| Error Creating window handle | CC BY-SA 2.5 | 0 | 2011-01-20T20:55:31.093 | 2018-09-04T09:09:00.080 | null | null | 476,024 | [
"c#",
"winforms"
]
|
4,752,857 | 1 | 4,752,994 | null | 0 | 1,332 | I'm having an ie7 issue. Everything seem to be working fine in Firefox and IE8.
In ie7 the first element works fine but all other are push down like they have a clear applied.
image depicts this best.

Here's the code.
```
.newLabellg
{
float:left;
width:66px;
margin:3px 0 0 0;
font-weight:bold;
color:#000;
}
<div style="float:left; width:320px;">
<div style="margin-bottom:10px; float:left;">
<div class="newLabellg">Cusotmer#:</div>
<div style="float:left;">
<asp:TextBox ID="CustomerNumber" runat="server" Width="220px"></asp:TextBox>
</div>
</div>
<div style="margin-bottom:10px; float:left; clear:both;">
<div class="newLabellg">Cusotmer:</div>
<div style="float:left;">
<asp:TextBox ID="CustomerName" runat="server" Width="220px"></asp:TextBox>
</div>
</div>
<div style="margin-bottom:10px; float:left; clear:both;">
<div class="newLabellg" style="float:left;">Address:</div>
<div style="float:left;">
<asp:TextBox ID="Address" runat="server" Width="220px"></asp:TextBox>
</div>
</div>
<div style="margin-bottom:10px; float:left; clear:both;">
<div class="newLabellg">Mailing Address:</div>
<asp:TextBox ID="Address2" runat="server" Width="220px"></asp:TextBox>
<div style="float:left; margin:3px 0 0 0">
<asp:DropDownList ID="City" runat="server" Width="109px">
</asp:DropDownList>
<asp:DropDownList ID="Province" runat="server" Width="109px">
</asp:DropDownList></div>
</div>
</div>
```
Any Idea why/what ie7 is doing and how I can fix it?
| ie7 pushing down floats | CC BY-SA 2.5 | null | 2011-01-20T21:32:34.170 | 2020-07-09T10:18:19.303 | 2020-07-09T10:18:19.303 | 8,422,953 | 258,594 | [
"html",
"css",
"css-float",
"internet-explorer-7"
]
|
4,753,329 | 1 | 4,753,354 | null | 0 | 268 | Can someone tell me why my test keeps failing when I try to confirm uniqueness of the email attribute in my model. When I test this in the Rails console, it works correctly, but when I run the unit tests in the console, it fails with this error message:

This is my model:

And here is the unit test that keeps failing:

The reason the unit test keeps failing is that it says that invalid_user is valid when it shouldn't be. Can someone please help me figure out why this is failing -- it's getting on my nerves that I can't figure it out lol?
Thanks!
| Rails 3 model valid when it should not be | CC BY-SA 2.5 | null | 2011-01-20T22:20:17.073 | 2011-01-20T22:24:04.710 | 2011-01-20T22:24:04.710 | 15,245 | 427,494 | [
"ruby-on-rails"
]
|
4,754,202 | 1 | 4,754,290 | null | 3 | 1,565 | So with a grouped UITableView I expect an image placed in UITableViewCell's imageView in the top row to look like this (from the iTunes app):

Instead I get this:

The section doesn't appear to mask the cell's image view. Why not? I've tried everything I can think of. As far as I can tell, this is a bog-standard set up. The UITableView is part of a UITableViewController, no custom UITableViewCell.
Has anyone else run into this? Is there a simple way to achieve this without custom UITableViewCells? I tried [Matt Gallagher's code](http://cocoawithlove.com/2010/12/uitableview-construction-drawing-and.html) but he's not masking the image in the top (and bottom) rows.
| Grouped UITableViews and Image Masking | CC BY-SA 2.5 | 0 | 2011-01-21T00:20:41.160 | 2013-03-27T00:03:39.423 | null | null | 126,606 | [
"iphone",
"ios",
"uitableview"
]
|
4,754,500 | 1 | 4,755,261 | null | 1 | 3,395 | I'm trying to override the way QTreeWidgetItems are drawn when an item is dragged over them. I've overridden the drag Events to set the Qt.UserRole data to 1 for the QTreeWidgetItems that I want to paint. In the Item Delegate, I read the UserRole and draw accordingly.
My custom painting is showing up exactly as expected (i.e. the bolded line); however, I have not been able to figure out how to suppress the drawing done by the standard painter for Dragging (i.e. the small rectangle) without suppressing all other painting (i.e. the text, etc.).
Any ideas would be appreciated.

Ex.
```
def dragMoveEvent(self, event):
pos = event.pos()
item = self.myTreeWidget.itemAt(pos)
# If hovered over an item during drag, set UserRole = 1
if item:
index = self.myTreeWidget.indexFromItem(item)
self.myTreeWidget.model().setData(index, 1, Qt.UserRole)
# reset UserRole to 0 for all other indices
for i in range(self.myTreeWidget.model().rowCount()):
_index = self.myTreeWidget.model().index(i, 0)
if not item or index != _index:
self.myTreeWidget.model().setData(_index, 0, Qt.UserRole)
class MyDelegate(QStyledItemDelegate):
def paint( self, painter, option, index ):
QStyledItemDelegate.paint(self, painter, option, index)
painter.save()
data = index.model().data( index, Qt.UserRole ).toInt()
# if UserRole = 1 draw custom line
if data[1] and data[0] == 1:
line = QLine( option.rect.topLeft(), option.rect.topRight() )
painter.drawLine( line )
painter.restore()
```
| How to use Qt Delegates for custom painting? | CC BY-SA 2.5 | 0 | 2011-01-21T01:16:33.793 | 2011-01-21T04:05:31.663 | 2011-01-21T01:37:09.393 | null | null | [
"python",
"qt",
"pyqt"
]
|
4,754,708 | 1 | 4,763,670 | null | 10 | 23,910 | Using PrimeFaces 2.2.RC2 in a JSF 2.0 project.
I'm trying to get a basic Google Map to render with the gmap component. No errors show up just blank page where the map should be.
My .xhtml file
```
<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:p="http://primefaces.prime.com.tr/ui">
<h:head>
<script src="http://maps.google.com/maps/api/js?sensor=false"
type="text/javascript"></script>
</h:head>
<h:body>
<f:view contentType="text/html">
<h1>Google Map</h1>
<p:gmap center="41.381542, 2.122893" zoom="15" type="HYBIRD"
style="width:600px;height:400px" />
</f:view>
</h:body>
</html>
```
Not had any issues getting other PrimeFaces components to render in this project and the [example](http://www.primefaces.org/showcase/ui/gmapBasic.jsf) on the PrimeFaces website renders in my browser just fine.
Any ideas ?
I changed the view tag to `<f:view contentType="text/html">`, now I get a grey box where the map should be and when I hover over the box the curser turns to white hand to grab and move the map around, but still no map shows.

| PrimeFaces gmap not rendering | CC BY-SA 2.5 | 0 | 2011-01-21T01:58:08.377 | 2017-11-25T20:52:32.863 | 2011-01-21T14:27:47.863 | 50,262 | 50,262 | [
"google-maps",
"jsf",
"primefaces"
]
|
4,754,772 | 1 | 4,754,861 | null | 0 | 13,337 | For some reason when I try to set a `UL` background the background doesn't work. It works on my body background but it isn't working for the `UL`.
I know my image is named correctly. I have quadruple checked that. Here is my code:
```
<html>
<head>
<title>Header</title>
<link rel="stylesheet" type="text/css" href="css/Style.css" />
</head>
<body>
<div id="page-wrap">
<ul id="nav">
<li><a href="#">Link1</a></li>
</ul>
<p>Main</p>
</div>
</body>
</html>
```
```
body
{
background-image: url('../Images/body-background.jpg');
}
#page-wrap
{
width:1040px;
margin: 0 auto;
}
ul#nav
{
margin: 0 auto;
width: 1040px; height: 185px;
background-image: url('../Images/header-logo.jpg');
background-repeat: no-repeat;
}
```
From what it seems the `UL` itself isn't working with the `<a>` tag. Without it the "Link1" shows up. With it though nothing shows up. Either way the background isn't displaying.
Thanks!
| CSS - UL Background Not Working | CC BY-SA 2.5 | 0 | 2011-01-21T02:11:34.163 | 2012-08-09T23:57:16.657 | 2011-01-21T02:31:12.570 | 357,587 | 357,587 | [
"html",
"css",
"background-image",
"html-lists"
]
|
4,754,973 | 1 | 4,755,270 | null | 3 | 2,467 | So, I have this odd issue in my Cocoa app. A toolbar item, and some NSImageViews just render their image upside-down for no apparent reason. The toolbar item actually comes that way when I launch the App for some reason (the icon is assigned in code), and then, when I open my HUD with a finder zoom effect, the imageViews contained in it are upside down.

That image above is a screensot of this odd phenomenon. AS you can see, the "Show Trash" item is rotated oddly, every NSImageView in the HUD, but the NSImageView in the NSBrowser is fine.
How would I go about tracking down what is causing this, and then fixing it?
| Images in NSImageViews randomly turned upside-down | CC BY-SA 2.5 | 0 | 2011-01-21T02:59:47.453 | 2015-05-13T00:53:17.720 | 2011-01-21T03:24:15.717 | 219,515 | 219,515 | [
"cocoa",
"rotation",
"nsimageview"
]
|
4,755,241 | 1 | 4,771,314 | null | 2 | 1,154 |
When resizing a Flash object in IE, it's resize handler incorrectly thinks that only the stage width has been updated.
1. You roll over and click a Flash button
2. The button makes an ExternalInterface call to JS. JS resizes Flash among other things.
3. In all non-IE browsers, Flash is notified of the dimension change and executes its resize handler flawlessly. In IE8, the resize handler is called but is only its stage width has been updated. It still believes its height is the same.
4. To finally get IE8's Flash to acknowledge its true height, roll your mouse out of the SWF.
```
package {
import flash.external.*;
public class Player {
public function Player(container:Stage) {
this.container.addEventListener(Event.RESIZE, this.onResize);
}
public function expand():void {
ExternalInterface.call('expand');
}
public function onResize():void {
// float chrome buttons to the right
// float chrome to the bottom
}
}
}
```
```
// Using Prototype framework
function expand() {
$('flash').setStyle({
width: '500px',
height: '400px'
});
// do other stuff in JS too
}
```
The listener gets triggered fine in all browsers except Internet Explorer. There's no problem with the Javascript - I see the Flash getting resized. But the Actionscript listener doesn't get fired until I my mouse moves out of the SWF. What do I need to know about IE's rendering engine to fix this?

- IE's Flash is notified of the width change, but still thinks it's height is the same.

- you must roll your mouse out of the SWF for Flash to acknowledge its true height in IE8

| Resizing Flash in IE8 is buggy | CC BY-SA 2.5 | 0 | 2011-01-21T04:00:55.413 | 2011-04-25T17:00:23.327 | 2011-01-21T19:22:24.130 | 459,987 | 459,987 | [
"javascript",
"actionscript-3",
"internet-explorer",
"actionscript"
]
|
4,755,481 | 1 | 4,755,549 | null | 1 | 890 | I'm trying to connect Oracle database using ODP.NET but it's not working. I've installed ODP.net ( guess 11g ) for .NET and trying to connect 10g express edition which is installed on my local machine.
I've included following library in my code,
```
using System.Data;
using Oracle.DataAccess.Client;
using Oracle.DataAccess.Types;
using System.Data.OracleClient;
```
Still I'm getting "oracleconnection is a namespace but used like a type" error.

Any idea?
update :

Update:
By changing namespace as suggested below and modifying connecting string, it works. My connection string now,
```
string constr = "Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)
(HOST=host)(PORT=1521)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=XE)));
User Id=system; Password=password";
```
| ODP.NET and C# question | CC BY-SA 2.5 | null | 2011-01-21T04:48:14.740 | 2011-02-11T03:58:45.127 | 2011-02-11T03:58:45.127 | 210,916 | 263,357 | [
"c#",
"visual-studio",
"oracle"
]
|
4,755,638 | 1 | 4,755,789 | null | 1 | 361 | With a set of points in 3d. How would one go about finding the fewest set of triangles connecting those points; creating a set of triangles all sharing at least two of their sides? (like a square sheet with bumps in it made of triangles)
example points for a 5x100x500 area:
```
points = [
# Constant Points
(0 , 0 , 0 ),
(0 , 100, 0 ),
(5 , 100, 500),
(1 , 50 , 100),
(2 , 60 , 200),
(3 , 75 , 300),
(4 , 80 , 400),
(5 , 0 , 499),
]
```
Here's what the points plotted would look like with the axes normalized:

| Algorithm to make fewest triangles given points in 3d | CC BY-SA 2.5 | null | 2011-01-21T05:15:27.083 | 2019-02-04T17:30:37.657 | null | null | 501,408 | [
"graphics",
"3d",
"mapping",
"polygon"
]
|
4,755,859 | 1 | 4,774,921 | null | 0 | 914 | I have a disclosure button setup in a simple app I am working on that is using `BKToolkit`. I have hooked up a `Disclosure` button with `Push On Push Off` to the `toggleCollapse:` action in the SplitView. The button works in the aspect that it collapses and reveals the pane correctly. It does not work correctly to hold its own state consistent with the panels appearance.
The button starts with an upwards arrow to show the panel is open. Here is the sequence of events:
1. I press the button to close the panel. Disclosure arrow now faces down.
2. I press the button to reveal the panel. Disclosure arrow still faces down.
3. Any subsequent presses to the button change nothing. The arrow still faces down.
It animates correctly the first time so what is up the subsequent presses not changing the view state of the button?


This is the erroneous state:

| How to Get a Disclosure Button to Play Nicely With BKSplitView | CC BY-SA 2.5 | null | 2011-01-21T06:00:28.977 | 2011-01-23T16:33:11.413 | null | null | 69,634 | [
"cocoa",
"interface-builder",
"state",
"nsbutton",
"disclosure"
]
|
4,755,911 | 1 | 4,756,126 | null | 1 | 1,931 | Me working in Windows, so for Git I downloaded and installed msysGit-fullinstall-1.7.3.1 from [msysgit](http://code.google.com/p/msysgit/downloads/list). And run as specified there. Then I tried to get Gallery application from [Android open source project](https://android.git.kernel.org/?p=platform/packages/apps/Gallery.git;a=summary), as specified there in my git console:
```
git clone git://android.git.kernel.org/platform/packages/apps/Gallery.git
```
it shows the following error `No such file or directory`

What did I miss here? I don't if know is this the correct way to get code from Android on Windows.
| How to get code from git in windows | CC BY-SA 3.0 | null | 2011-01-21T06:07:17.713 | 2015-07-19T19:36:49.900 | 2015-07-19T19:36:49.900 | 64,046 | 477,754 | [
"android",
"git",
"window",
"android-source"
]
|
4,755,913 | 1 | 4,756,110 | null | 119 | 140,804 | I have been searching for some material that describes how to generate simple class diagrams with doxygen, but couldn't find one. Can anybody help?
I need to create diagrams as shown below from a set of C++ files.

If there are better tools to achieve this easier, please let me know.
| How to use doxygen to create UML class diagrams from C++ source | CC BY-SA 2.5 | 0 | 2011-01-21T06:07:37.747 | 2022-07-01T06:30:30.910 | 2011-01-21T06:13:49.140 | 94,169 | 94,169 | [
"c++",
"uml",
"doxygen",
"graphviz",
"class-diagram"
]
|
4,755,970 | 1 | 4,760,960 | null | 1 | 1,100 | I want to edit image in Qt application, I have use two `QLabel` and set two different image(using `QPixmap`) on each, now I wan to set one image over another(just like photo DJ set new Frame and Add Cartoons to Image).
I use drag and drop for this and I am able to move (drag) image, but this dragged image override another image. I want dragged image over second image and set position of dragged image on second image not override it.
I have added image that I want(Edit Image).

| Qt:: Edit Image | CC BY-SA 4.0 | 0 | 2011-01-21T06:17:00.740 | 2019-02-05T06:54:17.380 | 2019-02-05T06:54:17.380 | 10,237,950 | 472,882 | [
"qt",
"qlabel",
"qpixmap"
]
|
4,756,096 | 1 | 4,756,240 | null | 0 | 1,509 | In my website I am trying to download a CSV which comes from Yahoo. It contains some data.
I am using the code given below to download CSV.
I want to download and fetch all the data from Yahoo's CSV but the whole CSV is not getting created on my side.
Only some portion of the data is copied. So CSV is not downloaded with all its data.


```
HttpWebRequest wr = (HttpWebRequest)WebRequest.Create("http://download.finance.yahoo.com/d/quotes.csv?s=^DJI+^N225+^GSPC+^GDAXI+^FCHI+^HSI+^IXIC+^FTSE&f=l1d14n");
HttpWebResponse ws = (HttpWebResponse)wr.GetResponse();
Stream str = ws.GetResponseStream();
inBuf = new Byte[10000000];
int bytesToRead = Convert.ToInt32(inBuf.ToString().Length);
int bytesRead=0;
while(bytesToRead>0)
{
int n = str.Read(inBuf,bytesRead,bytesToRead);
if(n==0)
{
break;
}
bytesRead += n;
bytesToRead -= n;
}
FileStream fstr = new FileStream("C:\\VSS Working Folder\\20th Jan 11 NewHive\\NewHive\\CSV\\new.csv", FileMode.OpenOrCreate, FileAccess.Write);
fstr.Write(inBuf,0,bytesRead);
str.Close();
fstr.Close();
return "CSV Downloaded Successfully!";
```
What could be wrong?
| How to download a CSV file in website in ASP.NET | CC BY-SA 3.0 | 0 | 2011-01-21T06:39:56.773 | 2017-12-07T01:15:51.330 | 2017-12-07T01:15:51.330 | 472,495 | 463,857 | [
"c#",
".net",
"asp.net",
"csv",
"yahoo-finance"
]
|
4,756,182 | 1 | 4,756,228 | null | 0 | 132 | I have been working/learning HTML5 since couple of months and HTML 5 logo is out couple of days back. What it really means for different people like Developer, Users and Enterprises ?

| HTML 5 logo is out what it really means? | CC BY-SA 2.5 | null | 2011-01-21T06:51:25.790 | 2011-01-21T07:56:16.570 | null | null | 237,743 | [
"javascript",
"html"
]
|
4,756,207 | 1 | 4,791,029 | null | 1 | 901 | I have gone through all available study resources in the internet as much as possible, which are in form of simple equations, vectors or trigonometric equations.
I couldn't find the way of doing following thing:
Assuming Y is up in a 3D world.
I need to draw two 2D trajectories orthogonally (not the projections) for a 3D trajectory, say for side view of the trajectory and XZ-plane for top view for the same.
I have all the 3D points of the 3D trajectory, initial velocity, both the angles can be calculated by vector mathematics.
How should I proceed further?
refer:
Below a curve in different angles, which can loose its significance if projected along XY-plane. All I want is to convert the red curve along itself, the green curve along green curve and so on. and further how would I map side view to a plane. Top view is comparatively easy and done just by taking X and Z ordinates of each points.
I mean this the requirement. :)


| Convert 3D(x,y,z) to 2D(x,y) (orthogonal) along its direction | CC BY-SA 2.5 | null | 2011-01-21T06:56:05.527 | 2011-01-25T07:40:24.573 | null | null | 110,426 | [
"visual-c++",
"unmanaged",
"3d",
"curve",
"directx-9"
]
|
4,756,338 | 1 | null | null | 0 | 1,537 | While installing the Google extensions form chrome web store it shows some popup like "Google Chrome extension is now installed".
I want similarly, while login I need to show the login popup.
Please suggest me on this.

| Google Chrome extension installed popup | CC BY-SA 3.0 | null | 2011-01-21T07:18:02.373 | 2018-03-31T13:03:21.783 | 2018-03-31T13:03:21.783 | 5,124,009 | 529,041 | [
"google-chrome",
"google-chrome-extension"
]
|
4,756,447 | 1 | 4,756,699 | null | 10 | 18,093 | Can we set a background image to tabs like this?

| Can we set a background image to tabs? | CC BY-SA 3.0 | 0 | 2011-01-21T07:37:14.287 | 2012-01-02T20:50:39.013 | 2012-01-02T20:50:39.013 | 128,421 | 227,943 | [
"android",
"background",
"tabs"
]
|
4,756,542 | 1 | 4,756,567 | null | 30 | 176,079 | I can't understand this error:
In this call to method SetVolume, = 2055786000 and = 93552000. Volume is an Integer property, and size is also Integer, as you can see.
The class is a partial class of a dbml entity class, however this Volume property is NOT a column in the database, it exist only in the partial class, as a "business object property".
shows:
: In order to evaluate an indexed property, the property must be qualified and the arguments must be explicitly supplied by the user.

What may cause this...?
| Arithmetic operation resulted in an overflow. (Adding integers) | CC BY-SA 2.5 | null | 2011-01-21T07:50:37.173 | 2014-10-22T07:01:05.547 | null | null | 445,533 | [
"c#",
"vb.net",
"overflowexception"
]
|
4,756,601 | 1 | 4,760,445 | null | 2 | 1,607 | I have a text 'hello world' in my ActionScript3 file.
What I am trying to achieve is to make the middle portion of the text bigger in height.
So, it will start off with a small 'h' and then moving towards the middle, each letter's size will increase.
The exact thing is shown in this image -

[http://img180.imagevenue.com/img.php?image=96687_helloworld_122_632lo.jpg](http://img180.imagevenue.com/img.php?image=96687_helloworld_122_632lo.jpg)
Any ideas how I can achieve this? Thanks in advance.
| how to bend text in as3? | CC BY-SA 3.0 | 0 | 2011-01-21T07:59:04.357 | 2011-11-30T04:38:32.103 | 2011-11-30T04:38:32.103 | 234,976 | 612,553 | [
"flash",
"actionscript-3",
"flash-cs5"
]
|
4,756,615 | 1 | null | null | 1 | 1,588 | I 'm new to Flex (4) and just learning by doing! Recently i got the requirement to make a tabbar look like the following (got from a known site)

I think i have to use a skin!? If yes how to achieve this? Asking because this component has buttons in it!
Thanks in advance
| Customizing Flex (4) Tabbar | CC BY-SA 2.5 | null | 2011-01-21T08:01:41.747 | 2011-01-21T15:12:12.490 | 2011-01-21T15:12:12.490 | 225,180 | 225,180 | [
"apache-flex",
"skinning"
]
|
4,756,770 | 1 | 4,756,910 | null | 17 | 7,639 | In Eclipse I have a class outline view which shows me the :

I installed NetBeans 6.9.1 but can't find a window which shows me a list of the methods etc. in the class I am working on.

| Where is the "class outline view" in Netbeans for PHP? | CC BY-SA 2.5 | 0 | 2011-01-21T08:27:45.523 | 2011-01-21T08:49:40.763 | null | null | 4,639 | [
"php",
"netbeans"
]
|
4,756,850 | 1 | 7,305,075 | null | 3 | 841 | I want to draw Area Chart in Coldfusion. I know we can integrate with [WebCharts3D](http://www.gpoint.com/) but I don't know how to draw it.

| how to draw Area Chart in Coldfusion | CC BY-SA 2.5 | null | 2011-01-21T08:42:27.100 | 2011-09-07T07:39:35.900 | 2011-01-21T13:36:34.863 | 446,733 | 2,555,911 | [
"coldfusion",
"graph",
"charts"
]
|
4,757,064 | 1 | null | null | 1 | 1,605 | I have a table-cell which has all default settings. And I put an image on the ImageView on the left, and I put some random text on TextLabel.
and I adjust cell's height using below method.
-
The problem is the left ImageView's frame size is different depend on the cell's height.
See the below image, the 4th cell's height is bigger than others and it's image is slightly right compare to other images.
What causes this and how can I solve this probelm??

-- added
This is my cellForRowAtIndexPath method.
```
static NSString *CellIdentifier = @"Cell";
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil) {
cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefaultt reuseIdentifier:CellIdentifier] autorelease];
}
cell.textLabel.numberOfLines = 0;
cell.textLabel.text = [self GetSelectionForRowAtIndexPath:indexPath];
NSString *path = [[NSBundle mainBundle] pathForResource:@"icon_notSelected" ofType:@"png"];
UIImage *theImage = [UIImage imageWithContentsOfFile:path];
cell.imageView.image = theImage;
```
This shows the imageView does not get bigger even if I put more height on the cell.

| Fixing image-view in UITableViewCell in iPhone? | CC BY-SA 2.5 | null | 2011-01-21T09:09:54.177 | 2011-01-21T12:18:31.523 | 2011-01-21T12:18:31.523 | 197,018 | 197,018 | [
"iphone",
"uitableview"
]
|
4,757,207 | 1 | 4,759,265 | null | 0 | 1,552 | I’m a designer. I have a list of tasks, with hours, and I’ve split them into milestones. I want to count the number of hours for each milestone.
Here’s a picture:

I want to look at the value in the M column, if it’s 1, I want to get the cell across it, then repeat down the rows, and sum the whole lot.
See if you can figure that one out with the least cell wastage! :) (This is Numbers for Mac, so no macros or vbscript or what-have-you.)
| Advanced Excel: Sum of relative cells of a category | CC BY-SA 2.5 | null | 2011-01-21T09:27:08.240 | 2012-02-19T10:04:03.633 | 2012-02-19T10:04:03.633 | 21,234 | 241,292 | [
"excel",
"excel-formula"
]
|
4,757,531 | 1 | 4,757,623 | null | 0 | 3,501 | In my website I am reading a CSV file and parsing it. Now the CSV does not have a column names. It is simply a raw list of comma seperated values.
I take this file and use the ODBCDataReader class to read the rows.
The problem is that when I retrieve the first value it skips the first row of the CSV. This is probably because it considers first row as column header. But in my case there are no column headers. So every time my first row is skipped.
How can I retrieve the first row of my CSV?

```
public string CsvParser()
{
int _nNrRowsProccessed = 0;
string connectionString = @"Driver={Microsoft Text Driver (*.txt; *.csv)};Dbq=" + ConfigurationManager.AppSettings["CSVFolder"] + ";";
OdbcConnection conn = new OdbcConnection(connectionString);
try
{
conn.Open();
string strFileName = ConfigurationManager.AppSettings["CSVFile"];
string strSQL = "Select * from " + strFileName;
OdbcCommand cmd = new OdbcCommand();
cmd.Connection = conn;
cmd.CommandText = strSQL;
cmd.CommandType = CommandType.Text;
OdbcDataReader reader = cmd.ExecuteReader();
string strLine = null;
// MasterCalendar_DB.OpenMySQLConnection();
while (reader.Read())
{
// insert data into mastercalendar
strLine = reader[0].ToString();
string strLine1 = reader[1].ToString();
string strLine2 = reader[2].ToString();
string strLine3 = reader[3].ToString();
string[] arLine = strLine.Split(';');
// string strAgencyPropertyID = arLine[0];
// DateTime dt = DateTime.Parse(arLine[1]);
// Int64 nDate = (Int64)Util.ConvertToUnixTimestamp(dt);
// String strAvailability = (arLine[2]);
_nNrRowsProccessed++;
// MasterCalendar_DB.Insert(strAgencyPropertyID, nDate, strAvailability);
}
}
catch (Exception ex)
{
throw ex;
}
finally
{
conn.Close();
// MasterCalendar_DB.CloseMySQLConnection();
}
return "Success";
}
```
| Getting the top row from a CSV when it is not a header row | CC BY-SA 3.0 | null | 2011-01-21T10:10:16.463 | 2017-12-07T01:09:43.773 | 2017-12-07T01:09:43.773 | 472,495 | 463,857 | [
"c#",
".net",
"csv",
"odbc"
]
|
4,757,694 | 1 | 5,160,574 | null | 0 | 1,609 | I have a rootViewController like so:
Header:
```
@interface ParkingRootViewController : UIViewController {
UINavigationController *navigationController;
UIToolbar *toolbar;
UIBarButtonItem *lastUpdateLabel;
NSPersistentStoreCoordinator *persistentStoreCoordinator;
NSManagedObjectModel *managedObjectModel;
NSManagedObjectContext *managedObjectContext;
}
@property (nonatomic, retain) IBOutlet UINavigationController *navigationController;
@property (nonatomic, retain) IBOutlet UIToolbar *toolbar;
@property (nonatomic, retain) IBOutlet UIBarButtonItem *lastUpdateLabel;
@property (nonatomic, retain, readonly) NSManagedObjectModel *managedObjectModel;
@property (nonatomic, retain, readonly) NSManagedObjectContext *managedObjectContext;
@property (nonatomic, retain, readonly) NSPersistentStoreCoordinator *persistentStoreCoordinator;
@property (nonatomic, readonly) NSString *applicationDocumentsDirectory;
-(IBAction)selectHome:(id)sender;
//-(void)loadOverlays;
-(void)testCoreData;
@end
```
Implementation:
```
// Implement viewDidLoad to do additional setup after loading the view, typically from a nib.
- (void)viewDidLoad {
[super viewDidLoad];
//...
[self testCoreData];
//creating label in tool bar
UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(0.0f, 0.0f, 150.0f, 20.0f)];
label.text = @"last updated...";
label.textColor = [UIColor colorWithWhite:1.0 alpha:1.0];
label.backgroundColor = [UIColor clearColor];
label.textAlignment = UITextAlignmentCenter;
//label.highlightedTextColor = [UIColor colorWithWhite:0.5 alpha:1.0];
//label.highlighted = YES;
label.font = [UIFont systemFontOfSize:13.0];
label.userInteractionEnabled = NO;
[lastUpdateLabel initWithCustomView:label];
[label release];
[self.view addSubview:self.navigationController.view];
[self.navigationController.view setFrame:self.view.frame];
}
```
But I need to transfer my managedObjectModel to my table view and then to a map view so that the map view can make queries depending on what the user wants to see. I was consulting some apple sample code which looks like(from Recipes):
```
- (void)applicationDidFinishLaunching:(UIApplication *)application {
recipeListController.managedObjectContext = self.managedObjectContext;
[window addSubview:tabBarController.view];
[window makeKeyAndVisible];
}
```
I know that is in the appDelegate, but I figure that I can do the same when a row is selected or another view is pushed onto the stack, right? The problem is that I have configured most of my view with a nib which looks like so:

Due to this, I am unable to use a similar strategy that Apple employs to transfer a managedObjectModel to an alternate viewController(in this case PermitListViewController) because I don't access PermitListViewController directly when adding a subview. If anyone has any idea of how I would go about getting my managedObjectModel to my PermitListViewController. Please share! Thanks in advance!
EDIT: I am thinking of placing the managedObjectModel in a singleton class. What are your guys' thoughts on that? Good programming practice? Anything I should be aware of? Thanks.
| How To Pass ManagedObjectContext To Other View Controllers in Special Case | CC BY-SA 2.5 | null | 2011-01-21T10:27:51.657 | 2011-03-01T21:27:49.670 | 2011-01-21T22:38:11.567 | 347,339 | 347,339 | [
"core-data",
"ios4",
"nsmanagedobjectcontext",
"viewcontroller"
]
|
4,757,764 | 1 | 4,758,059 | null | 0 | 75 | I want to have an overview of the changes between two different branches of our project. Most of the diff tools (winmerge etc) provide a side-by-side listing of both dirs recussively, where you can see if the file is changed, missing in one side or equal, like this:

What I seeking is to have the same view, but adding a value that says '' in each file (and being able to order by it for example). Does somebody know of any tool that would provide something like that? I am interested in seeing that for example 10 files have heavily changed while hundreds maybe just have small cosmetic changes etc.
If there is none, then maybe it could be written, but first 'how much has changed' should have to be defined, does that concept already exist? Otherwise, what would you choose as a way to measure it:
- - -
Of course, some files might have been renamed...one might just ignore those for starters, or if given access to a repository that handles renames (Hg or git) probably it is possible to find what files were renamed between the two branches and compare them as the rest.
I have seen [this question](https://stackoverflow.com/questions/4376977/metrics-for-change-size-when-using-diff-tools) but I am not looking for something that just works in a given language.
| tool to list files from two branches of code ordering by how much each file changed | CC BY-SA 2.5 | null | 2011-01-21T10:35:47.397 | 2011-01-21T11:07:40.467 | 2017-05-23T12:13:29.270 | -1 | 101,762 | [
"git",
"diff",
"metrics"
]
|
4,757,869 | 1 | 4,758,121 | null | 6 | 1,767 | I'm using a COM object from .NET using interop. The object basically fetch data from socket and fire some events for .NET layer to process. However, after a while, the COM object stops firing events which revealed later to be because it's collected by GC.
The structure of source code is similar to this one below:
```
static void Main(string[] args)
{
MyEventGen gen = new MyEventGen();
WeakReference wr = new WeakReference(gen);
gen.ReceiveDataArray +=
new _IMyEventGenEvents_ReceiveDataArrayEventHandler(gen_ReceiveDataArray);
while (true)
{
Thread.Sleep(1000);
Console.WriteLine(wr.IsAlive);
}
}
static void gen_ReceiveDataArray(ref Array indices, ref Array values)
{
// do nothing
}
```

What I know so far:
- From what I understand, `gen` Since the object is still active in the `Main` scope. But the result so far shows that the object was collected by GC.- The object is only garbage-collected when built as . Running the Debug builds / running both modes under debugger are fine.- The program will print the first "False" precisely after the .- By accessing the object in the `while` loop, e.g. `Console.WriteLine(gen.ToString())` , prevent it from being GC'd!- By adding another static field of `Program` class to keep its reference also prevent it from GC'd.- Trying with different load of data, I found that GC only collects the object when Private Bytes reach over the threshold of ~ 3X MBs.- Checking with [CLRProfiler](http://msdn.microsoft.com/en-us/library/ff650691.aspx), mentioned object was GC'd as suspected.
Have I missed some important .NET GC's concepts? Is it possible to obtain the reason for object being GC'd? Is this, possibly, a known GC bug?
I'm using VS 2008 + .NET 3.5 SP1. Appreciate your thoughts. Thanks!
| Is this COM object subject to garbage collection? | CC BY-SA 2.5 | 0 | 2011-01-21T10:46:50.720 | 2011-01-21T11:14:04.120 | 2011-01-21T11:04:08.283 | 12,460 | 12,460 | [
"c#",
".net",
"com",
"garbage-collection",
"com-interop"
]
|
4,757,887 | 1 | 4,760,896 | null | 0 | 1,149 | Downloaded and installed the Tao framework. But visual studio shows no clue about it. I thought it will find automatically. Does it have anything to do with GAC? Here is a snapshot:

| Can't find reference Tao.OpenGl and Tao.Platform.Windows in Add reference window in MSV C# 2010 Express Edtn | CC BY-SA 2.5 | null | 2011-01-21T10:49:02.287 | 2014-01-16T07:55:17.827 | 2014-01-16T07:55:17.827 | 596,545 | 474,986 | [
"c#",
"visual-studio-2010",
"opengl",
"tao-framework"
]
|
4,758,071 | 1 | null | null | 7 | 2,582 | I am trying to understand how a traceview works. I have tried to analyze a method using the traceview but have a query about it.
I have attached the snapshot of the .trace. It indicates that the majority time is taken by (toplevel) marked in blue. however no further info is available on the same. (when this method is executed or what function it performs.)

Can anyone please explain to me why its consuming so much time?
Thanks in advance!
| Understanding Traceview | CC BY-SA 2.5 | 0 | 2011-01-21T11:08:35.303 | 2012-04-14T18:44:51.367 | 2011-01-22T10:59:04.790 | 366,053 | 366,053 | [
"android"
]
|
4,758,095 | 1 | 4,758,119 | null | 7 | 12,842 | I'm looking for a way to select the row in which the current time is between two set values in the row. I've set up a table with 3 columns, 2 of them hold a timestamp (HH:MM:SS), the other one a string. Is there a way I can get the string corresponding to the current time?
To put it in a more abstract way:
SELECT String FROM TableName WHERE (Current Time) BETWEEN (Lower Limit Time Value) AND (Upper Limit Time Value);

So basically, based on the current time, my script should output the correct string.
How do I go about this?
Thanks!
| MySQL Select: WHERE (time now) = BETWEEN tablevalue AND tablevalue | CC BY-SA 2.5 | null | 2011-01-21T11:11:16.460 | 2011-01-21T16:45:21.577 | null | null | 408,089 | [
"mysql",
"select",
"time",
"where-clause"
]
|
4,758,186 | 1 | 4,758,260 | null | 0 | 3,521 | 
I get data from a web service as JSON data. The displayed data is shown in the image: it's basically a class called Questionnaire which has two properties which are QuestionnaireId and QuestionnaireName. So the web service method I call returns a collections of this class Questionnaire.
I am trying to parse this data to an HashTable which I am not able to. Kindly help me get this data parsed into a `Hashtable<QuestionnaireId,QuestionnaireName>`.
| Android parse JSON data into a HashTable? | CC BY-SA 2.5 | 0 | 2011-01-21T11:19:59.833 | 2011-01-21T11:41:43.490 | 2011-01-21T11:22:13.710 | 28,169 | 581,157 | [
"android"
]
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.