PostId
int64
13
11.8M
PostCreationDate
stringlengths
19
19
OwnerUserId
int64
3
1.57M
OwnerCreationDate
stringlengths
10
19
ReputationAtPostCreation
int64
-33
210k
OwnerUndeletedAnswerCountAtPostTime
int64
0
5.77k
Title
stringlengths
10
250
BodyMarkdown
stringlengths
12
30k
Tag1
stringlengths
1
25
Tag2
stringlengths
1
25
Tag3
stringlengths
1
25
Tag4
stringlengths
1
25
Tag5
stringlengths
1
25
PostClosedDate
stringlengths
19
19
OpenStatus
stringclasses
5 values
unified_texts
stringlengths
47
30.1k
OpenStatus_id
int64
0
4
46,439
09/05/2008 18:06:46
300
08/04/2008 13:38:16
1
0
SQL Server unused, but allocated table space
I have ms sql databases that grow very large. Upon examination I find that there is a bunch of unused space in certain tables. I don't do many physical deletes, so I don't think that its just deleted records. DBCC SHRINK doesn't make the file smaller. But, if I dump the table to a new, empty database, the size goes down about 80%. Instead of the 7gb I have in this table in the current database, I end up with about 1.5gb in the fresh database. Its as if sql server is allocating too much memory. Anyone encountered this before? I'd like to be able to shrink the table by removing unused allocated space without having to create a whole new database. tia Don
sql-server
null
null
null
null
01/31/2012 19:44:52
too localized
SQL Server unused, but allocated table space === I have ms sql databases that grow very large. Upon examination I find that there is a bunch of unused space in certain tables. I don't do many physical deletes, so I don't think that its just deleted records. DBCC SHRINK doesn't make the file smaller. But, if I dump the table to a new, empty database, the size goes down about 80%. Instead of the 7gb I have in this table in the current database, I end up with about 1.5gb in the fresh database. Its as if sql server is allocating too much memory. Anyone encountered this before? I'd like to be able to shrink the table by removing unused allocated space without having to create a whole new database. tia Don
3
9,118,305
02/02/2012 19:02:39
52,051
01/06/2009 14:03:53
2,391
79
DateTime object serialization in different timezones
I have a wcf webservice that is returning an json object with 2 DateTime properties. This thing works flawless, unless the service is running on a machine with in the UTC +1 (or +2)timezone. On the response, when in this timezone, my browser's ajax request just hangs until timeout. The DateTime properties are not explicitly initialized before sending the response. What could be causing this? Does initialization matter (my tests say no, but im using DateTime.MinValue as a initial value)? Although I am using the [MSDN JSONP example][1] for cross domain requests, for same origin I am using just standard WCF bindings and endpoints which return json. [1]: http://msdn.microsoft.com/en-us/library/cc716898.aspx
c#
.net
wcf
json
null
null
open
DateTime object serialization in different timezones === I have a wcf webservice that is returning an json object with 2 DateTime properties. This thing works flawless, unless the service is running on a machine with in the UTC +1 (or +2)timezone. On the response, when in this timezone, my browser's ajax request just hangs until timeout. The DateTime properties are not explicitly initialized before sending the response. What could be causing this? Does initialization matter (my tests say no, but im using DateTime.MinValue as a initial value)? Although I am using the [MSDN JSONP example][1] for cross domain requests, for same origin I am using just standard WCF bindings and endpoints which return json. [1]: http://msdn.microsoft.com/en-us/library/cc716898.aspx
0
5,041,628
02/18/2011 13:07:18
1,184,558
11/24/2010 12:01:56
1
0
How do I get the MediaCatalogDB OLE DB Provider?
I have a Windows Server 2003 instance running SQL2005 with a linked server using the MediaCatalogDB OLE DB Provider. We're migrating (most of) this server to one running Windows server 2003 but with 64bit SQL2008 R2. However, it doesn't have the MediaCatalogDB OLE DB Provider. Does anyone know where I can get this provider for 64bit SQL 2008? Or another work around? I don't know anything about the system we're linking to (it's a black box provided by a third party). Thanks!
sql
64bit
ole
provider
null
null
open
How do I get the MediaCatalogDB OLE DB Provider? === I have a Windows Server 2003 instance running SQL2005 with a linked server using the MediaCatalogDB OLE DB Provider. We're migrating (most of) this server to one running Windows server 2003 but with 64bit SQL2008 R2. However, it doesn't have the MediaCatalogDB OLE DB Provider. Does anyone know where I can get this provider for 64bit SQL 2008? Or another work around? I don't know anything about the system we're linking to (it's a black box provided by a third party). Thanks!
0
7,975,913
11/02/2011 04:45:57
830,918
07/06/2011 05:21:28
35
2
How to print a captcha image by function?
I have created a function called createCaptcha function createCaptcha() { $ranStr = md5(microtime()); $ranStr = substr($ranStr, 0, 6); $_SESSION['cap_code'] = $ranStr; $newImage = imagecreatefromjpeg("views/cap_bg.jpg"); $txtColor = imagecolorallocate($newImage, 0, 0, 0); imagestring($newImage, 5, 5, 5, $ranStr, $txtColor); imagejpeg($newImage); } but when i call this function it shows some strange characters!!!! <label for="captchacheck">Word Verification : </label> Type the characters in the picture below<br /><br/> <div id="captchadiv"> <img id="captchaimg" src="<?php createCaptcha(); ?>" /></div><br /><br /> <input type="text" name="captchacheck" id="captchacheck" style="width:200px;"/> <br /><br /> **After adding content type inside the function,** header("Content-type: image/jpeg"); The whole page becomes an image but i only want this to work in img tag Any help will be thankful....
php
captcha
null
null
null
11/02/2011 05:18:49
too localized
How to print a captcha image by function? === I have created a function called createCaptcha function createCaptcha() { $ranStr = md5(microtime()); $ranStr = substr($ranStr, 0, 6); $_SESSION['cap_code'] = $ranStr; $newImage = imagecreatefromjpeg("views/cap_bg.jpg"); $txtColor = imagecolorallocate($newImage, 0, 0, 0); imagestring($newImage, 5, 5, 5, $ranStr, $txtColor); imagejpeg($newImage); } but when i call this function it shows some strange characters!!!! <label for="captchacheck">Word Verification : </label> Type the characters in the picture below<br /><br/> <div id="captchadiv"> <img id="captchaimg" src="<?php createCaptcha(); ?>" /></div><br /><br /> <input type="text" name="captchacheck" id="captchacheck" style="width:200px;"/> <br /><br /> **After adding content type inside the function,** header("Content-type: image/jpeg"); The whole page becomes an image but i only want this to work in img tag Any help will be thankful....
3
11,475,558
07/13/2012 17:39:36
1,491,556
06/29/2012 15:30:18
15
3
unexpected T_ELSE error in my code, can someone see it?
I cant find my error, can i have some help? Im trying a login code with a cookie. Thank you in advance! I just cant seem to see my error. I was hoping someone can see something that i am missing. The error is somewhere at the 47th Line, but i know that doesnt exactly mean that that is where it is. <?php if(isset($_POST['sent']) && $_POST['sent'] == "yes") { foreach($_POST as $field => $value) { if($value == "") { $blank_array[$field]= $value; } else { $good_data[$field]=strip_tags(trim($value)); } } } if(@sizeof($blank_array) > 0) { $message = "<p style='color: red; margin-bottom: 0; font-weight: bold'> Error.</p>"; extract($blank_array); extract($good_data); include("form_log.php"); exit(); } include("dbstuff.php"); $cxn = mysqli_connect($host,$user,$password,$database) or die ("coulnt connect"); $query = "SELECT first_name FROM customer WHERE user_name='$_POST[user_name]' AND password=md5('$_POST[password]')"; $result = mysqli_query($cxn,$query) or die ("couldnt query"); $n_row = mysqli_num_rows($result); if($n_row < 1) { $message = "<p style='color: red; margin-bottom: 0; font-weight: bold'> Not found. </p>"; extract($_POST); include("form_log.php"); exit(); } else { $row=mysqli_fetch_assoc($result); setcookie("first_name",$row['first_name']); setcookie("auth","yes"); header("Location: secret_page_cookie.php"); } else { $user_name = ""; $password = ""; include("form_log.php"); } ?>
php
null
null
null
null
07/14/2012 05:09:23
too localized
unexpected T_ELSE error in my code, can someone see it? === I cant find my error, can i have some help? Im trying a login code with a cookie. Thank you in advance! I just cant seem to see my error. I was hoping someone can see something that i am missing. The error is somewhere at the 47th Line, but i know that doesnt exactly mean that that is where it is. <?php if(isset($_POST['sent']) && $_POST['sent'] == "yes") { foreach($_POST as $field => $value) { if($value == "") { $blank_array[$field]= $value; } else { $good_data[$field]=strip_tags(trim($value)); } } } if(@sizeof($blank_array) > 0) { $message = "<p style='color: red; margin-bottom: 0; font-weight: bold'> Error.</p>"; extract($blank_array); extract($good_data); include("form_log.php"); exit(); } include("dbstuff.php"); $cxn = mysqli_connect($host,$user,$password,$database) or die ("coulnt connect"); $query = "SELECT first_name FROM customer WHERE user_name='$_POST[user_name]' AND password=md5('$_POST[password]')"; $result = mysqli_query($cxn,$query) or die ("couldnt query"); $n_row = mysqli_num_rows($result); if($n_row < 1) { $message = "<p style='color: red; margin-bottom: 0; font-weight: bold'> Not found. </p>"; extract($_POST); include("form_log.php"); exit(); } else { $row=mysqli_fetch_assoc($result); setcookie("first_name",$row['first_name']); setcookie("auth","yes"); header("Location: secret_page_cookie.php"); } else { $user_name = ""; $password = ""; include("form_log.php"); } ?>
3
10,601,363
05/15/2012 13:08:15
347,115
05/21/2010 13:32:49
41
1
Sharepoint 2010 Team Status Rollup
I'm looking to create a team status reporting rollup that will allow for effective status reporting in Sharepoint 2010 I'd like for each developer to enter a quick status for projects along with risks and issues. Once submitted, team managers would be able to access a consolidated status report for everyone that reports to them. They would ideally be able to edit the report and resubmit it as a consolidated team report. The organization manager would get a consolidated page that contains all of the reports submitted by managers. I've seen a few posts from people that recommend using a wiki library (with one page for each user) to do this but it doesn't feel like the best solution. Are there tools in Sharepoint 2010 that would allow me to build something like this?
sharepoint2010
null
null
null
null
05/16/2012 21:01:26
off topic
Sharepoint 2010 Team Status Rollup === I'm looking to create a team status reporting rollup that will allow for effective status reporting in Sharepoint 2010 I'd like for each developer to enter a quick status for projects along with risks and issues. Once submitted, team managers would be able to access a consolidated status report for everyone that reports to them. They would ideally be able to edit the report and resubmit it as a consolidated team report. The organization manager would get a consolidated page that contains all of the reports submitted by managers. I've seen a few posts from people that recommend using a wiki library (with one page for each user) to do this but it doesn't feel like the best solution. Are there tools in Sharepoint 2010 that would allow me to build something like this?
2
6,524,215
06/29/2011 16:43:07
819,741
06/28/2011 18:16:14
1
0
loosing class data between views"
If someone can help this would be awesome. So I have MainViewController files and there is a class that is declared there. the class name is @MountianItem when i change views the data is being stored in the fist view but when i move to the third view the data is empty. I am clueless on this. I know I am missing something MainViewController.h #import <UIKit/UIKit.h> #import "DetailViewController.h" #import "DetailMapController.h" @interface MainViewController : UIViewController <NSXMLParserDelegate, UITableViewDelegate, UITableViewDataSource> { UIButton *searchButton; UIActivityIndicatorView *activityIndicator; UITableView *resultsTableView; UILabel *elevationLabel; UISlider *elevationSlider; NSURLConnection *urlConnection; NSMutableData *receivedData; NSXMLParser *xmlParser; NSMutableArray *mountainData; DetailViewController *detailView; } @property (nonatomic, retain) IBOutlet UIButton *searchButton; @property (nonatomic, retain) IBOutlet UIActivityIndicatorView *activityIndicator; @property (nonatomic, retain) IBOutlet UITableView *resultTableView; @property (nonatomic, retain) IBOutlet UILabel *elevationLabel; @property (nonatomic, retain) IBOutlet UISlider *elevationSlider; @property (nonatomic, retain) NSURLConnection *urlConnection; @property (nonatomic, retain) NSMutableData *receivedData; @property (nonatomic, retain) NSXMLParser *xmlParser; @property (nonatomic, retain) NSMutableArray *mountainData; @property (nonatomic, retain) DetailViewController *detailView; -(IBAction) startSearch:(id)sender; - (void) setUIState:(int)uiState; - (IBAction)sliderChanged:(id)sender; -(NSString *) getCommaSeparatedFromStringContainingNumber:(NSString *)stringWithNumber; MainViewController.m #import "MainViewController.h" #import "MountainItem.h" @implementation MainViewController @synthesize searchButton; @synthesize activityIndicator; @synthesize resultTableView; @synthesize elevationLabel; @synthesize elevationSlider; @synthesize urlConnection; @synthesize receivedData; @synthesize xmlParser; @synthesize mountainData; @synthesize detailView; // State is loading data. Used to set view. static const int LOADING_STATE = 1; // State is active. Used to set view. static const int ACTIVE_STATE = 0; - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil { self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]; if (self) { // Custom initialization } return self; } - (void)dealloc { [searchButton release]; [activityIndicator release]; [resultTableView release]; [elevationLabel release]; [elevationSlider release]; [urlConnection release]; [receivedData release]; [xmlParser release]; [mountainData release]; [detailView release]; [super dealloc]; } #pragma mark - NSXMLParser Callbacks - (void)parser:(NSXMLParser *)parser didStartElement:(NSString *)elementName namespaceURI:(NSString *)namespaceURI qualifiedName:(NSString *)qName attributes:(NSDictionary *)attributeDict { //Is a mountain_item node if ([elementName isEqualToString:@"river"]) { MountainItem *mountainItem = [[MountainItem alloc] init]; mountainItem.name = [attributeDict objectForKey:@"name"]; mountainItem.gage = [attributeDict objectForKey:@"gage"]; mountainItem.latitude = [attributeDict objectForKey:@"latitude"]; mountainItem.longitude = [attributeDict objectForKey:@"longitude"]; [mountainData addObject:mountainItem]; [mountainItem release]; mountainItem = nil; } } DetailViewController.h #import <UIKit/UIKit.h> #import "MountainItem.h" @interface DetailViewController : UIViewController { UITextView *mountainInfoTextView; UIWebView *myWebViewer; UIBarButtonItem *addButton; MountainItem *mountainItem; } @property (nonatomic, retain) IBOutlet UITextView *mountainInfoTextView; @property (nonatomic, retain) IBOutlet UIWebView *myWebViewer; @property (nonatomic, retain) IBOutlet UIBarButtonItem *addButton; @property (nonatomic, retain) MountainItem *mountainItem; @end DetailViewController.m #import "DetailViewController.h" #import "DetailMapController.h" @implementation DetailViewController @synthesize mountainInfoTextView; @synthesize mountainItem; @synthesize myWebViewer; @synthesize addButton; - (void)dealloc { [mountainInfoTextView release]; [mountainItem release]; [myWebViewer release]; [super dealloc]; } -(void)viewWillAppear:(BOOL)animated { [super viewWillAppear:animated]; [self setTitle:mountainItem.name]; NSMutableString *myHttp; myHttp = [@"http://water.weather.gov/resources/hydrographs/" mutableCopy]; [myHttp appendString:mountainItem.gage]; [myHttp appendString:@"_hg.png"]; NSString *urlAddress = myHttp; NSURL *url = [NSURL URLWithString:urlAddress]; NSURLRequest *requestObj = [NSURLRequest requestWithURL:url]; [myWebViewer loadRequest:requestObj]; //mountainInfoTextView.text = [NSString stringWithFormat: @"Name: %@",mountainItem.gage]; } DetailMapController.h #import <UIKit/UIKit.h> #import "MapKit/Mapkit.h" #import "DetailViewController.h" @interface DetailMapController : UIViewController <MKMapViewDelegate> { MKMapView *MyMapLocation; MountainItem *mountainItem; } @property (nonatomic, retain) IBOutlet MKMapView *MyMapLocation; @property (nonatomic, retain) MountainItem *mountainItem; @end DetailMapController.m #import "DetailMapController.h" #import "MapAnnotation.h" @implementation DetailMapController @synthesize mountainItem; @synthesize MyMapLocation; - (void)dealloc { [MyMapLocation release]; [mountainItem release]; [super dealloc]; } -(void)viewWillAppear:(BOOL)animated { [super viewWillAppear:animated]; [MyMapLocation setMapType:MKMapTypeStandard]; [MyMapLocation setZoomEnabled:YES]; [MyMapLocation setScrollEnabled:YES]; MKCoordinateRegion region = { {0.0, 0.0 }, { 0.0, 0.0 } }; region.center.latitude = [mountainItem.latitude doubleValue] ; region.center.longitude = [mountainItem.longitude doubleValue] ; //region.center.latitude = [@"36.273889" doubleValue] ; //region.center.longitude = [@"-86.816944" doubleValue] ; region.span.longitudeDelta = .001f; region.span.latitudeDelta = .001f; [MyMapLocation setRegion:region animated:YES]; [MyMapLocation setDelegate:self]; [self.MyMapLocation removeAnnotations:self.MyMapLocation.annotations]; MapAnnotation *ann = [[MapAnnotation alloc] init]; ann.title = mountainItem.name; ann.coordinate = region.center; [MyMapLocation addAnnotation:ann]; [MyMapLocation selectAnnotation:ann animated:YES]; [ann release]; } - (void)viewDidUnload { [super viewDidUnload]; // Release any retained subviews of the main view. // e.g. self.myOutlet = nil; self.MyMapLocation = nil; //self.mountainItem = nil; } When I debug in DetailMapController mountainItem is empty. Any help would be greatly helped!
xcode
null
null
null
null
06/30/2011 22:30:51
too localized
loosing class data between views" === If someone can help this would be awesome. So I have MainViewController files and there is a class that is declared there. the class name is @MountianItem when i change views the data is being stored in the fist view but when i move to the third view the data is empty. I am clueless on this. I know I am missing something MainViewController.h #import <UIKit/UIKit.h> #import "DetailViewController.h" #import "DetailMapController.h" @interface MainViewController : UIViewController <NSXMLParserDelegate, UITableViewDelegate, UITableViewDataSource> { UIButton *searchButton; UIActivityIndicatorView *activityIndicator; UITableView *resultsTableView; UILabel *elevationLabel; UISlider *elevationSlider; NSURLConnection *urlConnection; NSMutableData *receivedData; NSXMLParser *xmlParser; NSMutableArray *mountainData; DetailViewController *detailView; } @property (nonatomic, retain) IBOutlet UIButton *searchButton; @property (nonatomic, retain) IBOutlet UIActivityIndicatorView *activityIndicator; @property (nonatomic, retain) IBOutlet UITableView *resultTableView; @property (nonatomic, retain) IBOutlet UILabel *elevationLabel; @property (nonatomic, retain) IBOutlet UISlider *elevationSlider; @property (nonatomic, retain) NSURLConnection *urlConnection; @property (nonatomic, retain) NSMutableData *receivedData; @property (nonatomic, retain) NSXMLParser *xmlParser; @property (nonatomic, retain) NSMutableArray *mountainData; @property (nonatomic, retain) DetailViewController *detailView; -(IBAction) startSearch:(id)sender; - (void) setUIState:(int)uiState; - (IBAction)sliderChanged:(id)sender; -(NSString *) getCommaSeparatedFromStringContainingNumber:(NSString *)stringWithNumber; MainViewController.m #import "MainViewController.h" #import "MountainItem.h" @implementation MainViewController @synthesize searchButton; @synthesize activityIndicator; @synthesize resultTableView; @synthesize elevationLabel; @synthesize elevationSlider; @synthesize urlConnection; @synthesize receivedData; @synthesize xmlParser; @synthesize mountainData; @synthesize detailView; // State is loading data. Used to set view. static const int LOADING_STATE = 1; // State is active. Used to set view. static const int ACTIVE_STATE = 0; - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil { self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]; if (self) { // Custom initialization } return self; } - (void)dealloc { [searchButton release]; [activityIndicator release]; [resultTableView release]; [elevationLabel release]; [elevationSlider release]; [urlConnection release]; [receivedData release]; [xmlParser release]; [mountainData release]; [detailView release]; [super dealloc]; } #pragma mark - NSXMLParser Callbacks - (void)parser:(NSXMLParser *)parser didStartElement:(NSString *)elementName namespaceURI:(NSString *)namespaceURI qualifiedName:(NSString *)qName attributes:(NSDictionary *)attributeDict { //Is a mountain_item node if ([elementName isEqualToString:@"river"]) { MountainItem *mountainItem = [[MountainItem alloc] init]; mountainItem.name = [attributeDict objectForKey:@"name"]; mountainItem.gage = [attributeDict objectForKey:@"gage"]; mountainItem.latitude = [attributeDict objectForKey:@"latitude"]; mountainItem.longitude = [attributeDict objectForKey:@"longitude"]; [mountainData addObject:mountainItem]; [mountainItem release]; mountainItem = nil; } } DetailViewController.h #import <UIKit/UIKit.h> #import "MountainItem.h" @interface DetailViewController : UIViewController { UITextView *mountainInfoTextView; UIWebView *myWebViewer; UIBarButtonItem *addButton; MountainItem *mountainItem; } @property (nonatomic, retain) IBOutlet UITextView *mountainInfoTextView; @property (nonatomic, retain) IBOutlet UIWebView *myWebViewer; @property (nonatomic, retain) IBOutlet UIBarButtonItem *addButton; @property (nonatomic, retain) MountainItem *mountainItem; @end DetailViewController.m #import "DetailViewController.h" #import "DetailMapController.h" @implementation DetailViewController @synthesize mountainInfoTextView; @synthesize mountainItem; @synthesize myWebViewer; @synthesize addButton; - (void)dealloc { [mountainInfoTextView release]; [mountainItem release]; [myWebViewer release]; [super dealloc]; } -(void)viewWillAppear:(BOOL)animated { [super viewWillAppear:animated]; [self setTitle:mountainItem.name]; NSMutableString *myHttp; myHttp = [@"http://water.weather.gov/resources/hydrographs/" mutableCopy]; [myHttp appendString:mountainItem.gage]; [myHttp appendString:@"_hg.png"]; NSString *urlAddress = myHttp; NSURL *url = [NSURL URLWithString:urlAddress]; NSURLRequest *requestObj = [NSURLRequest requestWithURL:url]; [myWebViewer loadRequest:requestObj]; //mountainInfoTextView.text = [NSString stringWithFormat: @"Name: %@",mountainItem.gage]; } DetailMapController.h #import <UIKit/UIKit.h> #import "MapKit/Mapkit.h" #import "DetailViewController.h" @interface DetailMapController : UIViewController <MKMapViewDelegate> { MKMapView *MyMapLocation; MountainItem *mountainItem; } @property (nonatomic, retain) IBOutlet MKMapView *MyMapLocation; @property (nonatomic, retain) MountainItem *mountainItem; @end DetailMapController.m #import "DetailMapController.h" #import "MapAnnotation.h" @implementation DetailMapController @synthesize mountainItem; @synthesize MyMapLocation; - (void)dealloc { [MyMapLocation release]; [mountainItem release]; [super dealloc]; } -(void)viewWillAppear:(BOOL)animated { [super viewWillAppear:animated]; [MyMapLocation setMapType:MKMapTypeStandard]; [MyMapLocation setZoomEnabled:YES]; [MyMapLocation setScrollEnabled:YES]; MKCoordinateRegion region = { {0.0, 0.0 }, { 0.0, 0.0 } }; region.center.latitude = [mountainItem.latitude doubleValue] ; region.center.longitude = [mountainItem.longitude doubleValue] ; //region.center.latitude = [@"36.273889" doubleValue] ; //region.center.longitude = [@"-86.816944" doubleValue] ; region.span.longitudeDelta = .001f; region.span.latitudeDelta = .001f; [MyMapLocation setRegion:region animated:YES]; [MyMapLocation setDelegate:self]; [self.MyMapLocation removeAnnotations:self.MyMapLocation.annotations]; MapAnnotation *ann = [[MapAnnotation alloc] init]; ann.title = mountainItem.name; ann.coordinate = region.center; [MyMapLocation addAnnotation:ann]; [MyMapLocation selectAnnotation:ann animated:YES]; [ann release]; } - (void)viewDidUnload { [super viewDidUnload]; // Release any retained subviews of the main view. // e.g. self.myOutlet = nil; self.MyMapLocation = nil; //self.mountainItem = nil; } When I debug in DetailMapController mountainItem is empty. Any help would be greatly helped!
3
11,539,293
07/18/2012 10:28:22
984,178
10/07/2011 14:33:31
1
1
Unsecured MySQL 'root'@'localhost' account accessed remotely?
A little background: We've just had our PBX system hacked. The server itself seems secure (no logged unauthorised access), but somehow the hackers have managed to inject a new admin user into the PBX software (FreePBX, backed by MySQL). Apache logs imply that the hackers managed to add the user without using the web interface (or any exploit in the web interface). Now, I have since discovered that MySQL was running without a root password (!!) and openly bound to the external IP address (Obviously, I have locked this down now). However, the only root level user in MySQL was `'root'@'localhost'` and `'root'@'127.0.0.1'`, both of which should only have been accessible locally. So, my question is this: **Is there a way of spoofing a connection to MySQL so that it will allow connection to the 'root'@'localhost' user from a remote IP address, WITHOUT running any other exploit locally?** For reference, the box is Centos 5 (Linux 2.6.10) running Mysql 5.0.95.
mysql
security
hacking
null
null
07/19/2012 03:02:19
off topic
Unsecured MySQL 'root'@'localhost' account accessed remotely? === A little background: We've just had our PBX system hacked. The server itself seems secure (no logged unauthorised access), but somehow the hackers have managed to inject a new admin user into the PBX software (FreePBX, backed by MySQL). Apache logs imply that the hackers managed to add the user without using the web interface (or any exploit in the web interface). Now, I have since discovered that MySQL was running without a root password (!!) and openly bound to the external IP address (Obviously, I have locked this down now). However, the only root level user in MySQL was `'root'@'localhost'` and `'root'@'127.0.0.1'`, both of which should only have been accessible locally. So, my question is this: **Is there a way of spoofing a connection to MySQL so that it will allow connection to the 'root'@'localhost' user from a remote IP address, WITHOUT running any other exploit locally?** For reference, the box is Centos 5 (Linux 2.6.10) running Mysql 5.0.95.
2
1,904,927
12/15/2009 02:54:58
176,402
09/21/2009 04:58:05
34
3
Making Flash video behave nicely in IE
So I'm trying to make Flash video work at http://skadaddlemedia.com/beta/blog/ and http://skadaddlemedia.com/beta/about/. Things are going swimmingly in Safari and Firefox. Not so in IE. I completely expect this is due to my Flash incompetence. Can anyone help me see where things are going wrong? I'm attempting different methods to input my video in each of these cases: **Working nowhere**: http://skadaddlemedia.com/beta/blog/testing/ uses the following code, served up by the WYGWAM EE extension: <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0" height="500" width="500"> <param name="loop" value="false" /> <param name="play" value="false" /> <param name="quality" value="high" /> <param name="wmode" value="transparent" /> <param name="movie" value="http://www.skadaddlemedia.com/beta/blog_uploads/SkadAnimationV2.swf" /> <embed height="500" loop="false" play="false" pluginspage="http://www.macromedia.com/go/getflashplayer" quality="high" src="http://www.skadaddlemedia.com/beta/blog_uploads/SkadAnimationV2.swf" type="application/x-shockwave-flash" width="500" wmode="transparent"></embed> </object> **Working in Safari & FF, but not IE**: This guy-http://skadaddlemedia.com/beta/blog/youtube_test/-uses some standard code found online with a YouTube video: <object width="425" height="350" class="youtube_video"> <param name="movie" value="http://www.youtube.com/v/Znc2sXhyB7I"></param> <param name="wmode" value="transparent"></param> <embed src="http://www.youtube.com/v/Znc2sXhyB7I" type="application/x-shockwave-flash" wmode="transparent" width="425" height="350"></embed></object> </object> **Working in Safari & FF, but not IE + non-working controls**: http://skadaddlemedia.com/beta/about/ uses the FLV Player plugin for ExpressionEngine. This plugin uses the swfobject.js file, so it's a bit more code than the previous examples: <script type='text/javascript'> var flashvars = { file: '/beta/swf/SkadAnimationV2.swf', image: '/beta/swf/animation_placeholder.jpg', id: '23' }; var params = { wmode: 'opaque', bgcolor: '#CCCCCC', allowfullscreen: 'true', allowscriptaccess: 'always' }; swfobject.embedSWF('/beta/swf/player.swf', 'player23','550','400', '9.0.0','expressInstall.swf', flashvars, params); </script> I know I'm missing something fundamental here, as all three examples are broken. I'm not necessarily just looking for the fix for each of these three. I'd like for your help understanding what I don't understand it, and how to understand it. Eventually, I'd like to build a template where the client could throw either an .flv or .mpeg4 or .mov at it, and voilà, but is something like this even possible, given I correct my current, idiotic Flash principles?
flash
gridview
null
null
null
null
open
Making Flash video behave nicely in IE === So I'm trying to make Flash video work at http://skadaddlemedia.com/beta/blog/ and http://skadaddlemedia.com/beta/about/. Things are going swimmingly in Safari and Firefox. Not so in IE. I completely expect this is due to my Flash incompetence. Can anyone help me see where things are going wrong? I'm attempting different methods to input my video in each of these cases: **Working nowhere**: http://skadaddlemedia.com/beta/blog/testing/ uses the following code, served up by the WYGWAM EE extension: <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0" height="500" width="500"> <param name="loop" value="false" /> <param name="play" value="false" /> <param name="quality" value="high" /> <param name="wmode" value="transparent" /> <param name="movie" value="http://www.skadaddlemedia.com/beta/blog_uploads/SkadAnimationV2.swf" /> <embed height="500" loop="false" play="false" pluginspage="http://www.macromedia.com/go/getflashplayer" quality="high" src="http://www.skadaddlemedia.com/beta/blog_uploads/SkadAnimationV2.swf" type="application/x-shockwave-flash" width="500" wmode="transparent"></embed> </object> **Working in Safari & FF, but not IE**: This guy-http://skadaddlemedia.com/beta/blog/youtube_test/-uses some standard code found online with a YouTube video: <object width="425" height="350" class="youtube_video"> <param name="movie" value="http://www.youtube.com/v/Znc2sXhyB7I"></param> <param name="wmode" value="transparent"></param> <embed src="http://www.youtube.com/v/Znc2sXhyB7I" type="application/x-shockwave-flash" wmode="transparent" width="425" height="350"></embed></object> </object> **Working in Safari & FF, but not IE + non-working controls**: http://skadaddlemedia.com/beta/about/ uses the FLV Player plugin for ExpressionEngine. This plugin uses the swfobject.js file, so it's a bit more code than the previous examples: <script type='text/javascript'> var flashvars = { file: '/beta/swf/SkadAnimationV2.swf', image: '/beta/swf/animation_placeholder.jpg', id: '23' }; var params = { wmode: 'opaque', bgcolor: '#CCCCCC', allowfullscreen: 'true', allowscriptaccess: 'always' }; swfobject.embedSWF('/beta/swf/player.swf', 'player23','550','400', '9.0.0','expressInstall.swf', flashvars, params); </script> I know I'm missing something fundamental here, as all three examples are broken. I'm not necessarily just looking for the fix for each of these three. I'd like for your help understanding what I don't understand it, and how to understand it. Eventually, I'd like to build a template where the client could throw either an .flv or .mpeg4 or .mov at it, and voilà, but is something like this even possible, given I correct my current, idiotic Flash principles?
0
9,479,804
02/28/2012 09:57:08
964,756
09/26/2011 09:34:10
143
19
How to restart a scene in cocos2d using UIViewController
I have to restart a scene created in cocos2d using a defined UIViewController. How can i do this? Please let me know how i can do this.
ios
cocos2d-iphone
null
null
null
null
open
How to restart a scene in cocos2d using UIViewController === I have to restart a scene created in cocos2d using a defined UIViewController. How can i do this? Please let me know how i can do this.
0
3,124,694
06/26/2010 16:56:06
68,571
02/19/2009 19:03:31
841
17
Pass-by-value argument in message expression is undefined
I'm developing an iPhone application and I getting that warning at method: NSNumber *latitudeValue; NSNumber *longitudeValue; [self obtainLatitude:latitudeValue longitude:longitudeValue]; The method is declared as follows: - (void) obtainLatitude:(NSNumber *)latitudeValue longitude:(NSNumber *)longitudeValue { NSNumberFormatter * f = [[NSNumberFormatter alloc] init]; [f setNumberStyle:NSNumberFormatterDecimalStyle]; latitudeValue = [f numberFromString:[latitude.text stringByReplacingOccurrencesOfString:@"," withString:@"."]]; longitudeValue = [f numberFromString:[longitude.text stringByReplacingOccurrencesOfString:@"," withString:@"."]]; [f release]; } As you can see, I'm trying to calculate `latitudeValue` and `longitudeValue` calling `obtainLatitude:longitude:` but I'm doing something wrong. How can I fix that error?
iphone
objective-c
argument-passing
null
null
null
open
Pass-by-value argument in message expression is undefined === I'm developing an iPhone application and I getting that warning at method: NSNumber *latitudeValue; NSNumber *longitudeValue; [self obtainLatitude:latitudeValue longitude:longitudeValue]; The method is declared as follows: - (void) obtainLatitude:(NSNumber *)latitudeValue longitude:(NSNumber *)longitudeValue { NSNumberFormatter * f = [[NSNumberFormatter alloc] init]; [f setNumberStyle:NSNumberFormatterDecimalStyle]; latitudeValue = [f numberFromString:[latitude.text stringByReplacingOccurrencesOfString:@"," withString:@"."]]; longitudeValue = [f numberFromString:[longitude.text stringByReplacingOccurrencesOfString:@"," withString:@"."]]; [f release]; } As you can see, I'm trying to calculate `latitudeValue` and `longitudeValue` calling `obtainLatitude:longitude:` but I'm doing something wrong. How can I fix that error?
0
10,712,233
05/23/2012 01:13:55
1,411,469
05/23/2012 01:09:40
1
0
How to write a desktop app that filters test questions according to topic
What programming language/method would be best suited to writing a desktop app that filters question types and displays a listing of those questions to view. For example, if I have a mix algebra, geometry, and calculus questions stored in the app, I should be able to select just the algebra questions to view and print. I have a little experience with python/django but I've never made a desktop app before.
application
filter
desktop
null
null
05/24/2012 03:39:24
not constructive
How to write a desktop app that filters test questions according to topic === What programming language/method would be best suited to writing a desktop app that filters question types and displays a listing of those questions to view. For example, if I have a mix algebra, geometry, and calculus questions stored in the app, I should be able to select just the algebra questions to view and print. I have a little experience with python/django but I've never made a desktop app before.
4
10,305,715
04/24/2012 20:43:32
1,019,640
10/29/2011 10:28:28
1
0
Strange error while using cudaMemcpy: cudaErrorLaunchFailure
I have a CUDA code which works like below: cpyDataGPU --> CPU while(nsteps){ cudaKernel1<<<,>>> function1(); cudaKernel2<<<,>>> } cpyDataGPU --> CPU ------------------------------ And function1 is like that: function1{ cudaKernel3<<<,>>> cudaKernel4<<<,>>> cpyNewNeedDataCPU --> GPU // Error line cudaKernel5<<<,>>> } According to [cudaMemcpy documentation][1], this function, can produce 4 differents error codes: "cudaSuccess", "cudaErrorInvalidValue", "cudaErrorInvalidDevicePointer" and "cudaErrorInvalidMemcpyDirection". However, I get the following error: "cudaErrorLaunchFailure": "An exception occurred on the device while executing a kernel. Common causes include dereferencing an invalid device pointer and accessing out of bounds shared memory. The device cannot be used untilcudaThreadExit() is called. All existing device memory allocations are invalid and must be reconstructed if the program is to continue using CUDA." Does anybody have any idea about why am I getting this error¿? What am I doing wrong¿? Does it make sense, to copy data CPU-->GPU after previous kernel callings ¿? The problem is that, I have to copy that data here at each step because it may change in each "while" step. Thaks a lot in advance!! [1]: http://www.clear.rice.edu/comp422/resources/cuda/html/group__CUDART__MEMORY_g48efa06b81cc031b2aa6fdc2e9930741.html
cuda
gpu
gpu-programming
null
null
null
open
Strange error while using cudaMemcpy: cudaErrorLaunchFailure === I have a CUDA code which works like below: cpyDataGPU --> CPU while(nsteps){ cudaKernel1<<<,>>> function1(); cudaKernel2<<<,>>> } cpyDataGPU --> CPU ------------------------------ And function1 is like that: function1{ cudaKernel3<<<,>>> cudaKernel4<<<,>>> cpyNewNeedDataCPU --> GPU // Error line cudaKernel5<<<,>>> } According to [cudaMemcpy documentation][1], this function, can produce 4 differents error codes: "cudaSuccess", "cudaErrorInvalidValue", "cudaErrorInvalidDevicePointer" and "cudaErrorInvalidMemcpyDirection". However, I get the following error: "cudaErrorLaunchFailure": "An exception occurred on the device while executing a kernel. Common causes include dereferencing an invalid device pointer and accessing out of bounds shared memory. The device cannot be used untilcudaThreadExit() is called. All existing device memory allocations are invalid and must be reconstructed if the program is to continue using CUDA." Does anybody have any idea about why am I getting this error¿? What am I doing wrong¿? Does it make sense, to copy data CPU-->GPU after previous kernel callings ¿? The problem is that, I have to copy that data here at each step because it may change in each "while" step. Thaks a lot in advance!! [1]: http://www.clear.rice.edu/comp422/resources/cuda/html/group__CUDART__MEMORY_g48efa06b81cc031b2aa6fdc2e9930741.html
0
11,660,875
07/26/2012 00:54:17
1,119,834
12/28/2011 18:40:11
8
0
peer to peer communication - latency calculation
I want to measure my c program time(in millis). the thing is that my program do p2p communication with other pc using UDP sockets. let's say I have pc1 and pc2, pc1 do stuff, then it sends data to pc2, then pc2 handle that data and some stuff with it. I want to measure the whole process time. Any ideas? Thanks.
p2p
measurement
null
null
null
07/26/2012 12:34:01
not a real question
peer to peer communication - latency calculation === I want to measure my c program time(in millis). the thing is that my program do p2p communication with other pc using UDP sockets. let's say I have pc1 and pc2, pc1 do stuff, then it sends data to pc2, then pc2 handle that data and some stuff with it. I want to measure the whole process time. Any ideas? Thanks.
1
3,809,323
09/28/2010 02:42:50
423,632
01/08/2010 19:59:17
396
21
print keyword for C# ...why not ?
My reasons for the idea/proposal are following: 1) Console.WriteXX() is possibly used more often than many keywords in C# 2) The Console as an I/O device is not going away anytime soon. 3) I cannot think of any general purpose programming language which doesn't provide the "write to console" facility in one form or another. 4) aesthetics (i.e. clean, simple, short , direct ) 5) print "Hello" ; doesn't make me think that I am typing more than whats needed. Every time I have to write Console.WritXX() ... or even read it in code , its a chore. 6) Its closer to the C/C++ family values and tradition of providing special status to the basic text based I/O 7) Its hard to conceive of a future scenario when the decision to make "print" a keyword will be regretted. 8) print as in { print "hello"; } instead of print as in { print("hello");} is unlikely to break any existing code.
c#
null
null
null
null
09/28/2010 03:31:11
not a real question
print keyword for C# ...why not ? === My reasons for the idea/proposal are following: 1) Console.WriteXX() is possibly used more often than many keywords in C# 2) The Console as an I/O device is not going away anytime soon. 3) I cannot think of any general purpose programming language which doesn't provide the "write to console" facility in one form or another. 4) aesthetics (i.e. clean, simple, short , direct ) 5) print "Hello" ; doesn't make me think that I am typing more than whats needed. Every time I have to write Console.WritXX() ... or even read it in code , its a chore. 6) Its closer to the C/C++ family values and tradition of providing special status to the basic text based I/O 7) Its hard to conceive of a future scenario when the decision to make "print" a keyword will be regretted. 8) print as in { print "hello"; } instead of print as in { print("hello");} is unlikely to break any existing code.
1
11,470,361
07/13/2012 12:18:26
1,329,052
04/12/2012 12:11:53
8
1
sametime proxy server
We are imeplementing Lotus Sametime Standard 8.5.2 IFR1 within our organization. We adopted a two box implementation approach for sametime architecture.Console server, meeting server and proxy server are planned on one box and community server on another box. We have completed console, proxy, community server implementation and tested for ST connect client, web client and mobile clients (android/ipad).We now need to implement SSL for web/mobile clients as users will be accessing outside of firewall. Kindly note that our environment does not have a DMZ zone (though a bit awkward) or reverse proxy and hence WAS sametime proxy server is directly published to internet using NATing at firewall. We need to know if SSL should be enabled only on proxy server or on all(community, console and meeting[ which we are soon going to implement]) servers which are involved. If only proxy server needs to be SSL enabled, how do we go about doing the same? Do you have any document which details step by step approach for SSL enabling sametime proxy server for web/mobile clients ?
lotus-domino
lotus
lotus-sametime
null
null
07/16/2012 02:35:05
off topic
sametime proxy server === We are imeplementing Lotus Sametime Standard 8.5.2 IFR1 within our organization. We adopted a two box implementation approach for sametime architecture.Console server, meeting server and proxy server are planned on one box and community server on another box. We have completed console, proxy, community server implementation and tested for ST connect client, web client and mobile clients (android/ipad).We now need to implement SSL for web/mobile clients as users will be accessing outside of firewall. Kindly note that our environment does not have a DMZ zone (though a bit awkward) or reverse proxy and hence WAS sametime proxy server is directly published to internet using NATing at firewall. We need to know if SSL should be enabled only on proxy server or on all(community, console and meeting[ which we are soon going to implement]) servers which are involved. If only proxy server needs to be SSL enabled, how do we go about doing the same? Do you have any document which details step by step approach for SSL enabling sametime proxy server for web/mobile clients ?
2
560,040
02/18/2009 06:26:54
46,646
12/16/2008 12:26:29
203
0
Condidtional compilation in Python
How to do conditional compilation in Python ? Is it using DEF ?
python
conditional-compilation
null
null
null
null
open
Condidtional compilation in Python === How to do conditional compilation in Python ? Is it using DEF ?
0
8,780,515
01/08/2012 19:29:14
1,135,495
01/07/2012 03:02:47
3
0
how to hide sin number when sending sms via at commands?
I need to change or hide it, is there a way to do it via at commands or doing something. thanks in advance.
text
sms
at-command
null
null
01/20/2012 00:24:55
not a real question
how to hide sin number when sending sms via at commands? === I need to change or hide it, is there a way to do it via at commands or doing something. thanks in advance.
1
11,670,921
07/26/2012 13:57:58
1,549,072
07/24/2012 14:43:26
1
0
Multiple Companies for one Developer Account?
Hi I'm in the process of developing a number of apps for a few companies. I've noticed on the App Store that when an app is published there is also a link for "more from this developer". Since the apps I am developing are completely unrelated will I have to register a seperate developer account for each App? Or am I able to set different company names/ prevent users from discovering other apps made from the same account?
ios
app-store
iphone-developer-program
null
null
07/27/2012 14:09:54
off topic
Multiple Companies for one Developer Account? === Hi I'm in the process of developing a number of apps for a few companies. I've noticed on the App Store that when an app is published there is also a link for "more from this developer". Since the apps I am developing are completely unrelated will I have to register a seperate developer account for each App? Or am I able to set different company names/ prevent users from discovering other apps made from the same account?
2
10,315,619
04/25/2012 12:28:29
1,356,150
04/25/2012 12:17:21
1
0
Dynamically add controls to form
I am having an ASP.WebSite in which I have added some form controls dynamically on aspx.cs using form1.Controls.Add( " Object of Control "); Also a have already added a button on form in aspx file using <asp:Button ID="Button1" runat="server" onclick="Button1_Click" Text="Add" UseSubmitBehavior="false" /> now when I run the program it converts the Button1 into an HTML submit button as below <input type="button" name="Button1" value="Add" onclick="javascript:__doPostBack('Button1','')" id="Button1" /> and the form tag becomes <form name="form1" method="post" action="Add1.aspx" id="form1" enctype="multipart/form-data"> when I click the Button1 it submits the form instead of calling the function on Code Behind. How am I able to call the method **Button1_Click** specified on OnClick event of Button1? Please Help.
asp.net
null
null
null
null
null
open
Dynamically add controls to form === I am having an ASP.WebSite in which I have added some form controls dynamically on aspx.cs using form1.Controls.Add( " Object of Control "); Also a have already added a button on form in aspx file using <asp:Button ID="Button1" runat="server" onclick="Button1_Click" Text="Add" UseSubmitBehavior="false" /> now when I run the program it converts the Button1 into an HTML submit button as below <input type="button" name="Button1" value="Add" onclick="javascript:__doPostBack('Button1','')" id="Button1" /> and the form tag becomes <form name="form1" method="post" action="Add1.aspx" id="form1" enctype="multipart/form-data"> when I click the Button1 it submits the form instead of calling the function on Code Behind. How am I able to call the method **Button1_Click** specified on OnClick event of Button1? Please Help.
0
10,316,849
04/25/2012 13:36:19
89,752
04/11/2009 12:32:07
1,874
20
Create custom form and custom action using Active Admin [RoR]
I'm working on an application where users can create requests for car maintenance services from a company. Users log on and create a request. The request contains details of the car that would be sent in as well as an assumption on the customers part on what the problem might be. A request can have details for one or infinite cars. There would be a table for requests and a table for cars and most importantly a car trouble table of the forms: CAR ID | DETAILS REQUEST ID|CUSTOMERID|DETAILS CAR_TROUBLE_REQUEST ID|CARID|REQUEST_ID|TROUBLE_DETAILS|PICKUPDATE|PICKUPPOINT I need to build using activeadmin a custom form and handler that would do the following: Take in basic detail of the car (check if a car by the registration number exists then use that car else make an entry and use it) Take in details of the issue facing the car. For this to work it has to make entries in three tables - now I've set up basic models for all three tables and even have the form created however using activeadmin how do I handle the submitted form? Please help!
ruby
ruby-on-rails-3
activeadmin
null
null
null
open
Create custom form and custom action using Active Admin [RoR] === I'm working on an application where users can create requests for car maintenance services from a company. Users log on and create a request. The request contains details of the car that would be sent in as well as an assumption on the customers part on what the problem might be. A request can have details for one or infinite cars. There would be a table for requests and a table for cars and most importantly a car trouble table of the forms: CAR ID | DETAILS REQUEST ID|CUSTOMERID|DETAILS CAR_TROUBLE_REQUEST ID|CARID|REQUEST_ID|TROUBLE_DETAILS|PICKUPDATE|PICKUPPOINT I need to build using activeadmin a custom form and handler that would do the following: Take in basic detail of the car (check if a car by the registration number exists then use that car else make an entry and use it) Take in details of the issue facing the car. For this to work it has to make entries in three tables - now I've set up basic models for all three tables and even have the form created however using activeadmin how do I handle the submitted form? Please help!
0
8,478,677
12/12/2011 18:00:38
858,962
07/23/2011 04:26:07
374
3
drag to trash jquery
My project is a canvas (not HTML5 element) where a user can add images, move them around, and resize them. I want to make an area of the canvas a "trash can" where images disappear when dragged to. Does anyone know how to implement this?
jquery
jquery-ui
jquery-ui-draggable
null
null
12/13/2011 17:51:33
not constructive
drag to trash jquery === My project is a canvas (not HTML5 element) where a user can add images, move them around, and resize them. I want to make an area of the canvas a "trash can" where images disappear when dragged to. Does anyone know how to implement this?
4
2,758,783
05/03/2010 14:36:12
6,264
09/13/2008 12:34:05
1,157
38
Podcasts for Clojurians?
I regularly listen to the podcasts [DotNetRocks][1] and [Software Engineering Radio][2]. Lately I have become more interested in Clojure. Are there any podcasts that target more toward the Clojure (more general FP/LISP/dynamic languages) audience? [1]: http://www.dotnetrocks.com [2]: http://www.se-radio.net/
clojure
podcast
null
null
null
09/18/2011 02:58:36
not constructive
Podcasts for Clojurians? === I regularly listen to the podcasts [DotNetRocks][1] and [Software Engineering Radio][2]. Lately I have become more interested in Clojure. Are there any podcasts that target more toward the Clojure (more general FP/LISP/dynamic languages) audience? [1]: http://www.dotnetrocks.com [2]: http://www.se-radio.net/
4
3,199,504
07/07/2010 22:48:31
88,427
04/08/2009 05:04:54
1,650
13
How should the Form.Load event be used compared to its constructor method?
When initializing properties of controls or other values related to a Form I have a tendency to switch back and forth between initializing the values in the Form's constructor and then later when the Form.Load event is evoked. What is the generally accepted usage of a Forms constructor vs it's Form.Load event? With other classes I would do all initialization in the constructor. Yet in in VS when you double click on a Form it jumps you to an event handler for the Form.Load event not the constructor. This leads me to believe that it's preferable to do all the initialization after the Load event instead of the constructor.
c#
.net
winforms
null
null
null
open
How should the Form.Load event be used compared to its constructor method? === When initializing properties of controls or other values related to a Form I have a tendency to switch back and forth between initializing the values in the Form's constructor and then later when the Form.Load event is evoked. What is the generally accepted usage of a Forms constructor vs it's Form.Load event? With other classes I would do all initialization in the constructor. Yet in in VS when you double click on a Form it jumps you to an event handler for the Form.Load event not the constructor. This leads me to believe that it's preferable to do all the initialization after the Load event instead of the constructor.
0
5,743,748
04/21/2011 11:56:36
248,848
01/12/2010 11:57:43
633
16
How do you disable the iPhone keyboard Go button when a textfield is focused inside a UIWebView?
One the screens within my app shows a UIWebView with a HTML web form. Currently when a textfield is focused and the keyboard appears a Go button is shown. Currently I have no user for the Go button and clicking it does nothing. How can this button be disabled or removed, or how can I change the keyboard that is showing in a UIWebView?
ios
iphone-sdk-4.0
uiwebview
soft-keyboard
null
null
open
How do you disable the iPhone keyboard Go button when a textfield is focused inside a UIWebView? === One the screens within my app shows a UIWebView with a HTML web form. Currently when a textfield is focused and the keyboard appears a Go button is shown. Currently I have no user for the Go button and clicking it does nothing. How can this button be disabled or removed, or how can I change the keyboard that is showing in a UIWebView?
0
3,366,959
07/29/2010 21:07:19
238,948
11/15/2008 04:36:47
1,506
41
Thread.Abort and alternatives
This is more out of personal curiosity/interest than a specific problem I'm trying to solve. Suppose you have a program that is performing some operation on user-supplied information (such as a search string) that changes as the user types it. Suppose that you want to show the user the most relevant information for what they've typed at any given time. If threads were really abortable, we could simply have one thread running based on the last-changed search string, and cancel any previous threads that were in progress. Now the generally accepted best practice for doing this today is to use a delay timer as the user types, which waits for .5 to 1 second before initiating the operation. I hope it's obvious enough that this isn't an *ideal* solution, theoretically speaking (any kind of artificial delay imposes an artificial bottleneck that can never be overcome, even if it is only 0.5 seconds). Furthermore, today's best practice goes on to state that any subsequent operations should wait for the previous one to complete before executing. In a world where we can't abort operations, this makes sense, but again, theoretically speaking this is far from ideal. Imagine the user types a single character and pauses just long enough for the operation to begin. Suppose that this operation takes 10 seconds to execute. The user is now forced to wait an unacceptable amount of time before the results of his/her query are visible. An (unideal) workaround to this would be to have multiple operations executing concurrently, presuming it is safe to do so, but this would still result in significantly reduced performance. So I'm just wondering people's thoughts on this, specific to .NET at least, and whether there are any new developments in this area since I last researched it that I should know about (parallel libraries perhaps?). I'd also be curious to know if any other languages/frameworks can handle this sort of fine-grained control of operations better than .NET can. Cheers.
.net
performance
concurrency
theory
parallel-processing
null
open
Thread.Abort and alternatives === This is more out of personal curiosity/interest than a specific problem I'm trying to solve. Suppose you have a program that is performing some operation on user-supplied information (such as a search string) that changes as the user types it. Suppose that you want to show the user the most relevant information for what they've typed at any given time. If threads were really abortable, we could simply have one thread running based on the last-changed search string, and cancel any previous threads that were in progress. Now the generally accepted best practice for doing this today is to use a delay timer as the user types, which waits for .5 to 1 second before initiating the operation. I hope it's obvious enough that this isn't an *ideal* solution, theoretically speaking (any kind of artificial delay imposes an artificial bottleneck that can never be overcome, even if it is only 0.5 seconds). Furthermore, today's best practice goes on to state that any subsequent operations should wait for the previous one to complete before executing. In a world where we can't abort operations, this makes sense, but again, theoretically speaking this is far from ideal. Imagine the user types a single character and pauses just long enough for the operation to begin. Suppose that this operation takes 10 seconds to execute. The user is now forced to wait an unacceptable amount of time before the results of his/her query are visible. An (unideal) workaround to this would be to have multiple operations executing concurrently, presuming it is safe to do so, but this would still result in significantly reduced performance. So I'm just wondering people's thoughts on this, specific to .NET at least, and whether there are any new developments in this area since I last researched it that I should know about (parallel libraries perhaps?). I'd also be curious to know if any other languages/frameworks can handle this sort of fine-grained control of operations better than .NET can. Cheers.
0
1,381,300
09/04/2009 20:06:06
143,030
07/22/2009 17:14:12
1,437
20
Do PHP array key's need to we wrapped in parenthesis?
Which one below is correct? First code has no parenthesis in the $_GET array and the second one does, I know you are supposed to have them when it is a string of text but in this case it is a variable, also what about if the key is a number? no parenthesis function arg_p($name, $default = null) { return (isset($_GET[$name])) ? $_GET[$name] : $default; } with parenthesis function arg_p($name, $default = null) { return (isset($_GET['$name'])) ? $_GET['$name'] : $default; }
php
arrays
null
null
null
null
open
Do PHP array key's need to we wrapped in parenthesis? === Which one below is correct? First code has no parenthesis in the $_GET array and the second one does, I know you are supposed to have them when it is a string of text but in this case it is a variable, also what about if the key is a number? no parenthesis function arg_p($name, $default = null) { return (isset($_GET[$name])) ? $_GET[$name] : $default; } with parenthesis function arg_p($name, $default = null) { return (isset($_GET['$name'])) ? $_GET['$name'] : $default; }
0
7,673,695
10/06/2011 11:37:42
974,372
10/01/2011 10:28:45
1
0
can we system tray alert using php or jquery or java???
I am writing a program which requires to alert the user when a particular event occurs, it can be a balloon tip, or system tray alert like skype, or antivirus alert?
php
javascript
jquery
null
null
10/06/2011 14:47:30
not a real question
can we system tray alert using php or jquery or java??? === I am writing a program which requires to alert the user when a particular event occurs, it can be a balloon tip, or system tray alert like skype, or antivirus alert?
1
10,507,562
05/08/2012 22:38:56
1,373,292
05/03/2012 18:15:36
1
0
Get "The type my_class_name must implement the inherited abstract method View.OnTouchListener.onTouch(View, MotionEvent)" error
I am trying to change the activity when the screen is tapped anywhere within the root view and face this problem when eclipse gives me "The type my_class_name must implement the inherited abstract method View.OnTouchListener.onTouch(View, MotionEvent)" error despite the fact that I've implemented it. ImoteActivity is the activity that I want to come forward on tap. public class Intro extends Activity implements OnTouchListener { @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); FrameLayout fl = (FrameLayout) findViewById(R.id.flInIntro); fl.setOnTouchListener(new OnTouchListener() { @Override public boolean onTouch(View v, MotionEvent event) { Log.v(this.toString(), "Inside on click listener for screen 2."); Intent intent = new Intent(v.getContext(), ImoteActivity.class); Log.v(this.toString(), "Intent created. Moving to start activity."); startActivity(intent); return false; } }); } main.xml <?xml version="1.0" encoding="utf-8"?> <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="vertical" android:id="@+id/flInIntro"> <ImageView android:contentDescription="@string/introimagedesc" android:id="@+id/introScreen" android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@drawable/wordmark" /> </FrameLayout> What is wrong with my implementation? I made sure that I am using 1.6
android
listener
anonymous
ontouchlistener
null
05/09/2012 00:59:00
not a real question
Get "The type my_class_name must implement the inherited abstract method View.OnTouchListener.onTouch(View, MotionEvent)" error === I am trying to change the activity when the screen is tapped anywhere within the root view and face this problem when eclipse gives me "The type my_class_name must implement the inherited abstract method View.OnTouchListener.onTouch(View, MotionEvent)" error despite the fact that I've implemented it. ImoteActivity is the activity that I want to come forward on tap. public class Intro extends Activity implements OnTouchListener { @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); FrameLayout fl = (FrameLayout) findViewById(R.id.flInIntro); fl.setOnTouchListener(new OnTouchListener() { @Override public boolean onTouch(View v, MotionEvent event) { Log.v(this.toString(), "Inside on click listener for screen 2."); Intent intent = new Intent(v.getContext(), ImoteActivity.class); Log.v(this.toString(), "Intent created. Moving to start activity."); startActivity(intent); return false; } }); } main.xml <?xml version="1.0" encoding="utf-8"?> <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="vertical" android:id="@+id/flInIntro"> <ImageView android:contentDescription="@string/introimagedesc" android:id="@+id/introScreen" android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@drawable/wordmark" /> </FrameLayout> What is wrong with my implementation? I made sure that I am using 1.6
1
359,374
12/11/2008 13:41:58
44,597
12/09/2008 13:43:38
11
5
How to assess performance of MDX in OLAP processing
I am familiar with standard practices to assess performance query or stored procedure using SQL server 2000/2005/2008. How is the best way to assess MDX performance? I assume its possible to write structurely correct but poor performance MDX queries as easily as you can with standard T-SQL? Any suggestions? FYI: I may be tasked with overhauling current data mining project that uses MS SQL analysis services and Proclarity client.
mdx
sql-server
performance
null
null
null
open
How to assess performance of MDX in OLAP processing === I am familiar with standard practices to assess performance query or stored procedure using SQL server 2000/2005/2008. How is the best way to assess MDX performance? I assume its possible to write structurely correct but poor performance MDX queries as easily as you can with standard T-SQL? Any suggestions? FYI: I may be tasked with overhauling current data mining project that uses MS SQL analysis services and Proclarity client.
0
601,399
03/02/2009 05:56:49
23,667
09/30/2008 03:58:53
709
67
Storing Visual Studio Solution with multiple projects in SVN
I am having a hard time adding a Visual Studio Solution with multiple projects to my repo. I am using VisualSVN. Here is my directory structure <pre> <code> c:\----- | ---Projects | --MyApp | ---Project1 (The solution is in this project directory) ---Project2 ---Project3 </code> </pre> When I select "MyApp" as the working copy root, nothing is added. If I select one of the project folder, only 2 are added.
visual
studio
visualsnv
null
null
null
open
Storing Visual Studio Solution with multiple projects in SVN === I am having a hard time adding a Visual Studio Solution with multiple projects to my repo. I am using VisualSVN. Here is my directory structure <pre> <code> c:\----- | ---Projects | --MyApp | ---Project1 (The solution is in this project directory) ---Project2 ---Project3 </code> </pre> When I select "MyApp" as the working copy root, nothing is added. If I select one of the project folder, only 2 are added.
0
11,641,117
07/25/2012 00:24:06
1,507,499
07/06/2012 17:56:56
1
0
When to use a java bean?
i am learning about java beans but i want to know when one needs to use them. when to avoid them? what if the java source code is only used in one place in an application - is creating a bean for it not the way to go?
java
javabeans
null
null
null
07/29/2012 01:10:23
not constructive
When to use a java bean? === i am learning about java beans but i want to know when one needs to use them. when to avoid them? what if the java source code is only used in one place in an application - is creating a bean for it not the way to go?
4
9,656,175
03/11/2012 15:18:57
1,114,155
12/24/2011 00:36:41
151
3
Passing variable with properties to argumentlist, loosing properties
$Computers = Get-QADComputer -sizelimit 5 returns a list of five computers. I loop with foreach($computer in $computers) { echo "and then I can do this $computer.name" to get only the computername from $computers. But When i try to pass it to start-job like this: Start-Job -FilePath $ScriptFile -Name $Computer.Name -ArgumentList $Computer I am unable to do a $computer.name inside $scriptfile. I have to pass it like $computer.name and call it like $args[0]. But then I loose all the other properties (I am using a bunch inside $scriptfile.) What am I not getting here? What would you call $computer? And what would you call $computer.name ? Sune:)
powershell
arguments
start-job
null
null
null
open
Passing variable with properties to argumentlist, loosing properties === $Computers = Get-QADComputer -sizelimit 5 returns a list of five computers. I loop with foreach($computer in $computers) { echo "and then I can do this $computer.name" to get only the computername from $computers. But When i try to pass it to start-job like this: Start-Job -FilePath $ScriptFile -Name $Computer.Name -ArgumentList $Computer I am unable to do a $computer.name inside $scriptfile. I have to pass it like $computer.name and call it like $args[0]. But then I loose all the other properties (I am using a bunch inside $scriptfile.) What am I not getting here? What would you call $computer? And what would you call $computer.name ? Sune:)
0
3,898,174
10/09/2010 22:39:25
243,500
01/04/2010 21:54:42
368
3
Neither ruby and nor irb can load .rb file in current directory
I'm having a really noob problem with importing files in Ruby. I'm making a Ruby app in Windows XP. All the class files for the app are in `"C:/Documents/Prgm/Surveyor_Ruby/lib"`. But when I `require` a file in another file, neither ruby nor irb can find the required file. The current directory's contents: C:\Documents\Prgm\Surveyor_Ruby\lib>dir Volume in drive C has no label. Volume Serial Number is AAAA-BBBB Directory of C:\Documents\Prgm\Surveyor_Ruby\lib 10/09/2010 06:32 PM <DIR> . 10/09/2010 06:32 PM <DIR> .. 10/08/2010 03:22 PM 5,462 main (commented).rb 10/08/2010 03:41 PM 92 question.rb 10/08/2010 09:06 PM 2,809 survey.rb 10/09/2010 06:25 PM 661 surveyor.rb 10/08/2010 01:39 PM 1,546 test.rb 5 File(s) 10,570 bytes 2 Dir(s) 40,255,045,632 bytes free Confirmation that irb is in correct directory: C:\Documents\Prgm\Surveyor_Ruby\lib>irb irb(main):001:0> Dir.pwd => "C:/Documents/Prgm/Surveyor_Ruby/lib" ...yet irb can't load survey.rb: irb(main):002:0> require 'survey' LoadError: no such file to load -- survey from <internal:lib/rubygems/custom_require>:29:in `require' from <internal:lib/rubygems/custom_require>:29:in `require' from (irb):2 from C:/Ruby192/bin/irb:12:in `<main>' Thanks for any suggestions!
ruby
import
require
irb
null
null
open
Neither ruby and nor irb can load .rb file in current directory === I'm having a really noob problem with importing files in Ruby. I'm making a Ruby app in Windows XP. All the class files for the app are in `"C:/Documents/Prgm/Surveyor_Ruby/lib"`. But when I `require` a file in another file, neither ruby nor irb can find the required file. The current directory's contents: C:\Documents\Prgm\Surveyor_Ruby\lib>dir Volume in drive C has no label. Volume Serial Number is AAAA-BBBB Directory of C:\Documents\Prgm\Surveyor_Ruby\lib 10/09/2010 06:32 PM <DIR> . 10/09/2010 06:32 PM <DIR> .. 10/08/2010 03:22 PM 5,462 main (commented).rb 10/08/2010 03:41 PM 92 question.rb 10/08/2010 09:06 PM 2,809 survey.rb 10/09/2010 06:25 PM 661 surveyor.rb 10/08/2010 01:39 PM 1,546 test.rb 5 File(s) 10,570 bytes 2 Dir(s) 40,255,045,632 bytes free Confirmation that irb is in correct directory: C:\Documents\Prgm\Surveyor_Ruby\lib>irb irb(main):001:0> Dir.pwd => "C:/Documents/Prgm/Surveyor_Ruby/lib" ...yet irb can't load survey.rb: irb(main):002:0> require 'survey' LoadError: no such file to load -- survey from <internal:lib/rubygems/custom_require>:29:in `require' from <internal:lib/rubygems/custom_require>:29:in `require' from (irb):2 from C:/Ruby192/bin/irb:12:in `<main>' Thanks for any suggestions!
0
3,396,392
08/03/2010 12:25:33
255,875
01/21/2010 14:34:12
274
15
What C# language features help you to reduce lines of code and improve readability?
I came across a C# language feature today courtesy of ReSharper, the ?? operator. This helped make the code even more concise than my initial attempt. See below for iteration in improving lines/length/readability of code. A first attempt could be something like.. if (usersEmail == null) userName = firstName; else userName = usersEmail; Refactored to.. userName = usersEmail == null ? firstName : usersEmail; Initially I thought the above would be the most efficient/concise version, but there is a third step... userName = usersEmail ?? firstName; Id like to know if you have any similar examples where C# language features help with reducing lines of code and improving readability?
c#
resharper
language-features
code-readability
null
08/03/2010 12:45:57
not constructive
What C# language features help you to reduce lines of code and improve readability? === I came across a C# language feature today courtesy of ReSharper, the ?? operator. This helped make the code even more concise than my initial attempt. See below for iteration in improving lines/length/readability of code. A first attempt could be something like.. if (usersEmail == null) userName = firstName; else userName = usersEmail; Refactored to.. userName = usersEmail == null ? firstName : usersEmail; Initially I thought the above would be the most efficient/concise version, but there is a third step... userName = usersEmail ?? firstName; Id like to know if you have any similar examples where C# language features help with reducing lines of code and improving readability?
4
4,117,413
11/07/2010 10:59:49
56,524
01/18/2009 23:46:41
2,619
291
What is the future of WPF and silverlight ? Why are there two different ui toolkits ?
Will WPF die out and be replaced by a silverlight that continues to be improved ? What is the direction of bothh ...i am asking as i have heard of MS possibly dumping WPF primarily because of percieved or actual performance impact on the snappyness etc of the UI.
wpf
null
null
null
null
11/08/2010 00:15:21
not constructive
What is the future of WPF and silverlight ? Why are there two different ui toolkits ? === Will WPF die out and be replaced by a silverlight that continues to be improved ? What is the direction of bothh ...i am asking as i have heard of MS possibly dumping WPF primarily because of percieved or actual performance impact on the snappyness etc of the UI.
4
7,281,658
09/02/2011 09:40:08
138,980
07/15/2009 20:19:35
381
1
Prolog; a question about notation in an assignment
I get hat isa/2 is a rule, that takes two objects or terms. But what would isa2/2 imply? That isa is defined twice?
prolog
computer-science
null
null
null
null
open
Prolog; a question about notation in an assignment === I get hat isa/2 is a rule, that takes two objects or terms. But what would isa2/2 imply? That isa is defined twice?
0
4,092,812
11/04/2010 00:09:22
358,892
06/04/2010 21:52:48
72
0
best tool to validate an XSD on ubuntu linux
What is the best tool for XSD validation on ubuntu / linux?
linux
validation
ubuntu
xsd
xml-schema
09/07/2011 22:30:49
not constructive
best tool to validate an XSD on ubuntu linux === What is the best tool for XSD validation on ubuntu / linux?
4
6,995,082
08/09/2011 10:56:03
533,565
12/07/2010 11:13:00
25
4
Return View with form data
I have the below controller. I return the view if a error occurs but the form data is lost. Would anyone have a idea how I could return the form data with the view? [AcceptVerbs(HttpVerbs.Post)] public ActionResult Register(FormCollection collection) { string usrname = collection["UserName"]; string email = collection["Email"]; string password = collection["Password"]; string serial = collection["Serial"]; ViewData["PasswordLength"] = MembershipService.MinPasswordLength; // In a real app, actually register the user now if (ValidateRegistration(usrname, email, password, password)) { // Attempt to register the user MembershipCreateStatus createStatus = MembershipService.CreateUser(usrname, password, email, serial); if (createStatus == MembershipCreateStatus.Success) { //TODO userinformation datacontext.SaveChanges(); FormsAuth.SignIn(collection["UserName"], false /* createPersistentCookie */); return RedirectToAction("Index", "Home"); } else { ModelState.AddModelError("_FORM", ErrorCodeToString(createStatus)); //I would like to return the view with the form data return View(); } }
asp.net-mvc
asp.net-mvc-3
null
null
null
null
open
Return View with form data === I have the below controller. I return the view if a error occurs but the form data is lost. Would anyone have a idea how I could return the form data with the view? [AcceptVerbs(HttpVerbs.Post)] public ActionResult Register(FormCollection collection) { string usrname = collection["UserName"]; string email = collection["Email"]; string password = collection["Password"]; string serial = collection["Serial"]; ViewData["PasswordLength"] = MembershipService.MinPasswordLength; // In a real app, actually register the user now if (ValidateRegistration(usrname, email, password, password)) { // Attempt to register the user MembershipCreateStatus createStatus = MembershipService.CreateUser(usrname, password, email, serial); if (createStatus == MembershipCreateStatus.Success) { //TODO userinformation datacontext.SaveChanges(); FormsAuth.SignIn(collection["UserName"], false /* createPersistentCookie */); return RedirectToAction("Index", "Home"); } else { ModelState.AddModelError("_FORM", ErrorCodeToString(createStatus)); //I would like to return the view with the form data return View(); } }
0
8,659,783
12/28/2011 18:32:13
1,007,723
10/21/2011 19:13:03
31
7
Using my Google credentials to login to my Windows 7 PC
Ill admint, I know almost nothing about how windows login system works, but I was wondering if it was possible to set windows up to use my Google Login to login to my desktop. (Kind of like how domain logins work in "work" environments)
google
windows-7
google-login
null
null
12/28/2011 18:35:46
off topic
Using my Google credentials to login to my Windows 7 PC === Ill admint, I know almost nothing about how windows login system works, but I was wondering if it was possible to set windows up to use my Google Login to login to my desktop. (Kind of like how domain logins work in "work" environments)
2
9,981,541
04/02/2012 18:12:39
852,573
07/19/2011 17:55:39
1
0
Ghostscript 9.05 and 9.06 having issue with images on Sun platform
When I display certain PDF files with the gs command (SUN OS - GPL Ghostscript GIT PRERELEASE 9.06 and 9.05 from 02-08-2012), the images are rendered fuzzy and the background and foreground colors are reversed. This did not happen with the SUN 8.70 version or the 9.05 pre-release version we got back in November. We first noticed the issue with the 9.05 version released on 02-08-2012. Then, to see if it had been fixed, we installed the 9.06 pre-release version master last week, but the problem was still there. This only happens with the SUN versions. The Linux versions do not seem to have this issue. I have reported this issue to the GhostScript http://bugs.ghostscript.com/show_bug.cgi?id=692962 - there is an example file attached to this bug. Unfortunately, GhostScript does not seem to have a SUN box to test on and cannot duplicate the problem. If anyone out there has this issue and/or a possible solution, please let me know. You can respond to norris.george@yahoo.com or george.norris@baesystems.com Here is our SUN platform information in more detail: SunOS 5.10 Generic_141414-10 sun4u sparc SUNW,Netra-440
image
ghostscript
sun
null
null
04/02/2012 19:39:46
off topic
Ghostscript 9.05 and 9.06 having issue with images on Sun platform === When I display certain PDF files with the gs command (SUN OS - GPL Ghostscript GIT PRERELEASE 9.06 and 9.05 from 02-08-2012), the images are rendered fuzzy and the background and foreground colors are reversed. This did not happen with the SUN 8.70 version or the 9.05 pre-release version we got back in November. We first noticed the issue with the 9.05 version released on 02-08-2012. Then, to see if it had been fixed, we installed the 9.06 pre-release version master last week, but the problem was still there. This only happens with the SUN versions. The Linux versions do not seem to have this issue. I have reported this issue to the GhostScript http://bugs.ghostscript.com/show_bug.cgi?id=692962 - there is an example file attached to this bug. Unfortunately, GhostScript does not seem to have a SUN box to test on and cannot duplicate the problem. If anyone out there has this issue and/or a possible solution, please let me know. You can respond to norris.george@yahoo.com or george.norris@baesystems.com Here is our SUN platform information in more detail: SunOS 5.10 Generic_141414-10 sun4u sparc SUNW,Netra-440
2
5,326,958
03/16/2011 14:46:34
414,911
08/09/2010 09:39:14
1,209
64
Reflection: Assembly.GetExportedTypes requires all assemblies to be present
I want to analyze assemblies using reflection. Specifically, **I want to find out, if a certain interface is implemented in a type in the assembly.** Not all references of the assembly are present on the machine though, this is why I need to analyze them. So when I call GetTypes or GetExportedTypes, a **FileNotFoundException** is thrown, telling me that a **referenced assembly cannot be loaded**. This is true, but still **I want to know what types are implemented in this assembly**. Reflector can do it somehow. How can this be done?
c#
.net
reflection
assembly
null
null
open
Reflection: Assembly.GetExportedTypes requires all assemblies to be present === I want to analyze assemblies using reflection. Specifically, **I want to find out, if a certain interface is implemented in a type in the assembly.** Not all references of the assembly are present on the machine though, this is why I need to analyze them. So when I call GetTypes or GetExportedTypes, a **FileNotFoundException** is thrown, telling me that a **referenced assembly cannot be loaded**. This is true, but still **I want to know what types are implemented in this assembly**. Reflector can do it somehow. How can this be done?
0
7,625,461
10/02/2011 09:00:03
799,597
06/15/2011 12:47:03
6
0
Is there a way to get a quotations database?
I'm quite fond of reading quotations(context: Auguste Rodin, Mark Twain, linux fortune app) and wanted to make a small app for strict personal use which would help me search a quote from a database. Now, I obviously need a database of quotations for that : any ideas as to if its possible to get one? I do not like that idea of having to go online every time for a quote, which is why I want to have this as a personal resource where I can quickly look up a quote when, where and how I want. I would be writing this in python or dojo. But the real magic would of course be the database!
python
database
quotations
personal-project
research-resources
10/02/2011 11:58:05
off topic
Is there a way to get a quotations database? === I'm quite fond of reading quotations(context: Auguste Rodin, Mark Twain, linux fortune app) and wanted to make a small app for strict personal use which would help me search a quote from a database. Now, I obviously need a database of quotations for that : any ideas as to if its possible to get one? I do not like that idea of having to go online every time for a quote, which is why I want to have this as a personal resource where I can quickly look up a quote when, where and how I want. I would be writing this in python or dojo. But the real magic would of course be the database!
2
10,245,032
04/20/2012 11:06:22
1,085,605
12/07/2011 12:35:17
16
0
URL rewrite, remove .html
I know you guys know this one...we have a website, unfortunately all the URL's have the .html sufix, its a magento installation, magento allows you to change this on the cms, but again, unfortunately all this urls with .html sufix have a good ranking in google. We need to redirect to non ".html" . So, consider the following scenario, we are rebuilding this site from scracth, so we have the same urls on the new site but without the .html sufix. > Now is: www.mysite.de/cool-shoes.html > > will be: www.mysite.de/cool-shoes So www.mysite.de/cool-shoes.html will not exist anymore, and I've been trying a redirect with the .htaccess with no luck. I've tried so far: RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /.*\.html\ HTTP/ RewriteRule (.*)index\.html$ /$1 [R=301,L] and: RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME}\.html -f RewriteRule ^(.*)$ $1.html but it doesnt seem to work...any ideas?
.htaccess
magento
url-rewriting
null
null
null
open
URL rewrite, remove .html === I know you guys know this one...we have a website, unfortunately all the URL's have the .html sufix, its a magento installation, magento allows you to change this on the cms, but again, unfortunately all this urls with .html sufix have a good ranking in google. We need to redirect to non ".html" . So, consider the following scenario, we are rebuilding this site from scracth, so we have the same urls on the new site but without the .html sufix. > Now is: www.mysite.de/cool-shoes.html > > will be: www.mysite.de/cool-shoes So www.mysite.de/cool-shoes.html will not exist anymore, and I've been trying a redirect with the .htaccess with no luck. I've tried so far: RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /.*\.html\ HTTP/ RewriteRule (.*)index\.html$ /$1 [R=301,L] and: RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME}\.html -f RewriteRule ^(.*)$ $1.html but it doesnt seem to work...any ideas?
0
3,483,852
08/14/2010 14:50:48
131,246
06/30/2009 18:26:10
200
21
Which programming language is easier to support
Which programming language is it easier to support developers in (namely developers that have little professional experience (i.e. dealing with changes out of their control)).
programming-languages
professional-development
null
null
null
08/16/2010 13:39:57
not constructive
Which programming language is easier to support === Which programming language is it easier to support developers in (namely developers that have little professional experience (i.e. dealing with changes out of their control)).
4
7,116,532
08/19/2011 03:07:30
634,380
02/25/2011 15:25:33
121
10
PHP shows blank pages
I am using Apache on Ubuntu, and every PHP page shows nothing. However, other files, such as images are displayed normally. What should I do?
php
apache
null
null
null
08/19/2011 07:18:24
off topic
PHP shows blank pages === I am using Apache on Ubuntu, and every PHP page shows nothing. However, other files, such as images are displayed normally. What should I do?
2
149,040
09/29/2008 14:55:55
22,306
09/25/2008 18:06:06
36
0
Is there a way to define which fields in the model are editable in the admin app?
Assume the following: *models.py* class Entry(models.Model): title = models.CharField(max_length=50) slug = models.CharField(max_length=50, unique=True) body = models.CharField(max_length=200) *admin.py* class EntryAdmin(admin.ModelAdmin): prepopulated_fields = {'slug':('title',)} I want the slug to be pre-populated by the title, but I dont want the user to be able to edit it from the admin. I assumed that adding the fields=[] to the admin object and not including the slug would have worked, but it didnt. I also tried setting editable=False in the model, but that also didnt work (infact, stops the page from rendering). Thoughts?
python
django
null
null
null
null
open
Is there a way to define which fields in the model are editable in the admin app? === Assume the following: *models.py* class Entry(models.Model): title = models.CharField(max_length=50) slug = models.CharField(max_length=50, unique=True) body = models.CharField(max_length=200) *admin.py* class EntryAdmin(admin.ModelAdmin): prepopulated_fields = {'slug':('title',)} I want the slug to be pre-populated by the title, but I dont want the user to be able to edit it from the admin. I assumed that adding the fields=[] to the admin object and not including the slug would have worked, but it didnt. I also tried setting editable=False in the model, but that also didnt work (infact, stops the page from rendering). Thoughts?
0
5,350,910
03/18/2011 10:51:08
663,878
03/17/2011 07:34:09
8
0
colour picker in html
I want to implement colour picker event in my html design, please try to help me for this design and try to send example
color-picker
null
null
null
null
null
open
colour picker in html === I want to implement colour picker event in my html design, please try to help me for this design and try to send example
0
10,854,805
06/01/2012 17:26:42
1,352,749
04/24/2012 03:29:25
109
0
engineering cad software
Does anyone have a list of free engineering CAD software where you can design electronics as well as mechanical devices? I have found a few decent sources in Google Sketchup, FreeCAD, BRL-CAD. But I wanted to get some other opinion. Hopefully the CAD software is compatible with Python and even C++.
c++
python
electronics
cad
engineering
06/01/2012 18:14:12
off topic
engineering cad software === Does anyone have a list of free engineering CAD software where you can design electronics as well as mechanical devices? I have found a few decent sources in Google Sketchup, FreeCAD, BRL-CAD. But I wanted to get some other opinion. Hopefully the CAD software is compatible with Python and even C++.
2
4,597,715
01/04/2011 19:48:40
436,389
08/31/2010 21:21:50
28
1
I don't understand what is going on
<pre> #include<stdio.h> #include<conio.H> void main() { int a,b,c,d,e,f,g,i,h; float p; char A[10]; clrscr(); printf("Enter the name\n"); gets(A); printf("Enter the ENG marks\n"); scanf("%d",&a); printf("Enter the HIN marks\n"); scanf("%d",&b); printf("Enter the MAR marks\n"); scanf("%d",&c); printf("Enter the MAT marks\n"); scanf("%d",&d); printf("Enter the SCI marks\n"); scanf("%d",&e); printf("Enter the S.S marks\n"); scanf("%d",&f); g=a+b+c+d+e+f; <b>p=(g*100)/600;</b> printf("NAME\t ENG\t HIN\t MAR\t MAT\t SCI\t S.S\t TOTAL\t PERCENTAGE\n"); printf("%s\t %d\t %d\t %d\t %d\t %d\t %d\t %d\t %f\n",A,a,b,c,d,e,f,g,p); getch(); }</pre> In the mentioned code every think is working fine but the code which i have marked bold in not working
c
null
null
null
null
01/05/2011 00:48:54
not a real question
I don't understand what is going on === <pre> #include<stdio.h> #include<conio.H> void main() { int a,b,c,d,e,f,g,i,h; float p; char A[10]; clrscr(); printf("Enter the name\n"); gets(A); printf("Enter the ENG marks\n"); scanf("%d",&a); printf("Enter the HIN marks\n"); scanf("%d",&b); printf("Enter the MAR marks\n"); scanf("%d",&c); printf("Enter the MAT marks\n"); scanf("%d",&d); printf("Enter the SCI marks\n"); scanf("%d",&e); printf("Enter the S.S marks\n"); scanf("%d",&f); g=a+b+c+d+e+f; <b>p=(g*100)/600;</b> printf("NAME\t ENG\t HIN\t MAR\t MAT\t SCI\t S.S\t TOTAL\t PERCENTAGE\n"); printf("%s\t %d\t %d\t %d\t %d\t %d\t %d\t %d\t %f\n",A,a,b,c,d,e,f,g,p); getch(); }</pre> In the mentioned code every think is working fine but the code which i have marked bold in not working
1
6,008,813
05/15/2011 13:57:41
239,522
12/28/2009 11:20:47
240
0
Question regarding C argument promotions
Alright actually I've study about how to use looping to make my code more efficient so that I could use a particular block of code that should be repeated without typing it over and over again , and after attempted to use what I've learn so far to program something , I feel it's time for me to proceed to the next chapter to learn on how to use control statement to learn how to instructs the program to make decision. But the thing is that , before i advance myself to it , i still have a few question that need any expert's help on previous stuff.Actually it's about datatype. <b>A.)Character Type</b> 1.) I extract the following italize sentences from the book C primer Plus 5th ed. <i>Somewhat oddly , C treats character constans as type `int` rather than `char`.For example on an ASCII system with a 32-bit `int and an 8-bit `char` , the code char grade = 'B'; represent 'B' as the numerical value 66 stored in a 32-bit unit , `grade` winds up with 66 stored ub ab 8-bit unit.This characteristic of character constants makes it possible to define a character constant such as `'FATE'` , with four separate 8-bit ASCII codes stored in a 32-bit unit.However , attempting to assign such a character constant to a `char` variable results in only the last 8 bits being used , so the variable gets the value 'E'.</i> <br /> 2.) So the next thing i did after reading this was of course , follow what it mentions , that is i try store the word `FATE` on a variable with char type name `grade` and try to compile and see what it'll be stored using `printf()` , but instead of getting the character `'E'` printed out , what I get is `'F'`. 3.)Does this mean there's some mistake in the book??OR there's someting i misunderstood?? 4.)From the above sentences , there's a line says C treats character constants as type `int`.So to try it out , i assign a number bigger than 255 , let's say 356 to the `char` type. 5.)Since 356 is within the range of 32-bit `int`(i'm running windows 7) , therefore i expect it would print out 356 when i use `%d` specifier. 6.)But instead of printing 356 , it gives me 100 , which is the last 8-bits value. 7.)Why this happen??I thought `char` == `int` == 32-bits??(**Although it does mention before char is only a byte). <br /> <br /> <br /> <b>B.)Int and Floating Type</b> 1.)I understand when a number stores in variable in `short` type is pass to variadic function or any implicit prototype function ,it'll be automatically promoted to `int` type. 2.)This also happen to floating point type , when a floating-point number with `float` type is passed , it'll be converted to `double` type , that is why there's no specifier for the `float` type but instead there's only `%f` for `double and `%Lf` for long double. 3.)But why there's a specifier for `short` type although it is also promoted but not `float` type??Why don't they just give a specifier for `float` type with a modifier like `%hf` or something??Is there anything logical or technical behind this?? <br/> <br /> Throughout the guidance of stackoverflow communities , I started to learn more , so i wanted to say thanks from the bottom of my heart to you guys.
c
types
specifier
null
null
05/16/2011 03:58:24
not a real question
Question regarding C argument promotions === Alright actually I've study about how to use looping to make my code more efficient so that I could use a particular block of code that should be repeated without typing it over and over again , and after attempted to use what I've learn so far to program something , I feel it's time for me to proceed to the next chapter to learn on how to use control statement to learn how to instructs the program to make decision. But the thing is that , before i advance myself to it , i still have a few question that need any expert's help on previous stuff.Actually it's about datatype. <b>A.)Character Type</b> 1.) I extract the following italize sentences from the book C primer Plus 5th ed. <i>Somewhat oddly , C treats character constans as type `int` rather than `char`.For example on an ASCII system with a 32-bit `int and an 8-bit `char` , the code char grade = 'B'; represent 'B' as the numerical value 66 stored in a 32-bit unit , `grade` winds up with 66 stored ub ab 8-bit unit.This characteristic of character constants makes it possible to define a character constant such as `'FATE'` , with four separate 8-bit ASCII codes stored in a 32-bit unit.However , attempting to assign such a character constant to a `char` variable results in only the last 8 bits being used , so the variable gets the value 'E'.</i> <br /> 2.) So the next thing i did after reading this was of course , follow what it mentions , that is i try store the word `FATE` on a variable with char type name `grade` and try to compile and see what it'll be stored using `printf()` , but instead of getting the character `'E'` printed out , what I get is `'F'`. 3.)Does this mean there's some mistake in the book??OR there's someting i misunderstood?? 4.)From the above sentences , there's a line says C treats character constants as type `int`.So to try it out , i assign a number bigger than 255 , let's say 356 to the `char` type. 5.)Since 356 is within the range of 32-bit `int`(i'm running windows 7) , therefore i expect it would print out 356 when i use `%d` specifier. 6.)But instead of printing 356 , it gives me 100 , which is the last 8-bits value. 7.)Why this happen??I thought `char` == `int` == 32-bits??(**Although it does mention before char is only a byte). <br /> <br /> <br /> <b>B.)Int and Floating Type</b> 1.)I understand when a number stores in variable in `short` type is pass to variadic function or any implicit prototype function ,it'll be automatically promoted to `int` type. 2.)This also happen to floating point type , when a floating-point number with `float` type is passed , it'll be converted to `double` type , that is why there's no specifier for the `float` type but instead there's only `%f` for `double and `%Lf` for long double. 3.)But why there's a specifier for `short` type although it is also promoted but not `float` type??Why don't they just give a specifier for `float` type with a modifier like `%hf` or something??Is there anything logical or technical behind this?? <br/> <br /> Throughout the guidance of stackoverflow communities , I started to learn more , so i wanted to say thanks from the bottom of my heart to you guys.
1
8,928,041
01/19/2012 14:48:06
1,151,391
01/16/2012 07:31:42
8
0
VB.NET Barcode Questions a
Can anyone help me, its a sales and inventory system which uses barcode technology. How can i make my own barcode generator? and how can i save and retrieve image file in my database?(mysql) I also want to know how to print receipts? THANK YOU,
vb.net
barcode
barcode-scanner
barcode-printing
null
01/29/2012 14:06:25
not a real question
VB.NET Barcode Questions a === Can anyone help me, its a sales and inventory system which uses barcode technology. How can i make my own barcode generator? and how can i save and retrieve image file in my database?(mysql) I also want to know how to print receipts? THANK YOU,
1
2,599,566
04/08/2010 11:58:33
149,438
08/02/2009 23:38:29
27
0
Autofac: Reference from a SingleInstance'd type to a HttpRequestScoped
I've got an application where a shared object needs a reference to a per-request object. <pre> Shared: Engine | Per Req: IExtensions() | Request </pre> If i try to inject the `IExtensions` directly into the constructor of `Engine`, even as `Lazy(Of IExtension)`, I get a "No scope matching [Request] is visible from the scope in which the instance was requested." exception when it tries to instantiate each `IExtension`. How can I create a HttpRequestScoped instance and then inject it into a shared instance? Would it be considered good practice to set it in the `Request`'s factory (and therefore inject `Engine` into `RequestFactory`)?
autofac
scope
asp.net
null
null
null
open
Autofac: Reference from a SingleInstance'd type to a HttpRequestScoped === I've got an application where a shared object needs a reference to a per-request object. <pre> Shared: Engine | Per Req: IExtensions() | Request </pre> If i try to inject the `IExtensions` directly into the constructor of `Engine`, even as `Lazy(Of IExtension)`, I get a "No scope matching [Request] is visible from the scope in which the instance was requested." exception when it tries to instantiate each `IExtension`. How can I create a HttpRequestScoped instance and then inject it into a shared instance? Would it be considered good practice to set it in the `Request`'s factory (and therefore inject `Engine` into `RequestFactory`)?
0
5,470,199
03/29/2011 09:09:52
666,705
03/18/2011 21:02:14
34
2
FastMM: Total Allocated Memory
How could I get the total amount of memory, that allocated by FastMM? I've tried that: function GetTotalAllocatedMemory: Cardinal; var MMState: TMemoryManagerState; begin GetMemoryManagerState(MMState); Result := MMState.TotalAllocatedMediumBlockSize + MMState.TotalAllocatedLargeBlockSize; end; Is it correct? Anyways it returns something strange. It 5 times less than a value which I can see in Windows task manager. I believe that the amount of memory allocated by a Delphi application equals FastMM allocated memory plus some system overhead. Am I wrong?
delphi
memory-management
fastmm
null
null
null
open
FastMM: Total Allocated Memory === How could I get the total amount of memory, that allocated by FastMM? I've tried that: function GetTotalAllocatedMemory: Cardinal; var MMState: TMemoryManagerState; begin GetMemoryManagerState(MMState); Result := MMState.TotalAllocatedMediumBlockSize + MMState.TotalAllocatedLargeBlockSize; end; Is it correct? Anyways it returns something strange. It 5 times less than a value which I can see in Windows task manager. I believe that the amount of memory allocated by a Delphi application equals FastMM allocated memory plus some system overhead. Am I wrong?
0
9,479,807
02/28/2012 09:57:12
1,237,556
02/28/2012 09:44:36
1
0
Get all images from any url in php?
I have input type text for url on my website. By posting value of this url field, i want to fetch all possible images (if present) from that particular url as this happens in http://facebook.com at update status textarea. So what will be the code for this in php? Thanks.
php
php5
null
null
null
02/28/2012 11:46:58
not a real question
Get all images from any url in php? === I have input type text for url on my website. By posting value of this url field, i want to fetch all possible images (if present) from that particular url as this happens in http://facebook.com at update status textarea. So what will be the code for this in php? Thanks.
1
972,602
06/09/2009 21:28:04
115,711
06/02/2009 00:24:44
58
0
AT&T vs Intel Syntax and Limitations?
To me, Intel syntax is much easier to read. If I go traipsing through assembly forest concentrating only on Intel syntax, will I miss anything? Is there any reason I would want to switch to AT&T (outside of being able to read others' AT&T assembly)? My first clue is that gdb uses AT&T by default. If this matters, my focus is only on any relation assembly and syntax may have to Linux/BSD and the C language.
linux
bsd
c
assembly
null
04/01/2012 03:38:54
not constructive
AT&T vs Intel Syntax and Limitations? === To me, Intel syntax is much easier to read. If I go traipsing through assembly forest concentrating only on Intel syntax, will I miss anything? Is there any reason I would want to switch to AT&T (outside of being able to read others' AT&T assembly)? My first clue is that gdb uses AT&T by default. If this matters, my focus is only on any relation assembly and syntax may have to Linux/BSD and the C language.
4
589,441
02/26/2009 06:55:29
3,661
08/29/2008 18:16:14
827
37
Absolutely position element in the middle of the screen after scrolling
my page is 2x the height of the screen (size varies depending on other item on the page). i want to show an absolutely positioned SPAN in the middle of the screen regardless of scroll position. i apply the following style on button click, however if i scroll all the way down, the element shows up at the very top of the page since it counts the 50% from the top of the entire page. .Centered { width:100%; position:absolute; top:50%; left:45%; } how do i position the element in the middle of the page based on the scroll potion at the time of a button click? Thank you.
css
absolute-positioning
jquery
null
null
null
open
Absolutely position element in the middle of the screen after scrolling === my page is 2x the height of the screen (size varies depending on other item on the page). i want to show an absolutely positioned SPAN in the middle of the screen regardless of scroll position. i apply the following style on button click, however if i scroll all the way down, the element shows up at the very top of the page since it counts the 50% from the top of the entire page. .Centered { width:100%; position:absolute; top:50%; left:45%; } how do i position the element in the middle of the page based on the scroll potion at the time of a button click? Thank you.
0
4,745
08/07/2008 14:12:29
194
08/03/2008 10:56:49
130
15
ASP.NET MVC - Is it worth it yet?
For any of you that have used ASP.NET MVC (especially the Stack Overflow team), do you think it's worth taking the plunge with a technology that's still in "Preview" releases, not even Beta yet? From what I've seen on the MVC site and various blogs, it seems that a lot is still in flux, making it so that upgrading to the latest MVC version would likely require a lot of code changes. Compared to WebForms, is it worth getting the MVC model at the expense of likely having to do re-writes later just to comply with the latest version? I ask this especially in terms of doing something that will be used, not just if I should try it out.
asp.netmvc
mvc
asp.net
null
null
05/10/2010 13:15:24
too localized
ASP.NET MVC - Is it worth it yet? === For any of you that have used ASP.NET MVC (especially the Stack Overflow team), do you think it's worth taking the plunge with a technology that's still in "Preview" releases, not even Beta yet? From what I've seen on the MVC site and various blogs, it seems that a lot is still in flux, making it so that upgrading to the latest MVC version would likely require a lot of code changes. Compared to WebForms, is it worth getting the MVC model at the expense of likely having to do re-writes later just to comply with the latest version? I ask this especially in terms of doing something that will be used, not just if I should try it out.
3
3,308,031
07/22/2010 10:52:17
28,855
10/17/2008 09:16:08
1,064
37
Blogs about software QA and/or testing?
There are [lots of well known programming and development blogs][1], but could someone recommend some refference blogs about software quality assurance and/or testing? [1]: http://stackoverflow.com/questions/78955/what-are-the-best-programming-and-development-related-blogs
testing
blogs
recommendation
qa
software-quality
06/26/2012 15:32:13
not constructive
Blogs about software QA and/or testing? === There are [lots of well known programming and development blogs][1], but could someone recommend some refference blogs about software quality assurance and/or testing? [1]: http://stackoverflow.com/questions/78955/what-are-the-best-programming-and-development-related-blogs
4
11,709,732
07/29/2012 13:46:26
1,558,443
07/27/2012 18:11:35
11
0
erros showing in logcat
07-29 19:11:58.559: D/AndroidRuntime(306): Shutting down VM 07-29 19:11:58.569: W/dalvikvm(306): threadid=1: thread exiting with uncaught exception (group=0x4001d800) 07-29 19:11:58.589: E/AndroidRuntime(306): FATAL EXCEPTION: main 07-29 19:11:58.589: E/AndroidRuntime(306): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.first.demo/com.first.demo.MainActivity}: java.lang.NullPointerException 07-29 19:11:58.589: E/AndroidRuntime(306): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2663) 07-29 19:11:58.589: E/AndroidRuntime(306): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679) 07-29 19:11:58.589: E/AndroidRuntime(306): at android.app.ActivityThread.access$2300(ActivityThread.java:125) 07-29 19:11:58.589: E/AndroidRuntime(306): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033) 07-29 19:11:58.589: E/AndroidRuntime(306): at android.os.Handler.dispatchMessage(Handler.java:99) 07-29 19:11:58.589: E/AndroidRuntime(306): at android.os.Looper.loop(Looper.java:123) 07-29 19:11:58.589: E/AndroidRuntime(306): at android.app.ActivityThread.main(ActivityThread.java:4627) 07-29 19:11:58.589: E/AndroidRuntime(306): at java.lang.reflect.Method.invokeNative(Native Method) 07-29 19:11:58.589: E/AndroidRuntime(306): at java.lang.reflect.Method.invoke(Method.java:521) 07-29 19:11:58.589: E/AndroidRuntime(306): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868) 07-29 19:11:58.589: E/AndroidRuntime(306): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626) 07-29 19:11:58.589: E/AndroidRuntime(306): at dalvik.system.NativeStart.main(Native Method) 07-29 19:11:58.589: E/AndroidRuntime(306): Caused by: java.lang.NullPointerException 07-29 19:11:58.589: E/AndroidRuntime(306): at com.first.demo.MainActivity.onCreate(MainActivity.java:67) 07-29 19:11:58.589: E/AndroidRuntime(306): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047) 07-29 19:11:58.589: E/AndroidRuntime(306): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2627) 07-29 19:11:58.589: E/AndroidRuntime(306): ... 11 more 07-29 19:12:03.389: I/Process(306): Sending signal. PID: 306 SIG: 9 07-29 19:14:09.539: D/AndroidRuntime(319): Shutting down VM 07-29 19:14:09.539: W/dalvikvm(319): threadid=1: thread exiting with uncaught exception (group=0x4001d800) 07-29 19:14:09.559: E/AndroidRuntime(319): FATAL EXCEPTION: main 07-29 19:14:09.559: E/AndroidRuntime(319): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.first.demo/com.first.demo.MainActivity}: java.lang.NullPointerException 07-29 19:14:09.559: E/AndroidRuntime(319): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2663) 07-29 19:14:09.559: E/AndroidRuntime(319): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679) 07-29 19:14:09.559: E/AndroidRuntime(319): at android.app.ActivityThread.access$2300(ActivityThread.java:125) 07-29 19:14:09.559: E/AndroidRuntime(319): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033) 07-29 19:14:09.559: E/AndroidRuntime(319): at android.os.Handler.dispatchMessage(Handler.java:99) 07-29 19:14:09.559: E/AndroidRuntime(319): at android.os.Looper.loop(Looper.java:123) 07-29 19:14:09.559: E/AndroidRuntime(319): at android.app.ActivityThread.main(ActivityThread.java:4627) 07-29 19:14:09.559: E/AndroidRuntime(319): at java.lang.reflect.Method.invokeNative(Native Method) 07-29 19:14:09.559: E/AndroidRuntime(319): at java.lang.reflect.Method.invoke(Method.java:521) 07-29 19:14:09.559: E/AndroidRuntime(319): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868) 07-29 19:14:09.559: E/AndroidRuntime(319): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626) 07-29 19:14:09.559: E/AndroidRuntime(319): at dalvik.system.NativeStart.main(Native Method) 07-29 19:14:09.559: E/AndroidRuntime(319): Caused by: java.lang.NullPointerException 07-29 19:14:09.559: E/AndroidRuntime(319): at com.first.demo.MainActivity.onCreate(MainActivity.java:67) 07-29 19:14:09.559: E/AndroidRuntime(319): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047) 07-29 19:14:09.559: E/AndroidRuntime(319): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2627) 07-29 19:14:09.559: E/AndroidRuntime(319): ... 11 more 07-29 19:14:15.169: I/Process(319): Sending signal. PID: 319 SIG: 9
android
null
null
null
null
07/29/2012 14:06:13
not a real question
erros showing in logcat === 07-29 19:11:58.559: D/AndroidRuntime(306): Shutting down VM 07-29 19:11:58.569: W/dalvikvm(306): threadid=1: thread exiting with uncaught exception (group=0x4001d800) 07-29 19:11:58.589: E/AndroidRuntime(306): FATAL EXCEPTION: main 07-29 19:11:58.589: E/AndroidRuntime(306): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.first.demo/com.first.demo.MainActivity}: java.lang.NullPointerException 07-29 19:11:58.589: E/AndroidRuntime(306): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2663) 07-29 19:11:58.589: E/AndroidRuntime(306): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679) 07-29 19:11:58.589: E/AndroidRuntime(306): at android.app.ActivityThread.access$2300(ActivityThread.java:125) 07-29 19:11:58.589: E/AndroidRuntime(306): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033) 07-29 19:11:58.589: E/AndroidRuntime(306): at android.os.Handler.dispatchMessage(Handler.java:99) 07-29 19:11:58.589: E/AndroidRuntime(306): at android.os.Looper.loop(Looper.java:123) 07-29 19:11:58.589: E/AndroidRuntime(306): at android.app.ActivityThread.main(ActivityThread.java:4627) 07-29 19:11:58.589: E/AndroidRuntime(306): at java.lang.reflect.Method.invokeNative(Native Method) 07-29 19:11:58.589: E/AndroidRuntime(306): at java.lang.reflect.Method.invoke(Method.java:521) 07-29 19:11:58.589: E/AndroidRuntime(306): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868) 07-29 19:11:58.589: E/AndroidRuntime(306): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626) 07-29 19:11:58.589: E/AndroidRuntime(306): at dalvik.system.NativeStart.main(Native Method) 07-29 19:11:58.589: E/AndroidRuntime(306): Caused by: java.lang.NullPointerException 07-29 19:11:58.589: E/AndroidRuntime(306): at com.first.demo.MainActivity.onCreate(MainActivity.java:67) 07-29 19:11:58.589: E/AndroidRuntime(306): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047) 07-29 19:11:58.589: E/AndroidRuntime(306): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2627) 07-29 19:11:58.589: E/AndroidRuntime(306): ... 11 more 07-29 19:12:03.389: I/Process(306): Sending signal. PID: 306 SIG: 9 07-29 19:14:09.539: D/AndroidRuntime(319): Shutting down VM 07-29 19:14:09.539: W/dalvikvm(319): threadid=1: thread exiting with uncaught exception (group=0x4001d800) 07-29 19:14:09.559: E/AndroidRuntime(319): FATAL EXCEPTION: main 07-29 19:14:09.559: E/AndroidRuntime(319): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.first.demo/com.first.demo.MainActivity}: java.lang.NullPointerException 07-29 19:14:09.559: E/AndroidRuntime(319): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2663) 07-29 19:14:09.559: E/AndroidRuntime(319): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679) 07-29 19:14:09.559: E/AndroidRuntime(319): at android.app.ActivityThread.access$2300(ActivityThread.java:125) 07-29 19:14:09.559: E/AndroidRuntime(319): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033) 07-29 19:14:09.559: E/AndroidRuntime(319): at android.os.Handler.dispatchMessage(Handler.java:99) 07-29 19:14:09.559: E/AndroidRuntime(319): at android.os.Looper.loop(Looper.java:123) 07-29 19:14:09.559: E/AndroidRuntime(319): at android.app.ActivityThread.main(ActivityThread.java:4627) 07-29 19:14:09.559: E/AndroidRuntime(319): at java.lang.reflect.Method.invokeNative(Native Method) 07-29 19:14:09.559: E/AndroidRuntime(319): at java.lang.reflect.Method.invoke(Method.java:521) 07-29 19:14:09.559: E/AndroidRuntime(319): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868) 07-29 19:14:09.559: E/AndroidRuntime(319): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626) 07-29 19:14:09.559: E/AndroidRuntime(319): at dalvik.system.NativeStart.main(Native Method) 07-29 19:14:09.559: E/AndroidRuntime(319): Caused by: java.lang.NullPointerException 07-29 19:14:09.559: E/AndroidRuntime(319): at com.first.demo.MainActivity.onCreate(MainActivity.java:67) 07-29 19:14:09.559: E/AndroidRuntime(319): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047) 07-29 19:14:09.559: E/AndroidRuntime(319): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2627) 07-29 19:14:09.559: E/AndroidRuntime(319): ... 11 more 07-29 19:14:15.169: I/Process(319): Sending signal. PID: 319 SIG: 9
1
2,854,727
05/18/2010 05:26:46
120,322
06/10/2009 05:54:55
75
1
Handle jQuery slider when min and max are same in values
I am using [link text][1] for implementing slider in my application, but it throws exception when the min and max values are equal. How can I handle such situation, any help on it? Thanks Ashwani [1]: http://docs.jquery.com/UI/Slider
jquery
slider
null
null
null
null
open
Handle jQuery slider when min and max are same in values === I am using [link text][1] for implementing slider in my application, but it throws exception when the min and max values are equal. How can I handle such situation, any help on it? Thanks Ashwani [1]: http://docs.jquery.com/UI/Slider
0
11,040,200
06/14/2012 19:40:08
978,392
10/04/2011 12:09:45
38
2
executeAsync vs. executeStep for SELECT COUNT statements
I'm literally trying all the day to make firefox to obey will... I want : `int c = SELECT COUNT(*) FROM ...` I tried `executeAsync({...});`, but i believe the it's the wrong paradigm, as i want the result immediately?! (And results in `mozIStoragePendingStatement` errors) var count = 0; var conn = Services.storage.openDatabase(dbfile); // Will also create the file if it does not exist let statement = conn.createStatement("SELECT COUNT(*) FROM edges LIMIT 42;"); console.log("columns: " + statement.columnCount); // prints "1"; console.log("col name:" + statement.getColumnName(0)); // is "COUNT(*)" while (statement.executeStep()) count = statement.row.getResultByIndex(0); // "illegal value" count = statement.row.getString(0); // "illegal value", too count = statement.row.COUNT(*); // hahaha. still not working count = statement.row[0]; // hahaha. "undefinded" count = statement.row[1]; // hahaha. "undefinded" } statement.reset(); It basically works but i dont get the value. Whats wrong with all the statements (those within the loop). And yes, im noob, and yes, i have basically not really a clue... So, thanks for any hint...
javascript
sqlite
firefox-addon
storage
null
null
open
executeAsync vs. executeStep for SELECT COUNT statements === I'm literally trying all the day to make firefox to obey will... I want : `int c = SELECT COUNT(*) FROM ...` I tried `executeAsync({...});`, but i believe the it's the wrong paradigm, as i want the result immediately?! (And results in `mozIStoragePendingStatement` errors) var count = 0; var conn = Services.storage.openDatabase(dbfile); // Will also create the file if it does not exist let statement = conn.createStatement("SELECT COUNT(*) FROM edges LIMIT 42;"); console.log("columns: " + statement.columnCount); // prints "1"; console.log("col name:" + statement.getColumnName(0)); // is "COUNT(*)" while (statement.executeStep()) count = statement.row.getResultByIndex(0); // "illegal value" count = statement.row.getString(0); // "illegal value", too count = statement.row.COUNT(*); // hahaha. still not working count = statement.row[0]; // hahaha. "undefinded" count = statement.row[1]; // hahaha. "undefinded" } statement.reset(); It basically works but i dont get the value. Whats wrong with all the statements (those within the loop). And yes, im noob, and yes, i have basically not really a clue... So, thanks for any hint...
0
10,430,096
05/03/2012 11:06:15
1,348,702
04/21/2012 19:14:57
23
0
Vector adding a element
Can we perform this operation on vector ? Vector object = (Vector) listUserEvents.get(key); object.addElement(eCompare); I have no instance here
java
vector
null
null
null
05/03/2012 18:46:24
not a real question
Vector adding a element === Can we perform this operation on vector ? Vector object = (Vector) listUserEvents.get(key); object.addElement(eCompare); I have no instance here
1
10,577,224
05/14/2012 03:31:49
800,882
06/16/2011 05:52:32
1
0
Importance of coursera.org courses such algorithm, Computer Visions for an android/Iphone developer?
I have been developing mobile apps(android and iPhone both) for few months now and I want to know how important it is to have strong understanding of core subjects such as algorithm, image processing, cryptography in order to be a great developer. These course are offered for free on coursera.org. Would these be beneficial if my goal is to master the mobile application development. I have worked on small projects at this point which doesn't require the use of complex algorithms, or any other core subjects. At this point I am little confused, whether I should join the coursera.org online courses to broaden my perspective or I should focus more on objective-c/iosSDK and java/androidSdk to improve my programming skills.
android
iphone
null
null
null
05/14/2012 06:15:37
not constructive
Importance of coursera.org courses such algorithm, Computer Visions for an android/Iphone developer? === I have been developing mobile apps(android and iPhone both) for few months now and I want to know how important it is to have strong understanding of core subjects such as algorithm, image processing, cryptography in order to be a great developer. These course are offered for free on coursera.org. Would these be beneficial if my goal is to master the mobile application development. I have worked on small projects at this point which doesn't require the use of complex algorithms, or any other core subjects. At this point I am little confused, whether I should join the coursera.org online courses to broaden my perspective or I should focus more on objective-c/iosSDK and java/androidSdk to improve my programming skills.
4
8,983,192
01/24/2012 07:09:48
265,103
01/16/2010 09:00:37
662
10
What is add in for sharepoint designer workflow?
I am new to sharepoint. Can you please explain with example what is add in for sharepoint designer workflow and how to build it ? Can you please provide me any code or useful link? Can we be able to loop through a list using a SPD workflow ?
c#
sharepoint
workflow
null
null
01/25/2012 13:40:44
not a real question
What is add in for sharepoint designer workflow? === I am new to sharepoint. Can you please explain with example what is add in for sharepoint designer workflow and how to build it ? Can you please provide me any code or useful link? Can we be able to loop through a list using a SPD workflow ?
1
7,353,118
09/08/2011 19:01:42
880,524
08/05/2011 12:05:51
1
1
Install Android on a device
Can anybody tell me whether it's possible to install android on a tablet pc? E.g. I've got gm10 android tablet pc with android 2.2 on it. It works not so good. E.g.: I can't even log in skype. I can't even install apps from android market. I can't view flash, i can't, i can't. Hardware seems to be well supported. So, my questions: Is there any chance to get it working fine? Is it possible to install android 2.3 or android 3.* on it? Will it support the hardware? Where can i get needed drivers? Can I get them from the currently installed android 2.2? Can I make it forget my e-mail address? Where is android.git.kernel.org? I can't get access to it. (i have another tablet pc as well and i want to install new android on it as well, so it is a common question)
android
install
tablet
tablet-pc
null
09/08/2011 19:59:25
off topic
Install Android on a device === Can anybody tell me whether it's possible to install android on a tablet pc? E.g. I've got gm10 android tablet pc with android 2.2 on it. It works not so good. E.g.: I can't even log in skype. I can't even install apps from android market. I can't view flash, i can't, i can't. Hardware seems to be well supported. So, my questions: Is there any chance to get it working fine? Is it possible to install android 2.3 or android 3.* on it? Will it support the hardware? Where can i get needed drivers? Can I get them from the currently installed android 2.2? Can I make it forget my e-mail address? Where is android.git.kernel.org? I can't get access to it. (i have another tablet pc as well and i want to install new android on it as well, so it is a common question)
2
9,981,797
04/02/2012 18:29:54
1,308,737
04/02/2012 18:23:23
1
0
How to build Android apk with Eclipse using HTML5, CSS, JavaScript?
I met a tool called Sencha Touch 2. She works with HTML5, CSS, and JavaScript. Except that I do not know how to create the apk file to install on your phone, or pro Iphone app. Someone tell me if the own Sencha Touch 2 creates this apk file or if I have to enter the application in Eclipse and create HTML5? thank you
android
html5
sencha-touch-2
null
null
04/06/2012 20:10:13
not a real question
How to build Android apk with Eclipse using HTML5, CSS, JavaScript? === I met a tool called Sencha Touch 2. She works with HTML5, CSS, and JavaScript. Except that I do not know how to create the apk file to install on your phone, or pro Iphone app. Someone tell me if the own Sencha Touch 2 creates this apk file or if I have to enter the application in Eclipse and create HTML5? thank you
1
5,565,470
04/06/2011 11:19:19
154,448
08/11/2009 15:23:29
170
8
How to implement critical section in Azure
**How do I implement critical section across multiple instances in Azure?** We are implementing a payment system on Azure. When ever account balance is updated in the SQL-azure, we need to make sure that the value is 100% correct. But we have multiple webroles running, thus they would be able to service two requests concurrently from different customers, that would potentially update current balance for one single product. Thus both instances may read the old amount from database at the same time, then both add the purchase to the old value and the both store the new amount in the database. Who ever saves first will have it's change overwritten. :-( Thus we need to implement a critical section around all updates to account balance in the database. But how to do that in Azure? Guides suggest to use Azure storage queues for inter process communication. :-) They ensure that the message does not get deleted from the queue until it has been processed. Even if a process crash, then we are sure that the message will be processed by the next process. (as Azure guarantee to launch a new process if something hang) I thought about running a singleton worker role to service requests on the queue. But Azure does not guarantee good uptime when you don't run minimum two instances in parallel. Also when I deploy new versions to Azure, I would have to stop the running instance before I can start a new one. Our application cannot accept that the "critical section worker role" does not process messages on the queue within 2 seconds. Thus we would need multiple worker roles to guarantee sufficient small down time. In which case we are back to the same problem of implementing critical sections across multiple instances in Azure. Note: If update transaction has not completed before 2 seconds, then we should role it back and start over. Any idea how to implement critical section across instances in Azure would be deeply appreciated.
multithreading
azure
queue
null
null
null
open
How to implement critical section in Azure === **How do I implement critical section across multiple instances in Azure?** We are implementing a payment system on Azure. When ever account balance is updated in the SQL-azure, we need to make sure that the value is 100% correct. But we have multiple webroles running, thus they would be able to service two requests concurrently from different customers, that would potentially update current balance for one single product. Thus both instances may read the old amount from database at the same time, then both add the purchase to the old value and the both store the new amount in the database. Who ever saves first will have it's change overwritten. :-( Thus we need to implement a critical section around all updates to account balance in the database. But how to do that in Azure? Guides suggest to use Azure storage queues for inter process communication. :-) They ensure that the message does not get deleted from the queue until it has been processed. Even if a process crash, then we are sure that the message will be processed by the next process. (as Azure guarantee to launch a new process if something hang) I thought about running a singleton worker role to service requests on the queue. But Azure does not guarantee good uptime when you don't run minimum two instances in parallel. Also when I deploy new versions to Azure, I would have to stop the running instance before I can start a new one. Our application cannot accept that the "critical section worker role" does not process messages on the queue within 2 seconds. Thus we would need multiple worker roles to guarantee sufficient small down time. In which case we are back to the same problem of implementing critical sections across multiple instances in Azure. Note: If update transaction has not completed before 2 seconds, then we should role it back and start over. Any idea how to implement critical section across instances in Azure would be deeply appreciated.
0
7,219,277
08/28/2011 05:44:13
283,271
02/28/2010 21:49:16
137
1
Strange behavior of bitwise NOT (~)
How do I explain the following behavior? #include<iostream> using namespace std; int main(){ unsigned char a = 8; cerr << "a: " << (int)a << '\n'; unsigned char b = (~a) >> 6; cerr << "b: " << (int)b << '\n'; unsigned char c = (~a); c = c >> 6; cerr << "c: " << (int)c << '\n'; return 0; } Output: a: 8 b: 255 c: 3 After further testing it seems that `(~a)` becomes an `int` rather than `unsigned char`. This is why the `1`'s get shifted in. What's going on? EDIT: My compiler is just standard gcc 4.1.2
c
types
bitwise
null
null
null
open
Strange behavior of bitwise NOT (~) === How do I explain the following behavior? #include<iostream> using namespace std; int main(){ unsigned char a = 8; cerr << "a: " << (int)a << '\n'; unsigned char b = (~a) >> 6; cerr << "b: " << (int)b << '\n'; unsigned char c = (~a); c = c >> 6; cerr << "c: " << (int)c << '\n'; return 0; } Output: a: 8 b: 255 c: 3 After further testing it seems that `(~a)` becomes an `int` rather than `unsigned char`. This is why the `1`'s get shifted in. What's going on? EDIT: My compiler is just standard gcc 4.1.2
0
2,055,190
01/13/2010 07:52:07
230,320
12/12/2009 15:15:37
6
0
Java applet dont run on my local machine
I'm writing my own java applet that can write to /tmp on my local unix machine. this applet is only going to run on a html page, inside my machine only. No server involve. But when I try to open my page inside the firefox, the applet seems dont work at all. I dont understand why, since all the .class, .html and .jar files are on the same directory. Need help.
java-applet
null
null
null
null
null
open
Java applet dont run on my local machine === I'm writing my own java applet that can write to /tmp on my local unix machine. this applet is only going to run on a html page, inside my machine only. No server involve. But when I try to open my page inside the firefox, the applet seems dont work at all. I dont understand why, since all the .class, .html and .jar files are on the same directory. Need help.
0
6,320,425
06/12/2011 05:53:53
784,543
06/05/2011 07:20:06
30
0
how know how many page php is running right now !!
i open 100 page of p.php by fsocket and want to know how many of that is open right now and not finished yet !(or if run>0 return 1 else return 0) 1. how can know that!? 2. its possible ?:D
php
null
null
null
null
06/12/2011 13:58:31
not a real question
how know how many page php is running right now !! === i open 100 page of p.php by fsocket and want to know how many of that is open right now and not finished yet !(or if run>0 return 1 else return 0) 1. how can know that!? 2. its possible ?:D
1
4,710,520
01/17/2011 06:24:41
578,141
01/17/2011 06:24:41
1
0
How do I crop an image pulled from the Facebook API for display on a website?
I'm using JavaScript and the Facebook Graph API to pull random profile images to a website I'm working on, like so: var image_src = "http://graph.facebook.com/"+newId+"/picture?type=large" However, some of the pictures I'm receiving are very tall. I need to regulate the height by cropping so that images over 350px are removed. The images that are pulled are housed in a DIV like so: <div id = "right-guy"></div> I've tried giving the DIV a max-height in CSS, but that doesn't seem to work. I then tried the CSS "clip" function: #right-guy { margin: 0; padding: 50px 30px; position: absolute; clip:rect(20px,20px,20px,20px); overflow: hidden; } But from what I can tell, clip only works on images and not DIV's as a whole, because nothing is happening. Is there a) a way for me to reference the image in CSS despite the fact that the image is not static and is randomly pulled, OR b) crop the DIV once its contents go past a maximum height?
css
image
facebook
facebook-graph-api
crop
null
open
How do I crop an image pulled from the Facebook API for display on a website? === I'm using JavaScript and the Facebook Graph API to pull random profile images to a website I'm working on, like so: var image_src = "http://graph.facebook.com/"+newId+"/picture?type=large" However, some of the pictures I'm receiving are very tall. I need to regulate the height by cropping so that images over 350px are removed. The images that are pulled are housed in a DIV like so: <div id = "right-guy"></div> I've tried giving the DIV a max-height in CSS, but that doesn't seem to work. I then tried the CSS "clip" function: #right-guy { margin: 0; padding: 50px 30px; position: absolute; clip:rect(20px,20px,20px,20px); overflow: hidden; } But from what I can tell, clip only works on images and not DIV's as a whole, because nothing is happening. Is there a) a way for me to reference the image in CSS despite the fact that the image is not static and is randomly pulled, OR b) crop the DIV once its contents go past a maximum height?
0
10,000,880
04/03/2012 20:27:47
937,703
09/09/2011 23:34:13
26
2
How to run a WCF console app from within a windows service
I want to be able to run console apps as a service without the extra effort of creating an installer. Over a period of years I have maintained a set of window services that do database functions. I am not revamping the services and I am reviewing the prior strategy for several reasons. The main one is the complexity and lack of documentation on how to create/install and uninstall a windows service. As the code-base of the service changes you would expect to be able to re-install a new version of the same service. But after some bad experiences I have found myself turning off the service, replacing the files and restarting it. Because the re-install process is very unreliable. And on occasion you will find yourself with a service that is neither fully installed nor fully uninstalled, and it has to be forcefully removed via registry edits. What I would like to do this time around is install a service wrapper that won't ever change, which in turn invokes a console application. I could potentially even invoke more than one console apps depending on the situation. After some research I found this question [here in stackoverflow](http://stackoverflow.com/questions/1369236/how-to-run-console-application-from-windows-service). Which I don't think resolves the issue of creating windows services. I also found [srvany.exe](http://support.microsoft.com/kb/137890) which is a really old solution by microsoft. And [RunAsService](http://runasservice.com/) which I would like to get some experiences from before running it on the servers, since I can't find the code-base. But the features of RunAsService do seem close to what I would like to have even if I end up developing one myself for sake of security. I just want to easily deploy my service application. Does anyone have some wise words of advise?
windows-services
installer
windows-installer
console-application
uninstall
05/06/2012 19:55:33
off topic
How to run a WCF console app from within a windows service === I want to be able to run console apps as a service without the extra effort of creating an installer. Over a period of years I have maintained a set of window services that do database functions. I am not revamping the services and I am reviewing the prior strategy for several reasons. The main one is the complexity and lack of documentation on how to create/install and uninstall a windows service. As the code-base of the service changes you would expect to be able to re-install a new version of the same service. But after some bad experiences I have found myself turning off the service, replacing the files and restarting it. Because the re-install process is very unreliable. And on occasion you will find yourself with a service that is neither fully installed nor fully uninstalled, and it has to be forcefully removed via registry edits. What I would like to do this time around is install a service wrapper that won't ever change, which in turn invokes a console application. I could potentially even invoke more than one console apps depending on the situation. After some research I found this question [here in stackoverflow](http://stackoverflow.com/questions/1369236/how-to-run-console-application-from-windows-service). Which I don't think resolves the issue of creating windows services. I also found [srvany.exe](http://support.microsoft.com/kb/137890) which is a really old solution by microsoft. And [RunAsService](http://runasservice.com/) which I would like to get some experiences from before running it on the servers, since I can't find the code-base. But the features of RunAsService do seem close to what I would like to have even if I end up developing one myself for sake of security. I just want to easily deploy my service application. Does anyone have some wise words of advise?
2
8,161,261
11/17/2011 02:10:21
1,050,856
11/17/2011 02:01:58
1
0
best fit / global maximum algorithm
I need to create an algorithm that can figure the best-fit combination of any number of A,B,C for the following final values: { x: 31, y: 40, z: 15 } Constraints: A = { x: 5, y: 2, z: 1 } B = { x: 4, y: 8, z: 3 } C = { x: 6, y: 5, z: 4 } Any tips? Thanks!
algorithm
null
null
null
null
11/17/2011 21:26:42
not a real question
best fit / global maximum algorithm === I need to create an algorithm that can figure the best-fit combination of any number of A,B,C for the following final values: { x: 31, y: 40, z: 15 } Constraints: A = { x: 5, y: 2, z: 1 } B = { x: 4, y: 8, z: 3 } C = { x: 6, y: 5, z: 4 } Any tips? Thanks!
1
7,707,258
10/09/2011 23:23:16
986,861
10/09/2011 23:12:33
1
0
Will Apple reject my iOS app (app enterprise) which uses ONE UIwebkit to show just one page information?
Will Apple reject my iOS app (app enterprise) which uses ONE UIwebkit to show just one page information? I`m developing an application of a firm, and i have some buttons doing different things. One i`ll open the Maps aplication. Another will leave application, to enter in facebook for safari. Another use webkit to access a page from youtube. ... and have one which will open a website link, to show some things the site update everyday. It`s that possible to do? Will Apple reject? thanks!
ios
website
webkit
apple
rejection
10/10/2011 05:02:39
off topic
Will Apple reject my iOS app (app enterprise) which uses ONE UIwebkit to show just one page information? === Will Apple reject my iOS app (app enterprise) which uses ONE UIwebkit to show just one page information? I`m developing an application of a firm, and i have some buttons doing different things. One i`ll open the Maps aplication. Another will leave application, to enter in facebook for safari. Another use webkit to access a page from youtube. ... and have one which will open a website link, to show some things the site update everyday. It`s that possible to do? Will Apple reject? thanks!
2
9,335,988
02/17/2012 21:54:23
1,217,172
02/17/2012 21:14:13
1
0
40TB+ of data storage and processing
Our engineers work with 10+TB data sets (video), and need a centralized storage solution that can hold 40TB data and scale. We have two macs and two windows machines we need to mount iSCSI/AOE volumes on, and then archive 40+TB of data. We are considering rolling our own solution, primarily because of cost issues. A central storage server running linux so we have a choice of SAN/NAS options. Something like [this with 5+ PCI slots](http://www.siliconmechanics.com/i36487/2U-storage-server.php) Then we can add storage in increments of 27TB (11 disk RAID6 + hotspare, 3TB drives) for $6-7000 with [a SAS chasis like this](http://www.rackmountnet.com/bay-sas-jbod-dual-expanders-and-500w-redundant-power-supply-p-3931.html) This gives us the ability to scale to 100+TB for under $35k, which is 1/3 of the cost we're looking at for a solution from Dell, EMC, Sun or HP Has anyone taken this approach? If so what are the hidden pitfalls, besides lack of vendor support? What other approaches should we consider?
data
backup
storage
null
null
02/18/2012 00:19:34
off topic
40TB+ of data storage and processing === Our engineers work with 10+TB data sets (video), and need a centralized storage solution that can hold 40TB data and scale. We have two macs and two windows machines we need to mount iSCSI/AOE volumes on, and then archive 40+TB of data. We are considering rolling our own solution, primarily because of cost issues. A central storage server running linux so we have a choice of SAN/NAS options. Something like [this with 5+ PCI slots](http://www.siliconmechanics.com/i36487/2U-storage-server.php) Then we can add storage in increments of 27TB (11 disk RAID6 + hotspare, 3TB drives) for $6-7000 with [a SAS chasis like this](http://www.rackmountnet.com/bay-sas-jbod-dual-expanders-and-500w-redundant-power-supply-p-3931.html) This gives us the ability to scale to 100+TB for under $35k, which is 1/3 of the cost we're looking at for a solution from Dell, EMC, Sun or HP Has anyone taken this approach? If so what are the hidden pitfalls, besides lack of vendor support? What other approaches should we consider?
2
4,484,544
12/19/2010 18:53:28
117,642
06/04/2009 20:46:10
1,481
45
How do I perform a dynamic Django queryset update?
I have the following model: class Book(models.Model): title = models.CharField(max_length=100) quantity = models.IntegerField() in_stock = models.BooleanField() I have a form which allows me to update the quantity and stock of multiple selected books: Quantity: In Stock: List of Books: 1. Eat Pray and Love 2. Twilight In my views, I can update a querylist of Books like the following: quantity = form.cleaned_data['quantity'] in_stock = form.cleaned_data['in_stock'] if quantity: selected_books.update(quantity=quantity) if in_stock: selected_books.update(in_stock=in_stock) I am basically doing a batch update only if the field has been entered. The above requires 2 separate sql update statements. Is there a way to call use a single sql statement regardless of the number of entered fields?
django
null
null
null
null
null
open
How do I perform a dynamic Django queryset update? === I have the following model: class Book(models.Model): title = models.CharField(max_length=100) quantity = models.IntegerField() in_stock = models.BooleanField() I have a form which allows me to update the quantity and stock of multiple selected books: Quantity: In Stock: List of Books: 1. Eat Pray and Love 2. Twilight In my views, I can update a querylist of Books like the following: quantity = form.cleaned_data['quantity'] in_stock = form.cleaned_data['in_stock'] if quantity: selected_books.update(quantity=quantity) if in_stock: selected_books.update(in_stock=in_stock) I am basically doing a batch update only if the field has been entered. The above requires 2 separate sql update statements. Is there a way to call use a single sql statement regardless of the number of entered fields?
0
8,877,678
01/16/2012 09:05:36
421,642
08/16/2010 11:04:23
71
11
Open Source Java libraries for PDF to text conversion
Is there another good tool for converting a PDF format into a text file (or word)? something that will give me bullet, numbering, title ,sub-titles, etc.? If you know about something that is not for free, but is really good - it is still relevant! thanks!
pdf
text
null
null
null
05/13/2012 17:03:45
not constructive
Open Source Java libraries for PDF to text conversion === Is there another good tool for converting a PDF format into a text file (or word)? something that will give me bullet, numbering, title ,sub-titles, etc.? If you know about something that is not for free, but is really good - it is still relevant! thanks!
4
11,660,394
07/25/2012 23:50:20
1,553,099
07/25/2012 23:38:49
1
0
HOW TO USE IPHONE WITH USB CONNECT TO PC SSH
I know we can use itunnel to forward the device port on PC port. And than PC can ssh iphone. But my question is, can iphone use ssh connect to PC (ALSO WITH USB CONNECTION)? HOW TO DO THAT.
iphone
ios
ssh
usb
connect
07/25/2012 23:53:41
off topic
HOW TO USE IPHONE WITH USB CONNECT TO PC SSH === I know we can use itunnel to forward the device port on PC port. And than PC can ssh iphone. But my question is, can iphone use ssh connect to PC (ALSO WITH USB CONNECTION)? HOW TO DO THAT.
2
9,037,036
01/27/2012 16:53:13
1,173,951
01/27/2012 16:41:42
1
0
Linear regression in java
I have a java code that performs a linear regression on a set of data using the gaussjordan elimination. It calculates a linear, quadratic and cubic functions using the least squares method. My problem is choosing a function out of the three that best models my data. This is ofcourse, without plotting the curve. Thanks
java
gaussian
linear-regression
least-squares
null
01/28/2012 14:30:40
off topic
Linear regression in java === I have a java code that performs a linear regression on a set of data using the gaussjordan elimination. It calculates a linear, quadratic and cubic functions using the least squares method. My problem is choosing a function out of the three that best models my data. This is ofcourse, without plotting the curve. Thanks
2
5,501,968
03/31/2011 15:03:37
301,032
03/24/2010 17:01:40
384
4
storing and retrieving json objects to / from a cookie
Im attempting to store json objects in a cookie, but im running into a few problems. I can create my object like this: product = { "name" : "prodname", "quantity" : 4 } i then save this object in my cookie. As more products are added (its a shopping basket) i add further strings by appending new objects onto the end of the cookie string (so i essentially have lots of small seperate objects) . Im having trouble getting the objects back out of the cookie string though. Both `$.parseJSON` and `eval` fail when i attempt to read the objects back from the cookie. Any help would be appreciated.
javascript
json
cookies
null
null
null
open
storing and retrieving json objects to / from a cookie === Im attempting to store json objects in a cookie, but im running into a few problems. I can create my object like this: product = { "name" : "prodname", "quantity" : 4 } i then save this object in my cookie. As more products are added (its a shopping basket) i add further strings by appending new objects onto the end of the cookie string (so i essentially have lots of small seperate objects) . Im having trouble getting the objects back out of the cookie string though. Both `$.parseJSON` and `eval` fail when i attempt to read the objects back from the cookie. Any help would be appreciated.
0
7,108,176
08/18/2011 13:27:53
701,033
04/10/2011 16:54:07
310
1
Is there an Application that I can view Wikipedia offline?
I'm finding that I need access to wikipedia a lot when I'm offline and was wondering if there was an app that I could use to browse it offline? I would only require articles in English. I realise this may take up a lot of space but that's okay :) Requirements: Runs on Mac OS X Thanks
osx
wiki
offline
wikipedia
osx-lion
08/19/2011 05:58:29
off topic
Is there an Application that I can view Wikipedia offline? === I'm finding that I need access to wikipedia a lot when I'm offline and was wondering if there was an app that I could use to browse it offline? I would only require articles in English. I realise this may take up a lot of space but that's okay :) Requirements: Runs on Mac OS X Thanks
2
6,523,976
06/29/2011 16:24:59
827,279
06/25/2011 15:42:10
24
3
What exactly is artificial intelligence?
What exactly is artificial intelligence? How to create artificial intelligence? What you need to know to create artificial intelligence?
artificial-intelligence
null
null
null
null
06/29/2011 17:00:31
off topic
What exactly is artificial intelligence? === What exactly is artificial intelligence? How to create artificial intelligence? What you need to know to create artificial intelligence?
2
7,850,850
10/21/2011 14:25:11
648,574
03/07/2011 17:33:32
196
4
What is the buisness reason the MaxDateTime is 12/31/9998 23:59:59
http://msdn.microsoft.com/en-us/library/system.windows.forms.datetimepicker.maxdate.aspx http://msdn.microsoft.com/en-us/library/system.windows.forms.datetimepicker.maxdatetime.aspx This value seems arbitrary when no explanation is provided. Why isn't this just DateTime.MaxValue?
c#
wpf
null
null
null
10/22/2011 07:28:11
off topic
What is the buisness reason the MaxDateTime is 12/31/9998 23:59:59 === http://msdn.microsoft.com/en-us/library/system.windows.forms.datetimepicker.maxdate.aspx http://msdn.microsoft.com/en-us/library/system.windows.forms.datetimepicker.maxdatetime.aspx This value seems arbitrary when no explanation is provided. Why isn't this just DateTime.MaxValue?
2
8,161,226
11/17/2011 02:04:13
356,218
06/02/2010 08:07:44
228
28
LINQPad create sqlite database in C# query
The IQ Connection plugin for LINQPad that allows one to use SQLite has a checkbox for "Create database if missing" but that will only create an empty file. Is there anyway to build the tables automatically when the file doesn't exist? Shouldn't there be a way to get the DataContext and create tables using that interface? Hopefully causing LINQPad to update its DataContext at the same time. The best I've been able to do so far is below, creating DbCommands and executing them on the first run after deleting the sqlite file, then I have to refresh the database, and run it again. void Main() { if (!File.Exists(this.Connection.ConnectionString.Split('=')[1])) { "CREATING DATABASE TABLES".Dump(); CREATE_TABLES(); } else { "RUNNING CODE".Dump(); //Code goes here... } } public void CREATE_TABLES() { this.Connection.Open(); System.Data.Common.DbCommand sup = this.Connection.CreateCommand(); sup.CommandText = @"create table MainTable ( MainTableID INTEGER not null PRIMARY KEY AUTOINCREMENT, FileName nvarchar(500) not null )"; sup.ExecuteNonQuery(); sup.CommandText = @"create table SubTable ( SubTableID int not null, MainTableID int not null, Count int not null, primary key (SubTableID, MainTableID), FOREIGN KEY(MainTableID) REFERENCES MainTable(MainTableID) )"; //Apparently this version of sqlite doesn't support foreign keys really sup.ExecuteNonQuery(); this.Connection.Close(); }
sqlite
sqlite3
linqpad
null
null
null
open
LINQPad create sqlite database in C# query === The IQ Connection plugin for LINQPad that allows one to use SQLite has a checkbox for "Create database if missing" but that will only create an empty file. Is there anyway to build the tables automatically when the file doesn't exist? Shouldn't there be a way to get the DataContext and create tables using that interface? Hopefully causing LINQPad to update its DataContext at the same time. The best I've been able to do so far is below, creating DbCommands and executing them on the first run after deleting the sqlite file, then I have to refresh the database, and run it again. void Main() { if (!File.Exists(this.Connection.ConnectionString.Split('=')[1])) { "CREATING DATABASE TABLES".Dump(); CREATE_TABLES(); } else { "RUNNING CODE".Dump(); //Code goes here... } } public void CREATE_TABLES() { this.Connection.Open(); System.Data.Common.DbCommand sup = this.Connection.CreateCommand(); sup.CommandText = @"create table MainTable ( MainTableID INTEGER not null PRIMARY KEY AUTOINCREMENT, FileName nvarchar(500) not null )"; sup.ExecuteNonQuery(); sup.CommandText = @"create table SubTable ( SubTableID int not null, MainTableID int not null, Count int not null, primary key (SubTableID, MainTableID), FOREIGN KEY(MainTableID) REFERENCES MainTable(MainTableID) )"; //Apparently this version of sqlite doesn't support foreign keys really sup.ExecuteNonQuery(); this.Connection.Close(); }
0
9,971,763
04/02/2012 06:30:39
889,824
08/11/2011 11:47:58
12
0
Application got stuck on downloading
I am working on an iPhone app, which downloads Focus list of items on each app start (6 items with images). I'm using 1 NSMutableURLRequest for downloading 6 items textual information in a loop, then in the same method block with different for loop I'm using : NSURL * imageURL = [NSURL URLWithString: strUrl]; NSData * imageData = [NSData dataWithContentsOfURL:imageURL]; for getting images of all 6 items. Code is working fine, if I wait till this process completes and update my list on home view. If I try to navigate then my app stuck till its in process of download. I called complete method on Background thread, but still it got stuck for the process completion. How can I code for this, so user can experience all navigation without stuck and when he'll come back can get the 6 items in view ? Thanks in advance.
application
blocking
null
null
null
null
open
Application got stuck on downloading === I am working on an iPhone app, which downloads Focus list of items on each app start (6 items with images). I'm using 1 NSMutableURLRequest for downloading 6 items textual information in a loop, then in the same method block with different for loop I'm using : NSURL * imageURL = [NSURL URLWithString: strUrl]; NSData * imageData = [NSData dataWithContentsOfURL:imageURL]; for getting images of all 6 items. Code is working fine, if I wait till this process completes and update my list on home view. If I try to navigate then my app stuck till its in process of download. I called complete method on Background thread, but still it got stuck for the process completion. How can I code for this, so user can experience all navigation without stuck and when he'll come back can get the 6 items in view ? Thanks in advance.
0
10,282,458
04/23/2012 14:24:16
997,762
10/16/2011 11:38:07
13
3
mysql error.log keep being empty
I'm replacing a previous server admin on a Ubuntu 10.04.1 LTS. I have an issue with the error logs from mysql. They are empty and they keep being empty. :( I have edited /etc/mysql/my.cnf general_log_file = /var/log/mysql/mysql.log general_log = 1 log_error = /var/log/mysql/error.log Nothing is logged anyway rw-rw---- 1 mysql adm 0 2012-04-23 01:09 error.log What am i missing...
mysql
ubuntu
logging
null
null
05/03/2012 13:55:46
off topic
mysql error.log keep being empty === I'm replacing a previous server admin on a Ubuntu 10.04.1 LTS. I have an issue with the error logs from mysql. They are empty and they keep being empty. :( I have edited /etc/mysql/my.cnf general_log_file = /var/log/mysql/mysql.log general_log = 1 log_error = /var/log/mysql/error.log Nothing is logged anyway rw-rw---- 1 mysql adm 0 2012-04-23 01:09 error.log What am i missing...
2
7,597,375
09/29/2011 12:32:31
133,212
07/04/2009 21:14:53
365
25
How to configure unit tests with an IoC container in ASP.NET?
I have configured Unity in my ASP.NET application and the configuration is loaded when the first request is received in Application_BeginRequest. then the Unity container is stored in the Global.ascx as a property so that my other class can access it: public static IUnityContainer ContainerHolder { get; set; } IUnityContainer IContainerAccessor.Container { get { return ContainerHolder; } } ContainerHolder, holds the container instance across application and Container property allows access to this property in each session. Then I have a UnityLocator class which enables me access this property across the application: public static class UnityLocator { private static IUnityContainer Container { get { return ((IContainerAccessor)HttpContext.Current.ApplicationInstance).Container; } } } Everything works fine! Now, I'd like to configure my Unit tests to run. How could I do that?! global.ascx doesn't exist there obviously so I thought I should create a BaseTest class and let all my tests inherit it. then at the constructor of this BaseTest class, I build up my instances. Is it the right way to do it? How to configure unit tests with Unity now? Thanks
c#
asp.net
unit-testing
microsoft
unity
null
open
How to configure unit tests with an IoC container in ASP.NET? === I have configured Unity in my ASP.NET application and the configuration is loaded when the first request is received in Application_BeginRequest. then the Unity container is stored in the Global.ascx as a property so that my other class can access it: public static IUnityContainer ContainerHolder { get; set; } IUnityContainer IContainerAccessor.Container { get { return ContainerHolder; } } ContainerHolder, holds the container instance across application and Container property allows access to this property in each session. Then I have a UnityLocator class which enables me access this property across the application: public static class UnityLocator { private static IUnityContainer Container { get { return ((IContainerAccessor)HttpContext.Current.ApplicationInstance).Container; } } } Everything works fine! Now, I'd like to configure my Unit tests to run. How could I do that?! global.ascx doesn't exist there obviously so I thought I should create a BaseTest class and let all my tests inherit it. then at the constructor of this BaseTest class, I build up my instances. Is it the right way to do it? How to configure unit tests with Unity now? Thanks
0
35,662
08/30/2008 03:54:57
372
08/05/2008 09:16:41
2,208
163
Best practices when "going dark"
I'm sure some of you would have read Jeff's Atwood's [Don't Go Dark][1] article. The gist is that it is anathema to go "lock yourself in a room" and perform a development task or project for long periods of time. The best practice would be to have a team (at least another person) with you, [commit early and commit often][2], do your work iteratively, etc. etc. This has become relevant to me because I have an upcoming "internal" project for a [small travel agency business][3], owned and operated by my wife, and we can't afford to hire anyone for it (other than myself of course). The plans/specs that I've drawn up are a little ambitious, but now I'm beginning to doubt if I could pull it off in less than a year if at all. My question now is, for those of you who have had *no other choice* but to do it all alone (e.g., people who have done successful one-man-projects, or people who are one-man IT departments), what best practices have you found so that you are able to: - Produce high quality software - Focus on your tasks and not get distracted or derailed in your work (especially in work-at-home gigs) - Manage your time - QA/test your software efficiently - Maintain best practices in software development like source control, iterative development, etc. I am particularly interested in people who have done work-at-home setups, as this is where I would likely do my work. I have to mention that we do have a 3 year old around the house, although we have hired a nanny to assist us with her, so that should be taken into account. I'd love to hear your thoughts. [1]: http://www.codinghorror.com/blog/archives/001134.html [2]: http://www.codinghorror.com/blog/archives/001165.html [3]: http://inavtravel.com
productivity
null
null
null
null
10/28/2011 07:35:32
off topic
Best practices when "going dark" === I'm sure some of you would have read Jeff's Atwood's [Don't Go Dark][1] article. The gist is that it is anathema to go "lock yourself in a room" and perform a development task or project for long periods of time. The best practice would be to have a team (at least another person) with you, [commit early and commit often][2], do your work iteratively, etc. etc. This has become relevant to me because I have an upcoming "internal" project for a [small travel agency business][3], owned and operated by my wife, and we can't afford to hire anyone for it (other than myself of course). The plans/specs that I've drawn up are a little ambitious, but now I'm beginning to doubt if I could pull it off in less than a year if at all. My question now is, for those of you who have had *no other choice* but to do it all alone (e.g., people who have done successful one-man-projects, or people who are one-man IT departments), what best practices have you found so that you are able to: - Produce high quality software - Focus on your tasks and not get distracted or derailed in your work (especially in work-at-home gigs) - Manage your time - QA/test your software efficiently - Maintain best practices in software development like source control, iterative development, etc. I am particularly interested in people who have done work-at-home setups, as this is where I would likely do my work. I have to mention that we do have a 3 year old around the house, although we have hired a nanny to assist us with her, so that should be taken into account. I'd love to hear your thoughts. [1]: http://www.codinghorror.com/blog/archives/001134.html [2]: http://www.codinghorror.com/blog/archives/001165.html [3]: http://inavtravel.com
2
7,708,004
10/10/2011 02:28:39
985,673
10/08/2011 18:35:02
17
0
Abstract class input for start
I have an abstract class like this public abstract class Abstractclass { public Abstractclass(int init) { } } and a class that extends it in the class that extends the original one I get an error saying that the var was incorrect or something like that is there any work around to this? Edit: the error says constructor Abstractclass in class game.Abstractclass cannot be applied to given types
java
null
null
null
null
10/10/2011 02:52:52
not a real question
Abstract class input for start === I have an abstract class like this public abstract class Abstractclass { public Abstractclass(int init) { } } and a class that extends it in the class that extends the original one I get an error saying that the var was incorrect or something like that is there any work around to this? Edit: the error says constructor Abstractclass in class game.Abstractclass cannot be applied to given types
1
10,128,981
04/12/2012 17:50:19
1,309,847
04/03/2012 08:00:18
5
0
How to structure HTML-Forms
I what is the actual state of HTML-Forms. There are many ways to render them: 1. ul 2. div 3. span 4. without Which way is recommand? Best Regard!
html
css
forms
null
null
04/16/2012 01:52:50
not constructive
How to structure HTML-Forms === I what is the actual state of HTML-Forms. There are many ways to render them: 1. ul 2. div 3. span 4. without Which way is recommand? Best Regard!
4
8,532,607
12/16/2011 10:07:25
783,410
06/03/2011 21:41:03
1
0
( Delphi - Iteration ) How to display or put in variables the selected data using an sql query
Using delphi 2010, i have succed on using TSQLQuery and the TSQLConnection to connect to a remote mysql server, i have used an sql query as follows : SQLQuery1.SQL.Text := 'SELECT * FROM registered WHERE email="'+email+'" and login_pass="'+password+'"'; SQLQuery1.Open; // Open sql connection The questions now : what should i do in order to list / display or iterate the data selected by this sql query ! when i type SQLQuery1['who']; // The resault is : James Kan i think it is displaying the very last item in the list ? But i want to display each item as dealing with the foreach loop in php. Is there a solution to create for Exemple a TLabel for each item. Thankyou
c++
c
delphi
pascal
null
null
open
( Delphi - Iteration ) How to display or put in variables the selected data using an sql query === Using delphi 2010, i have succed on using TSQLQuery and the TSQLConnection to connect to a remote mysql server, i have used an sql query as follows : SQLQuery1.SQL.Text := 'SELECT * FROM registered WHERE email="'+email+'" and login_pass="'+password+'"'; SQLQuery1.Open; // Open sql connection The questions now : what should i do in order to list / display or iterate the data selected by this sql query ! when i type SQLQuery1['who']; // The resault is : James Kan i think it is displaying the very last item in the list ? But i want to display each item as dealing with the foreach loop in php. Is there a solution to create for Exemple a TLabel for each item. Thankyou
0
1,104,055
07/09/2009 13:57:12
16,424
09/17/2008 17:05:06
173
13
Java LDAP with SASL
I am using Java 1.2 with the Netscape ldapjdk.jar and trying to make an LDAP connection to one of our servers that needs SASL. I’m also relativity new to LDAP. I do know that java EE has built in LDAP but I am not able to use it at this time. I have been able to make a connection to another server using regular LDAP but I am not sure what I need to put into the parameters. If someone has a simple example that would be helpful. I think the class below is what I need to use: String ldapUserDn = "cn=mycomputer,dc=Dcname"; String[] mechanisms = {"DIGEST-MD5"}; LDAPSaslBind saslBind = new LDAPSaslBind( String ldapUserDn, mechanisms, String packageName, Hashtable props, Object cbh);
java
ldap
sasl
null
null
null
open
Java LDAP with SASL === I am using Java 1.2 with the Netscape ldapjdk.jar and trying to make an LDAP connection to one of our servers that needs SASL. I’m also relativity new to LDAP. I do know that java EE has built in LDAP but I am not able to use it at this time. I have been able to make a connection to another server using regular LDAP but I am not sure what I need to put into the parameters. If someone has a simple example that would be helpful. I think the class below is what I need to use: String ldapUserDn = "cn=mycomputer,dc=Dcname"; String[] mechanisms = {"DIGEST-MD5"}; LDAPSaslBind saslBind = new LDAPSaslBind( String ldapUserDn, mechanisms, String packageName, Hashtable props, Object cbh);
0
11,489,293
07/15/2012 03:57:37
1,422,770
05/29/2012 03:41:58
37
1
how to make an html5 game multiplayer--online
I am wondering where to start--I was pointed in the direction of web workers but I am not exactly sure how that works, I was hoping someone could give me advice or tell me how to start it off (essentially it would be a server side game) I would like to do it in html5 canvas. Any books, online resources, open source code or anything like that would be great--simple examples please, if possible. I often have trouble wrapping my head around convoluted examples. Thank you!
javascript
database
html5
html5-canvas
web-worker
07/15/2012 05:22:35
not a real question
how to make an html5 game multiplayer--online === I am wondering where to start--I was pointed in the direction of web workers but I am not exactly sure how that works, I was hoping someone could give me advice or tell me how to start it off (essentially it would be a server side game) I would like to do it in html5 canvas. Any books, online resources, open source code or anything like that would be great--simple examples please, if possible. I often have trouble wrapping my head around convoluted examples. Thank you!
1
6,086,643
05/22/2011 07:29:21
745,903
05/09/2011 22:13:30
81
8
Why does postfix operator++ have higher precedence than prefix operator++?
Defined this way, we can do neither `++x++` nor `++x--`. But on the other hand, both `(++x)++` and `(++x)--` are useful expressions: `(++x)++` increments `x` by two and returns the value "in the middle", while `(++x)--` is essentially equivalent to `x+1` but completely avoids having to call `operator+`, which can be quite useful sometimes. So why is the precedence not defined to have `++x++` automatically expand to `(++x)++` rather than `++(x++)`? Is there some hidden meaning to the latter which I don't understand, or is it just to keep the precedence a simple list with all prefix operators making up one single level?
c++
increment
precedence
prefix-operator
postfix-operator
null
open
Why does postfix operator++ have higher precedence than prefix operator++? === Defined this way, we can do neither `++x++` nor `++x--`. But on the other hand, both `(++x)++` and `(++x)--` are useful expressions: `(++x)++` increments `x` by two and returns the value "in the middle", while `(++x)--` is essentially equivalent to `x+1` but completely avoids having to call `operator+`, which can be quite useful sometimes. So why is the precedence not defined to have `++x++` automatically expand to `(++x)++` rather than `++(x++)`? Is there some hidden meaning to the latter which I don't understand, or is it just to keep the precedence a simple list with all prefix operators making up one single level?
0
11,543,833
07/18/2012 14:34:10
1,260,310
03/09/2012 22:36:04
231
7
PHP redirect in include fails
I am trying to implement a fairly complex 3rd party script that consists of several interconnected scripts. I've included the intro of the script in a simple page of mine. The script basically writes different things to a string based on logic and echoes the string at the end. Sometimes it echoes a form and when you click on submit, the script runs again and based on the new logic echoes different text that displays fine inside my page where it is included in place of the earlier form. (The 3rd party script included in my page also has some includes of its own.) My problem is that rather than have it echo some of the things it echoes, notably error os success messages, on occasion I would like to have it redirect to another page on my site. I've done this successfully with other pages of mine. I include a script in a page that writes some header type code. Based on certain parameters or actions by the user that recall the script, the include may redirect to itself or another page. The only thing I have to make sure is that there are no spaces or text written in the course of the include prior to the redirect. However working with this third party script, although I think I've removed all the white space, it is not letting me redirect. The error message sites the code written in my page that includes the 3rd party script. Here is the msg: Warning: Cannot modify header information - headers already sent by (output started at /blah blah/stepone.php:5). Step one is my simple page that calls the 3rd party script. Am I right that an include can redirect in response to a user action even if there is some text currently displayed? Should I just be checking the third party scripts for white space or is there some structural thing I may be doing wrong. The 3rd party scripts are too large to put in here otherwise I would put them in. Thanks.
php
redirect
include
null
null
null
open
PHP redirect in include fails === I am trying to implement a fairly complex 3rd party script that consists of several interconnected scripts. I've included the intro of the script in a simple page of mine. The script basically writes different things to a string based on logic and echoes the string at the end. Sometimes it echoes a form and when you click on submit, the script runs again and based on the new logic echoes different text that displays fine inside my page where it is included in place of the earlier form. (The 3rd party script included in my page also has some includes of its own.) My problem is that rather than have it echo some of the things it echoes, notably error os success messages, on occasion I would like to have it redirect to another page on my site. I've done this successfully with other pages of mine. I include a script in a page that writes some header type code. Based on certain parameters or actions by the user that recall the script, the include may redirect to itself or another page. The only thing I have to make sure is that there are no spaces or text written in the course of the include prior to the redirect. However working with this third party script, although I think I've removed all the white space, it is not letting me redirect. The error message sites the code written in my page that includes the 3rd party script. Here is the msg: Warning: Cannot modify header information - headers already sent by (output started at /blah blah/stepone.php:5). Step one is my simple page that calls the 3rd party script. Am I right that an include can redirect in response to a user action even if there is some text currently displayed? Should I just be checking the third party scripts for white space or is there some structural thing I may be doing wrong. The 3rd party scripts are too large to put in here otherwise I would put them in. Thanks.
0
4,685,365
01/13/2011 21:16:43
298,745
03/22/2010 03:10:32
277
19
IPhone tracking memory overwrites
I have an issue where i call a function on an object in one of my classes but at the time I call its holding a reference to a different object type and its a different type everytime, so i receive messages as so `-[UIGestureRecognizerTarget stopConnection]: unrecognized selector sent to instance 0x6b23710` and the types are always UI type classes. So this leads me to believe something is overriding memory somewhere and I can't track it down! It only happens when i delete a row from a UITableView, and thought that maybe this is deleting something before im ready for it too but nothing seems to have dealloced before im calling this function! Is there anyway I can track when a value at memory address changes, or what would be the best way to track down what is changing the reference of my object in XCode??
objective-c
xcode
debugging
memory-management
null
null
open
IPhone tracking memory overwrites === I have an issue where i call a function on an object in one of my classes but at the time I call its holding a reference to a different object type and its a different type everytime, so i receive messages as so `-[UIGestureRecognizerTarget stopConnection]: unrecognized selector sent to instance 0x6b23710` and the types are always UI type classes. So this leads me to believe something is overriding memory somewhere and I can't track it down! It only happens when i delete a row from a UITableView, and thought that maybe this is deleting something before im ready for it too but nothing seems to have dealloced before im calling this function! Is there anyway I can track when a value at memory address changes, or what would be the best way to track down what is changing the reference of my object in XCode??
0
4,283,966
11/26/2010 09:21:10
696,154
11/26/2010 09:21:10
1
0
I am new to sharepoint2010 is it easy to do?
I am newly assigned to sharepoint developement. i do no about sharepoint can any one tell what is sharepoint? is it good platform or not? is it easy to build the program.
sharepoint2010
null
null
null
null
11/27/2010 01:07:57
not constructive
I am new to sharepoint2010 is it easy to do? === I am newly assigned to sharepoint developement. i do no about sharepoint can any one tell what is sharepoint? is it good platform or not? is it easy to build the program.
4
4,239,167
11/21/2010 17:25:16
499,870
11/07/2010 14:09:29
4
0
Drawn images do not stay on screen.
I am drawing onto a JPanel using getGraphics and the drawLine and fillOval commands but it is very temperamental when running the program. However, when I debug it it draws every time. > draw.drawPoints(drawing.getGraphics(), xCoord, yCoord); Calls: public void drawPoints (Graphics g, int x, int y){ g.setColor(Color.red); g.fillOval(x, y, 5, 5); } edit: It wont always draw. Most of the time is stays blank.
java
drawing
null
null
null
null
open
Drawn images do not stay on screen. === I am drawing onto a JPanel using getGraphics and the drawLine and fillOval commands but it is very temperamental when running the program. However, when I debug it it draws every time. > draw.drawPoints(drawing.getGraphics(), xCoord, yCoord); Calls: public void drawPoints (Graphics g, int x, int y){ g.setColor(Color.red); g.fillOval(x, y, 5, 5); } edit: It wont always draw. Most of the time is stays blank.
0
11,566,557
07/19/2012 17:53:17
794,243
06/11/2011 19:43:28
294
3
What Android phones run Android 2.3.3?
I want to buy a couple of the most commonly used Android phones to test my app on. This is surprisingly hard to figure out. The [Android Dashboard][1] states that 2.3.3 is the most commonly used OS, but I can't seem to find any phones that run it... [Wikipedia][2] seems to say that only the HTC Flyer has it. What Android phones could I get with Android 2.3.3? [1]: http://developer.android.com/about/dashboards/index.html [2]: http://en.wikipedia.org/wiki/Comparison_of_Android_devices
android
phone
android-2.3
null
null
07/22/2012 02:54:55
off topic
What Android phones run Android 2.3.3? === I want to buy a couple of the most commonly used Android phones to test my app on. This is surprisingly hard to figure out. The [Android Dashboard][1] states that 2.3.3 is the most commonly used OS, but I can't seem to find any phones that run it... [Wikipedia][2] seems to say that only the HTC Flyer has it. What Android phones could I get with Android 2.3.3? [1]: http://developer.android.com/about/dashboards/index.html [2]: http://en.wikipedia.org/wiki/Comparison_of_Android_devices
2