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,129,795 | 1 | 4,129,821 | null | 0 | 85 | I have the code below (I know this is only one function out of a bunch of code but hopefully it is enough). The console is giving the error "Cannot read property 'value' of undefined" for the `var userAnswer = currentBlank.value;`. The applicable DOM (I think the DOM will be more useful than the html source) is directly below (in a picture) and the javascript function I am having the problem with is right below that. I can't seem to figure out what is wrong. Thought maybe new eyes might be able to.

```
var allBlanksLoc = document.getElementById('text');
allBlanksLoc.style.display = 'block';
var allBlanks = allBlanksLoc.getElementsByTagName('input');
var sortedblanks = blanks.sort(function(a, b){
return a - b
});
var wrongBlanks = 0; // logs how many blanks were answered wrongly over all
var rightBlanks = 0; // logs how many blanks were answered rightly over all
var testAnswersArea = document.getElementById('testAnswers');
finalAnswers = "";
var blankNum = 0;
for (var i = 0; i < wordlist.length; i++) {
if (indicesOfBlanks[i]) {
var currentBlank = allBlanks[blankNum];
var wordNum = sortedblanks[blankNum];
var blankWord = wordlist[wordNum];
var blankWordUp = wordlistUpper[wordNum];
var usrAnswer = currentBlank.value;
if (usrAnswer != blankWord && usrAnswer != blankWordUp) {
finalAnswers += "<del style=\"font: red;\">" + currentBlank.value + "</del> <span style=\"font: green;\">" + blankWordUp + "</span> ";
} else {
finalAnswers += "<span style=\"font: green;\">" + currentBlank.value + "<span>";
}
blankNum++;
}
else {
finalAnswers += wordlistUpper[i] + " ";
}
}
testAnswersArea.innerHTML = finalAnswers;
```
| Can anyone see something wrong with this javascript code? | CC BY-SA 2.5 | 0 | 2010-11-09T01:49:33.693 | 2010-11-09T01:53:43.670 | null | null | 407,756 | [
"javascript"
] |
4,130,191 | 1 | 4,130,391 | null | 0 | 2,009 | I'm looking to create a web based "bulletin board" so to speak, where the user can create/delete/drag/drop 'pins'--without being allowed to overlap 'pins.'
Here is a diagram that should help illustrate what I'm trying to create:
- - -

I found [GameQuery](http://gamequery.onaluf.org/) which allegedly supports bounding box collisions--but it's that the collisions be detected with ovals, not boxes
The 'pins' may also vary in size/shape, depending on label size... this should be taken into account as well I imagine, to ensure an approach conducive to all the UX variables.
I've found [Quadtree](http://en.wikipedia.org/wiki/Quadtree) and [Collision Detection](http://en.wikipedia.org/wiki/Collision_detection) along with this [GameQuery collision demo](http://gamequery.onaluf.org/demos/2/), but it all sort of looks a little like gibberish. just so I know that what method I invest my time into, for my desired result... rather than busting my balls figuring out Quadtree and GameQuery for example, just to find it they won't work for this project.
...
Also, if any experienced developers are willing to be a mentor for me on this project--I am prepared to offer my extremely refined design experience, for a few "I need help" questions along the way.
How do I adopt an n-sided polygon into the pre-existing bounding box functionality of GameQuery? It doesn't need to be a perfect circle, but at least 8-sided.
| Creating a web based "bulletin board pin map" using Jquery; drag/drop/collisions/etc | CC BY-SA 4.0 | null | 2010-11-09T03:13:46.093 | 2019-09-23T09:30:35.747 | 2019-09-23T09:30:35.747 | 13,860 | 371,525 | [
"javascript",
"jquery",
"collision-detection"
] |
4,130,306 | 1 | 4,131,954 | null | 1 | 725 | In Drupal ,
Am using node_delete function for delete the node,
After deleted by default it showing the success message in green color text and white background 
How can I change the default delete message to read
> Delete Success
| drupal node_delete change default message success | CC BY-SA 2.5 | null | 2010-11-09T03:37:11.597 | 2010-11-09T09:04:40.590 | 2010-11-09T08:44:01.087 | 56,672 | 246,963 | [
"drupal",
"drupal-6",
"drupal-modules"
] |
4,130,734 | 1 | null | null | 0 | 727 | i have installer project working fine on development machine(32 bit) but when i move it to the production server it crashes. the error is related to mscorlib.dll(file not found exception clr20r3). the snapshot of exception for ur refrence is attached.
i have tried repairing/ re installing framework 3.5.
| filenot found exception for mscorlib.dll | CC BY-SA 2.5 | 0 | 2010-11-09T05:14:51.710 | 2010-12-06T18:13:26.627 | 2010-12-06T18:05:33.987 | 21,234 | 331,384 | [
".net"
] |
4,131,015 | 1 | 4,241,517 | null | 8 | 13,764 | I installed the [RSE plugin](http://download.eclipse.org/dsdp/tm/updates/2.0/) in Eclipse intending to either use SSH or FTP to work with files on a remote machine. I set up both an SSH and FTP connection, but neither works.
For example, here is what happens when I connect using FTP:

As you can see, the directories on the server show up, but I can't do anything with them. No sub-folders are showing up and none of the files can be opened.
I'm completely new to Eclipse, (though certainly not new to working with FTP) so I really don't know what to do to get this working.
---
is there any way to use this with the PHP perspective at all?
| How to use RSE plugin in Eclipse? | CC BY-SA 3.0 | 0 | 2010-11-09T06:20:33.613 | 2012-12-17T15:45:27.943 | 2012-12-17T15:45:27.943 | 805,923 | 193,619 | [
"eclipse",
"ftp",
"eclipse-rse"
] |
4,131,178 | 1 | 4,131,481 | null | 0 | 1,409 | How can add items from a `ListView` to a `RichTextBox` programmatically?
For example in this image shown below, I want the `ListViewItem` instances from specified columns to be shown in a `RichTextBox` and I want them to be formatted as a table. How can I do that?
In the image below, I typed the values into the `RichTextBox`.

| Format ListViewItems in a RichTextBox | CC BY-SA 3.0 | 0 | 2010-11-09T06:55:53.170 | 2013-02-02T22:07:58.593 | 2013-02-02T22:07:58.593 | 1,921,273 | 416,801 | [
"c#",
"winforms",
"listview",
"richtextbox"
] |
4,131,210 | 1 | 4,147,180 | null | 3 | 2,270 | Guys, I've tryied all and had not success.
```
ASIHTTPRequest *request = [ASIHTTPRequest requestWithURL:[NSURL URLWithString:self.urlString]];
request.delegate = self;
[request setDefaultResponseEncoding:NSUTF8StringEncoding];
[request setResponseEncoding:NSUTF8StringEncoding];
[request setRequestMethod:@"PUT"];
[request addRequestHeader:@"Accept" value:@"application/xml"];
[request addRequestHeader:@"Content-Type" value:@"application/xml; charset=UTF-8;"];
```
```
- (void)requestFinished:(ASIHTTPRequest *)request
{
[self HideProgressing];
// NSString *poweredBy = [[request responseHeaders] objectForKey:@"X-Powered-By"];
// NSString *contentType = [[request responseHeaders] objectForKey:@"Content-Type"];
NSString *body = [request responseString];
//NSString *body = [[NSString alloc] initWithData:[request responseData] encoding:NSUTF8StringEncoding];
NSLog(@"%@\n%@", body, request.responseStatusMessage);
```
Even "content-type" says it has UTF-8. But I see only stuff like "ዹ" instead cyrillic symbols.
Did somebody solve the same problem with encodings?
Data is from Basecamp API, if it helps. Thanks.

| Encoding problem with ASIHttpRequest response | CC BY-SA 2.5 | null | 2010-11-09T07:02:02.483 | 2010-11-10T17:24:52.390 | null | null | 72,766 | [
"iphone",
"xml",
"utf-8",
"asihttprequest",
"basecamp"
] |
4,131,220 | 1 | 4,220,487 | null | 13 | 10,914 | In my application,I have to load volumedata from set of images (MRC images) and keep the pixel data in memory.(images are grayscaled ,so one byte per pixel).
My development environment is QT framework ,MinGW for Windows and GCC for Linux.
At the moment,I use a simple data structure to store volumedata as :
```
unsigned char *volumeData;
```
and do one huge allocation as follows.
```
volumeData=new unsigned char[imageXsize * imageYsize * numofImages];
```
Following are the important methods to access image-data in a given plane,such as
```
unsigned char* getXYPlaneSlice(int z_value);
unsigned char* getYZPlaneSlice(int x_value);
unsigned char* getZXPlaneSlice(int y_value);
```
With my simple data-structure it was easy to implement above methods.
But we might need to adopt to volume size as 2000x2000x1000 (~3.7Gb) in the future.And current datastructure will not be able to handle that huge data.
1. How to avoid fragmentation ? Now,even with 1000x1000x200 data, application crash giving bad_alloc. Whats the best way to change the datastructure for this ? shall I use something like linked-list which each chunk is of size 100mb.
2. Also,user should be able to perfome some image-processing filters on volume-data and also should be able to reset to original pixel value. That means, I should keep two copies of volume-data. With current implemetation its like. unsigned char *volumeDataOriginal; unsigned char *volumeDataCurrent;
So with 2000x2000x1000 data-range its going to utilize about 8Gb (4Gb for each volume).
But in Win32 , the address space is 4GB.How to tackle this ? I should go with 64bit application ?
EDIT :
Here is a snapshot of my application 
Basically,I load the volume-data (from set of images,from MRC format..etc) and display them in different plane-viewers (XY,YX,YZ.Image shows XY-plane-viewer).I need to keep above 3 data-access methods to show an image in a particular plane.using slider-bar user can change which image to show in the selected plane)
Thanks in advance.
| Data structure to store huge amount of data? | CC BY-SA 3.0 | 0 | 2010-11-09T07:03:58.173 | 2013-04-18T05:19:19.890 | 2013-04-18T05:19:19.890 | 664,177 | 180,904 | [
"c++",
"memory",
"data-structures",
"dynamic-memory-allocation"
] |
4,131,597 | 1 | 5,962,716 | null | 4 | 1,589 | Assume the following class definitions.
```
public enum ContentType { Playlist, Audio, Video, Picture }
public interface IDataProvider
{
string Name
{
get;
}
}
public class ProviderList : List<IDataProvider>
{
}
public class MainViewModel
{
public Dictionary<ContentType, ProviderList> ProvidersDictionary;
public MainViewModel()
{
if (IsInDesignMode)
{
// Code runs in Blend --> create design time data.
}
else
{
// Code runs "for real"
this.ProvidersDictionary = new Dictionary<ContentType, ProviderList>();
ProviderList providerList = new ProviderList();
providerList.Add(new DataProvider());
this.ProvidersDictionary.Add(ContentType.Audio, providerList);
providerList = new ProviderList(providerList);
providerList.Add(new DataProvider());
this.ProvidersDictionary.Add(ContentType.Video, providerList);
}
}
}
```
So, this ProvidersDictionary property is bound to Window context menu as follows:
```
<Window.ContextMenu>
<ContextMenu ItemsSource="{Binding ProvidersDictionary}">
<ContextMenu.ItemTemplate>
<HierarchicalDataTemplate ItemsSource="{Binding Value}">
<TextBlock Margin="1" Text="{Binding Key}" Height="20"/>
<HierarchicalDataTemplate.ItemTemplate>
<DataTemplate>
<TextBlock Text="{Binding Name}" />
</DataTemplate>
</HierarchicalDataTemplate.ItemTemplate>
</HierarchicalDataTemplate>
</ContextMenu.ItemTemplate>
</ContextMenu>
</Window.ContextMenu>
```
The question is: how to make ICommand databinding for the DataProvider menu item click and to retrieve data type (enum type) and data provider (IDataProvider interface) within the command' Execute method.

I want to have some command class to be bound to MenuItems like:
```
class DataProviderMenuSelectCommand : ICommand
{
#region ICommand Members
public void Execute(object parameter)
{
ContentTypeProviderPair contentProviderPair = parameter as ContentTypeProviderPair;
if (contentProviderPair != null)
{
// contentProviderPair.Type property - ContentType
// contentProviderPair.Provider property - IProvider
}
}
}
```
MainViewModel will expose instance of this command class as a property.
| WPF ContextMenu Dictionary<Key, List<Value>> databinding | CC BY-SA 2.5 | 0 | 2010-11-09T08:13:43.457 | 2011-05-11T10:23:45.133 | 2010-11-10T10:39:20.407 | 490,018 | 490,018 | [
"wpf",
"data-binding",
"menu",
"icommand"
] |
4,131,719 | 1 | 4,158,863 | null | 5 | 3,291 | I want to create a special kind of selection, in which the image darkened and in part which user is selecting, the real Image is shown. You can see an Example:

I found two approaches for implementing this:
1. Implementing a control which show the darkened image. When user drag an ellipse over this control, an ellipse copy the real image (Image which is NOT Darkened) into the control canvas. In this scenario When he/she try to Resize the ellipse to SMALLER SIZE, first the whole rectangular area of ellipse darkened and then real image draw in the new Smaller Ellipse.
2. Same as Approach 1, but instead of drawing on the canvas of the control, we create a new control which show the real image. In this case, all messages send to the new control, SHOULD pass to the parent control. Because if user try to resize the ellipse to smaller size, WM_MOVE messages sent to this control, instead of the parent control.
Can please, someone show me the right direction for implementing this. I think that approach 1 is very hard to implement because it cause lot's of Flicker. Unless I implement a way to only repaint the changed part by InvalidateRect function.
Here is the code of the class TScreenEmul which is implemented by me, until now. It works but it has flicker.
```
unit ScreenEmul;
interface
uses Classes, Types, Windows, Messages, Graphics, Controls, SysUtils, Dialogs, ExtCtrls;
const
PixelCountMax = 32768;
type
PRGBTripleArray = ^TRGBTripleArray;
TRGBTripleArray = array[0..PixelCountMax-1] of TRGBTriple;
TScreenEmul = class(TCustomControl)
private
LastRect, DrawRect: TRect;
DrawStart: TPoint;
MouseDown: Boolean;
Backup, Darken: TBitmap;
FBitmap: TBitmap;
procedure BitmapChange(Sender: TObject);
procedure WMLButtonDown(var Message: TWMLButtonDown); message WM_LBUTTONDOWN;
procedure WMMouseMove(var Message: TWMMouseMove); message WM_MOUSEMOVE;
procedure WMLButtonUp(var Message: TWMLButtonUp); message WM_LBUTTONUP;
procedure WMEraseBkgnd(var Message: TWMEraseBkgnd ); message WM_ERASEBKGND;
procedure WMPaint(var Message: TWMPaint); message WM_PAINT;
procedure DarkenBitmap(B: TBitmap);
procedure RestoreImage;
procedure CalculateDrawRect(X, Y: Integer);
procedure SetBitmap(const Value: TBitmap);
public
constructor Create(AOwner: TComponent); override;
destructor Destroy; override;
property Bitmap: TBitmap read FBitmap write SetBitmap;
end;
implementation
{ TScreenEmul }
function AlphaBlend(Color1, Color2: TRGBTriple; Alpha: Byte): TRGBTriple; overload;
var
rPrimary : Real; // Primary (Color1) Intensity
rSecondary: Real;// Secondary (Color2) Intensity
begin
rPrimary:=((Alpha+1)/$100);
rSecondary:=(($100-Alpha)/$100);
with Result do
begin
rgbtBlue := Trunc(Color1.rgbtBlue * rPrimary + Color2.rgbtBlue * rSecondary);
rgbtGreen := Trunc(Color1.rgbtGreen * rPrimary + Color2.rgbtGreen * rSecondary);
rgbtRed := Trunc(Color1.rgbtRed * rPrimary + Color2.rgbtRed * rSecondary);
end;
end;
procedure TScreenEmul.BitmapChange(Sender: TObject);
begin
FreeAndNil(Backup);
Backup := TBitmap.Create;
Backup.Assign(FBitmap);
DarkenBitmap(FBitmap);
Darken := TBitmap.Create;
Darken.Assign(FBitmap);
end;
procedure TScreenEmul.CalculateDrawRect(X, Y: Integer);
begin
if X >= DrawStart.X then
begin
if DrawRect.Left <> DrawStart.X then DrawRect.Left := DrawStart.X;
DrawRect.Right := X
end
else
begin
if DrawRect.Right <> DrawStart.X then DrawRect.Right := DrawStart.X;
DrawRect.Left := X;
end;
if Y >= DrawStart.Y then
begin
if DrawRect.Top <> DrawStart.Y then DrawRect.Top := DrawStart.Y;
DrawRect.Bottom := Y;
end
else
begin
if DrawRect.Bottom <> DrawStart.Y then DrawRect.Bottom := DrawStart.Y;
DrawRect.Top := Y;
end;
end;
constructor TScreenEmul.Create(AOwner: TComponent);
begin
inherited;
MouseDown := False;
FBitmap := TBitmap.Create;
FBitmap.OnChange := BitmapChange;
DoubleBuffered := True;
end;
procedure TScreenEmul.DarkenBitmap(B: TBitmap);
var
I, J: Integer;
Row: PRGBTripleArray;
rgbBlack: tagRGBTRIPLE;
begin
rgbBlack.rgbtBlue := 0; rgbBlack.rgbtGreen := 0; rgbBlack.rgbtRed := 0;
for I := 0 to B.Height - 1 do
begin
Row := B.ScanLine[I];
for J := 0 to B.Width - 1 do
Row[J] := AlphaBlend(Row[J], rgbBlack, 150);
end;
end;
destructor TScreenEmul.Destroy;
begin
FBitmap.Free;
inherited;
end;
procedure TScreenEmul.RestoreImage;
begin
BitBlt(FBitmap.Canvas.Handle,
LastRect.Left, LastRect.Top, RectWidth(LastRect), RectHeight(LastRect),
Darken.Canvas.Handle, LastRect.Left, LastRect.Top, SRCCOPY);
end;
procedure TScreenEmul.SetBitmap(const Value: TBitmap);
begin
FBitmap := Value;
FBitmap.OnChange := BitmapChange;
end;
procedure TScreenEmul.WMEraseBkgnd(var Message: TWMEraseBkgnd);
begin
Message.Result := LResult(False);
end;
procedure TScreenEmul.WMLButtonDown(var Message: TWMLButtonDown);
begin
MouseDown := True;
with DrawRect do
begin
Left := Message.XPos;
Top := Message.YPos;
Right := Left;
Bottom := Top;
end;
DrawStart.X := DrawRect.Top;
DrawStart.Y := DrawRect.Left;
end;
procedure TScreenEmul.WMLButtonUp(var Message: TWMLButtonUp);
begin
MouseDown := False;
RestoreImage;
InvalidateRect(Self.Handle, DrawRect, False);
end;
procedure TScreenEmul.WMMouseMove(var Message: TWMMouseMove);
begin
if not MouseDown then Exit;
CalculateDrawRect(Message.XPos, Message.YPos);
RestoreImage;
BitBlt(
FBitmap.Canvas.Handle,
DrawRect.Left, DrawRect.Top, RectWidth(DrawRect), RectHeight(DrawRect),
Backup.Canvas.Handle,
DrawRect.Left, DrawRect.Top,
SRCCOPY);
InvalidateRect(Self.Handle, DrawRect, False);
LastRect := DrawRect;
end;
procedure TScreenEmul.WMPaint(var Message: TWMPaint);
var
B: TBitmap;
Rct: TRect;
X, Y: Integer;
FullRepaint: Boolean;
begin
inherited;
FullRepaint := GetUpdateRect(Self.Handle, Rct, False);
if not FullRepaint then
begin
Canvas.Draw(0, 0, FBitmap);
end
else
begin
B := TBitmap.Create;
B.SetSize(RectWidth(Rct), RectHeight(Rct));
FBitmap.Canvas.CopyRect(Rect(0, 0, B.Width, B.Height), B.Canvas, Rct);
Canvas.Draw(0, 0, B);
FreeAndNil(B);
end;
end;
end.
```
For using this class:
```
var
ScreenEmul: TScreenEmul;
begin
ScreenEmul := TScreenEmul.Create(Self);
ScreenEmul.Parent := Self;
ScreenEmul.Align := alClient;
ScreenEmul.Bitmap.LoadFromFile('C:\img13.bmp');
```
| Create a special visual selection tool for Image | CC BY-SA 2.5 | 0 | 2010-11-09T08:31:26.907 | 2010-11-13T04:30:45.520 | 2010-11-10T05:51:13.507 | 177,006 | 177,006 | [
"delphi",
"winapi",
"gdi",
"window-management"
] |
4,131,955 | 1 | 4,132,779 | null | 0 | 2,172 | i m using jqGrid along with asp.net mvc2... the problem is that i m calling a grid on button click event.. now evertime if i click the button the grid is getting reloaded but the edit and refresh buttons are displayed more than once.. how to solve this problem?
here is the image

```
function BindGrid() {
if (!firstClick) {
$("#list").trigger("reloadGrid");
}
firstClick = false;
/* Refreshes the grid */
$("#list").jqGrid({
url: '<%= Url.Action("GetScheduleInfo", "TouchSchedule") %>',
datatype: 'json',
mtype: 'GET',
postData: { StartDate: $('#StartDate').val(), EndDate: $('#EndDate').val(),
siteId: $('#ListFacility') ? $('#ListFacility').val() : -1 },
colNames: ['SiteID', 'Cal Date', 'Store Open', 'Start Time', 'End Time',
'MileageLimit AM', 'MileageLimit PM', 'TouchLimit PM',
'TouchLimit AM', 'Total Touches', 'Total Mileage', 'IsWeekend'],
colModel: [
{ name: 'SiteID', index: 'SiteID', width: 40, align: 'left',
/* key: true,*/editable: false, editrules: { edithidden: false },
hidedlg: true, hidden: false },
{ name: 'CalDate', index: 'CalDate', width: 100, align: 'left',
formatter: 'date', datefmt: 'm/d/Y', editable: true, edittype: 'text',
editrules: { required: true, date: true },
formoptions: { elmsuffix: ' *'} },
{ name: 'StoreOpen', index: 'StoreOpen', width: 40, align: 'left',
editable: true, edittype: 'select', formatter: 'select',
editrules: { required: true }, formoptions: { elmsuffix: ' *' },
editoptions: { dataInit: function (elem) {
$(elem).empty()
.append("<option value='1'>o</option>")
.append("<option value='2'>c</option>");
}
} },
{ name: 'StartTime', index: 'StartTime', width: 100, align: 'left',
formatter: 'date', datefmt: 'g:i A', editable: true, edittype: 'text',
editrules: { required: true, date: true },
formoptions: { elmsuffix: ' *'} },
{ name: 'EndTime', index: 'EndTime', width: 100, align: 'left',
formatter: 'date', datefmt: 'g:i A', editable: true, edittype: 'text',
editrules: { required: true }, formoptions: { elmsuffix: ' *'} },
{ name: 'MileageLimitAM', index: 'MileageLimitAM', width: 50,
align: 'left', editable: true, edittype: 'text',
editrules: { required: true }, formoptions: { elmsuffix: ' *'} },
{ name: 'MileageLimitPM', index: 'MileageLimitPM', width: 50,
align: 'left', editable: true, edittype: 'text',
editrules: { required: true }, formoptions: { elmsuffix: ' *'} },
{ name: 'TouchLimitAM', index: 'TouchLimitAM', width: 50,
align: 'left', editable: true, edittype: 'text',
editrules: { required: true }, formoptions: { elmsuffix: ' *'} },
{ name: 'TouchLimitPM', index: 'TouchLimitPM', width: 50,
align: 'left', editable: true, edittype: 'text',
editrules: { required: true }, formoptions: { elmsuffix: ' *'} },
{ name: 'TotalTouches', index: 'TotalTouches', width: 50,
align: 'left', editable: true, edittype: 'text',
editrules: { required: true }, formoptions: { elmsuffix: ' *'} },
{ name: 'TotalMileage', index: 'TotalMileage', width: 50,
align: 'left', editable: true, edittype: 'text',
editrules: { required: true }, formoptions: { elmsuffix: ' *'} },
{ name: 'IsWeekend', index: 'IsWeekend', width: 200,
align: 'left', editable: false, hidden: false}
],
pager: $('#listPager'),
rowNum: 10,
rowList: [10, 20, 30],
sortname: 'CalDate',
sortorder: "desc",
viewrecords: true,
caption: 'Schedule Calendar',
autowidth: true,
afterInsertRow: function (rowid, rowdata) {
if (rowdata.IsWeekend)
$(this).jqGrid('setRowData', rowid, false, { color: 'blue' });
}
}).navGrid('#listPager',
{ edit:true, add:false, del:false, search:false, refresh:true });
}
```
| multiple edit and delete buttons on jqGrid reload | CC BY-SA 2.5 | null | 2010-11-09T09:04:41.263 | 2010-11-11T05:15:33.523 | 2010-11-10T11:48:08.017 | 21,234 | 218,554 | [
"asp.net-mvc",
"jqgrid"
] |
4,131,980 | 1 | null | null | 1 | 1,065 | I am confused with the handling of the response of the server, when submitting an AJAX request. What I would like to do, is an update of a table by clearing it and inserting the new ones.
The following code of the controller gives a resonse to an ajax request, triples is a list:
```
def resultsAjax = {
def triples = linkedDataService.getRemoteTriplesTable("Student4")
render(template:'tripleResultsTable', model:[triples:triples])
}
```
This is the form:
```
<g:form action="results">
<label for="id">Resource ID </label>
<g:textField name="id" />
<g:submitToRemote value="search" update="resultsAjax"
url="[controller:'tripleProperty', action:'resultsAjax']"/>
</g:form>
```
And the table below:
```
<g:render id="resultsAjax" template="tripleResultsTable" model="${triples}"/>
```
How can I access the list that is responded from the server?
It works more or less, but strange thing is, that the table is not updated, but the new values are on top of the table...

The template is just this:
```
<g:each in="${triples}" status="i" var="tripleProperty">
<tr class="${(i % 2) == 0 ? 'odd' : 'even'}">
<td>${tripleProperty.property}</td>
<td>${tripleProperty.value}</td>
</tr>
```
Does it need some more code than render(template..) to replace the values in the table?
| Accessing the AJAX response and updating the table with new values | CC BY-SA 3.0 | null | 2010-11-09T09:08:00.013 | 2013-12-26T20:27:01.023 | 2013-12-26T20:27:01.023 | 13,295 | 371,764 | [
"ajax",
"grails"
] |
4,132,157 | 1 | 4,135,861 | null | 2 | 1,038 | I have a query,which works in ORACLE but doesn't work in SQL SERVER 2005...How can I convert this query to work in SQL SERVER 2005.
```
select user_name
, url
, count(*)
,first_value(count(*)) over (partition by user_name
order by count(*) desc) max_total
from urls
group by user_name, url
order by max_total desc,user_name
```
Result:

| Analytical Functions in Sql server 2005 | CC BY-SA 2.5 | null | 2010-11-09T09:30:48.703 | 2010-11-09T16:12:39.590 | 2010-11-09T13:21:20.200 | 445,540 | 445,540 | [
"sql-server-2005",
"oracle"
] |
4,132,257 | 1 | 4,819,439 | null | 0 | 229 | I have a collection class. Say CellCollection, which contains Cells which contains a collection called Cell.

If we do data binding it binds in linear manner. Like first cell11, cell12, cell13, cell14 then, cell21, cell22, etc.,
[Lets assume the collection size is static and proceed]
I have an ItemTemplate for ListBox, which consists of StackPanel which contains 3 textblocks. What I want is the first textblock to have first `"Cells"`'s first cell ie, `Cell11`, followed by the second textblock to have second `"Cells"`'s first cell `Cell21` etc.,
Is it possible to bind the collections using indexes in such a way they will be processes in-parallel.
I dono't how to ask this question. I hope the image would help.
| How to perform Parallel DataBinding in WPF | CC BY-SA 2.5 | 0 | 2010-11-09T09:43:17.903 | 2011-01-27T17:03:18.580 | null | null | 270,190 | [
"wpf",
"data-binding",
"binding"
] |
4,132,309 | 1 | null | null | 4 | 902 | I have a column chart which is grouped with a CategoryAxis.
My problem is that when the columns are grouped together there is no spacing/margin between the columns.
I have tried to apply a style with margin on the DataPoint, but the only this that does is to move all the columns but not applying a margin on each column.
See image:

Styling code:
```
<Charting:ColumnSeries.DataPointStyle>
<Style TargetType="Charting:ColumnDataPoint">
<Setter Property="Margin" Value="10, 0, 0, 0"/>
<Setter
Property="MaxWidth"
Value="5" />
<Setter
Property="MaxWidth"
Value="5" />
</Style>
</Charting:ColumnSeries.DataPointStyle>
```
| WPF Charting ColumnSeries with CategoryAxis, margin between the Columns | CC BY-SA 2.5 | null | 2010-11-09T09:48:40.223 | 2012-03-18T11:51:12.807 | 2010-11-10T15:46:05.577 | 452,861 | 452,861 | [
"wpf",
"c#-4.0",
"wpftoolkit"
] |
4,132,313 | 1 | 4,132,807 | null | 0 | 572 | Here is my code, from the search results page:
```
{if $listing.SalaryType!=''&& $listing.Salary!=''}<dt>Salary:</dt>
<dd>{$listing.Salary} {$listing.SalaryType}</dd>{/if}
```
Which gives this output:

It says 'Array' instead of the correct value. Any idea where I can start looking to solve this problem? Where is the 'Array' coming from?
Here is some more information. On the job details page, this code:
```
<div class="smallListingInfo"><strong>[[FormFieldCaptions!Salary]]:</strong> {display property=Salary} [[$listing.SalaryType]]</div>
```
Gives this output:

You can see the salary value works in this instance, how is that different?
Using the smarty debug console I got the following:
```
Title => Services Senior Manager
EmploymentType => Contractor
JobCategory => Accounting,Admin-Clerical
Occupations => empty
Country => United States
Salary => Array (5)
add_parameter => 2
value => 30000
currency_sign => £
course => 1
currency_code => USD
State => California
SalaryType => per month
City => Los Angeles
```
How do I get the value to show instead of 'Array'?
| PHP/Smarty giving 'Array' instead of correct value? | CC BY-SA 2.5 | 0 | 2010-11-09T09:49:05.403 | 2010-11-09T12:21:14.440 | 2010-11-09T12:21:14.440 | 437,806 | 437,806 | [
"php",
"smarty"
] |
4,132,349 | 1 | 9,818,844 | null | 2 | 692 | Could anyone help me in assessing why the code below doesn't work. I'm using the common extension method for implementing Include when using IObjectset. In our repositories we were seeing this not returning correctly so I've isolated the code in test app as below. I've also included the interface based Context if this may prove relevant and a screenshot of the relevant model section. This occurs for all Includes on IObjectSet properties not just the DPASelections one I've chosen for this example.
If I update the context to return ObjectSet (still using the POCO entities) rather than IObjectSet it all works fine. When using IObjectSet and the extension method and step through the code I see that the extension method is completing correctly with a call to the ObjectQuery we're casting to but the included entities are never returned on the graph. As said, this works perfectly when I don't interface out the Context and return ObjectSet properties hence calling Include directly on ObjectSet.
I'm not getting any errors on executing the query so this isn't the same as several other questions on SO which refer to compiled queries.
Has anyone else experienced problems with this extension method implementation or can anyone spot what I'm doing wrong here?
Any help very much appreciated.
```
static void Main(string[] args)
{
using (var context = new AssocEntities())
{
context.ContextOptions.LazyLoadingEnabled = false;
Candidate candidate = context.Candidates
.Include("DPASelections.DPAOption")
.SingleOrDefault(c => c.Number == "N100064");
//Count is 0 when using ext. method and IObjectSet through AssocContext but correct when using Include
//on ObjectSet through AssocContext
Console.WriteLine("DPASelection count = {0}",candidate.DPASelections.Count);
//This is always null when using IObjectSet and ext. method but populated
//when using Include on ObjectSet
var option = candidate.DPASelections.First().DPAOption;
Console.WriteLine("First DPAOption = {0} : {1}",option.Id,option.Text);
}
Console.ReadLine();
}
}
public static class Extensions
{
public static IQueryable<TSource> Include<TSource>(this IQueryable<TSource> source, string path)
{
var objectQuery = source as ObjectQuery<TSource>;
if (objectQuery != null)
{
objectQuery.Include(path);
}
return source;
}
}
//Subset of custom context implementing IObjectSet as returns.
//Works fine when I return ObjectSet rather than IObjectSet and use
//the Include method directly
public partial class AssocEntities : ObjectContext
{
public const string ConnectionString = "name=AssocEntities";
public const string ContainerName = "AssocEntities";
#region Constructors
public AssocEntities()
: base(ConnectionString, ContainerName)
{
this.ContextOptions.LazyLoadingEnabled = true;
}
public AssocEntities(string connectionString)
: base(connectionString, ContainerName)
{
this.ContextOptions.LazyLoadingEnabled = true;
}
public AssocEntities(EntityConnection connection)
: base(connection, ContainerName)
{
this.ContextOptions.LazyLoadingEnabled = true;
}
#endregion
#region IObjectSet Properties
public IObjectSet<Address> Addresses
{
get { return _addresses ?? (_addresses = CreateObjectSet<Address>("Addresses")); }
}
private IObjectSet<Address> _addresses;
public IObjectSet<Answer> Answers
{
get { return _answers ?? (_answers = CreateObjectSet<Answer>("Answers")); }
}
private IObjectSet<Answer> _answers;
public IObjectSet<Candidate> Candidates
{
get { return _candidates ?? (_candidates = CreateObjectSet<Candidate>("Candidates")); }
}
}
```
And the model...

| Trouble with Include extension on IObjectSet not working | CC BY-SA 2.5 | 0 | 2010-11-09T09:53:19.983 | 2013-09-24T17:59:56.707 | null | null | 355,389 | [
"entity-framework"
] |
4,132,392 | 1 | 4,134,046 | null | 1 | 467 | Does anybody know how i can create a stacking list component (just like photoshop) where the first row starts at the bottom and the second on above the bottom and so on.
Normally the list component works like this.
0
1
2
3
what i need is a list component that works like this
3
2
1
0
To illustrated my question i have uploaded a picture of the component i need to build.
The rowindex of the inverted list component must start at the bottom.
meaning that the lowest row in the list is always zero.

Does anybody know how i can accomplish this?
Thanks
DJ
| How can i create a Flex list component with the 0 rowIndex starting at the bottom instate of the top | CC BY-SA 2.5 | 0 | 2010-11-09T09:57:39.083 | 2010-11-10T06:27:11.820 | 2010-11-09T12:06:29.750 | 200,960 | 200,960 | [
"apache-flex",
"actionscript-3",
"list",
"flex3",
"flex4"
] |
4,132,473 | 1 | 4,132,641 | null | 3 | 287 | Using Delphi 2009 on Windows XP to develop desktop application.
Is there any way to make a windows dialog modal to a tab, instead of application. How can I achieve this? Threads? any frameworks supporting this?
Something similar to

Thanks in advance.
Kind Regards,
Pavan.
| Tab-modality in windows application | CC BY-SA 2.5 | 0 | 2010-11-09T10:07:07.207 | 2010-11-09T21:03:06.377 | 2010-11-09T11:50:23.437 | 91,299 | 129,366 | [
"delphi",
"windows-xp"
] |
4,132,587 | 1 | 4,132,819 | null | 1 | 485 | I have an issue in IE6 (no surprise) where button elements are hovering in IE6 rather than being positioned correctly in Firefox, Chrome and Opera. This seems only to occur when clicking a non-selected tab.
The CSS and JS are the latest versions of JQuery UI.
Has anyone experienced this issue?
[Edit] My apologies, I forgot to add a screenshot :)

