Id
int64 1.68k
75.6M
| PostTypeId
int64 1
2
| AcceptedAnswerId
int64 1.7k
75.6M
⌀ | ParentId
int64 1.68k
75.6M
⌀ | Score
int64 -60
3.16k
| ViewCount
int64 8
2.68M
⌀ | Body
stringlengths 1
41.1k
| Title
stringlengths 14
150
⌀ | ContentLicense
stringclasses 3
values | FavoriteCount
int64 0
1
⌀ | CreationDate
stringlengths 23
23
| LastActivityDate
stringlengths 23
23
| LastEditDate
stringlengths 23
23
⌀ | LastEditorUserId
int64 -1
21.3M
⌀ | OwnerUserId
int64 1
21.3M
⌀ | Tags
list |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
4,418,163 | 1 | 4,418,201 | null | 5 | 4,767 | I am using the Javascript InfoVis SpaceTree. I have a tree that looks like the following:

However I want to select the 'NOW' node so that it highlights the path back to the root node but prevent this node from centering. i.e.:

I tried [setPos()](http://thejit.org/static/v20/Docs/files/Graph/Graph-js.html#Graph.Node.setPos) but this doesn't work.
Any ideas?
Here's a github repo with a full working self-contained copy of the source (sadly my website has gone away since I originally asked this question):
> [https://github.com/kevinkenny/so4418163](https://github.com/kevinkenny/so4418163)
In the example the file `ex2.html` contains the markup that generates the first image, `ex3.html` contains the markup that renders the bottom image.
| Javascript InfoVis SpaceTree: prevent the selected node centering on the canvass | CC BY-SA 4.0 | 0 | 2010-12-11T18:08:54.177 | 2020-06-13T21:11:30.967 | 2020-06-13T21:11:30.967 | 419 | 419 | [
"javascript",
"visualization",
"charts",
"infovis"
] |
4,418,204 | 1 | 4,464,578 | null | 2 | 324 | I have an IFrame app and some pages in app have fb comments plugin.
If users check `Post to Profile` box, it puts a post on his wall:

Is there s way to remove the `Source:` item?
Here is the code:
```
<fb:comments
xid="image_id"
url='url_for_like_button'
title="Comments box title"
showform="true"
simple="1"
>
</fb:comments>
```
| facebook comments "source" | CC BY-SA 2.5 | 0 | 2010-12-11T18:19:15.853 | 2011-01-29T04:43:58.690 | 2010-12-16T19:31:55.730 | 158,683 | 236,195 | [
"api",
"facebook"
] |
4,418,255 | 1 | 4,419,476 | null | 11 | 6,062 | I want to drag n drop the text view on image in android 2.X
please , look at this image below.

Here, "Blue" color represents the ViewGrop , "White" is ImageView and the image is set on the ImageView.
the text written "Fashion" is a TextView.This is how i have implement the structure. Now i want to allow the user to select the TextView and drag it to any part of the image and then drop it over the image at desired position.
As of now for a reference i tried to refer the following url but whenever i use TextView instead of Button things are getting abnormal.
[link text](http://techdroid.kbeanie.com/2010/04/simple-drag-n-drop-on-android.html#comment-form)
Can anyone give me the road map or example to get it done ?
| drag n drop textview in android | CC BY-SA 2.5 | 0 | 2010-12-11T18:31:07.257 | 2010-12-11T23:24:45.467 | 2010-12-11T20:08:20.190 | 405,383 | 405,383 | [
"android",
"drag-and-drop"
] |
4,418,519 | 1 | 4,419,212 | null | 2 | 3,606 | I would like to separate objects in OpenCv like the following image it shows: 
But if I am using cvDilate or cvErode the objects grow together... how to do that with OpenCv?
| cvDilate/cvErode: How to avoid connection between separated objects? | CC BY-SA 2.5 | 0 | 2010-12-11T19:30:49.303 | 2012-02-13T13:15:29.857 | null | null | 482,874 | [
"image",
"image-processing",
"opencv",
"image-manipulation"
] |
4,418,537 | 1 | 4,418,594 | null | 1 | 2,134 | I have implemented the swipe to delete method and everything works perfectly. What do I need to do in order to have the row of delete buttons on the left side of the cell?

Any help would be greatly appreciated.
Thanks in advance!
| How to display left delete button UITableViewCell | CC BY-SA 2.5 | 0 | 2010-12-11T19:33:35.497 | 2010-12-11T19:44:53.757 | null | null | 345,282 | [
"uitableview",
"ios4"
] |
4,418,763 | 1 | 4,419,441 | null | 0 | 887 | What I'm trying to do to design a vertical CSS menu like this one . [on the right of this site](http://blog.fluxiom.com/)

. I've two problems .
1. How can I add an image in the menu item .
2. How can I MAKE the BORDER RADIUS of all the item on the top and on the bottom NOT for each one .
That's my code
```
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>CSS3 Buttons</title>
<style>
.button {
width: 400px;
height: 100px;
line-height: 100px;
color: #C0C0C0;
text-decoration: none;
font-size: 50px;
font-family: helvetica, arial;
font-weight: bold;
display: block;
text-align: center;
position: relative;
padding-bottom:1px;
/* BACKGROUND GRADIENTS */
background: #F5F3F4;
/* BORDER RADIUS */
/* -moz-border-radius: 10px;
-webkit-border-radius: 10px;
border-radius: 10px; */
/* TEXT SHADOW */
text-shadow: 1px 1px 1px black;
/* BOX SHADOW */
-moz-box-shadow: 0 1px 3px black;
-webkit-box-shadow: 0 1px 3px black;
box-shadow: 0 1px 3px black;
}
/* WHILE HOVERED */
.button:hover {
color: #A8A8A8;
-moz-box-shadow: 0 2px 6px black;
-webkit-box-shadow: 0 2px 6px black;
}
/* WHILE BEING CLICKED */
.button:active {
-moz-box-shadow: 0 2px 6px black;
-webkit-box-shadow: 0 2px 6px black;
}
</style>
</head>
<body>
<a href="#" class="button"> Profile </a>
<a href="#" class="button"> Privacy </a>
<a href="#" class="button"> Services </a>
<a href="#" class="button"> Avatar </a>
<a href="#" class="button"> Language </a>
</body>
</html>
```
| help in Vertical CSS Menu | CC BY-SA 2.5 | 0 | 2010-12-11T20:24:37.357 | 2010-12-13T19:13:22.283 | 2010-12-12T18:55:07.590 | 437,136 | 437,136 | [
"html",
"menu",
"css"
] |
4,418,885 | 1 | null | null | 2 | 9,642 | If one goes here - [http://djangocon.us/](http://djangocon.us/). At the very top, the djangocon logo is there. This logo is all text & the text is like pressed inside. It kind of feels like it's been carved in.
I have looked into the CSS & didn't get what property could cause this effect. Any one knows?

Looks like I got it wrong. The logo at the top is an image. But the text below that is not. Gives the same pressed text. Dark Green rectangular box (below the navigation bar).
| CSS Text Carved or Pressed Effect | CC BY-SA 2.5 | 0 | 2010-12-11T20:51:33.657 | 2015-01-07T05:21:06.207 | 2010-12-11T21:02:31.703 | null | null | [
"text",
"css"
] |
4,419,060 | 1 | 4,485,160 | null | 2 | 1,283 | I'm having an issue with UITableViewController's tableView changing its frame position when presented from a UITabBarController, within a UINavigationController. The frame is fine when displayed from a regular tab. However, if I move and show the UITableViewController from the 'More' Section, the tableview moves down the same height as the navigation bar (which I don't want it to). When I tested the runtime frame coordinates between proper and nonproper positions, it shows as the same (0.0, 0.0, 320.0, 411.0).
This issue only happens AFTER I've shown the tableView in one Nav Controller and then it's moved and shown in another, like the 'More' VC to the tab, or tab to the 'More' VC
What's going on here and how can I fix this?
The last image is how it looks like when the app launch, as it should be, with he table view right below the nav bar. In the first two however, you can see that the tableview has been moved down.
Thanks in advance!



| UITableview changing height when shown from different UINavigationControllers ('More') | CC BY-SA 2.5 | null | 2010-12-11T21:31:26.860 | 2010-12-19T21:18:40.503 | 2010-12-15T05:58:29.870 | 273,130 | 273,130 | [
"iphone",
"ios",
"uitabbarcontroller",
"uitableview"
] |
4,419,202 | 1 | 4,419,942 | null | 1 | 661 | I was checking out what it would take to add my free extension to Magento Connect. I noticed a list of open source licenses. Can anyone point out the major difference?

| I'm thinking about submitting a magento extension, what license should I use? | CC BY-SA 2.5 | 0 | 2010-12-11T22:02:35.230 | 2010-12-12T01:23:06.543 | null | null | 300,445 | [
"open-source",
"magento",
"licensing"
] |
4,419,983 | 1 | null | null | 153 | 441,989 | Eclipse is unable to open, have used eclipse before and has open before without a problem. Now I keep getting the following error message:
> A Java Runtime Environment (JRE) or Java Development Kit (JDK) must be available in order to run Eclipse. No Java virtual machine was found after searching the following locations:
Have gotten eclipse to open and work on projects before and won't open.
Here is a screen shot of what I keep getting:

| A JRE or JDK must be available in order to run Eclipse. No JVM was found after searching the following locations | CC BY-SA 3.0 | 0 | 2010-12-12T01:37:44.073 | 2022-12-22T05:49:57.823 | 2014-08-12T21:50:21.573 | 157,882 | 539,282 | [
"java",
"eclipse"
] |
4,420,048 | 1 | 4,420,187 | null | 0 | 205 | In SQL Server 2008, I have Table1 and I want to get the output as shown in expected output.
Every time Action 'Count' occurs, it add/removes all relevant items and show the total.
Assuming all items begin with 0 count.

Many Thanks.
```
CREATE TABLE Table1([Time] [smalldatetime] NULL,[Action] [nvarchar](10) NULL,[Item] [nchar](50) NULL)
insert into Table1 values('2009-08-22 20:34:02','Count','Apple')
insert into Table1 values('2009-08-22 20:34:03','Count','Banana')
insert into Table1 values('2009-08-22 20:34:04','Count','Mango')
insert into Table1 values('2009-08-22 20:34:05','Count','Black Berry')
insert into Table1 values('2009-08-22 20:34:06','Count','Orange')
insert into Table1 values('2009-08-22 20:34:07','Add','Apple')
insert into Table1 values('2009-08-22 20:34:08','Add','Banana')
insert into Table1 values('2009-08-22 20:34:09','Add','Mango')
insert into Table1 values('2009-08-22 20:34:10','Remove','Banana')
insert into Table1 values('2009-08-22 20:34:11','Add','Banana')
insert into Table1 values('2009-08-22 20:34:12','Add','Mango')
insert into Table1 values('2009-08-22 20:34:13','Add','Mango')
insert into Table1 values('2009-08-22 20:34:14','Add','Mango')
insert into Table1 values('2009-08-22 20:34:15','Remove','Mango')
insert into Table1 values('2009-08-22 20:34:17','Count','Apple')
insert into Table1 values('2009-08-22 20:34:18','Add','Banana')
insert into Table1 values('2009-08-22 20:34:19','Add','Banana')
insert into Table1 values('2009-08-22 20:34:20','Remove','Banana')
insert into Table1 values('2009-08-22 20:34:21','Add','Apple')
insert into Table1 values('2009-08-22 20:34:22','Add','Mango')
insert into Table1 values('2009-08-22 20:34:23','Add','Apple')
insert into Table1 values('2009-08-22 20:34:24','Add','Mango')
insert into Table1 values('2009-08-22 20:34:25','Remove','Apple')
insert into Table1 values('2009-08-22 20:34:26','Count','Mango')
insert into Table1 values('2009-08-22 20:34:27','Add','Apple')
insert into Table1 values('2009-08-22 20:34:28','Add','Banana')
insert into Table1 values('2009-08-22 20:34:29','Remove','Apple')
insert into Table1 values('2009-08-22 20:34:30','Remove','Banana')
insert into Table1 values('2009-08-22 20:34:31','Add','Banana')
insert into Table1 values('2009-08-22 20:34:32','Add','Mango')
insert into Table1 values('2009-08-22 20:34:33','Count','Banana')
insert into Table1 values('2009-08-22 20:34:34','Add','Banana')
insert into Table1 values('2009-08-22 20:34:35','Add','Apple')
insert into Table1 values('2009-08-22 20:34:36','Remove','Mango')
insert into Table1 values('2009-08-22 20:34:37','Add','Apple')
insert into Table1 values('2009-08-22 20:34:38','Add','Mango')
insert into Table1 values('2009-08-22 20:34:39','Count','Apple')
insert into Table1 values('2009-08-22 20:34:40','Remove','Apple')
insert into Table1 values('2009-08-22 20:34:41','Remove','Banana')
insert into Table1 values('2009-08-22 20:34:42','Add','Banana')
insert into Table1 values('2009-08-22 20:34:43','Add','Mango')
insert into Table1 values('2009-08-22 20:34:44','Count','Banana')
insert into Table1 values('2009-08-22 20:34:45','Remove','Banana')
insert into Table1 values('2009-08-22 20:34:46','Remove','Apple')
insert into Table1 values('2009-08-22 20:34:47','Remove','Mango')
insert into Table1 values('2009-08-22 20:34:48','Add','Apple')
insert into Table1 values('2009-08-22 20:34:49','Add','Mango')
insert into Table1 values('2009-08-22 20:34:50','Count','Mango')
```
| T-SQL count items by adding and removing | CC BY-SA 2.5 | null | 2010-12-12T01:56:59.490 | 2010-12-12T03:26:49.357 | 2010-12-12T03:26:49.357 | 219,628 | 219,628 | [
"sql",
"tsql",
"variables",
"counter"
] |
4,420,235 | 1 | 4,420,504 | null | 12 | 12,491 | I don't have enough memory to simply create a diagonal D-by-D matrix, since D is large. I keep getting an 'out of memory' error.
Instead of performing M x D x D operations in the first multiplication, I do M x D operations, but still my code takes ages to run.
Can anybody find a more effective way to perform the multiplication `A'*B*A`? Here's what I've attempted so far:
```
D=20000
M=25
A = floor(rand(D,M)*10);
B = floor(rand(1,D)*10);
for i=1:D
for j=1:M
result(i,j) = A(i,j) * B(1,j);
end
end
manual = result * A';
auto = A*diag(B)*A';
isequal(manual,auto)
```

| Efficient multiplication of very large matrices in MATLAB | CC BY-SA 2.5 | 0 | 2010-12-12T03:08:07.983 | 2013-04-20T15:30:00.523 | 2010-12-13T06:54:15.293 | 445,762 | 445,762 | [
"algorithm",
"matlab",
"linear-algebra",
"octave",
"matrix-multiplication"
] |
4,420,378 | 1 | 4,423,590 | null | 127 | 107,863 | I made a Django admin site using [Django development version](http://docs.djangoproject.com/en/dev/ref/contrib/admin/) but it isn't being styled:

| Why does my Django admin site not have styles / CSS loading? | CC BY-SA 4.0 | 0 | 2010-12-12T04:15:44.343 | 2022-12-15T14:45:36.570 | 2021-07-19T16:38:23.987 | 1,038,379 | 420,840 | [
"css",
"django",
"admin"
] |
4,420,486 | 1 | 4,420,544 | null | 3 | 540 | I'm curious... how would I go about creating a custom progress bar like the one Grooveshark used to have? If you look at the image below, the progress bar is an image in the shape of a shark and fills in as the page loads.

I think this is very cool and would love to know how it is done. Can this be done programmatically, or is it done in flash? I would really like to do this in JavaScript (jQuery) if it is possible. Where/How do I start?
Thanks,
Hristo
| How do I create a progress "bar" similar to Grooveshark? | CC BY-SA 2.5 | 0 | 2010-12-12T05:10:02.497 | 2010-12-12T07:33:54.487 | 2010-12-12T05:33:37.223 | 196,921 | 196,921 | [
"javascript",
"jquery",
"flash",
"html",
"progress-bar"
] |
4,420,487 | 1 | 4,420,492 | null | 4 | 878 | I set up a code to randomly cover a bitmap 2 different colors, 7 out of 10 times the color would be blue, and 3 out of 10 times, the color would be green. However, when it's done it looks very un-random, like it decided to put 7 blue pixels a few times, then 3 green pixels a few times and so on.
Example:

My code is:
```
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace FourEx
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
Bitmap bmp = new Bitmap(canvas.Image);
System.Drawing.Imaging.BitmapData bmpdata = bmp.LockBits(new Rectangle(0, 0, 800, 600), System.Drawing.Imaging.ImageLockMode.ReadWrite, System.Drawing.Imaging.PixelFormat.Format32bppArgb);
unsafe
{
int tempy = 0;
while (tempy < 600)
{
byte* row = (byte*)bmpdata.Scan0 + (tempy * bmpdata.Stride);
for (int x = 0; x <= 800; x++)
{
Random rand = new Random();
if (rand.Next(1,10) <= 7)
{
row[x * 4] = 255;
}
else
{
row[(x * 4) + 1] = 255;
}
}
tempy++;
}
}
bmp.UnlockBits(bmpdata);
canvas.Image = bmp;
}
}
}
```
If you need an additional information, let me know.
| Why is the random pixel color not so random in my C# application? | CC BY-SA 2.5 | 0 | 2010-12-12T05:10:05.750 | 2010-12-12T06:29:22.897 | 2010-12-12T05:13:06.147 | 366,904 | 514,887 | [
"c#",
"winforms",
"graphics",
"random",
"lockbits"
] |
4,420,768 | 1 | null | null | 2 | 437 | I am having some strange problem with my GIT repository. I have two branches, 'master' and 'staging'. I usually work on 'staging' and the owner of the project works on 'master'. So what I do with master is usually just switch to it (git checkout master) to it, pull the changes, then switch back to staging and merge the master with staging. Basically, I don't make any updates to the master branch. Now can any body explain the problem in this image:

How comes my 'master' is beyond 'remotes/origin/master' while I take the commits from 'remotes/origin/master'?!! And how is it possible to make 'master' and 'remotes/origin/master' both points to the last commit?
UPDATE: To answer Jefromi's questions in the first comment, I want to add: The 5 commits all come from the other developer working on the master branch. That is, when I did "git pull origin master" (while on the master branch), I got those additional 5 commits and the 'master' label moved to the last commit, but not the 'remotes/origin/master'. Now, whenever I switch to the master branch, I get this message:
"Your branch is ahead of 'origin/master' by 5 commits."
| GIT Problem: 'master' is beyond 'remotes/origin/master' | CC BY-SA 2.5 | 0 | 2010-12-12T07:58:00.107 | 2010-12-15T09:35:39.297 | 2010-12-12T08:07:30.460 | 196,697 | 196,697 | [
"git"
] |
4,420,862 | 1 | 4,422,388 | null | 0 | 2,134 | I am using VB.NET and I can't compare the radio button lists selectedItem.Value to a string, it doesn't work...here is the code: ()
```
Response.Write("RB1: " + rblOne.SelectedItem.Value + " FML FML FML<br/>")
If rblOne.SelectedItem.Value = "No" Then
Response.Write("Hey there!<BR/>")
pnlR1.Visible = True
If NumberOfAnswers = 7 Then
Score = Score - 10
ElseIf NumberOfAnswers = 6 Then
Score = Score - 15
Else
Score = Score - 20
End If
Response.Write("Score: " + Score.ToString)
End If
Response.End()
```
If rblOne.SelectedItem.Value = "No" Then is not working, notice the debug statements in there, here is the output:

Why won't it evaluate that rblOne.SelectedItem.Value = "No" !?!?!? I tried rblOne.SelectedValue, that doesn't work, AND I added .ToString to both, which did not help, I even tried it w/ "No".ToString...this doesn't make any sense.
| radio button list selectedItem.Value not working when compared to a string | CC BY-SA 2.5 | null | 2010-12-12T08:35:42.580 | 2010-12-12T17:00:22.307 | null | null | 237,268 | [
"asp.net",
"vb.net",
"radiobuttonlist"
] |
4,420,912 | 1 | 4,425,511 | null | 2 | 1,577 | I have a datastore with a kind named `MyUsers(db.Model)` that currently contains about 30 entities.
I have written a script that prints all the entities' "name" attribute to the screen (separated by the '#' char), using the following code:
```
def get(self):
q_1 = MyUsers.all().order('name')
for user in q_1:
self.response.out.write(user.name)
self.response.out.write("#")
```
The script works just fine, but the problem is that I always get critical message in the app engine log:
> 12-12 12:45AM 22.691Exceeded soft memory limit with
220.043 MB after servicing 1 requests totalI 12-12 12:45AM 22.691This request caused a new process to
be started for your application, and
thus caused your application code to
be loaded for the first time. This
request may thus take longer and use
more CPU than a typical request for
your application.W 12-12 12:45AM 22.691After handling this request, the
process that handled this request was
found to be using too much memory and
was terminated. This is likely to
cause a new process to be used for the
next request to your application. If
you see this message frequently, you
may have a memory leak in your
application.
It seems like this is a very straightforward basic operation, that shouldn't exceed any memory limits, so what can I do to improve it?
Thanks,
Joel
---
EDIT:
As for the imports, the imports I use are:
```
from models.model import *
from google.appengine.ext import webapp
from google.appengine.ext.webapp.util import run_wsgi_app
import profiler.appengine.request
import profiler.appengine.datastore
```
I used a profiler to try and understand what is wrong, maybe you can help

Thanks!
Joel
---
This is the full version of the code (the problem occurred also before I imported the profiler, I used it after it happened to try and debug):
```
from models.model import MyUsers
from google.appengine.ext import webapp
from google.appengine.ext.webapp.util import run_wsgi_app
import profiler.appengine.request
import profiler.appengine.datastore
class PrintAll(webapp.RequestHandler):
def get(self):
q_1 = MyUsers.all().order('name')
for user in q_1:
self.response.out.write(user.name)
self.response.out.write("#")
application = webapp.WSGIApplication(
[('/print', PrintAll)
],
debug=True)
def main():
profiler.appengine.request.activate()
profiler.appengine.datastore.activate()
run_wsgi_app(application)
profiler.appengine.request.show_summary()
profiler.appengine.datastore.show_summary()
profiler.appengine.datastore.dump_requests() # optional
if __name__ == "__main__":
main()
```
As for the MyUsers() model class:
```
class MyUsers(db.Model):
user = db.UserProperty()
points = db.FloatProperty()
bonus = db.FloatProperty(default=0.0)
joindate = db.DateTimeProperty(auto_now_add=True)
lastEntry=db.DateTimeProperty(auto_now_add=True)
name=db.StringProperty()
last_name = db.StringProperty()
homepage = db.StringProperty()
hobbies = db.ListProperty(str)
other = db.StringProperty()
calculate1 = db.FloatProperty()
calculate2 = db.FloatProperty()
calculate3= db.IntegerProperty(default=0)
history = db.ListProperty(str)
history2 = db.ListProperty(str)
title = db.IntegerProperty(default=0)
title_string = db.StringProperty()
updateDate = db.DateTimeProperty(auto_now_add=True)
level=db.IntegerProperty(default=0)
debug_helper=db.IntegerProperty(default=0)
debug_list=db.ListProperty(str)
```
| Exceeded soft memory limit with basic SELECT | CC BY-SA 2.5 | 0 | 2010-12-12T08:56:12.330 | 2010-12-19T08:40:52.597 | 2010-12-19T08:40:52.597 | 508,056 | 508,056 | [
"google-app-engine"
] |
4,420,967 | 1 | 4,431,559 | null | 5 | 952 | A [recent SO question](https://stackoverflow.com/q/4418699/421225) reminded me of some code I tried to write a while back. The aim is to make a `CircularSlider[]` object that can be used for angle-like variables in dynamic objects.
The framework for my solution (below) comes from the `ValueThumbSlider[]` defined in the [Advanced Manipulate Functionality](http://reference.wolfram.com/mathematica/tutorial/AdvancedManipulateFunctionality.html#441733133) tutorial. The main difference is that in `ValueThumbSlider[]` the value of the slider and the position of the `LocatorPlane[]` are the same thing, whilst in my `CircularSlider[]` they are not - and this leads to problems.
The first problem is that moving the [Locator](http://reference.wolfram.com/mathematica/ref/Locator.html) will not change the slider value. This is fixed by using the 2nd argument in the [Dynamic](http://reference.wolfram.com/mathematica/ref/Dynamic.html): `(x = #/Abs[Complex @@ #]) &`.
This in turn leads to the problem that if you externally set the value of the slider (`t`) from outside, it will immediately revert to its previous value. This is fixed by keeping the old value (`t0`) and comparing to `t`. If they don't match then it's assumed that t has changed and so the `Locator` position `x` is updated to its new position.
```
CircularSlider[t_] := CircularSlider[t, {0, 1}];
CircularSlider[Dynamic[t_], {min_, max_}] /; max > min :=
With[{d = (max - min)/(2. Pi)},
DynamicModule[{td = t/d, x, t0}, x = {Cos[td], Sin[td]};
LocatorPane[
Dynamic[If[!NumberQ[t], t = min; x = {Cos[td], Sin[td]}];
If[t != t0, t0 = t; x = {Cos[td], Sin[td]}];
t = Mod[Arg[Complex @@ x] d, max, min]; t0 = t;
x, (x = #/Abs[Complex @@ #]) &],
Graphics[{AbsoluteThickness[1.5], Circle[],
Dynamic[{Text[NumberForm[t, {3, 2}], {0, 0}]}]}],
ImageSize -> Small]]]
```

---
So my question is: can someone make this work with out the above kludges?
| Circular/Angular slider | CC BY-SA 2.5 | 0 | 2010-12-12T09:11:36.007 | 2011-01-31T21:56:56.630 | 2017-05-23T12:13:50.283 | -1 | 421,225 | [
"wolfram-mathematica"
] |
4,421,210 | 1 | 4,421,223 | null | 0 | 41 | I have this right now:
[http://jsfiddle.net/Rf8gy/](http://jsfiddle.net/Rf8gy/)
And this is how I want it:

If you see in the fiddle, the input field is at top. I want it be like the middle of the floated element on the left. How can I do this?
| CSS/HTML: Inputfield in the middle of the floated element | CC BY-SA 2.5 | null | 2010-12-12T10:28:17.107 | 2010-12-12T10:32:54.357 | null | null | 267,304 | [
"html",
"css"
] |
4,421,540 | 1 | 4,421,632 | null | 0 | 2,118 | I have a `<ul>` created with PHP:
```
$WORLD_STATES =
array(
"France",
"Germany",
"Greece",
"Greenland",
"United Kingdom",
"United States",
"Uruguay"
);
echo '<ul>';
for($i=0; $i<sizeof($WORLD_STATES); $i++){
echo '<li rel="' . $WORLD_STATES[$i] . '">'.$WORLD_STATES[$i].'</li>';
}
echo '</ul>';
```
Since the full list of countries is very long, with a scrollbar in a div tag, I want the user to be able to reach a country by simply pressing an alphabetic keyboard shortcut.
How can I accomplish this?
this is an image:

| keyboard shortcuts in a ul tag | CC BY-SA 2.5 | null | 2010-12-12T12:09:08.677 | 2010-12-13T08:54:31.660 | 2010-12-13T08:54:31.660 | 447,356 | 519,521 | [
"javascript",
"html"
] |
4,421,746 | 1 | 4,421,792 | null | 2 | 1,478 | I have some pictures, and I am using the [jQuery cycle plugin](http://jquery.malsup.com/cycle/) to show them in a slideshow that floats right inside an outer div. I use this CSS to have the image float right:
```
.slideshow
{
float:right;
margin-left: 20px;
}
```
This works fine in and as it floats to the right inside the green outer div (as seen here:):

But in it doesn't keep the picture inside the outer div and floats off the screen (as seen here:)

What's really weird, if I keep reloading the tab in Chrome, it sometimes works and is consistent with Firefox/Internet Explorer but often is not and looks like the above (this is quite a mystery to me).
Any suggestions on how to get Google Chrome to keep this consistent?
| How to stop floating right image inside div bleeds over in Google Chrome | CC BY-SA 2.5 | 0 | 2010-12-12T12:53:34.600 | 2012-06-05T12:29:39.657 | 2012-06-05T12:29:39.657 | 44,390 | 4,653 | [
"jquery",
"html",
"css",
"image",
"css-float"
] |
4,422,112 | 1 | null | null | 1 | 1,997 | I'd like to create a rotating circle drawn with a `Qt:DotLine` pen, using the Graphics View Framework. Using `QGraphicsItemAnimation`, I can rotate other shapes but not the circle. The program below demonstrates the problem: instead of the rectangle and the circle rotating together, the circle jerks around while the rectangle rotates gracefully.

```
#include <QApplication>
#include <QGraphicsView>
#include <QGraphicsItem>
#include <QTimeLine>
#include <QGraphicsItemAnimation>
QRectF rect (int r)
{
return QRectF (-r, -r, r * 2, r * 2);
}
void setupRot (QTimeLine *timeline, QGraphicsItem *item)
{
QGraphicsItemAnimation *animation = new QGraphicsItemAnimation;
animation->setItem(item);
animation->setTimeLine(timeline);
animation->setRotationAt (1, 360);
QObject::connect (timeline, SIGNAL(finished()), animation, SLOT(deleteLater()));
}
int main(int argc, char *argv[])
{
QApplication app (argc, argv);
QGraphicsScene scene;
QTimeLine *timeline = new QTimeLine;
timeline->setDuration (3000);
timeline->setCurveShape (QTimeLine::LinearCurve);
QObject::connect (timeline, SIGNAL(finished()), timeline, SLOT(deleteLater()));
setupRot (timeline, scene.addEllipse (rect (50), QPen (QBrush (QColor ("blue")), 8, Qt::DotLine)));
setupRot (timeline, scene.addRect (rect (60)));
scene.addEllipse (rect (40), QPen (QBrush (QColor ("red")), 8));
scene.setSceneRect (-100, -100, 200, 200);
QGraphicsView view (&scene);
view.show ();
timeline->setLoopCount (0);
timeline->start();
return app.exec ();
}
```
p.s.: I've found some sample code on the web where people are creating intermediate animation steps manually, like this:
```
const int steps = 100;
for (int i = 0; i < steps; ++i)
animation->setRotationAt (i / (float)steps, 360 / (float)steps * i);
```
Is this just a sign of people not understanding the concept of interpolation, or is there some advantage of setting (seemingly superfluous) control points?
| Animated QGraphicsItem with dashed pen | CC BY-SA 2.5 | null | 2010-12-12T14:28:07.103 | 2010-12-14T13:52:22.580 | null | null | 477,476 | [
"qt",
"animation",
"qt4"
] |
4,422,149 | 1 | 4,422,204 | null | 0 | 916 | I have an image that is sitting on top of a background. In Firefox and Chrome it looks fine as per below:

But in Internet Explorer (any version), it looks like the image background is a different shade than the background (I have put a red box to highlight where the image ends and the background begins, but it's pretty obvious).
How could it be that, given the same image and the same HTML background color, one browser looks fine but in Internet Explorer it looks like the colors are off as the background color of the image is a shade lighter than the HTML background?

The [full website is here](http://www.fsf60k.org) if that helps.
| Why doesn't this image blend into background in Internet Explorer (it looks fine in Firefox or Chrome)? | CC BY-SA 2.5 | null | 2010-12-12T14:33:36.457 | 2010-12-25T16:12:09.080 | 2010-12-25T16:10:14.417 | 63,550 | 4,653 | [
"html",
"image",
"colors",
"background"
] |
4,422,963 | 1 | 4,423,048 | null | 0 | 492 | Here's how it looks on the latest Chrome. Looks the same in Opera/Firefox.

Here's the actual image I'm using on the website:
> 
And the actual code:
```
<body>
<div id="wrapper">
<div id="headerarea">
<img src="../../Content/Images/logo.png" alt="Cumavi.com - Vende tus cosas en Bolivia!" />
<p>Los mejores anuncios de Bolivia!</p>
</div>
<div id="bodyarea">
<div id="leftnavigationbar">
</div>
<div id="mainbody">
@RenderBody()
</div>
<div id="footer">
</div>
</div>
</div>
</body>
```
| Picture appears jagged on my website | CC BY-SA 2.5 | null | 2010-12-12T17:39:24.433 | 2010-12-13T03:44:39.463 | 2010-12-13T03:44:39.463 | 313,758 | null | [
"html",
"css"
] |
4,423,125 | 1 | 4,423,260 | null | 72 | 74,239 | I'm new to Spring and I'm wondering if its possible to use numerous transaction managers in the same application?
I have two data access layers - one for both of the databases. I'm wondering, how do you go about using one transaction managers for one layer and different transaction manager for the other layer. I don't need to perform transactions across both databases - yet. But I do need perform transactions on each database individually. I've created an image to help outline my problem:

Here is my application context configuration:
```
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:tx="http://www.springframework.org/schema/tx"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-3.0.xsd
http://www.springframework.org/schema/tx
http://www.springframework.org/schema/tx/spring-tx-3.0.xsd">
<context:component-scan base-package="cheetah.repositories" />
<tx:annotation-driven />
<bean id="entityManagerFactory"
class="org.springframework.orm.jpa.LocalEntityManagerFactoryBean">
<property name="persistenceUnitName" value="accounts" />
</bean>
<bean class="org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor" />
<bean id="transactionManager"
class="org.springframework.orm.jpa.JpaTransactionManager">
<property name="entityManagerFactory" ref="entityManagerFactory" />
</bean>
</beans>
```
Here is an example that uses this configuration:
```
@Repository
public class JpaAccountRepository implements AccountRepository {
@PersistenceContext(unitName = "cheetahAccounts")
private EntityManager accountManager;
@Override
@Transactional
public Account findById(long id) {
Account account = accountManager.find(Account.class, id);
return account;
}
}
```
So for the account repository, I want to use an entity manager factory with the persistence unit set to accounts. However, with my BusinessData Repository, I want to use an entity manager factory with a different persistence unit. Since I can only define one transaction manager bean, how can I go about using different transaction managers for the different repositories?
Thanks for any help.
| Spring - Is it possible to use multiple transaction managers in the same application? | CC BY-SA 3.0 | 0 | 2010-12-12T18:10:41.727 | 2017-09-14T09:03:19.343 | 2016-10-13T22:20:49.873 | 814,702 | 221,564 | [
"java",
"spring",
"jpa",
"spring-transactions",
"transactionmanager"
] |
4,423,193 | 1 | 4,423,213 | null | 1 | 3,470 | Here's a before and after picture. When I add a float:left to the li, the layout breaks and the div that's supposed to be below this topmenu div, floats up.


Here's the CSS:
```
#topmenu
{
background-color:#335D7C;
}
#topmenu ul
{
list-style:none;
margin:0;
padding:0;
}
#topmenu ul li
{
background-image: url('../Content/Images/topmenutick.png');
background-repeat:no-repeat;
color:White;
float:left;
padding-left:15px;
padding-right:15px;
}
#topmenu ul li a
{
text-decoration:none;
}
#topmenu ul li a:hover
{
text-decoration:none;
}
```
| Using float in my CSS breaks the layout | CC BY-SA 2.5 | 0 | 2010-12-12T18:22:18.407 | 2014-08-30T03:30:02.433 | null | null | null | [
"html",
"css"
] |
4,423,462 | 1 | 4,423,839 | null | 1 | 653 | I know there's lots of reasons not to do this, but I really need to. I'm using the Jquery UI datepicker and I've styled a textbox to look like a hyperlink. Anyway, everything's working great except that when i click the textbox it has the blinking carat. Is there a way to get rid of it?

| Can I hide the carat of a textbox using css? | CC BY-SA 2.5 | null | 2010-12-12T19:14:09.280 | 2010-12-12T20:25:59.373 | null | null | 17,744 | [
"jquery",
"css",
"jquery-ui",
"textbox"
] |
4,424,040 | 1 | 4,424,062 | null | 0 | 777 | I was wondering the easiest way (open source control / .NET control) to set up a windows form with a menu on the left that changes the panel displayed on the right.
Here are two example screen shots of what I mean:

| .NET Container w/ Menu on Left Side | CC BY-SA 2.5 | 0 | 2010-12-12T21:12:26.533 | 2010-12-12T21:15:28.503 | null | null | 423,079 | [
".net",
"winforms",
"forms",
"controls"
] |
4,424,079 | 1 | 4,424,095 | null | 2 | 828 | The images below illustrate what the actual problem is

So as you can see this is a puzzle, and is being created by javascript. Each row is created like this.
```
document.write("<div style='float:none'>");
for(i=0; i < 4 ; i++) {
for(j=0; j < 4 ; j++) {
imgArray[i] = "Images/" + x + ".jpg";
document.write("<img id= " + x + " src='Images/" + x + ".jpg' width='120' height='120' style='position:relative;top:50px;left:50px' onclick='checkMove(parseInt(id))'/>");
x = x + 1;
}
document.write("<br>");
}
document.write("</div>");
```
Even using `float` style keeps this problem. Is there a way to a window not to be resized smaller than `x`? Could you please point me in the right direction as in what im doing wrong, or not doing.
| Webpage layout breaking on window resize | CC BY-SA 2.5 | null | 2010-12-12T21:18:27.553 | 2010-12-12T21:28:42.627 | 2010-12-12T21:28:42.627 | 287,893 | 287,893 | [
"javascript",
"html",
"css-float"
] |
4,424,787 | 1 | 4,424,997 | null | 5 | 3,066 | Ok, these are all pretty simple methods, and there are a few of them, so I didnt want to just create multiple questions when they are all the same thing. BigO is my weakness. I just cant figure out how they come up with these answers. Is there anyway you can give me some insight into thinking for analyzing running times of some of these methods? How do you break it down? How should I think when I see something like these? (specifically the second one, I dont get how thats O(1))

| BigO running time on some methods | CC BY-SA 2.5 | 0 | 2010-12-12T23:44:04.910 | 2010-12-13T11:14:43.933 | 2010-12-13T00:08:24.247 | 458,960 | 458,960 | [
"java",
"methods",
"big-o",
"performance"
] |
4,425,411 | 1 | 4,425,799 | null | 1 | 225 | Various things, including (perhaps most notably) the window losing its main status and then being brought back into focus, cause some of my custom views to develop rendering glitches until I do something (such as resize the window) to cause these custom views to redraw. I assume this is due to some sort of caching bug in AppKit, and I'm sure I'm not the only one getting this behaviour, so does anyone know how to work around it?
Here's an example:


Notice the weird dark line at the left of the view's background? This is drawn even without the subviews in the view. I get other similar bugs in some of my other views.
Here's the code that does the drawing:
```
void EDDrawGlossEffectInRect(NSRect dirtyRect) {
NSRect topRect, bottomRect;
NSDivideRect(dirtyRect, &topRect, &bottomRect, (dirtyRect.size.height / 2), NSMaxYEdge);
[EDLightChromeColor set];
NSRectFill(topRect);
[EDMidChromeColor set];
NSRectFill(bottomRect);
}
```
and
```
-(void)drawRect:(NSRect)dirtyRect {
EDDrawGlossEffectInRect(dirtyRect);
NSBezierPath *path = [NSBezierPath bezierPath];
[path setLineWidth:1.0];
NSPoint startPoint = {0, dirtyRect.size.height};
NSPoint endPoint = {dirtyRect.size.width, dirtyRect.size.height};
[path moveToPoint:startPoint];
[path lineToPoint:endPoint];
[[NSColor colorWithCalibratedWhite:0.7 alpha:1] set];
[path stroke];
}
```
The view is created programatically, not with Interface Builder, which I'm not using for this project.
| Cocoa drawing glitches when window loses then regains main status | CC BY-SA 2.5 | null | 2010-12-13T02:36:42.230 | 2010-12-13T04:52:19.227 | null | null | 322,122 | [
"objective-c",
"cocoa",
"macos",
"drawing",
"nsview"
] |
4,425,576 | 1 | null | null | 0 | 543 | like my question, i just want to ask somebody who made an application that use background for his/her tableview and tableviewcell. Cause i have a problem with those background. Here is my app pic with the problem

i use graycolor for background in tableview and whitecolor for background in tableviewcell, i want to make all cell that containt a text have a whitecolor background, but i can't do it.
here's my code
```
-(void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath{
UIView* backgroundView = [ [ [ UIView alloc ] initWithFrame:CGRectZero ] autorelease ];
//--new color code--
backgroundView.backgroundColor = [UIColor colorWithPatternImage:[UIImage imageNamed:@"celltable_root.png"]];
cell.backgroundView = backgroundView;
for ( UIView* view in cell.contentView.subviews )
{
if(_segmentedControl.selectedSegmentIndex == 0){
FileModel *filemodels = [_filemodels objectAtIndex:indexPath.row];
if([filemodels.fileExpanse compare:@"display"]==0){
backgroundView.backgroundColor = [UIColor whiteColor];
}else{
backgroundView.backgroundColor = [UIColor whiteColor];
}
}
view.backgroundColor = [ UIColor clearColor]; //set cell background
}
[[self tableView] setBackgroundColor:[UIColor grayColor]];
```
}
is there something wrong in my code??
| is there somebody who made an application using background for tableview and tableviewcell? | CC BY-SA 2.5 | null | 2010-12-13T03:24:54.180 | 2010-12-13T08:47:11.263 | 2010-12-13T05:19:04.650 | 515,986 | 515,986 | [
"iphone",
"uitableview",
"background"
] |
4,425,611 | 1 | 4,425,631 | null | 1 | 297 | That's my first post here. Thanks in advance everyone that collaborates with me.
I'm working on a new MER, this is a piece of the it: [http://i.stack.imgur.com/jt5Mz.png](https://i.stack.imgur.com/jt5Mz.png).

In the linked MER, i'm using on entities: Person, Company and Individual. Driver entity is on based on .
My big problem is that a can be or .
Both or inherites from that holds from both entities.
There is a way to make the entity flexible to be an or a , using the on entity?
Thanks you all!!!
| Complex Inheritance in Entity Framework | CC BY-SA 2.5 | 0 | 2010-12-13T03:32:24.340 | 2010-12-13T04:08:03.800 | 2010-12-13T04:08:03.800 | 372,871 | 540,063 | [
"c#",
"database-design",
"entity-framework-4"
] |
4,425,793 | 1 | 4,425,815 | null | 2 | 512 | When I use `==` to compare the strings it works on all but some strings that have a space added... (added with `[NSString stringWithFormat:@"%@ %@",self.title,collectionName])`
But when I compare with `isEqualToString`, it returns True/YES every time. The comparison in the image goes into the condition and hits the return... Should be impossible for this to hit line 640, but it does.
Can anyone explain this?

| Comparing Strings Objective C | CC BY-SA 3.0 | null | 2010-12-13T04:21:08.793 | 2011-12-20T10:47:21.227 | 2011-12-20T10:47:21.227 | 626,273 | 273,312 | [
"iphone",
"objective-c",
"string",
"nsstring",
"compare"
] |
4,425,868 | 1 | 4,478,978 | null | 3 | 158 | This is what the chart currently looks like:

This is all the data in the database that it is currently using. (please excuse how the headers are not properly aligning here)
```
Id(Key) Confidence Love Stress Date/Time
193 0 0 0 12/3/2010 11:33:47 PM
194 55 55 55 12/3/2010 11:34:04 PM
195 30 40 20 12/3/2010 11:34:11 PM
196 40 50 30 12/3/2010 11:34:20 PM
197 50 60 40 12/3/2010 11:34:28 PM
198 60 70 50 12/3/2010 11:34:45 PM
199 70 80 60 12/3/2010 11:34:53 PM
200 80 90 70 12/3/2010 11:34:59 PM
201 20 3 11 12/3/2010 11:36:42 PM
202 20 3 11 12/3/2010 11:37:08 PM
203 76 34 34 12/3/2010 11:37:41 PM
204 3 4 2 12/4/2010 12:14:15 AM
205 5 100 8 12/4/2010 12:17:57 AM
206 77 89 3 12/12/2010 8:08:49 PM
```
This is the SQL statement I have the chart configured too:
> SELECT [ConfidenceLevel], [LoveLevel],
[DateTime], [StressLevel] FROM
[UserData]
My issue is in cases like this example, the data recorded around 12/4 looses it's fidelity and is un - "see able", it all blends together.
How can I configure the chart so that the last 20 days are always readable on the chart and that they don't blur together?
Thank You.
| How do I adjust the fidelity of a chart control? | CC BY-SA 2.5 | null | 2010-12-13T04:42:04.717 | 2010-12-20T19:53:57.367 | null | null | 352,687 | [
"asp.net",
"sql",
"windows",
"charts"
] |
4,425,984 | 1 | 4,432,923 | null | 0 | 250 | I am trying to draw bordered Text on Graphics, as shown below. The text color is black, and the border is white.
How to draw something like this example?

| How to draw bordered text? | CC BY-SA 2.5 | null | 2010-12-13T05:14:26.087 | 2010-12-13T19:56:34.100 | 2017-02-08T14:31:12.533 | -1 | 164,589 | [
"blackberry"
] |
4,426,274 | 1 | 4,426,353 | null | 4 | 14,147 | The following image is from wikipedia [entry](http://en.wikipedia.org/wiki/Call_stack) on call stack and there is something that I don't understand completely:

I thought the frame pointer which is stored in ebp register is initialized as such in the prologue*:
```
push ebp ; Preserve current frame pointer
mov ebp, esp ; Create new frame pointer pointing to current stack top
sub esp, 20 ; allocate 20 bytes worth of locals on stack.
```
If so, then shouldn't the frame pointer in the image be pointing to after the return address and before it should be the previous frame pointer address and before that the return address? What am I missing?
Thanks!
*Taken from: [What is exactly the base pointer and stack pointer? To what do they point?](https://stackoverflow.com/questions/1395591/what-is-exactly-the-base-pointer-and-stack-pointer-to-what-do-they-point)
| Frame pointer, epb, and return address | CC BY-SA 2.5 | 0 | 2010-12-13T06:18:43.920 | 2010-12-13T06:37:34.020 | 2017-05-23T11:48:24.847 | -1 | 464,884 | [
"assembly",
"windbg",
"callstack",
"calling-convention"
] |
4,427,278 | 1 | 4,428,263 | null | 3 | 11,342 | I have this RelativeView with 3 radiobuttons on top. I want to change the bottom part of the view when the user clicks on one of the buttons.
The blue part is the place i want to load different Views in.

```
@Override
public void onCheckedChanged(RadioGroup group, int checkedId) {
if (checkedId == iVerzekeringen){
layout.removeView(body); // THIS PART IS
layout.addView(testview); // NOT WORKING
}
else if (checkedId == iPersoonlijk){
}
else if (checkedId == iNotities){
}
}
```
How can i load different Views into the blue part?
| Dynamically change view inside view in Android | CC BY-SA 2.5 | 0 | 2010-12-13T09:14:55.300 | 2010-12-13T11:29:44.570 | 2010-12-13T09:27:43.800 | 517,460 | 517,460 | [
"android",
"view",
"dynamic"
] |
4,427,665 | 1 | 4,427,735 | null | 5 | 335 | 
I have two panel , Left Hand site represents the list of options or menu and right hand side will be list of usercontrol assigned to eatch menu items in the left as Listbox or Items control.
The requirement is
eg. If i move the thumb of the scrollbar in the right hand side panel to anyway near the usercontrol2 , the Usercontrol 2 heading in the heading panel should get activated and if iam moving the thumb to the usercontrol1, the usercontrol 1 heading in the heading panel should get activated and so on.
So how to proceed to accomplish these kind of UI.? Any suggestion is greatly appreciated?
The basic idea is to reduce the no of clicks in the Heading Panel. Right hand side is heavily packed with UI elements so user wants to avoid unnecessary click in the heading.
User will not click on the Left side heading panel. While traversing the right hand panel's scrollviewer the heading should automatically get selected to give the user about the control which he is entering or using now.
| How to approach for this kind of UI in WPF? | CC BY-SA 2.5 | 0 | 2010-12-13T10:02:12.860 | 2011-05-20T19:20:54.473 | 2010-12-13T10:15:02.933 | 144,373 | 144,373 | [
"wpf"
] |
4,427,965 | 1 | 4,428,491 | null | 0 | 2,520 | How do I keep the tab headers visible always when there is large content. I wish the content to scroll, but the tab headers to not.
In this screen shot I have set the page to be 100% H and W and want scroll bars to scroll content only.
As you can see the scroll bar affects the tab headers too.

| jQueryUI Tabs - Scroll content only | CC BY-SA 2.5 | null | 2010-12-13T10:40:46.820 | 2010-12-13T11:48:04.127 | null | null | 172,861 | [
"jquery-ui",
"scroll",
"tabs"
] |
4,428,225 | 1 | 4,428,433 | null | 0 | 2,063 | I am looking for UISlider value which will set the indicator at the center.
iContrastSlider.minimumValue = 85;
iContrastSlider.maximumValue = 200;
So, which value I need to set,so that indicator will be always @ center. I tried with all values but it always start from 0 as shown in image.

Thanks,
Sagar
| How to set UISlider value so it will be always at the center | CC BY-SA 2.5 | null | 2010-12-13T11:14:06.987 | 2017-10-18T23:32:44.573 | 2010-12-13T11:32:54.497 | 220,819 | 355,082 | [
"iphone",
"objective-c",
"uislider"
] |
4,428,262 | 1 | 4,428,659 | null | 1 | 911 | Please let me know how to assign id for table header (`th`) with `class="tableHeader"` and table `id="requestview_table"` using javascript(after html table is constructed). Currently, the table headers don't have any id.

Please let me know how to insert id (any number) for with class tableHeader.
| assign id for table header in javascript | CC BY-SA 2.5 | null | 2010-12-13T11:18:00.677 | 2010-12-13T12:08:54.260 | 2010-12-13T11:26:35.250 | 487,608 | 487,608 | [
"javascript"
] |
4,428,413 | 1 | 4,434,805 | null | 75 | 41,094 | A few days back I asked this question:
> [Why does $.getJSON() block the browser?](https://stackoverflow.com/questions/4359906/why-does-getjson-block-the-browser)
I fire six jQuery async ajax requests at the same controller action pretty much all at once. Each request takes 10 seconds to return.
Through debugging and logging requests to the action method I notice that the requests are serialised and never run in parallel. i.e. I see a timeline in my log4net logs like this:
Looking at the network timeline in FireFox I see this:

Both the log sample above and the Firefox network timeline are for the same set of requests.
I'm aware of serialised access to the `Session` object in the same session, but no session data is being touched.
I stripped the client side code down to a single request (the longest running one) but this still blocks the browser, i.e. only when the ajax request completes does the browser respond to any link clicking.
What I also observe here (in Chrome's developer tools) is that upon clicking on a link when a long running ajax request is executing it reports a `Failed to load resource` error immediately which suggests that the browser has killed (or is attempting to kill and waiting?) the ajax request:

However the browser still takes an age to redirect to the new page.
Are ajax requests really asynchronous or is this sleight of hand because javascript is actually single threaded?
Are my requests just taking too long for this to work?
The problem occurs in Firefox and IE as well.
I also changed the script to use `$.ajax` directly and explicitly set `async: true`.
I'm running this on IIS7.5, both the Windows 2008R2 and Windows 7 flavours do the same thing.
Debug and release builds also behave the same.
| Why would multiple simultaneous AJAX calls to the same ASP.NET MVC action cause the browser to block? | CC BY-SA 2.5 | 0 | 2010-12-13T11:37:19.330 | 2018-02-12T14:58:32.113 | 2017-05-23T12:33:56.653 | -1 | 419 | [
"javascript",
"jquery",
"asp.net-mvc",
"ajax",
"asp.net-mvc-2"
] |
4,428,468 | 1 | 4,428,499 | null | 1 | 1,159 | I have seen a new native force close dialog with a new button "Send report" on several apps.

How can I get it for my app?
| Native bug reporting in Android extendng force close dialog? | CC BY-SA 2.5 | null | 2010-12-13T11:44:43.330 | 2011-02-08T00:18:11.797 | 2010-12-13T11:53:32.880 | 433,718 | 433,718 | [
"android",
"unhandled-exception",
"bug-reporting"
] |
4,428,627 | 1 | null | null | 0 | 640 | In my application I have a class for which I need to keep a set of interfaces delivered by the application.
Since the class itself doesn't know all the possible interfaces, it can't simply keep one data member for every interface. Instead, it should keep a vector of interfaces.
In practice this means that I define one 'generic' interface (IGeneric) of which all the more specific interfaces inherit. That way, I can easily keep a vector with all the interfaces (in the code hereafter I replaced the actual interface names by some dummy names; in my application the names are much more meaningful):
```
#include <vector>
#include <windows.h>
class IGeneric
{
public:
virtual ~IGeneric() {}
};
class IFirst : public IGeneric {public: virtual void one() = 0;};
class ISecond : public IGeneric {public: virtual void two() = 0;};
class IThird : public IGeneric {public: virtual void three() = 0;};
class IFourth : public IGeneric {public: virtual void four() = 0;};
typedef std::vector<IGeneric *> GenericContainer;
```
To install the interfaces, other modules (which really know all the interfaces), provide functions to install the interfaces. They could be something like this:
```
void installFirst (GenericContainer &bc, IFirst &b) { bc.push_back(&b); }
void installSecond (GenericContainer &bc, ISecond &b) { bc.push_back(&b); }
void installThird (GenericContainer &bc, IThird &b) { bc.push_back(&b); }
void installFourth (GenericContainer &bc, IFourth &b) { bc.push_back(&b); }
```
In practive, applications will write classes that implement multiple of these interfaces, like this:
```
class DoAll : public IFirst, public ISecond, public IThird, public IFourth
{
public:
virtual void one() {}
virtual void two() {}
virtual void three() {}
virtual void four() {}
DoAll(int i) : m_i(i) {}
private:
int m_i;
```
};
Installing this implementation is now really easy. This is the main routine from my example:
int main()
{
GenericContainer gc;
DoAll all (123);
installFirst(gc,all);
installSecond(gc,all);
installThird(gc,all);
installFourth(gc,all);
DebugBreak();
}
At the breakpoint, I now investigate the contents of the vector in the debugger. It looks like this:

As you can see, it shows that the implementation of the interfaces is DoAll (in all 4 cases), and it even shows as which interface (IFirst, ISecond, ...) DoAll has been installed in the vector.
Problem is that the debugger doesn't seem to be able to show the contents of the most derived class (DoAll). It show the datamember m_i, but it is unable to show the value of m_i.
Only if I explicitly take the first interface address, and cast it to "DoAll *", I can correctly see the contents:

I compile and link using the following commands:
```
cl /c /EHsc /GR /Zi /Od test.cpp
link /debug test.obj
```
Is this a bug in Visual Studio 2010 or am I missing something?
If I use single inheritance, like in this class:
```
class DoFirst : public IFirst
{
public:
virtual void one() {}
DoFirst(int i) : m_i(i) {}
private:
int m_i;
};
```
And install it in the vector like this:
```
DoFirst f (456);
installFirst (gc,f);
```
The debugger shows me the correct values and it also immediately shows the most derived class:

| Visual Studio 2010 debugger doesn't show values when using multiple inheritance | CC BY-SA 2.5 | null | 2010-12-13T12:06:29.120 | 2010-12-13T12:28:41.287 | 2010-12-13T12:28:41.287 | 163,551 | 163,551 | [
"debugging",
"visual-studio-2010",
"multiple-inheritance"
] |
4,428,689 | 1 | 4,429,257 | null | 6 | 4,015 | >
[How to use UTF-8 in resource properties with ResourceBundle](https://stackoverflow.com/questions/4659929/how-to-use-utf-8-in-resource-properties-with-resourcebundle)
I want to allow internationalization to my Java Swing application. I use a bundle file to keep all labels inside it.
As a test I tried to set a Swedish title to a `JButton`. So in the bundle file I wrote:
```
nextStepButton=nästa
```
And in the Java code I wrote:
```
nextStepButton.setText(bundle.getString("nextStepButton"));
```
But the title characters of the button appear wrong at runtime:

I am using the Tahoma font, which supports Unicode.
When I set the button title manually through code it appears fine:
```
nextStepButton.setText("nästa");
```
-------------------------------------------->
I have tried encoding the text coming from the bundle file using the code:
```
nextStepButton.setText(new String(bundle.getString("nextStepButton").getBytes("UTF-8")));
```
And still the result is:

| Why is text in Swedish from a resource bundle showing up as gibberish? | CC BY-SA 3.0 | 0 | 2010-12-13T12:13:10.177 | 2013-01-25T19:37:06.583 | 2017-05-23T12:25:12.027 | -1 | 147,381 | [
"java",
"swing",
"internationalization",
"resourcebundle",
"mojibake"
] |
4,428,730 | 1 | 4,758,498 | null | 7 | 20,253 | I am trying to replicate this feature of Maps in Android:

You can see that on the map, there's a Circle depicting the range that the user has selected.
In my application, I'll also want a dragger to reside on the perimeter of the circle, which can be dragged to redefine radius.
If someone could tell me how to draw custom drawable overlays and 2D graphics over map, I can do other things on my own.
Thanks!
The full application can be reached at [this link](http://www.geochirp.com)
| Creating Custom Overlay on the map | CC BY-SA 2.5 | 0 | 2010-12-13T12:19:48.697 | 2012-02-18T11:35:46.297 | null | null | 243,709 | [
"android",
"android-sdk-2.1",
"android-maps"
] |
4,428,731 | 1 | 4,428,757 | null | 0 | 69 | Can anybody please tell me how they have implemented the below thing whick looks to me like a TabBar but has something different from a simple tabbar.
The thing having "Offer" and "Wall", when each one is clicked, presents a different view.
Any sample code will be appreciated

| Tab Like Selection | CC BY-SA 2.5 | null | 2010-12-13T12:19:50.267 | 2010-12-13T12:36:11.863 | null | null | 410,389 | [
"iphone"
] |
4,428,817 | 1 | 4,429,009 | null | 9 | 29,374 | I have a button on my windows form that calls the RunWorkerAsync() method, this in turn performs an action which then updates a ListBox on the same form.
After the DoWork event has finished I assign the Result for the event (Which is a list), I process the RunWorkerCompleted() event and then perform the following code to update my Listbox

which calls this:

(Apologies, code formatting won't work)
Now when I run the application and press the refresh button the following exception appears:

How would I get around this?
Edit:
The exception is thrown on the folowing statement, this occurs in the DoWork method where I clear the contents to keep the list up to date;
| Accessing UI Control from BackgroundWorker Thread | CC BY-SA 3.0 | 0 | 2010-12-13T12:30:27.953 | 2016-11-22T13:41:33.273 | 2016-11-22T13:41:33.273 | 107,625 | 218,159 | [
"c#",
"winforms",
"asynchronous",
"udp"
] |
4,428,880 | 1 | 4,443,689 | null | 8 | 5,818 | Basically I am having two problems with C#.NET MDI. You can download VS2010 solution which reproduces bugs [here](http://dl.dropbox.com/u/8060472/MDI.zip).
1) When programmatically hiding and showing again a maximized child form, it is not maximized properly again and becomes neither maximized or in normal state.
```
childForm = new Form();
childForm.Text = "Child Form";
childForm.MdiParent = this;
...
private void showButton_Click(object sender, EventArgs e)
{
childForm.Visible = true;
}
...
private void hideButton_Click(object sender, EventArgs e)
{
childForm.Visible = false;
}
```
When child form is maximized, then programicaly hidden and shown again, it becomes something like this (please notice the menu bar - child form's control box appears, but child form is not maximized):

At this stage, child form cannot be moved around. However, I found a workaround for that, simply by showing and hiding a dummy child form, which forces the actual child form to become properly maximized. But this makes MDI area to flicker. Tried Invalidate, Refresh, Update methods, but they don't help. Maybe there are other workarounds to overcome this bug and not to make MDI area flicker with dummy child form?
```
private void workaround1Button_Click(object sender, EventArgs e)
{
dummyForm.Visible = true;
dummyForm.Visible = false;
}
```
2) When child form is maximized, the icon of the child form is displayed on menu bar. However, if you have to change the icon while the child form is maximized, the icon on the menu bar is not being refreshed (see the image above). I found a workaround for that too, which basically hides and shows menu bar. Icon gets refreshed, but it makes everything below menu bar to flicker. Tried Invalidate, Refresh, Update methods, but they don't help. Is there any other way to make menu bar to refresh the child form's icon?
```
private void workaround2Button_Click(object sender, EventArgs e)
{
menuStrip.Visible = false;
menuStrip.Visible = true;
}
```
---
Also I noticed that when parent form is in normal window state mode (not maximized) and you change the width or height of the form by 1 pixel, child form becomes maximized as it should be and child form's icon on menu bar gets refreshed properly and you don't need other workaround I described above. If I change the size of the form programicaly, form flickers by 1 pixel and I cannot do that, when parent form is maximized. Is there any way how I could invoke the repaint/refresh functionality which is called when you resize a form and which makes child form become maximized properly and the icon on the menu bar refreshed?
| C#.NET MDI bugs when programmatically hiding and showing again a maximized child form and when maximized, child form's icon cannot be changed | CC BY-SA 3.0 | 0 | 2010-12-13T12:36:54.967 | 2017-12-08T14:11:19.737 | 2017-12-08T14:11:19.737 | 1,033,581 | 341,310 | [
"c#",
".net",
"mdi"
] |
4,429,088 | 1 | 4,429,162 | null | 0 | 1,613 | I like to bring a chart as shown

By using rapheal. Its very tough for me to learn it. show me some live example with code to draw verticalbar graph.
My data values
x-axis {1,2,3,4,5} This is an id of question
y-axis {10,20,30,40,7} This represent number of visits of question
I need bar graph with x,y values in plot and label for each axis and for graph
| Bar chart using raphaël | CC BY-SA 2.5 | 0 | 2010-12-13T13:06:43.233 | 2010-12-13T13:25:59.477 | 2010-12-13T13:25:59.477 | 107,009 | 524,723 | [
"javascript",
"jquery",
"raphael"
] |
4,429,233 | 1 | 4,429,340 | null | 0 | 65 | In today's web applications where there are inline edits, enhanced by javascript etc, how do I markup forms. Eg. in the below web application [Speckle](http://speckleapp.com/)

There are
- - -
Is there a need to have a `<form>` element at all? Do I wrap the whole app with `<form>` or maybe I have multiple `<form>` for each inline edit like Speckle? But I don't find any `<form>` warping the checkboxes
| Marking up HTML Forms in Today's Web Apps | CC BY-SA 2.5 | null | 2010-12-13T13:26:09.103 | 2010-12-13T13:39:10.807 | null | null | 292,291 | [
"html",
"web-applications"
] |
4,429,256 | 1 | 4,429,289 | null | 2 | 2,531 | That plugin was able to arrange elements to remove empty spaces between them.
Example:

| What's the name of jQuery plugin which auto arranges div/image elements on page? | CC BY-SA 3.0 | 0 | 2010-12-13T13:29:03.643 | 2011-12-07T23:44:17.927 | 2011-12-07T23:44:17.927 | 84,042 | 450,441 | [
"javascript",
"jquery"
] |
4,429,452 | 1 | 4,430,510 | null | 3 | 7,523 | and thanks for the help.
I am having a somewhat confusing issue with IE7 when using margins.
I have a contaner, and inside that container I have some floated boxes.
These boxes have margins applied, top, right, left, bottom, except the first box that has no margin on the left, and the last box that has no margin on the right.
Looks fine in all browsers except IE7, where the margin is not applying for the first element in each row (at least this is what I think is happening.
If I remove margin right in ie7 using the dev tools and then check it back on it displays correctly.
Has anyone seen anything like this before?
I am stumped.
It appears to being caused by position:relative on the container divs. Changing this back to static fixes the margin issue, but now means my divs are mis aligned in ie7. Does anyone know why position relative would screw up margins??
Example download can be found here:
www.jimplode.co.uk/content/stackoverflow.zip
Incorrect view

Correct Margins, after unchecking and rechecking just one of the margin styles.

```
<div class="lowerContent">
<div class="mediumContentBox contentBoxMarginTop contentBoxMarginRight contentBoxMarginBottom">
<div class="expandableBox">
<div class="topLeft">
<div class="topRight">
<div class="top"></div>
</div>
</div>
<div class="middleLeft">
<div class="middleRight">
<div class="middle">
<img src="/images/frame/transparent.gif" alt="spacer"width="0" height="215" class="fl" />
<div class="textContainer">
<h1>Car Insurance</h1>
<ul>
<li>Protected NCD for life</li>
<li>NCD Accelerator</li>
<li>European Cover Included</li>
<li>Multiple Drivers and Vehicles</li>
<li>Breakdown Cover Included</li>
<li>Legal Cover Included</li>
</ul>
<div class="boxButtons">
<a class="smallButtonLeft" href="#"><span>GET A QUOTE</span></a><a class="smallButtonRight" href="#"><span>FIND OUT MORE</span></a>
</div>
</div>
<div class="imageContainer">
<img src="/images/misc/boxphoto_1.jpg" alt="box image 0" />
</div>
<div class="emptyClear"></div>
</div>
</div>
</div>
<div class="bottomLeft">
<div class="bottomRight">
<div class="bottom">
</div>
</div>
</div>
</div>
</div>
<div class="smallContentBox contentBoxMarginTop contentBoxMarginLeft contentBoxMarginRight contentBoxMarginBottom">
<div class="expandableBox">
<div class="topLeft">
<div class="topRight">
<div class="top"></div>
</div>
</div>
<div class="middleLeft">
<div class="middleRight">
<div class="middle">
<img src="/images/frame/transparent.gif" alt="spacer"width="0" height="215" class="fl" />
<div class="textContainer">
<h2>Home Insurance</h2>
<div class="imageContainer">
<img src="/images/misc/boxphoto_2.jpg" alt="box image 2" />
</div>
<ul>
<li>Working at home Equipment</li>
<li>Helmet and Leathers</li>
<li>Legal Cover</li>
<li>Caravan Cover</li>
<li>Personal Accident Cover</li>
</ul>
<div class="boxButtons">
<a class="smallButtonLeft" href="#"><span>GET A QUOTE</span></a><a class="smallButtonRight" href="#"><span>FIND OUT MORE</span></a>
</div>
</div>
<div class="emptyClear"></div>
</div>
</div>
</div>
<div class="bottomLeft">
<div class="bottomRight">
<div class="bottom">
</div>
</div>
</div>
</div>
</div>
<div class="smallContentBox contentBoxMarginTop contentBoxMarginLeft contentBoxMarginBottom">
<div class="expandableBox">
<div class="topLeft">
<div class="topRight">
<div class="top"></div>
</div>
</div>
<div class="middleLeft">
<div class="middleRight">
<div class="middle">
<img src="/images/frame/transparent.gif" alt="spacer"width="0" height="215" class="fl" />
<div class="textContainer">
<h2>Life Insurance</h2>
<div class="imageContainer">
<img src="/images/misc/boxphoto_3.jpg" alt="box image 3" />
</div>
<ul>
<li>Cover From £5 a month</li>
<li>Your loved ones protected</li>
<li>Immediate cover available</li>
<li>We search, you save</li>
</ul>
<div class="boxButtons">
<a class="smallButtonLeft" href="#"><span>GET A QUOTE</span></a><a class="smallButtonRight" href="#"><span>FIND OUT MORE</span></a>
</div>
</div>
<div class="emptyClear"></div>
</div>
</div>
</div>
<div class="bottomLeft">
<div class="bottomRight">
<div class="bottom">
</div>
</div>
</div>
</div>
</div>
<div class="emptyClear"></div>
<div class="smallContentBox contentBoxMarginTop contentBoxMarginRight">
<div class="expandableBox">
<div class="topLeft">
<div class="topRight">
<div class="top"></div>
</div>
</div>
<div class="middleLeft">
<div class="middleRight">
<div class="middle">
<img src="/images/frame/transparent.gif" alt="spacer"width="0" height="140" class="fl" />
<div class="imageContainerAlternate">
<img src="/images/misc/boxphoto_4.jpg" alt="box image 4" />
</div>
<div class="boxButtons">
<a class="smallButtonLeft" href="#"><span>GET A QUOTE</span></a><a class="smallButtonRight" href="#"><span>FIND OUT MORE</span></a>
</div>
<div class="emptyClear"></div>
</div>
</div>
</div>
<div class="bottomLeft">
<div class="bottomRight">
<div class="bottom">
</div>
</div>
</div>
</div>
</div>
<div class="smallContentBox contentBoxMarginTop contentBoxMarginRight contentBoxMarginLeft">
<div class="expandableBox">
<div class="topLeft">
<div class="topRight">
<div class="top"></div>
</div>
</div>
<div class="middleLeft">
<div class="middleRight">
<div class="middle">
<img src="/images/frame/transparent.gif" alt="spacer"width="0" height="140" class="fl" />
<div class="imageContainerAlternate">
<img src="/images/misc/boxphoto_5.jpg" alt="box image 5" />
</div>
<div class="boxButtons">
<a class="smallButtonLeft" href="#"><span>GET A QUOTE</span></a><a class="smallButtonRight" href="#"><span>FIND OUT MORE</span></a>
</div>
<div class="emptyClear"></div>
</div>
</div>
</div>
<div class="bottomLeft">
<div class="bottomRight">
<div class="bottom">
</div>
</div>
</div>
</div>
</div>
<div class="smallContentBox contentBoxMarginTop contentBoxMarginRight contentBoxMarginLeft">
<div class="expandableBox">
<div class="topLeft">
<div class="topRight">
<div class="top"></div>
</div>
</div>
<div class="middleLeft">
<div class="middleRight">
<div class="middle">
<img src="/images/frame/transparent.gif" alt="spacer"width="0" height="140" class="fl" />
<div class="imageContainerAlternate">
<img src="/images/misc/boxphoto_6.jpg" alt="box image 6" />
</div>
<div class="boxButtons">
<a class="smallButtonLeft" href="#"><span>GET A QUOTE</span></a><a class="smallButtonRight" href="#"><span>FIND OUT MORE</span></a>
</div>
<div class="emptyClear"></div>
</div>
</div>
</div>
<div class="bottomLeft">
<div class="bottomRight">
<div class="bottom">
</div>
</div>
</div>
</div>
</div>
<div class="smallContentBox contentBoxMarginTop contentBoxMarginLeft">
<div class="expandableBox">
<div class="topLeft">
<div class="topRight">
<div class="top"></div>
</div>
</div>
<div class="middleLeft">
<div class="middleRight">
<div class="middle">
<img src="/images/frame/transparent.gif" alt="spacer"width="0" height="140" class="fl" />
<div class="imageContainerAlternate">
<img src="/images/misc/boxphoto_7.jpg" alt="box image 7" />
</div>
<div class="boxButtons">
<a class="smallButtonLeft" href="#"><span>GET A QUOTE</span></a><a class="smallButtonRight" href="#"><span>FIND OUT MORE</span></a>
</div>
<div class="emptyClear"></div>
</div>
</div>
</div>
<div class="bottomLeft">
<div class="bottomRight">
<div class="bottom">
</div>
</div>
</div>
</div>
</div>
<div class="emptyClear"></div>
</div>
```
```
.lowerContent
{
position:relative;
margin:0px 0px 0px 0px;
}
.expandableBox
{
display:block;
width:100%;
}
.expandableBox .top
{
background-image:url("/images/backgrounds/bkg_whitebox_t.png");
background-repeat: repeat-x;
height:10px;
}
.expandableBox .topLeft
{
height:10px;
padding:0px 0px 0px 10px;
background-image:url("/images/backgrounds/bkg_whitebox_tl.png");
background-repeat: no-repeat;
background-position:left top;
}
.expandableBox .topRight
{
height:10px;
padding:0px 10px 0px 0px;
background-image:url("/images/backgrounds/bkg_whitebox_tr.png");
background-repeat: no-repeat;
background-position:right top;
}
.expandableBox .middleLeft
{
padding:0px 0px 0px 10px;
background-image:url("/images/backgrounds/bkg_whitebox_l.png");
background-repeat: repeat-y;
background-position:left top;
}
.expandableBox .middle
{
background-color:#FFFFFF;
}
.expandableBox .middleRight
{
padding:0px 10px 0px 0px;
background-image:url("/images/backgrounds/bkg_whitebox_r.png");
background-repeat: repeat-y;
background-position:right top;
}
.expandableBox .bottom
{
background-image:url("/images/backgrounds/bkg_whitebox_b.png");
background-repeat: repeat-x;
background-position:bottom;
height:10px;
margin-bottom:7px;
}
.expandableBox .bottomLeft
{
height:10px;
padding:0px 0px 0px 10px;
background-image:url("/images/backgrounds/bkg_whitebox_bl.png");
background-repeat: no-repeat;
background-position:left bottom;
}
.expandableBox .bottomRight
{
height:10px;
padding:0px 10px 0px 0px;
background-image:url("/images/backgrounds/bkg_whitebox_br.png");
background-repeat: no-repeat;
background-position:right bottom;
}
.contentBoxMarginLeft
{
margin-left:10px;
}
.contentBoxMarginRight
{
margin-right:10px;
}
.contentBoxMarginTop
{
margin-top:10px;
}
.contentBoxMarginBottom
{
margin-bottom:10px;
}
.fullContentBox
{
width:940px;
float:left;
}
.largeContentBox
{
width:700px;
float:left;
}
.mediumContentBox
{
width:460px;
float:left;
}
.smallContentBox
{
width:220px;
float:left;
}
.mediumContentBox .textContainer
{
float:left;
width:210px;
}
.mediumContentBox .imageContainer
{
float:right;
width:210px;
}
.smallContentBox .textContainer
{
}
.smallContentBox .textContainer .imageContainer
{
float:right;
padding:5px 0px 0px 0px;
}
.smallContentBox .imageContainerAlternate
{
float:left;
padding:0px 0px 0px 0px;
}
a.smallButtonLeft,
a.smallButtonRight
{
display:inline-block;
background-image:url('/images/backgrounds/bkg_sprites_buttons.png');
height:30px;
background-position:left top;
background-repeat:no-repeat;
padding:0px 10px;
line-height:23px;
color: #0F4DBC;
font-family: Arial,Helvetica,sans-serif;
font-weight: bold;
text-decoration: none;
text-transform: capitalize;
}
a.smallButtonLeft:hover
{
background-position:left -44px;
}
a.smallButtonRight
{
background-position:right -217px;
color: #4D4F52;
}
a.smallButtonRight:hover
{
background-position:right -262px;
}
.boxButtons
{
float:left;
padding:10px 0px 0px 0px;
}
.smallContentBox .boxButtons
{
width:200px;
text-align:center;
}
```
Thanks in advance.
| IE7 margin issue | CC BY-SA 2.5 | null | 2010-12-13T13:50:50.030 | 2010-12-13T15:38:47.220 | 2010-12-13T15:29:52.710 | 455,936 | 455,936 | [
"html",
"css",
"internet-explorer-7"
] |
4,429,829 | 1 | 4,430,892 | null | 0 | 1,311 | I have a binary file with the following contents:

The following code is used to read this contents in old VB6 program:
```
Private Type tpClient
Firstname As String
LastName As String
Birth As String
Adres As String
Geslacht As String
IDNummer As Long
SSNummer As String
DatabaseID As Long
Telefoon1 As String
Telefoon2 As String
End Type
Open strFilePath For Random Access Read As #intFileNumber
Get #intFileNumber, 1, ClientData ' ClientData is of type tpClient
```
Now I'm trying to read this with my new C# program:
```
[StructLayout(LayoutKind.Sequential, Pack = 1)]
public struct PatientStruct
{
[MarshalAs(UnmanagedType.BStr)]
public string FirstName;
[MarshalAs(UnmanagedType.BStr)]
public string LastName;
[MarshalAs(UnmanagedType.BStr)]
public string BirthDate;
[MarshalAs(UnmanagedType.BStr)]
public string Address;
[MarshalAs(UnmanagedType.BStr)]
public string Gender;
[MarshalAs(UnmanagedType.BStr)]
public string IdNumber;
[MarshalAs(UnmanagedType.BStr)]
public string SsNumber;
[MarshalAs(UnmanagedType.BStr)]
public string DatabaseId;
[MarshalAs(UnmanagedType.BStr)]
public string Telephone1;
[MarshalAs(UnmanagedType.BStr)]
public string Telephone2;
}
byte[] buffer = new byte[stream.Length];
stream.Read(buffer, 0, (int)stream.Length);
GCHandle handle = GCHandle.Alloc(buffer, GCHandleType.Pinned);
T stuff = (PatientStruct)Marshal.PtrToStructure(handle.AddrOfPinnedObject(), typeof(T));
handle.Free();
```
However, I get an AccessViolationException on the call to Marshal.PtrToStructure.
Any suggestions?
| Read variable sized string from binary file (VB6 vs. C#) | CC BY-SA 2.5 | 0 | 2010-12-13T14:33:16.280 | 2010-12-13T16:15:06.047 | 2010-12-13T15:36:06.137 | 310,574 | 97,060 | [
"c#",
".net",
"vb6",
"binary"
] |
4,430,637 | 1 | null | null | 0 | 138 | i put this question in this forum because i am not sure whether this is an eclipse error or an Android error.
yesterday i created an Android application using Google Maps and GPS on Eclipse and it build and ran successfully however today i wanted to do some modification to the code so i started eclipse but it gave me an error.
```
SDK parse failed
```
if i try to run it. it says the apk cannot find. how can that be happened? the same application ran successfully on the same environment yesterday. i am using Ubuntu 10.04
Thanks !!

| Android application giving a weird error in Eclipse | CC BY-SA 2.5 | null | 2010-12-13T15:51:10.617 | 2010-12-14T00:19:05.263 | 2010-12-13T16:13:07.970 | 434,375 | 434,375 | [
"android",
"eclipse"
] |
4,430,701 | 1 | 4,430,953 | null | 0 | 222 | I am trying to develop an android widget that should show the latest news, but only one at a time. To see the next post the user could press arrow buttons.
I want it to look something like this:

What control should I use for this??
| Android: Help with widget that shows news | CC BY-SA 2.5 | 0 | 2010-12-13T15:57:40.237 | 2010-12-13T16:22:33.677 | null | null | 297,410 | [
"android",
"android-widget",
"widget"
] |
4,431,064 | 1 | 4,431,107 | null | 0 | 306 | Here is image ,

I want to know how to get nearest point to a given point [can be anywhere] [green one] , for array of points. By seeing we can get, but how to do same in code ?
| how to get nearest point to a given point in points of polygon? | CC BY-SA 2.5 | null | 2010-12-13T16:35:21.953 | 2010-12-14T00:52:05.863 | null | null | 496,841 | [
"wpf"
] |
4,431,292 | 1 | 5,542,116 | null | 92 | 84,475 | I have the following CALayer:
```
CAGradientLayer *gradient = [CAGradientLayer layer];
gradient.frame = CGRectMake(8, 57, 296, 30);
gradient.cornerRadius = 3.0f;
gradient.colors = [NSArray arrayWithObjects:(id)[RGB(130, 0, 140) CGColor], (id)[RGB(108, 0, 120) CGColor], nil];
[self.layer insertSublayer:gradient atIndex:0];
```
I'd like to add an effect to it, but I am not quite sure how to do this. I suppose I would be required to draw in drawRect, however this would add the layer on top of other UIView objects, since it's supposed to be a bar behind some buttons, so I am at a loss as to what to do?
I could add another layer, but again, not sure how to achieve the inner shadow effect (like this:

Help appreciated...
| Inner shadow effect on UIView layer? | CC BY-SA 3.0 | 0 | 2010-12-13T16:55:37.760 | 2021-06-08T16:48:46.397 | 2012-05-13T23:30:14.047 | 118,091 | 118,091 | [
"iphone",
"core-graphics",
"calayer"
] |
4,431,440 | 1 | null | null | 0 | 1,022 | I'm trying to get a standard Ribbon Control working using VS 2010 on Windows XP. I've downloaded/installed the latest version of the Ribbon Control (October 2010) from the [Microsoft Download Centre](http://www.microsoft.com/downloads/en/details.aspx?FamilyID=2BFC3187-74AA-4154-A670-76EF8BC2A0B4&displaylang=en). From here I created a new project with the "WPF Ribbon Application" template.
The control itself works fine, but it seems to apply the Windows 2000 theme to the Minimise/Maximise/Close buttons, as can be seen in this screenshot:

I've tried changing the main window style to Aero in app.xaml (no effect on top right controls). I also tried (and failed) to set the Ribbon style to Office2007 (apparently the most recent version of the ribbon control has [removed this feature](http://social.msdn.microsoft.com/Forums/en/wpf/thread/bdd38687-4183-48bb-a982-0b8da5d82b9a)).
Did I install something incorrectly? I installed both the *.msi files in the link. Am I missing a reference?
Any help would be much appreciated.
| Ribbon Control showing Windows 2000 Minimise/Maximise/Close buttons | CC BY-SA 2.5 | 0 | 2010-12-13T17:10:43.347 | 2014-03-07T09:27:31.907 | null | null | 54,557 | [
"wpf",
"wpf-controls",
"ribbon"
] |
4,431,542 | 1 | 4,431,654 | null | 3 | 2,592 | I am working on a project that at it's core involves adding text to an image, so as an example given a background image (B) and some text in a specified font, point size and font (A) the two are composited together to produce (C):

The eventual result is to go to print with these images, so the backgrounds are using the CMYK Color Space and I need to keep the whole process within CMYK or the colors look wrong when printed. ( excellent [article on Color Spaces and .NET on CodeProject](http://www.codeproject.com/KB/recipes/colorspace1.aspx))
I have tried several different ways of compositing these images together:
- - -
I have looked at but not tried third party commercial components as the prices seem to start high and continue going up:
- [Graphics Mill](http://imaging.aurigma.com/)- [Atalasoft DotImage](http://www.atalasoft.com/products/dotimage/)
Is this possible in .NET 4?
Because someone else might want to do something slightly different and just convert any format that `Windows.System.Media.Imaging` is able to load to CMYK here is the code I have used:
```
var bitmapConverter = new FormatConvertedBitmap();
bitmapConverter.BeginInit();
bitmapConverter.Source = sourceImage;
bitmapConverter.DestinationFormat = PixelFormats.Cmyk32;
bitmapConverter.EndInit();
```
To clarify the above code converts an image source to CMYK32 (no transparency) however if you are using certain classes (namely `RenderTargetBitmap` passing the above ImageSource will throw an exception).
| How to add text to images with the CMYK ColorSpace in .NET 4 | CC BY-SA 2.5 | null | 2010-12-13T17:22:12.370 | 2010-12-14T09:56:29.510 | 2010-12-14T09:56:29.510 | 74,302 | 74,302 | [
"c#",
".net",
"imaging",
"cmyk"
] |
4,431,609 | 1 | 4,440,093 | null | 0 | 99 | I am coming from CVS background.
I try to perform branch by cloning.
The current default tree looks like this from `hello` project.

---
1. I try to clone a project out from 'hello' to 'hello-branch-by-clone'.
2. I did modification on 'hello-branch-by-clone' and commit.
3. I did not do any modification on 'hello'.
4. I perform push from 'hello-branch-by-clone' to 'hello'.

I expect to see a but I didn't.
---
This time, I try another way around.
1. I did modification on 'hello-branch-by-clone' and commit.
2. I did modification on 'hello' and commit.
3. I need to pull from 'hello' to 'hello-branch-by-clone', and merge.
4. I perform push from 'hello-branch-by-clone' to 'hello'.
This time, then only I can see the

---
By applying cloning technique, is there any way I can have a view, without having explicitly modify the default repository (`hello`)
| Branch by cloning - Must I make modification on default in order to see the branch? | CC BY-SA 2.5 | null | 2010-12-13T17:29:33.503 | 2010-12-14T14:18:08.110 | 2010-12-13T17:51:02.713 | 72,437 | 72,437 | [
"mercurial"
] |
4,432,080 | 1 | 4,432,161 | null | 1 | 107 | I have two webforms that is used to keep track of confirmations of orders. They interact with the same MySQL database.
This is the database:

The first webform is used to register an order by the customer service personnel. It only contain the order number used in the internal systems and a time stamp (timelavet).
This is the code for that (and it works):
```
// Save data
$mySQLQuery = "INSERT INTO bestilling SET godkendelse = '" . mysql_real_escape_string($_POST['godkendelse']) . "', ordre = '" . mysql_real_escape_string($_POST['ordrenummer']) . "', timelavet = NOW() ";
$rs = @mysql_query($mySQLQuery);
```
The second form is used by the customer to confirm the order plus provide some extra information AND a time stamp for the confirmation (timegodkend). It uses the order number to indentify what DB entry to update:
```
// Save data
$mySQLQuery = "UPDATE bestilling SET kursusleder = '" . mysql_real_escape_string($_POST['kursusleder']) . "', telefonnummer = '" . mysql_real_escape_string($_POST['telefonnummer']) . "', email = '" . mysql_real_escape_string($_POST['email']) . "', godkendelse = '" . mysql_real_escape_string($_POST['godkendelse']) . "', kommentar = '" . mysql_real_escape_string($_POST['kommentar']) . "', timegodkend = NOW() " . "' WHERE ordre = '" . mysql_real_escape_string($_POST['ordre']). "'";
$rs = @mysql_query($mySQLQuery);
```
It doesn´t work! The funny thing is I can get it to work without the timegodkend variable but no matter where I put the "', timegodkend = NOW() “, it gives me an error message
The error:
> 1064: You have an error in your SQL
syntax; check the manual that
corresponds to your MySQL server
version for the right syntax to use
near '', WHERE ordre = '238581'' at
line 1 When executing: UPDATE
bestilling SET kursusleder = 'test1',
telefonnummer = '2345678', email =
'[email protected]', godkendelse = 'Ja',
kommentar = 'test', timegodkend =
NOW() ', WHERE ordre = ‘238581’
Whats wrong with the second code snippet?
| Update to mysql entry failing, can´t identify the problem, probably related to a timestamp | CC BY-SA 2.5 | null | 2010-12-13T18:17:32.603 | 2010-12-15T03:44:10.240 | 2010-12-15T03:44:10.240 | 227,665 | 368,438 | [
"php",
"mysql",
"mysql-error-1064"
] |
4,432,164 | 1 | 4,432,348 | null | 0 | 1,943 | When you have multiple selections enabled for a table and select some cells, the selected cell have a red checkmark on the LEFT side. (see picture) Don't mistake with the right side checkmark.
I have this in place
```
-(UITableViewCellEditingStyle)tableView:(UITableView*)tableView editingStyleForRowAtIndexPath:(NSIndexPath*)indexPath {
return UITableViewCellAccessoryCheckmark;
}
```
Everything is fine. When I tap a cell a red check appears on the LEFT side.
At some point I have to iterate thru the table to discover which cells have this left checkmark.
As far as I tested this is not an accessoryType or a editingStyle. At least in my tests no cell could be detected as selected testing for these properties.
thanks

| iphone - table with multiple selections | CC BY-SA 2.5 | 0 | 2010-12-13T18:26:27.473 | 2011-09-06T15:51:30.193 | 2010-12-13T18:58:22.007 | 316,469 | 316,469 | [
"iphone"
] |
4,432,456 | 1 | 4,434,988 | null | 1 | 305 | I have tried everything.. GD will not enable! Essentially, I have
```
extension_dir="C:\PHP\ext"
extension=php_gd2.dll
```
I've added `c:\php\ext` and `c:\php` to my windows path variable. I copied `php_gd2.dll` to my `system32` folder.. I've scanned my entire INI file to see if there was any other reference to the extension_dir, or GD2.dll extension line, and nothing... GD Still will not enable.
I changed the `php.ini` files in my `C:\PHP` folder as well as my `C:\WINNT` folders - actually they both show that GD should be enabled - I also upped the memory from `8M` to `32M` in both files and no luck, still.
We are moving the darn thing to a different server. It's not worth all of the time trying to get this darn thing working. Thanks to all that contributed.
[phpinfo() Link (http://netcomdevelopment.com/test.php)](http://www.netcomdevelopment.com/test.php)

| Getting GD2 to work on Windows 2000 SP4 (PHP 5.1.6) | CC BY-SA 2.5 | null | 2010-12-13T18:57:35.680 | 2010-12-17T14:05:14.780 | 2010-12-17T14:05:14.780 | 83,809 | 83,809 | [
"php",
"windows-server-2000",
"gd2"
] |
4,432,477 | 1 | null | null | 0 | 557 | I came across this question when studying for finals, and I can't seem to get it to work. The question itself is shown below. Any help regarding how to tackle this would be greatly appreciated.
Below is the code from a similar question I tackled. I hope it can be used as a basis on tackling this question
```
#include <stdio.h>
#include <stdlib.h>
#include <cmath>
using namespace std;
double f(double x)
{
return (cos(x));
}
/*::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
Numerical Differentiation Formulae (n-th derivative)
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::*/
void dnf_dxn (int n, double x, double h, double& fd, double& cd)
{
if(n==1)
// Approximation to the 1st Derivative of f at x
{
// 1st order forward differencing
fd = ( f(x+h) - f(x) ) / h;
// 2nd order centered differencing
cd = ( f(x+h) - f(x-h) ) / (2*h);
}
else if(n==2)
// Approximation to the 2nd Derivative of f at x
{
// 1st order forward differencing
fd = ( f(x+2*h) - 2*f(x+h) + f(x) ) / (h*h);
// 2nd order centered differencing
cd = ( f(x+h) - 2*f(x) + f(x-h) ) / (h*h);
}
else if(n==3)
// Approximation to the 3rd Derivative of f at x
{
// 1st order forward differencing
fd = ( f(x+3*h) - 3*f(x+2*h) + 3*f(x+h) - f(x) ) / (h*h*h);
// 2nd order centered differencing
cd = ( f(x+2*h) - 2*f(x+h) + 2*f(x-h) - f(x-2*h) ) / (2*h*h*h);
}
else
{
printf("Only derivatives of orders 1, 2 and 3 are implemented. \n");
getchar();
exit(1);
}
}
/*::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
NUM_DIFF M A I N P R O G R A M
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::*/
int main()
{
printf("\n Numerical Differentiation of f(x)=cos(x) at x=1 \n \n");
printf(" Derivative of order 1, 2 and 3 using forward \n");
printf(" and centered difference approximations (h=0.01): \n \n");
double x = 0.5;
double h = 0.01;
int n;
double fd, cd, exact, cd_error, fd_error;
double true_fx = - sin(x);
double true_fxx = - cos(x);
double true_fxxx = sin(x);
printf("Derivative Stepsize Differencing Result Abs Error \n");
for(n=1; n<4; n++)
{
dnf_dxn (n, x, h, fd, cd);
if(n==1)
{ exact = true_fx; }
else if(n==2)
{ exact = true_fxx; }
else
{ exact = true_fxxx; }
fd_error = abs(exact - fd);
cd_error = abs(exact - cd);
printf(" %i %4.2f Forward %10.7f %10.3e \n",
n, h, fd, fd_error);
printf(" Centered %10.7f %10.3e \n",
cd, cd_error);
}
printf("\n \n <Press the RETURN key to exit num_diff.cpp> \n \n");
getchar();
}
```
Here is the actual question:

| Centered-Difference Approximations in C | CC BY-SA 3.0 | null | 2010-12-13T19:00:22.027 | 2012-07-26T08:18:51.423 | 2012-07-26T08:18:51.423 | 812,149 | 540,952 | [
"c",
"approximation"
] |
4,432,770 | 1 | 4,439,390 | null | 1 | 6,769 | I am getting few issues with RadGrid. One is I have GridClientSelectColumn in RadGrid. I am able to select all checkboxes using header checkbox but I am not able to select individual ones. Another is when I click the row I am changing the background color of a row but it's not coming fully. Only half of the row is changing the color (see image 1). Another one is I have RadMenu in CommandItem template. Which is not displaying properly (see image 2). Here is my code.....
```
<telerik:RadGrid ID="gvPjtMnt" runat="server" AutoGenerateColumns="false" Height="600px"
BorderWidth="2px" BorderStyle="Solid" BackColor="White" AllowPaging="True" PagerStyle-AlwaysVisible="true"
PageSize="20" AllowSorting="True" OnNeedDataSource="gvPjtMnt_OnNeedDataSource"
AllowFilteringByColumn="true" OnItemCommand="gvPjtMnt_ItemCommand" OnItemCreated="gvPjtMnt_ItemCreated"
OnItemDataBound="gvPjtMnt_ItemDataBound" OnPreRender="gvPjtMnt_PreRender" AllowMultiRowSelection="true"
ClientSettings-Selecting-AllowRowSelect="true">
<HeaderStyle Height="20px" BackColor="#004000" Font-Size="8pt" Font-Bold="True" ForeColor="White"
HorizontalAlign="Center" BorderColor="White" BorderWidth="1px" />
<AlternatingItemStyle BackColor="#F5F5E9" HorizontalAlign="Center" BorderColor="White" />
<ItemStyle HorizontalAlign="Center" />
<MasterTableView GridLines="None" DataKeyNames="ProjectId" CommandItemDisplay="Top">
<CommandItemTemplate>
<table style="width: 100%">
<tr align="right">
<td style="width: 75%">
<telerik:RadMenu ID="RadMenu1" runat="server" EnableRoundedCorners="true" EnableShadows="true"
EnableAjaxSkinRendering="true">
<Items>
<telerik:RadMenuItem Text="Text" CssClass>
<Items>
<telerik:RadMenuItem ImageUrl="Images/comment-icon.png" Value="1" NavigateUrl="javascript:validateChkUpdate()"
Text="Add Notes">
</telerik:RadMenuItem>
<telerik:RadMenuItem ImageUrl="Images/OrdUpdate.gif" Value="2" NavigateUrl="javascript:validateChkUpdate()"
Text="Bulk Updates">
</telerik:RadMenuItem>
</Items>
</telerik:RadMenuItem>
</Items>
</telerik:RadMenu>
</td>
<td align="right">
<asp:LinkButton ID="lnkshwFilter" Text="ShowFilter" Font-Underline="true" ForeColor="MidnightBlue"
runat="server" OnClientClick="return showFilterItem()" />
<asp:LinkButton ID="lnkhdFilter" Text="HideFilter" Font-Underline="true" ForeColor="MidnightBlue"
runat="server" OnClientClick="return hideFilterItem()" />
</td>
<td align="right">
<asp:LinkButton ID="lnkclrFilter" Text="ClearFilter" Font-Underline="true" ForeColor="MidnightBlue"
runat="server" OnClick="lnkclrFilter_Click"></asp:LinkButton>
</td>
<td align="right">
Total Records found: <asp:Label ID="lblTotRecCount" runat="server" Font-Bold="True"
Font-Size="10pt" ForeColor="Black" Text="0"></asp:Label>
</td>
<td align="right" valign="middle">
<asp:ImageButton ID="lnkExportAll" ImageUrl="~/images/Excel.png" ToolTip="Export All"
runat="server" OnClick="ExportAll_Click" />
</td>
<td align="right" valign="middle">
<asp:ImageButton ID="ExportToExcelButton" runat="server" ImageUrl="~/images/ExportToExcel.gif"
ToolTip="Export to Excel" OnClick="ExportExcel_Click" />
</td>
</tr>
</table>
</CommandItemTemplate>
<Columns>
<telerik:GridClientSelectColumn UniqueName="CheckboxSelectColumn" HeaderStyle-Width="3%">
</telerik:GridClientSelectColumn>
<telerik:GridBoundColumn DataField="ProjectId" UniqueName="ProjectId" Visible="false">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn HeaderText="LOB" DataField="LOB" UniqueName="LOB">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn HeaderText="Division Name" DataField="Division" UniqueName="Division">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn HeaderText="Region Name" DataField="MarketName" UniqueName="MarketName">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn HeaderText="Project Name" DataField="ProjectName" UniqueName="ProjectName">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn HeaderText="Project Manager Name" DataField="ProjectMgrName"
UniqueName="ProjectMgrName">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn HeaderText="Number Of Sites Received" DataField="NumSitesReceived"
UniqueName="NumSitesReceived">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn HeaderText="Accept Service Order Date" DataField="AcceptServiceOrderTaskCompleteDate"
UniqueName="AcceptServiceOrderTaskCompleteDate" DataFormatString="{0:MM/dd/yyyy}">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn HeaderText="PTD" DataField="PTD" UniqueName="PTD" DataFormatString="{0:MM/dd/yyyy}">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn HeaderText="Health Reason" DataField="HealthReason" UniqueName="HealthReason">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn HeaderText="Project Health" DataField="ProjectHealth" UniqueName="ProjectHealth">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn HeaderText="Customer Signed Date" DataField="CustomerSignedDate"
UniqueName="CustomerSignedDate" DataFormatString="{0:MM/dd/yyyy}">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn HeaderText="OA Complete Date" DataField="OACompleteDate"
UniqueName="OACompleteDate" DataFormatString="{0:MM/dd/yyyy}">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn HeaderText="Customer Requested Due Date" DataField="CustomerRequestedDueDate"
UniqueName="CustomerRequestedDueDate" DataFormatString="{0:MM/dd/yyyy}">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn HeaderText="Last Note Added" DataField="LastNoteAdded" HeaderStyle-Width="10%"
UniqueName="LastNoteAdded">
</telerik:GridBoundColumn>
<telerik:GridTemplateColumn UniqueName="EditRows" HeaderStyle-Width="2%" AllowFiltering="false">
<ItemTemplate>
<asp:ImageButton runat="server" ID="EditPMTsk" CommandName="EditRow" ImageUrl="Images/edit-icon.png"
ImageAlign="Middle" ToolTip="Edit Task" />
</ItemTemplate>
</telerik:GridTemplateColumn>
</Columns>
</MasterTableView>
<ClientSettings>
<ClientEvents OnGridCreated="GridCreated" />
<Scrolling AllowScroll="true" UseStaticHeaders="true" />
<Resizing AllowColumnResize="true" EnableRealTimeResize="false" ResizeGridOnColumnResize="false"
AllowRowResize="false" />
<Selecting AllowRowSelect="true" />
</ClientSettings>
</telerik:RadGrid>
```
.cs:
```
protected void gvPjtMnt_ItemDataBound(object sender, GridItemEventArgs e)
{
if (e.Item is GridDataItem)
{
GridDataItem dataItem = e.Item as GridDataItem;
TableCell myCell = dataItem["ProjectHealth"];
myCell.Font.Size = 10;
myCell.Font.Bold = true;
if (myCell.Text.Trim() == "GREEN")
{
myCell.BackColor = System.Drawing.Color.Green;
myCell.ForeColor = System.Drawing.Color.White;
}
if (myCell.Text.Trim() == "RED")
{
myCell.BackColor = System.Drawing.Color.Red;
myCell.ForeColor = System.Drawing.Color.White;
}
if (myCell.Text.Trim() == "YELLOW")
{
myCell.BackColor = System.Drawing.Color.Yellow;
myCell.ForeColor = System.Drawing.Color.Black;
}
if (myCell.Text.Trim() == "COMPLETE")
{
myCell.BackColor = System.Drawing.Color.Blue;
myCell.ForeColor = System.Drawing.Color.White;
}
}
}
```


| Issues With the radgrid | CC BY-SA 3.0 | null | 2010-12-13T19:38:24.110 | 2014-09-24T03:06:41.490 | 2014-09-24T03:06:41.490 | 1,387,518 | 356,973 | [
"c#",
"telerik",
"radgrid"
] |
4,432,836 | 1 | 4,435,896 | null | 0 | 599 | How to check whether the object(s) between the point and the object?

| AS3: Line of Sight | CC BY-SA 3.0 | null | 2010-12-13T19:46:51.630 | 2013-12-24T14:52:55.067 | 2013-12-24T14:52:55.067 | 1,829,219 | 234,671 | [
"flash",
"actionscript-3"
] |
4,433,333 | 1 | 4,433,497 | null | 0 | 1,498 | In SQL Server 2008, I have table1 and would like to update table as shown in second table.
i.e. Update update Value1 of Rn(2) = Value2 of Rn(1) from above record. Sequence is decided by Rn.
Any help in this regard will be appreciated.

Many Thanks.
```
Create table Table1(ID int, value1 int, value2 int, Item varchar(10),Rn int)
insert into Table1(ID,Value2,Item,Rn) values('1','33242','Orange','1')
insert into Table1(ID,Value2,Item,Rn) values('2','67665','Orange','2')
insert into Table1(ID,Value2,Item,Rn) values('3','78765','Orange','3')
insert into Table1(ID,Value2,Item,Rn) values('4','576','Orange','4')
insert into Table1(ID,Value2,Item,Rn) values('5','906658','Orange','5')
insert into Table1(ID,Value2,Item,Rn) values('6','54435','Orange','6')
insert into Table1(ID,Value2,Item,Rn) values('7','7464','Mango','1')
insert into Table1(ID,Value2,Item,Rn) values('8','9876','Mango','2')
insert into Table1(ID,Value2,Item,Rn) values('9','2433','Mango','3')
insert into Table1(ID,Value2,Item,Rn) values('10','5654','Mango','4')
insert into Table1(ID,Value2,Item,Rn) values('11','13213','Mango','5')
insert into Table1(ID,Value2,Item,Rn) values('12','9867867','Mango','6')
insert into Table1(ID,Value2,Item,Rn) values('13','5644355','Mango','7')
insert into Table1(ID,Value2,Item,Rn) values('14','6534','Apple','1')
insert into Table1(ID,Value2,Item,Rn) values('15','343','Apple','2')
insert into Table1(ID,Value2,Item,Rn) values('16','423','Apple','3')
insert into Table1(ID,Value2,Item,Rn) values('17','7666','Apple','4')
```
| T-SQL update record from other row number | CC BY-SA 2.5 | null | 2010-12-13T20:44:47.057 | 2011-01-10T09:38:49.917 | 2011-01-10T09:38:49.917 | 301,832 | 219,628 | [
"tsql"
] |
4,433,574 | 1 | 4,440,812 | null | 2 | 589 | I have a strange error in my Sitecore environment that I've been ignoring since I started development (since it is only a minor inconvenience), and that is the fact that in dealing with large menus near the bottom, they get clipped by the bottom of the browser. Items then should detect the bottom and build upward, I guess, but they just don't. I have gone through the Sitecore Initial Configuration for Internet Explorer document several times.
Has anyone come across this?
Thank you for your time.

| Sitecore Menu Problem | CC BY-SA 2.5 | 0 | 2010-12-13T21:19:15.700 | 2013-09-23T15:51:54.500 | null | null | 410,872 | [
"sitecore"
] |
4,434,027 | 1 | 4,452,597 | null | 50 | 65,502 | I'm trying to replicate the functionality of the latest YouTube app in the Android marketplace. When watching a video there's two separate layouts, one in portrait which provides additional info, and one in landscape which provides a full screen view of the video.


(Sorry for the randomness of the photos, but they were the first pics I could find of the actual layout)
This is pretty easy to do normally - just specify an alternate layout in layout-land and all will be good. The thing that the YouTube app does really well (and what I'm trying to replicate) is that on orientation change, the video continues playing and doesn't have to re-buffer from the beginning.
I've figured out that overriding onConfigurationChange() and setting new LayoutParameters will allow me to resize the video without forcing a rebuffer - however the video will randomly scale to different widths/heights when rotating the screen multiple times. I've tried doing all sorts of invalidate() calls on the VideoView, tried calling RequestLayout() on the parent RelativeLayout container and just trying as many different things as I can, but I can't seem to get it to work properly. Any advice would be greatly appreciated!
Here's my code:
```
@Override
public void onConfigurationChanged(Configuration newConfig) {
super.onConfigurationChanged(newConfig);
if (newConfig.orientation == Configuration.ORIENTATION_LANDSCAPE) {
questionText.setVisibility(View.GONE);
respond.setVisibility(View.GONE);
questionVideo.setLayoutParams(new RelativeLayout.LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.FILL_PARENT));
} else {
questionText.setVisibility(View.VISIBLE);
respond.setVisibility(View.VISIBLE);
Resources r = getResources();
int height = (int) TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, 150.0f, r.getDisplayMetrics());
questionVideo.setLayoutParams(new RelativeLayout.LayoutParams(LayoutParams.FILL_PARENT, height));
}
}
```
EDIT: I've discovered in logcat some interesting output that comes up when my video is rotated which seems to be the culprit - although I have no idea how to fix it:
notice the h=726
```
12-13 15:37:35.468 1262 1270 I ActivityManager: Config changed: { scale=1.0 imsi=310/4 loc=en_US touch=3 keys=1/1/2 nav=1/1 orien=2 layout=34 uiMode=17 seq=210}
12-13 15:37:35.561 1262 1268 I TIOverlay: Position/X0/Y76/W480/H225
12-13 15:37:35.561 1262 1268 I TIOverlay: Adjusted Position/X1/Y0/W403/H225
12-13 15:37:35.561 1262 1268 I TIOverlay: Rotation/90
12-13 15:37:35.561 1262 1268 I Overlay : v4l2_overlay_set_position:: w=480 h=224
12-13 15:37:35.561 1262 1268 I Overlay : v4l2_overlay_set_position:: w=402 h=726
12-13 15:37:35.561 1262 1268 I Overlay : dumping driver state:
12-13 15:37:35.561 1262 1268 I Overlay : output pixfmt:
12-13 15:37:35.561 1262 1268 I Overlay : w: 432
12-13 15:37:35.561 1262 1268 I Overlay : h: 240
12-13 15:37:35.561 1262 1268 I Overlay : color: 7
12-13 15:37:35.561 1262 1268 I Overlay : UYVY
12-13 15:37:35.561 1262 1268 I Overlay : v4l2_overlay window:
12-13 15:37:35.561 1262 1268 I Overlay : window l: 1
12-13 15:37:35.561 1262 1268 I Overlay : window t: 0
12-13 15:37:35.561 1262 1268 I Overlay : window w: 402
12-13 15:37:35.561 1262 1268 I Overlay : window h: 726
```
notice the h=480
```
12-13 15:43:00.085 1262 1270 I ActivityManager: Config changed: { scale=1.0 imsi=310/4 loc=en_US touch=3 keys=1/1/2 nav=1/1 orien=2 layout=34 uiMode=17 seq=216}
12-13 15:43:00.171 1262 1268 I TIOverlay: Position/X0/Y76/W480/H225
12-13 15:43:00.171 1262 1268 I TIOverlay: Adjusted Position/X138/Y0/W266/H225
12-13 15:43:00.171 1262 1268 I TIOverlay: Rotation/90
12-13 15:43:00.179 1262 1268 I Overlay : v4l2_overlay_set_position:: w=480 h=224
12-13 15:43:00.179 1262 1268 I Overlay : v4l2_overlay_set_position:: w=266 h=480
12-13 15:43:00.179 1262 1268 I Overlay : dumping driver state:
12-13 15:43:00.179 1262 1268 I Overlay : output pixfmt:
12-13 15:43:00.179 1262 1268 I Overlay : w: 432
12-13 15:43:00.179 1262 1268 I Overlay : h: 240
12-13 15:43:00.179 1262 1268 I Overlay : color: 7
12-13 15:43:00.179 1262 1268 I Overlay : UYVY
12-13 15:43:00.179 1262 1268 I Overlay : v4l2_overlay window:
12-13 15:43:00.179 1262 1268 I Overlay : window l: 138
12-13 15:43:00.179 1262 1268 I Overlay : window t: 0
12-13 15:43:00.179 1262 1268 I Overlay : window w: 266
12-13 15:43:00.179 1262 1268 I Overlay : window h: 480
```
Maybe someone knows what 'Overlay' is and why it's not getting the correct height value?
| Android VideoView orientation change with buffered video | CC BY-SA 4.0 | 0 | 2010-12-13T22:16:27.907 | 2018-11-26T17:55:53.510 | 2018-11-26T17:55:53.510 | 443,839 | 443,839 | [
"android",
"android-orientation",
"android-videoview"
] |
4,434,414 | 1 | null | null | 1 | 838 | I'm using [http://960.gs](http://960.gs) grid system/framework
I'm having some head-to-wall punching trying to make a flexible layout that allows me to cover the width and height of visitor's browser client area, specially in "height"...

Thanks for any tip/hack you can give me
| Cover entire client area with a 960.gs flexible grid layout | CC BY-SA 2.5 | null | 2010-12-13T23:14:13.727 | 2010-12-15T01:21:08.047 | null | null | 198,544 | [
"css",
"grid",
"960.gs",
"fluid-layout"
] |
4,434,513 | 1 | null | null | 3 | 512 | Ok lets say i have a user table and then a table that logs all login atempts (Id(counter), userId, time and if successful or not)
Now in my Entity Model i want it to be 2 Association's one with the time of all successful attempts and one with all unsuccessful attempts how could i achieve this?
This is how the model looks now!

| EntityFramework Custom Association | CC BY-SA 2.5 | null | 2010-12-13T23:29:14.660 | 2010-12-14T00:16:15.943 | null | null | 58,553 | [
".net",
"entity-framework"
] |
4,434,527 | 1 | null | null | 3 | 1,965 | On our site we have tables containing data. We like the column widths we get with a normal `table`, but we like the border-bottom of `td`s to stretch the entire width of the page like we get with CSS: `table { width:100% }`, as can be seen on a [demo table widths page](http://jsfiddle.net/G5mJ3/), which renders like this:

Is it possible to achieve the same column widths as with a normal (non-width-100%) table in a table where the border-bottom stretches the entire width?
And no, `td { white-space: nowrap }` in combination with an extra `width: 100%` `td` (see the link above) is not good, as sometimes the `td`s are long and so we want the `td`s to wrap exactly like in a normal table.
We need a solution that works in at least IE6-8 + FF.
Btw, is there (tm) of showing HTML snippets than linking to an external page? I can show just source, but having HTML rendered too is very illustrative.
This was originally posted on [Webmasters](https://webmasters.stackexchange.com/questions/6653/), but following a suggestion there, I now (re)post it here.
| Tables: How to achieve “normal” td widths, but 100% table width? | CC BY-SA 3.0 | null | 2010-12-13T23:31:27.427 | 2014-03-25T17:01:05.837 | 2017-04-13T12:33:14.323 | -1 | 345,716 | [
"html",
"css"
] |
4,434,574 | 1 | null | null | 1 | 748 | I experience this problem on both samsung i5500 and i5800:

Looks like height of divider is between 0 and 1 pixels, so it sometimes rounds to 0 and sometimes to 1. The picture changes if i scroll it.
And if i increase dividerHeight (i tried 2px and 2pt), then it becomes exactly 1 pixel thicker: from 0px it becomes 1px and from 1px it becomes 2px, looking like a kind of wave.
| Ugly separator line in ListView | CC BY-SA 2.5 | 0 | 2010-12-13T23:40:16.260 | 2011-08-01T06:08:50.930 | null | null | 181,866 | [
"android",
"listview"
] |
4,434,698 | 1 | 4,434,792 | null | 0 | 442 | I was looking to add a "locate" button similar to the one in Apple's Map app.

`^There`
I looked in the options for bordered buttons but it's not listed. How can I add one of these?
Thanks in advance.
| How to get "location" UIToolbar button? | CC BY-SA 2.5 | null | 2010-12-14T00:01:45.470 | 2010-12-14T00:23:19.630 | null | null | 456,851 | [
"iphone",
"objective-c",
"uibutton",
"uitoolbar",
"cllocationmanager"
] |
4,435,204 | 1 | 4,435,359 | null | 3 | 1,790 | I have accidently deleted my database files using Windows Explorer.
Now I want to remove these databases from SQL Server Management Studio' tree-like list.
The following screenshot shows the database names (musics and silverlight) I want to remove.

I attempted to delete them one by one but I got an error for each attempt. The following screenshot just shows my attempt to delete musics:

These orphan names really upsets my eyes and can produce misunderstanding in the future.
Is there any way to remove these?
| How to remove a list of accidently deleted databases from Sql Server Management Studio's tree-like list? | CC BY-SA 2.5 | null | 2010-12-14T01:48:07.293 | 2021-01-14T02:17:41.680 | null | null | 397,524 | [
"sql-server",
"ssms"
] |
4,435,299 | 1 | 4,590,431 | null | 1 | 1,421 | The `productsRequest:didReceiveResponse:` returns 0 in `[response.products count]`. I've checked [again](https://devforums.apple.com/thread/23344?start=0&tstart=0) and [again](http://www.iphonedevsdk.com/forum/iphone-sdk-development/21035-problems-creating-test-user-app-purchase.html) and the only thing I am not sure is the about the status:

Are items not returned in `productsRequest:didReceiveResponse:`?
| In-App Purchase return 0 product | CC BY-SA 2.5 | null | 2010-12-14T02:12:32.613 | 2011-01-04T03:38:01.597 | null | null | 88,597 | [
"iphone",
"ios",
"app-store",
"in-app-purchase"
] |
4,435,406 | 1 | 4,436,239 | null | 2 | 975 | I have deployed Django at [alwaysdata.com](http://www.alwaysdata.com),
this is my main page on [http://zjm1126.alwaysdata.net/](http://zjm1126.alwaysdata.net/) :

i change the `index.html` to `index1.html`, this file is not my file ,
my project is like this :
```
example_project/
__init__.py
manage.py
public/
django.fcgi
.htaccess
media/
settings.py
urls.py
myapp/
views.py
models.py
```
what can i do to show my main page .
thanks
| why my django site in hosting (alwaysdata) cant show my page | CC BY-SA 2.5 | 0 | 2010-12-14T02:37:06.123 | 2011-05-24T08:10:45.197 | null | null | 420,840 | [
"python",
"django",
"hosting"
] |
4,435,411 | 1 | 4,435,466 | null | 3 | 2,316 | I'm designing a website to track weight lifting and calories. I've never designed my own database before and I figured I should get is as spot on as possible before I start coding. Every time I think I'm done, I get antsy that it's not perfect. I've mostly fleshed it out in MySQL Workbench but I still have a few questions.
- - - -
I've also attached my ERM diagram. If anyone could point out any obvious irregularities it would be greatly appreciated.

| How "perfect" does a database have to be? | CC BY-SA 2.5 | 0 | 2010-12-14T02:38:32.000 | 2010-12-23T08:13:58.727 | 2010-12-14T03:06:16.553 | 135,152 | 242,131 | [
"mysql",
"database",
"database-design",
"data-modeling"
] |
4,435,450 | 1 | null | null | 3 | 2,796 | I'm drawing something similar to a LED VU meter in OpenGL. Result should be like on vertical bar of this:

Unfortunately, my drawing space is restricted, and I have to fit exactly 18 bars on it. That yields a spacing between bars of 3.6 pixels.
When drawn, this causes visible differences in the gaps between lines, because the gaps are either 2 or 1 pixel wide. I'm looking for a solution to use subpixel rendering and than "fake" the lines by some kind of anti-aliasing, so that all gaps appear of the same width.
This is my code so far
```
glEnable(GL_LINE_SMOOTH);
glHint(GL_LINE_SMOOTH, GL_NICEST);
for (int i = 0; i < 18; ++i) {
float bBottom = barBottom + i*3.6f;
glBegin(GL_LINES);
glLineWidth(2);
glVertex2f(bRight,bBottom);
glVertex2f(bLeft,bBottom);
glEnd();
}
glDisable(GL_LINE_SMOOTH);
```
Unfortunately, turning on line smoothing showed no visible effect. Any suggestions?
| 2D openGL drawing lines that don't exactly fit pixel raster | CC BY-SA 2.5 | 0 | 2010-12-14T02:48:11.663 | 2010-12-14T11:09:56.980 | 2010-12-14T09:42:15.640 | 28,169 | 541,381 | [
"c",
"opengl",
"rendering",
"2d",
"antialiasing"
] |
4,435,713 | 1 | null | null | 0 | 492 | i have read about UITouch and UIGestureRecognizer, but i still really confused what the difference between them.
I have one case. In my app, i have a barbuttonitem, i want to show different view when a tap that button. if i do a singletap, i want to show a textview, but when i do a singletap again, i want to show a popover from that button. is there somebody can give me an example code to do it and give a little explanation about what is the difference between UITouch and UIGestureRecognizer???
the barbuttonitem is a wrapper of UISegmentedControl, here's a pic from the desain

i was try to use touchesBegan:withEvent: and touchesEnded:withEvent: to solve this problem, but i dont know how to connect it to that barbuttonitem.
This is the code i made :
```
-(void)addSegment{
NSAutoreleasePool *pool;
int count_doc = [_docsegmentmodels count];
NSLog(@"count doc add segment : %d", count_doc);
pool = [[NSAutoreleasePool alloc] init];
DocSegmentedModel *sl;
NSMutableArray *segmentTextMutable = [NSMutableArray array];
for(int i=0 ;(i<count_doc && i < max_segment);i++){
sl = [_docsegmentmodels objectAtIndex:i];
NSString *evalString = [[KoderAppDelegate sharedAppDelegate] setStringWithLength:sl.docSegmentFileName:10];
[segmentTextMutable addObject:NSLocalizedString(evalString,@"")];
}
NSArray *segmentText = [segmentTextMutable copy];
_docSegmentedControl = [[UISegmentedControl alloc] initWithItems:segmentText];
_docSegmentedControl.selectedSegmentIndex = 0;
_docSegmentedControl.autoresizingMask = UIViewAutoresizingFlexibleHeight;
_docSegmentedControl.segmentedControlStyle = UISegmentedControlStyleBezeled;//UISegmentedControlStylePlain;// UISegmentedControlStyleBar;//UISegmentedControlStyleBezeled;
//docSegmentedControl.frame = CGRectMake(0, 0, 800, 46.0);
[_docSegmentedControl addTarget:self action:@selector(docSegmentAction:) forControlEvents:UIControlEventValueChanged];
// Add the control to the navigation bar
//UIBarButtonItem *segmentItem = [[UIBarButtonItem alloc] initWithCustomView:_docSegmentedControl];
segmentItem = [[UIBarButtonItem alloc] initWithCustomView:_docSegmentedControl];
self.navItem.leftBarButtonItem = segmentItem;
self.navItem.leftBarButtonItem.title = @"";
[pool release];
[segmentItem release];
[_docSegmentedControl release];
```
}
```
-(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event{
[NSObject cancelPreviousPerformRequestsWithTarget:self
selector:@selector(segmentItemTapped:) object:segmentItem];
```
}
```
-(void)touchesEnd:(NSSet *)touches withEvent:(UIEvent *)event{
if (touches.count == 1) {
if (theTouch.tapCount == 2) {
[self performSelector:@selector(segmentItemTapped:)withObject:segmentItem afterDelay:0.35];
}else {
[self performSelector:@selector(docSegmentAction:) withObject:segmentItem afterDelay:0.0];
}
}
```
}
```
- (IBAction)segmentItemTapped:(id)sender{
if (self.fileProperties == nil) {
self.fileProperties = [[[FilePropertiesViewController alloc] initWithNibName:@"FilePropertiesViewController" bundle:nil]autorelease];
fileProperties.delegate = self;
self.filePropertiesPopover = [[[UIPopoverController alloc] initWithContentViewController:fileProperties]autorelease];
[_docsegmentmodels objectAtIndex:_docSegmentedControl.selectedSegmentIndex];
}
fileProperties.docProperties = _docsegmentmodels;
fileProperties.index = _docSegmentedControl.selectedSegmentIndex; //index utk nilai2 di textfield
[self.filePropertiesPopover presentPopoverFromBarButtonItem:sender
permittedArrowDirections:UIPopoverArrowDirectionUp
animated:YES];
```
}
```
- (IBAction)docSegmentAction:(id)sender{
NSLog(@"open file");
isFileOpen = YES;
[self.moreFilePopOverController dismissPopoverAnimated:YES];
[self.filePropertiesPopover dismissPopoverAnimated:YES];
[self showTextView];
```
}
is there any mistake in my understanding?
| show different view with different tap count from UIBarButtonItem (wrap an UISegmentedControl) | CC BY-SA 2.5 | null | 2010-12-14T03:53:12.827 | 2010-12-15T04:40:22.847 | 2010-12-15T04:40:22.847 | 515,986 | 515,986 | [
"ipad",
"uigesturerecognizer",
"uitouch",
"tap"
] |
4,435,756 | 1 | 4,437,326 | null | 2 | 2,282 | Here's the setup: This is for an ecommerce art site where some paintings are canvas transfers. The painting wraps around the sides and top and bottom of the canvas. We have high-res images of the entire painting, but what we want to display is a quasi-3D representation of the image in which you can see how the sides of the painting wrap around the canvas. Here's a rough sketch of what I'm talking about:

My question is, how can I rotate an image in 3D space? The approach I think I'd like to take, is to cut off a portion of the top and side of the image, and rotate then in 3D and then stich it back on to the top and side to give it the 3D look. How do I go about about doing that? It can be done using any .Net technology (GDI+, WPF etc.).
| Rotating part of an image in 3D space | CC BY-SA 2.5 | 0 | 2010-12-14T04:03:03.077 | 2010-12-17T20:54:27.280 | null | null | 15,861 | [
"c#",
".net",
"wpf",
"gdi+",
"image-manipulation"
] |
4,435,869 | 1 | 4,437,378 | null | 2 | 1,650 | I'm using GDI to draw text onto a device context, and I noticed that the kerning or character placement is different if the angle is exactly 0, 90, 180, or 270. As soon as I increase the angle by 1, the character placement differs noticeably.
Rather than creating an `HFONT` with the angle, I am using `ModifyWorldTransform` to transform the device context's world coordinates, and then I use `TextOut` to draw the text onto the device context.
I think that GDI is using font hints or some other special technique when the text is being drawn at exact multiples of 90 degrees, but not for any other angle.
Is there a way to disable this hinting, so that text rendered at 0 degrees does not differ significantly from text rendered at 1 degree?
Here's an example of what I mean (Monotype Corsiva font):
:

:

For some fonts, such as Arial or Tahoma, it is not as noticeable, but I would like to get rid of the difference entirely, even if it means the text is not rendered as best it can.
| Using Win32 TextOut to draw text at an angle | CC BY-SA 2.5 | 0 | 2010-12-14T04:29:20.320 | 2010-12-14T08:54:00.747 | null | null | 10,320 | [
"winapi",
"text",
"rotation",
"gdi"
] |
4,435,922 | 1 | 4,437,685 | null | 20 | 6,264 | I recently implemented Paperclip with Rails and want to try out some of the filter options from ImageMagick such as [blur](http://www.imagemagick.org/Usage/blur/). I've not been able to find any examples of how to do this. Does it get passed through :style as another option?
```
:styles => { :medium => "300x300#", :thumb => "100x100#" }
```
---
@plang's answer was correct but I wanted to give the exact solution to the blur, just in case someone was looking and found this question:
```
:convert_options => { :all => "-blur 0x8" }
// -blur {radius}x{sigma}
```
Which changed this:

To this:

| Rails Paperclip how to use filter options of ImageMagick? | CC BY-SA 2.5 | 0 | 2010-12-14T04:36:50.540 | 2016-12-13T17:13:42.423 | 2010-12-17T02:19:26.683 | 150,803 | 150,803 | [
"ruby-on-rails",
"imagemagick",
"paperclip"
] |
4,435,995 | 1 | 4,683,208 | null | 7 | 1,217 | I am doing a brute force search for "gradient extremals" on the following example function
```
fv[{x_, y_}] = ((y - (x/4)^2)^2 + 1/(4 (1 + (x - 1)^2)))/2;
```
This involves finding the following zeros
```
gecond = With[{g = D[fv[{x, y}], {{x, y}}], h = D[fv[{x, y}], {{x, y}, 2}]},
g.RotationMatrix[Pi/2].h.g == 0]
```
Which `Reduce` happily does for me:
```
geyvals = y /. Cases[List@ToRules@Reduce[gecond, {x, y}], {y -> _}];
```
`geyvals` is the three roots of a cubic polynomial, but the expression is a bit large to put here.
Now to my question: For different values of `x`, different numbers of these roots are real, and I would like to pick out the values of `x` where the solutions branch in order to piece together the gradient extremals along the valley floor (of `fv`). In the present case, since the polynomial is only cubic, I could probably do it by hand -- but I am looking for a simple way of having Mathematica do it for me?
: To clarify: The gradient extremals stuff is just background -- and a simple way to set up a hard problem. I am not so interested in the specific solution to this problem as in a general hand-off way of spotting the branch points for polynomial roots. Have added an answer below with a working approach.
: Since it seems that the actual problem is much more fun than root branching: rcollyer suggests using `ContourPlot` directly on `gecond` to get the gradient extremals. To make this complete we need to separate valleys and ridges, which is done by looking at the eigenvalue of the Hessian perpendicular to the gradient. Putting a check for "valleynes" in as a `RegionFunction` we are left with only the valley line:
```
valleycond = With[{
g = D[fv[{x, y}], {{x, y}}],
h = D[fv[{x, y}], {{x, y}, 2}]},
g.RotationMatrix[Pi/2].h.RotationMatrix[-Pi/2].g >= 0];
gbuf["gevalley"]=ContourPlot[gecond // Evaluate, {x, -2, 4}, {y, -.5, 1.2},
RegionFunction -> Function[{x, y}, Evaluate@valleycond],
PlotPoints -> 41];
```
Which gives just the valley floor line. Including some contours and the saddle point:
```
fvSaddlept = {x, y} /. First@Solve[Thread[D[fv[{x, y}], {{x, y}}] == {0, 0}]]
gbuf["contours"] = ContourPlot[fv[{x, y}],
{x, -2, 4}, {y, -.7, 1.5}, PlotRange -> {0, 1/2},
Contours -> fv@fvSaddlept (Range[6]/3 - .01),
PlotPoints -> 41, AspectRatio -> Automatic, ContourShading -> None];
gbuf["saddle"] = Graphics[{Red, Point[fvSaddlept]}];
Show[gbuf /@ {"contours", "saddle", "gevalley"}]
```
We end up with a plot like this:

| Mathematica: branch points for real roots of polynomial | CC BY-SA 2.5 | null | 2010-12-14T04:51:51.060 | 2011-05-29T18:28:44.010 | 2010-12-22T03:02:41.150 | 212,538 | 212,538 | [
"wolfram-mathematica"
] |
4,436,075 | 1 | 4,436,205 | null | 3 | 357 | I'm making a cropping tool for images and I can't for the life of me figure out why it's producing the images that it's producing...
I'm following the accepted answer [here](https://stackoverflow.com/questions/734930/how-to-crop-an-image-using-c), but its still being weird... Here's my code:
```
public void Crop(
string FileName,
Crop Crop) {
using (Bitmap Source = ((Bitmap)Image.FromFile(FileName))) {
using (Bitmap Target = new Bitmap(Crop.Width, Crop.Height)) {
using (Graphics Graphics = Graphics.FromImage(Target)) {
Graphics.DrawImage(Source, new Rectangle(new Point(Crop.Left, Crop.Top), new Size(Crop.Width, Crop.Height)), new Rectangle(new Point(0, 0), new Size(Target.Width, Target.Height)), GraphicsUnit.Pixel);
};
Target.Save((FileName + ".temp"), JpegCodecInfo, HighQualityEncoder);
};
};
this.NormalizeFileName(FileName);
}
```
Please help me. I'm attaching an image of what I'm getting...
For @Aaronontheweb, here's the `Crop` class and how it's populated:
```
public class Crop {
[Required]
public short Height { get; set; }
[Required]
public short Left { get; set; }
[Required]
public short Top { get; set; }
[Required]
public short Width { get; set; }
}
```
And the jQuery that populates it:
```
$("#Image input:submit").bind("click", function () {
$("#Crop\\.Height").val(Crop.height());
$("#Crop\\.Left").val(Crop.position().left);
$("#Crop\\.Top").val(Crop.position().top);
$("#Crop\\.Width").val(Crop.width());
});
```
Never mind, I got it. I took a nap after asking my question just to clear my head and when I looked at it again after, I decided to switch the two rectangles and see what happens. Well, guess what, that fixed it.
At this point I would have to say that the names given in the API documentation are deceptive. For example the docs refer to the output image as and the input image as . Perhaps the API should be updated to have better naming?
| What's wrong with this image cropper? | CC BY-SA 2.5 | 0 | 2010-12-14T05:08:12.597 | 2010-12-14T07:00:16.873 | 2017-05-23T11:48:24.847 | -1 | 188,081 | [
"c#",
"image-processing"
] |
4,436,187 | 1 | 4,437,474 | null | 3 | 8,423 | I am using highchart (jquery chart library). I am indicating the axis with tooltip. now i need to display y axis value on top of respective bar. How can i do that
My example graph
To display yaxis values on top of respective bar in highchart.
| How to format high charts? | CC BY-SA 2.5 | 0 | 2010-12-14T05:31:21.433 | 2017-01-12T22:29:47.017 | null | null | 524,723 | [
"jquery",
"highcharts"
] |
4,436,547 | 1 | 4,437,034 | null | 1 | 202 | m stucked in figuring out how can i set the viewport for my google map markers.
is there any way to do it in objC??
or i have to do it in my map itself??? if yes, then how???
My code for google map just shows the maps along with the markers,but when i click it,it just shows the name of the place in a small box.. :(
how to make it a proper viewport???
here's the viewport image:

| Customise googlemap viewport in iphone | CC BY-SA 2.5 | null | 2010-12-14T06:37:25.110 | 2010-12-14T08:10:36.413 | null | null | 462,533 | [
"iphone",
"objective-c",
"google-maps",
"uiwebview"
] |
4,436,738 | 1 | 4,437,825 | null | 0 | 66 | Here is a picture I captured from < Professional IIS >

I am wondering why the web request and the resulting web content as the response have to go through the same ISAPI filters or applications in . I know that ISAPI applications and Filters are nothing but Win32 DLLs. This is kind of like a function , i.e., when the web request comes, the exported functions of ISAPI Filters are invoked, and then the Filters invoke the WWW Service, and the WWW Service invoke the exported functions of ISAPI Applicaitons, and they return all the way back reversly. So is this the root cause? (I hope you understand what I mean.)
Many thanks.
| Question about IIS working paradigm | CC BY-SA 2.5 | 0 | 2010-12-14T07:07:44.100 | 2010-12-14T09:48:58.807 | null | null | 264,052 | [
"asp.net",
"iis",
"webserver"
] |
4,437,148 | 1 | 4,440,470 | null | 0 | 2,522 | > Is there an inbuilt / m file in Matlab
to obtain the highly fluctuatiing and
multiple peaks of the plot of an
alpine function? I want to obtain a
similar figure in 3D which is  and The formula (probably) is > z=sin(x1)sin(x2)\sqrt{x1x2}
How does one plot a surface plot for the major functions like alpine,rosenbrock, egg crate function etc in a colorful illustrative way. Kindly help with a sample code.
| How to plot surface plot | CC BY-SA 2.5 | null | 2010-12-14T08:17:37.880 | 2018-11-28T15:54:47.880 | 2018-11-28T15:54:47.880 | 8,239,061 | 389,264 | [
"matlab",
"surface"
] |
4,437,428 | 1 | 4,437,765 | null | 5 | 3,286 | I am drawing a sprite (of a ball) on a canvas element. As the ball moves however, the x or y position of the ball may become a fraction, eg. (20.153; 63.638). When canvas is used to draw this image, it attempts to use transparent pixels to make the ball appear in it's position more accurately.
I was wondering whether I should use `Math.round()` before drawing the ball to avoid the transparent pixel stuff, and possibly speeding up the game a lot. Will this help much? The game is a sorta complex pong game.
The image below should help with my explanation:

| Will avoid drawing half pixel in HTML5 canvas improve speed? | CC BY-SA 2.5 | 0 | 2010-12-14T09:00:29.753 | 2011-10-05T20:36:32.177 | 2010-12-14T09:06:07.113 | 313,758 | 531,265 | [
"html",
"canvas"
] |
4,437,634 | 1 | 4,437,716 | null | 1 | 1,488 | I am trying to create a GTK toolbar with a bunch of items. My probelem is that I have not been able to space them out evenly. All icons are bunched together on the left of the bar. How do I get them to spread out? I would like to avoid using additional widgets like hbox, etc for performance reasons. Here's the code I have written:
```
GtkWidget* navbar = gtk_toolbar_new();
gtk_toolbar_set_style(GTK_TOOLBAR(navbar), GTK_TOOLBAR_ICONS);
gtk_toolbar_set_icon_size(GTK_TOOLBAR(navbar), GTK_ICON_SIZE_SMALL_TOOLBAR);
GtkToolItem* open = gtk_tool_button_new_from_stock(GTK_STOCK_JUMP_TO);
gtk_toolbar_insert(GTK_TOOLBAR(navbar), open, 0);
GtkToolItem* play = gtk_tool_button_new_from_stock(GTK_STOCK_MEDIA_PLAY);
gtk_toolbar_insert(GTK_TOOLBAR(navbar), play, 1);
GtkToolItem* pause = gtk_tool_button_new_from_stock(GTK_STOCK_MEDIA_PAUSE);
gtk_toolbar_insert(GTK_TOOLBAR(navbar), pause, 2);
```
And here is the arrangement I get:

| arranging icons in gtk toolbar | CC BY-SA 2.5 | null | 2010-12-14T09:28:36.373 | 2010-12-14T15:58:22.150 | 2010-12-14T09:37:02.270 | 341,008 | 341,008 | [
"linux",
"gtk",
"icons"
] |
4,438,286 | 1 | 4,440,886 | null | 1 | 1,612 | I'm trying to calculate the number of transitions that would be made in a run of Conway's GOL for a pxq matrix for n iterations. For instance, given 1 iteration with the initial state being 1 blinker (as below). there would be 5 transitions (2 births, 1 survival, 2 deaths from underpopulation). I've already got this working, but I'd like to convert this logic to run using CUDA. Below is what I want to port to CUDA.

code:
```
static void gol() // call this iterations x's
{
int[] tempGrid = new int[rows * cols]; // grid holds init conditions
for (int i = 0; i < rows; i++)
{
for (int j = 0; j < cols; j++)
{
tempGrid[i * cols + j] = grid[i * cols + j];
}
}
for (int i = 0; i < rows; i++)
{
for (int j = 0; j < cols; j++)
{
int numNeighbors = neighbors(i, j); // finds # of neighbors
if (grid[i * cols + j] == 1 && numNeighbors > 3)
{
tempGrid[i * cols + j] = 0;
overcrowding++;
}
else if (grid[i * cols + j] == 1 && numNeighbors < 2)
{
tempGrid[i * cols + j] = 0;
underpopulation++;
}
else if (grid[i * cols + j] == 1 && numNeighbors > 1)
{
tempGrid[i * cols + j] = 1;
survival++;
}
else if (grid[i * cols + j] == 0 && numNeighbors == 3)
{
tempGrid[i * cols + j] = 1;
birth++;
}
}
}
grid = tempGrid;
}
```
| cuda kernel for conway's game of life | CC BY-SA 2.5 | 0 | 2010-12-14T10:42:40.393 | 2011-09-24T07:19:47.207 | 2011-09-24T07:19:47.207 | 211,160 | 480,785 | [
"cuda",
"parallel-processing",
"conways-game-of-life"
] |
4,438,346 | 1 | null | null | 0 | 625 |
```
RewriteRule ^$ /index.php?page=Portal [R=301,L]
```
When a user comes to the website and goes to the "root" url of the domain (RegExp "^$") he's redirected to /index.php?page=Portal
That's working.
Now we have "index.php?page=Portal" in the google index and we have tons of links to that page on various locations all over the internet.
We want the portal page to show up on the root url - no redirect. That's no problem... Just remove the redirect:
```
RewriteRule ^$ /index.php?page=Portal [L]
```
Now we also want the old url to redirect to the new location, and that's where I fail but can't see why:
```
RewriteCond %{QUERY_STRING} ^page=Portal$
RewriteRule ^index.php$ http://www.jacatu.de/? [R=301,L]
```
As soon as I do this I end up in a redirect loop:

(When I change to 302 in .htaccess I see 302 redirects, so the loop really seems to be caused by mod_rewrite)
But why? All rules are marked as [L] - so I think I can rule out that rule 2 triggers rule 1.
| Replace one URL with another by using mod_rewrite | CC BY-SA 2.5 | 0 | 2010-12-14T10:49:06.603 | 2010-12-14T12:21:11.587 | null | null | 999 | [
"apache",
"mod-rewrite"
] |
4,438,394 | 1 | null | null | 1 | 1,775 | 

Why?
| An empty sqlite database takes 74 Mb? | CC BY-SA 2.5 | null | 2010-12-14T10:54:38.577 | 2010-12-15T05:08:00.093 | 2020-06-20T09:12:55.060 | -1 | 537,572 | [
"sqlite"
] |
4,438,468 | 1 | null | null | 11 | 582 | I'm creating a Mac app which needs a trim bar like the GarageBand and iMovie ones. I need a library to get the audio waves to draw them on a NSView. Anyone knows a good library for that?
I think he was referring to the track editor (cut/copy/paste/move).

| Trim bar like the GarageBand and iMovie ones | CC BY-SA 3.0 | 0 | 2010-12-14T11:04:12.980 | 2014-04-01T09:36:04.543 | 2012-08-07T18:12:29.017 | 984,393 | 530,193 | [
"cocoa",
"macos",
"audio",
"core-audio"
] |
4,438,478 | 1 | 4,438,577 | null | 15 | 48,320 | I've just started with xcode and objective-c and did some very basic apps, but what i'm having problem with is very basic this. the keyboard return button not hiding the keyboard.
I've searched the internet for the solution and all they say is to connect delegate to the file's owner and add the function and it should work, i did that and nothing is working.
I have an ok button and it is working and also clicking on any free space on the screen is working, just the return button....
I am using the simulator, not testing on iphone yet. (xcode 3.2.5 64 bit with the 4.2 simulator).
This is the line of code that should connect the delegate to every textFiled.
1. i've tried already to return both `YES` and `NO`, didn't work.
2. i've tried both a specific object name for the textField and this general way, didn't work.
```
- (BOOL)textFieldShouldReturn:(UITextField *)textField {
[textField resignFirstResponder];
return NO;
}
```
In the: basic view controller connection -> connections -> outlets, i have the: delegate -- File's Owner. and in the file's owner in referencing outlets there is: delegate - Round style text.....
```
- (BOOL)textFieldShouldReturn:(UITextField *)textField{
NSLog(@"Working!!!");
[textField resignFirstResponder];
return YES;
```
}
what should i do to make it happen? that is why people say to connect the delegate, but in my case it is connected and not triggering the function...i know it is kind of dumb question but for a nobie like me the solution is not obvious...
This is: `basicViewController.h`:
```
#import <UIKit/UIKit.h>
@interface basicViewController : <#superclass#> <UITextFieldDelegate>
@interface basicViewController : UIViewController <UITextFieldDelegate> {
//every object that we want to interact with (like text field or lable) is call an outlet!!!!
//here we define the outlets for our program
IBOutlet UITextField *txtName;
IBOutlet UILabel *lblMessage;
}
//here are the getters and setter for our outlets
@property (nonatomic, retain) IBOutlet UITextField *txtName;
@property (nonatomic, retain) IBOutlet UILabel *lblMessage;
//method decleration for the OK button action
- (IBAction) doSomething;
//method for hiding the keyboard when clicking on empty area in the app
//we will put an invisible button on all area and clicking on it will make keyboard disapear
- (IBAction) makeKeyboardGoAway;
@end
```
This is `basicViewController.m`:
```
#import "basicViewController.h"
@implementation basicViewController
//synthesizeing the objects that we made' this will create the getter and setters automaticly
@synthesize txtName;
@synthesize lblMessage;
- (IBAction) doSomething{
// makeing keyboard disapear when pressing ok button (doing that form the text field)
//when pressing the OK button, the keyboard will disapear and when clicking in the text field it will show again
[txtName resignFirstResponder];
NSString *msg = [[NSString alloc] initWithFormat:@"Hello, %@",txtName.text];
//the objective-c way for setting the test in the text field
[lblMessage setText:msg];
//the regular object oriented way
//lblMessage.text = msg;
[msg release];
}
- (IBAction) makeKeyboardGoAway{
[txtName resignFirstResponder];
}
//when clicking the return button in the keybaord
- (BOOL)textFieldShouldReturn:(UITextField *)textField{
NSLog(@"Working!!!");
[textField resignFirstResponder];
return YES;
}
- (void)didReceiveMemoryWarning {
// Releases the view if it doesn't have a superview.
[super didReceiveMemoryWarning];
// Release any cached data, images, etc that aren't in use.
}
- (void)viewDidUnload {
// Release any retained subviews of the main view.
// e.g. self.myOutlet = nil;
}
- (void)dealloc {
[super dealloc];
}
@end
```
Maybe now i am more clear, sorry i didn't do it before.
Any one has an idea what am i doing wrong? it should be pretty strait forward.....

10x a lot for every one that is trying to help....i really like this framework, it is so great after c++ and java, python and many other...and i am working with a book, but it is for ios 3.1, maybe that is the problem.....
| Delegate for UITextField not working...Return button not responding | CC BY-SA 3.0 | 0 | 2010-12-14T11:05:35.823 | 2017-10-10T12:21:00.243 | 2014-01-04T10:14:28.410 | 457,406 | 288,219 | [
"ios",
"iphone",
"objective-c",
"ios-simulator"
] |
4,438,589 | 1 | 4,442,788 | null | 23 | 25,083 | I have a csv file with contents:
```
"x","y","-z"
```
When I import it I get:

How can I bypass this conversion?
If you try:
```
"x","y",="-z,a"
```
The ",a" is not imported.
If you put a space in front:
```
"x","y",=" -z"
```
or
```
"x","y"," -z"
```
it will work fine
| Bypass excel csv formula conversion on fields starting with + or - | CC BY-SA 2.5 | 0 | 2010-12-14T11:21:58.877 | 2018-12-03T16:38:52.273 | 2010-12-20T06:25:12.830 | 13,295 | 188,368 | [
"excel",
"csv"
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.