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,434,495 | 1 | null | null | -1 | 1,711 |
I'm having error when it already comes in size of the shapes in dropdown..
see the attached image 
|
Selenium - "Locator_Detection_Failed"
|
CC BY-SA 3.0
| null |
2011-06-22T03:12:46.420
|
2011-11-26T06:21:59.280
|
2011-11-26T06:21:59.280
| 234,976 | 809,595 |
[
"selenium"
] |
6,434,880 | 1 | 6,434,908 | null | 2 | 679 |
I'm using a System.Windows.Forms.ListView control in my application with its View property set to "List". However, the content ends up being in coloumns instead of a single coloumn (ie. There are only horizontal scrollbars instead of vertical ones). Is there any way to display the data in a single coloumn?
|
.NET ListView in List Mode stop display in coloumns
|
CC BY-SA 3.0
| null |
2011-06-22T04:24:31.773
|
2011-06-22T04:29:16.003
| null | null | null |
[
"c#",
".net",
"winforms",
"listview"
] |
6,434,934 | 1 | null | null | 1 | 2,290 |
Using Qt 4.6 on Ubuntu 10.4
I have a QGraphicsView central widget in my MainWindow. Every time the program switches to a new level (Sokoban game), I want the MainWindow to adjust to the new size of the view. I mostly accomplished this by setting the maximum and minimum width/heights of both the mainwindow and view to the same thing, and this works most of the time, but on some smaller levels MainWindow only shrinks in one dimension, and leaves a white margin on one side like so:

It stays like that until I click in the view, at which point the MainWindow shrinks to the view. I can enter keystrokes before that to move my guy around and perform other commands and the margin will stay, it takes a mouse click to shrink it. I came up with a hackish fix by
```
move( geometry().x() + 1, geometry().y() ); // force mainWindow to update
move( geometry().x() - 1, geometry().y() ); // hackish but only thing that works
```
but this seems lame and most likely not portable, although I'm not sure this problem exists on other platforms. Any ideas?
|
QMainWindow - resizing problem with QGraphicsView
|
CC BY-SA 3.0
| null |
2011-06-22T04:34:48.580
|
2011-06-22T20:31:40.677
| null | null | 809,192 |
[
"qt4",
"resize",
"qgraphicsview",
"qmainwindow"
] |
6,435,148 | 1 | 6,435,429 | null | 1 | 1,349 |
One of my delphi projects produces this error message when closing the IDE.
This is not the same as 'List Index out of bounds(0)' error.

Then it always shows another error: 'Invalid Pointer Operation'

Any ideas how i could locate where it is coming from?
|
Delphi 7 IDE - Index out of bounds in list read access
|
CC BY-SA 3.0
| null |
2011-06-22T05:09:51.313
|
2011-06-22T07:55:55.843
| null | null | 355,657 |
[
"delphi",
"ide",
"delphi-7"
] |
6,435,484 | 1 | 6,435,527 | null | 0 | 1,151 |
I had added a tab bar in my application dynamically as shown below:-
```
if (isLogin == TRUE) {
rootController = [[SettingsViewController alloc] init];
tabTitle = @"Settings";
navTitle = @"Settings";
tabImage = [UIImage imageNamed:@"icon1.png"];
}
else
{
root =TRUE;
rootController = [[RootViewController alloc] init];
tabTitle = @"Home";
navTitle = @"Login";
tabImage = [UIImage imageNamed:@"icon1.png"];
}
break;
case 1:
rootController = [[AboutUs alloc] init];
tabTitle = @"AboutUs";
navTitle = @"AboutUs";
tabImage = [UIImage imageNamed:@"icon2.png"];
break;
case 2:
rootController = [[ContactUsViewController alloc] init];
tabTitle = @"Contact Us";
navTitle = @"Contact Us";
tabImage = [UIImage imageNamed:@"icon3.png"];
break;
case 3:
rootController = [[MoreViewController alloc] init];
tabTitle = @"More";
navTitle = @"More";
tabImage = [UIImage imageNamed:@"icon4.png"];
break;
rootController.view.hidden = FALSE;
UINavigationController *subController = [[UINavigationController alloc]
initWithRootViewController:rootController];
subController.navigationBar.tintColor = [UIColor colorWithRed:(110.0/255.0) green:(184.0/255.0) blue:(71.0/255.0) alpha:1.0];
subController.navigationBar.topItem.title = navTitle;
subController.title = tabTitle;
subController.navigationItem.hidesBackButton =YES;
subController.tabBarItem.image = tabImage;
NSLog(@"%@",subController);
[controllers addObject:subController];
NSLog(@"%@",controllers);
[subController release];
[rootController release];
```
As a result it is showing the tab as below form:-

But I want to cutomise the default detected color of tab bar(Blue color) into orange and want tab bar to look like this:-

Please help me; how can I do this?
|
Change the color of customised tab bar in iphone
|
CC BY-SA 3.0
| null |
2011-06-22T05:51:16.060
|
2013-03-01T09:30:50.053
|
2011-06-22T06:02:25.123
| 24,424 | 755,094 |
[
"iphone"
] |
6,435,553 | 1 | 6,435,673 | null | 0 | 7,526 |
in my app i need to design like the following image 
i use table layout for this but i get like follwing:
TextViewTextViewTextView
.....
mycode:
```
.......
<TableLayout android:layout_width="fill_parent" android:layout_height="wrap_content" android:id="@+id/tableLayout1">
<TableRow android:id="@+id/tableRow1" android:layout_width="fill_parent"
android:layout_height="wrap_content">
<TextView android:layout_width="fill_parent" android:text="Your State"
android:layout_gravity="left" android:id="@+id/textView1"
android:layout_height="wrap_content">
</TextView>
<TextView android:layout_width="wrap_content" android:text="Your State"
android:layout_gravity="left" android:id="@+id/textView1"
android:layout_height="wrap_content">
</TextView>
</TableRow>
.........
```
my design is not shown as above image. i do not know how to design exact the above image. please help me
|
how to design a table in android
|
CC BY-SA 3.0
| null |
2011-06-22T05:59:40.693
|
2015-07-29T18:17:27.947
|
2011-12-19T13:42:24.990
| 1,104,926 | 694,240 |
[
"android",
"android-layout"
] |
6,435,668 | 1 | 6,435,682 | null | 11 | 21,857 |
How can I create a numeric text box in java swing , which has two buttons (up and down) which increments and decrements the value in the text box respectively. Also this text box must be editable with . Something like this

I tried by placing two buttons near a text box and manually doing the operation on button click.

Is there any other method in which I can do this in a better way and achieve a similar result as the first image.
Thanks :)
|
Create a numeric text box in java Swing with increment and decrement buttons
|
CC BY-SA 3.0
| 0 |
2011-06-22T06:15:11.387
|
2011-06-22T06:47:34.070
| null | null | 791,287 |
[
"java",
"swing",
"textbox",
"numeric"
] |
6,435,705 | 1 | 6,435,787 | null | 0 | 87 |
I am in need of a tool to show the size of a word according to how many occurrences it has (similar to twitter trending topics),

