Id
int64 1.68k
75.6M
| PostTypeId
int64 1
2
| AcceptedAnswerId
int64 1.7k
75.6M
⌀ | ParentId
int64 1.68k
75.6M
⌀ | Score
int64 -60
3.16k
| ViewCount
int64 8
2.68M
⌀ | Body
stringlengths 1
41.1k
| Title
stringlengths 14
150
⌀ | ContentLicense
stringclasses 3
values | FavoriteCount
int64 0
1
⌀ | CreationDate
stringlengths 23
23
| LastActivityDate
stringlengths 23
23
| LastEditDate
stringlengths 23
23
⌀ | LastEditorUserId
int64 -1
21.3M
⌀ | OwnerUserId
int64 1
21.3M
⌀ | Tags
list |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
4,758,234 | 1 | 4,758,618 | null | 5 | 6,228 | I am creating a file to read in a certain number of .wav files, each of these corresponding to a musical note. I am performing an FFT on each of them and plotting them all on the same figure. However I am having a problem with getting the legend to print correctly, it is separating the names I want to use into individual letters instead of using them as a string. My code is as follows:
```
clear all
mydir = 'Note Values/';
wavFiles = dir([mydir '*.wav']);
length(wavFiles)
legendText = [];
figure(1);
hold on;
for i = 1:length(wavFiles)
wavFiles(i).name
[y, fs] = wavread([mydir wavFiles(i).name]);
sound(y, fs)
currentSample = y(round(length(y)/2)-2048:round(length(y)/2)+2047);
FFT = abs(fft(currentSample));
Power = FFT.*conj(FFT)/length(FFT);
if (mod(i, 2) == 1)
h = plot(Power, 'Color', 'red');
else
h = plot(Power, 'Color', 'blue');
end
sri = wavFiles(i).name;
sri
legendText = [legendText, sri];
end
length(legendText)
legendText(1)
legend(legendText(:));
hold off;
```
The sri variable is always a full string, but legendText(1) only prints out A instead of A3.wav. I know it's probably something really obvious but I just can't find it. Thanks
The output on my graph appears as this:

| Matlab Legend after FOR loop | CC BY-SA 2.5 | null | 2011-01-21T11:24:46.880 | 2011-01-21T12:15:21.857 | null | null | 513,762 | [
"matlab",
"for-loop",
"fft",
"legend",
"figure"
]
|
4,758,445 | 1 | 4,758,446 | null | 3 | 371 | I created a test database for a CakePHP tutorial I'm working through, and just used phpMyAdmin's default settings for the engine (MyISAM.) Now that I'm several days into the tutorial, it indicates that to use some of the features, the tables need to use InnoDB.
Is it possible (either in phpMyAdmin itself or via a SQL file import) to change the tables' engine choice after they've already been created? They currently have data in them, but it's only a few records each so I don't care if I have to empty the tables out. I just don't want to have to completely recreate the tables, if at all possible.
I can't seem to find any way to do this in phpMyAdmin - the only place I can find a choice of engines is when I'm creating a brand-new table.
EDITED TO ADD SCREENSHOT AFTER RUNNING QUERY:

| Is it possible to change a database table's engine after the table has been created? | CC BY-SA 2.5 | null | 2011-01-20T23:20:33.340 | 2011-01-21T15:17:25.780 | 2011-01-21T15:17:25.780 | 341,611 | 341,611 | [
"mysql",
"phpmyadmin"
]
|
4,758,932 | 1 | null | null | 0 | 838 | OS: Windows XP Pro SP3
Issue:

> As you see - in left side is located StatusBar
Control ; In right side - TabSet Control.
What approach you would suggest to "copy" StatusBar style ( dynamic darkening of Top and Button ) into TabSet Control? Colour manipulations like or do not work ... and prop is not available either ...
Again I am too puzzled because there is a lot of options ( imho ) to choose from, but I do not know possible side-effects and level of compatibility in various Windows versions.
for any help.
> P.S. Sorry if it is hard to notice
issue I am experiencing in my little
image above, BUT if I would resize it, It
would lose quality and there might be
problems notice anything at all ..
---
StatusBar1 is Parent of TabSet1. Now it looks like this ( wrong ):

I must achieve this StatusBar1.Panels[0] and TabSet1 look ( correct ):