The issue seems to arise when the content is dynamically generated and I select another tab. When the content generates again (cookie keeps the current selected tab on page refresh), the content moves to the correct place.
| jQuery Tabs and Button in IE6 | CC BY-SA 3.0 | null | 2010-11-09T10:22:04.260 | 2013-02-02T22:44:33.807 | 2013-02-02T22:44:33.807 | 1,921,273 | 464,566 | [
"jquery",
"jquery-ui",
"jquery-ui-tabs",
"internet-explorer-6"
] |
4,132,631 | 1 | 4,132,654 | null | 0 | 64 | This is my query
```
SELECT PadID FROM Pads WHERE ((RemoveMeDate='2001-01-01 00:00:00')
AND (catid in (0,1,2,3,4,5,6,7,8,9,10,11)) AND ((ProgramName)<>''))
ORDER BY VersionAddDate DESC LIMIT 0,20;
```
Since I added
```
catID in (0,1,2,3,4,5,6,7,8,9,10,11)
```
Its slowed down a lot.
I've tried...
```
SELECT PadID FROM Pads WHERE RemoveMeDate='2001-01-01 00:00:00' AND
catid >= 0 and catid <= 11 ORDER BY VersionAddDate DESC LIMIT 0,20
```
But thats just a slow.
I thought I might be able to you `coalesce` but I'm not sure how ?
Any ideas ?
EDITS
Categories table

Pad Table

| mySQL how can I speed up with function field > x and field < y | CC BY-SA 2.5 | null | 2010-11-09T10:26:55.870 | 2010-11-09T11:57:29.313 | 2010-11-09T11:22:11.533 | 450,456 | 450,456 | [
"mysql"
] |
4,132,704 | 1 | 4,171,661 | null | 8 | 15,804 | I have problems with files encoding in Visual Studio 2008. While compiling I'm getting such errors:

When I'm trying to open file where particular error occures, encoding window appears:

By defualt auto-detect is set. When I change encoding option to UTF-8, everything works. If I open each problematic file in my project using UTF-8 encoding, project starts to compile. The problem is I have too many files and there is ridiculous to open each file and set encoding to UTF-8. Is there any way to make this in a quick way ?
My VS settings are:

I'm using Windows Server 2008 R2.
For Hans Passant and Noah Richards. Thanks for interaction. I recently changed my operating system so everything is fresh. I've also downloaded fresh solution from source control.
In OS regional settings I've changed system locale to Polish(Poland):

In VS I've changed international settings to the same as windows:

The problem is still not solved.
When I open some .cs files using auto-detection for encoding, and then check , some of this .cs files have codepage 1250:

but internally looks following:

It is wired, because when I check properties of such particular files in source control, they seems to have UTF-8 encoding set:

I don't understand this mismatch.
All other files have UTF-8 encoding:

and opens correctly. I have basically no idea what is going wrong because as far as I know my friend has the same options set as me, and the same project compiles for him correctly. But so far he happily hasn't encountered encoding issues.
| Visual Studio encoding problems | CC BY-SA 3.0 | 0 | 2010-11-09T10:35:33.070 | 2013-04-17T21:57:35.257 | 2013-04-17T21:56:47.660 | 270,315 | 270,315 | [
"visual-studio",
"visual-studio-2008"
] |
4,132,749 | 1 | null | null | 0 | 1,580 | I am using JFreeChart to generate bar charts. Everything is working find, but I have one very minor issue: the left side of the bar is overlapping the y-axis. I would prefer to have the bars sticking (but not overlapping) to the axis. If my description is unclear: everything would be perfect if the bars move 1 pixel to the right.
At first I thought the bar's stroke was the problem, but disabling the stroke gives the same problem.
: The image is zoomed in at the problem area. The blue areas are the bars, and I would like the axis (the gray line) to be drawn on top, and not below.

