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 |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
6,101,805 | 1 | 6,106,820 | null | 2 | 4,779 |
This is a multi threaded scenario.
1. The main thread handles the application and UI events, and it starts up a new thread to do some background operations.
2. The "background" thread loads the data from files into a data-table of a strongly-typed dataset. The DataGridView is bound to that DataTable.
3. Once the data is ready, the "background" thread invokes the refresh() function of the DataGridView on the form.
The new datalines are always displayed. Error only occurs if there are enough lines to display the scrollbar (see image below).

The relevant parts of the code are attached below.
Grid refresh operation in the form's .cs file:
```
public void ThreadSafeRebindGrids()
{
SimpleCallBack callBackHandler = new SimpleCallBack(RebindGrids);
this.BeginInvoke(callBackHandler);
}
public void RebindGrids()
{
gridCurrentResults.Refresh(); // The problematic DataGridView refresh()
gridAllResults.Refresh();
}
public delegate void SimpleCallBack();
```
The update part in the "background" thread:
```
void Maestro32_SampleFinished(object sender, MeasurementEvents.SampleFinishedEventArgs e)
{
//--- Read new results
ParentForm.ThreadSafeSetStatusInfo("Processing results for sample no. " + e.SampleNo.ToString() + "...");
CurrentMeasurement.ReadSpeResults(); // Updating the DataTable in the strongly typed DataSet (see below)
ParentForm.ThreadSafeRebindGrids(); // Refresh the DataGridView
ParentForm.ThreadSafeRefreshNumbers();
}
```
The objects related to the "background" thread have a direct reference to the `DataSet` (`UiDataSource`). The `DataTable` (`CurrentSamples`) is updated in the following manner:
```
/// <summary>
/// Adds a new sample to the CurrentSamples table of the UiDataSet.
/// </summary>
/// <param name="sample">The new sample to be added to the table.</param>
/// <param name="serial">The serial number of the sample being added</param>
private void AddSampleToCurrentResults(SampleData sample, int serial)
{
UiDataSource.CurrentSamples.AddCurrentSamplesRow(serial,
sample.MeasurementDate,
(uint)Math.Round(sample.SampleCountSum),
true, //--- Set the checkbox checked
sample.LiveTime,
sample.RealTime);
}
```
`DataGridView` options:
```
//
// gridCurrentResults (generated)
//
this.gridCurrentResults.AllowUserToAddRows = false;
this.gridCurrentResults.AllowUserToDeleteRows = false;
this.gridCurrentResults.AllowUserToOrderColumns = true;
this.gridCurrentResults.AllowUserToResizeRows = false;
this.gridCurrentResults.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)));
this.gridCurrentResults.AutoGenerateColumns = false;
this.gridCurrentResults.CausesValidation = false;
this.gridCurrentResults.ColumnHeadersHeight = 25;
this.gridCurrentResults.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.selectedCol,
this.SampleNoCol,
this.MeasuredValueCol,
this.liveTimeCol,
this.realTimeDataGridViewTextBoxColumn,
this.AtTimeCol});
this.gridCurrentResults.DataMember = "CurrentSamples";
this.gridCurrentResults.DataSource = this.uiDataSource;
this.gridCurrentResults.Location = new System.Drawing.Point(11, 24);
this.gridCurrentResults.Margin = new System.Windows.Forms.Padding(8);
this.gridCurrentResults.Name = "gridCurrentResults";
this.gridCurrentResults.RowHeadersVisible = false;
this.gridCurrentResults.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
this.gridCurrentResults.ShowEditingIcon = false;
this.gridCurrentResults.Size = new System.Drawing.Size(534, 264);
this.gridCurrentResults.TabIndex = 0;
this.gridCurrentResults.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.gridCurrentResults_CellContentClick);
```
If I made a mistake somewhere please point it out to me.
I tried removing the `refresh()` statement, as I am doing pretty much the same what u suggested. The only difference is the databinding, it looks like:
```
this.dataGridView.DataSource = this.dataSet;
this.dataGridView.DataMember = "dataTable";
```
And I update the `dataTable` in a similar way, but from another thread.
But the new data lines do not appear until I, say, resize the window.
`dataTable`
|
.NET 3.5 WinForms - DataGridView crashes on refresh(). Is it a bug?
|
CC BY-SA 3.0
| 0 |
2011-05-23T19:15:28.003
|
2012-09-11T07:02:37.860
|
2012-09-11T07:02:37.860
| 168,868 | 524,094 |
[
"c#",
".net-3.5",
"datagridview"
] |
6,101,902 | 1 | 6,101,946 | null | 0 | 632 |
Since I got the advice to make another question here it goes... I want to plot the sum, and I have a code:
```
from scitools.std import *
from math import factorial, cos, e, sqrt
from scipy import *
import numpy as np
def f1(t):
return 0.5*(1 + sum( (a**(2*n)*cos(2*sqrt(1 + n)*t))/(e**a**2*factorial(n)) for n in range(0,100)))
a=4
t = linspace(0, 35, 1000)
y1 = f1(t)
plot(t, y1)
xlabel(r'$\tau$')
ylabel(r'P($\tau$)')
legend(r'P($\tau$)')
axis([0.0, 35.0, 0.0, 1.0])
grid(True)
show()
```
But I get the error
```
Traceback (most recent call last):
File "D:\faxstuff\3.godina\kvantna\vježbe\qm2\v8\plot.py", line 12, in <module>
y1 = f1(t)
File "D:\faxstuff\3.godina\kvantna\vježbe\qm2\v8\plot.py", line 8, in f1
return 0.5*(1 + sum( (a**(2*n)*cos(2*sqrt(1 + n)*t))/(e**a**2*factorial(n)) for n in range(0,100)))
File "C:\Python26\lib\site-packages\numpy\core\fromnumeric.py", line 1415, in sum
res = _sum_(a)
File "D:\faxstuff\3.godina\kvantna\vježbe\qm2\v8\plot.py", line 8, in <genexpr>
return 0.5*(1 + sum( (a**(2*n)*cos(2*sqrt(1 + n)*t))/(e**a**2*factorial(n)) for n in range(0,100)))
TypeError: unsupported operand type(s) for /: 'numpy.ndarray' and 'numpy.float64'
```
So what seems to be the problem? It has got to do something with array, but I don't know what :\
EDIT: The picture, in Mathematica looks like this:

|
TypeError in python while trying to plot a sum
|
CC BY-SA 3.0
| null |
2011-05-23T19:24:21.687
|
2011-05-23T20:14:52.300
|
2011-05-23T19:41:51.877
| 629,127 | 629,127 |
[
"python",
"plot",
"sum"
] |
6,102,301 | 1 | 6,102,539 | null | 0 | 179 |
In my case, jQuery is not working. I don't know where I am wrong. It can be confliction with some other js files but not sure. See below screenshot.

