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,541,161 | 1 | 5,541,224 | null | 2 | 1,490 |
I have a create account page and on the page I have one button to insert all the details into two seperate tables one of the tables Pictures is dependant on the User table 1:1 relationship via UserID.
I have written some code to try get the last insert id so I can insert into the pictures table:
```
protected void Button1_Click(object sender, EventArgs e)
{
if (FileUpload1.HasFile)
{
try
{
OdbcConnection cn = new OdbcConnection("Driver={MySQL ODBC 3.51 Driver}; Server=localhost; Database=gymwebsite2; User=root; Password=commando;");
cn.Open();
OdbcCommand cmd = new OdbcCommand("INSERT INTO User (Email, FirstName, SecondName, DOB, Location, Aboutme, username, password) VALUES ('" + TextBox1.Text + "', '" + TextBox2.Text + "', '" + TextBox3.Text + "', '" + TextBox4.Text + "', '" + TextBox5.Text + "', '" + TextBox6.Text + "', '" + TextBox7.Text + "', '" + TextBox8.Text + "')", cn);
OdbcCommand sc = new OdbcCommand("SELECT LAST_INSERT_ID()", cn);
//convert LAST INSERT into string theUserId
string filenameDB = Path.GetFileName(FileUpload1.FileName);
string fileuploadpath = Server.MapPath("~/userdata/" + theUserId + "/uploadedimage/") + Path.GetFileName(FileUpload1.FileName);
FileUpload1.SaveAs(fileuploadpath);
string fileuploadpaths = ("~/userdata/" + theUserId + "/uploadedimage/") + filenameDB;
Label10.Text = "Upload status: File uploaded!";
OdbcCommand cm = new OdbcCommand("INSERT INTO Pictures (picturepath, UserId) VALUES ('" + fileuploadpaths + "', " + theUserId + ")", cn);
cmd.ExecuteNonQuery();
}
catch (Exception ex)
{
Label10.Text = "Upload status: The file could not be uploaded. The following error occured: " + ex.Message;
}
//e.Authenticated = true;
//Response.Redirect("Login.aspx");
// Event useradded is true forward to login
}
}
}
```
Not sure if this is correct and I also need to know how to convert the select statement into a string so I can retrieve the UserID from the User table, see database structure:

```
protected void Button1_Click(object sender, EventArgs e)
{
if (FileUpload1.HasFile)
{
try
{
OdbcConnection cn = new OdbcConnection("Driver={MySQL ODBC 3.51 Driver}; Server=localhost; Database=gymwebsite2; User=root; Password=commando;");
OdbcCommand cmd = new OdbcCommand("INSERT INTO User (Email, FirstName, SecondName, DOB, Location, Aboutme, username, password) VALUES ('" + TextBox1.Text + "', '" + TextBox2.Text + "', '" + TextBox3.Text + "', '" + TextBox4.Text + "', '" + TextBox5.Text + "', '" + TextBox6.Text + "', '" + TextBox7.Text + "', '" + TextBox8.Text + "')SELECT LAST_INSERT_ID()", cn);
//OdbcCommand sc = new OdbcCommand("SELECT LAST_INSERT_ID()", cn);
//convert LAST INSERT into string theUserId
//using (DataTable dt = DataTier.ExecuteQuery(cmd))
////error for datatable and datatier
//if (dt.Rows.Count == 1)
//{
// //Read the new ID from the record that has just been inserted
// string theUserId = dt.Rows[0]["UserID"].ToString();
using (OdbcDataReader reader = cmd.ExecuteReader())
{
string theUserId = String.Format("{0}", reader.GetString(0));
string filenameDB = Path.GetFileName(FileUpload1.FileName);
string fileuploadpath = Server.MapPath("~/userdata/" + theUserId + "/uploadedimage/") + Path.GetFileName(FileUpload1.FileName);
FileUpload1.SaveAs(fileuploadpath);
string fileuploadpaths = ("~/userdata/" + theUserId + "/uploadedimage/") + filenameDB;
Label10.Text = "Upload status: File uploaded!";
OdbcCommand cm = new OdbcCommand("INSERT INTO Pictures (picturepath, UserId) VALUES ('" + fileuploadpaths + "', " + theUserId + ")", cn);
cn.Open();
cmd.ExecuteNonQuery();
}
}
catch (Exception ex)
{
Label10.Text = "Upload status: The file could not be uploaded. The following error occured: " + ex.Message;
}
//e.Authenticated = true;
//Response.Redirect("Login.aspx");
// Event useradded is true forward to login
}
}
```
}
|
How to convert last insert id into string?
|
CC BY-SA 4.0
| null |
2011-04-04T16:02:48.710
|
2020-12-19T09:34:33.280
|
2020-12-19T09:34:33.280
| 1,783,163 | 477,228 |
[
"c#",
"asp.net",
"mysql",
"sql",
"html"
] |
5,541,280 | 1 | 5,541,703 | null | 0 | 953 |
I have an editor on my page (Cleditor jquery plugin).
By default it can insert image, but text doesn't wrap it. I've tried vertical-align:top, but it didn't help:

