Id
int64 1.68k
75.6M
| PostTypeId
int64 1
2
| AcceptedAnswerId
int64 1.7k
75.6M
⌀ | ParentId
int64 1.68k
75.6M
⌀ | Score
int64 -60
3.16k
| ViewCount
int64 8
2.68M
⌀ | Body
stringlengths 1
41.1k
| Title
stringlengths 14
150
⌀ | ContentLicense
stringclasses 3
values | FavoriteCount
int64 0
1
⌀ | CreationDate
stringlengths 23
23
| LastActivityDate
stringlengths 23
23
| LastEditDate
stringlengths 23
23
⌀ | LastEditorUserId
int64 -1
21.3M
⌀ | OwnerUserId
int64 1
21.3M
⌀ | Tags
list |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
5,466,080 | 1 | 5,466,285 | null | 1 | 457 | When i run a line of code to start an activity i get the following printout in the logcat and several of the same activity starting? can anyone help?

My code to achieve this is...
```
public void login()
{
System.out.println("1");
SessionEvents.AuthListener listener = new SessionEvents.AuthListener() {
@Override
public void onAuthSucceed() {
facebookConnector.idnum();
checkdatabase();
if(id == ""){
Intent i = new Intent(facebook.this, signup.class);
startActivity(i);
finish();
}
else{
System.out.println("TEST");
Intent i = new Intent(facebook.this, mainMenu.class);
startActivity(i);
finish();
}
}
@Override
public void onAuthFail(String error) {
System.out.println("2");
}
};
System.out.println("3");
SessionEvents.addAuthListener(listener);
System.out.println("4");
facebookConnector.login();
}
```
followed by the checkdatabase method...
```
public void checkdatabase(){
fbid = FacebookConnector.id;
System.out.println("facebook id in check database = " + fbid);
ArrayList<NameValuePair> nameValuePairs = new ArrayList<NameValuePair>();
nameValuePairs.add(new BasicNameValuePair("fbid",fbid));
try{
HttpClient httpclient = new DefaultHttpClient();
HttpPost httppost = new HttpPost("checkdatabase.php");
httppost.setEntity(new UrlEncodedFormEntity(nameValuePairs));
HttpResponse response = httpclient.execute(httppost);
HttpEntity entity = response.getEntity();
is = entity.getContent();
System.out.println("---------");
System.out.println(is);
}catch(Exception e)
{
Log.e("log_tag", "Error in http connection "+e.toString());
}
//convert response to string
try
{
System.out.println("WSSSSSSSSSSSSSS");
BufferedReader reader = new BufferedReader(new InputStreamReader(is,"iso-8859-1"),8);
System.out.println(reader + "TEST");
StringBuilder sb = new StringBuilder();
System.out.println("Wmmmmmmmmmmmmmmm");
String line = null;
while ((line = reader.readLine()) != null)
{
sb.append(line + "\n");
}
is.close();
result=sb.toString();
System.out.print("SAD");
System.out.println(result + "READER");
JSONArray jArray = new JSONArray(result);
JSONObject json_data = jArray.getJSONObject(1);
id = json_data.getString("facebookid");
System.out.println("facebooooooook id: " + fbid);
System.out.println("database id: " + id);
}
catch(Exception e)
{
Log.e("log_tag", "Error converting result "+e.toString());
}
//parse json data
}
```
FacebookConnector Class
public class FacebookConnector {
```
private Facebook facebook = null;
private Context context;
private String[] permissions;
private Handler mHandler;
private Activity activity;
static String id;
private SessionListener mSessionListener = new SessionListener();;
public FacebookConnector(String appId,Activity activity,Context context,String[] permissions) {
this.facebook = new Facebook(appId);
id ="";
SessionStore.restore(facebook, context);
SessionEvents.addAuthListener(mSessionListener);
SessionEvents.addLogoutListener(mSessionListener);
this.context=context;
this.permissions=permissions;
this.mHandler = new Handler();
this.activity=activity;
}
public void login() {
System.out.println("5");
// if (!facebook.isSessionValid()) {
facebook.authorize(this.activity, this.permissions,new LoginDialogListener());
// }
}
public void logout() {
System.out.println("33");
SessionEvents.onLogoutBegin();
AsyncFacebookRunner asyncRunner = new AsyncFacebookRunner(this.facebook);
asyncRunner.logout(this.context, new LogoutRequestListener());
}
public void idnum(){
try {
JSONObject jObject = null;
try {
jObject = new JSONObject(facebook.request("me"));
} catch (JSONException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
id =jObject.getString("id");
System.out.println("facebook id: " + id);
} catch (MalformedURLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (JSONException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
public void postMessageOnWall(String msg) {
if (facebook.isSessionValid()) {
Bundle parameters = new Bundle();
parameters.putString("message", msg);
try {
String response = facebook.request("me/feed", parameters,"POST");
System.out.println(response);
} catch (IOException e) {
e.printStackTrace();
}
} else {
login();
}
}
private final class LoginDialogListener implements DialogListener {
public void onComplete(Bundle values) {
SessionEvents.onLoginSuccess();
}
public void onFacebookError(FacebookError error) {
SessionEvents.onLoginError(error.getMessage());
}
public void onError(DialogError error) {
SessionEvents.onLoginError(error.getMessage());
}
public void onCancel() {
SessionEvents.onLoginError("Action Canceled");
}
}
public class LogoutRequestListener extends BaseRequestListener {
public void onComplete(String response, final Object state) {
// callback should be run in the original thread,
// not the background thread
mHandler.post(new Runnable() {
public void run() {
SessionEvents.onLogoutFinish();
}
});
}
}
private class SessionListener implements AuthListener, LogoutListener {
public void onAuthSucceed() {
SessionStore.save(facebook, context);
}
public void onAuthFail(String error) {
}
public void onLogoutBegin() {
}
public void onLogoutFinish() {
SessionStore.clear(context);
}
}
public Facebook getFacebook() {
System.out.println("55");
return this.facebook;
}
```
}
| android multiple activities starting for no reason | CC BY-SA 2.5 | null | 2011-03-28T23:06:33.857 | 2011-03-29T08:16:06.460 | 2011-03-28T23:43:34.383 | 601,915 | 601,915 | [
"android"
]
|
5,466,097 | 1 | 5,669,879 | null | 17 | 11,125 | I have implemented a "Pull to refresh" in my tableView like the iPhone app Twitter or Facebook.
My tableView has sections with head views. When the tableView is in "Refresh mode", so when I pulled the tableView to refresh, I set the contentInset of the tableView to display the tableView a certain way. At this moment, if I push the tableView up, the headers of the UITableView are not anymore scrolling to the top of the UITableView. See the following screenshots:


How can I fix that to make the headers scroll like expected?
Thanks!
| Section Headers in UITableView when inset of tableview is changed | CC BY-SA 3.0 | 0 | 2011-03-28T23:09:35.640 | 2019-10-25T12:02:59.890 | 2014-07-21T09:26:42.147 | 1,257,657 | 472,220 | [
"iphone",
"objective-c",
"cocoa"
]
|
5,466,497 | 1 | 5,469,213 | null | 1 | 439 | I have a presentation involving (3) DataGrids that are the same, but different enough that it seems like a cleaner design to do just the whole thing in code.
It is still raw (class diagram below), but works the way I want except for one thing! The visual studio designer can't figure out the late binding of the DataContext, so it throws an error.
An example of how I am pulling the grid's data context for use in a given column is below, as well as the error I get.
1. Does s anyone see a way to make the designer happy with the existing code?
2. Does anyone have a suggestion for a better approach?
I know there are ways to give Blend some notion of data but I don't as yet know Blend.
Cheers,
Berryl
# CODE
```
public abstract class TimesheetGridColumn : DataGridTextColumn
{
...
protected ActivityCollectionViewModel _GetDataContext() { return (ActivityCollectionViewModel) DataGridOwner.DataContext; }
public virtual void SetHeader() {
var tb = new TextBlock
{
Text = _GetHeaderText(),
ToolTip = _GetHeaderToolTip(),
};
Header = tb;
}
....
}
public class ActivityDescriptionColumn : TimesheetGridColumn
{
...
*** WORKS at RUNTIME but DESIGNER does not know that *******
protected override string _GetHeaderText() {
return _GetDataContext().PresentationSubject;
}
}
```
# XAML SNIPPET & DESIGNER ERROR
```
<Expander Header="{Binding DisplayName}" BorderThickness="1" IsExpanded="True">
<dataGrid:ActivityDataGrid /> <=============== simple but error
</Expander>
System.NullReferenceException
Object reference not set to an instance of an object.
at ...ColumnSubclasses.ActivityDescriptionColumn._GetHeaderText() in ActivityDescriptionColumn.cs:line 24
```
# CLASS DIAGRAM


| wpf DataContext error in Designer | CC BY-SA 2.5 | null | 2011-03-29T00:11:39.147 | 2011-03-29T07:28:03.497 | null | null | 95,245 | [
"wpf",
"silverlight",
"datagrid",
"designer"
]
|
5,466,615 | 1 | 5,467,006 | null | 5 | 5,505 | I know that to draw a regular polygon from a center point, you use something along the lines of:
```
for (int i = 0; i < n; i++) {
p.addPoint((int) (100 + 50 * Math.cos(i * 2 * Math.PI / n)),
(int) (100 + 50 * Math.sin(i * 2 * Math.PI / n))
);
}
```
However, is there anyway to change this code (without adding rotations ) to make sure that the polygon is always drawn so that the topmost or bottommost edge is parallel to a 180 degree line? For example, normally, the code above for a pentagon or a square (where n = 5 and 4 respectively) would produce something like:


When what I'm looking for is:
 