| JFreeChart: bar overlaps y-axis | CC BY-SA 2.5 | null | 2010-11-09T10:39:14.067 | 2010-11-10T02:48:28.547 | 2010-11-09T12:16:12.313 | 79,505 | 79,505 | [
"java",
"jfreechart"
] |
4,132,801 | 1 | 4,151,224 | null | 1 | 324 | This is my object model:
A Client can have many Projects (optional), but a Project must have only one Client (required).
A MemoEntry can have only one Project (optional), and there can be different MemoEntry(s) with the same Project (optional).

Upon Delete:
- - - -
Code that is called upon Delete of Client, Project or MemoEntry inside each of their own TableViewControllers:
```
// Delete the managed object.
NSManagedObjectContext *context = [self.fetchedResultsController managedObjectContext];
[context deleteObject:[self.fetchedResultsController objectAtIndexPath:indexPath]];
NSError *error;
if (![context save:&error]) {
// Update to handle the error appropriately.
NSLog(@"MyApp - Unresolved error %@, %@", error, [error userInfo]);
exit(-1); // Fail
}
```
Problem in bold:
If I create a Project and then delete it's parent Client, the code correctly follows into the `IF` statement. If I access the "deleted" Client, it is still there and I can edit `clientName` and other properties, save it and all fine. I can go to the Projects and open the Project and see the updated Client's `clientName`.
Are my delete rules not set up properly? Does calling `[context save:&error]` saves the delete, even if it goes on error? Any thoughts?
*edit - Line where breakpoint error stops:
```
NSEntityDescription *entity = [NSEntityDescription entityForName:@"Client" inManagedObjectContext:passedManagedObjectContext];
```
Error thrown:
```
Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: '+entityForName: could not locate an NSManagedObjectModel for entity name 'Client''
*** Call stack at first throw:
(
0 CoreFoundation 0x30897ed3 __exceptionPreprocess + 114
1 libobjc.A.dylib 0x3002f811 objc_exception_throw + 24
2 CoreData 0x3162f575 +[NSEntityDescription entityForName:inManagedObjectContext:] + 124
3 EasyMemo 0x00008ebb -[EditingViewController viewWillAppear:] + 1478
4 UIKit 0x31ec4d9b -[UINavigationController _startTransition:fromViewController:toViewController:] + 610
5 UIKit 0x31ec4ac3 -[UINavigationController _startDeferredTransitionIfNeeded] + 182
6 UIKit 0x31ebd21b -[UINavigationController pushViewController:transition:forceImmediate:] + 606
7 UIKit 0x31ebcfb3 -[UINavigationController pushViewController:animated:] + 34
8 EasyMemo 0x000058fd -[DetailProjectViewController tableView:didSelectRowAtIndexPath:] + 368
9 UIKit 0x31f7ae6f -[UITableView _selectRowAtIndexPath:animated:scrollPosition:notifyDelegate:] + 662
10 UIKit 0x31f772af -[UITableView _userSelectRowAtIndexPath:] + 130
11 Foundation 0x349c7e8d __NSFireDelayedPerform + 368
12 CoreFoundation 0x3084e7fb __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ + 14
13 CoreFoundation 0x3084e2ad __CFRunLoopDoTimer + 860
14 CoreFoundation 0x3081f7a5 __CFRunLoopRun + 1088
15 CoreFoundation 0x3081f277 CFRunLoopRunSpecific + 230
16 CoreFoundation 0x3081f17f CFRunLoopRunInMode + 58
17 GraphicsServices 0x31e445f3 GSEventRunModal + 114
18 GraphicsServices 0x31e4469f GSEventRun + 62
19 UIKit 0x31e51123 -[UIApplication _run] + 402
20 UIKit 0x31e4f12f UIApplicationMain + 670
21 EasyMemo 0x0000259f main + 70
22 EasyMemo 0x00002554 start + 40
)
terminate called after throwing an instance of 'NSException'
```
| Deny rule in Core Data not working propertly | CC BY-SA 2.5 | 0 | 2010-11-09T10:46:17.260 | 2010-11-11T04:23:40.307 | 2010-11-11T04:23:40.307 | 432,539 | 432,539 | [
"iphone",
"core-data",
"ios",
"nsmanagedobjectcontext"
] |
4,132,846 | 1 | 4,133,858 | null | 1 | 4,030 | I have a Google Chart in my application and I have removed the axis lines, however because I am using a background image on my chart for faux axis / grid lines I need to add some padding to the chart image itself.
I found the chma property in the Google Charts documentation, but it didn't seem to work the way I wanted it too.
Take a look at the following chart example:

Notice the space between the graph image and the x axis (the bottom dates) is really tight, like almost overlappying? Is there a way to increase the spacing between the X axis and the chart image? Because I've removed the axis lines so there are just lines for the data showing, but I would also like to add some padding to the left hand side to the move the data lines over a little bit.
Here's the code I am using in my application.
```
http://chart.apis.google.com/chart?chs=1000x265&cht=lc:nda&chma=0,0,0,0|10,0&chco=ffff00,cc34cc,339900,f17d09&chf=bg,s,65432100&chds=0.5,4.0&chd=t:1.0,3.4,4.0,1.8,2.3,2.9,3.8,1.3|4.0,2.0,2.8,1.4,3.9,3.4,1.0,1.6|3.4,1.3,3.9,1.8,2.2,3.6,1.4,1.6|0.7,1.3,2.6,4.0,3.1,0.5,3.9,1.8&chxt=y,x&chxp=1,0,24.6,49,73.5,97.9&chxs=1,525252,12,0,lt|2,525252,12,0,lt&chx=1,525252,12&chxl=0:|0.5|1.0|1.5|2.0|2.5|3.0|3.5|4.0|1:|0000|0600|1200|1800|2400|
```
Is this possible and if so, how? Thank you.
| Google Charts Line Chart Padding Issue | CC BY-SA 2.5 | null | 2010-11-09T10:53:38.700 | 2011-06-14T15:37:17.493 | null | null | 302,318 | [
"charts",
"google-visualization"
] |
4,133,281 | 1 | 4,138,598 | null | 2 | 675 | I'm trying to achieve this "effect" in cocoa (photo taken from Things.app from Cultured Code):

| iPhoto-style sidebar | CC BY-SA 2.5 | null | 2010-11-09T11:44:50.217 | 2010-11-09T21:03:46.877 | null | null | 220,935 | [
"cocoa",
"interface",
"interface-builder"
] |
4,133,250 | 1 | 4,133,279 | null | 2 | 7,451 | I have this form:

