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,914,558 | 1 | 4,914,930 | null | 1 | 2,268 | I'm working on a little project, the aim being to generate a report from a database for a server. The database is SQLite and contains tables like 'connections', 'downloads', etc.
The report I produce will ultimately contain a number of graphs displaying things like 'connections per day', 'top downloads this month', etc.
I plan to use [flot](http://code.google.com/p/flot/) for the graphs because the graphs it makes look very nice:
This is my current plan for how my reports will work:
- Static .HTML file which the report. This will contain headings, embedded flot graphs, etc. - JSON Data file. These will be generated by my report generation python script, they will basically contain a JSON variable for each graph representing the dataset that the graph should map. ([100,2009-2-2],[192,2009-2-3]...)- Report generation python script, this will load the SQLite database, run a list of set SQL queries and spit out the JSON Data files.
Does this sound like a sensible set up? I can't help but feel it could be improved but I don't see how. I want the reports to be static. The server they run on cannot take heavy loads so a dynamically generated report is out of the question and also unnecessary for this application.
My concerns are:
- I feel that the Python script is largely pointless, all of the processing performed is done by SQLite, my script is basically going to be used to store SQL queries and package up the output. With a bit more work SQLite could probably do this for me.- It seems I'm solving a problem that must have been solved many times before 'take sql queries, spit out pretty graphs in a daily report' must have been done hundreds of times. I'm just having trouble tracking down any broad implementations.
| Using Python to generate JSON Data | CC BY-SA 2.5 | 0 | 2011-02-06T16:31:38.783 | 2011-02-06T17:32:28.327 | null | null | 180,295 | [
"python",
"json",
"sqlite",
"reporting",
"report"
]
|
4,914,965 | 1 | null | null | 0 | 1,674 | I am trying to create simple database application using Eclipse RCP with Oracle in the back end. I have kept ojdbc14.jar in the classpath of eclipse and its showing me the class when I press
```
Cntr-Shift-T
```
It show the class `oracle.jdbc.driver.OracleDriver` present in the classpath

But when I run my program its showing error message as
```
java.lang.ClassNotFoundException: oracle.jdbc.driver.OracleDriver
at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:506)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:422)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:410)
at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:169)
at veridinview.model.ModelProvider.<init>(ModelProvider.java:37)
at veridinview.model.ModelProvider.getInstance(ModelProvider.java:88)
at veridinview.View.createPartControl(View.java:154)
at org.eclipse.ui.internal.ViewReference.createPartHelper(ViewReference.java:375)
at org.eclipse.ui.internal.ViewReference.createPart(ViewReference.java:229)
at org.eclipse.ui.internal.WorkbenchPartReference.getPart(WorkbenchPartReference.java:595)
at org.eclipse.ui.internal.PartPane.setVisible(PartPane.java:313)
at org.eclipse.ui.internal.ViewPane.setVisible(ViewPane.java:529)
at org.eclipse.ui.internal.presentations.PresentablePart.setVisible(PresentablePart.java:180)
at org.eclipse.ui.internal.presentations.util.PresentablePartFolder.select(PresentablePartFolder.java:270)
at org.eclipse.ui.internal.presentations.util.LeftToRightTabOrder.select(LeftToRightTabOrder.java:65)
at org.eclipse.ui.internal.presentations.util.TabbedStackPresentation.selectPart(TabbedStackPresentation.java:473)
at org.eclipse.ui.internal.PartStack.refreshPresentationSelection(PartStack.java:1254)
at org.eclipse.ui.internal.PartStack.setSelection(PartStack.java:1207)
at org.eclipse.ui.internal.PartStack.showPart(PartStack.java:1606)
at org.eclipse.ui.internal.PartStack.createControl(PartStack.java:647)
at org.eclipse.ui.internal.PartStack.createControl(PartStack.java:574)
at org.eclipse.ui.internal.PartSashContainer.createControl(PartSashContainer.java:568)
at org.eclipse.ui.internal.PerspectiveHelper.activate(PerspectiveHelper.java:272)
at org.eclipse.ui.internal.Perspective.onActivate(Perspective.java:981)
at org.eclipse.ui.internal.WorkbenchPage.onActivate(WorkbenchPage.java:2632)
at org.eclipse.ui.internal.WorkbenchWindow$27.run(WorkbenchWindow.java:2986)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
at org.eclipse.ui.internal.WorkbenchWindow.setActivePage(WorkbenchWindow.java:2967)
at org.eclipse.ui.internal.WorkbenchWindow.busyOpenPage(WorkbenchWindow.java:771)
at org.eclipse.ui.internal.Workbench$23.runWithException(Workbench.java:1221)
at org.eclipse.ui.internal.StartupThreading$StartupRunnable.run(StartupThreading.java:31)
at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:134)
at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:4041)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3660)
at org.eclipse.ui.application.WorkbenchAdvisor.openWindows(WorkbenchAdvisor.java:803)
at org.eclipse.ui.internal.Workbench$31.runWithException(Workbench.java:1567)
at org.eclipse.ui.internal.StartupThreading$StartupRunnable.run(StartupThreading.java:31)
at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:134)
at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:4041)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3660)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2548)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2438)
at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:671)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:664)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at veridinview.Application.start(Application.java:20)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:369)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:619)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:574)
at org.eclipse.equinox.launcher.Main.run(Main.java:1407)
at org.eclipse.equinox.launcher.Main.main(Main.java:1383)
```
Where can I put my Jar file so that eclipse RCP can see it?
Oracle version- 10g express
OS: windows 7
| Eclipse RCP connecting to oracle | CC BY-SA 2.5 | 0 | 2011-02-06T17:38:00.897 | 2011-02-07T13:05:12.473 | 2011-02-06T18:46:31.870 | 138,604 | 138,604 | [
"java",
"oracle",
"jdbc",
"eclipse-rcp"
]
|
4,915,031 | 1 | 4,915,337 | null | 2 | 1,338 | `strokeRect (0, 0, canvasWidth, canvasHeight);` draws a full rectangle but the line width is cut in half, here is an example:
```
<canvas></canvas>
<script>
var canvas = document.getElementsByTagName ("canvas");
var lineWidth = 10;
var canvasHeight = canvas[0].height;
var canvasWidth = canvas[0].width;
var ctx = canvas[0].getContext ("2d");
ctx.lineWidth = lineWidth;
ctx.strokeRect (0, 0, canvasWidth, canvasHeight);
</script>
```

I can fix that but isn't elegant:
```
<canvas></canvas>
<script>
var canvas = document.getElementsByTagName ("canvas");
var lineWidth = 10;
var canvasHeight = canvas[0].height - lineWidth;
var canvasWidth = canvas[0].width - lineWidth;
var ctx = canvas[0].getContext ("2d");
ctx.lineWidth = lineWidth;
lineWidth /= 2;
ctx.strokeRect (lineWidth, lineWidth, canvasWidth, canvasHeight);
</script>
```

Is there a native method to do that ? Something like the "box-sizing" css3 attribute:
```
canvas {
box-sizing: border-box;
}
```
Thanks.
| Prevent stroke border from overflowing path | CC BY-SA 2.5 | null | 2011-02-06T17:52:59.413 | 2011-02-09T19:35:00.500 | 2011-02-06T19:13:34.943 | 405,017 | 210,304 | [
"html",
"canvas",
"border",
"stroke"
]
|
4,915,062 | 1 | 4,915,274 | null | 1 | 829 | I have a script that will slide a div up from the bottom of the page. The toggle button for this div however is going to be right on top of the sliding div. But, when the button is pressed and the div starts to slide down, the script hides the button. Here's an example...
[http://www.codekraken.com/dashpad/testing/test2.html](http://www.codekraken.com/dashpad/testing/test2.html)
How can I get the toggle button to slide with it, but not disappear?
Here's an example of what I mean:

| Sliding divs and toggle button | CC BY-SA 2.5 | 0 | 2011-02-06T17:58:24.273 | 2011-02-06T18:40:59.060 | 2011-02-06T18:32:42.873 | 298,053 | 603,986 | [
"javascript",
"jquery",
"css"
]
|
4,915,200 | 1 | null | null | 0 | 957 | I'm developing an OpenGL application which right now only draws a big tube consisting of several small cylinders (kind of like a slinky). I'm getting an annoying effect when I turn the lighting and normals on, as from certain angles I get these annoying black dots on the cylinders' borders:

I belive this is a byproduct of the fact the cylinders are very thin. Basically I set the normal to (0,0,+/- 1) when setting the top/base, and then side normals are (cos(toRadian(beta)), sin(toRadian(beta)), 0).
Is it possible to remove this effect whitout getting 'fatter' cylinders? Or is there something wrong in the way I define the normals?
Thanks
| Cylinder Normals | CC BY-SA 2.5 | null | 2011-02-06T18:22:18.147 | 2011-02-21T13:30:06.113 | null | null | 220,248 | [
"opengl",
"graphics",
"normals"
]
|
4,915,648 | 1 | 4,915,814 | null | 0 | 180 |
### Summary
New to iPhone programming, I'm having trouble picking the right optimization strategy to filter a set of view components in a scrollview with huge content. In what area would my app gain the most performance?
### Introduction
My current iPad app-in-progress let's users explore fairly large binary tree structures. The trees contain between 30 to 900 nodes, and when drawing inside a scrollview (with limited zoom) it looks like this.

The nodes' contents are stored in a SQLite backed Core Data model. It's a binary tree and if a node has children, there are always exactly two. The x and y positions are part of the model, as are the dimensions of the node connections, shown as dotted lines.
### Optimization
Only about 50 nodes fit the screen at any given time. With the largest trees containing up to 900 nodes, it's not possible to put everything in a scrollview controlled and zooming UIView, that's a recipe for crashes. So I have to do per frame filtering of the nodes.
And that's where my troubles start. I don't have the experience to make a well founded decision between the possible filtering options, and in addition I probably don't know about that really fast special magic buried deep in Objective-C or Cocoa Touch. Because the backing store is close to 200 MB in size (some 90.000 nodes in hundreds of trees), it's very time consuming to test every single tree on the iPad device. Which is why I'd like to ask you guys for advice.
For all my attempts I'm putting a filter method in the scrollViewDidScroll: and scrollViewDidZoom:. I'm also blocking the main thread with the filter, because I can't show the content without the nodes anyway. But maybe someone has an idea in that area?
Because all the positioning is present in the Core Data model, I might use NSFetchRequest to do the filtering. Is that really fast though? I have the idea it's not a very optimized method.
From what I've tried, the faulted managed objects seem to fit in memory at once, but it might be tricky for the larger trees once their contents start firing faults. Is it a good idea to loop over the NSSet of nodes and see what items should be on screen?
Are there other tricks to gain performance? Would you see ways where I could use multi threading to get the display set faster, even though the model's context was created on the main thread?
Thanks for your advice,
EP.
| Per frame optimization for large datasets | CC BY-SA 2.5 | null | 2011-02-06T19:44:03.003 | 2011-02-06T20:15:01.483 | 2020-06-20T09:12:55.060 | -1 | 432,782 | [
"objective-c",
"cocoa-touch",
"optimization",
"core-data",
"binary-tree"
]
|
4,915,709 | 1 | 4,915,784 | null | 2 | 2,982 | I have a project this year. It is about developing a Java application with a database for sharing and validating documents between the manager, secretary and head of finance.
My question is: How to make the database accessible by all, since the application will be installed on computers that I mentioned above, do I have to install it (the database) on these computers? The constraints of consistency and integrity of the database will be violated. The users will not have the same copy after each update!
Is there a possibility (or technology in Java) to put the database on the web and there will be accessible by all, or make it accessible from a computer that I realize as a server (client-server).
I would be grateful for your help or giving links for Tutorials.

| Java DB Client-server technology - centralized DB - How? | CC BY-SA 4.0 | 0 | 2011-02-06T19:55:35.993 | 2021-04-10T21:18:31.153 | 2021-04-10T17:32:01.520 | 604,156 | 604,156 | [
"java",
"database",
"client",
"centralized"
]
|
4,915,949 | 1 | null | null | 2 | 3,179 | I'm creating dynamic table which having more than 20 rows and number of columns can be change according to user input. first column is header and other columns need to bind using data returning from web services. And there are few rows which can editable. when user click on submit button need to validate the changed cells and process the data.
I have created ASP.net table and added rows and cells one by one. but this is not reusable way of doing, is there any alternative to create editable dynamic table with left column as header?

| Best way to create dynamic table with left column header | CC BY-SA 2.5 | 0 | 2011-02-06T20:37:48.177 | 2011-02-20T13:45:59.600 | 2011-02-08T18:52:24.333 | 2,558,060 | 2,558,060 | [
"c#",
"asp.net",
"user-interface",
"dynamic"
]
|
4,915,961 | 1 | 4,916,007 | null | 0 | 209 | I want to turn on editing mode and show a keyboard after a new view was pushed by a navigation controller. I looked at the Docs for NSTimer and they referred me to performSelector:withObject:afterDelay. For some reason I'm getting an exception. After scanning through related threads and trying a few different things I'm no further. Here's my code and stack trace.
The idea is to call showKeyboardForNewEquipment after a 1/2s delay in the viewDidLoad. That way it'll look pretty.
Thanks.

| How do I get a keyboard to delay about 1/2s before showing? | CC BY-SA 2.5 | null | 2011-02-06T20:41:01.537 | 2011-02-06T20:49:20.263 | null | null | 519,493 | [
"objective-c",
"ios"
]
|
4,915,957 | 1 | 4,916,085 | null | 52 | 23,866 | I'm working with MVC3, and using Entity Framework 4.0 Entities as my model. So far, everything works great as far as using it as a model (all the crud operations/page generations work out of the box). I'm wondering, though, how do you get the same robust labels and validation information as when you generate a model manually?
Here's an example of what I mean. This is a class generated by the sample MVC3 project:
```
public class LogOnModel
{
[Required]
[Display(Name = "User name")]
public string UserName { get; set; }
[Required]
[DataType(DataType.Password)]
[Display(Name = "Password")]
public string Password { get; set; }
[Display(Name = "Remember me?")]
public bool RememberMe { get; set; }
}
```
With the example above, you can specify what gets rendered in a label for the field (Display), and what type of field to use (Password). However, when I try to use the entity framework and push it to the view below, I see the automatically generated labels are just the field names, and not anything I want the user to see/have to read:
```
@using (Html.BeginForm()) {
@Html.ValidationSummary(true)
<fieldset>
<legend>Person</legend>
<div class="editor-label">
@Html.LabelFor(model => model.FirstName)
</div>
<div class="editor-field">
@Html.EditorFor(model => model.FirstName)
@Html.ValidationMessageFor(model => model.FirstName)
</div>
<div class="editor-label">
@Html.LabelFor(model => model.MiddleName)
</div>
<div class="editor-field">
@Html.EditorFor(model => model.MiddleName)
@Html.ValidationMessageFor(model => model.MiddleName)
</div>
<div class="editor-label">
@Html.LabelFor(model => model.LastName)
</div>
<div class="editor-field">
@Html.EditorFor(model => model.LastName)
@Html.ValidationMessageFor(model => model.LastName)
</div>
<div class="editor-label">
@Html.LabelFor(model => model.Birthdate)
</div>
<div class="editor-field">
@Html.EditorFor(model => model.Birthdate)
@Html.ValidationMessageFor(model => model.Birthdate)
</div>
<p>
<input type="submit" value="Create" />
</p>
</fieldset>}
```

How do I add these extra decorations to the entities that are generated using EF4? Is there something besides System.ComponentModel.DataAnnotations that I should be using? I know entities get regenerated and it's probably not a good idea to add this to entities' code directly, but for some reason I can't think of a better approach than manually entering the label text in the view (lame, there's no reason to have to do that, this is MVC!). I want to keep it so that the application is dynamic enough to be able to have the correct display information for my model come through and keep an MVC approach. How do I do it?
| Using System.ComponentModel.DataAnnotations with Entity Framework 4.0 | CC BY-SA 2.5 | 0 | 2011-02-06T20:39:40.320 | 2019-04-15T07:21:31.263 | 2013-03-15T04:59:45.170 | 727,208 | 403,661 | [
"asp.net-mvc",
"asp.net-mvc-3",
"c#-4.0",
"entity-framework-4"
]
|
4,916,317 | 1 | 4,916,585 | null | 2 | 1,781 | I am wondering if `gluLookAt` together with `glFrustum` is distorting the rendered picture.
This is how a scene is rendered:

And here's the code that rendered it.
`InitCamera` is called and should, as I understand it now, set up a matrix so as if I looked from a position 2 units above and 3 units in front of the origin towards the origin. Also `glFrustum` is used in order to create a perspective`.
```
void InitCamera() {
glMatrixMode(GL_MODELVIEW);
glLoadIdentity();
gluLookAt (
0, 2 , 3,
0, 0 , 0,
0, 1 , - 0
);
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
glFrustum (- 1, 1,
- 1, 1,
1,1000.0);
glMatrixMode(GL_MODELVIEW);
}
```
Then `TheScene` is what actually draws the picture:
```
void TheScene() {
glClear(
GL_COLOR_BUFFER_BIT |
GL_DEPTH_BUFFER_BIT
);
glMatrixMode(GL_MODELVIEW);
// Draw red circle around origin and radius 2 units:
glColor3d(1,0,0);
glBegin(GL_LINE_LOOP);
for (double i = 0; i<=2 * M_PI; i+=M_PI / 20.0) {
glVertex3d(std::sin(i) * 2.0, 0, std::cos(i) * 2.0);
}
glEnd();
// draw green sphere at origin:
glColor3d(0,1,0);
glutSolidSphere(0.2,128, 128);
// draw pink sphere a bit away
glPushMatrix();
glColor3d(1,0,1);
glTranslated(8, 3, -10);
glutSolidSphere(0.8, 128, 128);
glPopMatrix();
SwapBuffers(hDC_opengl);
}
```
The red should be drawn in the origin and at the center of the red circle around it. But looking at it just feels wierd, and gives me the imprssion that the green ball is not in the center at all.
Also, the pink ball should, imho, be drawn as a perfect circle, not as an ellipse.
So, am I wrong, and the picture is drawn correctly, or am I setting up something wrong?
| Is gluLookAt together with glFrustum distorting the rendering? | CC BY-SA 2.5 | null | 2011-02-06T21:36:34.077 | 2011-02-06T22:54:39.270 | null | null | 180,275 | [
"opengl",
"perspective",
"perspectivecamera"
]
|
4,916,494 | 1 | null | null | 0 | 1,496 | in my code, inside form, I have multi select list box:
```
<SELECT style="width: 250px;" id="data" multiple="multiple" name="data">
<OPTION value="111" selected="selected">111</OPTION>
<OPTION value="222">222</OPTION>
<OPTION value="333">333</OPTION>
</SELECT>
```

For submitting the form I'm using [jquery.form.js](http://jquery.malsup.com/form/) plugin.
```
$(document).ready(function () {
var options = {
beforeSubmit: showRequest,
success: showResponse
};
$('#myForm').ajaxForm(options);
});
```
The plugin submits only the values witch are selected: . How to force it to serialize and submit all values, not only selected ones: , and ?
Btw: The event showRequest looks following:
```
showRequest: function (formData, jqForm, options) {
//..
return true;
},
```
I thaught I can modify formData inside this function, and pass this overloaded object for submitting. But there is no such option, is there ? Nothing changes also, when I iterate here through all select options and force all to have selected attribute.
Any ideas ? I'd like to use this plugin, I don't want to submit form by my custom code.
Regards
@JK, @Luke, just for short explanation, I'd like to submit all options, despite selection, for example when I have following situation:

So I don't have list of strictly defined options, where I can just select or deselect some of them. In my case, I can create new options and I need the functionality I described.
| Submit all options from multi select list box with jquery.form.js plugin | CC BY-SA 2.5 | null | 2011-02-06T22:07:34.177 | 2011-02-07T00:15:09.663 | 2011-02-06T22:32:14.000 | 270,315 | 270,315 | [
"jquery",
"jquery-plugins"
]
|
4,916,579 | 1 | 4,919,298 | null | 0 | 178 | In my exam, i was supposed to write all pumping lemma conditions. that exactly what i did :

a friend told me that there is some errors but i can't find them...
Can some one help please ? what are the errors & why ?
| Finding errors in pumping lemma conditions | CC BY-SA 4.0 | null | 2011-02-06T22:19:04.170 | 2020-05-15T06:05:16.457 | 2020-05-15T06:05:16.457 | 501,557 | 476,101 | [
"regex",
"math",
"pumping-lemma"
]
|
4,916,610 | 1 | 4,916,630 | null | 1 | 87 | Chrome 9.0.597.83 beta on Ubuntu 10.10:

As you can see, the pattern doesn't work when passed in as a string, but works fine when passed in as a RegExp object. Why is this? I need to be able to pass it in as a string so that I can manipulate it before performing the match.
---
| How come this RegExp doesn't work when passed in as a string? | CC BY-SA 2.5 | null | 2011-02-06T22:23:17.800 | 2011-02-06T22:26:42.110 | null | null | 193,619 | [
"javascript",
"regex"
]
|
4,917,009 | 1 | 5,176,618 | null | 1 | 908 | I'm looking for best practices regarding abstracting my RIA domain context away from my view models to make them data source agnostic. It seems like the best solution I can find is the service agent pattern as described [here](http://weblogs.asp.net/dwahlin/archive/2010/12/20/wcf-ria-services-domaincontext-abstraction-strategies-say-that-10-times.aspx). However, what if I have some relatively complex query logic to perform?
For example, currently I have my domain contexts in my view models. Let's say I have a ContactSearchViewModel, where there is a bit of logic involved in constructing the search query:
```
protected EntityQuery<Contact> CreateSearchQuery()
{
var query = Context.GetContactsQuery().Where(
e => e.First_Name.ToLower().StartsWith(FirstNameSearch.ToLower()) &&
e.Last_Name.ToLower().StartsWith(LastNameSearch.ToLower()));
if (!string.IsNullOrEmpty(Phone))
{
query = query.Where(q => q.Phone == Phone ||
q.Mobile == Phone ||
q.Work == Phone);
}
if (SelectedContactType == "Prospect")
{
query = query.Where(q => q.Contact_Type_Id == 1);
}
else if (SelectedContactType == "Customer")
{
query = query.Where(q => q.Contact_Type_Id == 2);
}
return query;
}
```
Now I could of course have a service agent method with a signature that looks something like `public EntityList<Contact> SearchContacts(string firstName, string lastName, string phone, ContactType contactType)` but imagine if my search queries were even more complex - this interface would become unwieldy. Is there a better alternative, some way I could construct the query in the VM like I do with the domain context? Or should I just suck it up and use some parameter objects?
I would very much prefer to be able to construct the queries on the VM, because I currently have a small hierarchy of VMs which all perform various searches using a base search class and template method for generating queries, kind of like

Not being able to generate queries from the client would cause a lot of code duplication that I fixed using this inheritance structure.
| WCF RIA Service Agent pattern with complex queries | CC BY-SA 2.5 | null | 2011-02-06T23:45:48.837 | 2011-03-03T04:22:01.920 | 2011-02-07T00:26:58.333 | 13,877 | 13,877 | [
"silverlight",
"wcf",
"wcf-ria-services"
]
|
4,917,172 | 1 | 4,917,216 | null | 1 | 78 | Ok, so I am dealing with 4 tables here - Project, Members, Iterations and ProjectIterationMembers. When I create new project details, I am writing them to the Project table and I am also specifying an iteration (start date, end date - a project consists of at least one iteration, but more iterations can be added afterwards). Members from the Members table are now written to the ProjectIterationMembers table as they are assigned to iterations.
What I am trying to do is display project details in a datagridview in this format:
```
Project Name | Project Manager | Project Status
Project A | Person A | In Progress
Project B | Person B | In Progress
```
However, my output is this for some reason when I add a new project or new iterations:
```
Project Name | Project Manager | Project Status
Project A | Person A | In Progress
Project A | Person B | In Progress
Project B | Person A | In Progress
Project B | Person B | In Progress
```
Here is my sql statement and thanks for your help:
```
SELECT
DISTINCT(Project.ProjectName),
Project.ProjectID,
Project.Status,
Project.CompanyID,
Project.StartDate,
m.MemberID,
m.FirstName + ' ' + m.LastName AS ProjectManager
FROM
Project,
Member m,
ProjectIterationMember
WHERE
m.CompanyRole = 'Project Manager'
AND Project.CompanyID = '" + co_id + "'
AND m.MemberID = ProjectIterationMember.MemberID
ORDER BY
Project.StartDate DESC
```
| Wrong SQL output | CC BY-SA 2.5 | null | 2011-02-07T00:18:33.977 | 2011-02-07T08:50:54.480 | 2011-02-07T01:02:10.497 | 586,724 | 588,302 | [
"sql"
]
|
4,917,186 | 1 | 4,917,304 | null | 1 | 525 | I've got a Picker that comes up as the inputView for UITextField instead of a keyboard. The user dials in their choice, saves and then dismisses the view. When you come back to that view and go to dial in a new choice the picker is out of sync with the data that was saved.
The picker is using an array of strings for a datasource.
So for example looking at the picture below you can see that the picker is in it's first position which is empty. But what I want is for the picker to dial in to RE2 or whichever of the other options is saved in the textField.
How do I sync the two up?

| How to Sync selected row of UIPicker with previously entered data | CC BY-SA 2.5 | 0 | 2011-02-07T00:21:59.823 | 2017-12-13T15:25:07.357 | null | null | 519,493 | [
"ios",
"uipicker"
]
|
4,917,188 | 1 | 4,917,238 | null | 1 | 993 | I am using C# and .Net in a windows form application
and I have an Index
this index is an array of lines each line is a label on the Form
each label width is the same and must be the same with the Form width
and this index must appear on my form like this :

my problem is :
i want the the "text" to be exactly on the left and the the "number" to be exactly on the right
each line must be only one label
and the big problem is that each char have a different width so i can't know how much i must fill between the text and the number to make each label look exactly as I want
| make the text fill the entire label width? | CC BY-SA 2.5 | null | 2011-02-07T00:22:28.623 | 2011-02-07T00:36:23.820 | 2011-02-07T00:36:23.820 | 76,337 | 600,331 | [
"c#",
".net",
"winforms"
]
|
4,917,501 | 1 | 4,918,111 | null | 5 | 2,740 | So I've got a borderless form and I need it to be re-sizable (by clicking any of the 4 sides or the corners). To clarify, I want my form to be borderless like the default sticky notes in Windows 7.

I've got it to work (on bottom right corner only for now) by using the code provided by Julien Lebosquain on this post:
[Resize borderless window on bottom right corner](https://stackoverflow.com/questions/1535826/resize-borderless-window-on-bottom-right-corner/1535943#1535943)
However, I would really like to display the drag gripper image on the bottom right corner. In his post, Julien mentioned this regarding the gripper:
> you can initialize a new
VisualStyleRenderer(VisualStyleElement.Status.Gripper.Normal) and
use its `PaintBackground()` method.
I'm not sure how to go about doing this within my form. Can someone point me in the right direction?
Thank you.
| Drawing a gripper in a borderless form | CC BY-SA 3.0 | 0 | 2011-02-07T01:39:25.003 | 2013-01-11T05:44:24.003 | 2017-05-23T10:30:21.840 | -1 | 134,115 | [
"c#",
".net",
"winforms",
"user-interface"
]
|
4,917,570 | 1 | 4,917,933 | null | 13 | 4,742 | Full Disclosure: This was also posted to the ggplot2 mailing list. (I'll update if I receive a response)
I'm a bit lost on this one, I've tried messing around with geom_polygon but successive attempts seem worse than the previous.
The image that I'm trying to recreate is this, the colours are unimportant, but the positions are:

In addition to creating this, I also need to be able to label each element with text.
At this point, I'm not expecting a solution (although that would be ideal) but pointers or similar examples would be immensely helpful.
One option that I played with was hacking scale_shape and using 1,1 as coords. But was stuck with being able to add labels.
The reason I'm doing this with ggplot, is because I'm generating scorecards on a company by company basis. This is only one plot in a 4 x 10 grid of other plots (using pushViewport)
Note: The top tier of the pyramid could also be a rectangle of similar size.
| R: Creating Custom Shapes with ggplot | CC BY-SA 2.5 | 0 | 2011-02-07T02:00:41.947 | 2013-01-25T21:35:13.460 | 2011-02-07T03:31:16.473 | 170,352 | 170,352 | [
"r",
"ggplot2"
]
|
4,917,761 | 1 | 4,918,503 | null | 34 | 60,408 | That Metadata error is what I get when I browse to the service in a browser. I am not consuming it with a client
and Yes.. I added `<serviceMetadata httpGetEnabled="True"/>`, and I have a mex endpoint defined
but it still won't work..
So I created a barebones service to host on IIS7. Fresh install of Windows 7 and VS2010.
I had followed the instructions of this page to the letter:
[http://msdn.microsoft.com/en-us/library/ms733766.aspx](http://msdn.microsoft.com/en-us/library/ms733766.aspx)
I'm convinced that this has to be some sort of configuration issue with IIS7 but and not sure. Here's my service setup:
EDIT:
I tried accessing the service with svcutil and got the following error:
```
The remote server returned an error: (415) Cannot process the message because the content type 'application/soap+xml; charset=utf-8' was not the expected type 'text/xml; charset=utf-8'..
```
it also says: `The HTML document does not contain Web service discovery information.`
not sure how to resolve it, however..
.svc file:
`<%@ServiceHost language="C#" Debug="true" Service="DestructionServices.TacticalNukeSVC`"%>
.cs file (located in the C:\Development\HostedDestructionServices\App_Code folder):
```
using System;
using System.ServiceModel;
namespace DestructionServices
{
[ServiceContract]
public interface INukeInterface
{
[OperationContract]
string FireMissile();
[OperationContract]
string DirectFire(double x, double y, double z);
[OperationContract]
void EnterCoordinates(double x, double y, double z);
}
public class TacticalNukeSVC : INukeInterface
{
public string FireMissile()
{
return "Boom";
}
public void EnterCoordinates(double x, double y, double z)
{
//bah, who cares about coordinates..
}
public string DirectFire(double x, double y, double z)
{
return "Fired at: " + x + ", " + y + ", " + z;
}
}
}
```
Web.Config:
```
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<system.serviceModel>
<services>
<service name="DestructionServices.Destro" behaviorConfiguration="MetadataBehavior">
<endpoint address="" binding="wsHttpBinding" contract="DestructionServices.INukeInterface" />
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior name="MetadataBehavior">
<serviceDebug includeExceptionDetailInFaults="True" httpHelpPageEnabled="True" />
<serviceMetadata httpGetEnabled="True"/>
</behavior>
</serviceBehaviors>
</behaviors>
</system.serviceModel>
</configuration>
```

| WCF Metadata publishing for this service is currently disabled + Content Type error | CC BY-SA 2.5 | 0 | 2011-02-07T02:58:04.547 | 2016-05-01T13:43:38.477 | 2011-02-07T04:52:37.173 | 129,565 | 129,565 | [
".net",
"wcf"
]
|
4,917,809 | 1 | 4,919,268 | null | 10 | 46,476 | I am using iTextSharp in my application to generate a barcode. Though everything is working as I wanted, I need to display the value of the barcode under the barcode like the one showin in the attached image.

Below is the C# code I use:
```
Barcode39 barcodeImg = new Barcode39();
barcodeImg.Code = barcodeValue.ToString();
barcodeImg.CreateDrawingImage(System.Drawing.Color.Black, System.Drawing.Color.White).Save(stream, ImageFormat.Png);
```
| Barcode with Text Under using ItextSharp | CC BY-SA 2.5 | 0 | 2011-02-07T03:13:58.267 | 2021-02-19T09:54:22.480 | 2011-02-08T17:41:54.667 | 477,771 | 199,931 | [
"c#",
"itext",
"barcode"
]
|
4,917,896 | 1 | 4,917,954 | null | 19 | 2,304 | To give you some background as to what I'm doing: I'm trying to quantitatively record variations in flow of a compressible fluid via image analysis. One way to do this is to exploit the fact that the index of refraction of the fluid is directly related to its density. If you set up some kind of image behind the flow, the distortion in the image due to refractive index changes throughout the fluid field leads you to a density gradient, which helps to characterize the flow pattern.
I have a set of routines that do this successfully with a regular 2D pattern of dots. The dot pattern is slightly distorted, and by comparing the position of the dots in the distorted image with that in the non-distorted image, I get a displacement field, which is exactly what I need. The problem with this method is resolution. The resolution is limited to the number of dots in the field, and I'm exploring methods that give me more data.
One idea I've had is to use a regular grid of horizontal and vertical lines. This image will distort the same way, but instead of getting only the displacement of a dot, I'll have the continuous distortion of a grid. It seems like there must be some standard algorithm or procedure to compare one geometric grid to another and infer some kind of displacement field. Nonetheless, I haven't found anything like this in my research.
Does anyone have some ideas that might point me in the right direction? FYI, I am not a computer scientist -- I'm an engineer. I say that only because there may be some obvious approach I'm neglecting due to coming from a different field. But I can program. I'm using MATLAB, but I can read Python, C/C++, etc.
Here are examples of the type of images I'm working with:
```
Regular: Distorted:
```
--------
| Recognizing distortions in a regular grid | CC BY-SA 2.5 | 0 | 2011-02-07T03:41:36.640 | 2011-06-26T05:49:01.643 | 2011-02-07T18:47:17.977 | 353,410 | 605,893 | [
"algorithm",
"image",
"matlab",
"image-processing",
"image-recognition"
]
|
4,918,044 | 1 | 4,980,096 | null | 1 | 4,526 | I am creating a jsTree instance which shows a directory listing of a file server. I am having difficulties getting "sub-folder" or "sub-directory" nodes of a jsTree to display as open-able.
While the folder-node's JSON `state` is `closed`, the display of the jsTree does not show the open/close triangle for that node.
Here is the initial configuration of my `#fileTree`:
```
$("#fileTree")
.jstree({
"core" : {
"initially_open" : [ "root" ] ,
"html_titles" : false
},
"json_data" : {
"progressive_render" : true,
"data" : [
{
"data" : { title : "/home/" + username },
"attr" : {
"id" : "/home/" + username,
"rel" : "root",
"href" : "file://home/" + username
},
"icon" : "/js/_demo/home.png",
"state" : "closed"
}
],
"ajax" : {
"url" : "/services/listDirectoryContents.pl",
"data" : function (n) {
return { id : n.attr ? n.attr("id") : "/home/" + username };
}
}
},
"themes": {
"theme": "default",
"dots": true,
"icons": true,
"url": "/js/themes/default/style.css"
},
"plugins" : [ "core", "themes", "json_data" ]
});
```
The `/services/listDirectoryContents.pl` script called from the `ajax` subsection is a near-RESTful script that takes a path as a query argument (whatever is in the `id` of the node).
The service outputs an array of directories and files in JSON format (at a `maxdepth` of 1), along with display attributes for use by jsTree.
Here is sample output from this service, using `/home/areynolds` as the root node:
```
$ ./listDirectoryContents.pl /home/areynolds
Status: 200 OK
Content-Type: text/html; charset=ISO-8859-1
[
{
"data" : {
"icon" : "/js/_demo/folder.png",
"title" : "projects",
"attr" : {
"rel" : "folder",
"href" : "file:///home/areynolds/projects",
"id" : "/home/areynolds/projects"
},
"state" : "closed"
}
},
{
"data" : {
"icon" : "/js/_demo/folder.png",
"title" : "proj",
"attr" : {
"rel" : "folder",
"href" : "file:///home/areynolds/proj",
"id" : "/home/areynolds/proj"
},
"state" : "closed"
}
},
...
{
"data" : {
"icon" : "/js/_demo/file.png",
"title" : "test.bed",
"attr" : {
"rel" : "file",
"href" : "file:///home/areynolds/test.bed"
}
}
}
]
```
On my web page, the root node (e.g. `/home/areynolds`) is initially closed — interestingly, despite the `core` plug-in's `initially_open` directive:

When I open the root node, I see a list of folders and files underneath the root node:

The correct `icon` and `title` data are shown for folders and files.
However, there are no open/close disclosure triangles next to each folder. (When opened, in theory, this would trigger an Ajax call for the list of folders and files of the opened sub-directory.)
How have I misconfigured in my JSON output or my initial `$("#fileTree").jstree()` setup, such that the open/close triangles are prevented from showing up?
Thanks for your advice!
| Rendered jsTree not reflecting "closed" states of JSON data nodes | CC BY-SA 2.5 | null | 2011-02-07T04:22:23.830 | 2011-06-27T03:37:49.820 | null | null | 19,410 | [
"jquery",
"ajax",
"json",
"metadata",
"jstree"
]
|
4,918,211 | 1 | null | null | 1 | 509 | I'm having a strange problem with a website I'm building for a client. I have some links in a list as part of a table, and in my CSS I have the following:
`a:hover { text-decoration: none; color: #DB6633; }`
Which changes the link to orange when the mouse hovers over it. This works fine on my 3 Macs using Firefox, Safari, Chrome etc (and my Windows PC using the same). However when viewed on my clients browsers (Safari & Firefox on OS X 10.6.4) they see this:

and this:

etc. As you can see, the orange doesn't line up with the text properly. I haven't seen this before, and I can't reproduce it at my end. I'm also having a problem with some images being slightly out also, but I'm not sure if that is related.
The client is running the latest versions of Safari & Firefox (as am I). They are running OS X 10.6.4, but I have that on one of my laptops and it displays the site fine.
Has anyone seen this before, and if so how can I fix this?
** EDIT **
OK some more detail: it happens less in Firefox than in Safari. I'm going to try and get it down to the least amount of code to reproduce it then I'll update with that also.
I think it's telling that it appears on both Firefox & Safari - which use different rendering engines. Could it be system related? An accessibility setting perhaps?
| CSS: Text color slightly offset in Safari/Firefox | CC BY-SA 2.5 | null | 2011-02-07T05:04:01.470 | 2012-03-19T20:48:08.930 | 2011-02-07T19:26:49.187 | 341,893 | 341,893 | [
"html",
"css",
"macos",
"firefox",
"safari"
]
|
4,918,542 | 1 | null | null | 1 | 74 | QQ is probably the most popular IM software in China. When I log into QQ with my account, a news window pops up (see attached photo):


So my question is, is this news windows purely a webpage/application, which can be achieved via HTML/CSS/JS, or something else, like a software?
And just a another example:
Haofang Gaming Platform is also very popular among Chinese gamers. My English is plain, I don't know how to say this, but it basically connects people over the internet that intend to play a specific game with many others in a specific geographic location, which providing a LAN like very fast and stable gaming platform. So is this also a purely web application? because according to my humble knowledge, it can also be achieved roughly the same way as a webpage
| What is this application? | CC BY-SA 2.5 | null | 2011-02-07T06:15:56.710 | 2011-02-07T07:09:52.803 | 2011-02-07T07:09:52.803 | 313,758 | 577,363 | [
"web-applications"
]
|
4,918,736 | 1 | 4,918,877 | null | 1 | 4,221 | I am a flex developer, and most of the time I am dealing with fonts in points, like 12,14, 23 point etc.
Now the client requirement has came, which asks to take the fonts sizes in milimeter(mm).
I found this formula for mm calculation, but I need to find out the screen DPI,
$mm = ($pixels * $25.4) / dpi
For DPI, I used flash.system.Capabilities.screenDPI, but I guess this is not the perfect way to find the screen DPI, as I have read some blogs mentioning that this always gives 72 as a result.
I found this formula for font coneversion, (point to mm)
1 PostScript point = 0.352777778 millimeters
But this is for postscript fonts, and i m bit confused, as I'm using swf files for fonts, (in flex3).
Can someone here guide me, how to deal with this sort of situation, and also I have take my design stage size in mm(like 1000mm X 1000mm), so in this case i'll use ratio to reduce the screen size


This is going to be the screen size in 800mm X 200mm, so here every mesurement has to be in mm, so please explain how to tackle this situation.
| fonts in milimeter(mm) in flex,how to convert point to mm? | CC BY-SA 3.0 | 0 | 2011-02-07T06:52:08.063 | 2017-02-17T15:25:58.733 | 2017-02-17T15:25:58.733 | 4,284,627 | 340,116 | [
"apache-flex",
"actionscript-3",
"flex3",
"flex4",
"mxml"
]
|
4,918,855 | 1 | 4,918,943 | null | 4 | 1,886 | I have a comment form where I am trying to render an HTML link to the Markdown reference within an HTML label. I tried adding the link to the `DisplayName` attribute in my view model:
```
[DisplayName("Comment (you can format comments with <a href=\"http://daringfireball.net/projects/markdown/syntax\">Markdown</a>)")]
public string Body { get; set; }
```
Which results in the following display:

I also tried adding the label directly within the view:
```
@Html.LabelFor(x => x.Comment.Body, "Comment (you can format comments with <a href=\"http://daringfireball.net/projects/markdown/syntax\">Markdown</a>)")
```
But the result is understandably the same.
I realise this is because MVC is `HTMLEncoding` the output for safety, but is there any way to turn this off per label, or do I just have to manually write out an HTML label in my view in this case?
| How do I render an HTML link within a form label using a DisplayName attribute and/or LabelFor? | CC BY-SA 2.5 | null | 2011-02-07T07:14:04.773 | 2019-10-04T12:53:16.723 | null | null | 43,140 | [
"asp.net-mvc-3",
"rendering",
"label",
"razor",
"data-annotations"
]
|
4,919,680 | 1 | 5,677,243 | null | 161 | 249,366 | I've seen this [post](https://stackoverflow.com/questions/2610497/change-an-inputs-html5-placeholder-color-with-css) already and tried everything I could to change the padding for my placeholder but alas, it seems it just doesn't want to cooperate.
Anyway, here is the code for the css. (: This is the generated css from sass)
```
#search {
margin-top: 1px;
display: inline;
float: left;
margin-left: 10px;
margin-right: 10px;
width: 220px;
}
#search form {
position: relative;
}
#search input {
padding: 0 10px 0 29px;
color: #555555;
border: none;
background: url('/images/bg_searchbar.png?1296191141') no-repeat;
width: 180px;
height: 29px;
overflow: hidden;
}
#search input:hover {
color: #00ccff;
background-position: 0px -32px;
}
```
And here's the simple html:
```
<div id="search">
<form>
<input type="text" value="" placeholder="Search..." name="q" autocomplete="off" class="">
</form>
<div id="jquery-live-search" style="display: block; position: absolute; top: 15px; width: 219px;">
<ul id="search-results" class="dropdown">
</ul>
</div>
</div>
```
Pretty simple? the placeholder is off for some reason but when you try to type in the input field, the text is the aligned. It seems that you can only change the color(for `webkit`) of the placeholder, but if I try to edit the padding of the containing input, it wrecks the design of the input!
Here are screenies of the placeholder and the input field with text input:


:
For now I have resorted to this [jquery plugin](http://code.google.com/p/jquery-placeholder/).
It works right out of the box and it fixes my chrome's problem. I would still like to uncover what the problem is (if it has something to do with MY chrome or something)
I'm pretty sure it's not the styles since John Catterfeld reproduced it with no problems, so I'm hoping someone out there could still point me to the right direction as to why this is happening to me(my client's chrome as well. So this is probably native to Chrome/OSX if John is using windows)
| HTML5 placeholder css padding | CC BY-SA 3.0 | 0 | 2011-02-07T09:26:31.940 | 2023-01-20T19:10:32.407 | 2017-05-23T11:54:44.313 | -1 | 334,545 | [
"html",
"google-chrome",
"webkit",
"css"
]
|
4,919,801 | 1 | 4,919,845 | null | 0 | 1,504 | I need design a simple LINQ to Entity query using EF. I am pretty new at it and I am stuck for more of 1 day.
From my DataBase table are:
```
CmsJobs
CmsJobsContents (Pure Junctional Table)
CmsContents
```
Any idea how to do it?
Thanks for your help
My Model EF:

| EF - Linq to Entity and navigation property | CC BY-SA 2.5 | null | 2011-02-07T09:40:55.087 | 2011-02-07T12:47:20.813 | null | null | 379,008 | [
"c#",
"linq",
"entity-framework",
"linq-to-entities"
]
|
4,919,846 | 1 | 4,919,907 | null | 73 | 54,319 | I want to change server location but I can't it's greyed (I cannot select last radio button) how can I do it then:

| Why tomcat server location property is greyed in Eclipse | CC BY-SA 2.5 | 0 | 2011-02-07T09:46:33.243 | 2016-07-22T05:29:01.703 | null | null | 310,291 | [
"java",
"eclipse",
"tomcat"
]
|
4,919,853 | 1 | 4,921,418 | null | 0 | 3,185 | I have a problem with Chrome. I have a drop-down list. Except for Chrome, it works well. However with chrome it adds an empty element at first.
HTML Part:
```
<head>
<script type="text/javascript">
$(document).ready(function() {
townDistrictObject.bind({cityId:1});
});
</script>
</head>
<body>
<div class="left marginleft15">
<p>Town</p>
<p>
<select name="town1" id="townId" style="width: 152px;">
<option selected="selected" value="999999999">Whole Istanbul</option>
<option value="999999998">Anatolian Part</option>
</select>
</p>
</div>
<div class="left marginleft15">
<p>District</p>
<p>
<select id="districtId" name="districtid1" style="width: 174px;" >
<option selected="selected" value="0">Whole Districts</option>
</select>
</p>
</div>
</body>
```
There is something like that at script side:
```
var townDistrictObject = {
defaults : {
cityId :1,
townElementId : "townId",
districtElementId : "districtId",
allDistricts: true
},
bind : function(options) {
$.extend(this.defaults, options);
var that = this;
var opts = this.defaults;
var townElement = $('#' + opts.townElementId);
townElement.val(0);
}
};
```
Firstly, there is an empty element at top of list.(It shouldn't be!)

Secondly, I will click one of them.("Whole Istanbul" for my example.)

Lastly, I check the list and that element at top disappears. Everything is OK after that time.

I checked the code and I think that the problem is related to script side. Thanks for your help.
| Chrome Drop-Down List Problem | CC BY-SA 2.5 | null | 2011-02-07T09:46:59.317 | 2011-02-07T12:44:29.880 | null | null | 453,596 | [
"javascript",
"jquery",
"html",
"google-chrome"
]
|
4,920,200 | 1 | 4,920,251 | null | 0 | 2,380 | A customer got this Java security warning on one of our ancient java components on a web site we develop:

The java applet is a tiny applet that does very little (it is simply a dropdown with the ability to write freetext). Is it a simple way to avoid this security warning?
The applet is something we have developed a long time ago, which has been running in our web solutions for years.
| Why is suddenly this java security warning shown on our applet | CC BY-SA 2.5 | 0 | 2011-02-07T10:29:24.560 | 2011-02-07T11:34:39.070 | 2011-02-07T11:34:39.070 | 4,725 | 109,392 | [
"java",
"security",
"applet",
"mixed-code"
]
|
4,920,210 | 1 | 5,411,051 | null | 12 | 3,020 | I get this graphical error with linum-mode in my Emacs. I tried upgrading from 23 to 24 (via git) and I've tried both with various supplied binaries online and with my home-compiled version. What I'm really interested in is where to start diagnosing the problem.

The problem goes away if I scroll the torn line numbers off screen and back in.
| What causes this graphical error in emacs with linum-mode on OS X? | CC BY-SA 2.5 | 0 | 2011-02-07T10:30:27.090 | 2015-04-23T11:09:14.947 | null | null | 288,913 | [
"emacs"
]
|
4,920,452 | 1 | 5,022,840 | null | 4 | 738 | I read in [this bugfix description](http://java.net/jira/browse/XHTMLRENDERER-168) that xhtmlrenderer should support the "orphans" and "widows" properties of CSS3 since Version R5.
Using R8, it seems not to work.
```
div.textContent {
orphans: 5;
widows: 3;
}
```
But it looks like this:

The paragraph (a div block element) is broken into two pieces although it must not.
Any ideas or experience with this? Thanks!
| How to use CSS3 orphans and widows properties with xhtmlrenderer (flying saucer) R8? | CC BY-SA 2.5 | 0 | 2011-02-07T10:56:24.730 | 2011-02-16T22:19:51.443 | 2011-02-10T07:51:23.327 | 223,686 | 223,686 | [
"java",
"pdf",
"xhtmlrenderer"
]
|
4,920,498 | 1 | 4,920,545 | null | 0 | 2,183 | Hi I try solve how stretch user control width / height which is active in tab control to tab control width / height.
I use caliburn micro.
I create some user control. Here is it:
```
<UserControl x:Class="Spirit.Views.TabChatView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:Micro="clr-namespace:Caliburn.Micro;assembly=Caliburn.Micro"
xmlns:Controls="clr-namespace:Spirit.Controls" mc:Ignorable="d"
Name="ChatWindow"
Background="{StaticResource LightGrayBackground}"
Height="545" Width="680">[...]</UserControl>
```
This user control is active in shell, shell declaration is here.
```
<Window x:Class="Spirit.Views.ChatShellView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:cal="clr-namespace:Caliburn.Micro;assembly=Caliburn.Micro"
Title="ChatShellView" Height="300" Width="300">
<DockPanel>
<Button x:Name="OpenTab"
Content="Open Tab"
DockPanel.Dock="Top" />
<TabControl x:Name="Items">
<TabControl.ItemTemplate>
<DataTemplate>
<StackPanel Orientation="Horizontal">
<TextBlock Text="{Binding DisplayName}" />
<Button Content="X"
cal:Message.Attach="CloseItem($dataContext)" />
</StackPanel>
</DataTemplate>
</TabControl.ItemTemplate>
</TabControl>
</DockPanel>
</Window>
```
Result if some user constrol is active in this shell you can see on this image:

I would like stretch user control on maximum tab control witdh / height.
| how stretch user control in tab control item | CC BY-SA 2.5 | null | 2011-02-07T11:00:59.160 | 2011-02-07T11:06:21.143 | null | null | null | [
"wpf",
"user-controls",
"tabcontrol",
"caliburn.micro",
"stretch"
]
|
4,920,810 | 1 | 4,920,942 | null | 3 | 3,169 | in portrait i have 5 icons. 4 icons in the first row,and 1 icon in the second row. but in landscape the 5th icon has to fit in the first row. how to solve this?

| How to change screen layout according to the orientation? | CC BY-SA 2.5 | 0 | 2011-02-07T11:34:06.163 | 2012-12-22T07:25:09.450 | 2011-02-07T11:41:43.520 | 535,857 | 226,157 | [
"android",
"android-layout"
]
|
4,920,834 | 1 | 4,928,366 | null | 2 | 335 | So that you don't have to read all of the below, the crux of the matter was when using custom controls in `Control` or `Manipulate`, you have to use [pure functions](http://reference.wolfram.com/mathematica/tutorial/PureFunctions.html).
As WReach pointed out, this is hidden in the [Manipulate documentation at the end of Scope, Controls](http://reference.wolfram.com/mathematica/ref/Manipulate.html#ESS_2_).
So defining a function like `inField[x_Dynamic]` below is fine, so long as it's passed to `Control[]` as the pure function `inField[##]&`.
The confusing aspect of this question was that my `inField` was a customized `InputField`. And, as pointed out by joebolte, `InputField` is the default fall-back position of `Control` if it's given a nonsensical function. It does this without any warning, making the debugging a little tricky.
---
## Original Question (slightly modified to address WReach's 1st point)
Let's define a custom `InputField[]`
```
inField[Dynamic[x_]] := InputField[Dynamic[x], Expression, FieldSize -> 5]
```
Then use it in a `Manipulate[]` command
```
Manipulate[Table[{h, i, j, k}^n, {n, 1, 5}] // TableForm,
{{h, 1, "hhh"}, inField},
{{i, 1, "iii"}, inField[#] &},
{{j, 2, "jjj"}, InputField[#, Expression, FieldSize -> 5] &},
{{k, 3, "kkk"}, InputField[#, Expression, FieldSize -> 20] &},
ControlPlacement -> Left]
```

Note this problem does not occur when `inField[]` is called by itself

but does when `Control[]` is used (which is implicit in the `Manipulate` construction)

My question is: Why does the `Control`er wtih `inField` different to `inField[#]&`?
Is there an underlying reason or is it a bug?
This behaviour occurs in Mathematica 7 and 8.
---
My motivation for wanting a custom `inField` is to catch and correct user inputs - more than just the validation than `InputField` provides. E.g.
```
inFieldRat[Dynamic[var_]] := Dynamic[If[TrueQ[Element[N[var] // Chop, Reals]],
var = Rationalize[var, .05], var = Null, var = Null];
InputField[Dynamic[var], Expression, FieldSize -> 5]]
```
| Is this a bug in Control[] when combined with InputField[]? | CC BY-SA 2.5 | 0 | 2011-02-07T11:36:18.620 | 2011-02-19T00:17:59.010 | 2011-02-19T00:17:59.010 | 421,225 | 421,225 | [
"wolfram-mathematica"
]
|
4,921,475 | 1 | 4,922,054 | null | 0 | 1,896 | I have a simple C# program that, when a user clicks on a button, opens a new frame with an activex flash object embedded in it. The code I use to open it is the following :
```
private void button1_Click(object sender, EventArgs e)
{
Form f = new Form();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Form1));
AxShockwaveFlashObjects.AxShockwaveFlash swf = new AxShockwaveFlashObjects.AxShockwaveFlash();
((System.ComponentModel.ISupportInitialize)(swf)).BeginInit();
f.SuspendLayout();
swf.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
swf.Enabled = true;
swf.Location = new System.Drawing.Point(1, -1);
swf.Name = "axShockwaveFlash1";
swf.OcxState = ((System.Windows.Forms.AxHost.State)(resources.GetObject("axShockwaveFlash1.OcxState")));
swf.Size = new System.Drawing.Size(800, 600);
swf.TabIndex = 0;
f.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
f.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
f.ClientSize = new System.Drawing.Size(800, 600);
f.Controls.Add(swf);
f.Name = "Form1";
f.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); ;
f.Text = "lol";
((System.ComponentModel.ISupportInitialize)(swf)).EndInit();
f.ResumeLayout(false);
swf.LoadMovie(0, "http://web2.flashgames.it/giochi/puzzle/kaleid/game.swf");
swf.DisableLocalSecurity();
f.Show();
}
```
The test program has been run by several user, without any problem, except for one, that sees this:

I don't think that the problem is in the application itself, but in the flash player. So, the question is, what am I missing? Are there flash settings that force the window to have the default size?
| Flash animation embedded in c# form ignores given size | CC BY-SA 2.5 | null | 2011-02-07T12:48:58.487 | 2011-02-07T13:52:50.850 | null | null | 533,599 | [
"c#",
"flash"
]
|
4,921,849 | 1 | 4,937,825 | null | 2 | 729 | As the title states, I want to group some ColumnSeries, I'm using Silverlight Charting Toolkit.

but in my case,
| Grouping Silverlight chart ColumnSeries | CC BY-SA 2.5 | null | 2011-02-07T13:29:22.493 | 2011-02-08T20:09:38.557 | null | null | 502,436 | [
"silverlight",
"charts",
"silverlight-toolkit"
]
|
4,922,352 | 1 | null | null | 6 | 3,114 | I have customize the using a , The drawable works fine, but the drawable used as a background becomes rounded at the corners (Both the corner, here only the right end is shown. When the thumb is moved to the extreme left, the left corner is also rounded. Note: The original image is rectangular). How do I make it rectangular?

Here is my LayerdDrawable xml:
```
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item android:id="@android:id/background">
<bitmap android:src="@drawable/progress_bg" />
</item>
<item android:id="@android:id/progress">
<clip>
<bitmap android:src="@drawable/progress" />
</clip>
</item>
</layer-list>
```
| Rectangular edges for custom SeekBar | CC BY-SA 2.5 | 0 | 2011-02-07T14:23:14.807 | 2013-04-04T11:13:52.800 | 2011-02-07T14:47:23.877 | 421,372 | 421,372 | [
"android",
"customization",
"seekbar"
]
|
4,922,774 | 1 | 4,924,598 | null | 1 | 75 | How can I customize share point portal and do it in a way that is easy to create and maintain. Below is a sample of the portal I inherited from someone else who was using images all over. I outlined in red each image. This image method introduces a lot of rigidity and loads of manual labor to make updates and changes.
can this be done using CSS or somethign other than images?
I tried using [this site](http://sharepointcanvas.com/spc/) but i think it falls short and only allows customization of basic share point objects.
As a bonus i would like to see if its possible for each portal in the group that represents a particular project pull project related details like "milestones" from a SQL driven project management system we had home grown. Our team has about 25 projects at any given time.

| share point portal customization | CC BY-SA 2.5 | null | 2011-02-07T15:04:06.877 | 2011-02-07T17:46:04.470 | null | null | 352,157 | [
"sharepoint",
"sharepoint-2007"
]
|
4,922,937 | 1 | 4,922,979 | null | 0 | 260 | I'd like to make the column border to reach the footer as in an example
It should work in these two variants:
[short variant](http://www.automatydrzwiowe.pl/trunk/index.php?event=article&parent_id=3&menu_id=1)
[high variant](http://www.automatydrzwiowe.pl/trunk/index.php?module=guest&class=welcome&event=product&parent_id=104&menu_id=2)
Thanks !
What do you think about min-height: 430px; ?
| How to make column whole page high? | CC BY-SA 2.5 | null | 2011-02-07T15:18:38.653 | 2011-02-07T15:36:57.513 | 2011-02-07T15:36:57.513 | 217,681 | 217,681 | [
"html",
"css"
]
|
4,923,013 | 1 | null | null | 3 | 2,444 | I need to extract data from .PDF files and load it in to SQL 2008. Can any one tell me how to proceed??

| Extract Data from .PDF files | CC BY-SA 2.5 | null | 2011-02-07T15:24:37.123 | 2011-04-17T13:49:16.667 | null | null | 564,184 | [
"c#"
]
|
4,923,285 | 1 | 4,923,737 | null | 2 | 1,624 | The picture is pretty much explanatory by itself. The div "behind" contains a bunch of little square photos that I want to animate smoothly. I'm really not good with jQuery animations, could anyone help me out with this?
(Window is fixed, pictures move "inside" it, animating forever since the page load)

| Animate photo (or div) inside a frame div | CC BY-SA 2.5 | null | 2011-02-07T15:48:23.820 | 2011-02-07T16:32:18.647 | 2011-02-07T16:06:53.957 | 110,282 | 110,282 | [
"javascript",
"jquery",
"html",
"css",
"animation"
]
|
4,923,409 | 1 | 6,583,401 | null | 0 | 596 | I'm having trouble after `ant compilation` for specific browser.If i build for all browsers with ant everything is properly working, but if i compile for specific browser `GWT DevMode` is not working until deleting all files from `war`. As you know ant build for all browsers takes very long time.So, deliverability of tasks is very low.
Here is my code: For OrphanWorkspace Module , and I think,I inherited all required things , and `<inherits name='com.allen_sauer.gwt.dnd.gwt-dnd'/>` as well.
```
<?xml version="1.0" encoding="utf-8"?>
<project name="OrphanWorkspace" basedir=".">
< import file="Base_build.xml" />
<target name="OrphanWorkspace">
<antcall target="MAIN">
<param name="permutation" value="com.site.gwt.orphanworkspace.OrphanWorkspace"/>
</antcall>
</target>
<target name="OrphanWorkspace_IE6">
<antcall target="MAIN">
<param name="permutation" value="com.site.gwt.orphanworkspace.OrphanWorkspace_IE6"/>
</antcall>
</target>
<target name="OrphanWorkspace_SAFARI">
<antcall target="MAIN">
<param name="permutation" value="com.site.gwt.orphanworkspace.OrphanWorkspace_SAFARI"/>
</antcall>
</target>
<target name="OrphanWorkspace_OPERA">
<antcall target="MAIN">
<param name="permutation" value="com.site.gwt.orphanworkspace.OrphanWorkspace_OPERA"/>
</antcall>
</target>
<target name="OrphanWorkspace_FF3">
<antcall target="MAIN">
<param name="permutation" value="com.site.gwt.orphanworkspace.OrphanWorkspace_FF3"/>
</antcall>
</target>
<target name="OrphanWorkspace_FF2">
<antcall target="MAIN">
<param name="permutation" value="com.site.gwt.orphanworkspace.OrphanWorkspace_FF2"/>
</antcall>
</target>
```
```
<?xml version="1.0" encoding="utf-8"?>
<project name="Base" basedir=".">
<property name="gwtc.lib" value="..\gwtclib"/>
<property name="gwt.dir" value="..\war"/>
<property name="gwtcopt" value=" -XdisableCastChecking -XdisableClassMetadata"/>
<property name="soyc" value="-soyc"/>
<property name="extra" value="-extra out\extra"/>
<path id="gwt.compiler.classpath">
<pathelement location="${basedir}/src"/>
<pathelement location="${basedir}/../bmt/src"/>
<fileset dir="${gwtc.lib}"/>
</path>
<target name="MAIN">
<echo message="Compiling ${permutation} section"/>
<java failonerror="true" fork="true" classname="com.google.gwt.dev.Compiler"
classpathref="gwt.compiler.classpath">
<arg line="-logLevel INFO -localWorkers 2 -war ${gwt.dir} ${gwtcopt} ${permutation}"/>
<jvmarg line="-Xmx1024M -Xss32M"/>
</java>
</target>
```

| GWT DevMode is not working after Ant compile | CC BY-SA 2.5 | 0 | 2011-02-07T15:59:50.010 | 2011-07-05T13:26:57.577 | 2011-02-09T21:36:08.600 | 416,996 | 416,996 | [
"gwt",
"ant",
"drag-and-drop",
"compilation"
]
|
4,923,422 | 1 | 4,923,444 | null | 7 | 8,537 | Ive been trying to acheive the same, this is exactly what i want :-

i have implemented googleMapView with overlays, i have one issue i want to show a popup when clicked on each overlay, and when i click on another overlay the previous popus should disappear and new one should appear at the clicked location(ie projection points). And popup shouldnt appear when i click anywhere else on screen.Im using onTap event to record onclick. (map_overlay) is the layout that i want to show when someone click a projection point on the map. The code is below and map_overlay.xml could be any file.
```
public boolean onTap(GeoPoint p, MapView mapView) {
LayoutInflater inflater = (LayoutInflater)cContext.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
LayoutParams lp = new MapView.LayoutParams(ViewGroup.LayoutParams.FILL_PARENT, ViewGroup.LayoutParams.FILL_PARENT, p, LayoutParams.WRAP_CONTENT);
LinearLayout view = (LinearLayout)inflater.inflate(R.layout.map_overlay, null);
mapView.removeView(view);
mapView.invalidate();
mapView.addView(view,lp);
mapView.invalidate();
return true;
}
```
Below is the Main class in which im displaying projection points which is working fine and im calling I have implemented the onTap event in another class as shown above:
```
public **class MapView** extends MapActivity{
private ArrayList<MyClass> overlayItem ;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.large_mapview);
mapView = (MapView) findViewById(R.id.mapview);
// mapView.setBuiltInZoomControls(true);
List<Overlay> mapOverlays = mapView.getOverlays();
Drawable drawable = this.getResources().getDrawable(R.drawable.mappointer2);
ItemizedOverlay itemizedoverlay = new ItemizedOverlay(drawable,this);
OverlayItem overlayitem;
GeoPoint point;
double lat;
double lng;
for (int i = 0; i < overlayItem.size(); i++) {
lat = Double.parseDouble(overlayItem.get(i).getLatitude());
lng = Double.parseDouble(overlayItem.get(i).getLongitude());
point = new GeoPoint((int) (lat * 1E6),(int) (lng * 1E6));
overlayitem = new OverlayItem(point, i+"".toString(), overlayItem.get(i).getDetails().toString());
itemizedoverlay.addOverlay(overlayitem);
mapOverlays.add(itemizedoverlay);
}
mapView.invalidate();
}
}
```
| mapView show overlay details when clicked | CC BY-SA 3.0 | null | 2011-02-07T16:00:48.667 | 2012-02-26T08:58:44.137 | 2012-02-26T08:58:44.137 | 492,624 | 606,669 | [
"android"
]
|
4,923,435 | 1 | null | null | 1 | 5,542 | I have created this very simple extension. In Firefox it looks like it should, but in IE7, the contained items flow out of the window.

(Doctype is strict, but won't display for some reason)
```
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Online example</title>
<link rel="stylesheet" type="text/css" href="http://dev.sencha.com/deploy/dev/resources/css/ext-all.css" />
<script type="text/javascript" src="http://dev.sencha.com/deploy/dev/adapter/ext/ext-base.js"></script>
<script type="text/javascript" src="http://dev.sencha.com/deploy/dev/ext-all.js"></script>
</head>
<body>
<script type="text/javascript">
Ext.onReady(function(){
MyWindow = Ext.extend(Ext.Window, {
layout: 'fit',
width: 370,
height: 500,
resizable: true,
closable: true,
closeAction: 'hide',
collapsible: true,
autoScroll: true,
bodyStyle: 'padding:5px;',
title: 'Window',
initComponent: function () {
var config = {
items:
[
{
xtype: 'fieldset',
title: 'Buffer valg',
layout: 'form',
items:
[
{
xtype: 'numberfield',
fieldLabel: 'Label'
}, {
xtype: 'checkbox',
fieldLabel: 'Label',
checked: true
}
]
}
]
}
Ext.apply(this, Ext.apply(this.initialConfig, config));
// Config object has already been applied to 'this' so properties can
// be overriden here or new properties (e.g. items, tools, buttons)
// can be added, eg:
// Call parent (required)
MyWindow.superclass.initComponent.apply(this, arguments);
}
});
AWindow = new MyWindow();
AWindow.show();
});
</script>
</body>
</html>
```
| ExtJS & IE7: Rendering problems with simple window | CC BY-SA 2.5 | null | 2011-02-07T16:02:31.083 | 2011-03-11T13:55:06.750 | 2011-03-11T13:55:06.750 | 62,361 | 62,361 | [
"extjs",
"internet-explorer-7",
"rendering"
]
|
4,923,728 | 1 | 4,923,802 | null | 0 | 2,211 | I try to create a product detail (accommodation details) view based on this controller action:
```
public ActionResult Detail(int id)
{
var detail = from cities in _db.Cities
join properties in _db.Properties on cities.CityId equals properties.CityId
join proplocations in _db.PropLocations on properties.LocationId equals proplocations.LocationId
join proptypes in _db.PropTypes on properties.TypeId equals proptypes.TypeId
where properties.PropId == id
select new
{
cities.CityName,
proptypes.PropType1,
proplocations.Location,
properties.PropName,
properties.PropOwner,
properties.PropStars,
properties.PropAddress,
properties.PropDescription,
properties.MaxGuests,
properties.PropConditions,
properties.PropId
};
return View(detail.FirstOrDefault());
}
```
and because is the first time i try to create this i don't know how to solve the scaffolding template model ..
i get
```
Server Error in '/' Application.
The model item passed into the dictionary is of type '<>f__AnonymousType5`11[System.String,System.String,System.String,System.String,System.String,System.Int32,System.String,System.String,System.Int32,System.String,System.Int32]', but this dictionary requires a model item of type 'accomm2.Models.Property'.
```
My model here:
My autogen view:
> ```
@model accomm2.Models.Property
```
@{
ViewBag.Title = "Detail"; }
## Detail
```
<div class="display-label">CityId</div>
<div class="display-field">@Model.CityId</div>
<div class="display-label">TypeId</div>
<div class="display-field">@Model.TypeId</div>
<div class="display-label">LocationId</div>
<div class="display-field">@Model.LocationId</div>
<div class="display-label">PropName</div>
<div class="display-field">@Model.PropName</div>
<div class="display-label">PropOwner</div>
<div class="display-field">@Model.PropOwner</div>
<div class="display-label">PropStars</div>
<div class="display-field">@Model.PropStars</div>
<div class="display-label">PropAddress</div>
<div class="display-field">@Model.PropAddress</div>
<div class="display-label">PropPhone</div>
<div class="display-field">@Model.PropPhone</div>
<div class="display-label">PropEmail</div>
<div class="display-field">@Model.PropEmail</div>
<div class="display-label">PropWebsite</div>
<div class="display-field">@Model.PropWebsite</div>
<div class="display-label">PropDescription</div>
<div class="display-field">@Model.PropDescription</div>
<div class="display-label">MaxGuests</div>
<div class="display-field">@Model.MaxGuests</div>
<div class="display-label">PropConditions</div>
<div class="display-field">@Model.PropConditions</div>
```
| MVC Inner Join via Linq | CC BY-SA 3.0 | null | 2011-02-07T16:31:20.347 | 2017-07-29T05:25:49.367 | 2017-07-29T05:25:49.367 | 1,033,581 | 397,865 | [
"asp.net-mvc",
"asp.net-mvc-3"
]
|
4,923,898 | 1 | 4,924,605 | null | 3 | 160 | I am changing the row color of my gridview based on how many days the task is from today. But it is not working
date1 is todays date
and date2 is the due date of the task.
```
Protected Sub GridView6_RowDataBound(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewRowEventArgs)
Dim date1 As Date
date1 = Date.Now
Dim date2 As Date
For Each row As GridViewRow In GridView6.Rows
Dim ddate As Label = CType(row.FindControl("label1"), Label)
date2 = Date.Parse(ddate.Text)
Dim ts As TimeSpan = date2.Subtract(date1)
Dim days As Integer = ts.TotalDays
If days <= 14 Then
e.Row.ForeColor = System.Drawing.Color.Red
ElseIf days > 14 And ts.Days < 30 Then
e.Row.ForeColor = System.Drawing.Color.Blue
ElseIf days >= 30 Then
e.Row.ForeColor = System.Drawing.Color.LightGreen
End If
Next
End Sub
```

| difference of 2 dates coming out wrong | CC BY-SA 2.5 | null | 2011-02-07T16:45:46.660 | 2011-02-07T17:46:28.377 | 2011-02-07T17:32:05.163 | 497,470 | 497,470 | [
"asp.net",
"vb.net"
]
|
4,923,895 | 1 | 4,925,234 | null | 1 | 741 | I have two plots. I need them to line up because the two plots have data that needs to be compared. So when you line them up the comparison is easy.
Here is a picture of the two plots so far. The picture has some red annotations. The red annotations show that right now there is a "delta". The "delta" refers to the misalignment of the two charts.

So far I added a "ChartChangeListener" so that when the top plot changes I can get the necessary information... and adjust the bottom plot. But I can't find out "what is the necessary information" and how do I use that to change the bottom chart.
UPDATE: Commenter asked for some code. So here is what is IMO the necessary piece of code.
```
public class TmpChartPanel extends JPanel implements ChartChangeListener {
...
public void addComponentsToContainer(IqDataset iqDataset) {
this.setLayout(new GridBagLayout());
GridBagConstraints c = new GridBagConstraints();
c.fill = GridBagConstraints.BOTH;
c.weightx = 1;
c.weighty = 1;
// Primarily, the main chart
ChartPanel chartPanel = new ChartPanel(createChart(this.seriesCollection1));
c.gridy = 0;
c.gridx = 0;
this.add(chartPanel, c);
// Secondarily, the second plot. TODO: link the two together so that the user sees the data aligned.
chartPanel = new ChartPanel(createHistogramChart(this.data));
c.fill = GridBagConstraints.HORIZONTAL;
c.weighty = 0;
c.gridy = 1;
c.gridx = 0;
this.add(chartPanel, c);
c.fill = GridBagConstraints.BOTH;
c.weighty = 1;
}
public void chartChanged(ChartChangeEvent event) {
// NOTE: event is from the PRIMARY or top chart
/*------ Take the value from the top chart and set the bottom plot ------*/
// this part works
XYPlot plot = (XYPlot)event.getChart().getPlot();
NumberAxis xAxis = (NumberAxis) plot.getDomainAxis();
Range tmp2 = xAxis.getRange();
((XYPlot)this.SECONDARY.getPlot()).getDomainAxis().setRange(tmp2);
/*------ Make it so that the secondary chart plots the same way directly under the primary chart ------*/
// can't figure out...
}
...
}
```
| jfreechart: how do you line up two plots? | CC BY-SA 2.5 | 0 | 2011-02-07T16:45:37.923 | 2011-02-08T13:34:30.460 | 2011-02-07T17:55:34.033 | 52,074 | 52,074 | [
"java",
"user-interface",
"plot",
"jfreechart"
]
|
4,923,917 | 1 | 4,924,584 | null | 9 | 39,354 | I implemented jQuery DatePicker in my VS2010 project and it works fine with one small issue. When I implemented a custom theme, I lost my prev and next icons (for moving through the months).
Here's the image:

Here are the jquery library references:
```
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.5.0/jquery.min.js"></script>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.9/jquery-ui.min.js"></script>
<script type="text/javascript" src="~/lightbox/js/prototype.js"></script>
<script type="text/javascript" src="~/lightbox/js/scriptaculous.js?load=effects,builder"></script>
<script type="text/javascript" src="~/lightbox/js/lightbox.js"></script>
<link type="text/css" rel="stylesheet" href="~/lightbox/css/lightbox.css" media="screen" />
<link type="text/css" rel="Stylesheet" href="~/Scripts/jquery-ui-1.8.9.custom.css" />
```
Here are my image references in jquery-ui-1.8.9-custom.css
```
/* states and images */
.ui-icon { width: 16px; height: 16px; background-image: url(~/images/jquery/ui-icons_469bdd_256x240.png); }
.ui-widget-content .ui-icon {background-image: url(~/images/jquery/ui-icons_469bdd_256x240.png); }
.ui-widget-header .ui-icon {background-image: url(~/images/jquery/ui-icons_d8e7f3_256x240.png); }
.ui-state-default .ui-icon { background-image: url(~/images/jquery/ui-icons_6da8d5_256x240.png); }
.ui-state-hover .ui-icon, .ui-state-focus .ui-icon {background-image: url(~/images/jquery/ui-icons_217bc0_256x240.png); }
.ui-state-active .ui-icon {background-image: url(~/images/jquery/ui-icons_f9bd01_256x240.png); }
.ui-state-highlight .ui-icon {background-image: url(~/images/jquery/ui-icons_2e83ff_256x240.png); }
.ui-state-error .ui-icon, .ui-state-error-text .ui-icon {background-image: url(~/images/jquery/ui-icons_cd0a0a_256x240.png); }
```
I modified the path to be sure it pointed to the files. Not sure what I'm missing.
Any help would be greatly appreciated.
Thanks.
| prev/next icons not showing in customized jquery datepicker theme | CC BY-SA 3.0 | 0 | 2011-02-07T16:47:11.417 | 2020-07-09T09:29:37.943 | 2011-11-16T12:39:55.440 | 447,356 | 555,470 | [
"jquery-ui",
"jquery-ui-datepicker"
]
|
4,924,111 | 1 | 4,924,250 | null | 2 | 207 | Im having this:
[http://jsfiddle.net/h2rsJ/2/](http://jsfiddle.net/h2rsJ/2/)
And i want it to be like this:

[http://i53.tinypic.com/2u7rf48.png](http://i53.tinypic.com/2u7rf48.png)
So that all are vertical align with eachother, the "news" is in the middle and stars on the right and the 3 images on the left.
How can i do that? Help im stuck..
| CSS: align this right | CC BY-SA 2.5 | null | 2011-02-07T17:05:47.930 | 2011-02-07T17:17:51.373 | null | null | 267,304 | [
"css"
]
|
4,924,177 | 1 | 4,924,411 | null | 1 | 437 | I have seen css that can make text look like an image in the past. I am not a front end developer so my CSS is very rusty...
I am trying to use a DIV tag and markup the text in each div tag to look like the image samples below. notice there is a space between each letter.
if there is a WHYSIWYG CSS editor online that allows for this type of formatting that would be a great resource to have.
EDIT: The hardest part for me is getting a blue square around the first letter!!!

| CSS to mark up text to look like the sample provided? | CC BY-SA 2.5 | null | 2011-02-07T17:11:03.013 | 2011-02-07T17:30:26.947 | 2011-02-07T17:29:25.370 | 352,157 | 352,157 | [
"css"
]
|
4,924,169 | 1 | 4,924,335 | null | 5 | 209 | I have an HTML page (PHP, really) with a table cell that contains a graphic and has two background graphics (one repeating gradient, one right aligned). It has a second table cell that contains a styled list. Because I need to use PHP to evaluate the image path, I need to define certain styles inside the HTML, instead of in a separate .css file. Can anyone help me out and explain why the styles are being correctly applied to the li elements, but not to the table cell with class logoHeader? (li.white is defined in the linked css file, as it doesn't require any php for path evaluation.) I'm a server-side programmer, and although I can do basic css I don't have the greatest grasp on rules of inheritance.
Here's the rendered source:
```
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-gb" lang="en-gb" >
<head>
<base href="http://mysite.com/mobile" />
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>Home</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<link rel="stylesheet" href="/templates/mobile/css/editor_content.css" type="text/css" />
<style>
<!-- need to define these styles here because we can't use php in the css - it doesn't evaluate -->
td.logoHeader {
background: url(/images/mobile/transparentLeavesRight.png) top right no-repeat,
url(/images/mobile/transparentLeavesGradient.png) top left repeat-x;
text-align:center;}
li.blue {
background-image:url(/images/mobile/arrow.png);
background-repeat:no-repeat;
background-position:right;
background-color:#013799;
}
</style>
</head>
<body>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr><td class="logoHeader"><img src="/images/mobile/logoCopy.png" alt="Senior Living" /></td></tr>
<tr><td>
<ul class="pureCssMenu">
<li class="white">1-800-888-8888 </li>
<li class="blue"><a href="/about">ABOUT US</a></li>
<li class="blue"><a href="/care-types">CARE TYPES</a></li>
<li class="blue"><a href="/find-a-community">FIND A COMMUNITY</a></li>
<li class="blue"><a href="/programs">PROGRAMS</a></li>
<li class="blue"><a href="/gallery">VIDEO GALLERY</a></li>
<li class="blue"><a href="/contact">CONTACT US</a></li>
</ul>
</td></tr>
</table>
</body>
</html>
```
I've also tried defining the class as just .logoHeader (as opposed to td.logoHeader) - same results. It doesn't get the style. Here's a firebug screenshot showing what it's getting:

| Why isn't this table cell getting the correct class applied? | CC BY-SA 2.5 | null | 2011-02-07T17:10:19.657 | 2011-02-07T17:23:05.723 | null | null | 341,611 | [
"css",
"css-selectors"
]
|
4,924,257 | 1 | 4,924,405 | null | 1 | 260 | I am trying to pull elements out of a parsed XML file by searching a specific node from a NodeList. This is the following code I am using to iterate through multiple parents:
```
Node node;
NodeList nodeList = document.getElementsByTagName("SomeTag");
for (int i = 0; i < nodeList.getLength(); i++)
{
NamedNodeMap map = nodeList.item(i).getAttributes();
node = map.getNamedItem("AnotherTag")
}
```
However, my node always returns null. When doing some debugging, it appears it has all the values:

I think it has to do something with the "this$0" reference to itself before I get to the values, because if i do a getLength of the NodeMap, it returns 0. Any thought on how to fix this? Thanks a bunch everyone!
| Noob Question on NodeLists and NodeMaps | CC BY-SA 2.5 | null | 2011-02-07T17:16:25.523 | 2011-02-07T18:22:39.073 | null | null | 187,484 | [
"java"
]
|
4,924,334 | 1 | 4,946,293 | null | 8 | 2,635 | I have an issue with WinForms (VB.NET).
The main window is an MDI container.
The user opens a new child window:

and then maximizes it, so the window correctly fills up the client area. My controls are properly anchored (with the IDE property Anchor) to the window sides so that enlarging the window always fills nicely the client area:

In this state (client windows maximized) the user opens a different or a new child window, but the new window controls are not stretched, that is they don't "understand" they should stretch!

This is particularly annoying because if the user tries to restore the window, then the controls are stretched in, so they disappear (see there's no more the listview)!

Is this a bug? How can I solve this?
edit: as per Hans Passant's comment, I created a new simple project and it worked as it should. So I investigated to see what was different from my real project and the sample. The difference is that in my project I create forms dynamically.
I dynamically create many buttons on a toolbar. When the user clicks a button, this is the code that gets executed:
```
Private Sub buttonClicked(ByVal sender As System.Object, ByVal e As System.EventArgs)
Cursor.Current = Cursors.WaitCursor
Dim b As Button = CType(sender, Button)
Dim assem As Assembly = Assembly.GetExecutingAssembly()
Dim formType As Type = assem.GetType(CStr(b.Tag))
Dim exFormAsObj As Object = Nothing
Try
exFormAsObj = Activator.CreateInstance(formType)
Catch ex As Exception
Cursor.Current = Cursors.Default
MessageBox.Show("clicca meglio:" + ex.ToString)
Exit Sub
End Try
Dim f As Form = CType(exFormAsObj, Form)
f.MdiParent = Me
f.Show()
Cursor.Current = Cursors.Default
End Sub
```
That is, the form name is in the button tag. I create a new instance of the form, with `Activator.CreateInstance(formType)` then I show it: `f.Show()`.
I am pretty sure that the problem is in this dynamic child form creation, but I can't get where.
edit2:
Found! In my form common Load event I was doing
```
myform.SuspendLayout()
' various instructions
myform.ResumeLayout(False)
```
instead of False I should have written true: `myform.ResumeLayout(True)`
So simple, I'm sorry.
| WinForms anchored controls don't maximize correctly | CC BY-SA 2.5 | 0 | 2011-02-07T17:23:03.520 | 2017-02-03T20:43:25.390 | 2011-02-08T11:16:03.057 | 403,335 | 403,335 | [
".net",
"winforms",
"controls"
]
|
4,924,679 | 1 | 4,924,996 | null | 1 | 258 | This might have very obvious solution but I'm afraid I cannot find out how to disable this specific page which pops up each single time I use the break command whilst debugging. Every time I have to close it because I don't need it; moreover, it pops up any next time I use the break command on the toolbar.
I'm using Visual Basic Express Edition 2010
How can this be disabled?

Thanks.
| Disable debugging page popping up in Visual Studio 2010 | CC BY-SA 2.5 | null | 2011-02-07T17:55:18.823 | 2011-06-05T04:25:01.483 | 2011-06-05T04:25:01.483 | 210,916 | 514,749 | [
"visual-studio-2010",
"visual-studio-express"
]
|
4,924,729 | 1 | 4,924,810 | null | 1 | 155 | I'm need of help.
I'll try to explain as perfect as possible.
Let's say I have a 2d grid which is my "world".
The grid looks like this:

The grey squares are grass.
The green squares are roads.
The orange squares are desert.
The blue square in the middle is my car. My car has a range limit of 5 squares. I want to find and highlight ALL the squares I can reach with max range or less.
Driving across a grey square costs 1 range. Nothing fancy. However,
Driving across a green square gives you +0,5 range. Which means, if the first 2 squares you drive through are green, your max range is suddenly 6.
Driving across an orange square gives you a -0,5 range penalty. This means if the first 2 squares you drive through are orange, you only have a max range of 4.
So basically, driving to a square, costs you 1 range, but depending on the square it can give you extra range or an lesser range.
Scouting all paths considering the bonuses. Would make the most outer reach of my car looking like this:

So yes, I want a way to find all the squares marked with black borders, and all the ones inside of them. So that all squares within my max range are highlighted.
Long question, but how do I achieve this?
I've looked into breadth and depth first etc but since I can take several routes through the same square I cant mark it as "visited" the first time and then never return to it?
Help on this would be greatly apprechiated.
Thanks for reading all the way down here.
/E
| Longest paths given max length | CC BY-SA 2.5 | null | 2011-02-07T18:00:56.970 | 2011-02-07T18:11:09.590 | null | null | 351,879 | [
"algorithm",
"2d"
]
|
4,924,748 | 1 | 5,322,585 | null | 1 | 891 | When creating an application which needs to be capable of displaying a range of foreign characters we came across a display problem when attempting to display Swedish diacritics. The following sample application works fine using Windows Vista but doesn't display correcting using Windows XP:
```
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical">
<mx:Label text="Arial Unicode MS - Höglund" fontFamily="Arial Unicode MS" fontSize="16"/>
<mx:Label text="Verdana - Höglund" fontFamily="Verdana" fontSize="16"/>
<mx:Label text="Arial - Höglund" fontFamily="Arial" fontSize="16"/>
</mx:Application>
```
The screengrabs below show the labels rendered in Windows XP (first image on the left) and Windows Vista (on the right).


Using charmap suggests that both Arial and Verdana on Windows XP lack the necessary diacritic characters and hence don't display correctly whereas in Windows Vista the fonts are complete. The same in standard HTML appears to work correctly however (not sure if the browser is doing something in the background to insert known diacritic characters when it encounters fonts without).
Has anyone encountered a similar issue when displaying diacritics in Flash using Windows XP? I want to avoid embedding Arial/Verdana and unfortunately using Arial Unicode MS is not an option - Verdana must be used to fit with the clients style guidelines.
| Displaying diacritics using Verdana/Arial fonts Windows XP | CC BY-SA 2.5 | null | 2011-02-07T18:03:55.163 | 2013-02-08T10:49:04.473 | null | null | 357,293 | [
"apache-flex",
"fonts",
"windows-xp",
"adobe"
]
|
4,924,795 | 1 | null | null | 0 | 1,258 | well i am new to Grid View , so i am taking a simple scenario. well i have a `visual webpart`in sharepoint ; i have added a grid view with first column is of `CheckBox Type` & it has a `Button` & a`Label`
i populate the grid view from an array of cities & i want that when button is clicked all the checked cities are appended in to the label.
code is below.
```
protected void Page_Load(object sender, EventArgs e)
{
string[] States = new string []{ "Delhi", "Mumbai", "Pune", "Indaore" };
gvStates.DataSource = States;
gvStates.DataBind();
gvStates.Visible = true;
btnShow.Click += new EventHandler(btnShow_Click);
}
void btnShow_Click(object sender, EventArgs e)
{
// what should i write here to append checked value to label
// lblCites.Text +=
}
```
while working i found that when button is clicked the function build the grid view again & there fore all check boxes are initialised .
please complete my code !!!!!
i do not want to do the same by using Javascript. i want to do this by C# only
& if possible please tell me the way how can i put a near "Show" button that is used to check .
thanks in advance!!
| grid view with check boxes to append selected values in a label | CC BY-SA 2.5 | null | 2011-02-07T18:09:38.207 | 2011-02-08T10:51:49.850 | null | null | 575,235 | [
"c#",
"asp.net",
"sharepoint-2010",
"grid",
"spgridview"
]
|
4,925,007 | 1 | null | null | 0 | 294 | 
So the above is a screenshot from IB of my custom UIViewController. This main view contains lots of information. The ImageViews are temporary placeholders just for information / buttons to help me get an idea for my layout.
You'll see at the bottom I have dumped a UIScrollView. What I want to do is dump 3 UIView's inside the ScrollView, where each UIView contains a UITableView. This NIB/XIB file though is getting very cluttered and messy. I would like to create a new NIB which loads inside the UIScrollView. What's the best way to go about doing this?
Do I dump a new UIViewController into this XIB file, and then make the delegate of ScrollView the new ViewController ? then I can just set a custom nib for that UIViewController? Is that the proper way to do this?
Still coming to grips with Interface Builder and more advanced app. development!
Thanks in advance!
| UIScrollView with multiple UITableViews? How best to set this up? | CC BY-SA 2.5 | null | 2011-02-07T18:30:45.983 | 2011-03-04T01:51:19.093 | null | null | 312,411 | [
"iphone",
"cocoa-touch",
"ios4",
"interface-builder"
]
|
4,925,571 | 1 | null | null | 0 | 846 | I have an AdvancedDataGrid component, which has AdvancedDataGridColumn's that are rendered using MXAdvancedDataGridItemRenderer. When user stretches any columns, I want all rows to adjust it's height. So, I set variableRowHeight to true and wordWrap to true.
The problem is that it doesn't always readjust its height. Stretching a column will cause it to overflows into another row. Now, if i just click on the column separator, it will readjust. So basically, first stretching it and then just clicking on column separator solves the overflow problem.
Anyone encounter this overflow issue before?
Step1 (Initial):

Step2 (After first re-size):

Step3 (After clicking on column separator):

```
<fx:Component className="nameRenderer">
<s:MXAdvancedDataGridItemRenderer width="100%">
<s:layout>
<s:HorizontalLayout />
</s:layout>
<mx:Image source="application/documentManager/mimeTypeIcons/{data.img}" toolTip="{data.tooltip}"
horizontalCenter="0" verticalCenter="0" />
<mx:Text top="5" left="5" right="5" bottom="5" text="{data.data.name}" toolTip="{data.tooltip}" width="100%" />
</s:MXAdvancedDataGridItemRenderer>
</fx:Component>
```
| Flex Advanced data grid wordwrapping | CC BY-SA 2.5 | null | 2011-02-07T19:28:14.047 | 2011-05-29T22:13:22.503 | 2011-02-11T15:10:04.910 | 381,695 | 381,695 | [
"apache-flex",
"flex4",
"flash-builder"
]
|
4,925,667 | 1 | 4,933,757 | null | 1 | 2,783 | 
I've been able to get a sketch effect (sort of) using a pixel bender shader available here: [Adobe Pixel Bender](http://goo.gl/xH8QI). Sample photo right-below (the one with creepy eyes).
The right-top image was created with Balsamiq mockups and is pretty good example of photo-to-sketch effect. So how do I create something like this? Any link or source code is appreciated.
| How to create a good "sketch" effect with actionscript? | CC BY-SA 2.5 | 0 | 2011-02-07T19:37:36.033 | 2011-02-08T13:42:37.063 | null | null | 82,985 | [
"flash",
"apache-flex",
"actionscript-3"
]
|
4,925,682 | 1 | null | null | 0 | 1,409 |
here is what its generating at runtime after i debug the code
```
<script type='text/javascript'>
$('#ctl00_ContentPlaceHolder1_tabControl_gv_ctl03').show().fadeIn(8000).fadeOut(90000)
</script>
```
ere is what i am looking for...

how do i highlight the gridview control row after i am done updating with the row?
```
<asp:GridView runat="server" CssClass="DataWebControlStyle">
<AlternatingRowStyle CssClass="AlternatingRowStyle" />
<RowStyle CssClass="RowStyle" /> <
HeaderStyle CssClass="HeaderStyle" />
<SelectedRowStyle CssClass="SelectedRowStyle" />
</asp:GridView>
protected void gv_RowUpdating(object sender, GridViewUpdateEventArgs e)
{
//update....
}
```
| GridView Row Fading Effect | CC BY-SA 2.5 | 0 | 2011-02-07T19:39:13.700 | 2012-09-26T13:31:30.083 | 2012-09-26T13:31:30.083 | 1,479,606 | 275,390 | [
"javascript",
"jquery",
"asp.net",
"gridview"
]
|
4,925,720 | 1 | 4,926,101 | null | 5 | 31,107 | Forgive me if this is not the "the best" place to ask excel questions. I looked at the data analysis page and it looks like there aren't any real questions about excel in there.
I'm trying graph the sales of various products over a period of time. I'm pulling it from the database in the format
```
Sales Person | End of Month | Sales | Product Type
John Doe 1/31/2010 1,000 Widget A
John Doe 1/31/2010 2,000 Widget B
John Doe 1/31/2010 3,000 Widget C
John Doe 2/28/2010 5,000 Widget A
John Doe 2/28/2010 2,000 Widget B
John Doe 2/28/2010 3,000 Widget C
```
I then get a summary like:
```
Year | Month | Product | Total Sales
2010 Jan Widget A 1,000
Widget B 2,000
Widget C 3,000
Feb Widget A 5,000
Widget B 2,000
Widget C 3,000
```
The problem is that I'm wanting to graph The widgets as separate lines so that I can track sales against each other. Over time.
However, excel treats it all as one "total" and then shows 3 points on the graph for each month rather than showing 3 separate lines.
No matter how I manipulate it, I can't get it to make 3 separate lines.

The example above should show how it works with two products. I show how widget A and B are two points on the same line rather than belonging to two separate lines.
I have had success in the past for a different project when I hand entered information into a spreadsheet with the format of:
```
End of Month | Product A Sales | Product B Sales | Product C Sales
```
However, my current data is not in this format and it doesn't seem I can take the same approach...
Any help is welcome.
| How do I Use Pivot Tables to Create One Line Per Sub Category | CC BY-SA 2.5 | null | 2011-02-07T19:43:32.417 | 2017-12-26T21:18:46.517 | null | null | 221,395 | [
"excel",
"charts",
"analysis",
"pivot-table"
]
|
4,925,990 | 1 | 4,926,439 | null | 0 | 1,645 | I have an asp.net page which uses the asp membership control. I want to use the user comment field to hold an additional piece of information. I'm creating the user via the Web Site Administration Tool.
So how would I access the comment field and write it to the page?
Ok I'm not totally mad (well maybe but that's my state of mind!).
the comment field lives in the aspnet_Membership table if you create a user and go to manage that user you see it has a Description labelled text box this maps through to the Comment field.
Maybe I'm using the wrong terms! sorry...

| user comment display on asp.net page | CC BY-SA 2.5 | null | 2011-02-07T20:09:06.590 | 2011-02-08T12:12:14.993 | 2011-02-07T22:05:50.113 | 438,299 | 438,299 | [
"c#",
"asp.net"
]
|
4,926,028 | 1 | 5,274,179 | null | 0 | 538 | With icefaces 2 my application is not rendering the richInputText. When I inspect this with firebug it says that it cant find resources

Do you know what it could be causing this behaviour??
| inputRichText is not rendering IceFaces 2.0 | CC BY-SA 3.0 | null | 2011-02-07T20:13:12.907 | 2013-09-24T20:22:08.423 | 2013-09-24T20:22:08.423 | 1,430,996 | 382,920 | [
"jsf",
"jsf-2",
"icefaces",
"rich-text-editor"
]
|
4,926,259 | 1 | 4,927,267 | null | 0 | 2,127 | Hello i have this controller(probably i got it wrong)
```
public ActionResult Detail(int id)
{
var detail = from cities in _db.Cities
join properties in _db.Properties on cities.CityId equals properties.CityId
join proplocations in _db.PropLocations on properties.LocationId equals proplocations.LocationId
join proptypes in _db.PropTypes on properties.TypeId equals proptypes.TypeId
where properties.PropId == id
select new
{
cities.CityName,
proptypes.PropType1,
proplocations.Location,
properties.PropName,
properties.PropOwner,
properties.PropStars,
properties.PropAddress,
properties.PropDescription,
properties.MaxGuests,
properties.PropConditions,
properties.PropId
};
return View(detail.FirstOrDefault());
}
```
and this EDMX:

could somebody explain me please how to get the detail of the property view? i tried difference combination but because of my low experience in the field (this is my first try) nothing worked.
Please help me to make this view work
thank you
| MVC Inner join Linq (begginner question) | CC BY-SA 2.5 | null | 2011-02-07T20:36:14.183 | 2011-02-07T22:13:27.487 | null | null | 397,865 | [
"asp.net-mvc",
"asp.net-mvc-3"
]
|
4,926,424 | 1 | 4,927,286 | null | 0 | 112 | I would like to use the CameraCapturetask on my Silverlight WP7 application. On the background, I would like to display a photo, for example something like that : 
(found randomly on the web).
This could act as a mask, and we will see the photo of the camera behind this frame during the take of the photo.
(I'm not sure I'm very clear).
Is there a way to do that ?
Thanks in advance for any help.
Best regards
| Is it possible to display a frame during a CameraCapturetask on WP7? | CC BY-SA 2.5 | null | 2011-02-07T20:51:46.727 | 2011-02-07T22:15:49.167 | null | null | 491,723 | [
"silverlight",
"windows-phone-7"
]
|
4,926,529 | 1 | 4,926,625 | null | 7 | 2,013 | Let's say I have a shape like this:

After all the jokes of me wanting to draw beans are exhausted, I want to find the points on the border of the shape. I know there can be many, so a fair distance between them is accepted.
Is there an algorithm for such a need? Or a software? All the solutions I came up with involve a lot of manual work, especially if I want to draw a slightly different shape.
Stackoverflow wisdom, please help.
| Finding coordinates of points on the border of a shape | CC BY-SA 2.5 | 0 | 2011-02-07T21:01:34.630 | 2011-02-07T22:20:58.153 | 2011-02-07T22:20:58.153 | 44,729 | 111,804 | [
"algorithm",
"image",
"language-agnostic",
"shapes"
]
|
4,926,561 | 1 | 4,926,596 | null | 4 | 26,642 | Question: what is the LINQ-to-Entity code to insert an order for a customer?

Here is the a solution (see one of the submitted answers below for a much cleaner solution):
```
using (OrderDatabase ctx = new OrderDatabase())
{
// Populate the individual tables.
// Comment in this next line to create a new customer/order combination.
// Customer customer = new Customer() { FirstName = "Bobby", LastName = "Davro" };
// Comment in this line to add an order to an existing customer.
var customer = ctx.Customers.Where(c => c.FirstName == "Bobby").FirstOrDefault();
Order order = new Order() { OrderQuantity = "2", OrderDescription = "Widgets" };
// Insert the individual tables correctly into the hierarchy.
customer.Orders.Add(order);
// Add the complete object into the entity.
ctx.Customers.AddObject(customer);
// Insert into the database.
ctx.SaveChanges();
}
```
| How do I use LINQ-to-Entities to insert data into a specific table? | CC BY-SA 3.0 | null | 2011-02-07T21:03:56.617 | 2015-07-14T21:03:06.950 | 2015-07-14T21:03:06.950 | 107,409 | 107,409 | [
"c#",
"linq",
"linq-to-entities"
]
|
4,926,737 | 1 | 4,927,433 | null | 0 | 118 | I am trying to use the built in android search for my app. The problem is There are 7 different fields the user can search, and only one search bar. I am not sure this is possible, but I have seen Searches in android that were like this:

Can anyone point me to any good resources that might help? Currently I using the returned query from the search bar on each index. This would require the user query remote resources 7 times for the same search string. It would be nice to only search the fields out of the 7 they want to search, without reinventing the wheel (making my own search activity and figure out how to override the default search page). Thank You.
| Adapt Default Android Search To My Liking | CC BY-SA 2.5 | null | 2011-02-07T21:20:28.357 | 2011-02-07T22:31:40.143 | null | null | 457,577 | [
"android",
"user-interface",
"search",
"listactivity"
]
|
4,926,880 | 1 | null | null | 2 | 8,970 | 
The instance is running, but I still cannot connect, I get this error:
```
TITLE: Connect to Server
------------------------------
Cannot connect to PC-CARLA\SQLEXPRESS.
------------------------------
ADDITIONAL INFORMATION:
Error relacionado con la red o específico de la instancia mientras se establecía una conexión con el servidor SQL Server. No se encontró el servidor o éste no estaba accesible. Compruebe que el nombre de la instancia es correcto y que SQL Server está configurado para admitir conexiones remotas. (provider: Interfaces de red SQL, error: 26 - Error al buscar el servidor o instancia especificado) (Microsoft SQL Server, Error: -1)
For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&EvtSrc=MSSQLServer&EvtID=-1&LinkId=20476
------------------------------
BUTTONS:
OK
------------------------------
```
Any suggestions on what can be going wrong? Why doesn't this thing connect? :S
How do I find the instance of a server? Why doesn't this work?
| Cannot connect to my database from within SQL Management Studio | CC BY-SA 2.5 | null | 2011-02-07T21:34:47.207 | 2011-02-08T22:17:21.937 | 2011-02-07T22:47:56.720 | null | null | [
"sql-server"
]
|
4,926,949 | 1 | 4,950,481 | null | 1 | 968 | I have been using the page-break-after command to break an html report after each "grouping". My problem is it is now leaving my table floating in the middle of the page. Each page is different where it puts the table, sometimes at the top of the page, sometimes in the middle and sometimes at the bottom. There is quite a bit of complexity in the HTML so I decided to take an image instead:

I will try to sum up the html
```
<body>
<table>
<thead>
{this is top bold box on each page}
</thead>
<tr>
<td>
<table> {this is the results table}
<thead>
{this is the headers of the "floating" results table}
</thead>
{tr's of data here}
</table>
</td>
</tr>
</table>
</body>
```
we are using display:table-header-group to get the table headers to show up on each page. Can you help me figure out what I need to do to get those tables to be at the top of the page? (this is in IE8)
| Page-break-after vertical alignment of a table | CC BY-SA 2.5 | null | 2011-02-07T21:41:01.633 | 2011-02-09T21:12:07.433 | null | null | 259,502 | [
"html",
"css",
"page-break"
]
|
4,927,208 | 1 | null | null | 12 | 13,848 | It seems like the EditText in the image below is too wide. I assume that I have misused the SDK in some way and until convinced otherwise I am not looking for a way to specify some number of margin/padding pixels on the sides of the `EditText`.

This one looks more appropriate.

Here's my code (that creates the first, 'Create Tag', dialog):
```
final Dao<Tag, Integer> tagDao = getHelper().getTagDao();
final EditText input = new EditText(this);
input.setSingleLine(true);
input.setHint(R.string.create_tag_dialog_hint);
AlertDialog.Builder builder = new AlertDialog.Builder(this);
builder.setView(input);
builder.setTitle(getString(R.string.create_tag_dialog_title));
builder.setPositiveButton(
getString(R.string.create_tag_dialog_positive),
new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int whichButton) {
String value = input.getText().toString().trim();
Toast.makeText(getApplicationContext(), value, Toast.LENGTH_SHORT).show();
Tag tag = new Tag(value);
try {
tagDao.create(tag);
} catch (SQLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
});
builder.setNegativeButton(
getString(R.string.create_tag_dialog_negative), null);
builder.show();
```
Sorry for the length of the post and thanks for any helpful comments.
| Android EditText in AlertDialog seems too wide | CC BY-SA 2.5 | 0 | 2011-02-07T22:08:04.477 | 2019-07-23T09:33:46.393 | 2019-07-23T09:33:46.393 | 1,318,946 | 228,539 | [
"android",
"android-edittext",
"width",
"android-alertdialog"
]
|
4,927,319 | 1 | null | null | 1 | 1,009 | How come this simple CSS works in FF but not in IE???
```
<style>
.FirstLetter:first-letter{font-family: arial; font-size: 14pt; font-weight: bold;color:White; background:Blue; border:1px black solid; padding-top:8px; padding-left:8px; padding-bottom:3px;}
.Spaced{letter-spacing: 5px;font-family: arial; font-size: 14pt; font-weight: bold;}
</style>
<div class="FirstLetter Spaced headerFont">
Executive Summary
</div>
```
here is an example if the two browsers showing different results on the first blue box of the lettering...

| :first-letter selector working in Firefox not in Internet Explorer? | CC BY-SA 2.5 | null | 2011-02-07T22:19:14.943 | 2011-02-07T22:38:40.220 | 2011-02-07T22:38:40.220 | 69,818 | 352,157 | [
"css",
"internet-explorer",
"cross-browser"
]
|
4,927,572 | 1 | 4,927,665 | null | 0 | 114 | I have a ASP.net web page I'm working with, I didn't create it myself, with the following HTML code:
```
<DIV style="POSITION: absolute; TEXT-ALIGN: center; WIDTH: 1400px; TOP: 60px; LEFT: 125px">
<SPAN style="TEXT-ALIGN: center; FONT-SIZE: xx-large" id=labelInstructions>Some Text: <BR><BR></SPAN>
<TABLE style="WIDTH: 1200px" border=1 align=center>
<TBODY>
<TR>
<TD><LABEL style="FONT-SIZE: x-large" for=FileUpload1>ENTER Path: </LABEL><INPUT id=FileUpload1 size=70 type=file name=FileUpload1></TD>
</TR>
<TR>
<TD><SPAN style="COLOR: red; FONT-SIZE: medium" id=fileUploadError><BR><BR></SPAN></TD>
</TR>
<TR>
<TD>
<TABLE style="WIDTH: 1200px" border=1>
<TBODY>
<TR>
<TD style="WIDTH: 400px; FONT-SIZE: x-large" vAlign=top align=right>FILE CONTENT INSTRUCTIONS:</TD>
<TD style="WIDTH: 850px; FONT-SIZE: x-large" vAlign=top align=left>INSTRUCTION 1<BR>INSTRUCTION 2<BR></TD></TR>
<TR><TD></TD></TR>
<TR>
<TD style="WIDTH: 400px; FONT-SIZE: x-large" vAlign=top align=right>FILE CONTENT EXAMPLE:</TD>
<TD style="WIDTH: 850px; FONT-SIZE: x-large" vAlign=top align=left>EXAMPLE 1<BR>EXAMPLE 2<BR><BR></TD>
</TR>
</TBODY>
</TABLE>
</TD>
</TR>
</TBODY>
</TABLE>
</DIV>
```
When this html is displayed in IE, I notice that the alignment of the text in the cells in the inner table, i.e. the table that is in the third cell of the outer table, is distorted when zooming in and out on it. I have a fixed table setting in pixels instead of percentages, so I don't understand why this is an issue. I want the text in the cells to stay in the same
position when zooming. The code must be manipulated from the code behind, so I cannot create a separate CSS file. Any help is appreciated.
Here are two examples to illustrate what I'm talking about:


Notice in the second image the two table cells at the bottom are slightly offset to the left.
UPDATE:
Yes, I understand, we will be implementing a new system in the near future. Obviously this is old and very non-standard, this was dropped in my lap when I started working with it. And we're coming up with plans for a new system to replace it, in the meantime, this is what I have to deal with.
| Text misaligns in IE | CC BY-SA 2.5 | null | 2011-02-07T22:48:20.383 | 2011-02-07T23:21:45.260 | 2011-02-07T23:12:09.447 | 94,541 | 94,541 | [
"asp.net",
"html"
]
|
4,927,938 | 1 | null | null | 1 | 452 | I have potentially an interesting situation. I'm developing a dynamic drawing tool using shapes and I need to be able to store the current "state" of the objects in a database.
The "shapes" will be simple geometric along with custom-drawn shapes so i can't just store the geometric footprints of them.
Here's an example screen shot (simple shapes):

During use, these shapes can be dragged, resized, rotated, deleted and split into smaller shapes so their current properties need to be retained.
Any ideas? I just need a starting point.
| AS3: Approach to store MovieClips in a database | CC BY-SA 2.5 | 0 | 2011-02-07T23:31:12.313 | 2011-02-08T06:24:20.137 | null | null | 42,979 | [
"actionscript-3"
]
|
4,927,932 | 1 | 4,927,983 | null | 2 | 1,145 | This is my index.php:
```
<?php
error_reporting(E_ALL);
ini_set('display_errors', 1);
include "top.html";
include "main.html";
include "bottom.html";
?>
```
Nothing special as you can see, and will be subject to change ;)
And this is my `HTML` code (don't mind the text, it makes no sense at all, I was just bored and wrote some blindtext myself)
```
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xml:lang="en" lang="en">
<head>
<link rel="stylesheet" type="text/css" href="style.css" />
<title></title>
</head>
<body>
<div id="container">
<div id="header">
<h1>Header</h1>
</div>
<div id="menu">
<p>
Link1
Link2
Link3
Link4
</p>
</div>
<div id="content">
<!-- end of top.html -->
<h2>Ernährungsphysiologische Bedeutung von Transfetten</h2>
<p>
Transfette, verdammt auf alle Ewigkeit, verschrien weil sie Krebs verursachen, verkannt, sind sie doch so nahrhaft, wertvoll und unersetzlich in unserer täglichen Ernährung.<br>
Was die wenigsten Menschen wissen, ist, dass die Herstellung von Transfetten schon auf die Ureinwohner Sumatras zurückgreift, die in ihren Voodooritualen mithilfe von Schweinehaut diese Leckerei herstellten.
Damals noch ein seltenes Gut, hauptsächlich innerhalb religiöser Riten verwendet, ist es auch noch heute eine Spezialität, die nur die wenigsten Gourmets unserer Zeit wirklich zu schätzen wissen.
</p>
<p>
Doch wo kommen diese Transfette eigentlich her? Hauptsächlich werden sie heutzutage gewonnen indem man altes Fritierfett filtert und die alten Pommesreste aus dem Filter dann in eine Ölpresse wirft. Kaltgepresste Transfette sind dabei die seltensten aber auch gleichzeitig die schmackhaftesten Produkte, das Pommesöl ist natürlich auch gesund, aber existiert in so großen Mengen, dass man damit lieber seine Schweine füttern sollte, damit das Schnitzel auch ohne Bratfett in der Pfanne zubereitet werden kann.
</p>
<p>
Haben wir sie überzeugt? Möchten sie Transfette in rauhen Mengen kaufen?<br />
Schreiben sie uns! Wir freuen uns auf ihre Bestellung.
</p>
<!-- end of main.html -->
</div>
<div id="footer">
this smells like footer
</div>
</div>
</body>
</html>
```
So if I only include this whole thing as `main.html` and leave the other files blank, everything is fine, but when I split up the code (at the postitions I marked) into the designated files... Strange things happen.
A picture tells more than thousand words, so here you go:

Any ideas?
| PHP Include changes layout of HTML? | CC BY-SA 3.0 | 0 | 2011-02-07T23:30:18.680 | 2012-01-31T20:26:33.090 | 2012-01-31T20:26:33.090 | 11,621 | 586,014 | [
"php",
"html",
"css"
]
|
4,928,026 | 1 | 5,412,807 | null | 2 | 573 | Recently I noticed that my vs2010 was auto lower casing my html attributes. This does not go very well with the use of dojo since `onclick` != `onClick` and `dojo.query([Attribute])` != `dojo.query([attribute])`.
Now I've fooled with the VS options before and went straight to Tools > Options > Text Editor > HTML > Formatting to set client attributes to as entered. Well these two options are disabled.
I've disabled all my extensions and addins as best as I know how and it is still unaffected. Searches are not returning anything helpful.
What is causing these drop downs to disable?

| Visual Studio 2010 Html Formatting option for client attributes is disabled | CC BY-SA 3.0 | null | 2011-02-07T23:40:31.090 | 2011-12-18T15:05:56.327 | 2011-12-18T15:05:56.327 | 938,089 | 352,432 | [
"javascript",
"visual-studio-2010",
"dojo",
"formatting"
]
|
4,928,076 | 1 | null | null | 5 | 7,537 | When I set TabControl alignment to `Left` or `Right` it leaves this huge space between tab buttons and tab page area. How to get rid of this useless space?
`TabControl.Appearance` is set to `Buttons` because if it is set to `Normal` the text on buttons disappear.

UPDATE:
When i set `TabControl.Alignment` to `Bottom` and `TabControl.Appearance` to `Normal` buttons look inverted (orange line should be below)

When i set `TabControl.Alignment` to `Bottom` and `TabControl.Appearance` to `Buttons`, There is no area on `TabPage` to place controls

| Winforms TabControl alignment problems | CC BY-SA 2.5 | 0 | 2011-02-07T23:47:21.007 | 2019-05-09T13:45:06.277 | 2011-02-08T14:25:21.900 | 342,095 | 342,095 | [
"c#",
"winforms",
"tabcontrol",
"tabpage"
]
|
4,928,282 | 1 | 4,928,516 | null | 1 | 330 | I found something interesting today when opening VS2010 on my PC. It looked as if all the text had gone a bit fuzzy. It happens in particular in the menu bar after moving the mouse over the menu item the first time. Hopefully the pictures below can explain better than I...

Above is the menu bar with clear unblurred text.

Above, I have moved my mouse only over "Edit" and "View"

Finally, the above is after I moved my mouse over all menu items.
This is specific to VS2010 and has not occurred in the past. Even all the text on the "Start Page" is blurry (initially at start-up regardless of mouse movement).All other software on the PC (that I've seen) works normally.
Does anyone have any idea what could be the problem?

| VS2010 - Strange Fuzzy Menu Behavior | CC BY-SA 2.5 | null | 2011-02-08T00:20:58.170 | 2011-02-08T00:56:16.360 | 2011-02-08T00:29:03.377 | 2,982 | 2,982 | [
"visual-studio-2010"
]
|
4,928,441 | 1 | 4,930,045 | null | 2 | 9,422 | I've seen the extraction of basic metadata (ie. author, title) using iTextSharp and it usually looks something like this:
```
var pdfReader = new PdfReader(pdfData);
var author = pdfReader.Info["author"]
```
However, in my case I'm after something a bit more exotic, the additional "advanced" metadata that the document may contain.
Pardon the paint highlights, but here is a screenshot from within Adobe Acrobat showing the data in question:

In this case, it doesn't seem like this data is available through the `Info` dictionary. Using a different library (PDFKit by TallComponents) this data is exposed, but I'm wondering if there is any way get it using iItext
I'm currently playing with iText 4.1.6 due to licensing restrictions, but I wouldn't be opposed to buying the commercial license for 5.0.6 if that adds required functionality.
| Extracting Additional Metadata from a PDF using iTextSharp | CC BY-SA 3.0 | 0 | 2011-02-08T00:44:31.867 | 2013-07-18T19:24:29.413 | 2013-07-18T19:24:29.413 | 237,838 | 137,085 | [
"c#",
"metadata",
"itext",
"pdfkit"
]
|
4,928,685 | 1 | 4,928,712 | null | 1 | 2,464 | This will be my first time creating one of those slider things. I've seen quite a few of them, and although they're very cool, i'm looking for something that's very basic. As you can see in the image below, I have 4 rectangular images to the right, and when any one of them is clicked, some text to the left will be displayed that corresponds to the image that was just clicked.
I'm not sure if jQuery would be needed to do this? I'd assume it'd be a lot easier than Javascript...
Can anyone please point me in the right direction or offer some advice on how I should go about creating a slider like this?
Thank you

| Simple jQuery Slider? | CC BY-SA 2.5 | null | 2011-02-08T01:24:55.390 | 2013-07-10T18:20:03.523 | null | null | null | [
"javascript",
"jquery",
"html",
"css",
"jquery-ui"
]
|
4,928,730 | 1 | null | null | 8 | 4,473 | I'm trying to use an [Arabic external font](http://en.fonts2u.com/ge-ss-tv-bold.czcionka):
```
@font-face {
font-family: "My";
src: url(GE_SS_TV_Bold.otf) format("truetype");
}
p.customfont {
font-family: "My", Verdana, Tahoma;
}
```
It's appearing like this:

but it should appear like:
| css font-face with the Arabic fonts | CC BY-SA 2.5 | 0 | 2011-02-08T01:34:02.507 | 2011-06-20T16:05:57.667 | 2011-02-08T01:46:13.063 | 446,591 | 1,377,781 | [
"css",
"font-face"
]
|
4,928,885 | 1 | 4,929,491 | null | 1 | 1,281 | I am drawing some curves inside canvas. After the curve is complete, I need to undo some portion of drawing (I only need first 75% of the curve, so need to delete the last 25% of the curve).
Below is log of the points, that my curve goes through. After the 7th point, I am changing the canvas context's "globalCompositeOperation" property to "destination-out" and starts drawing in the reverse. As you can see from below, the points in the forward and backward direction are exactly the same. But my problem is while deleting backwards, the lines are not getting deleted correctly. I can see slight traces of lines. Problem verified in Chrome, Firefox and Opera.
```
point X: (484,324) with Count: 0 angle :0.7853981633974483
spiroCanvasCore.js:62point X: (460,420) with Count: 1 angle :1.5707963267948966
spiroCanvasCore.js:62point X: (315,444) with Count: 2 angle :2.356194490192345
spiroCanvasCore.js:62point X: (220,300) with Count: 3 angle :3.141592653589793
spiroCanvasCore.js:62point X: (315,155) with Count: 4 angle :3.9269908169872414
spiroCanvasCore.js:62point X: (460,179) with Count: 5 angle :4.71238898038469
spiroCanvasCore.js:62point X: (484,275) with Count: 6 angle :5.497787143782138
spiroCanvasCore.js:62point X: (460,300) with Count: 7 angle :6.283185307179586
spiroCanvasCore.js:79inverse
spiroCanvasCore.js:62point X: (484,275) with Count: 7 angle :5.497787143782138
spiroCanvasCore.js:62point X: (460,179) with Count: 6 angle :4.71238898038469
spiroCanvasCore.js:62point X: (315,155) with Count: 5 angle :3.9269908169872414
spiroCanvasCore.js:62point X: (220,300) with Count: 4 angle :3.141592653589793
spiroCanvasCore.js:62point X: (315,444) with Count: 3 angle :2.356194490192345
spiroCanvasCore.js:62point X: (460,420) with Count: 2 angle :1.5707963267948966
spiroCanvasCore.js:62point X: (484,324) with Count: 1 angle :0.7853981633974483
```
Could anyone please tell, what might cause this problem or any other alternatives/solutions?
Here is a screenshot of my curve, after deletion:

EDIT: Instead of changing the globalCompositeOperation property to 'deatination-out', I simply changed the canvas context's strokestyle to match my background color. But still, the problem persists
| HTML5 Canvas - Destination-Out Composition problem | CC BY-SA 2.5 | null | 2011-02-08T01:59:51.207 | 2017-01-26T16:45:47.393 | 2011-02-08T02:22:20.470 | 390,150 | 390,150 | [
"html",
"canvas",
"drawing"
]
|
4,929,090 | 1 | 4,929,154 | null | 7 | 7,942 | I am looking the number of unique length paths through a graph starting at a particular node.
However I have a restriction that no node is visited more than once on any path.
---
For example take the following graph:

If I am after the number of 3 length paths starting at 5.
The answer would be 9.
```
5 -> 2 -> 1 -> 3
5 -> 2 -> 4 -> 3
5 -> 2 -> 4 -> 7
5 -> 4 -> 2 -> 1
5 -> 4 -> 3 -> 1
5 -> 4 -> 7 -> 6
5 -> 6 -> 7 -> 4
5 -> 7 -> 4 -> 2
5 -> 7 -> 4 -> 3
```
Note I am only concerted with the answer (9) .
---
I have tried using an [adjacency matrix](http://en.wikipedia.org/wiki/Adjacency_matrix) to the power of to give the number of paths, but I cannot work out how to account for unique node restriction.
I have also tried using a [depth-first search](http://en.wikipedia.org/wiki/Depth-first_search) but the amount of nodes and size of makes this infeasible.
---
EDIT: Confused DFS with BFS (Thank you Nylon Smile & Nikita Rybak).
| Calculating the number of paths through graph | CC BY-SA 3.0 | 0 | 2011-02-08T02:41:57.710 | 2011-06-28T03:29:57.443 | 2011-06-28T03:29:57.443 | 557,771 | 557,771 | [
"algorithm",
"graph"
]
|
4,929,413 | 1 | 6,511,822 | null | 5 | 3,923 | I'm building a webpage with a bunch of images that are all coming from Rackspace Cloudfiles on their Limelight CDN. Occasionally the page will finish loading, including the images, and Chrome/Webkit will fail to render some images at all.
Chrome doesn't render a "broken image" in their place, and if I check the Resources tab in the Inspector, they are listed and the data is all loaded up. The non-rendered images show the same info as the properly rendered ones.
This usually occurs when I go forward a page and then go back (via history). It persists if I reload the page, unless I do a hard refresh (⌘⇧R in Chrome), then they all show up like normal again.
I'm not loading the images in JavaScript or anything strange like that, nor do I have any CSS that hides the images. This only happens in Chrome, and it doesn't happen in Incognito mode from what I can tell.
Any ideas what's causing this? If it's a bug, how do I go about reporting it to the Chrome team?
### Update
I checked the headers in the Network tab of the Inspector and it turns out that for the images that are rendered, Chrome is only showing it's header metadata, like this:

And for the images that render properly, the metadata is shown along with the full request and response headers with a `304 Not Modified` status.
---
### This is still happening. On multiple computers, on several websites. There's a thread about this happening over the Google support forums as well.
| Images not rendering in Chrome/Webkit | CC BY-SA 2.5 | 0 | 2011-02-08T03:58:02.300 | 2014-08-13T08:13:06.260 | 2020-06-20T09:12:55.060 | -1 | 203,130 | [
"html",
"google-chrome",
"webkit"
]
|
4,929,594 | 1 | 4,929,618 | null | 1 | 599 | I try to run my iPhone app on the device, which has iOS 4.2.1 installed on it. I get the following error in xcode and the app crashes out after that.
Here is a screenshot of that.

| Error in iPhone SDK : GDB:Data formatters temporarily unavailable, will re-try after a 'continue' | CC BY-SA 2.5 | null | 2011-02-08T04:37:42.230 | 2011-02-08T04:41:34.473 | null | null | 566,431 | [
"iphone",
"xcode",
"ios4",
"ios-4.2"
]
|
4,929,680 | 1 | 4,931,287 | null | 40 | 24,972 | I have a contact page form that is setup to send an email to a Gmail account. Only problem is it won't send. I believe I have narrowed the error down to my settings inside of the initializers directory.
These are my current settings for trying to setup a standard gmail account to send mail:

Could it be that my domain setting is wrong or should I be typing in `[email protected]` for `:user_name`? This is the first time I have used ActionMailer so I don't really know what I am doing. Can somebody please help me out!? Thanks!
| Setting up a Gmail Account to work with ActionMailer in Rails 3 | CC BY-SA 2.5 | 0 | 2011-02-08T04:50:08.367 | 2014-09-26T13:10:45.820 | null | null | 427,494 | [
"ruby-on-rails-3",
"actionmailer"
]
|
4,929,720 | 1 | 4,931,219 | null | 2 | 127 | I have created a table in SQLite Chrome (html5):
```
transaction.executeSql(
'CREATE TABLE IF NOT EXISTS record('+
'id INTEGER NOT NULL PRIMARY KEY,'+
'fkindicatorspeciesid INTEGER NOT NULL REFERENCES indicatorspecies(indicatorspeciesid),'+
'latitude INTEGER NOT NULL,'+
'longitude INTEGER NOT NULL,'+
'time TEXT NOT NULL,'+
'`when` TEXT NOT NULL,'+
'numberseen INTEGER NOT NULL,'+
'notes TEXT NOT NULL,'+
'online_recordid INTEGER,'+
'status TEXT,'+
'locationid INTEGER REFERENCES location(locationid),'+
'surveyid INTEGER REFERENCES survey(id));',
[], nullHandler,errorHandler);
```
Then I add some data to it:

Now I try to retrieve all the records where 'online_recordid' is larger then zero:
```
select * from record where online_recordid > 0;
```
I should not get my record back because there is nothing in the column 'online_recordid'. The problem is that I do get the record back!
| How to get all results where column is larger then zero in sqlite? | CC BY-SA 2.5 | null | 2011-02-08T04:55:48.440 | 2011-02-08T11:09:38.517 | 2011-02-08T11:01:10.390 | 573,261 | 533,161 | [
"sql",
"sqlite",
"html",
"google-chrome"
]
|
4,929,770 | 1 | 4,976,494 | null | 1 | 1,015 | I want to send keys to a show dialogue form from another inactive form.See the picture

Form a is showing dialogue.Behind is another form which has a customized keyboard and numpad.
I simply send keys against these button clicks.
How is it possible that I can send keys from keyboard to show dialogue form.
| Sending command to showDialogue Form from inactive form | CC BY-SA 3.0 | null | 2011-02-08T05:04:43.737 | 2017-03-31T09:44:55.643 | 2017-03-31T09:44:55.643 | 271,200 | 538,789 | [
"c#",
".net",
"winforms",
"showdialog"
]
|
4,929,862 | 1 | 4,929,892 | null | 2 | 428 | i saw today's logo of google and i am impressed. i want to know how they make it. i think a lot of Jquery and AJAX used. Anybody know??

| how they make today's google doodles | CC BY-SA 2.5 | 0 | 2011-02-08T05:19:53.787 | 2011-02-08T06:22:25.613 | 2011-02-08T06:22:25.613 | 585,484 | 585,484 | [
"javascript",
"html",
"css"
]
|
4,929,865 | 1 | 4,941,782 | null | 3 | 818 | I added the following to my .vimrc:
```
" fill in the all possible matches
set completeopt=menu,preview
```
But I still can't make Vim preview the first word (I'm using the [AutoComplPop](http://www.vim.org/scripts/script.php?script_id=1879) plugin).

(I know that pressing `CTRL + Y` will select the first occurrence, but for some reason, it delays like 0.5 secods to insert the word).
my whole .vimrc:
```
nnoremap <C-N><C-P> <C-Y>
nnoremap <F4> :set filetype=html<CR>
nnoremap <F5> :set filetype=php<CR>
nnoremap <F3> :TlistToggle<CR>
" press space to turn off highlighting and clear any message already displayed.
nnoremap <silent> <Space> :nohlsearch<Bar>:echo<CR>
" set buffers commands
nnoremap <silent> <M-F8> :BufExplorer<CR>
nnoremap <silent> <F8> :bn<CR>
nnoremap <silent> <S-F8> :bp<CR>
" open NERDTree with start directory: D:\wamp\www
nnoremap <F9> :NERDTree /home/alex/www<CR>
" open MRU
nnoremap <F10> :MRU<CR>
" open current file (silently)
nnoremap <silent> <F11> :let old_reg=@"<CR>:let @"=substitute(expand("%:p"), "/", "\\", "g")<CR>:silent!!cmd /cstart <C-R><C-R>"<CR><CR>:let @"=old_reg<CR>
" open current file in localhost (default browser)
nnoremap <F12> :! start "http://localhost" file:///"%:p""<CR>
" open Vim's default Explorer
nnoremap <silent> <F2> :Explore<CR>
nnoremap <C-F2> :%s/\.html/.php/g<CR>
" fill in the all possible matches
set completeopt=menu,preview
" REMAPPING
" map leader to ,
let mapleader = ","
" remap ` to '
nnoremap ' `
nnoremap ` '
" remap increment numbers
nnoremap <C-kPlus> <C-A>
" COMPRESSION
function Js_css_compress ()
let cwd = expand('<afile>:p:h')
let nam = expand('<afile>:t:r')
let ext = expand('<afile>:e')
if -1 == match(nam, "[\._]src$")
let minfname = nam.".min.".ext
else
let minfname = substitute(nam, "[\._]src$", "", "g").".".ext
endif
if ext == 'less'
if executable('lessc')
cal system( 'lessc '.cwd.'/'.nam.'.'.ext.' &')
endif
else
if filewritable(cwd.'/'.minfname)
if ext == 'js' && executable('closure-compiler')
cal system( 'closure-compiler --js '.cwd.'/'.nam.'.'.ext.' > '.cwd.'/'.minfname.' &')
elseif executable('yuicompressor')
cal system( 'yuicompressor '.cwd.'/'.nam.'.'.ext.' > '.cwd.'/'.minfname.' &')
endif
endif
endif
endfunction
autocmd FileWritePost,BufWritePost *.js :call Js_css_compress()
autocmd FileWritePost,BufWritePost *.css :call Js_css_compress()
autocmd FileWritePost,BufWritePost *.less :call Js_css_compress()
" GUI
" taglist right side
let Tlist_Use_Right_Window = 1
" hide tool bar
set guioptions-=T
"remove scroll bars
set guioptions+=LlRrb
set guioptions-=LlRrb
" set the initial size of window
set lines=46 columns=180
" set default font
set guifont=Monospace
" set guifont=Monospace\ 10
" show line number
set number
" set default theme
colorscheme ir_dark
" encoding
set encoding=utf-8
setglobal fileencoding=utf-8 bomb
set fileencodings=ucs-bom,utf-8,latin1
" SCSS syntax highlight
au BufRead,BufNewFile *.scss set filetype=scss
" LESS syntax highlight
syntax on
au BufNewFile,BufRead *.less set filetype=less
" Haml syntax highlight
"au! BufRead,BufNewFile *.haml
"setfiletype haml
" Sass syntax highlight
"au! BufRead,BufNewFile *.sass
"setfiletype sass
" set filetype indent
filetype indent on
" set other indenting preferences
set autoindent
" for snipMate to work
filetype plugin on
" show breaks
set showbreak=----->
" coding format
set tabstop=4
set shiftwidth=4
set linespace=1
" CONFIG
" keep the buffer around when left
set hidden
" enable matchit plugin
source $VIMRUNTIME/macros/matchit.vim
" folding
set foldmethod=indent
"set foldmethod=marker
"set foldmarker={,}
"let g:FoldMethod = 0
"map <leader>ff :call ToggleFold()<cr>
"fun! ToggleFold()
"if g:FoldMethod == 0
"exe 'set foldmethod=indent'
"let g:FoldMethod = 1
"else
"exe 'set foldmethod=marker'
"let g:FoldMethod = 0
"endif
"endfun
" save and restore folds when a file is closed and re-opened
"au BufWrite ?* mkview
"au BufRead ?* silent loadview
" auto-open NERDTree everytime Vim is invoked
au VimEnter * NERDTree /home/alex/www
" set omnicomplete
autocmd FileType python set omnifunc=pythoncomplete#Complete
autocmd FileType javascript set omnifunc=javascriptcomplete#CompleteJS
autocmd FileType html set omnifunc=htmlcomplete#CompleteTags
autocmd FileType css set omnifunc=csscomplete#CompleteCSS
autocmd FileType xml set omnifunc=xmlcomplete#CompleteTags
autocmd FileType php set omnifunc=phpcomplete#CompletePHP
autocmd FileType c set omnifunc=ccomplete#Complete
" Remove trailing white-space once the file is saved
au BufWritePre * silent g/\s\+$/s///
" Use CTRL-S for saving, also in Insert mode
noremap <C-S> :update!<CR>
vnoremap <C-S> <C-C>:update!<CR>
inoremap <C-S> <C-O>:update!<CR>
" DEFAULT
set nocompatible
source $VIMRUNTIME/vimrc_example.vim
"source $VIMRUNTIME/mswin.vim
"behave mswin
" disable creation of swap files
set noswapfile
" no back ups wwhile editing
set nowritebackup
" disable creation of backups
set nobackup
" no file change pop up warning
autocmd FileChangedShell * echohl WarningMsg | echo "File changed shell." | echohl None
set diffexpr=MyDiff()
function MyDiff()
let opt = '-a --binary '
if &diffopt =~ 'icase' | let opt = opt . '-i ' | endif
if &diffopt =~ 'iwhite' | let opt = opt . '-b ' | endif
let arg1 = v:fname_in
if arg1 =~ ' ' | let arg1 = '"' . arg1 . '"' | endif
let arg2 = v:fname_new
if arg2 =~ ' ' | let arg2 = '"' . arg2 . '"' | endif
let arg3 = v:fname_out
if arg3 =~ ' ' | let arg3 = '"' . arg3 . '"' | endif
let eq = ''
if $VIMRUNTIME =~ ' '
if &sh =~ '\<cmd'
let cmd = '""' . $VIMRUNTIME . '\diff"'
let eq = '"'
else
let cmd = substitute($VIMRUNTIME, ' ', '" ', '') . '\diff"'
endif
else
let cmd = $VIMRUNTIME . '\diff'
endif
silent execute '!' . cmd . ' ' . opt . arg1 . ' ' . arg2 . ' > ' . arg3 . eq
endfunction
```
| How can I preview the first word in Vim's auto completion system? | CC BY-SA 2.5 | null | 2011-02-08T05:20:25.523 | 2011-02-09T05:58:53.090 | 2011-02-08T05:35:39.493 | 122,536 | 122,536 | [
"vim"
]
|
4,930,581 | 1 | 4,930,905 | null | 8 | 16,971 | i want to render data
this is how my jsp page table look like

how i achieve this,
please help me,
it creates a lot of confusion for me, that how many classes are to be define and what are the fields.
thanks
| rendering data in jsp using spring controllers and different classes | CC BY-SA 2.5 | 0 | 2011-02-08T07:26:23.803 | 2011-11-09T12:41:44.657 | null | null | 536,961 | [
"spring",
"jsp",
"spring-mvc"
]
|
4,930,776 | 1 | 4,930,898 | null | 2 | 1,595 | I have two applications, one that creates a rectangle, and output's it's left,top,width,height and rotation angle, and another that draws the rectangle to the screen.
Application1 (writer) uses the top, left as the origin for rotation.
Application2 (reader) uses the center as the origin for rotation.
I'm trying to get a deltaX, and deltaY so that I can draw the rectangle, rotate it about the origina, and use a built in translate method, to shift the rectangle into position.
I know that a points rotation can be calculated as follows:
`x' = x*cos(theta) - y*sin(theta)`
`y' = x+sin(theta) + y*cos(theta)`
But, with that, I can't seem to figure out the actual delta values needed for the translate method.
In the image below, the white rectangle is drawn using top/left as the rotation point, while the green rectangle is drawn using center as the rotation point. I'd like to shift the green rectangle onto the white one.
(0,0)

| Translating a rectangle's coordinates | CC BY-SA 2.5 | null | 2011-02-08T07:59:13.663 | 2021-05-21T13:26:06.970 | 2011-02-08T08:29:54.090 | 37,843 | 37,843 | [
"geometry",
"translation"
]
|
4,930,815 | 1 | 4,930,906 | null | 1 | 1,498 | I would like to know how can I create a simple progressing bar, that could show to a user a friendly look for a variable with values from 0 to 100%.
This variable has been populated with a method in my code.
Do you have any idea?
Thanks for your time.
I am using C# and asp.net 4
The idea is smt like this
| ASP.NET Web Control for Progressing Bar | CC BY-SA 2.5 | 0 | 2011-02-08T08:07:31.093 | 2011-02-15T09:35:02.380 | 2011-02-15T09:35:02.380 | 419,595 | 379,008 | [
"c#",
"asp.net",
"web-controls"
]
|
4,931,456 | 1 | 4,932,401 | null | 5 | 5,410 | I have the following:
```
<!-- group clone //-->
<div class="section">
<div class="parent row infoOn">
<div class="validGroup">
<a title="remove" class="iconClose" href="#">remove</a>
<div class="grouping">
<div class="clearfix valid">
<label>Name<span class="iconReq"> </span>:</label>
<input type="password" class="text inpButton" name="items[0].first">
</div>
<div class="clearfix">
<label>Email<span class="iconReq"> </span>:</label>
<input type="text" class="text inpButton" name="items[0].first">
</div>
</div>
</div>
</div>
<div class="row addControl">
<a href="#" class="button">Add</a>
</div>
</div>
<!-- group clone //-->
```
and jQuery:
```
$(function(){
// Control clone
$('div.addControl a.button').click(function (e){
e.preventDefault();
var parent = $(this).closest('.section').find('.parent:last');
var parentInput = parent.clone();
parentInput.find("input").val("");
parent.after(parentInput);
});
$('div.validGroup a.iconClose').live('click', function (e){
e.preventDefault();
if ($(this).closest('.section').find('.parent').length > 1){
$(this).closest('div.parent').remove();
}
});
reflesh();
});
```
1. clicking the "Add" button removes values from input fields and clones the group (2 input fields).
2. clicking "remove" link removes group
Question: how would I change it so that when adding OR removing a new group, input fields would be renamed to `name="items[INDEX].first"` and `name="items[INDEX].last"`
For example. when there's only one "group", input fields would have names:
- `name="items[0].first"`- `name="items[0].last"`
if I add another one, the new one would have
- `name="items[1].first"`- `name="items[1].first"`
and so on.
When I remove the first one (one with `items[0].first`), the second one's input names would be modified from `"items[1].first"` to `items[0].first`.
here is what it looks like:

| Jquery clone and rename input fields | CC BY-SA 4.0 | 0 | 2011-02-08T09:40:02.720 | 2021-01-13T20:57:36.690 | 2021-01-13T20:57:36.690 | 4,370,109 | 455,042 | [
"javascript",
"jquery",
"jquery-events"
]
|
4,931,485 | 1 | 4,934,738 | null | 1 | 1,463 | I have a little app that I am working on with wxPython.
I have a scrolled window using `wx.ScrolledWindow`. It seems to refuse to repaint the contents when it is scrolled.
Example:

Code that created above example:
```
import wx
class SaveEdFrame(wx.Frame):
def __init__(self, *args, **kwds):
kwds["style"] = wx.DEFAULT_FRAME_STYLE|wx.EXPAND
wx.Frame.__init__(self, *args, **kwds)
self.__do_layout()
self.Bind(wx.EVT_SIZE, self.onSize)
def __mainSizer(self):
self.mainSizer = wx.BoxSizer(wx.VERTICAL)
for key in xrange(30):
self.headerLabel = wx.StaticText(self, -1, "TestStr %s" % key)
self.mainSizer.Add(self.headerLabel)
return self.mainSizer
def __do_layout(self):
## begin wxGlade: SaveEdFrame.__do_layout
self.scroll = wx.ScrolledWindow(self, style=wx.FULL_REPAINT_ON_RESIZE)
self.scroll.SetScrollbars(1, 10, 1, 10)
self.scroll.SetSizer(self.__mainSizer())
def onSize(self, event):
self.scroll.SetSize(self.GetClientSize())
self.Refresh()
if __name__ == "__main__":
app = wx.App(0)
mainFrame = SaveEdFrame(None)
app.SetTopWindow(mainFrame)
mainFrame.Show(True)
app.MainLoop()
```
I've been digging through the wxDocs, and it seems to me that one solution would be to subclass `wx.ScrolledWindow`, manually catch `wx.EVT_SCROLLWIN` events, and then explicitly redraw the window, but my attempts to do that failed when calling `self.Refresh()` did not cause the interior of the `wx.ScrolledWindow` to repaint.
Anyways, it seems to me that the whole point of the `wx.ScrolledWindow` object is that it should handle repainting itself when scrolled.
What am I doing wrong?
Platform is W7-x64, python 2.7 32 bit, wxPython 2.8.11.0
| wx.ScrolledWindow not repainting when scrolled | CC BY-SA 2.5 | null | 2011-02-08T09:43:24.133 | 2011-03-27T04:58:16.977 | 2011-03-27T04:58:16.977 | 91,962 | 268,006 | [
"python",
"windows-7",
"wxpython",
"wxwidgets"
]
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.