Id
int64 1.68k
75.6M
| PostTypeId
int64 1
2
| AcceptedAnswerId
int64 1.7k
75.6M
⌀ | ParentId
int64 1.68k
75.6M
⌀ | Score
int64 -60
3.16k
| ViewCount
int64 8
2.68M
⌀ | Body
stringlengths 1
41.1k
| Title
stringlengths 14
150
⌀ | ContentLicense
stringclasses 3
values | FavoriteCount
int64 0
1
⌀ | CreationDate
stringlengths 23
23
| LastActivityDate
stringlengths 23
23
| LastEditDate
stringlengths 23
23
⌀ | LastEditorUserId
int64 -1
21.3M
⌀ | OwnerUserId
int64 1
21.3M
⌀ | Tags
list |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
5,385,900 | 1 | 5,561,226 | null | 0 | 3,268 | I've dug around a bit in the Eventkit/EventkitUI docs and couldn't find an answer. Does the iOS SDK provide a way to display the Calendar chooser view that the built-in Calendar app uses when you want to move an event to a different calendar? If not, what would be the best way to build that? How do I know which account each calendar is from? How do I display the little color dot? Are there any 3rd party libraries that provide something like this?
Thanks!
EDIT: Specifically I'm asking about this screen:

| Does the iOS SDK give access to the Calendar picker used by iPhone's built-in Calenar app? | CC BY-SA 2.5 | null | 2011-03-22T01:55:49.163 | 2011-04-06T03:47:36.463 | 2011-03-22T13:54:00.380 | 62,917 | 62,917 | [
"iphone",
"ios4",
"calendar",
"eventkit"
]
|
5,386,780 | 1 | null | null | 0 | 3,427 | Work on .I has a , On this report, I Face some peculiar problem describe in detail about the property of my XtraReport report .I use then export in pdf works fine, but problem arise when I export in excel,doc or other format.But I need to export in excel and doc format.Can anybody tell me why I face this problem. How can I retrieve this problem?
```
DownThenAcross--->problem occurs right side report missing.
AcrossThenDown--->I get the multicolumn report but problem on export in doc,excel.
```
if have any query plz ask.Thanks in advance


| XtraReport side by side Export problem on excel | CC BY-SA 2.5 | null | 2011-03-22T04:23:41.670 | 2011-03-24T07:34:21.457 | 2011-03-24T07:34:21.457 | 336,100 | 336,100 | [
"c#",
"reporting",
"devexpress",
"xtrareport"
]
|
5,387,029 | 1 | 5,392,957 | null | 0 | 897 | I have to develop an Android application in that when the user just enters “starbucks” in the destination address, then using Google search find the closest address and substitute starbucks with real starbucks address. How to do it pro-grammatically!? Please see the figures 
| Implement “GetDirection” in Android Google map using Google Maps search | CC BY-SA 2.5 | null | 2011-03-22T05:01:53.360 | 2011-03-22T14:38:38.627 | 2011-03-22T09:16:31.690 | 662,025 | 536,091 | [
"android",
"google-maps"
]
|
5,387,038 | 1 | 5,413,725 | null | 5 | 8,784 | I use Html helpers to display model data in form fields, e.g. Html.TextBoxFor, Html.TextAreaFor.
When the model values are null, I would expect the values should be empty in the form fields. They are displayed normally in Safari and Firefox, i.e. empty, but in IE, they are shown as "null" in a text field (see image below).

Any clue how to fix this? Thanks.
| "null" values shown in form fields in IE | CC BY-SA 2.5 | null | 2011-03-22T05:02:51.037 | 2013-07-16T12:17:31.730 | 2011-03-24T01:29:58.343 | 404,033 | 404,033 | [
"javascript",
"internet-explorer",
"asp.net-mvc-2",
"forms"
]
|
5,387,213 | 1 | 5,387,305 | null | 1 | 2,342 | I have a database that relies on a bunch of Many-to-Many and rather than denormalizing the whole database (which is quite large) I would like to know if there is a SIMPLE way of implementing Many-to-Many Relationships using LINQ-to-SQL Yet...
Everywhere I look I find articles on HOW Difficult It is, or A Simple Workaround that is actually "NOT" Simple. But all the articles I have been able to locate are pretty dated, using asp.net 3.5.
Should I just Create a Stored Procedure and then Drag it into the .DBML file as a method?
So I guess my question is:
Is there any new way to implement many-to-many using Linq-to-Sql in ASP.NET 4.0 along with MVC 3.
---
Examples of usage in my Project:

In the finished model, there will be Other Tables linked to the Many-to-Many Tables (i.e. EventAddress, EventUrl, VipAddress, VipPicture, GuestAddress, GuestPhone, GuestEmail, etc...)
So you can see when this would be a pain in the a$$ to denormalize.
Thank you,
Tim
| Linq to SQL many to many Relationships - Insert Update & Delete | CC BY-SA 2.5 | null | 2011-03-22T05:27:22.953 | 2013-08-21T19:16:44.160 | 2013-08-21T19:16:44.160 | 861,716 | 612,699 | [
"c#",
"asp.net-mvc-3",
"linq-to-sql"
]
|
5,387,347 | 1 | null | null | 2 | 2,321 | I want notification of facebook...
I am using [this](https://github.com/facebook/facebo) facebook Api..
and i want this notification in my application.
any one know how to get notification ..

| Get Notification From Facebook Using Facebook Api | CC BY-SA 3.0 | 0 | 2011-03-22T05:46:38.987 | 2014-07-30T16:56:23.023 | 2014-03-01T12:39:25.567 | 624,069 | 624,069 | [
"android",
"facebook"
]
|
5,387,363 | 1 | 5,388,991 | null | 0 | 637 | Is there a C API call to set/remove the relief around a GTK menu bar object? I can't locate it in the documentation. Can this only be done with a style file?
In this picture I've added a border of 5 pixels to the container holding the menu to highlight the relief - can I remove the relief altogether?

| How to set/remove the relief of a GTK menu bar object from the C API? | CC BY-SA 2.5 | 0 | 2011-03-22T05:49:00.400 | 2011-03-22T09:17:39.757 | null | null | 331,024 | [
"c",
"user-interface",
"gtk"
]
|
5,387,381 | 1 | 5,410,019 | null | 3 | 6,694 | I am using JS-API to generate a dialogue which asks for permission to publish the status message generated by my Application. Given below is the screenshot of what I am talking about:

Here is the code:
```
FB.ui(
{
method: 'feed',
name: 'Facebook Dialogs',
link: 'http://developers.facebook.com/docs/reference/dialogs/',
picture: 'http://fbrell.com/f8.jpg',
caption: 'Reference Documentation',
description: 'Dialogs provide a simple, consistent interface for applications to interface with users.',
message: 'Facebook Dialogs are easy!'
},
function(response) {
if (response && response.post_id) {
alert('Post was published.');
} else {
alert('Post was not published.');
}
}
);
```
I use the sample JS code as told in the documentation and it works well if pop-ups are not blocked in the browser settings. but without status message being displayed there's no utility of the app!
Please help; I'm stuck at the last stage.
| Facebook application, dialogue to publish on user's wall, using Javascript API, pop-up blocked in browsers | CC BY-SA 4.0 | null | 2011-03-22T05:53:44.460 | 2020-04-24T14:59:57.727 | 2020-04-24T14:59:57.727 | 4,370,109 | 640,627 | [
"facebook",
"popup",
"facebook-javascript-sdk",
"dom-events",
"popup-blocker"
]
|
5,387,420 | 1 | null | null | 1 | 1,445 | 
I would like to invoke Outlook with To,Subject,Attachments in silverlight Application.
Is that possible to invoke Outlook With attachment. Sending Attachment is mondatory in application.
I achive this using NavigateUri in HyperLink.
Using the Following Code
```
<HyperlinkButton x:Name="Mail" Content="Ramakrishnan" NavigateUri="mailto:[email protected]?subject=Mail With Attachment Testing">
</HyperlinkButton>
```
| Invoke Outlook with Attachment in Silverlight 4 | CC BY-SA 2.5 | null | 2011-03-22T05:57:30.510 | 2011-03-22T09:54:05.683 | 2011-03-22T07:44:36.443 | 346,953 | 346,953 | [
".net",
"silverlight",
"silverlight-3.0"
]
|
5,387,535 | 1 | null | null | 0 | 1,033 | I want to have a repeater like `DataView` or `ListView`. The first column of each row (named ) should be read from a `List`, and for each user ID, the program should dynamically create three radio buttons like these:

Requirements:
1. The user must able to change selection of radio buttons.
2. When the user clicks the submit button, radio values be displayed using the info("") method.
I've already done this by using [this example](https://cwiki.apache.org/WICKET/using-radiogroups.html), but when I click the submit button, old selections are shown, and the form gets reset to those old selections.
| How can I make a Wicket form save radio button state? | CC BY-SA 3.0 | null | 2011-03-22T06:13:27.867 | 2022-07-03T10:08:59.630 | 2022-07-03T10:08:59.630 | 213,269 | 670,674 | [
"apache",
"listview",
"radio-button",
"wicket",
"dataview"
]
|
5,387,576 | 1 | 5,387,601 | null | 37 | 173,485 | I'm a new comer to web designing. I created my web page layout using CSS and HTML as below. The problem is even though i set the margin to 0, the upper margin is not setting to 0 and leaves some space. How can i clear this white space?

```
<style type="text/css">
body{
margin:0 auto;
background:#F0F0F0;}
#header{
background-color:#009ACD;
height:120px;}
#header_content {
width:70%;
background-color:#00B2EE;
height:120px;
margin:0 auto;
text-align:center;}
#content{
width:68%;
background-color:#EBEBEB;
margin:0 auto;
padding:20px;}
</style>
```
```
<body>
<div id="header">
<div id="header_content">
<p>header_content</p>
</div>
</div>
<div id="content">
Main Content
</div>
</body>
```
```
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Book Shop</title>
<style type="text/css">
html, body, #header {
margin: 0 !important;
padding: 0 !important;
}
body{
margin:0; padding: 0;
background:#F0F0F0;}
#header{
background-color:#009ACD;
height:120px;}
#header_content {
width:70%;
background-color:#00B2EE;
height:120px;
margin:0 auto;
text-align:center;}
#content{
width:68%;
background-color:#EBEBEB;
margin:0 auto;
padding:20px;}
body {
margin: 0;
padding: 0;
}
</style>
</head>
<body>
<div id="header">
<div id="header_content">
<p>header_content</p>
</div>
</div>
<div id="content">
Main Content
</div>
</body>
</html>
```
| CSS Margin: 0 is not setting to 0 | CC BY-SA 2.5 | 0 | 2011-03-22T06:21:35.610 | 2022-12-29T16:15:11.350 | 2011-03-22T06:57:04.923 | 340,046 | 340,046 | [
"html",
"css",
"margin"
]
|
5,387,605 | 1 | 5,387,641 | null | 2 | 1,525 | I'm trying to draw some dots connected with lines. The dot consists of the "nucleus" with orbital area around it.

The problem appears when I try to move those dots which gives me distorted lines:

In my `drawRect:` method I iterate over an array of created dots and draw a bezier path by using `lineToPoint:` methods.
```
Dot *prevDot = nil;
NSBezierPath *line = [NSBezierPath bezierPath];
for (Dot *dot in _dots) {
if (!prevDot) {
[line moveToPoint:dot.position];
} else {
[line lineToPoint:dot.position];
}
prevDot = dot;
}
[line stroke];
```
My question is what technique should I use to implement clean line update between points once one of them is moved?
| Drawing lines and points with Cocoa | CC BY-SA 2.5 | 0 | 2011-03-22T06:25:14.777 | 2011-03-22T18:39:32.630 | 2011-03-22T18:39:32.630 | 41,761 | 41,761 | [
"cocoa",
"drawing",
"nsbezierpath"
]
|
5,388,032 | 1 | 5,388,482 | null | 0 | 454 | I have a like this; (in )
```
SELECT A.HESAP_NO, A.TEKLIF_NO1 || '/' || A.TEKLIF_NO2 AS TEKLIF, A.MUS_K_ISIM,
B.MARKA, C.SASI_NO, C.SASI_DURUM, D.TAS_MAR, RISK_SASI(A.TEKLIF_NO1, A.TEKLIF_NO2, C.SASI_NO) AS RISK,
MV_SASI(A.TEKLIF_NO1, A.TEKLIF_NO2, C.SASI_NO, SYSDATE) AS MV
FROM S_TEKLIF A, S_URUN B, S_URUN_DETAY C, KOC_KTMAR_PR D
WHERE A.TEKLIF_NO1 || A.TEKLIF_NO2 = B.TEKLIF_NO1 || B.TEKLIF_NO2
AND A.TEKLIF_NO1 || A.TEKLIF_NO2 = C.TEKLIF_NO1 || C.TEKLIF_NO2
AND B.SIRA_NO = C.URUN_SIRA_NO
AND B.DISTRIBUTOR = D.DIST_KOD
AND B.MARKA = D.MARKA_KOD
AND B.URUN_KOD = D.TAS_KOD
```
And the result is;

By this steps, there is no error when I scroll down , I getting an error like this:
> ORA-01422: exact fetch returns more than requested number of rows
ORA-06512: at "MARDATA.RISK_SASI", line 28
01422. 00000 - "exact fetch returns more than requested number of rows"
*Cause: The number specified in exact fetch is less than the rows returned.
*Action: Rewrite the query or change number of rows requested
How can I solve this problem?
| SQL Error when I scroll down the results | CC BY-SA 3.0 | null | 2011-03-22T07:29:25.640 | 2016-11-01T22:59:59.650 | 2016-11-01T22:59:59.650 | 4,370,109 | 447,156 | [
"sql",
"database",
"oracle"
]
|
5,388,284 | 1 | null | null | 0 | 841 | 
jpg
In that Picture i have colored one part. i have attribute called "deviceModel". It contains more than one value.. i want to take using query from my domain which ItemName() contains deviceModel attribute values more than one value.
Thanks,
Senthil Raja
| How can i query to get the multiple values in SimpleDB (AWS) | CC BY-SA 2.5 | null | 2011-03-22T07:57:51.213 | 2011-03-24T06:36:09.057 | 2011-03-24T05:32:55.963 | 429,358 | 429,358 | [
"amazon-web-services",
"amazon-simpledb"
]
|
5,388,576 | 1 | 5,389,230 | null | 2 | 2,026 | I been trying to create Win32 Application by using python (2.7) and ctypes module. Window is created and shown but title of window gets truncated. I got 'M' instead of 'My test window'. What I am doing wrong?
Thanks in advance
P.S. Here follows the code and screenshot:

```
# -*- coding: utf-8 -*-
from sys import platform, exit
from ctypes import *
from ctypes.wintypes import DWORD, HWND, HANDLE, LPCWSTR, WPARAM, LPARAM, RECT, POINT, MSG
WNDPROCTYPE = WINFUNCTYPE(c_int, HWND, c_uint, WPARAM, LPARAM)
WS_EX_APPWINDOW = 0x40000
WS_OVERLAPPEDWINDOW = 0xcf0000
WS_CAPTION = 0xc00000
SW_SHOWNORMAL = 1
SW_SHOW = 5
CS_HREDRAW = 2
CS_VREDRAW = 1
CW_USEDEFAULT = 0x80000000
WM_DESTROY = 2
WHITE_BRUSH = 0
class WNDCLASSEX(Structure):
_fields_ = [("cbSize", c_uint),
("style", c_uint),
("lpfnWndProc", WNDPROCTYPE),
("cbClsExtra", c_int),
("cbWndExtra", c_int),
("hInstance", HANDLE),
("hIcon", HANDLE),
("hCursor", HANDLE),
("hBrush", HANDLE),
("lpszMenuName", LPCWSTR),
("lpszClassName", LPCWSTR),
("hIconSm", HANDLE)]
def PyWndProcedure(hWnd, Msg, wParam, lParam):
if Msg == WM_DESTROY:
windll.user32.PostQuitMessage(0)
else:
return windll.user32.DefWindowProcA(hWnd, Msg, wParam, lParam)
return 0
WndProc = WNDPROCTYPE(PyWndProcedure)
hInst = windll.kernel32.GetModuleHandleW(0)
print(hInst)
wclassName = u'My Python Win32 Class'
wndClass = WNDCLASSEX()
wndClass.cbSize = sizeof(WNDCLASSEX)
wndClass.style = CS_HREDRAW | CS_VREDRAW
wndClass.lpfnWndProc = WndProc
wndClass.cbClsExtra = 0
wndClass.cbWndExtra = 0
wndClass.hInstance = hInst
wndClass.hIcon = 0
wndClass.hCursor = 0
wndClass.hBrush = windll.gdi32.GetStockObject(WHITE_BRUSH)
wndClass.lpszMenuName = 0
wndClass.lpszClassName = wclassName
wndClass.hIconSm = 0
print(wndClass)
regRes = windll.user32.RegisterClassExW(byref(wndClass))
print(regRes)
wname = u'My test window'
hWnd = windll.user32.CreateWindowExW(
0,
wclassName,
wname,
WS_OVERLAPPEDWINDOW | WS_CAPTION,
CW_USEDEFAULT,
CW_USEDEFAULT,
300,
300,
0,
0,
hInst,
0)
print('hWnd', hWnd)
if not hWnd:
print('Failed to create window')
exit(0)
print('ShowWindow', windll.user32.ShowWindow(hWnd, SW_SHOW))
print('UpdateWindow', windll.user32.UpdateWindow(hWnd))
msg = MSG()
lpmsg = pointer(msg)
print('Entering message loop')
while windll.user32.GetMessageA(lpmsg, 0, 0, 0) != 0:
windll.user32.TranslateMessage(lpmsg)
windll.user32.DispatchMessageA(lpmsg)
print('done.')
```
| python ctypes Win32 way window title gets truncted? | CC BY-SA 2.5 | 0 | 2011-03-22T08:34:50.570 | 2015-10-17T13:18:48.540 | null | null | 71,910 | [
"python",
"winapi",
"ctypes"
]
|
5,388,877 | 1 | 5,388,946 | null | 1 | 334 | I have an OrgChart control populates in the following form:

I have in each node Expand and Collapse functionality,
I wonder if you could help me with the steps to implement centeralization for the nods after expand or collapse them.
I would like to drag the horizontal scroll to centralize the expanded item and drag the vertical scroll to make the expanded item on the top. like the following image:
Note: I'm appreciate if I could do that with animation.

Any help!
| How to centralize a div using JQuery? | CC BY-SA 2.5 | null | 2011-03-22T09:06:23.307 | 2011-03-22T09:13:21.337 | null | null | 322,355 | [
"javascript",
"jquery"
]
|
5,388,893 | 1 | 5,480,689 | null | 38 | 46,350 | Started testing my jQuery applications with IE9. Looks like I may be in for some trouble here.
I noticed that when I return JSON data back to the Javascript methods I always get this Prompt that says: "Do you want to open or save this file?" and provides me with 3 buttons: Open, Save and Cancel. Of course, my javascript is taking actions based on the values set in the JSON object but since IE9 doesn't pass it over to the script, I cannot execute the follow up action from there on.
Anyone else facing this issue? Here is a snapshot.
| IE9 JSON Data "do you want to open or save this file" | CC BY-SA 2.5 | 0 | 2011-03-22T09:07:19.767 | 2013-04-09T19:39:27.980 | null | null | 387,014 | [
"json",
"internet-explorer-9"
]
|
5,388,976 | 1 | 5,397,001 | null | 1 | 2,898 | I've created to update data in external list:

When I execute this workflow, I get an error. I don't know what causes the error:

I've read about permissions to the Sharepoint system account. I feel like I've tried everything.
Do you have any ideas what can cause this error ? Is there any way of debugging such workflows in ? I've tried reading Sharepoint logs, but nothing interesting there.
TIA for any clues.
| Updating external list from sharepoint workflow - error | CC BY-SA 2.5 | 0 | 2011-03-22T09:16:18.663 | 2011-03-22T19:54:10.437 | null | null | 47,086 | [
"sharepoint",
"sharepoint-2010",
"workflow",
"sharepoint-designer",
"sharepoint-list"
]
|
5,389,390 | 1 | 5,389,499 | null | 5 | 5,182 | I noticed that with CSS like
```
body {
background: #f00;
}
div {
background: rgba(255,255,255,0.4);
-pie-background: rgba(255,255,255,0.4);
-moz-box-shadow: 0 0 10px rgba(0,0,0,0.4);
-webkit-box-shadow: 0 0 10px rgba(0,0,0,0.4);
box-shadow: 0 0 10px rgba(0,0,0,0.4);
padding: 50px;
behavior: url(PIE.htc);
}
```
I will get the below in FireFox & IE/PIE

is it possible to fix that? the box shadow showing through the rgba background?
| PIE CSS: rgba backgrounds + box shadows | CC BY-SA 2.5 | 0 | 2011-03-22T09:51:42.440 | 2011-11-28T17:51:12.800 | 2011-11-28T17:51:12.800 | 830,125 | 637,041 | [
"internet-explorer",
"css",
"css3pie"
]
|
5,389,710 | 1 | 5,389,819 | null | 0 | 1,221 | Inside a `h:form` I use 3 `p:spinner` components. But they are wrongly rendered at the first time. After the ajax update at form( `ajax render="@form"` ) the up and down arrows are becoming visible.
Help to find the problem. Thank you.
At the First time:

After ajax update at form level:

| PrimeFaces spinner mis rendered at the first time! | CC BY-SA 2.5 | null | 2011-03-22T10:16:31.847 | 2011-03-22T10:28:05.917 | 2011-03-22T10:28:05.917 | 620,338 | 569,497 | [
"jsf-2",
"primefaces"
]
|
5,389,946 | 1 | 5,389,977 | null | 1 | 1,217 | I am getting the following exception in my code:

I cant understand the reason for this exception...
here is my code:
{
```
import java.net.*;
import java.io.*;
class whois {
public static void main(String args[])throws Exception {
int c;
Socket s=new Socket("internic.net",43);
InputStream in=s.getInputStream();
OutputStream out=s.getOutputStream();
String str=(args.length==0 ? "webopedia.com" : args[0])+"\n";
byte buf[]=str.getBytes();
out.write(buf);
while((c=in.read())!=-1) {
System.out.print((char)c);
}
s.close();
}
}
}
```
please tell the reason for this exception.
| Connection Refused? | CC BY-SA 2.5 | 0 | 2011-03-22T10:40:05.770 | 2011-03-22T22:43:42.847 | 2011-03-22T10:43:28.657 | 105,224 | 648,138 | [
"java"
]
|
5,389,990 | 1 | 5,390,531 | null | 0 | 2,356 | Based on this Adobe multiple axis chart example: [http://livedocs.adobe.com/flex/3/html/help.html?content=charts_types_12.html](http://livedocs.adobe.com/flex/3/html/help.html?content=charts_types_12.html)
Then I changed some data values to negative and my axis became not aligned anymore.

Does anyone know how to align vertical axis? Is this another Adobe bug or there is some property that aligns axis? Thanks
```
<?xml version="1.0" encoding="utf-8"?>
<s:Application
minHeight="600"
minWidth="955"
xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx">
<fx:Script>
<![CDATA[
import mx.collections.ArrayCollection;
[Bindable] public var SMITH:ArrayCollection = new ArrayCollection([{date:"22-Aug-05", close:41.87},
{date:"23-Aug-05", close:-45.74},
{date:"24-Aug-05", close:-42.77},
{date:"25-Aug-05", close:48.06},]);
[Bindable] public var DECKER:ArrayCollection = new ArrayCollection([{date:"22-Aug-05", close:157.59},
{date:"23-Aug-05", close:-160.3},
{date:"24-Aug-05", close:-150.71},
{date:"25-Aug-05", close:156.88},]);
]]>
</fx:Script>
<mx:Panel title="Column Chart With Multiple Axes">
<mx:ColumnChart id="myChart"
showDataTips="true"
type="overlaid">
<mx:horizontalAxis>
<mx:CategoryAxis id="h1"
categoryField="date"/>
</mx:horizontalAxis>
<mx:horizontalAxisRenderers>
<mx:AxisRenderer placement="bottom"
axis="{h1}"/>
</mx:horizontalAxisRenderers>
<mx:verticalAxisRenderers>
<mx:AxisRenderer placement="left"
axis="{v1}"/>
<mx:AxisRenderer placement="left"
axis="{v2}"/>
</mx:verticalAxisRenderers>
<mx:series>
<mx:ColumnSeries id="cs1"
dataProvider="{SMITH}"
horizontalAxis="{h1}"
yField="close"
displayName="SMITH">
<mx:verticalAxis>
<mx:LinearAxis id="v1"/>
</mx:verticalAxis>
</mx:ColumnSeries>
<mx:LineSeries id="cs2"
dataProvider="{DECKER}"
horizontalAxis="{h1}"
yField="close"
displayName="DECKER">
<mx:verticalAxis>
<mx:LinearAxis id="v2"/>
</mx:verticalAxis>
</mx:LineSeries>
</mx:series>
</mx:ColumnChart>
<mx:Legend dataProvider="{myChart}"/>
</mx:Panel>
</s:Application>
```
| How to align vertical axis zero for multiple vertical axis chart | CC BY-SA 2.5 | null | 2011-03-22T10:43:58.017 | 2015-02-27T08:41:06.773 | 2015-02-27T08:41:06.773 | 3,687,447 | 99,144 | [
"apache-flex",
"charts",
"alignment"
]
|
5,390,075 | 1 | 5,390,241 | null | 2 | 1,458 | I have method which have to add customer:
```
[WebInvoke(UriTemplate = "/", Method = "POST", ResponseFormat = WebMessageFormat.Json)]
[OperationContract]
string CreateCustomer(Customer customer);
```
And i have a problem because all calls to this method fails!
The same method with working well (just return Customer object bu request id in url).
Response from wcf service:
```
Status: 400
headers = {
"Cache-Control" = private;
"Content-Length" = 2900;
"Content-Type" = "text/html";
Date = "Tue, 22 Mar 2011 12:51:09 GMT";
Server = "Microsoft-IIS/7.0";
"X-Aspnet-Version" = "4.0.30319";
"X-Powered-By" = "ASP.NET";
}
<!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>Request Error</title>
<style>BODY { color: #000000; background-color: white; font-family: Verdana; margin-left: 0px; margin-top: 0px; } #content { margin-left: 30px; font-size: .70em; padding-bottom: 2em; } A:link { color: #336699; font-weight: bold; text-decoration: underline; } A:visited { color: #6699cc; font-weight: bold; text-decoration: underline; } A:active { color: #336699; font-weight: bold; text-decoration: underline; } .heading1 { background-color: #003366; border-bottom: #336699 6px solid; color: #ffffff; font-family: Tahoma; font-size: 26px; font-weight: normal;margin: 0em 0em 10px -20px; padding-bottom: 8px; padding-left: 30px;padding-top: 16px;} pre { font-size:small; background-color: #e5e5cc; padding: 5px; font-family: Courier New; margin-top: 0px; border: 1px #f0f0e0 solid; white-space: pre-wrap; white-space: -pre-wrap; word-wrap: break-word; } table { border-collapse: collapse; border-spacing: 0px; font-family: Verdana;} table th { border-right: 2px white solid; border-bottom: 2px white solid; font-weight: bold; background-color: #cecf9c;} table td { border-right: 2px white solid; border-bottom: 2px white solid; background-color: #e5e5cc;}</style>
</head>
<body>
```
and i cannot debug method because problem occups before step in method.
I think that problem with my first argument
How to do right? And how to work with it (Parse json on server)?

```
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN""http://www.w3.org/TR/html4/strict.dtd">
<HTML><HEAD><TITLE>Bad Request</TITLE>
<META HTTP-EQUIV="Content-Type" Content="text/html; charset=us-ascii"></HEAD>
<BODY><h2>Bad Request - Invalid Header</h2>
<hr><p>HTTP Error 400. The request has an invalid header name.</p>
</BODY></HTML>
```
but i am not sure that this is the same problem like customer have!
| WCF. REST architecture. How to get object from client in JSON (POST) | CC BY-SA 2.5 | 0 | 2011-03-22T10:54:37.950 | 2011-03-22T11:28:43.647 | 2011-03-22T11:08:10.247 | 508,330 | 508,330 | [
".net",
"wcf",
"web-services",
"json",
"rest"
]
|
5,390,110 | 1 | 5,390,316 | null | 0 | 466 | I have done small application for android, when I execute the application in high resolution emulator(such as HVGA) it looks fine, I tried the same thing in my android mobile, in which I saw the pixels of the widgets are breaking at the edges, then I created one emulator using QVGA same thing happens in my emulator too, it looks like

I can't find a solution for this, any help, I'm using Android 2.2 API 8, and mobile version is 2.2.1
Thanks.
| Low resolution device compatibility | CC BY-SA 3.0 | null | 2011-03-22T10:57:44.850 | 2013-05-19T21:53:05.093 | 2012-03-08T04:38:25.420 | 618,994 | 618,994 | [
"android"
]
|
5,390,176 | 1 | 5,390,275 | null | 0 | 424 | I have an asp.net page which displays different colors..It looks something like this.

Now what i want is,when i click on any where in that form,i want to get the pixel color of that particular point. How can i do that??
| ASP.NET : Get PixelColor on mouse click on asp.net page | CC BY-SA 2.5 | 0 | 2011-03-22T11:04:13.157 | 2011-03-22T11:12:01.253 | null | null | 466,474 | [
"javascript",
"asp.net",
"vb.net",
"vbscript",
"getpixel"
]
|
5,390,302 | 1 | 5,390,487 | null | 0 | 133 | HI All,
I m working on one application in android. On the Home screen i have 6 buttons.

like this. on the buttons a have one transparent view which shows the current date.
1. I can not design the layout for the same.
2. I am not getting how to overlap two views on the same window.
3. if i make six buttons and after that if i take another layout the background layout is hiden and it is not shown at all.
This thing i know is we need two views on one view i can display 6 buttons and on anthoer view i can display date. but how?
Thanks in advance
| Android Layout obstacle | CC BY-SA 2.5 | null | 2011-03-22T11:14:54.407 | 2011-03-22T11:30:53.803 | 2011-03-22T11:27:07.907 | 488,241 | 383,597 | [
"android"
]
|
5,390,717 | 1 | 5,390,803 | null | 1 | 167 | I am having trouble linking to a secondary class in my project - I have attached 2 images which describe the problem best..
Pleas any advice - I thank you in advance.


This error was two things - thank you everybody for your help.
1) add namespace to DB file
```
namespace C_Classes
```
{
using System;
...
```
public class DB
```
2) Change Target Framework in the Project Properties and change it to ".Net Framework 4" from "...Client Profile"
| reference and class namespace | CC BY-SA 2.5 | 0 | 2011-03-22T11:49:14.047 | 2011-03-22T12:22:42.543 | 2011-03-22T12:22:42.543 | 669,174 | 669,174 | [
".net"
]
|
5,391,009 | 1 | 5,391,184 | null | 2 | 382 | I am working on a website for a client and they have an interesting requirement that I haven't been able to figure out.
Basically, one of their Post Categorys is for Videos, and they regularly post new videos in that category. Each video post has a Featured Thumbnail set.
On their video page, they would like to display thumbnails for every post in the category (thats the easy part, can be done with a custom query) - however at the top of the page, they want to have 1 full post displayed. If a user clicks on one of the thumbnails, it will display the video for that thumbnail at the top of the page, in place of whatever was already there. Does that make sense?
Here is a mockup of how the page is laid out:

So I need to use jQuery to basically load the full video at the top of the page, when a thumbnail is clicked - the full video is just a WordPress post, so its a case of "when thumbnail id x is clicked, display corrosponding post in div id="full-video"
Any ideas how to do this?
Thanks so much
Zach
| WordPress / jQuery - Video Category Showcase with jQuery | CC BY-SA 2.5 | null | 2011-03-22T12:13:55.560 | 2015-06-29T17:41:50.287 | null | null | 628,770 | [
"jquery",
"wordpress"
]
|
5,391,018 | 1 | 5,391,043 | null | 4 | 4,755 | Hi all i am working on new app from the beginning.upto now i am using nslog function call to display the output on the gdb.but from the some samples providing me the gdb display with the class and method names.i posted some screenshot for that.can any one guide me to take method name and display name while using nslog().

please provide me some information.Thanks in advance.
| how to display method name and the class name in gdb | CC BY-SA 2.5 | 0 | 2011-03-22T12:14:36.973 | 2012-07-02T11:04:01.040 | 2011-03-23T04:50:53.850 | 481,455 | 481,455 | [
"objective-c",
"ipad",
"nslog"
]
|
5,391,055 | 1 | 5,747,293 | null | 1 | 2,766 | I have a dynamic forms with checkbox/radio-button lists & matrices:

Following code renders checkbox list:
```
@foreach (var sq in Model.SubQuestions)
{
<label>
<input type="hidden" name="answerResult.index" value="@sq.Id" />
<input type="checkbox" name="answerResult[@sq.Id].SubQuestionId" value="@sq.Id" />
@sq.Label.Name
</label>
}
```
radio-button list:
```
<input type="hidden" name="answerResult.index" value="@Model.Id" />
@foreach (var sq in Model.SubQuestions)
{
<label>
<input type="radio" name="answerResult[@Model.Id].SubQuestionId" value="@sq.Id" />
@sq.Label.Name
</label>
}
```
My POST-action in controller:
```
[HttpPost]
public ActionResult PassageSurvey(int surveyId, int surveyPageIndex, IList<AnswerResult> answerResult)
```
where `IList<AnswerResult>` is an auto-bound collection from my form. I get only items that were checked/selected. Everything is going well.
Now I need to get the same collection from checkbox/radio-button matrices.

Radio-button matrix:
```
<table width="100%">
<tr>
<th></th>
@foreach (var av in Model.AnswerVariants)
{
<th style="text-align: center;">
<label>@av.Label.Name</label>
</th>
}
</tr>
@foreach (var sq in Model.SubQuestions)
{
<tr>
<td>
<label>@sq.Label.Name</label>
<input type="hidden" name="answerResult.index" value="@sq.Id" />
<input type="hidden" name="answerResult[@sq.Id].SubQuestionId" value="@sq.Id" />
</td>
@foreach (var av in Model.AnswerVariants)
{
<td align="center">
<input type="radio" name="answerResult[@sq.Id].AnswerVariantId" value="@av.Id" />
</td>
}
</tr>
}
</table>
```
Checkbox matrix:
```
<table width="100%">
<tr>
<th></th>
@foreach (var av in Model.AnswerVariants)
{
<th style="text-align: center;">
<label>@av.Label.Name</label>
</th>
}
</tr>
@foreach (var sq in Model.SubQuestions)
{
<tr>
<td>
<label>@sq.Label.Name</label>
</td>
@foreach (var av in Model.AnswerVariants)
{
<td align="center">
<input type="hidden" name="answerResult.index" value="@sq.Id" />
<input type="hidden" name="answerResult[@sq.Id].AnswerVariantId" value="@sq.Id" />
<input type="checkbox" name="answerResult[@sq.Id].SubQuestionId" value="@sq.Id" />
</td>
}
</tr>
}
</table>
```
POST-action in controller always the same.
Now from radio-button matrix (in current sample 3x3) `IList<AnswerResult>` gets always 3 items, depending on items that were selected in rows and columns.
But from Checkbox matrix (3x3) `IList<AnswerResult>` gets always all 9 items (regardless items were checked, hidden-inputs always have values)
How could I change my checkbox-matrix template to solve this problem?
| asp.net mvc checkbox/radiobutton matrix model-binding | CC BY-SA 3.0 | 0 | 2011-03-22T12:17:18.417 | 2014-05-08T00:52:42.647 | 2014-05-08T00:52:42.647 | 476,786 | 662,368 | [
"asp.net-mvc",
"checkbox",
"model-binding"
]
|
5,391,747 | 1 | 5,401,317 | null | 1 | 1,373 | All,
Am trying to get Node.js to work on Vista machine.
I installed Cygwin (as per the Github instructions) which appears to have been installed correctly. However, none of the commands are executing.
Are there any tutorials for the stages after the Cygwin installation?
PROBLEM: When any command is executed, I get 'Bash: command not found' error.
Not even command like 'c:\cygwin\bin' is executing.
When I type 'user' in cygwin command prompt, I get 'ntvdm has encountered an system error. Parameter incorrect'.
I thought the above error may be due to the firewall, disabling the firewall did not have any effect, running the program with admin rights also did not change the results...
Am confused and would love to get some guidance on what steps to go with next on getting Node.js up and running on a Windows Vista machine.
Many thanks,
:
We managed to make a bit more progress. It appears that we had not installed all the relevant files related to Cygwin. Upon re-download and reinstalled, it ran well, however, we have driven into another error. Error we get:

[How to compile/install node.js(could not configure a cxx compiler!) (Ubuntu).](https://stackoverflow.com/questions/3329355/node-js-could-not-configure-a-cxx-compiler)
We followed the instructions as per the above thread (3rd post from top for Windows machines), however, we are still stuck at the same error.
Any guidance please?
| Node.js - tutorials on getting it to work with Cygwin on a Vista machine | CC BY-SA 2.5 | 0 | 2011-03-22T13:09:13.397 | 2011-04-19T03:35:54.873 | 2017-05-23T10:32:36.133 | -1 | 434,697 | [
"windows",
"node.js",
"cygwin"
]
|
5,392,011 | 1 | 5,392,043 | null | 0 | 821 | ```
_sponsorOrBankFacingBorrowerCompanyWizardData = CompanyData.GetCompanyWizardData(SponsorOrBankFacingBorrowerCompany.CompanyID);
```
So the problem here is that the code tries to go into this statement no matter what, I want it to only go if it CAN go, obviously.
However, if I perform a watch in Visual Studio 2010 ONLY on this object `SponsorOrBankFacingBorrowerCompany`, no properties, methods, anything, I get a null reference exception.
How do I check for null when I get an exception before the check even happens?
Here's the watch:

EDIT:
```
public STPProject STPData
{
get { return _STPData; }
set
{
_STPData = value;
//set WebIds
foreach (STPCompany comp in _STPData.STPCompanyCollection)
{
comp.WebId = comp.WebId < 1 ? GetNextWebId() : comp.WebId;
foreach (STPContact cont in comp.STPContactCollection)
{
cont.WebId = cont.WebId < 1 ? GetNextWebId() : cont.WebId;
}
}
//must be before AttachSTPEvents
_STPData.AffiliateTradeIndicator = _STPData.AffiliateTradeIndicator.HasValue ? _STPData.AffiliateTradeIndicator.Value : false;
//set company wizard defaults
_sponsorOrBankFacingBorrowerCompanyWizardData = CompanyData.GetCompanyWizardData(SponsorOrBankFacingBorrowerCompany.CompanyID);
AttachSTPEvents(_STPData);
}
}
```
Getter for other that is throwing exception:
```
public STPCompany SponsorOrBankFacingBorrowerCompany
{
get
{
if (STPData.AffiliateTradeIndicator.Value)
{
return BankFacingBorrower;
}
else
{
return Sponsor;
}
}
}
```
| Need to check for null on something that throws exception | CC BY-SA 2.5 | null | 2011-03-22T13:27:22.387 | 2011-03-22T13:53:09.867 | 2011-03-22T13:41:37.080 | 534,101 | 534,101 | [
"c#",
".net",
"nullreferenceexception"
]
|
5,392,061 | 1 | 5,392,276 | null | 92 | 45,350 | I'm looking for an algorithm that compares two RGB colors and generates a value of their similarity (where similarity means "similar with respect to average human perception").
Any ideas?
:
Since I cannot answer anymore I decided to put my "solution" as an edit to the question.
I decided to go with a (very) small subset of true-color in my app, so that I can handle comparison of colors by my own. I work with about 30 colors and use hard-coded distances between them.
Since it was an iPhone app I worked with objective-C and the implementation is more or less a matrix representing the table below, which shows the distances between the colors.

| Algorithm to check similarity of colors | CC BY-SA 3.0 | 0 | 2011-03-22T13:31:02.503 | 2021-02-03T01:58:11.800 | 2016-04-30T12:00:37.370 | 815,724 | 2,660,952 | [
"algorithm",
"colors",
"comparison",
"rgb"
]
|
5,392,371 | 1 | 5,392,686 | null | 0 | 137 | i want to sort my table in this manner.
This is the current state of my table:

And this would be the outcome:

So basically in pseudo code it's:
```
IF SAME STRING IN "tag" COLUMN THEN add both "power"
```
Can anyone suggest an efficient way to achieve this if any?
| efficent truncate method in mysql? | CC BY-SA 2.5 | null | 2011-03-22T13:54:25.530 | 2011-03-22T14:39:27.230 | null | null | 537,943 | [
"php",
"mysql"
]
|
5,392,423 | 1 | 5,392,609 | null | 2 | 2,352 | I want to design a webpage as shown in the image below. There are three panels (1,2,3). If I click on the teams (panel 1) then, the panel 2 and 3a will get filled. If I then click on a particular group (G1) then panel 3b will get populated. If I then click on particular animal (A1) then panel 3c will get filled up. The data is being obtained from Oracle database am using PHP.
I am new to AJAX. Can you please let me know the best and efficient way to do this?
Thank you
San

| AJAX function to display dynamic data in same page | CC BY-SA 2.5 | null | 2011-03-22T13:58:20.710 | 2011-03-22T14:13:10.727 | null | null | 602,599 | [
"php",
"javascript",
"ajax"
]
|
5,392,663 | 1 | 5,531,668 | null | 10 | 669 | How do I change the fonts used in the SQL Statement?
As you see here, the alignment of the Query is wrong, so I want to set this box so it uses a [monospaced font](http://en.wikipedia.org/wiki/Monospaced_font) like "Consolas" or "Courier New".

I think I need to change something in :

But I cannot find which setting/display item I need to select to change it. There's one named "Query and View Designer" but it (only) changes the font when you use the Query builder by clicking the "Query builder" button.
How do I do this? Do I need to change a setting somewhere else?
| How to use a monospaced font in the TableAdapter Configuration Wizard's SQL Statement? | CC BY-SA 2.5 | 0 | 2011-03-22T14:16:26.340 | 2011-04-03T18:44:56.283 | 2011-03-30T15:55:28.687 | 143,804 | 275,404 | [
"visual-studio",
"visual-studio-2010",
"settings"
]
|
5,392,709 | 1 | null | null | 18 | 1,053 | This question was originally a homework assignment I had, but my answer was wrong, and I'm curious what is the best solution for this problem.
The goal is to compute key aspects of the "Recommender System bootstrapping algorithm" using 4 map reduce steps. My problem is with the 3rd step, so I'll bring only its details.
> records of the form:
1. (population id, item, number of
rating users, sum of ratings, sum of
ratings squared) 2. (population
id, splitter item, likers/dislikers,
item, number of rating users, sum of
ratings, sum of ratings squared)
The 2nd form is pretty much like the 1st form, but a record for each (splitter,likers/dislikers) - where likers/dislikers is a boolean.
This means (I think) there are 2^|items| records of the seconds form for each record from the 1st form... (many classmates made the wrong (again, I think..) assumption that there are the same amount of 1st and 2nd form records)
> This step will compute, per splitter movie, the squared error (SE) induced by each movie.
-
> assume that there exists a string that
precedes (in the system’s sort order)
any splitter movie id.
This must be done within one mapreduce step!
This was learned at the context of "The Netflix Challange"
SE definition:

additional material concerning the problem [some description on the netflix challenge and mathematical information about the problem ] can be found in [this link](http://webcourse.cs.technion.ac.il/236621/Winter2010-2011/ho/WCFiles/lec14-longtail-recsys.pdf) [slides 12-24 especially]
note that since we are using map/reduce, we cannot assume anything about the ORDER records will be processed [in both map and reduce].
| compute bootstrapping algorithm using Map/Reduce | CC BY-SA 3.0 | 0 | 2011-03-22T14:19:57.467 | 2012-09-15T22:55:53.747 | 2012-09-15T22:55:53.747 | 387,076 | 572,670 | [
"algorithm",
"mapreduce"
]
|
5,392,721 | 1 | 5,392,753 | null | 1 | 93 | can anyone help me with this it doesnt seem to insert anything?
```
{
string theUserId = Session["UserID"].ToString();
OdbcConnection cn = new OdbcConnection("Driver={MySQL ODBC 3.51 Driver}; Server=localhost; Database=gymwebsite; User=x; Password=x;");
cn.Open();
try
{
OdbcCommand cmd = new OdbcCommand("INSERT INTO WallPostings (UserID, Wallpostings) VALUES (" + theUserId + ", '" + Table1 + "')", cn);
cmd.ExecuteNonQuery();
}
catch (Exception ex)
{
Label1.Text = ex.Message;
}
cn.Close();
}
```
}
```
-- -----------------------------------------------------
-- Table `gymwebsite`.`User`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `gymwebsite`.`User` (
`UserID` INT NOT NULL AUTO_INCREMENT ,
`Email` VARCHAR(245) NULL ,
`FirstName` VARCHAR(45) NULL ,
`SecondName` VARCHAR(45) NULL ,
`DOB` VARCHAR(15) NULL ,
`Location` VARCHAR(45) NULL ,
`Aboutme` VARCHAR(245) NULL ,
`username` VARCHAR(45) NULL ,
`password` VARCHAR(45) NULL ,
PRIMARY KEY (`UserID`) )
ENGINE = InnoDB;
-- -----------------------------------------------------
-- Table `gymwebsite`.`Pictures`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `gymwebsite`.`Pictures` (
`UserID` INT NOT NULL ,
`picturepath` VARCHAR(245) NULL ,
PRIMARY KEY (`UserID`) ,
INDEX `fk_Pictures_Userinfo1` (`UserID` ASC) ,
CONSTRAINT `fk_Pictures_Userinfo1`
FOREIGN KEY (`UserID` )
REFERENCES `gymwebsite`.`User` (`UserID` )
ON DELETE NO ACTION
ON UPDATE NO ACTION)
ENGINE = InnoDB;
-- -----------------------------------------------------
-- Table `gymwebsite`.`WallPostings`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `gymwebsite`.`WallPostings` (
`UserID` INT NOT NULL ,
`Wallpostings` MEDIUMTEXT NULL ,
PRIMARY KEY (`UserID`) ,
INDEX `fk_WallPostings_Userinfo1` (`UserID` ASC) ,
CONSTRAINT `fk_WallPostings_Userinfo1`
FOREIGN KEY (`UserID` )
REFERENCES `gymwebsite`.`User` (`UserID` )
ON DELETE NO ACTION
ON UPDATE NO ACTION)
ENGINE = InnoDB;
```

| sqlsntax and odbc code wont insert? | CC BY-SA 2.5 | null | 2011-03-22T14:20:57.300 | 2013-01-16T14:41:10.183 | 2011-03-22T15:35:28.183 | 477,228 | 477,228 | [
"c#",
"asp.net",
"mysql",
"sql"
]
|
5,392,778 | 1 | null | null | 0 | 100 | I know how to use Facebook Open Graph to create a wall post on any chosen member, however, I don't know how some applications post something like this:

The 'description' parameter contains 3 different urls. At first I thought they were posting HTML into the 'description' but it turned out Facebook blocks them in the first place.
Is there some hidden undocumented features of the Facebook API they are using? May be the old API had this but the new Open Graph doesnt?
The facebook app:
[http://www.facebook.com/apps/application.php?id=20678178440](http://www.facebook.com/apps/application.php?id=20678178440)
Facebook Post entity:
[http://developers.facebook.com/docs/reference/api/post/](http://developers.facebook.com/docs/reference/api/post/)
| How do I post to Facebook a group of Links? | CC BY-SA 2.5 | null | 2011-03-22T14:25:41.077 | 2011-03-22T18:13:20.343 | 2011-03-22T18:13:20.343 | 80,434 | 80,434 | [
"facebook",
"facebook-opengraph",
"facebook-graph-api"
]
|
5,392,845 | 1 | 5,398,402 | null | 0 | 389 | When I want to connect my Oracle database server in Visual Studio 2010, 1 hour ago there is no error but now I'm getting this error.

My web.config has a connection string:
```
<add name="ora" connectionString="Data Source=SCN;User id=********;Password=**********" providerName="System.Data.OracleClient" />
```
My ;
```
SCN=
(DESCRIPTION=
(ADDRESS=
(PROTOCOL=TCP)
(HOST=10.10.10.18)
(PORT=1521)
)
(CONNECT_DATA=
(SID=SCN)
)
)
```
I'm getting this strange error.

How can i solve this problem?
| cannot connect to Oracle database server; error regarding SQL Server | CC BY-SA 2.5 | null | 2011-03-22T14:30:52.870 | 2011-03-22T22:01:23.643 | 2011-03-22T21:56:44.377 | 23,199 | 447,156 | [
".net",
"oracle",
"visual-studio-2010",
"connection-string"
]
|
5,392,956 | 1 | 5,393,056 | null | 3 | 4,439 | How do I draw a circular gradient [like this](http://psfreak.com/images/tutorials/elegant-navigation-box/back.jpg) in vb.net?

| How do I draw a circular gradient? | CC BY-SA 2.5 | 0 | 2011-03-22T14:38:37.180 | 2021-01-03T16:04:52.647 | 2011-03-22T15:02:11.707 | 47,550 | 500,819 | [
"vb.net",
"winforms",
"gdi+"
]
|
5,393,205 | 1 | 5,394,564 | null | 0 | 1,085 | I'm trying to generate a piecewise periodic plot using Numpy and matplotlib, like this:
```
import numpy as np
import matplotlib.pyplot as plt
Q1 = lambda t, f, Q_max: Q_max * np.sin(2 * np.pi *f * t)
Q2 = lambda t, f, Q_max: 0
def Q_true(t, f, stat):
while(t >= 1/f):
t -= 1/f
while(t < 0):
t += 1/f
return ((t <= 1/(2*f)) == stat)
Q = lambda t, f, Q_max: np.piecewise(t, [Q_true(t, f, True) , Q_true(t,f, False)], [Q1, Q2], f, Q_max)
Q_max = 225 # mL/sec
f = 1.25 # Hz
t = np.linspace(0,4,101) # secs
plt.plot(t, Q(t, f, Q_max))
```
The problem is that `Q_true` is receiving the entire `t` array instead of individual points. This isn't an issue if I just use less than/greater than statements in the `numpy.piecewise` condlist, but it's much easier to determine whether it's true or false using `Q_true`.
The plot should look something like this:

Any ideas?
Thanks!
| Condition checking when using numpy.piecewise to generate a piecewise periodic plot | CC BY-SA 2.5 | null | 2011-03-22T14:59:13.117 | 2012-04-29T16:33:25.927 | 2012-04-29T16:33:25.927 | 4,228 | 99,005 | [
"python",
"numpy",
"matplotlib",
"piecewise"
]
|
5,393,485 | 1 | 5,393,504 | null | 40 | 7,052 | I've got a Windows Phone Silverlight app, and there are some numbers to the right when I run the emulator:

What do they mean, and how can I hide them?
| What are these numbers on the right side of my Windows Phone Silverlight app? | CC BY-SA 2.5 | 0 | 2011-03-22T15:19:32.577 | 2011-03-22T15:21:06.057 | null | null | 164,506 | [
"silverlight",
"windows-phone-7"
]
|
5,393,666 | 1 | 5,393,712 | null | 5 | 1,504 | I would like to have a seperate form that shows "along" with my main form, so it does not overlap the main form.
Here's an example: 
Notice how the main program, overlaps the log? I can't figure out how to do that in Delphi.
Thanks!
| Make 2 forms able to overlap each other? | CC BY-SA 2.5 | null | 2011-03-22T15:30:48.950 | 2011-03-22T19:57:50.290 | null | null | 561,545 | [
"delphi",
"forms",
"vcl",
"tform"
]
|
5,393,930 | 1 | 5,441,230 | null | 1 | 855 | I am reading how to implement facebook into my iOS SDK from the facebook developer website: [http://developers.facebook.com/docs/guides/mobile/#ios](http://developers.facebook.com/docs/guides/mobile/#ios), but the setup is based on a view-based application. First of all I tried their example using a View-Based application as well and after implementing their code, I debug and ran the project in iOS Simulator and it's giving me an error saying:
On debug under
```
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
```

So I have no clue what's going on here, so I hope someone can help me with this error: 1 thing I might point out, I don't know if creating the instance variable 'Facebook' in the header `Facebook *facebook` should be the name of one of my UIVewController subclass, so I dont really know. In addition, should my facebook application run in a UIWebView in Interface Builder?
Also my project is based on a tab bar application. So on my 3rd Tab Bar item, I have like 3 buttons all opening a new view that each have a WebView, and one of my buttons are the facebook application that will open.
Please let me know if it's not clear, thanks again!
| Implementing Facebook into a Tab Bar Application Xcode Project | CC BY-SA 2.5 | null | 2011-03-22T15:50:36.250 | 2011-04-06T10:00:33.140 | 2011-03-22T17:25:29.173 | 348,476 | 616,482 | [
"iphone",
"objective-c",
"xcode",
"facebook"
]
|
5,393,966 | 1 | 5,394,034 | null | 3 | 1,723 | I am trying to implement Google Adwords with a website that has been developed using CodeIgniter, I believe it requires a "200" status code when they add a GET variable to the URL.
I've been getting emails from Google saying that it's receiving a 404 status code when it goes to my URL. When I try to add ?test=test to the end of my URL it does in fact return a 404:

Through my google searches, I have found this useful link:
[http://codeigniter.com/forums/viewthread/154153/#746115](http://codeigniter.com/forums/viewthread/154153/#746115)
Which states I need to change my config to include these:
```
$config['uri_protocol'] = "PATH_INFO";
$config['enable_query_strings'] = TRUE;
```
Before my uri_protocol was set to "REQUEST_URI". I have tested with ?test=test and it does work! But now all my links are not working, when I switch it to PATH_INFO, what do I need to do to fix my links?
Right now I am using Mod Rewrite to shorten the URLs so that the addresses are like mydomain.com/blog, mydomain.com/about, and my controller just points to the appropriate view. Should I not change my uri_protocol, if so how can I include a GET variable and NOT get a 404?
Any advice would help thank you!
UDPATE: Here's my htaccess file:
```
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /index.php?/$1 [L]
```
| Google Adwords and CodeIgniter GET Variable Callback URL | CC BY-SA 2.5 | 0 | 2011-03-22T15:52:44.547 | 2013-12-16T21:52:22.700 | 2013-12-16T21:52:22.700 | 881,229 | 242,934 | [
"codeigniter",
"get",
"google-ads-api"
]
|
5,394,264 | 1 | 5,394,365 | null | 6 | 14,718 | I am new to html and css.
I have 3 sets of radio buttons. Each set of buttons is displayed in a singe line. I would like the buttons to align vertically between sets of buttons. I am having trouble accomplishing this with css. I would like to avoid using tables to solve this problem. I figured I could get the radio buttons aligned by setting the width of their labels, but it doesn't work.
My radio buttons display like this:

I want them to display like this:

Here's my css:
```
form.remit_change_form label.fixedwidth {
display: block;
width: 180px;
float: left;
}
form.remit_change_form input.radiolabel {
width: 35px /* doesn't make any visual change! */
}
```
Here's my html:
```
<div>
<label for="tran_code" class="fixedwidth">Tran Code</label>
<input type="radio" class="radioinput" name="tran_code" id="tran_code_22"
value="22"/>
<label for="tran_code_22" class="radiolabel">22</label>
<input type="radio" class="radioinput" name="tran_code" id="tran_code_42"
value="42"/>
<label for="tran_code_42" class="radiolabel">42</label>
<input type="radio" class="radioinput" name="tran_code" id="tran_code_52"
value="52"/>
<label for="tran_code_52" class="radiolabel">52</label>
<input type="radio" class="radioinput" name="tran_code" id="tran_code_na"
value="NA"/>
<label for="tran_code_na" class="radiolabel">NA</label>
</div>
<div>
<label for="cut_off_time" class="fixedwidth">Cut-off Time</label>
<input type="radio" class="radioinput" name="cut_off_time" id="cut_off_time_18.00"
value="18.00"/>
<label for="cut_off_time_18.00" class="radiolabel">18.00</label>
<input type="radio" class="radioinput" name="cut_off_time" id="cut_off_time_19.00"
value="19.00"/>
<label for="cut_off_time_19.00" class="radiolabel">19.00</label>
<input type="radio" class="radioinput" name="cut_off_time" id="cut_off_time_na"
value="NA"/>
<label for="cut_off_time_na" class="radiolabel">NA</label>
</div>
<div>
<label for="remit_notify_method" class="fixedwidth">Remit Notify Method</label>
<input type="radio" class="radioinput" name="remit_notify_method"
id="remit_notify_method_n" value="N"/>
<label for="remit_notify_method_n" class="radiolabel">N</label>
<input type="radio" class="radioinput" name="remit_notify_method"
id="remit_notify_method_f" value="F"/>
<label for="remit_notify_method_f" class="radiolabel">F</label>
<input type="radio" class="radioinput" name="remit_notify_method"
id="remit_notify_method_e" value="E"/>
<label for="remit_notify_method_e" class="radiolabel">E</label>
</div>
```
| How do I vertically align sets of radio buttons? | CC BY-SA 2.5 | 0 | 2011-03-22T16:09:23.103 | 2012-08-30T18:01:41.400 | null | null | 1,322,401 | [
"html",
"css"
]
|
5,394,632 | 1 | null | null | 1 | 5,529 | I asked a [previous question](https://stackoverflow.com/questions/4655577/how-to-create-subdomains-for-iis7-programmatically) about how to have multiple subdomains all pointing at the same site; the answer I accepted there was to use URL Rewrite.
Cool. But for the life of me I cannot figure out how URL Rewrite works, and I consider myself a relatively smart guy. |-) Lots of questions...
- `customer1.mydomain.com``cooldude.mydomain.com``(.+)\.mydomain\.com``customers.mydomain.com``mydomain.com/thing.aspx?id=123``mydomain.com/thing/123`

- `customers.mydomain.com`
| How to set up URL Rewrite on IIS7 so that multiple subdomains redirect to the correct web site? | CC BY-SA 2.5 | 0 | 2011-03-22T16:34:30.913 | 2021-03-16T20:42:32.913 | 2017-05-23T12:13:26.330 | -1 | 7,850 | [
"asp.net",
"iis-7",
"url-rewriting"
]
|
5,394,761 | 1 | null | null | 17 | 7,997 | I'm debugging a C++ application with VS2008 and with some long select queries I'm not able to see the full text in the debugger. It just shows a part of the query.
Is there a way to see the full text?
Thanks in advance.

EDIT: The real query available at the string is:
```
select c.cd_seq, m.diag_code, m.diag_descr, 'S' as source
from custom_booking_data c
left outer join meddiagnosis m
on c.cd_number_value = convert( decimal( 28, 8 ), m.diag_urn )
where c.custom_data_urn = 4 and c.cd_field = 433
union
select c.cd_seq, m.diag_code, m.diag_descr, 'H' as source
from custom_booking_data c
left outer join ordiagnosis m
on c.cd_number_value = convert( decimal( 28, 8 ), m.diag_urn )
where c.custom_data_urn = 4 and c.cd_field = 594
```
Not that long if you ask me.
| Why strings are shown partially in the Visual Studio 2008 debugger? | CC BY-SA 2.5 | 0 | 2011-03-22T16:43:27.610 | 2018-02-15T15:32:52.520 | 2011-03-22T17:00:21.177 | 166,452 | 166,452 | [
"visual-studio-2008",
"string",
"debugging"
]
|
5,395,030 | 1 | 5,649,549 | null | 6 | 1,627 | Disclaimer: I have read everything that I can read on the topic of snapshots and versioning on both stack overflow and on internet. My requirement is not version tracking for audit trail or the database-level snapshots. I have spent more than 1 week to research on my own and to think through the possible options. Sorry, I could have missed some links - if the solution to my problem is already discussed in some other thread, please point me there.
It is a bit long; please bear with me.
Here is the situation: We are trying to create a generic design to store snapshots of the transactional data in our transactional database and also to keep a revision history of reference data.
As part of the business process, a user can press a button to publish certain object. For the purpose of illustration, let us say that the user can publish a proposal from the vendor before negotiation starts. Then, at different points in time through the negotiation process, the user can publish the proposal data. The proposal contains a budget, sales targets and many other items. When a proposal is snapshotted, all the linked entities have to be snapshotted. Finally, after the negotiation, a contract is signed. At this point, a complete snapshot of the contract has to be created. Not all the entities in the contract are there in the proposal – there are lot of overlapping entities, but there are unique entities attached to proposal and contract.
We have to keep both these published versions and the latest active versions available. Published versions are made available on a website to be referenced by both vendors as well the management team. Not all published versions are made available on the website, but the last published proposal and latest published contract are always available in the website. This website also has to be populated from the same database.
Also, a finance user can decide to snapshot only the budget alone and a sales manager can snapshot the sales targets. So, snapshots are available at multiple granularities.
We also have a requirement to track versions of the master data. It is a business requirement to track all the changes to key master data columns over time. For example, we have region information associated with the sales targets. The name of the region can change and we want to track these changes. Let us assume that at the time of proposal, the region’s name is R1 and a snapshot is created. Then, the name of the region changes to R2 and then 2 other snapshots are created. We want to able to link the sales targets to the correct region name at those points in time, not necessarily to the latest region name.
We have some flexibility in modelling as we have both a transaction DB and a data warehouse DB and we can decide to store some of this information either in the transaction DB or in the data warehouse DB.
Here is our design. We have a Publication table which captures basic information about the published data – who published and the date, the reason, and the type of object published (proposal or budget or sales targets).
We store the snapshots in the same table as the original data. So, proposal snapshots would be stored with live proposals in the proposals table. We have a column called Publication ID in every table which has to be published. This column is a FK to the Publication table. If the Publication ID is null, that record is the active version.
I realized that the post is very lengthy. Hence, rather than listing the scenario details, I thought of quickly summarizing the design considerations in a mind map.

Now there are 2 solutions that we are leaning towards - both would store a snapshot of all the data whether it has changed or not. Maintaining only the delta while keeping table structures intact would necessitate a very complex stored procedure which has to run on every insert/update of any of the snapshotted object. I do not want to go down this route as this would take longer and the volumes are not that huge anyway.
Solution 1: Each time, an object is published (like proposal or budget), we would populate an XML tree and persist this in the database. Only the latest version need to be available in website and old versions are rarely needed. Given this, would I run into big performance issue due to using XML? We use SQL Server. The data volumes are that not huge.
Solution 2: All the transaction tables would have a publication ID and the reference data would have start and end dates. Whenever an object is published, we would make a copy of all transaction records and put the publication ID there and we would copy all of reference data records and put a snapshot date as the end date. This would allow us to have normal versioning for reference data outside of the publication process.
I would need opinions from experienced minds here as to the drawbacks of these 2 approaches and whether there is any other better scenario.
| Design of snapshots in a transactional database along with versioning of reference data | CC BY-SA 2.5 | 0 | 2011-03-22T17:03:16.080 | 2016-07-20T19:44:46.267 | 2016-07-20T19:44:46.267 | 3,195,477 | 669,605 | [
"database-design",
"database-replication",
"static-data",
"transactional-database"
]
|
5,395,104 | 1 | 5,395,461 | null | 0 | 179 | I have several problems: And im really getting stuck here.
Ok first problem is with my jquery bound to my button. The function works but when its bound to my asp control button (Button1) I cant for some reason use the code behind to update mysql.
```
<script type="text/javascript">
$(function () {
$('[name*= "Button2"]').click(function () {
var x = $('[name*= "TextBox1"]').val();
var newdiv = $("<div></div>").html(x).attr('id', 'test');
$('#test1').append(newdiv);
$('[name*= "Table1"]').text($('#test1').html());
$('[name*= "TextBox1"]').val('');
return false;
});
});
</script>
<p>
<asp:TextBox ID="TextBox1" name="TextBox1" runat="server" Rows="3"
Height="47px" Width="638px"></asp:TextBox>
</p>
<p>
<asp:Button ID="Button1" runat="server" Text="Post Message" Width="98px"
onclick="Button1_Click" />
<asp:Button ID="Button2" runat="server" onclick="Button2_Click" Text="Button" />
</p>
<p>
<asp:Table ID="Table1" name="Table1" runat="server" Width="488px"></asp:Table>
</p>
<div id="test1"></div>
</asp:Content>
```
I tryed solving this by taking out `return false;` this worked in that it did save to the database as the userid was there but Wallpostings had an empty field. This is due to the page reloading when I click my asp button which is in turn due to the java/jquery. If I keep return false I get nothing in my sql.
```
{
string theUserId = Session["UserID"].ToString();
OdbcConnection cn = new OdbcConnection("Driver={MySQL ODBC 3.51 Driver}; Server=localhost; Database=gymwebsite; User=root; Password=commando;");
cn.Open();
OdbcCommand cmd = new OdbcCommand("INSERT INTO WallPosting (UserID, Wallpostings) VALUES ("+theUserId+", '" + TextBox1.Text + "')", cn);
cmd.ExecuteNonQuery();
}
}
```
Using this code I can insert into my database but when I try to insert again if I want to add another comment on my wall post I get an error: Duplicate entry '1' for key 'PRIMARY'
so I think I need to use update but I dont know how to do an Update for mysql or sql syntax? It also says when I create the schema that on update no action (not sure if this is the same thing) see below for script)
Also does update do the same thing as insert if there is nothing there to begin with? And if I update how do I add the data sequentialy (not sure thats the correct word) i.e if I have apples already in my Wallpostings and I update something new in my textbox like oranges how do I get it to layout like this:
```
(Wallposting Table)
| UserID | Wallpostings |
....1........Oranges
.............Apples
```
Ignore the dots (just for spacing)

```
SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0;
SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0;
SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='TRADITIONAL';
CREATE SCHEMA IF NOT EXISTS `gymwebsite` DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci ;
USE `gymwebsite` ;
-- -----------------------------------------------------
-- Table `gymwebsite`.`User`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `gymwebsite`.`User` (
`UserID` INT NOT NULL AUTO_INCREMENT ,
`Email` VARCHAR(245) NULL ,
`FirstName` VARCHAR(45) NULL ,
`SecondName` VARCHAR(45) NULL ,
`DOB` VARCHAR(15) NULL ,
`Location` VARCHAR(45) NULL ,
`Aboutme` VARCHAR(245) NULL ,
`username` VARCHAR(45) NULL ,
`password` VARCHAR(45) NULL ,
PRIMARY KEY (`UserID`) )
ENGINE = InnoDB;
-- -----------------------------------------------------
-- Table `gymwebsite`.`Pictures`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `gymwebsite`.`Pictures` (
`UserID` INT NOT NULL ,
`picturepath` VARCHAR(245) NULL ,
PRIMARY KEY (`UserID`) ,
INDEX `fk_Pictures_Userinfo1` (`UserID` ASC) ,
CONSTRAINT `fk_Pictures_Userinfo1`
FOREIGN KEY (`UserID` )
REFERENCES `gymwebsite`.`User` (`UserID` )
ON DELETE NO ACTION
ON UPDATE NO ACTION)
ENGINE = InnoDB;
-- -----------------------------------------------------
-- Table `gymwebsite`.`WallPosting`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `gymwebsite`.`WallPosting` (
`UserID` INT NOT NULL AUTO_INCREMENT ,
`Wallpostings` VARCHAR(2500) NULL ,
INDEX `fk_WallPostings_Userinfo1` (`UserID` ASC) ,
PRIMARY KEY (`UserID`) ,
CONSTRAINT `fk_WallPostings_Userinfo1`
FOREIGN KEY (`UserID` )
REFERENCES `gymwebsite`.`User` (`UserID` )
ON DELETE NO ACTION
ON UPDATE NO ACTION)
ENGINE = InnoDB;
-- -----------------------------------------------------
-- Table `gymwebsite`.`DietPlan`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `gymwebsite`.`DietPlan` (
`UserID` INT NOT NULL ,
PRIMARY KEY (`UserID`) ,
INDEX `fk_DietPlan_Userinfo1` (`UserID` ASC) ,
CONSTRAINT `fk_DietPlan_Userinfo1`
FOREIGN KEY (`UserID` )
REFERENCES `gymwebsite`.`User` (`UserID` )
ON DELETE NO ACTION
ON UPDATE NO ACTION)
ENGINE = InnoDB;
-- -----------------------------------------------------
-- Table `gymwebsite`.`WorkoutPlan`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `gymwebsite`.`WorkoutPlan` (
`UserID` INT NOT NULL ,
PRIMARY KEY (`UserID`) ,
INDEX `fk_WorkoutPlan_Userinfo1` (`UserID` ASC) ,
CONSTRAINT `fk_WorkoutPlan_Userinfo1`
FOREIGN KEY (`UserID` )
REFERENCES `gymwebsite`.`User` (`UserID` )
ON DELETE NO ACTION
ON UPDATE NO ACTION)
ENGINE = InnoDB;
-- -----------------------------------------------------
-- Table `gymwebsite`.`Friends`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `gymwebsite`.`Friends` (
`idFriends` INT NOT NULL AUTO_INCREMENT ,
`UserID` INT NOT NULL ,
PRIMARY KEY (`idFriends`, `UserID`) ,
INDEX `fk_Friends_Userinfo1` (`UserID` ASC) ,
CONSTRAINT `fk_Friends_Userinfo1`
FOREIGN KEY (`UserID` )
REFERENCES `gymwebsite`.`User` (`UserID` )
ON DELETE NO ACTION
ON UPDATE NO ACTION)
ENGINE = InnoDB;
SET SQL_MODE=@OLD_SQL_MODE;
SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS;
SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS;
```
What I may be trying to do is update but at the same time insert? If that makes any sense?
| Big problems with my current schema/syntax and coding | CC BY-SA 2.5 | null | 2011-03-22T17:08:43.670 | 2011-03-22T19:46:03.523 | null | null | 477,228 | [
"c#",
"jquery",
"asp.net",
"mysql",
"sql"
]
|
5,395,212 | 1 | null | null | 1 | 198 | Looking at the CSS specification of the W3C and observing the rendering of my own solution I have come to only one conclusion:
If I have dialog window (absolutely positioned) with an input field (relative) in it and usual autocompleter script (usual includes ul list beyond input (absolutely pos.)) - I can't make a dropdown list of autocomplete values visible normally and place it over buttons and borders of parent dialog window?
It’s make me feel bad.
Can any one debunk this regrettable result?
Sorry for my English.
```
<div id="modal-window" style="display: block; position: absolute; z-index: 9000; visibility: visible; opacity: 1; left: 530px; top: -58px;">
<div id="modal-window-body">
<input id="city" name="city" />
<ul class="autocompleter-choices" style="position:absolute; z-index: 19999; visibility: visible; opacity: 1; left: 8px; top: 406px; width: 126px; overflow-y: scroll; height: 189px;">
<li class="autocompleter-selected">
<span class="autocompleter-queried">
N
</span>
amibia
</li>
</ul>
<div id="modal-window-buttons">
<span class="button">
<a href="#" class="button-ok">ok</a>
</span>
<span class="button">
<a href="#" class="button-close">cancel</a>
</span>
</div>
</div>
</div>
```
result:

Принимаю ответы на русском языке так же. Очень неприятная загвоздка вышла. Надо решить.
| Html z-index not provident specification | CC BY-SA 3.0 | 0 | 2011-03-22T17:16:31.013 | 2012-10-21T08:47:21.557 | 2012-10-21T08:47:21.557 | 1,113,772 | 501,831 | [
"html",
"css",
"layout",
"z-index",
"w3c"
]
|
5,395,414 | 1 | 5,409,985 | null | 0 | 1,139 | I have this stranger problem on Nivo slider that the images are not centrally aligned instead are right aligned when the page is opened for the first time. A refresh will make use of the cache, and the issue will be gone but if I `Ctrl + F5` it, then again the issue will come up and will be gone on the next reload.
I am suspecting it to be a timing issue in js, that when we get a cache hit, images are already loaded and the Nivo slider aligns the images properly but when the image sizes are not available (cache miss), it does something wrong and slider images are misaligned.
Url - [http://wordpress.ashfame.com/](http://wordpress.ashfame.com/)
Screenshot: 
| Nivo slider misalignment issue only when the site is not loaded from cache | CC BY-SA 2.5 | 0 | 2011-03-22T17:31:25.267 | 2011-03-23T18:58:24.687 | 2011-03-23T18:41:04.017 | 476,945 | 551,713 | [
"javascript",
"jquery",
"html",
"css",
"nivo-slider"
]
|
5,395,422 | 1 | null | null | 0 | 475 | I have some code that connects my app to Facebook. When you log in you proceed to the next activity. If you are already logged in when you start the app you miss out the log in section. On the following page I want to be able to log out, every time I press logout I get a null pointer. Can anyone help?
My code for log out is:
```
private void logout() {
try {
facebookConnector.getFacebook().logout(getApplicationContext());
} catch (MalformedURLException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
}
```
The code that is run when the app is started to check if the person has logged on is:
```
if (facebookConnector.getFacebook().isSessionValid()) {
Intent i = new Intent(facebook.this, facebook2.class);
startActivity(i);
finish();
}
```
A print screen of my error can be seen here:

Any help would be great. If you need more info please comment and I will provide asap.
| Facebook with Android: unexpected NullPointerException | CC BY-SA 2.5 | 0 | 2011-03-22T17:31:59.063 | 2011-03-24T14:10:07.753 | 2011-03-24T14:10:07.753 | 50,846 | 601,915 | [
"android",
"facebook"
]
|
5,395,742 | 1 | 5,396,259 | null | 3 | 5,509 | I have an application that I have been testing for internationalization support.
There is, for example, a standard TEdit control, with the font.Name = 'Arial'.
On Windows 7, it seems to automatically grab the glyphs for CJK characters, from Arial Unicode MS, or somewhere else, for EDIT common controls, if the font that is assigned to that control, does not contain a certain international character.
On Windows XP, it seems that chinese characters show up as boxes, even when Arial Unicode MS font is installed, unless I change the Font name in the delphi form, to Arial Unicode MS.
Is this something that everybody encounters with international font support on windows XP? Do windows common controls behave differently? The behaviour I see on Windows 7 is certainly friendlier than the behaviour I see on Windows XP.
This behaviour difference is not constrained just to Windows Common Controls. It seems
even Internet Explorer and the MS Explorer shell have problems doing tests like the picture here:

1. What do people do about this?
2. What is the expected platform behaviour on Windows XP? Do you have to go find what language the user wants to use, and go find a font for them to to use, that supports that language? I guess Arial Unicode MS might be a good default, since it has almost every unicode language that there is.
Update: It looks like the Microsoft term "supplemental language support" refers to the "windows doesn't show my unicode characters as boxes" feature of Windows.
| How do I get full unicode support including chinese characters in VCL controls or Windows Common Controls on XP like it is in Win7 | CC BY-SA 2.5 | 0 | 2011-03-22T18:00:13.607 | 2011-03-23T18:48:50.687 | 2011-03-23T18:48:50.687 | 84,704 | 84,704 | [
"windows",
"delphi",
"internationalization",
"windows-xp",
"common-controls"
]
|
5,395,754 | 1 | 5,397,562 | null | 49 | 48,501 | is it possible to make the inserted items in FlowLayoutPanel automatic size of the FlowLayoutPanel? Here is an example:
A form with 1 FlowLayoutPanel and 3 buttons inside:

if I resize the form, the controls look like this: they arrange "left to right"

What I want is this: The controls should have the width of the FlowLayoutPanel:

Any Ideas how to do this? I changed the FlowDirection and played with the Anchor property but with no luck.
I could of course Resize the controls in the FlowLayoutPanel_Resize event, but I want to add about 500 usercontrols - I tested it and it is slow.
| FlowLayoutPanel - Automatic Width for controls? | CC BY-SA 2.5 | 0 | 2011-03-22T18:01:09.580 | 2021-08-10T16:26:27.853 | null | null | 82,460 | [
".net",
"vb.net",
"resize",
"flowlayoutpanel"
]
|
5,395,783 | 1 | 5,395,996 | null | 5 | 2,810 | I have a corpus of token-index based documents which offers a query method. The user manually(!) enters a query string which needs to be parsed and evaluated. The corpus should then return a list of all documents matching the given query string. The query language features the simple boolean operators AND, NOT and OR which can also be prioritized by parenthesis.
After some research I already used ANTLR to parse a given query string into a syntax tree.
For example: The query
```
"Bill OR (John AND Jim) OR (NOT Simon AND Mike)"
```
is translated in the following syntax tree:

All nodes in the tree are simple strings and each node knows its parent and children but not its siblings.
As you can see, the ANTLR grammar already dictated the order in which the operations need to be executed: the ones at the bottom of the tree come first.
So what I probably need to do is recusively(?) evaluate all operands in the tree.
In general, I can do a simple search on my corpus using a method Get(string term) for each leaf in the tree (like "Bill" or "John"). Get() returns a list of documents containing the term in the leaf. I can also evaluate the parent of each leaf to recognize a possible NOT operator which would then lead to a result list of documents NOT containing the term in the leaf (using the method Not() instead of Get()).
The AND and OR operator should be transformed into method calls which need two parameters:
- -
The parameters list1 and list2 contain the documents I received before using Get() or Not().
My question is: How can I - semantically and syntactically in C# - evaluate all necessary search terms and use them to call the right operator methods in the correct order? Intuitively it sounds like recursion but somehow I can't picture it - especially since not all methods that need to be called have the same amount of parameters. Or are there maybe entirely other ways to accomplish this?
| How to evaluate and process a simple string syntax-tree in C#? | CC BY-SA 2.5 | 0 | 2011-03-22T18:03:53.110 | 2011-03-22T23:43:00.257 | 2011-03-22T21:16:31.813 | 50,476 | 254,227 | [
"c#",
"parsing",
"antlr",
"abstract-syntax-tree"
]
|
5,395,956 | 1 | 5,396,399 | null | 0 | 4,023 | I'm a Drupal newbie and have understood how to make my basic blocks and menus sofar. Also I've learned some jQuery (and it is awesome).
I'm trying to integrate a paginated list of users which is just [a separate PHP script](http://preferans.de/top20.php) at the moment into [my new Drupal 7 site](http://preferans.de):

I'm trying to implement it as a Drupal menu, so that I can call it like [http://preferans.de/top](http://preferans.de/top) (to have the pagination offset of 0) and [http://preferans.de/top/100](http://preferans.de/top/100) (to display the list of users starting with the 100th user):
```
function pref_menu() {
$items['top'] = array(
'title' => 'Weekly player rating',
'description' => 'Weekly player rating',
'page callback' => 'pref_top_callback',
'access callback' => TRUE,
'file' => 'pref.top.inc',
'file path' => drupal_get_path('module', 'pref'),
'type' => MENU_CALLBACK,
);
return $items;
}
```
And my very simple pref.top.inc file is:
```
function pref_top_callback($offset = 0) {
return array(
'pref_players_table' => array(
'#type' => 'markup',
'#markup' => pref_players_table($offset),
),
);
}
function pref_fetch_players($offset) {
/* FETCH MAX 20 RECORDS INTO AN ARRAY */
$players = array();
$result = db_query("
select u.id,
u.first_name,
row_number() OVER (order by m.money desc) as pos,
u.female,
u.city,
u.avatar,
m.money,
u.login > u.logout as online
from pref_users u, pref_money m where
m.yw=to_char(current_timestamp, 'IYYY-IW') and
u.id=m.id
order by m.money desc
limit 20 offset :offset
", array(':offset' => array($offset)),
array('fetch' => PDO::FETCH_ASSOC)
);
$players = $result->fetchAll();
/* PRINT THE ARRAY AS AN HMTL-TABLE */
$table = '<table>';
foreach ($players as $user) {
$table .= '<tr>';
$table .= sprintf('<td>%u</td>
<td><a href="/user.php?id=%s">%s</a></td>
<td>%s</td><td>%d $</td>',
$user['pos'],
$user['id'],
$user['first_name'],
$user['city'],
$user['money']);
$table .= '</tr>';
}
$table .= '</table>';
return $table;
}
```
This does work, I get a Drupal page with an HTML table containing up to 20 rows:

But I have no idea how to use [the Datatables Drupal module](http://drupal.org/project/datatables). I've downloaded and installed it successfully and am looking at its source code, but don't event know where to start.
Please help me, how can I call it from my menu function?
Thank you!
Alex
| Using jQuery Datatables module for Drupal 7 | CC BY-SA 2.5 | null | 2011-03-22T18:21:35.013 | 2011-03-23T17:00:12.207 | null | null | 165,071 | [
"jquery",
"drupal",
"drupal-modules",
"drupal-7",
"datatables"
]
|
5,395,999 | 1 | null | null | 0 | 863 | I'm not sure how this happened as up until this morning my Intellisense was working fine in Visual Studio.
Now, however, I have lost Intellisense in my web project's files. Also, I don't see the little toolbar at the top of the window that allows me to select objects and controls
i.e. This one:

I did notice however that Intellisense and the controls selection toolbar works in my class library.
Any idea how to fix this?
I've read somewhere about setting the Build Action of my web project files to "Compile", but I cannot find a BuildAction property anywhere.
| Visual Studio Intellisense works in Class Library but not Web Project files | CC BY-SA 2.5 | null | 2011-03-22T18:25:36.803 | 2011-03-22T20:30:57.930 | null | null | 23,585 | [
"visual-studio",
"intellisense"
]
|
5,396,014 | 1 | 5,396,037 | null | 11 | 13,947 | Repeat: What do iOS developers call the visual dots on the bottom of a page that indicate the number of open windows in an application?

| What do iOS developers call the dots on the bottom of a page that indicate the number of open windows in an application? | CC BY-SA 2.5 | null | 2011-03-22T18:26:43.347 | 2018-12-06T14:59:11.993 | 2018-12-06T14:59:11.993 | 1,371,329 | 53,875 | [
"ios",
"iphone"
]
|
5,396,068 | 1 | 5,396,124 | null | 1 | 812 | Is there a way to create a flexible iPhone button from a single graphic, like Android does with 9-patch drawables?
For example, would it be possible to use this graphic  to create a wider button?
| Flexible iPhone button | CC BY-SA 2.5 | null | 2011-03-22T18:30:44.977 | 2011-03-22T18:34:31.150 | null | null | 143,378 | [
"iphone",
"ios",
"button",
"bitmap"
]
|
5,396,078 | 1 | 5,446,066 | null | 11 | 15,019 | I am working on xcode4 and created a `Settings.bundle` for my project. I can edit the `Root.plist` file in xcode4 but it is not possible to edit the `Root.strings` file. It isn't even displayed in the editor.

I can not expand the `en.lproj` folder as you see in the picture.
But when I do it gives me:

on `Root.strings` gives me:

I tried it several times, creating a new window-based application project and creating a new Settings.bundle. I always can not localize it. Any ideas?
| How to localize Settings.bundle in xcode4? | CC BY-SA 2.5 | 0 | 2011-03-22T18:31:26.077 | 2013-05-15T21:44:44.633 | 2011-03-26T12:38:29.070 | 401,025 | 401,025 | [
"xcode",
"localization",
"xcode4",
"settings-bundle"
]
|
5,396,101 | 1 | 5,396,137 | null | 2 | 88 | Here is what I get:

And here is my complete code:
```
import java.net.*;
import java.io.*;
class whois {
public static void main(String args[])throws Exception {
int c;
Socket s=new Socket("whois.internic.net",43);
InputStream in=s.getInputStream();
OutputStream out=s.getOutputStream();
String str=(args.length==0 ? "www.osborne.com" : args[0])+"\n";
byte buf[]=str.getBytes();
out.write(buf);
while((c=in.read())!=-1) {
System.out.print((char)c);
}
s.close();
}
}
```
Now if I go to [this](http://internic.net/whois.html) and type there osborne.com, they will give me information about this domain.
But I am getting a different output.
What is the reason for this? Please explain.
| Unexpected Output_networking | CC BY-SA 2.5 | null | 2011-03-22T18:32:26.387 | 2011-03-22T20:31:46.183 | 2011-03-22T20:31:46.183 | 600,500 | 648,138 | [
"java",
"dns",
"whois"
]
|
5,396,395 | 1 | null | null | 0 | 85 | I would like to know if we can edit the picture that we take from a camera and store it on our Phone. Can we make use of android.graphics package to edit the picture.
One of the sample picture has has been edited on the top width is this as you can see the image has been clipped from the top center just below the word "Discovery". Is this possible on Andriod?

| Can we edit the picture in Android to set the Radius of the pics on the edges? | CC BY-SA 2.5 | null | 2011-03-22T18:57:17.463 | 2011-05-29T07:17:06.770 | 2011-05-29T07:17:06.770 | 750,987 | 402,637 | [
"android",
"graphics",
"android-3.0-honeycomb"
]
|
5,396,513 | 1 | null | null | 9 | 2,260 | When dealing with some bitmaps in Android I noticed that the white used in views is not always the same white rendered on bitmaps. Consider this screenshot.

The background white is from a view with white background color.
The foreground "white" is from a white bitmap decoded from the SD card, displayed in an ImageView. This bitmap is decoded using `RGB_565` as follows:
```
BitmapFactory.Options resample = new BitmapFactory.Options();
resample.inPreferredConfig = Config.RGB_565;
resample.inSampleSize = sampleSize;
return BitmapFactory.decodeFile(filePath, resample);
```
For reference, [here](http://img824.imageshack.us/img824/2088/testaq.jpg)'s the bitmap.
Why is this and how can it be fixed?
| White is not white | CC BY-SA 2.5 | 0 | 2011-03-22T19:09:00.867 | 2020-06-11T12:25:41.327 | 2013-01-25T02:10:54.243 | 402,022 | 143,378 | [
"android",
"bitmap"
]
|
5,396,642 | 1 | null | null | 0 | 336 | Here's the problem - On my homepage I'm displaying 9 modules at a specified width that float: left. The height is not specified and will vary with each new article that I post to the Section/Category. There are 3 modules in each row, with the first of the new row set to clear:left.
This works fine with FF3, FF4, Chrome, and IE8 - but IE7 does not appear to be clearing properly. The modules, each wrapped in a div, seem to be ignoring the clear, and appear almost as though they were just floating.
Hopefully, an image will explain that better than I am able to -
IE7:

[http://d.pr/N4e4](http://d.pr/N4e4)
and on
FF:

[http://d.pr/RZcQ](http://d.pr/RZcQ)
What I'm wondering is if I can tell Joomla to add a `<div class="clear"></div>` after each set of 3 modules have been displayed?
`<div class="module">CONTENT</div>`
`<div class="module">CONTENT</div>`
`<div class="module">CONTENT</div>`
`<div class="clear"></div>`
`<div class="module">CONTENT</div>`
`<div class="module">CONTENT</div>`
`<div class="module">CONTENT</div>`
`<div class="clear"></div>`
`<div class="module">CONTENT</div>`
`<div class="module">CONTENT</div>`
`<div class="module">CONTENT</div>`
`<div class="clear"></div>`
All of that would be a result of the single jdoc:include statement:
`<jdoc:include type="modules" name="articles" style="Articles" />`
Thanks!!
| Joomla - Can I add code after # of modules? | CC BY-SA 3.0 | null | 2011-03-22T19:21:42.310 | 2011-12-12T08:32:49.180 | 2011-12-12T08:32:49.180 | 1,022,826 | 353,117 | [
"css",
"loops",
"joomla"
]
|
5,396,709 | 1 | null | null | 4 | 8,114 | When I display the following PNG in chrome, safari, and firefox I am seeing differences.
[http://bobcravens.com/demos/temp/logo.png](http://bobcravens.com/demos/temp/logo.png)
Here is a screenshot of (left to right) Chrome, Safari, FireFox (all on a Mac).

I am certain this is going to be something simple (and that I probably should know), but haven't been able to determine the root cause.
Thanks for any help.
Bob
| PNG image is being rendered different in Chrome, FireFox, and Safari | CC BY-SA 2.5 | 0 | 2011-03-22T19:27:15.080 | 2011-03-22T19:40:22.370 | null | null | 261,869 | [
"firefox",
"google-chrome",
"safari",
"png"
]
|
5,396,717 | 1 | 5,396,849 | null | 4 | 11,113 | I have this diagram which should explain my situation I need some help on joining 3 tables which I have no idea how to do this kind of thing:

So I can go through a while loop of retrieving the records by doing this:
```
<img src="<?php echo $row['filename']; ?>" alt="" />
Album: <?php echo $row['album_name']; ?>
AlbumID: <?php echo $row['album_id']; ?>
```
| Joining 3 three tables | CC BY-SA 2.5 | 0 | 2011-03-22T19:28:12.507 | 2011-03-24T20:25:53.750 | 2011-03-24T20:25:53.750 | 14,946 | 264,795 | [
"php",
"mysql",
"sql",
"join"
]
|
5,397,301 | 1 | 5,397,380 | null | 1 | 357 | My site, [http://hivechatter.com/](http://hivechatter.com/), is super sexy for Firefox, Chrome, IE8, you name it:

But then along comes IE7, who mauls her divs so bad that they nearly run off the screen! And for whatever reason the content within the divs is centered. What the heck is going on here? It seems to be something to do with the way IE7 interprets the left: percentage margins, but I can't figure it out.

For convenience and posterity's sake, below are the relevant portions of my css, with text formatting and other nonsense removed. #container is the overall page container, #blue_box is the main content box, #left and #right are the columns in the blue box, #divider is the white line that separates them, #links is the light blue nav hovering below #blue_box.
```
#background {
width: 100%;
position: absolute;
top: 0;
left: 0;
z-index: -9999;
}
html, body {
margin: 0;
padding: 0;
height: 100%;
}
body {
background: no-repeat #222933;
overflow: hidden;
}
#container {
position: relative;
left: 34%;
top: 10%;
width: 50%;
min-width: 450px;
max-width: 700px;
overflow: auto;
padding: 0;
}
#blue_box {
position: relative; /* so that divider has appropriate height */
width: 94%;
padding: 3%;
overflow: auto; /*needed so that div stretches with child divs*/
}
#left {
position: relative;
float: left;
width: 44%;
margin: 0;
padding: 0;
}
#right {
position: relative;
float: right;
width: 49%;
margin: 0;
padding: 0;
}
#divider{
position:absolute;
left:49%;
top:6%;
bottom:6%;
border-left:1px solid white;
}
#links {
float: right;
width: 16em;
overflow: auto;
}
```
| Help, IE7 mugged my divs and now they're running off the screen! | CC BY-SA 2.5 | null | 2011-03-22T20:17:28.463 | 2011-03-22T20:36:34.620 | 2011-03-22T20:36:34.620 | 640,057 | 640,057 | [
"css",
"internet-explorer-7"
]
|
5,397,578 | 1 | 5,398,546 | null | 4 | 507 | Greetings, StackOverflow.
Let's say I have two following recurrence relations for computing

I would like to compute values , , , , etc... in asymptotically optimal way. Few minutes with pencil and paper reveal that it unfolds into treelike structure which can be transversed in several ways. Now, it's unlikely tree will be useful later on, so for now I'm looking to produce nested list like `[[S(00)],[S(10),S(01)],[S(20),S(21),S(12),S(02)],...]`. I have created a function to produce a flat list of (or , depending on first argument):
```
osrr xpa p predexp = os00 : os00 * (xpa + rp) : zipWith3 osrr' [1..] (tail osrr) osrr
where
osrr' n a b = xpa * a + rp * n * b
os00 = sqrt (pi/p) * predexp
rp = recip (2*p)
```
I am, however, at loss as how to proceed further.
| Computing recurrence relations in Haskell | CC BY-SA 2.5 | null | 2011-03-22T20:41:43.333 | 2011-03-23T10:48:45.247 | 2011-03-22T22:28:18.487 | 237,428 | 671,859 | [
"haskell",
"recursion",
"recurrence"
]
|
5,397,748 | 1 | 5,397,856 | null | 0 | 915 | I'm looking to optimize a few tables in a database because currently under high load the wait times are far too long...
Ignore the naming schema (it's terrible), but here's an example of one of the mailing list tables with around 1,000,000 records in it. At the moment I don't think I can really normalize it anymore without completely re-doing it all.

Now... How much impact will the following have:
- - - -
One other thing I'm interested in, a couple of tables including this one use InnoDB as opposed to the standard MyISAM, is this recommended?
The front-end is coded in PHP so I'll be looking through that code aswell, at the moment I'm just looking at a DB level but any suggestions or help will be more than welcomed!
Thanks in advance!
| MySQL Table Optimization | CC BY-SA 2.5 | 0 | 2011-03-22T20:58:06.657 | 2011-03-22T21:35:15.240 | null | null | 652,668 | [
"php",
"mysql",
"optimization",
"query-optimization"
]
|
5,398,062 | 1 | 5,399,248 | null | 3 | 3,722 | I have gone through Highcharts options needed to be set for xAxis properties to format time label but with no luck understanding how exactly this works for this scenario.
I have dynamic data retrieved for a stock during the day (intraday) which I need to display as data is retrieved starting at 9:30 and ending at 17:00 every day, I need to display labels showing 30 minutes interval as in the following: 9:30..10:00..10:30..etc but I can't seem to get this working with data blocks (pointers) received every 5 minutes.
The other problem is that I need to display data without spanning to the full width of the chart, for example at 10:00 all I have is 6 bars (5 minutes each) but what it does is that it fills the chart with large 6 bars instead of locking them to their time frame:

What I need to do is to display these bars within the 9:30-10:00 area and leave the rest to be filled as I receive more data just like this:

I would appreciate any help on how to get this done. I know a Stock chart type is in the work, but I need to use the OHLC type for now urgently.
Many thanks.
| Format Highcharts xAxis for stock data | CC BY-SA 2.5 | null | 2011-03-22T21:29:28.440 | 2011-03-23T08:34:51.867 | null | null | 272,414 | [
"jquery",
"charts",
"javascript",
"highcharts"
]
|
5,398,096 | 1 | 5,400,082 | null | 3 | 9,891 | How can I set the zoom level of my Google MapKit in SDK? Like for example, I live in New York, and I've set up 4 coordinate positions in my ProjectName-info.plist (URL Types > Item 0 > URL Schemes > Item 0), then I've set up my code in my UIViewController subclass file:
```
#import "GoogleMap.h"
#import "MyAnnotation.h"
@implementation GoogleMap
- (void)viewDidLoad {
[super viewDidLoad];
variable1 = [[NSArray alloc] initWithContentsOfFile:[[NSBundle mainBundle]
pathForResource:@"NewYorkAreas"
ofType:@"plist"]];
double minLat = [[variable1 valueForKeyPath:@"@min.latitude"] doubleValue];
double maxLat = [[variable1 valueForKeyPath:@"@max.latitude"] doubleValue];
double minLon = [[variable1 valueForKeyPath:@"@min.longitude"] doubleValue];
double maxLon = [[variable1 valueForKeyPath:@"@max.longitude"] doubleValue];
MKCoordinateRegion region;
region.center.latitude = (maxLat + minLat) / 2.0;
region.center.longitude = (maxLon + minLon) / 2.0;
region.span.latitudeDelta = (maxLat - minLat) * 1.05;
region.span.longitudeDelta = (maxLon - minLon) * 1.05;
map.region = region;
for (NSDictionary *newYorkAreasDict in variable1){
MyAnnotation *annotation = [[MyAnnotation alloc] initWithDictionary:newYorkAreasDict];
[map addAnnotation:annotation];
[annotation release];
}
}
- (MKAnnotationView *)mapView:(MKMapView *)mapView viewForAnnotation:(id <MKAnnotation>)annotation{
if (map.userLocation == annotation){
return nil;
}
NSString *identifier = @"MY_IDENTIFIER";
MKAnnotationView *annotationView = [map dequeueReusableAnnotationViewWithIdentifier:identifier];
if (annotationView == nil){
annotationView = [[[MKAnnotationView alloc] initWithAnnotation:annotation
reuseIdentifier:identifier]
autorelease];
annotationView.image = [UIImage imageNamed:@"logo.png"];
annotationView.canShowCallout = YES;
annotationView.rightCalloutAccessoryView = [UIButton buttonWithType:UIButtonTypeDetailDisclosure];
}
return annotationView;
}
```
So this is all I have for now in my code, which works perfectly when I run and debug the app, and shows me the location of all 4 areas that I set in a good zooming level, but now I want only 1 area to set, so when I erased the other 3 area and when running it and only giving me one area, the zooming level seems very close to the map:

So I when the code is fixed (assuming someone helped me fix the code for the zooming level), the next time I run it, when I click on "Find us on Google Map", my Google Map opening page zoom level should look like this:

So yea hopefully someone can help me fix this zooming level when I begin opening Google Map, thanks!
(About the New York variable names, forget it, I don't live in New York lol)
| Setting the zoom level in MapKit Xcode | CC BY-SA 2.5 | null | 2011-03-22T21:33:24.210 | 2011-07-05T10:35:09.417 | 2011-03-22T21:55:32.667 | 54,806 | 616,482 | [
"iphone",
"objective-c",
"xcode",
"mapkit"
]
|
5,398,212 | 1 | 5,400,318 | null | 2 | 649 | I've encountered the need for a specific sort of drop-down tooltip on hover (or sometimes click), activated either way by a small icon, say 20x20 pixels. The design would look something like this:

So, as you can see, the box that appears hovers over all other content on the page. It is variable in both width and height depending on content.
Now, as usual, the challenge is to accomplish this using only CSS. Fortunately, in this case, I'm only worried about bleeding edge browsers, and don't need to consider mobile at all. In the past, I've wimped out due to a lack of time and put the top 'pointer' element (that is centered on the icon) on the left, and put the entire box aligned to the left edge of the icon - but that's far from optimal.
I'd love any suggestions here, it'd be a fantastic solution to have in my arsenal in the future.
| Centered pop-up tooltip in small icons | CC BY-SA 2.5 | null | 2011-03-22T21:44:00.573 | 2011-03-23T02:48:07.600 | null | null | 357,795 | [
"css"
]
|
5,398,244 | 1 | 5,398,550 | null | 2 | 767 | I have two ListBox controls in a window. Each is a list of patient allergies bound to different StaticResources. At the bottom of the window I have a ContentControl which displays additional information about the selected allergy in the list above.

Currently, I have two ContentControls, one for each of the listboxes, both with `Visiblity="Collapsed"`. When the user makes a selection, I make the associated content control visible and collapse the other one. I'd like to only have one content control and change its binding.
So far, I've tried each of the following with no luck:
```
this.ExpandedAllergyDetails.Content = "InsideAllergiesSource";
this.ExpandedAllergyDetails.SetBinding(ContentControl.ContentProperty, "InsideAllergiesSource");
this.ExpandedAllergyDetails.SetBinding(ContentControl.ContentProperty, new Binding());
this.ExpandedAllergyDetails.SetResourceReference(ContentControl.ContentProperty, this.Resources["InsideAllergiesSource"]);
this.ExpandedAllergyDetails.SetResourceReference(ContentControl.ContentProperty, this.FindResource("InsideAllergiesSource"));
```
In each case, I was trying to use only one ContentControl, named ExpandedAllergyDetails, and change its binding to "InsideAllergiesSource" which is a CollectionViewSource defined in the XAML.
| Change Binding of ContentControl Based on Selection in one of two ListBoxes | CC BY-SA 2.5 | 0 | 2011-03-22T21:47:12.140 | 2011-03-22T23:02:42.653 | 2011-03-22T22:17:50.377 | 546,730 | 81,770 | [
"c#",
"wpf"
]
|
5,398,418 | 1 | 5,398,447 | null | 2 | 757 | On my website I have a center and a right column. The center and right columns are surrounded by a `<div>` element with id = wrap. The surrounding div element is centered using the following CSS technique:
```
#wrap{
position:absolute;
left:50%;
margin-left:-307px; /* 307px = half of 594px(width of #center_column) */
}
```
This works fine except that when the browser is resized to a width less than that of the surrounding `<div>` element then the left section of the page is cut off and cant be viewed by scrolling horizontally

| Page cut off with center technique | CC BY-SA 2.5 | null | 2011-03-22T22:02:58.383 | 2011-03-23T13:00:00.167 | null | null | 552,067 | [
"css",
"html",
"center"
]
|
5,398,449 | 1 | 5,398,762 | null | 5 | 4,731 | I would like to know how can I create a Pulse like app on android
Here is a screenshot:

A number of things:
1. It has a number of 'row's of horizontal content.
2. Each 'row' has 'cell's of content.
3. I can 'fling' left and right to see the horizontal content.
4. As it reaches the end of the horizontal content, it will automatically load more content.
Thank you.
| How can I create a 'Pulse' like UI for an android application | CC BY-SA 2.5 | 0 | 2011-03-22T22:06:47.633 | 2011-12-19T18:55:05.043 | 2011-03-22T22:43:47.433 | 156,869 | 286,802 | [
"android",
"user-interface",
"android-layout"
]
|
5,398,524 | 1 | 5,398,593 | null | 2 | 913 | I've been struggling with getting a div container element to center along with it's child content and is starting to get frustrating. The inline styling I have for div is as follows:
```
<body id="body1" style="vertical-align: middle; text-align: center">
<div id="container" style="position: relative; width: 910px; margin: 0px auto;">
<!---Child Content--->
.
.
.
</div>
</body>
```
When these settings are viewed in IE7, the div container is off-set to the right as the below pic shows:

In order to center it I have to add define the right property in its position style in order to push it toward the center:
```
<body id="body1" style="vertical-align: middle; text-align: center">
<div id="container" style="position: relative; right: 425px; width: 910px; margin: 0px auto;">
<!---Child Content--->
.
.
.
</div>
</body>
```
This fixes the problem for IE7:

Predictably however, the formatting is off in IE8, Firefox, Chrome, etc. when applying the second styling format above:
Firefox (same behavior in Chrome and IE8)

Hope it's a simple fix, I don't understand why IE7 treats the styling differently. Any help is appreciated.
UPDATE:
@Dan Hardy, adrift - If I could accept both your answers I would, thanks guys it worked. That is very strange behavior, I figured by now I wouldn't have to cater to specific browsers.
| IE8 vs IE7 html formatting | CC BY-SA 2.5 | null | 2011-03-22T22:14:49.870 | 2011-03-22T22:33:56.873 | 2011-03-22T22:33:56.873 | 94,541 | 94,541 | [
"html",
"css",
"internet-explorer",
"firefox",
"internet-explorer-7"
]
|
5,398,772 | 1 | 5,398,788 | null | 70 | 50,011 | In Firefox , I was able to write a custom confirmation popup with:
```
window.onbeforeunload = function() {
if (someCondition) {
return 'Your stream will be turned off';
}
}
```
Now in Firefox , it does not show my custom message. The default message that it provides is not even accurate to what my application does.

Can this default message be overridden?
| Firefox 4 onBeforeUnload custom message | CC BY-SA 2.5 | 0 | 2011-03-22T22:44:42.100 | 2015-05-20T16:40:35.367 | null | null | 459,987 | [
"javascript",
"firefox",
"firefox4"
]
|
5,399,123 | 1 | 5,399,843 | null | 0 | 916 | 
I made this image that shows the controls. The top one is a `ListView` and the others are `ListView` controls as well with additional controls.
But I can't figure out how to layout them to look like that.
Currently I use 3 `DockPanels` for each `ListView` where the top one uses Top `VerticalAlignment`, the others use Bottom for `VerticalAlignment`, Left and Right (for `HorizontalAlignment`).
But when I look at it, the other 2 controls appear after the top `ListView` to its right side. I can see this when I scale the top `DockPanel` to half the size, then the other 2 DockPanels show up, attached to the top DockPanel's right side.
Any ideas on how to fix this?
| How to create this layout in WPF (3 controls)? | CC BY-SA 2.5 | null | 2011-03-22T23:27:42.247 | 2011-03-23T19:49:21.570 | null | null | 51,816 | [
"c#",
".net",
"wpf",
"xaml",
"layout"
]
|
5,399,314 | 1 | 5,451,052 | null | 2 | 1,387 | I have a voice memo component in my app, and I want to allow the user to trim the audio, similar to QuickTime X on Mac OS Ten point Six handles it, or like the Voice Memos app on the iPhone. Here's an example of both:


Any help is appreciated.
| iPhone trim audio recording | CC BY-SA 2.5 | 0 | 2011-03-22T23:53:01.410 | 2011-11-22T20:00:57.170 | null | null | 219,515 | [
"cocoa-touch",
"avfoundation",
"audio-recording",
"trim"
]
|
5,399,392 | 1 | 5,399,499 | null | 1 | 239 | 
I'm trying to implement the above navigation UI in flex. Basically I'd like a bar with two (or more) big buttons (see top picture, buttons one and two). When the user clicks on button one, a set of new buttons (specific to mode one) appear in the lower part of the button strip, and can be selected (see lower left pic). Same happens if you click on button two (see lower right pic). Basically, buttons one and two select their own bar with buttons that can be used to do stuff.
Note: this is not intended to be a hover menu, i.e. the lower buttons are visible until the user selects another higher level button or clicks on the background of the bar.
I thought about using either a spark TabBar or ButtonBar container, but I'm not sure that's the best approach.
thank you for any advice or pointers to examples!
| How to implement this pseudo TabNavigation UI in Flex? | CC BY-SA 2.5 | 0 | 2011-03-23T00:05:05.330 | 2011-03-23T00:25:18.510 | 2011-03-23T00:19:03.913 | 306,584 | 306,584 | [
"apache-flex",
"flex3",
"menu",
"flex4"
]
|
5,399,442 | 1 | 5,399,629 | null | 34 | 25,944 | As per screenshot below. I am pretty sure someone has done this before! =)
The circle is a bonus, would be very happy with a solution that allows highlighting of a given "div"

| (jquery) Blackout the entire screen and highlight a section of the page? | CC BY-SA 2.5 | 0 | 2011-03-23T00:16:44.093 | 2016-10-25T20:08:27.283 | null | null | 180,663 | [
"jquery",
"jquery-ui",
"jquery-plugins",
"jquery-selectors"
]
|
5,399,622 | 1 | 5,400,059 | null | 16 | 25,280 | Is there a way to capture to result of the `window.onbeforeunload` confirmation dialog like the one below from Stack Overflow (this happens when leaving the 'Ask Question' page without posting the question)?
This is how it appears in Chrome, I believe it's slightly different in other browsers, but you always have some form of yes/no buttons.

Presumably if they're still on the offending page after the event has been triggered they chose to stay and you could probably figure this out by watching the sequence of js. However ?
I've implemented this like below:
```
// concept taken from SO implementation
function setConfirmUnload(showMessage, message) {
window.onbeforeunload = showMessage ? (message ? message : "this is a default message") : null;
}
// pseudo code
listen to changes on inputs
if any inputs fire a change event
call setConfirmUnload(true, 'My warning message')
```
I'm using jQuery within my site.
I'm essentially trying to implement a Gmail like drafting implementation, wherein if a user leaves a page with a form they've made changes to without saving they're warmed with a similar dialog. If they choose to discard they're changes and leave the page, I need to clean up some temporary records from the database (I'm thinking an AJAX call, or simply submitting the form with a `delete` flag) then sending them on their way.
My question also relates to:
[jQuery AJAX call in onunload handler firing AFTER getting the page on a manual refresh. How do I guarantee onunload happens first?](https://stackoverflow.com/questions/5034216/jquery-ajax-call-in-onunload-handler-firing-after-getting-the-page-on-a-manual-re)
| Capturing result of window.onbeforeunload confirmation dialog | CC BY-SA 4.0 | 0 | 2011-03-23T00:43:15.697 | 2021-01-03T11:23:00.167 | 2021-01-03T11:23:00.167 | 4,370,109 | 233,633 | [
"javascript",
"jquery",
"dom-events",
"onunload",
"window.onunload"
]
|
5,399,836 | 1 | 5,400,068 | null | 1 | 1,733 | When I add a border to `fieldset` element and then drag the `legend` down to work as a heading of sorts, the gap in the `fieldset` remains.
Is there a way to have the entire border, without adding a wrapper `div` and setting the border on that?
### Example

### CSS
```
fieldset legend {
position: relative;
bottom: -40px;
background: transparent;
}
```
[jsFiddle](http://jsfiddle.net/alexdickson/p67re/).
| Is there any way to get the full border when adding a border to a fieldset element? | CC BY-SA 4.0 | null | 2011-03-23T01:20:10.197 | 2018-08-28T16:59:56.210 | 2020-06-20T09:12:55.060 | -1 | 31,671 | [
"html",
"css",
"legend",
"fieldset"
]
|
5,399,850 | 1 | 5,399,929 | null | 0 | 109 | Is there a control in the .NET WinForm library for database design similar to the control found in the Create View dialog of SQL Management Studio. A control that displays multiple tables floating within a background and allows lines to be drawn between specific fields? Something like the following:

| Database table design control | CC BY-SA 2.5 | 0 | 2011-03-23T01:21:58.737 | 2011-03-23T01:39:29.503 | null | null | 122,885 | [
".net",
"winforms",
"controls"
]
|
5,399,881 | 1 | 5,762,791 | null | 4 | 2,869 | I was looking for an alternative for an uninstall in a setup project (while reading [this](https://stackoverflow.com/questions/1356160/in-a-visual-studio-setup-project-how-do-i-generate-an-uninstall-script)) and tried the following, which sadly fails:
I made a Setup Project for a dummy application in C#. I added the output from its build and an Uninstall.bat file with this inside:
```
echo %1
msiexec /x %1
```
I then added a shortcut to that file with `[Product Code]` in the shortcut's Arguments field:

My rationale was that Uninstall.bat would be called with the product code (resolved) as an argument.
After setting that up, no dice, the argument isn't passed along to the installer from the shortcut. The output from the command window is:
The `%1` parameter doesn't seem present. Looking inside the LNK file in a binary editor, the product code appears to be present.
What's happening here?
Further attempts for various arguments and a simple echo:
1. [Product Code] -> ignored
2. {%hardcodedProductCode%} -> passed to batch as %1
3. [Product Name] -> ignored
4. Constant [Product Code] -> Constant only is passed to batch as %1
5. [Product Name] Constant [Product Code] -> Constant only is passed to batch as %1, not %2
6. [Product Name] Constant [Product Code] [UndeclaredVariable123] -> Constant only is passed to batch as %1
7. $[Product Code] -> $ only is passed to batch as %1
The 5th example shows that variables are ignored somehow if the constant is bumped to position 1.
| Variables in Shortcut Arguments ignored for Visual Studio setup project | CC BY-SA 3.0 | 0 | 2011-03-23T01:27:59.900 | 2011-04-23T07:00:56.043 | 2017-05-23T10:29:28.723 | -1 | 210,916 | [
".net",
"visual-studio",
"batch-file",
"setup-project",
"shortcut"
]
|
5,399,921 | 1 | null | null | 1 | 718 | I have a XML file that I am loading using . My problem is that when the TinyXML object is destroyed, the memory it used will not be reused. I have used a memory leak detector that I have used in other projects, and have manually stepped through the code and have not been able to find any memory leaks, so I don't suspect that leaked memory is the problem.
This code will reproduce the problem:
```
#include <iostream>
#include <tinyxml.h>
int main()
{
char* filename = "../LargeFile.xml";
{
TiXmlDocument targetDoc( filename );
targetDoc.LoadFile();
}
char* buf = new char[ 524288000 ];
delete [] buf;
return 0;
}
```
Using [Address Space Monitor](http://hashpling.org/asm/) I can see that after `LoadFile()` there is a large chunk of red, then after `targetDoc` is destroyed it is all yellow. Then when the final char buf is allocated it appears in red but over the top of green space rather than the yellow freed from TinyXML. If try to allocate more buffers than there is green address space the application will crash(out of memory). This can be seen in the images below.



According to the Address space monitor page So why is the memory that is freed by TinyXML staying according to Address Space Monitor. What can cause that to happen, and how do I stop it?
Great question however this would indicate that TinyXML has a memory leak and none of my tools have shown there to be one.
I made loop that endlessly allocated ints, which eventually appeared to used all the yellow space. However larger allocations don't use it. This indicated to me that there were small leaks that were getting littered through the heap during the parsing of the xml file by tinyXML which fragments the heap in such a way that only objects small enough to fit between the leaks could be allocated in the yellow space. So I searched longer and harder for leaks in TinyXML and still did not find any. Everything seems to be getting freed up correctly, which brings me back to my initial state of confusion.
I am at a loss to explain the problem.



| Why deleted memory is unavailable to use? C++ | CC BY-SA 2.5 | null | 2011-03-23T01:37:25.280 | 2011-03-23T19:57:11.890 | 2011-03-23T08:18:05.370 | 126,163 | 126,163 | [
"c++",
"memory-management",
"tinyxml"
]
|
5,399,947 | 1 | null | null | 1 | 467 | I'm trying to get node.js running on Windows 7. I have no experience with Linux so I've just been blindly following instructions from tutorials I've found, but I'm still unable to build node.js.
What I did:
1. Install Cygwin - the entirety
2. Attempt to build node.js
This is the error I first got:

I then followed the commands of two other similar sites and they all resulted in this error (could getting several version of node have caused me more problems? I'm completely clueless on this).
I read somewhere that the Windows version of Python could be causing the problem so I uninstalled my Python 2.7 and added C:\cygwin\bin to the PATH.
That still didn't work and I read somewhere else that I'm supposed to rebaseall so I tried that, but I also got an error for that: 
That's where I'm at now. Have any steps I've taken exacerbated the situation?
| Problems building node.js on Cygwin, please help | CC BY-SA 2.5 | null | 2011-03-23T01:41:43.763 | 2018-05-12T10:08:51.253 | 2011-03-24T13:48:08.910 | 142,454 | 633,348 | [
"python",
"windows-7",
"path",
"node.js",
"cygwin"
]
|
5,400,079 | 1 | 5,400,143 | null | 0 | 2,064 | Using a script, that works great. It pops in a external link icon next to external links. Whoopydoo... and also adds a target="_blank" attribute.
The issue I have is, I dont want it to work on IMAGES.
Only on text links , so any sugestions.
The jquery is:
```
(function(a){
a.fn.link_external_icon=function(p){
var p=p||{};
var icon_path=p&&p.icon_path?p.icon_path:"link_external.png";
var n=a(this);
n.find("a[target='_blank']").css("padding-right","13px").css("background-image","url("+icon_path+")").css("background-repeat","no-repeat").css("background-position","center right");
}
```
})(jQuery);
The Script is:
```
<script language="javascript" type="text/javascript">
$(function() {
$("body").link_external_icon({
icon_path:"../images/link_external.png"
});
});
</script>
```
Image is: 
Any help appreciated.
Original code is: [http://htmldrive.net/items/show/161/Link-external-icon-jQuery-plugin-for-show-external-linktarget_blank-icon.html](http://htmldrive.net/items/show/161/Link-external-icon-jQuery-plugin-for-show-external-linktarget_blank-icon.html)
| external link icon | CC BY-SA 2.5 | null | 2011-03-23T02:09:20.820 | 2011-03-23T02:19:22.367 | null | null | 501,173 | [
"javascript",
"jquery"
]
|
5,400,355 | 1 | null | null | 5 | 9,842 |
I would like to create a pagination for indicating what page is visible, like in iOS, (those little dots below a window, known as "page indicators" in the HIG.)

-- My project is hereby referred to as, Her Highness.
[http://jquerymobile.com/test/experiments/scrollview/#../../docs/toolbars/footer-persist-a.html](http://jquerymobile.com/test/experiments/scrollview/#../../docs/toolbars/footer-persist-a.html)
| Creating iOS page indicator (dots) with jQuery Mobile | CC BY-SA 2.5 | 0 | 2011-03-23T02:54:56.800 | 2011-03-23T08:53:24.810 | 2011-03-23T05:30:28.920 | 53,875 | 53,875 | [
"ios",
"jquery-mobile",
"carousel"
]
|
5,400,618 | 1 | 5,400,667 | null | 1 | 363 | I have an optimisation question here.
## Background
I have a 12000 users in a user table, on record per user. Each user can be in zero or more groups. I have a groups table with 45 groups and a groups_link table with 75000 records (to facilitate the many to many relationship).
I am making a querying screen which allows a user to filter users from the user list.
## Aim
Selecting all users that are in one group but are not in another group.
## DB Structure

## Query
My current query which runs too slowly...
```
SELECT U.user_id,U.user_email
FROM (sc_module_users AS U)
JOIN sc_module_users_groups_links AS group_join ON group_join.user_id = U.user_id
LEFT JOIN sc_module_users_groups_links AS excluded_group_join ON group_join.user_id = U.user_id
WHERE group_join.group_id IN (27) AND excluded_group_join.group_id NOT IN (19) OR excluded_group_join.group_id IS NULL AND U.user_subscribed=1 AND U.user_active=1
GROUP BY U.user_id,U.user_id
```
This query takes 9 minutes to complete, it returns 11,000 records (out of 12,000).
Explain
Here's the explain on that query:

[Click here for a closer look](https://i.stack.imgur.com/VA9EW.jpg)
After 3 revisions, I changed it to this
```
SELECT U.user_id,U.user_email FROM (sc_module_users AS U) WHERE ( user_country LIKE '%australia%' ) AND
EXISTS (SELECT group_id FROM sc_module_users_groups_links l WHERE group_id in (31) AND l.user_id=U.user_id) AND
NOT EXISTS (SELECT group_id FROM sc_module_users_groups_links l WHERE group_id in (27) AND l.user_id=U.user_id)
AND U.user_subscribed=1 AND U.user_active=1 GROUP BY U.user_id
```
'
mucccch faster
| MYSQL: SELECT users from one user group and exclude users from another group - optimisation | CC BY-SA 2.5 | null | 2011-03-23T03:31:15.337 | 2011-03-23T04:42:25.913 | 2011-03-23T04:42:25.913 | 311,465 | 311,465 | [
"mysql",
"many-to-many",
"query-optimization"
]
|
5,401,029 | 1 | 5,401,163 | null | 0 | 5,631 | I'm creating an IM client/server application for the Android OS, and am currently putting together the user interface. Right now, my interface consists of a `EditText` element, and a `Button` element. When I tap on the `EditText` element, a keyboard pops up and allows you to type.
What I would like to have is something like the text entry area and send button in the default Android SMS app. Something like this:

The text input field and Send button would stay at the bottom of the screen, and when tapped on, the keyboard would push the text field and button up above it.
Is this possible using only `EditText` and `Button` elements?
Thank you for any suggestions or advice!
| Android Text Input Special UI Item | CC BY-SA 2.5 | 0 | 2011-03-23T04:54:46.277 | 2015-05-20T06:42:03.020 | 2011-03-23T04:56:28.883 | 408,863 | 672,407 | [
"android",
"user-interface",
"button",
"keyboard",
"android-edittext"
]
|
5,401,023 | 1 | 5,409,211 | null | 0 | 1,928 | I am trying to port the Orange Book brick shader to OpenGL ES 2.0 and I am running into problems with the lighting. With out the lighting I see the bricks, but with it the shape is just black.

```
const float ZERO = 0.0;
const float ONE = 1.0;
// Should be built in, but this is GLES
uniform mat4 ModelViewMatrix;
uniform mat4 ModelViewProjectionMatrix;
uniform mat3 NormalMatrix;
attribute vec4 Vertex;
attribute vec3 Normal;
// Other variables
uniform vec3 LightPosition;
const float SpecularContribution = 0.3;
const float DiffuseContribution = 1.0 - SpecularContribution;
varying float LightIntensity;
varying vec2 MCPosition;
void main()
{
vec3 ecPosition = vec3(ModelViewMatrix * Vertex);
vec3 tnorm = normalize(NormalMatrix * Normal);
vec3 lightVec = normalize(LightPosition - ecPosition);
vec3 reflectVec = reflect(-lightVec, tnorm);
vec3 viewVec = normalize(-ecPosition);
float diffuse = max(dot(lightVec, tnorm), ZERO);
float spec = ZERO;
if(diffuse > ZERO)
{
spec = max(dot(reflectVec, viewVec), ZERO);
spec = pow(spec, 16.0);
}
LightIntensity = DiffuseContribution * diffuse +
SpecularContribution * spec;
MCPosition = Vertex.xy;
gl_Position = ModelViewProjectionMatrix * Vertex;
}
```
```
precision mediump float;
const float ONE = 1.0;
const float HALF = 0.5;
uniform vec3 BrickColor, MortarColor;
uniform vec2 BrickSize, BrickPercent;
varying float LightIntensity;
varying vec2 MCPosition;
void main()
{
vec3 color;
vec2 position, useBrick;
position = MCPosition / BrickSize;
if(fract(position.y * HALF) > HALF)
position.x += HALF;
position = fract(position);
useBrick = step(position, BrickPercent);
color = mix(MortarColor, BrickColor, useBrick.x * useBrick.y);
color *= LightIntensity;
gl_FragColor = vec4(color, ONE);
}
```
```
@Override
public void onSurfaceCreated(GL10 glUnused, EGLConfig config)
{
GLES20.glClearColor(0.3922f, 0.5843f, 0.9294f, 1.0f);
GLES20.glEnable(GLES20.GL_DEPTH_TEST);
try
{
mTorus.genTorus(60, 1.25f, 0.5f);
mAngle = 45.0f;
mProgramObject = ESShader.loadProgram(mContext, "cube.vert", "cube.frag");
mModelViewLoc = GLES20.glGetUniformLocation(mProgramObject, "ModelViewMatrix");
mMVPLoc = GLES20.glGetUniformLocation(mProgramObject, "ModelViewProjectionMatrix");
mNormalMatrixLoc = GLES20.glGetUniformLocation(mProgramObject, "NormalMatrix");
mLightPositionLoc = GLES20.glGetUniformLocation(mProgramObject, "LightPosition");
mBrickColorLoc = GLES20.glGetUniformLocation(mProgramObject, "BrickColor");
mMortarColorLoc = GLES20.glGetUniformLocation(mProgramObject, "MortarColor");
mBrickSizeLoc = GLES20.glGetUniformLocation(mProgramObject, "BrickSize");
mBrickPercentLoc = GLES20.glGetUniformLocation(mProgramObject, "BrickPercent");
mPositionLoc = GLES20.glGetAttribLocation(mProgramObject, "Vertex");
mNormalLoc = GLES20.glGetAttribLocation(mProgramObject, "Normal");
}
catch(IOException ioe)
{
System.err.println("Failed to load shaders");
}
}
@Override
public void onSurfaceChanged(GL10 glUnused, int width, int height)
{
mWidth = width;
mHeight = height;
mProjection.loadIdentity();
mProjection.perspective(60.0f, (float)mWidth / (float)mHeight, 1.0f, 20.0f);
GLES20.glViewport(0, 0, mWidth, mHeight);
}
private void update()
{
if(mLastTime == 0) mLastTime = SystemClock.uptimeMillis();
long curTime = SystemClock.uptimeMillis();
long elapsedTime = curTime - mLastTime;
float deltaTime = elapsedTime / 1000.0f;
mLastTime = curTime;
// Compute a rotation angle based on time to rotate the cube
mAngle += (deltaTime * 40.0f);
if(mAngle >= 360.0f) mAngle -= 360.0f;
}
@Override
public void onDrawFrame(GL10 glUnused)
{
update();
GLES20.glClear(GLES20.GL_COLOR_BUFFER_BIT | GLES20.GL_DEPTH_BUFFER_BIT);
// Use the program object
GLES20.glUseProgram(mProgramObject);
mModelView.loadIdentity();
mModelView.translate(0.0f, 0.0f, -5.0f);
mModelView.rotate(mAngle, 1.0f, 0.0f, 0.75f);
mNormalMatrix.load(mModelView);
mNormalMatrix.invert();
mNormalMatrix.transpose();
mMVPMatrix.multiply(mModelView, mProjection);
GLES20.glUniformMatrix4fv(mModelViewLoc, 1, false, mModelView.getAsFloatBuffer());
GLES20.glUniformMatrix4fv(mMVPLoc, 1, false, mMVPMatrix.getAsFloatBuffer());
GLES20.glUniformMatrix4fv(mNormalMatrixLoc, 1, false, mNormalMatrix.getAsFloatBuffer());
GLES20.glUniform3f(mLightPositionLoc, 5.0f, 5.0f, 5.0f);
GLES20.glUniform3f(mBrickColorLoc, 0.549f, 0.239f, 0.271f);
GLES20.glUniform3f(mMortarColorLoc, 0.8f, 0.8f, 0.8f);
GLES20.glUniform2f(mBrickSizeLoc, 0.3f, 0.15f);
GLES20.glUniform2f(mBrickPercentLoc, 0.9f, 0.85f);
GLES20.glVertexAttribPointer(mPositionLoc, 3, GLES20.GL_FLOAT, false, 0, mTorus.getVertices());
GLES20.glEnableVertexAttribArray(mPositionLoc);
GLES20.glVertexAttribPointer(mNormalLoc, 3, GLES20.GL_FLOAT, false, 0, mTorus.getNormals());
GLES20.glEnableVertexAttribArray(mNormalLoc);
GLES20.glDrawElements(GLES20.GL_TRIANGLES, mTorus.getNumIndices(), GLES20.GL_UNSIGNED_SHORT, mTorus.getIndices());
}
```
| Porting Orange Book shaders to OpenGL ES 2.0 | CC BY-SA 2.5 | 0 | 2011-03-23T04:53:07.767 | 2012-09-24T19:08:48.337 | 2012-09-24T19:08:48.337 | 236,136 | 236,136 | [
"android",
"opengl-es-2.0",
"glsl"
]
|
5,401,293 | 1 | 5,401,456 | null | 0 | 196 | I am trying to create a post update script and use git as a deployment tool on a remote server.
My post-update script looks something like this
```
git update-server-info
for ref in $@;do
echo $ref
if [ "$ref" = "refs/heads/production" ]
then
ssh [email protected] GIT_WORK_TREE=/home/www/test git checkout -f production
fi
done
```
However, when I run that, an error comes back that says:
```
Not a git repository (or any of the parent directories): .git
```
Which doesn't make any sense because I am able to run git commands from within the directory over ssh.

Is there something else that I need to be doing in my post-update script?
---
I added the `GIT_DIR` variable, so now my command looks like:
```
ssh [email protected] GIT_DIR=/home/www/test/.git GIT_WORK_TREE=/home/www/test git checkout -f production
```
| Problem using Git as a Deployment Tool by branch | CC BY-SA 2.5 | null | 2011-03-23T05:44:01.730 | 2011-03-23T15:15:40.100 | 2011-03-23T15:15:40.100 | 354,247 | 354,247 | [
"git",
"bash",
"ssh",
"post-update"
]
|
5,401,346 | 1 | 5,495,018 | null | 1 | 1,202 | I am trying to get Propel to work in my Zend app, it seems that I can get the Propel library to load (from library/propel) but when called I get the exception: 'No connection information in your runtime configuration file for datasource [default]' (when I try to make a connection: 'Propel::getConnection'). My Db is not even named 'default'. I have this in my bootstrap.php from another SO question/answer:
```
require_once 'propel/Propel.php';
Propel::setConfiguration($this->getOptions('propel/MyPropel-conf.php'));
Propel::initialize();
// so we can get the connection from the registry easily
return Propel::getConnection();
```
I want the Propel configs (classmap conf as well) to be in the '/application/configs' (copies are there too right now), but I thought If I can get Propel to load from library/propel, then maybe moving my 'conf' files there, I may get them to load too. It seems that if I 'force' the config, by manually loading the params, or if I seem to get it in a temporary 'right' location (or use an absolute path), the exception I then get is this:
'Unable to open PDO connection [wrapped: SQLSTATE[28000] [1045] Access denied for user 'www-data'@'localhost'
As if Propel is not paying any attention to my configs.
My config looks like this; converted from the xml:
```
$conf = array (
'datasources' =>
array (
'unmActTestDB' =>
array (
'adapter' => 'mysql',
'connection' =>
array (
'dsn' => 'mysql://root:PASSWORD@localhost/unmActTestDB',
),
),
'default' => 'unmActTestDB',
),
'log' =>
array (
'ident' => 'propel-act',
'level' => '7',
),
'generator_version' => '1.5.6',
);
$conf['classmap'] = include(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'classmap-unmActTestDB-conf.php');
return $conf;
```
If it helps, I still have the Zend PDO DB adapter loading in the application.ini file too, would that cause a clash?. Is there a standard way to get Propel to work with Zend? Or can anyone see what I'm doing wrong?
I have been to several posts here on SO, and a couple popular posts like this one [The Adventures Of Merging Propel With Zend Framework](http://www.brandonsavage.net/the-adventures-of-merging-propel-with-zend-framework/) and this one at Zend's dev zone [Integrating Propel with the Zend Framework](http://devzone.zend.com/article/184), among others including the Propel Docs. They have been helpful, but I am really struggling with this. Thanks in advance! My current Zend Directory structure looks like this (w/ the two propel confs also in the library/propel folder:

| How do I get zend to recognize the paths to Propel ORM | CC BY-SA 2.5 | null | 2011-03-23T05:52:50.930 | 2011-03-31T03:25:37.590 | 2011-03-29T03:37:35.677 | 168,868 | 595,230 | [
"database",
"zend-framework",
"orm",
"pdo",
"propel"
]
|
5,401,387 | 1 | 5,518,904 | null | 0 | 2,448 | I have uploaded an app to the app store, and now I want to implement In App Purchase Subscription Model. I have followed the tutorial step by step but didn't find the link to Manage In App Purchase. I am appending an image also. Please have a look and let me know where I am wrong. Thanks in advance!

```
and also I can't see this icone on my iTunesConnect Home page!
```

| How to implement In App Purchase Subscription Model? | CC BY-SA 2.5 | null | 2011-03-23T05:58:16.490 | 2014-06-10T19:49:11.257 | 2011-03-23T07:32:19.660 | 390,423 | 390,423 | [
"ios4"
]
|
5,401,618 | 1 | null | null | 1 | 1,130 | i wish to limit the page of the scroll of my page to the end of content on the right div. The left div has a larger content but i want the page scroll to stop at the right div's and the left div to continue scroll within its area. I have the following script but it doesnt really seem to work:
```
<script>
window.onload=function(){
var i=10000000;
var buff='';
while(--i){
buff+='<br />';
}
document.body.innerHTML=buff;
}
</script>
```
 an idea of what the problem is..
| How to limit page scroll to the div with the least amount of content? | CC BY-SA 2.5 | null | 2011-03-23T06:32:49.300 | 2011-03-23T08:23:00.843 | 2011-03-23T08:23:00.843 | 261,689 | 494,505 | [
"javascript",
"jquery",
"css"
]
|
5,401,747 | 1 | 5,485,567 | null | 5 | 7,304 | I want to move the `UIPopoverArrowDirection` to the left such that the actual arrow is no longer centered but more 25% from the left and 75% from the right.
To help understand what I mean see the two screen shots I want it to be like the second one...


The problem is that there is no real way to dig down into the popover class...
| UIPopoverController altering location of UIPopoverArrowDirection | CC BY-SA 4.0 | null | 2011-03-23T06:48:20.050 | 2018-08-15T22:53:23.797 | 2018-08-15T22:53:23.797 | 2,370,483 | 297,201 | [
"ios",
"iphone",
"uipopovercontroller"
]
|
5,401,882 | 1 | 5,855,366 | null | 2 | 459 | There is an example in the [Mathematica 7 help for Plot > Options > ColorFunctionScaling](http://reference.wolfram.com/legacy/v7/ref/Plot.html#38928736).
```
Table[Plot[Sin[4 Pi x], {x, 0, 1/2}, PlotStyle -> Thick,
ColorFunction -> Function[{x, y}, Hue[x]],
ColorFunctionScaling -> cf], {cf, {False, True}}]
```

When I evaluate it myself on , both output plots look like the one on the .
However, if I evaluate this, I get the plot on the , as shown above:
```
Plot[Sin[4 Pi x], {x, 0, 1/2}, PlotStyle -> Thick,
ColorFunction -> Function[{x, y}, Hue[x]],
ColorFunctionScaling -> True]
```
Why might the example as given fail?
---
Alexey and Simon demonstrated that this is not the result of HoldAll, as I presumed before.
| ColorFunctionScaling example from Mathematica help fails - why? | CC BY-SA 3.0 | 0 | 2011-03-23T07:05:27.497 | 2011-05-02T09:11:24.407 | 2011-04-12T09:25:33.227 | 618,728 | 618,728 | [
"wolfram-mathematica",
"plot"
]
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.