Markup is:
```
<table style="width: 100%; padding:5px;">
<col style="width: 20%; text-align: left" />
<col style="width: 80%; text-align: left" />
<tr>
<td>
<div>
Наименование</div>
</td>
<td>
<dx:ASPxButtonEdit ID="beWorkTypeName" runat="server" AutoPostBack="False">
<Buttons>
<dx:EditButton>
</dx:EditButton>
</Buttons>
</dx:ASPxButtonEdit>
</td>
</tr>
<tr>
<td>
<div>
Скважина</div>
</td>
<td>
<dx:ASPxButtonEdit ID="beWell" runat="server" AutoPostBack="False">
<Buttons>
<dx:EditButton>
</dx:EditButton>
</Buttons>
</dx:ASPxButtonEdit>
</td>
</tr>
<tr>
<td>
<div>
Дата начала</div>
</td>
<td>
<table>
<tr>
<td>
<dx:ASPxDateEdit ID="deBeginDate" runat="server">
</dx:ASPxDateEdit>
</td>
<td>
<dx:ASPxButton ID="btnDateChange" AutoPostBack="false" Enabled="false" Text="Изменить дату"
runat="server">
</dx:ASPxButton>
</td>
<td>
<dx:ASPxCheckBox ID="cbIsMainWorkType" Enabled="false" runat="server">
</dx:ASPxCheckBox>
</td>
<td>
<div>
Основной вид работ в заявке</div>
</td>
</tr>
</table>
</td>
</tr>
```
Question is:
How do I get rid of this awful indent of table inside another table?
| Html table indent problem | CC BY-SA 2.5 | null | 2010-11-09T11:40:37.943 | 2010-11-09T11:49:48.367 | null | null | 353,996 | [
"html",
"css"
] |
4,133,458 | 1 | 4,145,465 | null | -1 | 1,049 | I'm really curious to know which off-the-shelf WPF library [this program](http://www.vectorvest.com/products/vvrt.aspx) is using for its web interface.
I'd like to use a few of the components in a small, in-house .NET program I'm writing.
Here is a couple of images showing the [program in question](http://www.vectorvest.com/products/vvrt.aspx) (and if you don't know what WPF library this one is based on, please feel free to recommend your favourite).


| Image recognition puzzle: Which off-the-shelf WPF library is this program using for its GUI? | CC BY-SA 2.5 | null | 2010-11-09T12:09:34.587 | 2010-11-10T14:24:10.817 | 2010-11-09T12:15:35.693 | 107,409 | 107,409 | [
"wpf",
"wpf-controls",
"wpftoolkit"
] |
4,133,510 | 1 | 4,136,521 | null | 16 | 21,747 | In Matlab the command 'axis equal':
> sets the aspect ratio so that equal tick mark
increments on the x-,y- and z-axis are equal in size. This
makes SPHERE(25) look like a sphere, instead of an ellipsoid
However, when using the `loglog` plotting function, this doesn't work "properly". What I would like to happen is that I get an aspect ratio so that a given occupies the same visual distance. What actually happens is that
```
>> loglog(2.^[1:20]*1e10,(2.^[1:20]).^2)
>> axis equal
```
results in

rather than

So that the slope 2 (from the squared) could be easily observed, and so that there wouldn't be all that extra white space.
My question is:
> Is there a Matlab command that does this for me? Alternatively, has anyone solved this problem before?
| axis equal in a Matlab loglog plot | CC BY-SA 2.5 | 0 | 2010-11-09T12:15:02.703 | 2010-11-10T16:54:03.553 | 2010-11-09T14:03:40.800 | 360,496 | 360,496 | [
"matlab",
"plot",
"logarithm"
] |
4,134,085 | 1 | 4,134,779 | null | 2 | 1,228 |



Any idea how i can get this done?
The problem is that all my prices are being taxed on the homepage now.
So if i say the amount must be €100 it makes it €119 now and i don't want that.
Any help is realy appreaciated!
| How to set tax in price magento | CC BY-SA 2.5 | null | 2010-11-09T13:22:47.750 | 2010-11-09T14:30:54.577 | null | null | 487,527 | [
"content-management-system",
"magento",
"webshop"
] |
4,134,091 | 1 | 4,134,119 | null | 0 | 741 | the below shows the css i am using, yes it not profesional i am a beginner regarding css.
i want to write some property in the css such that, the div's only take up the width needed and not more.
that is the width property set as width: 60%; etc takes 20% even if the control within it, or text within it is not that long. like say "hi" within the div takes 60% still!!!
## css
```
#form1
{
padding: 0px 0px 0px 0px;
margin: 0px;
display:inline-block;
width:100%;
font-family: Times New Roman;
font-size: 2em;
}
#container
{
margin: 0 auto;
width: 100%;
/*background-color: Yellow;*/ /* for testing*/
}
#header
{
background: #ccc;
padding: 20px; /*remove as needed*/
color: Blue;
text-align:center;
}
#navigation
{
float: left;
width: 100%;
background: White;/* black*/
color:White;
font-size: smaller;
}
#ul
{
margin: 0;
padding: 0;
}
#link
{
list-style-type: none;
display: inline;
}
/* for url one */
#url1
{
float: left;
padding: 0px 5px 0px 5px;
border-right: 1px solid #fff;
background-color: White;
}
#url1 a
{
float: left;
color: Black;
text-decoration: none;
}
#url1 a:hover
{
background-color:ButtonShadow;
color:Highlight;
text-transform:uppercase;
font-size:xx-large;
}
/*for url one ends*/
#content-container1
{
padding-top:5px;
float: left;
width: 100%;
/*background: #fff url(/wp-content/uploads/layout-three-liquid-background1.gif) repeat-y 20% 0;*/
}
#content-container2
{
float: left;
width: 100%;
/*background: url(/wp-content/uploads/layout-three-liquid-background2.gif) repeat-y 80% 0;*/
}
#section-navigation
{
float: left;
width: 16%;
border-right-color:White;
border-right-style:solid;
border-right-width:thin;
/*background: gray;*/ /* for testing */
display: inline;
}
#leftul
{
margin: 0;
padding: 0;
}
#leftlink
{
padding-left:0.2em;
list-style-type: none;
/*background-color: Yellow;*/ /*for testing */
}
#leftlink a
{
color: Aqua;
text-decoration: underline;
}
#content
{
border-left-color: White;
border-left-style:solid;
border-left-width:thin;
float: left;
width: 56%;
}
#aside
{
float: right;
width: 16%;
padding: 20px 0;
margin: 0 2% 0 0;
display: inline;
}
#aside h3 { margin: 0; }
#footer
{
clear: both;
background: #ccc;
text-align: right;
padding: 20px;
height: 1%;
}
.symbols
{
font-family: Webdings;
}
```
## and the pic

## html as appears by ie6
```
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><title>
</title><link rel="stylesheet" type="text/css" href="LAYOUT1.css" /></head>
<body>
<form name="form1" method="post" action="DynamicLayout.aspx" id="form1">
<div>
<input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="/wEPDwULLTE2MTY2ODcyMjlkZOy4VHs0ZOF6zRS6A7E09eCqf5GY" />
</div>
<div>
<input type="hidden" name="__EVENTVALIDATION" id="__EVENTVALIDATION" value="/wEWAgKFjacpAqDAiY0LQudCxpijJWZK6qWohE+SufqyOGA=" />
</div>
<div>
</div>
<div id="container" runat="server">
<div id="header" runat="server">
<span>The header from code label</span><input name="ctl03" type="text" value="This is the text box" />
</div><div id="navigation" runat="server">
<div id="ul" runat="server">
<div id="link" runat="server">
<div id="url1" runat="server">
<a class="symbols" href="#">H</a>
</div><div id="url2" runat="server">
<a href="#">About</a>
</div>
</div>
</div>
</div><div id="content-container1" runat="server">
<div id="content-container2" runat="server">
<div id="section-navigation" runat="server">
<div id="leftul" runat="server">
<div id="leftlink" runat="server">
LEFT SIDE
</div>
</div>
</div><div id="content" runat="server">
This is the center of the page
</div>
</div>
</div>
</div></form>
</body>
</html>
```
| how to ask the div to not take up space by using css | CC BY-SA 2.5 | null | 2010-11-09T13:23:57.313 | 2010-11-09T13:46:28.020 | 2010-11-09T13:46:28.020 | 287,745 | 287,745 | [
"stylesheet",
"html"
] |
4,134,312 | 1 | 4,134,393 | null | 1 | 155 | I'm trying to achieve the following layout without tables or JavaScript.

It's basically the common layout of desktop software. Some toolbars and the actual content in the middle. I'm trying to replicate the layout in a web-application.
I need all the toolbars to be flexible and optional. So in one state there might only be the top toolbar with 3 rows of icons and in another case all four toolbars with just a little content.
The application will be using 100% of the document width / height and must not overflow. However, the div in the middle has overflow: auto and should scale in every direction. There might be a case where all the toolbars are hidden and then the middle div should take the whole document.
The application requires JavaScript and doesn't support IE6 at all, but I'm still looking for a cross-browser way to do this with CSS.
It's very easy and clean to do it with a table and I know how to do it with JavaScript, but I have come across this problem multiple times and would like to stop using tables.
| Filling all the available space horizontally and vertically, with divs | CC BY-SA 2.5 | 0 | 2010-11-09T13:46:41.570 | 2010-11-09T13:55:14.503 | null | null | 73,605 | [
"html",
"css",
"layout"
] |
4,134,683 | 1 | 4,152,295 | null | 1 | 537 | I've come across an undesirable effect of using JointStyle.MITER when clearing/redrawing graphics.
My project involves managing custom line graphics with both round and sharp edges, which is why I would like to use a miter joint style.
When the line thickness is greatly increased, even the round areas of the line are affected by the miter style. While I find this unfortunate, it's understandable and not the bug I'm referring to. the bug(?) occurs when decreasing the line thickness doesn't completely clear the graphics, as instructed to do so by the code each time the thickness changes, leaving artifacts of the line graphics where the line once was. Artifacts are also left by sharp edges, not just rounded corners.
I'm using Flash Player version 10.1.53.64 on Mac OS X Snow Leopard (10.6.4).
You can test this by running my sample code below. use the left and right keyboard arrows change the thickness of the stroke of a round rect.
The graphics artifacts are superficial. Dragging the shape over their location after they appear will remove them. Code updated with dragging functionality.
```
package
{
import flash.display.CapsStyle;
import flash.display.JointStyle;
import flash.display.LineScaleMode;
import flash.display.Sprite;
import flash.events.Event;
import flash.events.KeyboardEvent;
import flash.events.MouseEvent;
import flash.ui.Keyboard;
public class StrokeWidth extends Sprite
{
private var roundRect:Sprite = new Sprite();
private var strokeThickness:Number = 6;
public function StrokeWidth()
{
addEventListener(Event.ADDED_TO_STAGE, init);
}
private function init(evt:Event):void
{
removeEventListener(Event.ADDED_TO_STAGE, init);
stage.addEventListener(KeyboardEvent.KEY_DOWN, keyDownEventListener);
roundRect.addEventListener(MouseEvent.MOUSE_DOWN, mouseEventListener);
roundRect.addEventListener(MouseEvent.MOUSE_UP, mouseEventListener);
drawRoundRect();
roundRect.x = roundRect.y = 100;
addChild(roundRect);
}
private function drawRoundRect():void
{
roundRect.graphics.clear();
roundRect.graphics.lineStyle(strokeThickness, 0x000000, 1.0, true, LineScaleMode.NONE, CapsStyle.NONE, JointStyle.MITER);
roundRect.graphics.beginFill(0xFF0000);
roundRect.graphics.drawRoundRect(0, 0, 400, 200, 100);
}
private function mouseEventListener(evt:MouseEvent):void
{
switch (evt.type)
{
case MouseEvent.MOUSE_DOWN: roundRect.startDrag(); break;
case MouseEvent.MOUSE_UP: roundRect.stopDrag();
}
}
private function keyDownEventListener(evt:KeyboardEvent):void
{
switch (evt.keyCode)
{
case Keyboard.LEFT: strokeThickness -= 1; break;
case Keyboard.RIGHT: strokeThickness += 1;
}
drawRoundRect();
}
}
}
```

| ActionScript - Clearing Graphics With JointStyle.MITER Bug? | CC BY-SA 3.0 | 0 | 2010-11-09T14:22:33.297 | 2011-11-28T22:54:47.623 | 2011-11-28T22:54:47.623 | 214,668 | 336,929 | [
"actionscript-3",
"graphics",
"rounded-corners",
"linestyle",
"miter"
] |
4,134,768 | 1 | 4,135,145 | null | 2 | 2,718 | I have a control on my page will contain multiple multi-line text boxes that need to be resizable.
I am attempting to use the jQuery resizable function to accomplish this task. I only need my text boxes to be expandable vertically. Unfortunately I can only get the resizable function to work for the first div.
Here's a sample of my code:
```
<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="Page_jQuery_Resizable.aspx.vb"
Inherits="jQueryTest.Page_jQuery_Resizable" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<!DOCTYPE HTML>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>jQuery Test - Page 2</title>
<script src="Scripts/js/jquery-1.4.2.min.js" type="text/javascript"></script>
<script src="Scripts/js/jquery-ui-1.8.6.custom.min.js" type="text/javascript"></script>
</head>
<body>
<style type="text/css">
table.textboxTable td
{
padding: 15px;
padding-bottom: 30px;
border: 2px solid blue;
}
.ImResizable
{
height: 60px;
width: 470px;
}
.ImResizable textarea
{
height: 95%;
width: 100%;
}
.ui-resizable-handle
{
height: 8px;
width: 474px;
background: #EEEEEE url('Images/grippie.png') no-repeat scroll center;
border-color: #DDDDDD;
border-style: solid;
border-width: 0pt 1px 1px;
cursor: s-resize;
}
</style>
<form id="form1" runat="server">
<table class="textboxTable">
<tr>
<td>
<div class="ImResizable">
<asp:TextBox runat="server" TextMode="MultiLine" />
<div class="ui-resizable-handle" />
</div>
</td>
</tr>
<tr>
<td>
<div class="ImResizable">
<asp:TextBox runat="server" TextMode="MultiLine" />
<div class="ui-resizable-handle" />
</div>
</td>
</tr>
</table>
</form>
</body>
</html>
<script type="text/javascript">
$(function ()
{
$("div.ImResizable").resizable(
{
minHeight: 25,
maxHeight: 85,
minWidth: 470,
maxWidth: 470,
handles: { 's': $("div.ui-resizable-handle") }
});
});
</script>
```

| jQuery resizable only works on first element | CC BY-SA 2.5 | 0 | 2010-11-09T14:29:33.423 | 2014-06-23T18:03:44.903 | null | null | 229,897 | [
"jquery",
"jquery-ui",
"resizable",
"jquery-ui-resizable",
"jquery-resizable"
] |
4,134,801 | 1 | null | null | 4 | 1,257 | All,
I have a form type view I'm creating in Java. Based on the contents of a combobox, I need to switch some aspects of the form. I am using a cardlayout to do this, and it works fine.
The problem is that cardlayouts use the maximum of all preferred sizes of the components added to them to determine their own preferred size. This means that when I've chosen an option that has fewer fields, there is blank space due to the preferred size of the cardlayout on the switcher component.
I've tried to manually change the preferred size of the cardlayout panel each time the selection changes, but this has no effect - the panel is always the maximum that fits all the components.
```
combo.addItemListener(new ItemListener() {
public void itemStateChanged(ItemEvent e) {
Dimension preferredSize = null;
switch (combo.getSelectedIndex()) {
case 0:
preferredSize = panel0.getPreferredSize();
break;
case 1:
preferredSize = panel1.getPreferredSize();
break;
case 2:
preferredSize = panel2.getPreferredSize();
break;
default:
assert false;
}
patternOptions.setPreferredSize(preferredSize);
c.show(patternOptions, TYPE[combo.getSelectedIndex()]);
}
});
```
In a nutshell I'd like for the UI to dynamically grow when an option is chosen that needs more space, and shrink when it needs less space, just like the iTunes smartlist UI:


(I realize that this is a slightly different issue, but it's illustrative of what I want - that panel holding the constraint fields is growing based on the number of rows. I need my layout to grow based on the number of options, based on the combobox selection)
| CardLayout - making it take the least amount of space necessary | CC BY-SA 2.5 | null | 2010-11-09T14:32:58.007 | 2010-11-09T16:03:40.877 | null | null | 155,392 | [
"java",
"swing",
"cardlayout"
] |
4,135,246 | 1 | 4,135,348 | null | 0 | 103 | I create an iPhone application using RSS Feed. I using XMLParsing and get the following result in a String. The parsing string having Html tags. I want to read image tag's src only. How can I read src only from the following String Value?

How can I read src content only from that string?
| Splitting NSString in IPhone | CC BY-SA 3.0 | null | 2010-11-09T15:17:11.547 | 2017-12-16T23:11:54.023 | 2017-12-16T23:11:54.023 | 472,495 | 409,571 | [
"iphone"
] |
4,135,374 | 1 | 4,135,644 | null | 3 | 3,011 | I'm developing a brazilian website which has to support foreign characters like `á, à, ó, í ú, ê, etc`. It also uses AJAX so I thought better to use charset `UTF-8` 'cause I always get the � character and I don't know how to fix this.
My navigation menu appears correctly when using `UTF-8` (since it's querying the database to render the whole menu), but I don't know how it does. Here are some screenshots of the database and how it renders:

So far so good. The trouble is that I started using Zend_Navigation for rendering breadcrumbs and I don't know what to do to get over with the � character i'm getting:

What should I do? Change the charset to ISO-8858-1? I have already done this but it appears everything wrong like this:

# EDIT
In addition, when I change it to `missão` for example it displays `missão` instead of `missão`. Besides, I can't change it manually 'cause it is in the database, I need sort of a function which will handle this
# EDIT 2
I changed the special character in my database like `çã` to `çã` and now the HTML is rendering fine. Although, I'm using the Zend_Navigation for breadcrumb and it's rendering `missão` instead of `missão` just like this:

I also wrote a XML file using Zend_Config_Writer_Xml and I see it printed `<label>Informações</label>` instead of `<label>Informações</label>`. Just in case that helps
How should I proceed?
| How to handle with foreign languages? | CC BY-SA 2.5 | null | 2010-11-09T15:29:10.837 | 2010-11-09T17:50:21.770 | 2010-11-09T17:50:21.770 | 336,945 | 336,945 | [
"html",
"database",
"zend-framework",
"character-encoding",
"special-characters"
] |
4,135,454 | 1 | 4,378,095 | null | 1 | 1,609 | I have a ScatterViewItem which contains a Canvas
```
<Ellipse x:Name="Outer_Ellipse" Fill="White" Width="200" Height="200"></Ellipse>
<Ellipse Fill="Red" Canvas.Top ="15" Canvas.Left="15" Canvas.Right="15" Canvas.Bottom="15" Width="170" Height="170" ></Ellipse>
</Canvas>
</s:ScatterViewItem>
```
Id like to provide a Custom Shape so that the default rectangle shape is not show (here is a picture of my current implementation .
I followed this example here [link text](http://msdn.microsoft.com/en-us/library/ee804843(Surface.10).aspx) and have consulted the Puzzle that comes with the SDK but I am unable to get it working, my ScatterViewItem is blank.
I defined a path in the SurfaceWindow.Resources
```
<Path x:Key="ScatterShape" Fill="Blue">
<Path.Data>
<EllipseGeometry
RadiusX="200"
RadiusY="200">
</EllipseGeometry>
</Path.Data>
</Path>
```
And copied the style attributes from the link above. I created my CustomShape.cs as instructed and then created the ScatterViewItem.
```
System.Windows.Shapes.Path path;
path = (System.Windows.Shapes.Path)Resources["ScatterShape"];
CustomShape poly = new CustomShape(path.Data);
ScatterViewItem item = new ScatterViewItem();
item.Content = poly;
item.CanScale = false;
Binding binding = new Binding();
binding.Source = poly;
item.SetBinding(ScatterViewItem.DataContextProperty, binding);
scatter.Items.Add(item)
```
Im slightly confused with the above code since my understanding with the line
```
item.Content = poly
```
would overwrite the content of the ScatterViewItem (i.e in my case the Canvas or in another case say an Image). For the time being I don't need to move or scale the ScatterView item so no shadows are neccessary I just simply want to remove the rectangular box.
| ScatterViewItem Custom Shape | CC BY-SA 2.5 | null | 2010-11-09T15:36:15.470 | 2012-12-31T08:55:43.940 | 2010-12-07T10:23:09.707 | 8,521 | 376,338 | [
"wpf",
"pixelsense",
"scatterview"
] |
4,135,746 | 1 | 4,189,553 | null | 6 | 2,277 | 
Well I cant understand the above diagram of Von Neumann architecture [Cited from wikipedia] and not even sure whether it is correct. Some obvious doubts that I have -
How can ALU communicate with Memory? Isn't that supposed to be CU's Job?
How is accumulator a part of ALU?
And, What is exactly the job of accumulator?
| Some doubts regarding diagram of Von Neumann Arcitechture | CC BY-SA 2.5 | 0 | 2010-11-09T16:01:57.900 | 2012-12-28T20:48:29.477 | 2010-11-10T01:31:23.713 | 90,527 | 388,350 | [
"cpu",
"cpu-architecture",
"von-neumann"
] |
4,135,855 | 1 | 4,135,914 | null | 0 | 727 | I currently have an image which has every suit and value of a deck of playing cards in it. There is an UIImageView to show this picture, with width and height set to show just one card at a time and view mode set to "top left" so it doesn't stretch.

Now I'm just showing what happens to be the top left card, the ace of clubs. I tried finding a way to offset the view to show a different portion of the UIImage, but couldn't find a suitable property (tried fiddling with "frame" and "bounds").
Is there a way to get such an offset working, or am I going about this the wrong way? I'd like to keep all the cards in one image in "sprite sheet" style so that they would be easy to modify later instead of having a bunch of separate pics.
| iOS playing cards | CC BY-SA 2.5 | null | 2010-11-09T16:11:53.300 | 2010-11-09T16:17:41.230 | null | null | 8,005 | [
"iphone",
"cocoa-touch",
"ios",
"playing-cards"
] |
4,135,891 | 1 | 4,144,695 | null | 10 | 5,709 | I have a WPF application that I want to look like it is hosted inside another - non-WPF - application. In real life this non-WPF app is an ActiveX inside Internet Explorer, but for the sake of illustrating the problem I use a simple Windows Forms app.
I use the Windows API function SetParent, which there are dozens of threads on already. However, I cannot find anything written on my exact problem: .
The WPF window running by itself:

The WPF window with WinForm app's window as parent:

I don't experience the problem if a swap the WPF app with a WinForms app or a plain Win32 app (like Notepad).
The WinForm code looks like this:
```
private void Form1_Load(object sender, EventArgs e)
{
// Start process
var psi = new ProcessStartInfo("c:\\wpfapp\\wpfapp\\bin\\Debug\\wpfapp.exe");
psi.WindowStyle = ProcessWindowStyle.Normal;
_process = Process.Start(psi);
// Sleep until new process is ready
Thread.Sleep(1000);
// Set new process's parent to this window
SetParent(_process.MainWindowHandle, this.Handle);
// Remove WS_POPUP and add WS_CHILD window style to child window
const int GWL_STYLE = -16;
const long WS_POPUP = 0x80000000;
const long WS_CHILD = 0x40000000;
long style = GetWindowLong(_process.MainWindowHandle, GWL_STYLE);
style = (style & ~(WS_POPUP)) | WS_CHILD;
SetWindowLong(_process.MainWindowHandle, GWL_STYLE, style);
// Move and resize child window to fit into parent's
MoveWindow(_process.MainWindowHandle, 0, 0, this.Width, this.Height, true);
}
```
Note: I'm aware that this use of SetParent is not necessarily a recommended practice, but I want to and need to find out how to do it this way, so please let me :)
| Hosting WPF app inside non-WPF app using WIn32 SetParent() | CC BY-SA 2.5 | 0 | 2010-11-09T16:15:27.313 | 2012-12-01T06:58:12.910 | null | null | 37,268 | [
"wpf",
"windows",
"setparent"
] |
4,136,399 | 1 | null | null | 0 | 897 | I have some behaviour of my layout. I give two of them, very similar to each other. Only one difference is the width attribute of the textviews.
```
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:gravity="bottom">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:isScrollContainer="true"
android:gravity="center"
android:background="@color/black">
<LinearLayout
android:id="@+id/tabs"
android:layout_width="0dp"
android:layout_height="fill_parent"
android:orientation="horizontal"
android:background="@color/black"
android:layout_weight="1">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Einstellungen"
android:drawableTop="@drawable/selector_settings"
android:id="@+id/main_menu_button_connection"
android:gravity="center"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textSize="10px">
</TextView>
...
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Suche"
android:drawableTop="@drawable/selector_search"
android:id="@+id/main_menu_button_connection"
android:gravity="center"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textSize="10px">
</TextView>
</LinearLayout>
</LinearLayout>
</LinearLayout>
```
If layout_width is set to wrap content, I get following layout results:

```
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:gravity="bottom">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:isScrollContainer="true"
android:gravity="center"
android:background="@color/black">
<LinearLayout
android:id="@+id/tabs"
android:layout_width="0dp"
android:layout_height="fill_parent"
android:orientation="horizontal"
android:background="@color/black"
android:layout_weight="1">
<TextView
android:layout_width="70dp"
android:layout_height="wrap_content"
android:text="Einstellungen"
android:drawableTop="@drawable/selector_settings"
android:id="@+id/main_menu_button_connection"
android:gravity="center"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textSize="10px">
</TextView>
...
<TextView
android:layout_width="70dp"
android:layout_height="wrap_content"
android:text="Suche"
android:drawableTop="@drawable/selector_search"
android:id="@+id/main_menu_button_connection"
android:gravity="center"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textSize="10px">
</TextView>
</LinearLayout>
</LinearLayout>
</LinearLayout>
```
If layout_width is set to a value instead (here 70dp), my layout looks so, I want it to have:

Can anybody explain me, why?!
Is there some solution avoiding to set a constant width and still having layout result like at the second picture?!
Thank you in advance
| Layout problems. Android | CC BY-SA 2.5 | null | 2010-11-09T17:07:59.933 | 2011-03-18T13:12:28.303 | null | null | 408,780 | [
"android",
"layout"
] |
4,136,532 | 1 | null | null | 6 | 1,959 | i need to find a marker like the ones used in Augmented Reality.
Like this:

I have a solid background on algebra and calculus, but no experience whatsoever on image processing. My thing is Php, sql and stuff.
I just want this to work, i've read the theory behind this and it's extremely hard to see in code for me.
The main idea is to do this as a batch process, so no interactivity is needed. What do you suggest?
Input : The sample image.

Output: Coordinates and normal vector in 3D of the marker.
The use for this will be linking images that have the same marker to spatialize them, a primitive version of photosync we could say. Just a caroussel of pinned images, the marker acting like the pin.
The reps given allowed me to post images, thanks.
| Find the position of a pattern/marker inside a photograph | CC BY-SA 2.5 | 0 | 2010-11-09T17:21:24.637 | 2010-11-09T20:50:18.573 | 2010-11-09T18:41:52.897 | 502,201 | 502,201 | [
"image-processing",
"augmented-reality",
"marker"
] |
4,136,645 | 1 | 4,136,904 | null | 2 | 6,613 | I am trying to export Facebook Page Fans.
The closer I found was [this article](http://adamloving.com/internet-programming/how-toexport-facebook-page-fans).
It states:
> Getting fans from a Facebook page is
not yet supported by the Facebook API.
Luckily, the Facebook Web interface
uses a simple AJAX/JSON call to supply
the data when you view the page.the data when you view the page.
And he explains what he does like this:
> My strategy to set this data free was
to sniff the network traffic with the
Wireshark tool, then replay the HTTP
calls with a ruby script.calls with a ruby script.
I don´t know anything about ruby so I started trying with a PHP scripts left in one of the comments, the one by:
The script goes like [this](http://pastie.org/1284701).
The script says you can download [Charles Proxy](http://www.charlesproxy.com/) to find this variables:
```
$cookie
$node_id
$post_form_id
$fb_dtsg
```
When I use the Charles Proxy Soft, and login to as administrator I get this:

And from there I get what I guess is the cookie variable:

BTW Is it safe to share the whole cookie?? is it helpful? (if it is I´ll edit asap)
The script also says:
```
// set settings in these 4 lines from results of charles when getting the 2nd page of "Get All Fans" in FB ( you need to be admin of fan page to do this )
```
I can´t understand what does he mean by: `getting the 2nd page`
So, my questions:
1) What are this variables?
3) To have this scripts set correctly is the only thing I need for this script to work?
I hope the question is clear enough, if not please ask any questions you need!
Thanks in advance!
| Extract fan database from Facebook page | CC BY-SA 2.5 | 0 | 2010-11-09T17:32:01.823 | 2011-02-03T21:51:03.950 | null | null | 463,065 | [
"php",
"facebook",
"csv",
"extract",
"facebook-page"
] |
4,136,727 | 1 | 4,139,961 | null | 1 | 3,942 | Who knows where to find the translation files for the price selections (see picture)
I can't change this in the front end inline translation

Any help would be appreciated.
Thanks.
| How to change listing language in Magento | CC BY-SA 2.5 | null | 2010-11-09T17:39:59.410 | 2016-01-18T17:24:13.700 | null | null | 487,527 | [
"magento",
"webshop"
] |
4,137,067 | 1 | 4,142,970 | null | 0 | 415 | I'm developing a website with brazilian characters using Zend Framework and my navigation menu items are inside a database.
I've double checked my character encoding in the HTML meta tag, in the files itself and my database. Everything is set to UTF-8 and my whole website is rendering fine (including my menu items which has accented character.
AlthoughI'm using Zend_Navigation for rendering a breadcrumb and it's not going very well. See the image below:

`Missão` is what I have in my database. Unfortunately, it's not becoming `ã` instead. I don't know why.
---
I'm also using Zend_Navigation in my admin module for both Breadcrumb and Menu which render perfectly. The difference is that I'm using a XML in my admin module and Arrays in my default module (which is the problematic one).
I tried to write the XML from the Config object using Zend_Config_Writer_Xml. Then, I checked the file and it was written correctly: `<label>Informações</label>`. Although, in order to the XML render correctly, it's enough to write just `<label>Informações</label>` (that's what I have in the admin module navigation XML).
Well, what if I write `Informações` directly in the array then ask it to write the XML? I tried this and I got `<label>Informações</label>` which doesn't work, also.
I'd like to come up with a solution 'cause I'm running out of time
| Breadcrumbs with Zend_Navigation and character encoding | CC BY-SA 2.5 | null | 2010-11-09T18:19:38.573 | 2010-11-10T09:50:35.727 | null | null | 336,945 | [
"zend-framework",
"character-encoding"
] |
4,137,502 | 1 | 4,137,658 | null | 1 | 609 | So, everybody told me that Drupal can run on lighttpd without any difference, but there is one and it is horrible: there is not PECL Progressing Bar.

Is there any way to make it work ? I need a progress for my customer, they are uploading big files using the CMS...
thanks
| Drupal: upload progress bar in lighttpd? | CC BY-SA 2.5 | null | 2010-11-09T19:15:30.663 | 2010-11-09T19:32:57.877 | null | null | 257,022 | [
"drupal",
"drupal-6",
"lighttpd"
] |
4,137,523 | 1 | null | null | 12 | 1,674 | 
Using the setup above, I have the hough equations of the laser-lines on both sides of the plane. I have even filtered out the pixel points on the object. I also have extrinsic parameters of my camera taken from the checkerboard patterns I put on both sides of the plane (so I know {R1,T1} and {R2,T2})
Now I want to generate a point-cloud of the object. I see that I need to intersect the laser plane (Elaser) with viewing ray (r) from the camera to get a single 3D point (p), any clues on how can I do this?
---
## UPDATE:
This is what I think I have to do, somebody may correct me if I am wrong
`STEP1:` Transform all points from (left plane) coordinate system to (right plane) coordinate system to get a single {R,T} from {R1, T1} and {R2, T2}
`STEP2:` Find the equation of laser plane using 2 laser points on left-plane and 1 laser point on right-plane using the same coordinate system (transformed to in STEP1)
`STEP3:` Find the 3D point on object using equation of laser plane and 2D point on object
---
## UPDATE
This is what I have currently -

| How to generate a point cloud? | CC BY-SA 3.0 | 0 | 2010-11-09T19:18:35.110 | 2011-07-31T06:15:08.383 | 2020-06-20T09:12:55.060 | -1 | 1,140,524 | [
"computer-vision"
] |
4,137,775 | 1 | 4,137,868 | null | 1 | 946 | Shouldn't this work?

If I had a break point on the last `}` it stops there but it never gets to the `Contact` Action, and the page after being posted it's just a blank page with no source code
?
Thank you.
| RedirectToAction is not redirecting | CC BY-SA 2.5 | null | 2010-11-09T19:44:07.183 | 2010-11-09T19:52:31.203 | null | null | 28,004 | [
"asp.net-mvc-2",
"routes",
"action"
] |
4,138,039 | 1 | 4,187,002 | null | 2 | 4,973 | To be more clear, I am trying to modify the Form autogenerated by Sharepoint which you can see in Sharepoint Designer under Workflows -> Your Workflow -> Forms

By default you are given two buttons which is start and cancel which is self explainable, starts the workflow and does nothing.

Once I click on either of the buttons processing happens on the background but nothing interactive happens on the UI (I am expecting for it to go back on the sharepoint list and have a refreshed data or at least close the form). How do I make it close the form? The code behind for the buttons is
```
<td nowrap="nowrap" class="ms-vb">
<input type="button" value="Start" name="btnSave" onclick="javascript: {ddwrt:GenFireServerEvent(concat('__insert;__commit;__redirectsource;__redirectToList={',ddwrt:EcmaScriptEncode($ListName),'};'))}" />
</td>
<td nowrap="nowrap" class="ms-vb" width="99%">
<input type="button" value="Cancel" name="btnCancel" onclick="javascript: {ddwrt:GenFireServerEvent(concat('__cancel;__redirectsource;__redirectToList={',ddwrt:EcmaScriptEncode($ListName),'};'))}" />
</td>
```
Even theres a `redirecttolist` parameter on the built in javascript I does not redirect. Any known workaround for this one? Or anything I am doing wrong?
But I still have a slight problem as I dont know how to dynamically (not hard coded) pass TemplateID and ListID. With ItemID I use {ItemId} that works fine. To further illustrate what I mean see the screenshot and the comments below.

| In Sharepoint Workflow Forms how do I close form after clicking start or cancel | CC BY-SA 2.5 | 0 | 2010-11-09T20:08:44.060 | 2010-11-17T00:23:31.403 | 2010-11-17T00:23:31.403 | 412,519 | 412,519 | [
"javascript",
"sharepoint",
"sharepoint-2010",
"sharepoint-designer"
] |
4,138,246 | 1 | 4,170,420 | null | 0 | 499 | I'm using YUI to reset the browser classes and then I'm bringing in a couple custom stylesheets... I've seen this happen a few times and I don't think that I've ever narrowed down the cause:
the table is pulling in images to make up the squared table with shadowing... but for some reason, it's broken...
Here is my CSS:
```
.tblSquare {
text-align: left;
border-collapse: collapse;
}
.tblSquare td.top {
background:url('/Content/Images/tblSquare_top.gif') repeat-x;
}
.tblSquare td.left {
background:url('/Content/Images/tblSquare_left.gif') repeat-y;
}
.tblSquare td.right {
background:url('/Content/Images/tblSquare_right.gif') repeat-y;
}
.tblSquare td.bottom {
background:url('/Content/Images/tblSquare_bottom.gif') repeat-x;
}
.tblSquare td.content {
background:#FFF;
vertical-align:top;
}
```
| HTML CSS: Broken Table? | CC BY-SA 2.5 | null | 2010-11-09T20:27:41.480 | 2010-11-13T01:47:07.933 | 2010-11-09T20:41:35.553 | 337,806 | 337,806 | [
"html",
"css",
"yui"
] |
4,138,263 | 1 | null | null | 0 | 5,160 | Well, this is a bit awkward. I currently have a set of reports on a 32-bit sql server 2005 instance that references an access database on a network location. I'm currently trying to migrate these over to my new reporting services instance (sql server 2008 64-bit), and i've ran into an issue.

Well, i did a google search on the error and got a bunch of stuff saying to compile to use x86 and use 32-bit, etc., but none of it even touch on if i was getting this in rpeorting services.
My question is, is there a way to "fix" this, or some sort of work-around? Perhaps there's another provide i can use to get to the access database?
Any ideas would be much appreciated.
| SSRS The 'Microsoft.Jet.OLEDB.4.0' provider is not registered on the local machine | CC BY-SA 2.5 | null | 2010-11-09T20:29:26.517 | 2011-10-21T14:22:48.027 | null | null | 95,710 | [
"sql-server-2008",
"ssrs-2008",
"oledbconnection"
] |
4,138,378 | 1 | null | null | 5 | 2,431 | My iPhone app features custom `UITableViewCell`s that each feature an icon. In the normal cell state, these icons are black with a transparent background. Instead of bundling a second set of inverted icons with the app for a highlighted state (white on a transparent background) I'd like to invert these icons on-the-fly using Core Graphics whenever the user touches the corresponding table cell.
I've found some other answers related to overlaying a `UIImage` with a color, or re-coloring `UIImage`s, but all of these techniques produce a blurry result for me (see below). I've tried all kinds of `CGBlendMode`s, as well as manually computing a more accurate mask (perhaps I did it incorrectly), but it seems that the semi-transparent pixels around the edges of my icons are getting their opacity borked or are basically being dropped - giving a choppy/blurred appearance. I'm at a loss for what I'm doing wrong.
It's also not really an option to change all my icons so that are just pure black/white with no transparency - I need the icons to sit on a transparent background so that they can be overlaid on top of other UI elements as well.
The code (courtesy of Chadwick Wood) that I'm using to invert the icon (I'm calling this method on each of my original icons and passing in `[UIColor whiteColor]` as the second argument) and example output (on an iPhone 4 with iOS 4.1) is below (ignore the blue background on the highlighted image - it is the highlighted background of a selected table cell).
Any help is greatly appreciated.
Example input & output:

```
@implementation UIImage(FFExtensions)
+ (UIImage *)imageNamed:(NSString *)name withColor:(UIColor *)color {
// load the image
UIImage *img = [UIImage imageNamed:name];
// begin a new image context, to draw our colored image onto
UIGraphicsBeginImageContext(img.size);
// get a reference to that context we created
CGContextRef context = UIGraphicsGetCurrentContext();
CGContextSetInterpolationQuality(context, kCGInterpolationHigh);
// set the fill color
[color setFill];
// translate/flip the graphics context (for transforming from CG* coords to UI* coords
CGContextTranslateCTM(context, 0, img.size.height);
CGContextScaleCTM(context, 1.0, -1.0);
// set the blend mode to color burn, and the original image
CGContextSetBlendMode(context, kCGBlendModeMultiply);
CGRect rect = CGRectMake(0, 0, img.size.width, img.size.height);
//CGContextDrawImage(context, rect, img.CGImage);
// set a mask that matches the shape of the image, then draw (color burn) a colored rectangle
CGContextClipToMask(context, rect, img.CGImage);
CGContextAddRect(context, rect);
CGContextDrawPath(context,kCGPathFill);
// generate a new UIImage from the graphics context we drew onto
UIImage *coloredImg = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
//return the color-burned image
return coloredImg;
}
@end
```
| Trying to dynamically color transparent UIImages but keep getting a blurry result. What am I doing wrong? | CC BY-SA 2.5 | 0 | 2010-11-09T20:40:51.293 | 2010-11-13T01:07:00.297 | 2010-11-13T01:07:00.297 | 502,323 | 502,323 | [
"iphone",
"image-processing",
"core-graphics",
"quartz-graphics"
] |
4,138,551 | 1 | null | null | 5 | 2,457 | Only sometimes (I haven't yet noticed a pattern), VS2010 shows the following error (where I'd expect the body of the property page to be) when I right-click on a project (various types of projects) and select "Properties":

I can typically view the project pages after restarting VS2010. I'm using the RTM version.
What can cause this error?
| VS2010 will not display project properties ("underlying RCW")? | CC BY-SA 2.5 | null | 2010-11-09T20:58:51.623 | 2011-05-10T07:12:32.150 | 2010-11-17T14:35:52.813 | 116,895 | 116,895 | [
"visual-studio-2010",
"rcw",
"comobject",
"project-properties"
] |
4,138,753 | 1 | 4,166,081 | null | 3 | 1,037 | I think a picture will serve me best:

Any Ideas? My web app works just fine. I don't really use the web site administration tool, I just taught I'd play with it and discovered that the security tab doesn't work and I can't figure out why. I'm using my own membership and role provider which do make use of Structuremap. It's like the Web Site Administration Tool doesn't know about the Structuremap.dll. I'm just not sure how to fix that.
| Web Site Administration Tool - Type is not resolved for member 'StructureMap.StructureMapException' | CC BY-SA 2.5 | null | 2010-11-09T21:20:08.133 | 2010-11-12T15:20:52.763 | null | null | 77,725 | [
"asp.net",
"asp.net-membership",
"structuremap",
"asp.net-roles"
] |
4,139,459 | 1 | 4,139,489 | null | 0 | 2,588 | I have added the SqlRoleProvider tables aspnet_Users, aspnet_Roles, and aspnet_UsersInRoles to my Entity Framework 1.0 model in VS 2008.

I've tried the following which intellisense won't even help me with.
```
private void BindFormView(string userName)
{
using (var context = new MyEntities())
{
var users = from u in context.aspnet_Users
where u.UserName = userName
select u;
}
//...
}
```
My eventual goal is to get all of the roles a given user has. It's all looks right in my model, but I cannot seem to access it effectively.
| How do I query Entity Framework for a user in aspnet_Users? | CC BY-SA 2.5 | 0 | 2010-11-09T22:42:37.540 | 2010-11-09T23:46:28.917 | null | null | 117,995 | [
"asp.net",
"linq",
"entity-framework"
] |
4,139,500 | 1 | 4,297,152 | null | 7 | 906 | I work with a lot of floating-point images, and would find it extremely useful to have an image-based representation of my arrays. I'd like to create a WPF UserControl that renders the data array (as shown below) as an image, instead of a scrollable list of text values.
Is this possible? I have looked at the [MDSN documentation](http://msdn.microsoft.com/en-us/library/dd885242.aspx) on VS 2010 extensibility, at SO's [list of VS 2010 extensions](https://stackoverflow.com/questions/2757357/visual-studio-2010-recommended-extensions), and at [this topic](https://stackoverflow.com/questions/3066471/creating-a-custom-designer-visual-studio-2010-add-in) on creating a custom editor, but I'm a bit lost on where to start.

Thanks to Brian and Basarat Ali for the leads on DebuggerVisualizer. Looks like the correct strategy, EXCEPT that unfortunately a visualizer for any type of arrays [is disallowed](http://msdn.microsoft.com/en-us/library/e2zc529c.aspx).
A work-around (of limited utility) is to visualize a wrapper object.
At Brian's suggestion, I have posted a solution on CodePlex:
[VS2010 Debugger Visualizers Contrib](http://debuggervisualizers.codeplex.com/) ([http://debuggervisualizers.codeplex.com/](http://debuggervisualizers.codeplex.com/)).
The project's source code demonstrates a working wrapper visualizer and a non-functional "raw" data visualizer for a 1D double[] array. Here's a screenshot of the test console running:

If anyone has any suggestions on how to work-around this problem, please let me know!
Also, any explanation of why System.Array cannot be visualized is welcome!
I just re-searched SO with the word DebuggerVisualizer, and find this to be [previously asked](https://stackoverflow.com/questions/346154/debugger-visualizer-not-working-have-i-incorrectly-registered-it). Looks like user Will Dean suggests implementing Project Mole's work-around [using a WeakReference](http://joshsmithonwpf.wordpress.com/2008/01/20/the-rock-star-hack-of-2008/). Don't see how this would work in a DebuggerVisualizer, though.
[Josh Smith](http://joshsmithonwpf.wordpress.com) of [Project Mole](http://www.molosoft.com) just [suggested](http://joshsmithonwpf.wordpress.com/2011/03/03/using-mole-2010-to-analyze-collections/) a very helpful work around (thanks Josh!):
> Note, you can use your ArrayWrapper approach without needing to modify your source code to open a visualizer. You can type this into the Watch window in VS:new YourNamespace.ArrayWrapper(myArray);Hit the Enter key, then you should see a magnifying glass icon in the Watch window next to that line of code. Click it to open your custom visualizer.
| How can I create a custom image adorner add-in for numerical arrays in Visual Studio 2010? | CC BY-SA 2.5 | 0 | 2010-11-09T22:46:38.810 | 2011-03-07T01:50:28.767 | 2020-06-20T09:12:55.060 | -1 | 22,528 | [
"wpf",
"visual-studio-2010",
"add-in",
"data-visualization",
"adorner"
] |
4,140,297 | 1 | 4,140,528 | null | 1 | 2,194 | I currently have an asp form that uses jquery for two elements: an image upload and a datapicker.
The code that implements the image upload is
```
$(function() {
$("#wcpImage").makeAsyncUploader({
upload_url: "/Business/ImageUpload",
flash_url: '../../Scripts/swfupload.swf',
button_image_url: '../../Content/images/blankButton.png',
disableDuringUpload: 'INPUT[type="submit"]'
});
});
```
With an input element `<input type="file" id="wcpImage" name="wcpImage" />`.
The code that implements the Datepicker using the JQueryUI DatePicker widget is
```
$().ready(function() {
$('#Business_Work_Cover_Expiry_Date').datepicker({ dateFormat: 'dd/mm/yy' });
});
```
With an input element generated by `<%= Html.TextBoxFor(m => Model.Business.Liability_Expiry_Date) %>`
The datepicker pops up when users enter the text box for the expiry date. The issue I'm having is that the buttons for the image upload are appearing over the top of the datepicker.

Can I use CSS z-index to fix this and how?
| Controls overlapping in ASP view | CC BY-SA 2.5 | null | 2010-11-10T00:54:15.123 | 2010-11-10T01:45:05.277 | 2010-11-10T01:00:52.910 | 155,586 | 155,586 | [
"asp.net",
"html",
"css"
] |
4,140,499 | 1 | 4,140,514 | null | 2 | 109 | Unluckily I don't know what to do :(

I want to align the text "bla bla...." at the bottom of the left div.
Setting it as `position:absolute & bottom=0` doesnt work always because there are cases where image does not exist, and that would be a problem as if the text wont increase container div height...
I could change the layout if there is no `img` with php but that doesnt guarantee that in case `img` has less height than text, text overflow etc...
I know this is strange, the table is the only solution I have?
| Should I use a table for this? | CC BY-SA 2.5 | 0 | 2010-11-10T01:39:17.263 | 2010-11-15T23:06:49.433 | 2010-11-15T23:06:49.433 | 31,671 | 294,022 | [
"html",
"css"
] |
4,140,947 | 1 | 4,140,983 | null | 2 | 896 | I used rounded corner and gradient. it's working good on firefox but rounded corner not working on IE. IE rounded corner only working when I remove gradient css. Please help me.
```
<h2 id="user_comments">9. User Comments and Notes</h2>
h2 {
-webkit-border-radius: 8px;
-moz-border-radius:8px;
background:-moz-linear-gradient(center top , #A0ABBF, #DEDEDE, #A0ABBF) repeat scroll 0 0 #A0ABBF;
filter: progid:DXImageTransform.Microsoft.gradient(StartColorStr='#DEDEDE', EndColorStr='#A0ABBF'); /* IE6,IE7 */
-ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorStr='#DEDEDE', EndColorStr='#A0ABBF')"; /* IE8 */
border:2px solid #A0ABBF;
font-size:16px;
letter-spacing:1px;
margin-top:36px;
padding:0 1em;
position:relative;
}
```
Firefox: 
IE:

| rounded corner not working on IE | CC BY-SA 2.5 | 0 | 2010-11-10T03:21:07.990 | 2010-11-10T03:41:46.837 | 2010-11-10T03:33:33.590 | 446,591 | 278,666 | [
"css",
"internet-explorer"
] |
4,141,608 | 1 | 4,142,610 | null | 0 | 787 | I have a modal with JQuery UI tabs inside. There is a ASP.NET checkbox list server control in one of the tabs. I am facing a weird issue that if I set toTop:true in JQModal parameters
```
$(document).ready(function() {
$('#testDiv').jqm({toTop: true});
});
```
when I run a server side foreach on the checkbox list it always returns false on all items. Even though if they are selected/checked by user on screen ._.
```
foreach (ListItem li in cbItems.Items)
{
if (li.Selected) // <= Always false ???
{
DataRow dr = dt.NewRow();
dr["ID"] = Convert.ToInt32(li.Value.ToString());
dr["ITEMNAME"] = li.Text.ToString();
dt.Rows.Add(dr);
}
}
```
Removing from the JQModal parameters solves the problem but creates another problem that in IE7 my JQ modal window is behind the overlay of modal, which might be due to the container div having CSS position:relative. Any clue guys ?

| Weird issue with JQModal ,JQuery UI Tabs & ASP.NET checkbox list | CC BY-SA 2.5 | 0 | 2010-11-10T05:51:51.947 | 2010-11-10T08:43:50.807 | null | null | 521,201 | [
"asp.net",
"jquery",
"jquery-ui",
"asp.net-2.0"
] |
4,141,731 | 1 | 4,241,497 | null | 4 | 1,188 | I'm working on a Django project. But my problem is on JQuery.
I used [jquery.formset.js](http://code.google.com/p/django-dynamic-formset/) JQuery plugin to add form dynamically in inline_formsets, formset_factories. And this works pretty nice. It duplicates the first row elements with its other decoration tags (like div, span, img..) and adds the new row in the bottom of the table. So the duplicated row can be appeared just like the origin.
I also uses [jquery ui (datepicker, autocomplete..etc)](http://jqueryui.com/demos/) in my forms.
The duplication copies everything, even the appended htmls by the datepickers and autocompletes, because the plugin tries not to leave any interface pieces. When it clones the first row, everything is cloned, even the events are cloned. So when i click on the newly appeared datepicker input the calendar event works on the first row's element.
I'm trying to find the decision. Here are what in my mind so far..
1. Declare the jquery ui (datepicker and autocomplete) as live? like $(".dates").live('...', function() { $(this).datepicker(); } ) But I'm not sure which event should be handled for this. I guess it's impossible to handle the new created or appended elements.
2. Putting the script inside the row? right after the element $("#id_birthday_1").datepicker(); It seems the best idea, but the duplication has already duplicated the extra elements/htmls. So it will re-render the element.
3. Should I edit the js plugin? like binding all the jquery ui's events' declarations, excepting the renders and appending and styling. That would be a huge mess. I don't want to mess up like this.. And every time if i need to add a new ui, i should edit that js constantly

Every ideas would be appreciated :)
| Duplicate jquery ui problem | CC BY-SA 2.5 | 0 | 2010-11-10T06:12:31.870 | 2010-11-23T10:05:36.533 | 2010-11-10T06:53:28.793 | 309,848 | 309,848 | [
"jquery",
"django",
"jquery-ui",
"django-forms"
] |
4,142,271 | 1 | 4,142,361 | null | 1 | 2,602 | I have an image and I have a partial line in the image. They are all the time horizontal or vertical lines. I don't know the color of the line, neither the width of the line.
How can I use PHP to detect such a line?
As you see in the uploaded image, there are 3x3 sections I need to slice. I need the 3 vertical, and 3 horizantal sections to slice the parts. Please note there is a rectangle with some markes around the content area, that is part of the images.
We can use those markers to get the coordinates.
 
| How to detect a partial vertical/horizontal line in a image? | CC BY-SA 2.5 | 0 | 2010-11-10T07:51:43.310 | 2010-11-10T21:33:04.097 | 2010-11-10T08:08:29.190 | 243,782 | 243,782 | [
"php",
"image",
"image-processing",
"gd"
] |
4,142,699 | 1 | 4,145,715 | null | 2 | 4,967 | Hai Freinds,
I had parsed the image from the url, and displayed in the webview, when i am displayed it in webview, a few images were streched, so i displayed the image with the help of Imageview, but the problem is the Images are not displayed in Imageview when they Color format is CMYK format, so pls tell me how to display the image in a webview without strecth of the image,or how can i display all format of images in ImageView.
My xml code is
```
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/LinearLayout02_img"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="horizontal">
<WebView android:id="@+id/ads_content"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
</WebView>
</LinearLayout>
```
and My java code is
> private WebView ads_content;
ads_content = (WebView)
findViewById(R.id.ads_content);
ads_content.loadUrl(url);
Refer the screenshot which shows my output

i have to show the image upto the device level, thai is to block that white and black empty spaces
Thanks
| Need Help in Displaying Image correctly in WebView in Android? | CC BY-SA 2.5 | null | 2010-11-10T08:57:16.407 | 2012-09-08T00:32:53.160 | 2010-12-16T14:17:37.097 | 424,413 | 424,413 | [
"android"
] |
4,143,539 | 1 | null | null | 2 | 11,127 | Does anyone have any idea how to add custom meta fields while making categories and fetch them in the loop in WordPress? I was wondering how to do that without hacking the WordPress core, but if I do – it won't become a hindrance to update WordPress in the future.
A plugin I have found that comes close is [Wp-Category-Meta](http://wordpress.org/extend/plugins/wp-category-meta/), but it doesn't have the ability to add checkboxes as fields in Edit Categories.

This will be very useful as users can make certain categories "featured", and then the code can use that meta value in the loop to style "featured" categories differently.
| How can I add custom meta fields in categories? | CC BY-SA 3.0 | 0 | 2010-11-10T10:38:20.863 | 2017-08-04T11:18:13.010 | 2011-10-06T14:27:26.220 | 496,830 | 503,045 | [
"wordpress",
"plugins",
"categories",
"meta-boxes"
] |
4,143,633 | 1 | null | null | 0 | 144 | Is there a JQuery plugin that lets me "overlay" text on top of an image, via a transparent background?
Similar to this:

On the bottom layer, there's a picture. Then a transparent grey. Then the white text.
How can I easily do this in jQuery?
| Is there a jQuery plugin that lets me "overlay" text on top of an image, via a transparent background? | CC BY-SA 3.0 | null | 2010-11-10T10:48:39.830 | 2014-03-14T10:05:07.630 | 2014-03-14T10:05:07.630 | 2,074,608 | 179,736 | [
"javascript",
"jquery",
"html",
"image",
"templates"
] |
4,144,035 | 1 | 4,144,180 | null | 1 | 321 | I am learning SQL Server by exercising some problems.
In one of that problems I have 4 database tables: `ORDERS, SHIPMENTS, WHFICHES` and `ATTACHMENTS`
One of them is hold attachment references to other tables that is named `ATTACHMENTS`. It has 3 columns:
- `LREF`- `RECREF`- `RECTYPE`

By checking value of `RECTYPE`, I want to join table to other tables through `RECREF`.
Here my SQL with switch case:
```
SELECT LREF,RECREF,RECTYPE,
CASE RECTYPE
WHEN 100 THEN (SELECT O.ORDERNO FROM AV_ATTACHMENTS A LEFT OUTER JOIN AV_ORDERS O ON A.RECREF = O.LREF WHERE A.RECREF = O.LREF)
WHEN 200 THEN (SELECT S.FSNNO FROM AV_ATTACHMENTS A LEFT OUTER JOIN AV_SHIPMENTS S ON A.RECREF = S.LREF WHERE A.RECREF = S.LREF)
ELSE (SELECT F.WHFICHENO FROM AV_ATTACHMENTS A LEFT OUTER JOIN AV_WHFICHES F ON A.RECREF = F.WHFICHENO WHERE A.RECREF = F.LREF)
END AS FICHE
FROM AV_ATTACHMENTS
```
Also, in other tables I have a unique primary key `LREF` and another value will be used as `FICHENO`.
I get this warning:
> Msg 512, Level 16, State 1, Line 1 Subquery returned more than 1 value.
This is not permitted when the
subquery follows =, !=, <, <= ,
, >= or when the subquery is used as an expression.
What should I do exactly, because I can't find any solution. Should I change my SQL statement?
Any suggestions?
My kind regards and
thanks in advance.
| Case in SQL Server? | CC BY-SA 3.0 | null | 2010-11-10T11:36:03.090 | 2011-05-06T20:30:41.393 | 2011-05-06T20:30:41.393 | 13,302 | 457,136 | [
"sql"
] |
4,144,071 | 1 | 4,368,087 | null | 0 | 540 | Im Getting a Frequent enough BAD_ACCESS when i call this Quartz function:
```
CGContextDrawPDFPage ((CGContextRef)context, (CGPDFPageRef)pageRef);
```
Here is how i call it:
```
CGContextRef context = UIGraphicsGetCurrentContext();
//translate, scale
CGPDFPageRef myPageRef = CGPDFDocumentGetPage ([PDFDocument sharedPDFDocument].documentData, pageNumber);
CGContextDrawPDFPage (context, myPageRef);//BAD_ACCESS HERE
return UIGraphicsGetImageFromCurrentImageContext();//autoreleased- saved on return
//close context
```
Neither variable is Nil, or have been released/auto released.
Here is the Stack trace, from the debugger:

Can anyone shed any light on this? Even some pointers on how i might investigate this better. it might not even be function specific.
I probobly should mention this function is performed on a separate thread.
| Quartz PDF-context based function fails (occasionally) with BAD_ACCESS | CC BY-SA 2.5 | null | 2010-11-10T11:39:01.527 | 2011-09-12T21:19:14.490 | 2017-02-08T14:30:56.103 | -1 | 293,008 | [
"iphone",
"objective-c",
"cocoa-touch",
"ipad",
"ios"
] |
4,144,199 | 1 | 4,144,468 | null | 1 | 407 | When I click Delphi 2009 to start it shows me this error.

| Delphi 2009 startup error | CC BY-SA 2.5 | null | 2010-11-10T11:55:53.577 | 2010-11-10T12:29:24.170 | 2020-06-20T09:12:55.060 | -1 | 325,446 | [
"delphi",
"delphi-2009"
] |
4,144,091 | 1 | 4,150,550 | null | 1 | 2,502 | I'm trying to do a school project where we are to create a Silverlight application that uses bing map as a kind of map editor for placement of chargeable stations for cars.
Example:

There are some requirements, it must support drag and drop and we must use MVVM (Model View View-Model). Now we have finished the drag and drop feature by the having a MapLayer with an array of Image children, and then hooked up events that enable drag and drop (See the code under). But now we face a problem, how can we hook up a ViewModel to this, I simply just can’t see it :(
I am not asking for a complete solution, but some help would be great.
```
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;
using System.IO;
using Microsoft.Maps.MapControl;
namespace BingMapDragDrop
{
public partial class MainPage : UserControl
{
private MapAddType AddType = MapAddType.None;
private Location _myhome = new Location(55.6686512716393, 12.5481431962938, 0);
private MapLayer EndNodeLayer;
private double HideEndNodeLayer = 10.0;
private MapLayer EndNodeIntermediatedLayer;
private double HideEndNodeIntermediatedLayer = 10.0;
private MapLayer RootNodeLayer;
private double HideRootNodeLayer = 0.0;
private MapLayer RootNodeIntermediatedLayer;
private double HideRootNodeIntermediatedLayer = 5.0;
public MainPage()
{
EndNodeLayer = new MapLayer();
EndNodeIntermediatedLayer = new MapLayer();
RootNodeLayer = new MapLayer();
RootNodeIntermediatedLayer = new MapLayer();
InitializeComponent();
BingMap.SetView(_myhome, 15);
BingMap.ViewChangeOnFrame += new EventHandler<MapEventArgs>(BingMap_ViewChangeOnFrame);
// Adding the layers
BingMap.Children.Add(EndNodeIntermediatedLayer);
BingMap.Children.Add(EndNodeLayer);
BingMap.Children.Add(RootNodeIntermediatedLayer);
BingMap.Children.Add(RootNodeLayer);
}
private void AddEndNode(Location location, MapAddType type)
{
string url;
if (type == MapAddType.Home)
url = "Images/Home.png";
else if (type == MapAddType.HomeWithChargingSpot)
url = "Images/HomeWithChargingSpot.png";
else if (type == MapAddType.Workplace)
url = "Images/Workplace.png";
else if (type == MapAddType.WorkplaceWithChargingSpot)
url = "Images/WorkplaceWithChargingSpot.png";
else if (type == MapAddType.PublicChargningSpot)
url = "Images/PublicChargningSpot.png";
else if (type == MapAddType.FastChargingStation)
url = "Images/FastChargingStation.png";
else
return;
var image = new Image
{
Source = new BitmapImage(new Uri(url, UriKind.RelativeOrAbsolute)),
Width = 50,
Height = 50
};
AddImageToLayerAsDragAbleObject(image, location, EndNodeLayer);
}
private void AddPowerPlant(Location location)
{
var image = new Image
{
Source = new BitmapImage(new Uri("Images/Powerplant-New.png", UriKind.RelativeOrAbsolute)),
Width = 50,
Height = 50
};
AddImageToLayerAsDragAbleObject(image, location, EndNodeLayer);
}
#region Bing Map Events, not related to D&D
// Some events dose not exists so we need to make some our self.
private double bingZoom = 0.0;
void BingMap_ViewChangeOnFrame(object sender, MapEventArgs e)
{
if (BingMap.ZoomLevel != bingZoom)
{
bingZoom = BingMap.ZoomLevel;
BingMapZoomLevelChanged(sender, e);
}
}
private void BingMap_Loaded(object sender, RoutedEventArgs e)
{
}
private void BingMap_MouseClick(object sender, MapMouseEventArgs e)
{
if(AddType == MapAddType.None)
return;
Location loc;
if (!BingMap.TryViewportPointToLocation(e.ViewportPoint, out loc))
return;
switch (AddType)
{
case MapAddType.Powerplant:
AddPowerPlant(loc);
break;
case MapAddType.FastChargingStation:
case MapAddType.PublicChargningSpot:
case MapAddType.WorkplaceWithChargingSpot:
case MapAddType.Workplace:
case MapAddType.HomeWithChargingSpot:
case MapAddType.Home:
AddEndNode(loc, AddType);
break;
}
AddType = MapAddType.None;
}
private void BingMapZoomLevelChanged(object sender, MapEventArgs e)
{
if (BingMap.ZoomLevel <= HideEndNodeLayer && EndNodeLayer.Visibility == Visibility.Visible)
EndNodeLayer.Visibility = Visibility.Collapsed;
else if (BingMap.ZoomLevel > HideEndNodeLayer && EndNodeLayer.Visibility == Visibility.Collapsed)
EndNodeLayer.Visibility = Visibility.Visible;
if (BingMap.ZoomLevel >= HideEndNodeIntermediatedLayer && EndNodeLayer.Visibility == Visibility.Visible)
EndNodeIntermediatedLayer.Visibility = Visibility.Collapsed;
else if (BingMap.ZoomLevel > HideEndNodeIntermediatedLayer && EndNodeLayer.Visibility == Visibility.Collapsed)
EndNodeIntermediatedLayer.Visibility = Visibility.Visible;
if (BingMap.ZoomLevel <= HideRootNodeLayer && EndNodeLayer.Visibility == Visibility.Visible)
RootNodeLayer.Visibility = Visibility.Collapsed;
else if (BingMap.ZoomLevel > HideRootNodeLayer && EndNodeLayer.Visibility == Visibility.Collapsed)
RootNodeLayer.Visibility = Visibility.Visible;
if (BingMap.ZoomLevel <= HideRootNodeIntermediatedLayer && EndNodeLayer.Visibility == Visibility.Visible)
RootNodeIntermediatedLayer.Visibility = Visibility.Collapsed;
else if (BingMap.ZoomLevel > HideRootNodeIntermediatedLayer && EndNodeLayer.Visibility == Visibility.Collapsed)
RootNodeIntermediatedLayer.Visibility = Visibility.Visible;
}
#endregion
#region This is where the dragging magic happens
private void AddImageToLayerAsDragAbleObject(Image image, Location location, MapLayer mapLayer)
{
image.MouseLeftButtonDown += new MouseButtonEventHandler(ImageMouseLeftButtonDown);
var position = PositionOrigin.Center;
mapLayer.AddChild(image, location, position);
}
private bool _isDragging = false;
private Image _dragingObject;
private void ImageMouseLeftButtonDown(object sender, MouseButtonEventArgs e)
{
_isDragging = true;
// We need to save the object, so we are able to set the location on release
_dragingObject = (Image)sender;
// Here we add the events, be sure to remove them at release!
BingMap.MousePan += new EventHandler<MapMouseDragEventArgs>(BingMapMousePan);
BingMap.MouseLeftButtonUp += new MouseButtonEventHandler(BingMapMouseLeftButtonUp);
BingMap.MouseMove += new MouseEventHandler(BingMapMouseMove);
}
// Event that is called when an image is move
private void BingMapMouseMove(object sender, MouseEventArgs e)
{
var map = (Map)sender;
if (!_isDragging) return;
// The the location of the mouse
var mouseMapPosition = e.GetPosition(map);
var mouseGeocode = map.ViewportPointToLocation(mouseMapPosition);
// Set location
MapLayer.SetPosition(_dragingObject, mouseGeocode);
}
// Event that is called when an image is released
private void BingMapMouseLeftButtonUp(object sender, MouseButtonEventArgs e)
{
// Remove the events
BingMap.MousePan -= BingMapMousePan;
BingMap.MouseLeftButtonUp -= BingMapMouseLeftButtonUp;
BingMap.MouseMove -= BingMapMouseMove;
// Disable dragging
_isDragging = false;
}
// Event that is called when the map is panning
private void BingMapMousePan(object sender, MapMouseDragEventArgs e)
{
// We don't want the map to pan if we are dragging
if (_isDragging)
e.Handled = true;
}
#endregion
#region Menu
private void MenuMouseLeftButtonUp(object sender, MouseButtonEventArgs e)
{
if ((String)((Image)sender).Tag == "Powerplant")
AddType = AddType == MapAddType.Powerplant ? MapAddType.None : MapAddType.Powerplant;
if ((String)((Image)sender).Tag == "Home")
AddType = AddType == MapAddType.Home ? MapAddType.None : MapAddType.Home;
if ((String)((Image)sender).Tag == "HomeWithChargingSpot")
AddType = AddType == MapAddType.HomeWithChargingSpot ? MapAddType.None : MapAddType.HomeWithChargingSpot;
if ((String)((Image)sender).Tag == "Workplace")
AddType = AddType == MapAddType.Workplace ? MapAddType.None : MapAddType.Workplace;
if ((String)((Image)sender).Tag == "WorkplaceWithChargingSpot")
AddType = AddType == MapAddType.WorkplaceWithChargingSpot ? MapAddType.None : MapAddType.WorkplaceWithChargingSpot;
if ((String)((Image)sender).Tag == "PublicChargningSpot")
AddType = AddType == MapAddType.PublicChargningSpot ? MapAddType.None : MapAddType.PublicChargningSpot;
if ((String)((Image)sender).Tag == "FastChargingStation")
AddType = AddType == MapAddType.FastChargingStation ? MapAddType.None : MapAddType.FastChargingStation;
}
#endregion
#region Cursor image
private bool IsCursorImageSet = false;
private void UserControl_MouseMove(object sender, MouseEventArgs e)
{
PlaceCursorImage(e.GetPosition(this));
}
private void UserControl_MouseLeftButtonUp(object sender, MouseButtonEventArgs e)
{
PlaceCursorImage(e.GetPosition(this));
}
private void PlaceCursorImage(Point location)
{
if (AddType == MapAddType.None && !IsCursorImageSet)
return;
if (AddType == MapAddType.None && IsCursorImageSet)
{
IsCursorImageSet = false;
CursorImage.Visibility = Visibility.Collapsed;
return;
}
Canvas.SetTop(CursorImage, location.Y + 5.0);
Canvas.SetLeft(CursorImage, location.X + 5.0);
if (!IsCursorImageSet)
{
IsCursorImageSet = true;
switch (AddType)
{
case MapAddType.Powerplant:
CursorImage.Source =
new BitmapImage(new Uri("Images/Powerplant-New.png", UriKind.RelativeOrAbsolute));
break;
case MapAddType.Home:
CursorImage.Source =
new BitmapImage(new Uri("Images/Home.png", UriKind.RelativeOrAbsolute));
break;
case MapAddType.HomeWithChargingSpot:
CursorImage.Source =
new BitmapImage(new Uri("Images/HomeWithChargingSpot.png", UriKind.RelativeOrAbsolute));
break;
case MapAddType.Workplace:
CursorImage.Source =
new BitmapImage(new Uri("Images/Workplace.png", UriKind.RelativeOrAbsolute));
break;
case MapAddType.WorkplaceWithChargingSpot:
CursorImage.Source =
new BitmapImage(new Uri("Images/WorkplaceWithChargingSpot.png", UriKind.RelativeOrAbsolute));
break;
case MapAddType.PublicChargningSpot:
CursorImage.Source =
new BitmapImage(new Uri("Images/PublicChargningSpot.png", UriKind.RelativeOrAbsolute));
break;
case MapAddType.FastChargingStation:
CursorImage.Source =
new BitmapImage(new Uri("Images/FastChargingStation.png", UriKind.RelativeOrAbsolute));
break;
default:
return;
}
CursorImage.Visibility = Visibility.Visible;
CursorImage.Width = 40;
CursorImage.Height = 40;
CursorImage.Stretch = Stretch.Uniform;
}
}
#endregion
}
}
```
My WPF code
```
<UserControl x:Class="BingMapDragDrop.MainPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:m="clr-namespace:Microsoft.Maps.MapControl;assembly=Microsoft.Maps.MapControl"
mc:Ignorable="d" MouseMove="UserControl_MouseMove" Width="800" Height="600" MouseLeftButtonUp="UserControl_MouseLeftButtonUp">
<Canvas IsHitTestVisible="True">
<StackPanel HorizontalAlignment="Left" Name="stackPanelMenu" Width="75" Margin="0,12,0,12" Canvas.Top="0" Height="588">
<Image Name="imagePowerplant" Stretch="Uniform" Width="35" Source="/BingMapDragDrop;component/Images/Powerplant-New.png" Tag="Powerplant" MouseLeftButtonUp="MenuMouseLeftButtonUp" />
<Image Name="imageHome" Stretch="Uniform" Width="35" Source="/BingMapDragDrop;component/Images/Home.png" Tag="Home" MouseLeftButtonUp="MenuMouseLeftButtonUp" />
<Image Name="imageHomeWithChargingSpot" Stretch="Uniform" Width="35" Source="/BingMapDragDrop;component/Images/HomeWithChargingSpot.png" Tag="HomeWithChargingSpot" MouseLeftButtonUp="MenuMouseLeftButtonUp" />
<Image Name="imageWorkplace" Stretch="Uniform" Width="35" Source="/BingMapDragDrop;component/Images/Workplace.png" Tag="Workplace" MouseLeftButtonUp="MenuMouseLeftButtonUp" />
<Image Name="imageWorkplaceWithChargingSpot" Stretch="Uniform" Width="35" Source="/BingMapDragDrop;component/Images/WorkplaceWithChargingSpot.png" Tag="WorkplaceWithChargingSpot" MouseLeftButtonUp="MenuMouseLeftButtonUp" />
<Image Name="imagePublicChargningSpot" Stretch="Uniform" Width="35" Source="/BingMapDragDrop;component/Images/PublicChargningSpot.png" Tag="PublicChargningSpot" MouseLeftButtonUp="MenuMouseLeftButtonUp" Height="49" />
<Image Name="imageFastChargingStation" Stretch="Uniform" Width="35" Source="/BingMapDragDrop;component/Images/FastChargingStation.png" Tag="FastChargingStation" MouseLeftButtonUp="MenuMouseLeftButtonUp" />
</StackPanel>
<m:Map x:Name="BingMap" CredentialsProvider="[Insert credentials here]" Mode="Aerial" Loaded="BingMap_Loaded" MouseClick="BingMap_MouseClick" Canvas.Left="72" Canvas.Top="0" Margin="0" Height="600" Width="728" />
<Image Name="CursorImage" Visibility="Collapsed" IsHitTestVisible="False" Opacity="0.5" />
</Canvas>
</UserControl>
```
| Bing Maps and MVVM | CC BY-SA 2.5 | 0 | 2010-11-10T11:42:05.957 | 2011-08-24T07:15:31.333 | null | null | 313,237 | [
"wpf",
"bing-maps",
"mvvm"
] |
4,144,371 | 1 | 4,188,635 | null | 11 | 23,154 | I have a problem:
I have 3 picture boxes with 3 different images
what can i set to so both images look same.....

I want to move pictureBox3 on pictureBox2,
So there is no Option to merge them to single image
| A PictureBox Problem | CC BY-SA 2.5 | 0 | 2010-11-10T12:20:18.870 | 2010-12-13T23:12:49.363 | 2010-11-14T12:20:49.447 | 67,392 | 479,468 | [
"c#",
".net",
"winforms",
"picturebox"
] |
4,144,487 | 1 | 4,144,519 | null | 2 | 1,928 | I want to render some text as image in ASP.NET. It is working well, but the text is rendered very ugly (with grey pixels around the text) even if I turn on AntiAlias (or ClearType) by changing the graphics TextRenderingHint option.
Here is the relevant code:
```
float width;
float height;
System.Drawing.Text.PrivateFontCollection fontcollection = new System.Drawing.Text.PrivateFontCollection();
// Add the custom font families
fontcollection.AddFontFile(Server.MapPath("./Fonts/" + fontfile));
Bitmap image = new Bitmap(10, 10);
Graphics graphic = Graphics.FromImage(image);
Font font = new Font(fontcollection.Families.First(), fontsize, style);
SizeF size = graphic.MeasureString(text, font);
width = size.Width;
height = size.Height;
image = new Bitmap(Convert.ToInt32(width), Convert.ToInt32(height));
graphic = Graphics.FromImage(image);
graphic.FillRectangle(new SolidBrush(Color.White), 0, 0, width, height);
graphic.TextRenderingHint = System.Drawing.Text.TextRenderingHint.ClearTypeGridFit;
graphic.InterpolationMode = System.Drawing.Drawing2D.InterpolationMode.Bicubic;
graphic.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.AntiAlias;
graphic.PixelOffsetMode = System.Drawing.Drawing2D.PixelOffsetMode.HighQuality;
graphic.DrawString(text, font, Brushes.Black, new PointF(0, 0));
Response.ContentType = "image/jpeg";
image.Save(Response.OutputStream, System.Drawing.Imaging.ImageFormat.Jpeg);
```
Here a link to the generated image (zoom):

Unzoomed image:

How can I solve this?
| Ugly rendering of image with DrawString-Method (ASP.NET) | CC BY-SA 3.0 | null | 2010-11-10T12:33:05.897 | 2014-02-03T17:57:25.980 | 2014-02-03T17:57:25.980 | 301,857 | 496,950 | [
"asp.net",
"antialiasing",
"drawstring"
] |
4,144,548 | 1 | 4,145,919 | null | 1 | 9,657 | I've caption under every image
```
<p>
<a href="large.jpg">
<img width="85" height="75" src="thumb.jpg/>
</a>Caption</p>
```
I want to render same caption at bottom of lightbox.
```
<span id="lightbox-image-details-caption">...Here.......</span>
```
How to do this?

| How to render image caption to lightbox caption using jquery? | CC BY-SA 2.5 | null | 2010-11-10T12:40:16.063 | 2010-11-10T17:03:31.483 | 2010-11-10T17:03:31.483 | 84,201 | 84,201 | [
"jquery",
"css",
"xhtml"
] |
4,144,557 | 1 | 4,145,804 | null | 3 | 722 | I have already read [Entity Framework One-To-One Mapping Issues](https://stackoverflow.com/questions/1761362/entity-framework-one-to-one-mapping-issues) and this is not duplicate as the business rule specs are different here.
There are two tables, Invoices and Orders.
```
Invoices
-> InvoiceID (Primary, Auto Number)
Orders
-> OrderID (Primary, Auto Number)
-> InvoiceID (FK InvoiceID of Invoices Table)
```
Now the problem is, EF requires One to Many relationship for this association if names of properties are not same. If names of properties are same then it serves purpose of derived class, but here Order is not derived class or Invoice.
InvoiceID(s) are generated for every shopping cart, but OrderID(s) are only generated for paid invoices, so Every Order has InvoiceID but every Order does not have corresponding Invoice.
If I create a seperate table for this, then I have to write too much code to do it. Is there any way I can remove this restriction and let EF still process my model.
However, currently if I change the model as follow, it works
```
Invoices
-> InvoiceID (Primary, Auto Number)
Orders
-> OrderID (Auto Number)
-> InvoiceID (Primary, FK InvoiceID of Invoices Table)
```
But is this good practice? Because by definition InvoiceID of Orders table will certainly be unique, but we will be referring everywhere OrderID for comparison and lot of other references. I know I can index the property, but I dont feel this design is perfect.

| One to One error in Entity Framework 4 | CC BY-SA 2.5 | 0 | 2010-11-10T12:41:23.600 | 2010-11-10T17:39:54.137 | 2017-05-23T12:01:09.563 | -1 | 85,597 | [
"entity-framework-4",
"data-modeling",
"one-to-one"
] |
4,144,621 | 1 | 4,145,463 | null | 0 | 572 | I think the title of the question is quite bad explained so I'll try to make it better here. I have an UIViewController project. Inside the main view I've put another smaller view (320x200), let's call it . This view it's mostly placed out of the visible screen, at point (0, -180) so when the app is launched, the top 20px displayed are from menu and the rest is the main view. Clear so far?
When the user touches that visible part of the menu (there's an UIButton) the whole moves down with an animation so the whole menu us displayed. This menu has more buttons to go to other views and do other stuff, but when touching the buttons they don't response at all. How to make buttons work? Any tips here?
I've post some images, because it seems a bit messy :P


When I say the view moves, yes I mean the frame, with an animation like this:
```
[UIView beginAnimations:@"MenuAnimationShow" context:NULL];
[UIView setAnimationDuration:1];
[self.view setFrame:CGRectOffset([self.view frame], 0, menu.frame.size.height-15)];
self.view.center = CGPointMake(160, 240 + menu.frame.size.height - 15);
[UIView commitAnimations];
```
And also, yes, the buttons are connected to IBAction but when you click nothing happens. I have some NSLog in each of them but never gets to log anything. It's like you never touch them. If I put the menu UIView over the main view (self.view) they are not working either. More than that, is like menu is ignored because if there's something below (zPosition), you can touch that item.
| iPhone. Problem after moving a view out of screen to inside the screen | CC BY-SA 2.5 | null | 2010-11-10T12:48:04.347 | 2010-11-10T18:03:36.570 | 2010-11-10T17:08:51.770 | 253,329 | 253,329 | [
"iphone",
"uiviewcontroller",
"uibutton"
] |
4,144,625 | 1 | 4,144,698 | null | 1 | 311 | I am experiencing very weird issues surrounding Images. I have a settings window, which has a ListView on the left hand side which has various image icons which when clicked update the panel to the right to display relevant stuff - nothing hugely special.
However, I have recently added two extra icons, but their images are not being displayed correctly and I can't for the life of me figure out why. I've tried various different image formats (png, jpg, gif, bmp) and none of them display correctly. I've tried it on another computer to see if it was my installation of .NET but the error persisted.
I'd be happy if every image displayed incorrectly, but unfortunately its just these two, and perhaps any other image I add now.
Has anyone got any ideas - I'm all out of them...
Here is what it looks like when it runs...

Here is the same resource file as shown in visual studio...

The other one...

The other images render absolutely fine, such as this one...

| .NET Image problems on ListView in WinForms App (displaying incorrectly) | CC BY-SA 2.5 | null | 2010-11-10T12:48:23.910 | 2010-11-10T12:59:43.143 | null | null | 182,568 | [
".net",
"winforms",
"listview",
"rendering",
"imaging"
] |
4,144,750 | 1 | 4,184,933 | null | 0 | 182 | I'm trying to using pop up button in my code.
This is how it look:
This is binding configuration:

Import Choice List local attributes is array controller has reference outlets in appDelegate main code, and i update it as
```
[tempArray setContent:carriersListArray];
```
Everything work fine, but when i select something from button, i lost one of possible choice from the list, it's moving out and leave double choosing issues:

| Pop Up button binding strange trouble | CC BY-SA 2.5 | null | 2010-11-10T13:07:25.913 | 2010-11-15T13:46:51.827 | null | null | 493,920 | [
"objective-c"
] |
4,145,266 | 1 | 7,970,237 | null | 460 | 205,882 | In Firebug, you can search some text and it will look for it in all scripts loaded on a page. Can the same be done in Chrome Developer tools while debugging client script? I tried it, but it seems to search only in the script I have open, and not the rest that are on the page.
I hope the next screenshots give a better idea about what I'm trying to accomplish:

The following screenshots are from a single search in Firebug:


| How to search all loaded scripts in Chrome Developer Tools? | CC BY-SA 2.5 | 0 | 2010-11-10T14:03:30.553 | 2019-08-08T09:33:48.453 | 2013-04-29T18:11:04.700 | 158,449 | 1,801 | [
"google-chrome",
"google-chrome-devtools",
"script-debugging"
] |
4,145,602 | 1 | 4,146,070 | null | 11 | 39,879 | i am using a viewholder to display from a dynamic arrayadapter.it works but the data displayed changes irregularly when i scroll the List. Any suggestion?
Here is my Code
```
public View getView(int position, View convertView, ViewGroup parent) {
// A ViewHolder keeps references to children views to avoid unneccessary calls
// to findViewById() on each row.
ViewHolder holder;
// When convertView is not null, we can reuse it directly, there is no need
// to reinflate it. We only inflate a new View when the convertView supplied
// by ListView is null.
if (convertView == null) {
convertView = mInflater.inflate(R.layout.sample, null);
// Creates a ViewHolder and store references to the two children views
// we want to bind data to.
holder = new ViewHolder();
holder.name = (TextView) convertView.findViewById(R.id.text);
holder.icon = (ImageView) convertView.findViewById(R.id.icon);
convertView.setTag(holder);
} else {
// Get the ViewHolder back to get fast access to the TextView
// and the ImageView.
holder = (ViewHolder) convertView.getTag();
}
// Bind the data efficiently with the holder.
if(_first==true)
{
if(id<myElements.size())
{
holder.name.setText(myElements.get(id));
holder.icon.setImageBitmap( mIcon1 );
id++;
}
else
{
_first=false;
}
}
//holder.icon.setImageBitmap(mIcon2);
/*try{
if(id<myElements.size())
id++;
else
{
id--;
}
}
catch(Exception e)
{
android.util.Log.i("callRestService",e.getMessage());
}*/
return convertView;
}
static class ViewHolder {
TextView name;
ImageView icon;
}
```
when the list is loaded it looks like this : [http://i.stack.imgur.com/NrGhR.png](https://i.stack.imgur.com/NrGhR.png)  after scrolling some data [http://i.stack.imgur.com/sMbAD.png](https://i.stack.imgur.com/sMbAD.png)  it looks like this, and again if i scroll to the beginning it looks [http://i.stack.imgur.com/0KjMa.png](https://i.stack.imgur.com/0KjMa.png)
P.S : my list have to be in alphabetic order
| How to implement a view holder? | CC BY-SA 2.5 | 0 | 2010-11-10T14:41:36.667 | 2012-08-01T17:37:12.583 | 2010-11-11T05:43:18.600 | 430,652 | 430,652 | [
"android",
"listview",
"view"
] |
4,145,694 | 1 | 4,146,561 | null | 0 | 342 | I'm trying to add a menu controller as a quick choice of options after tapping my tab bar, however I don't get the arrow, when I use
```
menuCont.arrowDirection = UIMenuControllerArrowDown;
```

But if I use Up, Left or Right it works fine.

```
- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event {
UITouch *touch = [[event allTouches] anyObject];
if ([touch tapCount] == 2) {
[self becomeFirstResponder];
UIMenuItem *menuItem = [[UIMenuItem alloc] initWithTitle:@"Blue" action:@selector(blueView)];
UIMenuItem *menuItem2 = [[UIMenuItem alloc] initWithTitle:@"Green" action:@selector(greenView)];
UIMenuItem *menuItem3 = [[UIMenuItem alloc] initWithTitle:@"Red" action:@selector(redView)];
UIMenuController *menuCont = [UIMenuController sharedMenuController];
[menuCont setTargetRect:CGRectMake(0,0,320,200) inView:self.view];
menuCont.menuItems = [NSArray arrayWithObjects:menuItem, menuItem2, menuItem3, nil];
menuCont.arrowDirection = UIMenuControllerArrowDown;
[menuCont setMenuVisible:YES animated:YES];
}
}
- (void)blueView {
self.view.backgroundColor = [UIColor blueColor];
}
- (void)greenView {
self.view.backgroundColor = [UIColor greenColor];
}
- (void)redView {
self.view.backgroundColor = [UIColor redColor];
}
- (BOOL)canPerformAction:(SEL)action withSender:(id)sender {
BOOL answer = NO;
if (action == @selector(blueView))
answer = YES;
if (action == @selector(greenView))
answer = YES;
if (action == @selector(redView))
answer = YES;
return answer;
}
- (BOOL)canBecomeFirstResponder {
return YES;
}
```
PS. I'm wondering if its old school, as it doesn't auto-complete when entering some of the menu controller code ?
| iPhone, is menuCont.arrowDirection = UIMenuControllerArrowDown; not working a bug? | CC BY-SA 2.5 | null | 2010-11-10T14:49:39.543 | 2010-11-10T16:21:11.800 | null | null | 450,456 | [
"iphone",
"objective-c",
"xcode"
] |
4,145,839 | 1 | 6,297,882 | null | 2 | 1,024 | i created a stored procedure recently, and i would like to sort the list of stored procedures by date.
12 years ago this was easy:

What is the preferred way to accomplish this in SQL Server Management Studio?

Bonus: How to sort by owner?
| SSMS: How to sort objects by date? | CC BY-SA 2.5 | 0 | 2010-11-10T15:05:55.023 | 2020-04-03T14:01:16.997 | null | null | 12,597 | [
"sql-server-2000",
"ssms"
] |
4,145,871 | 1 | 4,433,278 | null | 5 | 138 | How do I get rid of this?

The reason I want to get rid of it is that every so often, I will move my mouse down toward the bottom of the screen, and when I mouseover this area, the mouse jumps all the way to the top-left of my screen. It's real annoying. I actually have to make my mouse go around this "feature" which I never use anyways, and probably just adds to the overhead VS introduces. So, any suggestions would be helpful.
| How to disable HTML hierarchy tracking at bottom of screen in VS2008? | CC BY-SA 2.5 | null | 2010-11-10T15:10:47.147 | 2010-12-13T20:38:49.780 | 2010-12-12T20:02:24.270 | 88,092 | 88,092 | [
"visual-studio-2008"
] |
4,145,873 | 1 | 4,146,737 | null | 9 | 1,143 | This is a follow-up question to [Combinatorics in Python](https://stackoverflow.com/questions/4095749/combinatorics-in-python)
I have a tree or directed acyclic graph if you will with a structure as:

Where r are root nodes, p are parent nodes, c are child nodes and b are branches. The root nodes are not directly linked to the parent nodes, it is only a reference.
I am intressted in finding all the combinations of branches under the constraints:
1. A child can be shared by any number of parent nodes given that these parent nodes do not share root node.
2. A valid combination should not be a subset of another combination
In this example only two valid combinations are possible under the constraints:
```
combo[0] = [b[0], b[1], b[2], b[3]]
combo[1] = [b[0], b[1], b[2], b[4]]
```
The data structure is such as b is a list of branch objects, which have properties r, c and p, e.g.:
```
b[3].r = 1
b[3].p = 3
b[3].c = 2
```
| Python Combinatorics, part 2 | CC BY-SA 2.5 | 0 | 2010-11-10T15:10:51.470 | 2010-11-10T16:39:53.673 | 2017-05-23T12:13:26.330 | -1 | 441,337 | [
"python",
"combinatorics"
] |
4,145,972 | 1 | null | null | 2 | 5,737 | I recently built a site and centered it using `margin: 0 auto`. I also wrapped elements in a `.wrapper` class with a width set to 960px and then had the parent element extend across the whole browser.
When I view [the Brands screen](http://www.propet.com/brands/index.php) on an iPad though, the site is left-aligned and does not extend across the whole window. Any thoughts to why this might be happening, and how to correct it?
See below for a screenshot:

| Why is my web page left-aligned on iPad? | CC BY-SA 2.5 | 0 | 2010-11-10T15:22:57.477 | 2012-12-01T16:50:49.563 | 2010-11-10T21:58:09.247 | 20,578 | 483,238 | [
"css",
"ipad",
"margin",
"centering"
] |
4,146,073 | 1 | 4,148,076 | null | 0 | 229 | I created a Calendar, then add it a calendar Webpart that shows it in another page. The problem is that the webpart is not showing it correctly in the Day and Week views. Month view is just fine. It looks that its showing 3 columns.
Here is how it looks in the week view

| Calendar Webpart not showing correctly | CC BY-SA 3.0 | null | 2010-11-10T15:31:30.927 | 2017-08-02T17:18:50.037 | 2017-08-02T17:18:50.037 | 1,033,581 | 251,154 | [
"sharepoint-2007"
] |
4,146,236 | 1 | 4,146,375 | null | 1 | 1,620 | I have the following piece of HTML that creates a table with a scrollbar at the last column. My problem is that IE renders it differently than Firefox. Any clue would be greatly appreciated.
```
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
<title>Test of tables and CSS</title>
<style type="text/css">
td
{
border:solid 1px #000000;
padding:2px 2px 2px 2px;
}
</style>
</head>
<body>
<table cellspacing="0" style="border:solid 1px #000000;border-collapse:separate;padding:0 0 0 0;">
<tr>
<td>Col 1 1</td>
<td>Col 1 2</td>
<td rowspan="5" style="width: 1px; padding: 0 0 0 0;height:100%;"><table cellspacing="0" style="border: none; height:100%;border-collapse: collapse; padding: 0 0 0 0;">
<tr><td style="border: none; height: 1px; background-color: #C9D8FC;"><img alt="" src="../img/ico/ScrollUp.gif" style="border: none;" /></td></tr>
<tr><td style="border: none; height: auto; background-color: #C9D8FC;"></td></tr>
<tr><td style="border: none; height: 1px; vertical-align: bottom; background-color:#C9D8FC;"><img alt="" src="../img/ico/ScrollDown.gif" style="border:none;" /></td></tr>
</table></td>
</tr>
<tr>
<td>Col 2 1</td>
<td>Col 2 2</td>
</tr>
<tr>
<td>Col 3 1</td>
<td>Col 3 2</td>
</tr>
<tr>
<td>Col 4 1</td>
<td>Col 4 2</td>
</tr>
<tr>
<td>Col 5 1</td>
<td>Col 5 2</td>
</tr>
</table>
</body></html>
```
Firefox:

IE 8:

| How can I fill an html table-cell with a background-color in html for difference browsers | CC BY-SA 2.5 | null | 2010-11-10T15:44:55.437 | 2010-11-17T12:41:00.593 | 2010-11-11T09:16:01.453 | 85,072 | 85,072 | [
"html",
"css"
] |
4,146,438 | 1 | 4,147,148 | null | 2 | 168 | I have the following entities

and I am trying to map them with help of FluentNHibernate.
Some notes about the entities:
- `CreatedBy``AssignedTo``Task``CreatorID``AssigneeID`- `WrittenBy``Note``AuthorID`
I am not going to include all the mapping here as it is maybe not needed, but the biggest problem I am facing to came out when I have added the Task and the Note mapping.
Now in fact if I try to add an Address to a Person object NHibernate try to execute the following query
```
UPDATE Addresses SET AuthorID = @p0 WHERE AddressID = @p1;
```
Where am I wrong with this?
: Added the Mapping of the entities
```
public PersonMap() {
Table( "Persons" );
Id( c => c.PersonID ).Column( "PersonID" ).GeneratedBy.Identity();
References( c => c.Company ).Column( "CompanyID" );
HasMany( c => c.Addresses ).Cascade.SaveUpdate();
HasMany( c => c.TasksAsCreator ).Cascade.SaveUpdate();
HasMany( c => c.TasksAsAssignee ).Cascade.SaveUpdate();
HasMany( c => c.NotesAsAuthor ).Cascade.SaveUpdate();
}
public TaskMap() {
Table( "Tasks" );
Id( i => i.TaskID ).Column( "TaskID" ).GeneratedBy.Identity();
References( i => i.Company ).Column( "CompanyID" );
References( i => i.CreatedBy ).Column( "CreatorID" );
References( i => i.AssignedTo ).Column( "AssigneeID" );
HasMany( i => i.Notes ).Cascade.SaveUpdate();
}
public NoteMap() {
Table( "Notes" );
Id( n => n.NoteID ).Column( "NoteID" ).GeneratedBy.Identity();
References( n => n.Task ).Column( "TaskID" );
References( n => n.WrittenBy ).Column( "AuthorID" );
}
```
: After exporting the mapping (thanks to dotjoe) I have found many strange results as the one that follow
```
<bag cascade="save-update" name="NotesAsAuthor" mutable="true">
<key>
<column name="CreatorID" />
</key>
<one-to-many class="Note, GSLConverter, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" />
</bag>
```
And does not reflect the mapping showed above....
| Help needed with FluentNHibernate mapping | CC BY-SA 2.5 | 0 | 2010-11-10T16:07:07.803 | 2010-11-10T23:47:31.967 | 2010-11-10T22:37:50.443 | 431,537 | 431,537 | [
"nhibernate",
"fluent-nhibernate",
"nhibernate-mapping"
] |
4,146,537 | 1 | 4,146,607 | null | 1 | 1,104 | My Win32 Application displays Menus as shown when running on Win 7:

This is the Default for the themes Windows 7 as well as Windows 7 Aqua.
Please note that the selected menu entry is only slightly different from the other entries. I think it is much too less highlighted and therefore i am looking for a way to give the selected entry a different color. But unfortunately all possibilities to modify menu colors disappeared in Windows 7. The settings made in the window color dialog are non effective for menus.
But amazingly Microsoft's own applications look different. I.e. Paint has different color and appearance of menus:

This has good contrast and is much better than the default for a Win32 application.
Also Visual Studio 2010 looks different:

I know that VS 2010 is build on WPF. I don't know if and how the ribbon, used in paint influences the menu appearance. My menus are set up dynamically using SetMenu();
My Question: Is there any way to change the appearance of my applications menu using a API or maybe a manifest or resource?
Or is there a way to modify the color of the selected menu entry in Windows 7 through settings?
| How can i change the appearance of Windows 7 menus? | CC BY-SA 2.5 | null | 2010-11-10T16:18:50.613 | 2010-11-10T16:36:30.713 | 2010-11-10T16:36:30.713 | 25,324 | 53,420 | [
"winapi",
"visual-c++",
"windows-7"
] |
4,146,717 | 1 | 4,146,855 | null | 0 | 358 | At the moment I have all my views specified in my mainWindow.xib file in interface builder.
So when a tab bar button is tapped it loads the correct navigation controller.
But I want to do something different in code when they tap the tab bar button for one button.
How do I do that?
EDIT - Not quite working solution...

| iPhone, how'd I override a tab bar button to do other than the navigation controller in my mainWindow.xib | CC BY-SA 4.0 | 0 | 2010-11-10T16:37:29.067 | 2018-05-22T21:31:59.057 | 2018-05-22T21:31:59.057 | 7,756,492 | 450,456 | [
"iphone",
"objective-c",
"xcode"
] |
4,146,881 | 1 | null | null | 0 | 789 | I have a QListWidget full of rectangular icons of different color, which serves as a color selection dialog for our app. I do not like the highlight on them, since it is not aligned properly, as evident from the picture attached.

How do I fix this? Any ideas in general for better highlights would also be great!
Thanks,
Sayan
| Highlighting a QListWidgetItem | CC BY-SA 2.5 | null | 2010-11-10T16:56:04.407 | 2010-11-11T06:38:19.440 | 2010-11-10T17:38:21.047 | 356,922 | 356,922 | [
"qt4",
"qlistwidget"
] |
4,147,444 | 1 | 4,149,052 | null | 1 | 224 | I have a DB like this that I generated from EF:

Now I'd like to add a "fielduserinput" entity so I write the following code:
```
public bool AddValueToField(string field, string value, string userId)
{
//adds a value to the db
var context = new DBonlyFieldsContainer();
var fieldSet = (from fields in context.fieldSet
where fields.fieldName.Equals(field)
select fields).SingleOrDefault();
var userSet = (from users in context.users
where users.id.Equals(userId)
select users).SingleOrDefault();
var inputField = new fielduserinput { userInput = value, field = fieldSet, user = userSet };
return false;
}
```
Obviously it's not finished but I think it conveys what I'm doing.
Is this really the right way of doing this? My goal is to add a row to fielduserinput that contains the value and references to user and field. It seems a bit tedious to do it this way. I'm imagining something like:
```
public bool AddValueToField(string userId, string value, string fieldId)
{
var context = new db();
var newField = { field.fieldId = idField, userInput = value, user.id = userId }
//Add and save changes
}
```
| What is the correct way of using Entity Framework? | CC BY-SA 2.5 | null | 2010-11-10T17:53:29.953 | 2010-11-10T21:50:50.613 | 2010-11-10T18:51:47.007 | 264,557 | 264,557 | [
"c#",
"entity-framework",
"ado.net"
] |
4,147,575 | 1 | null | null | 2 | 2,850 | 
How can we have the text "Create New Position" be vertically centered?
HTML/CSS is below.
Adding `margin-top:5px` to the "Create new.." div helps but it seems hacky.
```
<div style="margin-top:5px">
<div style="float:left">Create new position</div>
<div style="float:right"><input type="submit" id="x" value="Save"></div>
<div style="clear: both;"></div>
</div>
```
| Vertically center one of two divs on same line? | CC BY-SA 3.0 | null | 2010-11-10T18:06:53.610 | 2013-04-15T20:53:37.503 | 2013-04-15T20:53:37.503 | 1,454,806 | 47,281 | [
"css",
"html",
"vertical-alignment"
] |
4,148,036 | 1 | 4,148,661 | null | 2 | 326 | I'm trying to get the meta extension working with markdown in Python 2.6.
The code looks like this:
```
import markdown as m
print "Markdown version: ", m.version
file = "file.md"
md = m.Markdown( extensions = ['meta']) # doesn't complain
print "Registered extensions: ", md.registeredExtensions
text = open(file)
try:
md.convert(file)
except AttributeError as a:
print "Error: ", a
print "Meta: ", md.Meta
```
And my file looks like this:
```
Title: Chaleur
Date: 2010-07-11
Author: Gui13
Simple md test

```
What I'd like to get is something like `'title' : 'Chaleur', 'date' : '2010-07-11', 'author' : 'gui13'` when printing the `md.Meta`.
What I get is this:
> $ python test.py
Markdown version: 2.1.0
Registered extensions: []
Meta: {}
So it looks like the meta extension is not even loaded, whereas it should be (meta is supposed to be included in Markdown since version 2.0).
Do you know what is the problem?
| 'meta' extension for Markdown not loading in Python2.6? | CC BY-SA 2.5 | 0 | 2010-11-10T19:04:02.207 | 2010-11-10T20:17:13.573 | null | null | 389,405 | [
"python",
"markdown",
"meta"
] |
4,148,379 | 1 | null | null | 0 | 525 | i am trying to experiment with linux kernel by adding a custom system call into the kernel.I succeeded at first and later I made some modifications to the file containing the new call code and when i tried to recompile the kernel with
> make bzImage
i get the the following error:

What seems to be the reason for the error?
| missing-syscalls error during linux kernel 2.6 compilation | CC BY-SA 4.0 | null | 2010-11-10T19:41:47.853 | 2020-08-26T21:43:40.433 | 2020-08-26T21:43:40.433 | 2,430,549 | 242,382 | [
"linux",
"gcc",
"makefile",
"linux-kernel"
] |
4,148,469 | 1 | 4,218,066 | null | 1 | 12,782 | For some reason on our grid the vertical alignment of the rows is not middle. It appears to be top. Is there something specific you have to do to achieve vertical alignment?
Here's an example of the alignment:

Our grid definitions:
```
$.extend(jQuery.jgrid.defaults, {
url:'NoData.json',
datatype: 'json',
mtype: 'GET',
altRows:true,
//altclass:'zebraOdd',
loadError: function(xhr,st,err) {
handleError(xhr, 'Error loading grid');
},
onPaging: function (b) {
return onPage($(this));
},
beforeRequest: function() {
beforeReq($(this));
},
loadComplete: function() {
loadComp($(this));
},
onSelectRow: function(id){
$(this).resetSelection(); //This prevents the disabling of the row hovering and altclass - http://stackoverflow.com/questions/3916477
},
scrollOffset:0, //No scrollbar
rowNum:15,
shrinkToFit:true,
width:1120,
viewrecords: true ,
height: '360',
hidegrid: false //Don't show the expand/collapse button on the top right
});
$("#grid-pos").jqGrid({
colNames:['Position Account', 'Product Code', 'Product Type','Expiry', 'Put/Call', 'Strike Price', 'Current Long', 'Current Short', 'Held Exercise Requests', 'Held Abandon Requests', 'Last Trade Date / Expiration Date', 'Select Operation'],
colModel :[
{name:'account', index:'account', width:85, sortable:false},
{name:'productCode', index:'productCode', width:85, sortable:false},
{name:'productType', index:'productType', width:85, sortable:false},
{name:'expiry', index:'expiry', width:85, align:'right',stype:'select', sortable:false},
{name:'putCall', index:'putCall', width:85, sortable:false},
{name:'strike', index:'strike', sorttype: 'float', align:'right', width:85, sortable:false},
{name:'long', index:'long', width:85, align:'right', sortable:false},
{name:'short', index:'short', width:85, align:'right', sortable:false},
{name:'exercise', index:'exercise', width:90, align:'right', sortable:false},
{name:'abandon', index:'abandon', width:90, align:'right', sortable:false},
{name:'LTD', index:'LTD', width:110, align:'right', sortable:false},
{index:'operations', width:150, title:false, align: 'center', formatter:opsFormatter, sortable:false}
],
pager: '#div-pos-pager',
caption: 'View Positions'
});
```
| jqGrid row vertical alignment not middle | CC BY-SA 2.5 | null | 2010-11-10T19:52:55.607 | 2013-03-26T20:07:03.393 | 2010-11-18T17:43:11.037 | 47,281 | 47,281 | [
"jquery",
"jqgrid",
"alignment"
] |
4,148,487 | 1 | null | null | 0 | 1,365 | This works within visual studio:
```
PeliculasEntities db = new PeliculasEntities();
DetalleAlquiler detalleAlquiler = (DetalleAlquiler)db.DetalleAlquilers.FirstOrDefault(x => x.ID == 1);
MessageBox.Show(detalleAlquiler.Alquiler.Cliente.Natural.Edad.ToString());
```
I want to retrive the same information inside of LinqPad. Any help?
When I run this I get an error: "DetalleAlquiler does not have a definition for aAquiler"
```
var detalle = DetalleAlquilers.Where(x => x.ID == 1);
var edad = detalle.Alquiler.Cliente.Natural.Edad.ToString();
```
What variable do I use to access the database?

| Using Linqpad for a simple query | CC BY-SA 2.5 | null | 2010-11-10T19:55:32.477 | 2010-11-10T20:42:34.630 | 2010-11-10T20:01:02.273 | null | null | [
"c#",
"linq",
"linqpad"
] |
4,148,831 | 1 | 4,148,929 | null | 32 | 15,015 | I'm trying to create a "parrallel" bezier curve. In my attempts I've gotten close but no cigar. I'm trying to keep a solid 1px offset between the 2 curves (red,blue).

My main goal is use a edge offseting algorythm to expand/shrink a svg path.
---
For anyone else who is looking for a solution, I've create a AS3 version.
[http://seant23.wordpress.com/2010/11/12/offset-bezier-curves/](http://seant23.wordpress.com/2010/11/12/offset-bezier-curves/)
| How to offset a cubic bezier curve? | CC BY-SA 2.5 | 0 | 2010-11-10T20:38:45.103 | 2021-05-08T07:09:33.793 | 2017-02-08T14:30:56.607 | -1 | 503,724 | [
"graphics",
"bezier",
"cad"
] |
4,148,913 | 1 | null | null | 2 | 3,056 | I want to view the call stack when a stackoverflow exception is thrown. (i.e. I want to pin point what recursive call is causing the stack overflow).
The call stack is cleared and all that I can see is "External Code".
Edit I followed Chris Schmich's advice (post below), now I have a call stack like below, this is just a plain console app that I'm writing, notice that the is no mention of Main() in the screen shot:

Edit2: I followed Chris Schmich's advice about view the different threads call stacks, however I still can't seem to view my console app's call stack, here's what I can see:

| Viewing CallStack in Visual Studio 2010 when stack overflow exception thrown | CC BY-SA 4.0 | null | 2010-11-10T20:47:01.843 | 2022-01-20T09:13:01.570 | 2019-06-01T14:41:06.307 | 1,033,581 | 67,357 | [
"visual-studio-2010",
"stack-overflow"
] |
4,149,009 | 1 | null | null | -2 | 72 | I'm very bad with css, and I can't get this layout looking good:

Maybe you can help me with the code because mine is a complete disaster. I made that image in order to help you to understand what I want.
Thanks a lot for any help or code (better a code).
| CSS issue with <DIV>, trying to get layout working | CC BY-SA 2.5 | null | 2010-11-10T20:57:04.290 | 2010-11-10T21:12:28.790 | 2010-11-10T21:09:26.420 | 223,391 | 310,648 | [
"css",
"html"
] |
4,149,020 | 1 | 4,153,112 | null | 6 | 10,299 | I have some PHP code that runs a query on a database, saves the results to a csv file, and then allows the user to download the file. The problem is, the csv file contains page HTML around the actual csv content.
I've read all the related questions here already, including [this one](https://stackoverflow.com/questions/998885/forcing-a-file-download-with-php). Unfortunately my code exists within Joomla, so even if I try to redirect to a page that contains nothing but headers, Joomla automatically surrounds it with its own navigation code. This only happens at the time of download; if I look at the csv file that's saved on the server, it does not contain the HTML.
Can anyone help me out with a way to force a download of the actual csv file as it is on the server, rather than as the browser is editing it to be? I've tried using the header location, like this:
```
header('Location: ' . $filename);
```
but it opens the file in the browser, rather than forcing the save dialog.
Here's my current code:
```
//set dynamic filename
$filename = "customers.csv";
//open file to write csv
$fp = fopen($filename, 'w');
//get all data
$query = "select
c.firstname,c.lastname,c.email as customer_email,
a.email as address_email,c.phone as customer_phone,
a.phone as address_phone,
a.company,a.address1,a.address2,a.city,a.state,a.zip, c.last_signin
from {$dbpre}customers c
left join {$dbpre}customers_addresses a on c.id = a.customer_id order by c.last_signin desc";
$votes = mysql_query($query) or die ("File: " . __FILE__ . "<br />Line: " . __LINE__ . "<p>{$query}<p>" . mysql_error());
$counter = 1;
while ($row = mysql_fetch_array($votes,1)) {
//put header row
if ($counter == 1){
$headerRow = array();
foreach ($row as $key => $val)
$headerRow[] = $key;
fputcsv($fp, $headerRow);
}
//put data row
fputcsv($fp, $row);
$counter++;
}
//close file
fclose($fp);
//redirect to file
header("Content-type: application/octet-stream");
header("Content-Disposition: attachment; filename=".$filename);
header("Content-Transfer-Encoding: binary");
readfile($filename);
exit;
```
Full URL looks like this:
```
http://mysite.com/administrator/index.php?option=com_eimcart&task=customers
```
with the actual download link looking like this:
```
http://mysite.com/administrator/index.php?option=com_eimcart&task=customers&subtask=export
```
Here's a shot of the page that the code is on; the generated file still is pulling in the html for the submenu. The code for the selected link (Export as CSV) is now
```
index.php?option=com_eimcart&task=customers&subtask=export&format=raw
```

Now here is a screenshot of the generated, saved file:

It shrank during the upload here, but the text highlighted in yellow is the html code for the subnav (list customers, add new customer, export as csv). Here's what my complete code looks like now; if I could just get rid of that last bit of html it would be perfect.
```
$fp= fopen("php://output", 'w');
$query = "select c.firstname,c.lastname,c.email as customer_email,
a.email as address_email,c.phone as customer_phone,
a.phone as address_phone, a.company, a.address1,
a.address2,a.city,a.state,a.zip,c.last_signin
from {$dbpre}customers c
left join {$dbpre}customers_addresses a on c.id = a.customer_id
order by c.last_signin desc";
$votes = mysql_query($query) or die ("File: " . __FILE__ . "<br />Line: " . __LINE__ . "<p>{$query}<p>" . mysql_error());
$counter = 1;
//redirect to file
header("Content-type: application/octet-stream");
header("Content-Disposition: attachment; filename=customers.csv");
header("Content-Transfer-Encoding: binary");
while ($row = mysql_fetch_array($votes,1)) {
//put header row
if ($counter == 1){
$headerRow = array();
foreach ($row as $key => $val)
$headerRow[] = $key;
fputcsv($fp, $headerRow);
}
//put data row
fputcsv($fp, $row);
$counter++;
}
//close file
fclose($fp);
```
Here's the code (I think) that worked for me. Use the RAW param in the link that calls the action:
```
index.php?option=com_eimcart&task=customers&subtask=export&format=raw
```
Because this was procedural, our link was in a file called customers.php, which looks like this:
```
switch ($r['subtask']){
case 'add':
case 'edit':
//if the form is submitted then go to validation
include("subnav.php");
if ($r['custFormSubmitted'] == "true")
include("validate.php");
else
include("showForm.php");
break;
case 'delete':
include("subnav.php");
include("process.php");
break;
case 'resetpass':
include("subnav.php");
include("resetpassword");
break;
case 'export':
include("export_csv.php");
break;
default:
include("subnav.php");
include("list.php");
break;
}
```
So when a user clicked on the link above, the export_csv.php file is automatically included. That file contains all the actual code:
```
<?
header("Content-type: application/octet-stream");
header("Content-Disposition: attachment; filename=customers.csv");
header("Content-Transfer-Encoding: binary");
$fp= fopen("php://output", 'w');
//get all data
$query = "select
c.firstname,c.lastname,c.email as customer_email,
a.email as address_email,c.phone as customer_phone,
a.phone as address_phone,
a.company,a.address1,a.address2,a.city,a.state,a.zip, c.last_signin
from {$dbpre}customers c
left join {$dbpre}customers_addresses a on c.id = a.customer_id order by c.last_signin desc";
$votes = mysql_query($query) or die ("File: " . __FILE__ . "<br />Line: " . __LINE__ . "<p>{$query}<p>" . mysql_error());
$counter = 1;
while ($row = mysql_fetch_array($votes,1)) {
//put header row
if ($counter == 1){
$headerRow = array();
foreach ($row as $key => $val)
$headerRow[] = $key;
fputcsv($fp, $headerRow);
}
//put data row
fputcsv($fp, $row);
$counter++;
}
//close file
fclose($fp);
```
| Forcing file download in PHP - inside Joomla framework | CC BY-SA 3.0 | 0 | 2010-11-10T20:58:13.877 | 2015-04-05T22:46:07.790 | 2017-05-23T10:32:35.693 | -1 | 341,611 | [
"php",
"joomla",
"download"
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.