What css I should point to image to get wrapped by text? You can try to do this in firebug on CLEditor [demo page](http://premiumsoftware.net/cleditor/)
P.S. I've tried float: left, and it worked. But I should consider that it is editor, and user can move this image to right (and then it should be float: right, but how to catch when to switch float direction) - So I think, should be another decision.
|
How to make text to wrap image in editor
|
CC BY-SA 2.5
| null |
2011-04-04T16:15:10.517
|
2011-04-08T15:40:38.773
| null | null | 547,242 |
[
"jquery",
"css",
"editor",
"word-wrap"
] |
5,541,521 | 1 | 5,541,961 | null | 0 | 90 |
This is my code:
```
foreach (Database.Photo photo in eventPhotos)
{
Image img = new Image();
img.Height = 100;
img.Width = 80;
img.Focusable = true;
img.MouseDown += new MouseButtonEventHandler(img_MouseDown);
string littleString = photo.PhotoUrl;
littleString = littleString.Replace(".jpg", "t.jpg");
BitmapImage bi = new BitmapImage();
bi.BeginInit();
bi.UriSource = new Uri(littleString, UriKind.Absolute);
bi.EndInit();
img.Source = bi;
imagesEvent1.Children.Add(img);
}
```
But not all images are loaded.:

in this time, images №3,5 are not loaded, in next time other images are not loaded.
|
Cannot open many Images in WPF
|
CC BY-SA 2.5
| null |
2011-04-04T16:35:15.203
|
2011-04-04T17:15:42.557
| null | null | 273,455 |
[
".net",
"wpf"
] |
5,541,582 | 1 | 5,628,573 | null | 7 | 2,816 |
I have an album title of some music band. I want to draw it with some mask which will round the corners of image.
So, I've prepared such mask in gimp:

I'm using white mask, but it's invisible at white background here.
So, here is the code of rendering:
```
# Draw album image
img = cairo.ImageSurface.create_from_png('images/album.png')
ctx.set_source_surface(img, posX, posY)
ctx.paint()
# Draw mask
ctx.set_operator(cairo.OPERATOR_DEST_IN)
img = cairo.ImageSurface.create_from_png('images/mask.png')
ctx.set_source_surface(img, posX, posY)
ctx.paint()
```
As you see, I've used `OPERATOR_DEST_IN`. Quick examples I found at [this page](http://cairographics.org/operators/).
But, everything disappeared in my program when I set compositing operator in cairo :(. When I comment that line everything is okay, but mask is over my image. What is the right way for that?
p.s. I'm using python2, cairo library
---
When I remove compositing operator I see (don't forget that real mask is white, in this case album image is dark):

|
Image compositing
|
CC BY-SA 2.5
| null |
2011-04-04T16:40:54.123
|
2011-04-11T23:04:33.797
|
2011-04-04T16:49:10.093
| 87,152 | 87,152 |
[
"python",
"image",
"composite",
"cairo"
] |
5,541,711 | 1 | null | null | 1 | 196 |
I have some trouble showing right single quote from mysql database.
Screenshot:

This problem appears only when I deploy the application on a server.
If I start the application locally, connected to the database on the server, it's ok.
Any ideas?
|
Encoding problem in ASP.NET MVC + MySQL
|
CC BY-SA 2.5
| null |
2011-04-04T16:50:24.420
|
2011-04-04T16:57:40.823
| null | null | 113,589 |
[
"mysql",
"asp.net-mvc-2",
"encoding"
] |
5,542,089 | 1 | 5,542,162 | null | 2 | 1,911 |
let's say we have 10 checkboxes, How would you make after you choose One, other checkbox is non editable or selectable for example

If we choose checkbox A, the checkbox -A must be non editable or selectable.
Is this possible?
|
Make non editable a checkbox after other is selected java
|
CC BY-SA 2.5
| null |
2011-04-04T17:28:19.230
|
2011-04-04T17:34:07.180
| null | null | 265,519 |
[
"java",
"checkbox"
] |
5,542,149 | 1 | 5,542,378 | null | 0 | 695 |
i followed these instructions for building an adhoc version in xcode 4.0 (4.3 compilier)
- -
same project worked for adhoc before i upgraded to 4.3
[http://diaryofacodemonkey.ruprect.com/2011/03/18/ad-hoc-app-distribution-with-xcode-4/](http://diaryofacodemonkey.ruprect.com/2011/03/18/ad-hoc-app-distribution-with-xcode-4/)
now:
project compiles finde (via archive) i can share it.
i can push the file into itunes
BUT
i cant get the app on my device. i always get an error "invalid rights"
Maybe someone can help me on this.

|
xcode 4.3 adhoc copy to device error
|
CC BY-SA 2.5
| null |
2011-04-04T17:33:17.683
|
2011-04-04T19:11:29.553
|
2011-04-04T19:11:29.553
| 333,373 | 333,373 |
[
"xcode4",
"rights",
"adhoc"
] |
5,542,155 | 1 | 5,542,227 | null | 1 | 252 |

```
public ActionResult Performances(string id)
{
var query =
from f in _db.Production
join g in _db.Run on f.show equals g.Production.show
join l in _db.Performance on g.startDate equals l.runStartDate
where f.show == id
select new ShowPerformance
{
Venuename = g.venue,
Showname = f.show,
RunStart = g.startDate,
RunEnd = g.endDate,
PerformanceDate = l.performanceDate,
PerformanceTime = l.performanceTime
};
return View(query.ToList());
}
```
The query can not distuingish between a performance in ShowA run1 and Show A run2 it just duplicates all performances ShowA run1 and Show A run2
|
Problem with Linq query .net MVC
|
CC BY-SA 2.5
| null |
2011-04-04T17:33:52.653
|
2011-04-05T06:54:59.130
|
2011-04-04T20:02:09.137
| 685,978 | 685,978 |
[
"sql",
"asp.net-mvc",
"linq",
"linq-to-entities"
] |
5,542,177 | 1 | 5,542,451 | null | 1 | 3,647 |
How do I access via C# the keys stored in the Certificate Enrollment Requests store?

I tried using:
```
var requestCertStore = new X509Store("Certificate Enrollment Requests",
StoreLocation.LocalMachine);
requestCertStore.Open(OpenFlags.MaxAllowed);
var certs = requestCertStore.Certificates;
```
but the `certs` collection does not contain the certificate I'm looking to access in the "Certificate Enrollment Requests" store. I also don't see any [StoreName enum](http://msdn.microsoft.com/en-us/library/system.security.cryptography.x509certificates.storename.aspx) that corresponds to this store, so using the `new X509Store(StoreName storeName, StoreLocation storeLocation)` constructor isn't an option.
Is it not possible to retrieve these certs via C#/.NET?
|
How can I access the "certificate enrollment requests" store in C#?
|
CC BY-SA 2.5
| null |
2011-04-04T17:35:33.613
|
2011-04-04T19:16:15.000
|
2011-04-04T17:41:37.810
| 101,827 | 101,827 |
[
"c#",
"certificate",
"x509certificate"
] |
5,542,437 | 1 | 5,542,486 | null | 2 | 898 |
Example
[On screen keyboard](https://online.westpac.com.au/esis/Login/SrvPage/?h3&app=wol&referrer=http://www.westpac.com.au/HomepageAlternative/)
But i want to design keyboard using only two buttons that will contain value 0 and 1
like this and value should come in textbox

Can anyone tell me how can i do this ?
|
How can I make a simple on-screen HTML keyboard that contains only two buttons and one textbox?
|
CC BY-SA 2.5
| null |
2011-04-04T18:05:32.373
|
2011-04-04T18:12:48.203
|
2011-04-04T18:12:48.203
| 20,578 | 435,559 |
[
"javascript",
"jquery",
"html"
] |
5,542,496 | 1 | 5,542,560 | null | 2 | 10,851 |
I was googling a bit and heard that although `stdint.h` was not shipped with old versions of Visual Studio, it should be there in Visual Studio 2010.
However, I have this project that's supposed to use it, but it says it can't find either `stdlib.h` or `stdint.h`.

Why is that and how could I fix this?
---
Running Visual Studio 2010 with .NET 4.0 on an x86 Windows 7 machine.
|
Where is stdlib.h / stdint.h in Visual Studio 2010?
|
CC BY-SA 3.0
| 0 |
2011-04-04T18:12:21.670
|
2015-10-13T16:51:11.310
|
2015-10-13T16:51:11.310
| 3,204,551 | 435,093 |
[
"visual-studio",
"visual-studio-2010",
"std",
"include-path",
"stdint"
] |
5,542,694 | 1 | 14,798,396 | null | 31 | 33,097 |
I would like to create a tooltip like thing in Android to help show my users what something is, as people have told me they don't know what it is. For an idea of what i'm after here is a drawing:

|
How to create a helpful tooltip in Android
|
CC BY-SA 3.0
| 0 |
2011-04-04T18:31:15.673
|
2016-01-02T21:33:26.280
|
2016-01-02T21:33:26.280
| 470,341 | 230,419 |
[
"java",
"android",
"user-interface",
"tooltip"
] |
5,542,746 | 1 | 5,542,817 | null | 2 | 1,270 |
I am developing a small silverlight application (using siverlight 4 and c#). In my application I need to draw coordinates based on their X,Y. Then, I need to draw lines between some of the points, based on the connections between them. Since there can be several lines, and I cannot have them all intersecting each other (as it will turn this into a mess), I need to draw some of my lines with an arch.
So, What would be the best way to approach this issue?
- -
Thank You!
Attached is a small image to illustrate my need (I am no big painter, sorry).

|
Silverlight - how to draw a line with an arc?
|
CC BY-SA 2.5
| null |
2011-04-04T18:36:03.260
|
2011-04-04T19:34:19.560
|
2020-06-20T09:12:55.060
| -1 | 126,015 |
[
"silverlight",
"geometry",
"lines"
] |
5,542,762 | 1 | 5,542,888 | null | 73 | 44,467 |
I am having a problem regarding sorting an array w.r.t database:
```
NSSortDescriptor *sorter = [[NSSortDescriptor alloc] initWithKey:@"w" ascending:YES];
NSArray *sortDescriptors = [NSArray arrayWithObject: sorter];
[mGlossaryArray sortUsingDescriptors:sortDescriptors];
[sorter release];
```
Here in database there are some first capital letters and because of that capital letter it does not show me proper sorted output. Here i am sorting an array with r.t "w" which is my table column in database.
Here I have attach the screen shot for the output, which says that "Cancer" comes first than "c", but this is not correct, it is not giving alphabetically sort because of the capitalized words.
eg. if there is "able" in lower case and "aCid" then it will show aCid first and then able, and there is also a case where if the 1st letter is caps it comes first eg, "Able" and "a". Here Able displays first.
|
I want to sort an array using NSSortDescriptor
|
CC BY-SA 2.5
| 0 |
2011-04-04T18:37:52.433
|
2014-04-26T03:11:26.427
|
2011-04-05T06:49:01.263
| 326,686 | 326,686 |
[
"iphone",
"nsarray",
"jquery-ui-sortable",
"sorting"
] |
5,543,036 | 1 | 5,543,097 | null | 1 | 1,821 |
I am currently working on a wordpress theme and I have a little problem in my page.
The wpadminbar element is not setting up its style. I have no idea why it is, but it is.
Screen shot:

|
Wordpress wpadminbar not setting up its style
|
CC BY-SA 3.0
| null |
2011-04-04T19:03:44.977
|
2015-04-29T10:17:31.223
|
2011-09-22T15:43:28.867
| null | 546,476 |
[
"php",
"css",
"wordpress"
] |
5,543,048 | 1 | 5,543,114 | null | 3 | 381 |
Probably a simple answer here, I hope, but seems like a difficult question to put into words.
If you have a Foreign Key that essentially appears twice in a table, coming from two Composite Keys does that FK then have to be defined twice (exist as two separate attributes)?
Here are some models to visualize what I am asking. Ex. 1 shows the FK of Table1Id as a single attribute. Ex. 2 shows the FK of Table1Id (identified as Table1Id_FKTable2 & Table1Id_FKTable3) as two different attributes.
Depending on what you want to accomplish are both of these models valid?

|
Foreign Key Duplication?
|
CC BY-SA 2.5
| null |
2011-04-04T19:04:41.223
|
2011-04-04T19:22:36.283
| null | null | 527,298 |
[
"database",
"database-design",
"foreign-keys",
"foreign-key-relationship"
] |
5,543,198 | 1 | 10,756,543 | null | 109 | 36,918 |
I think that the terminology used in Qt with model/view controls is flawed. On [their explanation page](https://doc.qt.io/qt-5.7/model-view-programming.html) they state, that they simplified the MVC to MV by merging View and Controller and they are giving the following picture:

However I think, they misnamed the roles of objects and I think that,
1. What they call View with merged Controller is in fact a View only.
2. What they call Model is in fact Controller only.
3. If you really want to have a model it would be somewhere where their "Data" is.
I am speaking about usual and sane way you would use Qt model/view component in your app.
Here are the reasons:
1. This is typically Qt component which is used as is, without adding any Controller logic specific to your objects)
2. This is hardly a Model, just because you should implement several Qt methods like rowCount, columnCount, data etc. which have nothing to do with your model. In fact there are typical model methods found in Controllers. Of course, you can implement both Controller and Model logic here, but first it would be quite bad code design and secondly you would merge Controller and Model not Controller and View as they state.
3. As said in reason 2. if you want to separate Model logic that it is surely not the blue box on the picture, but rather the dashed "Data" box (communicating to real Data of course).
Is Qt wrong in their terminology, or it is just me who does not understand? (BTW: The reason why it is not academic question is that I have started to code my project following their naming and I have soon found out, that the code clearly is not right. It was only after that when I realized, that I should not try put Model logic in what they call Model)
|
Why Qt is misusing model/view terminology?
|
CC BY-SA 3.0
| 0 |
2011-04-04T19:16:34.863
|
2019-11-22T08:30:04.040
|
2016-08-05T07:06:10.747
| 5,112,433 | 313,522 |
[
"model-view-controller",
"qt"
] |
5,543,359 | 1 | null | null | 2 | 599 |
I have a report that looks like this:

There isn't anything really special about the report, it's my first report I've made with reporting services for my application (we're transitioning from crystal reports).
It's a local report that runs fine outside of visual studio. However, if I run it inside visual studio with that bottom right corner textbox (the expression is `=Globals.PageNumber & " of " & Globals.TotalPages`) it crashes. If I remove the box, it runs.
It crashes with this error code:
> The assembly with display name
'expression_host_9191d5a6e4724724b792f551d1c7a8e9'
failed to load in the 'LoadFrom'
binding context of the AppDomain with
ID 1. The cause of the failure was:
System.IO.FileNotFoundException: Could
not load file or assembly
'expression_host_9191d5a6e4724724b792f551d1c7a8e9,
Version=11.2.30319.1, Culture=neutral,
PublicKeyToken=null' or one of its
dependencies. The system cannot find
the file specified.
Does anyone know what I'm doing wrong?
|
Report Services crashes in visual studio debugger for local report when page number parameters are added
|
CC BY-SA 2.5
| null |
2011-04-04T19:30:35.013
|
2011-04-05T07:34:40.343
| null | null | 12,243 |
[
"c#",
"sql-server",
"visual-studio-2010",
"reporting-services"
] |
5,543,386 | 1 | 5,543,408 | null | 0 | 263 |
I bought a WordPress template and it adds some new "categories" in the WordPress Dashboard.
(Such as "Works", "Trends", "Fashions", "Styles" in the screenshot)
However, I would like to do some modification to them, is that possible?
Is there a way to manage this "categories"?
Or which keyword I could use to search for more information?
Best Regards

|
How to customize WordPress dashboard
|
CC BY-SA 2.5
| null |
2011-04-04T19:32:37.153
|
2015-02-25T13:10:15.947
| null | null | 482,169 |
[
"wordpress",
"content-management-system",
"dashboard"
] |
5,543,495 | 1 | 5,588,462 | null | 24 | 65,611 |
I'm trying to configure a viewport for mobile Safari. Using the viewport meta tag, I am trying to ensure that there's no zooming, and that you can't scroll the view horizontally. This is the meta tag I'm using:
```
<meta id="viewport" name="viewport" content ="width=device-width, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no" />
```
On my iPhone when I load the page, it seems to look okay:

But I can scroll horizontally, so that it looks like this (this is as far to the right as I can go:

When I swing it into landscape view, the page renders as expected, locking the horizontal scroll position.
I'm trying to figure out how to make this page not scroll horizontally at all. Is it possible that I've got some page element pushing the content out? I wouldn't even expect that to be possible with a correct viewport set, but I'm grasping at straws here.
|
Mobile Safari Viewport - Preventing Horizontal Scrolling?
|
CC BY-SA 3.0
| 0 |
2011-04-04T19:43:36.440
|
2022-08-13T11:53:46.353
|
2013-02-11T07:01:29.433
| 31,671 | 105,728 |
[
"mobile",
"mobile-safari",
"viewport"
] |
5,543,686 | 1 | 5,543,942 | null | 1 | 2,078 |
I have the div on the left holding the "wing" that has a float left applied to it but what I need is that the middle div (there is one containing div2and3) to always be centered which I can do but if the width of the window is to small it pushes the mid container off screen because the left div locks on the edge.
I need that left div to not be "solid" so that it can be off the screen and not affect the auto margins on the middle div. Anyone? If you need more explanation I can onlytalk for another 20 minutes (im in class) and my internet was out last night/this morning we will see when I get home if its up.
(ignore my aquarium in the background it was the project we just did in this class)
Screencap:

```
<!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>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Banta - Homepage</title>
<link rel="stylesheet" type="text/css" media="screen" href="main.css" />
<style type="text/css">
body {
background-image: url(images/backgroundd.png);
}
body,td,th {
color: #0d2927;
}
</style>
</head>
<body>
<div id="maincont">
<div id="middlecont">
<div id="leftwing">
</div>
<div id="header">
</div>
<div id="body">
Lorem ipsum doler sit AMETTTTTTTTTTTTTTT FILLER TEXT FILLER TEXTFILLER TEXTFILLER TEXTFILLER TEXTFILLER TEXTFILLER TEXTFILLER TEXTFILLER TEXTFILLER TEXTFILLER TEXTFILLER TEXTFILLER TEXTFILLER TEXTFILLER TEXTFILLER TEXTFILLER TEXTFILLER TEXTFILLER TEXTFILLER TEXTFILLER TEXTFILLER TEXTFILLER TEXTFILLER TEXTFILLER TEXTFILLER TEXTFILLER TEXTFILLER TEXTFILLER TEXTFILLER TEXTFILLER TEXTFILLER TEXTFILLER TEXTFILLER TEXTFILLER TEXTFILLER TEXTFILLER TEXTFILLER TEXTFILLER TEXTFILLER TEXTFILLER TEXTFILLER TEXTFILLER TEXTFILLER TEXTFILLER TEXTFILLER TEXTFILLER TEXT
</div>
</div>
<div id="rightwing">
</div>
</div>
</body>
</html>
@charset "utf-8";
/* CSS Document */
body{
font-family:Verdana, Geneva, sans-serif;
}
#maincont {
margin:auto;
width:1518px;
height:782px;
}
#leftwing{
min-width:0%;
background-image:url(images/leftside.png);
width:405px;
height:449px;
position:absolute;
left:-405px;
}
#rightwing{
float:right;
background-image:url(images/rightside.png);
width:405px;
height:449px;
margin-top:-782px;
}
#middlecont{
position:relative;
margin:auto;
width:708px;
height:782px;
}
#header{
background-image:url(images/headhome.png);
width:708px;
height:150px;
}
#body{
background-image:url(images/bodybg1.png);
width:708px;
height:632px;
}
```
|
Can I make a div not "solid" to the page window?
|
CC BY-SA 3.0
| null |
2011-04-04T20:03:46.137
|
2012-06-13T14:45:28.683
|
2012-06-13T14:45:28.683
| 44,390 | 691,752 |
[
"css",
"html",
"css-float"
] |
5,543,724 | 1 | 5,543,823 | null | 20 | 53,060 |
I have a web page with a form and has a field that uses the jquery autocomplete function.

This is how the HTML renders after a user name returns 1 or more results.
However I cannot figure out how to make Selenium "click" a result.

Can I do a jQuery type of selector.
e.g.
```
$(".ul.ui-autocomplete li:first a")
```
|
Selenium how to select an object by class
|
CC BY-SA 2.5
| 0 |
2011-04-04T20:07:37.637
|
2015-11-23T17:39:36.357
| null | null | 87,302 |
[
"selenium",
"selenium-ide"
] |
5,543,765 | 1 | null | null | 0 | 1,308 |
For my application I need a component (or combination of components) that shows a number of different types of events along a timeline, displays them in different ways as specified and allows you to click/hover along the timeline to add/modify/get details on events.
Basically I want a timeline across the top, always showing a 24hour period, but starting at variable points.
I need to have different rows of variable height to display different types of data in different ways.
for instance:
- - - - - -
all rows need to share the same timespan, and I'd like to be able to have click/hover events that target the data object/values of the data being displayed.
I also would like gridlines going across the background of all the rows.
At some point I'd like to be able to compress certain areas of the timeline, but I'm not going to worry about that yet.
I'm not sure if I should attempt to extend the flex advanced datagrid, or use one of the several vaguely similar component types I've found online ([http://www.gantt4flex.com/](http://www.gantt4flex.com/), [http://flexlib.googlecode.com/svn/trunk/docs/index.html?flexlib/schedu](http://flexlib.googlecode.com/svn/trunk/docs/index.html?flexlib/schedu) ling/), or how best to approach, but I need to get this on its feet fairly quickly.
I have a data model and can come up with whatever data I need no problem (working from sqlite). But I haven't built a component from scratch before and am wondering how to approach something like this.. how to break it down.. and how much I can use already existing components and modify them.

(date selector would be separate)
|
How to approach flex custom component for timeline/chart?
|
CC BY-SA 2.5
| null |
2011-04-04T20:10:36.317
|
2011-04-07T18:49:34.930
|
2011-04-06T00:01:39.710
| 530,585 | 530,585 |
[
"apache-flex",
"charts",
"data-visualization",
"custom-component",
"timeline"
] |
5,544,032 | 1 | 5,544,232 | null | 1 | 2,239 |
I've used Video Tag on a landing page of our upcoming site [Levoma](http://levoma.com). I've also used SublimeVideo to have some extra control on my video.
I see some sort of an artifact on Chrome, ever since I upgraded to the latest version (10.0.648.204) - the background on the video is no longer white (the video used have white background). I'm on Mac OS X 10.6.x.
There is no problem with Firefox, Safari, Opera. My friends says, there are no issues with Chrome on Windows too.
Any idea what might be causing this? I've attached a screenshot. 
I've tried setting background #fff to almost all the elements associated with that video tag.
|
Unwanted Background color/artifact on HTML5 Video Tag
|
CC BY-SA 2.5
| null |
2011-04-04T20:36:43.180
|
2011-04-04T20:55:12.123
| null | null | 19,564 |
[
"css",
"html",
"video"
] |
5,544,110 | 1 | 5,544,133 | null | 4 | 8,783 |
I'm trying to copy a table named "CLOUD" to a new one named "t1_temp" while grouping the rows based on a column named "tag". BUT i want this to happen only if the "NeighborhoodID" column is the same.
The query i'm running is:
```
INSERT INTO t1_temp (id, NeighborhoodID, power, tag)
SELECT id, NeighborhoodID, SUM(power), tag
FROM CLOUD GROUP BY tag ORDER BY NeighborhoodID
```
So for example:

The third entry shouldn't be grouped with the 1th & 4th entry's because the "NeighborhoodID" isn't the same.
I hope i'm clear, if not please comment, thanks.
|
SQL GROUP BY with a condition?
|
CC BY-SA 2.5
| null |
2011-04-04T20:43:15.913
|
2011-04-04T20:49:17.803
| null | null | 537,943 |
[
"mysql",
"sql"
] |
5,544,123 | 1 | null | null | 0 | 2,141 |
I've been trying to create a dynamic sized web-design for the past few hours, but with no luck.
Here's a picture of what I am trying to do:

Basically, I have a header (at top) and footer (at bottom) with set heights. I want two divs between them, a menu and content area, that are dynamically sized between the header and footer (height-wise). When I resize the website, I want the menu and content are to resize as well so they still fit. If the content inside the content area or menu are is higher than the actual div, the scrollbars will appear (overflow: auto).
Can anyone help me?
Thanks
|
Dynamic sized web design
|
CC BY-SA 2.5
| null |
2011-04-04T20:44:20.147
|
2016-08-29T07:16:43.773
|
2011-04-04T20:46:17.507
| 139,010 | 691,803 |
[
"html",
"css"
] |
5,544,177 | 1 | 5,544,363 | null | 4 | 9,794 |
I am having two seemingly related problems accessing javascript function defined in different places. The first problem I am having is calling function I have defined from the console of firgbug or safari. I defined a function called getRed the looks like this:
```
function getRed(row, col)
{
// do something stuff and return the red value as a float
}
```
I would like to be able to test this function from the console but every time I try and call getRed(1,1); for example, I get an error like this: ReferenceError: getRed is not defined
Do I need to make a special call to define the namespace? I define this function in a javascript file called drawing.js which is define very early in my html page.
The other problem I am having is calling a function defined in that same drawing.js file from the onChange: method of my dojo color palette. Here is the code for the color palette:
```
<script type="text/javascript" src="drawing.js"></script>
//the method colorChange is inside drawing.js which is defined before the dojo
//color palette
<script src="http://ajax.googleapis.com/ajax/libs/dojo/1.6/dojo/dojo.xd.js"
djConfig="parseOnLoad: true">
</script>
<script type="text/javascript">
dojo.require("dojox.widget.ColorPicker");
dojo.addOnLoad(function() {
var c = new dojox.widget.ColorPicker({
onChange: function(val)
{
console.log("BEFORE");
colorChange(val);
console.log("AFTER");
}
},
"picker1");
});
</script>
```
Here is the definition of changeColor inside the file drawing.js:
```
function colorChange(val)
{
console("colorChange!");
}
```
Every time I click on the color palette I get the following error: ReferenceError: colorChange is not defined.
I am very new to javascript and I am sure that these two issue have a very similar and easy solution but I have not been able to find the answer online. Can anyone help me out?
I am pretty sure the script is being loaded as this screen shot shows:

|
Accessing javascript functions defined in different files
|
CC BY-SA 2.5
| null |
2011-04-04T20:50:00.067
|
2011-04-04T21:19:22.423
|
2011-04-04T21:19:22.423
| 131,399 | 131,399 |
[
"javascript",
"callback",
"dojo",
"color-palette"
] |
5,545,020 | 1 | 5,546,601 | null | 6 | 2,777 |
I have an image of license plate in black and white.
this is how it looks:

now I want to color the background of each digit, for further work of
cutting the numbers from the plate.
like this:

any help will be greatly appreciated.
|
segment digits in an image - Matlab
|
CC BY-SA 2.5
| 0 |
2011-04-04T22:24:39.187
|
2011-04-05T17:39:24.907
|
2011-04-05T13:36:57.173
| 556,011 | 556,011 |
[
"matlab",
"image-processing"
] |
5,545,087 | 1 | 5,545,190 | null | 4 | 1,796 |
I believe that the little icon in the title bar in the image below is added using a ribbon control? I've been googling for the last while and I'm not getting much help.
There's a [WPF ribbon control library](http://www.microsoft.com/downloads/en/details.aspx?FamilyID=2bfc3187-74aa-4154-a670-76ef8bc2a0b4&displaylang=en) from Microsoft, but the same from that does not set anything in the title bar.
I've also found a microsoft [shell library](http://archive.msdn.microsoft.com/WPFShell) which integrates some windows 7 bits into wpf and allows you to fiddle with the chrome. It hasn't seen updates in a year, so not sure if it's current yet.
Any ideas?
Does it only work on Windows 7? I don't have any XP machines to see what Office 2010 looks like. I'd prefer a XP/Windows 7 WPF solution if possible.

|
WPF, possibly ribbon control: Adding icon to title bar
|
CC BY-SA 2.5
| 0 |
2011-04-04T22:35:14.320
|
2012-08-02T14:13:44.507
|
2012-08-02T14:13:44.507
| 600,559 | 518,551 |
[
"c#",
"wpf-controls",
"ribboncontrolslibrary"
] |
5,545,102 | 1 | null | null | 0 | 136 |
Show the titles and the award amounts of 20 awards that contain words discover, discoverer, discovery, discovered, and discovering in their abstracts.
My query:
```
SELECT title, count(award), abstract
FROM poop
ORDER BY award
WHERE abstract LIKE discov%
LIMIT 20
```

It doesnt like my where clause... Anyone? (In mySQL)
|
Finding Distinct Value using SQL
|
CC BY-SA 2.5
| 0 |
2011-04-04T22:36:27.983
|
2011-04-05T01:57:37.407
|
2011-04-04T23:06:33.527
| 700,070 | 700,070 |
[
"sql"
] |
5,545,107 | 1 | 5,545,108 | null | 1 | 1,334 |
I generated this with `qplot(log10(InDegree), username , data = df, colour = insamples)`.
Is there a way I tell qplot to order the dots from lower to higher value on the y-axis?

|
How to order values on a dotplot produced via qplot?
|
CC BY-SA 2.5
| 0 |
2011-04-04T18:51:16.283
|
2011-04-04T22:36:54.307
| null | null | 114,989 |
[
"r",
"ggplot2"
] |
5,545,173 | 1 | 5,545,505 | null | 0 | 1,348 |
When trying to run [this](http://wiki.eclipse.org/GEF_Zest_Visualization) zest tutorial, I get the following error:
> The type
org.eclipse.draw2d.FigureCanvas cannot
be resolved. It is indirectly
referenced from required .class files
over the following bit of code:
```
GraphNode n = new GraphNode(g, SWT.NONE, "Paper");
```
I have gef 3.6.2 installed, so I don't get what may be the problem. All that Eclipse seems able to do is ask me if I want to configura my build path settings:

What may I be missing?
|
Problem with draw2d dependency in Eclipse with zest
|
CC BY-SA 2.5
| null |
2011-04-04T22:46:11.500
|
2011-04-05T00:03:41.400
| null | null | 130,758 |
[
"java",
"eclipse",
"eclipse-gef",
"zest"
] |
5,545,234 | 1 | null | null | 1 | 483 |
Running on Eclipse Galileo (3.5), I noticed my tests show the timing of each test run. Is there a way to capture and this information? Is there an API or is it stored in a result file?
Screenshot

[http://ge.tt/3ylDyiq](http://ge.tt/3ylDyiq)
|
Capturing timing data from Junit tests on Eclipse
|
CC BY-SA 3.0
| 0 |
2011-04-04T22:54:28.503
|
2011-11-29T03:13:12.903
|
2011-11-29T03:13:12.903
| 234,976 | 691,949 |
[
"eclipse",
"junit"
] |
5,545,260 | 1 | 5,551,878 | null | 1 | 890 |
Looking for advice on the best way to model the following generic requirements. Since these are just generic only basic entities/attributes are included in the model.
The purpose is to capture and list websites for businesses that may or may not have franchises.
1. A business may have zero, one, or many websites
2. Franchises (reason for including ExternalBusinessId) of the business may or may not share the same websites as the Business itself or other franchises
In my attempt to fulfill these requirements I removed ExternalBusinessId from the PK of Website. Not sure if it is that simple to meet these requirements, but it looks like it would still leave a lot of dups.
Another approach that I may need to take is to move the franchises to their own table which could make this problem easier to solve but complicate the rest of my model (not shown here). If having Franchises in their own table is the right approach I would rather go that route and go through the rest of the exercise of having that fit into my complete model. In my current model the way to handle businesses without franchises they are given a default ExternalBusinessId of 001.
Any thoughts?
Thanks

|
Data Modeling Verification
|
CC BY-SA 2.5
| null |
2011-04-04T22:57:25.073
|
2011-04-05T12:34:37.267
| null | null | 527,298 |
[
"database",
"database-design",
"data-modeling",
"relational-database"
] |
5,545,426 | 1 | 5,545,457 | null | 2 | 288 |
I've got an object filled with objects and I want to know how many items are in it. How can I do this with JS? Also running jQuery in the page.

|
Length of an object filled with objects?
|
CC BY-SA 2.5
| 0 |
2011-04-04T23:18:31.203
|
2012-05-31T22:51:47.853
| null | null | 157,503 |
[
"javascript",
"jquery"
] |
5,545,454 | 1 | 5,545,763 | null | 0 | 633 |
Does anyone know how to add a dialog box similar to the one used by Google's Voice extension (it's the one in the blue activated by clicking on the phone number)?

Thanks,
Joe Chin
|
How to add dialog box on webpage with Chrome Extension?
|
CC BY-SA 2.5
| null |
2011-04-04T23:22:32.627
|
2011-04-05T00:12:11.637
| null | null | 437,299 |
[
"dialog",
"google-chrome-extension"
] |
5,545,543 | 1 | 5,545,591 | null | 0 | 1,497 |
I have a jsp I'm working on and I was wondering if there is an easy javascript function that can figure out which element in a list is selected and then move that element to another on the same jsp?
here is the screen shot of the jsp:

this is the code:
```
<% Venue v = (Venue)session.getAttribute("currentVenue"); %>
<% List<Conceptual_Package> cpList = Conceptual_PackageDAO.getInstance().getByVenue(v.getId()); %>
What Packages do you want to see?
<form method="post" action="ttp.actions.Sale3PackAction.action">
<select name="packid" id="packid">
<% for (Conceptual_Package cp: cpList) { %>
<option value="<%=cp.getId()%>"><%=cp.getName1()%></option>
<% } %>
</select>
<input type="button" value=" next " onclick="getSeats();"/>
</form>
<!--new-->
Available Seats:
<select name="eventSeatid" size="10" id="aSeats">
<!-- <option value="aSeats"></option>-->
</select>
<input type="button" value=" Add "/>
Selected Seats:
<form method="post" action="ttp.actions.sale4Action.action">
<select name="eventSeat2id" size="10" id="seat2">
<option value="seat2"></option>
</select>
</form>
```
|
How to use javascript to move an object from one list to another on the same page
|
CC BY-SA 2.5
| null |
2011-04-04T23:35:46.287
|
2011-04-05T00:31:16.400
|
2011-04-05T00:31:16.400
| 474,980 | 474,980 |
[
"javascript"
] |
5,545,866 | 1 | 6,176,204 | null | 1 | 1,358 |
I made a subclass of `CMFCCaptionBar` in what has so far been a vain attempt to make it do something more useful than just having a single icon, single text field, and single button while still maintaining the same look, feel, and other GUI functionality.
Reference: [http://msdn.microsoft.com/en-us/library/bb983960%28v=vs.90%29.aspx](http://msdn.microsoft.com/en-us/library/bb983960%28v=vs.90%29.aspx)
Example: 
Haven't really figured out anything that works yet as it seems pretty locked down. You can remove things but can't really add things as far as I can tell. What I'd like to be able to do is add different icons from an `CImageList` and formatted text on multiple buttons dynamically. Then provide a context menu with additional options when each button is clicked that corresponds to data the button represents.
If there is a way to make a horizontal `CTreeCtrl` or `CListCtrl` layout on a toolbar that functions similarly I'm game to try that out too but I tried subclassing `CMFCReBar` and putting a custom `CDialogBar` on it and that didn't play very nicely with the ribbon control and other things in use. Actually that's putting it nicely is was basically a nightmare and waste of time.
This is for navigating a parent child relationships of different items that will change based on the current selection in other `DockablePane` window views. These views vary from hierarchical, lists, 3d, and statistical representations of the items. The idea is to provide something similar to this caption bar across the top so the user can always see and interact with the currently selected object and immediate parents or children which may not always be obvious from the current view (especially in 3d).
Something like this is what I'm aiming for (use your imagination, my mspaint skills are weak) 
Any suggestions at all are welcome ... other than not using MFC because I'm stuck with it.
|
CMFCCaptionBar with multiple buttons?
|
CC BY-SA 2.5
| null |
2011-04-05T00:32:19.897
|
2011-05-30T12:18:52.150
| null | null | 516,725 |
[
"c++",
"user-interface",
"mfc",
"custom-controls",
"mfc-feature-pack"
] |
5,545,902 | 1 | 5,545,935 | null | 1 | 767 |
I have a jsp that I'm working on and I need to find out which item in a list is selected.
here is a screen shot of the jsp:

here is the code:
```
<% Venue v = (Venue)session.getAttribute("currentVenue"); %>
<% List<Conceptual_Package> cpList = Conceptual_PackageDAO.getInstance().getByVenue(v.getId()); %>
What Packages do you want to see?
<form method="post" action="ttp.actions.Sale3PackAction.action">
<select name="packid" id="packid">
<% for (Conceptual_Package cp: cpList) { %>
<option value="<%=cp.getId()%>"><%=cp.getName1()%></option>
<% } %>
</select>
<input type="button" value=" next " onclick="getSeats();"/>
</form>
<!--new-->
Available Seats:
<select name="aSeats" size="10" id="aSeats">
</select>
<input type="button" value=" add " onclick="addToCart();"/>
Selected Seats:
<form method="post" action="ttp.actions.sale4Action.action">
<select name="Seat2" size="10" id="seat2">
</select>
</form>
<jsp:include page="/footer.jsp"/>
```
|
How to find the selected element in a list in javascript
|
CC BY-SA 2.5
| null |
2011-04-05T00:37:49.243
|
2011-04-05T00:42:14.380
| null | null | 474,980 |
[
"javascript"
] |
5,545,951 | 1 | 5,545,977 | null | 0 | 1,069 |
Running Apache/PHP on this PC.
I am using Eclipse >> Export Java > JAR file or Runnable JAR file
I copied and pasted some code to test running Java on a web server, here is the class.
```
package com.dane;
import java.awt.*;
import javax.swing.JApplet;
import javax.swing.JFrame;
public class DrawingLines extends JApplet {
public static void main(String[] args) {
JApplet applet = new DrawingLines();
JFrame f = new JFrame();
f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
f.getContentPane().add(applet);
f.setSize(400, 400);
f.setLocation(200, 200);
applet.init();
// If you override start method
// applet.start();
f.setVisible(true);
}
private static final long serialVersionUID = 1L;
int width, height;
public void init() {
width = getSize().width;
height = getSize().height;
setBackground(Color.black);
}
public void paint(Graphics g) {
g.setColor(Color.green);
for (int i = 0; i < 10; ++i) {
g.drawLine(width, height, i * width / 10, 0);
}
}
}
```
I have tried exporting it both as a simple Jar and a Runnable Jar, with all sorts of combinations of settings.
The only thing I haven't tried is creating my own manifest, or rather, one that works.
Here is my php file. There are no php tags, and the result was the same even when I had php code in there:
```
<APPLET CODE="DrawingLines.class" WIDTH="250" HEIGHT="22" codebase="/Test/test.jar"> </APPLET>
```
I have also tried:
```
<APPLET CODE="DrawingLines.class" WIDTH="250" HEIGHT="22"> </APPLET>
```
The general result is this:
```
load: class DrawingLines.class not found.
java.lang.ClassNotFoundException: DrawingLines.class
at sun.plugin2.applet.Applet2ClassLoader.findClass(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadClass0(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadCode(Unknown Source)
at sun.plugin2.applet.Plugin2Manager.createApplet(Unknown Source)
at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
```
I run the applet within eclipse.
If it can't find the class in an external environment, I am assuming I am screwing up something during the creation of the jar. I've checked the eclipse Run Configurations for the project.
Under Java Applet, it shows a run configuration named after my class, DrawingLines.

If I try to export a runnable jar, here are the launch configurations it shows, not sure if it is important but the class one isn't there.

Any idea what is going on here?
regards,
dane
|
Localhost, Eclipse, java applets, and php code; applet not running
|
CC BY-SA 2.5
| null |
2011-04-05T00:44:28.393
|
2011-04-05T00:49:01.270
| null | null | 434,400 |
[
"java",
"php",
"eclipse",
"applet"
] |
5,546,034 | 1 | 6,078,251 | null | 2 | 453 |
I've had this problem for a while: When I use jquery `$.post`, I see LOTS of requests in the Firebug console that are exactly the same, and only the last one returns anything. If I click on the plus sign to open the tree for any of the other requests, it shifts the console about 1px but is totally blank. The loading images in the console don't go away.
The image shown is the result of a single `$.post` action in Firebug 1.6.2, Mozilla Firefox 3.6.16 on Windows 7.

The action only executes once and returns one result, in other words it behaves normally. Is there an explanation for this, or is something awry with my code?
Even this code will trigger multiple requests in the console:
```
$('form').submit(function (e) {
e.preventDefault();
$.post('/', {}, function(){
alert('ok');
}, "json");
});
```
And the form:
```
<form method="post" action="/">
<div>
<input type="hidden" value="1" name="id">
<button type="submit">Delete</button>
</div>
</form>
```
|
Why does Firebug show duplicate $_POST requests?
|
CC BY-SA 3.0
| null |
2011-04-05T01:00:39.273
|
2012-06-12T19:59:55.240
|
2012-06-12T19:59:55.240
| 785,541 | 398,242 |
[
"javascript",
"firebug"
] |
5,546,148 | 1 | 5,546,278 | null | 0 | 684 |
I want to paint a hex map with each hex a (potentially) different color. The shared border is black and the interior is a solid color. If I want to paint a 1920x1080 display, how can I do this the fastest way with OpenGL?
See the image below for a sample hex (blown up for clarity). The color of the hex won't necessarily be the same as any of the surrounding hexes.

|
OpenGL: What is the fastest way to paint hex maps?
|
CC BY-SA 2.5
| 0 |
2011-04-05T01:24:07.890
|
2011-04-05T03:16:19.913
|
2011-04-05T03:16:19.913
| 44,729 | 325,557 |
[
"opengl",
"hexagonal-tiles"
] |
5,546,169 | 1 | 5,546,208 | null | 0 | 222 |
How to get: The top 20 universities in terms of the total amount of awards they received?

I've tried and it only gives me 1 record??
```
SELECT sum(amount), org
FROM iis
ORDER BY award
LIMIT 0, 20;
```
|
Get top 20 results for users in mySQL
|
CC BY-SA 2.5
| null |
2011-04-05T01:27:11.370
|
2011-04-05T02:02:08.693
| null | null | 700,070 |
[
"mysql"
] |
5,546,312 | 1 | 5,546,437 | null | 0 | 1,288 |
I'm trying to rotate a 3D object on its Z axis (up/down).
```
public void RotateY(float angle)
{
foreach (CoordinateVertices cv in this.GetAll<CoordinateVertices>())
{
for (int i = 0; i < cv.Coordinates.Length; i++)
{
Vector3 old = cv.Coordinates[i];
float theta = Math.Atan2(old.Y, old.X) + angle;
float rayon = Math.Sqrt(Math.Pow(old.X, 2) + Math.Pow(old.Y, 2));
cv.Coordinates[i] = new Vector3(Math.Cos(theta) * rayon, Math.Sin(theta) * rayon, old.Z);
}
}
}
```
The trigonometry is fairly simple, and it seems to work fine, but for some reason, my 3D object gets cut in half.

Does anybody have an idea of what's going on? I would have posted this on the maths StackExchange, but it might be a problem with my programming too, and the trigonometry is really simple.
|
3D Math / 2D Rotation Calculation: Split/cut 3D model?
|
CC BY-SA 2.5
| null |
2011-04-05T01:54:49.283
|
2011-04-05T02:34:22.310
| null | null | 154,502 |
[
"c#",
"3d",
"rotation",
"2d",
"trigonometry"
] |
5,546,556 | 1 | 5,573,561 | null | 1 | 610 |
I have a problem with Glassfish Server. Recently(today) the Update Tool Notifier of glassfish executed an update.
Everything seemed to go well but when I tried to start the server, it threw this error.

EDIT:
```
Launching GlassFish on Felix platform
ERROR: Bundle org.glassfish.osgi-http [258]: Error starting file:/C:/Program%20Files/glassfish-3.0.1/glassfish/modules/autostart/osgi-http.jar (org.osgi.framework.BundleException: Activator start error in bundle org.glassfish.osgi-http [258].)
java.lang.NullPointerException
at org.glassfish.internal.api.Globals.get(Globals.java:73)
at org.glassfish.osgihttp.Activator.getStandardContext(Activator.java:97)
at org.glassfish.osgihttp.Activator.start(Activator.java:89)
at org.apache.felix.framework.util.SecureAction.startActivator(SecureAction.java:629)
at org.apache.felix.framework.Felix.activateBundle(Felix.java:1835)
at org.apache.felix.framework.Felix.startBundle(Felix.java:1752)
at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1156)
at org.apache.felix.framework.StartLevelImpl.run(StartLevelImpl.java:264)
at java.lang.Thread.run(Thread.java:619)
```
This is as you can tell a server linked to Netbeans 6.9.1 on Windows XP.
I think that is all relevant info.
Please help me. I thank you in advance.
|
Glassfish failed start on update
|
CC BY-SA 2.5
| null |
2011-04-05T02:31:36.870
|
2016-01-12T19:46:08.310
|
2011-04-05T13:21:00.683
| 220,503 | 220,503 |
[
"java",
"glassfish"
] |
5,546,711 | 1 | 5,547,005 | null | 9 | 3,171 |
So I am just at the beginning of writing a game in Java and I am writing my game objects. Now I have read here in [Evolve Your Hierarchy](http://cowboyprogramming.com/2007/01/05/evolve-your-heirachy/) that you should build your games as compositions and not as a big class hierarchy. As this image from the previous link shows:

However, when actually getting down to the implementation I have one small question about where to apply the interfaces.
Lets say you have a class called Player and the interfaces Moveable and Renderable. Do you implement this using public interface variables:
```
class Player {
public Moveable moveable;
public Renderable renderable;
}
class GenericMoveable implements Moveable {
// Function implementations
}
class PlayerRenderable implements Renderable {
// Function implementations
}
```
Or do you try and do this by applying the interfaces directly to the object:
```
class Player implements Moveable, Renderable {
private GenericMoveable genericMoveable;
// Non-direct Implementation of Moveable
void someMoveFunc(double x, double y) {
genericMoveable.someMoveFunc(x, y);
}
// Direct implementation of Renderable
void someRenderableFunction() {
// Player class specific code
}
}
class GenericMoveable implements Moveable {
// Function implementations
}
```
Now currently I am feeling that the second method is better. The main reason for that is because I can create the following lists:
```
List<Renderable> renderObjects; // use this to draw all of the objects to the screen
List<Moveable> moveObjects; // use this to move all objects at once
```
I really just want confirmation that I am on the right track. I am pretty sure that when creating game objects by composition for games in Java you want to apply the interfaces directly to the Game Object in question and then use private interfaces if you need them and direct implementations of those functions for the rest. Is this correct? And what are the positives and negatives of what I am doing?
Though, while we are here, what else do I need to look out for in the implementation of Compositional Game Objects in Java? What should I do differently? Thanks for any responses in advance, I appreciate any and all help.
|
How to write solid Pure Aggregation (composition) Game Objects in Java?
|
CC BY-SA 2.5
| 0 |
2011-04-05T02:58:26.083
|
2011-04-05T03:56:19.340
| null | null | 83,446 |
[
"java",
"interface",
"game-engine",
"composition"
] |
5,546,751 | 1 | 5,556,032 | null | 0 | 398 |
How do I find a coordinate using cartesian coordinate system with just an index?
- -
I'm not married to the order of the grid, but I want to call the location by an index rather then a coronate if at all possible.
I'm trying to create a grid for game tiles.

|
How do I find a coordinate using cartesian coordinate system with just an index?
|
CC BY-SA 2.5
| null |
2011-04-05T03:07:06.257
|
2015-08-07T17:42:14.060
|
2015-08-07T17:42:14.060
| 881,229 | 432,309 |
[
"python",
"math"
] |
5,547,040 | 1 | 5,547,473 | null | 3 | 4,813 |
Is there a substantial overhead of using HTTP over plain sockets (Java on Android) to send a large (50-200 MB) file [file is on the SD card] from an Android device to a Linux server over a Wi-Fi network.
In my current prototype I'm using CherryPy-3.2.0 to implement my HTTP server. I'm running Android 2.3.3 on a Nexus one as my client.
Currently it's taking around ~100 seconds** (on slower network 18 Mbps*) and ~50 seconds (on a faster 54 Mbps*) Wi-Fi network to upload a 50 MB binary file.
NOTE:
*`WifiInfo.getLinkSpeed()`
** `HTTPClient.execute(postRequest)`
Any other ideas regarding other expensive operations that may have a substantial part in the total time apart from the network and how to reduce this time would be appreciated.
Thanks.
EDIT - HTTP post code on Android
```
private void doHttpPost(String fileName) throws Exception{
HttpParams httpParameters = new BasicHttpParams();
// Set the timeout in milliseconds until a connection is established.
int timeoutConnection = 9000000;
HttpConnectionParams.setConnectionTimeout(httpParameters, timeoutConnection);
// Set the default socket timeout (SO_TIMEOUT)
// in milliseconds which is the timeout for waiting for data.
int timeoutSocket = 9000000;
HttpConnectionParams.setSoTimeout(httpParameters, timeoutSocket);
HttpClient client = new DefaultHttpClient(httpParameters);
client.getParams().setParameter(ClientPNames.COOKIE_POLICY, CookiePolicy.RFC_2109);
HttpPost postRequest = new HttpPost();
postRequest.setURI(new URI("http://192.168.1.107:9999/upload/"));
MultipartEntity multiPartEntity = new MultipartEntity();
multiPartEntity.addPart("myFile", new FileBody(new File(fileName)));
postRequest.setEntity(multiPartEntity);
long before = TrafficStats.getTotalTxBytes();
long start = System.currentTimeMillis();
HttpResponse response = client.execute(postRequest);
long end = System.currentTimeMillis();
long after = TrafficStats.getTotalTxBytes();
Log.d(LOG_TAG, "HTTP Post Execution took " + (end - start) + " ms.");
if( before != TrafficStats.UNSUPPORTED && after != TrafficStats.UNSUPPORTED)
Log.d(LOG_TAG, (after-before) + " bytes transmitted to the server");
else
Log.d(LOG_TAG, "This device doesnot support Network Traffic Stats");
HttpEntity responseEntity = response.getEntity();
if (responseEntity != null) {
responseEntity.consumeContent();
Log.d(LOG_TAG, "HTTP Post Response " + response.getEntity().getContent().toString() );
}
client.getConnectionManager().shutdown();
}
```
EDIT 2: Based on the results reported by this tool it looks like the SD card read speed is not an issue. So it may either be the HttpClient library or something else.


|
HTTP Vs Vanilla sockets for uploading large binary file (50-200 MB) from Android device over a single hop Wi-Fi Network
|
CC BY-SA 2.5
| 0 |
2011-04-05T04:03:15.657
|
2011-04-05T15:18:26.760
|
2011-04-05T15:18:26.760
| 306,346 | 306,346 |
[
"android",
"performance",
"http",
"sockets",
"cherrypy"
] |
5,547,198 | 1 | null | null | 0 | 4,244 |
I'm developing a Sencha Touch application. I'm currently trying to get a SelectField to be populated by store.
The code for my store is:
```
var store_Blocks = new Ext.data.JsonStore({
model: 'Blocks',
proxy: {
type: 'ajax',
url: '/search-blocks',
},
autoLoad: false,
remoteFilter: true,
listeners: {
load: function(store, records, success) {
Ext.getCmp('selectfield_Blocks').setDisabled(false);
}
}
});
```
The code for my select field is:
```
{
id: 'selectfield_Blocks',
xtype: 'selectfield',
name: 'block',
label: 'Block number',
disabled: true,
store: store_Blocks,
listeners: {
change: function(selectfield, block) {
...
}
}
}
```
This select field is inside a floating panel. Every time I show() the floating panel, my store updates itself. As such, the select field also becomes updated. However, this works only the first time when I show() the panel. The subsequent times I show() the floating panel, the selectfield correctly shows the updated data, but the picker that shows up when I click the selectfield is not correctly resized. It is sized according to how many rows of data there was when the floating panel was first shown.
Below is a screenshot. The second time I click the selectfield, the picker panel does not resize to fit the content of the whole store.

|
How to resize a Sencha Touch selectfield's picker after the store has been updated?
|
CC BY-SA 2.5
| null |
2011-04-05T04:26:52.957
|
2012-01-02T09:46:29.120
|
2011-04-05T04:43:45.400
| 560,318 | 560,318 |
[
"resize",
"sencha-touch",
"extjs"
] |
5,547,249 | 1 | 6,645,769 | null | 2 | 176 |
Can someone tell me what might cause this white rectangle in the column to appear? Thanks.

Thanks!
EDIT: If i resize that table column it goes away.
|
NSTableView visual issue
|
CC BY-SA 2.5
| null |
2011-04-05T04:35:23.053
|
2011-07-11T04:32:44.407
| null | null | 635,064 |
[
"objective-c",
"cocoa",
"nstableview",
"nsscrollview",
"nstablecolumn"
] |
5,547,496 | 1 | null | null | 0 | 839 |
I'm having an extreme amount of difficulty in getting my PXListView and NSScrollView setup to work nicely.
Here's the gist of it:
I have a dashboard page that is to contain 2 PXListViews. One of them gets its data from Core Data, the other from an RSS Feed. Both of these are added to a superview and associated controller (I have modes other than Dashboard so this was the most efficient way).
This superview becomes the documentView for my NSScrollView.
I can get all of this to work nicely except with the RSS feed based List View.
I am getting the feed asynchronously so that it doesn't hold up the UI and once a feed has been received and the List View populated I have it automatically resize itself.
This all works great, however I then need to resize my Dashboard View in order to get the scrollbars up. So I send a notification which leads to an autosizeView method I created but it all goes to hell.
The two ListViews start to overlap and the contents of the top one end up in the bottom one. Screenshot below (red is the bounds rectangle, blue the frame of each Subview)
This is before calling autosizeView:
This is after calling it:

And for good measure, this is what it looks like if I resize the PXListViews and don't call the DashboardView's autosize method:

As you can see, it works fine as long as I don't call autosizeViews but then I don't get the scrollers happening. Here is my autosizeView method:
```
-(void)autosizeView
{
//Resize the view to accommodate all subviews
NSRect oldFrame = [[self view] frame];
CGFloat lastY = [_activityView frame].origin.y;
if (lastY < 0) {
CGFloat newHeight = oldFrame.size.height + (-lastY);
[[self view] setFrameSize:NSMakeSize(oldFrame.size.width, newHeight)];
}
}
```
I'm guessing this whole thing has something to do with the coordinates being mucked up when I resize the DashboardView, causing the origins of its subviews to go awry.
Any help will be greatly appreciated!!!
|
Resizing NSView to accommodate subviews
|
CC BY-SA 2.5
| 0 |
2011-04-05T05:13:26.470
|
2011-04-06T00:53:25.207
| null | null | 633,568 |
[
"objective-c",
"cocoa",
"nsscrollview"
] |
5,547,566 | 1 | 5,548,934 | null | 3 | 1,159 |
I am using this code. My problem is that it is not showing the point which is displayed in maps.google.com. I am using Google API for 2.1. I am following this [Google map link](http://mobiforge.com/developing/story/using-google-maps-android)
Check out the difference. You will notice in top left corner of garden.

Here my code is
```
package com.my.test;
public class MapsActivity extends MapActivity {
MapView mapView;
MapController mc;
GeoPoint p;
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
mapView = (MapView) findViewById(R.id.mapView);
LinearLayout zoomLayout = (LinearLayout)findViewById(R.id.zoom);
View zoomView = mapView.getZoomControls();
zoomLayout.addView(zoomView,
new LinearLayout.LayoutParams(
LayoutParams.WRAP_CONTENT,
LayoutParams.WRAP_CONTENT));
mapView.displayZoomControls(true);
mc = mapView.getController();
String coordinates[] = {"-6.23", "106.83"};
double lat = Double.parseDouble(coordinates[0]);
double lng = Double.parseDouble(coordinates[1]);
p = new GeoPoint(
(int) (lat * 1E6),
(int) (lng * 1E6));
mc.animateTo(p);
mc.setZoom(17);
mapView.invalidate();
}
@Override
protected boolean isRouteDisplayed() {
return false;
}
```
}
|
Why doesn't Google map show specific point on Android?
|
CC BY-SA 2.5
| 0 |
2011-04-05T05:23:25.583
|
2011-04-05T08:03:41.493
|
2011-04-05T06:09:34.050
| 11,995 | 486,139 |
[
"android",
"google-maps",
"android-emulator"
] |
5,547,850 | 1 | null | null | 1 | 972 |
Wakemate does an amazing job of auto-populating a users email address in a Feedback form in an iphone app. See here:
Does anyone know how to do this (with the caveat that we are using Facebook Connect for login)?

|
How do you auto-populate the email address on a feedback form in IOS?
|
CC BY-SA 2.5
| 0 |
2011-04-05T06:02:22.853
|
2013-06-28T19:59:14.677
|
2013-06-28T19:59:14.677
| 1,048,862 | 393,404 |
[
"iphone",
"email",
"email-address",
"auto-populate"
] |
5,547,982 | 1 | 5,551,494 | null | 2 | 1,149 |
I am building a small Silverlight application. In my application I need to draw lines, similar to what's shown in the attached image.
I understood that the best way to draw the arched connecting lines (green ones) would be with Bezier curves.
My question is, how do I animate the drawing of the lines (getting them to start from a starting (X,Y) coordinate, to the target ones)?
Attached Image:

|
Silverlight - animate Bezier curves line drawing?
|
CC BY-SA 3.0
| null |
2011-04-05T06:19:45.050
|
2017-02-01T23:26:00.850
|
2020-06-20T09:12:55.060
| -1 | 126,015 |
[
"animation",
"silverlight",
"bezier"
] |
5,548,121 | 1 | 5,548,223 | null | 13 | 25,968 |
I am doing a vlines plot in matplotlib and I have all my y values in the dataset as `>=0`. I want my y axis bottom most tick to read `0`, but instead, I get -500.
Here is the code:
```
#!/usr/bin/env python
import numpy as np
from matplotlib import pyplot as plt, dates as mdates
import datetime as dt, time
# Read the data and turn it into a numpy array
#store = map(lambda line: map(int, line.strip().split()), open(name + '.txt').readlines())
store = [
[1293606162197, 0, 0],
[1293605477994, 63, 0],
[1293605478057, 0, 0],
[1293605478072, 2735, 1249],
[1293606162213, 0, 0],
[1293606162229, 0, 0],
]
nstore = np.array(store)
# Get arrays of each columns in the store array
d = nstore[:,0]
y1 = nstore[:,1]
y2 = nstore[:,2]
# Get arrays of values to be passed to matplotlib
s = d / 1000
dts = map(dt.datetime.fromtimestamp, s)
fds = mdates.date2num(dts)
# new figure and subplot
fig = plt.figure()
ax = fig.add_subplot(111)
# Plot using vlines
ax.vlines(fds, [0], y1, 'red')
# set xaxis tick settings
ax.xaxis.set_major_locator(mdates.MinuteLocator())
ax.xaxis.set_major_formatter(mdates.DateFormatter('%m/%d %H:%M'))
for label in ax.xaxis.get_ticklabels():
label.set_rotation('vertical')
fig.subplots_adjust(bottom=.25)
# Set the y axis bottom limit to 0
ax.set_ylim(bottom=0) # <<- THIS DOES NOT SEEM TO BE WORKING
# Save the plot figure
fig.savefig('out.png')
```
and here is the plot I get:

Can anyone point to me what I am doing wrong? Also, if you can point me to the docs that have the details I need, that would be great. Thanks.
[Creating graph with date and time in axis labels with matplotlib](https://stackoverflow.com/questions/5498510/creating-graph-with-date-and-time-in-axis-labels-with-matplotlib)
|
minimum value of y axis is not being applied in matplotlib vlines plot
|
CC BY-SA 2.5
| 0 |
2011-04-05T06:37:34.577
|
2011-04-05T07:17:46.460
|
2017-05-23T12:32:26.040
| -1 | 151,048 |
[
"python",
"matplotlib"
] |
5,548,192 | 1 | 5,697,511 | null | 5 | 3,211 |
I'm trying to create a test Facebook app using a new dev account I've created but I'm stuck at the verification step.
When I go to [http://www.facebook.com/developers/createapp.php](http://www.facebook.com/developers/createapp.php), it keeps showing me this message:

I've done the mobile phone verification already. If i click on the link it says it's already verified:

I've tried log out/in but it keeps coming up with this. It did once show me a page that looked like it was ok, but then reverted back at the next refresh.
Frustrating.
Any idea?
p.s. I don't particularly want to hand out my credit card and it says so I assume both aren't needed, right?
|
Cannot create facebook app - Stuck in verification
|
CC BY-SA 2.5
| 0 |
2011-04-05T06:46:53.147
|
2012-03-25T07:04:13.017
| null | null | 192,705 |
[
"facebook"
] |
5,548,216 | 1 | 5,548,296 | null | 0 | 21,753 |
I want to develop an android application, that gets my current location thru GPS and displays me the nearby Shopping Malls and their Shops.
So for i have learned about [Location API](http://www.vogella.de/articles/AndroidLocationAPI/article.html) from vogella.de ..
Again i saw discussion [here](https://stackoverflow.com/questions/3145089/what-is-the-simplest-and-most-robust-way-to-get-the-users-current-location-in-an) about getting current location.
I got success in getting current location so far.
When i searched for such applications in itunes, i got two apps..
1st [ClipMobile](http://itunes.apple.com/ca/app/clip-mobile/id350896181?mt=8).
2nd [Armadealo Shopping](http://itunes.apple.com/app/armadealo-shopping/id335045255?mt=8)
I want to display this things in android. How can i start ? See the screenshots :
 
|
Locating nearby Shopping Malls and their Stores using GPS/Wifi in Android
|
CC BY-SA 2.5
| null |
2011-04-05T06:49:08.147
|
2011-08-08T08:11:06.027
|
2017-05-23T12:06:58.140
| -1 | 610,940 |
[
"android",
"android-layout",
"android-maps"
] |
5,548,349 | 1 | 5,552,126 | null | 0 | 253 |
I have the following test case controller setup in a codeigniter framework:
```
class Test extends Controller {
public function Test()
{
parent::Controller();
}
public function index($bla = ''){
echo $this->uri->segment(3) . '<br/>';
echo $bla . '<br/>';
$url = site_url('test') . '/index/' . rawurlencode('foo bar') . '/';
echo "<a href=\"$url\">click me</a>";
}
}
```
I would like `$bla` to echo 'foo bar', not 'foo_bar'. Regardless if I use rawurlencode, urlencode, or nothing at all, there is a '_' being inserted for the space character. I have confirmed the href for the anchor does include the %20 sign, so I don't understand why the string is being altered.
I have included two screen shots to illustrate the point, the first image shows when no argument is passed to the controller, the second is with the 'foo bar' passed to it. I just don't understand why 'foo%20bar' would be altered?


|
Where is this underscore coming from? I can only assume magic
|
CC BY-SA 2.5
| null |
2011-04-05T07:03:11.270
|
2012-11-04T21:18:36.760
| null | null | 614,112 |
[
"php",
"url",
"codeigniter"
] |
5,548,388 | 1 | 5,548,405 | null | 1 | 598 |
SELECT
reporting.station
FROM
reporting
LEFT JOIN
channel
ON
MD5(igmpurl)=reporting.station
WHERE
reporting.station!="n/a"
ORDER BY
name;
resulting in this table:

Now I'd like to count the number of each element, which should something look like:

: I know about `COUNT(station)` which would return the number of the rows (20) but is what I want.
Any idea how to solve this in MySQL (InnoDB)?
Many thanks and regards
|
MySQL: Count certain values
|
CC BY-SA 2.5
| null |
2011-04-05T07:07:14.403
|
2011-04-05T07:33:48.283
| null | null | 146,003 |
[
"mysql",
"count"
] |
5,548,600 | 1 | 5,548,694 | null | 2 | 413 |
In my page I have three sections Header, Body and Footer.
In body I have three divs. First div includes another two small divs.
I wrote this CSS code:
```
#body_container{
margin: 10px 160px;
height: auto;
width: 100%;
clear: both;
border: 1px solid #3F0;
}
div.body_contents{
height: auto;
width: 74%;
float: left;
border: 1px solid #960;
}
div.sidebar{
height: auto;
width: 25%;
float: right;
border: 1px solid #F0F;
}
```
but when I check it, div is out of my frame. I gave 160px margin of left and right. what should i do?
Thanks

|
HTML, Nested Div problem
|
CC BY-SA 2.5
| 0 |
2011-04-05T07:32:26.957
|
2011-04-05T08:09:56.887
| null | null | 513,413 |
[
"html",
"nested"
] |
5,548,627 | 1 | null | null | 4 | 1,171 |
i bind an eventhandler to the focusout-event of my text-inputfield.
this handler hides a div with some searchresults as soon as the inputfield losts its focus.
following my markup and a screenshot of the situation:
```
<li class="search">
<input type="text" id="searchbox" />
<div id="results">
<ol>
<li>...</li>
</ol>
</div>
</li>
```

when the user clicks on a item in the searchresults now, the inputfield fires the focusout event as desired.
i expected to be able extracting the element which gets the focus as next out of the eventobject. unfortunatly this seems not to be possible since only (some) mouse-events fill in the relatedTarget-property of the event.
is there any easy way to get the element which gains focus next?
|
How can I find the element that caused another element to fire the focusout event?
|
CC BY-SA 3.0
| null |
2011-04-05T07:34:29.407
|
2011-11-01T12:20:37.997
|
2011-11-01T12:20:37.997
| 94,197 | 368,959 |
[
"javascript"
] |
5,548,775 | 1 | 5,549,466 | null | 1 | 81 |

Hey,
I have a big problem with my container-sketch. How can I realize this ? When I set the width from the two navigations (blue container) there are under the logo (red container). The two navigation will run across the screen, right next to the logo. If I resize the browser window, the two navigations should NOT slide under the logo. Has anybody a example for me ?
```
<html lang="en">
<head>
<meta charset="utf-8" />
<title>New</title>
<style type="text/css">
.logo {
float: left;
width: 260px;
height: 50px;
background: green;
}
.nav-main {
background: red;
}
.nav-sub {
background: blue;
}
</style>
</head>
<body>
<div class="header">
<div class="logo">
.logo
</div>
<div class="nav-main">
.nav-main
</div>
<div class="nav-sub">
.nav-sub
</div>
</div>
</body>
```
|
Container floating problem
|
CC BY-SA 2.5
| null |
2011-04-05T07:48:33.657
|
2011-04-05T08:59:48.630
|
2011-04-05T08:53:14.330
| 403,085 | 403,085 |
[
"html",
"css"
] |
5,548,858 | 1 | 5,548,928 | null | 3 | 3,120 |
I followed [this](http://developer.android.com/resources/tutorials/views/hello-tabwidget.html) example and got it worked.
Now I want to show a 'Welcome!!!' text just above the tabs in a [Tabhost](http://developer.android.com/reference/android/widget/TabHost.html) layout just like one show in figure

Here is my current layout file. But it does not show the Welcome message.
```
<?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:layout_width="fill_parent"
android:layout_height="fill_parent"
android:gravity="top"
android:layout_gravity="top"
android:padding="5dp">
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/cc_welcome" android:layout_width="fill_parent"
android:layout_height="wrap_content" android:text="Welcome"
android:gravity="top" android:padding="50dp" android:textColor="#ffffff"/>
</LinearLayout>
<LinearLayout
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:gravity="bottom"
android:layout_gravity="bottom"
android:paddingTop="50dp">
<TabWidget
android:id="@android:id/tabs"
android:layout_alignParentTop="true"
android:layout_width="fill_parent"
android:layout_height="wrap_content" />
<FrameLayout
android:id="@android:id/tabcontent"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:padding="5dp" />
</LinearLayout>
</TabHost>
```
|
Text at the top of Android Tab host layout
|
CC BY-SA 2.5
| 0 |
2011-04-05T07:56:40.887
|
2011-04-05T08:30:36.090
| null | null | 174,261 |
[
"android",
"android-layout",
"android-tabhost"
] |
5,549,060 | 1 | 5,549,250 | null | 0 | 163 |
After using this tool dating from 2002 the past years, I felt the need for an upgrade.
This tool checks simply the head of a url. Im would prefere a browser-indepentant software that works regardless of my Opera/Ie/Safari and as long as it works on windows 7. let alone on other browsers.
Any fast, snappy, independant tool doing similar like this, which might be less than eight years old, with bit more capabilities is an answer! Thanks for your suggestions.
[http://www.pc-tools.net/win32/viewhead/](http://www.pc-tools.net/win32/viewhead/)

|
Any Independent Tools to check HTTP Headers
|
CC BY-SA 3.0
| 0 |
2011-04-05T08:18:17.940
|
2011-04-11T21:27:47.237
|
2011-04-11T21:27:47.237
| 120,163 | 509,670 |
[
"debugging",
"http",
"http-headers"
] |
5,549,397 | 1 | 5,562,789 | null | 3 | 7,126 |
I want to create a chart in SSRS. My data contains timestamps when a state changes from 1 to 0, or vice versa:
```
Date Value
3/31/2011 4:44:38 PM 1
4/4/2011 2:35:43 PM 0
4/4/2011 3:05:09 PM 1
4/4/2011 5:57:10 PM 0
4/4/2011 7:08:29 PM 1
4/4/2011 7:22:03 PM 0
4/4/2011 9:00:32 PM 1
...
```
I'd like the X Axis for the chart to show the full date range (which it does) and then show the data as a stepped line showing when the state changes from one to another. The problem is, SSRS doesn't treat the x axis as a date range and plot the values relatively- it seems to just treat each data point as a simple date-unaware plot for the chart. At the moment I get this:

But what I want is something where the data points are plotted relative to their datestamp - this would give you an indication of how long the state was either 1 or 0 - kind of like this poor mockup (the black line is what I want instead of the blue line):

Is this possible?
|
SSRS Chart with Date Axis
|
CC BY-SA 2.5
| null |
2011-04-05T08:51:57.573
|
2012-03-19T20:03:11.307
|
2011-04-05T09:26:20.313
| 24,109 | 24,109 |
[
"ssrs-2008",
"reporting-services"
] |
5,549,852 | 1 | 5,552,449 | null | 0 | 533 |
I would like to design an iPad app like the image in attach:
This application is done arround a UISplitViewController composed of:
- A ViewController or NavigationController on the left
- Another NavigationController on the right (detail).
The application is woking fine except that i see rounded corners betweens the 2 sides of the UISplitViewController...
What is the solution to have my app working as the app in copy ?

|
UISplitViewController without any visible separators and rounded corners
|
CC BY-SA 2.5
| null |
2011-04-05T09:32:16.837
|
2011-04-05T13:16:22.647
| null | null | 316,994 |
[
"ipad",
"uisplitviewcontroller"
] |
5,550,050 | 1 | 5,550,732 | null | 0 | 360 |
I have a jQuery tab, where I need to add an image.

So When a tab is selected it looks like

This is being achieved by the following code:
```
$(".ui-state-active").css("background-image", "url('/Content/images/tab-over.png')");
$('#tabs .tab-menu li a').click(function() {
$('#tabs .tab-menu li').css("background-image", "none");
$(this).parent().css("background-image", "url('/Content/images/tab-over.png')");
});
```
It works fine expect that in the first line of code I want to remove that class () and add my own class. How can that be done ? Here is my tab code:
```
<ul class="tab-menu">
<li><a href="<%= Url.Action("GetCoreTab", "Tab") %>" class="a"><b>
<div id="home" class="menu">
</div>
</b></a></li>
<li><a href="<%= Url.Action("GetCustomerInformationTab", "Tab") %>" class="a"><b>
<div id="customer-information" class="menu">
</div>
</b></a></li>
<li><a href="<%= Url.Action("GetRatesAndChargesTab", "Tab") %>" class="a"><b>
<div id="rates-and-charges" class="menu">
</div>
</b></a></li>
<li><a href="<%= Url.Action("GetPaymentsAndVouchersTab", "Tab") %>" class="a"><b>
<div id="payments-and-vouchers" class="menu">
</div>
</b></a></li>
<li><a href="<%= Url.Action("GetDeliveryAndCollectionTab", "Tab") %>" class="a"><b>
<div id="delivery-and-collection" class="menu">
</div>
</b></a></li>
<li><a href="<%= Url.Action("GetGeneralTab", "Tab") %>" class="a"><b>
<div id="general" class="menu">
</div>
</b></a></li>
<li><a href="<%= Url.Action("GetEquipmentAndOtherDriversTab", "Tab") %>" class="a">
<b>
<div id="equipment-and-other-drivers" class="menu">
</div>
</b></a></li>
<li><a href="<%= Url.Action("GetCustomerPreferencesTab", "Tab") %>" class="a"><b>
<div id="customer-preferences" class="menu">
</div>
</b></a></li>
<li><a href="<%= Url.Action("GetCustomerStatisticsTab", "Tab") %>" class="a"><b>
<div id="customer-statistics" class="menu">
</div>
</b></a></li>
</ul>
```
Any help is appreciated.
Thanks.
|
How to add a image to the default selected JQuery tab by adding a class?
|
CC BY-SA 2.5
| null |
2011-04-05T09:52:44.333
|
2011-04-05T10:58:36.063
|
2020-06-20T09:12:55.060
| -1 | 350,648 |
[
"asp.net-mvc-2",
"jquery-ui",
"jquery-tabs"
] |
5,550,113 | 1 | null | null | 2 | 1,485 |
I have got a problem with finding the corresponding points in multiple views of the same calibration artifact.
Below you can see exemplary images of the calibration target.


I need to sort 2D coordinates of all circular markers and assure that corresponding (the same) markers in all views have the same index in markers' vectors.
Can anyone give me a clue how to deal with such a thing?
Many Thanks.
|
Sorting 2D coordinates
|
CC BY-SA 2.5
| null |
2011-04-05T09:58:26.473
|
2011-04-07T05:47:52.130
|
2011-04-07T05:47:52.130
| 295,643 | 295,643 |
[
"opencv",
"computer-vision"
] |
5,550,467 | 1 | 5,551,187 | null | 4 | 1,990 |
On "newer" Windows systems there is an option to make the OS draw a shadow beneath the mouse cursor:

However the custom cursors in my Delphi app don't show a shadow even if this setting is enabled. Do you have any idea how to arrange it so that Windows adds the shadow automagically? Or do I really have to check the user's preferences and conditionally draw the shadow myself like [Mike Lischke did](http://groups.google.com/group/borland.public.delphi.winapi/msg/4609977395fa1426)?
(This is a question that has been bugging me and others for some time:
- [Custom mouse cursor shadow](https://forums.embarcadero.com/thread.jspa?threadID=51934)- [Custom cursor shadow](http://groups.google.com/group/borland.public.delphi.winapi/browse_frm/thread/84f66465c8cb6f7f/a8a55286eabc16d1?#a8a55286eabc16d1)- [Custom cursor with shadow](https://groups.google.com/group/borland.public.delphi.language.delphi.win32/browse_frm/thread/539ca18781b7fc66/04c719a4241d4141?hl=de%04c719a4241d4141)
|
Shadow for custom mouse cursor
|
CC BY-SA 2.5
| 0 |
2011-04-05T10:33:56.653
|
2022-03-16T15:07:55.323
|
2022-03-16T15:07:55.323
| 4,294,399 | 1,431,618 |
[
"windows",
"delphi",
"shadow",
"mouse-cursor"
] |
5,550,532 | 1 | 5,550,978 | null | 2 | 1,446 |
I am testing the example given on [http://developer.android.com/resources/tutorials/notepad/notepad-ex1.html](http://developer.android.com/resources/tutorials/notepad/notepad-ex1.html).
I have followed the steps as mentioned in the tutorial. The application is successfully launched in the emulator

But when i click on the menu button error comes

When i check in eclipse console it does not show any error.
When i open DDMS perspective in eclipse and go to the File Explorer. Inside File Explorer when i go to the data/data/com.android.demo.notepad1/. I see two folders one showing 5120 size.
Under Log Cat following error is coming:
```
04-05 16:19:07.267: ERROR/AndroidRuntime(345): FATAL EXCEPTION: main
04-05 16:19:07.267: ERROR/AndroidRuntime(345): android.content.res.Resources$NotFoundException: String resource ID #0x7f040002
04-05 16:19:07.267: ERROR/AndroidRuntime(345): at android.content.res.Resources.getText(Resources.java:201)
04-05 16:19:07.267: ERROR/AndroidRuntime(345): at android.content.res.Resources.getString(Resources.java:254)
04-05 16:19:07.267: ERROR/AndroidRuntime(345): at com.android.internal.view.menu.MenuBuilder.add(MenuBuilder.java:397)
04-05 16:19:07.267: ERROR/AndroidRuntime(345): at com.android.demo.notepad1.Notepadv1.onCreateOptionsMenu(Notepadv1.java:45)
04-05 16:19:07.267: ERROR/AndroidRuntime(345): at android.app.Activity.onCreatePanelMenu(Activity.java:2158)
04-05 16:19:07.267: ERROR/AndroidRuntime(345): at com.android.internal.policy.impl.PhoneWindow.preparePanel(PhoneWindow.java:323)
04-05 16:19:07.267: ERROR/AndroidRuntime(345): at com.android.internal.policy.impl.PhoneWindow.onKeyDownPanel(PhoneWindow.java:568)
04-05 16:19:07.267: ERROR/AndroidRuntime(345): at com.android.internal.policy.impl.PhoneWindow.onKeyDown(PhoneWindow.java:1210)
04-05 16:19:07.267: ERROR/AndroidRuntime(345): at com.android.internal.policy.impl.PhoneWindow$DecorView.dispatchKeyEvent(PhoneWindow.java:1668)
04-05 16:19:07.267: ERROR/AndroidRuntime(345): at android.view.ViewRoot.deliverKeyEventToViewHierarchy(ViewRoot.java:2560)
04-05 16:19:07.267: ERROR/AndroidRuntime(345): at android.view.ViewRoot.handleFinishedEvent(ViewRoot.java:2535)
04-05 16:19:07.267: ERROR/AndroidRuntime(345): at android.view.ViewRoot.handleMessage(ViewRoot.java:1867)
04-05 16:19:07.267: ERROR/AndroidRuntime(345): at android.os.Handler.dispatchMessage(Handler.java:99)
04-05 16:19:07.267: ERROR/AndroidRuntime(345): at android.os.Looper.loop(Looper.java:123)
04-05 16:19:07.267: ERROR/AndroidRuntime(345): at android.app.ActivityThread.main(ActivityThread.java:3683)
04-05 16:19:07.267: ERROR/AndroidRuntime(345): at java.lang.reflect.Method.invokeNative(Native Method)
04-05 16:19:07.267: ERROR/AndroidRuntime(345): at java.lang.reflect.Method.invoke(Method.java:507)
04-05 16:19:07.267: ERROR/AndroidRuntime(345): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
04-05 16:19:07.267: ERROR/AndroidRuntime(345): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
04-05 16:19:07.267: ERROR/AndroidRuntime(345): at dalvik.system.NativeStart.main(Native Method)
04-05 16:19:07.366: WARN/ActivityManager(67): Force finishing activity com.android.demo.notepad1/.Notepadv1
04-05 16:19:07.926: WARN/ActivityManager(67): Activity pause timeout for HistoryRecord{405525f0 com.android.demo.notepad1/.Notepadv1}
04-05 16:19:19.540: WARN/ActivityManager(67): Activity destroy timeout for HistoryRecord{405525f0 com.android.demo.notepad1/.Notepadv1}
04-05 16:20:39.455: DEBUG/SntpClient(67): request time failed: java.net.SocketException: Address family not supported by protocol
04-05 16:24:11.534: INFO/Process(345): Sending signal. PID: 345 SIG: 9
04-05 16:24:12.428: ERROR/InputDispatcher(67): channel '406a5ed8 com.android.demo.notepad1/com.android.demo.notepad1.Notepadv1 (server)' ~ Consumer closed input channel or an error occurred. events=0x8
04-05 16:24:12.468: ERROR/InputDispatcher(67): channel '406a5ed8 com.android.demo.notepad1/com.android.demo.notepad1.Notepadv1 (server)' ~ Channel is unrecoverably broken and will be disposed!
04-05 16:24:12.572: INFO/ActivityManager(67): Process com.android.demo.notepad1 (pid 345) has died.
04-05 16:24:12.719: INFO/WindowManager(67): WIN DEATH: Window{406a5ed8 com.android.demo.notepad1/com.android.demo.notepad1.Notepadv1 paused=false}
```
Please help me trace out the reason for such error
Thanks
Pankaj
|
Error while executing notepad example
|
CC BY-SA 2.5
| null |
2011-04-05T10:40:13.697
|
2011-06-29T02:26:36.290
|
2011-04-05T10:58:31.153
| 146,192 | 146,192 |
[
"android",
"notepad"
] |
5,550,763 | 1 | 5,550,870 | null | 0 | 562 |
> Company -----> CompanyVenue <------
Venue
I can currently add a Venues to a Companies and Companies to Venues.

The Add Venue link takes the user to this view: (using this controller logic):
```
var venue = context.Companies.Select(x => x.Venues.Where(xy => xy.VenueId == id));
var company = venue.Select(x => x.);
ViewData["CompanyFor"] = company;
ViewData["VenueFor"] = venue;
```

Once the User Selects the Venue and Clicks the Button, it passes the ViewModel back to Controller:
```
Company c = context.Companies.Single(x => x.CompanyId == model.CompanyId);
Venue v = context.Venues.Single(x => x.VenueId == model.VenueId);
c.Venues.Add(v);
context.SaveChanges();
```
---
So That is how I implimented the Many-Many Add. But, I Am looking for some help with Controller Code / View (If Needed) / Possibly A View Model (but don't really see the need for what is essential a simple action)
In the Company Details View I am trying to get underneath each Venue Item to Remove the [CompanyVenue] (many2many) Relationship.
If it is possible to pass 2 Values instead of one using this type of ActionLink():
```
@Html.ActionLink("Remove", "VenueRemove", new { Id = venue.VenueId }, new { Cid = model.CompanyId } )
```
it would be easy, but I have not figured out a way (load method) to pass both Values ( Id & Cid ) back to a VenueRemove() Controller Action, that would then return a RedirectToAction() back to the Company Details view.
(Thank You Darin for the awnser to that)
I went ahead and got the Remove Working Using a View.
But is there anyway to get the Remove to work by just clicking the REMOVE Link/button and have it remove the venue with out going to the view?
Maybe an AJAX request or something.... ???
|
MVC 3 - Entity Framework & POCO - Many to Many REMOVAL on ActionLink()
|
CC BY-SA 2.5
| 0 |
2011-04-05T11:00:56.270
|
2011-04-05T12:45:33.530
|
2011-04-05T12:45:33.530
| 612,699 | 612,699 |
[
"entity-framework",
"asp.net-mvc-3",
"many-to-many",
"html.actionlink"
] |
5,550,918 | 1 | 5,553,297 | null | 0 | 2,446 |
i try to use effective caching but i face to face a problem. For example; i have 5 user they have used my app. user1,2,3,4 only fill grid by searcing(Caching is run!!!). on the other hand user5 adding new row. i want to refresh my cach data when adding new row. i read Multi threading to do that
### My Scenario:
LOOK please :[http://i53.tinypic.com/20pdc41.png](http://i53.tinypic.com/20pdc41.png)

i really control if another user change my data, i must refresh my cache. is there any sensitivity to CAPTURE any new changing update new row save. for example :
1) i must capture new update . this mechanizm must run when changes occurs
2) i must capture new save. this mechanizm must run when new row adds
|
How to use effective caching in .NET?
|
CC BY-SA 2.5
| 0 |
2011-04-05T11:15:25.037
|
2011-04-06T14:58:42.190
| null | null | 298,875 |
[
"c#",
".net",
"visual-studio",
"multithreading",
"caching"
] |
5,550,936 | 1 | 5,551,166 | null | 1 | 1,822 |
I'm looking to start building an iPhone app and I was wondering if it was possible to create dynamic lighting/shadows using the Cocos2d/Box2D combo? I have worked with these before and would like to stay with them. I would like the lighting to update dynamically as the player moves around.
An example of the desired effect is:

Found at [http://blog.flash-core.com/?p=135](http://blog.flash-core.com/?p=135)
Thanks,Andy
|
Cocos2d & Box2d dynamic lighting and shadows
|
CC BY-SA 2.5
| 0 |
2011-04-05T11:16:43.297
|
2011-04-05T11:36:43.547
| null | null | 608,290 |
[
"iphone",
"objective-c",
"cocos2d-iphone",
"box2d",
"lighting"
] |
5,551,383 | 1 | 5,551,549 | null | 7 | 1,956 |
Consider the following class and interfaces:
```
public interface A { string Property { get; set; } }
public interface B { string Property { get; set; } }
public interface C : A, B { }
public class MyClass : C
{
public string Property { get; set; }
}
```
Looks simple, right? Now consider the following program:
```
static void Main(string[] args)
{
MyClass myClass = new MyClass();
myClass.Property = "Test";
A aTest = myClass;
B bTest = myClass;
C cTest = myClass;
aTest.Property = "aTest";
System.Console.WriteLine(aTest.Property);
bTest.Property = "bTest";
System.Console.WriteLine(bTest.Property);
cTest.Property = "cTest";
System.Console.WriteLine(cTest.Property);
System.Console.ReadKey();
}
```
Looks okay, but it will not compile. It gives me an Ambiguity exception:

Why isn't C# able to figure this out? Is what I'm doing crazy from an architectural point of view? I'm trying to understand the (I know it can be solved with casting).
The problems arose when I introduced interface `C`. When I use `MyClass : A, B` I've got no problems at all.
Just finised a blog about the subject: [Interface Ambiguity and Implicit Implementation](http://keestalkstech.blogspot.com/2011/04/interface-ambiguity-and-implicit.html).
|
Why can't .Net / C# understand interface inheritance with properties of the same name?
|
CC BY-SA 3.0
| 0 |
2011-04-05T11:55:36.147
|
2011-04-08T11:32:40.173
|
2011-04-08T11:32:40.173
| 201,482 | 201,482 |
[
"c#",
".net",
"inheritance",
"interface",
"ambiguity"
] |
5,551,608 | 1 | null | null | -2 | 303 |
I´m struggling with a loopslider (sliding portfolio) on my page
It works perfectly but Google Chrome is loading this pop-up error window :
And seems to be Firefox is doing it to

This is the url to my page[enter link description here](http://www.nicejob.is/new)
Any suggestions what the problem might be?
|
CSS: Chrome and Firefox return "undefined" error window
|
CC BY-SA 2.5
| null |
2011-04-05T12:14:13.500
|
2011-04-05T12:18:22.247
| null | null | 673,329 |
[
"css",
"slider"
] |
5,551,766 | 1 | 5,552,190 | null | 1 | 5,685 |
Below are the object types I have. Basically I have a person table and a child table as a nested table of person table.
I have a School table with a M:N Relationship with child table (nested). So I'm creating a intermediate table to insert child_school data.

```
create type school_t as object(
sid number(5,2),
name varchar(20))
/
create type child_t as object(
cid number(5,2),
name varchar(20))
/
create type childtable_t as table of child_t
/
create type person_t as object(
pid number(5,2),
name varchar(20),
child childtable_t)
/
create table person_tab of person_t(
pid primary key
)nested table child store as child_table
/
create table school_tab of school_t
/
```
--there's some problem. Below does not work.
```
create type school_child_t as object(
cid ref person_t,
sid ref school_t)
/
create table school_child_tab of school_child_t(
cid references person_tab,
sid references school_tab
)
/
```
## --Here's what I want to do
```
create table school_child_tab(
cid number(5,2) references childtable_t,
sid number(5,2) references school_tab
)
/
```
cid reference should be the cid in nested table. The problem is referring it.
|
Referring a nested table in a relational insert query
|
CC BY-SA 2.5
| null |
2011-04-05T12:25:47.030
|
2011-04-05T14:21:42.080
|
2011-04-05T14:06:13.813
| 340,046 | 340,046 |
[
"sql",
"oracle",
"nested-table"
] |
5,552,188 | 1 | 5,552,816 | null | 0 | 42 |
i am streching my hairs in understanding customcell implemention from [this](https://i.stack.imgur.com/AMcgf.png)
[1](https://i.stack.imgur.com/AMcgf.png): [http://b00gizm.posterous.com/customizing-table-view-cells-for-fancy-user-i](http://b00gizm.posterous.com/customizing-table-view-cells-for-fancy-user-i) tutorial.
i am also attaching the part where i am stuffing
what is this textfieldcell.h doing here in classoutlets.
Please guide!!
|
class outlets not able to understand
|
CC BY-SA 2.5
| null |
2011-04-05T12:57:27.593
|
2011-04-05T13:42:54.627
| null | null | 490,953 |
[
"iphone"
] |
5,552,292 | 1 | 5,567,241 | null | 23 | 64,258 |
I have an RDLC file in which I want to make an expression.
Here is the image of properties of expression. I need to concatenate First Name, Last name and Middle Init.

|
How to concatenate values in RDLC expression?
|
CC BY-SA 3.0
| 0 |
2011-04-05T13:04:36.993
|
2017-03-05T14:48:27.367
|
2017-03-05T14:48:27.367
| 1,033,581 | 669,448 |
[
"asp.net",
"dataset",
"reporting",
"field",
"rdlc"
] |
5,552,535 | 1 | 5,555,220 | null | 2 | 4,760 |
I have created hundreds of project on VS 2010 but "File > Recent Projects and Solutions" section is not there ! normally, it should have been like this

but mine is like below;

as you can see, also on the start page, there is only two project on the 'Recent Projects' section which is odd given the circumstances.
what should I do here to get it worked?
Thanks in advance for your help.
here is how customize window looks;

and here is the regedit view;

|
Visual Studio 2010, "File > Recent Projects and Solutions" is not a active !
|
CC BY-SA 2.5
| null |
2011-04-05T13:21:38.793
|
2013-11-12T08:41:39.090
|
2011-04-05T16:56:07.763
| 463,785 | 463,785 |
[
"visual-studio",
"visual-studio-2010",
"ide"
] |
5,552,579 | 1 | null | null | 0 | 460 |
I'm following a video tutorial (not available online) for installing Python and setting it up to use with Eclipse (text editor). To configure Eclipse to use Python, he adds the Python interpreter. In his movie, the python interpreter is a file `python.exe`.
However, when I'm browsing through my folder in Python, I don't see a file named python.exe. This (see image) is what I have instead.
1) which of these files do I click on to install the interpreter? or have I done something wrong and the correct file isn't here?
Thanks for your help.

|
setting up Python interpreter
|
CC BY-SA 2.5
| null |
2011-04-05T13:25:23.667
|
2011-06-20T14:55:02.967
|
2011-04-06T14:24:57.183
| 577,455 | 577,455 |
[
"python"
] |
5,552,891 | 1 | 5,561,241 | null | 4 | 6,211 |
Is there a way to set the Author property to a PDF document by setting a parameter when calling Jasper from Java.

This is how I generate a Jasper report from Java.
```
JasperPrint jasperPrint;
String outFile = "39285923953222.pdf";
HashMap hm = new HashMap();
hm.put("ID",id);
hm.put("FOOTER",Constants.FOOTER); // Set somehow a string for the author name
Session session = this.sessionFactory.openSession();
Connection con = session.connection();
jasperPrint = JasperFillManager.fillReport(jasperPath + "myReport.jasper", hm, con);
JasperExportManager.exportReportToPdfFile(jasperPrint, outPath + outFile);
```
|
Jasper Report - Set Author property in a PDF document
|
CC BY-SA 2.5
| 0 |
2011-04-05T13:47:58.487
|
2015-06-12T09:33:39.750
| null | null | 222,159 |
[
"java",
"pdf",
"jasper-reports"
] |
5,552,932 | 1 | null | null | 2 | 2,709 |
My program is sucking up a meg every few seconds. I read that python doesn't see curors in garbage collection, so I have a feeling that I might be doing something wrong with my use of `pydbc` and `sqlalchemy` and maybe not closing something somwhere?
```
#Set up SQL Connection
def connect():
conn_string = 'DRIVER={FreeTDS};Server=...;Database=...;UID=...;PWD=...'
return pyodbc.connect(conn_string)
metadata = MetaData()
e = create_engine('mssql://', creator=connect)
c = e.connect()
metadata.bind = c
log_table = Table('Log', metadata, autoload=True)
...
atexit.register(cleanup)
#Core Loop
line_c = 0
inserts = []
insert_size = 2000
while True:
#line = sys.stdin.readline()
line = reader.readline()
line_c +=1
m = line_regex.match(line)
if m:
fields = m.groupdict()
...
inserts.append(fields)
if line_c >= insert_size:
c.execute(log_table.insert(), inserts)
line_c = 0
inserts = []
```
Should I maybe move the metadata block or part of it to the insert block and close the connection each insert?
Q: Does it every stabilize?

A: Only if you count Linux blowing away the process :-) (Graph does exclude Buffers/Cache from Memory Usage)
|
SQLAlchemy Misuse Causing Memory Leak?
|
CC BY-SA 2.5
| null |
2011-04-05T13:50:46.887
|
2011-04-05T14:23:06.310
|
2020-06-20T09:12:55.060
| -1 | 107,156 |
[
"python",
"memory-leaks",
"sqlalchemy",
"pyodbc"
] |
5,553,000 | 1 | 5,553,952 | null | 1 | 762 |
I have a question about [ListField](http://www.blackberry.com/developers/docs/4.5.0api/net/rim/device/api/ui/component/ListField.html#setSize%28int%29):
If I call then I indicate, how many items this component contains. How do I control the of this component then?
For example I use the code below to display a TextField and a ListField below, but I also would like to show a ButtonField underneath the ListField:

```
private MyList presetList = new MyList();
private MyScreen() {
setTitle("Favorites");
BasicFilteredList filterList = new BasicFilteredList();
String[] days = {"Monday","Tuesday","Wednesday",
"Thursday","Friday","Saturday","Sunday"};
int uniqueID = 0;
filterList.addDataSet(uniqueID,days,"days",BasicFilteredList.COMPARISON_IGNORE_CASE);
AutoCompleteField autoCompleteField = new AutoCompleteField(filterList);
add(autoCompleteField);
presetListField.setRowHeight(-2);
presetListField.setCallback(presetList);
presetListField.setSize(MyList.items.length());
add(presetListField);
}
```
```
public class MyList implements ListFieldCallback {
public static String items[] = {
"Favorite 01", "Favorite 02", "Favorite 03", "Favorite 04",
"Favorite 11", "Favorite 12", "Favorite 13", "Favorite 14",
"Favorite 21", "Favorite 22", "Favorite 23", "Favorite 24",
"Favorite 31", "Favorite 32", "Favorite 33", "Favorite 34"
};
public void drawListRow(ListField listField, Graphics g, int index, int y, int width) {
Font f = g.getFont();
Font b = f.derive(Font.BOLD, f.getHeight() * 2);
g.setColor(Color.WHITE);
g.drawText(items[index], Display.getWidth()/3, y);
g.drawText("Click to get frequency", Display.getWidth()/3, y + g.getFont().getHeight());
g.setFont(b);
g.setColor(Color.YELLOW);
g.drawText("100." + index, 0, y);
}
public Object get(ListField list, int index) {
return items[index];
}
public int indexOfList(ListField list, String p, int s) {
return -1;
}
public int getPreferredWidth(ListField list) {
return Display.getWidth();
}
}
```
Thank you!
Alex
Maybe ListField is supposed to always show all its items and you can't limit its view to few rows?
|
Blackberry 6: ListField - limit the number of displayed rows?
|
CC BY-SA 2.5
| null |
2011-04-05T13:54:37.647
|
2011-04-05T18:36:08.383
|
2011-04-05T16:14:52.817
| 165,071 | 165,071 |
[
"blackberry",
"listfield"
] |
5,553,126 | 1 | 5,587,394 | null | 1 | 633 |
I'm building a voice application that requires a long period of ringing while my application attempts to setup an outbound call. During this time, the call must remain unanswered.
I'm using a SIP based Genesys GVP 8.1 IVR connected to a media gateway.
The problem I have is because the call is unanswered, it times out after 30 seconds. I need to send some kind of keep-alive message to the media gateway to say that the call is still ongoing.
I've tried using this:
```
<send target="inConnectionID" targettype="'x-connection'" data="'connection.progressing'"/>
```
which will generate a 180 Ringing... but I've already sent a 180 Ringing message, and I think the SIP Server doesn't pass this on down the network because it's already processed a 180 message.
Ideally, I want to try sending a 182 Queued message, but I can't find anything in the CCXML or extended GVP CCXML documentation to say how to do this.
My Wireshark SIP trace looks like this:

You can see the second 180 Ringing at 24 seconds isn't being passed up to the media gateway.
How can I get GVP/CCXML to send a 182 Queued SIP message?
|
How can I send a 182 Queued SIP message from CCXML?
|
CC BY-SA 2.5
| null |
2011-04-05T14:02:45.330
|
2011-07-29T20:55:52.310
| null | null | 180,215 |
[
"sip",
"ccxml"
] |
5,553,200 | 1 | null | null | 0 | 433 |
I am having a little problem here. I have an NSCollectionView with a collection of views which have an NSTextField that shows fontnames in those fonts. Here is a screenshot:

As you can see, some fonts look glitched, they have their Interface Builder font-size behind them. I use this code to set the font size in `initWithFrame:` of the NSTextField:
```
float targetWidth = rect.size.width - 10;
float targetHeight = rect.size.height - 10;
int i;
for (i = 10; i < 100; i++) {
NSDictionary *attrs = [[NSDictionary alloc] initWithObjectsAndKeys:[NSFont fontWithName:[self.font fontName] size:i], NSFontAttributeName, nil];
NSSize strSize = [[self stringValue] sizeWithAttributes:attrs];
[attrs release];
if (strSize.width > targetWidth || strSize.height > targetHeight) {
break;
}
}
[self setFont:[NSFont fontWithName:[self.font fontName] size:(i - 1)]];
```
How can I fix this? It's looking terrible. Thanks in advance.
|
NSTextField with autosizing text looks terrible when in an NSCollectionView
|
CC BY-SA 2.5
| null |
2011-04-05T14:07:34.767
|
2011-04-05T15:34:20.527
| null | null | null |
[
"objective-c",
"cocoa",
"fonts",
"drawing",
"visual-glitch"
] |
5,553,917 | 1 | 5,554,207 | null | 12 | 8,155 |
I want to list all the dlls loaded by a process, like this:

How could I get the information with Python on Windows?
|
How to list all dlls loaded by a process with Python?
|
CC BY-SA 2.5
| 0 |
2011-04-05T14:55:59.710
|
2022-03-23T12:45:14.013
|
2020-06-20T09:12:55.060
| -1 | 325,241 |
[
"python",
"windows",
"dll"
] |
5,553,908 | 1 | 5,587,107 | null | 3 | 401 |
For some reason, after some days working with XCode4, it simply stopped showing the available value options for any properties under the 'Build Settings' configuration.
Let me show you:

As you can see, I'm not able to select the provisioning profile from all that it is installed under my machine. The very same happens to boolean values, and anything else.
Does anyone have any idea of what it's going on? Any configuration I must be doing on XCode4?
I tried reset all preferences (deleting the plist and caches), I uninstalled the whole Developer Tools and reinstalled. It hasn't solved anything.
What I'm saying is that, instead of showing a combobox with all available options for that property, it just shows a textbox for me to fulfill. What I want in the example above is to show all Provisioning Profiles that are installed, instead of having me wondering around what is the correct profile name/code and type there.
|
XCode4 not showing available options under Build Settings properties
|
CC BY-SA 2.5
| null |
2011-04-05T14:55:02.847
|
2011-04-07T20:19:30.503
|
2011-04-07T20:18:57.493
| 597,616 | 597,616 |
[
"iphone",
"xcode",
"xcode4"
] |
5,554,090 | 1 | 5,562,561 | null | 13 | 1,548 |
I'm using the Visiblox WPF API and am having trouble getting the chart points in my line chart to scroll horizontally. Instead of scrolling, the points are get squashed together, in which, this isn't particularly a problem, except that I expect to have 100s of data points on the chart. I have looked throughout the examples available on the Visiblox website, but couldn't find what I was looking for. Ive attached an example screenshot.
Any ideas?
Thanks for your help,
Sparky

|
VISIBLOX, WPF: Getting chart points to scroll horizontally?
|
CC BY-SA 2.5
| 0 |
2011-04-05T15:07:13.753
|
2011-11-25T08:36:01.050
| null | null | 492,153 |
[
"c#",
"wpf",
"xaml",
"charts",
"visiblox"
] |
5,554,113 | 1 | 5,567,676 | null | 0 | 1,653 |
I am trying to draw a border around two text boxes, which works if I leave background colour of the main screen alone. The client's spec's call for a colour scheme with a blue background. When the EditFields are drawn to the screen, they appear as one field that spans the screen. There are 2 since each gets focus when it's supposed two and everything works otherwise. The two EditFields are then added to a GridFieldManager to control the layout.
I am subclassing the EditFields and adding the border around each of the EXEditFields, like so:
```
public class EXEditField extends EditField {
...
private void init( MainScreen scrn ) {
if ( this.hasVirtualKeyboard() )
this.vkbd = scrn.getVirtualKeyboard();
this.setMaxSize( this.MAX_CHARS );
this.setBorder( BorderFactory.createRoundedBorder(new XYEdges(0,0,0,0), Border.STYLE_SOLID) );
this.setBackground( BackgroundFactory.createSolidBackground(Color.WHITE) );
//this.setPadding( 3, 3, 3, 3 );
//this.setMargin( 0, 3, 0, 3 );
}
...
} // end class
```
Any help is greatly appreciated since there is not much in the way good Blackberry reference docs.
|
Borders Around EditFields - Blackberry
|
CC BY-SA 3.0
| null |
2011-04-05T15:08:32.340
|
2013-09-19T04:47:57.537
|
2013-09-10T15:05:54.223
| 2,345,913 | 620,197 |
[
"blackberry",
"blackberry-editfield"
] |
5,554,109 | 1 | null | null | 2 | 1,544 |
I have a C# Windows Forms application which we originally wrote in VS2008 and have ported to VS2010. It has a binding between a object that we wrote with two date properties, bound to two datetime picker controls.
Here is the designer code, showing the bindings of one of the date time pickers; the other is identical except of course the name:
```
private System.Windows.Forms.DateTimePicker dtTradeDate;
this.dtTradeDate = new System.Windows.Forms.DateTimePicker();
//
// dtTradeDate
//
this.dtTradeDate.DataBindings.Add(new System.Windows.Forms.Binding("Value", this.bsWorkflowItem, "TradeDate", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
this.dtTradeDate.Format = System.Windows.Forms.DateTimePickerFormat.Short;
this.dtTradeDate.Location = new System.Drawing.Point(383, 43);
this.dtTradeDate.Name = "dtTradeDate";
this.dtTradeDate.Size = new System.Drawing.Size(99, 20);
this.dtTradeDate.TabIndex = 37;
```
The object properties are set up as get/set properties:
```
public DateTime TradeDate
{
get { return _tradeDate; }
set { _tradeDate = value; }
}
```
When the form starts up, we bind the binding source of the form to the object. You can see that I've added some explicit code to avoid the situation that is occurring below, but this has no effect:
```
//Initializing workflow item object
_wfItem = new CamraWorkflowItem(UserSession.User);
_wfItem.TradeDate = DateTime.Today;
_wfItem.EffectiveDate = DateTime.Today;
loading.IncrementLoadingSteps(2);
dtEffDate.Value = DateTime.Today;
dtTradeDate.Value = DateTime.Today;
bsWorkflowItem.DataSource = _wfItem;
```
Now here is the really, really strange part. This works perfectly well in VS2008 and also on two of my colleagues' VS2010 workstations. However it doesn't work on mine. When it hits the last line, I get the following exception:
> System.ArgumentOutOfRangeException
crossed a native/managed boundary
Message=Value of '1/1/0001 12:00:00
AM' is not valid for 'Value'. 'Value'
should be between 'MinDate' and
'MaxDate'. Parameter name: Value
Source=System.Windows.Forms
ParamName=Value StackTrace:
at System.Windows.Forms.DateTimePicker.set_Value(DateTime
value) InnerException:
I'm at a loss here. If I disconnect both of the bindings, it works fine but obviously I need the binding to update the object. Also strangely if I look at the values of both of these dates in the debugger (with the exception box showing) I see a valid date; see below:

The date values on the object are the same, so they clearly appear to be within the valid date range of the control.
This seems like a bug in Visual Studio... except it works on my colleagues' machines with the same version of .NET and Visual Studio. I've spent a day hacking at this and I'm at a loss... your help is greatly appreciated.
|
Visual Studio 2010: Binding Issues
|
CC BY-SA 2.5
| 0 |
2011-04-05T15:08:22.817
|
2011-04-05T16:30:05.210
|
2011-04-05T15:22:20.637
| 505,893 | 448,333 |
[
"c#",
"visual-studio-2010",
"data-binding"
] |
5,554,174 | 1 | 5,637,744 | null | 0 | 1,509 |
I can't seem to get my code to work the way I want. I'm attempting to format charts on a page with JSF templates. I'm using JSF2.0, NetBeans 6.9.1, GlassFish 3.0.1 with Mojarra 2.0.3, and PrimeFaces 2.2. For the template I am using . I have placed the charts into dashboard panels. The charts themselves show up, but I cannot modify their size, or display the piechart legends. I have put the the style and script tags, shown in the documentation and showcase, on the main template page where the other css references are located. I've used this code:
```
<style type="text/css">
.chartClass {
width: 250px;
height: 145px;
}
</style>
<script type="text/javascript">
var piechartStyle = {
padding:20,
legend: {
display: "right",
spacing:10
}
};
</script>
```
On the template client page, where I display the charts, this is the code I've used:
```
<ui:define name="main_base_content">
<h:form>
<p:dashboard id="board" model="#{dashboardBean.model}">
<p:panel id="receipts_chart" header="Receipts Chart" toggleable="true" toggleSpeed="200">
<p:pieChart model="#{receiptsChartBean.model}" styleClass="piechartStyle" />
</p:panel>
<p:panel id="shipments_chart" header="Shipments Chart" toggleable="true" toggleSpeed="200">
<p:pieChart model="#{shipmentsChartBean.model}" styleClass="piechartStyle" />
</p:panel>
<p:panel id="receipts_graph" header="Receipts Graph" toggleable="true" toggleSpeed="200">
<p:lineChart model="#{receiptsChartBean.lineModel}" var="line" titleX="Date" titleY="Number of Receipts">
<p:chartSeries label="Receipts" value="#{line.receipts}" />
</p:lineChart>
</p:panel>
<p:panel id="shipments_graph" header="Shipments Graph" toggleable="true" toggleSpeed="200">
<p:lineChart model="#{shipmentsChartBean.lineModel}" var="line" titleX="Date" titleY="Number of Shipments">
<p:chartSeries label="Receipts" value="#{line.receipts}" />
</p:lineChart>
</p:panel>
<p:panel id="volume_received_graph" header="Volume Received - Graph" toggleable="true" toggleSpeed="200">
<p:stackedColumnChart model="#{shipmentsChartBean.stackModel}" var="stack" titleX="Date" titleY="Receipts by Weight">
<p:chartSeries label="Customer1" value="#{stack.stackedShipments}" />
<p:chartSeries label="Customer2" value="#{stack.stackedShipments}" />
<p:chartSeries label="Customer3" value="#{stack.stackedShipments}" />
<p:chartSeries label="Customer4" value="#{stack.stackedShipments}" />
</p:stackedColumnChart>
</p:panel>
<p:panel id="weight_received_graph" header="Weight Received - Graph" toggleable="true" toggleSpeed="200">
<p:stackedColumnChart model="#{receiptsChartBean.stackModel}" var="stack" titleX="Date" titleY="Receipts by Weight">
<p:chartSeries label="Customer1" value="#{stack.stackedReceipts}" />
<p:chartSeries label="Customer2" value="#{stack.stackedReceipts2}" />
<p:chartSeries label="Customer3" value="#{stack.stackedReceipts3}" />
<p:chartSeries label="Customer4" value="#{stack.stackedReceipts4}" />
</p:stackedColumnChart>
</p:panel>
</p:dashboard>
</h:form>
</ui:define>
```
The charts are filled with dummy data. They display, but the skinning is not working. I looked at the page with Firebug and see that despite setting the width and height of charts to 250px and 145px respectively, they remain at the default values.

I'm not sure where I've gone wrong. Do charts not work in layouts and/or dashboards? Oh, I've also tried putting the .chartClass into the cssLayout.css document - that did not work either.
|
Chart Skinning Using p:layout and Dashboards
|
CC BY-SA 2.5
| null |
2011-04-05T15:14:13.850
|
2011-04-12T15:30:08.000
| null | null | 532,962 |
[
"jsf",
"primefaces"
] |
5,554,234 | 1 | 5,556,591 | null | 1 | 919 |
I'm working on a website that creates pdfs dynamically.
I've been playing around with two different pdf controls- [wpcubed](http://www.wpcubed.com/products/pdfcontrol/index.htm) and [abcpdf](http://www.websupergoo.com/abcpdf-1.htm), and was surprised to see that they both appear to render text differently.
wpCubed:

abcpdf:

They are both using arial 25pt bold, so I was expecting them to look identical. Can anyone explain why they don't.
Here are the full files: [wpCubed](http://www.box.net/shared/1c72oiaykl) , [abcpdf](http://www.box.net/shared/iq46pxcrgl)
|
PDF controls render text differently
|
CC BY-SA 2.5
| null |
2011-04-05T15:18:42.977
|
2011-04-06T15:55:18.387
|
2011-04-06T08:12:57.687
| 472,377 | 472,377 |
[
"vb.net",
"pdf"
] |
5,554,356 | 1 | 5,554,393 | null | 3 | 3,591 |
I would like to remove the extra zeros if they don't have any decimal values. But if they have, I would like to show them.

In the picture, I want to height the unnecessary 0 from the 10.00 and 20.00. But I want to show the other 3 records below.
I used c#, asp.net 4.0 and GridView to display .
|
Trim zeros in the decimal
|
CC BY-SA 2.5
| 0 |
2011-04-05T15:28:06.787
|
2011-04-05T16:40:39.737
| null | null | 296,074 |
[
"c#",
"asp.net",
"gridview",
"formatting"
] |
5,554,455 | 1 | 5,554,932 | null | 8 | 7,175 |
The only FXG editor I've seen for Flex is [by 7jigen, works online or as a Flex app](http://labs.7jigen.net/2010/05/15/fxg-editor-air-app/).
Does anyone know of a different one? It can be done in Illustrator I think, but that doesn't really offer a simple export to Flex type option, just gives coordinates.

|
FXG Editor for Flex
|
CC BY-SA 3.0
| 0 |
2011-04-05T15:35:06.620
|
2015-10-30T03:21:21.277
|
2015-10-30T03:16:38.590
| 880,772 | 271,012 |
[
"apache-flex",
"flex4",
"fxg"
] |
5,554,654 | 1 | null | null | 1 | 231 |
i am currently at college studying web design and devolpment, i am working on my portfolio and creating a website for someone, (unfinished) if you go to this link.
[http://www.mattwoodsfitnessandweightloss.co.uk/](http://www.mattwoodsfitnessandweightloss.co.uk/)
and randomly click a few links [ Home page / About / Our Studio ] multiple times etc you will notice the "about matt woods" sometimes jumps out of the table or completley dissapears all together, i didnt notice it on Firefox because it dosent happen but checked on IE and it seems to only happen on IE, its also happening on a friends IE so its not just mine.
here are some screenshots:


Can anyone help?
Cheers.
|
Image jumping out of table randomly on different loads?
|
CC BY-SA 2.5
| null |
2011-04-05T15:48:27.227
|
2011-06-08T10:57:13.970
|
2011-04-05T16:08:56.403
| 632,998 | 693,270 |
[
"html"
] |
5,554,677 | 1 | 5,554,727 | null | 3 | 107 |
Imagine you have two tables, with a one to many relationship.
For this example, I will suggest that there are two tables: Person, and Homes.
The person table holds a persons name, and gives them an ID. The homes table, holds the association of homes to a person. PID joins to "Person.ID"
And, in this tiny DB, a person can have no homes, or many homes.

Let's say these are valid "Types" in the homes table:
> Cottage, Main, Mansion, Spaceport.
I want to return everyone, in the Person table, who has a spaceport a Cottage.
The best I could come up with was this:
```
SELECT DISTINCT( p.name ) AS name
FROM person p
INNER JOIN homes h ON h.pid = p.id
WHERE 'spaceport' in (
SELECT DISTINCT( type ) AS type
FROM homes
WHERE pid = p.id
)
AND 'cottage' in (
SELECT DISTINCT( type ) AS type
FROM homes
WHERE pid = p.id
)
```
When I wrote that, it works, but I'm pretty sure there has to be a better way.
|
Better way to demand, in SQL, that a column contains every specified value
|
CC BY-SA 2.5
| null |
2011-04-05T15:49:49.957
|
2011-04-05T18:30:54.580
|
2011-04-05T17:49:09.163
| 475,735 | 475,735 |
[
"sql",
"select",
"one-to-many"
] |
5,554,682 | 1 | 12,283,909 | null | 62 | 89,828 |
: I solved this issue by using the method described in [this answer](https://stackoverflow.com/questions/2991110/android-how-to-stretch-an-image-to-the-screen-width-while-maintaining-aspect-rat)
I'm a bit stuck with this issue, which I think should be pretty simple.
So my app downloads an image, and renders the bitmap in an ImageView, a child element of a RelativeLayout.
I would like the ImageView to fit the parent width, and to adapt it's size to keep the aspect ratio.
Here is my XML :
```
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
>
<RelativeLayout android:id="@+id/banner" android:layout_width="fill_parent" android:layout_height="wrap_content"></RelativeLayout>
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/hello"
/>
</LinearLayout>
```
And the code :
```
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
RelativeLayout banner = (RelativeLayout) findViewById(R.id.banner);
ImageView imgV = new ImageView(this);
imgV.setScaleType(ImageView.ScaleType.CENTER_CROP);
// I tried all the scale types : CENTER_INSIDE : same effect, FIT_CENTER : same effect...
imgV.setBackgroundColor(0x00FFFF00);
imgV.setAdjustViewBounds(Color.BLUE);
RelativeLayout.LayoutParams params = new RelativeLayout.LayoutParams(RelativeLayout.LayoutParams.FILL_PARENT, RelativeLayout.LayoutParams.WRAP_CONTENT);
banner.addView(imgV,params);
// Some code downloading the image stream
bitmap = BitmapFactory.decodeStream(stream);
imgV.setImageBitmap(bitmap);
}
```


|
Android ImageView adjusting parent's height and fitting width
|
CC BY-SA 2.5
| 0 |
2011-04-05T15:50:10.243
|
2014-02-24T09:24:08.567
|
2017-05-23T11:33:14.057
| -1 | 183,904 |
[
"android",
"resize",
"imageview"
] |
5,554,784 | 1 | 5,559,538 | null | 2 | 3,025 |
I reinstalled Eclipse with pydev (2.0.0.2011040403) but the run configuration with "coverage" is missing from the debug and run menus. I am sure that option used to be there, how can I get it show up again?

|
Set up coverage configuration on pydev
|
CC BY-SA 2.5
| null |
2011-04-05T15:57:58.243
|
2011-04-05T22:57:04.843
| null | null | 188,368 |
[
"python",
"eclipse",
"code-coverage",
"pydev"
] |
5,554,907 | 1 | 5,554,986 | null | 2 | 4,216 |
Do you know why the [Luhn mod N algoritm](http://en.wikipedia.org/wiki/Luhn_mod_N_algorithm) in order to create the check digit performs a sum by doubling the value of each even placed char instead of perfoming a simple sum of all chars?
In pseudo-code words:
given:
```
var s = "some string i want to create check digit";
```
do you know why Luhn mod N does basically this:
```
for(i from s.length-1 to 0)
if(i is even)
checkdigit += chr2int(s[i]) * 2;
else
checkdigit += chr2int(s[i]);
```
instead of simply doing a sum
```
for(i from s.length-1 to 0)
checkdigit += chr2int(s[i]);
```
they can still both terminate with a `mod` operation to make the checkdigit fit into one char
```
return int2chr( chr2int('a') + (checkdigit mod 25) );
```
---

|
Checkdigit algorithm Luhn mod N vs simple sum
|
CC BY-SA 2.5
| 0 |
2011-04-05T16:07:58.400
|
2020-02-19T15:55:26.653
|
2011-04-05T18:07:48.423
| 260,080 | 260,080 |
[
"algorithm",
"checksum",
"check-digit"
] |
5,554,935 | 1 | 5,555,333 | null | 3 | 2,029 |
I get this error on the Chrome (10.0.648.204) console (see image):

So what I'm doing here is when the user submits the form, an image (preloaded) is inserted in a div (jQuery) and positioned on the button.
The image was preloaded in the HTML but is hidden (display:none).
When the visitor submits the form then the image is inserted AGAIN after the form submit started (so the animated gif dont stop).
Works perfectly in FF and IE, but not in Chrome 10
Any ideas what its happening here?
|
CHROME JS error: "GET http://localhost/loading.gif undefined (undefined)
|
CC BY-SA 2.5
| 0 |
2011-04-05T16:09:51.083
|
2011-04-06T06:48:55.837
|
2011-04-06T06:48:55.837
| 63,651 | 63,651 |
[
"javascript",
"jquery",
"google-chrome"
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.