is there a software to do this?
if not, is Processing a good option for this?
Thanks a lot
edit,
tnx for the response!, no I know this is called [tag cloud](http://en.wikipedia.org/wiki/Tag_cloud) and can use the proposed software on the answer and others!, cheers!
I recommend [wordle](http://www.wordle.net/), as it organizes de words in different ways
|
How can I implement a (Trend Bubble)
|
CC BY-SA 3.0
| null |
2011-06-22T06:19:25.423
|
2011-06-23T00:00:00.243
|
2011-06-23T00:00:00.243
| 523,507 | 523,507 |
[
"graph",
"processing"
] |
6,435,782 | 1 | 6,435,811 | null | 2 | 985 |
It's a terminology question:
In the directed graph, What's the name of the node which does not have any incoming edge ()?
In my following example (B):

|
In the directed graph, What's the name of the node which does not have an incoming edge
|
CC BY-SA 3.0
| 0 |
2011-06-22T06:28:22.143
|
2011-06-22T06:32:13.037
|
2011-06-22T06:30:35.720
| 153,430 | 732,386 |
[
"graph",
"terminology",
"graph-theory"
] |
6,435,947 | 1 | 6,436,035 | null | 1 | 89 |
in MVC3 asp.net this is my controller statement:-
```
ViewBag.rawMaterialRequired = (from x in db.RawMaterial
join y in db.ProductFormulation on x.ID equals y.RawMaterialID
where y.ProductID == p select new { x.Description, y.Quantity });
```
this is my View Code related to it:-
```
@foreach(var album in ViewBag.rawMaterialRequired)
{
@album<br />
}
```
So output is:-
```
{ Description = Polymer 26500, Quantity = 10 }
{ Description = Polymer LD-M50, Quantity = 10 }
{ Description = Titanium R-104, Quantity = 20 }
```
but i need this type of answer:-

please suggest me what should i do for it?
Thank you in advance...
|
how can get value separately of a query
|
CC BY-SA 3.0
| 0 |
2011-06-22T06:44:25.433
|
2011-06-22T07:20:53.680
|
2011-06-22T06:50:07.843
| 495,041 | 887,872 |
[
"asp.net-mvc",
"asp.net-mvc-2",
"asp.net-mvc-3"
] |
6,436,090 | 1 | 6,436,684 | null | 1 | 4,451 |
I have developed a form in asp.net mvc3 which has multiple options to choose from. Please see the below image for clear picture. There are two groups "Accommodation" and "Pick up and drop" and these groups have multiple options to choose from. User should select only one option from each group but here I can select only one option from entire options i.e. I'm not able to choose both "Single sharing" and "Pick up and drop".
Is there any way I can distinguish between two radio button groups?
```
foreach (var facilityType in facilityTypeGroup.ProductPriceDisplayFacility)
{
<tr>
<td>
@Html.RadioButtonFor(m => m.SelectedChoice, @facilityType.FacilityTypeId + "_" + @facilityType.Price)
@facilityType.FacilityTypeName </td>
</tr>
}
```

|
Multiple Radio button groups in asp.net mvc3
|
CC BY-SA 3.0
| 0 |
2011-06-22T06:58:28.177
|
2011-06-22T08:09:37.187
|
2011-06-22T07:07:32.857
| 287,100 | 287,100 |
[
"asp.net-mvc-3",
"radio-button"
] |
6,436,119 | 1 | 6,449,413 | null | 0 | 131 |
>
[Why are my LINQ INSERTS not persisting in SQL Server CE 3.5?](https://stackoverflow.com/questions/1343816/why-are-my-linq-inserts-not-persisting-in-sql-server-ce-3-5)
I have a local database "Database1.sdf" and i'm trying to insert data into the table "User" using LinqToSql.
```
public void DBTest()
{
string con = "Data Source=|DataDirectory|\\Database1.sdf";
Database1 db = new Database1(con);
User user=new User();
user.ID=3;
user.Name="testdata";
db.User.InsertOnSubmit(user);
db.SubmitChanges();
var q = from t in db.User
select t;
foreach (var t in q)
{
Console.Out.WriteLine(t.Name);
}
}
```
The select query after the insertion works fine and shows the result, but the database is not updated. If i go and check the table manually it is empty. If i run the program again it doesn't throw any exception of primary key violation.

Thanks
|
LINQtoSQL Data not Inserting into SQL Combact Edition
|
CC BY-SA 3.0
| null |
2011-06-22T07:01:39.470
|
2011-06-23T04:43:18.443
|
2017-05-23T12:13:29.270
| -1 | 637,726 |
[
"c#",
"linq-to-sql",
"sql-server-ce"
] |
6,436,126 | 1 | null | null | 0 | 141 |

As you can see on my screenshot, the marker is placed beside of the correct coordinate position, how to make it placed on the correct position (in the center of the circle) ?
in my code :
```
Drawable icon = getResources().getDrawable(R.drawable.marker);
icon.setBounds(0, 0, icon.getIntrinsicWidth(), icon.getIntrinsicHeight());
```
are the values on the setBounds() are the positions that i should change to move the marker?
i've tried it but nothing changes
so, how to fix the position?
thanks
i love stackoverflow, hehe :D
|
How to position the marker to the correct position?
|
CC BY-SA 3.0
| 0 |
2011-06-22T07:02:15.733
|
2011-06-22T07:07:14.513
| null | null | 785,452 |
[
"android",
"android-maps"
] |
6,436,142 | 1 | 8,853,137 | null | 3 | 960 |
I found a weird bug that only occurs in Internet Explorer (6 through 9).
Take for example the URL `http://www.spiegel.de/#any_anchor_value` which I open in any Internet Explorer. (From what I can tell it works with any URL)
As soon as the page finishes loading, that anchor tag is attached to the title of the browser window. (In this case even twice…)

When I inspect the DOM of this page, it even appears in the title tag:

This works on any website and in any version of the Internet Explorer from 6 through 9.
I can't seem to find much information on this nor have I ever heard of it or even noticed it.
What's the reason for this? What am I missing?
|
URL anchor is attached to the title attribute in Internet Explorer — why?
|
CC BY-SA 3.0
| 0 |
2011-06-22T07:04:41.070
|
2012-01-13T15:43:01.863
| null | null | 154,910 |
[
"html",
"internet-explorer",
"dom",
"anchor"
] |
6,436,263 | 1 | 6,482,009 | null | 1 | 1,299 |
I have a data-structure (in plist) that looks something like this:

What i have here is an `NSArray` of `NSDictionary`. Each `NSDictionary` has two keys:
```
Title
Link (recursive)
```
This forms a tree like structure, with variable length branches i.e. some branches can die at level 0, and some can be as large as level 3 or more.
I'm showing this structure in `UITableView` (with a little help from `UINavigationController`). This was easy enough.
> Note: On tapping the Leaf Node
(represented by `NSDictionary` object
with or as "Link"), an
event is triggered i.e. Model window
appears with some information.
Now, i need to add Search support.
Search bar will appear above `UITabeView` (for Level 0). I need to come-up with a way to search this tree like structure, and then show the results using `UISearchDisplayController`, and then allow users to navigate the results as well.
> How?... is where i'm a little stuck
and need some advise.
The search has to be quick, because we want .
p.s. I've thought of translating this data structure to CoreData, and it's still lurking in my mind. If you think it can help in this case, please advise.
---
Edit:
Here's my current solution, which is working (by the way):
```
#pragma mark -
#pragma mark UISearchDisplayController methods
- (void)searchBarResultsListButtonClicked:(UISearchBar *)searchBar {
NSLog(@"%s", __FUNCTION__);
}
- (BOOL)searchDisplayController:(UISearchDisplayController *)controller shouldReloadTableForSearchString:(NSString *)searchString {
NSLog(@"%s", __FUNCTION__);
[self filterCategoriesForSearchText:searchString
scope:[controller.searchBar selectedScopeButtonIndex]];
// Return YES to cause the search result table view to be reloaded.
return YES;
}
- (BOOL)searchDisplayController:(UISearchDisplayController *)controller shouldReloadTableForSearchScope:(NSInteger)searchOption {
NSLog(@"%s", __FUNCTION__);
[self filterCategoriesForSearchText:[controller.searchBar text]
scope:[controller.searchBar selectedScopeButtonIndex]];
// Return YES to cause the search result table view to be reloaded.
return YES;
}
#pragma mark UISearchDisplayController helper methods
- (void)filterCategoriesForSearchText:(NSString *)searchText scope:(NSInteger)scope {
self.filteredCategories = [self filterCategoriesInArray:_categories forSearchText:searchText];
NSSortDescriptor *descriptor = [[[NSSortDescriptor alloc] initWithKey:KEY_DICTIONARY_TITLE ascending:YES] autorelease];
[self.filteredCategories sortUsingDescriptors:[NSArray arrayWithObjects:descriptor, nil]];
}
- (NSMutableArray *)filterCategoriesInArray:(NSArray *)array forSearchText:(NSString *)searchText {
NSMutableArray *resultArray = [NSMutableArray array];
NSArray *filteredResults = nil;
// Apply filter to array
// For some weird reason this is not working. Any guesses? [NSPredicate predicateWithFormat:@"%@ CONTAINS[cd] %@", KEY_DICTIONARY_TITLE, searchText];
NSPredicate *filter = [NSPredicate predicateWithFormat:@"Title CONTAINS[cd] %@", searchText];
filteredResults = [array filteredArrayUsingPredicate:filter];
// Store the filtered results (1)
if ((filteredResults != nil) && ([filteredResults count] > 0)) {
[resultArray addObjectsFromArray:filteredResults];
}
// Loop on related records to find the matching results
for (NSDictionary *dictionayObject in array) {
NSArray *innerCategories = [dictionayObject objectForKey:KEY_DICTIONARY_LINK];
if ((innerCategories != nil) && ([innerCategories count] > 0)) {
filteredResults = [self filterCategoriesInArray:innerCategories forSearchText:searchText];
// Store the filtered results (2)
if ((filteredResults != nil) && ([filteredResults count] > 0)) {
[resultArray addObjectsFromArray:filteredResults];
}
}
}
return resultArray;
}
```
|
Search NSArray of NSDictionary (which contains NSArray of NSDictionary, repeatedly)
|
CC BY-SA 3.0
| null |
2011-06-22T07:16:22.447
|
2011-06-26T03:43:00.647
|
2011-06-22T11:19:15.420
| 49,739 | 49,739 |
[
"ios",
"search",
"tree",
"nsarray",
"nsdictionary"
] |
6,436,495 | 1 | 6,437,611 | null | 2 | 447 |
I use a png image in my project that is not displayed in emulator but it can be displayed in phone. Then i open it with photoshop, save as png and use that image. It is displayed both emulator and phone. I couldn't figure out the difference of original and edited one. And is there any setting of emulator for image display? And how can i understand any png file is supported or not?

original image

edited image
|
Png Image support of J2ME WTK Emulator
|
CC BY-SA 3.0
| 0 |
2011-06-22T07:37:59.657
|
2017-07-31T05:32:53.023
|
2017-07-31T05:32:53.023
| 1,033,581 | 553,197 |
[
"java",
"java-me",
"png",
"image-formats",
"java-wireless-toolkit"
] |
6,436,501 | 1 | 6,937,162 | null | 26 | 13,289 |
If I add a `DropShadowEffect` to an parent element the text of the child elements are blurred. Why?
```
<Grid>
<Grid.Effect>
<DropShadowEffect />
</Grid.Effect>
<Grid.ColumnDefinitions>
<ColumnDefinition />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition />
</Grid.RowDefinitions>
<TextBlock Background="White">Test</TextBlock>
</Grid>
```
Update:
with shadow

without shadow

|
WPF: Why does text and elements blur if I use dropshadow effect on a parent item
|
CC BY-SA 3.0
| 0 |
2011-06-22T07:38:34.913
|
2013-02-20T05:05:10.633
|
2013-02-20T05:05:10.633
| 305,637 | 488,794 |
[
"wpf",
"xaml",
"blur",
"dropshadow"
] |
6,436,513 | 1 | 7,794,089 | null | 6 | 1,673 |
I was just surfing out the site [Khanacademy.org](http://Khanacademy.org), and just seeing their practice session, when i came across [this page](http://www.khanacademy.org/exercisedashboard), Here I saw something odd, they use google maps to create the structure shown below:

[this page](http://www.khanacademy.org/exercisedashboard)
|
Use Google Maps to make a Tree Structure as in Khanacademy.org
|
CC BY-SA 3.0
| 0 |
2011-06-22T07:40:24.823
|
2011-10-18T08:54:19.660
| null | null | 668,008 |
[
"google-maps"
] |
6,436,756 | 1 | 6,437,167 | null | 2 | 2,157 |
I have a uitableview with 2 cells (custom tableviewcells) and a button for login. I made them programmatically. Now I want to put a background image behind the 2 custom cells and the button. I went into IB and put the image view on top of the tableview and then put a picture on it which I want as the background. Then I went into `viewDidLoad` and put this bit of code `tblSimpleTable.backgroundColor = [UIColor clearColor];` to clear the tableviews background colour.
It now looks like this:

But the background does not appear. Does anyone know how to fix this?
Thanks.
```
- (void)viewDidLoad {
[super viewDidLoad];
self.dataSourceArray = [NSArray arrayWithObjects:
[NSDictionary dictionaryWithObjectsAndKeys:
@"UITextField", kSectionTitleKey,
@"TextFieldController.m: textFieldNormal", kSourceKey,
self.textFieldNormal, kViewKey,
nil],
nil];
UIButton *loginButton = [UIButton buttonWithType:UIButtonTypeRoundedRect];
loginButton.frame = CGRectMake(60,140,200,38); // position in the cell and set the size of the button
[loginButton setTitle:@"Login" forState:UIControlStateNormal];
// add targets and actions
[loginButton addTarget:self action:@selector(buttonClicked:) forControlEvents:UIControlEventTouchUpInside];
// add to a view
[self.view addSubview:loginButton];
tblSimpleTable.backgroundColor = [UIColor clearColor];
//tblSimpleTable.backgroundView = nil;
//UIImageView *imageView = [[UIImageView alloc] initWithImage:@"Background-Red.png"];
//imageView.frame = tblSimpleTable.frame;
//tblSimpleTable.backgroundView = imageView;
self.title = NSLocalizedString(@"TextFieldTitle", @"");
// we aren't editing any fields yet, it will be in edit when the user touches an edit field
self.editing = NO;
}
```
|
UITableView not showing background image
|
CC BY-SA 3.0
| null |
2011-06-22T08:05:18.983
|
2011-06-22T09:04:33.367
|
2011-06-22T09:04:33.367
| 735,746 | 735,746 |
[
"iphone",
"uitableview",
"uiimageview",
"uibutton"
] |
6,436,767 | 1 | 6,436,802 | null | 0 | 173 |
is there any possibility to change the properties of the last view in the layout to change its size to fit to the bottom of the whole screen (in any screen density).
Here is a sample image of my layout:

The layout contains a ScrollView with a LinearLayout as only child. The last item in this LinearLayout is a TableView with a grey gradient as background.
|
Make last view fit to bottom of screen
|
CC BY-SA 3.0
| null |
2011-06-22T08:07:02.393
|
2011-06-22T08:23:05.863
| null | null | 221,194 |
[
"android",
"layout"
] |
6,436,781 | 1 | null | null | 1 | 566 |
I have a gridview of images in android. When i click any item on it, i want to show a new set of items over it. This is the screen shot .

Can this be done using gridview? Also what should be the type of view which must come over the gridview? The background should become preferably faded.
|
GridView in android
|
CC BY-SA 3.0
| 0 |
2011-06-22T08:08:33.753
|
2011-06-22T09:21:49.780
| null | null | 799,570 |
[
"android",
"android-gridview"
] |
6,436,844 | 1 | 6,436,929 | null | 0 | 923 |
I have a Json data retrieved from facebook using graph api, now i am going to parse that data, i decoded that json
```
$decodedjson= json_decode($jsondata);
```
after that i got data in following format.

i write
```
$id= $decodedjson->message_id;
```
to get the id,
the attachment is an other object, please tell me how can i access the attachment, media, href, alt and the video , display_url and so on, name etc
Thanks
|
fetching data from json using php?
|
CC BY-SA 3.0
| null |
2011-06-22T08:14:43.380
|
2011-06-24T03:32:42.927
| null | null | 614,249 |
[
"facebook-graph-api",
"json"
] |
6,436,862 | 1 | 6,436,893 | null | 1 | 3,631 |
i have been trying to have a drop down menu opon mouseover of the "profile" image button.
by using only css, this is what i achieve.
i also added text decoration to none but the underline still exist.

I have also tried using javascript but it doesnt work out for me.
Would any1 help enhancing this?
my html code:
```
<td class="header_button ">
<div id="menu">
<ul id="Ul1">
<li >
<asp:ImageButton runat="server"
ImageUrl="../img/Button/Profile.png" CssClass="profile_dropdown"
onclick="btnMyProfile_Click" />
</li>
<li class="item" >
<a href="#">Edit Profile</a>
</li>
<li class="item">
<a href="#">My Follow</a>
</li>
<li class="item">
<a href="#">My Uploads</a>
</li>
<li class="item">
<a href="#">My Child Profile</a>
</li>
</ul>
</div>
<div style="clear:both"></div>
</td>
```
my css code:
```
.profile_dropdown
{
height:75px;
weight:75px;
position:static;
}
#menu ul .item
{
display: none;
text-decoration: none;
background: #222222 85% 55% no-repeat;
font-family: 'Century Gothic';
font-size: large;
font-weight: bold;
color: #9FC54E;
white-space: nowrap;
}
#menu ul:hover .item{display:block;}
#menu{margin-top:-22px;position:fixed}
```
|
image button with drop down menu
|
CC BY-SA 3.0
| null |
2011-06-22T08:16:48.730
|
2011-06-22T08:19:28.393
| null | null | 799,184 |
[
"css"
] |
6,436,945 | 1 | 6,438,444 | null | 0 | 680 |
I have a server side service called `ConstructionManager`, one of its operation is `GetAll()` which return a list of constructions. `Construction` is a data contract, and there are several types which inherit from `Construction` (`Buildings`, `Apartments` etc..)
When I send the list of apartments all is good, all properties is on their place, but when i receive that list at client side, and see what it is in the received object at run time, in Non Public Members i saw all the properties that are specific to type that inherits from `Construction`, like `Rooms`, `Floor`, but in Result View it shows all properties have the value "0", and not the value with which they were sent.
On data contract Construction, at the top of class, are KnownType attributes to inherited classes.
It maybe helpful to know, I use Web Service Software Factory.
Sorry for my bad English.



|
WCF, return list of Known Types
|
CC BY-SA 3.0
| null |
2011-06-22T08:24:09.420
|
2011-06-22T10:34:32.557
|
2011-06-22T09:21:53.987
| 13,302 | 745,682 |
[
"wcf",
"web-services",
"known-types"
] |
6,437,180 | 1 | 6,437,228 | null | 0 | 606 |
How can I make the background of the accessory clear? I've managed to set the rest of the elements to `[UIColor clearcolor]` but it doesn't work for the accessory...
Here's what my progress looks like:

```
[self.accessoryView setOpaque: NO];
self.accessoryView.backgroundColor = [UIColor clearColor];
self.backgroundColor = [UIColor clearColor];
self.contentView.backgroundColor = [UIColor colorWithPatternImage:[UIImage imageNamed:@"Icon.png"]];
self.accessoryView.backgroundColor = [UIColor clearColor];
```
Thanks for any help you guys can offer!
|
iPhone Background Image for Table Cell
|
CC BY-SA 3.0
| null |
2011-06-22T08:45:25.173
|
2012-03-05T10:13:32.423
|
2012-03-05T10:13:32.423
| 689,356 | 701,748 |
[
"iphone",
"background-image",
"tablecell"
] |
6,437,430 | 1 | 6,451,819 | null | 4 | 535 |
I have a problem with a game i am programming. I am making some sort of security game and i would like to have some visual line of sight. The problem is that i can't restrict my line of sight so my cops can't see through the walls. Below you find the design, in which they can look through windows, but not walls. Further below you find an illustration of what my problem is exactly.

this is what it looks like now. As you can see, the cops can see through walls.

This is the map i would want to use to restrict the line of sight.

So the way i am programming the line of sight now is just by calculating some points and drawing the sight accordingly, as shown below. Note that i also check for a hittest using bitmapdata to check whether or not my player has been spotted by any of the cops.
```
private function setSight(e:Event=null):Boolean
{
g = copCanvas.graphics;
g.clear();
for each(var cop:Cop in copCanvas.getChildren())
{
var _angle:Number = cop.angle;
var _radians:Number = (_angle * Math.PI) / 180;
var _radius:Number = 50;
var _x1:Number = cop.x + (cop.width/2);
var _y1:Number = cop.y + (cop.height/2);
var _baseX:Number = _x1 + (Math.cos(_radians) * _radius);
var _baseY:Number = _y1 - (Math.sin(_radians) * _radius);
var _x2:Number = _baseX + (25 * Math.sin(_radians));
var _y2:Number = _baseY + (25 * Math.cos(_radians));
var _x3:Number = _baseX - (25 * Math.sin(_radians));
var _y3:Number = _baseY - (25 * Math.cos(_radians));
g.beginFill(0xff0000, 0.3);
g.moveTo(_x1, _y1);
g.lineTo(_x2, _y2);
g.lineTo(_x3, _y3);
g.endFill();
}
var _cops:BitmapData = new BitmapData(width, height, true, 0);
_cops.draw(copCanvas);
var _bmpd:BitmapData = new BitmapData(10, 10, true, 0);
_bmpd.draw(me);
if(_cops.hitTest(new Point(0, 0), 10, _bmpd, new Point(me.x, me.y), 255))
{
gameover.alpha = 1;
setTimeout(function():void{ gameover.alpha = 0; }, 5000);
stop();
return true;
}
return false;
}
```
So now my question is: Is there someone who knows how to restrict the view so that the cops can't look through the walls? Thanks a lot in advance.
ps: i have already looked at [this](http://www.emanueleferonato.com/2007/04/29/create-a-flash-game-like-security-part-2/) tutorial by emanuele feronato, but i can't use the code to restric the visual line of sight.
|
How to implement line of sight restriction in actionscript?
|
CC BY-SA 3.0
| 0 |
2011-06-22T09:05:22.290
|
2011-06-23T09:17:33.407
| null | null | 626,609 |
[
"flash",
"actionscript-3"
] |
6,437,538 | 1 | 6,438,307 | null | 10 | 5,858 |
my company has recently upgraded from VS2005 to VS2010. We have a huge project which uses a lot of modules which are being linked statically into the exe. But there seem to be some issues with linking in VS2010.
To explain our problem, we've built a minimal example project which is composed as shown on this graphic:

There is an application using one function from library A. Library A calls one function of each library B and library C. Those two libraries call a function provided by library D.
For under we set everything to except for which is set to true. The only reference added is linking to . For each of the libraries all the settings are set to false. Library A gets references to only and , as well as those two getting references to only. has no references.
When building the application it works without problems. The application notices that library A is using library B and C which are using library D, so it knows it has to link those libraries, too. The libs are linked into the exe without problems.
Now we change something in, let's say, . Just a little difference, only one letter. Now we try to build the application again, it notices the change and re-compiles , but: It doesn't link to it anymore. The result are linking errors in and , because they use . We have to run first, in order to force the complete building and everything is linked again.
This happens for both the minimal example as well as for our main project. Of course, we can add each of the libraries as additional dependency for the exe but it would be nice if it would work just like it does when building the project for the first time and continue to work after changes in the code. We noticed that when setting to , that it works again, but then it doesn't link the *.lib files but the *.obj files which is not what we want of course.
Has anyone made similar experiences or has anyone a solution for this issue? Is this a buggy behavior of VS2010?
TIA.
p.s.: All libraries and executables are native C++.
---
(Workaround taken from [this site](https://connect.microsoft.com/VisualStudio/feedback/details/638534/unresolved-externals-when-build-a-vc-project-with-chained-static-lib-dependencies#details))
In the file `%ProgramsFile%\MSBuild\Microsoft.cpp\v4.0\Microsoft.CPPBuild.Targets` there is a line
```
<Target Name="GetResolvedLinkLibs" Returns="@(LibFullPath)" DependsOnTargets="$(CommonBuildOnlyTargets)">
```
If you change that line to
```
<Target Name="GetResolvedLinkLibs" Returns="@(LibFullPath)" DependsOnTargets="$(CommonBuildOnlyTargets);ResolvedLinkLib">
```
the linking works properly and all needed libs are linked to implicitly. The linker output not only shows lib_a.lib but also all other chained libs, lib_b, lib_c, lib_d without having them added manually as dependencies to the exe.
This seems to be more a workaround then a solution, maybe there is a proper way to achieve implicit linking.
|
VS2010 static linking issue
|
CC BY-SA 3.0
| 0 |
2011-06-22T09:14:21.457
|
2017-05-09T00:58:13.973
|
2011-06-22T12:27:48.387
| 305,694 | 305,694 |
[
"c++",
"visual-studio",
"visual-studio-2010",
"linker",
"static-linking"
] |
6,437,565 | 1 | null | null | 2 | 7,895 |
I've got a grid in my page with a CheckboxModel set on it. It's showing the names and checkboxes but I don't know how to bind the boolean column from the store to the column from the selection model. I've found examples using CheckColumn instead but this throws an error that it doesn't have a constructor. Must be a change in v4. Would really appreciate some help with this please.
```
Ext.define('Roles', {
extend: 'Ext.data.Model',
fields: ['Id', 'Name', 'Selected'],
proxy: {
type: 'ajax',
url: '/tpn/Types/AjaxList',
reader: {
type: 'json',
root: 'rows',
totalProperty: 'total',
successProperty: 'success'
},
listeners: {
exception: function (proxy, type, action, options, response, arg) {
Ext.MessageBox.alert('Error', Ext.decode(type.responseText).error);
}
}
}
});
var roleStore = Ext.create('Ext.data.Store', {
model: 'Roles'
});
var sm = Ext.create('Ext.selection.CheckboxModel');
var grid = Ext.create('Ext.grid.Panel', {
store: roleStore,
selModel: sm,
columns: [{
header: 'Name',
dataIndex: 'Name',
flex: 1
}],
renderTo: 'RoleGrid',
autoHeight: false,
height: 200,
frame: false
});
```

|
Ext JS grid panel with checkbox column
|
CC BY-SA 3.0
| null |
2011-06-22T09:16:04.340
|
2013-05-14T00:01:27.887
|
2013-05-14T00:01:27.887
| 1,887,779 | 10,756 |
[
"extjs",
"gridpanel"
] |
6,437,606 | 1 | 6,451,388 | null | 6 | 10,131 |
I have just created a new asp.net 3.5 web application. I went to the application property and changed the platform target to x64. I didn't write any code and i have not changed anything. Next i hit start debugging in Visual Studio. The following error occured:
> Could not load file or assembly
"SOLUTION NAME", Version=1.0.0.0,
Culture=neutral, PublicKeyToken=null'
or one of its dependencies. An attempt
was made to load a program with an
incorrect format.
Any one have an idea how to solve this?
Thanks.
I have these warnings:
> Warning 1 Assembly generation --
Referenced assembly
'System.EnterpriseServices.dll'
targets a different processor
Warning 2 Assembly generation --
Referenced assembly 'mscorlib.dll'
targets a different processor
Warning 3 Assembly generation --
Referenced assembly 'System.Web.dll'
targets a different processor
Warning 4 Assembly generation --
Referenced assembly 'System.Data.dll'
targets a different processor
Configuration manager:

|
Could not load assembly error when changing to x64 platform
|
CC BY-SA 3.0
| 0 |
2011-06-22T09:19:36.430
|
2018-01-30T11:50:08.333
|
2011-06-23T08:39:19.420
| null | null |
[
"c#",
"asp.net",
"debugging",
"dll",
"configuration"
] |
6,438,076 | 1 | null | null | 11 | 1,913 |

How do I make an irregular shaped Aero window like this one?
Look in the lower right corner!
[This program](http://www.oneupindustries.com/bins/) also does it.
This also does it! >_< Even more...

|
Custom Shaped Aero Windows in C#? Like THESE!
|
CC BY-SA 3.0
| 0 |
2011-06-22T10:01:11.107
|
2011-08-16T23:51:23.907
|
2011-06-22T10:15:48.620
| 485,098 | 485,098 |
[
"c#",
"aero"
] |
6,438,139 | 1 | 6,438,425 | null | 0 | 333 |
I have a category table like this:

I can list categories as list and subcategories as dropdown list but My designer send me a design that categories have subcategories with the same name:

How can I manage this type of subcategories?
Thanks in advance
|
Subcategories with the same name in mysql
|
CC BY-SA 3.0
| null |
2011-06-22T10:07:36.850
|
2011-06-22T10:32:48.770
| null | null | 677,052 |
[
"php",
"mysql"
] |
6,438,193 | 1 | 6,440,120 | null | 2 | 565 |
I want to match a product number (column 1) and a year (column 2) for Country A with the same product and year for Country B to be able to subtract the corresponding trade numbers (column 3 minus column 6) for the countries in that year and in that product. When no counterpart is found I want that post to be thrown out.
In the example in the link below I have manually done this until row 22 (except subtracting the trade figures). The row below (23) for instance says that product 030420 was traded in 1995 at value 2.823, but no trade in that product in that year is recorded in country B, so that post I want deleted. Correspondingly, in Country B, trade of product 030420 is recorded in 1994, but there is no counterpart in country A, so that post also should be deleted.
Even though the data in the example below is shown in excel (I tried to solve this in excel but it got tricky) I now have the data stored in a matrix in Matlab and want to write a code for it, but I'm quite new to Matlab/coding. In words it might be something like:
- - -
And then of course repeat the procedure for the rest of the sample.
Example:

If anyone feels like reading this shorter essay and have any suggestions it'd be much appreciated.
|
Sorting the data in Matlab
|
CC BY-SA 3.0
| null |
2011-06-22T10:12:14.023
|
2015-11-23T12:17:08.287
|
2015-11-23T12:17:08.287
| 4,370,109 | 790,466 |
[
"matlab",
"sorting",
"join"
] |
6,438,322 | 1 | 6,438,646 | null | 3 | 3,966 |
I am doing win form project.(C#). In that project i am willing to add welcome screen. So i created a welcome screen. But, It want to show a few minitute and automatically closed and open login screen.
```
System.Threading.Thread.Sleep(1500);
LogIn n = new LogIn();
n.Show();
```
I try this code in form shown,load, activate events. BUt no use. Any one know what to do?.

|
How to display Welcome Screen in Winform?
|
CC BY-SA 3.0
| 0 |
2011-06-22T10:23:53.540
|
2013-06-03T08:27:09.577
|
2011-06-22T11:13:01.403
| 184,977 | 776,226 |
[
"c#",
".net",
"winforms"
] |
6,438,438 | 1 | 6,438,541 | null | 1 | 2,911 |
i need to add two boxes in the north section of a [layout border](http://docs.sencha.com/ext-js/4-0/#/api/Ext.layout.container.Border)
it would be something like this : in red the boxes / panels i need to add (but i dont want to keep borders)

here is my try :
```
...
{
region: 'north',
split: true,
//xtype : 'box',
height: 100,
layout : 'anchor',
items: [{ xtype: 'box', id: 'header', height: 100, anchor: '70%',
html: '<h1> my title</h1>'},
{
xtype: 'panel', title: 'title', border: 'false', frame: false, height: 100,
html: '<h1> my info</h1>'
}]
}
...
```
the second panel doesnt work
thanks for ur help
|
add items in layout border - extjs
|
CC BY-SA 3.0
| null |
2011-06-22T10:34:00.043
|
2011-06-22T12:50:50.503
|
2011-06-22T10:39:10.370
| 745,378 | 745,378 |
[
"layout",
"extjs",
"border",
"extjs4",
"items"
] |
6,438,446 | 1 | null | null | 1 | 6,831 |
I need to show a Custom UIAlertView which is going to have an image as a background and two Custom Buttons which will be not the regular UIAlertView Buttons. These buttons will be customized as well and would have their own Artwork.

The example above has a background but I also want to add Custom Button on it.
I am following [this](http://joris.kluivers.nl/iphone-dev/?p=CustomAlert) guide but I don't think it address the Custom Button handling.
How to do that? Any ideas?
|
Custom UIAlertView with Custom Buttons
|
CC BY-SA 3.0
| null |
2011-06-22T10:34:42.547
|
2013-05-02T00:01:50.090
| null | null | 151,540 |
[
"iphone",
"objective-c",
"ios",
"ios4",
"uialertview"
] |
6,439,020 | 1 | 6,441,293 | null | 0 | 2,011 |
in this fiddle [http://jsfiddle.net/kralco626/t56xX/1/](http://jsfiddle.net/kralco626/t56xX/1/)
notice how in the `<th>` that I have a border around you can see that everything is pushed right. I want it left.
It is also a requirement that the icon and the text don't wrap. This requirement is met, but cannot be broken when fixing the alignment.
Any ideas?

Notice the space I colored in red? It seems to me that the icon and label are aligned right, rather than left. How man I align the whole thing to the left? If there is space I want it on the right.
I know it seems kinda of trivial in this picture, but when you add data and look at it in my situation is looks odd that the headers are right aligned and the data is left aligned.
Just to avoid further confusion, I want the icon on the left.
simplified example here: [http://jsfiddle.net/kralco626/Lz4QY/1/](http://jsfiddle.net/kralco626/Lz4QY/1/)
How would I get like 1px of "white space" on each side of the icon rather than lots of space on the left and none on the right?
|
left align text and icon in table header
|
CC BY-SA 3.0
| 0 |
2011-06-22T11:24:54.907
|
2011-06-22T14:16:55.367
|
2011-06-22T14:16:55.367
| 351,980 | 351,980 |
[
"html",
"css",
"jquery-ui"
] |
6,439,088 | 1 | 6,439,337 | null | 1 | 1,072 |
in my app i am using a list view. The data which i want to list out are from a database of my app and an xml server database.
For example i am getting some two set of data from server and store it in a array as follows
```
firstname = {arun, Arun, Rajesh}
lastname = {kumar, sundar, kannan}
```
Now again i am getting some data from my app database and store it in array as follows
```
first = {arul}
last = {raj}
```
Now i have combined the array list together as follows
```
firstname.addAll(first);
lastname.addAll(last);
```
Now i have the output as
```
{arun, Arun, Rajesh, arul}
{kumar, sundar, kannan, raj}
```
Now i want to list out these items as in the following image

how to do this, please help me......
|
problem with list view in android using arraylist items
|
CC BY-SA 3.0
| null |
2011-06-22T11:31:17.017
|
2012-10-06T12:45:06.437
| null | null | 596,364 |
[
"android",
"listview"
] |
6,439,577 | 1 | 6,439,666 | null | 0 | 2,691 |
I have two div's and I want to show them next to each other. In normal browsers it's no problem. In IE however, things are messed up:

The red squares point out the div's I'm talking about. The left div has the class "head_narrow", the image has the id "branche_header_image".
My CSS looks like this:
```
.head_narrow {width:380px; float:left;}
#branche_header_image {float:right;}
```
I am sure that the width of the two divs together is smaller than the width of the wrapper. What's going on?
|
How to float 2 div's next to each other in IE8
|
CC BY-SA 3.0
| null |
2011-06-22T12:10:35.590
|
2012-05-10T14:18:36.657
|
2012-05-10T14:18:36.657
| 44,390 | 543,847 |
[
"html",
"css",
"css-float"
] |
6,439,655 | 1 | 6,439,721 | null | 1 | 2,809 |
I am trying to convert a simple Java application to an applet. The application consists of a main.java and a gooey.java
>
```
package hellow_convert;
import javax.swing.JApplet;
public class main extends JApplet {
public static void main(String[] args) {
gooey gui = new gooey();
}
public void init()
{
gooey gui = new gooey();
}
public void stop() {}
}
```
>
```
package hellow_convert;
import javax.swing.*;
import java.util.*;
import java.awt.*;
public class gooey {
public JFrame f = new JFrame();
private JPanel pnlNorth = new JPanel();
private JButton btnNorth = new JButton("North");
private JMenuBar mb = new JMenuBar(); // MenuBar
private JMenu mnuFile = new JMenu("File"); // File Entry on Menu bar
private JMenuItem mnuItemAbout = new JMenuItem("About"); // About Entry
public gooey(){
f.setJMenuBar(mb);
mb.add(mnuFile);
mb.add(mnuHelp);
pnlNorth.add(btnNorth);
f.getContentPane().setLayout(new BorderLayout());
f.getContentPane().add(pnlNorth, BorderLayout.NORTH);
f.setBounds(100, 100, 200, 100);
}
}
```
It looks like this.

I just cant seem to make it run as an applet. When I run it in debug, an applet window opens, and then, the JFrame window pops up (just as in the application). As an application, it runs as expected, but how do I get controls into the Applet window?
I'm new to this. Any help is appreciated!
|
Problem converting Java Application to Applet
|
CC BY-SA 3.0
| 0 |
2011-06-22T12:17:12.743
|
2011-06-22T13:14:11.367
|
2011-06-22T12:40:18.127
| 759,019 | 759,019 |
[
"java",
"swing",
"applet",
"awt",
"japplet"
] |
6,439,823 | 1 | 6,472,778 | null | 0 | 444 |
I have two versions of Xcode installed: Xcode 4 in /Developer/ and Xcode 3 in /User/Xcode3/.
While working on an iPhone app in Xcode 4 I suddenly got this error:

I have no idea where or why this has started. I thought it might be related to [this post](https://stackoverflow.com/questions/1568930/interface-builder-and-xcode-integration-not-working), but the main solution which has received 32 up votes does not work for me. I did notice that my Xcode 4 folder was missing the InterfaceBuilder app for some reason which I then copied and pasted from my Xcode 3 folder. Not that it made any difference.
Any ideas?
---
Also, I should note that even though when I 'get info' on the project and it states that it defaults open to Xcode 4 when I double click on the project it opens with Xcode 3. Therefore I choose to open with Xcode 4. Still doesn't help.
---
Also, when I click on the .xib files, I just see string values, no GUI.
|
Unable to find a document class... com.apple.InterfaceBuilder3.CocoaTouch.XIB
|
CC BY-SA 3.0
| null |
2011-06-22T12:28:51.223
|
2011-06-24T19:23:17.753
|
2017-05-23T10:08:08.987
| -1 | 385,559 |
[
"iphone",
"objective-c",
"xcode",
"interface-builder",
"xcode4"
] |
6,439,819 | 1 | null | null | 0 | 545 |
I'm pretty new to WPF and needed a little help. I like to use custom UserControls as `Template`s instead of defining them in the `Style` or as `ControlTemplate`s mainly because I can see the outcome as I'm writing the code. This approach was working great when I started but I'm not sure how to check for triggers on my control and change stuff in the UserControl template. Hopefully someone understands what I'm trying to say here. Anyways here's some code. I want to know if an item from `ListView`[MenuTray] is selected inside the DataTemplate of the ListViewItem control...
```
<Window x:Class="Cellestus.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Width="1000" Height="650" Loaded="Window_Loaded">
<Window.Resources>
<ResourceDictionary Source="/Resources/GlobalResources.xaml" />
</Window.Resources>
<Viewbox x:Name="WindowView" Stretch="Fill">
<Canvas x:Name="WindowCanvas" Width="1000" Height="650" Background="{StaticResource MainWindow_Bg}">
<!-- other stuf... -->
<ListView x:Name="MenuTray" Width="1000" Height="60" Canvas.Bottom="0" Style="{StaticResource MenuTray_Style}" />
</Canvas>
</Viewbox>
</Window>
```
```
private void Window_Loaded(object sender, RoutedEventArgs e)
{
// MenuTrayItems.List: ObservableCollection<MenuTrayItem>
// MenuTrayItem: Class with a couple of string variables, Title, image, page and etc..
MenuTray.ItemsSource = MenuTrayItems.List;
}
```
```
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:class="clr-namespace:Cellestus.Classes"
xmlns:view="clr-namespace:Cellestus.Views">
<!-- Brushes -->
<ImageBrush x:Key="MainWindow_Bg" ImageSource="/Images/Backgrounds/MainWindow.png" Stretch="Fill" />
<LinearGradientBrush x:Key="Gradient_Black" StartPoint="0.5,0" EndPoint="0.5,1">
<GradientStop Color="#2c2c2c" Offset="0" />
<GradientStop Color="#151515" Offset="1" />
</LinearGradientBrush>
<LinearGradientBrush x:Key="Gradient_LightGray" EndPoint="0.5,1" StartPoint="0.5,0">
<GradientStop Color="#6B6B6B" Offset="1" />
<GradientStop Color="#D6D7D8" Offset="0" />
</LinearGradientBrush>
<LinearGradientBrush x:Key="Gradient_Gray" StartPoint="0.5,0" EndPoint="0.5,1">
<GradientStop Color="#515151" Offset="0" />
<GradientStop Color="#282828" Offset="1" />
</LinearGradientBrush>
<LinearGradientBrush x:Key="Gradient_Green" StartPoint="0.5,0" EndPoint="0.5,1">
<GradientStop Color="#77ba53" Offset="0" />
<GradientStop Color="#5a9c37" Offset="1" />
</LinearGradientBrush>
<!-- Templates -->
<ItemsPanelTemplate x:Key="HorizontalListView">
<StackPanel Orientation="Horizontal" />
</ItemsPanelTemplate>
<DataTemplate x:Key="MenuTrayItem_Template" DataType="{x:Type class:MenuTrayItem}">
<view:MenuTrayItemView />
</DataTemplate>
<!-- Styles -->
<Style x:Key="MenuTray_Style" TargetType="{x:Type ListView}">
<Setter Property="BorderThickness" Value="0" />
<Setter Property="Background" Value="{StaticResource Gradient_Black}" />
<Setter Property="ItemsPanel" Value="{StaticResource HorizontalListView}" />
<Setter Property="ItemTemplate" Value="{StaticResource MenuTrayItem_Template}" />
</Style>
</ResourceDictionary>
```
```
<UserControl x:Class="Cellestus.Views.MenuTrayItemView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
mc:Ignorable="d">
<UserControl.Resources>
<ResourceDictionary Source="/Resources/GlobalResources.xaml" />
</UserControl.Resources>
<Border x:Name="ItemContainer" Width="150" Height="60" CornerRadius="10" Background="{StaticResource Gradient_Gray}" MouseEnter="ItemContainer_MouseEnter" MouseLeave="ItemContainer_MouseLeave">
<StackPanel HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
<Image Margin="0,3,0,0" Width="60" Height="30" Source="{Binding Image, FallbackValue='/Images/Icons/MenuTray/default.png'}" />
<TextBlock Margin="3,0,0,0" Text="{Binding Title, FallbackValue='title'}" FontSize="10" Foreground="White" />
</StackPanel>
</Border>
</UserControl>
```
```
private void ItemContainer_MouseEnter(object sender, RoutedEventArgs e)
{
ItemContainer.Background = FindResource("Gradient_LightGray") as Brush;
}
private void ItemContainer_MouseLeave(object sender, RoutedEventArgs e)
{
ItemContainer.Background = FindResource("Gradient_Gray") as Brush;
}
```
Here's an image for the visual people:

Well if you made it this far. What I want to know is how to catch the `IsSelected` value on the `ListViewItem` control in my `DataTemplate` / UserControl(MenuTrayView.xaml) and change the background to the static resource "Gradient_Green". I know I can just handle the `MouseDown` event in my view, but I don't want to do that. I want to know if the item is actually selected.
|
Styles, datatemplates and triggers
|
CC BY-SA 3.0
| null |
2011-06-22T12:28:30.427
|
2011-08-16T07:07:17.893
|
2017-02-08T14:32:32.507
| -1 | 756,262 |
[
"c#",
"wpf",
"wpf-controls",
"styles"
] |
6,439,935 | 1 | 6,444,050 | null | 27 | 23,767 |
I would like to use mustache.js with jQuery in my HTML5 app, but I can't make all the component work together. Every file is found, there is no problem here (the template is loaded roght, I can see its value in the Firebug debugguer).
Here is my index.html :
```
<!DOCTYPE html>
<html lang="fr">
<head><meta charset="utf-8"></head>
<body>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.5/jquery.min.js"></script>
<script src="../js/jquery.mustache.js"></script>
<script src="../js/app.js"></script>
<div id="content"></div>
</body>
</html>
```
Here is my app.js file :
```
$(document).ready(function() {
var template = $.get('../templates/article.mustache');
$.getJSON('../js/article.json', function(view) {
var html = Mustache.to_html(template, view);
$("#content").append(html);
});
});
```
The jquery.mustache.js file is the one generated from [https://github.com/janl/mustache.js](https://github.com/janl/mustache.js) :
```
/*
Shameless port of a shameless port
@defunkt => @janl => @aq
See http://github.com/defunkt/mustache for more info.
*/
;(function($) {
// <snip> mustache.js code
$.mustache = function(template, view, partials) {
return Mustache.to_html(template, view, partials);
};
})(jQuery);
```
Noting is displayed. Firebug tells me
> Mustache is not defined
See capture :

I know something is missing, but I can't tell what.
Thanks.
---
:
The correct and complete answer to a example is the following :
- - - `$.mustache.to_html``Mustache.to_html`[@mikez302](https://stackoverflow.com/users/28324/mikez302)-
But, it is easy to read the json from another file :
You can finally also read the template from a file :
Working example (without loading order problems) :
|
Mustache.js + jQuery: what is the minimal working example ?
|
CC BY-SA 3.0
| 0 |
2011-06-22T12:36:22.963
|
2013-04-09T08:56:54.077
|
2017-05-23T12:09:21.297
| -1 | 233,692 |
[
"javascript",
"jquery",
"html",
"mustache"
] |
6,440,027 | 1 | 6,469,099 | null | 0 | 360 |
I'm trying to programmatically place an activity indicator on the login button. At the moment, my button looks like this:

How can I place an activity indicator on the left side of the Login text?
Thanks.
|
Programmatically put activity indicator on the login button
|
CC BY-SA 3.0
| null |
2011-06-22T12:43:08.813
|
2011-06-24T14:17:49.957
| null | null | 735,746 |
[
"authentication",
"uibutton",
"spinner",
"uiactivityindicatorview"
] |
6,440,062 | 1 | null | null | 2 | 111 |
This is what I see when my app crashes (for no obvious reason, sometimes on startup, sometimes much later on).
What on Earth can I do?

|
Xcode's debugger is giving me <????> (question marks). What do I do?
|
CC BY-SA 3.0
| null |
2011-06-22T12:45:14.290
|
2011-06-22T12:56:26.063
| null | null | 191,991 |
[
"multithreading",
"ios",
"xcode"
] |
6,440,328 | 1 | 6,465,040 | null | 1 | 581 |
When I try to show context menu in Android 3.0 instead of normal menu I see smth like in this picture - which is basically text edit/select menu.
On other devices (e.g. for SDK 5-9) it shows my context menu registered for my `TextView`
Anyone knows - what's going om?
|
Android 3.0 (HoneyComb) context menu question
|
CC BY-SA 3.0
| null |
2011-06-22T13:04:43.380
|
2011-06-24T08:09:46.283
| null | null | 472,270 |
[
"android",
"contextmenu",
"android-3.0-honeycomb"
] |
6,440,448 | 1 | 6,464,847 | null | 18 | 18,562 |
I want to have a `UIWebView` inside a `UIScrollView`. The UIWebView will sometimes go out of bounds of the iPhone screen so I need a way to scroll the view so I can see all the content (but I don't want to use the built in scrolling of the UIWebView). So I'm thinking of putting all the content inside of a UIScrollView and then making the height of the UIScrollView to equal the height of the UIWebView and other views that are in it.
Here's an image to help describing my problem:

|
iOS UIWebView inside a UIScrollView
|
CC BY-SA 3.0
| 0 |
2011-06-22T13:13:21.983
|
2015-10-13T08:50:58.523
| null | null | 294,661 |
[
"objective-c",
"ios",
"uiwebview",
"uiscrollview"
] |
6,440,473 | 1 | 6,440,548 | null | 0 | 134 |
I have a `UiView` which contains a `UiWebview`, `UIButton` and a `UITextView` as its elements.
I add this UiView to a UIScrollView and resize the frame so that the text view is not visible. When i click the button i resize the view to display the entire UIView including the UItextview.
The problem is , the text view appears below the view when i resize the frame. When i click expand it covers the text view too.
When view is first added i want the view to display just the webview and the button and when button is pressed it should display the text view.
 
How do i achieve it? Has it got to do with view hierachy?
|
View elements resize problem
|
CC BY-SA 3.0
| null |
2011-06-22T13:15:13.533
|
2011-06-22T13:43:26.087
| null | null | 372,026 |
[
"iphone",
"objective-c",
"ipad",
"uiviewcontroller"
] |
6,440,683 | 1 | null | null | 0 | 412 |
Hi I have list of days in given month and I would like to bind this list to datagrid control.
Here is method which create a list of date.
```
public List<DateTime> DaysOfMonth { get; set; }
public static List<DateTime> GetDates(int year, int month)
{
return Enumerable.Range(1, DateTime.DaysInMonth(year, month))
.Select(day => new DateTime(year, month, day))
.ToList();
}
public MainWindow()
{
InitializeComponent();
DaysOfMonth = GetDates(DateTime.Now.Year, DateTime.Now.Month);
DataContext = this;
}
```
XAML:
```
<DataGrid>
<DataGridTemplateColumn>
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<TextBlock Text="{Binding DaysOfMonth}"/>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
</DataGrid>
```
I would like achieve this look

|
Binding List<DataTime> to DataGrid Header
|
CC BY-SA 3.0
| null |
2011-06-22T13:30:52.230
|
2011-06-22T13:44:10.703
|
2011-06-22T13:42:19.050
| 273,200 | 808,448 |
[
"wpf",
"list",
"datetime",
"data-binding",
"datagrid"
] |
6,440,697 | 1 | 6,441,554 | null | 1 | 1,329 |
i am able to implement the table layout with header (row) and the column1 as in the picture. But I wish to display Col1 constantly on the screen even when the table is scrolled horizontally.
any work around?

|
table layout - fixed column - android
|
CC BY-SA 3.0
| 0 |
2011-06-22T13:31:47.480
|
2011-07-02T22:31:23.850
| null | null | 377,337 |
[
"android",
"android-layout",
"tablelayout"
] |
6,440,749 | 1 | 6,441,093 | null | 0 | 273 |
How can i hide the attribute:
```
[Display(Name = "dspName")]
```
alternatively the variable name from my variable in the (razor) view?
My problem is that I have defined a custom template for booleans that views the boolean like:
```
varname/displayName: 'box'
```
If I create the view with:
```
@Html.EditorForModel(Model)
```
the Result is:
```
varname/displayName
varname/displayName: 'box'
```
Result in Browser:

edit: my BooleanTemplate
```
@model System.Boolean?
@{
string name = string.Empty;
if (!string.IsNullOrWhiteSpace(ViewData.ModelMetadata.DisplayName))
{
name =ViewData.ModelMetadata.DisplayName;
}
else
{
name = ViewData.ModelMetadata.PropertyName;
}
}
@name:
@Html.CheckBox("", Model.HasValue ? Model : Model.Value)
```
|
Hide NameAttribute is RazorView
|
CC BY-SA 3.0
| null |
2011-06-22T13:35:41.347
|
2011-06-22T13:58:00.767
|
2011-06-22T13:46:18.420
| 639,367 | 639,367 |
[
"c#",
"asp.net-mvc",
"view",
"razor"
] |
6,441,403 | 1 | 6,441,635 | null | 0 | 146 |
I am getting a `SIGABRT` error when I'm trying to show my modalviewcontroller.
This is the code:
```
LoginPage *loginPage = nil;
loginPage = [[LoginPage alloc] initWithNibName:@"LoginPage" bundle:nil];
loginPage.modalPresentationStyle = UIModalPresentationFullScreen;
[self presentModalViewController:loginPage animated:YES];
[loginPage release];
```
I'm getting the error on the line: `[self presentModalViewController:loginPage animated:YES];`
Can anyone help?
`

Thanks.
|
Modalviewcontroller problem
|
CC BY-SA 3.0
| null |
2011-06-22T14:17:06.507
|
2011-06-22T15:36:02.767
|
2011-06-22T15:36:02.767
| 735,746 | 735,746 |
[
"iphone",
"view",
"uiviewcontroller",
"modalviewcontroller"
] |
6,441,574 | 1 | 6,444,195 | null | 2 | 306 |
I am using [RazorScriptManager - 0.6.1](http://www.nuget.org/List/Packages/RazorScriptManager) to minify my js and css files for my asp.net mvc 3 application.
When i use `AddJavaScript` method as:
```
@Script.AddJavaScript(localPath: "~/Scripts/jquery-1.6.min.js", siteWide: true)
@Script.AddJavaScript(localPath: "~/Scripts/modernizr-1.7.min.js", siteWide: true)
@Script.AddJavaScript(localPath: "~/Scripts/jquery.validate.min.js", siteWide: true)
@Script.AddJavaScript(localPath: "~/Scripts/jquery.unobtrusive-ajax.min.js", siteWide: true)
@Script.AddJavaScript(localPath: "~/Scripts/jquery.validate.unobtrusive.min.js", siteWide: true)
@Script.OutputJavaScript()
```
It shows js error for any script reference that comes after `jquery-1.6.min.js` reference. Below is the screenshot of the error:

Please advice on this..
|
Error in RazorScriptManager - 0.6.1 of Nuget Gallery
|
CC BY-SA 3.0
| 0 |
2011-06-22T14:28:44.097
|
2011-06-22T17:44:18.597
| null | null | 111,435 |
[
"asp.net-mvc-3",
"minify",
"nuget",
"nuget-package"
] |
6,441,607 | 1 | 6,441,668 | null | 2 | 6,071 |
I am pretty new to web design stuff but what I understood from DIV tag is that I it like a logical container for what ever is inside it and those thing will follow its rules..
so now I have an outer DIV tag defined as `<div style="margin-left: 10px;" >`and I have put some textbox, buttons, comboboxes inside it...now I also have a HyperLink that I want it to be there BUT I want this one to be at the right hand side , aligned to right , so I defined another DIV like `<div align="right">` and put the hyperlink insde this one. they are all still inside that other outer DIV tho. but it is not going to the right...what is wrong and how can I fix it? I attached the picture, see I want it to be like this picture, at the right hand side of that combobox...
thanks all

|
Putting a DIV tag inside another DIV tag
|
CC BY-SA 3.0
| null |
2011-06-22T14:30:13.577
|
2011-06-22T15:09:44.897
| null | null | 320,724 |
[
"html",
"alignment"
] |
6,441,665 | 1 | 6,441,748 | null | 0 | 125 |
I have written the following script to pop up a message using `href` but on clicking `OK` of the pop up the form is getting reset why this is happening
What I wrote is as follows
```
<a href="" style="text-decoration: none;" onclick="return confirm('A student need for Accommodated, Modified, or Alternate assessment is determined by the student ARD committee working in collabration with the LPAC and must be documneted in the student IEP ');">
?</a>
```
Before OK click

After clicking ok


|
Why on clicking Ok the web form resets
|
CC BY-SA 3.0
| null |
2011-06-22T14:34:15.643
|
2011-06-22T15:07:22.057
|
2011-06-22T14:38:32.957
| 364,708 | 388,388 |
[
"javascript",
"asp.net",
"href"
] |
6,441,714 | 1 | 6,441,961 | null | 2 | 737 |
I'm getting an error and the gui does not show up correctly when I add an object `TestData` to an ArrayList, here is my code:
(The error appears at `lstTest.add(new TestData("Jon", 0));`)
The Main class:
```
import java.awt.*;
import java.awt.event.*;
import javax.swing.table.*;
import javax.swing.event.*;
import javax.swing.*;
import java.util.*;
import javax.swing.border.*;
public class Test extends JFrame implements ActionListener, ListSelectionListener
{
private ArrayList<TestData> lstTest = null;
private TestData objTest;
public TestTable panTestTable;
private ListSelectionModel lsmTest;
private JButton btnAdd;
private static final String Command_Add = "Add";
public Test()
{
super("Test");
setDefaultCloseOperation(EXIT_ON_CLOSE);
try{ UIManager.setLookAndFeel("com.sun.java.swing.plaf.windows.WindowsLookAndFeel"); }
catch (Exception e){ System.out.println("Unable to load Windows look and feel"); }
setPreferredSize(new Dimension(500, 400));
((JPanel) getContentPane()).setBorder(new EmptyBorder(13, 13, 13, 13) );
JPanel panMain = (JPanel) getContentPane();
lstTest = new ArrayList<TestData>();
lstTest.add(new TestData("Jon", 0));
panTestTable = new TestTable(lstTest);
lsmTest = panTestTable.tabTest.getSelectionModel();
lsmTest.addListSelectionListener(this);
panTestTable.setBorder(new EmptyBorder(1, 1, 1, 1));
panMain.add(panTestTable, "Center");
pack();
setLocationRelativeTo(null);
setVisible(true);
setResizable(false);
}
public void actionPerformed(ActionEvent e){}
public void valueChanged(ListSelectionEvent e){}
public static void main(String[] args)
{
new Test();
}
}
```
TestTable class:
```
import java.util.*;
import javax.swing.table.*;
import java.awt.*;
import javax.swing.event.*;
import javax.swing.*;
public class TestTable extends JPanel
{
public ArrayList<TestData> lstTestData;
public JTable tabTest;
public BillTableModel absTest;
public JScrollPane scrollTest;
public TestTable(ArrayList<TestData> lstTest)
{
lstTestData = lstTest;
absTest = new BillTableModel(lstTestData);
tabTest = new JTable(absTest);
tabTest.setFillsViewportHeight(true);
tabTest.setAutoCreateRowSorter(true);
tabTest.setRowSelectionAllowed(true);
tabTest.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
tabTest.setAutoResizeMode(JTable.AUTO_RESIZE_ALL_COLUMNS);
tabTest.setPreferredScrollableViewportSize(new Dimension(250, 159));
scrollTest = new JScrollPane(tabTest);
scrollTest.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);
add(scrollTest);
setOpaque(true);
}
public void SetData(ArrayList<TestData> lstTestData)
{
this.lstTestData = lstTestData;
absTest.SetData(lstTestData);
}
public int SelectRow()
{
return tabTest.getSelectedRow();
}
public int GetSelectedRow()
{
return tabTest.getSelectedRow();
}
public void DeleteSelectedRow()
{
try
{
lstTestData.remove(tabTest.getSelectedRow());
SetData(lstTestData);
}
catch(Exception ex){}
}
public void DeleteAllRows()
{
for( int i = absTest.getRowCount() - 1; i >= 0; i-- )
{
lstTestData.remove(i);
SetData(lstTestData);
}
}
public class BillTableModel extends AbstractTableModel
{
protected String[] columnNames = new String[ ] {"Name", "Payment"};
protected ArrayList<TestData> lstTestData;
protected Class[] types = new Class[]{String.class, double.class};
public BillTableModel(ArrayList<TestData> lstTestData)
{ this.lstTestData = lstTestData; }
public void SetData(ArrayList<TestData> lstTestData)
{ this.lstTestData = lstTestData; fireTableDataChanged(); }
@Override
public String getColumnName(int columnIndex)
{ return columnNames[columnIndex]; }
@Override
public Class getColumnClass(int columnIndex)
{ return types [columnIndex]; }
@Override
public boolean isCellEditable(int row, int columnIndex)
{ if (columnIndex != 1) return false; else return true; }
public Object getValueAt(int row, int column)
{
if (row < 0 || row > lstTestData.size()) return null;
TestData obj = lstTestData.get(row);
switch(column)
{
case 0: return obj.getName();
case 1: return obj.getPayment();
default: return null;
}
}
public int getRowCount() { return lstTestData.size(); }
public int getColumnCount() { return columnNames.length; }
}
}
```
TestData class:
```
public class TestData implements Comparable <TestData>
{
private String name;
private double payment;
public TestData(String name, double payment)
{
this.name = name;
this.payment = payment;
}
public String getName() {return name;}
public double getPayment() { return payment; }
public void setName(String s) {name = s;}
public void setPayment(double d) { payment = d; }
@Override
public int compareTo(TestData obj)
{
return name.compareTo(obj.getName());
}
@Override
public boolean equals(Object obj)
{
if (obj instanceof TestData == false){ return false;}
return name.equals(((TestData)obj).getName());
}
}
```
Could you help me to figure out the problem?
Here is the error:
```
Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
at javax.swing.JTable.prepareRenderer(JTable.java:5720)
at javax.swing.plaf.basic.BasicTableUI.paintCell(BasicTableUI.java:2072)
at javax.swing.plaf.basic.BasicTableUI.paintCells(BasicTableUI.java:1974)
at javax.swing.plaf.basic.BasicTableUI.paint(BasicTableUI.java:1770)
at javax.swing.plaf.ComponentUI.update(ComponentUI.java:143)
at javax.swing.JComponent.paintComponent(JComponent.java:752)
at javax.swing.JComponent.paint(JComponent.java:1029)
at javax.swing.JComponent.paintChildren(JComponent.java:862)
at javax.swing.JComponent.paint(JComponent.java:1038)
at javax.swing.JViewport.paint(JViewport.java:747)
at javax.swing.JComponent.paintChildren(JComponent.java:862)
at javax.swing.JComponent.paint(JComponent.java:1038)
at javax.swing.JComponent.paintChildren(JComponent.java:862)
at javax.swing.JComponent.paint(JComponent.java:1038)
at javax.swing.JComponent.paintChildren(JComponent.java:862)
at javax.swing.JComponent.paint(JComponent.java:1038)
at javax.swing.JComponent.paintChildren(JComponent.java:862)
at javax.swing.JComponent.paint(JComponent.java:1038)
at javax.swing.JLayeredPane.paint(JLayeredPane.java:567)
at javax.swing.JComponent.paintChildren(JComponent.java:862)
at javax.swing.JComponent.paintToOffscreen(JComponent.java:5131)
at javax.swing.RepaintManager$PaintManager.paintDoubleBuffered(RepaintManager.java:1479)
at javax.swing.RepaintManager$PaintManager.paint(RepaintManager.java:1410)
at javax.swing.RepaintManager.paint(RepaintManager.java:1224)
at javax.swing.JComponent.paint(JComponent.java:1015)
at java.awt.GraphicsCallback$PaintCallback.run(GraphicsCallback.java:21)
at sun.awt.SunGraphicsCallback.runOneComponent(SunGraphicsCallback.java:60)
at sun.awt.SunGraphicsCallback.runComponents(SunGraphicsCallback.java:97)
at java.awt.Container.paint(Container.java:1780)
at java.awt.Window.paint(Window.java:3375)
at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:796)
at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:713)
at javax.swing.RepaintManager.seqPaintDirtyRegions(RepaintManager.java:693)
at javax.swing.SystemEventQueueUtilities$ComponentWorkRequest.run(SystemEventQueueUtilities.java:125)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
```
and here is the gui that poped up when I run the program:

and here is the gui without errors after removing `lstTest.add(new TestData("Jon", 0));` from the code:

|
Issue in adding object to ArrayList
|
CC BY-SA 3.0
| null |
2011-06-22T14:36:43.493
|
2011-06-22T15:02:09.207
|
2011-06-22T14:51:05.290
| 597,657 | 597,657 |
[
"java",
"user-interface",
"arraylist",
"jtable"
] |
6,441,788 | 1 | 6,445,799 | null | 3 | 9,718 |
i'm trying to launch a process ( process) as "" using the [SaferCreateLevel](http://msdn.microsoft.com/en-us/library/ms722425%28v=vs.85%29.aspx) with the `SAFER_LEVELID_UNTRUSTED` safer level:
> Allows programs to execute with access only to resources granted to open well-known groups, blocking access to and privileges and personally granted rights.
Using the code from Michael Howards DropMyRights MDSN article ([Browsing the Web and Reading E-mail Safely as an Administrator](http://msdn.microsoft.com/en-us/library/ms972827.aspx)) the pseudo-code is:
```
//get a handler on a Safer level
hSaferLevel = SaferCreateLevel(SAFER_SCOPEID_USER, SAFER_LEVELID_UNTRUSTED);
//Create a security token out of the safer level handle
hSecurityToken = SaferComputeTokenFromLevel(hSaferLevel);
//Create process as user
CreateProcessAsUser(hSecurityToken, "myapp.exe");
```
Except that the process fails to launch:
> The application was unable to start correctly (0xc0000142).

What's going on here?
Launching a process at the `SAFER_LEVELID_NORMALUSER` works fine:
> Allows programs to execute as a user that does not have or user rights. Software can access resources accessible by normal users.
Although since everyone already runs as a "" these days, there's little value in it.
---
My application able to handle running as a "low" user.
The end goal was to run the process with the same privelages as a process would get (although not tagged as "low"). So i tested that.
i used `icacls` to mark [my application to run Mandatory Integrity Level\Low](http://msdn.microsoft.com/en-us/library/bb625960.aspx):
```
C:\Develop>icacls RTMS.exe /setintegritylevel Low
processed file: RTMS.exe
Successfully processed 1 files; Failed processing 0 files
```
And my application launches correctly, and is running at the low integrity level:
[](https://i.stack.imgur.com/fvxAh.png)
While i might be able to use the [AddMandatoryAce](http://blogs.msdn.com/b/cjacks/archive/2006/10/24/modifying-the-mandatory-integrity-level-for-a-securable-object-in-windows-vista.aspx) API, or fiddle with the ACLs in the security token myself, i'm curious what's up with an `UNTRUSTED` Safer level - and why i can't get anything to launch.
On Windows 7 if you mark `calc` or `notepad` as `/setintegritylevel low` they will fail to launch (no error, just never appear), even [though this MSDN article talks about using calc as a test of low integrity level](http://msdn.microsoft.com/en-us/library/bb625960.aspx):

|
SaferCreateLevel SAFER_LEVELID_UNTRUSTED: The application was unable to start correctly (0xc0000142)
|
CC BY-SA 3.0
| null |
2011-06-22T14:41:58.083
|
2015-11-27T19:54:35.767
|
2015-11-27T19:54:35.767
| 12,597 | 12,597 |
[
"security",
"winapi",
"uac"
] |
6,441,894 | 1 | 6,442,234 | null | 2 | 886 |
I have generated the following plot in lattice and latticeExtra

using
```
library(lattice)
library(latticeExtra)
rate$Temp <- as.character(rate$Temp)
rate$Week <- as.character(rate$Week)
rate$Rep <- as.character(rate$Rep)
histogram(~Rate|Week+Temp, rate,
col=(NA),as.table=TRUE,
strip=strip.custom(strip.names=1)) +as.layer
(bwplot(~Rate|Week+Temp, rate,
as.table=TRUE,
strip=strip.custom(strip.names=1))
)
```
however I need each combination to be plotted in a different page, so that all temperature 11 for each week are in one page and so on. I know this can be done manually but there must be a way of using a loop to do it. Anyone??
Here is the data used to generate the plot
```
rate <- structure(list(Temp = c("11°C", "11°C", "11°C", "11°C", "11°C",
"11°C", "11°C", "11°C", "11°C", "11°C", "11°C", "11°C", "11°C",
"11°C", "11°C", "11°C", "13°C", "13°C", "13°C", "13°C", "13°C",
"13°C", "13°C", "13°C", "13°C", "13°C", "13°C", "13°C", "13°C",
"13°C", "13°C", "13°C", "15°C", "15°C", "15°C", "15°C", "15°C",
"15°C", "15°C", "15°C", "15°C", "15°C", "15°C", "15°C", "15°C",
"15°C", "15°C", "15°C"), Rep = c("1", "1", "1", "1", "1", "1",
"1", "1", "2", "2", "2", "2", "2", "2", "2", "2", "1", "1", "1",
"1", "1", "1", "1", "1", "2", "2", "2", "2", "2", "2", "2", "2",
"1", "1", "1", "1", "1", "1", "1", "1", "2", "2", "2", "2", "2",
"2", "2", "2"), Ind = c(12L, 12L, 12L, 12L, 14L, 14L, 14L, 14L,
11L, 11L, 11L, 11L, 10L, 10L, 10L, 10L, 2L, 2L, 2L, 2L, 7L, 7L,
7L, 7L, 1L, 1L, 1L, 1L, 3L, 3L, 3L, 3L, 4L, 4L, 4L, 4L, 5L, 5L,
5L, 5L, 8L, 8L, 8L, 8L, 13L, 13L, 13L, 13L), Week = c("1", "2",
"3", "4", "1", "2", "3", "4", "1", "2", "3", "4", "1", "2", "3",
"4", "1", "2", "3", "4", "1", "2", "3", "4", "1", "2", "3", "4",
"1", "2", "3", "4", "1", "2", "3", "4", "1", "2", "3", "4", "1",
"2", "3", "4", "1", "2", "3", "4"), Weight = c(0.2099, 0.2099,
0.2099, 0.2099, 0.3483, 0.3483, 0.3483, 0.3483, 0.3724, 0.3724,
0.3724, 0.3724, 0.2751, 0.2751, 0.2751, 0.2751, 0.2562, 0.2562,
0.2562, 0.2562, 0.3842, 0.3842, 0.3842, 0.3842, 0.3206, 0.3206,
0.3206, 0.3206, 0.4803, 0.4803, 0.4803, 0.4803, 0.7392, 0.7392,
0.7392, 0.7392, 0.277, 0.277, 0.277, 0.277, 0.082, 0.082, 0.082,
0.082, 0.5663, 0.5663, 0.5663, 0.5663), Rate = c(13.733, 9.322,
12.46, 6.581, 2.338, 2.652, 2.772, 3.026, 1.554, 1.677, 2.127,
2.102, 2.522, 2.476, 2.847, 2.999, 1.764, 2.442, 2.877, 2.976,
2.479, 2.532, 2.874, 3.052, 1.724, 2.292, 2.405, 2.397, 1.553,
3.385, 3.178, 2.959, 0.687, 0.808, 1.042, 1.033, 2.255, 2.755,
2.878, 3.338, 4.515, 5.089, 7.349, 8.113, 1.185, 1.649, 2.382,
1.989)), .Names = c("Temp", "Rep", "Ind", "Week", "Weight", "Rate"
), row.names = c(NA, -48L), class = "data.frame")
```
|
Creating a loop to print selected panels from a Lattice graph in independent pages
|
CC BY-SA 3.0
| null |
2011-06-22T14:49:52.580
|
2011-06-24T07:43:32.770
|
2011-06-24T07:43:32.770
| 790,664 | 790,664 |
[
"r",
"loops",
"plot",
"lattice"
] |
6,442,078 | 1 | 6,446,014 | null | 0 | 806 |
I am currently writing a Java application to display a list of ideas from a database. Each Idea has a title and a number which i would like to display in a column along with similar ideas. As you can see from the picture below, i am having a bit of a packaging issue.

What i would like is a way to programatically cut off the tail of a long idea name to fit in the allotted space. So:
if the column width is only
`########################`
`A really long idea titl`
would become
`A really long i... #123`
### Code
```
public class IdeaBar extends JPanel implements MouseListener {
private SortingColumn column;
private Idea idea;
private JPanel headPanel;
private JPanel bodyPanel;
private boolean isShrunk;
private boolean mouseToggle;
public IdeaBar(Idea id) {
this.idea = id;
this.setDoubleBuffered(true);
setLayout(new MigLayout("insets 0, hidemode 2", "[grow]", "[32px:32px:32px]0[]"));
// Head Panel
headPanel = new JPanel();
headPanel.setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));
headPanel.addMouseListener(this);
headPanel.setBorder(new BevelBorder(BevelBorder.RAISED, null, null,
null, null));
headPanel.setBackground(Color.GRAY);
headPanel.setBackground(idea.getStatus().getColor());
headPanel.setLayout(new BorderLayout(0, 0));
// Head Panel Labels
JLabel titleLabel = new JLabel("" + idea.getTitle());
titleLabel.setFont(new Font("Dialog", Font.PLAIN, 20));
titleLabel.setForeground(idea.getStatus().getTextColor());
headPanel.add(titleLabel, BorderLayout.WEST);
JLabel numLabel = new JLabel("New label");
numLabel.setHorizontalAlignment(SwingConstants.RIGHT);
numLabel.setForeground(idea.getStatus().getTextColor());
numLabel.setFont(new Font("Tahoma", Font.PLAIN, 20));
numLabel.setText("#" + idea.getNumber());
headPanel.add(numLabel, BorderLayout.EAST);
add(headPanel, "cell 0 0, grow, wrap");
// Body Panel
bodyPanel= new IdeaBarBodyPanel(idea);
this.add(bodyPanel, "grow");
this.shrink();
}
```
|
JLabels in JPanels sizing question
|
CC BY-SA 3.0
| null |
2011-06-22T15:04:21.150
|
2011-06-22T20:17:50.677
|
2020-06-20T09:12:55.060
| -1 | 625,050 |
[
"java",
"swing",
"user-interface",
"jpanel",
"jlabel"
] |
6,442,322 | 1 | 6,442,501 | null | 1 | 440 |
When I use IntelliJ IDEA to export signed Android app, I have option to generate one private keystore and many keys within it.
What is the function of these keys? Should I generate a new key for each app update and name it accordingly?
At the moment I am generating one keystore for each app.
---
Another question: When creating a new key, is the info from the image optional or obligatory?

|
What is key when exporting signed app?
|
CC BY-SA 3.0
| null |
2011-06-22T15:21:18.593
|
2011-06-22T15:32:06.003
| null | null | 437,039 |
[
"android",
"intellij-idea"
] |
6,442,340 | 1 | 6,450,105 | null | 3 | 1,673 |
i have a plot looking like this:

However the lines are overlapping quite a lot and i'm not able to see as much as i'd like. My gnuplot script looks like this:
```
set autoscale
set term pdfcairo font ",4"
set output "plot.pdf"
set xdata time
set format x "%H:%M"
set timefmt "%s"
set yrange [0:550]
plot "file.dat" every 150 using 3:4 title '' with lines, \
"file.dat" every 150 using 3:5 title '' with lines, \
"file.dat" every 150 using 3:6 title '' with lines, \
"file.dat" every 150 using 3:7 title '' with lines, \
"file.dat" every 150 using 3:8 title '' with lines, \
"file.dat" every 150 using 3:9 title '' with lines, \
"file.dat" every 150 using 3:10 title '' with lines, \
"file.dat" every 150 using 3:11 title '' with lines
```
and the corresponding `file.dat` looks like this:
```
(.........)
6 1303238171 0 134.332413 140.304581 138.496323 134.021835 105.546227 107.943008 102.812347 109.098152 972.554886
7 1303238171 0 134.232849 140.35408 138.186279 132.489319 105.941231 108.020004 103.009338 109.75119 971.98429
8 1303238171 0 135.125488 138.125427 138.100098 132.543625 106.153214 107.507042 102.338707 125.25383 985.147431
9 1303238171 0 134.341904 139.913376 138.070648 132.368164 106.214211 108.506859 102.963211 155.246277 1017.62465
10 1303238171 1 134.163055 140.042313 139.231033 132.444244 106.161438 108.850807 103.753929 162.19162 1026.838439
11 1303238171 1 134.179016 140.187561 138.68425 132.572876 107.169006 107.507057 102.974937 120.698692 983.973395
12 1303238171 1 134.40593 140.569382 138.604828 139.589264 106.631699 108.092957 103.634117 108.943863 980.47204
13 1303238172 1 134.353363 138.062759 138.344818 140.665985 107.538544 108.983582 104.300827 175.732117 1047.981995
14 1303238172 1 135.190887 140.411484 138.174591 133.823929 105.412224 108.240623 102.790154 120.459106 984.502998
(.........)
```
Is there an way to get this chart looking like a fence plot like on the [gnuplot examples page](http://gnuplot.sourceforge.net/demo/surface1.html)? I looked over it and it seems to be really complicated. I wish i could easily add a third dimension without changing the `file.dat`. Do you guy's perhaps know a way to achieve this? Or do you have any other ideas how i can make this chart better readable?
Best regards,
|
gnuplot 2d plot to 3d fence plot
|
CC BY-SA 3.0
| 0 |
2011-06-22T15:22:24.237
|
2011-06-23T06:25:50.383
| null | null | 477,872 |
[
"3d",
"plot",
"charts",
"gnuplot"
] |
6,442,373 | 1 | null | null | 1 | 332 |
I have a form and a custom scrollable PictureBox control (a very large PictureBox control inside another smaller PictureBox with 2 sliders to move large PictureBox inside smaller one). While scrolling large PictureBox inside smaller one the graphics that are drawn on large PictureBox get erased.

I would like to use a kind of off-screen buffer technique to cache all the drawing operations and to repaint the "dirty" parts of the view if necessary. There is [an example](http://www.visualbasicask.com/visual-basic-language/hscrollbar-autoredraw.shtml) of how to do this with [Bitmap class](http://msdn.microsoft.com/en-us/library/system.drawing.bitmap.aspx) in VB.NET.
Is there any analog of VB.NET's Bitmap class for Visual Basic 6?
|
Is there any analog of VB.NET's bitmap class for VB6?
|
CC BY-SA 3.0
| null |
2011-06-22T15:24:28.807
|
2011-06-22T17:40:32.650
|
2011-06-22T15:33:20.337
| 446,188 | 446,188 |
[
"vb.net",
"vb6"
] |
6,442,426 | 1 | 6,444,441 | null | 1 | 1,443 |
I'd like to clarity something:
As I understand it, the purpose of object diagram is to show relationships among objects. The sequence in which these objects interact is not relevant.
If possible, could you provide general comments on the diagram below:

|
What is the purpose of an UML Object Diagram?
|
CC BY-SA 3.0
| null |
2011-06-22T15:27:23.653
|
2015-02-14T09:49:36.423
|
2013-10-10T14:17:13.757
| 254,477 | 359,862 |
[
"uml",
"object-diagram"
] |
6,442,867 | 1 | 6,657,704 | null | 1 | 3,779 |
I have utlized the User32 library from MS Access in VBA to Hide the MDI window:
```
Global Const SW_HIDE = 0
Global Const SW_SHOWNORMAL = 1
Global Const SW_SHOWMINIMIZED = 2
Global Const SW_SHOWMAXIMIZED = 3
' Windows User32 Library reference to modify the window by one of the above commands
Private Declare Function apiShowWindow Lib "User32" Alias "ShowWindow" _
(ByVal hWnd As Long, ByVal nCmdShow As Long) As Long
```
At the appropriate point in my application I have triggered a call to this function effectively hiding the application while specific forms are set with `Modal = True` and `Popup = True` to have them show through the hidden parent MDI window.
This works great! However, I would like to still have a reference on the windows Taskbar for the open instance of MS Access:

This functionality went away once I hid the parent MDI window. Previously the user could click on this reference order to bring focus back to the respective open form.
Does anyone know how I can accomplish this? Is there a User32 Library reference or parameter which could be passed into the `apiShowWindow` method to have this occur?
|
How to hide MS Access parent MDI window, yet still show the Windows Taskbar reference?
|
CC BY-SA 3.0
| 0 |
2011-06-22T15:55:31.180
|
2011-07-11T23:01:15.483
|
2011-06-23T23:09:39.867
| 3,155 | 3,155 |
[
"windows",
"forms",
"ms-access",
"vba"
] |
6,442,994 | 1 | 6,447,486 | null | 1 | 3,021 |
I've made a GLSL shader for doing per-pixel blinn phong lighting on a scene, and I've had some issues w/ the light cast on the scene. Each light seems to have a very hard boundary on its effect ( in attached screenshot, you can see the boundary of the light on the bottom plane - the light (whose world position is equivalent to the hanging black spheres in the scene) is hanging over the plane and ferrari model, but for some reason only casts light appropriately back /towards/ the camera, not forward, away from the camera.
I feel like I'm making some mistake / lack some understanding in how the eye direction affects the blinn phong lighting model. Have I messed up my calculations, or do I simply not understand how this particular lighting model is supposed to work?
My shader code is here: [https://gist.github.com/1040417](https://gist.github.com/1040417)
Screenshot of effect: 
|
Strange results w/ Blinn-Phong GLSL shader, point lights
|
CC BY-SA 3.0
| 0 |
2011-06-22T16:03:42.390
|
2011-06-28T15:50:41.877
|
2011-06-22T16:30:34.950
| 44,729 | 110,524 |
[
"graphics",
"opengl-es",
"glsl",
"shader",
"lighting"
] |
6,443,024 | 1 | 6,444,645 | null | 2 | 1,077 |
I would like to make a plot with 4 axes in R so that it looks similar to this plot:

I've looked at the [Quick-R website](http://www.statmethods.net/advgraphs/axes.html) for advice and modified one of their examples (called `A Silly Axis Example`):
```
# specify the data
x <- c(1:5); y <- x/2;
w <- c(2:4)
z <- c(1:5)
# create extra margin room on the right for an axis
par(mar=c(5, 4, 4, 8) + 0.1)
# plot x vs. y
plot(x, y,type="b", pch=21, col="red",
yaxt="n", lty=3, xlab="", ylab="")
# add x vs. 1/x
lines(x, z, type="b", pch=22, col="blue", lty=2)
# draw an axis on the left
axis(2, at=x,labels=x, col.axis="red", las=2)
# draw an axis on the right, with smaller text and ticks
axis(4, at=w,labels=round(w,digits=2),
col.axis="blue", las=2, cex.axis=0.7, tck=-.01)
# draw an axis on the top
axis(3, at=z,labels=round(z,digits=2),
col.axis="blue", las=2, cex.axis=0.7, tck=-.01)
# add a title for the right axis
mtext("L", side=3, line=3, cex.lab=1,las=2, col="blue")
# add a title for the right axis
mtext("OSR", side=4, line=3, cex.lab=1,las=2, col="red")
# add a main title and bottom and left axis labels
title("", xlab="GSI", ylab="FSI")
```
This code produces the following plot:

I'm having difficulty figuring out how different axes can have different scales. For example, I want the top axis `L`, to go from 5 - 13, but if I set `z <-c(5:13)` it will not set the axis to these values. However, I can overwrite what the labels are:
```
axis(3, at=z,labels=round(c(9:13),digits=2), col.axis="blue",
las=2, cex.axis=0.7, tck=-.01)
```
but then if I want to plot a point with these four parameters, the point will not show up in the correct place. How should I do this?
|
How can I make the following plot using R?
|
CC BY-SA 3.0
| null |
2011-06-22T16:05:53.340
|
2011-06-22T18:23:37.780
| null | null | 258,755 |
[
"r",
"plot"
] |
6,443,039 | 1 | 6,443,612 | null | -1 | 1,060 |
I use JQuery layout feature to build skeleton of my app.
Layout has north-panel i.e header which can be hidden so that content area has more space.
Since header panel also contains icon bar, I only want icon bar to be visible when header is hidden.
Is there a way to achieve this by setting any property while creating layout using UI Layout.
Here is the image of layout where on hiding header should still show icons but only hide blue bar at the top.

Regards,
Satya
|
JQuery layout hide
|
CC BY-SA 3.0
| null |
2011-06-22T16:06:43.053
|
2017-01-31T09:52:37.627
|
2017-01-31T09:52:37.627
| 6,450,112 | 469,320 |
[
"jquery-ui",
"jquery-layout"
] |
6,443,208 | 1 | 6,445,654 | null | 3 | 131 |
This is a code to enter date, select in/out and location.
If the user want more fields to enter i also added a addRow function.
```
<table>
for($i=0;$i<15;$i++){
<tr><td>
<input type='datepick' name='scheduledatepick[$i]' />
<select name='schedulein[$i]' /><option>--</option>
<input type='text' name='location[$i]' />
</td></tr>
}
</table>
```
Now my question is if a user entered a field in a row(maybe datepick or schedulein or location) then he must enter all the other fields in that same row. How to achieve this?

|
If one field in row is entered, all the other fields in the row are required
|
CC BY-SA 3.0
| 0 |
2011-06-22T16:20:15.570
|
2011-06-22T19:57:17.353
|
2011-06-22T16:54:15.517
| 810,675 | 810,675 |
[
"php",
"javascript",
"jquery"
] |
6,443,219 | 1 | 6,459,089 | null | 7 | 2,621 |
in [GLScene](http://glscene.sourceforge.net/wikka/HomePage) we have three parameters (RollAngle, PitchAngle and TurnAngle) for rotation around local orientation. in the image below, how can I rotate cube around global orientation (orange axis)?

|
Global Rotation
|
CC BY-SA 3.0
| 0 |
2011-06-22T16:20:50.317
|
2011-06-23T18:45:22.333
|
2011-06-22T18:45:01.197
| 787,978 | 787,978 |
[
"delphi",
"opengl",
"quaternions",
"euler-angles",
"glscene"
] |
6,443,224 | 1 | 6,443,277 | null | 0 | 271 |
I'm new to JSON and just starting to wrap my head around it's functionality.
I'm trying to see if I can get print some data from some JSON methods. I've been alternating between the first one and the one that is commented out. The ideas is to see if I can get printing:
```
id newConnection = [scAPI performMethod:@"GET" onResource:@"me/connections.json" withParameters:nil context:nil userInfo:nil];
// id newConnection = [scAPI performMethod:@"POST"
// onResource:@"connections"
// withParameters:[NSDictionary dictionaryWithObjectsAndKeys:
// @"facebook_profile", @"service",
// @"imc://connection", @"redirect_uri",
// @"touch", @"display", //optional, forces services to use the mobile auth page if available
// nil]
// context:nil
// userInfo:nil];
NSLog(@"newConnection %@", newConnection);
NSLog(@"Is of type: %@", [newConnection class]);
NSDictionary *dict = [newConnection objectFromJSONString];
for (id key in dict) {
NSLog(@"key: %@, value: %@", key, [dict objectForKey:key]);
}
```
The above code doesn't err and I get logs such as:

Does this look right? How do I properly use these JSON methods to get a dictionary of values?
---
To be clear I'm using JSONKit :)
|
What should the return value of a JSON GET or POST look like?
|
CC BY-SA 3.0
| null |
2011-06-22T16:21:09.663
|
2011-06-22T16:33:01.147
|
2011-06-22T16:33:01.147
| 385,559 | 385,559 |
[
"iphone",
"objective-c",
"xcode",
"json",
"http"
] |
6,443,333 | 1 | 6,443,628 | null | 2 | 1,215 |
In the process explorer in the task manager, there used to be something called "VM Size" that indicated the amount of less-frequently-used swap disk space used by the app. In Windows 7 process explorer, it doesn't seem to exist. I'm wondering if the equivalent is "private bytes" or "paged data" something something. Any ideas?
-

|
In Windows 7 Process Explorer, what's the equivalent of "VM Size"?
|
CC BY-SA 3.0
| null |
2011-06-22T16:30:37.490
|
2013-12-01T09:23:12.410
|
2011-06-22T16:49:23.533
| 381,458 | 381,458 |
[
"windows",
"windows-7",
"windows-xp"
] |
6,443,499 | 1 | null | null | 1 | 1,707 |
What do you think about IE? Yes, it's a very cool browser.
There is PNG24 with a transparent area. I have applied the jquery opacity to it like:
```
$(".selector").css("opacity", 0.4);
```
and got the following problem:

How can I fix it?
|
JQuery + opacity + ie8 + png24
|
CC BY-SA 3.0
| 0 |
2011-06-22T16:47:23.900
|
2011-09-27T06:20:40.923
|
2011-06-22T16:53:41.173
| 535,300 | 535,300 |
[
"jquery",
"internet-explorer-8",
"opacity"
] |
6,443,494 | 1 | 6,443,692 | null | 1 | 4,323 |
HTML:
```
<ul id="popular-tags-hidden">
<li id="tag-1"><a class="display-new-tag" href="#">Tag 1<img width="10" height="10" src="http://www.communr.com/images/add-tag.png"></a></li>
<li id="tag-2"><a class="display-new-tag" href="#">Tag 2<img width="10" height="10" src="http://www.communr.com/images/add-tag.png"></a></li>
<li id="tag-3"><a class="display-new-tag" href="#">Tag 3<img width="10" height="10" src="http://www.communr.com/images/add-tag.png"></a></li>
<li id="tag-4"><a class="display-new-tag" href="#">Tag 4<img width="10" height="10" src="http://www.communr.com/images/add-tag.png"></a></li>
<li id="tag-5"><a class="display-new-tag" href="#">Tag 5<img width="10" height="10" src="http://www.communr.com/images/add-tag.png"></a></li>
</ul>
```
CSS:
```
ul#popular-tags-hidden li {
float: left;
overflow: hidden;
margin: 3px 6px 3px 0;
}
a.delete-new-tag, a.display-new-tag {
float: left;
background: #e2f2ce;
height: 20px;
padding: 0 5px 0 5px;
margin: 0;
-webkit-border-radius: 3px;
-moz-border-radius: 3px;
border-radius: 3px;
white-space: nowrap;
display: inline-block;
color: #466840;
}
```
IE 7 Result:

Desired Result:

The tags get cut off on the right side of the ul container. I have tried researching the problem and I think it has something todo with the padding, but I can't figure it out. Works in all browsers except IE7.
|
no-wrap issue in IE 7
|
CC BY-SA 3.0
| null |
2011-06-22T16:46:56.340
|
2011-06-23T15:09:47.117
|
2011-06-23T15:09:47.117
| 405,015 | 490,239 |
[
"css",
"internet-explorer-7",
"nowrap"
] |
6,443,844 | 1 | 6,452,511 | null | 2 | 1,103 |
I have a Panel in my application that collapses to the left side of the screen. What I'd like to do is add some custom content, like icons, to the vertical bar that represents the collapsed panel. A good example would be what Outlook does when you collapse the Mail pane:

Is there built-in support for this in ExtJS? If not, what would be the best way to go about this?
|
How to put custom content in collapsed ExtJS panel bar?
|
CC BY-SA 3.0
| null |
2011-06-22T17:14:57.147
|
2011-06-23T10:22:59.433
| null | null | 276,386 |
[
"javascript",
"extjs",
"panel"
] |
6,443,893 | 1 | 6,444,029 | null | 0 | 784 |
I have Eclipse Galileo. I created a new Java project but couldn't run the application. I get the following launch error:
> Selection does not contain a main type

|
Java application not run in Eclipse Galileo
|
CC BY-SA 3.0
| null |
2011-06-22T17:19:44.913
|
2016-01-12T20:14:54.087
|
2016-01-12T20:14:54.087
| 3,885,376 | 810,217 |
[
"java",
"eclipse",
"galileo"
] |
6,444,058 | 1 | 7,285,140 | null | 3 | 4,979 |
I'm looking to plot data on a RangeBar chart area (System.Windows.Forms.DataVisualization.Charting) and I'm having issues grouping the data when I have text values for the labels on the vertical axis.
Here's the pertinent code:
```
var connectedTimeRangeSeries = theChart.Series.Add("ConnectedTimeRangeSeries");
var connectedTimeRangesChartArea = theChart.ChartAreas["PerItemConnectedChartArea"];
connectedTimeRangeSeries.ChartArea = connectedTimeRangesChartArea.Name;
connectedTimeRangeSeries.ChartType = SeriesChartType.RangeBar;
connectedTimeRangeSeries.XValueType = ChartValueType.Auto;
connectedTimeRangeSeries.YValueType = ChartValueType.Auto;
for (int i = 0; i < timeRanges.Count; i++)
{
string theLabel = timeRanges[i].ItemLabel;
connectedTimeRangeSeries.Points.AddXY(timeRanges[i].ItemId + 1, timeRanges[i].StartConnectionTime, timeRanges[i].StopConnectionTime);
}
```
`timeRanges` is a list with items having these member types (accessed through public properties with corresponding capitalized names):
```
private int itemId;
private string itemLabel;
private DateTime startConnectionTime;
private DateTime stopConnectionTime;
```
When I call `DataSeries.Points.AddXY()` with the X type as an integer (recall X is the vertical axis on the range bar) it does what I want. The time ranges are grouped according to the index in the bottom graph:

However, when I change to try to use a text label to group them, by replacing `AddXY` with this:
```
connectedTimeRangeSeries.Points.AddXY(theLabel, timeRanges[i].StartConnectionTime, timeRanges[i].StopConnectionTime);
```
the data are no longer grouped:

It's like each one gets its own bin, and I just want them to be combined by label. (Each index has one and only one label.)
Any ideas? Thanks!
|
MSChart: How to group RangeBar data with text labels instead of indexes?
|
CC BY-SA 3.0
| null |
2011-06-22T17:31:41.000
|
2011-09-02T14:44:03.760
| null | null | 13,895 |
[
"c#",
".net",
"data-visualization",
"mschart"
] |
6,444,425 | 1 | null | null | 0 | 197 |
Am looking for some help with searching the list of records by clicking the alphabet on the top or at the bottom of the application.
I am already listing the records but since the list is huge, i would like to select the record based on the alphabet select as it will be difficult to click next for next 20 pages to get to what I want. Something like below.....
Any help appreciated!!!!
Thanks
|
Select listed records based on alphabet in WPF
|
CC BY-SA 3.0
| 0 |
2011-06-22T18:05:32.590
|
2011-06-22T18:13:26.500
| null | null | 730,167 |
[
"c#",
"wpf"
] |
6,444,558 | 1 | null | null | 0 | 44 |

|
What are the restrictions on "database-name" when attaching a database using SQLite?
|
CC BY-SA 3.0
| null |
2011-06-22T18:17:46.853
|
2011-06-22T21:37:35.340
| null | null | 339,843 |
[
"sqlite"
] |
6,444,565 | 1 | null | null | 0 | 523 |
```
[self.navigationController.navigationBar setBounds :CGRectMake(0, 0, 320, 70)];
```
After increasing navigationBar's height, how can I vertically center the left- and rightBarButtonItem?

|
iPhone NavigationBar
|
CC BY-SA 3.0
| null |
2011-06-22T18:18:14.147
|
2011-06-22T19:59:43.010
|
2011-06-22T19:59:43.010
| null | 810,889 |
[
"iphone",
"ios"
] |
6,444,602 | 1 | 6,444,776 | null | 3 | 2,347 |
I have a closed path consisting of multiple Bezier curves and straight line segments. How can I tell whether the current position of my mouse pointer is inside or outside the path?
Example of mouse leaving the area:

Example of mouse entering the area:

|
How can I tell if the mouse pointer is inside a path defined by Bezier curves and lines?
|
CC BY-SA 3.0
| null |
2011-06-22T18:20:48.233
|
2013-04-01T19:05:41.473
|
2011-06-22T18:41:04.360
| 122,607 | 273,455 |
[
"algorithm",
"hit"
] |
6,444,656 | 1 | 6,479,397 | null | 5 | 2,805 |
What is the best way to restore the scroll position in an HTML document after the screen has been rotated? (This is in a Cocoa Touch UIWebView, but I think it's a problem everywhere.) The default behavior seems to restore the y-offset in pixels, but since the text has been reflowed this is now a different position in the document.
My initial thought is to:
1. Pepper the document with invisible, uniquely-id'ed elements.
2. Before rotation, search for the element e whose y-offset is closest to the scroll offset.
3. After rotation, update the scroll offset to e's new y-offset.
Even if that works, I'd prefer not to insert a bunch of crud into the document. Is there a better way?
---
Here's a diagram to clarify the problem. Restoring the original y-offset does not produce the intended result because more text fits on a line in landscape mode.

|
HTML/Javascript: Fix scroll position after screen rotation
|
CC BY-SA 3.0
| 0 |
2011-06-22T18:24:31.633
|
2011-06-25T17:30:54.007
|
2011-06-22T18:58:46.840
| 180,891 | 180,891 |
[
"javascript",
"html",
"uiwebview"
] |
6,444,775 | 1 | 6,444,900 | null | 6 | 1,375 |
I really have no idea what I'm doing wrong here. I can't get Datejs to properly parse "12:00 pm" however, it seems to work fine on other dates. Below is a clip from the Firefox debugger:

|
Datejs - Problem with 12:00 pm
|
CC BY-SA 3.0
| 0 |
2011-06-22T18:34:08.193
|
2013-02-20T05:36:09.637
| null | null | 84,131 |
[
"javascript",
"date",
"datejs"
] |
6,444,915 | 1 | 6,446,912 | null | 9 | 1,132 |
I am attempting to read information from pictures of hard plastic ID cards. As a first step, I've been trying to process the pictures to make the text more computer-readable. The pictures are fairly clear, but they are tricky because they are light on one side and dark on the other. It seems like it should be possible to use this information to create a depth map, which could then be converted to a black and white image. Mainly, I'd like to know if there is some known algorithm (the simpler the better) I could implement. I'm currently doing the rest of the processing using Python and PIL, but any implementation I could adapt would be great.
A small example of the images I'm working with:

|
Algorithm to get an approximate depth map from an embossed/relief image
|
CC BY-SA 3.0
| 0 |
2011-06-22T18:45:57.337
|
2011-06-23T03:35:27.827
|
2011-06-22T21:52:06.773
| 353,410 | 810,918 |
[
"algorithm",
"image-processing",
"image-manipulation"
] |
6,445,940 | 1 | 6,450,787 | null | 0 | 644 |
Silverlight application doesn't work on my machine anymore.
Screenshot:

When I run the application the window becomes white. I copied following exception message from IE developer tools console (FF doesn't work either):
```
Code: 4004
Category: ManagedRuntimeError
Message: System.Windows.Markup.XamlParseException: [Line: 0 Position: 0] ---> System.FormatException: Input string was not in a correct format.
at System.Number.ParseDouble(String value, NumberStyles options, NumberFormatInfo numfmt)
at System.Windows.Media.Animation.RepeatBehavior.Create(Object o)
at MS.Internal.XcpImports.ConvertCValueForManagedWithType(Type propertyType, CValue& outVal, Int32 outDOType, Boolean releaseObjectReference, Boolean deleteBuffer, IManagedPeerBase fromObject)
at MS.Internal.XcpImports.GetValue(IManagedPeerBase managedPeer, DependencyProperty property)
at System.Windows.DependencyObject.GetValueInternal(DependencyProperty dp)
at System.Windows.Media.Animation.Timeline.get_RepeatBehavior()
--- End of inner exception stack trace ---
at MS.Internal.XcpImports.MethodEx(IntPtr ptr, String name, CValue[] cvData)
at MS.Internal.XcpImports.MethodEx(DependencyObject obj, String name)
at MS.Internal.XcpImports.FrameworkElement_ApplyTemplate(FrameworkElement frameworkElement)
at System.Windows.Controls.ItemContainerGenerator.LayoutStatesManager.GetElementRoot(Boolean templatesAreGenerated)
at System.Windows.Controls.ItemContainerGenerator.LayoutStatesManager.Load()
at System.Windows.Controls.ItemContainerGenerator.System.Windows.Controls.Primitives.IItemContainerGenerator.PrepareItemContainer(DependencyObject container)
at System.Windows.Controls.ItemsControl.AddVisualChild(Int32 containerIndex, DependencyObject container, Boolean needPrepareContainer)
at System.Windows.Controls.ItemsControl.AddContainers()
at System.Windows.Controls.ItemsControl.RecreateVisualChildren(IntPtr unmanagedObj)
```
I believe that RadChart is causing the issue.
Everything works fine on collegue's machine.
How can I fix it?
I think that on the client exception is thrown only when RadChart's ItemsSource is bound to data source.
|
Silverlight Telerik Visual Studio 2010 SP1 bug
|
CC BY-SA 3.0
| null |
2011-06-22T20:13:00.880
|
2011-06-23T07:36:12.767
|
2011-06-22T22:00:35.763
| 217,372 | 217,372 |
[
"silverlight",
"telerik",
"radchart"
] |
6,446,036 | 1 | 6,446,226 | null | 0 | 2,516 |
My users want a way to do mass uploads/edits to our products database, almost as if they were using excel, where they can copy and paste in a spreadsheet. Although this makes me cringe to think about, I am not the boss so it is what it is. I am just going to dump everything to a datagrid view and let them edit it there (ugh). There are many things though that require specific values (ie Size) and I do not want them to enter in XL, XLarge, X-Large, xlarge when they should all be XLarge for example. So I need combo boxes. Easy enough, but they also want to be able to select what columns are going to be displayed, so it isn't a static table that I can just specify column types. I've managed to dynamically make the appropriate columns combobox columns and fill them with data. I fill them like so:
```
for (int y = 0; y < table.Rows.Count; y++)
{
viewMassEdit.Rows.Add();
for (int x = 0; x < table.Columns.Count; x++)
viewMassEdit.Rows[y].Cells[x].Value = table.Rows[y][x].ToString();
}
```
All of the data fills correctly. No exceptions. Here's where the problem comes in. This creates a large table, and when I begin to scroll around, vertically or horizontally, these unhandled error messages periodically pop up:

What the crap is it talking about? It accepted the value fine when I put it there, how is it a problem now when I am navigating through the table? Furthermore, where would I go to handle this error?
|
Trapping DataGrid view Error
|
CC BY-SA 3.0
| null |
2011-06-22T20:18:56.070
|
2011-06-22T20:33:28.430
| null | null | 594,058 |
[
"c#",
"winforms",
"datagridviewcombobox"
] |
6,446,310 | 1 | 6,446,556 | null | 6 | 1,691 |
I know that this has been asked a million times before, but nothing that I have tried has solved the problem. I'm working on a nice looking `<select>` type thing. I'm basing it off of common CSS drop down navigation menus (using nested `<ul>`s and `<li>`s, just with a few tweaks. One of the tweaks is that I need it to display inline (without floating it because it goes past any other elements in the same line as it, and I don't want to float everything else around it). I've got it working well in the browsers besides ie 7 (and probably anything lower, but I don't need anything lower than ie7). Here is the code: [http://jsfiddle.net/ralokz/hjDVS/2/](http://jsfiddle.net/ralokz/hjDVS/2/)
If you look at that in any non-ie7 browser, it looks like how I want it to:

But if you look at it in ie7, it looks like this:

One site that I saw come up a lot for the inline-block fix is this: [http://blog.mozilla.com/webdev/2009/02/20/cross-browser-inline-block/](http://blog.mozilla.com/webdev/2009/02/20/cross-browser-inline-block/). That worked for ie8, but unfortunately ie7 still doesn't look right.
Is there any other way to fix inline-block for ie7? Or, is there a CSS alternative to make sure the the second level `<li>`s are always vertically aligned with the the first level `<li>`? Thanks!
|
ie 7 doesn't work with CSS inline-block or fixes
|
CC BY-SA 3.0
| null |
2011-06-22T20:41:58.313
|
2011-06-22T21:03:47.377
| null | null | 552,532 |
[
"html",
"css",
"internet-explorer-7"
] |
6,446,350 | 1 | null | null | 7 | 330 |
I am implementing a raytracer, and I am in the middle of implementing samplers. A sampler is a generator of random points over a square x=0:1, y=0:1. Each sampler holds multiple sets of "random" samples, and each set contains a given number of samples.
Now, one of the Samplers is the NRooks. It divides the surface in `n x n` blocks, chooses the blocks along the diagonal, in each diagonal block extracts a random point, and finally shuffles first the `x` among themselves, then the `y`.

This is all nice and clean. However, when it's time to extract the points, the book I'm following proposes these additional requirements to break correlations between subsequent pixels and samplings.
The first requirement is that every time a set is exhausted, a new sample set is picked at random. The code implemented to achieve this is the following:
```
Point2D Sampler::sample_unit_square(void) {
if (count % num_samples == 0) jump = (rand_int() % num_sets) * num_samples;
return (samples[jump + count++ % num_samples]
}
```
where `samples` is a vector of Point2D of size `num_samples*num_sets` (it is linearized). Every time one pixel is done (count is divisible by num_samples) a new jump is extracted and used to indicize the linear array for the start of a new set.
Since I'm using python, my strategy makes use of iterators:
```
def __iter__(self):
while True:
for sample_set in random.choice(self._samples_sets):
for sample in sample_set:
yield sample
```
This is trivial, and works ok.
The second need is to shuffle the indices, and here is where my question is. The book revises the code as follows
```
Point2D Sampler::sample_unit_square(void) {
if (count % num_samples == 0) jump = (rand_int() % num_sets) * num_samples;
return (samples[jump + shuffled_indices[ jump + count++ % num_samples]]
}
```
where shuffled indices is an array computed as follows
```
void Sampler::setup_shuffled_indices(void) {
shuffled_indices.reserve(num_samples*num_sets);
vector<int> indices;
for (int j=0; j<num_samples; j++) indices.push_back(j);
for (int p=0; p<num_sets; p++) {
random_shuffle(indices.begin(), indices.end());
for (int j=0; j<num_samples; j++) {
shuffled_indices.push_back(indices[j]);
}
}
}
```
which is a very C++ way of taking a list of numbers from 1 to n and shuffling them. I wanted to implement the following code in python
```
def __iter__(self):
while True:
sample_set = random.choice(self._samples_sets):
shuffled_set = sample_set[:]
random.shuffle(shuffled_set)
for sample in shuffled_set:
yield sample
```
I could also implement a random iterator that iterates on the set, saving the list copy, but this is not the point. My question arises from the following phrase in the book:
> ... Another possibility [to remove correlation] is to use a final shuffle on the samples of each set, but this destroys the n-rooks condition [...]. The best way is to randomly shuffle the indices used in `sample_unit_square`, for each set, but guarantee that all samples are used.
What I don't understand is: why does it say that the final shuffle on the samples of each set breaks the n-rooks ? the point is that he is using indirect indexing into the array of points. This indirect index is created out of a shuffling of all the indices from 1 to the number of sets, but this is equivalent to a shuffle on all the samples in each set. Being IMHO equivalent, I don't see why the first formulation should break the n-rooks and why the second wouldn't.
The book, for the record, is "Ray tracing from the ground up", by Kevin Suffern.
|
shuffling and NRooks constraint preservation
|
CC BY-SA 3.0
| 0 |
2011-06-22T20:46:45.437
|
2011-06-23T16:18:40.490
|
2011-06-22T23:26:24.740
| 68,063 | 78,374 |
[
"algorithm",
"raytracing"
] |
6,446,474 | 1 | 6,446,605 | null | 0 | 1,535 |
I have a problem :-) I try to make a quick search with highlighting in a datagridview.
In my datagridview is an excel sheet.
```
try
{
System.Data.OleDb.OleDbConnection MyConnection;
System.Data.DataSet DtSet;
System.Data.OleDb.OleDbDataAdapter MyCommand;
MyConnection = new System.Data.OleDb.OleDbConnection("provider=Microsoft.Jet.OLEDB.4.0;Data Source='c:\\test2.xls';Extended Properties=Excel 8.0;");
MyCommand = new System.Data.OleDb.OleDbDataAdapter("select * from [Sheet1$]", MyConnection);
MyCommand.TableMappings.Add("Table", "TestTable");
DtSet = new System.Data.DataSet();
MyCommand.Fill(DtSet);
dataGridView1.DataSource = DtSet.Tables[0];
MyConnection.Close();
}
catch (Exception ex)
{
MessageBox.Show(ex.ToString());
}
```
And I need it like this:

I have no idea, I hope someone can help me :-)
Thank you very mutch
|
Search in DataGridView (Excel File) + c#
|
CC BY-SA 3.0
| null |
2011-06-22T20:56:41.073
|
2011-06-23T11:18:55.880
|
2011-06-23T11:18:55.880
| 2,660 | 360,155 |
[
"c#",
"search",
"datagridview"
] |
6,446,624 | 1 | 6,446,715 | null | 3 | 3,035 |
Is there any trivial way to handle click event on the splitter area of the control? () E.g. I'd like to collapse panel1 by double clicking this area.
Or another possibility to put some nice button in this area and by clicking it I can collapse panels.
I don't wanna great hack to make a soulution, it would be nice to have a trivial one.
Thx
(.net 4/c#/VS2010)

|
Handle event in splitter area of splitcontainer control
|
CC BY-SA 3.0
| 0 |
2011-06-22T21:11:41.393
|
2011-06-22T21:25:01.163
|
2011-06-22T21:23:24.457
| 582,211 | 582,211 |
[
"c#",
".net",
"events",
"splitcontainer"
] |
6,447,488 | 1 | 6,460,982 | null | 1 | 366 |
This image demonstrates what I'm trying to achieve. On the left is the table data, on the right the table I'm trying to create.
the table uses the parentID to reference another item within the same table to create a hierarchy.
How would I go about creating queries and organizing them in this way?
What if I select "Pirates" and want to get all the parents? Is there anything in CFML that makes this easier than looping queries until I get to the top?

|
Adjacency list in coldfusion
|
CC BY-SA 3.0
| 0 |
2011-06-22T22:51:01.730
|
2017-10-31T14:01:21.430
|
2017-10-31T14:01:21.430
| 4,370,109 | 197,546 |
[
"coldfusion",
"adjacency-list"
] |
6,447,984 | 1 | 6,454,700 | null | 11 | 28,309 |
I have a JTable with 3 columns:
```
- No. #
- Name
- PhoneNumber
```
I want to make specific width for each column as follows:

and I want the JTable able to update the widths of its columns dynamically if needed (for example, inserting large number in the column `#`) and keeping same style of the JTable
I solved the first issue, using this code:
```
myTable.getColumnModel().getColumn(columnNumber).setPreferredWidth(columnWidth);
```
but I didn't success to make myTable to update the widths dynamically ONLY if the current width of the column doesn't fit its contents. Can you help me solving this issue?
|
Auto resize the widths of JTable's columns dynamically
|
CC BY-SA 3.0
| 0 |
2011-06-23T00:06:15.490
|
2014-11-04T09:51:54.667
|
2011-06-23T11:24:51.240
| 597,657 | 597,657 |
[
"java",
"jtable"
] |
6,448,154 | 1 | 10,563,320 | null | 2 | 4,858 |
I can't seem to get Imagick::setFont to work in php. Taking the example straight from the [man page](http://php.net/manual/en/function.imagick-setfont.php):
```
/* Create new imagick object */
$im = new Imagick();
/* Set the font for the object */
$im->setFont("comic.ttf");
/* Create new caption */
$im->newPseudoImage(100, 100, "caption:Hello");
$im->setformat('png');
header('Content-type: image/png');
echo $im;
```
I get...

[http://i53.tinypic.com/2d2bn9x.png](http://i53.tinypic.com/2d2bn9x.png)
... which is clearly not comic sans. I've tried numerous fonts. It never changes. It does complain if the file doesn't exist. It does not accept names like "Arial".
|
How do I set a font in Imagick PHP?
|
CC BY-SA 3.0
| 0 |
2011-06-23T00:39:57.680
|
2015-08-25T09:52:49.707
|
2011-12-08T02:52:02.893
| 234,976 | 786,729 |
[
"php",
"fonts",
"imagick"
] |
6,448,176 | 1 | 6,837,089 | null | 3 | 829 |
I am using the silverlight toolkit lineseries control and want to get rid of the title but I cannot find a way via Expression Blend or VS. I have tried to change the TitleStyle and LegendStyle of the parenting chart but have found that obviously irrelevant. Any tips would be appreciated.

|
Silverlight Toolkit LineSeries Title Removal
|
CC BY-SA 3.0
| null |
2011-06-23T00:45:18.993
|
2012-01-26T20:13:54.297
|
2011-06-23T23:18:42.023
| 650,547 | 650,547 |
[
"silverlight",
"silverlight-toolkit"
] |
6,448,236 | 1 | 6,462,341 | null | 3 | 7,007 |
Most of the questions in jstree are about getting the selected node (and related id, etc). My current code for getting the selected node is:
```
viewerObj.bind("select_node.jstree",
function (e, data) {
var nodeId = jQuery.data(data.rslt.obj[0], "jstree").id;
//alert(nodeId);
var date = new Date();
...
);
```
But what I really want is not the selected node necessarily, but the highlight node (and parent id) so that I could capture the "create_node" event when it is triggered. How do I do that? I can't seem to find any code that does this correctly.
Here's the image of what the UI looks like:
I want to know how to grab "models". The select_node event capture the node that is selected (or "admin") in this case.
---
Update:
This does it:
`.bind("hover_node.jstree", function(e, data){ var nodeId = jQuery.data(data.rslt.obj[0], "jstree").id; } );`
It capture the hover event and grabs the id associated with the node that was last hovered.
|
jstree get highlight node
|
CC BY-SA 3.0
| 0 |
2011-06-23T00:57:54.813
|
2013-07-28T11:16:56.780
|
2011-06-23T02:17:22.857
| 192,237 | 192,237 |
[
"jstree"
] |
6,448,241 | 1 | 6,563,719 | null | 2 | 1,380 |
First all, I am still learning CakePHP and I am close to ZERO using JQuery.
I would like to get help for the following problem I am having:
1. I have an Articles_Controller a Comments_Controller and Users_Controller
2. Currently my articles_controller display an article and its comments are loaded on that page
3. Whoever user inputted the comment will also appear along with his/her image
4. On each comment I have added a like/dislike button.
Example: 
Right now, however, I am only able to display it. What I wanted to accomplish is to use JQuery so that when a user clicks on the Thumbs Up or Thumbs Down image the like and disliked fields are automatically updated in the Db. Also, using JQuery I would like to update those same values in the View. Please my code below and thank you for your help.
```
<div id="articles_comments">
<p>
Comments
</p>
<?php
foreach($comments as $comment){
?>
<div id="articles_comments_user">
<img src="<?php echo $comment['User']['image']; ?>">
<p>
<?php
$created = $comment['Comment']['created'];
echo $comment['User']['first_name'];
echo " ";
echo $comment['User']['last_name'];
echo " ";
//echo $comment['Comment']['created'];
echo $this->Time->timeAgoInWords(
$comment['Comment']['created'],
array(
'end'=>'+150 years'
)
);
?>
<p>
</div>
<div id="articles_comments_comment">
<table>
<tr>
<td style="width:85%">
<?php echo $comment['Comment']['comment'];?>
</td>
<td style="width:15%;border-left:solid thin teal;">
<div style="float:left;">
<?php echo $comment['Comment']['liked'];?>
<img width="20" src="/img/icons/thumb-up-icon.png"
</div>
<div style="float:right;margin-left:10px;">
<?php echo $comment['Comment']['disliked'];?>
<img width="20" src="/img/icons/thumb-down-icon.png">
</div>
</td>
</tr>
</table>
</div>
<?php
}
?>
<div class="articles_add_comment" id="formUpdateID">
<hr style="width:100%"><br>
<div style="float:left">
<h3>Seu Commentario:</h3>
<?php
echo $form->create(
'Comment',
array(
'url'=>array(
'controller'=>'articles',
'action'=>'view',
$article['Article']['id']
),
'class' => 'articles_form',
'id' => 'loginForm'
)
);
echo $form->input(
'Comment.comment',
array(
'label' => false,
'type' => 'textarea',
'div' => 'articles_comments_textarea',
'cols' => 90,
'rows' => 3
)
);
?>
</div>
<div style="float:right">
<?php
echo $this->Form->submit(
'Send',
array(
'class' => 'articles_comments_button'
)
);
echo $form->end();
?>
</div>
<div class="ajax-save-message">
<?php echo $this->Session->flash(); ?>
</div>
</div>
</div>
```
|
CakePHP - Use JQuery/Ajax to increment an entry in the Db and update a DIV with the result
|
CC BY-SA 3.0
| 0 |
2011-06-23T00:58:46.647
|
2011-07-03T15:20:54.707
| null | null | 597,237 |
[
"cakephp"
] |
6,448,480 | 1 | 6,448,572 | null | 0 | 588 |
I'm new to Visual Studio and MySQL. I'm creating a Login Page and connect it with MySQL. But whenever I add a connection string. I always got an error.

Can anybody tell me what's the problem in here?
Please.
This is my :
```
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<appSettings>
<add key="ODBCDriver" value="Driver={MySQL ODBC 5.1 Driver};Server=localhost;Database=timekeeping;uid=root;pwd=admin;Option=3;"/>
</appSettings>
<connectionStrings>
<add name="ConnectionString" connectionString="Database=timekeeping;uid=root;pwd=admin;Option=3;" />
</connectionStrings>
</configuration>
```
|
Connection String Problem
|
CC BY-SA 3.0
| null |
2011-06-23T01:46:51.983
|
2011-06-23T02:17:33.787
|
2011-06-23T02:17:33.787
| 516,160 | 516,160 |
[
"c#",
"mysql",
"visual-studio-2010",
"configuration",
"connection-string"
] |
6,448,490 | 1 | 6,448,523 | null | 1 | 6,232 |
I want to make the following table, but I'm having a bit of difficulty with figuring out which elements to use when. At the moment, this table has been implemented using `table` tags with the first row being done using `tr` and `td` tags.
The real problem is Cells E, F, G and H. I thought it would be possible to have the rectangular area created by Cells E, F, G and H be implemented using two `div` tags, but that doesn't seem to be working. Also, it doesn't appear like I can put a `<table>` within a `table` tag.

|
How do I make this table using <table>, <tr>, <td> and <div> tags?
|
CC BY-SA 3.0
| 0 |
2011-06-23T01:48:56.523
|
2016-10-26T18:15:41.257
|
2016-10-26T18:15:41.257
| 4,370,109 | 155,726 |
[
"html",
"css",
"html-table"
] |
6,448,576 | 1 | 6,448,601 | null | 5 | 963 |
I'm getting empty tags in my [page](http://cubic-dev.asu.edu) that aren't in the page source, but are visible upon inspecting the element via firebug. I've disabled javascript to see if that was injecting it, as well as disabling all add-ons.
Here is an excerpt from the page source, free of random `<a></a>`:
```
...
<div class="middle-content">
<div class="asu_set_fixed_width">
<div id="navbar">
<div id="navbar-inner" class="clear-block region region-navbar">
<div class="region region-navbar">
<div id="block-menu-primary-links" class="block block-menu first last region-odd odd region-count-1 count-1">
<div class="content">
<ul class="menu"><li class="leaf first active-trail"><a href="/index" title="Home" class="active">Home</a></li>
<li class="leaf"><a href="/About_CUbiC" title="About CUbiC">About CUbiC</a></li>
...
```
and now examining with firebug with :

Same thing happens in Chrome as it does here in Firefox. Any thoughts on where these are coming from?
|
Where are these empty anchor tags coming from?
|
CC BY-SA 3.0
| 0 |
2011-06-23T02:06:05.320
|
2011-06-23T02:12:42.440
| null | null | 374,405 |
[
"javascript",
"html",
"css"
] |
6,448,770 | 1 | 6,449,715 | null | 8 | 2,202 |
I have an EF model as follows:

On this model, I can obviously use `Categories.Products` to receive a list of products.
I have a query as follows to return a list of Categories, with Products as a List to be used in an ASP.NET MVC 3 view:
```
var categories = (from a in context.Categories.Include("Products")
orderby a.SortOrder ascending
select a).ToList();
return View(categories);
```
In order to show the Products in order of their SortOrder I currently have to do:
```
<ul>
@foreach (var category in Model)
{
<li>@category.Title
<ul>
@foreach (var product in category.Products.OrderBy(a => a.SortOrder))
{
<li>@product.Description</li>
}
</ul>
</li>
}
</ul>
```
The offending line is: `@foreach (var product in category.Products.OrderBy(a => a.SortOrder))` as this is handling a bit of my model in the view.
Is there a way to sort this in the query?
|
Linq sort child in query
|
CC BY-SA 3.0
| 0 |
2011-06-23T02:42:06.947
|
2011-06-23T05:31:24.447
|
2011-06-23T05:31:24.447
| 29,407 | 200,653 |
[
"c#",
"linq",
"entity-framework",
"asp.net-mvc-3",
"razor"
] |
6,448,854 | 1 | 6,451,686 | null | 8 | 15,226 |
We want to make the UI control exactly as mentioned in the image. It is rounded corner, like shadow effect and thin while color line around the box. The size of the control shall be size of the parent. We tried using example, nothing matches this design given by design team.

|
WPF Design: How to make User control with rounded corner and shadow effect
|
CC BY-SA 3.0
| 0 |
2011-06-23T02:58:25.210
|
2011-06-23T09:06:33.330
| null | null | null |
[
"c#",
".net",
"wpf"
] |
6,448,866 | 1 | 6,457,939 | null | 1 | 1,804 |
Consider use case of custom list element, that has multiple rows and other other data elements, like pictures. So if I have a list of data instances, how do I use the data source to populate custom list. I also want to bind the list to the display element.
## Sample class
```
public class BeerData
{
public string imageUrl { get; set; }
public string name { get; set; }
public string brewery { get; set; }
public string beer { get; set; }
public double reiting { get; set; }
// ...
}
```
## Personal effort
At the moment, I'm using datagridview
```
private BindingSource bs = new BindingSource();
// ...
bs.DataSource = typeof(BeerData);
foreach (BeerData entry in new BeerData[]{ new BeerData()
{
reiting = 4.2,
name = "Bell's Hopslam Ale",
brewery = "Bell's Brewery, Inc",
beer = "Imperiial IPA",
image = "http://upload.wikimedia.org/wikipedia/" +
"commons/6/60/Kriek_Beer_1.jpg"
}/* , ... */})
bs.Add(entry);
grid.DataSource = bs;
grid.AutoGenerateColumns = true;
lName.DataBindings.Add(new Binding("Text", bs, "name"));
lImage.DataBindings.Add(new Binding("ImageLocation", bs, "image"));
// ...
```
## Personal effort 2
```
public static class BeerLoader
{
public static List<BeerData> result = new List<BeerData>();
static BeerLoader() {
add1BogusDataInstance();
}
public static void add1BogusDataInstance()
{
foreach (BeerData entry in new BeerData[]{ new BeerData()
{
reiting = 4.2,
name = "Bell's Hopslam Ale",
brewery = "Bell's Brewery, Inc",
beer = "Imperiial IPA",
imageUrl = "http://upload.wikimedia.org/wikipedia/" +
"commons/6/60/Kriek_Beer_1.jpg"
}})
result.Add(entry);
}
public static List<BeerData> LoadData()
{
return result;
}
}
```
## Sample of desired result
Example of list part that would replace datagridview

Image [source](http://blog.digitalbackcountry.com/2011/01/creating-custom-list-skins-for-the-blackberry-playbook/)
## Question
I assume, that I need to create a `user control` and then create list of that user control or something equivalent. Could not find a winform example using google, so I want to know how this is done.
|
Creating and populating custom list skins with C# winforms
|
CC BY-SA 3.0
| null |
2011-06-23T03:00:08.563
|
2011-06-23T19:41:24.927
|
2011-06-23T17:12:59.603
| 97,754 | 97,754 |
[
"c#",
"winforms",
"c#-4.0",
"custom-controls"
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.