Id
int64 1.68k
75.6M
| PostTypeId
int64 1
2
| AcceptedAnswerId
int64 1.7k
75.6M
⌀ | ParentId
int64 1.68k
75.6M
⌀ | Score
int64 -60
3.16k
| ViewCount
int64 8
2.68M
⌀ | Body
stringlengths 1
41.1k
| Title
stringlengths 14
150
⌀ | ContentLicense
stringclasses 3
values | FavoriteCount
int64 0
1
⌀ | CreationDate
stringlengths 23
23
| LastActivityDate
stringlengths 23
23
| LastEditDate
stringlengths 23
23
⌀ | LastEditorUserId
int64 -1
21.3M
⌀ | OwnerUserId
int64 1
21.3M
⌀ | Tags
list |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
5,654,831 | 1 | 5,752,773 | null | 6 | 4,183 |
I have a triangle (red, below).
How can I compute the polygons (and in turn tessellate them) that result from subtracting a second triangle (green) from the first?

(I'm using Python and I'm looking for an explanation and pseudo-code of an approach I can take, rather than recommendations for opaque libraries. (I currently use [gluTess*()](http://pyopengl.sourceforge.net/documentation/manual/gluTessBeginPolygon.3G.xml) to do the tessellation of polygons, but an explanation of how to do the tesselltation myself would be interesting; my pressing problem is really the Boolean operation itself though.) It will be exciting to learn and understand the solution. My triangles are always counter-clockwise winding, if that makes any difference.)
|
split triangles on overlap
|
CC BY-SA 3.0
| 0 |
2011-04-13T19:54:12.670
|
2011-04-22T12:23:44.397
|
2011-04-14T18:13:54.510
| 15,721 | 15,721 |
[
"geometry",
"2d"
] |
5,654,882 | 1 | 5,655,072 | null | 0 | 3,984 |
I want to place one DIV (ID eSharing) at the bottom of another DIV (content-primary)
Here is the CSS class for DIV (ID content-primary)
```
.layout-3 #content-primary {
padding: 0 10px;
width: 502px;
}
#content-primary.article {
padding-bottom: 2.5em;
}
#content-primary {
width: 501px;
}
#content-primary {
clear: left;
float: left;
margin: 12px 0 0;
padding: 0 10px;
width: 500px;
}
```
Here is the CSS class for DIV ( ID eSharing)
```
#eSharing {
height: 230px;
margin: 12px 0 0;
overflow: auto;
padding: 0 10px;
position: relative;
}
```
Screeshot link [http://i.stack.imgur.com/bMqXD.png](https://i.stack.imgur.com/bMqXD.png)
Screenshot 2 

|
How to place a Div at the bottom of another div?
|
CC BY-SA 3.0
| null |
2011-04-13T19:58:29.310
|
2011-04-13T20:56:48.623
|
2011-04-13T20:33:07.390
| 395,198 | 395,198 |
[
"css"
] |
5,655,052 | 1 | 5,655,286 | null | 1 | 2,341 |
a other stupid question from my side ;) I have some issues with the following snippet with len(x)=len(y)=7'700'000:
```
from numpy import *
for k in range(len(x)):
if x[k] == xmax:
xind = -1
else:
xind = int(floor((x[k]-xmin)/xdelta))
if y[k] == ymax:
yind = -1
else:
yind = int(floor((y[k]-ymin)/ydelta))
arr = append(arr,grid[xind,yind])
```
All variables are floats or integers except `arr` and `grid`. `arr` is a 1D-array and `grid` is a 2D-array.
My problem is that it takes a long time to run through the loop (several minutes). Can anyone explain me, why this takes such a long time? Have anyone a suggestion? Even if I try to exchange `range()` through `arange()`then I save only some second.
Thanks.
Sorry. Forgot to tell that I'm importing `numpy`
I have some points in a 2D-grid. Each cell of the grid have a value stored. I have to find out which position the point have and apply the value to a new array. That's my problem and my idea.
p.s.: look at the picture if you want to understand it better. the values of the cell are represented with different colors.

|
reduce time for a long for-loop in python
|
CC BY-SA 3.0
| 0 |
2011-04-13T20:15:46.377
|
2011-04-13T21:11:21.130
|
2011-04-13T20:54:32.957
| 654,052 | 654,052 |
[
"python",
"for-loop",
"numpy"
] |
5,655,082 | 1 | null | null | 0 | 4,868 |
I have a simple windows installer package that I created. All it does is install 2 .dll's into the GAC. This is a production machine, so as I understand it, it is a best practice to install to the GAC in this way (as opposed to using gacutil.exe, etc.)
This installer works fine on another server that I have for testing. The server it works on, however, is just a plain vanilla installation of Win2k3, with nothing else installed. The production server this installer is failing on is a Win2k3 box with service packs, and a load of other software on it.
I am not sure how to go about troubleshooting this. There are no events thrown in the even logs, etc. No indication of what is wrong. [This question on MSDN](http://social.msdn.microsoft.com/forums/en-US/winformssetup/thread/c13c32d0-aaca-4547-a2cf-2d04ad13ef9a) has some hints, but I can't seem to find any real answers.

|
Windows installer failing with error "Error writing to file: System.Web.Extensions.dll. Verify that you have access to that directory."
|
CC BY-SA 3.0
| null |
2011-04-13T20:18:09.400
|
2011-04-14T11:19:51.457
| null | null | 568,289 |
[
"windows-installer",
"gac"
] |
5,655,130 | 1 | 5,655,190 | null | 0 | 954 |
Been trying to figure this one out for a while, and decided to see if any of you could offer some light on the subject.
I have a menu/navigation with the page title in bold at the top, and a lighter description beneath it (see image below).

[http://cl.ly/5yiV](http://cl.ly/5yiV)
When hovered over, I want the menu items to display as follows:

[http://cl.ly/5ylG](http://cl.ly/5ylG)
I want it so that both lines of text change colour whether the top 'About Me' or the bottom 'Who am I?' is hovered over.
At the moment, I'm currently only able to get either line to change colour on hover.
Could anybody please help me to solve this?
|
CSS: Menu text hover effects (dual styles) help required
|
CC BY-SA 3.0
| null |
2011-04-13T20:21:53.760
|
2011-12-20T23:45:55.377
|
2011-12-20T23:45:55.377
| 597,607 | 706,767 |
[
"css",
"navigation"
] |
5,655,162 | 1 | null | null | 0 | 69 |
I was interested when I just used the toolTip control for the first time because it caused an additional property to appear on the button that was already present.
The ability to write user control that is "aware" of the other controls on the form is something I'd like to have in my bag of tricks.
Can someone give me a pointer to if this is reasonably straightforward and the starting point for learning how?

|
how does the tool tip control "talk" to the other controls on the form?
|
CC BY-SA 3.0
| null |
2011-04-13T20:24:59.023
|
2011-04-13T20:27:42.880
| null | null | 398,546 |
[
"c#",
"winforms",
"tooltip"
] |
5,655,180 | 1 | 5,655,493 | null | 2 | 2,991 |
I'm trying to draw a 5 pointed star shape in openGL (Java) that is both filled and outlined. The code i'm using to draw it
```
gl.glPushAttrib(GL.GL_ALL_ATTRIB_BITS);
try {
// set attributes for filling the shape
Color fillColor = Color.GREEN;
float[] rgb = fill.getRGBColorComponents(null);
gl.glColor4f(rgb[0], rgb[1], rgb[2], 1f);
gl.glEnable(GL.GL_POLYGON_SMOOTH);
gl.glPolygonMode(GL.GL_FRONT_AND_BACK, GL.GL_FILL);
gl.glEnable(GL.GL_POLYGON_OFFSET_FILL);
gl.glCallList(this.glListId);
// set attributes for outlining the shape
gl.glEnable(GL.GL_LINE_SMOOTH);
Color outline = Color.RED;
float[] rgb = outline.getRGBColorComponents(null);
gl.glColor4f(rgb[0], rgb[1], rgb[2], 1f);
gl.glPolygonMode(GL.GL_FRONT_AND_BACK, GL.GL_LINE);
gl.glLineWidth(5);
gl.glCallList(this.glListId);
}
finally {
gl.glPopAttrib();
}
```
The creation of the call list just looks like:
```
gl.glNewList(this.glListId, GL.GL_COMPILE);
gl.glBegin(GL.GL_POLYGON);
for (int j = 0; j < xCoords.length; j++) {
// 2d polygon
gl.glVertex2d(xCoords[j], yCoords[j]);
}
gl.glEnd();
```
When I do this, the outline of the star draws perfectly, but the fill color bleeds outside the edges of the outline (if I draw it without the outline, the polygon looks does not look crisp either). Any ideas why?
EDIT: I added a screenshot showing the problem

thanks,
Jeff
|
OpenGL filled polygon color "bleeding"
|
CC BY-SA 3.0
| null |
2011-04-13T20:26:37.320
|
2011-04-13T21:25:00.937
|
2011-04-13T21:25:00.937
| 121,993 | 121,993 |
[
"opengl"
] |
5,655,224 | 1 | null | null | 7 | 1,522 |
I'm trying to take a table of motorsport lap positions and plot a lap chart similar to this [http://www.fia.com/en-GB/sport/championships/f1/2010/bahrain/Pages/lap_chart.aspx](http://www.fia.com/en-GB/sport/championships/f1/2010/bahrain/Pages/lap_chart.aspx).
Each row corresponds to a lap, with the first lap in the first row. The car numbers are listed across each row in the order they pass the start/finish line
The table may look like this (4-car race, 6 laps:
1 3 2 4
1 3 2 4
1 3 4 2
3 1 4 2
3 1 4 2
3 4 1 2
In the above example, the order was 1,3,2,4 after the first lap, and by the end of the 6-lap race, car 3 won, car 4 was in second, and so on.
It's easy to plot this incorrectly, I did this:
```
ListLinePlot[Table[Position[data,x],{x,4}]]
```

This does produce a lap chart, but it has 1st position at the bottom and 4th position at the top, and what I really need is the y-axis to run 4-3-2-1 so 1st position is at the top.
How can I reverse the y-axis so it runs from 1(top) to n(bottom)?
|
Motorsport Lap Chart using ListLinePlot
|
CC BY-SA 3.0
| 0 |
2011-04-13T20:30:18.640
|
2012-05-18T14:19:05.610
|
2012-01-03T22:07:02.963
| 615,464 | 706,784 |
[
"wolfram-mathematica",
"plot"
] |
5,655,513 | 1 | 5,657,471 | null | 0 | 46 |
Good day. In WordPress via Settings -> Reading, I updated the page my posts get output (see screen shot). New page is called Blog. It's parent page is News.
Posts are displaying fine, however, for the Blog page, is_home() is now true!?!. It's URL is unchanged (/news/blog).
A little background: Under the hood I sniff each page to determine what sub nav to display. Since the posts page thinks it's the home page, no sub nav is output, which is not correct.
Why it would lose it's true parent and think that it's the home page now? Is this by design? Any way around this?
WordPress version:3.1 / Theme: Starkers
Thanks.

|
Wordpress page heirachy is forgotten when I change posts' page
|
CC BY-SA 3.0
| null |
2011-04-13T20:55:48.050
|
2011-04-14T01:07:51.090
| null | null | 336,369 |
[
"php",
"wordpress"
] |
5,655,604 | 1 | 5,655,732 | null | 5 | 2,047 |
i have a webpage, scrollbar is not needed but still i get a scroll bar.
and i get a section which is outside of the html tags.
there is a brown part color of the body which appear outside of the html
i use firebug and when i put my mouse over the html tag it highlight the entire page except
the brown part at the bottom
the page url is [link](http://satorika.co.il/search.php?whatodo_ddtext=&howmany_text=&Result_Set=0&Free_search=0&where_ddtext=&howlong_ddtext=&whatbudget_ddtext=)
here is a picture the page bottom should be the black part.

|
content outside of the html tag
|
CC BY-SA 3.0
| 0 |
2011-04-13T21:03:34.740
|
2011-04-13T21:17:28.640
| null | null | 486,209 |
[
"html",
"css",
"scrollbar"
] |
5,655,807 | 1 | 5,655,981 | null | 6 | 20,338 |
first of all here is the message
> The changes to the database were
committed successfully, but an error
occurred while updating the object
context. The ObjectContext might be in
an inconsistent state. Inner exception
message: A referential integrity
constraint violation occurred: The
property values that define the
referential constraints are not
consistent between principal and
dependent objects in the relationship.
the problem happens when i try to insert new data in the entityframework
---
My entity model

in the database i set the relation to cascade on delete and update. that is the only change i made to the relation
---
My Action Method :
```
[HttpPost]
public ActionResult CompleteRegisteration(RegisterViewModel model)
{
if (!ModelState.IsValid)
{
return View(model);
}
var user = new User
{
DisplayName = model.DisplayName,
FullName = model.Name,
Email = model.Email,
};
user.AuthenticationTokens.Add(new AuthenticationToken
{
ClaimedIdentifier = model.ClaimedIdentifier,
DisplayName = model.Email
});
_userRepository.InsertOrUpdate(user);
_userRepository.Save();
return RedirectToAction("Index", "Home");
}
```
---
and the user repository methods :
```
private readonly StoryWritingEntities context = new StoryWritingEntities();
public void InsertOrUpdate(User user)
{
context.Users.Attach(user);
context.ObjectStateManager.ChangeObjectState(user,
user.Id == default(int)
? EntityState.Added // if true then this is a new entry
: EntityState.Modified); // if false this is an Existing entry
}
public void Save()
{
context.SaveChanges();
}
```
---
the problem is caused by `context.SaveChanges()` there is a record inserted in the users table but nothing is inserted in the AuthenticationTokens table
|
error occurred while updating the object context
|
CC BY-SA 3.0
| 0 |
2011-04-13T21:21:02.000
|
2019-09-11T00:00:56.560
|
2012-06-07T18:03:41.030
| 41,956 | 386,941 |
[
"c#",
".net",
"entity-framework",
"exception"
] |
5,656,035 | 1 | 5,656,151 | null | 3 | 535 |
I'm building a business application which mostly involves tables and other typical form elements. Due to the nature of my application however, I need to place groups of these elements together in a dynamic tree structure which will take up all of the available screen real estate. If real estate is low, there will be some form of smart scrolling allowing users to focus on certain areas of the tree. It could be called an advanced data visualization web form.
Historically, I would have accomplished this by simply using divs and javascript. The canvas element however seems like a more logical way to build my structure. Most uses of the canvas element that I can find are however geared towards graphics and animations (mostly games). Is canvas overkill for this? Will I benefit from using it? Are there alternatives?

|
Is Canvas overkill for a business application?
|
CC BY-SA 3.0
| null |
2011-04-13T21:41:25.943
|
2013-05-23T14:42:56.410
|
2011-04-13T23:21:38.387
| 41,662 | 41,662 |
[
"html"
] |
5,656,354 | 1 | 5,656,545 | null | 0 | 660 |
I have looked through dozens and dozens of sliders but can't find the one I need. I am trying to match the one in the picture below (an artist mock up). Does anyone know a jQuery slider that can do this?

The closest one I found is below, but it is still missing the look and scroll:
[http://demo.webdeveloperplus.com/featured-content-slider/](http://demo.webdeveloperplus.com/featured-content-slider/)
Thanks for any help.
|
jQuery Content Slider with Scrolling (pic attached)?
|
CC BY-SA 3.0
| null |
2011-04-13T22:17:56.093
|
2011-04-14T00:15:50.857
|
2011-04-14T00:15:50.857
| 235,334 | 235,334 |
[
"javascript",
"jquery",
"jquery-plugins"
] |
5,656,742 | 1 | 5,657,277 | null | 4 | 1,778 |
For a site we're developing we've been using [Lato](http://www.google.com/webfonts/family?family=Lato&subset=latin) from Google's WebFonts API. It works perfectly in every browser (even IE), except for one very important case: Firefox 3.6 on Windows XP (haven't tested in Win 7 yet). The font loads and is displayed, but the characters look awful, like antialiasing completely malfunctioned.

My googling has found hits about problems with webfonts in FF4 due to a bug in the browser, but I can't find anything about 3.6. Is there something we can do to fix this?
|
WebFont loaded from Google Font API looks awful in Firefox 3.6 on Windows only
|
CC BY-SA 3.0
| 0 |
2011-04-13T23:05:13.080
|
2011-04-14T00:33:12.803
|
2011-04-14T00:33:12.803
| 110,189 | 110,189 |
[
"css",
"font-face",
"firefox3.6",
"google-webfonts"
] |
5,656,933 | 1 | null | null | 6 | 6,999 |
I know this might have been asked thousands time, I tried changing the background for my UITablewViewCell via the following:
```
cell.contentView.backgroundColor = [UIColor colorWithRed:0 green:0.188235 blue:0.313725 alpha:1];
cell.textLabel.backgroundColor = [UIColor colorWithRed:0 green:0.188235 blue:0.313725 alpha:1];
```
and all I have now is:

How do I set that accessory view background view color as well?
I have a section header on top in which it has a white background
|
changing UITableViewCell background
|
CC BY-SA 3.0
| 0 |
2011-04-13T23:36:35.060
|
2012-09-24T15:01:53.353
|
2011-04-14T01:47:43.663
| 95,265 | 95,265 |
[
"iphone",
"objective-c"
] |
5,657,423 | 1 | 5,658,064 | null | 1 | 1,967 |
When saving a new image with `ImageIO` generic `ImageWriteParam` supports explicit setting of `compressionQuality` parameter from range `0.0f` (high compression) to `1.0f` (high quality) regardless of image compression algorithm used (eg. png, jpeg, gif).
- `compressionQuality`- `compressionQuality``ImageWriter`


I managed to read `IIOMetadata` from `ImageInputStream` and iterate through its `metadataFormatNames` to print out image metadata in different XML formats (native and standard `javax_imageio_1.0`, usually). Although I couldn't find any indication of image's `compressionQuality` in there.
|
How to get image compression quality from IIOMetadata?
|
CC BY-SA 3.0
| 0 |
2011-04-14T00:57:24.440
|
2011-04-14T03:36:22.907
| null | null | 68,119 |
[
"java",
"jpeg",
"javax.imageio",
"gimp",
"image-compression"
] |
5,657,458 | 1 | 5,657,470 | null | 2 | 117 |
I am currently checking out other commits by using a commit's full hash id:
```
git checkout b56da2b535106d6df6d7caebfd455dd65b70eaf6
```
but this is a bit boring. Isn't there another way to do it? Maybe only typing the first letters of the hash or something? I have the idea of having read something alone those lines but I am not too sure about it.
Thanks
Ed
|
Easier way to do checkouts in git than to have to type the full commit's hash id
|
CC BY-SA 3.0
| null |
2011-04-14T01:04:11.160
|
2011-04-14T04:03:12.207
|
2011-04-14T03:54:08.960
| 130,758 | 130,758 |
[
"git",
"version-control"
] |
5,657,979 | 1 | 5,658,039 | null | 3 | 9,386 |
I have a web page with the main menu on the top. Then on individual pages, I have a table with some textboxes, etc in the table. When I mouse hover above the menu to get the drop down, it hides behind my textboxes, etc. Now it does this on some pages and not on others, and each page is basically contructed the same way. So I'm kind of lost.
Help?

|
Menu showing behind textboxes, labels. ASP.NET/C#
|
CC BY-SA 3.0
| 0 |
2011-04-14T02:44:16.693
|
2011-04-14T03:06:15.707
|
2011-04-14T02:47:13.750
| 102,937 | 669,913 |
[
"c#",
"asp.net",
"visual-studio"
] |
5,658,012 | 1 | 5,659,102 | null | 0 | 2,201 |
I am trying to implement the expand/collapse table view cell as explained [here](http://www.cocoanetics.com/2011/03/expandingcollapsing-tableview-sections/). The modification that I have is that I want this to be a full expand/collapse table view. So each section can be collapsed/expanded. I looked at Apple's example and it seems to be an overkill.
The issue I am facing currently is mainly due to the formatting and color issues. The functionality seems to be fine. I wanted the section header to have a white background and the rows to have a blue background. Here's my code:
```
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
static NSString *CellIdentifier = @"Cell";
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil) {
cell = [[[UITableViewCell alloc] initWithFrame:CGRectZero reuseIdentifier:CellIdentifier] autorelease];
}
if (dimension.selectedSegmentIndex == 0){
if (!indexPath.row)
{
cell.textLabel.font = [UIFont fontWithName:@"Arial-BoldMT" size:18];
cell.textLabel.text = [timeslot objectAtIndex:indexPath.section];
if ([expandedSections containsIndex:indexPath.section])
{
cell.accessoryView = [DTCustomColoredAccessory accessoryWithColor:[UIColor grayColor] type:DTCustomColoredAccessoryTypeUp];
}
else
{
cell.accessoryView = [DTCustomColoredAccessory accessoryWithColor:[UIColor grayColor] type:DTCustomColoredAccessoryTypeDown];
}
}
else
{
// all other rows
cell.contentView.backgroundColor = [UIColor colorWithRed:0 green:0.188235 blue:0.313725 alpha:1];
cell.textLabel.backgroundColor = [UIColor colorWithRed:0 green:0.188235 blue:0.313725 alpha:1];
cell.textLabel.font = [UIFont fontWithName:@"Arial" size:14];
cell.textLabel.textColor = [UIColor whiteColor];
NSArray *listItems = [[timeslot objectAtIndex:indexPath.section] componentsSeparatedByString:@":"];
if (indexPath.row == 1){
cell.textLabel.text = [NSString stringWithFormat:@"%@:00 - %@:15", [listItems objectAtIndex:0], [listItems objectAtIndex:0]];
}
if (indexPath.row == 2){
cell.textLabel.text = [NSString stringWithFormat:@"%@:15 - %@:30", [listItems objectAtIndex:0], [listItems objectAtIndex:0]];
}
if (indexPath.row == 3){
cell.textLabel.text = [NSString stringWithFormat:@"%@:30 - %@:45", [listItems objectAtIndex:0], [listItems objectAtIndex:0]];
}
if (indexPath.row == 4){
cell.textLabel.text = [NSString stringWithFormat:@"%@:45 - %d:00", [listItems objectAtIndex:0], ([[listItems objectAtIndex:0] intValue] + 1)];
}
}
}
if (dimension.selectedSegmentIndex == 1){
Discount * discount = [tableData objectAtIndex:indexPath.row];
cell.textLabel.text = discount.vendor;
}
return cell;
}
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
[manager loadObjectsAtResourcePath:@"/route.json" objectClass:[Location class] delegate: self];
RouteMapViewController * routemap = [[RouteMapViewController alloc] initWithNibName:@"RouteMapViewController" bundle:nil];
UIBarButtonItem *backButton = [[UIBarButtonItem alloc] initWithTitle:@"Back"
style: UIBarButtonItemStyleBordered
// style: UIBarButtonItemStylePlain
// style: UIBarButtonItemStyleDone
target:nil
action:nil];
self.navigationItem.backBarButtonItem = backButton;
[backButton release];
if (dimension.selectedSegmentIndex == 0){
if (!indexPath.row)
{
// only first row toggles expand/collapse
[preference deselectRowAtIndexPath:indexPath animated:YES];
NSInteger section = indexPath.section;
BOOL currentlyExpanded = [expandedSections containsIndex:section];
NSInteger rows;
NSMutableArray *tmpArray = [NSMutableArray array];
if (currentlyExpanded)
{
rows = [self tableView:preference numberOfRowsInSection:section];
[expandedSections removeIndex:section];
}
else
{
[expandedSections addIndex:section];
rows = [self tableView:preference numberOfRowsInSection:section];
}
for (int i=1; i<rows; i++)
{
NSIndexPath *tmpIndexPath = [NSIndexPath indexPathForRow:i
inSection:section];
[tmpArray addObject:tmpIndexPath];
}
UITableViewCell *cell = [tableView cellForRowAtIndexPath:indexPath];
if (currentlyExpanded)
{
[preference deleteRowsAtIndexPaths:tmpArray
withRowAnimation:UITableViewRowAnimationTop];
cell.accessoryView = [DTCustomColoredAccessory accessoryWithColor:[UIColor grayColor] type:DTCustomColoredAccessoryTypeDown];
}
else
{
[preference insertRowsAtIndexPaths:tmpArray
withRowAnimation:UITableViewRowAnimationTop];
cell.accessoryView = [DTCustomColoredAccessory accessoryWithColor:[UIColor grayColor] type:DTCustomColoredAccessoryTypeUp];
}
}
}
```
Here's what I expect it to look like (the font of the section is wrong as I've set it to Arial Bold, but it's not here)

Here's what I get when expanding the bottom section:

This mess started to happen after I scroll the UITableView to expand a later entry... I guess it has to do with updating the view..
|
messy UITableViewCell with expand/collapse
|
CC BY-SA 3.0
| null |
2011-04-14T02:49:48.960
|
2011-04-14T07:31:08.337
|
2011-04-14T05:21:46.253
| 95,265 | 95,265 |
[
"iphone",
"objective-c",
"uitableview"
] |
5,658,759 | 1 | 5,659,743 | null | 3 | 1,592 |
I've got a class I wrote to work with the front end (web browser side) of a shopping cart.
It's fairly simple in that I send the class a product ID that I bury in the URL and then query a database populating the classes variables for use in retrieving the data through some public methods.
To interface with my actual physical web page I have a file I call viewFunctions.php. Wherein I instantiate my class called ItemViewPackage():
```
<?php
require_once(dirname(__FILE__) . '/ItemViewPackage.php');
$viewObject = new ItemViewPackage($_GET['page']);
```
So, I have shoppingcartpage.php (the physical url) that requires the file viewFunctions.php that loads my class ItemViewPackage().
The output page shoppingcartpage.php calls functions like get_item_info('title') or get_item_info('price') which in the viewFunctions.php file is made like so:
```
function get_info($type){
echo $viewObject->get_info($type);
}
```
Now, right off the bat, this isn't working because, I assume, $viewObject is not global. So I make $viewObject global like so:
```
function get_info($type){
global $viewObject;
echo $viewObject->get_info($type);
}
```
But, this doesn't work either, I still get an error for "`Call to a member function get_info() on a non-object`"
Now, the only thing that works is:
```
function get_info($type){
$viewObject = new ItemViewPackage($_GET['page']);
echo $viewObject->get_info($type);
}
```
But, I don't want to re-instantiate my object every time I make a call to this function (which is several times for several bits of information). I'd rather instantiate once at the top of my viewFunctions.php doc and use that object every time I call this function.
Am I going about this completely wrong?
Thanks in advance.
DIAGRAM (hopefully it helps visualize)


|
Avoiding Multiple Class Instantiations of Single Class PHP?
|
CC BY-SA 3.0
| 0 |
2011-04-14T04:57:50.930
|
2011-04-14T09:09:20.730
|
2011-04-14T05:37:00.973
| 183,806 | 183,806 |
[
"php"
] |
5,658,992 | 1 | null | null | 0 | 6,380 |
How to make iPhone back button in CSS3?
Using only `<a href="#">Back</a>` and the button should look similar in iphone safari and

In the given answer The button is really made by without image. But the html code is not semantic
```
<a href="#">
<div class="body">
<div>
<span></span>
</div>
<p>Back</p><p>
</p></div>
</a>
```
Is there any other better semantic way to make this button with less complicated code?
like with this code
```
<a href="#">
<span>Back</span>
</a>
```
I'm only considering CSS3 supported browser.
---
|
How to make iphone angled back button using CSS or SVG with semantic html mobile website (iPhone, Android)?
|
CC BY-SA 3.0
| 0 |
2011-04-14T05:37:23.713
|
2017-04-29T16:03:33.580
|
2017-04-29T16:03:33.580
| 1,033,581 | 84,201 |
[
"android",
"html",
"mobile",
"css",
"svg"
] |
5,659,625 | 1 | 5,660,248 | null | 0 | 165 |
My app has 2 views that are shown as flipview when a button is pressed. They are working just fine on any testdevice.
But in XCode, one of them is causing a crash (bad_exec) to the return of the main method when he is displayed. The crash happens outside of any of my functions.
Ok, bad_exec means, I have anything that is trashing/deallocating or corrupting the memory.
But why does it just happen in the iPhone 4.2 simulator under xcode 4?
No Zombies do fire, nor do I overwrite/deallocate anything when he the view is displayed.
Any idea whats going on?
Added stack.
Full resolution here: [http://www.codebaker.de/OddCrash.png](http://www.codebaker.de/OddCrash.png)
Changed to stack only

|
Showing FlipviewController crash in XCode 4 debugger
|
CC BY-SA 3.0
| null |
2011-04-14T06:53:54.197
|
2017-04-15T16:51:10.993
|
2017-04-15T16:51:10.993
| 1,033,581 | 620,790 |
[
"xcode",
"ios4",
"debugging",
"ios-simulator"
] |
5,659,645 | 1 | 5,724,562 | null | 3 | 504 |
I has a simple JavaScript code which is consuming memory while running infinitely. Memory consumption is monitored by Google Chrome internal memory profiler.
```
setInterval(function(){
var xhr = new XMLHttpRequest();
xhr.open('GET', 'json.txt', true);
xhr.onreadystatechange = function() {
if(this.readyState == 4 && this.status == 200) {
console.log(this.responseText);
}
};
xhr.send('');
}, 500);
```
Html file with above code sample and `json.txt` is hosted on on my local server, getting a file isn't taking more than 500ms (it is always about 7-10ms).
In a long time run the memory graph is looks like that

The same Chrome window after a hour of work

On the long run (hours) not all memory is reclaimed an graph is still ascending.
I understand the memory is consumed, i didn't understand why it is .
This is how i can reduce memory leak
```
var callback = function(){
if(this.readyState == 4 && this.status == 200) {
console.log(this.responseText);
}
}
setInterval(function(){
var xhr = new XMLHttpRequest();
xhr.open('GET', 'json.txt', true);
xhr.onreadystatechange = callback;
xhr.send('');
}, 500);
```
This improvement allowing not to link callback's closure to `xhr` var.
|
Why this code is consuming memory and it is not get fully reclaimed?
|
CC BY-SA 3.0
| 0 |
2011-04-14T06:56:18.420
|
2011-04-25T10:10:18.013
|
2011-04-25T10:10:18.013
| 296,433 | 296,433 |
[
"javascript",
"garbage-collection",
"xmlhttprequest"
] |
5,659,744 | 1 | 5,659,844 | null | 6 | 12,656 |
This question was asked to me in an interview:

lets say we have above binary tree,how can i produce an output like below
```
2 7 5 2 6 9 5 11 4
```
i answered like may be we can have a level count variable and print all the elements sequentially by checking the level count variable of each node.
probably i was wrong.
can anybody give anyidea as to how we can achieve that?
|
binary tree -print the elements according to the level
|
CC BY-SA 3.0
| 0 |
2011-04-14T07:07:52.783
|
2011-04-14T11:11:11.340
|
2011-04-14T07:28:32.727
| 134,713 | 134,713 |
[
"c++",
"binary-search-tree"
] |
5,659,869 | 1 | 5,660,010 | null | 2 | 24,350 |
I'm new to Ext Js. I have following file structure.

And I'm testing following code -
```
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>First Ext Js Page</title>
<link rel="stylesheet" href="../ext-3.3.1/resources/css/ext-all.css">
<script type="text/javascript" src="../ext-3.3.1/adapter/ext/ext-base.js"></script>
<script type="text/javascript" src="../ext-3.3.1/ext-all.js"></script>
<script type="text/javascript" src="../ext-3.3.1/adapter/ext/ext-base-debug.js"></script>
<script type="text/javascript">
Ext.BLANK_IMAGE_URL = '../ext-3.3.1/resources/images/default/s.gif';
Ext.onReady(function (){
alert('done');
});
</script>
</head>
<body>
</body>
</html>
```
But it is giving me errors as
1. Ext.onReady is not a function,
2. Ext.EventManager is undefined, and multiple times
3. Ext.EventObject is undefined
How can I fix this.
|
Ext is not defined issue in Ext Js
|
CC BY-SA 3.0
| null |
2011-04-14T07:19:59.983
|
2014-06-07T09:50:05.357
| null | null | 1,784,822 |
[
"extjs"
] |
5,659,963 | 1 | 5,660,432 | null | 19 | 1,526 |
```
CREATE TABLE IF NOT EXISTS `sbpr_groups` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(255) DEFAULT NULL,
`active` tinyint(1) DEFAULT '0',
`dnd` tinyint(1) DEFAULT '0',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=32 ;
CREATE TABLE IF NOT EXISTS `sbpr_newsletter` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`created_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`from` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`mail` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`subject` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`body` text COLLATE utf8_unicode_ci,
`attach1` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`attach2` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`attach3` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=14;
CREATE TABLE IF NOT EXISTS `sbpr_news_groups` (
`newsletter_id` int(11) NOT NULL,
`groups` int(11) NOT NULL,
KEY `fk_sbpr_news_groups_sbpr_newsletter1` (`newsletter_id`),
KEY `fk_sbpr_news_groups_sbpr_groups1` (`groups`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE IF NOT EXISTS `sbpr_news_recs` (
`newsletter_id` int(11) NOT NULL,
`recipients` int(11) NOT NULL,
KEY `fk_sbpr_news_recs_sbpr_newsletter1` (`newsletter_id`),
KEY `fk_sbpr_news_recs_sbpr_recipients1` (`recipients`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE IF NOT EXISTS `sbpr_recipients` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`mail` varchar(160) DEFAULT NULL,
`date_reg` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`active` tinyint(1) DEFAULT '0',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=3008 ;
CREATE TABLE IF NOT EXISTS `sbpr_rec_groups` (
`rec_id` int(11) NOT NULL,
`group` int(11) NOT NULL,
KEY `fk_sbpr_rec_groups_sbpr_recipients` (`rec_id`),
KEY `fk_sbpr_rec_groups_sbpr_groups1` (`group`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
```
```
ALTER TABLE `sbpr_news_groups`
ADD CONSTRAINT `fk_sbpr_news_groups_sbpr_groups1`
FOREIGN KEY (`groups`) REFERENCES `sbpr_groups` (`id`)
ON DELETE CASCADE ON UPDATE NO ACTION,
ADD CONSTRAINT `fk_sbpr_news_groups_sbpr_newsletter1`
FOREIGN KEY (`newsletter_id`) REFERENCES `sbpr_newsletter` (`id`)
ON DELETE CASCADE ON UPDATE NO ACTION;
ALTER TABLE `sbpr_news_recs`
ADD CONSTRAINT `fk_sbpr_news_recs_sbpr_newsletter1`
FOREIGN KEY (`newsletter_id`) REFERENCES `sbpr_newsletter` (`id`)
ON DELETE CASCADE ON UPDATE NO ACTION,
ADD CONSTRAINT `fk_sbpr_news_recs_sbpr_recipients1`
FOREIGN KEY (`recipients`) REFERENCES `sbpr_recipients` (`id`)
ON DELETE CASCADE ON UPDATE NO ACTION;
ALTER TABLE `sbpr_rec_groups`
ADD CONSTRAINT `fk_sbpr_rec_groups_sbpr_groups1`
FOREIGN KEY (`group`) REFERENCES `sbpr_groups` (`id`)
ON DELETE CASCADE ON UPDATE NO ACTION,
ADD CONSTRAINT `fk_sbpr_rec_groups_sbpr_recipients`
FOREIGN KEY (`rec_id`) REFERENCES `sbpr_recipients` (`id`)
ON DELETE CASCADE ON UPDATE NO ACTION;
```

I want to select all rows from table, and add to each of these lines the number of rows from whose id prescribed in or prescribed in depends on FKs.
Ex. I want to select count of all recipients of current newsletter wihch are in or exists in group which are in plus count of active recipients.
```
SELECT d.id, d.subject , d.created_date,
(SELECT count(*) FROM sbpr_recipients r
LEFT JOIN sbpr_news_recs nr ON nr.recipients = r.id
LEFT JOIN sbpr_rec_groups g ON g.rec_id = r.id
LEFT JOIN sbpr_news_groups ng ON ng.groups = g.group
WHERE nr.newsletter_id = d.id OR ng.newsletter_id = d.id) AS repicients,
(SELECT count(*) FROM sbpr_recipients r
LEFT JOIN sbpr_news_recs nr ON nr.recipients = r.id
LEFT JOIN sbpr_rec_groups g ON g.rec_id = r.id
LEFT JOIN sbpr_news_groups ng ON ng.groups = g.group
WHERE (nr.newsletter_id = d.id OR ng.newsletter_id = d.id)
AND r.active = 1) AS active_repicients
FROM sbpr_newsletter d
ORDER BY d.id ASC, d.id
```

How can I optimize my sql?
|
Need help to optimize MySQL query
|
CC BY-SA 4.0
| 0 |
2011-04-14T07:30:00.307
|
2020-07-30T05:38:16.037
|
2020-07-30T05:38:16.037
| 214,143 | 194,574 |
[
"mysql",
"sql",
"optimization",
"query-optimization"
] |
5,660,092 | 1 | 5,660,157 | null | 0 | 2,637 |
Is it possible to change the style of an `asp:linkbutton` to make it exactly resemble an `asp:button`?
i.e.

|
Make asp:linkbutton resemble asp:button
|
CC BY-SA 3.0
| null |
2011-04-14T07:46:17.017
|
2011-04-14T07:53:48.953
| null | null | 472,377 |
[
"asp.net",
"button",
"linkbutton"
] |
5,660,191 | 1 | 5,660,260 | null | 0 | 70 |
I have an app where it will be a setting whether or not to allow the screen to auto-lock during idle periods.
My question: what's the user-friendly (and user-understandable) way to present the option. It'll be in a `UITableView` with a `UISwitch`, so i'll look somewhat like:

What's the best language to use?
Keep screen on
Prevent auto-lock
Is there a common-practice to adhere to?
Something else?
|
User-friendly way to ask about locking the iPhone screen
|
CC BY-SA 3.0
| null |
2011-04-14T07:57:27.330
|
2011-04-14T08:05:15.093
| null | null | 560,942 |
[
"iphone",
"user-interface",
"settings"
] |
5,660,265 | 1 | 5,660,306 | null | 9 | 9,647 |
I want to add a corner radius to a UIButton. It is working fine but a problem occurs when I add image to it.
It does not round its corners with images, the image is shown in full rectangle form.
Please see the image, I have used the corner radius with red color and the output is as follow:

Please help.
|
Corner radius issue with UIButton
|
CC BY-SA 3.0
| null |
2011-04-14T08:06:05.223
|
2018-09-24T20:41:39.040
|
2016-08-22T01:48:34.220
| 6,643,055 | 554,865 |
[
"ios",
"uiimageview",
"uibutton"
] |
5,660,332 | 1 | null | null | 4 | 19,421 |
I would like to get all mails in outlook from a specific folder:
My folder structure:

I find this [Code](https://stackoverflow.com/questions/2055811/get-unread-mails-from-outlook) to get all mails in outlook inbox folder (not the inbox in picture!):
```
Outlook.Application oApp;
Outlook._NameSpace oNS;
Outlook.MAPIFolder oFolder;
Outlook._Explorer oExp;
oApp = new Outlook.Application();
oNS = (Outlook._NameSpace)oApp.GetNamespace("MAPI");
oFolder = oNS.GetDefaultFolder(Outlook.OlDefaultFolders.olFolderInbox);
oExp = oFolder.GetExplorer(false);
oNS.Logon(Missing.Value, Missing.Value, false, true);
Outlook.Items items = oFolder.Items;
foreach (Outlook.MailItem mail in items)
{
//do someting
}
```
Can someone tell me how to get all mails from a specific folder (like: wolfy-server)?
|
Get all mails in outlook from a specific folder
|
CC BY-SA 3.0
| 0 |
2011-04-14T08:11:57.807
|
2013-06-26T15:08:59.163
|
2017-05-23T12:25:33.427
| -1 | 424,923 |
[
"c#",
"email",
"outlook-addin"
] |
5,660,583 | 1 | 5,661,163 | null | -1 | 1,005 |
Design :-
1)A story board has a number of slides, each slide can have one or more captions or images.
2)Each storyboard can have one or more author , and zero or more reviewers.
3) Each of the objects image,slide and caption(probably more objects will come later like audio etc) can have comments on them . These comments can be given by authors or reviewers. For storing comments I have created a comment table.
4)It is necessary to remember the order of slides and order of images in a slide , for which I am using slide and image number fields.
5)Since comment can be given on any object , I needed to have a Global ID for each of the object,since their reference will be stored in a comment table.For maintaining a global id all the fields ending with name GID are uniqueidentifiers generated using Default: NEWID().
6)Users are stored in user table.
7)User should be able to view and load only the storyboards in which he is a author,reviewer or owner.
Please suggest improvements for this db design.

|
Suggest improvements for the database design
|
CC BY-SA 3.0
| null |
2011-04-14T08:39:16.737
|
2011-04-14T10:20:22.360
|
2011-04-14T10:20:22.360
| 125,571 | 125,571 |
[
"sql",
"database",
"sql-server-2008",
"database-design"
] |
5,661,299 | 1 | null | null | 0 | 2,566 |
I am developing an application where a user uploads an image and zooms, pans to set the image into the frame.
I am able to pan and zoom, and have set the face on the frame (the blank/transparent face). The user is also able to view the image.
What I finally want to do is to save a final image of the face which the
user has selected, but the image should be a single image which consists of the Frame + User's face - the area outside the visible facial are.
The problem which I am facing is that I am not able to remove the part of the image which I don't want.
Please suggest me ways I can do the same. Examples would be great but they should be implemented in jQuery/JavaScript.
Screenshot:

The code is given below:
```
<html>
<head>
<script src="file/ga.js" type="text/javascript"></script>
<script src="file/jquery.js" type="text/javascript"></script>
<script src="file/jquery-ui.js" type="text/javascript"></script>
<script src="file/jquery_002.js" type="text/javascript"></script>
<script src="file/axzoomer.js" type="text/javascript"></script>
<script type="text/javascript">
function adjustMe()
{
document.getElementById('layer1').style.z-index = -9999999;
}
</script>
</head>
<div style="width: 100%;">
<div style="position: relative; left: 0px; top: 0px; width: 360px; height: 270px;">
<div style="width:400px;height:400px; background-image:url('frame.png')">
</div>
<!--* frame comes above */-->
<div id="layer1" style="position: absolute; left: 30px; top: 40px; width: 360px; height: 270px;">
<img id="dyn" class="ex ax-zoom" src="peng.jpg" style="width: 360px;opacity: 0.2;filter:alpha(opacity=30); height: 270px; position: absolute; top: 0px; left: 0px;"/>
</div>
<div style="display: none; position: absolute; opacity: 0.5; height: 35px; top: 240px; left: 148px;" class="ax-controls">
<img style="cursor: pointer;" src="file/zoom-in.png">
<img style="cursor: pointer;" src="file/zoom-out.png">
</div>
</div>
</div>
<br/><br/><br/><br/><br/><br/><br/><br/><br/><br/>
<div style="clear:both;">
<input type="button" value="Done" onclick="adjustMe();"/>
</div>
<script type="text/javascript">
$('.ex').axzoomer({
'maxZoom':4,
'zoomIn':'file/zoom-in.png',
'zoomOut':'file/zoom-out.png',
'opacity':0.5,
'sensivity':10
});
</script>
</body>
```
|
I want to crop, rotate, skew an image with a frame above it; is it possible using jQuery?
|
CC BY-SA 4.0
| null |
2011-04-14T09:43:52.490
|
2019-01-31T09:11:31.473
|
2019-01-31T09:11:31.473
| 472,495 | 99,698 |
[
"php",
"javascript",
"jquery",
"image-manipulation",
"dom"
] |
5,661,607 | 1 | null | null | 2 | 715 |
I'm having a weird problem with fonts on my website : I'm using Google's Web Font API, and it looks fine in every browser on Ubuntu, but looks weird in every browser on Windows XP, except IE8. I didn't have a chance to test it on Win7 yet.
My website on Ubuntu's Firefox 3.6.16 :

My website on Windows' Firefox 3.6.13 :

What is going on ? Is this simply a ClearType problem ?
|
Google web fonts looks ok on Ubuntu 10, weird on Windows XP
|
CC BY-SA 3.0
| null |
2011-04-14T10:05:52.997
|
2011-12-28T20:09:28.433
|
2011-04-15T09:18:54.030
| 113,305 | 113,305 |
[
"windows",
"rendering",
"cleartype",
"google-webfonts"
] |
5,661,790 | 1 | 5,661,901 | null | 0 | 173 |
I'm a student and recently I'm making a website in order to share the course with others
And I got a problem:
I'm trying to express the "Course Heat Degree" by color
(now all the color is bule in the following picture)
now I get a from the server but I have no idea how to use it cause I want the
""(like #cc00ff) represent small course_heat_num and ""(like #ff0000) represent the big number
I don't know the function or the variation in the chang from the cool color to the warm color(BTW: from #000000 to #FFFFFF)

Hope Someone can help!
|
Tiny "Color Code" problem
|
CC BY-SA 3.0
| null |
2011-04-14T10:21:21.333
|
2011-04-14T10:33:06.487
| null | null | 612,428 |
[
"colors"
] |
5,661,943 | 1 | null | null | 0 | 508 |
My apologies if this is a duplicate to [my previous question](https://stackoverflow.com/questions/5653087/where-does-the-iphone-simulator-keep-its-tmp-files), but this is driving me a bit batty.
In trying to figure out where the iPhone Simulator is storing files I used the Speak Here project to record my voice and save it to a file. Since the simulator is able to playback the recording there be a file somewhere, but it is impossible for me to find. I have tried everything including using the terminal command locate (after using sudo /usr/libexec/locate.updatedb). Any help?

|
Cannot find file generated by iPhone simulator
|
CC BY-SA 3.0
| null |
2011-04-14T10:36:27.153
|
2011-04-14T14:17:57.713
|
2017-05-23T12:30:36.930
| -1 | 385,559 |
[
"iphone",
"cocoa-touch",
"file",
"filesystems",
"simulator"
] |
5,662,277 | 1 | 5,664,092 | null | 0 | 213 |
I am displaying integer data from an SQLite database using a SimpleCursorAdaptor.
Everything shows up but the alignment is all wrong:

The dialog looks like this:
```
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<ListView android:id="@+id/lvwScores"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
<Button
android:id="@+id/btnOK "
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:text="OK" android:layout_below="@id/lvwScores">
</Button>
</RelativeLayout>
```
With the row xml file:
```
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent" android:layout_height="fill_parent">
<TableLayout android:layout_width="fill_parent" android:layout_height="wrap_content" android:stretchColumns="0,1,2,3">
<TableRow >
<TextView android:id="@+id/tvwPlayer1Score" xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content" android:layout_height="wrap_content" android:gravity="right"/>
<TextView android:id="@+id/tvwPlayer2Score" xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content" android:layout_height="wrap_content" android:gravity="right"/>
<TextView android:id="@+id/tvwPlayer3Score" xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content" android:layout_height="wrap_content" android:gravity="right"/>
<TextView android:id="@+id/tvwPlayer4Score" xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content" android:layout_height="wrap_content" android:gravity="right"/>
</TableRow>
</TableLayout>
</RelativeLayout>
```
|
How to line up intger output in custom Android dialog
|
CC BY-SA 3.0
| null |
2011-04-14T11:06:20.073
|
2011-04-14T13:35:56.990
| null | null | 648,746 |
[
"android",
"dialog"
] |
5,662,675 | 1 | 5,662,767 | null | 0 | 1,769 |
Can anyone explain why my `input type="file"` is greyed out in IE8 but not IE7. It's still usable, but you can't actually type in the box any more.
```
<INPUT id="fil1" type="file" size="44" name="fil1" runat="server">
```
IE7:

IE8:

|
Why is <input type="file"> box grey in IE8?
|
CC BY-SA 3.0
| null |
2011-04-14T11:42:48.140
|
2011-04-14T11:51:39.040
| null | null | 472,377 |
[
"asp.net",
"internet-explorer-8",
"internet-explorer-7",
"file-io"
] |
5,662,783 | 1 | 5,662,869 | null | 2 | 84 |
I'm a newbie in programming and also in winform, please forgive me if my question looks silly. I have a download manager (flashget) and I wish to use a similar control in my application.
Here is the control picture:

I just need to know name of the control and I will search the SDK for details.
|
What is the name of this control?
|
CC BY-SA 3.0
| null |
2011-04-14T11:52:36.350
|
2011-04-14T11:59:47.213
| null | null | 686,717 |
[
".net",
"vb.net",
"winforms"
] |
5,662,909 | 1 | 5,664,396 | null | 2 | 962 |
This is the error i am getting "circular reference in self-nested table 'firstname1'".
I want to Hierarchical Data binding. Employee and their supervisor are in the same table.
I am taking reference from [http://weblogs.asp.net/alessandro/archive/2008/03/01/part-2-building-and-binding-hierarchical-data-from-the-database-to-the-asp-net-navigation-controls.aspx](http://weblogs.asp.net/alessandro/archive/2008/03/01/part-2-building-and-binding-hierarchical-data-from-the-database-to-the-asp-net-navigation-controls.aspx).
But it is giving error on generating Xml.
```
using (SqlConnection con = new SqlConnection(WebConfigurationManager.ConnectionStrings["RMSConnection"].ToString()))
{
string SqlCommand = "SELECT EmployeeId,FirstName,ReportToId FROM tblEmployee";
SqlDataAdapter adapter = new SqlDataAdapter();
adapter.SelectCommand = new SqlCommand(
SqlCommand, con);
adapter.Fill(ds);
ds.Tables[0].TableName = "FirstName1";
DataRelation dr = new DataRelation("pageId_parentId",ds.Tables["FirstName1"].Columns["EmployeeId"], ds.Tables["FirstName1"].Columns["ReportToId"]);
dr.Nested = true;
ds.Relations.Add(dr);
}
//string s= ds.GetXml();
```
above is my code.
Please Suggest.

|
circular reference in self-nested table 'firstname1'. asp.net
|
CC BY-SA 3.0
| 0 |
2011-04-14T12:03:23.353
|
2011-04-15T11:02:50.980
|
2011-04-15T05:26:35.583
| 273,290 | 273,290 |
[
"asp.net"
] |
5,662,926 | 1 | 5,663,121 | null | 2 | 388 |
Hello i want to develop simple iPhone application with one button. And I want to have a list with settings like in "Maps" application on iPhone (see screenshot)

--
Have you got any advises to do it ?
|
How to make second layer view with settings like in iphone "maps" app
|
CC BY-SA 3.0
| 0 |
2011-04-14T12:04:21.293
|
2011-04-14T12:25:10.033
|
2011-04-14T12:24:31.670
| 629,748 | 478,622 |
[
"iphone",
"user-interface",
"view",
"settings",
"maps"
] |
5,663,091 | 1 | 5,663,216 | null | 31 | 14,979 |
I am programming strictly in C and WinAPI, no C++ or C#. I am a beginner and just learning to draw controls etc. The thing is that when I create Windows or other controls like Command Buttons, they have Windows Native look. Take a look at this:

But in Windows 7, the command buttons look like this:

Now, how do I get command buttons in my program to look like that. Is it even possible?
I am following this tutorial, for reference: [http://zetcode.com/gui/winapi/](http://zetcode.com/gui/winapi/)
Thanks.
|
Programming In C + Win API: How To Get Windows 7 Look For Controls?
|
CC BY-SA 3.0
| 0 |
2011-04-14T12:17:47.513
|
2016-01-30T12:45:56.063
|
2016-01-30T12:45:56.063
| 2,008,247 | 616,941 |
[
"c",
"windows",
"winapi",
"button",
"visual-styles"
] |
5,663,137 | 1 | 13,055,664 | null | 2 | 9,667 |
One of my jQuery dialogs is defined within a div that has a fixed position (footer of page). When a modal jQuery dialog is opened jQuery creates an overlay div that hides the whole page and then puts the dialog to be opened on top having a higher z-index than the overlay div. Unfortunately any dialog that is rendered within a div with fixed position is overlayed by the overlay div although the modal dialog to be opened got a greater z-index then the overlay itself.
The following HTML code that I reduced for demonstration purposes to the problem shows the difference between a dialog within a non fixed position div and within a fixed position div:
```
<?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">
<head>
<link type="text/css" rel="stylesheet" href="/demo-webapp/faces/javax.faces.resource/themes/sam/theme.css?ln=primefaces&amp;v=2.2.1" />
<link type="text/css" rel="stylesheet" href="/demo-webapp/faces/javax.faces.resource/jquery/ui/jquery-ui.css?ln=primefaces&v=2.2.1" />
<title>CSS TEST</title><script type="text/javascript" src="/demo-webapp/faces/javax.faces.resource/jquery/jquery.js?ln=primefaces&v=2.2.1"></script><script type="text/javascript" src="/demo-webapp/faces/javax.faces.resource/jquery/ui/jquery-ui.js?ln=primefaces&v=2.2.1"></script>
<script>
/*<![CDATA[*/
jQuery(function() {
jQuery("#dialog1").dialog({
autoOpen: false,
modal: true
});
jQuery("#dialog2").dialog({
autoOpen: false,
modal: true
});
});
/*]]>*/
</script>
</head>
<body>
<div style="z-index: 1; position: static;" onclick="jQuery('#dialog1').dialog('open')">
position: static; /* default */
<div id="dialog1" title="Dialog1"></div>
</div>
<div style="z-index: 1; position: fixed; left: 100px; top: 100px" onclick="jQuery('#dialog2').dialog('open')">
position: fixed;
<div id="dialog2" title="Dialog2"></div>
</div>
</body>
</html>
```
After loading the page it appears like that:

The first dialog is defined with a non fixed positioned div and the dialog appears normally:

Note, that when the second dialog defined within a fixed positioned div is shown, it cannot be clicked by the user since it is overlayed by the overlay div:

Please not that z-index of the overlay div is in both cases 1001 and the z-index of the dialog is 1002. So the overlay div should not overlay the dialog, but unfortunately it's the case for dialogs within a fixed position div.
Since I am using Primefaces I am bound to jQuery 1.4.4. The problem occures in Firefox 4, latest Release and Safari, latest Release.
Can you reconstruct this issue and do you have a solution for that? Please note that I don't want to to place the dialog outside of the fixed positioned div . The reason for that is that I am using the templating mechanism of JSF and therefore the footer of my page will be filled dynamically with content -- in this case a popup dialog. It would break modularity if I have to place the dialog somewhere else.
|
jQuery modal dialog is hidden by overlay div if dialog's parent has fixed position
|
CC BY-SA 3.0
| 0 |
2011-04-14T12:21:29.417
|
2012-10-24T18:43:04.340
|
2011-04-14T12:29:25.263
| 543,875 | 543,875 |
[
"jquery",
"html",
"dialog",
"overlay",
"positioning"
] |
5,663,309 | 1 | 5,663,367 | null | 0 | 548 |
When creating a quick campaign in Dynamics CRM 4.0 the onload javascripts for appointment, phone call etc. (5 in total) are retrieved and run. In the onLoad scripts for these activity types we hide some fields, however these fields are not actually there when opening the Quick Campaign wizard, and the javascript throws an error.

FormType is 1 (meaning Create), and ObjectTypeCode is the type code for the javascript loaded, so none of these fields give me the context. How can I determine in the onLoad javascripts which setting/context I am in? Are there any global variables that indicate that the context is "Quick Campaign Wizard"?
|
CRM 4.0 Quick Campaigns runs activity onLoad javascripts
|
CC BY-SA 3.0
| null |
2011-04-14T12:35:29.937
|
2011-04-14T12:39:54.493
| null | null | 123,072 |
[
"javascript",
"dynamics-crm",
"dynamics-crm-4"
] |
5,663,379 | 1 | 5,663,444 | null | 0 | 801 |
Imagine the HTML is like this:
```
<a id="tour_gallery_link" href="#">Click Me</a>
<div id="tour_gallery">
<a href="image1.png"><img src="image1.png"></a>
<a href="image2.png"><img src="image2.png"></a>
<a href="image3.png"><img src="image3.png"></a>
</div>
```
The CSS:
```
#tour_gallery {
visibility: hidden;
}
```
The jQuery:
```
$(document).ready(function(){
console.debug("Page DOM ready");
$('#tour_gallery_link').click(function() {
console.debug("Clicked the tour gallery link.");
$('#tour_gallery').css({
visibility: 'visible'
}).lightBox();
});
```
Basically what I want is when the user clicks the `#tour_gallery_link`, the `div#tour_gallery` will have it's CSS `visibility` changed to `visible`. Then `#tour_gallery a` will have the function `lightBox()` executed on it.
That's a very important distinction, the `lightBox()` has to be executed on the `a` links within the `div#tour_gallery` not just on the `#tour_gallery` itself.
However, the `div#tour_gallery` is what is hidden.
It would be nice if I could have the lightbox executed, while the div remains hidden - so once they press 'Click Me', it automatically jumps into the lightBox(), but I am not sure if that is possible.
I am using the jQuery.LightBox - [http://leandrovieira.com/projects/jquery/lightbox/](http://leandrovieira.com/projects/jquery/lightbox/)
Edit1: After I did the changes suggested by Calum, this is how the JSFiddle looks on my screen. It doesn't launch into the lightbox. It simply loads the `div` right below the Click Me.

|
How do I let a jQuery.lightBox() be executed on a div that is hidden with one click?
|
CC BY-SA 3.0
| null |
2011-04-14T12:40:52.513
|
2011-04-14T13:37:35.153
|
2011-04-14T13:15:18.487
| 91,970 | 91,970 |
[
"jquery",
"jquery-plugins",
"lightbox"
] |
5,663,413 | 1 | 10,424,438 | null | 3 | 1,335 |
Is there any pre-built sample of iphone like bottom navigation using CSS 3? is it possible to make these icons in CSS3, without images?

|
Is there any pre-built sample of iphone like bottom navigation using CSS 3?
|
CC BY-SA 3.0
| null |
2011-04-14T12:43:49.717
|
2012-05-03T03:00:15.300
|
2011-06-21T23:14:53.113
| 106,224 | 84,201 |
[
"iphone",
"css",
"mobile-safari"
] |
5,663,435 | 1 | 5,689,784 | null | 7 | 5,606 |
I have a simple 'Service' system set up with an interface as shown below. I am trying to mock it for use in my unit testing, but am having a bit of an obstacle. The way it works is that I design classes that implement `IRequestFor<T,R>` and I would call the service bus like this...
`var member = new Member { Name = "[email protected]", Password = "validPassword" };`
`ServiceBus.Query<ValidateUser>().With(member);`
This works fine in my code. I have no issues with it. But when I try to mock it, like this ..
```
var service = Mock.Create<IServiceBus>();
// Model
var model = new Web.Models.Membership.Login
{
Email = "[email protected]",
Password = "acceptiblePassword",
RememberMe = true
};
// Arrange
Mock.Arrange(() => service.Query<Membership.Messages.ValidateMember>().With(model))
.Returns(true);
```
I am given the following error.
> NullReferenceException
I don't even know what the exception is on. It 'points' to the ServiceBus in my Controller code, and if I use the debugger, the object is like .. `{IServiceBus_Proxy_2718486e043f432da4b143c257cef8ce}`, but other than that, everything else looks the exact same as if I step through it in a normal run.
I am using for the mocking, but I don't know how I would do this in a different mocking framework either. I am using for my Dependency Injection, as well. Can anyone help me?
For convenience, I have included as much of my code as possible below.
## Code Reference
## Service Bus
```
public interface IServiceBus
{
T Query<T>() where T : IRequest;
T Dispatch<T>() where T : IDispatch;
}
public interface IRequest
{
}
public interface IDispatch
{
}
public interface IRequestFor<TResult> : IRequest
{
TResult Reply();
}
public interface IRequestFor<TParameters, TResult> : IRequest
{
TResult With(TParameters parameters);
}
public interface IDispatchFor<TParameters> : IDispatch
{
void Using(TParameters parameters);
}
```
## Service Bus Implementation
```
public class ServiceBus : IServiceBus
{
private readonly IKernel kernel;
public ServiceBus(IKernel kernel) {
this.kernel = kernel;
}
/// <summary>
/// Request a query behavior that may be given parameters to yield a result.
/// </summary>
/// <typeparam name="T">The type of query to request.</typeparam>
/// <returns></returns>
public T Query<T>() where T : IRequest
{
// return a simple injected instance of the query.
return kernel.Get<T>();
}
/// <summary>
/// Request a dispatch handler for a given query that may be given parameters to send.
/// </summary>
/// <typeparam name="T">The type of handler to dispatch.</typeparam>
/// <returns></returns>
public T Dispatch<T>() where T : IDispatch
{
// return a simple injected instance of the dispatcher.
return kernel.Get<T>();
}
}
```
## Service Bus Dependency Injection Wiring (Ninject)
```
Bind<IServiceBus>()
.To<ServiceBus>()
.InSingletonScope();
```
## Complete Unit Test
```
[TestMethod]
public void Login_Post_ReturnsRedirectOnSuccess()
{
// Inject
var service = Mock.Create<IServiceBus>();
var authenticationService = Mock.Create<System.Web.Security.IFormsAuthenticationService>();
// Arrange
var controller = new Web.Controllers.MembershipController(
service, authenticationService
);
var httpContext = Mock.Create<HttpContextBase>();
// Arrange
var requestContext = new RequestContext(
new MockHttpContext(),
new RouteData());
controller.Url = new UrlHelper(
requestContext
);
// Model
var model = new Web.Models.Membership.Login
{
Email = "[email protected]",
Password = "acceptiblePassword",
RememberMe = true
};
// Arrange
Mock.Arrange(() => service.Query<Membership.Messages.ValidateMember>().With(model))
.Returns(true);
// Act
var result = controller.Login(model, "/Home/");
// Assert
Assert.IsInstanceOfType(result, typeof(RedirectResult));
}
```
## Actual Query Method
```
public class ValidateMember : IRequestFor<IValidateMemberParameters, bool>
{
private readonly ISession session;
public ValidateMember(ISession session) {
this.session = session;
}
public bool With(IValidateMemberParameters model)
{
if (String.IsNullOrEmpty(model.Email)) throw new ArgumentException("Value cannot be null or empty.", "email");
if (String.IsNullOrEmpty(model.Password)) throw new ArgumentException("Value cannot be null or empty.", "password");
// determine if the credentials entered can be matched in the database.
var member = session.Query<Member>()
.Where(context => context.Email == model.Email)
.Take(1).SingleOrDefault();
// if a member was discovered, verify their password credentials
if( member != null )
return System.Security.Cryptography.Hashing.VerifyHash(model.Password, "SHA512", member.Password);
// if we reached this point, the password could not be properly matched and there was an error.
return false;
}
}
```
## Login Controller Action
```
[ValidateAntiForgeryToken]
[HttpPost]
public ActionResult Login(Web.Models.Membership.Login model, string returnUrl)
{
if (ModelState.IsValid)
{
// attempt to validate the user, and if successful, pass their credentials to the
// forms authentication provider.
if (Bus.Query<ValidateMember>().With(model))
{
// retrieve the authenticated member so that it can be passed on
// to the authentication service, and logging can occur with the
// login.
Authentication.SignIn(model.Email, model.RememberMe);
if (Url.IsLocalUrl(returnUrl))
return Redirect(returnUrl);
else
return RedirectToAction("Index", "Home");
}
else
{
ModelState.AddModelError("", "The user name or password provided is incorrect.");
}
}
// If we got this far, something failed, redisplay form
return View(model);
}
```
## Login View Model
```
public class Login : Membership.Messages.IValidateMemberParameters
{
[Required]
[DataType(DataType.EmailAddress)]
[RegularExpression(@"^[a-z0-9_\+-]+(\.[a-z0-9_\+-]+)*@(?:[a-z0-9-]+){1}(\.[a-z0-9-]+)*\.([a-z]{2,})$", ErrorMessage = "Invalid Email Address")]
[Display(Name = "Email Address")]
public string Email { get; set; }
[Required]
[StringLength(32, MinimumLength = 6)]
[DataType(DataType.Password)]
[RegularExpression(@"^([a-zA-Z0-9@#$%]){6,32}$", ErrorMessage = "Invalid Password. Passwords must be between 6 and 32 characters, may contain any alphanumeric character and the symbols @#$% only.")]
[Display(Name = "Password")]
public string Password { get; set; }
[Display(Name = "Remember me?")]
public bool RememberMe { get; set; }
}
```

|
Mocking a simple service bus in ASP.NET MVC
|
CC BY-SA 3.0
| 0 |
2011-04-14T12:45:24.680
|
2011-04-20T12:57:09.993
|
2011-04-20T12:57:09.993
| 84,685 | 84,685 |
[
"c#",
"unit-testing",
"asp.net-mvc-3",
"mocking",
"justmock"
] |
5,663,510 | 1 | 5,663,582 | null | 2 | 2,072 |
friends,
i want to add google like circular current location icon in my application
as given in example any one guide me how to achieve this?
is this simple image or what?
any help would be appreciated.
|
how to display google like current location icon in android?
|
CC BY-SA 3.0
| 0 |
2011-04-14T12:51:33.820
|
2011-04-14T12:57:12.630
| null | null | 249,991 |
[
"android",
"google-maps"
] |
5,663,735 | 1 | 5,707,629 | null | -1 | 438 |
i already can draw a listbox item rectangle in the listbox Drawitem event properly like this

```
'// Draw border ACA899
e.Graphics.DrawRectangle(myPen, e.Bounds.X, e.Bounds.Y, e.Bounds.Width,e.Bounds.Height)
```
how do i
1. position theitem text in left-middle alignment?
2. correct the end of the x2,y2 (see picture) of the rectangle that is not showing to show properly?
3. specify the thickness of the drawn rectangle?
thanks
|
Draw listbox item properly vb.net 2005
|
CC BY-SA 3.0
| null |
2011-04-14T13:08:56.557
|
2011-04-18T19:08:07.740
|
2011-04-14T13:16:07.643
| 362,461 | 362,461 |
[
".net",
"winforms",
"graphics",
"listbox",
"draw"
] |
5,663,850 | 1 | 5,664,549 | null | 0 | 1,801 |
Hi I want to make bar chart as shown here

I want to plot graph using coreplot example : (coreplot gallery- Vertical Bar Chart)
Currently default code plots the graph as shown below

How can I achieve this?
I tried adding another graph but didn't work out well.
Please Help and Suggest
Thanks
|
CORE PLOT add one more Graph in Vertical BarChart
|
CC BY-SA 3.0
| 0 |
2011-04-14T13:17:07.200
|
2011-04-18T05:44:00.080
|
2011-04-14T13:58:01.863
| 463,857 | 531,783 |
[
"iphone",
"objective-c",
"cocoa-touch",
"core-plot"
] |
5,663,888 | 1 | null | null | 16 | 27,075 |
I am trying to remove all margins and the "figure region" of a plot in R, so that the plot region comprises the entire graphic device. I thought the code below would do it, but there is still a border around my plot (wider on left/bottom, thinner on top/right). Thanks
```
par(oma=c(0, 0, 0, 0))
par(mar=c(0, 0, 0, 0))
par(plt=c(0, 1, 0, 1))
```
Thought I would add a picture to show my progress. The xaxs and yaxs removed nearly all border from the top and right- there is still a border on the left and bottom.

The relevant portion of my script is below.
```
png("Test.png",
width = 256, height = 256,
units = "px", pointsize = 6.4,
bg = "black", res = NA)
par(mar=c(0, 0, 0, 0), xaxs='i', yaxs='i')
smoothScatter(lhb$px, lhb$pz, nrpoints=0, xlim=c(-3,3), ylim=c(0,5),
main="", xlab="", ylab="", axes=FALSE,
colramp=colorRampPalette(c("black", "#202020", "#736AFF", "cyan", "yellow", "#F87431", "#FF7F00", "red", "#7E2217"))
)
segments(.83, 1.597, .83, 3.436, col = par("fg"), lty = par("lty"), lwd = par("lwd"))
segments(-.83, 1.597, -.83, 3.436, col = par("fg"), lty = par("lty"), lwd = par("lwd"))
segments(-.83, 3.436, .83, 3.436, col = par("fg"), lty = par("lty"), lwd = par("lwd"))
segments(-.83, 1.597, .83, 1.597, col = par("fg"), lty = par("lty"), lwd = par("lwd"))
dev.off()
```
|
trying to remove all margins so that plot region comprises the entire graphic
|
CC BY-SA 3.0
| 0 |
2011-04-14T13:19:38.077
|
2012-12-11T00:22:51.420
|
2011-04-14T14:05:45.407
| 79,496 | 79,496 |
[
"r",
"plot"
] |
5,663,912 | 1 | 5,664,108 | null | 10 | 11,216 |
Here is a popover controller of the ipad.

|
Android - popover controller same as ipad
|
CC BY-SA 3.0
| 0 |
2011-04-14T13:21:21.683
|
2018-03-15T13:38:24.930
|
2011-04-15T09:00:25.523
| 21,234 | 379,693 |
[
"android",
"popover"
] |
5,663,905 | 1 | 5,667,674 | null | 3 | 8,284 |
Me and ASMX web services do not get on. We argue. She brings up arguments we had in the past. It's a pain. Our relationship is on the rocks!
I have an ASMX web service, which I haven't serialised with the Newtonsoft library (as explained why here: [http://encosia.com/2011/04/13/asp-net-web-services-mistake-manual-json-serialization/](http://encosia.com/2011/04/13/asp-net-web-services-mistake-manual-json-serialization/)). It looks like this:
```
[WebMethod]
[ScriptMethod(ResponseFormat = ResponseFormat.Json)]
public string[] GetCitiesWithState(string isoalpha2, string prefixText)
{
var dict = AtomicCore.CityObject.GetCitiesInCountryWithStateAutocomplete(isoalpha2, prefixText);
string[] cities = dict.Values.ToArray();
return cities;
}
```
Simple enough right? It return this when searching for `new`:
```
<?xml version="1.0" encoding="utf-8"?>
<ArrayOfString xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://tempuri.org/">
<string>New Orleans, Louisiana</string>
<string>New York, New York</string>
</ArrayOfString>
```
I was expecting JSON, but after a bit of reading, it seems I shouldn't try and serialise the output - it should just happen right? Anyway, so I have the following JQuery on the frontend:
```
$('#<%=txtCity.ClientID%>').autocomplete('<%=ResolveUrl("~/AtomicService/Assets.asmx/GetCitiesWithState")%>', {
dataType: 'json',
httpMethod: 'POST',
contentType: 'application/json; charset=utf-8',
parse: function (data) {
var rows = new Array();
for (var i = 0; i < data.d.length; i++) {
rows[i] = { data: data.d[i], value: data.d[i].Value, result: data.d[i].Value };
}
return rows;
},
formatItem: function (row, i, n) {
return row.Value;
},
extraParams: {
minChars: 2,
isoalpha2: '<%=Session["BusinessCountry"].ToString()%>',
maxRows: 20,
prefixText: function () {
return $('#<%=txtCity.ClientID%>').val()
}
},
max: 20
}).result(function (event, data, formatted) {
if (data) {
alert(data['Key']);
}
});
```
I can see the calls using Chrome:

And yet stuff all happens! There is no Jquery errors, no fireworks, no anything. She is ignoring me.
At first I was blaming the webservice, but I think this may have more to do with how I'm parsing and formatting the data in jquery.
So, , what am I doing wrong and how can I make the autocomplete work correctly?
Help appreciated :)
EDIT: It may not be helpful, but this is what I see in Fiddler:

|
Reading XML data from ASMX webservice for Jquery autocomplete
|
CC BY-SA 3.0
| 0 |
2011-04-14T13:20:51.650
|
2011-04-14T18:27:07.763
|
2011-04-14T18:27:07.763
| 76,337 | 102,147 |
[
"c#",
"jquery",
"web-services",
"asmx"
] |
5,664,102 | 1 | 5,664,456 | null | 0 | 355 |
I am getting an issue with dynamic drop down menu.
Please check the screenshot.

here I am getting the child menu list fixed into right side to screen. It is not viewing correctly. I want to get this list either left side or upper the screen.
Sorry poor english. Hope You understand.
Any help will be greatly appreciated.
Thank you
|
Problem in Drop Down Menu
|
CC BY-SA 3.0
| null |
2011-04-14T13:36:31.863
|
2011-04-14T14:09:24.310
|
2011-04-14T14:09:24.310
| 166,611 | 445,646 |
[
"html",
"css",
"dynamic",
"menu",
"drop-down-menu"
] |
5,664,406 | 1 | null | null | 2 | 4,663 |
I have a problem with detecting retina displays on iOS devices. I'm using the following code which was recommended by various people:
```
BOOL isRetina()
{
UIScreen* s = [UIScreen mainScreen];
if ([s respondsToSelector:@selector(displayLinkWithTarget:selector:)] &&
[s respondsToSelector:@selector(scale)])
{
CGFloat scale = [s scale];
return scale == 2.0;
}
return NO;
}
```
The problem is that it compiles fine for deployment target iOS 4 and higher, but when I compile for iOS3.2 I get an "Incompatible types in initialization" error at the "scale = [s scale]" line because I'm trying to assign an id to a float. I couldn't find anything about that. Since everyone else seems to be using this approach I must be missing something really obvious here? Base SDK version is 4.3 with XCode 4 by the way.
Here are my BaseSDK/Deployment Target settings:

|
iOS retina display detection code not working
|
CC BY-SA 3.0
| null |
2011-04-14T14:01:18.837
|
2011-10-12T10:41:01.463
|
2011-10-12T10:41:01.463
| 677,910 | 677,910 |
[
"ios",
"detection",
"retina-display"
] |
5,664,750 | 1 | 5,664,941 | null | 7 | 3,488 |
I want to save my image as a transparent PNG and wrote a script which suddenly stopped working. I get this error message:

```
docExportOptions = new ExportOptionsSaveForWeb
docExportOptions.format = SaveDocumentType.PNG //-24 //JPEG, COMPUSERVEGIF, PNG-8, BMP
docExportOptions.transparency = true
docExportOptions.blur = 0.0
docExportOptions.includeProfile = false
docExportOptions.interlaced = false
docExportOptions.optimized = true
docExportOptions.quality = 100
docExportOptions.PNG8 = false
docRef.exportDocument (theFile,ExportType.SAVEFORWEB,docExportOptions)
```
Any ideas how to fix that? Or any other solutions to save the docRef as a transparent PNG?
|
Photoshop Script: exportDocument
|
CC BY-SA 3.0
| 0 |
2011-04-14T14:27:24.360
|
2012-03-27T05:28:52.270
| null | null | 531,222 |
[
"javascript",
"photoshop",
"photoshop-script"
] |
5,664,937 | 1 | 5,666,435 | null | 7 | 1,671 |
I want to use gridlines to create an effect of [millimeter graphing paper](http://en.wikipedia.org/wiki/Graph_paper) on a 2d graph, to show how multi-variable function depends on 1 variable. The scales of different variables differ a lot, so my naive approach (that I have used before) does not seem to work.
Example of what I have at the moment:
```
<< ErrorBarPlots`
Cmb[x_, y_, ex_, ey_] := {{N[x], N[y]}, ErrorBar[ex, ey]};
SetAttributes[Cmb, Listable];
ELP[x_, y_, ex_, ey_, name_] :=
ErrorListPlot[
Cmb[x, y, ex, ey],
PlotRange -> FromTo[x, y],
PlotLabel -> name,
Joined -> True, Frame -> True, GridLines -> GetGrid,
ImageSize -> {600}
]
```
Both `FromTo` (I want to leave 5% margin in the frame) and `GetGrid` do not work exactly as I want them to.
On some axes the variables differs many orders of 10. And I do not want, that one axis has many orders of 10 gridlines more then other. And most importantly I want the gridlines to line up with ticks.
Sample data:
```
ELP[
{4124961/25000000, 27573001/100000000, 9162729/25000000, 44635761/
100000000, 15737089/25000000, 829921/1562500, 4405801/4000000,
23068809/25000000, 329386201/100000000, 58079641/100000000},
{1/10, 1/5, 3/10, 2/5, 3/5, 1/2, 1/2, 1/2, 1/2, 1/2},
{2031/(250000 Sqrt[10]), 5251/(500000 Sqrt[10]), 3027/(
250000 Sqrt[10]), 6681/(500000 Sqrt[10]), 3967/(250000 Sqrt[10]),
911/(62500 Sqrt[10]), 2099/(100000 Sqrt[10]), 4803/(
250000 Sqrt[10]), 18149/(500000 Sqrt[10]), 7621/(500000 Sqrt[10])},
{1/2000, 1/1000, 3/2000, 1/500, 3/1000, 1/400, 1/400, 1/400, 1/400,
1/400},
"T2, m"
]
```
Would result in:

And my naive GetGrid, that works in some sence:
```
FromTo[x_, y_] := Module[{dx, dy},
dx = (Max[x] - Min[x])*0.1;
dy = (Max[y] - Min[y])*0.1;
{{Min[x] - dx, Max[x] + dx}, {Min[y] - dy, Max[y] + dy}}];
GetGrid[min_, max_] := Module[{step, i},
step = (max - min)/100;
Table[
{min + i*step,
If[Equal[Mod[i, 10], 0],
Directive[Gray, Thick, Opacity[0.5]],
If[Equal[Mod[i, 5], 0],
Directive[Gray, Opacity[0.5]],
Directive[LightGray, Opacity[0.5]]
]]},
{i, 1, 100}]
]
```
## Question
How to make GridLines line up with ticks?
edit: With
```
GetTicks[x_, y_] := Module[{dx, dy},
dx = (Max[x] - Min[x])*0.1;
dy = (Max[y] - Min[y])*0.1;
{
Min[x] - dx + Table[i*dx*1.2, {i, 1, 9}],
Min[y] - dy + Table[i*dy*1.2, {i, 1, 9}]
}];
ELP[x_, y_, ex_, ey_, name_] :=
ErrorListPlot[
Cmb[x, y, ex, ey],
PlotRange -> FromTo[x, y],
PlotLabel -> name,
Joined -> True, Frame -> True, GridLines -> GetGrid,
FrameTicks -> GetTicks[x, y],
ImageSize -> {600},
AspectRatio -> 1
]
```
I can get:

And that is a lot better. But I would like to shift the grid and not the ticks.
edit: @Sjoerd C. de Vries
Your solution does what I wanted to archive and works. I also noticed, that if I take first 5 elements of sample data, then the plot will be (elements are sorted and regression line is added).

Notice the left most element is like off grid.
|
Adaptive gridlines
|
CC BY-SA 3.0
| 0 |
2011-04-14T14:41:03.933
|
2011-04-15T12:53:09.340
|
2011-04-15T12:53:09.340
| 97,754 | 97,754 |
[
"wolfram-mathematica"
] |
5,665,068 | 1 | 5,671,567 | null | 9 | 17,123 |
I am using InstallShield 2011. I have a COM object that needs registered during installation. I cant seem to find anywhere where it instructs you on how to do this. Does anyone have any ideas?
Thanks
EDIT:

|
Register a COM object using InstallShield
|
CC BY-SA 3.0
| 0 |
2011-04-14T14:50:18.910
|
2015-05-06T13:21:25.153
|
2011-04-15T18:10:12.810
| 489,041 | 489,041 |
[
"com",
"windows-installer",
"installshield"
] |
5,665,081 | 1 | null | null | 0 | 1,730 |
Let's say my goal is to create a chat service. I also want multiple, discrete chat rooms.
I am leaning toward using XMPP for scaling / load balancing. I read the article [here](http://www.isode.com/whitepapers/reliable-xmpp.html), and I am looking at

Let's say I want to send a message from one client to another. According to this diagram,
1) The sender sends a message to Sender's XMPP Server.
2) Sender's XMPP Server relays the message to the MUC server.
3) The MUC server determines which server the recipient is connected to and relays the message there.
(correct me if I'm wrong)
1) The article suggests clustering the MUC over several servers. Does this mean a) mirror the MUC server's status over sender and recipient servers or b) turn the MUC section of the diagram into multiple servers, and the sender and recipient servers communicate with that cluster, transparently?
2) When a user first connects to a node, how does the network know which server to bind the user to? Is there a single point of entry machine to delegate this?
|
Suggestions on architecture for XMPP-based chat service?
|
CC BY-SA 3.0
| 0 |
2011-04-14T14:50:51.203
|
2013-04-08T05:14:12.727
| null | null | 83,897 |
[
"xmpp"
] |
5,665,120 | 1 | 5,669,479 | null | 1 | 164 |
Here is what I'm talking about:

As you can see, by default there is no way to get out of this view unless the user taps a row in the TableView, in which case you can dismiss the view. If only there was some way I could intercept the cancel button press that would be a way, but I'm not sure it's possible.
So, my question is, how can I allow the user to cancel out of this modal view?
|
How to allow the user to close a searchDisplayController?
|
CC BY-SA 3.0
| null |
2011-04-14T14:53:32.717
|
2011-04-14T20:48:50.190
| null | null | 456,851 |
[
"iphone",
"objective-c",
"cocoa-touch"
] |
5,665,129 | 1 | 5,665,402 | null | 2 | 315 |

Basically, I want to display a list of all the students (have their names on the far left side), and on each row (each student) display each date for the month selected in the comboBox.
I'm kind of stumped on how to tackle this.
Here's what I have so far:
```
//cmbMes is the combobox that holds each month to be selected.
private void cmbMes_SelectedIndexChanged(object sender, EventArgs e)
{
dataGridView1.DataSource = null;
int gradeParaleloId = Convert.ToInt32(cmbGradeParalelo.SelectedValue);
var studentRepo = new StudentRepository();
var students = studentRepo.FindAllStudentsFromGradeParalelo(gradeParaleloId);
var rows = new List<DataGridViewRow>();
foreach (var student in students)
{
DataGridViewRow newRow = new DataGridViewRow();
newRow.SetValues(new object[] { "test", "test", "test" });
rows.Add(newRow);
}
dataGridView1.DataSource = rows;
}
```
So for testing purposes I did that bit up there. It's fetching the correct students, but the SetValues method doesn't seem to be doing what I think it's supposed to be doing.

At this point I'm open to suggestions. I've only done things this way because I'm just starting to tackle it. Maybe there's a better way using some Linq-fu.
The concrete question is, is this the right way to approach it, creating a collection of DataGridViewRows and setting them as the .DataSource?
Thanks for the suggestions.
|
How to elegantly tackle this Attendance Form problem?
|
CC BY-SA 3.0
| null |
2011-04-14T14:54:24.907
|
2011-04-14T15:11:51.930
| null | null | 699,978 |
[
"c#",
"winforms",
"linq",
"collections",
"datagridview"
] |
5,665,184 | 1 | 5,665,268 | null | 0 | 669 |
I'm pretty new to SQL and would like some help with the following question:
What query would I run to find records that have a first name of "John" AND a last name of "Doe"?

If I try this, it doesn't work:
```
select * from tableNames
where (FName = 'John') and (LName = 'Doe')
```
Thanks,
Ray
|
Simple SQL Server query clarification on finding a record using two conditions
|
CC BY-SA 3.0
| null |
2011-04-14T14:57:49.513
|
2011-04-14T16:52:32.290
| null | null | 700,343 |
[
"sql-server",
"sql-server-2008"
] |
5,665,190 | 1 | null | null | 0 | 622 |
Let's say I have the following server-side architecture for my XMPP-based chat service:

I assume that each client (Sender being one, Recipient 1 and 2 being others) must initially connect to and bind to an XMPP server and that the client will always be bound to that server for the client's entire session. Correct?
If correct, then what determines which XMPP server the client initially connects to? Is there some single point of entry server in this XMPP cluster that decides this?
|
Does an XMPP service require a single point of entry?
|
CC BY-SA 3.0
| null |
2011-04-14T14:58:15.490
|
2011-04-15T08:15:40.773
| null | null | 83,897 |
[
"xmpp"
] |
5,665,217 | 1 | 5,672,542 | null | 19 | 19,729 |
I am getting the following message in Visual Studio 2008:
> The line endings in the following file
are not consistent. Do you want to
normalize the line endings?
I don't understand what that means. Should I be clicking yes or no?

|
Do I want normalized line endings?
|
CC BY-SA 3.0
| 0 |
2011-04-14T15:00:16.623
|
2011-04-15T04:55:30.033
| null | null | 472,377 |
[
"visual-studio",
"line-endings"
] |
5,665,336 | 1 | 7,815,210 | null | 4 | 3,630 |
Setting up Airplay was easy enough.
```
self.moviePlayer = [[[MPMoviePlayerViewController alloc] initWithContentURL:url] autorelease];
[self.moviePlayer setAllowsAirPlay:YES];
```
However, when I try to play a video, only the audio is streamed. The video continues to play on the iPad.
Additionally, the Airplay control only shows the "Audio Only" icon in the source list. (see photo).

This makes me think that iOS "thinks" that only audio is playing.
I have several other apps with Airplay on my device and they work correctly. I have cycled both the Apple tv and the iPad on and off. Both the iPad and the Apple tv have the latest OS installed. The video is being progressively downloaded, but it plays perfectly on the iPad.
Any ideas?
|
Airplay: Playing a Movie from MPMoviePlayerController results in only audio being streamed to Apple tv
|
CC BY-SA 3.0
| 0 |
2011-04-14T15:07:28.420
|
2011-11-23T16:44:11.347
| null | null | 48,311 |
[
"iphone",
"ios",
"ipad",
"mpmovieplayercontroller",
"avfoundation"
] |
5,665,188 | 1 | null | null | 1 | 967 |
When my consult return only one row, thats ok...

But when return more than one row my table crash

Output (second image and the error)
```
<table class="table-filtro">
<thead>
<tr>
<th class="nome-quarto">TIpo</th>
<th>N° Quarto</th>
<th>Label</th>
<th class="th-periodo" title="14 th April 2011">14</th>
<!--<th class="th-periodo">14 de April de 2011</th>-->
<th class="th-periodo" title="15 th April 2011">15</th>
<!--<th class="th-periodo">15 de April de 2011</th>-->
<th class="th-periodo" title="16 th April 2011">16</th>
<!--<th class="th-periodo">16 de April de 2011</th>-->
<th class="th-periodo" title="17 th April 2011">17</th>
<!--<th class="th-periodo">17 de April de 2011</th>-->
<th class="th-periodo" title="18 th April 2011">18</th>
<!--<th class="th-periodo">18 de April de 2011</th>-->
<th class="th-periodo" title="19 th April 2011">19</th>
<!--<th class="th-periodo">19 de April de 2011</th>-->
<th class="th-periodo" title="20 th April 2011">20</th>
<!--<th class="th-periodo">20 de April de 2011</th>-->
<th class="th-periodo" title="21 th April 2011">21</th>
<!--<th class="th-periodo">21 de April de 2011</th>-->
</tr>
</thead>
<tbody>
<tr>
<td class="nome-quarto">Standard</td>
<td>01</td>
<td>Quarto padrão</td>
<td><img title="01 -- 14 de April de 2011" src="http://casasbrancas.com.br/reservas/images/cubos/verde.jpg"></td>
<td><img title="05 -- 14 de April de 2011" src="http://casasbrancas.com.br/reservas/images/cubos/verde.jpg"></td>
<td><img title="80 -- 14 de April de 2011" src="http://casasbrancas.com.br/reservas/images/cubos/amarelo.jpg"></td>
<td><img title="01 -- 15 de April de 2011" src="http://casasbrancas.com.br/reservas/images/cubos/verde.jpg"></td>
<td><img title="05 -- 15 de April de 2011" src="http://casasbrancas.com.br/reservas/images/cubos/verde.jpg"></td>
<td><img title="80 -- 15 de April de 2011" src="http://casasbrancas.com.br/reservas/images/cubos/amarelo.jpg"></td>
<td><img title="01 -- 16 de April de 2011" src="http://casasbrancas.com.br/reservas/images/cubos/verde.jpg"></td>
<td><img title="05 -- 16 de April de 2011" src="http://casasbrancas.com.br/reservas/images/cubos/verde.jpg"></td>
<td><img title="80 -- 16 de April de 2011" src="http://casasbrancas.com.br/reservas/images/cubos/amarelo.jpg"></td>
<td><img title="01 -- 17 de April de 2011" src="http://casasbrancas.com.br/reservas/images/cubos/verde.jpg"></td>
<td><img title="05 -- 17 de April de 2011" src="http://casasbrancas.com.br/reservas/images/cubos/verde.jpg"></td>
<td><img title="80 -- 17 de April de 2011" src="http://casasbrancas.com.br/reservas/images/cubos/amarelo.jpg"></td>
<td><img title="01 -- 18 de April de 2011" src="http://casasbrancas.com.br/reservas/images/cubos/verde.jpg"></td>
<td><img title="05 -- 18 de April de 2011" src="http://casasbrancas.com.br/reservas/images/cubos/verde.jpg"></td>
<td><img title="80 -- 18 de April de 2011" src="http://casasbrancas.com.br/reservas/images/cubos/amarelo.jpg"></td>
<td><img title="01 -- 19 de April de 2011" src="http://casasbrancas.com.br/reservas/images/cubos/verde.jpg"></td>
<td><img title="05 -- 19 de April de 2011" src="http://casasbrancas.com.br/reservas/images/cubos/verde.jpg"></td>
<td><img title="80 -- 19 de April de 2011" src="http://casasbrancas.com.br/reservas/images/cubos/amarelo.jpg"></td>
<td><img title="01 -- 20 de April de 2011" src="http://casasbrancas.com.br/reservas/images/cubos/verde.jpg"></td>
<td><img title="05 -- 20 de April de 2011" src="http://casasbrancas.com.br/reservas/images/cubos/verde.jpg"></td>
<td><img title="80 -- 20 de April de 2011" src="http://casasbrancas.com.br/reservas/images/cubos/amarelo.jpg"></td>
<td><img title="01 -- 21 de April de 2011" src="http://casasbrancas.com.br/reservas/images/cubos/verde.jpg"></td>
<td><img title="05 -- 21 de April de 2011" src="http://casasbrancas.com.br/reservas/images/cubos/verde.jpg"></td>
<td><img title="80 -- 21 de April de 2011" src="http://casasbrancas.com.br/reservas/images/cubos/amarelo.jpg"></td>
</tr>
<tr>
<td class="nome-quarto">Standard</td>
<td>05</td>
<td>Deluxe </td>
<td><img title="01 -- 14 de April de 2011" src="http://casasbrancas.com.br/reservas/images/cubos/verde.jpg"></td>
<td><img title="05 -- 14 de April de 2011" src="http://casasbrancas.com.br/reservas/images/cubos/verde.jpg"></td>
<td><img title="80 -- 14 de April de 2011" src="http://casasbrancas.com.br/reservas/images/cubos/amarelo.jpg"></td>
<td><img title="01 -- 15 de April de 2011" src="http://casasbrancas.com.br/reservas/images/cubos/verde.jpg"></td>
<td><img title="05 -- 15 de April de 2011" src="http://casasbrancas.com.br/reservas/images/cubos/verde.jpg"></td>
<td><img title="80 -- 15 de April de 2011" src="http://casasbrancas.com.br/reservas/images/cubos/amarelo.jpg"></td>
<td><img title="01 -- 16 de April de 2011" src="http://casasbrancas.com.br/reservas/images/cubos/verde.jpg"></td>
<td><img title="05 -- 16 de April de 2011" src="http://casasbrancas.com.br/reservas/images/cubos/verde.jpg"></td>
<td><img title="80 -- 16 de April de 2011" src="http://casasbrancas.com.br/reservas/images/cubos/amarelo.jpg"></td>
<td><img title="01 -- 17 de April de 2011" src="http://casasbrancas.com.br/reservas/images/cubos/verde.jpg"></td>
<td><img title="05 -- 17 de April de 2011" src="http://casasbrancas.com.br/reservas/images/cubos/verde.jpg"></td>
<td><img title="80 -- 17 de April de 2011" src="http://casasbrancas.com.br/reservas/images/cubos/amarelo.jpg"></td>
<td><img title="01 -- 18 de April de 2011" src="http://casasbrancas.com.br/reservas/images/cubos/verde.jpg"></td>
<td><img title="05 -- 18 de April de 2011" src="http://casasbrancas.com.br/reservas/images/cubos/verde.jpg"></td>
<td><img title="80 -- 18 de April de 2011" src="http://casasbrancas.com.br/reservas/images/cubos/amarelo.jpg"></td>
<td><img title="01 -- 19 de April de 2011" src="http://casasbrancas.com.br/reservas/images/cubos/verde.jpg"></td>
<td><img title="05 -- 19 de April de 2011" src="http://casasbrancas.com.br/reservas/images/cubos/verde.jpg"></td>
<td><img title="80 -- 19 de April de 2011" src="http://casasbrancas.com.br/reservas/images/cubos/amarelo.jpg"></td>
<td><img title="01 -- 20 de April de 2011" src="http://casasbrancas.com.br/reservas/images/cubos/verde.jpg"></td>
<td><img title="05 -- 20 de April de 2011" src="http://casasbrancas.com.br/reservas/images/cubos/verde.jpg"></td>
<td><img title="80 -- 20 de April de 2011" src="http://casasbrancas.com.br/reservas/images/cubos/amarelo.jpg"></td>
<td><img title="01 -- 21 de April de 2011" src="http://casasbrancas.com.br/reservas/images/cubos/verde.jpg"></td>
<td><img title="05 -- 21 de April de 2011" src="http://casasbrancas.com.br/reservas/images/cubos/verde.jpg"></td>
<td><img title="80 -- 21 de April de 2011" src="http://casasbrancas.com.br/reservas/images/cubos/amarelo.jpg"></td>
</tr>
<tr>
<td class="nome-quarto">Standard</td>
<td>80</td>
<td>Quarto novo </td>
<td><img title="01 -- 14 de April de 2011" src="http://casasbrancas.com.br/reservas/images/cubos/verde.jpg"></td>
<td><img title="05 -- 14 de April de 2011" src="http://casasbrancas.com.br/reservas/images/cubos/verde.jpg"></td>
<td><img title="80 -- 14 de April de 2011" src="http://casasbrancas.com.br/reservas/images/cubos/amarelo.jpg"></td>
<td><img title="01 -- 15 de April de 2011" src="http://casasbrancas.com.br/reservas/images/cubos/verde.jpg"></td>
<td><img title="05 -- 15 de April de 2011" src="http://casasbrancas.com.br/reservas/images/cubos/verde.jpg"></td>
<td><img title="80 -- 15 de April de 2011" src="http://casasbrancas.com.br/reservas/images/cubos/amarelo.jpg"></td>
<td><img title="01 -- 16 de April de 2011" src="http://casasbrancas.com.br/reservas/images/cubos/verde.jpg"></td>
<td><img title="05 -- 16 de April de 2011" src="http://casasbrancas.com.br/reservas/images/cubos/verde.jpg"></td>
<td><img title="80 -- 16 de April de 2011" src="http://casasbrancas.com.br/reservas/images/cubos/amarelo.jpg"></td>
<td><img title="01 -- 17 de April de 2011" src="http://casasbrancas.com.br/reservas/images/cubos/verde.jpg"></td>
<td><img title="05 -- 17 de April de 2011" src="http://casasbrancas.com.br/reservas/images/cubos/verde.jpg"></td>
<td><img title="80 -- 17 de April de 2011" src="http://casasbrancas.com.br/reservas/images/cubos/amarelo.jpg"></td>
<td><img title="01 -- 18 de April de 2011" src="http://casasbrancas.com.br/reservas/images/cubos/verde.jpg"></td>
<td><img title="05 -- 18 de April de 2011" src="http://casasbrancas.com.br/reservas/images/cubos/verde.jpg"></td>
<td><img title="80 -- 18 de April de 2011" src="http://casasbrancas.com.br/reservas/images/cubos/amarelo.jpg"></td>
<td><img title="01 -- 19 de April de 2011" src="http://casasbrancas.com.br/reservas/images/cubos/verde.jpg"></td>
<td><img title="05 -- 19 de April de 2011" src="http://casasbrancas.com.br/reservas/images/cubos/verde.jpg"></td>
<td><img title="80 -- 19 de April de 2011" src="http://casasbrancas.com.br/reservas/images/cubos/amarelo.jpg"></td>
<td><img title="01 -- 20 de April de 2011" src="http://casasbrancas.com.br/reservas/images/cubos/verde.jpg"></td>
<td><img title="05 -- 20 de April de 2011" src="http://casasbrancas.com.br/reservas/images/cubos/verde.jpg"></td>
<td><img title="80 -- 20 de April de 2011" src="http://casasbrancas.com.br/reservas/images/cubos/amarelo.jpg"></td>
<td><img title="01 -- 21 de April de 2011" src="http://casasbrancas.com.br/reservas/images/cubos/verde.jpg"></td>
<td><img title="05 -- 21 de April de 2011" src="http://casasbrancas.com.br/reservas/images/cubos/verde.jpg"></td>
<td><img title="80 -- 21 de April de 2011" src="http://casasbrancas.com.br/reservas/images/cubos/amarelo.jpg"></td>
</tr>
</tbody>
</table>
```
Template html code
```
<table class="table-filtro">
<thead>
<tr>
<th class="nome-quarto">TIpo</th>
<th>N° Quarto</th>
<th>Label</th>
{foreach from=$numeros item="estoque"}
<th class="th-periodo" title='{$estoque.reserva_checkin|date_format:"%e th %B %Y"}'>{$estoque.reserva_checkin|date_format:"%e"}</th>
<!--<th class="th-periodo">{$estoque.reserva_checkin|date_format:"%e de %B de %Y"}</th>-->
{/foreach}
</tr>
</thead>
<tbody>
{foreach from=$listar item="estoque"}
<tr>
<td class="nome-quarto">{$estoque.tipo_nome}</td>
<td>{if $estoque.quarto_numero|count_characters eq '1'}0{$estoque.quarto_numero}{else}{$estoque.quarto_numero}{/if}</td>
<td>{$estoque.quarto_descricao}</td>
{foreach from=$datas item="estoque"}
<td><img title="{if $estoque.quarto_numero|count_characters eq '1'}0{$estoque.quarto_numero}{else}{$estoque.quarto_numero}{/if} -- {$estoque.reserva_checkin|date_format:"%e de %B de %Y"}" src="http://{$smarty.server.SERVER_NAME}/reservas/images/cubos/{if $estoque.reserva_status eq '3'}vermelho{elseif $estoque.reserva_status eq '2'}amarelo{else}verde{/if}.jpg" /></td>
{/foreach}
</tr>
{/foreach}
</tbody>
</table>
```
The PHP function
```
function datas($data, $dias, $tipo) {
$inicio = strtotime($data);
$edia = date('d', $inicio);
$emes = date('m', $inicio);
$eano = date('Y', $inicio);
$db = new DBConfig();
$db->config();
$db->conn();
$smarty_array = array();
while($i <= $dias) {
$today = strtotime(date('Y-m-d',mktime(0,0,0,date($emes),date($edia)+$i,date($eano))));
$query = mysql_query("SELECT * FROM quartos AS quartos
INNER JOIN tipos AS tipos
LEFT JOIN reservas AS reservas
ON quartos.quarto_tipo = tipos.tipo_id
AND quartos.quarto_numero = reservas.reserva_quarto_id
AND ".$today." BETWEEN reservas.reserva_checkin AND reservas.reserva_checkout
WHERE quartos.quarto_tipo = '".$tipo."'
GROUP BY quartos.quarto_id HAVING Count(*) >= 1") or die(mysql_error());
while($row = mysql_fetch_assoc($query)){
if (empty($row["reserva_status"])) {
$row["reserva_status"] = "0";
}
$row["reserva_checkin"] = $today;
$smarty_array[] = $row;
}
$i++;
}
$db->close();
return $smarty_array;
}
```
Array
```
Smarty_Variable Object (3)
->value = Array (24)
0 => Array (15)
quarto_id => "12"
quarto_tipo => "1"
quarto_numero => "1"
quarto_descricao => "Quarto padrão"
tipo_id => "1"
tipo_nome => "Standard"
tipo_foto => "03f9efa3b682512c74a9275656622b03.jpg"
reserva_id => "4"
reserva_quarto_id => "1"
reserva_valor => "1600"
reserva_status => "1"
reserva_cliente_id => "62"
reserva_checkin => 1302757200
reserva_checkout => "1303534800"
reserva_obs => "Aguardando pagamento"
1 => Array (15)
quarto_id => "15"
quarto_tipo => "1"
quarto_numero => "5"
quarto_descricao => "Deluxe "
tipo_id => "1"
tipo_nome => "Standard"
tipo_foto => "03f9efa3b682512c74a9275656622b03.jpg"
reserva_id => null
reserva_quarto_id => null
reserva_valor => null
reserva_status => "0"
reserva_cliente_id => null
reserva_checkin => 1302757200
reserva_checkout => null
reserva_obs => null
2 => Array (15)
quarto_id => "26"
quarto_tipo => "1"
quarto_numero => "80"
quarto_descricao => "Quarto novo "
tipo_id => "1"
tipo_nome => "Standard"
tipo_foto => "03f9efa3b682512c74a9275656622b03.jpg"
reserva_id => "3"
reserva_quarto_id => "80"
reserva_valor => "3000"
reserva_status => "2"
reserva_cliente_id => "58"
reserva_checkin => 1302757200
reserva_checkout => "1305090000"
reserva_obs => "Aguardando pagamento"
3 => Array (15)
quarto_id => "12"
quarto_tipo => "1"
quarto_numero => "1"
quarto_descricao => "Quarto padrão"
tipo_id => "1"
tipo_nome => "Standard"
tipo_foto => "03f9efa3b682512c74a9275656622b03.jpg"
reserva_id => "4"
reserva_quarto_id => "1"
reserva_valor => "1600"
reserva_status => "1"
reserva_cliente_id => "62"
reserva_checkin => 1302843600
reserva_checkout => "1303534800"
reserva_obs => "Aguardando pagamento"
4 => Array (15)
quarto_id => "15"
quarto_tipo => "1"
quarto_numero => "5"
quarto_descricao => "Deluxe "
tipo_id => "1"
tipo_nome => "Standard"
tipo_foto => "03f9efa3b682512c74a9275656622b03.jpg"
reserva_id => null
reserva_quarto_id => null
reserva_valor => null
reserva_status => "0"
reserva_cliente_id => null
reserva_checkin => 1302843600
reserva_checkout => null
reserva_obs => null
5 => Array (15)
quarto_id => "26"
quarto_tipo => "1"
quarto_numero => "80"
quarto_descricao => "Quarto novo "
tipo_id => "1"
tipo_nome => "Standard"
tipo_foto => "03f9efa3b682512c74a9275656622b03.jpg"
reserva_id => "3"
reserva_quarto_id => "80"
reserva_valor => "3000"
reserva_status => "2"
reserva_cliente_id => "58"
reserva_checkin => 1302843600
reserva_checkout => "1305090000"
reserva_obs => "Aguardando pagamento"
6 => Array (15)
quarto_id => "12"
quarto_tipo => "1"
quarto_numero => "1"
quarto_descricao => "Quarto padrão"
tipo_id => "1"
tipo_nome => "Standard"
tipo_foto => "03f9efa3b682512c74a9275656622b03.jpg"
reserva_id => "4"
reserva_quarto_id => "1"
reserva_valor => "1600"
reserva_status => "1"
reserva_cliente_id => "62"
reserva_checkin => 1302930000
reserva_checkout => "1303534800"
reserva_obs => "Aguardando pagamento"
7 => Array (15)
quarto_id => "15"
quarto_tipo => "1"
quarto_numero => "5"
quarto_descricao => "Deluxe "
tipo_id => "1"
tipo_nome => "Standard"
tipo_foto => "03f9efa3b682512c74a9275656622b03.jpg"
reserva_id => null
reserva_quarto_id => null
reserva_valor => null
reserva_status => "0"
reserva_cliente_id => null
reserva_checkin => 1302930000
reserva_checkout => null
reserva_obs => null
8 => Array (15)
quarto_id => "26"
quarto_tipo => "1"
quarto_numero => "80"
quarto_descricao => "Quarto novo "
tipo_id => "1"
tipo_nome => "Standard"
tipo_foto => "03f9efa3b682512c74a9275656622b03.jpg"
reserva_id => "3"
reserva_quarto_id => "80"
reserva_valor => "3000"
reserva_status => "2"
reserva_cliente_id => "58"
reserva_checkin => 1302930000
reserva_checkout => "1305090000"
reserva_obs => "Aguardando pagamento"
9 => Array (15)
quarto_id => "12"
quarto_tipo => "1"
quarto_numero => "1"
quarto_descricao => "Quarto padrão"
tipo_id => "1"
tipo_nome => "Standard"
tipo_foto => "03f9efa3b682512c74a9275656622b03.jpg"
reserva_id => "4"
reserva_quarto_id => "1"
reserva_valor => "1600"
reserva_status => "1"
reserva_cliente_id => "62"
reserva_checkin => 1303016400
reserva_checkout => "1303534800"
reserva_obs => "Aguardando pagamento"
10 => Array (15)
quarto_id => "15"
quarto_tipo => "1"
quarto_numero => "5"
quarto_descricao => "Deluxe "
tipo_id => "1"
tipo_nome => "Standard"
tipo_foto => "03f9efa3b682512c74a9275656622b03.jpg"
reserva_id => null
reserva_quarto_id => null
reserva_valor => null
reserva_status => "0"
reserva_cliente_id => null
reserva_checkin => 1303016400
reserva_checkout => null
reserva_obs => null
11 => Array (15)
quarto_id => "26"
quarto_tipo => "1"
quarto_numero => "80"
quarto_descricao => "Quarto novo "
tipo_id => "1"
tipo_nome => "Standard"
tipo_foto => "03f9efa3b682512c74a9275656622b03.jpg"
reserva_id => "3"
reserva_quarto_id => "80"
reserva_valor => "3000"
reserva_status => "2"
reserva_cliente_id => "58"
reserva_checkin => 1303016400
reserva_checkout => "1305090000"
reserva_obs => "Aguardando pagamento"
12 => Array (15)
quarto_id => "12"
quarto_tipo => "1"
quarto_numero => "1"
quarto_descricao => "Quarto padrão"
tipo_id => "1"
tipo_nome => "Standard"
tipo_foto => "03f9efa3b682512c74a9275656622b03.jpg"
reserva_id => "4"
reserva_quarto_id => "1"
reserva_valor => "1600"
reserva_status => "1"
reserva_cliente_id => "62"
reserva_checkin => 1303102800
reserva_checkout => "1303534800"
reserva_obs => "Aguardando pagamento"
13 => Array (15)
quarto_id => "15"
quarto_tipo => "1"
quarto_numero => "5"
quarto_descricao => "Deluxe "
tipo_id => "1"
tipo_nome => "Standard"
tipo_foto => "03f9efa3b682512c74a9275656622b03.jpg"
reserva_id => null
reserva_quarto_id => null
reserva_valor => null
reserva_status => "0"
reserva_cliente_id => null
reserva_checkin => 1303102800
reserva_checkout => null
reserva_obs => null
14 => Array (15)
quarto_id => "26"
quarto_tipo => "1"
quarto_numero => "80"
quarto_descricao => "Quarto novo "
tipo_id => "1"
tipo_nome => "Standard"
tipo_foto => "03f9efa3b682512c74a9275656622b03.jpg"
reserva_id => "3"
reserva_quarto_id => "80"
reserva_valor => "3000"
reserva_status => "2"
reserva_cliente_id => "58"
reserva_checkin => 1303102800
reserva_checkout => "1305090000"
reserva_obs => "Aguardando pagamento"
15 => Array (15)
quarto_id => "12"
quarto_tipo => "1"
quarto_numero => "1"
quarto_descricao => "Quarto padrão"
tipo_id => "1"
tipo_nome => "Standard"
tipo_foto => "03f9efa3b682512c74a9275656622b03.jpg"
reserva_id => "4"
reserva_quarto_id => "1"
reserva_valor => "1600"
reserva_status => "1"
reserva_cliente_id => "62"
reserva_checkin => 1303189200
reserva_checkout => "1303534800"
reserva_obs => "Aguardando pagamento"...
```
|
How to display data correctly from array using smarty?
|
CC BY-SA 3.0
| null |
2011-04-14T14:58:12.980
|
2011-04-16T00:17:29.733
|
2011-04-14T15:42:14.953
| 526,573 | 526,573 |
[
"php",
"html",
"css",
"smarty"
] |
5,665,764 | 1 | 5,665,848 | null | 5 | 6,116 |
I have looked at [http://developer.android.com/resources/dashboard/platform-versions.html](http://developer.android.com/resources/dashboard/platform-versions.html)

```
2.1 : 27.2%
2.2 : 63.9%
2.3 : 0.8%
2.3.3 : 1.7%
3.0 : 0.2%
```
I am pretty sure I will use Android 2.1 as my version, covering almost 94% of current users. When I go to set up an android application in eclipse, I see this screen

The documentation says
> This value specifies
the minimum API Level required by your
application.
What does that mean? Does that mean I can pick 2.3 for my build target, but select 7 as the min sdk version and have all devices running 2.1 supported?
|
Android Application Version - Min SDK Version
|
CC BY-SA 3.0
| null |
2011-04-14T15:36:45.027
|
2011-04-14T15:43:20.993
| null | null | 107,455 |
[
"eclipse",
"android",
"android-version"
] |
5,665,973 | 1 | 5,704,164 | null | 3 | 2,405 |
An ul list against a float:left is giving me serious headache in IE 9. It worked fine in IE 7 and IE 8, and now it doesn't. I've tried to change the doc type to no avail. If I leave the doctype out of it, it works fine..... but that's not the way to go.
The following example will put the bulletpoints over the yellow area in IE 9. Any pointers at all?

Here's my code:
```
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<style type="text/css">
body{
background-color:grey;
}
.somewrapper{
width:500px;
background-color:white;
float:left;
}
.imagewrapper{
float:left;
width:180px;
height:140px;
margin-right:30px;
background-color:yellow;
}
ul{
margin:0px;
padding:0px;
margin-left:25px;
}
ul li{
list-style:disc outside none;
}
</style>
</head>
<body>
<div class="somewrapper">
<div class="imagewrapper">
</div>
<div class="teste">
<h2>asdklfjaøskljf</h2>
<ul>
<li>aøsklfjaøs jasas fasfklf aaasfasasfa sfasfsdfasfas fasf asfasfasfasfasf asf as fasføsjklf</li>
<li>aøsklfjaøsjklfaøsjklf</li>
<li>aøsklfjaøsjklfaøsjklf</li>
<li>aøsklfjaøsjklfaøsjklf</li>
<li>aøsklfjaøsjklfaøsjklf</li>
<li>aøsklfjaøsjklfaøsjklf</li>
</ul>
<h2>asdfasfasfasdfasf</h2>
<p>asdfasfasfaskjf aklsjf asjklf askljf </p>
<ul>
<li>aøsklfjaøsjklfaøsjklf</li>
<li>aøsklfjaøsjklfaøsjklf</li>
<li>aøsklfjaøsjklfaøsjklf</li>
<li>aøsklfjaøsjklfaøsjklf</li>
<li>aøsklfjaøsjklfaøsjklf</li>
<li>aøsklfjaøsjklfaøsjklf</li>
<li>aøsklfjaøsjklfaøsjklf</li>
<li>aøsklfjaøsjklfaøsjklf</li>
<li>aøsklfjaøsjklfaøsjklf</li>
</ul>
<h2>asdfasfasfasdfasf</h2>
<p>asdfasfasfaskjf aklsjf asjklf askljf </p>
</div>
</div>
</body>
```
|
IE 9 compability mode with ul against a float:left
|
CC BY-SA 3.0
| 0 |
2011-04-14T15:51:33.497
|
2013-03-26T16:21:52.590
|
2011-04-15T16:15:37.183
| 464,744 | 470,039 |
[
"compatibility",
"internet-explorer-9"
] |
5,665,989 | 1 | null | null | 0 | 257 |
I'm developing a Windows Phone app.
I use a user control to show a pop up:
```
<UserControl x:Class="XXXXXXX.Views.Lists.GameDescriptionControl"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d"
FontFamily="{StaticResource PhoneFontFamilyNormal}"
FontSize="{StaticResource PhoneFontSizeNormal}"
Foreground="{StaticResource PhoneForegroundBrush}" Height="290" Width="460">
<Grid x:Name="LayoutRoot" Background="{StaticResource PhoneChromeBrush}" Margin="0,0,0,0" Width="460">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="133"/>
<RowDefinition Height="86"/>
</Grid.RowDefinitions>
<TextBlock HorizontalAlignment="Center" Margin="10" Name="gameDescription" Text="" VerticalAlignment="Top" TextWrapping="Wrap" Grid.Row="1" Style="{StaticResource PhoneTextTitle3Style}" />
<Button Content="{Binding Path=AppResources.Yes, Source={StaticResource LocalizedStrings}}" Height="72" HorizontalAlignment="Left" Margin="50,5,0,0" Name="okButton" VerticalAlignment="Top" Width="160" Click="okButton_Click" Grid.Row="2" />
<Button Content="{Binding Path=AppResources.No, Source={StaticResource LocalizedStrings}}" Height="72" HorizontalAlignment="Left" Margin="244,5,0,0" Name="cancelButton" VerticalAlignment="Top" Width="160" Click="cancelButton_Click" Grid.Row="2" />
<TextBlock Grid.Row="0" x:Name="caption" HorizontalAlignment="Left" Margin="10" TextWrapping="Wrap" Text="{Binding Path=AppResources.Description, Source={StaticResource LocalizedStrings}}" Style="{StaticResource PhoneTextLargeStyle}"/>
</Grid>
</UserControl>
```
And this is the code to show the Pop Up:
```
private void showInfo(int gameId)
{
string gameDesc = getGameInfo(gameId);
p = new Popup();
GameDescriptionControl gd = new GameDescriptionControl();
gd.Description = gameDesc;
gd.OkClicked += new EventHandler(gd_OkClicked);
gd.CancelClicked += new EventHandler(gd_CancelClicked);
p.Child = gd;
// Set where the popup will show up on the screen.
p.VerticalOffset = 10;
p.HorizontalOffset = 10;
// Open the popup.
p.IsOpen = true;
}
```
But I get this:

As you can see, caption TextBlock hasn't got a margin top.
Any advice?
|
Pop Up: a problem with margin Top
|
CC BY-SA 3.0
| null |
2011-04-14T15:53:03.387
|
2011-04-15T04:49:59.560
|
2011-04-14T16:34:52.497
| 68,571 | 68,571 |
[
"layout",
"windows-phone-7",
"popup",
"margin"
] |
5,666,230 | 1 | 5,669,193 | null | 0 | 688 |
So I've got an issue with google calendar embedding. I hate the white border and I'm trying to get rid of it but I can't modify the css inside the iframe. I'm wondering if there's a way to do it with jquery? Maybe using .ready() or something? I've tried selecting the child of the iFrame with jquery but it doesn't work.
The part I need is in inline css on the body tag in the iframe, like this:
```
<iframe>
<html>
<body style="background-color:#FFF">
```
Any ideas?

|
Modifying gcal embed CSS with Jquery?
|
CC BY-SA 3.0
| null |
2011-04-14T16:12:09.233
|
2013-04-03T09:25:51.410
| null | null | 331,118 |
[
"jquery",
"css",
"iframe",
"embed",
"gcal"
] |
5,666,380 | 1 | 5,666,642 | null | 0 | 894 |
I have an image object and a rectangle object. Now I want to be the image to be only visible where the rectangle is, everything else should have an opacity of 0.5 - the result should look something simliar to the following:

When I set the opacity of the rectangle to 0.5 the effect is the antipode - so how could I realize it as shown in the image? Size and position of the rectangle is changed by code-behind, but that shouldn't make any differences...
All hints / answeres appreciated :)
|
How to make some layer mask in Silverlight?
|
CC BY-SA 3.0
| null |
2011-04-14T16:23:14.853
|
2011-04-14T16:46:10.147
| null | null | 5,703 |
[
"silverlight",
"xaml",
"silverlight-3.0"
] |
5,666,596 | 1 | null | null | 2 | 1,333 |
I want to change the size of the android tabs, but I don't want to make all new drawables for them. The tabs will just have text, no icons, and will be part of a workspace view that responds to horizontal flings, so having a full tab is not necessary for me. But I still want them default drawables for the purpose of trackball navigation or in case the user wants to press to jump to a tab without using the workspace fling.
My code is basically this
```
height = (int) (height * context.getResources().getDisplayMetrics().density);
for (int i = 0; i < tabWidget.getChildCount(); i++) {
tabWidget.getChildAt(i).getLayoutParams().height = height;
}
tabWidget.getLayoutParams().height = height;
```
The problem I am running into is that the tabs have an unexpected appearance based on the height. If I set the height to anything less than 60, there is a gradient that appears, and only goes about 30dip up vertically. If I set it to 60 or above, the gradient goes all the way up.
I attached a picture to illustrate. Top examples have the bottom tabs set to 30 dip, bottom to 40 dip. In each example, the top set of tabs is >= 60.

Anyone know how I can either get rid of the gradient or force it to cover the whole vertical area?
Update:
Tried the exact tab resize code on the hello tab widget demo, and same issue. Which tells me I am failing to do something in my resizing if this strategy has worked for somebody else

|
resizing default android tab issue
|
CC BY-SA 3.0
| null |
2011-04-14T16:42:30.230
|
2011-04-14T18:01:16.510
|
2011-04-14T18:01:16.510
| 415,422 | 415,422 |
[
"android",
"tabs",
"dimensions"
] |
5,666,755 | 1 | 5,666,912 | null | 0 | 846 |
I wanted to test out some different coloured cells in my iPhone App, and I thought that the same coloured cells as the app store ones would probably suit. Therefore I wanted to try them out. Unfortunately I do not have the colour codes for the cells, does anyone know?
These are the colours in action:

Also, would this code be correct to show them?
```
- (void)tableView: (UITableView *)tableView willDisplayCell: (UITableViewCell *)cell forRowAtIndexPath: (NSIndexPath *)indexPath {
if ( indexPath.row%2 == 0) {
UIColor *altCellColor = [UIColor colorWithRed:256/256.0 green:237/256.0 blue:227/256.0 alpha:1.0]; /
cell.backgroundColor = altCellColor;
}
if ( indexPath.row%2 == 1) {
UIColor *altCellColor2 = [UIColor colorWithRed:1 green:1 blue:1alpha:1.0];
cell.backgroundColor = altCellColor2;
}
```
|
iPhone AppStore's UITableViewCell background colours
|
CC BY-SA 3.0
| null |
2011-04-14T16:55:33.713
|
2013-07-05T14:43:20.367
|
2011-09-24T13:41:33.500
| 142,162 | 556,479 |
[
"iphone",
"objective-c",
"xcode",
"uitableview",
"app-store"
] |
5,667,355 | 1 | 5,667,768 | null | 109 | 145,958 |
I'm using Entity Framework 4 with the Model First approach.
I started the project, designed the entities and generated the database. Everything worked fine.
Then I needed to go back and add another entity to my model. However, as I drag an entity to the EDMX I get this error:

Alright! I just need to map Entity1 to a table.. But hey! I'm using Model First approach, I expect it to create the table for me when I generate the DDL.
How do I work around this error?
|
Why am I getting this error: No mapping specified for the following EntitySet/AssociationSet - Entity1?
|
CC BY-SA 3.0
| 0 |
2011-04-14T17:47:29.747
|
2020-11-17T06:13:59.393
|
2013-02-10T04:41:40.217
| 192,729 | 192,729 |
[
".net",
"entity-framework",
"entity-framework-4"
] |
5,667,352 | 1 | 5,678,907 | null | 4 | 3,629 |
I have parent-child information in a table with GroupID (TreeID.)

From this table I want to derive something like this:

The purpose of drawing a tree is for viewing only. The table has thousands of groupID/tree structures.
I am using the .NET platform.
How should I proceed?
```
create table parent_child (GroupID varchar(100) null,
Level varchar(100) null,
Name varchar(100) null,
ID varchar(100) null,
ParentID varchar(100) null,
Top_Parent varchar(100) null)
insert into parent_child (GroupID,Level, Name,ID,ParentID,Top_Parent) values
('1234', '4', 'James', '6712', '921', '1005'),
('1234', '3', 'Peter', '11', '206', '1005'),
('1234', '3', 'Royden', '14', '206', '1005'),
('1234', '3', 'Lila', '237', '589', '1005'),
('1234', '3', 'Julie', '921', '589', '1005'),
('1234', '2', 'Sandy', '206', '1005', '1005'),
('1234', '2', 'Tom', '589', '1005', '1005'),
('1234', '1', 'Sam', '1005', 'NA', '1005')
```
|
Draw a tree or organization chart from parent child data
|
CC BY-SA 3.0
| 0 |
2011-04-14T17:47:09.700
|
2017-07-29T21:56:08.877
|
2017-07-29T21:56:08.877
| 4,370,109 | 219,628 |
[
".net",
"charts",
"tree",
"draw",
"organization"
] |
5,667,454 | 1 | 5,668,510 | null | 7 | 42,863 |
Can you please suggest that how can i write a that plays a song.?
I tried the following snippet but i get the this exception:
```
import sun.audio.*;
import java.io.*;
class tester {
public static void main(String args[]) throws Exception {
InputStream in=new FileInputStream("tester.mp3");
AudioStream as=new AudioStream(in);
AudioPlayer.player.start(as);
}
}
```
|
Playing MP3 using Java Sound API
|
CC BY-SA 3.0
| 0 |
2011-04-14T17:56:42.250
|
2023-02-14T11:28:43.553
|
2013-01-13T10:17:11.613
| 418,556 | 648,138 |
[
"java",
"audio",
"javasound"
] |
5,667,509 | 1 | 5,667,539 | null | 0 | 178 |
I have a big tag database which has 100s of thousands of "1 count tag" rows:

Is there a easy way I can remove all these rows from my datebase?
deleting them one by one would take me a life time :D

|
Need to delete all tags with 1 count from database
|
CC BY-SA 3.0
| null |
2011-04-14T18:02:16.423
|
2018-03-31T23:05:24.317
|
2018-03-31T23:05:24.317
| 4,370,109 | 638,278 |
[
"mysql",
"sql",
"database",
"row"
] |
5,667,592 | 1 | 5,667,991 | null | 2 | 228 |
I have a userControl which has some programmatically drawn rectangles. I need few instances of that userControl on my form (see the image). The problem is that only the last instance will show the drawn shapes!
I guess it has something to do with drawing surface or the Paint event handler
In case it might help, here's some of the code I use in my control:
```
private void MyUserControl_Paint(object sender, PaintEventArgs e)
{
showHoraireMaitresse();
Rectangle rec = showDisponibilités();
var b = new SolidBrush(Color.FromArgb(150, Color.Blue));
e.Graphics.FillRectangle (b, rec);
showOccupation();
}
private void showHoraireMaitresse()
{
heureDebut = 8;
for (int i = 0; i < 14; i++)
{
//Label d'heure -> This shows just fine
addLabel(i, heureDebut);
//Rectangles d'heure -> This shows only in last instance
var rectangle = new Rectangle(180 + i * largeurDUneHeure, 14, largeurDUneHeure, 30);
surface.DrawRectangle(defaultPen, rectangle);
}
addLabel(14, heureDebut);
}
```

Thank you!
|
Drawn rectangle appears only on last instance of my userControl
|
CC BY-SA 3.0
| 0 |
2011-04-14T18:08:54.677
|
2011-04-14T18:39:44.900
| null | null | 457,500 |
[
"c#",
"winforms",
"visual-studio",
"graphics",
"drawing"
] |
5,667,607 | 1 | null | null | 5 | 1,499 |
I have a little [Java application](http://www.softwaremonkey.org/Program/TimeKeeper) that I wrote for recording my work activities. Since I have it open all day, every day, one of the things that originally concerned me as to choice of language is the amount of memory it would use.
Happily, under Windows XP I it would typically consume about 5 MB when minimized and 12 or so when maximized, and happily runs with `-Xmx5M` (memory consumption according to Windows Task Manager).
When I upgraded my home PC with newer hardware, and at the same time, to Windows 7 64, (), I immediately noted that the JVM for this application now reports 68 MB+ always... and that's with `-Xmx5M -Xss16K`, according to Task Manager's "Working Set".
Both the old and new machines had/have 4 GB of RAM, of which 512 MB is used by video. Both were running recent builds of Java 6 - about update 15 for WinXP, and now update 24 for Win7. The application footprint on disk is 70 K in 12 classes. Moreover, my work computer is still Windows XP, running Java 6_24, and it shows about 12 MB for this identical application - and by identical I mean literally that, since the two systems are sync'd for all my development tools.
As a developer, I need to understand the reasons why my applications appear to chew up so much memory.
Can anyone shed some light on this, and suggest how to meaningfully reduce the memory footprint for a Java 6 application?
The answer may be in an excessive PermGen size. According to JVisualVM, I have a heap of:
> Size: 5.2 MB, Used: 4.3 MB (peak) and Allocated 6.2 MB.
but for the PermGen
> Size: 12.5 MB, Used: 4.6 MB (peak) and .

So is it possible that the 68 MB shown in Task Manager in Win 7 is simply requested but unassigned virtual memory?
Reducing PermGen to 12 MB had no effect on the process RAM, but JVisualVM did show it reduced (apparently 12 MB constitutes some sort of minimum, because going lower than that had no effect in JVVM).
|
Why is there such a big difference in memory use of a Java application in Windows XP 32 vs Windows 7 64
|
CC BY-SA 3.0
| null |
2011-04-14T18:09:48.727
|
2011-04-15T09:00:57.740
|
2011-04-15T09:00:57.740
| 21,234 | 8,946 |
[
"java",
"user-interface",
"memory-management"
] |
5,667,651 | 1 | null | null | 1 | 2,781 |
I am writing a program in C and Windows API. I am using Visual Studio 2010 Express and Character Set is set to "Not Set". I have made an edit control to accept username. Here's declaration:
```
hwnduser = CreateWindow (TEXT("EDIT"), NULL,
WS_VISIBLE | WS_CHILD | WS_BORDER,
220, 70, 80, 20,
hwnd, (HMENU) 3, NULL, NULL);
```
I am fetching its value into a string named username.
```
len = GetWindowTextLength(hwnduser) + 1;
GetWindowText(hwnduser, username, len);
```
Now, the valid username is in a string called c_user:
```
char c_user[] = "foo";
```
When I compare them to check if the user has entered valid username using following code,
```
if (username == c_user)
{
MessageBox(hwnd, "Foo", "Bar", MB_OK);
}
else
{
MessageBox(hwnd, "Bar", "Foo", MB_OK);
}
```
It never validates. Instead, the else condition is always executed! Where am I making a mistake?
How to correct this?
I have tried strcmp! But still, output does not change. See the output(and comparison in code):

|
Programming In C and Win32 API: Comparing Strings
|
CC BY-SA 3.0
| null |
2011-04-14T18:13:40.397
|
2011-04-14T18:57:24.273
|
2011-04-14T18:20:17.880
| 616,941 | 616,941 |
[
"c",
"string",
"winapi",
"comparison",
"char"
] |
5,667,728 | 1 | null | null | 1 | 5,738 |
well, im a begginer in android and i need to use maps on the device more specifically (polylines) i need to do something like this.

this is a web app i did to track down bus routes and bus-stops on my city , and i've been asked to do the same thing in android! ive been checking the maps api for android and did not found anything similar to polyline in JS api , is there a way to achieve this?
i have no problem adding simple overlays i've been checking the basic tutorials in android developer site, but i dont know how to draw the polyline.
|
Android polylines maps api
|
CC BY-SA 3.0
| null |
2011-04-14T18:19:00.953
|
2017-11-17T10:26:28.393
| null | null | 613,618 |
[
"android",
"maps",
"polyline"
] |
5,667,811 | 1 | 5,668,015 | null | 2 | 3,901 |
I'm trying to create a simple skin for the flex progressbar control. Both the track and the bar should have rounded corners, and the bar should fill the track completely in the parts where it is being shown.
Here is the bar skin I've created based off [this example](http://blog.flexexamples.com/2010/04/13/creating-a-custom-bar-skin-on-an-mx-progressbar-control-in-flex-4/):
```
<?xml version="1.0" encoding="utf-8"?>
<s:SparkSkin
xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx">
<fx:Script>
<![CDATA[
override protected function initializationComplete():void {
useChromeColor = true;
super.initializationComplete();
}
]]>
</fx:Script>
<s:Rect radiusX="5" radiusY="5" top="0" left="0" right="0" bottom="0">
<s:fill>
<s:SolidColor color="#bb0203" />
</s:fill>
</s:Rect>
</s:SparkSkin>
```
Here is the progress bar declaration:
```
<mx:ProgressBar id="progressBar" name="progressBar" top="40" left="10" width="480" height="25"
label="" labelWidth="0"
trackSkin="Skins.ProgressBar.TrackSkin"
barSkin="Skins.ProgressBar.BarSkin" />
```
And here is the track skin:
```
<?xml version="1.0" encoding="utf-8"?>
<s:SparkSkin
xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx"
minHeight="25">
<fx:Script>
<![CDATA[
override protected function initializationComplete():void {
useChromeColor = true;
super.initializationComplete();
}
]]>
</fx:Script>
<s:Rect width="100%" height="100%" radiusX="5" radiusY="5">
<s:fill>
<s:SolidColor color="#d1d3d4" />
</s:fill>
</s:Rect>
</s:SparkSkin>
```
Unfortunately, it doesn't have quite the desired effect:

Instead of the bar being flush with the track, there's a margin, and the rounded border gets cut off.
How do I fix this?
|
Flex: Custom ProgressBar bar skin won't fill entire track
|
CC BY-SA 3.0
| 0 |
2011-04-14T18:26:25.843
|
2011-04-14T19:26:00.213
|
2011-04-14T18:41:05.290
| 2,596 | 2,596 |
[
"apache-flex",
"flex4",
"progress-bar",
"skinning"
] |
5,668,191 | 1 | 5,668,243 | null | 1 | 6,789 |
If I sometime forget to enter a comment for a git commit operation, then a screen as like follows appear to me:

However, i later on, just can't get rid of this window unless i close and open the command widow again. can anyone please help my how to handle that scenario ?
Regards
|
Git commit asking for comment
|
CC BY-SA 3.0
| 0 |
2011-04-14T18:54:57.827
|
2021-07-30T19:14:46.230
| null | null | 537,500 |
[
"git"
] |
5,668,197 | 1 | 5,668,419 | null | 0 | 3,018 |
I get this error when I run my code. This is a continuation from this post:
[Adding a scroll bar to a label](https://stackoverflow.com/questions/5667403/adding-a-scroll-bar-to-a-label)
I first created a userForm that had labels that retrieved information from a worksheet. I wanted a scroll bar added so that I could view the list in the label if it was longer than the label. I was told to try a text box. I took this line from my code:
```
reportDate.Caption = reportDate.Caption & Sheets("DATA2").Range("P" & rowNum).Text & vbCrLf
```
and copied it and just added a number 1 after it for the text box so the code for the text box is:
```
reportDate1.Caption = reportDate1.Caption & Sheets("DATA2").Range("P" & rowNum).Text & vbCrLf
```
It is this line where there is an error (the title of the post).

|
Method or data member not found
|
CC BY-SA 3.0
| null |
2011-04-14T18:55:09.370
|
2011-04-14T20:00:18.950
|
2017-05-23T12:30:36.590
| -1 | 640,015 |
[
"excel",
"vba",
"userform"
] |
5,668,181 | 1 | 5,785,263 | null | 7 | 7,869 |
I'm trying to draw a grid of images/icons with WPF. The grid dimensions will vary but will typically range from 10x10 to 200x200. The user should be able to click on cells, and some cells will need to update (change image) 10-20 times per second. The grid should be able to grow and shrink in all four directions, and it should be able to switch to a different "slice" of the 3D structure it represents. My goal is to find a suitably efficient method for drawing the grid given those requirements.
My current implementation uses a WPF `Grid`. I generate row and column definitions at runtime and populate the grid with `Line` (for the gridlines) and `Border` (for the cells, since they're currently just on/off) objects at the appropriate row/column. (The `Line` objects span all the way across.)

While expanding the grid (holding down Num6) I found that it draws too slowly to redraw on every operation, so I modified it to simply add a new `ColumnDefinition`, `Line` and set of `Border` objects for each column of growth. That solved my growth issue, and a similar tactic could be used to make shrinking fast as well. For updating individual cells mid-simulation, I could simply store references to the cell objects and change the displayed image. Even changing to a new Z-level could be improved by only updating cell contents instead of rebuilding the entire grid.
However, before I could make all of those optimizations, I ran into another problem. Whenever I mouse over the grid (even at slow/normal speeds) the application's CPU usage spikes. I removed all event handlers from the grid's child elements, but that had no effect. Finally, the only way to keep CPU usage in check was to set `IsHitTestVisible = false` for the `Grid`. (Setting this for every child element of the `Grid` did nothing!)
I believe that using individual controls to build my grid is too intensive and inappropriate for this application, and that using WPF's 2D drawing mechanisms might be more efficient. I'm a beginner to WPF, though, so I'm seeking advice on how to best achieve this. From what little I've read, I might use a `DrawingGroup` to compose each cell's image together onto a single image for display. I could then use a click event handler for the entire image and compute the coordinates of the clicked cell by the mouse location. That seems messy, though, and I just don't know if there's a better way.
Thoughts?
I took a friend's advice and switched to using a `Canvas` with a `Rectangle` for each cell. When I first draw the grid, I store references to all the `Rectangle` in a two-dimensional array, and then when I update the grid contents, I simply access those references.
```
private void UpdateGrid()
{
for (int x = simGrid.Bounds.Lower.X; x <= simGrid.Bounds.Upper.X; x++)
{
for (int y = simGrid.Bounds.Lower.Y; y <= simGrid.Bounds.Upper.Y; y++)
{
CellRectangles[x, y].Fill = simGrid[x, y, ZLevel] ? Brushes.Yellow : Brushes.White;
}
}
}
```
Drawing the grid initially seems faster, and subsequent updates are definitely faster, but there are still a few problems.
- No matter how small the area I mouse over is, CPU usage still spikes whenever I mouse over the grid when it has more than a few hundred cells. - Updates are still too slow, so when I hold down the up arrow key to change the Z-level (a common use case) the program freezes for seconds at a time and then appears to jump 50 Z-levels at once.- Once the grid holds ~5000 cells, updates take on the order of one second. This is prohibitively slow, and 5000 cells fits within typical use cases.
I haven't yet tried the `UniformGrid` approach because I think it may exhibit the same problems I've already encountered. I might give it a try once I've exhausted a few more options, though.
|
Drawing a grid of images with WPF
|
CC BY-SA 3.0
| 0 |
2011-04-14T18:54:07.517
|
2012-05-09T06:39:54.307
|
2011-04-21T17:45:44.697
| 303,422 | 303,422 |
[
"c#",
"wpf",
"grid",
"drawing",
"2d"
] |
5,668,248 | 1 | 5,668,378 | null | 16 | 44,237 |
I'm using the last version of `fullcalendar`, I looked on documentation how change background color event, but I don't know how make to different events.
I need for code sample with events red, blue, green, like the following picture:

I see this code, on document site, but I can't to apply 2 colors:
```
$('#calendar').fullCalendar({
editable: true,
events: [{
title: 'Teste1',
start: new Date(y, m, d, 10, 30),
allDay: false,
editable: false
}, {
title: 'Teste2',
start: new Date(y, m, d, 11, 40),
allDay: false
}],
eventColor: '#378006'
});
```
|
How do I change an event's background color with different colors, in fullcalendar?
|
CC BY-SA 4.0
| 0 |
2011-04-14T18:59:03.947
|
2023-01-18T18:53:20.510
|
2019-06-13T11:42:58.057
| 10,415,695 | 708,534 |
[
"javascript",
"jquery",
"fullcalendar"
] |
5,668,377 | 1 | 5,676,368 | null | 2 | 1,471 |
The code below works OK and can read everything in a remote IIS 6 server's metabase -- except the frikkin' numeric ID of the properties. I can't find them in the `PropertyValueCollection` object.
```
var site = new DirectoryEntry("IIS://" + tbHost.Text +
"/W3SVC/1", tbUsername.Text, tbPassword.Password);
Console.Write("Site {0}\n", site.Name);
foreach (PropertyValueCollection prop in site.Properties)
{
Console.Write(" {0} (Type {1})\n", prop.PropertyName,
prop.Value.GetType());
foreach (var thingInProp in prop)
{
Console.Write(" {0}\n", thingInProp);
}
}
```
You can see the numeric IDs in the picture below. The code above successfully reads, for example, that `LogFilePeriod` equals 4, but it can't get the fact that the ID of the `LogFilePeriod` property is 4003. I need the IDs in order to make a collection conforming to the OVAL standard.

What I do get from the server is this. Where are the IDs? (As an aside, it seems this code also get inherited properties from upper-level paths. Is that correct?)
```
Site 1
LogExtFileFlags (Type System.Int32)
2199519
LogFileLocaltimeRollover (Type System.Boolean)
False
LogFilePeriod (Type System.Int32)
4
LogFileTruncateSize (Type System.Int32)
20971520
MaxConnections (Type System.Int32)
1000
ServerSize (Type System.Int32)
1
ServerState (Type System.Int32)
2
Win32Error (Type System.Int32)
0
AppPoolId (Type System.String)
DefaultAppPool
DefaultDoc (Type System.String)
Default.htm,Default.asp,index.htm,iisstart.htm
KeyType (Type System.String)
IIsWebServer
ServerComment (Type System.String)
Default Web Site
SslCtlIdentifier (Type System.String)
{E553F318-89D9-4C9F-9C09-91FF12A3BFAF}
SslCtlStoreName (Type System.String)
CA
ServerBindings (Type System.String)
:80:
AllowKeepAlive (Type System.Boolean)
True
AppAllowClientDebug (Type System.Boolean)
False
AppAllowDebugging (Type System.Boolean)
False
AspAllowOutOfProcComponents (Type System.Boolean)
True
AspAllowSessionState (Type System.Boolean)
True
AspAppServiceFlags (Type System.Int32)
0
AspBufferingLimit (Type System.Int32)
4194304
AspBufferingOn (Type System.Boolean)
True
AspCalcLineNumber (Type System.Boolean)
True
AspCodepage (Type System.Int32)
0
AspEnableApplicationRestart (Type System.Boolean)
True
AspEnableAspHtmlFallback (Type System.Boolean)
False
AspEnableChunkedEncoding (Type System.Boolean)
True
AspEnableParentPaths (Type System.Boolean)
False
AspEnableTypelibCache (Type System.Boolean)
True
AspErrorsToNTLog (Type System.Boolean)
False
AspExceptionCatchEnable (Type System.Boolean)
True
AspExecuteInMTA (Type System.Int32)
0
AspKeepSessionIDSecure (Type System.Int32)
0
AspLCID (Type System.Int32)
2048
AspLogErrorRequests (Type System.Boolean)
True
AspMaxDiskTemplateCacheFiles (Type System.Int32)
2000
AspMaxRequestEntityAllowed (Type System.Int32)
204800
AspProcessorThreadMax (Type System.Int32)
25
AspQueueConnectionTestTime (Type System.Int32)
3
AspQueueTimeout (Type System.Int32)
-1
AspRequestQueueMax (Type System.Int32)
3000
AspRunOnEndAnonymously (Type System.Boolean)
True
AspScriptEngineCacheMax (Type System.Int32)
250
AspScriptErrorSentToBrowser (Type System.Boolean)
True
AspScriptFileCacheSize (Type System.Int32)
500
AspScriptTimeout (Type System.Int32)
90
AspSessionMax (Type System.Int32)
-1
AspSessionTimeout (Type System.Int32)
20
AspTrackThreadingModel (Type System.Boolean)
False
AuthFlags (Type System.Int32)
1
CacheISAPI (Type System.Boolean)
True
CGITimeout (Type System.Int32)
300
ConnectionTimeout (Type System.Int32)
120
ContentIndexed (Type System.Boolean)
True
DirBrowseFlags (Type System.Int32)
1073741886
LogType (Type System.Int32)
1
PasswordChangeFlags (Type System.Int32)
6
AnonymousUserName (Type System.String)
IUSR_OVAL-IIS6-A
AnonymousUserPass (Type System.String)
n;x7u'8(H<8&4h
AspScriptErrorMessage (Type System.String)
An error occurred on the server when processing the URL. Please contact the system administrator.
AspScriptLanguage (Type System.String)
VBScript
LogOdbcDataSource (Type System.String)
HTTPLOG
LogOdbcPassword (Type System.String)
sqllog
LogOdbcTableName (Type System.String)
InternetLog
LogOdbcUserName (Type System.String)
InternetAdmin
LogPluginClsid (Type System.String)
{FF160663-DE82-11CF-BC0A-00AA006111E0}
AspDiskTemplateCacheDirectory (Type System.String)
%windir%\system32\inetsrv\ASP Compiled Templates
LogFileDirectory (Type System.String)
C:\WINDOWS\system32\LogFiles
HttpErrors (Type System.Object[])
400,*,FILE,C:\WINDOWS\help\iisHelp\common\400.htm
401,1,FILE,C:\WINDOWS\help\iisHelp\common\401-1.htm
401,2,FILE,C:\WINDOWS\help\iisHelp\common\401-2.htm
401,3,FILE,C:\WINDOWS\help\iisHelp\common\401-3.htm
401,4,FILE,C:\WINDOWS\help\iisHelp\common\401-4.htm
401,5,FILE,C:\WINDOWS\help\iisHelp\common\401-5.htm
401,7,FILE,C:\WINDOWS\help\iisHelp\common\401-1.htm
403,1,FILE,C:\WINDOWS\help\iisHelp\common\403-1.htm
403,2,FILE,C:\WINDOWS\help\iisHelp\common\403-2.htm
403,3,FILE,C:\WINDOWS\help\iisHelp\common\403-3.htm
403,4,FILE,C:\WINDOWS\help\iisHelp\common\403-4.htm
403,5,FILE,C:\WINDOWS\help\iisHelp\common\403-5.htm
403,6,FILE,C:\WINDOWS\help\iisHelp\common\403-6.htm
403,7,FILE,C:\WINDOWS\help\iisHelp\common\403-7.htm
403,8,FILE,C:\WINDOWS\help\iisHelp\common\403-8.htm
403,9,FILE,C:\WINDOWS\help\iisHelp\common\403-9.htm
403,10,FILE,C:\WINDOWS\help\iisHelp\common\403-10.htm
403,11,FILE,C:\WINDOWS\help\iisHelp\common\403-11.htm
403,12,FILE,C:\WINDOWS\help\iisHelp\common\403-12.htm
403,13,FILE,C:\WINDOWS\help\iisHelp\common\403-13.htm
403,15,FILE,C:\WINDOWS\help\iisHelp\common\403-15.htm
403,16,FILE,C:\WINDOWS\help\iisHelp\common\403-16.htm
403,17,FILE,C:\WINDOWS\help\iisHelp\common\403-17.htm
403,18,FILE,C:\WINDOWS\help\iisHelp\common\403.htm
403,19,FILE,C:\WINDOWS\help\iisHelp\common\403.htm
403,20,FILE,C:\WINDOWS\help\iisHelp\common\403-20.htm
404,*,FILE,C:\WINDOWS\help\iisHelp\common\404b.htm
404,2,FILE,C:\WINDOWS\help\iisHelp\common\404b.htm
404,3,FILE,C:\WINDOWS\help\iisHelp\common\404b.htm
405,*,FILE,C:\WINDOWS\help\iisHelp\common\405.htm
406,*,FILE,C:\WINDOWS\help\iisHelp\common\406.htm
407,*,FILE,C:\WINDOWS\help\iisHelp\common\407.htm
412,*,FILE,C:\WINDOWS\help\iisHelp\common\412.htm
414,*,FILE,C:\WINDOWS\help\iisHelp\common\414.htm
415,*,FILE,C:\WINDOWS\help\iisHelp\common\415.htm
500,12,FILE,C:\WINDOWS\help\iisHelp\common\500-12.htm
500,13,FILE,C:\WINDOWS\help\iisHelp\common\500-13.htm
500,15,FILE,C:\WINDOWS\help\iisHelp\common\500-15.htm
500,16,FILE,C:\WINDOWS\help\iisHelp\common\500.htm
500,17,FILE,C:\WINDOWS\help\iisHelp\common\500.htm
500,18,FILE,C:\WINDOWS\help\iisHelp\common\500.htm
500,19,FILE,C:\WINDOWS\help\iisHelp\common\500.htm
ScriptMaps (Type System.Object[])
.asp,C:\WINDOWS\system32\inetsrv\asp.dll,5,GET,HEAD,POST,TRACE
.cer,C:\WINDOWS\system32\inetsrv\asp.dll,5,GET,HEAD,POST,TRACE
.cdx,C:\WINDOWS\system32\inetsrv\asp.dll,5,GET,HEAD,POST,TRACE
.asa,C:\WINDOWS\system32\inetsrv\asp.dll,5,GET,HEAD,POST,TRACE
.idc,C:\WINDOWS\system32\inetsrv\httpodbc.dll,5,GET,POST
.shtm,C:\WINDOWS\system32\inetsrv\ssinc.dll,5,GET,POST
.shtml,C:\WINDOWS\system32\inetsrv\ssinc.dll,5,GET,POST
.stm,C:\WINDOWS\system32\inetsrv\ssinc.dll,5,GET,POST
MaxBandwidth (Type System.Int32)
-1
AdminACL (Type System.__ComObject)
System.__ComObject
```
|
How to get the numeric ID of an IIS 6 Metabase property in C#?
|
CC BY-SA 3.0
| null |
2011-04-14T19:08:39.973
|
2017-08-11T01:42:33.783
|
2011-04-14T20:06:50.890
| 419 | 110,800 |
[
".net",
"iis-6",
"directoryservices",
"metabase",
"oval"
] |
5,668,454 | 1 | 5,671,270 | null | 1 | 151 |
>
I have to modernize an application written in FORTRAN that, in short, is responsible for demographic projections through years. As such, I have an initial population given as an input. This initial population is categorized by years of age, that is, the sum of all numbers per year of age represents the total population for this year.
Let's take a look on data for a few seconds.
```
Year: 2009
Age 0: 43786.0000
Age 1: 42997.0000
Age 2: 42656.0000
...
Age 99: 2439.0000
```
Then, we have to project year 2010 according to certain death rate set the same way as this above-mentioned initial population, except that it includes rates instead of totals per year of age.
```
Year: 2009
Age 0: 0.000213345
Age 1: 0.000212543
Age 2: 0.000201938
...
Age 99: 0.04824421
Age 106: 0.50000000
```
The idea is to group these entities under classes. I have already designed one, and I wonder whether it could be improved in some ways.
>
To simplify design and to embed statistical calculations within object classes so that it is more easily testable and mockable when required.
>

I feel like it can be improved. For your information and ease of readability, here's a index of the French terms used in the diagram:
```
TauxFeconditeAnnuel -> Annual Fecondity Rate
TauxMortaliteAnnuelle -> Annual Death Rate
PopulationAnnuelle -> Annual Population
SoldeMigratoireAnnuel -> Annual Net Migration
StatistiqueAnnuelle -> Annual Statistic
StatistiqueAnnuelleParSexe -> Annuel Statistic per Sex
```
My reflections are about whether or not to include a Death Rate class instance within a PopulationAnnuelle class. There exist death rates for initial population year and the next 96 years of projection. Besides, an annual population has to have its death rate, and an annual population is not obliged to exist for me to have a death rate for this year.
Let's say I have the initial population for 2009, I have not yet projected population for 2010, 2011, 2012, etc. until year 2105. Yet, I have death rate projections for all of these years, and population growth is based on these mortality rates to determine what population remain alive, and how many deaths we got, etc.
I thought of putting the PopulationAnnuelle class as the base class for my model, though I feel like StatistiqueAnnuelle is more suitable for the job, then making PopulationAnnuelle inherit from it.
>
1. What are your thoughts on the about my concerns?
2. What is the best design based on what I wish to accomplish?
3. Should I use StatistiqueAnnuelle as the base class/interface and make the others like TauxMortalite, PopulationAnnuelle, etc. derive from it, a bit like it is now designed?
Any acceptable thoughts will be upvoted personally by me. The most accurate and helping answer will be accepted as the answer to my question.
Thanks for your kind help and support! =)
>
A common possible use case/scenario would be to plan the needs for pension plans based upon population growth. After the amount of people has been "predicted", you may calculate the number of persons who will contribute to the pension plan and the people who will retire, then estimate the funding needs the contributors will need to pay so that the pension plan funds will have enough money to pay the pensions for them later when they retire and so forth.
Another possible common scenario would be insurances company. Based on population growth, statistics about the insurance usage would allow the company to predict the needs of their funding sources and establish the monthly payment for a given coverage amount based on accident refunds versus input monthly payments per age, let's say for car insurance for instance.
This exercise is called valuation.
|
Need some external advices for designing this class diagram!
|
CC BY-SA 3.0
| null |
2011-04-14T19:14:46.437
|
2011-04-15T04:03:19.303
|
2011-04-15T01:33:33.980
| 162,167 | 162,167 |
[
".net",
"architecture",
"domain-driven-design",
"class-design"
] |
5,668,605 | 1 | 5,669,062 | null | 0 | 212 |
How to implement textbox similar to facebook textbox in privacy settings where you can add to textbox custom controls:

One of the way that i came to is to create wrappanel where last item will be textbox.
Are there any other ways?
Thanks.
|
Silverlight textbox with custom controls before text
|
CC BY-SA 3.0
| null |
2011-04-14T19:29:10.237
|
2011-04-14T20:09:47.003
| null | null | 182,579 |
[
"silverlight",
"facebook",
"textbox"
] |
5,668,596 | 1 | 5,704,435 | null | 9 | 3,277 |
Package:
- [raster](http://cran.r-project.org/web/packages/raster/index.html)
Data:
- - - -
Objective:
-
First attempt:
```
# Possible band combinations
values = integer(0)
for(i in 1:nlayers(myraster)){
combs = combn(1:nlayers(myraster), i)
for(j in 1:ncol(combs)){
values = c(values, list(combs[,j]))
}
}
# Define the zone finding function
find_zones = function(bands){
# The intersection of the bands of interest
a = subset(myraster, 1)
values(a) = TRUE
for(i in bands){
a = a & myraster[[i]]
}
# Union of the remaining bands
b = subset(myraster, 1)
values(b) = FALSE
for(i in seq(1:nlayers(myraster))[-bands]){
b = b | myraster[[i]]
}
#plot(a & !b)
cells = Which(a & !b, cells=TRUE)
return(cells)
}
# Applying the function
results = lapply(values, find_zones)
```
My current function takes a very long time to execute. Can you think of a better way? Note that I don't simply want to know how many bands have data at each pixel, I also need to know which bands. The purpose of this is to process different the areas differently afterwards.
Note also that the real-life scenario is a 3000 x 3000 or more raster with potentially more than 10 bands.
---
EDIT
Some sample data consisting of 10 offset image areas:
```
# Sample data
library(raster)
for(i in 1:10) {
start_line = i*10*1000
end_line = 1000000 - 800*1000 - start_line
offset = i * 10
data = c(rep(0,start_line), rep(c(rep(0,offset), rep(1,800), rep(0,200-offset)), 800), rep(0, end_line))
current_layer = raster(nrows=1000, ncols=1000)
values(current_layer) = data
if(i == 1) {
myraster = stack(current_layer)
} else {
myraster = addLayer(myraster, current_layer)
}
}
NAvalue(myraster) = 0 # You may not want to do this depending on your solution...
```

|
Identifying overlap zones in R raster package
|
CC BY-SA 3.0
| 0 |
2011-04-14T19:28:16.760
|
2011-04-19T16:06:19.480
|
2011-04-18T13:02:37.240
| 483,620 | 483,620 |
[
"r",
"image-processing",
"raster"
] |
5,668,745 | 1 | null | null | 0 | 6,133 |
This has been driving me crazy. I have tried all suggestions and no go.
This absolutely does not work. The files are all still there.
The job runs successfully, but the files do not delete.

|
Maintenance plan maintenance cleanup task running successfully, but not deleting files?
|
CC BY-SA 3.0
| 0 |
2011-04-14T19:41:33.303
|
2012-09-12T15:27:40.023
|
2011-04-14T19:48:49.173
| 568,289 | 568,289 |
[
"sql-server",
"sql-server-2005",
"maintenance-plan"
] |
5,668,980 | 1 | 5,757,980 | null | 0 | 772 |
You can see the duplicated marker in the included image, the marker to the right is the correct marker, the one to the left is a clone of the other one, it is not in the right place it can not be clicked, and stays in the same position relative to the "real" marker reqardless of zoom level.
Here is the code that generates the marker:
```
var map = new google.maps.Map($(this.jobDiv).find(".map_canvas")[0], { 'zoom': 10, 'center': this.latlng, 'mapTypeId': google.maps.MapTypeId.ROADMAP, 'mapTypeControl': false, 'navigationControl': true, 'streetViewControl': false });
var marker = new google.maps.Marker({
map: map,
position: this.latlng,
title: this.markerLabel
});
```

|
google maps V3 duplicate marker, only in IE7,8 IE 9 is fine
|
CC BY-SA 3.0
| 0 |
2011-04-14T20:02:12.657
|
2011-04-22T17:10:06.757
|
2011-04-14T20:25:58.250
| 42,987 | 42,987 |
[
"javascript",
"css",
"internet-explorer-8",
"google-maps-api-3"
] |
5,669,000 | 1 | 5,669,221 | null | 2 | 432 |
I am using an automated build tool called [Automated Build Studio](http://smartbear.com/products/development-tools/build-management/).
I have defined in the Delphi IDE, as you can see in the screenshot, a user variable `$(PLKFW)` which points to a specific folder in my computer.
How can I change this `$(PLKFW)` variable using the delphi IDE?

|
Change Users Variables - Delphi IDE
|
CC BY-SA 3.0
| null |
2011-04-14T20:03:50.427
|
2011-04-14T20:24:43.940
|
2011-04-14T20:18:37.497
| 528,211 | 528,211 |
[
"delphi",
"build-automation",
"delphi-2010",
"automated-deploy"
] |
5,669,138 | 1 | 8,191,341 | null | 2 | 2,230 |
I've been fiddling with asp.net mvc 3 with the new razor view engine.
My goal is to have a fixed-fluid 2 column layout with a jqGrid in each column. I'm having no luck though! As soon as I add a grid to the right column its header goes huge. I don't think its jqGrids fault because if i remove the styles both grids display as expected.
I see that the css for the jqGrid applies display: block to the header as part of the ui-helper-clearfix class.
Anyone have any suggestions to get this to work or other fixed-fluid css i could experiment with (I've tried a bunch of templates from online with no luck)?
Code from the template file:
```
... <style type="text/css">
#left { float: left; width: 400px;}
#content { margin-left: 400px;}
</style>
</head>
<body>
<div>
<div id="left">
@RenderSection("SPTreeGrid")
</div>
<div id="content">
@RenderSection("ClientPickerGrid")
</div>
</div>
</body>
```

My page actually needed to display 2 grids in fixed width on the left and a fluid one on the right.
It was an issue with my css (I still dont know why) but I ended up using the following layout which works (rail is the left column):
```
#container{
overflow:hidden;
padding-left:400px; /* The width of the rail */
}
* html #container{
height:1%; /* So IE plays nice */
}
#content
{
width:100%;
border-left:400px; /* The width and color of the rail */
margin-left:-400px;
float:right;
}
#rail{
width:400px;
float:left;
margin-left:-400px;
display:inline; /* So IE plays nice */
}
```
cshtml:
```
<div id="container">
<div id="content">
@RenderSection("ReportGrid")
</div>
<div id="rail">
@RenderSection("SPTreeGrid")
@RenderSection("ClientPickerGrid")
</div>
</div>
```
|
Large header in jqGrid
|
CC BY-SA 3.0
| null |
2011-04-14T20:16:13.567
|
2011-11-22T15:15:08.547
|
2011-06-12T20:14:37.487
| 589,089 | 589,089 |
[
"css",
"asp.net-mvc-3",
"jqgrid",
"razor"
] |
5,669,502 | 1 | 5,669,812 | null | 1 | 25,567 |
I am trying to change the height of a datepicker I am using. I have been working through firebug and was able to change the width by editing the `ui-datepicker` class like so:
```
.ui-datepicker
{
width: 12em;
height: 12em;
}
```
The width works fine, but the height only changes the back of the calender, and not the cells so I end up with something like this:

Where the height of the datepicker background has changed, but the cells are the same. In the class `.ui-datepicker table` I tired to add a line of code `height: 80%`, but the height will not go lower then 100% (or at least any lower will not change the appearance of the datepicker). I have been looking through the css to try to find where the height is set, but cannot find it so far.
Any suggestions?
|
Changing the height of a jquery datepicker
|
CC BY-SA 3.0
| 0 |
2011-04-14T20:50:38.083
|
2016-12-01T10:33:05.003
|
2011-04-14T20:54:44.683
| 440,805 | 650,489 |
[
"jquery",
"css",
"jquery-ui"
] |
5,669,655 | 1 | null | null | 5 | 8,709 |
I have a progress bar that is supposed to look like the attached image:
And I've made it a long way. I'm very close the only part that isn't working is the rounded corners for the progressDrawable. Here is what mine looks like. (Notice, circled in red, that the fill inside the white outline does not have rounded corners):
So, I've found a couple of ways to make this work when the progress bar is colored in with a shape, gradient, or color. BUT, I can't get it with an image as the progressDrawable.
Here is my class that extends ProgressBar
```
public class RoundedProgressBar extends ProgressBar{
private Paint paint;
public RoundedProgressBar(Context context) {
super(context);
setup();
}
public RoundedProgressBar(Context context, AttributeSet attrs) {
super(context, attrs);
setup();
}
public RoundedProgressBar(Context context, AttributeSet attrs, int defStyle) {
super(context, attrs, defStyle);
setup(); ;
}
protected void setup()
{
paint = new Paint();
}
@Override
protected synchronized void onDraw(Canvas canvas) {
// First draw the regular progress bar, then custom draw our text
super.onDraw(canvas);
paint.setColor(Color.WHITE);
paint.setStyle(Paint.Style.STROKE);
RectF r = new RectF(0,0,getWidth()-1,getHeight()-1);
canvas.drawRoundRect(r,getHeight()/2,getHeight()/2, paint);
}
}
```
Here is my selector:
```
<layer-list
xmlns:android="http://schemas.android.com/apk/res/android"
>
<item
android:id="@android:id/background"
android:drawable="@drawable/slider_track" />
<item
android:id="@android:id/secondaryProgress"
android:drawable="@drawable/slider_track" />
<item
android:id="@android:id/progress"
android:drawable="@drawable/slider_track_progress" />
</layer-list>
```
Here are the images used in the selector:
slider_track->
slider_track_progress->
Here is where I embed my progressbar in the layout for my activity
```
<com.android.component.RoundedProgressBar
android:id="@+id/player_hp_bar"
android:layout_width="fill_parent"
android:layout_height="36dip"
android:layout_marginLeft="30dip"
android:layout_marginRight="30dip"
android:max="100"
style="?android:attr/progressBarStyleHorizontal"
android:progressDrawable="@drawable/slider_layer_list"
android:progress="20"
android:maxHeight="12dip"
android:minHeight="12dip"
/>
```
Anyone know how to make this work?
|
Possible to do rounded corners in custom Progressbar progressDrawable?
|
CC BY-SA 3.0
| 0 |
2011-04-14T21:03:14.130
|
2016-12-18T08:43:46.510
|
2012-07-15T14:48:28.150
| 1,198,729 | 469,682 |
[
"android",
"layout",
"progress-bar",
"rounded-corners",
"skinning"
] |
5,670,073 | 1 | null | null | 1 | 261 |
I am hoping some of you css wizards might have run into the problem I'm about to describe.
I've created css3 buttons for a clients website, in order to replace their current image buttons. The buttons happen to be a light font face on a dark value background (white text on a red background).
On OSX and iOS, the quartz rendering engine kind of freaks out about this, and anti-aliases the font to death. Bold become really really really bold.
The strange thing is, I develop on a Mac, and cannot replicate the rendering problem the client is having across multiple devices. I've made sure I only have system fonts enabled, that my font smoothing is set the same, etc...
I found an article that suggested a fix for webkit based browsers [here](http://dave-bond.com/css/font-too-bold-on-a-mac/), and have seperated the text from it's background in order to give just the text an opacity value.
Still, no dice. Anyone have idea what could be the problem here?

|
Fonts are rendering differently across apple devices. So frustrating
|
CC BY-SA 3.0
| null |
2011-04-14T21:42:39.427
|
2011-04-16T05:09:33.733
|
2011-04-14T21:45:32.310
| 405,015 | 508,714 |
[
"macos",
"fonts",
"css",
"opacity"
] |
5,670,088 | 1 | 5,670,251 | null | 1 | 1,511 |
Let's say we have this part of code for a UIView subclass:
```
self.myImage = [UIImage imageNamed:@"img1.jpg"];
[self myFunc:self.myImage];
```
myFunc is here defined:
```
-(void)myFunc(UIImage*)img{
UIImageView *imgView = [[UIImageView alloc]initWithImage:img];
[self addSubview:imgView];
}
```
Now i show in my view img1.jpg, if i decide to change self.myImage AFTER myFunc call
```
self.myImage = [UIImage imageNamed:@"img2.jpg"];
```
why i continue to show img1 and not img2 ??? myFunc receive a UIImage pointer not directly an object... i'm pretty confused and i missed something really important i think.
Edit --
I'd like to have many UIImageView, and every image ivar of these view must pointing to the same image address, changing image at this address every UIImageView have a new image how can i do that ?

|
Passing UIImage to a function and Edit it externally
|
CC BY-SA 3.0
| null |
2011-04-14T21:44:06.440
|
2011-04-14T22:56:37.610
|
2011-04-14T22:56:37.610
| 499,990 | 499,990 |
[
"objective-c"
] |
5,670,133 | 1 | 5,675,812 | null | 1 | 87 |
I'm trying to convince a guy in IT that the PHP installation he gave me is corrupt (somehow). He did an upgrade to the latest PHP and since then, PHP pages have been slow. In a weird way.
If I visit a PHP page, the page displays instantly but the activity monitor in Safari shows activity for ~5 more seconds. When I use Safari's inspector, it looks like lots of things load, then there's a huge pause, then more things load. If I load a blank PHP page that doesn't reference CSS files or anything, it still sits for ~5 seconds.

Any ideas what could be causing this? It's hard for me to Google it because "PHP page loads slow" involves lots of different scenarios.
Is there a way I could somehow pinpoint why PHP loading is longer than it was before the upgrade?
|
How can I tell if a PHP install is corrupt? PHP pages display quickly, but continue to load for seconds
|
CC BY-SA 3.0
| 0 |
2011-04-14T21:48:56.620
|
2011-04-15T11:10:51.917
| null | null | 144,785 |
[
"php",
"performance"
] |
5,670,158 | 1 | 6,452,576 | null | 13 | 4,151 |
Is there any way to add a custom action to the list of actions provided by the UIDocumentInteractionController?
I would like to add an "Email" action to the list. I know I can use the MFMailComposeViewController to send email with attachments, but the problem is not to send a file as an attachment the problem is one of UI. I have an "Action" UIBarButtonItem which brings up the UIDocumentInteractionController providing options for printing and opening in iBooks. Great... but I also need a separate UIBarButtonItem for sending the file attached to an email. It's slightly confusing to users to see something like this:

It's not just confusing to users, but really not an ideal UI. It would be best to have "Email" as one of the options in the UIDocumentInteractionController's list.
Any suggestions?
Kenny
|
Custom "Email" action in UIDocumentInteractionController
|
CC BY-SA 3.0
| 0 |
2011-04-14T21:52:34.663
|
2014-11-18T08:20:58.063
| null | null | 416,631 |
[
"iphone",
"ios",
"ipad",
"email",
"uidocumentinteraction"
] |
5,670,383 | 1 | null | null | 0 | 496 |
I can't seem to fix what ought to be a simple problem with my TabHost layout. I construct the xml, as in [the docs](http://developer.android.com/resources/tutorials/views/hello-tabwidget.html):
```
<?xml version="1.0" encoding="utf-8"?>
<TabHost xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@android:id/tabhost"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<LinearLayout
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<TabWidget android:id="@android:id/tabs"
android:layout_width="fill_parent"
android:layout_height="wrap_content">
</TabWidget>
<FrameLayout android:id="@android:id/tabcontent"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<ListView android:id="@+id/favouriteslist"
style="@style/POITab_Lists">
</ListView>
<ListView android:id="@+id/recentlist"
style="@style/POITab_Lists">
</ListView>
</FrameLayout>
</LinearLayout>
</TabHost>
```
and yet my FrameLayout appears my TabWidget, crowding it out:
This seems quite unusual to me - does anyone have any ideas?
|
tabhost - order of view children changed in LinearLayout
|
CC BY-SA 3.0
| null |
2011-04-14T22:19:33.177
|
2011-04-14T23:20:20.237
|
2020-06-20T09:12:55.060
| -1 | 278,638 |
[
"android",
"android-linearlayout",
"tabwidget"
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.