Is there any mathematical way to make this happen?
| How to draw a regular polygon so that one edge is parallel to the X axis? | CC BY-SA 2.5 | 0 | 2011-03-29T00:31:35.603 | 2011-03-29T05:41:25.530 | 2011-03-29T03:03:43.533 | 353,410 | 681,170 | [
"math",
"graphics",
"geometry",
"polygon"
]
|
5,466,631 | 1 | 5,466,842 | null | 0 | 356 | I would like to use chrome instead of firefox because of his synching mechanism, which in firefox is quite faulty (only bookmarks are imported, a big problem 'cos I need extensions too).
I managed to make chrome really similar to firefox with plugins and things like that (I asked it in my previous question: [https://superuser.com/questions/261568/how-to-turn-google-chrome-into-firefox-clone](https://superuser.com/questions/261568/how-to-turn-google-chrome-into-firefox-clone) ).
However I'm missing an important thing: I need to bind in some way (changing the source code of the plugin or using anything else) CTRL + B to "click" to an icon in the plugin bar (basically I have to show the dialog that pops up when you click on that icon).
How to do it? I can write javascript/html/css code (but I would like to avoid to reimplement the whole plugin), any suggestion?
Here is a screenshot of the icon that I need to click:

P.S.
The plugin is neat bookmarks
P.P.S.
Because this question could be only about browser settings and extensions, I posted it on superuser too:
[https://superuser.com/questions/263772/google-chrome-set-a-hotkey-to-click-over-an-icon-in-the-plugin-bar-a-plugin-a](https://superuser.com/questions/263772/google-chrome-set-a-hotkey-to-click-over-an-icon-in-the-plugin-bar-a-plugin-a)
| Google Chrome: Set a hotkey to "click" over an icon in the plugin bar (a plugin actually!) | CC BY-SA 2.5 | 0 | 2011-03-29T00:35:12.813 | 2011-03-29T01:15:18.610 | 2017-03-20T10:18:17.980 | -1 | 312,907 | [
"javascript",
"firefox",
"plugins",
"google-chrome",
"hotkeys"
]
|
5,466,643 | 1 | 5,467,542 | null | 0 | 3,710 | I have a database that stores Chinese characters. This works fine. The code for this system is written in vbscript ASP. Here is a sample [http://www.arrb.com.au/test.asp](http://www.arrb.com.au/test.asp)

I also access this database via ASP.NET but the characters do not come out in Chinese.
See here [http://www.arrb.com.au/Test-Page.aspx](http://www.arrb.com.au/Test-Page.aspx)

Why does ASP work and ASP.NET not work?
The code to access the Chinese in ASP.NET is similar to:
```
query = "select * from myTable ....";
SqlDataAdapter da = new SqlDataAdapter(query, Yart.SQLServerConnections.SqlConnection);
DataSet ds = new DataSet();
da.Fill(ds, "paragraphs");
Response.Write((string)ds.Tables["paragraphs"].Rows[0]["chinese"]);
```
I am thinking it might be my cast to a string that is destroying the encoding perhaps?
Note that in both sample pages I have this tag:
```
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
```
| How do you access SQL and display Chinese characters in ASP.NET? | CC BY-SA 2.5 | 0 | 2011-03-29T00:36:56.133 | 2012-05-06T02:15:00.917 | 2012-05-06T02:15:00.917 | 1,079,354 | 24,696 | [
"asp.net",
"cjk"
]
|
5,466,773 | 1 | 5,467,048 | null | -1 | 149 | I recently created a website where a user logs in and accesses various forms and other things. I was wondering, after login, how can I change the php code so that it automatically modifies a portion of the page making it personal? Here is a screen shot of the front end.
I would like the login form portion disappear and then have a new layout replace it. Would I use Javascript or AJAX. If either, does anyone have any guidance on how to go about doing this project?

| How to make PHP pages dynamic? | CC BY-SA 4.0 | null | 2011-03-29T01:00:45.663 | 2019-03-10T08:20:07.960 | 2019-03-10T08:20:07.960 | 472,495 | 506,517 | [
"php",
"javascript",
"html",
"ajax",
"dynamic"
]
|
5,467,148 | 1 | 5,467,427 | null | 7 | 587 | When I run the following code
```
pMin = {-3, -3};
pMax = {3, 3};
range = {pMin, pMax};
Manipulate[
GraphicsGrid[
{
{Graphics[Locator[p], PlotRange -> range]},
{Graphics[Line[{{0, 0}, p}]]}
}, Frame -> All
],
{{p, {1, 1}}, Locator}
]
```

I expect the Locator control to be within the bounds of the first Graph, but instead it can be moved around the whole GraphicsGrid region. Is there an error in my code?
I also tried
```
{{p, {1, 1}}, pMin, pMax, Locator}
```
instead of
```
{{p, {1, 1}}, Locator}
```
But it behaves completely wrong.
Thanks to everyone, this is my final solution:
```
Manipulate[
distr1 = BinormalDistribution[p1, {1, 1}, \[Rho]1];
distr2 = BinormalDistribution[p2, {1, 1}, \[Rho]2];
Grid[
{
{Graphics[{Locator[p1], Locator[p2]},
PlotRange -> {{-5, 5}, {-5, 5}}]},
{Plot3D[{PDF[distr1, {x, y}], PDF[distr2, {x, y}]}, {x, -5, 5}, {y, -5, 5}, PlotRange -> All]}
}],
{{\[Rho]1, 0}, -0.9, 0.9}, {{\[Rho]2, 0}, -0.9, 0.9},
{{p1, {1, 1}}, Locator},
{{p2, {1, 1}}, Locator}
]
```

Now the problem is that I cannot resize and rotate the lower 3d graph. Does anyone know how to fix that?
I'm back to the solution with two Slider2D objects.
| Locator goes out of the graph region | CC BY-SA 3.0 | 0 | 2011-03-29T02:12:42.700 | 2012-01-03T21:56:01.640 | 2012-01-03T21:56:01.640 | 615,464 | 166,132 | [
"wolfram-mathematica"
]
|
5,467,193 | 1 | 5,486,473 | null | 0 | 945 | My data for for an entity's attribute is not being fetched upon restart or not being saved before quitting (could be either case). The bottom line is, the data is not showing up in the table upon restart. I think I may need to consolidate my core data methods or move them to the app delegate file instead.
I think my core data code is all messed up, can anyone help fix it?
Let me know if you need any additional code to look at from the appdelegate.m etc.
Here is the code for my View Controller:
```
#import "RoutineTableViewController.h"
#import "AlertPrompt.h"
#import "Routine.h"
#import "CurlAppDelegate.h"
@implementation RoutineTableViewController
@synthesize tableView;
@synthesize eventsArray;
@synthesize managedObjectContext;
- (void)dealloc
{
[managedObjectContext release];
[eventsArray release];
[super dealloc];
}
- (void)didReceiveMemoryWarning
{
[super didReceiveMemoryWarning];
}
- (NSManagedObjectContext *) managedObjectContext {
if (managedObjectContext != nil) {
return managedObjectContext;
}
NSPersistentStoreCoordinator *coordinator = [self persistentStoreCoordinator];
if (coordinator != nil) {
managedObjectContext = [[NSManagedObjectContext alloc] init];
[managedObjectContext setPersistentStoreCoordinator: coordinator];
}
return managedObjectContext;
}
-(void)addEvent
{
Routine *routine = (Routine *)[NSEntityDescription insertNewObjectForEntityForName:@"Routine" inManagedObjectContext:managedObjectContext];
CurlAppDelegate *curlAppDelegate = [[UIApplication sharedApplication] delegate];
NSManagedObjectContext *context = [curlAppDelegate managedObjectContext];
NSManagedObject *newRoutineEntry;
newRoutineEntry = [NSEntityDescription insertNewObjectForEntityForName:@"Routine" inManagedObjectContext:context];
NSError *error = nil;
if (![managedObjectContext save:&error]) {
// Handle the error.
}
[eventsArray insertObject:routine atIndex:0];
NSIndexPath *indexPath = [NSIndexPath indexPathForRow:0 inSection:0];
[self.tableView insertRowsAtIndexPaths:[NSArray arrayWithObject:indexPath] withRowAnimation:UITableViewRowAnimationFade];
[self.tableView scrollToRowAtIndexPath:[NSIndexPath indexPathForRow:0 inSection:0] atScrollPosition:UITableViewScrollPositionTop animated:YES];
}
#pragma mark - View lifecycle
- (void)viewDidLoad
{
CurlAppDelegate *curlAppDelegate = [[UIApplication sharedApplication] delegate];
NSManagedObjectContext *context = [curlAppDelegate managedObjectContext];
NSFetchRequest *request = [[NSFetchRequest alloc] init];
NSEntityDescription *entity = [NSEntityDescription entityForName:@"Routine" inManagedObjectContext:context];
[request setEntity:entity];
NSError *error = nil;
NSMutableArray *mutableFetchResults = [[context executeFetchRequest:request error:&error] mutableCopy];
if (mutableFetchResults == nil) {
// Handle the error.
}
[self setEventsArray:mutableFetchResults];
[mutableFetchResults release];
[request release];
UIBarButtonItem * addButton = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemAdd target:self action:@selector(showPrompt)];
[self.navigationItem setLeftBarButtonItem:addButton];
[addButton release];
UIBarButtonItem *editButton = [[UIBarButtonItem alloc]initWithTitle:@"Edit" style:UIBarButtonItemStyleBordered target:self action:@selector(toggleEdit)];
self.navigationItem.rightBarButtonItem = editButton;
[editButton release];
[super viewDidLoad];
}
-(void)toggleEdit
{
[self.tableView setEditing: !self.tableView.editing animated:YES];
if (self.tableView.editing)
[self.navigationItem.rightBarButtonItem setTitle:@"Done"];
else
[self.navigationItem.rightBarButtonItem setTitle:@"Edit"];
}
-(void)showPrompt
{
AlertPrompt *prompt = [AlertPrompt alloc];
prompt = [prompt initWithTitle:@"Add Workout Day" message:@"\n \n Please enter title for workout day" delegate:self cancelButtonTitle:@"Cancel" okButtonTitle:@"Add"];
[prompt show];
[prompt release];
}
- (void)alertView:(UIAlertView *)alertView willDismissWithButtonIndex:(NSInteger)buttonIndex
{
if (buttonIndex != [alertView cancelButtonIndex])
{
NSString *entered = [(AlertPrompt *)alertView enteredText];
if(eventsArray && entered)
{
[eventsArray addObject:entered];
[tableView reloadData];
}
}
}
- (void)viewDidUnload
{
self.eventsArray = nil;
[super viewDidUnload];
}
- (void)viewWillAppear:(BOOL)animated
{
[super viewWillAppear:animated];
}
- (void)viewDidAppear:(BOOL)animated
{
[super viewDidAppear:animated];
}
- (void)viewWillDisappear:(BOOL)animated
{
[super viewWillDisappear:animated];
}
- (void)viewDidDisappear:(BOOL)animated
{
[super viewDidDisappear:animated];
}
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
// Return YES for supported orientations
return (interfaceOrientation == UIInterfaceOrientationPortrait);
}
#pragma mark - Table view data source
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
{
return 1;
}
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
return [eventsArray count];
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
static NSString *CellIdentifier = @"Cell";
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil)
cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellEditingStyleDelete reuseIdentifier:CellIdentifier] autorelease];
cell.textLabel.text = [self.eventsArray objectAtIndex:indexPath.row];
return cell;
}
// Override to support conditional editing of the table view.
- (BOOL)tableView:(UITableView *)tableView canEditRowAtIndexPath:(NSIndexPath *)indexPath
{
// Return NO if you do not want the specified item to be editable.
return YES;
}
-(void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath
{
if (editingStyle == UITableViewCellEditingStyleDelete) {
// Delete the managed object at the given index path.
NSManagedObject *eventToDelete = [eventsArray objectAtIndex:indexPath.row];
[managedObjectContext deleteObject:eventToDelete];
// Update the array and table view.
[eventsArray removeObjectAtIndex:indexPath.row];
[tableView deleteRowsAtIndexPaths:[NSArray arrayWithObject:indexPath] withRowAnimation:YES];
// Commit the change.
NSError *error = nil;
if (![managedObjectContext save:&error]) {
// Handle the error.
}
}
}
@end
```
And here is the data model:

Edit:
Added PersisentStoreCoordinater Method (From App Delegate):
```
- (NSPersistentStoreCoordinator *)persistentStoreCoordinator
{
if (__persistentStoreCoordinator != nil)
{
return __persistentStoreCoordinator;
}
NSURL *storeURL = [[self applicationDocumentsDirectory] URLByAppendingPathComponent:@"Curl.sqlite"];
NSError *error = nil;
__persistentStoreCoordinator = [[NSPersistentStoreCoordinator alloc] initWithManagedObjectModel:[self managedObjectModel]];
if (![__persistentStoreCoordinator addPersistentStoreWithType:NSSQLiteStoreType configuration:nil URL:storeURL options:nil error:&error])
{
/*
Replace this implementation with code to handle the error appropriately.
abort() causes the application to generate a crash log and terminate. You should not use this function in a shipping application, although it may be useful during development. If it is not possible to recover from the error, display an alert panel that instructs the user to quit the application by pressing the Home button.
Typical reasons for an error here include:
* The persistent store is not accessible;
* The schema for the persistent store is incompatible with current managed object model.
Check the error message to determine what the actual problem was.
If the persistent store is not accessible, there is typically something wrong with the file path. Often, a file URL is pointing into the application's resources directory instead of a writeable directory.
If you encounter schema incompatibility errors during development, you can reduce their frequency by:
* Simply deleting the existing store:
[[NSFileManager defaultManager] removeItemAtURL:storeURL error:nil]
* Performing automatic lightweight migration by passing the following dictionary as the options parameter:
[NSDictionary dictionaryWithObjectsAndKeys:[NSNumber numberWithBool:YES], NSMigratePersistentStoresAutomaticallyOption, [NSNumber numberWithBool:YES], NSInferMappingModelAutomaticallyOption, nil];
Lightweight migration will only work for a limited set of schema changes; consult "Core Data Model Versioning and Data Migration Programming Guide" for details.
*/
NSLog(@"Unresolved error %@, %@", error, [error userInfo]);
abort();
}
return __persistentStoreCoordinator;
}
```
| Why Isn't Core Data Fetching My Data? | CC BY-SA 2.5 | 0 | 2011-03-29T02:22:22.393 | 2011-04-07T00:40:37.067 | 2011-04-07T00:40:37.067 | null | null | [
"iphone",
"objective-c",
"core-data"
]
|
5,467,398 | 1 | 5,598,240 | null | 12 | 5,903 | I want to make textviews float to the left (like css floats). The reason I have so many textviews is I want every word in my app to be clickable. So I want this result:

Currently, I have the following xml codes:
```
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent" android:orientation="horizontal" android:baselineAligned="false">
<TextView android:text="@string/nicholasStr" android:layout_width="wrap_content" android:textSize="18sp" android:textStyle="bold" android:layout_height="wrap_content" android:id="@+id/nicholas" ></TextView>
<TextView android:text="@string/wasStr" android:layout_width="wrap_content" android:textSize="18sp" android:textStyle="bold" android:id="@+id/was" android:layout_height="wrap_content" ></TextView>
<TextView android:layout_width="wrap_content" android:textSize="18sp" android:textStyle="bold" android:id="@+id/dots" android:layout_height="wrap_content" android:text="@string/dots"></TextView>
<TextView android:layout_width="wrap_content" android:textSize="18sp" android:textStyle="bold" android:layout_height="wrap_content" android:text="@string/older" android:id="@+id/older"></TextView>
<TextView android:layout_width="wrap_content" android:textSize="18sp" android:textStyle="bold" android:layout_height="wrap_content" android:text="@string/older" android:id="@+id/older"></TextView>
<TextView android:layout_width="wrap_content" android:textSize="18sp" android:textStyle="bold" android:layout_height="wrap_content" android:text="@string/older" android:id="@+id/older"></TextView>
<TextView android:text="@string/older" android:layout_width="wrap_content" android:textSize="18sp" android:textStyle="bold" android:layout_height="wrap_content" android:id="@+id/older"></TextView>
</LinearLayout>
```
But the result goes like this:

I'm new to android dev, many thanks in advance. :)
| Android: How can I make text views float to the left? | CC BY-SA 2.5 | 0 | 2011-03-29T02:54:28.373 | 2017-03-03T10:04:51.047 | 2012-06-05T16:03:54.257 | 44,390 | 827,530 | [
"android",
"xml",
"layout"
]
|
5,467,516 | 1 | 5,472,447 | null | 3 | 1,658 | I'd like to create a PreferenceActivity with a button bar at the bottom, should look like the picture on the right. Anyone know how to do this? I came across this: [Bottom button bar in android](https://stackoverflow.com/questions/3795923/bottom-button-bar-in-android), but it doesn't work in a Preference screen

| Android: Bottom Button Bar in PrefernceActivity? | CC BY-SA 2.5 | 0 | 2011-03-29T03:15:30.657 | 2011-03-29T12:24:08.083 | 2017-05-23T12:30:39.393 | -1 | 577,826 | [
"android",
"android-layout",
"preferenceactivity"
]
|
5,467,708 | 1 | null | null | 1 | 1,331 | I need to fetch data from one table (multiple rows) and insert into other table after modifying and adding some new fields.
For example:
> Table 1 itemid, price, qnt,
date_of_dispatch ,etcTable2 Invoiceid, Invoicedate,
customer_id, itemid, price, qnt,
total_amt, date_of_dispatch,
grandtotal
Please help me to make it in Classic asp with ms access
in first stage I will fetch record in page from table one (multiple rows) so user can modify , then after click save button insert all data in present form into table2.
Please help...

| Multiple record insert - Classsic ASP | CC BY-SA 2.5 | null | 2011-03-29T03:53:17.067 | 2011-04-07T12:32:12.153 | 2011-04-07T12:32:12.153 | 195,790 | 195,790 | [
"asp-classic",
"insert",
"records"
]
|
5,468,184 | 1 | 5,468,216 | null | 1 | 1,494 | I am a newbie into Windows Service
I have installed my Windows service using `installutil` command.
Now it shows that installation is successful but when I try to access the service from
```
ControlPanel->Administrative Tools->Computer Management->Services and Applications->Services
```
But I am not able to see my windows service in the list of services.
Where should I look for it?
This is the message that is displayed after installation of windows service. I hope that it means that Windows Service is installed successfully

If installation is successful then what could be wrong?
| Issue with Windows Service: Windows Service not displayed in list of Services even after installation | CC BY-SA 2.5 | null | 2011-03-29T05:15:48.677 | 2015-02-06T23:31:16.867 | 2015-02-06T23:31:16.867 | 41,956 | 463,857 | [
".net",
"windows-services"
]
|
5,468,489 | 1 | 5,469,158 | null | 1 | 3,494 | I have implemented export data from GridView to excelsheet functionality in .net application.
and result coming in the following format which is wrong:

but result should be in the following format:

column in gridview :
FirstName,
LastName,
```
<asp:TemplateField HeaderText="List of Answers" >
<headerstyle cssclass="headingtext" />
<ItemTemplate>
<asp:Label ID="lblAnswer" runat="server" Text='<%#DataBinder.Eval(Container.DataItem,"List") %>'></asp:Label>
</ItemTemplate>
<itemstyle cssclass="cells" HorizontalAlign="Left" />
</asp:TemplateField>
```
and text coming from database for 3r column is:
```
"Q1:No<br/>Chair<br/>Desk<br/>Monitor<br/>Keyboard<br/><br/>"
```
row generated in excel sheet should be single according to result set.
Expected result should be as shown in second image.
How can we resolve this?
| Line break issue when export data from gridview to excelsheet in asp.net | CC BY-SA 2.5 | 0 | 2011-03-29T05:58:35.317 | 2011-03-29T10:28:18.173 | 2011-03-29T07:27:11.033 | 503,125 | 503,125 | [
"asp.net",
"gridview",
"export-to-excel"
]
|
5,468,551 | 1 | 5,469,260 | null | 1 | 1,181 | I'm finishing up a drawing application that uses OpenGL ES 2.0 (WebGL) and JS. Things work pretty well unless I draw with very quick movements. See the image below:

This loop was drawn with a smooth motion, but because JS was only able to get mouse readings at specific locations, the result is faceted. This happens to a certain degree in Photoshop if you have mouse smoothing turned off, though obviously much less because PS has the ability to poll at a much higher rate.
So, I would like to implement some mouse smoothing, but I'm concerned about making sure it's very efficient so that it doesn't bog down the actual pixel drawing operations. I was originally thinking about using the mouse locations that JS is able to grab to generate splines and interpolate between readings to give a smoother result. I'm not sure if this is the best approach, though. If it is, how do I make sure I sample the correct locations on the intermediate spline? Most of the spline equations I've found don't have uniformly-distributed values for `t = [0, 1]`.
Any help/guidance/advice would be very appreciated. Thanks!
| Most efficient way to implement mouse smoothing | CC BY-SA 2.5 | 0 | 2011-03-29T06:07:59.180 | 2011-03-29T07:32:52.720 | null | null | 555,322 | [
"javascript",
"algorithm",
"opengl",
"opengl-es"
]
|
5,468,612 | 1 | 5,469,281 | null | 0 | 748 | So I have the following code:
```
@ServiceProvider(service=org.test.Driver.class)
public class TestLDriver implements SQLDriver{
```
and the JDBC layout is:

Two problems occured, one is.. am I doing the right thing?
The second is that I get an error that this class is not assignable to org.netezza.Driver.class. What am I doing wrong?
When I try to use the
`Class.register(Driver.class)` it gives me a cannot find symbol error...
| Loading a JDBC driver | CC BY-SA 4.0 | null | 2011-03-29T06:14:29.427 | 2021-07-19T01:52:10.827 | 2021-07-19T01:52:10.827 | 12,892,553 | 95,265 | [
"java",
"jdbc"
]
|
5,468,666 | 1 | 5,468,960 | null | 7 | 1,690 | Is there a way I can create a JTextArea or JTextField with some JLabels inside it, like in this screenshot from Facebook:

What I am trying to do is put some JButtons with titles like "Apple", "Orange", ... When user clicks on a JButton of those, say "Orange", a Jlabel with the word Orange will be added to the JTextArea or JTextField. If user clicked on the [x] on the Jlabel, the word will be removed from the field.
| How to create a Jlabel inside JTextArea like in Facebook? | CC BY-SA 2.5 | 0 | 2011-03-29T06:20:44.413 | 2011-03-29T11:06:15.767 | 2011-03-29T11:06:15.767 | 513,838 | 147,381 | [
"java",
"swing",
"jlabel",
"jtextfield"
]
|
5,469,321 | 1 | null | null | 1 | 1,381 | I am now creating a website.I v almost done for Login page,register page and change password page.I v created the masterpage which is `masterpage.master`.
After i create a folder Accoumt and put all three pages ( `login,register,changepassword aspx`) into this Account folder.My masterpage is not working `there.Masterpage` cannot load in the folder
If i move those 3 pages outside of the folder...it works well.
Could you give me idea pls?
The master page in these 3 sentences are working at the ouside of the Account Folder.Otherwise it does not work...
```
<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="ChangePassword.aspx.cs" Inherits="Account_ChangePassword" Title="Change Password"%>
<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="Login.aspx.cs" Inherits="Account_Login" Title="LoginPage" %>
<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="Register.aspx.cs" Inherits="Register" Title="Register" %>
```

| How to handl this masterpage in ASP.NET | CC BY-SA 2.5 | 0 | 2011-03-29T07:39:11.393 | 2011-03-30T02:53:22.337 | 2011-03-30T02:53:22.337 | 679,953 | 679,953 | [
"asp.net",
"master-pages"
]
|
5,469,851 | 1 | 5,469,950 | null | 1 | 672 | I have created a full mssql backup file and now i want to restore it to a certain point of time. But i can't.
I select the device backup and the list of "Restore items" shows. Then i specify the "Point of time", but then the items in the "Restore items" list gets blank and i can't select a database to restore.
The backup contains the log file. When i restore the backup without the "Point of time" option the file is also restored.
Is there something i need to enable when i make the backup? Or what is doing wrong here?

| MSSQL: Can't restore with Time of Point | CC BY-SA 2.5 | null | 2011-03-29T08:36:14.837 | 2011-03-29T08:49:13.553 | 2011-03-29T08:49:13.553 | 155,035 | 155,035 | [
"sql-server"
]
|
5,469,865 | 1 | 5,471,787 | null | 0 | 710 | I would like to have two UITextViews, one in the background and one in the front. Is there any possibility to crop 50% of the one in the foreground so that you can see 50% of the one in the background? I do not want to re-size the UITextView in the front, but merely to hide half of it.
I think an illustration is in place as this might sound rather confusing:

I thought I do this with two view controllers, one hidden, one visible:
```
// Visible and Hidden View
VisibleView *visibleController = [[VisibleView alloc] initWithNibName:@"VisibleView" bundle:nil];
self.visibleView = visibleController;
[visibleController release];
HiddenView *hiddenController = [[HiddenView alloc] initWithNibName:@"HiddenView" bundle:nil];
self.hiddenView = hiddenController;
[hiddenController release];
[self.view insertSubview:visibleView.view atIndex:0]; // show visibleView
```
Ideally, I would like to animate the 'hiding' of the visibleView Controller, so that the hiddenViewController unveils in the background (like a sliding door - sliding in from the right). This is what I've come up so far, but I can't think of any transformation / cropping technique that will do:
```
[UIView beginAnimations:@"Hide VisibleView" context:nil];
[UIView setAnimationDuration:0.5];
[UIView setAnimationCurve:UIViewAnimationCurveEaseInOut];
[UIView setAnimationTransition: ??
forView: self.view
cache: YES];
[visibleView.view removeFromSuperview];
[self.view insertSubview:hiddenView.view atIndex:0];
[UIView commitAnimations];
```
I guess this is quite basic, but I'm still a beginner and would be very happy over any suggestions of how to accomplish this.
| How to crop an UITextView | CC BY-SA 2.5 | 0 | 2011-03-29T08:37:58.947 | 2011-04-22T22:18:29.387 | null | null | 648,371 | [
"iphone",
"cocoa-touch",
"uiview",
"uitextview"
]
|
5,469,897 | 1 | 5,472,646 | null | 1 | 248 | Question:
I have data that I retrieve from a database, which looks like this:

Now I need to transform it to the below format, in order to be able to draw a piechart.

In ReportingService, there is the Matrix control to achieve this, but what can I use to achieve the same in ordinary C#, in order to render it to a PieChart image ?
Note that the number of buildings as well as the usage-types is variable and not known ahead of time.
Solved thanks to Magnus and Google:
```
SELECT * FROM
(
SELECT
STE_Designation AS RPT_Site
,BDG_Designation AS RPT_Building
,UG_Code AS RPT_Usage_Code
,UG_Caption AS RPT_Usage
,SUM(MP_RMArea_Area) AS RPT_Area
FROM V_RPT_RoomDetail
WHERE (RM_MDT_ID = 1)
GROUP BY
STE_Designation
,BDG_Designation
,UG_Code
,UG_Caption
--ORDER BY STE_Designation, BDG_Designation, UG_Code, UG_Caption
) AS SourceTable
PIVOT
(
SUM(RPT_Area)
FOR RPT_Building IN ([Building1], [Building2], [BuildingN])
) AS PivotTable
ORDER BY RPT_Site, RPT_Usage_Code
```
Where the pivot columns need to be generated in code by a select distinct.
| How to transform a datatable to a ReportingService-like matrix? | CC BY-SA 2.5 | 0 | 2011-03-29T08:40:21.190 | 2011-03-31T11:13:52.230 | 2011-03-31T11:13:52.230 | 155,077 | 155,077 | [
"c#",
".net",
"vb.net",
"datatable",
"charts"
]
|
5,470,113 | 1 | 5,471,308 | null | 4 | 206 | My `Vehicle` type:
```
public class Vehicle : EntityObject
{
private Lazy<string> _nameFromDelegate = null;
private Lazy<IList<Component>> _components = null;
public Vehicle(int id, string name, Lazy<string> nameFromDelegate, Lazy<IList<Component>> components)
: base(id)
{
this.Name = name;
this._nameFromDelegate = nameFromDelegate;
}
public string Name { get; private set; }
public string NameFromDelegate
{
get
{
return this._nameFromDelegate.Value;
}
}
public IList<Component> Components
{
get
{
return this._components.Value;
}
}
}
```
I want to project my type in L2S using the constructor and pass in certain mappings as delegates so they're evaluated in memory rather than L2S trying to translate them to SQL.
In the example below i'm trying to map the "vehicle.Name" value from SQL onto two properties on my `Vehicle` type: the "Name" `string` property and the "NameFromDelegate" `string` property (which encapsulates the `Lazy<string>`).
I'm hoping to prove that it doesn't make any difference to L2S whether i pass in the "vehicle.Name" to the `string` ctor param or to the `Lazy<string>` ctor param. But perhaps it does:

I don't understand why there is a need to cast from `string` to `Func<string>`. Ideas?
Stack trace for reference:
```
at System.Convert.DefaultToType(IConvertible value, Type targetType, IFormatProvider provider)
at System.String.System.IConvertible.ToType(Type type, IFormatProvider provider)
at System.Convert.ChangeType(Object value, Type conversionType, IFormatProvider provider)
at System.Data.Linq.DBConvert.ChangeType(Object value, Type type)
at Read_Vehicle(ObjectMaterializer`1 )
at System.Data.Linq.SqlClient.ObjectReaderCompiler.ObjectReader`2.MoveNext()
at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
at DelegateQueries.Models.VehicleRepoWithDelegates.GetAll() in %path%\DelegateQueries\Models\VehicleRepoWithDelegates.cs:line 26
at DelegateQueries.Tests.RepoTests.VehicleRepo_CanReturn_NameFromDelegateProp_InLinq_WithDelegate() in %path%\DelegateQueries\DelegateQueries.Tests\RepoTests.cs:line 31
```
| How can i pass a Lazy<T> into my projection? | CC BY-SA 2.5 | null | 2011-03-29T09:00:18.483 | 2011-03-30T08:53:32.453 | null | null | 56,145 | [
"linq-to-sql",
"domain-driven-design",
"projection",
"lazy-evaluation"
]
|
5,470,158 | 1 | 5,470,226 | null | 14 | 22,171 | I have the following:

The error says
I've build and rebuild but nothing happens. I'm sure this must work, because a WPF demo app that I downloaded has everything the same. What's going on?
| Undefined CLR namespace | CC BY-SA 2.5 | 0 | 2011-03-29T09:04:39.763 | 2017-04-26T09:01:19.053 | null | null | 523,689 | [
"wpf"
]
|
5,470,671 | 1 | 5,470,920 | null | 2 | 2,719 | 
It looks like selected some text, but the background color will not disappear when you click it or move cursor.
| How to set background color for some inner text of HTML textarea element? | CC BY-SA 2.5 | 0 | 2011-03-29T09:49:44.843 | 2011-03-29T11:00:12.750 | null | null | 468,712 | [
"javascript",
"html",
"dom",
"range"
]
|
5,470,697 | 1 | 5,470,802 | null | 0 | 234 | How to center the TextView in Android?
This is what happens:

This is what I want:

| Center the TextView in android? | CC BY-SA 3.0 | 0 | 2011-03-29T09:52:37.777 | 2018-04-05T16:58:17.633 | 2018-04-05T16:58:17.633 | 1,033,581 | 1,594,493 | [
"android",
"layout",
"textview"
]
|
5,470,714 | 1 | 5,472,022 | null | 1 | 5,353 | I am using the Primefaces upload tool since yesterday, but today i started to test it with different file extensions. My surprise was that the only file that i can succesfully upload is .txt I dont understand why is that. I saw code snipets around the web and i think my code is almost the same. Am i missing something?
Here a bit more info:
This is the error:

> WARNING: StandardWrapperValve[Faces Servlet]: PWC1406: Servlet.service() for servlet Faces Servlet threw exception
java.io.IOException: Processing of multipart/form-data request failed. \uploaded\upload_3be1503c_12f00f7e117__7ffb_00000007.tmp (The system cannot find the path specified)
at org.primefaces.webapp.MultipartRequest.parseRequest(MultipartRequest.java:67)
at org.primefaces.webapp.MultipartRequest.(MultipartRequest.java:49)
This is the code at the JSF
```
<h:form enctype="multipart/form-data">
<!-- New Upload tool -->
<p:fileUpload fileUploadListener="#{uploadController.handleFileUpload}"
allowTypes="*.doc;*.docx;*.pdf;*.odt;" description="Text"/>
</h:form>
```
This is part of the code at the managed bean
```
public void handleFileUpload(FileUploadEvent event) {
uploadedFile = event.getFile();
String fileName = FilenameUtils.getName(uploadedFile.getFileName());
String contentType = uploadedFile.getContentType();
byte[] bytes = uploadedFile.getContents();
Garbage garbage = new Garbage();
garbage.setFilename(fileName);
garbage.setFile(bytes);
garbage.setDescription("info about the file");
garbage.setFileType("File extension");
fileUploaderEJB.uploadGarbage(garbage);
FacesContext.getCurrentInstance().addMessage(
null,
new FacesMessage(String.format(
"File '%s' of type '%s' successfully uploaded!",
fileName, contentType)));
}
```
Just in case, the primefaces related sutuff at web.xml
```
<servlet>
<servlet-name>Resource Servlet</servlet-name>
<servlet-class>org.primefaces.resource.ResourceServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>Resource Servlet</servlet-name>
<url-pattern>/primefaces_resource/*</url-pattern>
</servlet-mapping>
<filter>
<filter-name>PrimeFaces FileUpload Filter</filter-name>
<filter-class>org.primefaces.webapp.filter.FileUploadFilter
</filter-class>
<init-param>
<param-name>uploadDirectory</param-name>
<param-value>/uploaded</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>PrimeFaces FileUpload Filter</filter-name>
<servlet-name>Faces Servlet</servlet-name>
</filter-mapping>
```
| HTTP error when uploading .pdf, .doc or .docx. files with primefaces upload tool | CC BY-SA 2.5 | 0 | 2011-03-29T09:54:17.900 | 2011-09-13T13:04:35.687 | 2011-03-29T11:21:03.537 | 614,141 | 614,141 | [
"java",
"jsf",
"jakarta-ee",
"jsf-2",
"primefaces"
]
|
5,470,805 | 1 | 5,497,573 | null | 3 | 3,308 | I have two inline datepickers on my page to select a date range:

As you can see, depending on the months the number of rows differ. This looks pretty bad though. When using a single datepicker with `numberOfMonths > 1` it synchronizes the row counts nicely, but unfortunately that won't help me as I need two datepickers to select a range.
So I'm looking for a solution to synchronize the row counts of my two datepickers; preferably without modifying the original datepicker code (monkeypatching is fine, but if it can be avoided it would be better of course).
Here's the code I'm using to create the date pickers (even though you probably don't need it since it also happens without `showOtherMonths` being enabled - so it should occur without any options, too):
```
$('#startDate, #endDate').datepicker({
changeMonth: true,
changeYear: true,
dateFormat: 'dd/mm/yy',
firstDay: 1,
showOtherMonths: true,
selectOtherMonths: true,
});
```
| Synchronize row count of two jQuery UI datepickers | CC BY-SA 2.5 | 0 | 2011-03-29T10:02:38.213 | 2014-05-22T20:49:34.983 | 2011-03-29T10:19:15.087 | 298,479 | 298,479 | [
"jquery",
"jquery-ui",
"jquery-ui-datepicker"
]
|
5,471,279 | 1 | null | null | 0 | 71 | i try to embed the java file for ebay sharing with supported jar files, and i also have the jar file of ksoap2 for xml parsing.
The following error is shown in package,i don`t know how to recover it.


| android build path conflict? | CC BY-SA 2.5 | null | 2011-03-29T10:45:09.467 | 2011-03-29T13:05:58.563 | null | null | 555,806 | [
"android",
"android-ndk"
]
|
5,471,596 | 1 | null | null | 1 | 1,371 | I integrated Facebook like box on my page. I like to change the width of the box. How can I do this!
my config
```
<iframe scrolling="no" frameborder="0" style="border: medium none; overflow: hidden; width: 85px; height: 21px;" allowtransparency="true" src="http://www.facebook.com/plugins/like.php?href=http://optisolbusiness.com/gonzobidz/&layout=button_count&show_faces=true&width=90&action=like&colorscheme=light&height=21"></iframe>
```
switch width this  to like this 
| changing width of face book like box | CC BY-SA 3.0 | 0 | 2011-03-29T11:13:04.927 | 2013-08-07T05:35:42.927 | 2013-08-07T05:35:42.927 | 430,112 | 430,112 | [
"facebook",
"iframe",
"facebook-like"
]
|
5,471,813 | 1 | 5,474,168 | null | 1 | 293 | i m not able to get processing values beyond "iid". giving exception:

```
- (void)parser:(NSXMLParser *)parser didStartElement:(NSString *)elementName
namespaceURI:(NSString *)namespaceURI qualifiedName:(NSString *)qualifiedName
attributes:(NSDictionary *)attributeDict {
if([elementName isEqualToString:@"NewDataSet"])
{
appDelegate.books = [[NSMutableArray alloc] init];
}
else if([elementName isEqualToString:@"Table"])
{
if([elementName isEqualToString:@"id"])
{
{
aBook = [[Book alloc] init];
}
}
NSLog(@"Processing Element: %@", elementName);
}
- (void)parser:(NSXMLParser *)parser foundCharacters:(NSString *)string {
if(!currentElementValue)
currentElementValue = [[NSMutableString alloc] initWithString:string];
else
{
[currentElementValue appendString:string];
NSLog(@"Processing Value: %@", currentElementValue);
}
}
- (void)parser:(NSXMLParser *)parser didEndElement:(NSString *)elementName
namespaceURI:(NSString *)namespaceURI qualifiedName:(NSString *)qName {
//if([elementName isEqualToString:@"Tablesreturn"])
//return;
if([elementName isEqualToString:@"Table"])
{
[appDelegate.books addObject:aBook];
[aBook release];
aBook = nil;
}
else
[aBook setValue:currentElementValue forKey:elementName];
[currentElementValue release];
currentElementValue = nil;
}
```
| problem in parsing! | CC BY-SA 2.5 | null | 2011-03-29T11:32:04.817 | 2011-03-30T04:17:42.230 | 2011-03-30T04:17:42.230 | 563,848 | 10,441,561 | [
"iphone",
"objective-c",
"cocoa-touch",
"nsxmlparser"
]
|
5,471,887 | 1 | 5,472,230 | null | 0 | 159 | This is my markup:
```
<div class="contentSubBox">
<h5>Please choose a report</h5>
<div class="arrowNavigation">
<div class="arrowNavigationLeft">
<a href="#" class="button"><<</a>
<a href="#" class="button"><</a>
</div>
<div class="arrowNavigationCenter">Page 1 of 8</div>
<div class="arrowNavigationRight">
<a href="#" class="button">></a>
<a href="#" class="button">>></a>
</div>
</div>
</div>
```
And this is the CSS that goes with it (the relevant part):
```
div.arrowNavigation { position: relative; text-align: center; width: 200px;}
div.arrowNavigation div.arrowNavigationLeft, div.arrowNavigation div.arrowNavigationRight { position: absolute; text-align: left; }
div.arrowNavigation div.arrowNavigationLeft { bottom: 0; left: 0; }
div.arrowNavigation div.arrowNavigationRight { bottom: 0; right: 0; }
.button { background: url("http://www.pimco.com/_layouts/PIMCOdotCOM/images/backgrounds/client-access.png") top left repeat-x #EBF2EB; border: 1px solid #B3C3B7; padding: 3px 8px; }
```
The problem I'm having is that IE 7 cuts off the top and bottom part of the buttons.
In Mozilla Firefox, it looks like this, which is exactly like I want it:

Internet Explorer does this:

The relative positioning isn't responsible. I tried floating and it didn't work. Manually setting height or min-height or font-size of the links or the container didn't help either.
If I change one link to `<input type="button" class="button"/>`
it will look like this:

So changing the height by adding another element somehow works. I really want to avoid that, though.
Any ideas?
Thank you!
| IE 7 doesn't display links in full size | CC BY-SA 2.5 | null | 2011-03-29T11:37:45.873 | 2011-03-29T12:13:40.040 | 2011-03-29T12:13:40.040 | 405,015 | 548,520 | [
"css",
"internet-explorer",
"internet-explorer-7",
"height"
]
|
5,471,982 | 1 | 5,472,677 | null | 13 | 34,725 | I'm trying to build a small MVVM test application, but can't really figure how to display my user control in the MainWindow.
My Solution Explorer:

I got a resource dictionary:
```
<ResourceDictionary
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:vm="clr-namespace:MVVM.ViewModel"
xmlns:vw="clr-namespace:MVVM.View">
<DataTemplate DataType="{x:Type vm:ViewModel}">
<vw:View />
</DataTemplate>
</ResourceDictionary>
```
I got my view:
```
<UserControl x:Class="MVVM.View.View"
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"
d:DesignHeight="300" d:DesignWidth="300">
<UserControl.Resources>
<DataTemplate x:Key="PersonTemplate">
<StackPanel>
<TextBlock Text="{Binding FirstName}" />
</StackPanel>
</DataTemplate>
</UserControl.Resources>
<ListBox ItemsSource="{Binding Path=Persons}"
ItemTemplate="{StaticResource PersonTemplate}" />
</UserControl>
```
and My MainWindow
```
<Window x:Class="MVVM.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:vm="clr-namespace:MVVM.ViewModel"
Title="MainWindow" Height="350" Width="525">
<Window.Resources>
<ResourceDictionary Source="MainWindowResources.xaml" />
</Window.Resources>
<Grid>
</Grid>
</Window>
```
| How can I display my user control in the MainWindow? | CC BY-SA 2.5 | 0 | 2011-03-29T11:47:16.147 | 2013-01-17T06:11:52.430 | 2013-01-17T06:11:52.430 | 305,637 | 523,689 | [
"wpf",
"binding",
"user-controls"
]
|
5,472,105 | 1 | 5,551,360 | null | 2 | 2,858 | I have a groupBox on my form with AutoSize=true and Dock=Top. It contains a tableLayoutPanel which also has AutoSize=true and Dock=Top. When the label on the top of tableLayoutPanel takes only one line of text everything is ok:

But when it takes more then one line, it cuts off a part of its content:

If I'm changing the height of the groupBox on tableLayoutPanel.Resize event then I have a bug with scrollbar:

It happens when scrollbar becomes visible and changes the size of my label so it takes more lines of text.
Can anyone suggest me how to handle this problem?
| GroupBox with AutoSize cuts off part of its content | CC BY-SA 2.5 | 0 | 2011-03-29T11:58:10.713 | 2011-04-05T11:53:25.837 | null | null | 479,248 | [
"c#",
"winforms",
"layout"
]
|
5,472,123 | 1 | 5,473,558 | null | 2 | 268 | I am generating Excel report in Perl.
I am using the Formula in the cell, it's working fine, but in Outlook when I see through preview file, the cell is showing something like `Spreadsheet::WriteExcel::Format=HASH(0x87d6d04)` instead of total.
I am using simple forumulas only, like `=sum(B1:B10)` or `=sum(A1,B2)`.
How to fix this?
> 
outlook excel preview
| Perl Excel preview problem in Outlook | CC BY-SA 2.5 | 0 | 2011-03-29T11:59:25.187 | 2011-03-30T06:18:06.670 | 2011-03-30T06:18:06.670 | 246,963 | 246,963 | [
"perl",
"excel",
"spreadsheet"
]
|
5,472,124 | 1 | 5,472,175 | null | 0 | 493 | I have created a windows service.
When I try to start my service after installing it on my local computer then it gives me error.

My other windows service work well only this specific service gives this error so the problem is not related to Windows but something to do with my service.
What could be wrong?
```
namespace TempWindowService
{
public partial class Service1 : ServiceBase
{
System.Threading.Thread _thread;
public Service1()
{
InitializeComponent();
}
// System.Timers.Timer tm = new System.Timers.Timer(10000);
protected override void OnStart(string[] args)
{
TempWindowService.MyServ.MyServSoapClient newService = new TempWindowService.MyServ.MyServSoapClient();
//newService.BatchProcess();
_thread = new Thread(new ThreadStart(newService.BatchProcess));
_thread.Start();
// tm.Interval = 1000;
//tm.Elapsed += new ElapsedEventHandler(TimerElapsedEvent);
// tm.AutoReset = true;
// tm.Enabled = true;
}
public void StartNew()
{
TempWindowService.MyServ.MyServSoapClient newService = new TempWindowService.MyServ.MyServSoapClient();
newService.BatchProcess();
}
private static void TimerElapsedEvent(object source, ElapsedEventArgs e)
{
}
protected override void OnStop()
{
}
}
}
```
I am calling the webservice from the windows service by adding service reference
```
Service cannot be started. System.InvalidOperationException: An endpoint configuration section for contract 'MyServ.MyServSoap' could not be loaded because more than one endpoint configuration for that contract was found. Please indicate the preferred endpoint configuration section by name.
at System.ServiceModel.Description.ConfigLoader.LookupChannel(String configurationName, String contractName, Boolean wildcard)
```
What could be wrong?
| Error in Windows service While starting the service | CC BY-SA 2.5 | null | 2011-03-29T11:59:29.763 | 2011-03-29T13:03:10.507 | 2011-03-29T12:46:13.410 | 463,857 | 463,857 | [
".net",
".net-3.5",
"windows-services",
"service"
]
|
5,472,207 | 1 | 5,473,597 | null | 7 | 12,457 | I'm working on a [site](http://asian-monitor.com/~robert/betcatcher/), using custom google fonts, but in ie8 not working or just partially(left content good, and a right content, ajax, not so good) any suggestion or idea why not so good?
Thanks.

| ie 8 problem with custom google font | CC BY-SA 2.5 | 0 | 2011-03-29T12:06:21.877 | 2013-02-06T05:13:53.473 | 2011-03-29T14:37:06.440 | 611,116 | 611,116 | [
"html",
"css",
"internet-explorer-8",
"font-face"
]
|
5,472,370 | 1 | 5,487,839 | null | 14 | 9,554 | I am trying to run the Speech Recorder that comes with the Android 2.2 emulator. The problem is that the moment I click the "Record" button:

It aborts with an error message "The application Speech Recorder (process com.android.speechrecorder) has stopped unexpectedly. Please try again."

The problem is that trying again doesn't help.
Now, I searched StackOverflow and I combed the entire Internet and I found many reports of the same problem, without any working solution.
My conclusion is that, for some strange reason, the Android emulator is capable of using the Windows audio device for output, but not for input.
Why is that?
I know that other virtualization software (e.g. VMWare) have no problem using both output and input sections of the host's audio device.
Also, if Speech Recorder never worked for the emulator for anyone, why put it there?
Surely this has worked for someone. Is there a way to make Speech Recorder work for me, too?
I am using Windows XP 32-bit and my AVD is defined with an SD card (mounted upon start).
: I followed the suggestion by @Klaus to try and see whether any exceptions are thrown. I did so by simply typing at the command line to launch a stand-alone version of DDMS (with a logcat display at the bottom). Sure enough, I receive the following exception upon clicking the "Record" button:
```
03-29 14:16:58.195: ERROR/AudioRecord(303): Could not get audio input for record source 1
03-29 14:16:58.195: ERROR/srec_jni(303): initCheck error -22
03-29 14:16:58.205: DEBUG/SpeechRecorderActivity(303): run audio capture thread
03-29 14:16:58.205: WARN/dalvikvm(303): threadid=8: thread exiting with uncaught exception (group=0x4001d800)
03-29 14:16:58.215: ERROR/AndroidRuntime(303): FATAL EXCEPTION: Thread-9
03-29 14:16:58.215: ERROR/AndroidRuntime(303): java.lang.NullPointerException
03-29 14:16:58.215: ERROR/AndroidRuntime(303): at com.android.speechrecorder.SpeechRecorderActivity$4.run(SpeechRecorderActivity.java:192)
03-29 14:16:58.285: WARN/ActivityManager(59): Force finishing activity com.android.speechrecorder/.SpeechRecorderActivity
03-29 14:16:58.904: DEBUG/dalvikvm(59): GC_FOR_MALLOC freed 13324 objects / 656184 bytes in 197ms
03-29 14:16:59.915: INFO/ARMAssembler(59): generated scanline__00000077:03515104_00000000_00000000 [ 33 ipp] (47 ins) at [0x20db68:0x20dc24] in 1247352 ns
03-29 14:17:05.251: DEBUG/SpeechRecorderActivity(303): stopRecording
```
How do I proceed from here? I didn't write the Speech Recorder app, so I don't know what causes the NullPointerException at SpeechRecorderActivity.java line 192. I believe this has something to do with an earlier logcat message:
> Could not get audio input for record
source 1
But the question again is why?
Why wasn't it able to "get audio input for record source 1"?
| Why is it impossible to use the Speech Recorder on the Android emulator? | CC BY-SA 2.5 | 0 | 2011-03-29T12:18:42.660 | 2011-03-30T14:39:44.450 | 2011-03-29T14:22:45.073 | 679,180 | 679,180 | [
"android",
"android-emulator",
"audio-recording",
"microphone"
]
|
5,472,485 | 1 | null | null | 2 | 2,166 | I have a winform MAINFORM , and need to open child forms in this form as shown in the image. The black portion is a panel & would contain a no. of LinkLabels and Treeview with multiple nodes. In the rest of the portion i want to display the child forms when the linklabels on the panel would be clicked.
The child forms should exactly fit into the remaining space i.e. space excluding the space covered by the panel.
Please help me out with the code, how to fit the new form in the left space.
Also, i would like to ask, that, shall i use the panel or is there some other control which could be more efficient or better here.
Also, does the MAINFORM needs to be made an MdiContainer?

| using winforms , mdi , parent and child form, opening child forms in specified space under the parent form | CC BY-SA 2.5 | null | 2011-03-29T12:26:44.773 | 2011-03-29T14:05:11.427 | null | null | 613,929 | [
"c#",
".net",
"winforms",
"parent-child",
"mdi"
]
|
5,472,630 | 1 | 5,472,767 | null | 5 | 9,905 | I'm porting .NET application from WM5 to WM6.5. Besides new resolution I noticed different UI behavior for start menu and title bar (caption bar). My application needs to work in kind of kiosk mode where user can't exit application and bypass our authentication. For this purpose on WM5 I was hiding start button and close button. I am using following function:
```
SHFullScreen(hWnd, SHFS_HIDESTARTICON | SHFS_HIDESIPBUTTON);
```
Hiding buttons kind of works on WM6.5 too, but there is another problem. User can tap on the title bar (menu bar, caption bar - I'm not sure what is proper name for it - the bar on the top of the screen) and get access to Windows Task Manager. See attached screenshot

I cirlced places where user can tap and get out to Task Manager like this:

Any ideas how to disable that interaction? Device is Motorola MC65. Running Windows Mobile 6.5.
So, the final answer is part of an answer posted below:
```
IntPtr tWnd = FindWindow("HHTaskBar", null);
EnableWindow(tWnd, false);
```
We just find the HHTaskBar and disable it. It has some downside, but overall does the trick.
| Disable menu bar in Windows Mobile 6.5 | CC BY-SA 2.5 | 0 | 2011-03-29T12:37:25.113 | 2011-05-25T23:16:10.953 | 2011-03-29T14:44:17.007 | 274,519 | 274,519 | [
".net",
"windows-mobile",
"titlebar",
"windows-mobile-6.5",
"kiosk-mode"
]
|
5,472,863 | 1 | 5,472,932 | null | 3 | 966 | I have an image in a gridview, 
I want dynamic text inside this image. Text I am getting from this way from the database:
```
<%#DataBinder.Eval(Container.DataItem,"textForImage")%>
```
but to show inside this buuble? which control i have to use?
| Show text inside the image asp.net | CC BY-SA 2.5 | null | 2011-03-29T12:56:57.430 | 2011-03-29T13:04:28.580 | null | null | 609,582 | [
"asp.net",
"image"
]
|
5,472,947 | 1 | 5,473,102 | null | 4 | 5,146 | In SharePoint 2010 I have a list. If you right click on a list item or click on the down arrow you get numerous options.

I wish to add my own option here. Would anyone know how I can do this. I only want to do it for certain types of documents i.e. docx.
| SharePoint 2010 adding an option to a list item when you right click | CC BY-SA 2.5 | 0 | 2011-03-29T13:03:52.387 | 2011-08-04T13:05:09.527 | null | null | 596,809 | [
"sharepoint",
"sharepoint-2010"
]
|
5,473,000 | 1 | 5,473,322 | null | 0 | 1,154 | I'm working from the Navigation-based Application template for iPad. I need a NavigationController presenting my playlist hierachy in a TableView.
Works out of the book. No problem.

Now I want this view to take only part of the screen, so, in my AppDelegate I say:
```
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
self.window.rootViewController = self.navigationController;
self.window.rootViewController.view.frame = CGRectMake(0,352,384,1024-352);
[self.window makeKeyAndVisible];
return YES;
}
```
This works. However, now the title bar overlaps part of the TableView.

I could move the table view downwards, but this would make the "pop-in" animation of the next view coming in look somewhat strange, because the animation will return to the overlapping version, then animate, then de-overlap after the animation has finished.
I'm looking for a way to move the title bar of the NC up. Any ideas?
| Is UINavigationController fullscreen only? | CC BY-SA 2.5 | null | 2011-03-29T13:08:31.990 | 2011-03-30T12:14:10.903 | 2011-03-29T13:13:12.707 | 137,350 | 646,909 | [
"iphone",
"ipad",
"uinavigationcontroller"
]
|
5,473,138 | 1 | 5,479,431 | null | 0 | 1,010 | I make a stress test of the SQL Server 2008 and I want to know what is the data flow to tempdb because of usage of temporary tables and variables.
The statistics is also shown in Activity Monitor:

Is it possible somehow to record the data and afterwards analyse it?
I have 2 cases in mind:
1. Record an SQL Server counter (I don't know which is the name for it)
2. Record somehow data from Activity Monitor
| SQL Server 2008: A *Data File IO counter* for SQL Server | CC BY-SA 2.5 | 0 | 2011-03-29T13:19:06.557 | 2011-03-29T21:57:25.540 | null | null | 357,555 | [
"sql-server",
"performance",
"sql-server-2008",
"tempdb"
]
|
5,473,252 | 1 | 5,473,624 | null | 0 | 982 | I'm trying to debug Delphi application in Delphi 7.
I'm getting error " Jet Engine v3.5 not found
I downloaded and installed Microsoft Jet Engine v 3.5 , but this didn't solve the problem
Please help with error
Thank you in advance.

| Jet Engine not found | CC BY-SA 2.5 | null | 2011-03-29T13:25:32.300 | 2011-03-30T09:41:36.467 | 2011-03-29T13:28:15.957 | 505,088 | 410,999 | [
"delphi",
"delphi-7",
"jet"
]
|
5,473,579 | 1 | 5,474,877 | null | 0 | 3,277 | how can i programmatically show/hide this opaque view from ?

Probably in `searchDisplayControllerWillBeginSearch` or `searchDisplayControllerDidBeginSearch` i need to set something... but what?
thanks.
| UISearchDisplayDelegate how to remove this opaque view? | CC BY-SA 2.5 | 0 | 2011-03-29T13:47:40.103 | 2015-03-08T13:47:52.327 | 2011-03-29T14:01:31.333 | 88,461 | 88,461 | [
"iphone",
"objective-c",
"ipad",
"uisearchbar",
"uisearchdisplaycontroller"
]
|
5,473,993 | 1 | 5,478,744 | null | 2 | 12,584 | I have a problem with the primefaces dataTable component. I dont know why it does not short the data in the table when i click on it.
```
<p:dataTable var="garbage" value="#{resultsController.allGarbage}" dynamic="true" paginator="true" paginatorPosition="bottom" rows="10"
paginatorTemplate="{CurrentPageReport} {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"
rowsPerPageTemplate="5,10,15">
<p:column sortBy="#{garbage[0].filename}">
<f:facet name="header">
<h:outputText value="Filename" />
</f:facet>
<h:outputText value="#{garbage[0]}" />
</p:column>
<p:column>
<f:facet name="header">
<h:outputText value="Description" />
</f:facet>
<h:outputText value="#{garbage[1]}" />
</p:column>
<p:column sortBy="#{garbage[2].uploadDate}">
<f:facet name="header">
<h:outputText value="Upload date" />
</f:facet>
<h:outputText value="#{garbage[2]}" />
</p:column>
</p:dataTable>
```
This is the managed bean
```
@ManagedBean
@RequestScoped
public class ResultsController {
@EJB
private ISearchEJB searchEJB;
private Garbage[] garbage;
public List<Garbage[]> getAllGarbage() {
return searchEJB.findAllGarbage();
}
public Garbage[] getGarbage() {
System.out.println("VALUES!!!!!!!!" + garbage[0].getFilename());
return garbage;
}
public void setGarbage(Garbage[] garbage) {
this.garbage = garbage;
}
```
}
This is the EJB that allows data access
```
@Stateless(name = "ejbs/SearchEJB")
```
public class SearchEJB implements ISearchEJB {
```
@PersistenceContext
private EntityManager em;
public List<Garbage[]> findAllGarbage() {
Query query = em.createNamedQuery("findAllGarbage");
return query.getResultList();
}
```
}
And this is the entity(Data representation)
```
@NamedQuery(name = "findAllGarbage", query = "SELECT g.filename, g.description, g.uploadDate FROM Garbage g;")
@Entity
public class Garbage {
@Id
@GeneratedValue
@Column(nullable = false)
private Long id;
@Column(nullable = false)
private String filename;
@Column(nullable = false)
private String fileType;
@Column(nullable = false)
private String uploadDate;
@Column(nullable = false)
private String destroyDate;
@Lob
@Column(nullable = false)
private byte[] file;
@Column(nullable = false)
private String description;
...//Getters and Setters
```
As shown in the image there is no changes when the sort buttons are clicked:

This is what the console says:
> SEVERE: Error in sorting
```
public List<Garbage> findAllGarbage() {
Query query = em.createNamedQuery("findAllGarbage");
List<Garbage> gList = new ArrayList();
for (Object o: query.getResultList()) {
Garbage tmpG = new Garbage();
tmpG.setFilename(((Garbage) o).getFilename());
tmpG.setUploadDate(((Garbage) o).getUploadDate());
tmpG.setDescription(((Garbage) o).getDescription());
gList.add(tmpG);
}
return gList;
}
```
The modified managed bean
```
@ManagedBean
@RequestScoped
public class ResultsController {
@EJB
private ISearchEJB searchEJB;
private Garbage garbage;
public List<Garbage> getAllGarbage() {
return searchEJB.findAllGarbage();
}
public Garbage getGarbage() {
return garbage;
}
public void setGarbage(Garbage garbage) {
this.garbage = garbage;
}
```
}
The modified JSF
```
<p:dataTable var="garbage" value="#{resultsController.allGarbage}" dynamic="true" paginator="true" paginatorPosition="bottom" rows="10"
paginatorTemplate="{CurrentPageReport} {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"
rowsPerPageTemplate="5,10,15">
<p:column sortBy="#{garbage.filename}" parser="string">
<f:facet name="header">
<h:outputText value="Filename" />
</f:facet>
<h:outputText value="#{garbage.filename}" />
</p:column>
<p:column>
<f:facet name="header">
<h:outputText value="Description" />
</f:facet>
<h:outputText value="#{garbage.description}" />
</p:column>
<p:column sortBy="#{garbage.uploadDate}" parser="string">
<f:facet name="header">
<h:outputText value="Upload date" />
</f:facet>
<h:outputText value="#{garbage.uploadDate}" />
</p:column>
</p:dataTable>
```
| dataTable sortBy function does not work(primefaces) | CC BY-SA 2.5 | 0 | 2011-03-29T14:17:09.273 | 2014-06-03T17:48:19.560 | 2011-03-29T22:47:29.500 | 614,141 | 614,141 | [
"java",
"jsf",
"jakarta-ee",
"jsf-2",
"primefaces"
]
|
5,474,069 | 1 | 5,474,335 | null | 0 | 2,143 | I have a windows service which `OnStart` calls a Webservice and this webservice in turn updates the database.
I know that the webservice is works properly.
Problem is that windows service starts properly but after some time it shows errors as shown below:

and

What could be wrong?
Where exactly the problem could be?
| Windows Service: Error related to gusvc and gupdate | CC BY-SA 2.5 | null | 2011-03-29T14:23:41.623 | 2011-03-30T14:49:26.117 | 2011-03-30T14:49:26.117 | 463,857 | 463,857 | [
".net",
".net-3.5",
"windows-services",
"service"
]
|
5,474,147 | 1 | 5,474,428 | null | 2 | 1,704 | 
some thing like the above image.
I have a huge list of data being populated from the db in a list.
i have used index adapter to index the list through fastscroll, now i want to group them alphabetically
can any one give me any idea to do this..
i was looking all over the net but not able to find a good solution
```
ArrayList<String> list= new ArrayList<String>();
MyIndexerAdapter<String> adapter = new MyIndexerAdapter<String>(
getApplicationContext(), android.R.layout.simple_list_item_1,
list);
lv.setAdapter(adapter);
```
| dynamic header for list in android | CC BY-SA 2.5 | 0 | 2011-03-29T14:28:02.503 | 2011-03-29T18:16:36.763 | null | null | 573,700 | [
"android",
"header"
]
|
5,474,261 | 1 | 5,474,325 | null | 0 | 794 | I am trying to host a WCF service written in .NET 3.5 in IIS 7.5 on a Windows 7 64 bit machine, without much luck. I also have Sharepoint 2010 installed on the machine. Here is my setup:
The physical path of the folder with .svc file is:
C:\inetpub\wwwroot\SmartSolution\Services\Services\ContainerManagementService.svc
I have created a web application in IIS for both Services folders.
Here is the config file for the WCF service:
```
<service behaviorConfiguration="MyNamespace.ContainerManagementServiceBehavior"
name="MyNamespace.ContainerManagementService">
<endpoint address="" binding="basicHttpBinding"
name="ContainerManagementbasicHttpEndpoint" contract="MyNamespace.IContainer"/>
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
<host>
<baseAddresses>
<add baseAddress="http://localhost:8000/ContainerManagementService" />
</baseAddresses>
</host>
</service>
<behaviors>
<behavior name="MyNamespace.ContainerManagementServiceBehavior">
<serviceMetadata httpGetEnabled="true" />
<serviceDebug includeExceptionDetailInFaults="false" />
</behavior>
</behaviors>
```
When I try to browse to: [http://localhost/SmartSolution/Services/Services/ContainerManagementService.svc](http://localhost/SmartSolution/Services/Services/ContainerManagementService.svc) , I get the following error:

and if I click "Go back to site" I'm taken to my Sharepoint Central admin for some reason. How can I get the IIS service hosting working?
Thanks!
| Hosting WCFweb service in IIS 7.5 | CC BY-SA 2.5 | null | 2011-03-29T14:35:27.497 | 2011-03-29T14:48:56.227 | 2011-03-29T14:44:08.423 | 29,726 | 29,726 | [
"wcf",
"iis-7",
"iis-7.5"
]
|
5,474,564 | 1 | 5,474,609 | null | 2 | 54 | I've noticed that recently sites began to keep images in one big image.
For example google.com

We see a lot of little images on left side. But really is one image:

How these images are cut and shown? (firebug says that it's just element with width and height, but where X and Y position is pointed and how?)
Thanks for reply
| Why and how images are kept in one image? | CC BY-SA 2.5 | 0 | 2011-03-29T14:54:52.867 | 2011-03-29T15:00:02.467 | null | null | 547,242 | [
"html",
"image"
]
|
5,474,659 | 1 | 5,474,722 | null | 1 | 229 | A friend of mine has asked me a question which i do not know how.
The problem is he wants to use a result set of a query more than one time. Whenever he wants.
There is example tables and example output attached.
I will query two times only:
```
Select * from ornek1_ust
Select * from ornek1_alt
```
Is it possible to roam in a result set we already have with PHP to have some output like example output. I want to query database with full data for once. Then i want to use it wherever i want whenever i want.
Example Tables:


Example Output:

| How to roam in SQL query more than one time in PHP | CC BY-SA 2.5 | null | 2011-03-29T15:01:17.827 | 2011-03-29T15:05:51.990 | null | null | 569,063 | [
"php",
"mysql",
"sql"
]
|
5,474,717 | 1 | 5,474,857 | null | 4 | 6,717 | After fresh installation of Visual Studio 2010 Ultimate in lap, I am unable to find New/Open Website in my Start Page and File Menu. See the below image for details.

What should I do to get the New/Open Website back?
P.S: Although I am not sure, I attribute this to initial settings I choose on the first run of Visual Studio Ultimate. I have selected some thing like . Will changing to solve the problem? If so, how to change the settings?
| Open Website not found in Visual Studio Ultimate | CC BY-SA 2.5 | null | 2011-03-29T15:05:43.053 | 2011-03-29T15:18:10.750 | 2020-06-20T09:12:55.060 | -1 | 17,447 | [
"asp.net",
"visual-studio-2010",
"settings"
]
|
5,474,820 | 1 | 5,475,014 | null | 0 | 525 | I have a jQuery CSS float issue on the sidebar on the following page. The containing DIV does not expand when the content internal does. Thus we cannot determine the size of the DIV for use in another script.
On the following page, you will see a white line at the bottom of the sidebar. Click on option in the form in the centre and you will see the sidebar content expand. The whiteline however does not move.
[http://www.divethegap.com/update/configure/adventure-training?qualification=Beginner&level=1](http://www.divethegap.com/update/configure/adventure-training?qualification=Beginner&level=1)
I've tried all combinations of `display:block`, `overflow:visible` and `clear:both` that I can think of and cannot get it working.
Any ideas?
Marvellous

| jQuery and CSS float issues with Demo | CC BY-SA 2.5 | null | 2011-03-29T15:15:02.610 | 2012-06-15T19:08:39.640 | 2012-06-15T19:08:39.640 | 44,390 | 478,520 | [
"jquery",
"css",
"css-float"
]
|
5,475,271 | 1 | 6,577,923 | null | -2 | 2,395 | My working company has 50+ clinics, today my boss ask about the message board (Not forum like PHPBB)
like this :

It display a video, some slide message, or some image, some text in different section.
It will display on a large LCD monitor or TV.
Is it any open source solution???
| Open Source solution for message board on Monitor or TV? | CC BY-SA 2.5 | 0 | 2011-03-29T15:46:16.323 | 2012-03-31T16:54:52.253 | 2012-03-31T16:54:52.253 | 707,111 | 83,952 | [
"open-source"
]
|
5,475,389 | 1 | 5,475,927 | null | 1 | 549 | I have a code made by Fedor, it can be found "[here](https://stackoverflow.com/questions/541966/android-how-do-i-do-a-lazy-load-of-images-in-ListView)".
The first image is what I have now,
and the second image is what I want to accomplish.
Can someone guide me with this. I have been struggling for days trying to solve this problem.
Please help me, Thanks in advance!


| Custom ListView? | CC BY-SA 2.5 | null | 2011-03-29T15:57:04.430 | 2012-07-16T19:15:58.427 | 2017-05-23T12:24:45.863 | -1 | 1,594,493 | [
"android",
"listview",
"load",
"lazy-evaluation"
]
|
5,475,755 | 1 | 5,476,576 | null | 35 | 27,949 | I'm able to draw a simple circle on HTML5 canvas, but I'd like to add some blur around it.
What I found was [this website](http://flashcanvas.net/examples/uupaa-js-spinoff.googlecode.com/svn/trunk/uuCanvas.js/demo/9_1_canvas_text_shadow_direction.html) which explains the `shadowBlur` property which can come in handy here.
However, I cannot manage to make the circle itself blurry. What the `shadowBlur` property basically does is painting some blur effect after the regular circle has been drawn. What I've tried so far I've put [on jsFiddle](http://jsfiddle.net/r8Kqy/1/).
As can be seen, it's a solid filled circle with some blur effect around it - the two parts do not blend into each other at all. What I actually would like to achieve is that the circle itself is fully blurred like this:

Is there any way to draw a blurred circle like this, i.e. that the circle itself also has a blur effect?
| How to draw a blurry circle on HTML5 canvas? | CC BY-SA 3.0 | 0 | 2011-03-29T16:24:18.673 | 2017-04-27T01:25:07.063 | 2012-07-04T16:38:54.273 | 154,112 | 514,749 | [
"javascript",
"html",
"canvas",
"geometry",
"blur"
]
|
5,476,499 | 1 | null | null | 3 | 1,324 | I've got a recursive function (on tree) and I need to make it work without recursion and representing the tree as an implicit data structure (array).
Here is the function:
```
kdnode* kdSearchNN(kdnode* here, punto point, kdnode* best=NULL, int depth=0)
{
if(here == NULL)
return best;
if(best == NULL)
best = here;
if(distance(here, point) < distance(best, point))
best = here;
int axis = depth % 3;
kdnode* near_child = here->left;
kdnode* away_child = here->right;
if(point.xyz[axis] > here->xyz[axis])
{
near_child = here->right;
away_child = here->left;
}
best = kdSearchNN(near_child, point, best, depth + 1);
if(distance(here, point) < distance(best, point))
{
best = kdSearchNN(away_child, point, best, depth + 1);
}
return best;
}
```
I'm using this properties to represent the tree as an array:
```
root: 0
left: index*2+1
right: index*2+2
```

This is what I've done:
```
punto* kdSearchNN_array(punto *tree_array, int here, punto point, punto* best=NULL, int depth=0, float dim=0)
{
if (here > dim) {
return best;
}
if(best == NULL)
best = &tree_array[here];
if(distance(&tree_array[here], point) < distance(best, point))
best = &tree_array[here];
int axis = depth % 3;
int near_child = (here*2)+1;
int away_child = (here*2)+2;
if(point.xyz[axis] > tree_array[here].xyz[axis])
{
near_child = (here*2)+2;
away_child = (here*2)+1;
}
best = kdSearchNN_array(tree_array, near_child, point, best, depth + 1, dim);
if(distance(&tree_array[here], point) < distance(best, point))
{
best = kdSearchNN_array(tree_array, away_child, point, best, depth + 1, dim);
}
return best;
}
```
Now the last step is to get rid of recursion, but I can't find a way, any hint?
Thanks
| from recursion on tree to iterative on array (kd-tree Nearest Neighbor) | CC BY-SA 2.5 | null | 2011-03-29T17:28:48.947 | 2011-03-30T07:27:35.327 | null | null | 669,869 | [
"recursion",
"nearest-neighbor",
"kdtree"
]
|
5,476,577 | 1 | 5,477,188 | null | 2 | 655 | I'm extremely new to objective-c and iOS development and was just looking for advice at how best to tackle this type of styling. Basically these types of field sets (see screenshot) appear everywhere with rounded edges and borders between rows.
Is there some type of functionality in interface builder to handle this already or would I be looking at using background image(s) and then adding the form parts above that?

iOS objective-c iphone fieldset styling rounded edges rows
| Styling 'fieldset' with rounded borders on iphone interface builder | CC BY-SA 2.5 | 0 | 2011-03-29T17:36:46.410 | 2011-03-29T18:30:03.953 | null | null | 331,844 | [
"iphone",
"cocoa",
"coding-style"
]
|
5,476,803 | 1 | 5,476,836 | null | 0 | 1,918 | Please see the attached image:

1) I downloaded a new library here: ([http://www.java2s.com/Code/Jar/ABC/Downloadcommonslang24jar.htm](http://www.java2s.com/Code/Jar/ABC/Downloadcommonslang24jar.htm))
2) In Eclipse, I right-clicked on 'Referenced Libraries' > Build Path > Configure Build Path > Add External JARs and added 'commons-lang-2.4.jar'
3) I've added `import org.apache.commons.lang.*` at the top of my class.
4) I entered a method from that class `indexOfAny()` and get the following error: `'The method indexOfAny() is undefined for the type String.'`
What step(s) am I missing? Which steps that I've taken are unnecessary? I need to be able to use this method.
P.S. Pls ignore the rest of the code.
| Referencing a new library in Eclipse | CC BY-SA 2.5 | null | 2011-03-29T17:55:35.293 | 2011-03-29T18:20:08.713 | 2011-03-29T18:20:08.713 | 114,664 | 673,993 | [
"java",
"eclipse"
]
|
5,477,137 | 1 | 5,502,101 | null | 7 | 3,002 | Resharper's code formatting is generally fine, but it seems completely broken when dealing with very long lines. For example look at this piece of code:

I do want some kind of line wrapping, but it should look ahead and indent less if necessary to avoid ridiculous amounts of line breaks. Something like this would be great:

Is there any way to make Resharper do this?
| How can I make Resharper wrap very long lines properly? | CC BY-SA 2.5 | 0 | 2011-03-29T18:26:07.250 | 2011-03-31T15:11:05.660 | null | null | 59,301 | [
"visual-studio",
"resharper",
"code-formatting"
]
|
5,477,261 | 1 | 5,477,360 | null | 0 | 154 | quick question, I'm currently trying to style a font to resemble the letters pictured below. Before I proceed any further I just wanted to be sure there wasn't already a standard, web-safe, font that resembles these letters. I'm not familiar with font design terminology, so I'm not sure what the technical description of the letters below would be. Thanks much.

| Specific CSS Font Style | CC BY-SA 2.5 | null | 2011-03-29T18:36:00.053 | 2011-03-29T20:07:46.980 | 2011-03-29T18:41:51.737 | 94,541 | 94,541 | [
"html",
"css",
"fonts"
]
|
5,477,775 | 1 | null | null | 0 | 423 | I am deploying C# windows application with an sql server database
This is the error I get when I deploy:

| error deploying C# project with sql database : unable to open physical file | CC BY-SA 2.5 | null | 2011-03-29T19:22:30.960 | 2011-03-29T19:36:21.297 | 2011-03-29T19:26:46.370 | 368,070 | 439,011 | [
"c#",
"sql-server",
"setup-deployment"
]
|
5,478,054 | 1 | null | null | 3 | 3,316 | I am using a 32bit WinXP with no upgrade in sight, is there a way to limit how much memory Eclipse allocates throughout the day? I am also running Weblogic 10 server in debug mode inside eclipse. After a few hours I have an 700mb STS.exe (eclipse) and 400mb java.exe (server). Is there at least a way to force a GC on eclipse?
Here are the settings i surrently use, which seem to me are not being observed.
```
-vm
C:\bea\jdk160_05\bin\javaw.exe
-showsplash
--launcher.XXMaxPermSize
128M
-vmargs
-Dosgi.requiredJavaVersion=1.5
-Xms40m -Xmx512m
-Dsun.lang.ClassLoader.allowArraySyntax=true
```
EDIT: here's the monster of a project: Eclipse and Firefox 4.

| Eclipse memory restricting | CC BY-SA 2.5 | null | 2011-03-29T19:47:29.233 | 2012-05-30T10:53:27.290 | 2011-03-31T13:41:23.327 | 374,512 | 374,512 | [
"eclipse"
]
|
5,478,120 | 1 | 5,523,930 | null | 0 | 382 | I use the [TTMessageController](http://api.three20.info/interface_t_t_message_controller.php) from [Three20](http://www.viz.co.kr/320api/_message_test_controller_8m_source.html) to display a view that is similar to the iPhone SMS application containing a recipient picker.
Currently I am able to autosearch contacts and to browse them by clicking on the button:

However I have a problem to apply the selected contact to the recipient field. [TTMessageController](http://api.three20.info/interface_t_t_message_controller.php) implements the [addRecipient](http://api.three20.info/interface_t_t_message_controller.php#af1a2fb598f715126dae56b41d57cdd4a) method but I am not sure how to use it.
In my controller class that extends TTMessageController I have following method which is triggered when a contact is selected, so addRecipient has to go here somewhere:
```
- (BOOL)peoplePickerNavigationController:
(ABPeoplePickerNavigationController *)peoplePicker
shouldContinueAfterSelectingPerson:(ABRecordRef)person{
//dismiss the contact selector
[self dismissModalViewControllerAnimated:NO];
return NO;
}
```
Any idea how to add the recipient in that method?
| How to use addRecipient method from Three20? | CC BY-SA 2.5 | 0 | 2011-03-29T19:52:29.967 | 2011-04-02T15:05:43.950 | 2011-03-31T13:14:54.813 | 401,025 | 401,025 | [
"objective-c",
"xcode",
"three20"
]
|
5,478,176 | 1 | null | null | 1 | 1,492 | I don't know very much of WCF...
I want to do a clean job to serve entities on client side using DataContracts. Imagine two DataContracts "System" and "Building": "System" may have many "Buildings" and "Building" may have many "Systems". So, we have a many-to-many relationship between them.
In service contract model, "System" have a "Buildings" property that is a collection. "Building" also have a collection of "Systems".

The WCF uses DataSets for the underlying data access (with stored procedures for CRUD) and I have a table between SYSTEM and BUILDING representing the relationship.

So, how can I implement this scenario cleanly? I want the clients to be able to get a simple representation of "Buildings" in "System", for example, I could use:
```
system = GetSystem(id);
foreach (Building building in system.Buildings) {
// do whatever with each buildings...
}
```
Thank you!
| Using collections/lists within WCF DataContracts | CC BY-SA 2.5 | null | 2011-03-29T19:58:12.793 | 2011-03-30T06:29:48.327 | null | null | 45,001 | [
"c#",
"wcf",
"collections",
"datacontract"
]
|
5,478,234 | 1 | 5,478,313 | null | 0 | 1,685 | 
Hi
I want to display the data in the format that is represented in the screenshot. All the data that is shown is retrieved from Sql Server-2005 Database. Which is the best option for such kind of data representation? I have read in the forums, from them I could not get a clear perspective. Some were suggesting listview others nested datagrid, some repeater control. Can you please suggest me which one would be a proper and accurate way to go forward ?? Along with some reasons (if possible !!). And I'm using visual studio 2008, .net Framework 3.5, asp.net with c# and I'm NOT using LINQ in my project and it is a web application. The same picture can also be found at [http://postimage.org/image/2xj9bdles/](http://postimage.org/image/2xj9bdles/)
Thanks in anticipation
| Options for Displaying Data in table format | CC BY-SA 2.5 | 0 | 2011-03-29T20:02:24.833 | 2011-03-29T22:27:38.660 | 2011-03-29T22:27:38.660 | 653,622 | 653,622 | [
"asp.net",
"data-binding"
]
|
5,478,547 | 1 | 5,478,610 | null | 0 | 373 | ```
function estoque($data, $dias) {
$inicio = strtotime($data);
$edia = date('d', $inicio);
$emes = date('m', $inicio);
$eano = date('Y', $inicio);
$db = new DBConfig();
$db->config();
$db->conn();
$data = array();
while($i <= $dias) {
$today = strtotime(date('Y-m-d',mktime(0,0,0,date($emes),date($edia)+$i,date($eano))));
//echo "<br/>".date("d-m-Y", $today)."<br/>";
$query = mysql_query("SELECT * FROM quartos AS quartos
INNER JOIN tipos AS tipos
LEFT JOIN reservas AS reservas
ON quartos.quarto_tipo = tipos.tipo_id
AND quartos.quarto_numero = reservas.reserva_quarto_id
AND ".$today." BETWEEN reservas.reserva_checkin AND reservas.reserva_checkout
GROUP BY quartos.quarto_id HAVING Count(*) >= 1") or die(mysql_error());
while($row = mysql_fetch_array($query)){
if (empty($row["reserva_status"])) {
$row["reserva_status"] = "0";
}
//echo $row["reserva_status"]."<br/>";
$tmp = $i++;
$data[$tmp] = $row;
}
$i++;
}
$db->close();
return $data;
}
```
How to do for return an array to parse to smarty template?
My output template...

What i want...

Almost there...
My template code is:
```
<table class="table-filtro">
<thead>
<tr>
<th class="nome-quarto">Tipo</th>
<th>Nº Quarto</th>
<th>Label</th>
<th class="th-periodo">9</th>
</tr>
</thead>
<tbody>
{foreach from=$listar item="estoque"}
<tr>
<td class="nome-quarto">{$estoque.tipo_nome}</td>
<td>{if $estoque.quarto_numero|count_characters eq '1'}0{$estoque.quarto_numero}{else}{$estoque.quarto_numero}{/if}</td>
<td>{$estoque.quarto_descricao}</td>
<td><img src="http://{$smarty.server.SERVER_NAME}/reservas/images/cubos/{if $estoque.reserva_status eq '3'}vermelho{elseif $estoque.reserva_status eq '2'}amarelo{else}verde{/if}.jpg" /></td>
</tr>
{/foreach}
</tbody>
</table>
```
output ss

| How to generate an array for smarty from a function? | CC BY-SA 2.5 | null | 2011-03-29T20:30:14.893 | 2011-03-29T20:48:12.007 | 2011-03-29T20:48:12.007 | 526,573 | 526,573 | [
"php",
"html",
"smarty"
]
|
5,478,578 | 1 | 5,491,871 | null | 0 | 3,938 | Did something change with Facebook recently? I can't seem to debug an app locally with an app setup as localhost. Here is what I did:
1. Setup a brand new application called "My test web application" and checked the box for "Terms and Conditions"
2. Choose "Edit Settings" -> "Web Site" and changed the Site URL to "http://localhost:{my port}/"
This doesn't seem to be working. I get the following before login:

Followed by the following after login:

Any ideas? Thanks in advance.
So, based on a comment below, I've removed the port number from my URL. Now when I try to login, I get a bunch of JavaScript errors on the Facebook Login page that look like the following:

| Cannot Create Facebook App using Localhost | CC BY-SA 2.5 | null | 2011-03-29T20:34:00.430 | 2011-03-30T20:21:42.163 | 2011-03-30T19:29:28.810 | 21,318 | 21,318 | [
"facebook",
"facebook-c#-sdk"
]
|
5,478,609 | 1 | 5,479,588 | null | 0 | 3,672 | I'm working on a ASP.Net web page with two tables positioned in the center of the page with one on top of the other. The table on top contains input fields that are dynamically generated by the code-behind, so the number of input fields varies. The table on the bottom contains content that is constant and doesn't change. The layout of the page is fixed and must remain so. My question is, how do I make the bottom table dynamically adjust vertically so that it doesn't overlap with the fields from the top table. The general HTML layout of the page is something like the following:
```
<body style="vertical-align: middle; text-align: center;">
<div id="container" style="position: relative; width: 910px; margin: 0px auto;">
<form>
<div style="width: 908px; text-align: center; margin: 75px auto; position: absolute; top: 0px; visibility: visible;">
<table id="topTable"></table>
</div>
<table id="bottomTable" style="width: 908px; margin: 0px auto; position: absolute; top: 400px;"></table>
</form>
</div>
</body>
```
The effect I'm trying to achieve is the following:
> ...etc.
I'm thinking I could wrap the bottom table in a div, but I'm not sure what specific styling will achieve the desired effect. I basically want to maintain the fixed positioning horizontally, but have the vertical alignment adjust to prevent overlap with the top.
UPDATE:
Here is a screen cap that shows the two tables overlapping. The buttons you see are in the bottom table, the fields are supposed to be on the top, all elements are positioned absolutely in the center of the browser screen.

UPDATE 2:
I updated the HTML sample above with the styles that are currently in use.
| HTML element overlap | CC BY-SA 2.5 | null | 2011-03-29T20:36:37.513 | 2015-09-14T20:24:31.100 | 2020-06-20T09:12:55.060 | -1 | 94,541 | [
"asp.net",
"html",
"css",
"xhtml"
]
|
5,478,604 | 1 | 5,480,398 | null | 0 | 320 | I want to implement this algorithm in Perl.
Let's accept that:
- -

First element of DNA1 is G, we will find if there is G at DNA2 and point it with a dot. We continue it till the end so the image shows evey same element intersections as a dot.
The next step is that: connecting points. To point to dots first one should be at left top corner of a small square and the other one at right bottom(I mean lines should have a 135 degree) If stringency is 2, it means that reject the lines which has occured from 2 and less then 2 dots(It means that if stringency was 3, there would be just one line at image).
Last step is that: wordcount. If wordcount is 1(it is one at image) it means that compare elements one by one. If it was 3 it means that compare 3 of them together. You can write a program that wordcount is 1 because it is always 1.
I searched about it and this is what I have:
```
$infile1 = "DNA1.txt";
$infile2 = "DNA2.txt";
$outfile = "plot.txt";
$wordsize=0;
$stringency=0;
open inf, $infile1 or die "STOP! File $infile1 not found.\n";
$sequence1=<inf>;
chomp $sequence1;
@seq1=split //,$sequence1;
close inf;
open inf, $infile2 or die "STOP! File $infile2 not found.\n";
$sequence2=<inf>;
chomp $sequence2;
@seq2=split //,$sequence2;
close inf;
$Lseq1=$#seq1+1;
$Lseq2=$#seq2+1;
open ouf, ">$outfile";
for ($i=0;$i<$Lseq1;$i++){
print ouf "\n";
for ($j=0;$j<$Lseq2;$j++){
$match=0;
for ($w=0;$w<=$wordsize;$w++){
if($seq1[$i+$w] eq $seq2[$j+$w]){
$match++;
}
}
if($match > $stringency){
print ouf "1";
}
else{
print ouf "0";
}
}
}
```
Can you check it about errors and how can I optimize my code with more less code at Perl?
I think it is OK to accept $wordsize equals to $stringency every time.
I have edited my code and it works for just puting dot.
Algorithm is like that:
```
qseq, sseq = sequences
win = number of elements to compare for each point
Strig = number of matches required for a point
for each q in qseq:
for each s in sseq:
if CompareWindow(qseq[q:q+win], s[s:s+win], strig):
AddDot(q, s)
```
Here is a better algorithm suggestion:
[osl.iu.edu/~chemuell/projects/bioinf/dotplot.ppt](http://osl.iu.edu/~chemuell/projects/bioinf/dotplot.ppt)
Any idea to improve code according to that better algorithm is welcome.
| Implementing This Algorithm with Less line of Code at Perl | CC BY-SA 2.5 | 0 | 2011-03-29T20:36:13.427 | 2011-03-30T18:50:49.987 | 2011-03-30T08:46:31.190 | 453,596 | 453,596 | [
"perl"
]
|
5,478,972 | 1 | 5,479,021 | null | 4 | 2,486 | I'm using Delphi 2010, and I am trying to allow the user to select between 2 options per row in a TListView. With TListView, I can set the style to vsReport and enable Checkboxes, but that only gets me 1 checkbox per row. What I need is 2 checkboxes per row...specifically 1 for the 1st column and 1 for the 2nd column.
What I am trying to accomplish is very similar to the standard Windows file security dialog:

Does anyone have any suggestions for implementing something like this using TListView or even MustangPeak's [TEasyListView](http://www.mustangpeak.net/easylistview.htm)?
| How can I setup TListView with CheckBoxes in only certain columns? | CC BY-SA 2.5 | 0 | 2011-03-29T21:10:31.377 | 2011-03-30T00:30:09.873 | 2011-03-29T22:11:32.280 | 5,891 | 12,458 | [
"delphi",
"listview"
]
|
5,479,272 | 1 | 5,479,592 | null | 0 | 467 | i have a problem in chrome in this website [http://emprego.herobo.com/site/login/emprego.php](http://emprego.herobo.com/site/login/emprego.php)
if you open it in firefox, all works well and the position of the overlay div in the images is perfect, but in chrome and IE the result is different.
Part of the div that must be hidden, is showed (where have the name Luciana Valença).
what is the possible reason?

thanks
example in FF4
| problem in overlay div- chrome/IE | CC BY-SA 2.5 | null | 2011-03-29T21:39:50.097 | 2011-03-29T22:37:26.647 | 2011-03-29T21:49:12.360 | 564,979 | 564,979 | [
"javascript",
"jquery",
"html",
"css",
"position"
]
|
5,479,444 | 1 | null | null | 1 | 934 | I'm working on a domino game and it's going pretty well, now I want to drag a domino tile from one JPanel to another, my dragging implementation works, it's just that I can't find how to drag shapes between two jpanels.
Here's how it looks:

| Dragging shapes between JPanels | CC BY-SA 2.5 | null | 2011-03-29T21:59:23.977 | 2011-03-29T22:26:45.993 | 2011-03-29T22:17:45.327 | 21,234 | 682,937 | [
"java",
"swing",
"jpanel",
"drag",
"shapes"
]
|
5,479,864 | 1 | 5,746,460 | null | 1 | 1,220 | I have a problem and I'm pulling my hair out over it.
I have a vertical nav menu which lists a taxonomy's terms and child terms.
The child terms all own a set of posts.
Upon visiting a single-post page, the menu defaults to top level and doesn't recognize that the single post is a child of any menu item. (i.e. belongs to a tax term in the menu)
Does anyone know how to have a wordpress nav menu recognize when the single post currently being displayed is a child of a term in the menu?
These pics should clarify:
Here I'm viewing gallery of items for term "filigree" child-term "rings"

After Clicking on a single ring, the menu retracts to default and no highlight to show current state

Note that "our products" is always bold and not part of the menu. (don't get me started on that)
| wordpress nav menu does not recognize single-post as child of a term | CC BY-SA 2.5 | null | 2011-03-29T22:51:56.490 | 2022-04-08T18:30:42.847 | 2022-04-08T18:30:42.847 | 584,676 | 323,379 | [
"wordpress",
"menu",
"highlight",
"taxonomy",
"taxonomy-terms"
]
|
5,479,972 | 1 | 5,480,072 | null | 1 | 1,336 | Is there a way in mathematica to have variable coefficients for NDSolve? I need to vary the coefficient values and create multiple graphs, but I cannot figure out a way to do it short of reentering the entire expression for every graph. Here is an example (non-functional) of what I would like to do; hopefully it is close to working:
```
X[\[CapitalDelta]_, \[CapitalOmega]_, \[CapitalGamma]_] =
NDSolve[{\[Rho]eg'[t] ==
(I*\[CapitalDelta] - .5*\[CapitalGamma])*\[Rho]eg[t] -
I*.5*\[CapitalOmega]*\[Rho]ee[t] +
I*.5*\[CapitalOmega]*\[Rho]gg[t],
\[Rho]ge'[t] == (-I*\[CapitalDelta] - .5*\[CapitalGamma])*\[Rho]ge[t] +
I*.5*\[CapitalOmega]\[Conjugate]*\[Rho]ee[t] -
I*.5*\[CapitalOmega]\[Conjugate]*\[Rho]gg[t],
\[Rho]ee'[t] == -I*.5*\[CapitalOmega]\[Conjugate]*\[Rho]eg[t] +
I*.5*\[CapitalOmega]*\[Rho]ge[t] - \[CapitalGamma]*\[Rho]ee[t],
\[Rho]gg'[t] == I*.5*\[CapitalOmega]\[Conjugate]*\[Rho]eg[t] -
I*.5*\[CapitalOmega]*\[Rho]ge[t] + \[CapitalGamma]*\[Rho]ee[t],
\[Rho]ee[0] == 0, \[Rho]gg[0] == 1, \[Rho]ge[0] == 0, \[Rho]eg[0] == 0},
{\[Rho]ee, \[Rho]eg, \[Rho]ge, \[Rho]gg}, {t, 0, 12}];
Plot[Evaluate[\[Rho]ee[t] /. X[5, 2, 6]], {t, 0, 10},PlotRange -> {0, 1}]
```
In this way I would only have to re-call the plot command with inputs for the coefficients, rather than re-enter the entire sequence over and over. That would make things much cleaner.
PS: Apologies for the awful looking code. I never realized until now that mathematica didn't keep the character conversions.
a nicer formatted version:

| Mathematica NDSolve: Is there a way to have variable coefficients? | CC BY-SA 2.5 | 0 | 2011-03-29T23:05:43.337 | 2011-03-29T23:57:49.567 | 2011-03-29T23:57:49.567 | 615,464 | 203,146 | [
"function",
"variables",
"wolfram-mathematica",
"plot"
]
|
5,480,021 | 1 | 5,493,644 | null | 0 | 56 | Does anyone know what component this is? (The expanded option toolbox, where I can click on it and it opens a lot of options, I can put in the left side of the form or the right.)
I don't think it's a treeview (or is it a customized treeview?).
If there isn't such component, how can I implement it?

| What component is this that Visual Studio uses? | CC BY-SA 2.5 | null | 2011-03-29T23:11:15.227 | 2011-03-30T23:22:31.523 | 2011-03-30T00:56:03.140 | 87,234 | 399,459 | [
"visual-studio",
"uicomponents"
]
|
5,480,131 | 1 | 5,498,100 | null | 23 | 7,462 | I have a password generator:
```
import random, string
def gen_pass():
foo = random.SystemRandom()
length = 64
chars = string.letters + string.digits
return ''.join(foo.choice(chars) for _ in xrange(length))
```
According to the docs, `SystemRandom` uses `os.urandom` which uses `/dev/urandom` to throw out random crypto bits. In Linux you can get random bits from `/dev/urandom` or `/dev/random`, they both use whatever entropy the kernel can get its hands on. The amount of entropy available can be checked with `tail /proc/sys/kernel/random/entropy_avail`, this will return a number like: 129. The higher the number, the more entropy is available. The difference between `/dev/urandom` and `/dev/random` is that `/dev/random` will only spit out bits if `entropy_avail` is high enough (like at least 60) and `/dev/urandom` will always spit out bits. The docs say that `/dev/urandom` is good for crypto and you only have to use `/dev/random` for ssl certs and the like.
My question is will `gen_pass` be good for making strong crypto grade passwords always? If I call this function as quickly as possible will I stop getting strong crypto bits at some point because the entropy pool is depleted?
The question could also be why does `/dev/urandom` produce strong crypto bits not care about the `entropy_avail`?
It is possible that `/dev/urandom` is designed so that its bandwidth is capped by the number of cycles you can guess will be correlated with an amount of entropy, but this is speculation and I can't find an answer.
Also this is my first stackoverflow question so please critique me. I am concerned that I gave to much background when someone who knows the answer probably knows the background.
Thanks
I wrote some code to look at the entropy pool while the `/dev/urandom` was being read from:
```
import subprocess
import time
from pygooglechart import Chart
from pygooglechart import SimpleLineChart
from pygooglechart import Axis
def check_entropy():
arg = ['cat', '/proc/sys/kernel/random/entropy_avail']
ps = subprocess.Popen(arg,stdout=subprocess.PIPE)
return int(ps.communicate()[0])
def run(number_of_tests,resolution,entropy = []):
i = 0
while i < number_of_tests:
time.sleep(resolution)
entropy += [check_entropy()]
i += 1
graph(entropy,int(number_of_tests*resolution))
def graph(entropy,rng):
max_y = 200
chart = SimpleLineChart(600, 375, y_range=[0, max_y])
chart.add_data(entropy)
chart.set_colours(['0000FF'])
left_axis = range(0, max_y + 1, 32)
left_axis[0] = 'entropy'
chart.set_axis_labels(Axis.LEFT, left_axis)
chart.set_axis_labels(Axis.BOTTOM,['time in second']+get_x_axis(rng))
chart.download('line-stripes.png')
def get_x_axis(rng):
global modnum
if len(filter(lambda x:x%modnum == 0,range(rng + 1)[1:])) > 10:
modnum += 1
return get_x_axis(rng)
return filter(lambda x:x%modnum == 0,range(rng + 1)[1:])
modnum = 1
run(500,.1)
```
If run this and also run:
```
while 1 > 0:
gen_pass()
```
Then I pretty reliablly get a graph that looks like this:

Making the graph while running `cat /dev/urandom` looks smiler and `cat /dev/random` drops off to nothing and stays low very quickly (this also only reads out like a byte every 3 seconds or so)
If I run the same test but with six instances of gen_pass(), I get this:

So it looks like something is making it be the case that I have enough entropy. I should measure the password generation rate and make sure that it is actually being capped, because if it is not then something fishy may be going on.
I found this [email chain](https://lists.openwall.net/linux-kernel/2007/12/04/257)
This says that `urandom` will stop pulling entropy once the pool only has 128 bits in it. This is very consistent with the above results and means that in those tests I am producing junk passwords often.
My assumption before was that if the `entropy_avail` was high enough (say above 64 bits) then `/dev/urandom` output was good. This is not the case it seems that `/dev/urandom` was designed to leave extra entropy for `/dev/random` in case it needs it.
Now I need to find out how many true random bits a `SystemRandom` call needs.
| Will python SystemRandom / os.urandom always have enough entropy for good crypto | CC BY-SA 4.0 | 0 | 2011-03-29T23:25:32.343 | 2022-08-06T05:52:26.693 | 2022-08-05T15:34:34.773 | 9,223,868 | 679,491 | [
"python",
"linux",
"random",
"cryptography",
"generator"
]
|
5,480,716 | 1 | 5,483,611 | null | 6 | 1,043 | First a little background ... I was going over the Django source code for forms to understand the implementation of forms in Django (and to learn some Python along the way). Django implements forms using a DeclaredMetaFields .
Here is a very crude class diagram of a Django-like form implementation ([link](https://gist.github.com/893653) to sample code in gist).

And here is an instance diagram.

Here is a implementation the same class without resorting to meta-classes ([link](https://gist.github.com/893658) to sample code in gist).

I understand the metaclass concepts etc. and understand how the Django code works. Now for the questions.
1. Other than the obvious benefits such as syntactical elegance etc. are there any other benefits for the meta-class implementation?
2. Is the meta-class like implementation possible without resorting to an intermediate object like BoundField?
| What are the advantages of using metaclasses in django-like form implementations? | CC BY-SA 2.5 | 0 | 2011-03-30T00:54:57.913 | 2014-02-03T09:45:16.843 | null | null | 553,995 | [
"python",
"django",
"oop",
"class",
"metaclass"
]
|
5,480,773 | 1 | 5,480,817 | null | 1 | 1,972 | Despite various measure ments to setup correct caching code in htaccess file, I still get this error:
> :
All static resources should have either a Last-Modified or ETag header. This will allow browsers to take advantage of the full benefits of caching.

Is there anything wrong with my htaccess caching settings? If you have improvements for these settings i will be very happy to hear. Thank you very much for your suggestions.
```
<IfModule mod_headers.c>
Header unset Pragma
FileETag None
Header unset ETag
ExpiresActive On
##### DYNAMIC PAGES
<FilesMatch "\\.(ast|php|css)$">
Header set Cache-Control "public, max-age=3600, must-revalidate"
</FilesMatch>
##### STATIC FILES
<FilesMatch "\\.(png|svg|swf|js|xml)$">
Header set Cache-Control "public, max-age=604800, must-revalidate"
Header unset Last-Modified
</FilesMatch>
##### ETERNAL FILES
<FilesMatch "\\.(ico|jpg|gif|ttf|eot|pdf|flv)$">
Header set Cache-Control "public, max-age=7257600, must-revalidate"
Header unset Last-Modified
</FilesMatch>
</IfModule>
```
| How to speed up web development with correct Apache caching headers setup? | CC BY-SA 2.5 | 0 | 2011-03-30T01:03:35.580 | 2019-05-03T10:22:48.127 | null | null | 509,670 | [
"apache",
"caching",
"header",
"apache2"
]
|
5,480,940 | 1 | 5,481,027 | null | 1 | 171 | Monotouch 3.99.13
When I edit a XIB in Interface Builder, Monotouch fails to add all the Usings to the designer.cs files it generates. There are no partial clsses made.

Here's a code snip (notice no usings):
```
// ------------------------------------------------------------------------------
// <autogenerated>
// This code was generated by a tool.
// Mono Runtime Version: 2.0.50727.1433
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </autogenerated>
// ------------------------------------------------------------------------------
namespace General {
// Base type probably should be MonoTouch.Foundation.NSObject or subclass
[MonoTouch.Foundation.Register("AppDelegateIPad")]
public partial class AppDelegateIPad {
private UIWindow __mt_window;
#pragma warning disable 0169
[MonoTouch.Foundation.Connect("window")]
private UIWindow window {
get {
this.__mt_window = ((UIWindow)(this.GetNativeField("window")));
return this.__mt_window;
}
set {
this.__mt_window = value;
this.SetNativeField("window", value);
}
}
}
}
```
| Monotouch 3.99: Missing Usings in designer files? | CC BY-SA 2.5 | 0 | 2011-03-30T01:32:20.027 | 2011-03-30T14:27:47.970 | 2011-03-30T02:06:11.073 | 172,861 | 172,861 | [
"iphone",
"xamarin.ios",
"monodevelop"
]
|
5,481,338 | 1 | 5,481,618 | null | 0 | 1,371 | I have previously asked two questions [Question 1](https://stackoverflow.com/questions/5467193/why-isnt-core-data-fetching-my-data/5467295#5467295) and [Question 2](https://stackoverflow.com/questions/5454354/tableview-crashing-freezing-because-of-core-data-error) but there is still some problem lingering and those who helped with those questions believe there may be a problem unrelated.
When I click the tab bar item for my routineTableViewController, the app freezes up.
I am posting my data model, appDelegate, and routineViewController so I can try to get this solved once and for all. Please let me know if there is any other information that would be beneficial.
When I click the routineViewController's tab icon, I get the SIGABRT error the in the console it shows the following:
```
2011-03-29 23:34:25.334 Curl[5817:207] Unresolved error Error Domain=NSCocoaErrorDomain Code=134100 "The operation couldn’t be completed. (Cocoa error 134100.)" UserInfo=0x59199e0 {metadata=<CFBasicHash 0x5918b60 [0x1013400]>{type = immutable dict, count = 6,
entries =>
0 : <CFString 0x5919320 [0x1013400]>{contents = "NSStoreModelVersionIdentifiers"} = <CFArray 0x5919400 [0x1013400]>{type = immutable, count = 0, values = ()}
2 : <CFString 0x5919370 [0x1013400]>{contents = "NSStoreModelVersionHashesVersion"} = <CFNumber 0x5b08250 [0x1013400]>{value = +3, type = kCFNumberSInt32Type}
3 : <CFString 0x18d720 [0x1013400]>{contents = "NSStoreType"} = <CFString 0x18d8f0 [0x1013400]>{contents = "SQLite"}
4 : <CFString 0x59193a0 [0x1013400]>{contents = "NSPersistenceFrameworkVersion"} = <CFNumber 0x5918e10 [0x1013400]>{value = +320, type = kCFNumberSInt64Type}
5 : <CFString 0x59193d0 [0x1013400]>{contents = "NSStoreModelVersionHashes"} = <CFBasicHash 0x5919490 [0x1013400]>{type = immutable dict, count = 1,
entries =>
2 : <CFString 0x5919420 [0x1013400]>{contents = "Routine"} = <CFData 0x5919440 [0x1013400]>{length = 32, capacity = 32, bytes = 0xf3d7cd55f214f5178953471e9f43eb0a ... 0858537b67338fb9}
}
6 : <CFString 0x18d8b0 [0x1013400]>{contents = "NSStoreUUID"} = <CFString 0x5919120 [0x1013400]>{contents = "4C569F90-109B-4FFC-BC6A-853DF9E00B46"}
}
, reason=The model used to open the store is incompatible with the one used to create the store}, {
metadata = {
NSPersistenceFrameworkVersion = 320;
NSStoreModelVersionHashes = {
Routine = <f3d7cd55 f214f517 8953471e 9f43eb0a f785e73a 19b97ca1 0858537b 67338fb9>;
};
NSStoreModelVersionHashesVersion = 3;
NSStoreModelVersionIdentifiers = (
);
NSStoreType = SQLite;
NSStoreUUID = "4C569F90-109B-4FFC-BC6A-853DF9E00B46";
};
reason = "The model used to open the store is incompatible with the one used to create the store";
}
```
Data Model:

App Delegate:
```
#import "CurlAppDelegate.h"
#import "ExcerciseNavController.h"
#import "RoutineTableViewController.h"
@implementation CurlAppDelegate
@synthesize window=_window;
@synthesize rootController;
@synthesize excerciseNavController;
@synthesize managedObjectContext=__managedObjectContext;
@synthesize managedObjectModel=__managedObjectModel;
@synthesize persistentStoreCoordinator=__persistentStoreCoordinator;
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
// Override point for customization after application launch.
[self.window addSubview:rootController.view];
[self.window makeKeyAndVisible];
return YES;
}
- (void)applicationWillResignActive:(UIApplication *)application
{
/*
Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game.
*/
}
- (void)applicationDidEnterBackground:(UIApplication *)application
{
/*
Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
*/
}
- (void)applicationWillEnterForeground:(UIApplication *)application
{
/*
Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background.
*/
}
- (void)applicationDidBecomeActive:(UIApplication *)application
{
/*
Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
*/
}
- (void)applicationWillTerminate:(UIApplication *)application
{
/*
Called when the application is about to terminate.
Save data if appropriate.
See also applicationDidEnterBackground:.
*/
}
- (void)dealloc
{
[_window release];
[rootController release];
[excerciseNavController release];
[__managedObjectContext release];
[__managedObjectModel release];
[__persistentStoreCoordinator release];
[super dealloc];
}
- (void)saveContext
{
NSError *error = nil;
NSManagedObjectContext *managedObjectContext = self.managedObjectContext;
if (managedObjectContext != nil)
{
if ([managedObjectContext hasChanges] && ![managedObjectContext save:&error])
{
/*
Replace this implementation with code to handle the error appropriately.
abort() causes the application to generate a crash log and terminate. You should not use this function in a shipping application, although it may be useful during development. If it is not possible to recover from the error, display an alert panel that instructs the user to quit the application by pressing the Home button.
*/
NSLog(@"Unresolved error %@, %@", error, [error userInfo]);
abort();
}
}
}
#pragma mark - Core Data stack
/**
Returns the managed object context for the application.
If the context doesn't already exist, it is created and bound to the persistent store coordinator for the application.
*/
- (NSManagedObjectContext *)managedObjectContext
{
if (__managedObjectContext != nil)
{
return __managedObjectContext;
}
NSPersistentStoreCoordinator *coordinator = [self persistentStoreCoordinator];
if (coordinator != nil)
{
__managedObjectContext = [[NSManagedObjectContext alloc] init];
[__managedObjectContext setPersistentStoreCoordinator:coordinator];
}
return __managedObjectContext;
}
/**
Returns the managed object model for the application.
If the model doesn't already exist, it is created from the application's model.
*/
- (NSManagedObjectModel *)managedObjectModel
{
if (__managedObjectModel != nil)
{
return __managedObjectModel;
}
NSURL *modelURL = [[NSBundle mainBundle] URLForResource:@"Curl" withExtension:@"momd"];
__managedObjectModel = [[NSManagedObjectModel alloc] initWithContentsOfURL:modelURL];
return __managedObjectModel;
}
/**
Returns the persistent store coordinator for the application.
If the coordinator doesn't already exist, it is created and the application's store added to it.
*/
- (NSPersistentStoreCoordinator *)persistentStoreCoordinator
{
if (__persistentStoreCoordinator != nil)
{
return __persistentStoreCoordinator;
}
NSURL *storeURL = [[self applicationDocumentsDirectory] URLByAppendingPathComponent:@"Curl.sqlite"];
NSError *error = nil;
__persistentStoreCoordinator = [[NSPersistentStoreCoordinator alloc] initWithManagedObjectModel:[self managedObjectModel]];
if (![__persistentStoreCoordinator addPersistentStoreWithType:NSSQLiteStoreType configuration:nil URL:storeURL options:nil error:&error])
{
/*
Replace this implementation with code to handle the error appropriately.
abort() causes the application to generate a crash log and terminate. You should not use this function in a shipping application, although it may be useful during development. If it is not possible to recover from the error, display an alert panel that instructs the user to quit the application by pressing the Home button.
Typical reasons for an error here include:
* The persistent store is not accessible;
* The schema for the persistent store is incompatible with current managed object model.
Check the error message to determine what the actual problem was.
If the persistent store is not accessible, there is typically something wrong with the file path. Often, a file URL is pointing into the application's resources directory instead of a writeable directory.
If you encounter schema incompatibility errors during development, you can reduce their frequency by:
* Simply deleting the existing store:
[[NSFileManager defaultManager] removeItemAtURL:storeURL error:nil]
* Performing automatic lightweight migration by passing the following dictionary as the options parameter:
[NSDictionary dictionaryWithObjectsAndKeys:[NSNumber numberWithBool:YES], NSMigratePersistentStoresAutomaticallyOption, [NSNumber numberWithBool:YES], NSInferMappingModelAutomaticallyOption, nil];
Lightweight migration will only work for a limited set of schema changes; consult "Core Data Model Versioning and Data Migration Programming Guide" for details.
*/
NSLog(@"Unresolved error %@, %@", error, [error userInfo]);
abort();
}
return __persistentStoreCoordinator;
}
#pragma mark - Application's Documents directory
/**
Returns the URL to the application's Documents directory.
*/
- (NSURL *)applicationDocumentsDirectory
{
return [[[NSFileManager defaultManager] URLsForDirectory:NSDocumentDirectory inDomains:NSUserDomainMask] lastObject];
}
@end
```
routineViewController:
```
#import "RoutineTableViewController.h"
#import "AlertPrompt.h"
#import "Routine.h"
#import "CurlAppDelegate.h"
@implementation RoutineTableViewController
@synthesize tableView;
@synthesize eventsArray;
@synthesize managedObjectContext;
- (void)dealloc
{
[managedObjectContext release];
[eventsArray release];
[super dealloc];
}
- (void)didReceiveMemoryWarning
{
[super didReceiveMemoryWarning];
}
-(void)addEvent
```
{
CurlAppDelegate *curlAppDelegate = [[UIApplication sharedApplication] delegate];
NSManagedObjectContext *context = [curlAppDelegate managedObjectContext];
```
Routine *routine = (Routine *)[NSEntityDescription insertNewObjectForEntityForName:@"Routine" inManagedObjectContext:context];
NSManagedObject *newRoutineEntry;
newRoutineEntry = [NSEntityDescription insertNewObjectForEntityForName:@"Routine" inManagedObjectContext:context];
NSError *error = nil;
if (![context save:&error]) {
// Handle the error.
}
[eventsArray insertObject:routine atIndex:0];
NSIndexPath *indexPath = [NSIndexPath indexPathForRow:0 inSection:0];
[self.tableView insertRowsAtIndexPaths:[NSArray arrayWithObject:indexPath] withRowAnimation:UITableViewRowAnimationFade];
[self.tableView scrollToRowAtIndexPath:[NSIndexPath indexPathForRow:0 inSection:0] atScrollPosition:UITableViewScrollPositionTop animated:YES];
```
}
# pragma mark - View lifecycle
```
- (void)viewDidLoad
{
```
CurlAppDelegate *curlAppDelegate = [[UIApplication sharedApplication] delegate];
NSManagedObjectContext *context = [curlAppDelegate managedObjectContext];
```
NSFetchRequest *request = [[NSFetchRequest alloc] init];
NSEntityDescription *entity = [NSEntityDescription entityForName:@"Routine" inManagedObjectContext:context];
[request setEntity:entity];
NSError *error = nil;
NSMutableArray *mutableFetchResults = [[context executeFetchRequest:request error:&error] mutableCopy];
if (mutableFetchResults == nil) {
// Handle the error.
}
[self setEventsArray:mutableFetchResults];
[mutableFetchResults release];
[request release];
UIBarButtonItem * addButton = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemAdd target:self action:@selector(showPrompt)];
[self.navigationItem setLeftBarButtonItem:addButton];
[addButton release];
UIBarButtonItem *editButton = [[UIBarButtonItem alloc]initWithTitle:@"Edit" style:UIBarButtonItemStyleBordered target:self action:@selector(toggleEdit)];
self.navigationItem.rightBarButtonItem = editButton;
[editButton release];
[super viewDidLoad];
}
-(void)toggleEdit
{
[self.tableView setEditing: !self.tableView.editing animated:YES];
if (self.tableView.editing)
[self.navigationItem.rightBarButtonItem setTitle:@"Done"];
else
[self.navigationItem.rightBarButtonItem setTitle:@"Edit"];
}
-(void)showPrompt
{
AlertPrompt *prompt = [AlertPrompt alloc];
prompt = [prompt initWithTitle:@"Add Workout Day" message:@"\n \n Please enter title for workout day" delegate:self cancelButtonTitle:@"Cancel" okButtonTitle:@"Add"];
[prompt show];
[prompt release];
}
- (void)alertView:(UIAlertView *)alertView willDismissWithButtonIndex:(NSInteger)buttonIndex
{
if (buttonIndex != [alertView cancelButtonIndex])
{
NSString *entered = [(AlertPrompt *)alertView enteredText];
if(eventsArray && entered)
{
[eventsArray addObject:entered];
[tableView reloadData];
}
}
}
- (void)viewDidUnload
{
self.eventsArray = nil;
[super viewDidUnload];
}
- (void)viewWillAppear:(BOOL)animated
{
[super viewWillAppear:animated];
}
- (void)viewDidAppear:(BOOL)animated
{
[super viewDidAppear:animated];
}
- (void)viewWillDisappear:(BOOL)animated
{
[super viewWillDisappear:animated];
}
- (void)viewDidDisappear:(BOOL)animated
{
[super viewDidDisappear:animated];
}
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
// Return YES for supported orientations
return (interfaceOrientation == UIInterfaceOrientationPortrait);
}
#pragma mark - Table view data source
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
{
return 1;
}
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
return [eventsArray count];
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
static NSString *CellIdentifier = @"Cell";
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil)
cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellEditingStyleDelete reuseIdentifier:CellIdentifier] autorelease];
cell.textLabel.text = [self.eventsArray objectAtIndex:indexPath.row];
return cell;
}
// Override to support conditional editing of the table view.
- (BOOL)tableView:(UITableView *)tableView canEditRowAtIndexPath:(NSIndexPath *)indexPath
{
// Return NO if you do not want the specified item to be editable.
return YES;
}
-(void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath
{
if (editingStyle == UITableViewCellEditingStyleDelete) {
// Delete the managed object at the given index path.
NSManagedObject *eventToDelete = [eventsArray objectAtIndex:indexPath.row];
[managedObjectContext deleteObject:eventToDelete];
// Update the array and table view.
[eventsArray removeObjectAtIndex:indexPath.row];
[tableView deleteRowsAtIndexPaths:[NSArray arrayWithObject:indexPath] withRowAnimation:YES];
// Commit the change.
NSError *error = nil;
if (![managedObjectContext save:&error]) {
// Handle the error.
}
}
}
/*
// Override to support rearranging the table view.
- (void)tableView:(UITableView *)tableView moveRowAtIndexPath:(NSIndexPath *)fromIndexPath toIndexPath:(NSIndexPath *)toIndexPath
{
}
*/
/*
// Override to support conditional rearranging of the table view.
- (BOOL)tableView:(UITableView *)tableView canMoveRowAtIndexPath:(NSIndexPath *)indexPath
{
// Return NO if you do not want the item to be re-orderable.
return YES;
}
*/
#pragma mark - Table view delegate
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
// Navigation logic may go here. Create and push another view controller.
/*
<#DetailViewController#> *detailViewController = [[<#DetailViewController#> alloc] initWithNibName:@"<#Nib name#>" bundle:nil];
// ...
// Pass the selected object to the new view controller.
[self.navigationController pushViewController:detailViewController animated:YES];
[detailViewController release];
*/
}
@end
```
| Core Data Causing App (ViewController) To Freeze Up | CC BY-SA 2.5 | null | 2011-03-30T02:49:44.407 | 2011-03-30T04:11:29.687 | 2017-05-23T12:13:29.270 | -1 | null | [
"iphone",
"objective-c",
"xcode",
"core-data",
"mobile"
]
|
5,481,550 | 1 | 5,482,590 | null | 2 | 489 | I've put a few good hours into this.. I'm unable to see the various styles I have defined in a global Resource dictionary. The external file is called Styles.xaml. What am I missing?

| Silverlight ResourceDictionary not available | CC BY-SA 2.5 | 0 | 2011-03-30T03:31:34.587 | 2011-03-30T06:15:57.857 | null | null | 176,338 | [
"xaml",
"silverlight-4.0",
"resources"
]
|
5,481,756 | 1 | 5,481,842 | null | 5 | 24,763 | I am having trouble rendering this correctly in firefox. It renders nicely in chrome and in safari.
```
<div style="" id="login_inline">
<form accept-charset="utf-8" action="/users/login" method="post" id="UserLoginForm">
<div style="display:none;">
<input type="hidden" value="POST" name="_method">
</div>
<input type="text" id="UserDummyEmail" tabindex="1" value="Email" name="data[User][dummyEmail]" style="display: block;">
<input type="text" id="UserDummyPassword" tabindex="2" value="Password" name="data[User][dummyPassword]" style="display: block;">
<input type="text" id="UserEmail" maxlength="255" tabindex="3" name="data[User][email]">
<input type="password" id="UserPassword" tabindex="4" name="data[User][password]">
<div class="submit">
<input type="submit" value="Login">
</div>
</form>
</div>
```
CSS:
```
#login_inline {
position:absolute;
right:10px;
top:30px;
width:420px;
}
.submit {
display:inline;
position:absolute;
left:360px;
}
#UserPassword {
position:absolute;
left: 185px;
}
#UserDummyPassword {
position:absolute;
left:185px;
z-index:1;
color:gray;
}
#UserDummyEmail {
position:absolute;
left:10px;
z-index:1;
color:gray;
}
#UserEmail {
position:absolute;
left:10px;
}
```
Firefox rendering:

Chrome rendering:

[Live example (Correct rendering)](http://jsfiddle.net/yYeFc/)
| firefox absolute positioning problem | CC BY-SA 2.5 | 0 | 2011-03-30T04:06:08.453 | 2014-03-31T14:38:15.787 | null | null | 269,106 | [
"css",
"firefox",
"google-chrome",
"stylesheet",
"css-position"
]
|
5,481,825 | 1 | null | null | 2 | 974 | I'm required to implement a map in Java Swing, which is connected with a spatial database to handle some queries. I used a jLabel to represent the map image.
I need to drag an area and return all the possible elements within that area. Each return element should be shown on the map as yellow triangle or red circle and these polygons could be clicked to provide further information on somewhere else.
Here is my confusion. Which component should I use to demonstrate the element on the image?
It need to be interactive so intuitively I choose `JButton`, here is my implementation:
```
Iterator<JGeometry> it = al.iterator();
while (it.hasNext()) {
JButton jButton1 = new JButton();
jButton1.setText("213");
jButton1.setBounds(325 + (int)it.next().getPoint()[0], 70 + (int)it.next().getPoint()[1], 30,30);
jButton1.setVisible(true);
getContentPane().add(jButton1);
}
```
But it doesn't show any button on the panel. I suppose both the jButton and the jLabel containing the image are on the same level, so there may be some overlap. How can I deal with that? Is there any better solution for this case?

| interactive component in Java Swing | CC BY-SA 2.5 | 0 | 2011-03-30T04:22:20.173 | 2011-03-30T12:12:47.820 | 2011-03-30T12:12:47.820 | 513,838 | 677,596 | [
"java",
"swing"
]
|
5,482,226 | 1 | 5,482,374 | null | 0 | 494 | I have tried to use the following code to passing value back from the child window back to the parent window
```
<tr>
<th class="clLabel">Unit</th>
<td>
<asp:TextBox ID="sUnit" runat="server" MaxLength="12" Width="3em" />
</td>
</tr>
<script type="text/javascript">
$("#test").click(function () {
var parent = $(parent.document.body);
$(parent).find('input#sUnit').val("test");
window.close();
});
</script>
```
But some how error message always display when it's come to this code of line
# NOTE: parent page and the child page is holding in the difference host (will this cause the problem?)

Does anyone know what is it going on? And how can I solve it?
| Error 'document' is null or not object found when passing value back from child window to parent window | CC BY-SA 2.5 | null | 2011-03-30T05:27:05.623 | 2011-03-30T06:04:40.490 | 2020-06-20T09:12:55.060 | -1 | 52,745 | [
"jquery"
]
|
5,482,281 | 1 | 5,482,535 | null | 0 | 182 | 
now thats a problem :|
Thanks for looking in
Adam Ramadhan
| how can we make forms like this with css & html? | CC BY-SA 2.5 | 0 | 2011-03-30T05:33:39.257 | 2011-03-30T17:48:17.673 | null | null | 320,486 | [
"html",
"css",
"forms"
]
|
5,482,338 | 1 | 5,482,386 | null | 2 | 910 | Looks like both are folders, why in different icons

| what's the difference between those two icons in Eclipse | CC BY-SA 2.5 | 0 | 2011-03-30T05:43:23.533 | 2011-03-30T05:59:28.417 | null | null | 496,949 | [
"java",
"eclipse"
]
|
5,482,769 | 1 | null | null | 0 | 2,019 | I want to have a custom widget for fivestar ratings that shows the average votes in following form

Does anyone have any ideas or knows of any already present widget that shows average vote in the above format.
| Drupal custom fivestar widget | CC BY-SA 2.5 | null | 2011-03-30T06:35:02.383 | 2012-04-20T20:24:57.717 | null | null | 455,257 | [
"drupal",
"drupal-fivestar"
]
|
5,482,941 | 1 | 5,483,055 | null | 0 | 194 | in my class I define the following macro
```
#define RELEASE_SAFELY(__POINTER){[__POINTER release]; __POINTER = nil;}
```
But I get this warning on that:

How can I fix that?
| How to fix RELEASE_SAFELY macro warning? | CC BY-SA 2.5 | 0 | 2011-03-30T06:55:46.363 | 2011-03-30T07:10:39.007 | null | null | 401,025 | [
"objective-c",
"xcode"
]
|
5,483,006 | 1 | 5,484,552 | null | 14 | 11,575 | I am trying to create a plot with multiple stacked histograms like example 8 [here](http://gnuplot.sourceforge.net/demo/histograms.html). But for my data, each group has the same four categories.

How do I change the colors and the key so that colors go Red, Green, Blue, Pink for every stacked column? And so the key only has one copy each of the 4 things I am plotting?
Here is the line I'm using to plot:
```
plot newhistogram "1", 'addresses.dat' using 2:xtic(1) t 2, '' u 3 t 3, \
'' u 4 t 4, '' u 5 t 5, newhistogram "2", '' u 6 t 6, '' u 7 t 7, '' u 8 t 8,\
'' u 9 t 9
```
My data is in the same format as the example I linked to above:
```
Address PAL_Code BASH App Kernel PAL_Code BASH App Kernel
FFT 1 1 2 2 1 1 3 4
RADIX 1 2 3 4 1 2 4 5
LU 1 3 4 5 1 3 5 6
```
Thank you so much if you can help!
| Gnuplot: Multiple Stacked Histograms, each group using the same key | CC BY-SA 3.0 | 0 | 2011-03-30T07:04:21.913 | 2014-08-12T10:30:50.870 | 2014-08-12T10:30:50.870 | 1,698,987 | 683,415 | [
"plot",
"gnuplot"
]
|
5,483,304 | 1 | 5,483,658 | null | 19 | 38,391 | Using [MySQL Workbench](http://www.mysql.com/products/workbench/), when I press CTRL + space it looks like there is an autocomplete feature (However, no items appear in the auto complete box).
I am not sure that MySQL workbench has an autocomplete feature like [SQLyog](http://www.webyog.com/en/) has(See screen-shot).

So if MySQL Workbench really has an intellisense or autocomplete like feature then how I can get them?
Is there any way to make MySQL Workbench auto complete the same way as Sqlyog does?
| Does MySQL Workbench autocomplete work? | CC BY-SA 3.0 | 0 | 2011-03-30T07:36:12.333 | 2022-01-06T21:33:48.117 | 2012-07-17T11:59:12.500 | 1,506,399 | null | [
"mysql",
"mysql-workbench",
"workbench"
]
|
5,483,340 | 1 | null | null | 0 | 3,149 | i have table like the following

now, i want to export this to excel, so i can open it in ms excel
| rails how to export data to excel | CC BY-SA 2.5 | null | 2011-03-30T07:40:15.737 | 2011-04-20T17:21:44.803 | null | null | 434,689 | [
"ruby-on-rails"
]
|
5,483,361 | 1 | 6,774,162 | null | 0 | 190 | I am using a UIButton to represent number of notification on bar of a table that slides up/down when the button is placed. The title of the button changes dynamically to represent number of un-read notifications.
Please see partial screenshots attached.
Start Frame of Animation - Notifications showing as 2 - Correctly

End Frame of Animation - Notifications Showing as 0 - This should not change

Below is the code I am using to animate
```
-(IBAction) showNotifications {
if (notificationTableIsUp) {
CGRect notificationsHeaderFrame = notificationsHeader.frame;
CGRect notificationsTableFrame = notificationsTable.frame;
// Animate to pull up Notification Table
[UIView beginAnimations:nil context:nil];
[UIView setAnimationDuration:0.4];
notificationTableIsUp = !notificationTableIsUp;
notificationsHeaderFrame.origin.y += 220;
notificationsHeader.frame = notificationsHeaderFrame;
notificationsTableFrame.origin.y += 220;
notificationsTable.frame = notificationsTableFrame;
[UIView commitAnimations];
} else {
CGRect notificationsHeaderFrame = notificationsHeader.frame;
CGRect notificationsTableFrame = notificationsTable.frame;
// Animate to pull down Notification Table
[UIView beginAnimations:nil context:nil];
[UIView setAnimationDuration:0.4];
notificationTableIsUp = !notificationTableIsUp;
notificationsHeaderFrame.origin.y -= 220;
notificationsHeader.frame = notificationsHeaderFrame;
notificationsTableFrame.origin.y -= 220;
notificationsTable.frame = notificationsTableFrame;
[UIView commitAnimations];
}
}
- (void)viewDidLoad {
[super viewDidLoad];
notificationTableIsUp = NO;
[self updateNotificationBadgeTo:2];
}
- (void) updateNotificationBadgeTo:(NSInteger)numberOfNotifications {
notificationBadgeButton.titleLabel.font = [UIFont boldSystemFontOfSize:14];
notificationBadgeButton.titleLabel.textColor = [UIColor whiteColor];
notificationBadgeButton.titleLabel.text = [NSString stringWithFormat:@"%d", numberOfNotifications];
}
```
Note that the Green bar is a UIView and Notifications is a UILabel and Round button is a UIButton all set up in IB. 0 is the initial title for the button set in IB. I am setting it to 2 in viewDidLoad.
So basic problem here is when I click on the button, the value it changing from white 2 (set in viewDidLoad) to Blue 0 (Set in IB).
How can I remove this part when I am animating the slide up/down?
Thanks
Dev.
| Value of button Title animating in Core Animation Block | CC BY-SA 2.5 | null | 2011-03-30T07:41:49.303 | 2011-07-21T09:43:52.893 | null | null | 154,967 | [
"iphone",
"core-animation"
]
|
5,483,442 | 1 | null | null | 2 | 1,021 | I am using facebook-ios-sdk in my iphone application
I am trying to post a link on facebook from my iphone application
```
NSLog(@"link..%@",[shareDict objectForKey:@"url"]);
NSMutableDictionary* params = [NSMutableDictionary dictionaryWithObjectsAndKeys:
[shareDict objectForKey:@"url"], @"link",nil];
[facebookObj requestWithMethodName:@"facebook.Stream.publish" andParams:params
andHttpMethod:@"POST" andDelegate:self];
```
it successfully posted as my application log
```
2011-03-30 13:10:02.128 myApp[1804:207] link..http://khabar.ndtv.com/Home.aspx
2011-03-30 13:10:04.064 myApp[1804:207] received response..https://api.facebook.com/method/facebook.Stream.publish
2011-03-30 13:10:04.066 myApp[1804:207] request didLoad.. . . API..thod/facebook.stream.publish
```
But link is not showing on facebook wall... it shown as..

Now
- - 
| Facebook + iOS - post link without dialog | CC BY-SA 3.0 | 0 | 2011-03-30T07:50:45.743 | 2014-08-18T18:34:19.317 | 2014-08-18T18:34:19.317 | 64,046 | 488,506 | [
"ios",
"facebook",
"iphone-sdk-3.0",
"facebook-ios-sdk"
]
|
5,483,498 | 1 | 5,483,623 | null | 0 | 110 | I want to upload my app in app store. I didn't find the "requirements" field. I want use my app for 3gs and above.

| I want to upload my app in app store. I didn't find the "requirements" field | CC BY-SA 3.0 | null | 2011-03-30T07:57:02.563 | 2011-10-12T09:26:22.657 | 2011-10-12T09:26:22.657 | 618,728 | 499,825 | [
"iphone",
"app-store"
]
|
5,483,610 | 1 | null | null | 1 | 13,722 | I have written the following code to send an email from a VB.net windows Form.
Here is my code
```
Try
Dim message As System.Net.Mail.MailMessage
Dim smtp As New System.Net.Mail.SmtpClient("smtp.gmail.com")
Dim fromMailAddress As System.Net.Mail.MailAddress
Dim toMailAddress As System.Net.Mail.MailAddress
fromMailAddress = New System.Net.Mail.MailAddress("[email protected]")
toMailAddress = New System.Net.Mail.MailAddress("[email protected]")
message = New System.Net.Mail.MailMessage()
message.From = toMailAddress
message.To.Add(fromMailAddress)
message.Subject = "TestFromVB"
message.Body = "Test Message"
smtp.EnableSsl = True
smtp.UseDefaultCredentials = False
smtp.Credentials = New System.Net.NetworkCredential("[email protected]", "password")
smtp.DeliveryMethod = Net.Mail.SmtpDeliveryMethod.Network
smtp.Send(message)
MessageBox.Show("sent...")
Catch ex As Exception
MessageBox.Show("error" + ex.Message + "\n" + ex.InnerException.ToString())
End Try
```
Whenever i click on a button , it should send email to the address specified. Bu this code is giving some error saying
Here is the screenshot of exception

Can anybody please help me to fix this issue. or Please suggest if you have any working sample.
| Sending email from VB.net Windows Form | CC BY-SA 2.5 | null | 2011-03-30T08:06:51.940 | 2016-05-17T12:41:57.423 | null | null | 321,959 | [
".net",
"vb.net",
"winforms",
"email"
]
|
5,483,703 | 1 | 5,484,573 | null | 0 | 3,101 | I have custom flex component inherited from UIComponent (compiled, no source code access). It has fixed width-to-height proportions and it's scalable. If I set its width and height to 100%, it's trying to fit parent's size, but it keeps width-to-height proportion, so if it's proportion does not equal parent's proportion, there can appear empty space near this component when resizing parent.
What I need, is to fit my component completely to parent's size. Is there any nice way to do this? I could listen to parent's `resize` event, and play with component's `scaleX` and `scaleY`, but may be any better way exists to solve my problem (any property?). Thanks.
| Scaling and resizing flex component | CC BY-SA 2.5 | null | 2011-03-30T08:14:57.447 | 2011-03-30T18:19:54.613 | 2020-06-20T09:12:55.060 | -1 | 592,882 | [
"apache-flex",
"actionscript-3",
"resize",
"scale",
"uicomponents"
]
|
5,483,728 | 1 | 5,506,166 | null | 17 | 11,810 | I just switched from Xcode 3 to 4. When I attempt to upload an app that I have archived to the organizer, I receive this error:
> The archive is invalid.
/var/folders/.../app.ipa does not
exist.

This happens after I log in to itunes connect, select the application to update and select next. I am not sure where to begin trying to figure out what is causing this error. Please let me know if I am leaving out anything that would be useful for diagnosing. Thanks
| Xcode iOS organizer submit to app store yields "The archive is invalid" error | CC BY-SA 2.5 | 0 | 2011-03-30T08:16:33.780 | 2016-07-02T19:12:41.010 | null | null | 253,721 | [
"iphone",
"xcode",
"ios4",
"organizer"
]
|
5,483,828 | 1 | null | null | 82 | 106,032 | I have `TextView` with `drawableLeft` & `drawableRight` in List item.
The problem is, whenever the height of `TextView` is larger, `drawableLeft` & `drawableLeft` didn't automatically scale based on the height of the `TextView`.
Is it possible to scale the height of `drawableLeft` & `drawableRight` in `TextView` ?
(I was using 9 patch image)

| Is it possible to scale drawableleft & drawableright in textview? | CC BY-SA 4.0 | 0 | 2011-03-30T08:26:09.567 | 2022-05-24T08:51:03.763 | 2019-10-07T07:39:24.227 | 7,777,699 | 575,772 | [
"android",
"textview"
]
|
5,483,927 | 1 | 5,548,477 | null | 1 | 1,809 | I have implemented Sound cloud api in my app to export songs to soundcloud.
Now,I want to launch a browser in my app.This browser will allow the user to browse and listen to various other users songs that have been exported to SoundCloud through my app.
Also,the songlist should not include tracks which are not uploaded through my app.
The following is a screenshot from an app which uses similar functionality:

The only change in my app will be that I dont want the Sessions list.
Please suggest how to do this.
| How to get uploaded tracks from soundcloud? | CC BY-SA 2.5 | 0 | 2011-03-30T08:35:55.253 | 2011-04-05T11:38:12.097 | 2011-04-04T04:33:47.087 | 386,236 | 386,236 | [
"iphone",
"objective-c",
"ipad",
"soundcloud"
]
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.