In this screen shot you are seeing google custom search box which is ajax based. My problem is when i click on search box then bottom Premium sales jobs contaner should be hidden. For this i have used this jQuery code :
```
$(document).ready(function(){
$(".gsc-search-button").click(function(){
$("#container_table").hide();
});
)};
```
I have included jQuery library with correct path. I have also used `alert()` after `document.ready` to check it is working or not..But its not working.
```
.gsc-search-button is the class of search button.
#container_table is the id of that table which I want to hide.
```
The search data will be load into like div which is initially look like this :
`<div id="cse">Loading</div>` and after search `iframe` placed into this div and replaced Loading String.
I have also tried below javascript code :
```
if(document.getElementById('cse').innerHTML != "Loading") {
document.getElementById('#container_table').style.display = "none";
}
```
But it's not working.
|
Jquery is not working when i try to use it for google custom search?
|
CC BY-SA 3.0
| null |
2011-05-23T19:57:44.017
|
2017-12-22T14:55:33.810
|
2017-12-22T14:55:33.810
| 3,885,376 | 445,646 |
[
"jquery"
] |
6,102,605 | 1 | 11,378,339 | null | 5 | 9,068 |
[http://blogs.msdn.com/b/dditweb/archive/2008/05/06/linq-to-sql-and-multiple-result-sets-in-stored-procedures.aspx](http://blogs.msdn.com/b/dditweb/archive/2008/05/06/linq-to-sql-and-multiple-result-sets-in-stored-procedures.aspx)
Similar to this link however the project I'm working on use the ORM component of LINQ to SQL (we use it more for quickly generating the ADO.Net interface to the db).
Currently, the pattern we follow is:
```
var result = myDataContext.GetAllCustomersAndOrders();
```
And the stored procedure looks like this:

Are there extra steps I need to take? Do I need to extend the generated dbml or the data context partial class file?
Hopefully this makes sense... It's a bit difficult to explain and all the examples I've found use the ORM piece of the dbml (dragging and dropping tables onto the dbml designer surface).
|
How do I use LINQ to SQL with stored procedures returning multiple result sets without ORM?
|
CC BY-SA 3.0
| 0 |
2011-05-23T20:24:09.970
|
2015-12-21T22:04:00.703
|
2011-05-23T21:00:29.500
| 298,758 | 298,758 |
[
"linq-to-sql"
] |
6,102,645 | 1 | 6,102,708 | null | 2 | 438 |
I was looking of "" between two ListViews as shown in the attached screenshot(in red) and not the border(in white) among the ListView items.
Any idea of how to set the border between the ListViews as shown?

Thanks,
Sana.
|
Border between two ListViews
|
CC BY-SA 3.0
| null |
2011-05-23T20:27:46.087
|
2011-05-23T20:33:53.853
| null | null | 402,637 |
[
"android",
"android-listview"
] |
6,102,842 | 1 | 6,136,887 | null | 0 | 82 |
I have an article 'tag' sidebar which is positioned correctly on the Home page, but creeps up on all my other pages. Am using the Kaminari paginate plug-in. Its driving me nuts - how can I stop this from happening?
css
```
.sidebar {
position:absolute;
width: 150px;
float:right;
padding: 0px 0px 0px 20px;
margin: -1500px 0px 0px 700px;
}
```
_side.html.erb
```
<div id="art">
<%= link_to 'Post An Article', new_article_path %>
</div>
<div id="iphone">
<%= image_tag "iPhone.png" %>
</div>
<br />
<div id="soc-med">
<%= link_to image_tag("facebook.png"), "http://www.facebook.com/" %>
<%= link_to image_tag ("twitter.png"), "http://twitter.com/#!/" %>
</div>
<div id="tag_title">
<h3>Article Tags</h3>
</div>
<div id= "tags" >
<% cache('all_tags') do %>
<% for tag in Tag.find(:all, :order => 'name') %>
<ul style="list-style-type: none">
<li>
<%= link_to "#{tag.name}", tag_path(tag) %>
</li>
</ul>
<% end %>
</div>
<% end %>
</div>
```

|
Tag Sidebar Moving Up?
|
CC BY-SA 3.0
| null |
2011-05-23T20:47:32.137
|
2011-05-26T10:09:11.227
|
2011-05-25T01:41:22.547
| 372,237 | 372,237 |
[
"css",
"ruby-on-rails-3"
] |
6,102,894 | 1 | 6,102,990 | null | 2 | 2,043 |
I have a fixed-width, relatively positioned, and centered #content div (shown as the outer red box, below). At the top of this div, I need to place two fixed-position header divs, one left of center and one right of center (center line shown as dashed red line).
These two header divs have dynamic width and need to be anchored on the side toward the center (shown in bold black). When they grow in size, their outer edge should extend toward the perimeter (shown with black arrows).
I thought I could achieve the effect with something like this but no luck:
```
#leftheader { position:fixed; top:0; left:50%; margin-right:10px; }
#rightheader { position:fixed; top:0; right:50%; margin-left:10px; }
```
Diagram:

All help greatly appreciated. Thanks!
|
How to center fixed-position, dynamic-width divs [diagram included]?
|
CC BY-SA 3.0
| null |
2011-05-23T20:52:14.323
|
2011-05-23T21:03:24.077
|
2011-05-23T20:53:31.437
| 139,010 | 684,726 |
[
"css",
"centering",
"css-position"
] |
6,103,107 | 1 | 6,105,778 | null | 1 | 61 |
Not sure what terms to search or look for but I have a website that is hosted on Azure. Everytime i Refresh i get different values/Views out.
Might Start with this.

Then i refresh. I get this

Then if i Start the service from visual studio, connecting to the azure database. I get. The normal view which looks like

Any Idea what could be the problem?
|
Azure Two Different View On refresh
|
CC BY-SA 3.0
| null |
2011-05-23T21:13:30.683
|
2011-05-24T04:47:04.343
| null | null | 275,561 |
[
"asp.net",
"azure",
"azure-sql-database"
] |
6,103,171 | 1 | 7,676,476 | null | 4 | 1,369 |
The info windows in my google maps instance are lookin' funny:
Some of the images that make up the corners and extremities of the info window graphic seem to be missing. Any idea why this is happening? I'm experimenting, but haven't figured it out yet.
I'm using [gmap3](http://gmap3.net/), a JQuery wrapper for google's V3 API. Here's my code for setting up the map (javascript/haml):
```
<script>
$(window).load(function() {
$('#map').gmap3();
var bounds = new google.maps.LatLngBounds ();
[email protected] do |area|
bounds.extend(new google.maps.LatLng(#{area.latitude}, #{area.longitude}));
$('#map').gmap3(
{
action:'addMarker',
latLng:[#{area.latitude},#{area.longitude}],
events:{click:function(marker, event){
$(this).gmap3({action:'clear',list:['infoWindow']});
$(this).gmap3(
{
action:'addInfoWindow',
latLng:marker.getPosition(),
infowindow:
{content:"#{escape_javascript(link_to area.name, area)}<br>#{escape_javascript(image_tag area.image_holder.image.url(:thumb)) if area.image_holder.present?}"}
}
)}}
}
);
$('#map').gmap3('get').fitBounds(bounds);
$('.clickable_row').click(function() {
var id = $(this).attr('id');
window.location = '#{areas_path}' + '/' + id;
});
});
</script>
```
|
google maps info window missing images/corners
|
CC BY-SA 3.0
| 0 |
2011-05-23T21:20:39.300
|
2013-08-30T13:01:42.027
|
2012-03-16T16:34:07.853
| 21,234 | 176,723 |
[
"ruby-on-rails",
"google-maps",
"jquery-gmap3"
] |
6,103,514 | 1 | 6,103,673 | null | 0 | 260 |
So I'm writing this app for image manipulation, and after the user chooses an image from the gallery, I have an options page with several controls on top and a preview of the chosen image in the middle. There is also a 'start' button at the bottom, but if the image is high enough, the button gets covered up.
I considered resizing the image to a specific height that works, but that height would change on different devices. Ideally I'd like the image to take up as much space between the controls and button, but I just can't figure out how to do that. I tried using a vertical tablelayout but that made no difference.
In this image, the emulator window is on the right.

Here's my XML. A tad messy but here goes:
```
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/linearLayout" android:orientation="vertical"
android:layout_height="wrap_content" android:padding="10px"
android:layout_width="fill_parent">
<TextView android:textSize="18px" android:text="GIF Options"
android:id="@+id/textView3" android:layout_width="wrap_content"
android:layout_height="wrap_content">
</TextView>
<TableLayout android:id="@+id/tableLayout"
android:layout_width="fill_parent" android:layout_height="wrap_content"
android:stretchColumns="1">
<TableRow>
<TextView android:layout_height="wrap_content" android:text="FPS:"
android:id="@+id/TextView1" android:layout_width="wrap_content"
android:enabled="false" android:textSize="17px"></TextView>
<EditText android:text="20" android:inputType="numberDecimal"
android:id="@+id/EditTextFPS" android:numeric="decimal"
android:singleLine="true" android:layout_height="wrap_content"
android:layout_width="wrap_content" android:digits="2"
android:width="50px"></EditText>
</TableRow>
<TableRow>
<TextView android:layout_height="wrap_content" android:text="Frames:"
android:id="@+id/TextView2" android:layout_width="wrap_content"
android:enabled="false" android:textSize="17px"></TextView>
<EditText android:layout_width="wrap_content"
android:layout_height="wrap_content" android:text="70"
android:inputType="numberDecimal" android:id="@+id/EditTextFrames"
android:numeric="decimal" android:singleLine="true" android:digits="2"></EditText>
</TableRow>
<TableRow>
<TextView android:layout_height="wrap_content" android:text="Saturation Boost: "
android:id="@+id/TextView2" android:layout_width="wrap_content"
android:enabled="false" android:textSize="17px"></TextView>
<SeekBar android:layout_height="wrap_content"
android:layout_width="fill_parent" android:id="@+id/seekBar1"
android:layout_alignParentLeft="true" android:max="10"></SeekBar>
</TableRow>
</TableLayout>
<TextView android:layout_width="wrap_content"
android:layout_height="wrap_content" android:id="@+id/textView4"
android:layout_gravity="center" android:text="Chosen Image"
android:textSize="16px"></TextView>
<ImageView android:layout_width="wrap_content" android:src="@drawable/icon"
android:layout_gravity="center" android:id="@+id/optionspreview"
android:isScrollContainer="true" android:layout_height="fill_parent"></ImageView>
<Button android:layout_height="wrap_content"
android:layout_width="wrap_content" android:textSize="22px"
android:id="@+id/startbutton" android:text="Start!"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true" android:layout_gravity="center"></Button>
</LinearLayout>
```
|
How can I make an ImageView scale to leave room for controls beneath it?
|
CC BY-SA 3.0
| null |
2011-05-23T21:55:00.570
|
2011-05-23T22:34:33.497
|
2011-05-23T22:14:40.377
| 765,210 | 765,210 |
[
"java",
"android",
"android-layout"
] |
6,103,638 | 1 | 6,207,831 | null | 3 | 610 |
I tried to make a wp7 app with expression blend. But is there a problem that make me crazy!
I created a , a and a . In this grid i create an .

Why my image ?
Here the screenshots:

The gray image is rounded also at dx, like sx side.
Here the config:

Is there a solution to enlarge my image on width like max size of grid?
How can I do this?
This is my snippet of code:
```
<controls:PanoramaItem Foreground="Black" >
<Grid Margin="1,26,160,46" Width="418">
[...]
<Grid Margin="0,190,8,0" VerticalAlignment="Top" Height="207" >
<Image Source="JobRow.png" Margin="8,34,27,50" Stretch="None" />
</Grid>
</Grid>
</controls:PanoramaItem>
```
Any idea please?
: if I change Stretch this is the result, my image enlarge only in height!
It's like that is blocked at certain position... but i don't know why!!!

: Changing default orientation will not enlarge my grid!
```
<controls:PanoramaItem Foreground="Black" Width="438" Orientation="Horizontal">
```
|
Why image don't autosize in grid panel?
|
CC BY-SA 3.0
| null |
2011-05-23T22:12:59.870
|
2011-06-01T21:17:38.713
|
2011-06-01T19:57:46.253
| 88,461 | 88,461 |
[
"c#",
"silverlight",
"xaml",
"windows-phone-7",
"panorama-control"
] |
6,103,755 | 1 | 6,103,949 | null | 0 | 731 |
I'm trying to setup Eclipse for PHP development on my Windowx box. I've got PDT, Apache and PHP installed and was using [this](http://www.prodigyproductionsllc.com/articles/web-design/use-eclipse-for-php-development/) guide as a reference. Everything works fine except when I preview the sample web page I see the entire plain text file instead of the expected PHP generated code. For example, the file I have contains the following:
```
<?php
echo "Hello World!";
?>
```
When I run it, I expect to see
But instead I see the entire file as plain text as shown in the below screen cap

I'm not sure if there's something wrong with the syntax or configuration. I'd also like to be able to debug PHP web apps through Eclipse. If there are better alternatives to setting up PHP development with debugging, I'm open to suggestions. Thanks in advance.
UPDATE:
@Neal - The Apache server is running. I know when I was installing PHP, I never got the prompt to add it to my Apache server instance as the tutorial indicated. If that's the case, then no. Is there a way I can add PHP to the Apache server manually? Thanks.
@ontaria_ - I'll try reinstalling PHP using the zip file, I was using the MSI installer instead and according the the readme it should've configured itself for Apache automatically.
UPDATE 2:
Thanks all for your help. I had another look and it turns out I was using the Non-thread safe installer, I downloaded and ran the Thread Safe installer and saw the option to include the modules for Apache. Tested and worked as expected, thanks again for your help.
|
Eclipse PHP development environment setup
|
CC BY-SA 3.0
| null |
2011-05-23T22:29:00.663
|
2011-08-25T07:35:56.053
|
2011-05-23T23:29:08.737
| 94,541 | 94,541 |
[
"php",
"eclipse",
"ide"
] |
6,103,960 | 1 | 6,103,975 | null | 4 | 13,930 |
I want to create a toolbar that looks like:

How can I do this in XML? Here is what mine looks like currently:
```
<LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:id="@+id/toolbarLinearLayout" android:background="@color/solid_yellow">
<Button android:layout_width="wrap_content" android:layout_height="wrap_content" android:id="@+id/replyButton" android:text="Reply"></Button>
<Button android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="RT" android:id="@+id/rtButton"></Button>
<Button android:id="@+id/dmButton" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="DM"></Button>
</LinearLayout>
```
|
How to space out items in a LinearLayout?
|
CC BY-SA 3.0
| 0 |
2011-05-23T22:57:05.667
|
2014-01-07T12:28:24.287
| null | null | 19,875 |
[
"java",
"android",
"eclipse",
"android-layout",
"android-linearlayout"
] |
6,104,058 | 1 | 6,376,538 | null | 5 | 1,768 |
I am having a rough time implementing eventing in a recent project.
I have verified that structuremap is scanning properly assemble and adding EventHandlers
```
Scan(cfg =>
{
cfg.TheCallingAssembly();
cfg.IncludeNamespace("ABC.EventHandler");
cfg.ConnectImplementationsToTypesClosing(typeof(IHandle<>));
});
public class StructureMapEventDispatcher : IEventDispatcher
{
public void Dispatch<TEvent>(TEvent eventToDispatch) where TEvent : IDomainEvent
{
foreach (var handler in ObjectFactory.GetAllInstances<IHandle<TEvent>>())
{
handler.Handle(eventToDispatch);
}
}
}
```
Before I used to fire Event from Domain. Somthing like `Dispatcher.RaiseEvent(new [domainEvent class](x,y,z));`
and the event will get fired up. I had to change the design where I am now collectiong events in a collection
```
_domainEvents = new Collection<IDomainEvent>();
```
and then raising it after I have saved the domain to Repository
```
public static void Raise(ICollection<IDomainEvent> domainEvents)
{
foreach (var domainEvent in domainEvents)
{
DomainEventDispatcher.Raise(domainEvent);
}
}
```
but now
`ObjectFactory.GetAllInstances<IHandle<TEvent>>()` returns 0 count of handlers
if I watch for
`ObjectFactory.GetAllInstances<IHandle<DomainEventClass>>()` it returns collection of handlers properly ( currently I have 2 and it shows 2 count)
... I am assuming this has something to do with events being raised as of type `IDomainEvent` instead of actual type and that is making it hard for structuremap to resolve it.
How can I solve this issue?
Regards,
The Mar
--
Edit 1:
I have conformed that struturemap container contains all event handlers scanned from the assembly.
Edit 2
I dont know how to make this question attract more attention. I am adding bounty for a solution to achieve the results desired. If the question is not clear, please ask.
Basically I want the `ObjectFactory.GetAllInstances<IHandle<TEvent>>()` to return handlers for `TEvent` where `TEvent` is of Type `IDomainEvent`. Events to be raised are stored in Collection of `IDomainEvent` and raised after the fact that Domain was saved (from service layer).
I am thinking there should be some way to make structuremap know that the event raised as `IDomainEvent` is actually of Type `DomainEvent`
var eventsToRaise= dealer.EventsToRaise();
Adding Information from Debug Window:

After the events have been raised in the dispatcher window

Edit 3:
Eventhough eventToRaise shows as "DealerName Changed" and "DealerCommunicationChanged"
typeof(TEvent) gives Type as Domain.IDomainEvent
I guesss if it is possible to get be able to cast to right type ( from whereever VS watch window is getting info) the problem could get resolved
----- Result---
Both approach worked. I put both approached to 2 other members in my team and we felt that solution without reflection to be selected as right answer.
Today we will be doing a test with changed implementation and see if there are any issues with this solution in the solution.
I have upvoted reflection based solution as it is also right answer.
---
|
structuremap ObjectFactory.GetAllInstances<IHandle<TEvent>>()
|
CC BY-SA 3.0
| 0 |
2011-05-23T23:09:21.953
|
2011-06-20T19:05:18.550
|
2011-06-20T19:05:18.550
| 148,819 | 148,819 |
[
"c#",
"structuremap",
"domain-events"
] |
6,104,143 | 1 | 6,104,250 | null | 2 | 1,852 |
For an app that does lots of calculation from the GPS, I need to get the latitude/longitude and speed every 0.5 second to be very accurate and avoid delay.
I am using:
- `[locationManager setDesiredAccuracy:kCLLocationAccuracyBestForNavigation];`- `- locationManager:didUpdateToLocation:fromLocation:``newLatitude``newLongitude``newSpeed`- `NSTimer`
See below a graph generated by Excel representing the latitude values during 18 seconds:

We can clearly see that we have location updates every second, and not every 0.5 second as wished. I do samples driving around my office, so my speeds vary between 0 and 65 MPH. So when I am driving 50MPH, I should get different values for lat/lon/speed from the iPhone every 0.5s right?
Please tell me how I can get those location updates every 0.5s if you know anything about the accuracy with the `CLLocationManager` object.
Thanks!
|
iPhone CLLocationManager updates every 0.5 seconds
|
CC BY-SA 3.0
| null |
2011-05-23T23:19:53.443
|
2014-05-17T02:11:24.633
| null | null | 318,830 |
[
"iphone",
"cllocationmanager"
] |
6,104,245 | 1 | 6,105,042 | null | 0 | 122 |
I would like to create this kind of "follow" menu, so customer can return on those links with just clicking on it.
Does anybody now is there any module that do this? Thanks in advance.
|
Creating follow menu in Joomla
|
CC BY-SA 3.0
| null |
2011-05-23T23:37:02.360
|
2011-05-24T02:11:21.847
| null | null | 641,246 |
[
"menu",
"joomla"
] |
6,104,272 | 1 | 6,104,283 | null | 0 | 691 |
I have implemented from the JQuery SerialScroll Example and Im having some minor problems:
Here is the Fiddle which functions normal: [http://jsfiddle.net/NinjaSk8ter/nJu5D/](http://jsfiddle.net/NinjaSk8ter/nJu5D/)
When I run this from my page in the browser Im having some issues.
From the SerialScrollTabs Class:
```
<div class="SerialScrollTabs">
<ul class="navigations">
<li><a href="#" id="btnOptions" tabindex="1" class="blue">Options </a></li>
<li><a href="#" id="btnAvatar" tabindex="2" class="blue">Avatar </a></li>
<li><a href="#" id="btnAbout" tabindex="3" class="blue">Tourism </a></li>
<li><a href="#" id="btnSpecials" tabindex="4" class="blue">Specialties </a></li>
</ul>
</div>
```
There are mysterious Bullet Points appearing in the Buttons. Where are they coming from?

|
JQuery Scroll-To Tabs to Remove UL Bullets
|
CC BY-SA 3.0
| null |
2011-05-23T23:42:03.277
|
2011-05-24T01:21:09.560
|
2011-05-24T01:21:09.560
| 598,931 | 598,931 |
[
"css"
] |
6,104,548 | 1 | 6,104,639 | null | 17 | 16,503 |
I'm trying to figure out this eclipse aptana plugin (coming from a visual studio background). When I try to debug my project as follows:

It throws this error:
`Unable to find 'rdebug-ide' binary script. May need to install 'ruby-debug-ide' gem, or may need to add your gem executable directory to your PATH (check location via 'gem environment').`
This is `gem environment`:
```
RubyGems Environment:
- RUBYGEMS VERSION: 1.5.2
- RUBY VERSION: 1.9.2 (2011-02-18 patchlevel 180) [i386-mingw32]
- INSTALLATION DIRECTORY: C:/Ruby192/lib/ruby/gems/1.9.1
- RUBY EXECUTABLE: C:/Ruby192/bin/ruby.exe
- EXECUTABLE DIRECTORY: C:/Ruby192/bin
- RUBYGEMS PLATFORMS:
- ruby
- x86-mingw32
- GEM PATHS:
- C:/Ruby192/lib/ruby/gems/1.9.1
- C:/Users/Lol/.gem/ruby/1.9.1
- GEM CONFIGURATION:
- :update_sources => true
- :verbose => true
- :benchmark => false
- :backtrace => false
- :bulk_threshold => 1000
- REMOTE SOURCES:
- http://rubygems.org/
```
The server can be started, I can go to localhost:3000 and it loads. But I dont understand this error or how to get debugging started. Any idea what is wrong?
PS. Coming from an asp.net mvc background, I can right click controllers folder and add controller. Then right click an action and generate a view for it. Can I not do this in ruby on rails development?
|
How to debug ruby on rails in eclipse aptana plugin
|
CC BY-SA 3.0
| 0 |
2011-05-24T00:27:44.693
|
2011-12-22T20:33:45.623
| null | null | 400,861 |
[
"ruby-on-rails",
"ruby",
"eclipse",
"aptana"
] |
6,104,842 | 1 | 6,104,891 | null | 2 | 2,452 |
I have an UL with ListItems containing AnchorTags.
These Anchor Buttons should have Borders, depending on the click event.
However in IE and Firefox- when the Anchor is clicked it automatically puts this dashed-border surrounding the Button. You have to click away from it in order for that Border to dissapear:

Here is a Fiddle and you can see what Im talking about: [http://jsfiddle.net/NinjaSk8ter/ZSeFA/](http://jsfiddle.net/NinjaSk8ter/ZSeFA/)
Is there a fix for this?
|
Remove the AnchorTag IE Border
|
CC BY-SA 3.0
| null |
2011-05-24T01:26:14.710
|
2011-05-24T01:35:41.993
| null | null | 598,931 |
[
"html",
"css"
] |
6,104,927 | 1 | null | null | 2 | 313 |
I have a UITabBarController like this:

I want iads to be displayed right above the tab bar throughout the app. Rather than adding iads to individual view controller (there are like 15-20 view controller), is there a way I can add it to the tab bar itself once, and it will be displayed on top of the tab bar in every view?
Thanks
|
iads in uitabbarcontroller
|
CC BY-SA 3.0
| 0 |
2011-05-24T01:43:17.807
|
2014-07-10T06:54:57.433
| null | null | 635,064 |
[
"objective-c",
"cocoa-touch",
"uiviewcontroller",
"uitabbarcontroller",
"iad"
] |
6,104,963 | 1 | 6,106,335 | null | 16 | 4,264 |
What's the "correct" way of exactly placing and moving views when an app rotates? That is, how can I have fine-grained control of the position, size, and reflow of my views when the UI rotates from portrait to landscape orientation (or vice-versa)? I think my two options are:
1. Use two superviews (portrait and landscape). On rotation: toggle between them.
2. Use one superview. On rotation: change each subview's frame, bounds, and center properties.
If you have two views with distinct enough layouts and elements, then the first way might be good enough. If your two views are essentially the same thing sized for different orientations, the second way is probably a better way to do it using only one view.
I suspect the former could be done with IB and the latter should be done programmatically.

|
Placing and Moving Views on Rotation (UIView)
|
CC BY-SA 3.0
| 0 |
2011-05-24T01:50:44.643
|
2011-05-26T09:14:54.990
|
2011-05-24T02:32:49.117
| 203,104 | 203,104 |
[
"iphone",
"objective-c",
"ios",
"ipad",
"uiview"
] |
6,105,157 | 1 | 6,287,156 | null | 0 | 520 |
At a great number of requests from people using older iOS hardware, I'm currently refactoring and optimizing my app so it will work on iOS 3. That being said I've got a glitch with my UITabBar that I can replicate on all of the iPhone 3G units I've tested it on.
The glitch appears to have been fixed in iOS 4, but I was wondering if before that time, anyone else had this glitch as well and had figured out a (relatively elegant) workaround for it.
The problem is what you can see below; when a memory warning occurs and all of the views offscreen are released, when I bring a view controller with a tab bar back on screen, all of the UITabBarItems that are supposed to be in it are gone. As far as I can see, they're not being drawn at all; ie tapping the tab bar has no effect. After setting breakpoints and examining the UITabBar and its items in memory, they're all still there (ie not getting released), just that they're not getting redrawn when the UITabBar is re-created in the controller loadView method.
My app works similar to the official Twitter app in that I implemented my own version of UITabBarController so I could control the integration of it with a parent UINavigationController properly. I set it up as closely as possible to the original UITabBarController class though, with all of the child view controllers handling their own respective UITabBarItems and initializing them inside the class' init methods. Once the child view controllers are passed to my TabController object via an accessor method, the tabBarItems are accessed and added to the UITabBar view.
Has anyone seen this behaviour before and know of a way I can fix it? I'm hoping there's a really simple fix for this since it already works in iOS 4, so I don't want to hack it up too badly.
Thanks a lot!

|
iOS 3 - UITabBarItems disappear from UITabBar after a memory warning occurs
|
CC BY-SA 3.0
| null |
2011-05-24T02:38:07.603
|
2011-10-27T15:33:27.700
| null | null | 599,344 |
[
"cocoa-touch",
"ios",
"uikit",
"uitabbar",
"uitabbaritem"
] |
6,105,669 | 1 | 6,105,730 | null | 5 | 773 |
I admit I have no deep understanding of D at this point, my knowledge relies purely on what documentation I have read and the few examples I have tried.
In C++ you could rely on the RAII idiom to call the destructor of objects on exiting their local scope.
Can you in D?
I understand D is a garbage collected language, and that it also supports RAII.
Why does the following code not cleanup the memory as it leaves a scope then?
```
import std.stdio;
void main() {
{
const int len = 1000 * 1000 * 256; // ~1GiB
int[] arr;
arr.length = len;
arr[] = 99;
}
while (true) {}
}
```
The infinite loop is there so as to keep the program open to make residual memory allocations easy visible.
A comparison of a equivalent same program in C++ is shown below.

It can be seen that C++ immediately cleaned up the memory after allocation (the refresh rate makes it appear as if less memory was allocated), whereas D kept it even though it had left scope.
Therefore, when does the GC cleanup?
|
D Dynamic Arrays - RAII
|
CC BY-SA 3.0
| null |
2011-05-24T04:23:34.707
|
2014-03-19T07:42:17.027
|
2014-03-19T07:42:17.027
| -1 | 431,528 |
[
"memory-management",
"garbage-collection",
"d",
"raii"
] |
6,105,864 | 1 | 6,105,938 | null | 0 | 1,304 |
How can i move a progress bar value( i am simulating a car mph circular gauge using a progress bar) in accordance to a listbox value or combobox value? I am using a rectangle for the needle.
I can do it with a scroll bar( the value of the scrollbar makes the needle move) which is the code i will show. Instead of the value of the scroll bar i want to be able to have various speeds set in a listbox, combobox and when selected the progress bar / rectangle will move to that value.
Can this be done?
i will only show the code i think you need to see..
here is a pic of what i am talking about:

```
<Window.Resources>
<ControlTemplate x:Key="templateSpeedometer"
TargetType="ProgressBar">
<ControlTemplate.Resources>
<Style TargetType="Line">
</Style>
</ControlTemplate.Resources>
<Canvas Width="0" Height="0"
RenderTransform="1 0 0 1 0 50" Background="#FFF50D0D">
<Rectangle Name="PART_Track" Width="180" />
<Rectangle Fill="Black" Name="PART_Indicator" />
<Polygon Points="5 2 5 -5 -75 0"
Stroke="Black" Fill="Gold">
<Polygon.RenderTransform>
<RotateTransform
Angle="{Binding ElementName=PART_Indicator,
Path=ActualWidth}" />
</Polygon.RenderTransform>
</Polygon>
</Canvas>
</Border>
</ControlTemplate>
</Window.Resources>
<Grid x:Name="LayoutRoot">
<StackPanel>
<Grid Height="216" Name="grid1" Width="612">
<ScrollBar Name="scroll" Orientation="Horizontal" Minimum="0" Maximum="100" SmallChange="1" LargeChange="10" Margin="8,235,4,-36" />
<Border Background="#FF5EB6D8" CornerRadius="25" Height="247" VerticalAlignment="Top" Margin="13,5,27,0">
<ProgressBar Background="#FFD6E1E5" Margin="4,8,0,112" Maximum="100" Minimum="0" Template="{StaticResource templateSpeedometer}" Value="{Binding ElementName=scroll, Path=Value}" BorderBrush="#FF5EB6D8" OpacityMask="White" HorizontalAlignment="Left" Width="281" BorderThickness="5,1,1,1" Orientation="Vertical"/>
</Border>
```
|
wpf progress bar bind to a listbox value
|
CC BY-SA 3.0
| 0 |
2011-05-24T05:00:04.000
|
2018-08-25T20:33:26.343
|
2018-08-25T20:33:26.343
| 563,088 | null |
[
"wpf",
"xaml"
] |
6,106,334 | 1 | 6,106,430 | null | 2 | 2,764 |
I added the following code in my subclass, it shows something like in the screen shot, which is like a radio button, can select/deselect it. Selected button does have red-colored tick symbol. What is the button meant for?
```
- (UITableViewCellEditingStyle)tableView:(UITableView *)tableView editingStyleForRowAtIndexPath:(NSIndexPath *)indexPath {
return UITableViewCellEditingStyleDelete | UITableViewCellEditingStyleInsert;
}
```

|
Editing Style of UITableView - Add/Delete
|
CC BY-SA 3.0
| 0 |
2011-05-24T06:03:29.407
|
2011-05-24T12:03:33.797
|
2011-05-24T12:03:33.797
| 295,508 | 510,480 |
[
"iphone",
"objective-c",
"uitableview"
] |
6,106,353 | 1 | 6,107,488 | null | 4 | 19,584 |

I can't figure myself best way to do this header of site with login form on right
Light grey pattern is only background for header (85px tall container), body background white
I did the dark line with
```
html {
border-top:7px solid #505559;
}
```
i centered the container like this
```
#header_container {
margin:0 auto;
width:970px;
}
```
Size of the logopic 197x45 and size of submit button 79x28
The form elements should be attached to right side of container
How would you align the submit button with bottom of white textfield
I would also want to see how you would place the html form element so i didn't add my own fail code
------- html code
```
<header>
<div id="header_holder">
<h1>logopic</h1>
<div id="login">
<form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post">
<div id="username">
<label for="username">Username</label>
<input type="text" name="username" maxlength="60">
</div>
<div id="password">
<label for="pass">Password</label>
<input type="password" name="pass" maxlength="10">
<input type="image" src="img/kirjaudu.png" alt="Submit button">
</div>
</form>
</div>
</div>
</header>
```
|
CSS + HTML Header with login form
|
CC BY-SA 4.0
| 0 |
2011-05-24T06:06:19.860
|
2019-05-23T19:10:45.040
|
2019-05-23T19:10:45.040
| 6,296,561 | 767,183 |
[
"html",
"css"
] |
6,106,461 | 1 | null | null | 0 | 137 |
Hey Folks, I am a newbie to Illustrator and flash. Here I have two objects; background and highlight. Highlight has a certain amount a opacity set to it 45%, so it appears lighter then the background. I want to color just the background in as3/flash builder 4, but when I color the flash symbol, the highlight region also gets colored and I don't want to do that. I also don't want to have two separate symbols, because then I'll have to add more code and variables.
Is there any way to color just the background and let the highlight object just be?

I hope I've conveyed myself well.
|
Coloring flash symbols with two objects
|
CC BY-SA 3.0
| null |
2011-05-24T06:19:39.670
|
2011-12-04T00:41:25.623
|
2011-12-04T00:41:25.623
| 84,042 | 630,623 |
[
"flash",
"apache-flex",
"actionscript-3",
"flash-builder",
"flash-cs3"
] |
6,106,484 | 1 | 6,106,880 | null | 8 | 729 |
Is there a Delphi component similar to the one Outlook uses
to show the attachments ?

I'm D2006. So I'm not familiar
with any of the new Delphi
components yet.
Thanks !
|
Delphi component similar to Outlook's to display attachments
|
CC BY-SA 3.0
| 0 |
2011-05-24T06:21:30.340
|
2011-05-24T07:05:12.240
| null | null | 129,663 |
[
"delphi"
] |
6,106,893 | 1 | 6,109,530 | null | 1 | 2,311 |
I would like to propose a simple way for a user to change to color of a png file (for example showing a color palette and show a live preview of the result).
My graphic designer sends me the same UI elements with just the color changing, so what file should I ask from him ? Something like a white-shade only png ?
For example (the images are not 100% similar, but you get the idea : a light line followed by a gradient from lighter to darker, and lastly a dark line) :


I would prefer a generic png on which I could apply a mask or something programmatically
|
Color mask on a png file
|
CC BY-SA 3.0
| null |
2011-05-24T07:07:09.523
|
2011-05-24T11:13:26.780
| null | null | 123,011 |
[
"javascript",
"css",
"png",
"alpha"
] |
6,106,907 | 1 | 6,107,212 | null | 0 | 3,933 |
Having seen [this interpreter comparison graph](http://engineering.twitter.com/2011/05/faster-ruby-kiji-update.html), I wondered the reasons behind the MRI's mainstream usage, although it performs the worst. Why aren't [Kiji](http://engineering.twitter.com/2011/03/building-faster-ruby-garbage-collector.html) or [Ruby Enterprise Edition](http://blog.phusion.nl/2011/02/21/ruby-enterprise-edition-1-8-7-2011-02-released/) used more frequently; lack of gem support or something else?

For instance, Ruby Enterprise Edition is chosen by some of the most popular companies, thanks to its [copy-on-write feature](http://www.modrails.com/documentation/Users%20guide%20Nginx.html#_how_it_works); I wonder if any other interpreter implements it.
> REE can be easily installed in
parallel to your existing Ruby
interpreter, allowing you switch to
REE with minimal hassle or risk. REE
has been out for several years now and
is already used by many high-profile
websites and organizations, such as
, , and
.“We switched to enterprise ruby to get
the full benefit of the
[copy-on-write] memory characteristics
and we can absolutely confirm the
memory savings of 30% some others have
reported. This is many thousand
dollars of savings even at today’s
hardware prices.”
|
Why is MRI the mainstream Ruby interpreter, while it performs the worst?
|
CC BY-SA 3.0
| 0 |
2011-05-24T07:08:49.043
|
2013-04-04T07:38:50.520
|
2011-05-24T08:33:50.860
| 12,652 | 12,652 |
[
"ruby-on-rails",
"ruby",
"interpreter",
"ruby-enterprise-edition"
] |
6,107,108 | 1 | 6,108,026 | null | 13 | 11,641 |
I have an application that is going to be used on a touch screen system, and it contains a number of buttons that are fairly large (~100px square).
Each button will have between 1 and 4 lines of text (typically one word per line).
Due to the large amount of padding in the button, I'm having to reduce the size of the text so that it becomes almost unreadable, however if I was able to reduce the internal padding so that the text would paint right up to the border, then I wouldn't have a problem.
I've attempted to reduce the padding of the control down to zero as follows, but it doesn't help.
```
this.Text = _label;
this.Font = new Font(this.Font.FontFamily, (float) _size);
this.Padding = new Padding(0);
```
An example of the problem is shown below:

As you can see there is plenty of space for the word 'OVERVIEW' to fit on one line, but how can I achieve this without reducing the font size? I don't relish the thought of having to rewrite the control's text painting code.
Edit: I've noticed that increasing the padding to various values as high as 300, makes no difference to the internal padding of the control. Also for information, the button I'm using is a control I've inherited from the Windows.Forms.Button class, as I need to add a few properties, however I haven't interfered with any of the Button's own methods.
|
Reduce Padding Around Text in WinForms Button
|
CC BY-SA 3.0
| 0 |
2011-05-24T07:30:24.017
|
2019-06-07T18:54:50.523
|
2020-06-20T09:12:55.060
| -1 | 142,914 |
[
".net",
"winforms",
"button",
"fonts",
"paint"
] |
6,107,465 | 1 | 6,107,981 | null | 45 | 122,662 |
I want to remove datepicker function depending on the dropdownlist selected value. I try the following codes, but it still shows the calendar when I put the cursor in the text box. Please give me a suggestion.
```
$("#ddlSearchType").change(function () {
if ($(this).val() == "Required Date" || $(this).val() == "Submitted Date") {
$("#txtSearch").datepicker();
} else {
$("#txtSearch").datepicker("option", "disabled", true);
}
});
```

|
Remove Datepicker Function dynamically
|
CC BY-SA 3.0
| 0 |
2011-05-24T08:09:29.197
|
2018-03-15T11:18:37.377
|
2014-01-21T09:23:49.940
| 87,015 | 296,074 |
[
"javascript",
"jquery",
"jquery-ui",
"jquery-ui-datepicker"
] |
6,107,717 | 1 | 6,109,124 | null | 2 | 660 |
So people I seldom have trouble programming and implementing HTML templates with CSS for IE6 and all the other browsers. But this time this is breaking my head.
The issue is compatibility for IE6 (I'm using the YAML framework.)
So, lets get on with it. This is the culprit code:
HTML
```
<div class="info">
<div>
<div class="float_left">
<img alt="aktuelles bild" src="images/dummy_aktuelles.gif" />
<span>26.10 - 27.10.2010</span>
<span>xxx xxx</span>
<span>(Flughafen)</span>
</div>
<div class="lastObject">
<span>09.09.2010 Offenes-Presseportal</span>
<span class="lastObject">Global Connect 2010 - Globalisierung für den Mittelsand</span>
<p>
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aliquam leo.
</p>
</div>
</div>
</div>
```
CSS
```
#main .aktuelles .info {
padding:15px;
overflow:hidden;
border-bottom: 1px #949494 dotted;
}
#main .aktuelles .info .float_left {
width:35%;
}
#main .aktuelles .info .float_left span {
padding-bottom: 5px;
display: block;
color: #333;
font-size: 13px;
}
#main .aktuelles .info .float_left img {
padding-bottom: 5px;
}
#main .aktuelles .info div .lastObject span {
color:#2d2d2d;
font-size: 12px;
display: block;
padding-bottom: 5px;
}
#main .aktuelles .info div.lastObject span.lastObject {
color: #2d2d2d;
font-size: 14px;
display:block;
padding: 0 0 5px 0 !important;
}
#main .aktuelles .info div lastObject p {
font-size: 12px;
}
```
Now the first div that is floating to the left doesn't appear at all. It is underlying the background of lastObject. The parent container of the info div has no position whatsoever.
Any suggestions?
This is an image of what is wrong:

It seems the problem is not related to this code. but I dont have any other ideas. I also tried altering the z index but it evidently wont work since its not a background image it is the background color.
|
Problem with background-color hiding floated content in IE6
|
CC BY-SA 3.0
| 0 |
2011-05-24T08:33:14.557
|
2014-11-08T22:59:41.067
|
2014-11-08T22:59:41.067
| 1,149,495 | 582,829 |
[
"html",
"css",
"internet-explorer",
"internet-explorer-6",
"yaml-css"
] |
6,107,748 | 1 | 6,107,926 | null | 0 | 555 |
Why this DataGridView control has a gray strips? How can I overcome this problem?

|
Why DataGridView has gray strips?
|
CC BY-SA 3.0
| null |
2011-05-24T08:35:39.277
|
2011-05-24T08:51:57.550
| null | null | 603,019 |
[
"c#",
".net",
"winforms",
"datagridview"
] |
6,107,923 | 1 | 6,108,101 | null | 2 | 551 |
im learning wpf for the first time,
i have made this far
```
private void Button_Click(object sender, System.Windows.RoutedEventArgs e)
{
// TODO: Add event handler implementation here.
}
```
lets say its my click button 'home' some how i have made a new window store.xaml at the same product.
heres a sc

|
Click to new window.xaml
|
CC BY-SA 3.0
| null |
2011-05-24T08:51:37.997
|
2011-11-26T23:10:49.463
|
2011-11-26T23:10:49.463
| 546,730 | 320,486 |
[
"c#",
"wpf"
] |
6,107,930 | 1 | 9,877,315 | null | 11 | 5,030 |
When attaching several Android devices to my development machine, it quickly becomes difficult to determine which device is which from Eclipse, because the device names appear to be represented as their serial numbers.
For instance, the Devices list:

Is there any way to display the phone model, or to change the device name?
|
Changing displayed Android device name in Eclipse
|
CC BY-SA 3.0
| 0 |
2011-05-24T08:52:07.450
|
2012-03-26T18:04:46.493
| null | null | 154,306 |
[
"android",
"eclipse",
"device"
] |
6,108,032 | 1 | null | null | 2 | 679 |
I have an application where, beyond my control, several Windows Forms have a TransparencyKey property set. When these windows cover (are in front of) another form which has a DirectDraw video surface, the foreground form flickers (partly showing the form and partly showing the video beneath). The thing is, the color of the TransparencyKey doesn't appear anywhere in the application, so NOTHING should be transparent... in other words, the result should be that the foreground form is completely opaque.

Does anyone have experience with DirectDraw surfaces flickering when combined with Windows Forms that are in some form or other set up to be transparent? I've worked on this for weeks, with no success. Thanks!
|
"Transparent" Windows Form flickers when in front of DirectDraw Video Surface
|
CC BY-SA 3.0
| 0 |
2011-05-24T09:00:22.450
|
2011-05-24T09:23:17.887
| null | null | 745,324 |
[
"c#",
"winforms",
"transparency",
"directdraw"
] |
6,108,051 | 1 | 6,297,608 | null | 5 | 784 |
I'm developing a simple Blogging/Bookmarking platform and I'm trying to add a feature a là [delicious](http://www.delicious.com/tag/) to allow users to filter the posts specifying a list of specific tags.
Something like this:

Posts are represented in the datastore with this simplified model:
```
class Post(db.Model):
title = db.StringProperty(required = True)
link = db.LinkProperty(required = True)
description = db.StringProperty(required = True)
tags = db.ListProperty(str)
created = db.DateTimeProperty(required = True, auto_now_add = True)
```
Post's tags are stored in a [ListProperty](http://code.google.com/intl/it/appengine/docs/python/datastore/typesandpropertyclasses.html#ListProperty) and, in order to retrieve the list of posts tagged with a specific list of tags, the Post model exposes the following static method:
```
@staticmethod
def get_posts(limit, offset, tags_filter = []):
posts = Post.all()
for tag in tags_filter:
if tag:
posts.filter('tags', tag)
return posts.fetch(limit = limit, offset = offset)
```
This works well, although I've not stressed it too much.
The problem raises when I try to add a "sorting" order to the `get_posts` method to keep the result ordered by `"-created"` date:
```
@staticmethod
def get_posts(limit, offset, tags_filter = []):
posts = Post.all()
for tag in tags_filter:
if tag:
posts.filter('tags', tag)
posts.order("-created")
return posts.fetch(limit = limit, offset = offset)
```
The sorting order adds an index for each tag to filter, leading to the dreaded problem.
One last thing that makes this thing more complicated is that the `get_posts` method should provide some pagination mechanism.
Do you know any Strategy/Idea/Workaround/Hack to solve this problem?
|
Sorting entities and filtering ListProperty without incurring in exploding indexes
|
CC BY-SA 3.0
| 0 |
2011-05-24T09:01:58.247
|
2011-06-14T13:00:54.817
|
2011-06-05T18:10:05.273
| 130,929 | 130,929 |
[
"python",
"google-app-engine",
"indexing",
"google-cloud-datastore",
"explode"
] |
6,108,257 | 1 | 6,116,981 | null | 1 | 1,278 |
Hi how to draw a line with numbers and the tick intervals as in a measuring scale. some thing like this image 
|
To Draw a measuring scale like UI in actionscript
|
CC BY-SA 3.0
| null |
2011-05-24T09:16:58.623
|
2011-05-24T21:15:38.577
|
2017-02-08T14:32:16.523
| -1 | 529,393 |
[
"actionscript",
"scale",
"draw"
] |
6,108,788 | 1 | 6,149,504 | null | 0 | 612 |
I'm trying to use the AFOpenFlowView in landscape mode, but I get a black stripe as if the frame was set not go over the status bar or, better, not over the frame where the status bar is in portrait mode.
Here's the code I'm using:
```
CGRect applicationFrame = [[UIScreen mainScreen] bounds];
AFOpenFlowView *af = [[AFOpenFlowView alloc] initWithFrame:CGRectMake(0, 0, applicationFrame.size.height, applicationFrame.size.width)];
[af setBackgroundColor:[UIColor whiteColor]];
NSString *imageName;
for (int i = 0; i < 9; i++) {
imageName = [[NSString alloc] initWithFormat:@"picture_%d.png", i];
[af setImage:[UIImage imageNamed:imageName] forIndex:i];
[imageName release];
}
[af setNumberOfImages:9];
[af setViewDelegate:self];
[self setView:af];
[af release];
```
Here's an image to show what happens:

|
OpenFlow: how to set the frame to show properly in landscape mode?
|
CC BY-SA 3.0
| null |
2011-05-24T10:05:58.870
|
2011-05-27T08:09:39.110
| null | null | 579,717 |
[
"iphone",
"coverflow"
] |
6,108,921 | 1 | 6,109,034 | null | 1 | 155 |
I have a ASP Net project of the type Windows Service.
When I build that project an exe file is generated.
Now I also have another project os the type Web Service, that uses classes from the previous Windows Service project.
When I build the Web Service, on it's bin/debug folder, the Windows Service exe is there, instead of a DLL.
This way, when I deploy the Web Service on ISS, I get an exception when the part of the code that instatiates a class on the Windows Service project is executed.
The only whay I found to solve this issue, is to make the output type of the Windows Service to DLL instead of EXE, and the Web Service runs correctly.
But, of course, when I try to install the Windows Service, I get this error:

Can I even do this?
|
Reuse Windows Service classes
|
CC BY-SA 3.0
| null |
2011-05-24T10:15:47.490
|
2011-05-24T10:25:56.007
| null | null | 575,458 |
[
"asp.net",
"windows",
"web-services"
] |
6,109,035 | 1 | 6,109,367 | null | 11 | 4,735 |
I'd like to put some buttons between two resizable panels or directly on the splitter if possible. How do I achieve they will move along with the splitter; how do I anchor them ?

Maybe the most important thing I forgot to mention. That splitter has to be as wide as on the screenshot, and the buttons should lay on it; so those buttons are actually "floating over splitter" now.
Thanks a lot
|
How to create splitter containing components?
|
CC BY-SA 3.0
| 0 |
2011-05-24T10:25:57.527
|
2012-10-22T09:32:21.350
|
2020-06-20T09:12:55.060
| -1 | null |
[
"delphi",
"delphi-2009",
"splitter"
] |
6,109,088 | 1 | null | null | 0 | 543 |
Wih the following model setup:
```
class Cat(models.Model):
claw = models.CharField(max_length=20)
name = models.CharField(max_length=20)
class Fur(models.Model):
type = models.CharField(max_length=20)
cat = models.ForeignKey(Cat)
class Meta:
db_table=u'cat_view'
managed=False
```

Fur has a foreign key to Cat. CatView is a subset view of Cat that is being managed manually. Is there a way to make use of django's useful reverse set methods with this setup?
Additionally, I could just use Fur.objects.filter(cat_id=cat_view.id, ...) which would be the same functionality as cat_view.fur_set.filter(...), however I could not do reverse lookups such as CatView.objects.filter(fur__type="shaggy").
EDIT:
Added example models file, changed image for clarity, added minor complexity to question.
|
Reverse foreign key sets for a model view
|
CC BY-SA 3.0
| null |
2011-05-24T10:31:17.207
|
2011-05-24T11:42:28.607
|
2011-05-24T11:42:28.607
| 717,583 | 717,583 |
[
"django",
"orm"
] |
6,109,186 | 1 | null | null | 1 | 1,416 |

How can i draw path with translucent (semi-transparent) band on canvas (method onDraw in my custom View)? I draw path line by bezier curve (method path.quadTo), but i want to around the line was illuminated translucent band?
I tried several approaches:
1. Try draw path by paint with semi-transparent color 0x8800ff00.
2. Try use paint.setShader(new BitmapShader(semi-transparent background image)) and draw path by this paint;
But they did not help. There was no effect of translucency.
|
draw path with translucent (semi-transparent) band
|
CC BY-SA 3.0
| null |
2011-05-24T10:42:14.873
|
2011-08-01T12:16:23.347
|
2011-05-24T10:53:41.720
| 767,505 | 767,505 |
[
"android",
"path",
"transparency",
"draw"
] |
6,109,364 | 1 | null | null | 11 | 3,832 |
Apparently the .NET monthcalendar renders differently on different platforms. A calendar on Vista is wider than a XP calendar.
I want to make the calendar fit nicely and precise on all platforms.
Is there a way to do this, without having to measure and hard code the different widths ?
..............
Edit/Correction :
The calendar seems to render differently based on the theme you select :

How to compensate for that ?
|
MonthCalendar width on different (platforms), correction: themes (XP vs Aero theme)
|
CC BY-SA 3.0
| 0 |
2011-05-24T10:58:42.360
|
2014-10-20T07:46:15.900
|
2011-05-26T12:48:34.340
| 171,953 | 171,953 |
[
"c#",
".net",
"windows",
"winforms",
"controls"
] |
6,109,500 | 1 | null | null | 0 | 225 |
I don't know how to access the value from a subtable "Produkt"

I have a datagridview which uses the Datasource from the LINQ result from the picture.
The columns from maintable are displayed correctly, but for the subtable "Produkt" I can't reach the Name Column value.
If I Use "Produkt" in the DataPropertyName the Result is:
```
{ContainerDB.tbl_Produkt}
```
with Produkt.Name nothing is displayed.
Any Ideas?
|
Getting Column from Joined Subtable in LINQ
|
CC BY-SA 4.0
| null |
2011-05-24T11:10:55.580
|
2021-05-09T16:21:47.693
|
2021-05-09T16:21:47.693
| 214,143 | 609,671 |
[
"vb.net",
"linq-to-sql",
"datagridview"
] |
6,109,649 | 1 | 6,110,054 | null | 0 | 279 |
I'm working on a project with VS2010 and VSS 2005 for 3 months now. Usually I use command Gel latest from VS2010 and I get updated code files. Today since there was some issue in getting latest file I used Get latest command from VSS directly, attached screenshot with options I selected while getting latest.
After this my code is not compiling at all hundreds of errors coming. Since the errors are related with permission I manually removed 'Read Only' attribute of Bin and Obj folders and then my code compiled, no error. But then VS2010 doesn't prompt out nor check out files if I do any changes in the code files.
How to resolve this?
> Error 156 Unable to copy file "obj\Debug\BusinessObjects.dll" to "bin\Debug\BusinessObjects.dll". Access to the path 'bin\Debug\BusinessObjects.dll' is denied. Business Objects
|
VSS 2005 issues
|
CC BY-SA 3.0
| null |
2011-05-24T11:25:25.617
|
2011-05-24T11:59:58.407
| null | null | 287,100 |
[
"asp.net",
"visual-studio-2010",
"visual-sourcesafe"
] |
6,109,665 | 1 | 6,125,405 | null | 1 | 144 |
I am using CodeRush Xpress and found that I cannot write a plugin using IssueProvider from this [page (end of third paragraph)](http://www.drrandom.org/2009/10/07/GettingACodeRushInsideACodeRushCodeIssue.aspx). Now I am using codeProvider to write simple plugins using CodeRush Xpress.
With CodeProvider I can only show the notification with these 3 dots.
I wanted to show the errors by
1.) Underling the code and
2.) Providing a URL in the hint box (So that the user can click this URL to know more about the problem).
Is there a way to underline the code in coderush Xpress. And also any ways to provide links in the hint box.
Some links or some lines of code used to underline would be helpful.
Thanks in Advance.
|
Features in CodeRush Xpress for writing plugins
|
CC BY-SA 3.0
| null |
2011-05-24T11:26:57.587
|
2011-05-25T13:48:13.447
|
2011-05-24T11:38:25.210
| 706,325 | 706,325 |
[
"plugins",
"coderush",
"coderush-xpress"
] |
6,109,796 | 1 | 10,145,205 | null | 0 | 179 |
I'm trying to implement Sparkle into my project and it works fine, but I have one problem:
I can't get these bindings to work (automaticallyCheckForUpdates etc.).
I added a check button, as the documentation described, but when I bind to Updater (which is an object in my nib) the Model Key Path doesn't recognize the methods:

I set up Updater to be from the class SUUpdater and also my NSButton ("Check For Updates") works fine (linked to Updater-object)...
Also the settings appear in my plist correctly so what am I doing wrong?
|
Sparkle - binding doesn't work
|
CC BY-SA 3.0
| null |
2011-05-24T11:39:09.280
|
2014-07-05T08:46:21.703
|
2014-07-05T08:46:21.703
| 343,845 | 531,222 |
[
"objective-c",
"xcode",
"sparkle"
] |
6,110,008 | 1 | null | null | 1 | 1,963 |
I am using a List Grid in my application. Each cell of the list grid can contain images and hyper links. the number of images and hyperlinks will be determined at run time. I have made the first column to be frozen. The List grid takes a lot of time to get loaded and also it takes a lot of time when I scroll horizontally. I tried using a canvas and setting image and anchor html tags as per [this](https://stackoverflow.com/questions/2154881/smartgwt-slow-images-rendering/). Still I am facing the same issue. ![The left most column [Time] is frozen and the no. columns to its right is arbitary. also, the cell can contain upto 16 vertical bars differentiated by colours](https://i.stack.imgur.com/35CVm.png)
Updated: Initially, I got a warning asking me to setRecordComponentHeight since i have overridden the record component. Now, I have set that but still I have issues with the row height. The warning is not displayed now.

Any help will be really useful.
|
Problem with Listgrid in smart gwt
|
CC BY-SA 3.0
| null |
2011-05-24T11:56:20.973
|
2011-09-06T12:32:52.697
|
2017-05-23T12:01:16.000
| -1 | 566,597 |
[
"image",
"rendering",
"smartgwt"
] |
6,110,037 | 1 | null | null | 8 | 938 |
I'm using [RaphaelJS](http://raphaeljs.com/index.html) for visually representing some data. The underlying technology is SVG so obviously things don't always work that well in IE, but the library does a relatively ok job of still rendering something useful, although it often tends to look pretty poor.
In any case, I can't seem to get around this basic issue. Text is rendered fine in Chrome or FireFox, but everything renders as bold and italic in IE8.
To see my issue in action, go to [the RaphaelJS playground](http://raphaeljs.com/playground.html) and use the following code
```
paper.text(100, 100, "this is the text")
```
Here is the result in Chrome and IE.


Is there any workaround for this?
|
Raphaeljs renders all text as Italic in IE
|
CC BY-SA 3.0
| 0 |
2011-05-24T11:58:38.127
|
2012-12-18T09:30:12.520
|
2012-12-18T09:30:12.520
| 568,458 | 121,531 |
[
"internet-explorer",
"internet-explorer-8",
"svg",
"raphael",
"vml"
] |
6,110,063 | 1 | 6,110,128 | null | 1 | 1,266 |
This is a very simple question for many of you reading this, but it's quite new for me.
Here is a screenshot for my eclipse

When i run this program i get `java.io.FileNotFoundException: queries.xml (The system cannot find the file specified)` i tried `../../../queries.xml` but that is also not working. I really don't understand when to use `../` because it means go 1 step back in dir, and in some cases it works, can anyone explain this? Also how can I refer to queries.xml here. Thanks
Note: I might even use this code on a linux box
|
Path resolution in eclipse package structure
|
CC BY-SA 3.0
| null |
2011-05-24T12:00:53.047
|
2011-05-24T13:06:31.330
|
2011-05-24T12:13:30.100
| 707,414 | 707,414 |
[
"java",
"eclipse",
"groovy",
"xmlslurper"
] |
6,110,108 | 1 | 6,112,807 | null | 4 | 1,091 |
I have a custom component that has an background image.
But when you generate this component by an ItemRenderer in a List, the background image is gone.
What am I doing wrong?
Here is an image. The first element is not generated in a list and has a background image. The other three are part of a List and have no background image.

Here is the code of the MXML of the List
```
<mx:VBox>
<solutionItems:displaySolutionItem /> <!-- This element shows the background image -->
<mx:List selectable="false"
useRollOver="false"
id="listControllers"
backgroundAlpha="1"
dataProvider="{controllers}" >
<mx:itemRenderer>
<fx:Component>
<solutionItems:displaySolutionItem /> <!-- These elements have nog background image -->
</fx:Component>
</mx:itemRenderer>
</mx:List>
</mx:VBox>
```
And here is the code of `<solutionItems:displaySolutionItem />`
```
<?xml version="1.0" encoding="utf-8"?>
<mx:Canvas
xmlns:mx="http://www.adobe.com/2006/mxml"
backgroundImage="{itemBackGround}"
backgroundSize="100%">
<mx:Script>
<![CDATA[
[Bindable]
[Embed(source="assets/Components/ContainerBackgrounds/BoxBg.png", scaleGridLeft="5", scaleGridRight="50", scaleGridTop="5", scaleGridBottom="50")]
private var itemBackGround:Class;
]]>
</mx:Script>
<mx:VBox
paddingBottom="10"
paddingLeft="10"
paddingRight="10"
paddingTop="10">
<mx:CheckBox id="chbControllerItem" label="NSL-4601" styleName="titleRed" />
<mx:HBox>
<mx:Image width="67" height="50" id="loader1" source="@Embed(source='assets/Components/ContainerBackgrounds/BoxBg.png')"/>
<mx:HBox>
<mx:VBox>
<mx:Label text="Cube size" styleName="formLabel" height="12" />
<mx:Label text="Cube config" styleName="formLabel" height="12" />
<mx:Label text="Display res" styleName="formLabel" height="12" />
<mx:Label text="DPI" styleName="formLabel" height="12" />
<mx:Label text="Price" styleName="formLabel" height="12" />
</mx:VBox>
<mx:Box>
<mx:Label text="50''" height="12" />
<mx:Text text="2x3 (1224mm x 3264mm)" height="12" />
<mx:Label text="WXGA (1360x768)" height="12" />
<mx:Label text="72 dpi" height="12" />
<mx:Label text="€ 101.000,00" height="12" />
</mx:Box>
</mx:HBox>
</mx:HBox>
</mx:VBox>
</mx:Canvas>
```
It is probably something small, but I can not find it.
|
Flex: Backgroundimage not showing in list
|
CC BY-SA 3.0
| null |
2011-05-24T12:05:03.760
|
2017-10-31T11:04:56.883
|
2017-10-31T11:04:56.883
| 2,577,734 | 99,360 |
[
"apache-flex",
"actionscript-3",
"flash-builder"
] |
6,110,292 | 1 | 6,111,131 | null | 7 | 16,040 |
I'd like to to make 2 segments, something like this

the deparature segment will display the deparature fly in a tableView and the comeback segment the comeback fly . Can somene please explain me how should I do this? Should I make 2 tableView or just one? thank you
|
How to use UISegmentedControl with UITableView
|
CC BY-SA 3.0
| 0 |
2011-05-24T12:20:26.653
|
2017-04-14T12:03:08.217
|
2011-05-24T12:52:40.320
| 232,053 | 760,095 |
[
"iphone",
"objective-c"
] |
6,110,349 | 1 | 6,111,222 | null | 1 | 374 |
In x-code4 I want to make Adhoc version (.ipa file of the project)
but after build and archive when i press "Share" in organizer
it is not showing option for selecting ipa Package
previouly it was showing option when target was only ipohne


in other project i am able to select it as shown below


so what could be the problem ? what should I do to get option for making ipa file?
(i have also included coreplot-cocaTouch.xcodeproject to my app so it may creating problem?
in my project there are different xib fles for iphone and ipad so there are two targets in single project
)
|
iPhone App problem while creating AdHoc after adding new target for iPad
|
CC BY-SA 3.0
| 0 |
2011-05-24T12:25:33.427
|
2012-01-05T23:53:52.653
|
2011-05-25T07:36:13.777
| 531,783 | 531,783 |
[
"iphone",
"ios4",
"xcode4",
"ad-hoc-distribution"
] |
6,110,358 | 1 | null | null | 2 | 722 |
I just cannot find a solution as to why XNA is rendering my models incorrectly. On every model I've loaded with XNA 4.0 (X files and FBX files) it renders some of the faces which are supposed to be hidden/not visible. I've even tried the models that comes with the samples from the App Hubs site.
Here's a backbuffer dump of the device:

All of these models works perfectly fine in my other XNA 3.1 projects.
I've tried switching my project between reach and hidef. I've tried running different shader profiles. I've tried including tangents in the model or generating them in the processor, or even omitting it completely. I've also tried to render it using BasicEffect instead of my own shaders. And I've tried different draw calls (IndexedPrimitive vs UserIndexedPrimitive vs UserPrimitive). I've tried the various Cull options (yes, I actually exported my models again to try Right handed mesh and with flipping winding), Blend options etc. Now I'm all out of ideas...
Oh, I'm also on the latest DirectX release and NVidia release :)
Any suggestions?
|
XNA 4.0 back facing artifacts when rendering
|
CC BY-SA 3.0
| null |
2011-05-24T12:26:08.760
|
2012-01-13T16:25:58.347
|
2011-06-05T17:37:21.157
| 414,076 | 767,302 |
[
"xna",
"render"
] |
6,110,457 | 1 | 6,179,319 | null | 2 | 1,240 |
I want to know how the web page loading progress bar works in FF when there is no content-length present in the http headers. I checked with google.com, it does not send content-length header but the progress bar works correctly. Is it a real progress bar or a fake one? If this is a fake one then how I can build a similar one.
I am building a iPhone app where I need to build a similar loading progress bar.
@Robot Woods - I just searched "hello" on the google and I do see the progress bar at the bottom .. right now I am on Windows 7 and FF 3.6.13

Here is the response headers I am getting -

And I don't see any content length header...
How FF can generate a progress bar if the content length is not present.. ??
|
how loading progress bar works in Firefox when content-length is not present in headers
|
CC BY-SA 3.0
| 0 |
2011-05-24T12:33:27.350
|
2011-07-15T14:13:01.637
|
2011-07-15T14:13:01.637
| 127,880 | 303,073 |
[
"firefox",
"progress-bar",
"loading"
] |
6,110,618 | 1 | 6,110,712 | null | 0 | 408 |
Can any one point me to UI Guidelines/how to for twitter bottom bar

Help Appreciated.
|
How twitter has implemented the bottom bar for android
|
CC BY-SA 3.0
| null |
2011-05-24T12:45:15.493
|
2011-05-24T12:52:05.377
| null | null | 755,499 |
[
"android",
"android-layout",
"android-widget"
] |
6,110,809 | 1 | 6,110,907 | null | 2 | 3,375 |
I have an activity that extends MapActivity, and inside I have this code
```
GeoPoint point = new GeoPoint((int)(1.3*1E6),(int)(34.45*1E6));
final MapController mc;
mc.animateTo(point);
```
that animates, to that point, however, when it animates, the point is in the center of the screen, and I want it to be in a fixed (X,Y) position on the screen. Is there an mc.animatetoLeftBottom(point) function?
:
I used the
`Projection p = mapView.getProjection(); point = p.fromPixels(50, 60); mc.animateTo(point);`
pictures:
When I start the app, it looks like this :

After I tap once on the pin, it looks like this

And, if I tap again on the pin, it will look like this:

This is how it should look like, no matter where I tap it from, or if I scroll, zoom and then tap again:

What I want is for it to automatically move to that position(see last picture) when I tap the pin
|
How to animate to other position that center map
|
CC BY-SA 3.0
| 0 |
2011-05-24T12:59:58.290
|
2012-08-08T03:02:41.930
|
2012-08-08T03:02:41.930
| 1,023,783 | 700,088 |
[
"android",
"animation",
"controller",
"point",
"mapactivity"
] |
6,110,978 | 1 | 6,111,083 | null | 1 | 577 |
Can anybody help me with the jQuery plugin jqGrid? I downloaded [jqGrid 4.4.5](http://www.trirand.com/blog/?page_id=6) and I put in code
```
<script>
$(document).ready(function() {
jQuery("#list2").jqGrid({ url:'test.json', datatype: "json", colNames:['Inv No','Date'], colModel:[ {name:'id',index:'id', width:55}, {name:'date',index:'date', width:90}], rowNum:10, rowList:[10,20,30], pager: '#pager2', sortname: 'id', viewrecords: true, sortorder: "desc", caption:"USERS" }); jQuery("#list2").jqGrid('navGrid','#pager2',{edit:true,add:true,del:true});
});
</script>
```
I have in my html table
```
<table id="list2"></table>
<div id="pager2"></div>
```
and I have test.json like
```
[
{
"id": 3,
"date": ""
},
{
"id": 2,
"date": "1"
},
{
"id": 3,
"date": ""
}
]
```
but when I load page I don't get any data in grid just like on picture .
Can anybody point out what I'm doing wrong ?
|
JQuery grid doesn't show data - show empty grid
|
CC BY-SA 3.0
| null |
2011-05-24T13:12:42.813
|
2013-04-16T14:05:46.933
|
2013-04-16T14:05:46.933
| 1,430,996 | 755,306 |
[
"jquery",
"jquery-ui"
] |
6,111,257 | 1 | 6,111,500 | null | 0 | 81 |
I have a silverlight sample code that looks like this simple design of just an APP and a PAGE file. I want to recreate this sort of setup from scratch to create a project that ouputs a silverlight program yet it only has these couple of files along with some support files. I went through the creation of a number of Silverlight creations and none produced such a simple and small design. How do I create such a formation that is just an App and a Page and such a few additional files from scratch and still have it output as a silverlight app?

|
How do I recreate this design of silverlight?
|
CC BY-SA 3.0
| 0 |
2011-05-24T13:35:56.403
|
2011-05-24T14:01:06.477
|
2011-05-24T14:01:06.477
| 71,319 | 54,760 |
[
"silverlight"
] |
6,111,333 | 1 | 6,112,737 | null | 0 | 1,047 |
I'm developing a Qt application using the Qt Nokia SDK (Yes i know i can use the Qt SDK version 1.1.1, but i don't want to that right now because of tight schedule).
The application is finished and i have applied for UID's from OVI and received UID's, cert installer and developer cert/key pair for testing.
-I received these UID's:
```
UID# 0x200XXXX1
UID# 0x200XXXX2
UID# 0x200XXXX3
UID# 0x200XXXX4
UID# 0x200XXXX5
```
-I installed the cert installer on the test device
- Changed the build settings so that i use the certificate i received from OVI:- Changed the project file so that it takes use of the UID (This is a part of the .pro file)(See UID's):```
VERSION = 1.0.0
DEPLOYMENT.display_name=Project
DEPLOYMENT.installer_header = "$${LITERAL_HASH}{\"Project App Installer \"}, {0x2002CCCF}, 1,0,0"
symbian {
TARGET.UID3 = 0x200XXXX1
TARGET.CAPABILITY += NetworkServices \
ReadUserData \
WriteUserData \
ReadDeviceData \
WriteDeviceData
ICON = Icon-no-glare-tiny1.2.svg
TARGET.EPOCSTACKSIZE = 0x14000
TARGET.EPOCHEAPSIZE = 0x020000 0x800000
INCLUDEPATH += C:/NokiaQtSDK/Symbian/SDK/epoc32/include
LIBS += -LC:/NokiaQtSDK/Symbian/SDK_OK/epoc32/release/armv5/lib
LIBS += -lcone \
-leikcore \
-lavkon \
-letel3rdparty
```
}-
By doing this i wrap the application using the Nokia smart installer (Which is something i want), but when i try to install this on my test device i get the message
This happens only seconds after starting the installer, so i think it might be something wrong with the uid and Nokia smart installer.
-
Does anyone have a suggestion i can try? i'm desperate in getting this working now.
If any questions, please do not hesitate to ask.
|
Qt: How to fix deployment of Nokia Smart Installer?
|
CC BY-SA 3.0
| null |
2011-05-24T13:42:20.920
|
2011-05-24T15:16:50.917
|
2011-05-24T14:04:20.973
| 24,872 | 24,872 |
[
"qt",
"deployment",
"uid"
] |
6,111,417 | 1 | 6,112,831 | null | 4 | 1,827 |
I wonder if there any way to make compiler's output in IntelliJ IDEA more verbose. IDEA automatically sets up compiler to `ajc` from maven dependencies.

I assume that it can be not IntelliJ IDEA's problem. May be `ajc` needs additional arguments ?
Thanks.
|
Verbose AspectJ compiler output
|
CC BY-SA 3.0
| 0 |
2011-05-24T13:48:01.993
|
2019-08-26T08:35:44.993
|
2016-04-19T11:31:18.523
| 452,775 | 71,420 |
[
"ide",
"intellij-idea",
"aspectj"
] |
6,111,711 | 1 | 6,111,926 | null | 0 | 380 |
I have messed up with some of the settings in my XCode project and now when ever I try to find a text in project the finder window is coming as blank. I have quit my XCode and restarted my Mac multiple times but still this problem persists. This behavior is quite weird as it is happening only in a particular project and in rest of the project it is working fine. Please see the screen shot for the reference. 
|
Find in project window appearing blank in XCode Version 3.2.5
|
CC BY-SA 3.0
| null |
2011-05-24T14:08:10.300
|
2012-06-24T22:55:53.587
|
2012-06-24T22:55:53.587
| 918,414 | 188,517 |
[
"xcode",
"ios4",
"xcode3.2"
] |
6,111,747 | 1 | 6,113,949 | null | 2 | 882 |
Is it possible to have two controls on one page side-by-side in Silverlight? It seems very restrictive to have just one user control on just one page.
I am new to silverlight. But each page seems to have this "UserControl x:Class..." at the top of the main page XAML. So what if you want to have an app where there are two side-by-side that influences each other?
OK, it is not in the App, it is in the page.xaml. So I guess to explain further let me ask this. Is it possible to have two pages in onw app?
I am trying to have two prebuilt controls (a visi control and a vectorlight tree control) on the same page. The format of the app looks something like this:

So I want a tree view on the left side and the visi control on the right side of one app. Is this possible?
The tree view example has this user control code
```
<UserControl x:Class="TreeViewProgrammatic.Page"
xmlns="http://schemas.microsoft.com/client/2007"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:liquidTreeView="clr-namespace:Liquid;assembly=Liquid.TreeView"
Width="400" Height="300">
```
and the other control has a user control code like this:
```
<UserControl x:Class="LiveUpdate.Page"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Width="500" Height="340">
```
is there a way of having the two on one page.xaml?
|
Two usercontrols per page in silverlight?
|
CC BY-SA 3.0
| null |
2011-05-24T14:10:15.820
|
2011-05-24T16:50:54.290
|
2011-05-24T14:37:28.283
| 54,760 | 54,760 |
[
"silverlight"
] |
6,111,847 | 1 | 6,262,438 | null | 12 | 4,127 |
I have completed client side code by download sample from git for push notification in android.
After execute of app i got app-key and apid from server.
But when i opening the my account in Urban Airship,i found following data that said my app has not registered any application.
What to do now?Any help will be appreciated
|
how to register apid in urban airship for android?
|
CC BY-SA 3.0
| 0 |
2011-05-24T14:17:10.283
|
2014-08-20T21:04:56.870
|
2011-05-31T11:13:04.507
| 654,730 | 654,730 |
[
"android",
"urbanairship.com"
] |
6,112,156 | 1 | null | null | 0 | 981 |
i need to implement the android search ,my default values is a Arraylist and search result is cursor object ,so i go for my own search ,but i need the search ui similar to android search ui,how can i create this ,please help me,i have tried a lot ,but i won't get this perfection
```
<RelativeLayout
android:orientation="horizontal"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:gravity="center">
<ImageView
android:id="@+id/appIcon"
android:layout_height="39dp"
android:layout_width="39dp"
android:layout_alignParentLeft="true"
android:layout_centerVertical="true"
android:background="@drawable/angiicon" />
<RelativeLayout
android:layout_width="243dp"
android:id="@+id/rr1"
android:layout_marginTop="5dp"
android:layout_marginLeft="5dp"
android:layout_toRightOf="@+id/appIcon"
android:gravity="center_vertical"
android:layout_height="wrap_content">
<EditText
android:id="@+id/categoryListEditText"
android:layout_width="202dp"
android:text=" "
android:layout_height="wrap_content"
android:singleLine="true"
android:hint="Search Angie’s List"
android:inputType="textVisiblePassword"
android:imeOptions="actionSearch"
android:paddingRight="34dp"
/>
<Button android:id="@+id/buttonClearText"
android:layout_centerVertical="true"
android:layout_width="48dp"
android:layout_marginRight="8dp"
android:layout_height="30dp"
android:visibility="invisible"
android:background="@drawable/clear_button"
android:layout_alignRight="@+id/categoryListEditText"/>
<ProgressBar
android:id="@+id/ProgressBarcat"
style="@android:style/Widget.ProgressBar.Small.Inverse"
android:layout_width="wrap_content"
android:visibility="invisible"
android:layout_toLeftOf="@+id/companySearch"
android:layout_centerVertical="true"
android:layout_height="wrap_content"></ProgressBar>
<ImageButton
android:id="@+id/companySearch"
android:background="@drawable/btn_search_dialog"
android:src="@drawable/ic_menu_search"
android:layout_width="43dp"
android:layout_marginTop="0.05dp"
android:layout_height="41dp"
android:layout_marginLeft="8dip"
android:layout_alignParentRight="true" />
</RelativeLayout>
</RelativeLayout>
```
|
android creating search ui similar to Searchable
|
CC BY-SA 3.0
| null |
2011-05-24T14:36:56.693
|
2011-11-10T11:46:50.133
| null | null | 487,219 |
[
"android"
] |
6,112,501 | 1 | 6,113,477 | null | 9 | 513 |
I'm working on implementing a UI for an Android application, and I wanted to ask if there is already something in the native widgets to accomplish most of what I'm trying to do.
The application that I'm working on performs 15 different tasks that can be divided into 3 different groups. (5 tasks per group) I have 18 icon images (3 for the groups and 15 for the individual tasks) and I want to be able to panel these icons (starting with the groups) like this:

I want the next icon visible below and above (if further down than the first icon) and swipe to go to the next icon

Once an icon is clicked, the panels slide to the side, exposing the next layer (the specific 5 tasks for the selected group) with the selected group still visible on the side:

From there, the user can tell at a glance what group they are in, what the current, next and previous selectable tasks are, and that by swiping right, they can get back to the group selection.
What types of widgets would I need to look into in order to accomplish something like this? Are there already pre-built lists to do these activities?
Thanks for any guidance!
|
Android UI question. Implementation guidance
|
CC BY-SA 3.0
| 0 |
2011-05-24T14:59:40.603
|
2011-06-08T05:16:45.487
| null | null | 490,326 |
[
"android",
"user-interface",
"android-layout"
] |
6,112,533 | 1 | 6,113,097 | null | 3 | 915 |
I have a usercontrol that consists of a label and a textbox. It's inside a scrollviewer.
I'm drawing an adorner on top of it and I need to adjust the size of the adorner to the visible size of the control.
How do I get the visible size of the control?
In the image below the green rectangle is the adorner. As you can see it's being drawn over the scrollbar on the right side.
Is it possible to get the size of the rendered part or will I have to manually go trough the visual tree and calculate it?
I'm build a very limited form designer. Everything is happening in code. The adorner is used to display the current selected control.

|
How do I get the size of the visible part of a WPF usercontrol?
|
CC BY-SA 3.0
| null |
2011-05-24T15:01:01.587
|
2011-05-24T15:44:58.273
|
2020-06-20T09:12:55.060
| -1 | 141,372 |
[
"c#",
".net",
"wpf",
"adorner"
] |
6,112,559 | 1 | 6,119,143 | null | 0 | 68 |
if I want to format a small snippet of text using the dropdowns (ie Heading 1, 2 paragraph), it often ends up changing the tag for a large snippet of text (or even half the page). 
How do i change this behaviour?
|
formatting in Dreamweaver using the dropdowns
|
CC BY-SA 3.0
| null |
2011-05-24T15:03:04.927
|
2011-05-27T03:09:44.847
| null | null | 42,589 |
[
"dreamweaver"
] |
6,112,575 | 1 | 6,113,093 | null | 6 | 3,311 |
I am writing an application that has four main entities that are all linked via relationships. Some are one to one, some are one to many. Upon initial load, three of the entities load their data from XML files stored locally to the application and one of the entities downloads an XML from the web and loads its data from it. When the app loads it performs a check to see if the data from each of these files is more recent than what it currently has and, if so, it will replace all current data in that entity with data from the appropriate file.
As part of my debug process during writing I have been forcing a delete of all data. When the delete function is called and all data is loaded at app launch the application runs beautifully and all entities and relationships behave exactly as they should. However, when I remove the call to the delete function and it performs the checks and tries to run from data it has stored, all of the relationships seem to disappear. In debugging this, I have found that all of the entities do contain all of the regular data that they are supposed to, they just don't have the relationships anymore. I can't figure out why in the world the relationships are saved on first load but don't retain when all data is not re-imported.
I would imagine some code would be helpful to anyone debugging, however, I'm not sure how much I should include. So, I will start by including just one of the methods called in the data loading class. If anything else would help, please let me know. Any help is very much appreciated.
UPDATED CODE: 2/25/11 (Based on Suggestions - Problem still exists)
UPDATED CODE: 2/25/11 - Problem Solved
```
- (NSArray *) loadFeatures {
if ([self checkForUpdate:@"Features"]) {
[self deleteAllObjects:@"Features"];
NSString *filePath = [self dataFilePath:FALSE withResourceName:@"Features"];
NSData *xmlData = [[NSMutableData alloc] initWithContentsOfFile:filePath];
NSError *error;
GDataXMLDocument *doc = [[GDataXMLDocument alloc] initWithData:xmlData options:0 error:&error];
NSArray *featureElements = [doc.rootElement elementsForName:@"FEATURE"];
NSMutableSet *featureSections = [[NSMutableSet alloc] init];
for (GDataXMLElement *featureElement in featureElements) {
NSString *featureName = nil;
NSNumber *featureSecure = nil;
NSNumber *featureID = nil;
NSNumber *featureSortKey = nil;
DisplayTypes *featureDisplayType = nil;
NSArray *names = [featureElement elementsForName:@"NAME"];
if (names.count > 0) {
GDataXMLElement *firstName = (GDataXMLElement *) [names objectAtIndex:0];
featureName = firstName.stringValue;
} else continue;
NSArray *secures = [featureElement elementsForName:@"SECURE"];
if (secures.count > 0) {
GDataXMLElement *firstSecure = (GDataXMLElement *) [secures objectAtIndex:0];
featureSecure = [NSNumber numberWithInt:firstSecure.stringValue.intValue];
} else continue;
NSArray *featureIDs = [featureElement elementsForName:@"FEATUREID"];
if (featureIDs.count > 0) {
GDataXMLElement *firstFeatureID = (GDataXMLElement *) [featureIDs objectAtIndex:0];
featureID = [NSNumber numberWithInt:firstFeatureID.stringValue.intValue];
}
NSArray *featureSortKeys = [featureElement elementsForName:@"SORTKEY"];
if (featureSortKeys.count > 0) {
GDataXMLElement *firstSortKey = (GDataXMLElement *) [featureSortKeys objectAtIndex:0];
featureSortKey = [NSNumber numberWithInt:firstSortKey.stringValue.intValue];
}
NSArray *featureDisplays = [featureElement elementsForName:@"DISPLAYTYPEID"];
if (featureDisplays.count > 0) {
GDataXMLElement *firstFeatureDisplay = (GDataXMLElement *) [featureDisplays objectAtIndex:0];
for (DisplayTypes *thisDisplayType in self.displayTypes) {
if (thisDisplayType.displayTypeID == [NSNumber numberWithInt:firstFeatureDisplay.stringValue.intValue]) {
featureDisplayType = thisDisplayType;
}
}
}
NSArray *sectionElements = [featureElement elementsForName:@"SECTIONS"];
for (GDataXMLElement *sectionElement in sectionElements) {
NSArray *sectionIDs = [sectionElement elementsForName:@"SECTION"];
for (GDataXMLElement *sectionID in sectionIDs) {
NSArray *thisSectionIDs = [sectionID elementsForName:@"SECTIONID"];
if ([thisSectionIDs count]) {
GDataXMLElement *thisSectionID = (GDataXMLElement *) [thisSectionIDs objectAtIndex:0];
for (Sections *thisSection in self.sections) {
if ([thisSection.sectionID isEqualToNumber:[NSNumber numberWithInt:thisSectionID.stringValue.intValue]]) {
[featureSections addObject:thisSection];
}
}
}
}
}
NSManagedObjectContext *context = [self managedObjectContext];
NSManagedObject *featureInfo = [NSEntityDescription insertNewObjectForEntityForName:@"Features" inManagedObjectContext:context];
[featureInfo setValue:featureName forKey:@"name"];
[featureInfo setValue:featureSecure forKey:@"secure"];
[featureInfo setValue:featureID forKey:@"featureID"];
[featureInfo setValue:featureSortKey forKey:@"sortKey"];
[featureInfo setValue:featureDisplayType forKey:@"display"];
[[featureInfo mutableSetValueForKey:@"section"] unionSet:featureSections];
NSError *error;
if (![context save:&error]) {
NSLog(@"Whoops, couldn't save: %@", [error localizedDescription]);
}
[[self.managedObjectContext objectWithID:featureDisplayType.objectID] addFeatureObject:featureInfo];
[self.managedObjectContext save:&error];
[featureSections removeAllObjects];
}
[xmlData release];
[doc release];
[featureSections release];
}
NSFetchRequest *fetchRequest = [[NSFetchRequest alloc] init];
NSEntityDescription *entity = [NSEntityDescription entityForName:@"Features" inManagedObjectContext:[self managedObjectContext]];
[fetchRequest setEntity:entity];
NSError *error;
NSArray *featureArray = [self.managedObjectContext executeFetchRequest:fetchRequest error:&error];
[fetchRequest release];
return featureArray;
}
```
UPDATE: 5/25/2011
Per request I am posting a couple of screen shots.
1) This is what I get when the app loads after all data has been deleted and the relationships are in tact

2) This is what I get when the app runs again without first deleting and reloading data. The tabs at the bottom are created by one of the entities, and are titled a bit different. This happens because the relationship with the DisplayType is not present and it doesn't know what type of view controller to load and it doesn't know which icon to use for the tab.

|
Core Data Entity Relationship Does Not Save Between Launches
|
CC BY-SA 3.0
| null |
2011-05-24T15:04:31.540
|
2011-11-27T17:18:32.870
|
2011-05-25T19:05:51.127
| 708,964 | 708,964 |
[
"iphone",
"objective-c",
"cocoa-touch",
"ios",
"core-data"
] |
6,112,620 | 1 | 6,113,736 | null | 0 | 890 |
I have a ListView that looks like this:

Notice how the TextView is getting cut off with elipses. How can I make sure the entire TextView is visible inside of the ListView?
Here is my XML for the row (the textview is called `bodyTextView`):
```
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="horizontal"
android:padding="4px">
<ImageView android:id="@+id/avatarImageView"
android:layout_width="48px"
android:layout_height="48px"/>
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:paddingLeft="4px">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_weight="1"
android:gravity="center_vertical">
<TextView android:id="@+id/usernameTextView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="left"
android:textStyle="bold"
android:singleLine="true"
android:ellipsize="end"
android:textColor="#444444"
android:padding="0px"/>
<TextView android:id="@+id/bodyTextView"
android:orientation="vertical"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:singleLine="false"
android:textColor="#666666"
android:maxLines="5"
android:ellipsize="end"/>
<TextView android:id="@+id/dateTextView"
android:orientation="vertical"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:singleLine="true"/>
</LinearLayout>
</LinearLayout>
</LinearLayout>
```
|
How can I display a long TextView height in a ListView row?
|
CC BY-SA 3.0
| 0 |
2011-05-24T15:07:36.237
|
2011-10-25T16:59:53.063
| null | null | 19,875 |
[
"java",
"android",
"listview",
"textview",
"android-linearlayout"
] |
6,112,757 | 1 | 6,112,849 | null | 0 | 2,274 |
I have CA1017 error message with StyleCop saying I need to make it ComVisible false.
```
Error 18 CA1017 : Microsoft.Design :
Because 'NationalInstruments.Labview.FPGA.ModelsimCommunicator.dll' exposes externally
visible types, mark it with ComVisible(false) at the assembly level and then mark all
types within the assembly that should be exposed to COM clients with ComVisible(true).
```
Then, I put the code `[assembly: ComVisible(false)]` before the topmost namespace. However, I still got the same error together with other error messages.
```
Error 19 The type or namespace name 'ComVisible' could not be found (are you
missing a using directive or an assembly reference?)
Error 20 The type or namespace name 'ComVisibleAttribute' could not be found (are
you missing a using directive or an assembly reference?)
```
It seems that VS2010 also doesn't recognize this name.

What's wrong with this?
|
CA1017 ComVisible related errors with VS2010 StyleCop
|
CC BY-SA 3.0
| null |
2011-05-24T15:18:06.617
|
2011-05-24T15:51:32.833
|
2020-06-20T09:12:55.060
| -1 | 260,127 |
[
"c#",
".net",
"visual-studio-2010",
"stylecop",
"comvisible"
] |
6,112,883 | 1 | 6,113,107 | null | 2 | 3,326 |
I have a background image used as tooltip container's background. The image is shown below:

It is used like this:
```
.tooltip {
display:none;
background:url(images/black_arrow_big.png);
height:163px;
padding:40px 30px 10px 30px;
width:310px;
font-size:11px;
color:#fff;
}
<div class="tooltip">Tolltip text goes here</div>
```
However all tooltips do not have the same amount of text, so I need a way to make the container bigger or smaller based on the amount of text. How should I do this? Does sliding door technique allow both horizontal and vertical resizing? How?
Also, could I have the same diagonal gradient if I use a sliding door technique? If not, any alternatives?
|
CSS - Styling a tooltip container
|
CC BY-SA 3.0
| 0 |
2011-05-24T15:27:01.637
|
2013-02-21T19:59:03.563
|
2011-12-25T01:08:03.890
| 106,224 | 66,580 |
[
"css",
"background"
] |
6,112,923 | 1 | 6,113,245 | null | 1 | 6,476 |
I'm trying to scale a container/parent movie clip up so that I effectively zoom in to a point referenced by one of its children. I've figured out how to use globalToLocal to get that point at the center of the stage, but the problem is the registration point for the container clip is (and needs to stay) at the upper left, so when I scale the container clip up, the point does not stay in the center of the screen. Here's my code:
//REVISED:
```
var stageCenter = new Point(int(stage.stageWidth/2),int(stage.stageHeight)/2);
var parPointLocal = parRef.globalToLocal(stageCenter);
TweenMax.to(treeClip,.5,{x:parPointLocal.x,y:parPointLocal.y,onComplete:doZoom});
function doZoom():void {
var zoomPoint = zoomToMember(treeClip,stageCenter,2);
function zoomToMember(target:MovieClip, center:Point, scale:Number):Point {
var m:Matrix = new Matrix();
m.translate(-center.x, -center.y);//move the center into (0,0)
m.scale(scale, scale);//scale relatively to (0,0) (which is where our center is now)
m.translate(center.x, center.y);//move the center back to its original position
return m.transformPoint(new Point());//transform (0,0) using the whole transformation matrix to calculate the destination of the upper left corner
}
TweenMax.to (treeClip,.5,{x:zoomPoint.x,y:zoomPoint.y,scaleX:2,scaleY:2})
}
```
When I do this, the zoomed point ends up being somewhere around "Mabel Greer's Toy Shop" - which I imagine was the center point of the stage before the treeClip was tweened so that "Jon Anderson" would be at the center of the stage.

|
flash as3 zooming in (scaling up) to a specific point within a clip
|
CC BY-SA 3.0
| null |
2011-05-24T15:30:53.240
|
2011-05-24T17:33:51.263
|
2011-05-24T17:33:51.263
| 287,436 | 287,436 |
[
"flash",
"actionscript-3"
] |
6,113,144 | 1 | null | null | 1 | 525 |
Does the TCPPortSharing service permit me to have a WAS activated TCP-Based service on the same port as IIS's port 80?
The picture below shows net.tcp at port 808. Can I change this to port 80? If the answer is "no" then am I misunderstanding the benefit of the tcpportsharing service?

|
Is it possible to have a WCF/WAS service using net.tcp port 80 and IIS on the same port?
|
CC BY-SA 3.0
| null |
2011-05-24T15:47:54.893
|
2011-10-22T00:12:35.190
| null | null | 328,397 |
[
"wcf",
"iis-7.5",
"was",
"net.tcp",
"tcpportsharing"
] |
6,113,137 | 1 | 6,113,197 | null | 2 | 1,610 |
My image editing app is saving some important data in the documents directory. In a [tutorial](http://www.raywenderlich.com/1948/how-integrate-itunes-file-sharing-with-your-ios-app) I was reading this:
> iTunes will then display anything you
save to the Documents directory in
your app to the user, when they go to
the “Apps” page in iTunes and scroll
to the bottom:

I have a subfolder called userImages and it would be clever to restrict file sharing only to that folder and not to everything in documents. Otherwise the user would accidently (or on purpose) mess around with files that the app depends on to work properly. This would be bad.
Is there a way to restrict it to a subdirectory in documents?
|
Is it possible to limit iOS file sharing functionality to a subfolder in the documents directory?
|
CC BY-SA 3.0
| null |
2011-05-24T15:47:33.140
|
2011-05-24T15:51:43.020
| null | null | 472,300 |
[
"iphone",
"objective-c",
"ios",
"ipad",
"file-sharing"
] |
6,113,788 | 1 | 6,114,198 | null | 12 | 16,012 |
I have a form and unobtrusive validations are enabled. By default in submit method client side validation gets triggered and (if you have any errors) the form looks like this:

The validation happens even before any data gets sent to the server.
Now this behavior doesn't work if you want to use $.ajax method. Client side validation doesn't work. You have to manually check all the fields in your javascript, losing all the beauty of DataAnnotations.
Is there any better solution? I could've use jquery's but I guess it doesn't have callback like .
|
How to force form client-side validation in or before $.ajax()
|
CC BY-SA 3.0
| 0 |
2011-05-24T16:37:40.940
|
2016-05-09T14:42:40.567
|
2011-05-24T16:44:53.543
| 116,395 | 116,395 |
[
"validation",
"asp.net-mvc-3",
"jquery",
"unobtrusive-validation"
] |
6,113,872 | 1 | 6,113,996 | null | 0 | 95 |
Of users thus far, only 1 has experienced a major js exception on the homepage. They are using FireFox 4.01 on a PC (not sure about the operating system).
I can't reproduce the error on my own machine (FireFox 4.01 and Windows 7).
I validated the markup and it's largely alright. The error seems related to the DOCTYPE declaration based on the screen shot, though it's confusing because the exception is not being thrown on all of the site's pages for this user and all pages have the same declaration.
The link is [nabshack.com](http://nabshack.com)
I've attached a screen shot of the error (again, which I can't reproduce).
Thanks
|
Javascript Exception (only occurred for FireFox 4.01 on PC)
|
CC BY-SA 3.0
| null |
2011-05-24T16:44:02.540
|
2011-05-24T16:54:19.253
| null | null | 558,699 |
[
"javascript",
"jquery",
"markup",
"doctype"
] |
6,114,322 | 1 | null | null | 4 | 11,182 |
I have a graph like this:

One simple rule:
Every node in the graph only knows about its successor.
As you can see, the problem occurs when we came to `6` (by the first branch, `1 → 6`), so that we do not know when it is time to stop and start traversing another branch (`2 → 6`).
Could anyone suggest an algorithm for traversing graph like this, please?
I came up with the idea when I am traversing `1 → 6 → end of graph`, and then returning to `2 → 6`.
But I think this is not good idea, because there could be a lot of forks on the `1 → 6 → end of graph` way.
|
Algorithm for traversing directed graph like this (picture inside)
|
CC BY-SA 3.0
| 0 |
2011-05-24T17:20:21.460
|
2013-04-24T15:20:42.330
| null | null | 327,761 |
[
"graph",
"traversal"
] |
6,114,353 | 1 | 6,114,576 | null | 3 | 3,162 |
I'm looking for paid video tutorials like this one : `Video2Brain Java EE 6`

It has nice videos, but the problem is that they are in german.
So, I was wondering if any someone of you knows something like that.
I tried [http://eclipsetutorial.sourceforge.net/](http://eclipsetutorial.sourceforge.net/) but they don't have Server configuration ans JSP, Servlet programming.
Thank you.
|
Looking for Java EE video tutorials
|
CC BY-SA 3.0
| null |
2011-05-24T17:23:06.043
|
2013-08-08T16:16:52.600
|
2020-06-20T09:12:55.060
| -1 | 346,297 |
[
"java",
"tomcat",
"jpa",
"ejb"
] |
6,114,684 | 1 | 6,115,217 | null | 1 | 183 |
I was reading the June 2011 issue of Wired magazine the other day, and I came across an ad for Louisiana Economic Development, presumably written in ActionScript.
I originally thought that it was a clever ad, but after looking into it, it seems like there's a fairly obvious bug in the code.

Is it just me, or should that `break` be a `return`?
|
Bug in Louisiana Economic Development Ad?
|
CC BY-SA 3.0
| null |
2011-05-24T17:52:53.537
|
2011-05-24T18:40:27.340
| null | null | 371,408 |
[
"actionscript"
] |
6,114,745 | 1 | 6,188,182 | null | 4 | 1,048 |
Does anyone know if there is a reason why the minified versions of the jQuery files on the Asp.Net content delivery network are not gzip compressed? The non-minified versions are properly compressed.
Examples:
[http://ajax.aspnetcdn.com/ajax/mvc/3.0/jquery.unobtrusive-ajax.js](http://ajax.aspnetcdn.com/ajax/mvc/3.0/jquery.unobtrusive-ajax.js) (GZipped)
[http://ajax.aspnetcdn.com/ajax/mvc/3.0/jquery.unobtrusive-ajax.min.js](http://ajax.aspnetcdn.com/ajax/mvc/3.0/jquery.unobtrusive-ajax.min.js) (Not GZipped)
If I look at the Google CDN, the minified files are also gzipped. Unfortunately they are not offering jquery.unobtrusive-ajax, jquery.validate, or jquery.validate.unobtrusive.

```
HTTP/1.1 200 OK
Cache-Control: public,max-age=31536000
Content-Type: application/x-javascript
Accept-Ranges: bytes
ETag: "075379efba5cb1:0"
Vary: Accept-Encoding
Server: Microsoft-IIS/7.5
VTag: 279431312700000000
P3P: CP="ALL IND DSP COR ADM CONo CUR CUSo IVAo IVDo PSA PSD TAI TELo OUR SAMo CNT COM INT NAV ONL PHY PRE PUR UNI"
X-Powered-By: ASP.NET
Content-Length: 2745
Age: 6009332
Date: Tue, 24 May 2011 18:13:59 GMT
Last-Modified: Mon, 27 Dec 2010 19:24:02 GMT
Expires: Thu, 15 Mar 2012 04:58:27 GMT
Connection: keep-alive
```
Thanks,
Sam
|
Asp.Net CDN Minified JQuery Not Gzipped?
|
CC BY-SA 3.0
| null |
2011-05-24T17:58:03.587
|
2011-05-31T13:16:33.347
|
2011-05-24T18:16:58.310
| 139,694 | 139,694 |
[
"jquery",
"asp.net-mvc",
"asp.net-mvc-3",
"google-cdn",
"microsoft-cdn"
] |
6,114,908 | 1 | 6,128,613 | null | -2 | 185 |
I have these 'created' and 'modified' fields in several of my tables, but I've just realized that the hour that appears in those tables isn't the right one, but an hour later, so let's say it is 10:47:05 in local time then the hour that is stored to the database is 11 instead of 10, and it's always the same, I never get the right hour.
Ok guys I tried to set time zone from the MySQL configuration file (), adding at [myqld] section and after that I checked the global and session timezone to see if everything was alright,and apparently it was, but when I insert or update some records and check the 'created' and 'modified' field to see if now the hour is the right one, much to my disappointed they still are an hour later than the current time.

|
Mysql doesn't return the right hour?
|
CC BY-SA 3.0
| 0 |
2011-05-24T18:10:57.903
|
2011-05-25T17:48:08.873
|
2011-05-25T17:48:08.873
| 530,911 | 530,911 |
[
"php"
] |
6,115,257 | 1 | 6,773,271 | null | 3 | 1,364 |
I need following layout in Java:

However, I should find that no layout manager can simply handle this problem for me. I need this layout in a JFrame.
Is there any halfway easy way I could do this?
Thanks in advance!
EDIT: Thanks, all of you, I finally managed!
That's what I've done (as you have proposed)
- - - - -
Thanks you all, whose advice I have mixed ^^
|
Java choose layout
|
CC BY-SA 3.0
| null |
2011-05-24T18:43:36.767
|
2011-07-22T04:23:03.117
|
2011-05-24T19:24:17.450
| 299,711 | 299,711 |
[
"java",
"layout",
"height",
"width",
"distribution"
] |
6,115,515 | 1 | null | null | 0 | 824 |
We're building an analytics portal, and needless to say, a top feature is the ability to export statistics to excel. My question is - Does Selenium provide the ability to detect the generation of Excel files (upon clicking the icon within the portal)?
At this stage, just the presence (or absence) suffices. I don't need to delve into the excel file contents (yet).
More information - Here is a screenshot of the excel file that is generated...

This notification seems outside Selenium's purview
|
Detecting Excel Files using Selenium
|
CC BY-SA 3.0
| null |
2011-05-24T19:05:48.457
|
2011-05-25T15:25:47.707
| null | null | 349,268 |
[
"java",
"selenium",
"selenium-rc"
] |
6,115,526 | 1 | 6,115,863 | null | 4 | 5,593 |
I'm using Visual Studio 2010's built-in profiler to look at a section of poorly performing code. However, I'm seeing some results that don't quite make sense. Here is a shot of the report:

This seems to indicate that Regex.Replace is the bottleneck (and I should therefore try to reduce or eliminate this use as much as possible). However, this feels inaccurate, as I know that this particular section of code is making heavy use of the database, and thus I would expect the SqlCommand.ExecuteNonQuery to be at least a little higher in this report, if not more dominant than the Regex use.
So, my question is: is this profiler tool useless for anything involving database access, since the SQL work is being done by another process (i.e. the SQL server), and therefore I have to measure it some other way?
|
Visual Studio 2010 profiler with SQL
|
CC BY-SA 3.0
| null |
2011-05-24T19:06:56.973
|
2011-12-17T21:03:31.470
|
2011-12-17T21:03:31.470
| 3,043 | 40,015 |
[
"c#",
"sql-server",
"visual-studio-2010",
"profiling"
] |
6,115,567 | 1 | 6,115,706 | null | 8 | 28,378 |
I have the following ImageView and TextView:

Here is the XML:
```
<LinearLayout android:layout_height="wrap_content" android:layout_width="match_parent" android:id="@+id/headerLinearLay" android:orientation="horizontal">
<ImageView android:src="@drawable/icon" android:layout_height="wrap_content" android:layout_width="wrap_content" android:id="@+id/avatarImageView"></ImageView>
<TextView android:layout_height="wrap_content" android:id="@+id/usernameTextView" android:text="TextView" android:layout_width="wrap_content" android:paddingLeft="4px"></TextView>
</LinearLayout>
```
How can I make the image and the text be positioned at the same height? I also want the ImageView to be in the corner
|
How can I align my ImageView with my TextView in a LinearLayout?
|
CC BY-SA 3.0
| null |
2011-05-24T19:10:00.310
|
2017-06-07T17:14:11.323
|
2011-05-24T19:17:05.473
| 19,875 | 19,875 |
[
"java",
"android",
"textview",
"imageview",
"android-linearlayout"
] |
6,115,605 | 1 | 6,123,728 | null | 0 | 1,002 |
Currently, I'm working on an extension for Chrome, which is great fun so far, but now I encountered a little problem.
Generally, tabs that contain a file of the plugin have an empty URL bar (I'm using Chrome 13.xx), like shown in this screenshot:

This tab was created by the following code:
```
chrome.tabs.create({
url: chrome.extension.getURL('../relative/path/to/a/file.html')
}, function(newTab){
...
});
```
It would be nice to have the URL visible, so it can be shared with other people who have the same extension installed (the URL has a unique ID for the extension, if I'm not mistaken)
|
Chrome extension: empty URL bar on created tabs
|
CC BY-SA 3.0
| null |
2011-05-24T19:12:37.120
|
2011-05-26T00:30:45.963
|
2011-05-26T00:30:45.963
| 20,128 | 176,603 |
[
"url",
"google-chrome",
"google-chrome-extension"
] |
6,115,710 | 1 | null | null | 5 | 1,258 |
I have several items, i want to calculate a minimum rectangle in which they can be fit, but items are rotated to some degree, or skewed or both. So how do i get the least rectangle which can contain all ?

|
how to get a boundingbox for multiple items in wpf?
|
CC BY-SA 3.0
| null |
2011-05-24T19:20:36.543
|
2011-05-25T05:03:01.427
|
2011-05-25T05:03:01.427
| 496,841 | 496,841 |
[
"c#",
"wpf",
"vb.net",
"silverlight",
"transform"
] |
6,115,707 | 1 | 6,125,885 | null | 5 | 9,784 |
I've got a button, which is part of the provided code in my Magento theme, and according to the date/time stamp, I haven't inadvertantly edited it. I'm sure that it was working at some point, but a glance back into my source control over the last week, and I can't seem to track down where things went wrong.
Here is the button HTML:
```
<button type="button" title="Add to Cart" class="button btn-cart" onclick="productAddToCartForm.submit(this)"><span><span>Add to Cart</span></span></button>
```
... but when I click on it nothing happens. Seems pretty straight forward, except I can't see if/where there is a typo, etc. So, I check Firebug and I see the following error:

However, when I go to "View page source", the script is indeed in the page:
```
<script type="text/javascript">
//<![CDATA[
var productAddToCartForm = new VarienForm('product_addtocart_form');
productAddToCartForm.submit = function(button, url) {
if (this.validator.validate()) {
var form = this.form;
var oldUrl = form.action;
if (url) {
form.action = url;
}
var e = null;
try {
this.form.submit();
} catch (e) {
}
this.form.action = oldUrl;
if (e) {
throw e;
}
if (button && button != 'undefined') {
button.disabled = true;
}
}
}.bind(productAddToCartForm);
productAddToCartForm.submitLight = function(button, url){
if(this.validator) {
var nv = Validation.methods;
delete Validation.methods['required-entry'];
delete Validation.methods['validate-one-required'];
delete Validation.methods['validate-one-required-by-name'];
if (this.validator.validate()) {
if (url) {
this.form.action = url;
}
this.form.submit();
}
Object.extend(Validation.methods, nv);
}
}.bind(productAddToCartForm);
//]]>
</script>
```
|
JavaScript to add an item to the cart is broken
|
CC BY-SA 3.0
| null |
2011-05-24T19:16:23.203
|
2011-05-25T15:09:51.873
|
2011-05-24T19:38:12.883
| 249,543 | 249,543 |
[
"javascript",
"magento"
] |
6,115,947 | 1 | 6,116,126 | null | 3 | 2,790 |
I want to have a dialog that looks kinda like this:

I thought this approach would work but I guess I was wrong:
```
//Creates The Dialog
$('.ImageDialogDiv').dialog({
position: [98, 223],
resizable: false,
//modal: true, /* UNCOMMENT AFTER DEBUGGING */
closeOnEscape: false,
class: 'OverwriteDialogOverflow',
title: $('#hiddenDialogElements').html(),
open: function (event, ui) { $(".ui-dialog-titlebar-close").hide(); }
});
```
```
/*
* Overrides hidden overflow
*/
.OverwriteDialogOverflow
{
overflow: visible;
}
```
```
<div id = "dialogDiv" class = "ImageDialogDiv"></div>
<div id = "hiddenDialogElements">
<button id = "hiddencloseButton">Close</button>
<div id = "hiddenArrowButtons">
<button class = "ArrowButtonDialogLeft" onclick = "ShowNextImage(-1)" ></button>
<button class = "ArrowButtonDialogRight" onclick = "ShowNextImage(1)" ></button>
</div>
</div>
```
When I attempt to move the arrows or close button off of the dialog, then get cut off and will not be visible. I though that adding `.OverwriteDialogOverflow` would take care of that.
Suggestions?
|
How to make items float outside of Jquery Dialogs
|
CC BY-SA 3.0
| null |
2011-05-24T19:43:15.930
|
2020-11-10T21:14:40.840
| null | null | 650,489 |
[
"javascript",
"css",
"jquery-ui",
"jquery-dialog"
] |
6,116,219 | 1 | 6,116,394 | null | 0 | 670 |
I am still trying to get my server running OpenStreetMap. I have TileCache and Mapnik installed. I have an extract of the U.S. state of Oklahoma imported into my database. I have used OSM Mapnik tools to create an XML stylesheet and I have confirmed that 'generate_image.py' makes a nice map image. I have (at least I believe I have) granted PostGIS access properly. My user has full permissions over all of the tables in the database. When I look in the Apache logs, all I see are notes about cache misses (I used to see database connection issues, but I don't any more). In the Postgres logs, I don't see anything (again, I used to see access denied issues, but I don't anymore). Despite all of this, when I ask TileCache to render a tile from the OSM Mapnik layer, all I get is this image:

This image shows up no matter where I am on the map or what zoom level I am at. I have TileCache running under CGI and it has a configuration like this:
```
[osm]
type=Mapnik
mapfile=/var/maps/bin/mapnik/osm.xml
spherical_mercator=true
```
I am using OpenLayers and my Javascript looks like this:
```
var map = new OpenLayers.Map("mapdiv");
var vec = new OpenLayers.Layer.TMS("TC", "http://maps.company.com/cgi-bin/tilecache/tilecache.cgi/", {serviceVersion: "1.0.0", layername: "osm", type: "png"});
map.addLayer(vec);
```
I have been working on this server for two and a half weeks. I have read every blog, forum, or other post I can find. This is my third question today. I am getting desperate. I would really appreciate any help anybody has.
|
Mapnik Blue Tiles with TileCache
|
CC BY-SA 3.0
| null |
2011-05-24T20:07:39.200
|
2011-05-24T20:25:00.593
| null | null | 539,211 |
[
"mapping",
"openstreetmap",
"mapnik"
] |
6,116,740 | 1 | 6,118,226 | null | 3 | 1,858 |
:
I am looking for an algorithm to find the best common ancestor of a graph where nodes in the graph can have zero, one, or two parents. I am not sure of the terminology of "best common ancestor": better terminology might be "lowest common ancestor", or "recent common ancestor", etc. If there is better terminology then please provide URL's that describe such.
The algorithm has access to the full graph data structure.
It is possible for a given node to have zero, one, or two parents. This is key because the algorithms I've seen on the web assume that a given node has either zero or one parents, but not two parents (see references below). For instance, the m1 node in the diagram below has zero parents as it is the root (there can be multiple roots of the graphs). d3 has two parents, one is d2 and the other b2.
Nodes have references to both parents if they exist, and references to all children, if they exist, so traversal up the tree and down the tree is fair game. Nodes can have zero or more children. Changing the data structure is not an option.
Nodes closer to the two input nodes are preferable than nodes farther away (i.e., closer to roots of the graph).
By example, one possible graph is shown by the diagram given below. In this scenario, the inputs to the algorithm would be nodes b5 and d4. The best common ancestor of nodes b5 and d4 is b2. c2 would not be because b3 is in the lineage leading to b5.
Possible answers for the algorithm can be at most one node, and the empty set is a valid answer in the case that there is no common ancestor of the two input nodes.
[Tarjan's off-line least common ancestors algorithm](http://en.wikipedia.org/wiki/Tarjan%27s_off-line_least_common_ancestors_algorithm) seems to imply zero or one parents, so if that is the solution, then the answer should include a description of how two parents are accounted for in that algorithm. The wikipedia page for [Lowest common ancestor](http://en.wikipedia.org/wiki/Lowest_common_ancestor) also seems to only account for data structures whose nodes have zero or one parents, not two:
> In a tree data structure where each
node points to its parent, ...
:

|
Finding best common ancestor of two leaf nodes where nodes have zero, one, or two parents
|
CC BY-SA 3.0
| 0 |
2011-05-24T20:52:19.810
|
2011-05-26T02:39:27.277
|
2011-05-26T02:39:27.277
| 257,924 | 257,924 |
[
"graph",
"ancestor",
"least-common-ancestor"
] |
6,117,072 | 1 | null | null | 5 | 1,967 |
I followed the icon design guidelines from android and so I have icon in different size:
```
drawable-hdpi (96x96)
drawable-hdpi (72x72)
drawable-ldpi (36x36)
drawable-mdpi (48x48)
```
But on the Samsung Galaxy Tab the icon gets a weird purple/pink-ish border. The Game 'Angry Birds' seems to have the same problem. Facebook was able to change it to blue. So what is this border and how can I remove it?
Screenshot

|
Android Galaxy Tab : Why is the launch icon surrounded by a pink border?
|
CC BY-SA 3.0
| 0 |
2011-05-24T21:22:51.423
|
2022-04-21T10:48:29.047
|
2011-05-24T22:44:59.433
| 174,655 | 174,655 |
[
"android",
"tabs",
"icons"
] |
6,117,038 | 1 | 6,117,291 | null | 5 | 2,735 |
So I downloaded a wrapper class from this github link:
[https://github.com/ignaciovazquez/Highrise-PHP-Api](https://github.com/ignaciovazquez/Highrise-PHP-Api)
and I'm just trying to get any response whatsoever. So far, I can't even authenticate with my credentials so I was wondering if any who has used the API could help me.
I tried running one of the test files on Terminal with no arguments and this is what it told me:
```
Usage: php users.test.php [account-name] [access-token]
```
Alright, so then decided to get my credentials. So this is what I understand, and, please, correct if I'm wrong:
the account-name is that part that goes in the url to your highrise account. So if your url is:
[https://exampleaccount.highrisehq.com/](https://exampleaccount.highrisehq.com/)
then your account name is: "exampleaccount"
and your access token is your authentication token that you can find by going clicking on My info > API token inside your Highrise account.
Is that right?
Well anyways, I enter this info and script terminates with a fatal error and this message:
```
Fatal error: Uncaught exception 'Exception' with message 'API for User returned Status Code: 0 Expected Code: 200' in /Users/me/Sites/sandbox/PHP/highrise_api_class/lib/HighriseAPI.class.php:137
Stack trace:
#0 /Users/me/Sites/sandbox/PHP/highrise_api_class/lib/HighriseAPI.class.php(166): HighriseAPI->checkForErrors('User')
#1 /Users/me/Sites/sandbox/PHP/highrise_api_class/test/users.test.php(13): HighriseAPI->findMe()
#2 {main}
thrown in /Users/me/Sites/sandbox/PHP/highrise_api_class/lib/HighriseAPI.class.php on line 137
```
I'm complete n00b and I don't really understand what it's saying so I was wondering if any could help. It would be greatly appreciated.
The source of the test script (users.test.php) is:
```
<?php
require_once("../lib/HighriseAPI.class.php");
if (count($argv) != 3)
die("Usage: php users.test.php [account-name] [access-token]\n");
$hr = new HighriseAPI();
$hr->debug = false;
$hr->setAccount($argv[1]);
$hr->setToken($argv[2]);
print "Finding my user...\n";
$user = $hr->findMe();
print_r($user);
print "Finding all users...\n";
$users = $hr->findAllUsers();
print_r($users);
?>
```
and the source to the Highrise API wrapper file (Highrise.API.class) is:
```
<?php
/*
* http://developer.37signals.com/highrise/people
*
* TODO LIST:
* Add Tasks support
* Get comments for Notes / Emails
* findPeopleByTagName
* Get Company Name, etc proxy
* Convenience methods for saving Notes $person->saveNotes() to check if notes were modified, etc.
* Add Tags to Person
*/
class HighriseAPI
{
public $account;
public $token;
protected $curl;
public $debug;
public function __construct()
{
$this->curl = curl_init();
curl_setopt($this->curl,CURLOPT_RETURNTRANSFER,true);
curl_setopt($this->curl, CURLOPT_HTTPHEADER, array('Accept: application/xml', 'Content-Type: application/xml'));
// curl_setopt($curl,CURLOPT_POST,true);
curl_setopt($this->curl,CURLOPT_SSL_VERIFYPEER,0);
curl_setopt($this->curl,CURLOPT_SSL_VERIFYHOST,0);
}
public function setAccount($account)
{
$this->account = $account;
}
public function setToken($token)
{
$this->token = $token;
curl_setopt($this->curl,CURLOPT_USERPWD,$this->token.':x');
}
protected function postDataWithVerb($path, $request_body, $verb = "POST")
{
$this->curl = curl_init();
$url = "https://" . $this->account . ".highrisehq.com" . $path;
if ($this->debug)
print "postDataWithVerb $verb $url ============================\n";
curl_setopt($this->curl, CURLOPT_URL,$url);
curl_setopt($this->curl, CURLOPT_POSTFIELDS, $request_body);
if ($this->debug == true)
curl_setopt($this->curl, CURLOPT_VERBOSE, true);
curl_setopt($this->curl, CURLOPT_HTTPHEADER, array('Accept: application/xml', 'Content-Type: application/xml'));
curl_setopt($this->curl, CURLOPT_USERPWD,$this->token.':x');
curl_setopt($this->curl, CURLOPT_SSL_VERIFYPEER,0);
curl_setopt($this->curl, CURLOPT_SSL_VERIFYHOST,0);
curl_setopt($this->curl, CURLOPT_RETURNTRANSFER,true);
if ($verb != "POST")
curl_setopt($this->curl, CURLOPT_CUSTOMREQUEST, $verb);
else
curl_setopt($this->curl, CURLOPT_POST, true);
$ret = curl_exec($this->curl);
if ($this->debug == true)
print "Begin Request Body ============================\n" . $request_body . "End Request Body ==============================\n";
curl_setopt($this->curl,CURLOPT_HTTPGET, true);
return $ret;
}
protected function getURL($path)
{
curl_setopt($this->curl, CURLOPT_HTTPHEADER, array('Accept: application/xml', 'Content-Type: application/xml'));
curl_setopt($this->curl, CURLOPT_USERPWD,$this->token.':x');
curl_setopt($this->curl, CURLOPT_SSL_VERIFYPEER,0);
curl_setopt($this->curl, CURLOPT_SSL_VERIFYHOST,0);
curl_setopt($this->curl, CURLOPT_RETURNTRANSFER,true);
$url = "https://" . $this->account . ".highrisehq.com" . $path;
if ($this->debug == true)
curl_setopt($this->curl, CURLOPT_VERBOSE, true);
curl_setopt($this->curl,CURLOPT_URL,$url);
$response = curl_exec($this->curl);
if ($this->debug == true)
print "Response: =============\n" . $response . "============\n";
return $response;
}
protected function getLastReturnStatus()
{
return curl_getinfo($this->curl, CURLINFO_HTTP_CODE);
}
protected function getXMLObjectForUrl($url)
{
$xml = $this->getURL($url);
$xml_object = simplexml_load_string($xml);
return $xml_object;
}
protected function checkForErrors($type, $expected_status_codes = 200)
{
if (!is_array($expected_status_codes))
$expected_status_codes = array($expected_status_codes);
if (!in_array($this->getLastReturnStatus(), $expected_status_codes))
{
switch($this->getLastReturnStatus())
{
case 404:
throw new Exception("$type not found");
break;
case 403:
throw new Exception("Access denied to $type resource");
break;
case 507:
throw new Exception("Cannot create $type: Insufficient storage in your Highrise Account");
break;
default:
throw new Exception("API for $type returned Status Code: " . $this->getLastReturnStatus() . " Expected Code: " . implode(",", $expected_status_codes));
break;
}
}
}
/* Users */
public function findAllUsers()
{
$xml = $this->getUrl("/users.xml");
$this->checkForErrors("User");
$xml_object = simplexml_load_string($xml);
$ret = array();
foreach($xml_object->user as $xml_user)
{
$user = new HighriseUser();
$user->loadFromXMLObject($xml_user);
$ret[] = $user;
}
return $ret;
}
public function findMe()
{
$xml = $this->getUrl("/me.xml");
$this->checkForErrors("User");
$xml_obj = simplexml_load_string($xml);
$user = new HighriseUser();
$user->loadFromXMLObject($xml_obj);
return $user;
}
/* Tasks */
public function findCompletedTasks()
{
$xml = $this->getUrl("/tasks/completed.xml");
$this->checkForErrors("Tasks");
return $this->parseTasks($xml);
}
public function findAssignedTasks()
{
$xml = $this->getUrl("/tasks/assigned.xml");
$this->checkForErrors("Tasks");
return $this->parseTasks($xml);
}
public function findUpcomingTasks()
{
$xml = $this->getUrl("/tasks/upcoming.xml");
$this->checkForErrors("Tasks");
return $this->parseTasks($xml);
}
private function parseTasks($xml)
{
$xml_object = simplexml_load_string($xml);
$ret = array();
foreach($xml_object->task as $xml_task)
{
$task = new HighriseTask($this);
$task->loadFromXMLObject($xml_task);
$ret[] = $task;
}
return $ret;
}
public function findTaskById($id)
{
$xml = $this->getURL("/tasks/$id.xml");
$this->checkForErrors("Task");
$task_xml = simplexml_load_string($xml);
$task = new HighriseTask($this);
$task->loadFromXMLObject($task_xml);
return $task;
}
/* Notes & Emails */
public function findEmailById($id)
{
$xml = $this->getURL("/emails/$id.xml");
$this->checkForErrors("Email");
$email_xml = simplexml_load_string($xml);
$email = new HighriseEmail($this);
$email->loadFromXMLObject($email_xml);
return $email;
}
public function findNoteById($id)
{
$xml = $this->getURL("/notes/$id.xml");
$this->checkForErrors("Note");
$note_xml = simplexml_load_string($xml);
$note = new HighriseNote($this);
$note->loadFromXMLObject($note_xml);
return $note;
}
public function findPersonById($id)
{
$xml = $this->getURL("/people/$id.xml");
$this->checkForErrors("Person");
$xml_object = simplexml_load_string($xml);
$person = new HighrisePerson($this);
$person->loadFromXMLObject($xml_object);
return $person;
}
public function findAllTags()
{
$xml = $this->getUrl("/tags.xml");
$this->checkForErrors("Tags");
$xml_object = simplexml_load_string($xml);
$ret = array();
foreach($xml_object->tag as $tag)
{
$ret[(string)$tag->name] = new HighriseTag((string)$tag->id, (string)$tag->name);
}
return $ret;
}
public function findAllPeople()
{
return $this->parsePeopleListing("/people.xml");
}
public function findPeopleByTagName($tag_name)
{
$tags = $this->findAllTags();
foreach($tags as $tag)
{
if ($tag->name == $tag_name)
$tag_id = $tag->id;
}
if (!isset($tag_id))
throw new Excepcion("Tag $tag_name not found");
return $this->findPeopleByTagId($tag_id);
}
public function findPeopleByTagId($tag_id)
{
$url = "/people.xml?tag_id=" . $tag_id;
$people = $this->parsePeopleListing($url);
return $people;
}
public function findPeopleByEmail($email)
{
return $this->findPeopleBySearchCriteria(array("email"=>$email));
}
public function findPeopleByTitle($title)
{
$url = "/people.xml?title=" . urlencode($title);
$people = $this->parsePeopleListing($url);
return $people;
}
public function findPeopleByCompanyId($company_id)
{
$url = "/companies/" . urlencode($company_id) . "/people.xml";
$people = $this->parsePeopleListing($url);
return $people;
}
public function findPeopleBySearchTerm($search_term)
{
$url = "/people/search.xml?term=" . urlencode($search_term);
$people = $this->parsePeopleListing($url, 25);
return $people;
}
public function findPeopleBySearchCriteria($search_criteria)
{
$url = "/people/search.xml";
$sep = "?";
foreach($search_criteria as $criteria=>$value)
{
$url .= $sep . "criteria[" . urlencode($criteria) . "]=" . urlencode($value);
$sep = "&";
}
$people = $this->parsePeopleListing($url, 25);
return $people;
}
public function findPeopleSinceTime($time)
{
$url = "/people/search.xml?since=" . urlencode($time);
$people = $this->parsePeopleListing($url);
return $people;
}
public function parsePeopleListing($url, $paging_results = 500)
{
if (strstr($url, "?"))
$sep = "&";
else
$sep = "?";
$offset = 0;
$return = array();
while(true) // pagination
{
$xml_url = $url . $sep . "n=$offset";
// print $xml_url;
$xml = $this->getUrl($xml_url);
$this->checkForErrors("People");
$xml_object = simplexml_load_string($xml);
foreach($xml_object->person as $xml_person)
{
// print_r($xml_person);
$person = new HighrisePerson($this);
$person->loadFromXMLObject($xml_person);
$return[] = $person;
}
if (count($xml_object) != $paging_results)
break;
$offset += $paging_results;
}
return $return;
}
}
```
Sorry it's such a long file but if it helps, then so be it.
EDIT: So I guess I got it to work. I should've said that I was trying to test this library out on my local server and for some reason it would keep failing but when I moved the script to my development server on Rackspace cloud then it would work. This just puzzles me. Both servers have support for PHP curl so I can't really understand where the problem is.
EDIT: I'm not sure what the difference between the two server configurations could be but anyways here's a couple of screenshots from my phpinfo function output from both servers of my curl configuration:
Localhost server:

and the rackspace cloud server:

|
Has anyone worked with this Highrise API PHP Wrapper library? I need help authenticating
|
CC BY-SA 3.0
| 0 |
2011-05-24T21:19:59.767
|
2014-04-18T21:23:59.667
|
2011-05-25T04:11:32.047
| 295,019 | 295,019 |
[
"php",
"api",
"authentication",
"wrapper",
"highrise"
] |
6,117,150 | 1 | 6,117,273 | null | 2 | 310 |
I'm still learning CSS, so please pardon me if this is something that is easily solved or taught in a class or book.
Here's what I see:

The two gray boxes are placeholders for image files further up the page. Those live in a different div that closes out before reaching the footer div. The source for the footer is:
```
<div id="footer">
<div class="column">
Column 1<br>
<a href="#">link</a> <br/>
<a href="#">link</a> <br/>
<a href="#">link</a> <br/>
<a href="#">link</a> <br/>
<a href="#">link</a> <br/>
<a href="#">link</a>
<br><br>
<a href="#">link</a> <br/>
<a href="#">link</a> <br/>
<a href="#">link</a> <br/>
<a href="#">link</a> <br/>
<a href="#">link</a> <br/>
</div>
<div class="column">
Column 2<br>
<a href="#">link</a> <br/>
<a href="#">link</a> <br/>
<a href="#">link</a> <br/>
<a href="#">link</a> <br/>
<a href="#">link</a>
<br><br>
<a href="#">link</a> <br/>
<a href="#">link</a> <br/>
</div>
</div>
```
Here is the CSS for the footer:
```
#footer {
clear: both;
min-height: 100px;
background-color: #B0C4D1;
padding-left: 8%;
}
.column {
width: 200px;
float: left;
}
```
So if I make `min-height` long enough, then the blue covers all of the links in the footer, which is good. But I'd like to understand why I would need to do that. Why don't the columns in the footer div qualify as content so that the background gets filled up? If someone would link me to the relevant terms/tutorials explaining this, I'd really appreciate it. I'm having trouble coming up with the right words to find my answer.
|
div has no content?
|
CC BY-SA 3.0
| null |
2011-05-24T21:30:00.247
|
2011-05-24T21:57:03.617
| null | null | 177,541 |
[
"css"
] |
6,117,240 | 1 | 6,117,527 | null | 4 | 2,677 |
I have a LinearLayout that has four views layed out horizontally. The first and last component are a set size. For the inner two views I want to just share the available space 50:50. I set each to a weight of "1" but when the views are layed out, the views are different sizes depending on the content they hold.

Here is my layout xml for reference.
```
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="wrap_content">
<ImageView
android:id="@+id/status"
android:src="@drawable/white"
android:paddingRight="10dip"
android:layout_height="35dip"
android:layout_width="35dip">
</ImageView>
<TextView android:id="@+id/name"
android:text="Name"
android:layout_height="fill_parent"
android:layout_toRightOf="@id/status"
android:layout_width="wrap_content"
android:layout_weight="1"
android:textSize="25dip">
</TextView>
<TextView android:id="@+id/description"
android:text="Description"
android:layout_toRightOf="@id/name"
android:layout_height="fill_parent"
android:layout_width="wrap_content"
android:layout_weight="1"
android:textSize="25dip">
</TextView>
<TextView android:id="@+id/time"
android:text="Time"
android:layout_width="wrap_content"
android:layout_height="fill_parent"
android:layout_toRightOf="@id/description"
android:textSize="25dip">
</TextView>
</LinearLayout>
```
Obviously these aren't the actual column names but I changed them for privacy purposes. This layout is used by a ListView which changes the text of each view to be whatever value its presented. The name and description fields should line up since they're both given 50% of the remaining screen but when the name is longer the description is shifted right. Why?
|
Uneven LinearLayout weight distribution
|
CC BY-SA 3.0
| null |
2011-05-24T21:39:30.767
|
2011-05-24T22:09:31.437
|
2011-05-24T21:50:30.513
| 618,551 | 618,551 |
[
"android",
"android-linearlayout"
] |
6,117,445 | 1 | 6,117,636 | null | 2 | 2,333 |
I'm trying to write text on a canvas using drawText. And i use font size 20 here.

But the text appears to be not very nice. Does any one knows how to change the font in to a better one. If there are ways other than using drawText please give me some examples.
|
How to make Android drawText fonts better looking?
|
CC BY-SA 3.0
| 0 |
2011-05-24T21:59:28.640
|
2011-05-24T22:23:33.760
| null | null | 393,639 |
[
"android"
] |
6,117,688 | 1 | null | null | 2 | 1,124 |
I have an query that uses the `XML` data type. (You can see the query [here](https://gist.github.com/989888#file_gistfile1.sql).)
Just to be clear that means that my query has something like this in it:
```
declare @xmlDoc XML
```
When I try to paste my query in as a Dataset for a SQL Server Reporting Services Report in BIDS (Visual Studio 2008) a dialog pops asking me to define my parameters:

The problem is that I don't have any Parameters! I define and use @xmldoc in the query (it runs with no issues in SSMS).
It does not really seem to matter what I enter here. This is always the next dialog box:

"OK" closes the Dataset properties and I get no fields setup for me. "Cancel" gets me back to the properties to try again. If I put in a query without the `XML` data type then it works fine.
I am stumped... I can only conclude that SSRS does not support the XML data type.
Is that true? Is there a work around?
|
Does SSRS 2008 support the XML Datatype in SQL Queries?
|
CC BY-SA 3.0
| 0 |
2011-05-24T22:31:21.403
|
2011-05-25T06:22:51.140
|
2011-05-24T22:42:17.223
| 16,241 | 16,241 |
[
"sql-server",
"xml",
"sql-server-2008",
"ssrs-2008",
"reporting-services"
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.