---
I also tried to use psOwnerDraw technique ( [http://delphi.about.com/od/vclusing/a/statusbar_owner.htm](http://delphi.about.com/od/vclusing/a/statusbar_owner.htm) ) for StatusBar1.Panels[0] and get this result:

| Use TStatusBar style and graphical effects within TTabSet control | CC BY-SA 2.5 | null | 2011-01-21T12:45:55.030 | 2011-01-22T16:34:07.913 | 2011-01-22T16:34:07.913 | 132,296 | 132,296 | [
"delphi",
"controls",
"windows-xp",
"coding-style",
"compatibility"
]
|
4,759,105 | 1 | 4,762,484 | null | 4 | 512 | I'm new to developing on the Mac and am looking to implement an interface similar to Spotlight's - the main part which seems to be an expanding table/grid view.

I was wondering if there is a component Apple provides for creating something like this or is available open source else where.
Of course if not I'll just try and work something out myself but it's always worth checking!
Thanks for your help in advance.
| Readymade Cocoa Spotlight UI Components | CC BY-SA 2.5 | 0 | 2011-01-21T13:06:21.973 | 2015-12-23T16:04:02.223 | null | null | 348,308 | [
"cocoa",
"user-interface",
"macos",
"spotlight"
]
|
4,759,499 | 1 | 4,759,861 | null | 8 | 19,175 | I am currently doing my first applet. While testing the results I want to be able to run it in eclipse in the preview windows instead of always deploying the applet into a jar and opening the page in the browser (the browser cache kills me! I always need to restart the browser...)
Anyway, when I try to run the app with "run as -> Java Applet" I got the preview but its always very small (guess below 200x200). When I change the size per hand, the window grows but the content stay that small. When I call `setSize(width, height)` the window starts bigger, the content stays small. Small doesn't mean its scaled down, it means that I only see the black panel, the white one (which is visible in the browser) is not visible so its not seemed to be scaled...
What am I missing?
My code so far (which works like expected in the broswer with width of 560 and height of 500)
```
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Dimension;
import java.awt.GridLayout;
import javax.swing.JApplet;
import javax.swing.JButton;
import javax.swing.JLabel;
import javax.swing.JPanel;
public class Benchmark extends JApplet {
private static final long serialVersionUID = -8767182603875435760L;
GridLayout gridLayout = new GridLayout(7, 1);
JButton startTests = new JButton("Start");
JPanel testPanel = new JPanel();
JPanel topPanel = new JPanel();
@Override
public void init() {
super.init();
try {
java.awt.EventQueue.invokeAndWait(new Runnable() {
public void run() {
initComponents();
invalidate();
}
});
} catch (Exception ex) {
ex.printStackTrace();
}
}
public void initComponents() {
setSize(660, 500);
topPanel.setBackground(Color.BLACK);
topPanel.setSize(500, 500);
testPanel.setBackground(Color.WHITE);
testPanel.setSize(160, 500);
getContentPane().add(topPanel, BorderLayout.WEST);
getContentPane().add(testPanel, BorderLayout.EAST);
testPanel.setLayout(gridLayout);
testPanel.add(new JLabel("Triangles"));
testPanel.add(new JLabel("Pyramids"));
testPanel.add(new JLabel("Cubes"));
testPanel.add(new JLabel("Blending"));
testPanel.add(new JLabel("Spheres"));
testPanel.add(new JLabel("Lights"));
testPanel.add(new JLabel("Mass"));
}
}
```
The screenshot should show the problem. If the window has the size of 660x500 (set with `setSize()` the visible area stays small: 
| Changing the size for my applet also in eclipse "run as applet" | CC BY-SA 2.5 | 0 | 2011-01-21T13:48:25.683 | 2011-01-21T14:37:54.863 | 2011-01-21T14:37:54.863 | 180,538 | 180,538 | [
"java",
"eclipse",
"applet"
]
|
4,759,701 | 1 | 4,759,756 | null | 1 | 5,277 | My form has a master block (`ORDER`) and a detail block (`ORDER_LINE`). The `ORDER` block has an `ORDER_ID` item (it's primary key) defined as follows:

The `ORDER_LINE` block uses the `ORDER.ORDER_ID` item as an argument to query its records:


The `ORDERING_PACKAGE.QUERY_ORDER_LINES` procedure is declared as follows:
```
PROCEDURE
query_order_lines
(
order_lines IN OUT ORDER_LINE_CURSOR_TYPE,
order_id NUMBER,
line_number VARCHAR2,
bin VARCHAR2,
plu VARCHAR2,
description VARCHAR2
);
```
When I attempt to compile my Oracle Form ( + ), I receive an error like this:
According to the documentation, the recommended solution is:
> Cause: The value entered for the specified datatype is invalid. Action: Correct one or more of the following:
1. The datatype of the argument corresponding to the given value in the procedure argument list of the specified procedure.
2. The value of the argument in the procedure argument list of the specified procedure.
Neither of these recommendations work:
1. The data type of the argument in the form (NUMBER) is identical to the data type of the procedure's parameter (NUMBER).
2. The value of the argument (ORDER.ORDER_ID) is also of type NUMBER (see first screen shot)
How do I resolve this error?
| How do I resolve an "FRM-30408: Invalid value" error in Oracle Forms? | CC BY-SA 2.5 | 0 | 2011-01-21T14:06:46.100 | 2011-01-21T14:24:56.990 | 2011-01-21T14:24:56.990 | 41,619 | 41,619 | [
"oracle",
"plsql",
"oracleforms"
]
|
4,759,880 | 1 | 4,759,909 | null | 8 | 4,753 | I use this code to get the number of columns from a CSV file:
```
$this->dummy_file_handler = fopen($this->config['file'],'r');
if ($dataset =fgetcsv($this->dummy_file_handler))
{
$this->number_of_columns = count($dataset);
}
```
It works fine the file is exported with Excel for Mac 2011 since the new line character is then which `fgetcsv` doesn't recognize.

If I change the newline from Classic Mac (CR) to Unix (LR), then it works, but I need this to be automated.
`fgetcsv`
| How can I make PHP's fgetcsv() to recognize the Classic Mac (CR) new line character? | CC BY-SA 2.5 | null | 2011-01-21T14:24:34.380 | 2011-01-21T14:35:33.787 | null | null | 4,639 | [
"php",
"newline",
"fgetcsv"
]
|
4,759,946 | 1 | 4,760,910 | null | 0 | 853 | I have an action sheet that I am displaying in landscape mode.
```
sheet2 = [[[UIActionSheet alloc]
initWithTitle:@"\n\n\n\n\n\n\n\n\n"
delegate:self
cancelButtonTitle: nil destructiveButtonTitle:nil
otherButtonTitles:NSLocalizedString(@"Merge", @"Merge button text"),NSLocalizedString(@"Refresh", @"Refresh button text"), nil]
autorelease];
```
How do I set the frame of it so that it looks proper in my view? See I don't want this gap between the text and the buttons.
| UIAction sheet frame | CC BY-SA 2.5 | null | 2011-01-21T14:29:56.457 | 2011-01-21T16:05:04.097 | 2011-01-21T15:04:59.710 | null | null | [
"iphone"
]
|
4,759,947 | 1 | 4,759,997 | null | 3 | 7,767 | i have one view >> subview mkmapview .
in that i want to show image . ...my current image is like this.
and i want to show like this

how can i do this ? how can i add image in this anotation.
| how can I show an image in map pin annotation? | CC BY-SA 3.0 | 0 | 2011-01-21T14:30:02.773 | 2015-10-07T11:22:30.890 | 2012-09-30T17:17:11.843 | 1,290,178 | null | [
"iphone",
"mkmapview"
]
|
4,759,950 | 1 | 4,768,942 | null | 2 | 985 | I've been working with a custom ExpandableList (see example picture below) where each item always has one child. This child consists of three parts. Each part has a header (red bars) and below that an Empty item OR a list of items. The length of this list will vary.
The first way I tried to do this is by adding a ViewStub below the empty item, which I inflated with a custom view, which also contained a ViewStub at the end which I inflated in turn for the next item, thus adding items recursively to create this sort of list of items. Sadly this resulted in StackOverflowError's when the list became too long (With short lists this worked perfectly).
So on my second try I tried using a ListView with a custom adapter instead. Sadly this list only used a small part of my screen and the rest of the items where occluded behind the header of the next part (This mini list looked scrollable as a second scrollbar appeared next to it, but it did not scroll. Not that I would consider this scrolling inside a scrolling list to be a good solution, but just wanted to mention this).
Can anyone tell me how I can tell this list of items to not be scrollable and take up all the room that it needs (does it know what size it is going to be when the child node is created??) or help me with a alternative solution to my problem? (Ooh, and I have considered putting an unholy amount of ViewStubs inside my layout, but that just seems idiotic and really bad practice. Correct me if I'm wrong)

| How to use a ListView inside a ExpandableList? | CC BY-SA 2.5 | 0 | 2011-01-21T14:30:37.860 | 2011-01-22T16:14:30.287 | null | null | 562,365 | [
"android",
"listview",
"expandablelistview"
]
|
4,760,034 | 1 | null | null | 3 | 7,742 | I was was just wondering how to get this kind of design done when things are fetched dynamically? I mean there has to be only one class which can be used to get the background colour depending upon whether block is odd or even. I hope my requirements are clear: background color varying with the odd or even number for the rows.

| How do I style the background color of alternating table rows? | CC BY-SA 2.5 | null | 2011-01-21T14:39:33.320 | 2011-01-21T15:07:55.440 | 2011-01-21T15:07:55.440 | 229,044 | 197,241 | [
"html",
"css"
]
|
4,760,110 | 1 | 4,760,288 | null | 0 | 116 | 
I don't mean in terms of how to implement it. i mean i dont like how the date is displayed with the bars. what other type of chart would be more suitable. I know a threadhold line wouldnt work beacause the values of the capacity are different for each day. if they were all the same a threadhold line indicating capacity would work
| What type of chart would be best for displaying this data? | CC BY-SA 2.5 | null | 2011-01-21T14:46:24.490 | 2011-01-30T20:25:39.440 | 2011-01-30T20:25:39.440 | 521,180 | 521,180 | [
"presentation"
]
|
4,760,314 | 1 | 4,760,404 | null | 1 | 1,196 | Here's the list and items:
```
<ul>
<li>
<a href="#">Home</a>
</li>
<li>
<a href="#">Forums</a>
<ul>
<li>
<a href="#">Baseball</a>
<ul>
<li>
<a href="#">Trading</a>
</li>
<li>
<a href="#">Personal Collections</a>
</li>
<li>
<a href="#">Box Breaks</a>
</li>
</ul>
</li>
<li>
<a href="#">Basketball</a>
<ul>
<li>
<a href="#">Trading</a>
</li>
<li>
<a href="#">Personal Collections</a>
</li>
<li>
<a href="#">Box Breaks</a>
</li>
</ul>
</li>
<li>
<a href="#">Football</a>
<ul>
<li>
<a href="#">Trading</a>
</li>
<li>
<a href="#">Personal Collections</a>
</li>
<li>
<a href="#">Box Breaks</a>
</li>
</ul>
</li>
<li>
<a href="#">Hockey</a>
<ul>
<li>
<a href="#">Trading</a>
</li>
<li>
<a href="#">Personal Collections</a>
</li>
<li>
<a href="#">Box Breaks</a>
</li>
</ul>
</li>
</ul>
</li>
</ul>
```
Here's the CSS:
```
ul
{
margin: 0;
padding: 0;
list-style: none;
width: 100px;
border-bottom: 1px solid #ccc;
}
a
{
color: #777;
}
a:hover
{
background-color: #fff;
}
ul li
{
position: relative;
}
li ul
{
display: inline;
position: absolute;
left: 99px;
top: 0;
display: none;
}
li ul li ul
{
width: 150px;
}
ul li a
{
display: block;
text-decoration: none;
background: #bad8f8;
padding: 2px 0 2px 10px;
border: 1px solid #ccc;
border-bottom: 0;
}
li:hover > ul
{
display: block;
}
```
What I want to happen is when I hover over Forums, it highlight white. Then if I go over Basketball, Forum and Basketball are highlighted white. And the same goes for the children. I want to be able to show a path so when they over over something, while positioning should be able to tell them which one they're accessing, I want the highlighting to make it clear. Any help would be appreciated. Oh, and please no Javascript if possible. Thanks.
This is what it looks like now when I hover over the last child:

And the red circled ones I also want to be highlighted white.

This is what I'm going to have to accept. It's ugly, for now, but that's the best I can come up with.

| HTML & CSS Multi-tiered Dropdown menu, need help with hover coloring | CC BY-SA 2.5 | null | 2011-01-21T15:05:38.683 | 2012-06-02T13:17:14.263 | 2012-06-02T13:17:14.263 | 480,659 | 419,603 | [
"html",
"css",
"html-lists",
"stylesheet",
"drop-down-menu"
]
|
4,760,724 | 1 | 4,761,055 | null | 4 | 4,546 | For some reason Google Analytics is appending index.cfm to the end of all of my URLs when I look at them in GA. The domain used to be ColdFusion based, but is now a WordPress PHP website running on an Apache server without ColdFusion installed.
We've added new pages to the website, and GA is still reporting an index.cfm at the end of the URL, even though that page never existed on the old ColdFusion site.
I didn't set up the GA account initially, is there maybe a setting that was enabled? Or does it take GA a while to figure out it's not a ColdFusion website anymore?
By the way, the website in question is [http://www.westgatereservations.com](http://www.westgatereservations.com). Thanks.
Screenshot of page list from Google Analytics. All of these pages are WordPress PHP pages that use a clean permalink URL structure.

| Google Analytics appending index.cfm to end of my URLs | CC BY-SA 2.5 | null | 2011-01-21T15:46:21.940 | 2012-06-18T10:29:08.003 | 2011-01-21T20:30:46.447 | 58,795 | 58,795 | [
"google-analytics"
]
|
4,760,839 | 1 | null | null | 0 | 2,972 | Given the image below:

How can I access the `Queries.resx`?
Here is what's inside the .resx file. I want to get the value.

| How to access solution items? c# winforms | CC BY-SA 2.5 | null | 2011-01-21T15:58:47.897 | 2011-01-21T16:06:58.617 | 2011-01-21T16:06:58.617 | 396,335 | 396,335 | [
"c#",
"winforms"
]
|
4,760,878 | 1 | 4,761,134 | null | 2 | 4,348 | It seems I don't understand the concept of userstate in a backgroundworker.
I am encountering a problem in an application I'm working on and I need an explanation for why something is happening that I didn't expect.
I have built a demo app to reproduce the issue more simply:
```
public class Tester
{
private BackgroundWorker _worker = new BackgroundWorker();
public void performTest()
{
Tester tester = new Tester();
tester.crunchSomeNumbers((obj, arg) =>
{
WorkerArgument userState = arg.UserState as WorkerArgument;
Console.WriteLine(string.Format("Progress: {0}; Calculation result: {1}", arg.ProgressPercentage, userState.CalculationResult));
});
}
public void crunchSomeNumbers(Action<object,ProgressChangedEventArgs> onProgressChanged)
{
_worker.DoWork += new DoWorkEventHandler(worker_DoWork);
_worker.ProgressChanged += new ProgressChangedEventHandler(onProgressChanged);
_worker.WorkerReportsProgress = true;
_worker.RunWorkerAsync(new WorkerArgument { CalculationResult=-1, BaseNumber = 10 });
}
void worker_DoWork(object sender, DoWorkEventArgs e)
{
BackgroundWorker worker = sender as BackgroundWorker;
WorkerArgument arg = e.Argument as WorkerArgument;
for (int i = 0; i < 10; i++)
{
// calculate total with basenumber
double result = arg.BaseNumber * (i * 10);
arg.CalculationResult = result;
worker.ReportProgress(i * 10, arg);
}
}
public class WorkerArgument
{
public int BaseNumber { get; set; }
public double CalculationResult { get; set; }
}
}
```
If you run this code in a console App:
```
class Program
{
static void Main(string[] args)
{
Tester tester = new Tester();
tester.performTest();
Console.ReadLine();
}
}
```
This is the result:

What I don't understand is why the calculation result is always the same while you can clearly see that it should be different on each calculation run in the forloop of the DoWork method.
| Problem with BackgroundWorker and UserState on ProgressChanged Callback | CC BY-SA 2.5 | null | 2011-01-21T16:02:23.903 | 2011-01-21T23:32:44.340 | 2011-01-21T17:04:45.340 | 83,528 | 83,528 | [
"c#",
"multithreading",
"backgroundworker"
]
|
4,760,970 | 1 | 4,761,334 | null | 3 | 82 | Here is my problem:

The keyboard covers up the EditText. How can I prevent this from happening? Here is my original view (without the keyboard):

| Make entire EditText viewable? | CC BY-SA 2.5 | 0 | 2011-01-21T16:09:22.437 | 2011-01-21T16:41:07.500 | null | null | 200,477 | [
"java",
"android",
"android-edittext",
"android-softkeyboard"
]
|
4,761,859 | 1 | 4,762,146 | null | 2 | 405 | I have a set of left floated DIVs inside of flexible container (part #1), when container is resized in a way that it can't contain all of the DIVs in a single row instead of default behavior (2) I want the rows to be perfectly aligned maintaining spaces where needed (table-like behavior), as shown in part #3.
Is it possible to accomplish this using CSS and HTML alone?

| Aligning floated DIVs in a flexible container | CC BY-SA 2.5 | null | 2011-01-21T17:28:21.527 | 2011-01-21T17:59:32.027 | null | null | 179,746 | [
"html",
"css",
"alignment"
]
|
4,761,866 | 1 | 5,064,910 | null | 1 | 1,802 | I am using code (not written by me) with dependencies on GSON libraries. I have downloaded the libraries and when I try to include them in the project I get a duplication error. Specifically:
```
Error generating final archive: Found duplicate file for APK: assembly-descriptor.xml
```
Here's a screenshot of the error:

I don't have a lot of experience with using external libraries. Can anyone help me out?
Thanks in advance.
| Does anyone know how to get rid of this error while trying to use GSON libraries? | CC BY-SA 2.5 | null | 2011-01-21T17:28:44.100 | 2011-10-30T10:08:52.920 | null | null | 348,261 | [
"android",
"libraries",
"apk",
"gson",
"duplication"
]
|
4,761,948 | 1 | 4,763,329 | null | 3 | 1,265 | Does anyone know how to place out an arrow that points to a specific annotation depending on my current heading. For example; I want the arrow to be vertical when the current heading is the same as the annotation's coordinates.
I am offering 50$ to the one doing this thing for me via paypal
Have a look at the picture below;

.
| Showing an arrow that is heading a specific location | CC BY-SA 2.5 | 0 | 2011-01-21T17:37:59.637 | 2011-02-02T17:59:24.703 | 2011-01-29T20:15:05.373 | 543,570 | 543,570 | [
"iphone",
"ios4",
"compass-geolocation",
"cllocationmanager",
"cllocation"
]
|
4,762,013 | 1 | 4,763,036 | null | 2 | 1,187 | I have written a Windows service that I would like to keep Administrators from casually tampering with by removing their right to start/stop it.
Granted, an , or even an admin can still suspend the service's threads or delete the service, but .
I can do this using Process Explorer quite easily (see below) but I am not sure where to begin with Delphi. I've browsed the [SetAcl C++ source code](http://sourceforge.net/projects/setacl/files/) (and I may use their OCX file), but I'd prefer to use a native Delphi solution if one already exists. If not, I'll work on cloning SetAcl functionality.
Does anyone have experience with this that they could share?

NOTE: I had advocated a screen capture tool written in Delphi in this post and I am removing it b/c it is unrelated. I'm leaving this note here so the comments will still make sense! Regards.
| How can I change the permissions on a service with Delphi? | CC BY-SA 2.5 | null | 2011-01-21T17:45:00.610 | 2011-01-21T22:40:27.253 | 2011-01-21T21:03:12.030 | 12,458 | 12,458 | [
"delphi",
"winapi"
]
|
4,762,025 | 1 | 4,762,062 | null | 1 | 1,516 | I have set up a ASP.net MVC application which uses the default forms authentication. It uses the ASPNETDB.mdf like shown here:

I then set up another database connection which is similar to the NerdDinner.mdf file above.
I have a post that belongs to a user. It has a UserId value which needs to be a foreign key to the information in ASPNETDB.mdf. When I go to add a foreign key, I can only see information with regards to the table I made. How do I go about doing this?
| How can I add a foreign key from a table in another database connection? | CC BY-SA 2.5 | null | 2011-01-21T17:45:59.047 | 2011-01-21T17:50:15.767 | null | null | 83,452 | [
"asp.net",
"asp.net-mvc",
"foreign-keys"
]
|
4,762,048 | 1 | 4,762,130 | null | 1 | 2,727 | How to enable exceptions in XCode - 3.2.3. Is there any flag like I should enable for the compiler for exception handling? Tried googling but didn't find enough information on XCode with `C++` !
```
#include <iostream>
#include <exception>
int main()
{
try
{
int i=5,j=0;
int res = i/j;
}
catch (const std::exception& exe)
{
std::cerr<< exe.what();
}
catch (...)
{
std::cout<< "\n Default Exception Handler \n";
}
return 0;
}
```
Output:
> Loading program into debugger…
Program loaded.
run
[Switching to process 1332]
Running…
Program received signal: “EXC_ARITHMETIC”.
sharedlibrary apply-load-rules all
kill
Current language: auto; currently c++
quit
The Debugger has exited with status 0.(gdb)
Edit :Though the reason seems to be different, to anyone, this figure might be helpful in future.
| How to enable Exception Handling on XCode 3.2.3? | CC BY-SA 2.5 | null | 2011-01-21T17:49:18.997 | 2011-01-21T18:18:48.373 | 2011-01-21T18:18:48.373 | 528,724 | 528,724 | [
"c++",
"xcode",
"gdb"
]
|
4,762,300 | 1 | 4,767,048 | null | 7 | 2,217 | I've noticed that when playing audio in java, MarkSweepCompact stage in gc is too long and results in short periods of silence, which is unacceptable. So I need to use a low pause gc. I've tried Parallel and CMS, they seem to work better because I suppose the pause is shorter and they don't do full collection as often as the default one.
So far I've tested my program with the following options for ParallelGC:
```
-XX:+UseParallelGC
-XX:MaxGCPauseMillis=70
```
and for ConcurrentMarkSweep:
```
-XX:+UseConcMarkSweepGC
-XX:+CMSIncrementalMode
-XX:+CMSIncrementalPacing
```
I also tried G1GC, but it's still experimental in java 6. Options for both modes:
```
-Xms15m
-Xmx40m
-XX:+UnlockExperimentalVMOptions
-XX:+CMSClassUnloadingEnabled
-XX:+TieredCompilation
-XX:+AggressiveOpts
-XX:+UseAdaptiveSizePolicy
-Dsun.java2d.noddraw=false
-Dswing.aatext=true
-XX:MaxPermSize=25m
-XX:MaxHeapFreeRatio=10
-XX:MinHeapFreeRatio=10
```
Which GC is better in this situation? Can any of these settings be optimized for best CPU performance and minimal memory usage as well?
To recognize the pause I record time to write audio data to the output line, usually it's between 92 to 120 ms (I'm writing 16384 bytes = ~92ms), ad when Full GC is run, it's 200+ ms:
```
65.424: [Full GC (System) [PSYoungGen: 872K->0K(2432K)] [PSOldGen: 12475K->12905K(16960K)] 13348K->12905K(19392K) [PSPermGen: 15051K->15051K(22272K)], 0.2145081 secs] [Times: user=0.20 sys=0.00, real=0.21 secs]
Was writing 16384 bytes, time to write 263 ms
```
Allocation pattern for my app is the following: it loads bunch of objects at startup, then it starts playing and I guess most of the objects after that are allocated by the gui, because staring/pausing the audio doesn't change the GC graph much. This is what visualgc shows with parallel gc:

The graph starts at startup and I start playback. Labeled are
1) sound delay and full gc, I think it increased Old size:
```
101.646: [Full GC [PSYoungGen: 64K->0K(6848K)] [PSOldGen: 15792K->12773K(19328K)] 15856K->12773K(26176K) [PSPermGen: 15042K->14898K(23808K)], 0.2411479 secs] [Times: user=0.19 sys=0.00, real=0.24 secs]
```
2) I open the app window and pause playback. Nothing really changes, a bit later it increases eden size.
3) I open the windows and start playback again.
So I need to increase allocated Old Gen size? How do I do that? I'm running with -XX:NewRatio=10 and -XX:NewSize=10m
Thank you.
| Tuning GC for Java audio application | CC BY-SA 2.5 | null | 2011-01-21T18:16:29.600 | 2021-12-23T17:40:00.110 | 2011-01-23T07:40:32.537 | 143,585 | 143,585 | [
"java",
"performance",
"audio",
"garbage-collection"
]
|
4,762,700 | 1 | 4,762,813 | null | 8 | 23,135 | I wrote an asp.net application with default.aspx. When I hit this page It is asking me windows login popup window. My application should me windows authentication required but it should "Integrated Windows authentication". If I enter login password I am able to see my page.
How can I automatically integrate this windows authentication?
I added below code in web.config. still doesn't work.
```
<authentication mode="Windows"/>
<identity impersonate="false"/>
<authorization>
<deny users="?"/>
</authorization>
```

| How to automatically authenticate windows integrate without login popup? | CC BY-SA 2.5 | 0 | 2011-01-21T18:59:32.040 | 2011-01-21T19:38:28.150 | null | null | 158,008 | [
"c#",
"asp.net",
"iis"
]
|
4,762,713 | 1 | 8,981,214 | null | 2 | 584 | I would like to know how can I create something that looks like what the Twitter guys put in their UITableView.
The screenshot is the following:

What I am referring to are the four-cells-in-one that looks so good to summarise things up.
Do you have any clue? I though about [UIBezierPath](http://developer.apple.com/library/ios/#documentation/uikit/reference/UIBezierPath_class/Reference/Reference.html) but I can't achieve that.
My idea is to create 4 png files and then apply those images to 4 buttons and drop them in a cell. I can't use Photoshop, really. I'm so denied.
Thank you for any suggestions/hunches you can give to me
| UIButton with a single rounded corner | CC BY-SA 2.5 | null | 2011-01-21T19:01:29.947 | 2012-01-24T02:02:02.080 | null | null | 340,322 | [
"iphone",
"uitableview",
"uibutton"
]
|
4,763,141 | 1 | 4,766,712 | null | 5 | 10,763 | Looking to figure out the proper way to model the below requirements.
1. There are 3 types of “parties” to be concerned with, a Fan, a Band, and a BandMember.
2. That BandMember will always be associated with a Band and can also be a Fan of any band.
3. There are common attributes between a Fan, a Band, and a BandMember, but each of these 3 will also have their own unique attributes.
4. A Fan can be a fan of of any Band or none at all
This is a small part of a bigger thought but it is creating confusion in expanding the model. I believe it would have to be diagram 2 or some other option since I don't see how a BandMember can be associated with a Band in the first model.
I appreciate any input.


| Data Modeling: Supertype / Subtype | CC BY-SA 2.5 | 0 | 2011-01-21T19:51:51.253 | 2022-10-25T15:46:35.307 | 2011-01-22T00:48:27.843 | 527,298 | 527,298 | [
"database",
"database-design",
"relational-database",
"database-schema",
"datamodel"
]
|
4,763,233 | 1 | null | null | 5 | 4,671 | Friend's
I need to get slider pop up window,when i click a tab control available at bottom.when i click the tab,i need to show the slider pop up from bottom to top animated to show the login button,after login i have to move my actual tab Activity.How can i get the view for slider pop up.
lets refer the screenshots,i attached here what i need exactly..
.
From these when user to choose login at the time second screen appears looks like it.

How can i get the view like this above.
Thanks in advance..
| Need help to get Slider popup window | CC BY-SA 2.5 | 0 | 2011-01-21T20:00:56.673 | 2011-07-07T19:43:41.960 | 2011-01-24T08:54:53.630 | 393,953 | 393,953 | [
"android"
]
|
4,763,320 | 1 | 4,786,327 | null | 5 | 3,188 | I am playing with the Kinect driver, CL NUI and trying to get the relative depth of items.
The Library provides a way to get an image representing the depth of an object on the screen. Here is an example:

Is there an easy way to convert from the pixel color to the images depth? For example, the closest color could be depth of 0, and the farthest color could be the depth of 1.
Does anyone know how to do that?
I found these cacluations on how to convert the depth data to color, what I want is the inverse:
```
float RawDepthToMeters(int depthValue)
{
if (depthValue < 2047)
{
return float(1.0 / (double(depthValue) * -0.0030711016 + 3.3309495161));
}
return 0.0f;
}
Vec3f DepthToWorld(int x, int y, int depthValue)
{
static const double fx_d = 1.0 / 5.9421434211923247e+02;
static const double fy_d = 1.0 / 5.9104053696870778e+02;
static const double cx_d = 3.3930780975300314e+02;
static const double cy_d = 2.4273913761751615e+02;
Vec3f result;
const double depth = RawDepthToMeters(depthValue);
result.x = float((x - cx_d) * depth * fx_d);
result.y = float((y - cy_d) * depth * fy_d);
result.z = float(depth);
return result;
}
Vec2i WorldToColor(const Vec3f &pt)
{
static const Matrix4 rotationMatrix(
Vec3f(9.9984628826577793e-01f, 1.2635359098409581e-03f, -1.7487233004436643e-02f),
Vec3f(-1.4779096108364480e-03f, 9.9992385683542895e-01f, -1.2251380107679535e-02f),
Vec3f(1.7470421412464927e-02f, 1.2275341476520762e-02f, 9.9977202419716948e-01f));
static const Vec3f translation(1.9985242312092553e-02f, -7.4423738761617583e-04f, -1.0916736334336222e-02f);
static const Matrix4 finalMatrix = rotationMatrix.Transpose() * Matrix4::Translation(-translation);
static const double fx_rgb = 5.2921508098293293e+02;
static const double fy_rgb = 5.2556393630057437e+02;
static const double cx_rgb = 3.2894272028759258e+02;
static const double cy_rgb = 2.6748068171871557e+02;
const Vec3f transformedPos = finalMatrix.TransformPoint(pt);
const float invZ = 1.0f / transformedPos.z;
Vec2i result;
result.x = Utility::Bound(Math::Round((transformedPos.x * fx_rgb * invZ) + cx_rgb), 0, 639);
result.y = Utility::Bound(Math::Round((transformedPos.y * fy_rgb * invZ) + cy_rgb), 0, 479);
return result;
}
```
My Matrix Math is weak, and I'm not sure how to reverse the calculations.
| Using the CL NUI Kinect drivers, convert depth color to actual relative distance | CC BY-SA 2.5 | 0 | 2011-01-21T20:11:11.753 | 2012-11-14T17:36:40.790 | 2011-01-21T20:39:43.553 | 12,243 | 12,243 | [
"c#",
"3d",
"kinect"
]
|
4,763,335 | 1 | 4,764,037 | null | 6 | 5,382 | I am working on porting a VB6 application to .NET and one of the desired UI elements is a horizontal listbox. I can't seem to figure out how to replicate this in .NET.
1. Can this be done with basic winforms?
2. How would you replicate this?
Sample:

The VB6 code that will replicate the above image:
```
Private Sub Form_Load()
lst_horizontal(1).FontSize = 6
Dim iMaxChoices As Integer
iMaxChoices = 10
For i = 1 To iMaxChoices
lst_horizontal(1).AddItem (" " + CStr(i))
Next i
End Sub
Private Sub lst_horizontal_Click(Index As Integer)
Dim iMaxChoices As Integer
iMaxChoices = 10
For i = 0 To iMaxChoices - 1
If lst_horizontal(1).Selected(i) Then
Debug.Print ("Item " + CStr(i + 1) + " selected")
End If
Next i
```
Weasel words: I can figure out how to replicate this in Silverlight/XAML, but this app can't be done in that fashion.
| How does one make a horizontal listbox in .NET | CC BY-SA 2.5 | null | 2011-01-21T20:13:34.310 | 2013-12-10T17:16:57.410 | 2011-01-21T20:15:46.107 | 106,403 | 136,450 | [
"vb.net",
"winforms"
]
|
4,763,864 | 1 | 4,766,885 | null | 0 | 696 | is awesome for displaying data with , but it doesn't exactly have great documentation.
I'm having a problem with the grid when the grid has only one element to display. For some reason, it's aligning the single row to the bottom rather than to the top.
Here's a picture of a :

Here are the jqgrid I'm passing in:
```
jQGridOptions = {
"recordtext": '{0} - {1} of {2}',
"url": 'data.json',
'datatype': 'json',
'mtype': 'GET',
'colModel': [
{ 'name': 'Rank', 'align': 'center', 'index': 'Rank', 'sortable': false, 'search': false },
{ 'name': 'Name', 'index': 'Name', 'sortable': false, 'search': true },
{ 'name': 'Score', 'index': 'Score', 'sortable': false, 'search': false }
],
'pager': '#ranking-pager',
'rowNum': 10,
'altRows': true,
'scrollOffset': 0,
'colNames': ["Rank", "Name", "Score"],
'width': 696,
'height': 'auto', // '100%', // 300,
'page': 1,
'sortname': 'Rank',
'sortorder': "asc",
'hoverrows': true,
'viewrecords': true,
'gridComplete': function () {
$('.ui-jqgrid-bdiv').jScrollPane({ showArrows: true, scrollbarWidth: 17, arrowSize: 17, scrollbarMargin: 0 });
if (selectedRank !== -1) {
selectRank(selectedRank);
selectedRank = -1;
}
},
'jsonReader': {
id : 'Rank',
'repeatitems': false
}
};
```
As requested, here's the result from :
```
{
"page":1,
"total":1,
"records":1,
"rows": [{
"Name":"Gil Agostini",
"Score":94,
"Rank":1
}]
}
```
:
```
$(document).ready(function () {
$("#ranking-table").jqGrid(jQGridOptions);
});
```
```
<div style="float: left;">
<div class="hvy-border1">
<div class="hvy-border2">
<div class="hvy-top-left hvy-corner">
<div>
<!-- -->
</div>
</div>
<div class="hvy-top-right hvy-corner">
<div>
<!-- -->
</div>
</div>
<div class="clear">
<!-- -->
</div>
<div id="table-and-pager" style="margin: 3px;">
<table id="ranking-table" class="scroll" cellpadding="0" cellspacing="0" style="height: 300px">
</table>
<div id="ranking-pager" class="scroll" style="text-align: center;">
</div>
</div>
<div class="clear">
<!-- -->
</div>
<div class="hvy-bottom-left hvy-corner">
<div>
<!-- -->
</div>
</div>
<div class="hvy-bottom-right hvy-corner">
<div>
<!-- -->
</div>
</div>
</div>
</div>
</div>
```
Can anyone give me any clue what I maybe doing wrong here?
How do I get the row to align to the top rather than the bottom?
| How does one align a single row to the top in JQGrid? | CC BY-SA 2.5 | null | 2011-01-21T21:13:18.653 | 2011-01-22T22:41:08.540 | 2011-01-22T22:41:08.540 | 25,847 | 25,847 | [
"javascript",
"jquery",
"jqgrid",
"paging"
]
|
4,764,023 | 1 | null | null | 0 | 322 | I have the following association.. GroupFile has a one to many relationship with MappedFolders (via the MappedFolder navigation property).

I would expect the next line to do an update:
```
groupFile.MappedFolder = _mappedFoldersRepository.Query(m => m.FolderName == "Unassigned").FirstOrDefault();
```
The Query (according to the profiler) is executing this SQL:
```
SELECT TOP ( 1 ) [Extent1].[MappedFolderId] AS [MappedFolderId],
[Extent1].[FolderPath] AS [FolderPath],
[Extent1].[FolderName] AS [FolderName],
[Extent1].[HotFolder] AS [HotFolder],
[Extent1].[Workstation] AS [Workstation]
FROM [dbo].[MappedFolders] AS [Extent1]
WHERE N'Unassigned' = [Extent1].[FolderName]
```
But according to Entity Framework Profiler, the assignment itself is executing this SQL statement prior to beginning the transaction:
```
SELECT [Extent1].[Id] AS [Id],
[Extent1].[Path] AS [Path],
[Extent1].[Status] AS [Status],
[Extent1].[DateAdded] AS [DateAdded],
[Extent1].[DateLastUpdated] AS [DateLastUpdated],
[Extent1].[JobSetup_SetupId] AS [JobSetup_SetupId],
[Extent1].[Group_GroupId] AS [Group_GroupId],
[Extent1].[MappedFolder_MappedFolderId] AS [MappedFolder_MappedFolderId]
FROM [dbo].[GroupFiles] AS [Extent1]
WHERE [Extent1].[MappedFolder_MappedFolderId] = 7 /* @EntityKeyValue1 */
```
I must be missing something subtle (or not so subtle) but I'm not sure why that SQL statement is needed....
UPDATE:
Looking further into what the profiler is telling me, the SQL Statement is associated with the following:
```
public virtual MappedFolders MappedFolder
{
get { return _mappedFolder; }
set
{
if (!ReferenceEquals(_mappedFolder, value))
{
var previousValue = _mappedFolder;
_mappedFolder = value;
FixupMappedFolder(previousValue);
}
}
}
private void FixupMappedFolder(MappedFolders previousValue)
{
if (previousValue != null && previousValue.GroupFiles.Contains(this))
{
previousValue.GroupFiles.Remove(this);
}
if (MappedFolder != null)
{
// THIS IS WHAT THE SQL STATEMENT IS FOR!!!!!
if (!MappedFolder.GroupFiles.Contains(this))
{
MappedFolder.GroupFiles.Add(this);
}
}
}
```
The generated code is checking the GroupFiles collection of the mapped folder to see if it has already been added?
| Entity Framework Association Performance | CC BY-SA 2.5 | null | 2011-01-21T21:34:24.903 | 2011-01-22T00:52:33.547 | 2011-01-22T00:52:33.547 | 450,139 | 450,139 | [
"entity-framework",
"entity-framework-4"
]
|
4,764,179 | 1 | 4,764,380 | null | 0 | 740 | have an idea to solve this problem?
This is the respectly:
 
This is working code:
```
- (UITableViewCell *)[...] cellForRowAtIndexPath:(NSIndexPath *)indexPath {
@try {
newsRow = ((NewsRowController *)[tableView dequeueReusableCellWithIdentifier:@"cell"]);
if (newsRow == nil) {
if ( [[Device GetModel] isEqualToString:@"iPad Simulator"] ||
[[Device GetModel] isEqualToString:@"iPad"])
[[NSBundle mainBundle] loadNibNamed:@"NewsRow_ipad" owner:self options:nil];
else [[NSBundle mainBundle] loadNibNamed:@"NewsRow" owner:self options:nil];
if ([tableArray count] > 0)
[newsRow setData:[tableArray objectAtIndex:indexPath.row]];
}
}
@catch (NSException * e) {
NSLog(@"a!!!!!");
}
return newsRow;
}
```
...but because in my 3g device it's i changed the code in this way, inserting Device check in viewDidLoad and pass it in `cellForRowAtIndexPath`:
```
NSArray *cRow;
@property (nonatomic, retain) NSArray *cRow;
[...]
@syntetize cRow;
- (void)viewDidLoad {
[...]
if ( [[Device GetModel] isEqualToString:@"iPad Simulator"]
||
[[Device GetModel] isEqualToString:@"iPad"])
cRow = [[[NSBundle mainBundle] loadNibNamed:@"NewsRow_ipad" owner:self options:nil] retain];
else cRow = [[[NSBundle mainBundle] loadNibNamed:@"NewsRow" owner:self options:nil] retain];
[...]
}
- (UITableViewCell *)[...] cellForRowAtIndexPath:(NSIndexPath *)indexPath {
@try {
newsRow = ((NewsRowController *)[tableView dequeueReusableCellWithIdentifier:@"cell"]);
if (newsRow == nil) {
//
// ADDED CODE.
//
newsRow = [cRow objectAtIndex:0];
//
if ([tableArray count] > 0)
[newsRow setData:[tableArray objectAtIndex:indexPath.row]];
}
}
@catch (NSException * e) {
NSLog(@"a!!!!!");
}
return newsRow;
}
```
Now the table show me only a row. If i scroll, the row change, but it show only one row...

What's the problem?
Any helps?
thanks,
A
| Problem with cellForRowAtIndexPath and NSBundle mainBundle | CC BY-SA 2.5 | 0 | 2011-01-21T21:52:02.137 | 2011-01-21T22:15:43.737 | null | null | 88,461 | [
"objective-c",
"uitableview",
"nsbundle",
"custom-cell"
]
|
4,764,236 | 1 | 4,764,255 | null | 4 | 5,986 | Im completely lost with this one. Ok so I create a button with CSS, take a look at the CSS code:
```
.UploadPhotos a:link{
display:block;
width:100px;
height:22px;
padding-top:2px;
margin-left:auto;
margin-right:auto;
text-align:center;
background:url(../images/btn_image.png) 0 0 no-repeat;
text-decoration:none;
color:#FFF;
}
.UploadPhotos a:hover{
background-position: 0 -24px;
text-decoration:none;
color:#060;
}
.UploadPhotos a:active{
background-position: 0 0px;
text-decoration:none;
color:#FFF;
}
.UploadPhotos a:visited{
background-position: 0 0px;
text-decoration:none;
color:#FFF;
}
```
Now here is the HTML code:
```
<div class="UploadPhotos">
<a id="UpLd" href="uploader/upload.php">Upload Photos</a>
</div>
```
The problem begins when I click on it. The link is opening up another page within an iframe which is done with js. Once I click this button, all the styles for this button is gone. I get the same problem even if I set the href="#" on the link. So I don't believe its the js opening the page. I can't figure out why the style suddenly disappears once clicked on.
I added images to give you guys an idea:
Regular

Hover

After click

Highlighting text with cursor after click

| Why does css button lose its style when clicked? | CC BY-SA 3.0 | 0 | 2011-01-21T21:59:13.513 | 2011-08-19T13:52:56.420 | 2011-08-19T13:52:56.420 | 133 | 543,495 | [
"css",
"button",
"click"
]
|
4,764,750 | 1 | null | null | 1 | 394 | I am developing a multilingual Java application in which I make heavy use of JTextArea. There is an apparent (though not actual) font change to the JTextAreas when non-Latin-based characters are inserted. Furthermore, other characteristics of the JTextArea, such as the tab size, appear to change as well.
The following image shows a JTextArea with a default font (Lucinda Grande) and tab size of 2:

The following image shows what happens to the JTextArea after inserting a line of Hindi text:

As you can see, the font's appearance as well as the tab size have apparently changed, though when I inspect these properties in a debugger, it is clear they have not. The problem is not limited to Hindi - Arabic text produces the same results, though Korean and Russian text do not. Any Ideas whats going on and if and how I can prevent this?
| Font Problems in Multilingual Java Application | CC BY-SA 2.5 | 0 | 2011-01-21T23:02:36.203 | 2011-01-23T20:59:36.713 | null | null | 449,963 | [
"java",
"fonts",
"multilingual",
"jtextarea"
]
|
4,764,791 | 1 | 4,765,035 | null | 0 | 314 | checkout this app:

If you swipe left in main image (the black shoes) you can see another image.
Can anyone try this app (Fashiolista, it's free and signup isn't required) and
say me how can I do an effect like that?
Thank you guys.
| How did they do this? [iPhone layout] | CC BY-SA 2.5 | null | 2011-01-21T23:07:50.753 | 2011-01-21T23:54:40.157 | null | null | 545,004 | [
"iphone",
"layout",
"swipe"
]
|
4,765,038 | 1 | 4,765,070 | null | 2 | 386 | I am in the process of converting a Silverlight app into a standard Web app (ie all HTML, CSS and JavaScript via jQuery 1.4.4). I'm not the most experienced when it comes to web development, so I am wondering what would be the best way to convert this custom Silverlight control into a web equivalent?

It boils down to just being a fancy radio button group. The user can click on any type, and only one type can be selected at a time. For the web equivalent, it needs to set a value that will get POSTed to the server.
For now I am just using a standard `<select>` tag which is of course functional and doesn't require JavaScript (which is nice), but ultimately is not going to fly. I will place a `<select>` inside of a `<noscript>` tag to allow non-js people to still be functional.
Can anyone recommend a good approach for tackling this? Any existing plugins/controls out in the wild I could take advantage of?
(I am using ASP.NET MVC 3, but I don't think that's very relevant here)
| How to translate this Silverlight control into HTML/CSS/JS | CC BY-SA 2.5 | null | 2011-01-21T23:45:20.117 | 2011-01-21T23:51:27.997 | null | null | 194,940 | [
"javascript",
"jquery",
"html",
"css"
]
|
4,765,106 | 1 | 4,788,917 | null | 2 | 753 | When I try to load a GLSL shader from my iPhone application bundle, the path to it is being reported as nil. This shader is in my Xcode project.
Pictures are be best way to describe this:


| Why is the path to a shader in my application nil? | CC BY-SA 2.5 | 0 | 2011-01-21T23:57:43.523 | 2011-01-28T14:20:06.123 | 2011-01-28T14:20:06.123 | 19,679 | 238,411 | [
"iphone",
"objective-c",
"ios",
"opengl-es",
"glsl"
]
|
4,765,340 | 1 | 4,765,472 | null | 5 | 10,714 | This is a "silly" but hopefully legitimate if not particularly needful challenge, one that can be reused everywhere by designers, I'm sure, if an answer can be had.
I'm using a WYSIWYG-ish editor (MS Expression Web 4) and am trying to produce HTML-based wireframes which I intend to be the base for actual production. With raw/clean HTML being the #1 objective, I'd like to have a pattern for placeholders whereby I might specify the following HTML (), which should appear as :
```
<div class="placeholder" style="width: 200px; height: 50px;">Logo</div>
```
My question is what is the CSS and the minimum amount of HTML mucking (e.g. img tag) that is required to achieve what I want? For example, if the following HTML is used instead:
```
<div class="placeholder">
<img src="placeholder-xbox.png" width="200" height="200"/>
Logo
</div>
```
or
```
<div class="placeholder">
Logo
<img src="placeholder-xbox.png" width="200" height="200"/>
</div>
```
This would be an acceptable compromise on the HTML side, but then what would be the CSS to make this work?
I know I can use jQuery to hijack clean HTML to generate mucky HTML to achieve what I'm trying to do, but I need this at design-time.
This fake screenshot below is what I'm looking for. I want to drop a tiny snippet of clean HTML and possibly use the anchor points in the WYSIWYG interface to scale the placeholder, while the label stays in the center-bottom or center-middle.

I have an image that is white with a black X through it.

I'm highly doubtful that CSS will support what I want without mucking up the HTML. However, I'd like to see if anyone knows if it's doable. Here's what I started with, which of course didn't work because the background image won't scale, the text won't vertically align, etc., etc.
```
.placeholder {
display: inline;
background-image: url('placeholder-xbox.png');
border: 2px solid black;
vertical-align: bottom;
}
```
So now I have to figure out what compromises to make. I hate mucking up the HTML and don't mind mucked up CSS because a CSS class is reusable.
| CSS for placeholder box (design-time WYSIWYG) | CC BY-SA 2.5 | null | 2011-01-22T00:37:24.737 | 2011-01-22T02:19:51.357 | 2011-01-22T02:19:51.357 | 405,015 | 11,398 | [
"html",
"css",
"placeholder"
]
|
4,765,341 | 1 | 4,767,527 | null | 12 | 4,187 | Currently, if I want to compare pressure under each of the paws of a dog, I only compare the pressure underneath each of the toes. But I want to try and compare the pressures underneath the entire paw.
But to do so I have to rotate them, so the toes overlap (better). Because most of the times the left and right paws are slightly rotated externally, so if you can't simply project one on top of the other. Therefore, I want to rotate the paws, so they are all aligned the same way.

Currently, I calculate the angle of rotation, by looking up the two middle toes and the rear one [using the toe detection](https://stackoverflow.com/q/3684484/77595) then I calculate the the angle between the yellow line (axis between toe green and red) and the green line (neutral axis).
Note that while this image is just 2D (only the maximal values of each sensor), I want to calculate this on a 3D array (10x10x50 on average). Also a downside of my angle calculation is that its very sensitive to the toe detection, so if somebody has a more mathematically correct proposal for calculating this, I'm all ears.
[I have seen one study with pressure measurements on humans](http://repository.tue.nl/597100), where they used the local geometric inertial axis method, which at least was very reliable. But that still doesn't help me explain how to rotate the array!

If someone feels the need to experiment, here's a file with [all the sliced arrays that contain the pressure data of each paw](http://dl.dropbox.com/u/5207386/walk_sliced_data). To clarfiy: walk_sliced_data is a dictionary that contains ['ser_3', 'ser_2', 'sel_1', 'sel_2', 'ser_1', 'sel_3'], which are the names of the measurements. Each measurement contains another dictionary, [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10] (example from 'sel_1') which represent the impacts that were extracted.
| How can I rotate a 3D array? | CC BY-SA 3.0 | 0 | 2011-01-22T00:37:31.993 | 2011-09-25T17:29:17.453 | 2017-05-23T12:01:09.963 | -1 | 77,595 | [
"python",
"image-processing"
]
|
4,765,378 | 1 | null | null | 2 | 231 | I'm going through the Django tutorial [http://docs.djangoproject.com/en/1.2/intro/tutorial01/#activating-models](http://docs.djangoproject.com/en/1.2/intro/tutorial01/#activating-models), which outputs colorized SQL snippets via `python manage.py sql polls`. I'm working with MacVim and it seems that it does not understand the output properly. See screenshot.

| Bad command output in MacVim | CC BY-SA 3.0 | null | 2011-01-22T00:45:36.950 | 2011-09-19T15:16:20.193 | 2011-09-19T15:16:20.193 | 70,211 | 456,517 | [
"django",
"django-admin",
"macvim"
]
|
4,765,594 | 1 | 4,798,873 | null | 2 | 461 | Recently Chris [posted an awesome jQuery code](http://css-tricks.com/the-moveup-menu/) on his Css-Tricks blog that allows a list to scroll up and down by mouse movement. He used it for unordered list items though.
I would love to use this on my current client project, but I can't figure out how to use this on `<dt>` items
The HTML is this:
```
<dl>
<dt><a href="#">Example.net</a></dt>
<dd>
1 dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor.
</dd>
<dt><a href="#">Example2.net</a></dt>
<dd>
2 dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor.
</dd>
<dt><a href="#">Example3.net</a></dt>
<dd>
3 dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor.
</dd>
<dt><a href="#">Example4.net</a></dt>
<dd>
4 dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor.
</dd>
</dl>
```
`<dd>` is not below the `<dt>` items, its in another div placed by jQuery, so the `<dt>` of items is just lined up as links.

Also I am using the jQuery Plugin TinyScroll for the scrollbar, that sets the `overflow: autoflow;` or whatever. So that might be a reason that its not working for me.
But here is Chris Code from the blog post:
```
$("#menu").css("overflow", "hidden").wrapInner("<div id='mover' />");
var $el,
speed = 13.5, // needs to be manually tinkered with
items = $("#menu a");
items
.each(function(i) {
$(this).attr("data-pos", i);
})
.hover(function() {
$el = $(this);
$el.addClass("hover");
$("#mover").css("top", -($el.data("pos") * speed - 40));
// 40 is the top padding for the fadeout
}, function() {
$(this).removeClass("hover");
});
```
What would I have to change to get it working for me?
| Moveup List with Definition list items | CC BY-SA 2.5 | null | 2011-01-22T01:34:38.140 | 2011-01-26T01:18:41.313 | 2011-01-25T19:48:08.183 | 538,786 | 538,786 | [
"jquery",
"html"
]
|
4,765,747 | 1 | null | null | 0 | 277 | 
Hey guys,
checkout this. How can I do something similar? I mean a scrollview with 9x9 images.
Also, how can I put a custom loading image??
Ty.
| What image gallery? [iPhone] | CC BY-SA 2.5 | null | 2011-01-22T02:19:44.727 | 2011-01-22T03:59:09.727 | null | null | 545,004 | [
"iphone",
"scrollview"
]
|
4,765,761 | 1 | 4,766,443 | null | 3 | 2,425 | I'm using a table to display tabular data, but I need to get the sizing pixel-perfect so that the contents don't end up taking more vertical space than I have available. Also, layout using css alone isn't feasible because I have dozens of elements.
Here is my simple test code:
```
<!DOCTYPE html>
<html lang="en">
<head>
<style>
table, td, tr, thead, tfoot, tbody, th, tf {
border-collapse: collapse;
margin: 0px;
padding: 0px;
border:0;
line-height:16px;
}
</style>
</head>
<body>
<table border="0" cellspacing="0" cellpadding="0">
<tr style="height:16px">
<td>
<span style="font-size:10pt;">Here is some text</span>
</td>
</tr>
</table>
</body>
</html>
```
Basically I want the row of the table to take up only 16px, however, in this configuration it ends up taking 17px.
Inspecting the elements in FireBug it shows the span at 15px but the td and tr at 17, yet no padding, no border, etc...

In IE I get the same behavior, however there is a little more information about my mysterious extra pixel or two, seems there is an offset on the span element:

Finally, I can fix the problem by turning my span element into a div, (or by making the span element display:block, or even display: table-cell which I don't really understand). So I don't really need help solving my problem, but I want to understand inline elements within table cells end up taking more space then they should. I tried google and the w3c spec but couldn't find anything useful.
| Box-Model for inline vs. block elements within a table td | CC BY-SA 2.5 | null | 2011-01-22T02:22:16.040 | 2017-01-18T22:28:09.447 | 2017-01-18T22:28:09.447 | 4,370,109 | 112,741 | [
"html",
"css",
"html-table"
]
|
4,765,765 | 1 | 4,765,814 | null | 0 | 982 | I am new to web design and I have 2 `<div>` tags that contain Announcement and Welcome data. I would like to align these next to eachother. But instead they are on top of each other.
I have tried floating one div left and the other right while giving widths to the divs. But I am still having a few issues. I am trying to align the announcement-area and welcome-area divs. Here is my code:
```
<body>
<div id="page-wrap">
<ul id="nav" align="center">
<li class="home"><a href="#">Home</a></li>
<li class="directory"><a ref="#">Directory</a></li>
<li class="calender"><a href="#">Calender</a></li>
<li class="photos"><a href="#">Photos</a></li>
<li class="links"><a href="#">Links</a></li>
</ul>
<div id="main-content">
<div id="welcome-area">
<img src="Images/welcome-header.jpg" alt="header top" />
<div id="welcome-content">
<p>
Welcome to the official website of the Lambda Chi Alpha Delta Beta Zeta Chapter at NSU.
This site will be used to inform members of events and show everyone what the fraternity
is up too. Take a look around!
</p>
</div>
</div>
<div id="announcements-area">
<img src="Images/announcements-top.jpg" alt="announcement top" />
<div id="announcements-content">
<h4 class="announcement-header">Website is Live!</h4>
<p class="metadata">Friday, 1/21/2011</p>
<p>
The new website for the Delta Beta Zeta Chapter
of Lambda Chi Alpha is now live. Welcome!
</p>
</div>
</div>
<div class="clear"></div>
</div>
<div id="footer">
</div>
</div>
</body>
```
```
#page-wrap{
width:1040px;
margin: 0 auto;
background-image: url('../Images/content-background.jpg');
background-repeat:repeat-y;
}
#main-content{
padding-top:10x;
padding-right:50px;
padding-left:70px;
}
#announcements-area{
background-image: url('../Images/announcements-content.jpg');
background-repeat: repeat-y;
float:left;
}
#announcements-content{
padding-left:15px;
padding-right:730px;
padding-bottom:10px;
}
#welcome-area{
background-image: url('../Images/welcome-content.jpg');
background-repeat: repeat-y;
float:right;
}
#welcome-content{
padding-left:15px;
padding-right:350px;
padding-bottom:10px;
}
#footer{
min-height:185px;
background-image: url('../Images/footer.jpg');
background-repeat:no-repeat;
}
```
Here is a screenshot of what the divs look like right now. They are on top of eachother. I want them next to eachother.

| Css - Align <Div>s | CC BY-SA 2.5 | null | 2011-01-22T02:23:33.520 | 2014-02-09T03:06:39.087 | null | null | 357,587 | [
"css",
"html",
"alignment"
]
|
4,765,824 | 1 | 4,765,853 | null | 10 | 210 | Considering the following:
```
[Export]
public class BudgetView : ViewBase, IView
{
// Members Galore
}
```
It is clear that you would say `BudgetView` `ViewBase`, and it `IView`, but what does it to to poor old `Export`?
Perhaps `BudgetView` `Export`?
Or `BudgetView` `Export`?
I need this for my documentation. I'm need to be very formal and very detailed.

My UML tool is very restrictive about what I can and cannot do. I cannot make custom stereotypes for instance.
| What verb would describe the relationship between a C# class and its Attribute? | CC BY-SA 2.5 | 0 | 2011-01-22T02:36:36.227 | 2011-01-22T06:20:17.640 | 2011-01-22T03:03:03.427 | 443,602 | 443,602 | [
"c#",
"attributes",
"naming-conventions"
]
|
4,765,985 | 1 | 4,777,301 | null | 3 | 219 | I need to create the following in CSS and have it work on IE7+ (and Firefox if possible):

Everything is done except the background!
The quotation is different each time, so the background needs to automatically adjust in height.
It also needs to auto adjust to the width of the container it's placed within. By this, I mean the gradient cannot stretch. The background needs to be the fade-in left gradient, then the background colour, then the fade-out right gradient.
Here's my current code - [now on JSFiddle](http://jsfiddle.net/arangas/7GEah/):
```
<div id="ehs-quotecontainer">
<div id="ehs-bgleft">
</div>
<div id="ehs-bgright">
</div>
<div class="ehs-marks" id="ehs-marktop">
“
</div>
<span class="ehs-quotetext">Once you believe anything, you stop thinking about it.</span>
<div class="ehs-marks" id="ehs-markbottom">
”
</div>
</div>
```
```
#ehs-quotecontainer {
padding-top:8px;
padding-bottom:8px;
background-color:#F7F8FA;
text-align:center;
}
#ehs-bgleft {
background:transparent url(../images/ehsbgleft.jpg) repeat-y scroll right top;
}
#ehs-bgright {
background:transparent url(../images/ehsbgright.jpg) repeat-y scroll right top;
}
.ehs-marks {
height:20px;
color:#8B8C90;
font-size:5.0em;
}
#ehs-marktop {
float:left;
margin-top:-18px;
}
#ehs-markbottom {
float:right;
margin-top:-5px;
}
.ehs-quotetext {
padding-left:4px;
padding-right:4px;
color:#000;
font-size:1.1em;
font-style:italic;
}
```
Any ideas on how to make the background work correctly?
| Two images comprising the background for a div? | CC BY-SA 2.5 | null | 2011-01-22T03:29:53.850 | 2011-01-24T01:01:50.223 | 2011-01-23T23:14:48.643 | 6,651 | 6,651 | [
"css",
"background"
]
|
4,766,007 | 1 | null | null | 2 | 159 | In personal and small business websites it's not so difficult but when we comes to New sites,Portals and E-commerce sites, where so many content comes on each pages, it's little hard.
semantically correct and and handle big of complex designs like Big portals or News sites?**

| How do you keep html semantically correct and and handle big css of complex designs like Big portals or News sites? | CC BY-SA 2.5 | null | 2011-01-22T03:36:01.260 | 2012-05-25T02:21:29.140 | 2011-01-22T10:56:19.143 | 84,201 | 84,201 | [
"css",
"xhtml",
"accessibility",
"semantic-markup"
]
|
4,766,244 | 1 | 4,766,399 | null | 2 | 662 | According to the SpreadsheetML supports date serial values with three possible compatibility settings and various ranges.
[http://www.documentinteropinitiative.com/implnotes/ISO-IEC29500-2008/001.018.017.004.001.000.000.aspx](http://www.documentinteropinitiative.com/implnotes/ISO-IEC29500-2008/001.018.017.004.001.000.000.aspx)
> - - -
However, when I use Microsoft Office Excel 2010 to generate a *.xlsx file with a date serial of 1, the *.xlsx file does not have any `dateCompatibility` attribute set (indicating "1900 date base system") but the date associated with date serial 1 is January 1, 1900 (indicating "1900 backward compatibility").
The workbookPr element is this, unedited, no `dateCompatibility` attribute.
```
<x:workbookPr defaultThemeVersion="124226" xmlns:x="http://schemas.openxmlformats.org/spreadsheetml/2006/main" />
```
And here is a row of data that shows a date serial of 1 and the text result of formatting it as a date:
```
<x:row r="3" spans="1:2">
<x:c r="A3">
<x:v>1</x:v>
</x:c>
<x:c r="B3" t="str">
<x:f t="shared" si="0" />
<x:v>1900-01-01 00:00:00.0</x:v>
</x:c>
</x:row>
```
the formula is just date formatting, referenced earlier in the worksheet:
```
<x:f t="shared" ref="B1:B42" si="0">TEXT(A1, "yyyy-mm-dd HH:mm:ss.0")</x:f>
```
This formula gives the same result as applying a date format pattern to the date serial number, demonstrated in the below screen shot.

Also formatting negative dates results in an error, another indicator that Excel is actually using backwards-compatible date system despite the absence of the `dateCompatibility` attribute on `workbookPr`.
The options for the workbook only show an unchecked checkbox for 1904 date system. I don't see any option for 1900 date based vs. 1900 backwards-compatibility.
Am I reading the spec wrong? Or the SpreadsheetML? Or something else?
| How to generate SpreasheetML samples for all three date compatibility settings from Excel 2010? | CC BY-SA 2.5 | null | 2011-01-22T04:53:56.733 | 2011-01-22T05:45:55.833 | null | null | 118,703 | [
"c#",
"excel",
"openxml",
"openxml-sdk",
"spreadsheetml"
]
|
4,767,398 | 1 | 4,767,400 | null | 1 | 422 | Following an example at: [http://www.learncpp.com/cpp-tutorial/47-structs/](http://www.learncpp.com/cpp-tutorial/47-structs/) relating to , and when I tried to compile this program:
```
#include <iostream>
void PrintInformation(Employee sEmployee)
{
std::cout<<"ID: "<<sEmployee.nID<<std::endl;
std::cout<<"Age: "<<sEmployee.nAge<<std::endl;
std::cout<<"Wage: "<<sEmployee.fWage<<std::endl;
}
struct Employee {int nID;int nAge;float fWage;};
int main()
{
Employee abc;
abc.nID=123;
abc.nAge=27;
abc.fWage=400;
// print abc's information
PrintInformation(abc);
return 0;
}
```
I get the following:

Why is that?
Thanks.
| C++ - struct errors | CC BY-SA 2.5 | null | 2011-01-22T10:56:15.673 | 2011-01-22T10:58:52.553 | null | null | 588,855 | [
"c++",
"struct"
]
|
4,767,582 | 1 | 4,767,791 | null | 3 | 11,404 | The default border color for active input tags in Google chrome is yellow, how do i disable it?

How do i change the color in css?
| How to disable default box shadow /border-color in Google-chrome | CC BY-SA 2.5 | 0 | 2011-01-22T11:37:50.573 | 2011-01-22T12:53:32.343 | null | null | 434,354 | [
"google-chrome"
]
|
4,767,600 | 1 | 4,767,619 | null | 0 | 391 | I would like to make this:

So... when a user clicks on the search icon (top-left) the searchBar is set to hidden and UITableView is resized to top. How can I resize a table? Is it possible to achieve this not usign dimensions (like just set table's top to the navigation's bottom or smth)?
Thx.
| iphone reposition UITableView when hidding element above it | CC BY-SA 2.5 | 0 | 2011-01-22T11:41:53.930 | 2011-01-22T11:50:29.137 | null | null | 132,257 | [
"iphone",
"uitableview",
"user-interface",
"resize"
]
|
4,767,605 | 1 | 4,767,970 | null | 5 | 7,533 | I want to completely customize the infowindow in google maps v3? I just want to show a image there, No white rounded background with arrow.
Is it possible in v3? or any workaround?
Something like this

| customize google map's InfoWindow | CC BY-SA 2.5 | 0 | 2011-01-22T11:42:47.583 | 2012-12-22T14:35:48.523 | null | null | 277,696 | [
"javascript",
"google-maps"
]
|
4,767,652 | 1 | 4,768,170 | null | 0 | 1,236 | I have a borderless form displayed as a progress object. This is displayed via childform.show().
I'm overriding CS_DROPSHADOW to give it the shadow (pictured),
when the form loses focus (parent clicked or another form\application) the shadow is lost.
How can I keep the form focused\selected similar to a modal form? (I cannot use showdialog due this being called from various threads other than UI) Using Me.TopMost = True works, but obviously puts the form above all others rather than just the parent.

| Keep focus on child form without dialog? | CC BY-SA 2.5 | null | 2011-01-22T11:52:06.720 | 2011-01-22T13:48:33.460 | 2020-06-20T09:12:55.060 | -1 | 2,278,201 | [
"vb.net"
]
|
4,767,777 | 1 | null | null | 1 | 193 | [This is my site](http://bazzoo.bz-bz.com/site.html). On the left I have a playlist, inside a container with hidden overflow (the playlist is a sortable). The playlist grows as you drag more songs to it from the search list.
The problem is that when you drag many songs to the playlist, and the playlist is larger than the container, it makes a situation where I can sort the playlist by dragging items to the hidden area. In other words, I can drag a song from the playlist to an area under the container (where the invisible part of the playlist is) and the song will still be inserted to the list.
Here's a screenshot:

| please help! i can sort items to hidden overflow! | CC BY-SA 2.5 | null | 2011-01-22T12:23:01.500 | 2011-01-22T17:38:19.373 | 2011-01-22T17:38:19.373 | 89,806 | 585,567 | [
"jquery",
"sorting",
"overflow",
"jquery-ui-sortable",
"hidden"
]
|
4,767,778 | 1 | 4,889,589 | null | 2 | 2,125 | In my ipad application, i've a lable that occupies whole view. I want to dynamically calculate the size of the label that fits in the whole rect. But I want to maintain the word wrap.
In my XIB, I added a label and set it mode to word wrap mode.
See the image attached. What I want is to show the label with word wrap. Can some one help me to find the problem?
The following is the code that I'm using:
(In one of the answers in these forums, I found the following code:)
```
-(void)sizeLabel:(UILabel*)label toRect:(CGRect)labelRect withFont:(NSString*)fontName {
// Set the frame of the label to the targeted rectangle
label.frame = labelRect;
// Try all font sizes from largest to smallest font size
int fontSize = 300;
int minFontSize = 5;
// Fit label width wize
CGSize constraintSize = CGSizeMake(label.frame.size.width, MAXFLOAT);
do {
// Set current font size
label.font = [UIFont fontWithName:fontName size:fontSize];
// Find label size for current font size
CGSize labelSize = [[label text] sizeWithFont:label.font
constrainedToSize:constraintSize
lineBreakMode:UILineBreakModeWordWrap];
// Done, if created label is within target size
if( labelSize.height <= label.frame.size.height )
break;
// Decrease the font size and try again
fontSize -= 2;
} while (fontSize > minFontSize);
}
```

| iPad/iPhone - Set the label size that fits in the given rect | CC BY-SA 2.5 | null | 2011-01-22T12:23:24.307 | 2011-02-03T17:40:54.810 | null | null | 265,341 | [
"iphone",
"ipad",
"resize",
"uilabel"
]
|
4,767,812 | 1 | 4,769,459 | null | 1 | 551 | My Webpart needs a parameter which will be supplied during the use in a page. The Parameter are supplied in the textbox while its being used in a page as web part.
I have placed a textbox and it should get the parameter as a password in the format of *****.
How can I do that.
I have edited the question The diagram explains in more details

The Password is supplied as an external parameter and supplied during the deployment of the webpart.
Could any body help me.
Luke many thanks for the answer you have provided but I am looking for this kind of input.
Thank You
Hari Gillala
| Custom Webpart Parameters-Sharepoint 2007 | CC BY-SA 2.5 | 0 | 2011-01-22T12:31:59.560 | 2011-01-23T19:01:08.723 | 2011-01-23T19:01:08.723 | 424,611 | 424,611 | [
"sharepoint-2007"
]
|
4,767,971 | 1 | 4,767,993 | null | 391 | 1,028,425 | I'm implementing pagination, and it needs to be centered. The problem is that the links need to be displayed as block, so they need to be floated. But then, `text-align: center;` doesn't work on them. I could achieve it by giving the wrapper div padding of left, but every page will have a different number of pages, so that wouldn't work. Here's my code:
```
.pagination {
text-align: center;
}
.pagination a {
display: block;
width: 30px;
height: 30px;
float: left;
margin-left: 3px;
background: url(/images/structure/pagination-button.png);
}
.pagination a.last {
width: 90px;
background: url(/images/structure/pagination-button-last.png);
}
.pagination a.first {
width: 60px;
background: url(/images/structure/pagination-button-first.png);
}
```
```
<div class='pagination'>
<a class='first' href='#'>First</a>
<a href='#'>1</a>
<a href='#'>2</a>
<a href='#'>3</a>
<a class='last' href='#'>Last</a>
</div>
<!-- end: .pagination -->
```
To get the idea, what I want:

| How do I center floated elements? | CC BY-SA 4.0 | 0 | 2011-01-22T13:10:21.347 | 2019-11-20T20:15:23.137 | 2019-11-20T20:15:23.137 | 1,098,046 | 134,602 | [
"css-float",
"center",
"css"
]
|
4,768,025 | 1 | null | null | 3 | 6,578 | I'm looking for advice on how this can be done. I want to have a server sit in between the client and the actual server. For example:
```
Client -> Proxy Type Server -> Web Server.
```
So in return the web server would pass results to the proxy server which in return give the results back to the client. For example:
```
Client <- Proxy Type Server <- Web Server
```
Here is a diagram if it makes life easier:

If it was just simple GET requests not a problem but I'm not sure how it would work if the client was posting data. I hope someone can advise me on this. Thank you if you can!
| Pass through server / proxy | CC BY-SA 2.5 | null | 2011-01-22T13:20:57.583 | 2011-01-22T19:09:39.617 | 2011-01-22T16:40:36.650 | 75,801 | 99,877 | [
"php",
"ruby-on-rails",
"linux",
"apache"
]
|
4,768,042 | 1 | 5,043,246 | null | 0 | 46 | Here's my entity framework model:

Here's the domain service class dialog:

I can't select the Debit or Credit entities in the domain service class dialog. Can I not use these entities in my Silverlight client?
| Does RIA Services support Entities that are Sub types? | CC BY-SA 2.5 | null | 2011-01-22T13:24:05.740 | 2011-02-18T15:37:07.363 | null | null | 64,334 | [
"c#",
".net",
"silverlight",
"entity-framework",
"wcf-ria-services"
]
|
4,768,146 | 1 | 7,047,571 | null | 1 | 3,054 | xcode 4 has a directly included interface builder, anyhow i want to change items of a tabbarcontroller. my subjects are: rearrange, add new, change type of view e.g. nagvigation
Here is what i want (Screenshot from InterfaceBuilder V3.2) in Xcode4 beta

cheers endo
EDIT: The only solution I found is to copy an existing Item and change the properties, but i'm still interested in a solution since this is just a workarround.
| Xcode4: Where change tabbar-properties in xcode4-interfacebuilder | CC BY-SA 2.5 | null | 2011-01-22T13:42:12.563 | 2012-07-12T01:38:17.743 | 2012-07-12T01:38:17.743 | 470,879 | 330,658 | [
"iphone",
"ios",
"xcode",
"xcode4",
"uitabbarcontroller"
]
|
4,768,315 | 1 | 4,768,329 | null | 0 | 1,171 | ".NET Framework 4 Client Profile" is missing in the "New Project" window in Visual Studio 2010, so I cannot set it as a target framework.

Any ideas?
| Missing ".NET Framework 4 Client Profile" as target framework in "New Project" window | CC BY-SA 2.5 | null | 2011-01-22T14:16:37.613 | 2012-01-10T19:18:39.267 | 2012-01-10T19:18:39.267 | 168,868 | 259,206 | [
"visual-studio",
"visual-studio-2010",
".net-4.0",
".net-client-profile"
]
|
4,768,310 | 1 | 4,768,359 | null | 1 | 202 | At: [http://www.learncpp.com/cpp-tutorial/82-classes-and-class-members/](http://www.learncpp.com/cpp-tutorial/82-classes-and-class-members/)
There is the following program (I made some small modifications):
```
#include <iostream>
class Employee
{
public:
char m_strName[25];
int m_id;
double m_wage;
//set the employee information
void setInfo(char *strName,int id,double wage)
{
strncpy(m_strName,strName,25);
m_id=id;
m_wage=wage;
}
//print employee information to the screen
void print()
{
std::cout<<"Name: "<<m_strName<<"id: "<<m_id<<"wage: $"<<wage<<std::endl;
}
};
int main()
{
//declare employee
Employee abder;
abder.setInfo("Abder-Rahman",123,400);
abder.print();
return 0;
}
```
When I try to compile it, I get the following:

And, why is a pointer used here? `void setInfo(char *strName,int id,double wage)`
Thanks.
| C++ - class issue | CC BY-SA 2.5 | null | 2011-01-22T14:15:29.443 | 2011-01-22T20:18:26.963 | 2011-01-22T20:18:26.963 | 588,855 | 588,855 | [
"c++",
"class",
"pointers"
]
|
4,768,488 | 1 | 4,768,724 | null | 0 | 1,911 | 
Can someone check my class diagram because I am not too good at drawing this type of uml diagram
1. A User can be a PersonalUser or a BusinessUser
2. An Administrator is a special type of PersonalUser
3. A PersonalUser or BusinessUser can create many Auction
4. But an Auction can be created by only one PersonalUser or only one BusinessUser
5. There an Auction cannot exist without an PersonalUser or a BusinessUser
6. An Auction can contain only one Item
7. An Item can be in only one Auction
8. An Item cannot exist without an Auction
9. An Auction cannot exist without an Item
10. An Item has one Category
11. Category can has many item
12. An Item cannot exist without a category
13. A Category can has a Parent Category but this is not mandatory
14. A Category can has many Attributes
15. But an Attribute is for only one Category
16. An Attribute cannot exist a Category
17. An Attribute can has many AttributeOption
18. But an AttributeOption is linked to only one Attribute
19. An AttributeOption cannot exist without an Attribute
20. An Auction can has many bids
21. A bid is only for one auction
22. A Bid cannot exist without an Auction and a Personal User or a BusinessUser
23. An Item can has many picture
24. A picture is only for once item and a picture cannot exist without an Item
25. A User can create many ForumTopics but a ForumTopic can be created only by one User
26. A ForumTopics can contain one or more ForumMessage
27. A ForumTopic cannot exist without a User and a ForumMessage cannot exist without a ForumTopic
28. A BusinessUser can has many BusinessContactNumber but a BusinessContactNumber is only for one BusinessUser
29. A BusinessContactNumber cannot exist without a Business
| Check my UML Class Diagram | CC BY-SA 2.5 | null | 2011-01-22T14:52:43.687 | 2011-01-27T23:58:08.067 | null | null | 484,290 | [
"uml",
"class-diagram"
]
|
4,768,651 | 1 | 4,768,917 | null | 1 | 448 | I want to make a web browser adjustment margin left. I use windowResize, but how to adjustment margin left even if the custom click the restore button of the web browser? I upload 2 screenshort images for explain. first image, I open the web browser not maximize, so the page make a windowResize and count the margin-left, then I click the windows maximize, then get the second image, but the content is not in the center of the page. How to do a right windowResize? Thanks.
```
<!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">
<script type="text/javascript" src="jquery-1.4.4.min.js"></script>
<script type="text/javascript">
jQuery(document).ready(function() {
var width = document.body.clientWidth;
windowResize(width);
$(window).resize(function() {
windowResize(width);
});
});
function windowResize(width) {
if(width>1024){
$('#content').css({
'margin-left':(width-1024)/2+32 + 'px'
});
}else{
$('#content').css({
'margin-left': 32 + 'px'
});
}
}
</script>
</head>
<body>
<style>
body, #box{min-width:1024px;width:100%;}
#content{float:left;width:960px;height:300px;background-color:#F00;}
</style>
<div id="box">
<div id="content">
some words
</div>
</div>
</body>
</html>
```
| windowResize problem | CC BY-SA 2.5 | null | 2011-01-22T15:20:16.350 | 2011-01-22T16:09:54.377 | null | null | 547,726 | [
"javascript",
"window-resize"
]
|
4,768,649 | 1 | 4,768,885 | null | 3 | 1,412 | I wonder if you have come across this that the id numbers of auto increment don't arrange in correct order - is it just me? Something I have set incorrectly in the db table?
For instance, when you insert a series of data into a table and you have deleted some of them as well, so when you check this table on phpMyAdmin, these data should appear in an order like this,
```
id
2
24
28
296
300
```
but in most of my tables they don't appear in orders, instead they appear in something like this,
```
id
24
300
2
296
28
```
as in this picture below,

Can we do something about it so that the IDs appear in the correct order?
I think most of you have misunderstood the issue I raided here. I mean when you click on Browser button on the phpMyAdmin to list all the data in your tables - not when you use SQL query to list the output by using `order by`.
Does it make sense?

This is one of my table structure - does it help you to see what is wrong in it?
```
CREATE TABLE IF NOT EXISTS `root_pages` (
`pg_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`pg_url` varchar(255) DEFAULT NULL,
`pg_title` varchar(255) DEFAULT NULL,
`pg_subtitle` varchar(255) DEFAULT NULL,
`pg_description` text,
`pg_introduction` text,
`pg_content_1` text,
`pg_content_2` text,
`pg_content_3` text,
`pg_content_4` text,
`pg_order` varchar(255) DEFAULT NULL,
`pg_hide` varchar(255) DEFAULT '0',
`pg_highlight` varchar(255) DEFAULT '0',
`pg_important` varchar(255) DEFAULT '0',
`pg_parent` varchar(255) DEFAULT '0',
`parent_id` varchar(255) DEFAULT NULL,
`pg_cat_id` varchar(255) DEFAULT NULL COMMENT 'page category id',
`ps_cat_id` varchar(255) DEFAULT NULL COMMENT 'post category id',
`tmp_id` varchar(255) DEFAULT NULL COMMENT 'template id',
`pg_backdate` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
`pg_created` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
`pg_updated` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`pg_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
```
| MySQL: the inconsistency of auto increment in id numbers | CC BY-SA 3.0 | null | 2011-01-22T15:19:42.900 | 2017-07-03T22:23:41.490 | 2017-07-03T22:23:41.490 | 4,370,109 | 413,225 | [
"mysql",
"database",
"database-design",
"auto-increment",
"create-table"
]
|
4,768,677 | 1 | null | null | 0 | 3,351 | I have the following problem:
I'm writing a WinForms application with C# and i want to get the Screen - Coordinates of a part of a picture, in this case the top of this hand (marked by the red point).
Does anybody know how i can do this programmaticaly?

("Koordinaten dieses Punktes" = Coordinates of this Point)
EDIT:
sry for confusing you, the picture above should only demonstrate my problem. The actual target of my program is to move the mouse-controlled-hand of a dart game to the right position, but it isn't possible by only setting the MouseLocation to a fix Point, because every turn the dart-hand gets another x:y distance to the MouseLocation. So I need to find the Location of the dart (-arrow).
I hope that everybody knows what my problem is now.
[Picture of the dart game](https://i.stack.imgur.com/YAAxX.jpg)
| C# How to get the Coordinates of a specific Point on Screen. (not mouselocation) | CC BY-SA 3.0 | null | 2011-01-22T15:26:16.437 | 2013-12-19T17:56:42.743 | 2012-02-21T15:40:57.783 | 383,710 | 2,579,436 | [
"c#",
"winforms",
"location",
"screen",
"coordinates"
]
|
4,768,916 | 1 | null | null | 0 | 571 | I've a TabBarController Application.
This code in didFinishingLaunching method:
```
UIImage *buttonImage = [UIImage imageNamed:@"post-button2.png"];
UIButton* button = [UIButton buttonWithType:UIButtonTypeCustom];
NSLog(@"Button size: %f, %f", buttonImage.size.width, buttonImage.size.height);
button.frame = CGRectMake(0.0, 0.0, buttonImage.size.width, buttonImage.size.height);
[button setBackgroundImage:buttonImage forState:UIControlStateNormal];
CGFloat heightDifference = buttonImage.size.height - self.tabBarController.tabBar.frame.size.height;
NSLog(@"self.tabBarController.tabBar.frame.size.height: %f", self.tabBarController.tabBar.frame.size.height);
NSLog(@"heightDifference: %f", heightDifference);
NSLog(@"%Tabbar: %f, %f", tabBarController.tabBar.center.x, tabBarController.tabBar.center.y);
if (heightDifference < 0)
button.center = tabBarController.tabBar.center;
else {
CGPoint center = self.tabBarController.tabBar.center;
center.y = center.y - heightDifference/2.0;
button.center = tabBarController.tabBar.center;
}
NSLog(@"%Button: %f, %f", button.center.y, button.center.x);
[tabBarController.view addSubview:button];
[self.window addSubview:tabBarController.view];
[self.window makeKeyAndVisible];
```
The output is:

Where is the problem? I can solve with hardcoded code:
```
CGPoint center = tabBarController.tabBar.center;
center.x = 160.00;
center.y = 455.50;
button.center = center;
```
But I'm not sure that is correct.
Ty.
| Custom button in tabbar problem | CC BY-SA 2.5 | null | 2011-01-22T16:09:43.000 | 2011-01-22T17:21:47.723 | null | null | 545,004 | [
"iphone",
"button",
"tabbar"
]
|
4,769,074 | 1 | 4,769,170 | null | 1 | 1,596 | I am trying to fill a rectangle in a winforms application less a ellipse in the center that allows the image in the background to show through.
can anyone give me a hint on which way to go on this,
thanks.
this is what I have come up with so far:
```
path.AddRectangle(new Rectangle(30, 30, 100, 100));
path.AddEllipse(new Rectangle(50, 50, 60, 60));
gfx.FillPath(new SolidBrush(Color.Black), path);
```

| How do I fill a rectangle with the exception of a area | CC BY-SA 2.5 | null | 2011-01-22T16:39:08.583 | 2011-01-22T17:01:12.247 | 2011-01-22T17:01:12.247 | 54,009 | 54,009 | [
"c#",
"winforms"
]
|
4,769,105 | 1 | 4,769,260 | null | 0 | 2,126 | I have a gridview with "Edit Update Cancel" command field.
When I click Edit, all the columns in the particular row becomes editable.
I just need to have 2 specific columns editable. How is that made possible ?
(Screen Shot Attached)

[In the screen shot all 3 columns are editable, I just need the second and third to be editable]
Thanks in Advance.
| Need to make a specific column editable upon clicking edit | CC BY-SA 2.5 | null | 2011-01-22T16:44:51.360 | 2011-05-27T17:23:54.740 | null | null | 277,087 | [
"c#",
".net",
"asp.net",
"gridview",
"insert-update"
]
|
4,769,169 | 1 | 5,102,678 | null | 36 | 42,845 | How can i implement this popup menu in iphone app like a popover in ipad?

---
: This is the best at moment: [https://github.com/runway20/PopoverView](https://github.com/runway20/PopoverView)

| iPhone popup menu like iPad popover? | CC BY-SA 3.0 | 0 | 2011-01-22T16:54:20.633 | 2017-09-30T21:57:44.223 | 2012-10-05T12:54:04.837 | 88,461 | 88,461 | [
"iphone",
"objective-c",
"ipad",
"uipopovercontroller",
"popover"
]
|
4,769,538 | 1 | null | null | 1 | 1,492 | I'm wondering about the behavior of `{Shape}.attr("fill","url({image.path})")`.
when applying a fill image to a shape:
```
public class AppMapCanvas extends Raphael {
public AppMapCanvas(int width, int height) {
super(width, height);
this.hCenter = width / 2;
this.vCenter = height / 2;
...
Rect rect = this.new Rect(hCenter, vCenter, 144, 40, 4);
rect.attr("fill", "url('../images/app-module-1-bg.png')"); // <--
...
}
}
```
The background image seem to teal accross the canvas behind the shape, thus gets weird positioning (an illustration snapshot is enclosed - i marked the original image borders in red).

This seem to resolve itself in the presence of an animation along a path (a mere `path.M(0,0)` is sufficiant).
How can i position the fill-image properly in the first place?
| Raphael-GWT: fill image of a shape (Rect) appears offset. How to resolve this? | CC BY-SA 3.0 | 0 | 2011-01-22T17:58:39.013 | 2012-06-22T12:54:21.870 | 2012-06-22T12:54:21.870 | 547,020 | 547,020 | [
"gwt",
"raphael",
"vector-graphics"
]
|
4,769,672 | 1 | 4,769,706 | null | 0 | 227 | here's the code:
```
<%= link_to tag("img", { :src => "/images/logo.png", :alt => "logo"}, false), {:controller => 'frontpage', :action => 'index'}, :class => "logo" %>
```
the output:

'(/)'
the '(/)' --minus the quotes, come at the end of the image
| Why does rails 3 show "(/)" when I use the link_to img_tag helpers? | CC BY-SA 2.5 | null | 2011-01-22T18:23:57.277 | 2011-01-22T18:28:53.500 | null | null | 482,772 | [
"ruby-on-rails-3"
]
|
4,769,818 | 1 | 4,769,945 | null | 1 | 442 | - Flash Builder's design view is worse than 3's (which at least was usable if you ignore some quirks), so WHAT do Flex UI designers (those who don't have paid design teams...) do to design a UI? Because Design View (also based on what a lot of people say about it..) gets more useless with every release.- See image for some differences in design view vs. Flash. WHAT is causing this? css also posted.. ("Duration", "hr", "min" are mx Labels, the image size text is an mx Text comp. Project is an "mx only" SDK 4.1 project.) I don't even care that the spinners look different, I just need it to show me correctly sized stuff so I can position things via Canvas, or properly size containers.

mx|Label {
font-weight:bold;
font-size:12;
}
mx|Text {
font-weight:normal;
}
| Flash Builder 4 Design View vs Flash runtime appearance w/SDK 4.1 | CC BY-SA 2.5 | 0 | 2011-01-22T18:47:29.647 | 2011-01-22T19:08:51.337 | null | null | 289,995 | [
"apache-flex",
"flex4",
"flash",
"flash-builder"
]
|
4,769,817 | 1 | 4,769,914 | null | 5 | 3,139 | I have a gridview with "Edit Update Cancel" command field. When I click Edit, all the columns in the particular row becomes editable and when I click update, the Table is updated based on the new values.
Then the Gridview is binded with the updated datatable. But the "Update Cancel" button still
remains.

Once the row , has been updated, the "Update Cancel" button has to be changed to "Edit" So how is that made possible.
Thanks in Advance
This is the code for updating and displaying the updated data
```
protected void StaticNoticeGridView_RowUpdating(object sender, GridViewUpdateEventArgs e)
{
try
{
//Gets the updated value from GridView
string id = StaticNoticeGridView.Rows[e.RowIndex].Cells[0].Text;
string updatedItem = e.NewValues[0].ToString();
string updatedURL = e.NewValues[1].ToString();
//Updated the Database
StaticNoticeController staticNoticeController = new StaticNoticeController();
int rocordsAffected = staticNoticeController.UpdateStaticNoticeData(updatedItem, updatedURL, id);
//Gets the updated datatable and binds the Gridview again
if (rocordsAffected == 1)
{
this.StaticNoticeGridView.DataSource = null;
this.StaticNoticeGridView.DataSource = staticNoticeController.GetStaticNoticeData();
this.StaticNoticeGridView.DataBind();
}
}
catch(SystemException ex)
{
//ToDo: Log the Exception
}
}
```
| Need to make the row in normal mode after updating | CC BY-SA 2.5 | 0 | 2011-01-22T18:47:19.290 | 2011-01-22T19:04:23.733 | 2011-01-22T19:03:49.773 | 277,087 | 277,087 | [
"c#",
".net",
"asp.net",
"gridview"
]
|
4,769,864 | 1 | 5,144,601 | null | 11 | 6,877 | another questions...
How can i make this textfield??
 
With on the left a with a string and after it, an touchable zone, with or like screenshot.
I need to implement a view? Or there is a simple way to do it directly in textfield?
thanks again!
A
| How to customize UITextField like this? | CC BY-SA 2.5 | 0 | 2011-01-22T18:54:35.040 | 2014-07-18T16:02:53.427 | 2011-01-22T19:09:11.570 | 88,461 | 88,461 | [
"iphone",
"objective-c",
"uitextfield"
]
|
4,769,963 | 1 | 4,771,373 | null | 3 | 1,013 | If I have the length of the hypotenuse and its angle, how do I find the adjacent and opposite?
I'm writing this in JavaScript and I'm just trying to find the screen coordinates (x/y) where the hypotenuse ends given a length and angle.
Sorry, this is probably a pretty dumb question.
Here is a sketch if I'm being unclear:

So something like this:
```
function getLineEndCoords(originX, originY, hypotenuse, angle){
// Probably something to do with tangents and cosines.
return [x,y]
}
```
Additionally, if anyone knows any good JS libraries for this sort of stuff (isometric drawings, display related math) that would be convenient.
| Getting screen coordinates based on triangles | CC BY-SA 2.5 | 0 | 2011-01-22T19:11:54.593 | 2011-01-22T23:41:27.420 | 2011-01-22T23:24:04.100 | 585,856 | 585,856 | [
"javascript",
"math"
]
|
4,770,236 | 1 | 4,770,363 | null | 4 | 1,564 | I think this might be impossible, but is there some way using JQuery to prevent lines of text not fully visible from showing up on the screen when a user scrolls until the entire line is visible? That is, we want to prevent something like this from showing up:

Thanks!
| hide lines of text not fully visible with javascript & css | CC BY-SA 2.5 | null | 2011-01-22T20:04:27.893 | 2011-01-22T22:34:32.083 | null | null | 251,162 | [
"javascript",
"jquery",
"html",
"css"
]
|
4,770,504 | 1 | 4,831,744 | null | 3 | 2,846 | I'm trying to draw a custom NSScroller and I got mostly everything I wanted to work to work but, when I try and get rid of the knobSlot, it will just continuously re-draw the knob:

That is when I use drawRect: to draw the background out. When I remove the drawRect: I get:

I still can't seem to get rid of the knobSlot. Here is all my code:
```
#import "UIScroller.h"
@interface UIScroller (Private)
- (void)drawKnobSlot;
@end
@implementation UIScroller
- (BOOL)isVertical {
NSRect bounds = [self bounds];
return NSHeight(bounds) < NSWidth(bounds);
}
+ (CGFloat)scrollerWidth {
return 13;
}
+ (CGFloat)scrollerWidthForControlSize:(NSControlSize)controlSize {
return 13;
}
/*
- (void)drawRect:(NSRect)aRect;
{
//[[NSColor blueColor] set];
NSRectFill([self bounds]);
[self drawKnobSlot];
}
*/
- (void)drawKnobSlot;
{
NSRect slotRect = [self rectForPart:NSScrollerKnobSlot];
if ([self isVertical])
NSDrawThreePartImage(slotRect, [NSImage imageNamed:@"lazyarrow"], [NSImage imageNamed:@"lazyarrow"], [NSImage imageNamed:@"lazyarrow"], YES, NSCompositeSourceOver, 1, NO);
else
NSDrawThreePartImage(slotRect, [NSImage imageNamed:@"lazyarrow"], [NSImage imageNamed:@"lazyarrow"], [NSImage imageNamed:@"lazyarrow"], NO, NSCompositeSourceOver, 1, NO);
}
- (void)drawPart:(NSScrollerPart)part highlight:(BOOL)highlight {
//NSLog(@"drawPart:%@ highlight:%@", NSScrollerPartDescription(part), highlight ? @"YES":@"NO");
NSRect partRect = [self rectForPart:part];
switch (part) {
case NSScrollerKnob: {
assert(!highlight);
if ([self isVertical]) {
partRect.origin.y++;
partRect.size.height -= 2;
} else {
// FIXME really vertical
partRect.origin.x++;
partRect.size.width -= 2;
}
NSRect newRect = NSMakeRect(partRect.origin.x+4, [self isVertical] ? partRect.origin.y+3 : partRect.origin.y, partRect.size.width - 6,[self isVertical] ? partRect.size.height-5 : partRect.size.height - 4);
NSBezierPath *path = [NSBezierPath bezierPathWithRoundedRect:newRect
xRadius:[self isVertical] ? 4: 4
yRadius:[self isVertical] ? 4 : 4];
[path setLineWidth:2];
[[NSColor colorWithDeviceRed:0.114 green:0.114 blue:0.114 alpha:.6] set];
[path fill];
[[NSColor colorWithDeviceWhite:1.0
alpha:0.100] set];
[path addClip];
[path stroke];
// NSBezierPath *knobPath = [NSBezierPath bezierPathWithRoundedRect:partRect
// xRadius:5
// yRadius:5];
//[[NSColor colorWithDeviceRed:89./255. green:105./255. blue:131./255. alpha:1.] set];
/*
NSGradient *gradient = [[[NSGradient alloc] initWithColorsAndLocations:
[NSColor colorWithDeviceRed:(89.0/255.0) green:(105/255.0) blue:(131/255.0) alpha:1.0], 0.0,
[NSColor colorWithDeviceRed:(89.0/255.0) green:(105/255.0) blue:(131/255.0) alpha:1.0], 0.0768,
[NSColor colorWithDeviceRed:(154.0/255.0) green:(169/255.0) blue:(190/255.0) alpha:1.0], 0.0769,
[NSColor colorWithDeviceRed:(94.0/255.0) green:(113/255.0) blue:(144/255.0) alpha:1.0], 0.9231,
[NSColor colorWithDeviceRed:(61.0/255.0) green:(80/255.0) blue:(111/255.0) alpha:1.0], 0.9232,
[NSColor colorWithDeviceRed:(61.0/255.0) green:(80/255.0) blue:(111/255.0) alpha:1.0], 1.0,
nil
] autorelease];
*/
// [knobPath setLineWidth:2.0];
// [knobPath stroke];
//[gradient drawInBezierPath:knobPath
// angle:[self isVertical] ? 90. : 0.];
//--
/*[[NSColor colorWithDeviceRed:0. green:0. blue:255/128 alpha:1.0] set];
[[NSBezierPath bezierPathWithRoundedRect:partRect
xRadius:6.0
yRadius:6.0] fill];*/
//NSRectFill(partRect);
} break;
case NSScrollerIncrementLine: {
} break;
case NSScrollerKnobSlot: {
NSAssert(!highlight, nil);
#if 0
[[NSColor darkGrayColor] set];
// NSRectFill(partRect);
#else
partRect = [self bounds];
/*
NSGradient *gradient = [[[NSGradient alloc] initWithColorsAndLocations:
[NSColor colorWithDeviceRed:(89.0/255.0) green:(105/255.0) blue:(131/255.0) alpha:1.0], 0.0,
[NSColor colorWithDeviceRed:(89.0/255.0) green:(105/255.0) blue:(131/255.0) alpha:1.0], 0.0768,
[NSColor colorWithDeviceRed:(154.0/255.0) green:(169/255.0) blue:(190/255.0) alpha:1.0], 0.0769,
[NSColor colorWithDeviceRed:(94.0/255.0) green:(113/255.0) blue:(144/255.0) alpha:1.0], 0.9231,
[NSColor colorWithDeviceRed:(61.0/255.0) green:(80/255.0) blue:(111/255.0) alpha:1.0], 0.9232,
[NSColor colorWithDeviceRed:(61.0/255.0) green:(80/255.0) blue:(111/255.0) alpha:1.0], 1.0,
nil
] autorelease];
*/
NSGradient *gradient = [[[NSGradient alloc] initWithColorsAndLocations:
[NSColor colorWithDeviceRed:(161.0/255.0) green:(161/255.0) blue:(161/255.0) alpha:1.0], 0.0,
[NSColor colorWithDeviceRed:(186.0/255.0) green:(186/255.0) blue:(186/255.0) alpha:1.0], 0.067,
[NSColor colorWithDeviceRed:(219.0/255.0) green:(219/255.0) blue:(219/255.0) alpha:1.0], 0.2,
[NSColor colorWithDeviceRed:(230.0/255.0) green:(230/255.0) blue:(230/255.0) alpha:1.0], 0.333,
[NSColor colorWithDeviceRed:(240.0/255.0) green:(240/255.0) blue:(240/255.0) alpha:1.0], 0.667,
[NSColor colorWithDeviceRed:(223.0/255.0) green:(223/255.0) blue:(223/255.0) alpha:1.0], 0.8,
[NSColor colorWithDeviceRed:(204.0/255.0) green:(204/255.0) blue:(204/255.0) alpha:1.0], 0.867,
[NSColor colorWithDeviceRed:(178.0/255.0) green:(178/255.0) blue:(178/255.0) alpha:1.0], 1.0,
nil
] autorelease];
// CGContextRef context = (CGContextRef) [[NSGraphicsContext currentContext] graphicsPort];
// CGContextSetRGBFillColor(context, 0,0,0,0);
// CGContextFillRect(context, partRect);
[gradient drawInRect:partRect angle:[self isVertical] ? 90. : 0.];
// NSRectFillUsingOperation(partRect, NSCompositeClear);
#endif
}
}}
- (void)drawKnob
{
[self drawPart:NSScrollerKnob highlight:NO];
[self setArrowsPosition:NSScrollerArrowsNone];
/*
NSRect knobRect = [self rectForPart:NSScrollerKnob];
NSRect newRect = NSMakeRect(knobRect.origin.x+3, knobRect.origin.y, knobRect.size.width - 6, knobRect.size.height);
NSBezierPath *path = [NSBezierPath bezierPathWithRoundedRect:newRect
xRadius:5
yRadius:5];
[path setLineWidth:2];
[[NSColor colorWithDeviceRed:0.114 green:0.114 blue:0.114 alpha:0.3] set];
[path fill];
[[NSColor colorWithDeviceWhite:1.0
alpha:0.100] set];
[path addClip];
[path stroke];
*/
}
- (void)drawKnobSlotInRect:(NSRect)slotRect highlight:(BOOL)flag;
{
[self drawPart:NSScrollerKnobSlot highlight:NO];
/*
NSRect newRect = NSMakeRect(slotRect.origin.x, slotRect.origin.y, slotRect.size.width, slotRect.size.height);
NSBezierPath *path = [NSBezierPath bezierPathWithRoundedRect:newRect
xRadius:10
yRadius:10];
[path setLineWidth:2];
[[NSColor colorWithDeviceRed:0.114 green:0.114 blue:0.114 alpha:0.3] set];
[path fill];
[[NSColor colorWithDeviceWhite:1.0
alpha:0.100] set];
[path addClip];
[path stroke];
*/
}
@end
```
Anyone know how to fix this problem so it can end up looking like iOS' UIScrollView/UIScroller?:

or like [Sparrow](http://sparrowmailapp.com/)s custom NSScrollers?:

| Drawing custom NSScroller in NSScrollView problem | CC BY-SA 2.5 | 0 | 2011-01-22T20:50:49.593 | 2011-03-02T04:00:47.227 | null | null | 175,827 | [
"objective-c",
"macos",
"ios",
"nsscrollview",
"nsscroller"
]
|
4,770,587 | 1 | 4,770,967 | null | 27 | 8,425 | I'm running ADT (Android Development Tools) in Eclipse and verified that my debugger is working by putting a breakpoint in `MainMenu.oncreate (class Activity)`. But when I put it in the first line of my `AsyncTask.doInBackground`, it never hits it. I know it's running because I put a Log statement in the `AsyncTask` and it shows up in LogCat. Any help would be appreciated as I prefer the debugger over the logging.
My versions:
```
Eclipse SDK Version: 3.6.1
Build id: M20100909-0800
```

| How do I use the Eclipse debugger in an AsyncTask when developing for Android? | CC BY-SA 2.5 | 0 | 2011-01-22T21:07:54.400 | 2017-01-23T02:31:02.067 | 2011-10-20T11:13:54.353 | 15,177 | 135,414 | [
"android",
"eclipse",
"debugging",
"android-asynctask",
"adt"
]
|
4,770,751 | 1 | 4,771,178 | null | 22 | 32,628 | When plugging my iPhone in and starting the Xcode organizer, a yellow circle next to the device show me that "This device is busy or otherwise unusable by Xcode."
The Organizer is then processing two files (the second one takes quite a while to finish) and afterwards I get the error message as shown in the screenshot.
I tried to google for that error message ("dyld_shared_cache_extract_dylibs failed") but could not find anything useful.
I tried a couple things: repair permissions of my harddrive and run "sudo update_dyld_shared_cache -force". Still getting the error message.
I am running iOS 4.2.1 and Xcode 3.2.5. I have not updated Xcode after updating from 4.2 to 4.2.1 (I think).

The Xcode console is empty but the regular OS X console shows this:
```
1/22/11 10:56:19 PM Xcode[4187] Started symbol copying process
1/22/11 10:56:19 PM Xcode[4187] Skipped copying file 1 of 2 ("processed" sentinal found)
1/22/11 10:56:19 PM Xcode[4187] Skipped processing file 1 of 2 ("processed" sentinal found)
1/22/11 10:56:19 PM Xcode[4187] Skipped copying file 2 of 2 ("copied" sentinal found)
1/22/11 10:56:19 PM Xcode[4187] Started processing file 2 of 2
1/22/11 10:56:20 PM [0x0-0x4d04d].com.apple.Xcode[4187] arch already exists in fat dylib
1/22/11 10:56:20 PM [0x0-0x4d04d].com.apple.Xcode[4187] arch already exists in fat dylib
1/22/11 10:56:20 PM [0x0-0x4d04d].com.apple.Xcode[4187] arch already exists in fat dylib
1/22/11 10:56:21 PM [0x0-0x4d04d].com.apple.Xcode[4187] arch already exists in fat dylib
1/22/11 10:56:21 PM [0x0-0x4d04d].com.apple.Xcode[4187] arch already exists in fat dylib
1/22/11 10:56:22 PM [0x0-0x4d04d].com.apple.Xcode[4187] arch already exists in fat dylib
1/22/11 10:56:22 PM [0x0-0x4d04d].com.apple.Xcode[4187] arch already exists in fat dylib
1/22/11 10:56:22 PM [0x0-0x4d04d].com.apple.Xcode[4187] arch already exists in fat dylib
1/22/11 10:56:23 PM [0x0-0x4d04d].com.apple.Xcode[4187] arch already exists in fat dylib
1/22/11 10:56:23 PM [0x0-0x4d04d].com.apple.Xcode[4187] arch already exists in fat dylib
1/22/11 10:56:23 PM [0x0-0x4d04d].com.apple.Xcode[4187] arch already exists in fat dylib
```
This error message is then repeated constantly.
| Xcode Organizer: can not use iPhone (dyld_shared_cache_extract_dylibs failed) | CC BY-SA 2.5 | 0 | 2011-01-22T21:32:27.570 | 2020-01-07T09:28:15.677 | 2011-01-22T22:04:38.810 | 278,288 | 278,288 | [
"iphone",
"xcode",
"macos",
"ios"
]
|
4,770,794 | 1 | 4,770,854 | null | 0 | 218 | I the following code in my class. When I launch my app on the simulator it works. However when launcing the app on an actual device(iPhone 1g, 3.1.3) it does not work. Any ideas?
(it's for making gradient background)
```
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
static NSString *MainScreenCellID = @"MainScreenCellID";
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:MainScreenCellID];
if (cell == nil) {
cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:MainScreenCellID] autorelease];
}
cell.textLabel.text = [[[self.controllers objectAtIndex:[indexPath row]] navigationItem] title];
cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
UIImageView *bgimage = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"cell_bg.png"]];
cell.backgroundView = bgimage;
[bgimage release];
for (UIView *view in cell.contentView.subviews) {
view.backgroundColor = [UIColor clearColor];
}
return cell;
}
```

(Black fields is added because the app is not done yet.)
EDIT:
I can add that on the UITableViewCell which this method work on I have made my own subclasses, but where I am using the UITableViewDefaultStyle it does not work.
| Problems with background on UITableViewCell iPhone | CC BY-SA 2.5 | null | 2011-01-22T21:42:24.677 | 2011-01-22T21:52:22.027 | null | null | 454,049 | [
"iphone"
]
|
4,770,840 | 1 | 4,770,865 | null | 4 | 3,028 | I have few doubts. I have heard from some of my colleagues that, if we have created composite Nonclustured index on following table order of all the filters should be in order of Indexed column then Filter.
> MyTable (T1, T2, T3, T4, T5)
Non
Clustured index(T1, T2) in the order
T1 then T2
1. Which of the queries works faster ?
2. Does order of Indexed column affects performance ?
3. Should Indexed Columns come first to optimize queries ?
4. What is the order of processing a query. Which filter is taken first while processing a query ? Does it starts from Last filter and goes on to first filter ?
```
Select * from MyTable WHERE T1=1 AND T2=2 AND T3=1
--(Indexing will be used) Fastest as T3 has been included after indexed columns
```
```
Select * from MyTable WHERE T2=1 AND T1=2 AND T3=1
--(No Indexing will be used)
```
```
Select * from MyTable WHERE T3=1 AND T1=1 AND T2=2
--(Indexing will be used) slower than Query 1 as indexed columns included afterwards
```
```
Select * from MyTable WHERE T3=1 AND T2=1 AND T1=2
--(No Indexing will be used) slower than Query 2 as indexed columns occurs after non indexed column condition
```
```
Select * from MyTable WHERE T3=1 AND T2=1
```
```
Select * from MyTable WHERE T3=1 AND T1=1
```
```
Select * from MyTable WHERE T3=1 AND T2=1 OR T1=2
```
What does the following order in SSMS index creation means i.e. which filter should come first ?

When I tried to shuffle the order of columns shown in index columns. I saw were increasing and Clustured index scan was being used.
But when I uses the same order as shown in image. Then bookmark lookup got removed and also got Index Seek. So I can see order of Columns in index is playing some vital role here but could not sense how.
| What should be the order of filters in query to optimize queries to use Indexing | CC BY-SA 2.5 | 0 | 2011-01-22T21:49:17.293 | 2011-01-22T22:43:11.600 | 2011-01-22T22:26:50.257 | 203,262 | 203,262 | [
"sql-server",
"performance",
"indexing",
"query-optimization"
]
|
4,771,224 | 1 | 4,771,339 | null | 7 | 4,014 | I am developing iPhone game. I have the below Source image to draw it to the background. The Source image has alpha 0x00 and gradation around edge and the background's alpha is 0xff. When I draw the source image to the background, I have black color like you could see the Result image. I am using OpenGL ES glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA) method. I have changed every possible arguments, but every time it is not moved.
Why do I have the black color in the edge of the source image? What is the problem? Does not every games in iphone use gradation?
Do I need to make the source image with out gradation?
Does anyone know the solution?
Source image :

Result image :

| iPhone opengl es alpha-blending. I have black color in edge | CC BY-SA 3.0 | 0 | 2011-01-22T23:08:55.040 | 2017-09-08T13:57:37.053 | 2017-09-08T13:57:37.053 | 3,885,376 | 417,294 | [
"iphone",
"opengl-es",
"alphablending"
]
|
4,771,607 | 1 | 4,771,627 | null | 1 | 65 | I have two buttons on a webpage, I am trying to make the Clear button be a little lower, to align with the Search button. Why is the Clear button so high?
Here is a live example: [http://www.davidjpotter.com/temp/test.php](http://www.davidjpotter.com/temp/test.php)

```
<table border=1>
<tr>
<td>
<button type="submit">Search</button>
<img src="../images/button-clear.png">
</td>
</tr>
</table>
```
| Why is my image so high on the page? | CC BY-SA 2.5 | 0 | 2011-01-23T00:42:18.903 | 2011-01-23T00:51:34.797 | 2011-01-23T00:49:06.560 | 1,267,363 | 1,267,363 | [
"html"
]
|
4,771,528 | 1 | 4,772,849 | null | 11 | 6,326 | In trying to learn the art of data storage I have been trying to take in as much solid information as possible. PerformanceDBA posted some really helpful tutorials/examples in the following posts among others: [is my data normalized?](https://stackoverflow.com/questions/4061826/is-my-data-normalized/) and [Relational table naming convention](https://stackoverflow.com/questions/4702728/relational-table-naming-convention/). I already asked a subset question of this model [here](https://stackoverflow.com/questions/4763141/data-modeling-supertype-subtype/).
So to make sure I understood the concepts he presented and I have seen elsewhere I wanted to take things a step or two further and see if I am grasping the concepts. Hence the purpose of this post, which hopefully others can also learn from. Everything I present is conceptual to me and for learning rather than applying it in some production system. It would be cool to get some input from PerformanceDBA also since I used his models to get started, but I appreciate all input given from anyone.
As I am new to databases and especially modeling I will be the first to admit that I may not always ask the right questions, explain my thoughts clearly, or use the right verbage due to lack of expertise on the subject. So please keep that in mind and feel free to steer me in the right direction if I head off track.
If there is enough interest in this I would like to take this from the logical to physical phases to show the evolution of the process and share it here on Stack. I will keep this thread for the Logical Diagram though and start new one for the additional steps. For my understanding I will be building a MySQL DB in the end to run some tests and see if what I came up with actually works.
Here is the list of things that I want to capture in this conceptual model.
1. The purpose of this is to list Bands, their members, and the Events that they will be appearing at, as well as offer music and other merchandise for sale
2. Members will be able to match up with friends
3. Members can write reviews on the Bands, their music, and their events. There can only be one review per member on a given item, although they can edit their reviews and history will be maintained. BandMembers will have the chance to write a single Comment on Reviews about the Band they are associated with. Collectively as a Band only one Comment is allowed per Review. Members can then rate all Reviews and Comments but only once per given instance
4. Members can select their favorite Bands, music, Merchandise, and Events
5. Bands, Songs, and Events will be categorized into the type of Genre that they are and then further subcategorized into a SubGenre if necessary. It is ok for a Band or Event to fall into more then one Genre/SubGenre combination.
6. Event date, time, and location will be posted for a given band and members can show that they will be attending the Event. An Event can be comprised of more than one Band, and multiple Events can take place at a single location on the same day
7. Every party will be tied to at least one address and address history shall be maintained. Each party could also be tied to more then one address at a time (i.e. billing, shipping, physical)
8. There will be stored profiles for Bands, BandMembers, and general members.
So there it is, maybe a bit involved but could be a great learning tool for many hopefully as the process evolves and input is given by the community. Any input?

In response to PerformanceDBA
That was my original thought but you got me thinking. Maybe the site would want to sell its own merchandise or even other merchandise from the bands. Not sure a mod to make for that. Would it require an entire rework of the Catalog section or just the identifying relationship that exists with the Band?
Attempted a mod to sell both complete albums or song. Either way they would both be in electronic format only available for download. That is why I listed an Album as being comprised of Songs rather then 2 separate entities.
I understand what you bring up about the circular relation with Favorite. I would like to get to this “It is either one Entity with some form of differentiation (FavoriteType) which identifies its treatment” but how to is not clear to me. What am I missing here?
“Business Rules This is probably the only area you are weak in.”
Thanks for the honest response. I will readdress these but I hope to clear up some confusion in my head first with the responses I have posted back to you.
Yes I would like to have Accepted, Rejected, and Blocked. I am not sure what you are referring to as to how this would change the logical model?
A person does not have to be a User. They can exist only as a BandMember. Is that what you are asking?
Zero, One, or More…Oops I admit I forgot to give this attention when building the model. I am submitting this version as is and will address in a future version. I need to read up more on Constraint Checking to make sure I am understanding things.
Depends if you envision OrderPurchase in the future.
Can you expand as to what you mean here?

In response to PerformanceDBA input...
1. I was mixing the concept of Identifying / Non-Identifying and Cardinality (i.e. Genre / SubGenre), and doing so inconsistently to make things worse.
2. Associative Tables are not required in Logical Diagrams as their many-to-many relationships can be depicted and then expanded in the Physical Model.
3. I was overlooking the Cardinality in a lot of the relationships
4. The importance of reading through relationships using effective Verb Phrases to reassure I am modeling what I want to accomplish.
In the concept of this model it is only required to track a Venue as a location for an Event. No further data needs to be collected. With that being said Events will take place on a given EventDate and will be hosted at a Venue. Venues will host multiple events and possibly multiple events on a given date. In my new model my thinking was that EventDate is already tied to Event . Therefore, Venue will not need a relationship with EventDate. The 5th and 6th bullets you have listed under U.2) leave me questioning my thinking though. Am I missing something here?
Is it time to move the link between Item and Band up to Item and Party instead? With the current design I don't see a possibility to sell merchandise not tied to the band as you have brought up.
I left as per your input rather than making it a discrete Supertype/Subtype Relationship as I don’t see a benefit of having that type of roll up.
After going through the exercise for FavoriteItem, I feel that Item to Review requires a many-to-many relationship so that is indicated. Necessary?

I took a few days on this version, going back and forth with my design. Once the logical process is complete, as I want to see if I am on the right track, I will go through in depth what I had learned and the troubles I faced as a beginner going through this process. The big point for this version was it took throwing in some Keys to help see what I was missing in the past. Going through the process of doing a matrix proved to be of great help also. Regardless of anything, if it wasn't for the input given by PerformanceDBA I would still be a lost soul wondering in the dark. Who knows my current design might reaffirm that I still am, but I have learned a lot so I am know I at least have a flashlight in my hand.
At this point in time I admit that I am still confused about identifying and non-identifying relationships. In my model I had to use non-identifying relationships with non nulls just to join the relationships I wanted to model. In reading a lot on the subject there seems to be a lot of disagreement and indecisiveness on the subject so I did what I thought represented the right things in my model. When to force (identifying) and when to be free (non-identifying)? Anyone have inputs?

Ok took the V1.3 inputs and cleaned things up for this V1.4
Currently working on a V1.5 to include attributes.

Okay, it has been some time since I have posted on here but the work on this project is still ongoing. I am posting V1.6 now which includes a number of changes from the last posting of V1.4. This version shows the further evolution of the Keys. It still does not include the attributes or any AK's or IE's. I have started working on the physical model and used that to help work through the attributes and to try and shed some light on the problems I am having with defining the AK's and IE's. The next posting of the Logical Model will include these keys and the attributes.

| Data Modeling: Logical Modeling Exercise | CC BY-SA 2.5 | 0 | 2011-01-23T00:23:45.367 | 2022-09-25T09:40:54.783 | 2019-01-04T00:21:51.690 | 1,505,120 | 527,298 | [
"database",
"database-design",
"relational-database",
"database-schema",
"identifying-relationship"
]
|
4,771,706 | 1 | null | null | 0 | 555 | I am fairly new to android and am having some problems with a layout. Below is an approximation of what I want the layout to look like. (I would like the list to be below the screen at first so that the user can scroll down to see it.) However my code as it currently stands makes all of the views on the left only take up a quarter the screen instead of half, as depicted, even though I have all widths set to fill_parent.
Also, this layout seems to mess up the coordinate system on my custom view. Normally this wouldn't be much of an issue, but in this case I am using that view to draw a picture and the picture ends up in the wrong place. Does anybody have any idea how to resolve these issues? 
| Android Layout Fill_Parent Problem | CC BY-SA 2.5 | null | 2011-01-23T01:14:01.473 | 2011-01-23T01:59:57.100 | null | null | 583,082 | [
"android",
"layout",
"fill"
]
|
4,771,775 | 1 | 4,771,847 | null | 0 | 440 | I dont know why I'm not getting the correct date and time in my region.
Here's the code
```
<?php
//date_default_timezone_set('Asia/Manila');
echo date('YYYY-mm-dd H:i:s'); ?>
```
Even if I comment out or change the time zone the date and time that I'm getting is still the same.
The date today is 23. But its outputting 22. And the time doesn't change even if I change the time zones.
Does it have something to do with my computer?
Because I sometimes notice that the clock on the lower right corner of the screen is not displaying the correct time.
Heres the current time, but its displaying this:
```
01-22-2011 05:38:31-PM
```

| cannot get the correct date and time in php | CC BY-SA 2.5 | null | 2011-01-23T01:39:15.773 | 2014-04-28T16:56:54.930 | null | null | 472,034 | [
"php",
"datetime"
]
|
4,771,949 | 1 | 4,771,988 | null | 1 | 1,371 | I am fairly new to android and am having some problems with a layout. Below is an approximation of what I want the layout to look like. (I would like the list to be below the screen at first so that the user can scroll down to see it.) However my code as it currently stands makes all of the views on the left only take up a quarter the screen instead of half, as depicted, even though I have all widths set to fill_parent.
Also, this layout seems to mess up the coordinate system on my custom view. Normally this wouldn't be much of an issue, but in this case I am using that view to draw a picture and the picture ends up in the wrong place. Does anybody have any idea how to resolve these issues? 
Here is my code:
```
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent" android:layout_height="fill_parent"
android:orientation="vertical">
<TableLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent" android:layout_height="fill_parent"
android:orientation="vertical">
<TableRow>
<TableLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_height="fill_parent" android:orientation="vertical"
android:layout_width="fill_parent">
<TableRow>
<TextView android:text="Resultant Force" android:id="@+id/resForceTitle"
android:textSize="25dip" android:layout_width="fill_parent"
android:layout_height="fill_parent" android:padding="3dip"
android:gravity="center" android:layout_span="2" />
</TableRow>
<TableRow>
<TextView android:id="@+id/magText" android:text="Magnitude (N) ="
android:textSize="15dip" android:layout_width="fill_parent"
android:layout_height="fill_parent" android:padding="3dip"
android:gravity="center_vertical" android:layout_span="2" />
</TableRow>
<TableRow>
<EditText android:id="@+id/magnitude" android:inputType="numberDecimal"
android:layout_width="fill_parent" android:padding="3dip"
android:layout_height="fill_parent" android:layout_span="2" />
</TableRow>
<TableRow>
<TextView android:id="@+id/dirText" android:text="Angle (deg) ="
android:layout_width="fill_parent" android:layout_height="fill_parent"
android:textSize="15dip" android:gravity="center_vertical"
android:layout_span="2" />
</TableRow>
<TableRow>
<EditText android:id="@+id/direction" android:inputType="numberDecimal"
android:layout_height="fill_parent" android:padding="3dip"
android:layout_width="fill_parent" android:layout_span="2" />
</TableRow>
<TableRow>
<Button android:id="@+id/pushButton" android:text="Add Force"
android:layout_height="fill_parent" android:padding="3dip"
android:layout_width="fill_parent" />
<Button android:id="@+id/clearButton" android:text="Clear"
android:layout_height="fill_parent" android:padding="3dip"
android:layout_width="fill_parent" />
</TableRow>
</TableLayout>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent" android:layout_height="fill_parent">
<android.physicsengine.AxisDrawing
android:id="@+id/image" android:layout_width="fill_parent"
android:layout_height="fill_parent" />
</FrameLayout>
</TableRow>
</TableLayout>
<ListView android:id="@android:id/list" android:layout_height="wrap_content"
android:padding="3dip" android:layout_width="fill_parent"
android:clickable="false" />
<TextView android:id="@android:id/empty" android:text="Add Forces to List Components"
android:layout_width="fill_parent" android:layout_height="fill_parent"
android:textSize="15dip" android:gravity="center_vertical" />
</LinearLayout>
```
| Layout Problem in Android | CC BY-SA 2.5 | 0 | 2011-01-23T02:26:52.123 | 2011-01-23T02:54:50.690 | null | null | 583,082 | [
"android",
"layout",
"parent",
"fill"
]
|
4,771,965 | 1 | 4,881,388 | null | 1 | 1,160 | it's quite looklike with [how to query child objects in mongodb](https://stackoverflow.com/questions/4762947/how-to-query-child-objects-in-mongodb)
I Have:

Pais (Country) with its children (ufds(27) on total), I'm making a Ruby seed.rb file to bulky insert from a file.
the mapping files are:
```
class Pais
include Mongoid::Document
field :nome, :type => String
field :sigla, :type => String
embeds_many :ufds
validates_uniqueness_of :sigla
end
class Ufd
include Mongoid::Document
field :codigo_ibge, :type => String
field :sigla, :type => String
field :nome, :type => String
embedded_in :pais, :inverse_of => :ufds
embeds_many :cidades
validates_uniqueness_of :codigo_ibge, :sigla
end
class Cidade
include Mongoid::Document
field :codigo_ibge, :type => String
field :nome, :type => String
embedded_in :ufd, :inverse_of => :cidades
validates_uniqueness_of :codigo_ibge
end
```
So when importing, I do beside other things the following:
```
pais_base = Pais.create!(:nome => "Brasil", :sigla => "BR")
File.open(caminho + 'estados.txt').each_with_index do |linha, index|
sigla, nome, ibge = linha.chomp.split("|")
pais_base.ufds << Ufd.new(:sigla => sigla, :nome => nome, :codigo_ibge => ibge )
end
```
which creates correctly the PAIS and its UFDS children, but now to create a children of UFDS, I load another file and try to find a UFDS with id (codigo_ibge), but always returns null
```
File.open(caminho + 'cidades.txt').each_with_index do |linha, index|
ufd, ibge, nome = linha.chomp.split("|")
uf = pais_base.ufds.find(:first, :conditions => {:codigo_ibge => ufd.to_s }) <<<<< NIL
uf.cidades << Cidade.new(:codigo_ibge => ibge.to_s, :nome => nome)
end
```
How should I do that? I've run out of ideas :/
Thanks in advance.
| How to query Child elements on MongoDB | CC BY-SA 2.5 | null | 2011-01-23T02:31:30.607 | 2011-02-03T00:00:44.320 | 2017-05-23T12:07:06.850 | -1 | 55,921 | [
"ruby",
"ruby-on-rails-3",
"mongodb",
"mongoid"
]
|
4,772,033 | 1 | 4,772,164 | null | 6 | 1,181 | Is anyone aware of a free or commercial WPF control that would do something like this:

X character per box, and auto-tabbing to the next box as you complete each box? Similar to the way that license keys are entered for Microsoft products.
I don't think it would be particularly hard to do from scratch, but I'd like to avoid reinventing the wheel if a good example of this already exists.
| Segmented textbox in WPF | CC BY-SA 2.5 | 0 | 2011-01-23T02:51:52.913 | 2011-01-23T03:36:48.947 | null | null | 1,338 | [
"wpf",
"textbox",
"wpf-controls"
]
|
4,772,092 | 1 | 4,777,927 | null | 62 | 30,346 | I am trying to build a small application in C# which should start/stop an IIS Express worker process. For this purpose I want to use the official "IIS Express API" which is documented on MSDN: [http://msdn.microsoft.com/en-us/library/gg418415.aspx](http://msdn.microsoft.com/en-us/library/gg418415.aspx)
As far as I understand, the API is based (only) on COM interfaces. To use this COM interfaces I've added a reference to the COM library in VS2010 via Add Reference -> COM -> "IIS Installed Versions Manager Interface":

So far so good, but what's next? There is an `IIISExprProcessUtility` interface available which includes the the two "methods" to start/stop an IIS process. Do I have to write a class which implements this interface?
```
public class test : IISVersionManagerLibrary.IIISExprProcessUtility
{
public string ConstructCommandLine(string bstrSite, string bstrApplication, string bstrApplicationPool, string bstrConfigPath)
{
throw new NotImplementedException();
}
public uint GetRunningProcessForSite(string bstrSite, string bstrApplication, string bstrApplicationPool, string bstrConfigPath)
{
throw new NotImplementedException();
}
public void StopProcess(uint dwPid)
{
throw new NotImplementedException();
}
}
```
As you can see, I'm not a professional developer. Can someone point me in the right direction.
Any help is greatly appreciated.
According to the suggestions I've tried the following code which unfortunately doesn't work:

Ok, it can be instantiated but I cannot see how to use this object...


```
IISVersionManagerLibrary.IIISExpressProcessUtility test3 = (IISVersionManagerLibrary.IIISExpressProcessUtility) Activator.CreateInstance(Type.GetTypeFromCLSID(new Guid("5A081F08-E4FA-45CC-A8EA-5C8A7B51727C")));
Exception: Retrieving the COM class factory for component with CLSID {5A081F08-E4FA-45CC-A8EA-5C8A7B51727C} failed due to the following error: 80040154 Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG)).
```
| Starting and stopping IIS Express programmatically | CC BY-SA 2.5 | 0 | 2011-01-23T03:12:03.447 | 2019-04-08T11:53:14.660 | 2011-02-23T21:33:17.897 | 3,268 | 586,084 | [
"c#",
"iis",
"com",
"com-interop",
"iis-express"
]
|
4,772,270 | 1 | 4,772,518 | null | 13 | 2,556 | (Before anyone asks, it's not homework.)
Say you have 2 Arrays `y0` and `y1` where
`y0 = [1,2,3,4,5,6]` and
`y1 = [2,1,6,3,4,5]`
Notice `y0[0] = y1[1] = 1`, it essentially means `y0[0]` is connected to `y1[1]`. Similarly, `y0[2] = y1[3] = 3` so they are "connected" as well.

Each element in one array has a corresponding entry in the second array.
I need to find a set of (of maximum size) such that none of the "edges" (or lines) will intersect.
In the above example, notice,
1. Edge 1 and Edge 2 will intersect.
2. Edge 6 will intersect with Edge 3, Edge 4, Edge 5.
Therefore, the solution can be be `1,3,4,5` or `2,3,4,5` (size = 4) since none of those lines will intersect each other. There can be multiple solutions, but I need just one.
My Question, Is there any known CS Problem that resembles this? What algorithm should i be using?
I've tried to explain my problem with an example, however, incase it's still not clear i'll clarify any queries.
Thanks in advance.
| Algorithm for Least Edge Intersections | CC BY-SA 2.5 | 0 | 2011-01-23T04:16:08.010 | 2017-11-24T06:27:50.147 | 2011-01-23T05:53:52.343 | 216,517 | 216,517 | [
"algorithm",
"combinatorics"
]
|
4,772,273 | 1 | 8,312,531 | null | 10 | 12,728 | Using some pretty stock standard C# code to resize an image, and place it on a coloured background
```
Image imgToResize = Image.FromFile(@"Dejeuner.jpg");
Size size = new Size(768, 1024);
Bitmap b = new Bitmap(size.Width, size.Height);
Graphics g = Graphics.FromImage((Image)b);
g.InterpolationMode = InterpolationMode.HighQualityBicubic;
g.FillRectangle(Brushes.Green, 0, 0, size.Width, size.Height);
g.DrawImage(imgToResize, new Rectangle(0,150,768, 570));
b.Save("sized_HighQualityBicubic.jpg");
```
[The result](https://i.stack.imgur.com/tod59.jpg) has a funny artefact in the 0th and 1st columns of pixels. The 0th column appears to be mixed with the background colour, and the 1st column has been made lighter.
See the top left corner zoomed for high quality bicubic and bicubic.


..and HighQualityBilinear

This forum post appears to be someone with the same problem: [DrawImage with sharp edges](http://www.dotnetmonster.com/Uwe/Forum.aspx/dotnet-drawing/3208/DrawImage-with-sharp-edges)
The sounds like a bug to me? I can understand why the colours would mix at the top of the resized image. But mixing the colours on the left / right edges doesn't make sense. Does anyone know of a fix to prevent these artefacts?
Update: very similar conversation going on in the comments here: [GDI+ InterpolationMode](http://www.west-wind.com/Weblog/posts/626.aspx)
| InterpolationMode HighQualityBicubic introducing artefacts on edge of resized images | CC BY-SA 2.5 | 0 | 2011-01-23T04:17:13.320 | 2011-11-29T14:35:27.030 | 2011-01-24T03:56:15.207 | 109,102 | 109,102 | [
"c#",
"graphics",
"system.drawing"
]
|
4,772,571 | 1 | null | null | 2 | 2,275 | i am using jquery version 1-4.4 in my jsp page.
following alert box appear in my Internet explorer.


this is my jsp page code.
```
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<script type="text/javascript" src="js/jquery-1.4.4.min.js"></script>
<script type="text/javascript">
$(document).ready(function() {
$("a").click(function(event) {
alert("Thanks for visiting!");
});
});
$(document).ready(function() {
alert("jquery version 1.4.4");
});
</script>
<title>Insert title here</title>
</head>
<body>
<a href="http://jquery.com/">jQuery</a>
</body>
</html>
```
but the same cod runing with jquery version 1.3.2.
why it is not working with version 1.4.4?
even it is not working with the jquery 1.3.2 greater version.
help me out!
| not able to include jquery 1-4.4 in jsp's | CC BY-SA 2.5 | null | 2011-01-23T06:08:15.547 | 2011-02-14T18:46:36.963 | null | null | 309,990 | [
"jquery",
"jsp"
]
|
4,772,670 | 1 | 4,773,352 | null | 2 | 1,362 | Say the user taps 4 spots on the iphone, defining an irregular 4 sided polygon (in 2d space). Is there a way to map/fit a (potentially highly distorted) image onto this shape, without using OpenGL?
Something like:

Is my only option to somehow calculate the 3d space that my irregular 4 sided shape sits in (based on where the tapped 2d points sit), create an OpenGL plane in that space, and map my texture to it flatly? Seems like there should be an easier way...
Thanks in advance.
After diving into OpenGL I'm almost there... but I still can't get the texture to distort correctly. The triangulation seems to be messing with the texture mapping:

| Map image to irregular polygon? | CC BY-SA 3.0 | null | 2011-01-23T06:54:35.607 | 2013-03-23T14:32:38.060 | 2013-03-23T14:32:38.060 | 881,989 | 500,308 | [
"iphone",
"ios",
"opengl-es",
"transform",
"textures"
]
|
4,772,691 | 1 | 4,776,179 | null | 7 | 5,990 | I'm working on some JavaScript code to render standard 2D SVG/Canvas elements (drawn with [Raphael-JS](http://raphaeljs.com/)) in an isometric view.
Say we have two rectangles drawn next to each other. I then have them redrawn at the correct angles (basically a 30 degree twist) for an isometric view.

()
My problem is I don't know how to properly translate all the individual elements so they "tile" correctly instead of just overlapping.
While actually using tiles would make things easier as I could just base any given tile's placement on the one before it, tiles won't work in this case. Everything is dynamic and will be more complex than simple x/y planes.
[Here is an image of some isometric tiles](https://imgur.com/Ib8TG) if there's any confusions as to how I want these objects to be placed.
| Translating SVG elements for an Isometric view | CC BY-SA 2.5 | 0 | 2011-01-23T07:03:18.957 | 2014-01-30T07:18:20.117 | 2011-01-24T16:55:07.460 | 405,017 | 173,748 | [
"javascript",
"3d",
"svg",
"raphael"
]
|
4,772,712 | 1 | null | null | 3 | 1,544 | For the life of me, I can't get this graph to display properly with extended encoding.
If I change the axis range from 0 to 15, it looks correct, but if I change the axis from 9 to 15, the data is plotted incorrectly.
This turns out correct:
```
<img src="http://chart.apis.google.com/chart?cht=lc&chco=125292&chm=B,cee1f5,0,0,0&chls=2&chs=408x237&chxt=x,y&chxl=0:|Jan|Feb|Mar|Apr|May|Jun|Jul&chxr=1,0,15&chd='+extendedEncode(Array(10,15,9,11,12,10,11),15)+'" />
```

But this scales incorrectly:
```
<img src="http://chart.apis.google.com/chart?cht=lc&chco=125292&chm=B,cee1f5,0,0,0&chls=2&chs=408x237&chxt=x,y&chxl=0:|Jan|Feb|Mar|Apr|May|Jun|Jul&chxr=1,9,15&chd='+extendedEncode(Array(10,15,9,11,12,10,11),15)+'" />
```

I have spent hours and hours trying to figure this out, and I feel like I'm missing something incredibly simple. I have to use extended encoding because of the range of numbers my program will ultimately be handling, so changing to "Text Format with Custom Scaling" is not an option.
| How do I make Google Charts scale an extended encoding line graph properly? | CC BY-SA 2.5 | 0 | 2011-01-23T07:12:45.883 | 2011-05-18T21:55:16.187 | 2017-02-08T14:31:23.477 | -1 | 393,208 | [
"google-visualization"
]
|
4,772,729 | 1 | 4,772,863 | null | 2 | 1,272 | I have followed the instructions as per [this article](http://www.clintharris.net/2009/iphone-app-shared-libraries/) and have been working with Cocos2D without much issues. Recently, I tried including the Box2D headers to try some physics like so:
```
#import "Box2D.h"
```
This resulted in a lot of errors where the Box2D.h file could not include the rest of the header files:
```
../cocos2d-iphone-0.99.5/external/Box2d/Box2D/Box2D.h:34:0 ../cocos2d-iphone-0.99.5/external/Box2d/Box2D/Box2D.h:34:37: error: Box2D/Common/b2Settings.h: No such file or directory
```
That's the first error and the rest of the 23 are like that, but for the different headers in Box2D.h.
I have already added the projects/targets to the current project as per the instructions in the article, so my project currently looks like this:

Also, I have attempted to remedy this by selecting all .m files in my project and setting the file type to sourcecode.cpp.objcpp but do not think that this is the issue. I am certain that under the build setting, the folders where these headers are stored are added. If it weren't, Cocos2D wouldn't be able to compile either.
What am I doing wrong?
| Working with Box2D/Cocos2D in an external iOS project | CC BY-SA 2.5 | null | 2011-01-23T07:17:02.027 | 2012-10-26T08:54:43.563 | 2011-01-23T07:22:16.877 | 6,291 | 6,291 | [
"c++",
"objective-c",
"xcode",
"cocos2d-iphone",
"box2d"
]
|
4,773,123 | 1 | 4,773,979 | null | 0 | 488 | What controls can I use to make the "Textured Window" look like the tabbed view type look of most OS X applications? Like this:

So far all I have is this:

| How to make "Textured Window" look like preference pane | CC BY-SA 2.5 | null | 2011-01-23T09:25:34.187 | 2011-01-23T13:10:03.783 | null | null | 91,414 | [
"cocoa",
"xcode",
"interface-builder"
]
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.