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
11,553,918
07/19/2012 04:23:09
1,430,821
06/01/2012 13:44:57
19
4
Datatables table tool ->only displaying records are exported csv file?
I am using datatables ,table tool to export csv file.It works fine but its exporting only displayed records in the table.But I want to export all the records how to do that?
jquery
null
null
null
null
07/19/2012 12:31:41
not a real question
Datatables table tool ->only displaying records are exported csv file? === I am using datatables ,table tool to export csv file.It works fine but its exporting only displayed records in the table.But I want to export all the records how to do that?
1
4,569,825
12/31/2010 11:31:10
408,070
08/01/2010 18:48:37
222
0
sed one-liner to convert all uppercase to lowercase?
I have a textfile in which some words are printed in ALL CAPS. I want to be able to just convert everything in the textfile to lowercase, using `sed`. That means that the first sentence would then read, 'i have a textfile in which some words are printed in all caps.'
regex
null
null
null
null
null
open
sed one-liner to convert all uppercase to lowercase? === I have a textfile in which some words are printed in ALL CAPS. I want to be able to just convert everything in the textfile to lowercase, using `sed`. That means that the first sentence would then read, 'i have a textfile in which some words are printed in all caps.'
0
11,406,289
07/10/2012 03:43:13
176,846
09/21/2009 23:05:21
70
7
Create a minisite in Wordpress
I'm trying to find out the smartest way to create an embedded minisite inside my wordpress site. Basically we have our normal site (www.lazygamer.net) and now for an upcoming event I want to create (www.lazygamer.net/gamescom2012) which will only show posts tagged with a certain category but also using an altered layout. I want the header and footer to stay but will be dropping the sidebar and changing the way the posts are displayed in the loop. I do want the loop and all my custom functions to be available though so I don't want a second theme. We're going to be doing this for many events moving forward so I'm hoping it's possible to do this in some generic way? Anyone got any pointers?
wordpress
null
null
null
null
07/10/2012 03:44:40
not a real question
Create a minisite in Wordpress === I'm trying to find out the smartest way to create an embedded minisite inside my wordpress site. Basically we have our normal site (www.lazygamer.net) and now for an upcoming event I want to create (www.lazygamer.net/gamescom2012) which will only show posts tagged with a certain category but also using an altered layout. I want the header and footer to stay but will be dropping the sidebar and changing the way the posts are displayed in the loop. I do want the loop and all my custom functions to be available though so I don't want a second theme. We're going to be doing this for many events moving forward so I'm hoping it's possible to do this in some generic way? Anyone got any pointers?
1
8,896,836
01/17/2012 15:00:09
33,690
11/03/2008 16:17:19
6,524
84
Databinding error with DropDownListFor in ASP.NET MVC 3?
I have a database table called Genre with the following fields: * Id (Seeded Primary Key) * Name (Name of Genre - Romance, Western, etc...) I have a Model class called `GenreDropDownModel` which contains teh following code: public class GenreDropDownModel { private StoryDBEntities storyDB = new StoryDBEntities(); public Dictionary<int,string> genres { get; set; } public GenreDropDownModel() { genres = new Dictionary<int,string>(); foreach (var genre in storyDB.Genres) { genres.Add(genre.Id, genre.Name); } } } My Controller `Write` action is declared as: public ActionResult Write() { return View(new GenreDropDownModel()); } Finally, my view Write.cshtml is where I get the following error: DataBinding: 'System.Collections.Generic.KeyValuePair`2[[System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089],[System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]' does not contain a property with the name 'Id'. @model Stories.Models.GenreDropDownModel @{ ViewBag.Title = "Write"; } <h2>Write</h2> @Html.DropDownListFor(model => model.genres,new SelectList(Model.genres,"Id","Name"))
asp.net-mvc-3
entity-framework-4
html.dropdownlistfor
null
null
null
open
Databinding error with DropDownListFor in ASP.NET MVC 3? === I have a database table called Genre with the following fields: * Id (Seeded Primary Key) * Name (Name of Genre - Romance, Western, etc...) I have a Model class called `GenreDropDownModel` which contains teh following code: public class GenreDropDownModel { private StoryDBEntities storyDB = new StoryDBEntities(); public Dictionary<int,string> genres { get; set; } public GenreDropDownModel() { genres = new Dictionary<int,string>(); foreach (var genre in storyDB.Genres) { genres.Add(genre.Id, genre.Name); } } } My Controller `Write` action is declared as: public ActionResult Write() { return View(new GenreDropDownModel()); } Finally, my view Write.cshtml is where I get the following error: DataBinding: 'System.Collections.Generic.KeyValuePair`2[[System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089],[System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]' does not contain a property with the name 'Id'. @model Stories.Models.GenreDropDownModel @{ ViewBag.Title = "Write"; } <h2>Write</h2> @Html.DropDownListFor(model => model.genres,new SelectList(Model.genres,"Id","Name"))
0
10,682,306
05/21/2012 09:05:11
150,459
08/04/2009 16:04:45
31
0
What is the status of the FastFormat C++ library?
Does someone know what did happen to the FastFormat C++ library? The web site (http://www.fastformat.org) redirects the page to itself leading to an infinite redirection loop... The sourceforge web site (http://sourceforge.net/projects/fastformat) hasn't been updated for some time...
c++
fastformat
null
null
null
05/21/2012 09:13:36
off topic
What is the status of the FastFormat C++ library? === Does someone know what did happen to the FastFormat C++ library? The web site (http://www.fastformat.org) redirects the page to itself leading to an infinite redirection loop... The sourceforge web site (http://sourceforge.net/projects/fastformat) hasn't been updated for some time...
2
9,699,200
03/14/2012 09:33:35
1,222,905
02/21/2012 08:45:47
51
0
how to invite minimum 2 persons to a conference room using asterisk and call files
I am using asterisk 1.8 on ubuntu 9.10. I want to ask if it's possible to invite more than 2 sip clients to a conference room using call files? A sip client wants to create/ or has a conference room and would like to invite other 3 persons. how would the dialplan look like? When you invite persons to a conference room it means you call them? How to do that with asterisk? I read about call files and extensions.conf dialplan. I have no ideea how to do this. I meed to be able to invite in a conference room more than 2 people or at least 2 people.
sip
asterisk
null
null
null
03/14/2012 12:16:04
off topic
how to invite minimum 2 persons to a conference room using asterisk and call files === I am using asterisk 1.8 on ubuntu 9.10. I want to ask if it's possible to invite more than 2 sip clients to a conference room using call files? A sip client wants to create/ or has a conference room and would like to invite other 3 persons. how would the dialplan look like? When you invite persons to a conference room it means you call them? How to do that with asterisk? I read about call files and extensions.conf dialplan. I have no ideea how to do this. I meed to be able to invite in a conference room more than 2 people or at least 2 people.
2
11,263,707
06/29/2012 14:32:10
961,461
09/23/2011 15:17:14
23
1
Rails query for inner joins
How to implement the sql query in rails for-: activities where carrier has_clients = true && has projects && project start-stop is in given date/times && project belongs to client user is :responsible or :representation **relation:** carriers :has_many projects carriers :has_many activities carries table column: has_clients clients :has_many :project,:roles I have implement this but i want to write in one line. clients = Client.joins(:roles).where{(roles.name.eq "resposible") |(roles.name.eq "replacment") } client_ids = clients.map{|c| c.id } projects = Project.where('id in (?) && start=? && stop=?',client_ids,params[:start_time],params[:end_time]) project_ids = projects.map{|c| c.id } carriers = Carrier.where('id in (?) && has_clients=?',project_ids,1) carrier_ids = carriers.map{|c| c.id } @activities = Activity.where('id in (?)',carrier_ids)
ruby-on-rails-3
query
inner-join
null
null
07/02/2012 13:34:50
not a real question
Rails query for inner joins === How to implement the sql query in rails for-: activities where carrier has_clients = true && has projects && project start-stop is in given date/times && project belongs to client user is :responsible or :representation **relation:** carriers :has_many projects carriers :has_many activities carries table column: has_clients clients :has_many :project,:roles I have implement this but i want to write in one line. clients = Client.joins(:roles).where{(roles.name.eq "resposible") |(roles.name.eq "replacment") } client_ids = clients.map{|c| c.id } projects = Project.where('id in (?) && start=? && stop=?',client_ids,params[:start_time],params[:end_time]) project_ids = projects.map{|c| c.id } carriers = Carrier.where('id in (?) && has_clients=?',project_ids,1) carrier_ids = carriers.map{|c| c.id } @activities = Activity.where('id in (?)',carrier_ids)
1
11,594,428
07/21/2012 17:37:00
1,378,581
05/06/2012 20:40:41
1
0
Using anemone on array of URL's
Is it possible to create an Anemone object, have it spider through once and get an array of URL's, and then just have it loop through the array of urls rather than parsing through the html each time?
ruby
anemone
null
null
null
07/22/2012 15:05:44
not a real question
Using anemone on array of URL's === Is it possible to create an Anemone object, have it spider through once and get an array of URL's, and then just have it loop through the array of urls rather than parsing through the html each time?
1
3,140,060
06/29/2010 11:11:12
283,510
03/01/2010 09:59:25
130
1
To use, or not to use, session_set_save_handler?
I'm playing around with creating a user login system in php. I have been studying this article (http://www.evolt.org/node/60384) as a way of approaching this. In the above article, the author uses a combination of $_SESSION and his own custom database table for storing user info. However... I have also come across numerous articles that recommend using session_set_save_handler to configure php sessions to use the database natively. (Which I guess is a newer technique.) I am wondering: If I am planning on setting up an "activeUsers" table in the database for recording session data anyhow, does it make more sense to use session_set_save_handler? Or is there some advantage to leaving php sessions in their default filesystem form, and then x-checking user logins against my custom db table? Thanks (in advance) for your help.
php
mysql
database
authentication
session
null
open
To use, or not to use, session_set_save_handler? === I'm playing around with creating a user login system in php. I have been studying this article (http://www.evolt.org/node/60384) as a way of approaching this. In the above article, the author uses a combination of $_SESSION and his own custom database table for storing user info. However... I have also come across numerous articles that recommend using session_set_save_handler to configure php sessions to use the database natively. (Which I guess is a newer technique.) I am wondering: If I am planning on setting up an "activeUsers" table in the database for recording session data anyhow, does it make more sense to use session_set_save_handler? Or is there some advantage to leaving php sessions in their default filesystem form, and then x-checking user logins against my custom db table? Thanks (in advance) for your help.
0
6,577,855
07/05/2011 03:59:38
828,964
07/05/2011 03:59:38
1
0
CPLEX quadratic simplex?
Does anybody know which simplex-like algorithm CPLEX uses to solve quadratic programs. what is the so called Quadratic Simplex it is using? Thank you in advance, Mehdi
optimization
quadratic
cplex
null
null
null
open
CPLEX quadratic simplex? === Does anybody know which simplex-like algorithm CPLEX uses to solve quadratic programs. what is the so called Quadratic Simplex it is using? Thank you in advance, Mehdi
0
10,813,361
05/30/2012 09:18:41
1,407,463
05/21/2012 09:06:00
1
0
How to generate column data value in Sql server 2008
I have a table with following structure Year Zone Is_issueable Amount 2000 East i 15266 2000 East n 2165 2001 West i 55151 My problem is that if Is_issueable value for n is absent then i want that for that particular year & zone the Is_issueable column value should come equal to n and amount to 0.In some of my records Value for i is also missing....Vice-versa case...! How do i achieve it......Thanks in Advance..!
sql
sql-server-2008
sql-server-2008-r2
null
null
05/31/2012 08:39:27
not a real question
How to generate column data value in Sql server 2008 === I have a table with following structure Year Zone Is_issueable Amount 2000 East i 15266 2000 East n 2165 2001 West i 55151 My problem is that if Is_issueable value for n is absent then i want that for that particular year & zone the Is_issueable column value should come equal to n and amount to 0.In some of my records Value for i is also missing....Vice-versa case...! How do i achieve it......Thanks in Advance..!
1
3,948,468
10/16/2010 10:16:21
442,498
09/08/2010 14:03:12
11
2
learning to use open source software
Do you know any book, blog, tutorial which explains in a detailed way the use of some open source projects? Maybe you have written such a tutorial, example of open source libraries and your final product is great for a beginner to understand it. I'm in the learning stage of OOP and I really need to learn by examples. I'll like to find some text which explains the use of some Open source software/libraries and the good practices. Beign honestly i feel scared to use the open source libs as i wish/think at this moment. I feel like as I still write procedural code and not OOP. Do you know such tutorials, links, blogs, stories, pages? many thanks! PS: I know C and PHP. I can't say that I know C++ yet, and that's why I need your help.
oop
open-source
tutorials
null
null
10/21/2010 01:16:42
not a real question
learning to use open source software === Do you know any book, blog, tutorial which explains in a detailed way the use of some open source projects? Maybe you have written such a tutorial, example of open source libraries and your final product is great for a beginner to understand it. I'm in the learning stage of OOP and I really need to learn by examples. I'll like to find some text which explains the use of some Open source software/libraries and the good practices. Beign honestly i feel scared to use the open source libs as i wish/think at this moment. I feel like as I still write procedural code and not OOP. Do you know such tutorials, links, blogs, stories, pages? many thanks! PS: I know C and PHP. I can't say that I know C++ yet, and that's why I need your help.
1
9,780,327
03/20/2012 01:36:23
857,254
07/22/2011 04:18:53
6
0
Django on Heroku, url template tag causes 'ParseResult' object not callable
Does anyone know what Heroku changes on deploy? I've got a local dev machine setup with Ubuntu 11.10, and my project installed into a venv, all packages managed via pip. The corresponding requirements.txt is in my repo, and is sent to Heroku on push. Both my local machine and Heroku are accessing the same RDS instance on AWS. Running the Django dev server locally (manage.py runserver) results in a working page. Attempting to run (via my Procfile) the dev server on Heroku causes an error in the template at {% url foobar %} as follows: Caught TypeError while rendering: 'ParseResult' object is not callable My requirements.txt contains the following: Django==1.3.1 MySQL-python==1.2.3 PIL==1.1.7 amqplib==1.0.2 anyjson==0.3.1 boto==2.2.2 celery==2.5.1 distribute==0.6.24 django-celery==2.5.1 django-kombu==0.9.4 django-picklefield==0.2.0 django-piston==0.2.3 gevent==0.13.6 greenlet==0.3.4 gunicorn==0.14.2 httplib2==0.7.4 kombu==2.1.1 python-dateutil==1.5 wsgiref==0.1.2 zencoder==0.4 Anyone have an idea?
django
heroku
null
null
null
null
open
Django on Heroku, url template tag causes 'ParseResult' object not callable === Does anyone know what Heroku changes on deploy? I've got a local dev machine setup with Ubuntu 11.10, and my project installed into a venv, all packages managed via pip. The corresponding requirements.txt is in my repo, and is sent to Heroku on push. Both my local machine and Heroku are accessing the same RDS instance on AWS. Running the Django dev server locally (manage.py runserver) results in a working page. Attempting to run (via my Procfile) the dev server on Heroku causes an error in the template at {% url foobar %} as follows: Caught TypeError while rendering: 'ParseResult' object is not callable My requirements.txt contains the following: Django==1.3.1 MySQL-python==1.2.3 PIL==1.1.7 amqplib==1.0.2 anyjson==0.3.1 boto==2.2.2 celery==2.5.1 distribute==0.6.24 django-celery==2.5.1 django-kombu==0.9.4 django-picklefield==0.2.0 django-piston==0.2.3 gevent==0.13.6 greenlet==0.3.4 gunicorn==0.14.2 httplib2==0.7.4 kombu==2.1.1 python-dateutil==1.5 wsgiref==0.1.2 zencoder==0.4 Anyone have an idea?
0
11,274,496
06/30/2012 13:39:47
1,493,041
06/30/2012 13:24:14
1
0
KKEP MY FAN PAGE OR ATTACH TO NEW PERONAL ACCOUNT?
Ive recently had a problem on face book. I have nearly 1000 fans on my fan page and on my personal page I decided to tag some buy and sell sites with my items for sale to attract more fans on my fan page...still with me? Ive recently logged in and apparently ive violated their terms and conditions!! now there forcing me to convert my profile page into another fan page so im worried incase I loose my old fan page if I do this. My question is.... Can I set up a new profile page for my personal and attach my fan page to it or will I have to start all over again?? If I click the button to convert my personal page into another fan page will I loose the other one attached to it? Any help on keeping my fan page would be of great help guys as i cant find a contact number/email for Facebook! Many thanks and I don't want to loose my fans!! :-(
page
facebook-page
facebook-login
fan
null
06/30/2012 13:44:21
off topic
KKEP MY FAN PAGE OR ATTACH TO NEW PERONAL ACCOUNT? === Ive recently had a problem on face book. I have nearly 1000 fans on my fan page and on my personal page I decided to tag some buy and sell sites with my items for sale to attract more fans on my fan page...still with me? Ive recently logged in and apparently ive violated their terms and conditions!! now there forcing me to convert my profile page into another fan page so im worried incase I loose my old fan page if I do this. My question is.... Can I set up a new profile page for my personal and attach my fan page to it or will I have to start all over again?? If I click the button to convert my personal page into another fan page will I loose the other one attached to it? Any help on keeping my fan page would be of great help guys as i cant find a contact number/email for Facebook! Many thanks and I don't want to loose my fans!! :-(
2
7,296,878
09/04/2011 01:26:56
927,176
09/04/2011 01:23:36
1
0
iphone SDK:How to write the data but do not repeat the plist?
The following code has been correctly write plist, but no way to detect whether there is to write the same data. How to do it does not already joined the data to repeat the join. -(void)saveData{ // Create the new dictionary that will be inserted into the plist. NSMutableDictionary *nameDictionary = [NSMutableDictionary dictionary]; [nameDictionary setValue:wooname forKey:@"wooname"]; [nameDictionary setValue:woodata forKey:@"woodata"]; [nameDictionary setValue:woojclass forKey:@"woojclass"]; [nameDictionary setValue:woojtime forKey:@"woojtime"]; [nameDictionary setValue:woojpin forKey:@"woojpin"]; [nameDictionary setValue:woojsps forKey:@"woojsps"]; [nameDictionary setValue:woojspall forKey:@"woojspall"]; [nameDictionary setValue:wooUrl forKey:@"wooUrl"]; NSString *rootPath = [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) objectAtIndex:0]; NSString *plistPath = [rootPath stringByAppendingPathComponent:@"myData.plist"]; NSMutableArray *plist = [NSMutableArray arrayWithContentsOfFile:plistPath]; if (plist == nil) plist = [NSMutableArray array]; [plist addObject:nameDictionary]; [plist writeToFile:plistPath atomically:YES]; [plist insertObject:nameDictionary atIndex:0];
iphone
plist
null
null
null
null
open
iphone SDK:How to write the data but do not repeat the plist? === The following code has been correctly write plist, but no way to detect whether there is to write the same data. How to do it does not already joined the data to repeat the join. -(void)saveData{ // Create the new dictionary that will be inserted into the plist. NSMutableDictionary *nameDictionary = [NSMutableDictionary dictionary]; [nameDictionary setValue:wooname forKey:@"wooname"]; [nameDictionary setValue:woodata forKey:@"woodata"]; [nameDictionary setValue:woojclass forKey:@"woojclass"]; [nameDictionary setValue:woojtime forKey:@"woojtime"]; [nameDictionary setValue:woojpin forKey:@"woojpin"]; [nameDictionary setValue:woojsps forKey:@"woojsps"]; [nameDictionary setValue:woojspall forKey:@"woojspall"]; [nameDictionary setValue:wooUrl forKey:@"wooUrl"]; NSString *rootPath = [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) objectAtIndex:0]; NSString *plistPath = [rootPath stringByAppendingPathComponent:@"myData.plist"]; NSMutableArray *plist = [NSMutableArray arrayWithContentsOfFile:plistPath]; if (plist == nil) plist = [NSMutableArray array]; [plist addObject:nameDictionary]; [plist writeToFile:plistPath atomically:YES]; [plist insertObject:nameDictionary atIndex:0];
0
7,443,137
09/16/2011 10:09:50
604,511
02/05/2011 16:16:29
369
19
Is it true that a VPS's disk performance dont scale well (for Solr)?
I plan to run **Solr** cores for multiple clients. I thought Linode offers solid performance, stability and a scalable upgrade plan. Solr is a high-performance full text search engine, written as a REST app in JSP. A source whom I look up to says that disk-intensive apps dont scale **as gracefully** as CPU-intensive tasks in a VPS environment. So, past a "point", if I am serving twice as many clients, I should order twice as many instances, rather than upgrading them. Or I need cloud services with load-balancing such as EC2, where multiple instances scale gracefully. Is this true, especially for a modern host like Linode?
solr
hosting
virtualhost
vps
null
09/18/2011 06:59:36
off topic
Is it true that a VPS's disk performance dont scale well (for Solr)? === I plan to run **Solr** cores for multiple clients. I thought Linode offers solid performance, stability and a scalable upgrade plan. Solr is a high-performance full text search engine, written as a REST app in JSP. A source whom I look up to says that disk-intensive apps dont scale **as gracefully** as CPU-intensive tasks in a VPS environment. So, past a "point", if I am serving twice as many clients, I should order twice as many instances, rather than upgrading them. Or I need cloud services with load-balancing such as EC2, where multiple instances scale gracefully. Is this true, especially for a modern host like Linode?
2
7,537,735
09/24/2011 07:44:23
835,014
07/08/2011 08:34:36
59
1
YAHOO MAP WITH DIRECTIONS
I am trying to impliment an Yahoo Map Application. I have 2 text fields where i enter the places eg, A AND B , Now when I submit, YAHOO Map should be shown along with the all possible Directions and routes from A to B. I am new to Map applications and its integration. KIndly please help me Friends. Thanks All.
php
null
null
null
null
09/24/2011 15:18:38
too localized
YAHOO MAP WITH DIRECTIONS === I am trying to impliment an Yahoo Map Application. I have 2 text fields where i enter the places eg, A AND B , Now when I submit, YAHOO Map should be shown along with the all possible Directions and routes from A to B. I am new to Map applications and its integration. KIndly please help me Friends. Thanks All.
3
9,621,845
03/08/2012 17:13:00
875,294
08/02/2011 19:00:52
6
0
Regexp: Limiting where and how often certain chars are allowed
I have some form numbers I need to validate. I've tried multiple attempts but am not getting it right yet. While much is allowed in a form number there are some limits I need to impose: All of these rules should be enforced: - A-Z allowed but not required (see bullet 4) - 0-9 allowed but not required (see bullet 4) - period (decimal point) and dash, if present, only allowed once per form number . - - Minimum length is one character and it cannot be a space, dash or period - multiple spaces are allowed but two spaces may not be next to each other; also no leading or trailing spaces are allowed This is what I had before but not all the above rules were enforced. [A-Z0-9]([A-Za-z0-9 -.])*[A-Z0-9] So these would be examples of valid form numbers under the new requirements: 123 123 456 A1 IL 23 MN CL-100 2.0 These would be examples of invalid form numbers under the new requirements: 123 456 25! 25 25-IL 30-1 aa bb CC
regex
null
null
null
null
null
open
Regexp: Limiting where and how often certain chars are allowed === I have some form numbers I need to validate. I've tried multiple attempts but am not getting it right yet. While much is allowed in a form number there are some limits I need to impose: All of these rules should be enforced: - A-Z allowed but not required (see bullet 4) - 0-9 allowed but not required (see bullet 4) - period (decimal point) and dash, if present, only allowed once per form number . - - Minimum length is one character and it cannot be a space, dash or period - multiple spaces are allowed but two spaces may not be next to each other; also no leading or trailing spaces are allowed This is what I had before but not all the above rules were enforced. [A-Z0-9]([A-Za-z0-9 -.])*[A-Z0-9] So these would be examples of valid form numbers under the new requirements: 123 123 456 A1 IL 23 MN CL-100 2.0 These would be examples of invalid form numbers under the new requirements: 123 456 25! 25 25-IL 30-1 aa bb CC
0
6,374,099
06/16/2011 15:07:50
711,718
04/17/2011 01:28:08
343
29
Android Collaborating with Graphic Designers
I have a good idea for an android application. I know I have the technical skills to create everything I want but I am not exactly the world's greatest artist. Where is the best place to find a professional graphics artist for a reasonable price? I'm open to paying up front or sharing profits down the road.
android
graphics
designer
null
null
06/16/2011 17:47:20
off topic
Android Collaborating with Graphic Designers === I have a good idea for an android application. I know I have the technical skills to create everything I want but I am not exactly the world's greatest artist. Where is the best place to find a professional graphics artist for a reasonable price? I'm open to paying up front or sharing profits down the road.
2
8,054,305
11/08/2011 17:07:50
632,472
02/24/2011 14:26:57
524
23
XCode search: How create a Matches Regex (regular expression) to select the correct files
I have a projec with a lot of target in XCode. I want to customize my find and select only files of one target. My program have files code in this way: 1. Global files that all targets use 2. Global for devices (iPad or iPhone) 3. Specific for that target So, for case 1, the file names is in this way: SCName1.m SCOtherGlobal.m Case 2 is: SCiPhoneFile1.m SCiPhoneFile2.m SCiPadFile.m SCiPadFile2.m Case 3: SCiPhoneAAFile1.m SCiPadABFile1.m SCiPadABOtherFile.m So, for one target, I want to create a regular expression that search files with: SC* OR SCiPhone* OR SCiPhoneAA* The more complete way is (SC* AND NOT(SCiPhone*) AND NOT(SCiPad*)) OR (SCiPhone* AND NOT(SCiPad*) AND NOT(SCiPhoneAB*)) OR (SCiPhoneAA*) I am newbie in regular expression and my expression isn't working. My logic is correct? Someone know create the correct regular expression?
ios
regex
xcode
search
xcode4
null
open
XCode search: How create a Matches Regex (regular expression) to select the correct files === I have a projec with a lot of target in XCode. I want to customize my find and select only files of one target. My program have files code in this way: 1. Global files that all targets use 2. Global for devices (iPad or iPhone) 3. Specific for that target So, for case 1, the file names is in this way: SCName1.m SCOtherGlobal.m Case 2 is: SCiPhoneFile1.m SCiPhoneFile2.m SCiPadFile.m SCiPadFile2.m Case 3: SCiPhoneAAFile1.m SCiPadABFile1.m SCiPadABOtherFile.m So, for one target, I want to create a regular expression that search files with: SC* OR SCiPhone* OR SCiPhoneAA* The more complete way is (SC* AND NOT(SCiPhone*) AND NOT(SCiPad*)) OR (SCiPhone* AND NOT(SCiPad*) AND NOT(SCiPhoneAB*)) OR (SCiPhoneAA*) I am newbie in regular expression and my expression isn't working. My logic is correct? Someone know create the correct regular expression?
0
9,028,384
01/27/2012 02:46:23
1,172,661
01/27/2012 02:41:00
1
0
Java Programming using Listview
I guys. can you help me with my problem in java. i'm actually a newbie in java programming and My problem is this, i don't know how to create Listview in java. Can you give me a simple sample code on how to create Listview??
java
null
null
null
null
01/28/2012 02:53:33
not a real question
Java Programming using Listview === I guys. can you help me with my problem in java. i'm actually a newbie in java programming and My problem is this, i don't know how to create Listview in java. Can you give me a simple sample code on how to create Listview??
1
3,029,747
06/12/2010 18:50:25
358,450
06/04/2010 12:47:51
47
0
songs blog in wordpress
Hi folks I wish to start one blog using wordpress. It ll contain songs, playlists, song serch. What are the steps i want to do? thanks
wordpress
blogs
null
null
null
06/14/2010 00:09:59
off topic
songs blog in wordpress === Hi folks I wish to start one blog using wordpress. It ll contain songs, playlists, song serch. What are the steps i want to do? thanks
2
4,605,559
01/05/2011 15:07:11
160,820
08/21/2009 14:09:57
487
15
Are Image name are important for better page ranking
I have a website with thousand of images, but I am not sure that if the Image Name are also really very important for the better page ranking. Thanks in advance.
seo
seo-friendly
null
null
null
04/27/2011 03:43:47
off topic
Are Image name are important for better page ranking === I have a website with thousand of images, but I am not sure that if the Image Name are also really very important for the better page ranking. Thanks in advance.
2
9,296,406
02/15/2012 15:43:16
45,664
12/12/2008 10:37:47
28,697
863
How to efficiently check if a database contains an identical record to a pending insert?
I have some records that I want to "insert or update" into a SQL Server database, via a stored procedure. These records have a globally unique and stable ID, and a bunch of value attributes (about a dozen). Checking for insert is straightforward enough - see if the key exists in the table. Assuming that the key does exist, I then need to check whether the existing record contains exactly the same values as the current instance that I'm passing into the function. At the moment I'm doing this via: SELECT @identical = CASE WHEN COUNT(*) > 0 THEN 1 ELSE 0 END FROM Table WHERE idCol = @newId AND valueCol1 = @newValue1 AND valueCol2 = @newValue2 AND ... This works, but it's not very efficient; I'm able to insert about 70 records per second which is a lot slower than I'd expect. My first thought was to add an index - but this will be indexing almost every column in the table. Would that even make sense or would it just be a second copy of the table? (The ID column is a clustered PK if that's relevant.) Is there any sensible way to speed up a query that has to check the values of every column? I'm considering using some sort of hash to detect duplicates, but this adds some space overhead, complexity to the sprocs and small (acceptable) possibility of false positives, so I'd much rather a solution based on indices or rewriting the SQL if one exists.
sql
performance
query
indexing
null
null
open
How to efficiently check if a database contains an identical record to a pending insert? === I have some records that I want to "insert or update" into a SQL Server database, via a stored procedure. These records have a globally unique and stable ID, and a bunch of value attributes (about a dozen). Checking for insert is straightforward enough - see if the key exists in the table. Assuming that the key does exist, I then need to check whether the existing record contains exactly the same values as the current instance that I'm passing into the function. At the moment I'm doing this via: SELECT @identical = CASE WHEN COUNT(*) > 0 THEN 1 ELSE 0 END FROM Table WHERE idCol = @newId AND valueCol1 = @newValue1 AND valueCol2 = @newValue2 AND ... This works, but it's not very efficient; I'm able to insert about 70 records per second which is a lot slower than I'd expect. My first thought was to add an index - but this will be indexing almost every column in the table. Would that even make sense or would it just be a second copy of the table? (The ID column is a clustered PK if that's relevant.) Is there any sensible way to speed up a query that has to check the values of every column? I'm considering using some sort of hash to detect duplicates, but this adds some space overhead, complexity to the sprocs and small (acceptable) possibility of false positives, so I'd much rather a solution based on indices or rewriting the SQL if one exists.
0
4,942,591
02/09/2011 08:14:05
609,391
02/09/2011 08:02:39
1
0
I used to use nano to edit text but vim, which is more powerful. Will I get the same power up if I move to emacs?
For about 3+ years, all I thought I needed (and technically true) was nano. I did not understand all the hoopla about vim until I tried it. Although the learning curve is ever so slightly higher, it has greatly simplified coding for me and I would not dream of going back to nano. I have, however, heard many times over that emacs is the most difficult to learn, yet most useful editor for a programmer. Can anyone who has taken a similar path of evolution through text editors, and find themselves currently choosing emacs tell me what the advantage is. Right now my view on vim is the same as my previous view on nano which is will the marginal utility be great enough to justify putting in the time to learn. with nano > vim the answer is an obvious yes (for me anyway). Will I look back and say the same thing about vim if I learn emacs? Thanks much!
vim
emacs
nano
null
null
02/09/2011 15:19:26
not constructive
I used to use nano to edit text but vim, which is more powerful. Will I get the same power up if I move to emacs? === For about 3+ years, all I thought I needed (and technically true) was nano. I did not understand all the hoopla about vim until I tried it. Although the learning curve is ever so slightly higher, it has greatly simplified coding for me and I would not dream of going back to nano. I have, however, heard many times over that emacs is the most difficult to learn, yet most useful editor for a programmer. Can anyone who has taken a similar path of evolution through text editors, and find themselves currently choosing emacs tell me what the advantage is. Right now my view on vim is the same as my previous view on nano which is will the marginal utility be great enough to justify putting in the time to learn. with nano > vim the answer is an obvious yes (for me anyway). Will I look back and say the same thing about vim if I learn emacs? Thanks much!
4
8,942,206
01/20/2012 13:33:51
491,766
10/29/2010 21:00:19
151
2
From where can I get this front for Android
I need to use the following font in my android app from where can I get it or what it's name?: ![Eclipse font][1] [1]: http://i.stack.imgur.com/nWLve.png It's used in eclipse xml layout string field.
android
null
null
null
null
01/20/2012 14:01:05
not constructive
From where can I get this front for Android === I need to use the following font in my android app from where can I get it or what it's name?: ![Eclipse font][1] [1]: http://i.stack.imgur.com/nWLve.png It's used in eclipse xml layout string field.
4
9,715,574
03/15/2012 07:35:47
670,472
03/22/2011 02:38:33
20
0
Can an implemented class have methods NOT declared in its parent interface?
I tried this in Eclipse and it shows a compile error. However trying the same in the online IDE [Compilr][1] showed no errors. That's why the confusion. interface Iclass{ void print(); void hey(); } class sdlfkajl implements Iclass { public void print(){ System.out.println("Impl class"); } public void hey(){ System.out.println("Hey!"); } public void extra(){ System.out.println("Should I be here?"); } } The error shown is that this class cannot have methods not declared in the interface. Suggestion tooltip said I should declare this method in the interface too. [1]: http://www.compilr.com
java
interface
null
null
null
null
open
Can an implemented class have methods NOT declared in its parent interface? === I tried this in Eclipse and it shows a compile error. However trying the same in the online IDE [Compilr][1] showed no errors. That's why the confusion. interface Iclass{ void print(); void hey(); } class sdlfkajl implements Iclass { public void print(){ System.out.println("Impl class"); } public void hey(){ System.out.println("Hey!"); } public void extra(){ System.out.println("Should I be here?"); } } The error shown is that this class cannot have methods not declared in the interface. Suggestion tooltip said I should declare this method in the interface too. [1]: http://www.compilr.com
0
11,390,713
07/09/2012 07:30:09
1,420,296
05/27/2012 15:38:34
52
0
Transactions and PHP (CONTINUED)
This is a continued question of http://stackoverflow.com/questions/10873034/transactions-and-php . I would like to know only one thing from a php expert to clear up my doubts that will the following solution make sure that if any one of the query got failed to be inserted then it'll not make insertion to any of the table and also will all the insertion to all the tables take place on `$result = mysql_query('COMMIT'); `, in order to avoid wrong data entry THANKS! mysql_select_db($database_dany, $dany); if (mysql_query('BEGIN')) { if ( mysql_query($query1) && mysql_query($query2) && mysql_query($query3) && mysql_query($insertSQL) ) $result = mysql_query('COMMIT'); // both queries looked OK, save else { mysql_query('ROLLBACK'); // problems with queries, no changes echo "There are some problemo!!!"; }
php
transactions
null
null
null
07/09/2012 18:14:59
not a real question
Transactions and PHP (CONTINUED) === This is a continued question of http://stackoverflow.com/questions/10873034/transactions-and-php . I would like to know only one thing from a php expert to clear up my doubts that will the following solution make sure that if any one of the query got failed to be inserted then it'll not make insertion to any of the table and also will all the insertion to all the tables take place on `$result = mysql_query('COMMIT'); `, in order to avoid wrong data entry THANKS! mysql_select_db($database_dany, $dany); if (mysql_query('BEGIN')) { if ( mysql_query($query1) && mysql_query($query2) && mysql_query($query3) && mysql_query($insertSQL) ) $result = mysql_query('COMMIT'); // both queries looked OK, save else { mysql_query('ROLLBACK'); // problems with queries, no changes echo "There are some problemo!!!"; }
1
6,358,504
06/15/2011 13:33:23
68,471
02/19/2009 15:52:11
169
4
Determining Deep Freeze State Programatically
How do I programatically detect if a Windows XP PC with deep freeze is in a frozen versus thawed state?
freeze
deep
null
null
null
null
open
Determining Deep Freeze State Programatically === How do I programatically detect if a Windows XP PC with deep freeze is in a frozen versus thawed state?
0
2,657,877
04/17/2010 09:12:07
313,937
04/11/2010 14:35:48
39
1
PHP Form (post) Repeating input in a tabel
I have a form (with post method) that takes the following input: - a certain name - a number - 3 checkboxes All this input gets generated and calculated in a table.(html code within the php) Everything gets properly calculated and displayed in a table. **So my question:** How do i make it possible after giving all those input to give in more input? Meaning i have made a hyperlink that goes back to the form itself (where i can give the input). So i can give in new data, and after submiting that again the table now contains 2 rows of values insteed of just 1. Not really sure what exactly i need for this. Regards.
php
null
null
null
null
null
open
PHP Form (post) Repeating input in a tabel === I have a form (with post method) that takes the following input: - a certain name - a number - 3 checkboxes All this input gets generated and calculated in a table.(html code within the php) Everything gets properly calculated and displayed in a table. **So my question:** How do i make it possible after giving all those input to give in more input? Meaning i have made a hyperlink that goes back to the form itself (where i can give the input). So i can give in new data, and after submiting that again the table now contains 2 rows of values insteed of just 1. Not really sure what exactly i need for this. Regards.
0
8,551,611
12/18/2011 12:11:20
539,214
12/11/2010 22:29:25
55
0
Add quantity to a checkbox item
I have a List with Checkboxes and i want to every item on the List to add a quantity field, so the user can enter a value like 1,2,3 etc
java
android
null
null
null
12/19/2011 13:51:09
not a real question
Add quantity to a checkbox item === I have a List with Checkboxes and i want to every item on the List to add a quantity field, so the user can enter a value like 1,2,3 etc
1
6,489,876
06/27/2011 07:36:19
807,325
02/21/2011 17:08:44
637
9
Guidance, tutorials and examples on building a simple community from scratch
I will build a community like website and I need your guidance. What I can do perfectly is to tailor a cms like Wordpress exactly to my needs and I have a big experience and knowledge in html,css,js,jquery and I may say that I am able to build the simple things I need using PHP (not using any framework) in kinda slow-mo but I do it. (I have already built some of the code I'll need). My weak part is PHP with Mysql. So Wordpress will give me the base that I can not build on my own and these are: - register/login - two or more user roles (I will need a simple user and a seller as roles, but I need to determine if_is_a_buyer and if_is_a_user - profile page for each registered user with editable content - ability to submit small posts to the community and edit them afterwards. I guess what I want are the most common things of a community so I will try to avoid Wordpress because of all those useless to me functions/ Additionally, for the reason that I will write many PHP code for it, something that Wordpress can not give to me but only implement it. So do you find my question a logical one? I mean to build this base community and continue with the addition of my code or should I use a cms like wordpress and plugin my codes? If you also think that it's better to go on my own, please suggest me any tutorials, examples, articles, code that will help me to learn and build the base of this community. As I said I do not have any experiences through frameworks. If you not, what cms should I use with a lot of useless (for me) stuff? Your answers are highly appreciated. Thank you.
php
mysql
content-management-system
example
null
06/27/2011 11:37:43
not a real question
Guidance, tutorials and examples on building a simple community from scratch === I will build a community like website and I need your guidance. What I can do perfectly is to tailor a cms like Wordpress exactly to my needs and I have a big experience and knowledge in html,css,js,jquery and I may say that I am able to build the simple things I need using PHP (not using any framework) in kinda slow-mo but I do it. (I have already built some of the code I'll need). My weak part is PHP with Mysql. So Wordpress will give me the base that I can not build on my own and these are: - register/login - two or more user roles (I will need a simple user and a seller as roles, but I need to determine if_is_a_buyer and if_is_a_user - profile page for each registered user with editable content - ability to submit small posts to the community and edit them afterwards. I guess what I want are the most common things of a community so I will try to avoid Wordpress because of all those useless to me functions/ Additionally, for the reason that I will write many PHP code for it, something that Wordpress can not give to me but only implement it. So do you find my question a logical one? I mean to build this base community and continue with the addition of my code or should I use a cms like wordpress and plugin my codes? If you also think that it's better to go on my own, please suggest me any tutorials, examples, articles, code that will help me to learn and build the base of this community. As I said I do not have any experiences through frameworks. If you not, what cms should I use with a lot of useless (for me) stuff? Your answers are highly appreciated. Thank you.
1
10,426,008
05/03/2012 06:09:00
972,202
09/30/2011 00:26:57
961
0
Jump to another label from within a label
**In NSIS, how do I jump to a label from within another label?** Note: I am not sure if what I am talking about is actually called a label so correct me if I am wrong. In the following code I want to jump to the label 'InstallFiles', see the line '# SEE HERE': # the following code is from within a macro # Check the directory exists IfFileExists $installDirectory InstallFiles CreateDirThenInstall CreateDirThenInstall: # this is a label...I think? :P file $installDirectory # SEE HERE: HOW DO I call the label 'InstallFiles'? InstallFiles: DetailPrint "SetOverwrite on." SetOverwrite try SetOutPath "${dir}" file "Attributes_to_trees_panel.4do" file "ATTRIBUTES_TO_TREES_PANEL.hlp"
assembly
installer
nsis
null
null
null
open
Jump to another label from within a label === **In NSIS, how do I jump to a label from within another label?** Note: I am not sure if what I am talking about is actually called a label so correct me if I am wrong. In the following code I want to jump to the label 'InstallFiles', see the line '# SEE HERE': # the following code is from within a macro # Check the directory exists IfFileExists $installDirectory InstallFiles CreateDirThenInstall CreateDirThenInstall: # this is a label...I think? :P file $installDirectory # SEE HERE: HOW DO I call the label 'InstallFiles'? InstallFiles: DetailPrint "SetOverwrite on." SetOverwrite try SetOutPath "${dir}" file "Attributes_to_trees_panel.4do" file "ATTRIBUTES_TO_TREES_PANEL.hlp"
0
6,757,505
07/20/2011 05:47:01
148,956
08/01/2009 13:27:48
1,708
3
Can I focus php to type the variable class in php?
In Java, everything object, I know which type it is, for example... I will doing something like this: MyObject aObject = new MyObject(); I always know that the "aObject" is MyObject... but PHP, I use this $aObject = new MyObject(); I don't know what is the "aObject" was, I try to doing this, it gives me error: MyObject $aObject = new MyObject(); It makes me feel very focus on that, any suggestions? Thank you.
java
php
object
null
null
null
open
Can I focus php to type the variable class in php? === In Java, everything object, I know which type it is, for example... I will doing something like this: MyObject aObject = new MyObject(); I always know that the "aObject" is MyObject... but PHP, I use this $aObject = new MyObject(); I don't know what is the "aObject" was, I try to doing this, it gives me error: MyObject $aObject = new MyObject(); It makes me feel very focus on that, any suggestions? Thank you.
0
7,994,988
11/03/2011 12:37:58
1,027,410
11/03/2011 10:14:35
1
0
Thrift : using an IOS client with a PHP server
I'm trying to use a thirft ios client with a thrift php server and I get this error message : "Terminating app due to uncaught exception 'TTransportException', reason: 'Error writing to transport output stream." Do you have an idea ? or an example using objective-c as client and php as server ? Thanks
php
objective-c
ios
thrift
null
null
open
Thrift : using an IOS client with a PHP server === I'm trying to use a thirft ios client with a thrift php server and I get this error message : "Terminating app due to uncaught exception 'TTransportException', reason: 'Error writing to transport output stream." Do you have an idea ? or an example using objective-c as client and php as server ? Thanks
0
7,259,901
08/31/2011 16:02:34
921,901
08/31/2011 15:17:56
1
0
mysql IFNULL INSERT huge setback?
I am having a bit of a problem with some mysql. I will try to give a much background as I can. This is the situation, I had created an availability for my parent's plant nursery and stored the plant information in mysql, I did a terrible job the first time and now I am redoing it with the new knowledge I have gained in the mean time. Background of the problem, I had 2 tables in the old database one being called `Gallery` with the following fields: (`id`, `Plant_id_1`, `Plant_id_2`, `Plant_id_3`, `Plant_id_4`, `Plant_id_5`, `Image1`, `Image1_Copyright`, `Image2`, `Image2_Copyright`, `Scientific`, `Common`, `Category`, `Height`, `Spread`, `Exposure`, `Zone`, `Descp`). The `Plant_id_1...` fields would be the `id` of the second table which is called `Availability ` with the following fields: (`id`, `name`, `size`, `description`, `available`, `upcomming`, `price`) So as you can see I knew nothing about datases(still might not) but on to the new structure for the table, again 2 tables the first being called `plants` with the following fields: (`id`, `scientific_name`, `common_name`, `category`, `height`, `spread`, `exposure`, `usda`, `description`, `image1_url`, `image1_copyright`, `image2_url`, `image2_copyright`) The second being called `current` with the following fields: (`id`, `plant_id`, `size`, `available`, `upcoming`, `price`, `description`) The `plant_id` will be the id of the corresponding plant in the `plant` table. Now on to the problem. I need to get the data from the old table and put it into the new table. I have all the plants from gallery in the new `plant` table no issue there. But now to get the `Availability` into the `Current` table. This is an example from the export of the `Availability` (I took the top 3): INSERT INTO `Availability` (`id`, `name`, `size`, `description`,`available`, `upcomming`, `price`) VALUES(91, 'Acer P.''Shishigashira''', ' #5', '30-36"', 27, 0, 36.00); INSERT INTO `Availability` (`id`, `name`, `size`, `description`, `available`,`upcomming`, `price`) VALUES(697, 'Arbutus U. ''Compacta''', ' #5','', 0, 0, 16.20); INSERT INTO `Availability` (`id`, `name`, `size`, `description`, `available`, `upcomming`, `price`) VALUES(90, 'Acer P.''Shigitatsusawa''', '#15', '', 0, 0, 65.00); I need to get the `plant_id` from the plant table and put that into a insert statement, which I believe I have with the following: INSERT INTO `current` (`plant_id`, `size`,`description`, `available`, `upcoming`, `price`) VALUES( (SELECT `id` FROM `plants` WHERE `scientific_name` REGEXP 'Acer P.+ ''Shishigashira'''), ' #5', '30-36"', 27, 0, 36.00); But now I have a new problem what if there is no plant in the `plant` table to match, So i need a ifnull in there. to create the plant with the scientific name and the rest null. well I am new to SQL so this is what I have and its not working: SELECT IFNULL( (SELECT `id` FROM `plants` WHERE `scientific_name` REGEXP 'Chamaecyparis O.+ Nana'),( INSERT INTO `plants` (`scientific_name`) VALUES ('Chamaecyparis O. ''Nana''')); As you can see Its very complicated if you think you are up to the challenge of helping me i would beyond greatly appreciated. If no one can help me I will have to manually reenter all the data into the `current` table.
mysql
ifnull
null
null
null
null
open
mysql IFNULL INSERT huge setback? === I am having a bit of a problem with some mysql. I will try to give a much background as I can. This is the situation, I had created an availability for my parent's plant nursery and stored the plant information in mysql, I did a terrible job the first time and now I am redoing it with the new knowledge I have gained in the mean time. Background of the problem, I had 2 tables in the old database one being called `Gallery` with the following fields: (`id`, `Plant_id_1`, `Plant_id_2`, `Plant_id_3`, `Plant_id_4`, `Plant_id_5`, `Image1`, `Image1_Copyright`, `Image2`, `Image2_Copyright`, `Scientific`, `Common`, `Category`, `Height`, `Spread`, `Exposure`, `Zone`, `Descp`). The `Plant_id_1...` fields would be the `id` of the second table which is called `Availability ` with the following fields: (`id`, `name`, `size`, `description`, `available`, `upcomming`, `price`) So as you can see I knew nothing about datases(still might not) but on to the new structure for the table, again 2 tables the first being called `plants` with the following fields: (`id`, `scientific_name`, `common_name`, `category`, `height`, `spread`, `exposure`, `usda`, `description`, `image1_url`, `image1_copyright`, `image2_url`, `image2_copyright`) The second being called `current` with the following fields: (`id`, `plant_id`, `size`, `available`, `upcoming`, `price`, `description`) The `plant_id` will be the id of the corresponding plant in the `plant` table. Now on to the problem. I need to get the data from the old table and put it into the new table. I have all the plants from gallery in the new `plant` table no issue there. But now to get the `Availability` into the `Current` table. This is an example from the export of the `Availability` (I took the top 3): INSERT INTO `Availability` (`id`, `name`, `size`, `description`,`available`, `upcomming`, `price`) VALUES(91, 'Acer P.''Shishigashira''', ' #5', '30-36"', 27, 0, 36.00); INSERT INTO `Availability` (`id`, `name`, `size`, `description`, `available`,`upcomming`, `price`) VALUES(697, 'Arbutus U. ''Compacta''', ' #5','', 0, 0, 16.20); INSERT INTO `Availability` (`id`, `name`, `size`, `description`, `available`, `upcomming`, `price`) VALUES(90, 'Acer P.''Shigitatsusawa''', '#15', '', 0, 0, 65.00); I need to get the `plant_id` from the plant table and put that into a insert statement, which I believe I have with the following: INSERT INTO `current` (`plant_id`, `size`,`description`, `available`, `upcoming`, `price`) VALUES( (SELECT `id` FROM `plants` WHERE `scientific_name` REGEXP 'Acer P.+ ''Shishigashira'''), ' #5', '30-36"', 27, 0, 36.00); But now I have a new problem what if there is no plant in the `plant` table to match, So i need a ifnull in there. to create the plant with the scientific name and the rest null. well I am new to SQL so this is what I have and its not working: SELECT IFNULL( (SELECT `id` FROM `plants` WHERE `scientific_name` REGEXP 'Chamaecyparis O.+ Nana'),( INSERT INTO `plants` (`scientific_name`) VALUES ('Chamaecyparis O. ''Nana''')); As you can see Its very complicated if you think you are up to the challenge of helping me i would beyond greatly appreciated. If no one can help me I will have to manually reenter all the data into the `current` table.
0
9,982,547
04/02/2012 19:25:52
936,037
09/09/2011 02:37:08
21
1
Automated handling of Un-Deliverable email
We are using a 3rd party email relay service to send mass emails to our client's subscribers. Problem is that when there is a "soft bounce" i.e domain accepts email and then subsequently bounces for whatever reason (as opposed to a hard bounce), the client's replyto/from email address is the one the undeliveable message goes to. Atleast with one client, we have the ability to host their email. So for example, support@thisclientofours.net is hosted by us and we can query the IMAP server to see the return codes. Questions: > 1) Is there a way for us have the Non-Delivery Report/Receipt (NDR) be > sent to a different email (one that we own) vs a genuine reply from > the subscriber to the client ? Does the answer reside in the > "Return-Path" header ? > > 2) If 1) is not possible, then whats the most efficient way of > gathering the NDR status flags and then forwarding non NDR (replys) to > the client ? Thanks a lot
perl
email
smtp
null
null
04/29/2012 09:34:14
off topic
Automated handling of Un-Deliverable email === We are using a 3rd party email relay service to send mass emails to our client's subscribers. Problem is that when there is a "soft bounce" i.e domain accepts email and then subsequently bounces for whatever reason (as opposed to a hard bounce), the client's replyto/from email address is the one the undeliveable message goes to. Atleast with one client, we have the ability to host their email. So for example, support@thisclientofours.net is hosted by us and we can query the IMAP server to see the return codes. Questions: > 1) Is there a way for us have the Non-Delivery Report/Receipt (NDR) be > sent to a different email (one that we own) vs a genuine reply from > the subscriber to the client ? Does the answer reside in the > "Return-Path" header ? > > 2) If 1) is not possible, then whats the most efficient way of > gathering the NDR status flags and then forwarding non NDR (replys) to > the client ? Thanks a lot
2
8,266,397
11/25/2011 08:29:11
534,329
12/07/2010 11:16:39
376
15
Best wordpress theme for a Tutorial Based learning website
Does any one recomend a good wordpress theme for a tutorial based learning website. In which technologies can be divided into categories and articles posted as series of for a single topic. I will wait for community recommendations.
wordpress
user-interface
wordpress-theming
null
null
11/25/2011 13:12:11
off topic
Best wordpress theme for a Tutorial Based learning website === Does any one recomend a good wordpress theme for a tutorial based learning website. In which technologies can be divided into categories and articles posted as series of for a single topic. I will wait for community recommendations.
2
1,637,122
10/28/2009 13:03:18
38,383
11/17/2008 22:01:00
54
6
What is the maximum size of document for rest api
I am considering creating a restful web service which will return a lot of data. What do people think is the maximum size of document that should be returned in one get from a web services API. How much time is a reasonable maximum for the server to be calculating a result set before returning the document? The web server is apache using modpython. The web service would only be called once or twice a day.
rest
web-services
apache
null
null
null
open
What is the maximum size of document for rest api === I am considering creating a restful web service which will return a lot of data. What do people think is the maximum size of document that should be returned in one get from a web services API. How much time is a reasonable maximum for the server to be calculating a result set before returning the document? The web server is apache using modpython. The web service would only be called once or twice a day.
0
5,639,870
04/12/2011 18:26:31
446,738
09/13/2010 20:10:56
136
10
Simple Java name based locks?
MySql has a handy function: SELECT GET_LOCK("SomeName") This can be used to create simple, but very specific, name based locks for an application, but it requires a database connection. I have many situations like: someMethod() { // do stuff to user A for their data for feature X } It doesn't make sense to simply synchronize this method, because, for example, if this method is called for user B in the meantime, user B does not need to wait for user A to finish before it starts, only operations for the user A and feature X combination need to wait. With the MySql lock I could do something like: someMethod() { executeQuery("SELECT GET_LOCK('userA-featureX')") // only locked for user A for their data for feature X executeQuery("SELECT RELEASE_LOCK('userA-featureX')") } Since Java locking is based on objects, it seems like I would need to create a new object to represent the situation for this lock and then put it in a static cache somewhere so all the threads can see it. Subsequent requests to lock for that situation would then locate the lock object in the cache and acquire its lock. I tried to create something like this, but then the lock cache itself needs synchronization. Also, it is difficult to detect when a lock object is no longer being used so that it can be removed from the cache. I have looked at the Java concurrent packages, but nothing stands out as being able to handle something like this. Is there an easy way to implement this, or am I looking at this from the wrong perspective?
java
locking
null
null
null
null
open
Simple Java name based locks? === MySql has a handy function: SELECT GET_LOCK("SomeName") This can be used to create simple, but very specific, name based locks for an application, but it requires a database connection. I have many situations like: someMethod() { // do stuff to user A for their data for feature X } It doesn't make sense to simply synchronize this method, because, for example, if this method is called for user B in the meantime, user B does not need to wait for user A to finish before it starts, only operations for the user A and feature X combination need to wait. With the MySql lock I could do something like: someMethod() { executeQuery("SELECT GET_LOCK('userA-featureX')") // only locked for user A for their data for feature X executeQuery("SELECT RELEASE_LOCK('userA-featureX')") } Since Java locking is based on objects, it seems like I would need to create a new object to represent the situation for this lock and then put it in a static cache somewhere so all the threads can see it. Subsequent requests to lock for that situation would then locate the lock object in the cache and acquire its lock. I tried to create something like this, but then the lock cache itself needs synchronization. Also, it is difficult to detect when a lock object is no longer being used so that it can be removed from the cache. I have looked at the Java concurrent packages, but nothing stands out as being able to handle something like this. Is there an easy way to implement this, or am I looking at this from the wrong perspective?
0
9,659,912
03/11/2012 23:19:54
1,258,345
03/09/2012 01:49:22
11
0
what is the format/purpose of header files & makefiles? (C)
I'm unclear on what goes in a makefile, and what goes in a header file. From what I understand a makefile has the format: target: dependencies instructions But that didn't work for me. Here's exactly what I did: library: login.o linked.o cipher.o gcc -o library login.o linked.o cipher.o login.o: login.c linked.h gcc -c login.c linked.o: linked.c cipher.h gcc -c linked.c cipher.o: cipher.c gcc -c cipher.c When I type "make makefile" into the command line the compiler says "make: Nothing to be done for `makefile'". I'm guessing I got the format wrong. Also, is there an extension for makefiles (makefile.txt, makefile.c)? And do makefiles have to be named makefile? Could I name it taliasmakefile or makefile69 or lykeim2freespirited4skool or iwanaBahippie? As for header files I can't find any clear examples of what exactly goes in them. Do you include variables that you want other files to be able to access? Or function prototypes? I'm really new to C. Could someone explain this to me like I'm 5?
c
header
makefile
make
null
null
open
what is the format/purpose of header files & makefiles? (C) === I'm unclear on what goes in a makefile, and what goes in a header file. From what I understand a makefile has the format: target: dependencies instructions But that didn't work for me. Here's exactly what I did: library: login.o linked.o cipher.o gcc -o library login.o linked.o cipher.o login.o: login.c linked.h gcc -c login.c linked.o: linked.c cipher.h gcc -c linked.c cipher.o: cipher.c gcc -c cipher.c When I type "make makefile" into the command line the compiler says "make: Nothing to be done for `makefile'". I'm guessing I got the format wrong. Also, is there an extension for makefiles (makefile.txt, makefile.c)? And do makefiles have to be named makefile? Could I name it taliasmakefile or makefile69 or lykeim2freespirited4skool or iwanaBahippie? As for header files I can't find any clear examples of what exactly goes in them. Do you include variables that you want other files to be able to access? Or function prototypes? I'm really new to C. Could someone explain this to me like I'm 5?
0
5,641,356
04/12/2011 20:39:20
495,904
11/03/2010 12:36:37
709
44
JVM performance vs native code
Java is slow. That's more then an "urban legend", it's seems to be a fact. You don't use it for live-coding because of latency, you don't use it for clusters and parallel computing, and so. There are thousands of benchmarks out there and it was asked alot of times, specially "Java vs C# vs C++". The thing is this: http://shootout.alioth.debian.org/ According to this, not only Java performance is almost as good as C (far from the rest), but Scala and Clojure (both functional languages which runs on the JVM) both have a better performance that OCaml, Erlang and so. And there are alot of "Java is faster then X" out there, also (for instance, a question here on SO: http://stackoverflow.com/questions/1984856/java-runtime-performance-vs-native-c-c-code). So it seems to be fast, for certain cases. Can someone explain why? Why is it that bytecode might run faster then native code, in some cases, given dynamic code (Scala, Clojure) and garbage collection? And how come if it is faster, there is still latency (as i said in the beggining, you can't have a "Fluxus" on Java because of latency. It seems a contradiction, i just don't get it. Thanks!
java
performance
jvm
native-code
null
04/13/2011 03:14:43
not constructive
JVM performance vs native code === Java is slow. That's more then an "urban legend", it's seems to be a fact. You don't use it for live-coding because of latency, you don't use it for clusters and parallel computing, and so. There are thousands of benchmarks out there and it was asked alot of times, specially "Java vs C# vs C++". The thing is this: http://shootout.alioth.debian.org/ According to this, not only Java performance is almost as good as C (far from the rest), but Scala and Clojure (both functional languages which runs on the JVM) both have a better performance that OCaml, Erlang and so. And there are alot of "Java is faster then X" out there, also (for instance, a question here on SO: http://stackoverflow.com/questions/1984856/java-runtime-performance-vs-native-c-c-code). So it seems to be fast, for certain cases. Can someone explain why? Why is it that bytecode might run faster then native code, in some cases, given dynamic code (Scala, Clojure) and garbage collection? And how come if it is faster, there is still latency (as i said in the beggining, you can't have a "Fluxus" on Java because of latency. It seems a contradiction, i just don't get it. Thanks!
4
9,804,891
03/21/2012 12:45:39
1,151,429
01/16/2012 07:55:58
35
0
List in class with pointers
"Players must have the capability to know what's in the bag anytime during the game. The method does not accept any arguments, and once called, will list all the contents of the bag and show the total number of items the bag is currently holding. It will also list the characteristics of each magical item under the name of the current item being displayed." #include <iostream> #include <conio.h> #include <string> using namespace std; class MysticalBag { private: int useContent,rangeContent; string word; public: void inventory() { useContent; rangeContent; word; } void addItems() { cout << "Enter use count (1-3)" << endl; cin >> useContent; if(useContent > 1 && useContent < 4) { cout << "Enter content (1.0 - 100.0)" << endl; cin >> rangeContent; if(rangeContent > 1.0 && rangeContent < 101) { cout << "Enter items name as text" << endl; cin >> word; this->inventory(); } else { cout << "Invalid" << endl; } } else { cout << "Invalid!" << endl; exit(1); } } void showItems() { cout << "Showing Item content" << endl; cout << word << endl; cout << "U - " << useContent << ", C - " << rangeContent; } }; int main() { char choice; MysticalBag start; MysticalBag *Head = new MysticalBag(); MysticalBag *Body = new MysticalBag(); MysticalBag *Tail = new MysticalBag(); cout << "What do you want to do with the bag?" << endl << endl; cout << "(a)dd item" << endl; cout << "(r)emove item" << endl; cout << "(s)how items" << endl; cout << "e(x)it" << endl; cin >> choice; if(choice == 'a') { start.addItems(); main(); } else if(choice == 'r') { } else if(choice == 's') { start.showItems(); main(); } else if(choice == 'x') { cout << "Thanks for playing!" << endl; getch(); exit(1); } getch(); } Problem: 1.) How can I put any values in the invertory, but it doesnt allow me to take any arguments. 2.) If the user wants to put in two items. How do I do that 3.) Showing multiple items in the `showItems()`
c++
list
class
pointers
null
03/21/2012 21:23:03
not a real question
List in class with pointers === "Players must have the capability to know what's in the bag anytime during the game. The method does not accept any arguments, and once called, will list all the contents of the bag and show the total number of items the bag is currently holding. It will also list the characteristics of each magical item under the name of the current item being displayed." #include <iostream> #include <conio.h> #include <string> using namespace std; class MysticalBag { private: int useContent,rangeContent; string word; public: void inventory() { useContent; rangeContent; word; } void addItems() { cout << "Enter use count (1-3)" << endl; cin >> useContent; if(useContent > 1 && useContent < 4) { cout << "Enter content (1.0 - 100.0)" << endl; cin >> rangeContent; if(rangeContent > 1.0 && rangeContent < 101) { cout << "Enter items name as text" << endl; cin >> word; this->inventory(); } else { cout << "Invalid" << endl; } } else { cout << "Invalid!" << endl; exit(1); } } void showItems() { cout << "Showing Item content" << endl; cout << word << endl; cout << "U - " << useContent << ", C - " << rangeContent; } }; int main() { char choice; MysticalBag start; MysticalBag *Head = new MysticalBag(); MysticalBag *Body = new MysticalBag(); MysticalBag *Tail = new MysticalBag(); cout << "What do you want to do with the bag?" << endl << endl; cout << "(a)dd item" << endl; cout << "(r)emove item" << endl; cout << "(s)how items" << endl; cout << "e(x)it" << endl; cin >> choice; if(choice == 'a') { start.addItems(); main(); } else if(choice == 'r') { } else if(choice == 's') { start.showItems(); main(); } else if(choice == 'x') { cout << "Thanks for playing!" << endl; getch(); exit(1); } getch(); } Problem: 1.) How can I put any values in the invertory, but it doesnt allow me to take any arguments. 2.) If the user wants to put in two items. How do I do that 3.) Showing multiple items in the `showItems()`
1
6,824,924
07/26/2011 03:28:55
851,508
07/19/2011 07:49:06
28
0
Which is the best web hosting provider support MongoDB ASP.NET MVC ?
Have you ever tried MongoDB? Is is good for social network site (about performance and storage space), Dose it work well with asp.net mvc and what is the best web hosting provider support MongoDB ASP.NET MVC ?
asp.net
asp.net-mvc
database
database-design
null
07/26/2011 04:59:10
not constructive
Which is the best web hosting provider support MongoDB ASP.NET MVC ? === Have you ever tried MongoDB? Is is good for social network site (about performance and storage space), Dose it work well with asp.net mvc and what is the best web hosting provider support MongoDB ASP.NET MVC ?
4
4,663,717
01/11/2011 23:09:11
456,832
09/24/2010 02:03:57
106
14
Why not use .NET instead of javascript with HTML5 ??
Why are we still using javascript 'only' in web-browsers theses days? It doesn't support operators, structs(value types) & a huge number of other basic Object Oriented principles that greatly improve the programmers coding ability in power & speed? Why don't we use the openSource .NET CLR Mono instead or something equivalent? Why people insist on just putting hack in's to existing old languages is beyond me.. I mean we have a chance here with HTLM5 to start clean. Also why are we not passing the client computer a pre-compiled library instead of embedded javascript code? This would greatly increase performance, not to mention the the code-behind is crapping up the HTML markup & in my mind is all totally just wrong... I would love to make some web-apps for say ChromeOS, but i'm not going to touch the crap if javascript doesn't even have operators. Sorry for the frustrated tones i'm giving, but I see something with great potential here in ChromeOS's model but if they want to compete with MS then they need to focus on better Dev tools for the people that make there stuff tick. Thats the one thing I rly like about MS, they have killer languages & tools for them. NOTE: I'm not a web-developer(as you can probably guess why), so correct me if i'm wrong on anything or need clerity tnx.
javascript
.net
html5
mono
null
01/12/2011 00:17:21
not constructive
Why not use .NET instead of javascript with HTML5 ?? === Why are we still using javascript 'only' in web-browsers theses days? It doesn't support operators, structs(value types) & a huge number of other basic Object Oriented principles that greatly improve the programmers coding ability in power & speed? Why don't we use the openSource .NET CLR Mono instead or something equivalent? Why people insist on just putting hack in's to existing old languages is beyond me.. I mean we have a chance here with HTLM5 to start clean. Also why are we not passing the client computer a pre-compiled library instead of embedded javascript code? This would greatly increase performance, not to mention the the code-behind is crapping up the HTML markup & in my mind is all totally just wrong... I would love to make some web-apps for say ChromeOS, but i'm not going to touch the crap if javascript doesn't even have operators. Sorry for the frustrated tones i'm giving, but I see something with great potential here in ChromeOS's model but if they want to compete with MS then they need to focus on better Dev tools for the people that make there stuff tick. Thats the one thing I rly like about MS, they have killer languages & tools for them. NOTE: I'm not a web-developer(as you can probably guess why), so correct me if i'm wrong on anything or need clerity tnx.
4
8,104,113
11/12/2011 11:18:03
997,652
10/16/2011 09:04:19
5
1
Call SplitviewController from other ViewController
In my iPad-application I have ViewController, that shows a menu. From that menu I pushed a new TableviewController. Now I want to have a SplitViewController instead of a TableViewController. I read, that I cant push the SplitViewController like the TableViewController and that I have to exchange my current NavigationController. Can you give me an example how to replace my TableViewController etc. with a SplitViewController?
uisplitviewcontroller
null
null
null
null
null
open
Call SplitviewController from other ViewController === In my iPad-application I have ViewController, that shows a menu. From that menu I pushed a new TableviewController. Now I want to have a SplitViewController instead of a TableViewController. I read, that I cant push the SplitViewController like the TableViewController and that I have to exchange my current NavigationController. Can you give me an example how to replace my TableViewController etc. with a SplitViewController?
0
10,515,217
05/09/2012 11:33:10
1,283,330
03/21/2012 12:19:05
1
1
Duplicate Hash Map Key Values In JAVA GWT
I am making a web application using gwt. In that a dropdown list of users is populated from database, in that some users are active and some are idle. Dropdown will display all the users irrespective of their status. Problem is: When other user select a item from dropdown list, it must show a pop-up saying "THIS USER IS IDLE". I'm using hash map to save usernames as keys and their status as value. On every selection from the list I want to compare the value with status of that username. its urgent, plz help me.
java
gwt
drop-down-menu
hashmap
keys
05/10/2012 03:59:32
too localized
Duplicate Hash Map Key Values In JAVA GWT === I am making a web application using gwt. In that a dropdown list of users is populated from database, in that some users are active and some are idle. Dropdown will display all the users irrespective of their status. Problem is: When other user select a item from dropdown list, it must show a pop-up saying "THIS USER IS IDLE". I'm using hash map to save usernames as keys and their status as value. On every selection from the list I want to compare the value with status of that username. its urgent, plz help me.
3
1,099,064
07/08/2009 16:11:58
71,522
02/26/2009 18:36:33
1,063
39
Do beautiful, user-friendly Java applets exist?
When I think of the words "Java applet", words like "ugly", "slow", "painful", and "why is that button cropped?" come to my head. So I'm curious. Is it possible to make a nice, user-friendly Java applet? Or, even, can you point me towards examples of Java applets which aren't hideous?
java
applet
null
null
null
12/01/2011 04:48:53
not constructive
Do beautiful, user-friendly Java applets exist? === When I think of the words "Java applet", words like "ugly", "slow", "painful", and "why is that button cropped?" come to my head. So I'm curious. Is it possible to make a nice, user-friendly Java applet? Or, even, can you point me towards examples of Java applets which aren't hideous?
4
3,809,640
09/28/2010 04:13:45
460,171
09/28/2010 04:13:45
1
0
Clarifying questions in testing interview
Should I ask questions to interviewer to fully understand the functional and non-funtional requirements of a product if interviewer asks me to test that product and does not specify any other detail? For example, if interviwer asks me to test a Search Button – should I ask the following questions: How fast the user should be able to get the results? What is the max size of text box which is associated with Search Button? etc.
testing
interview-questions
qa
null
null
09/29/2010 18:04:25
off topic
Clarifying questions in testing interview === Should I ask questions to interviewer to fully understand the functional and non-funtional requirements of a product if interviewer asks me to test that product and does not specify any other detail? For example, if interviwer asks me to test a Search Button – should I ask the following questions: How fast the user should be able to get the results? What is the max size of text box which is associated with Search Button? etc.
2
3,197,944
07/07/2010 19:02:46
110,397
05/21/2009 08:39:20
224
19
Downloading multiple files from remote location with progress bar
I need to implement a feature where a user can paste one or more YouTube links, a PHP script then downloads all of them, displays progress bar for each download and then inserts relevant information about them to database. How should I go about implementing this... Is this achievable with just file_get_contents()? Or perhaps I should use cURL? And how would I implement the progress bar for each download process? I was thinking if you could do this with jQuery somehow. Help appreciated. Thanks.
php
jquery
ajax
file-download
null
null
open
Downloading multiple files from remote location with progress bar === I need to implement a feature where a user can paste one or more YouTube links, a PHP script then downloads all of them, displays progress bar for each download and then inserts relevant information about them to database. How should I go about implementing this... Is this achievable with just file_get_contents()? Or perhaps I should use cURL? And how would I implement the progress bar for each download process? I was thinking if you could do this with jQuery somehow. Help appreciated. Thanks.
0
10,955,083
06/08/2012 19:38:41
1,445,294
06/08/2012 19:27:36
1
0
SQL server injects personal data into SQL or Back Up file?
When i make SQL query file or backup file etc, will MS SQL Server inject personal info, file/folder structure info , System Information of my computer in that files ? If i forget to tell you some other kind of information, please tell me if sql inject it into my files. Thanks very much.
sql-server
privacy
null
null
null
06/09/2012 11:59:38
off topic
SQL server injects personal data into SQL or Back Up file? === When i make SQL query file or backup file etc, will MS SQL Server inject personal info, file/folder structure info , System Information of my computer in that files ? If i forget to tell you some other kind of information, please tell me if sql inject it into my files. Thanks very much.
2
10,658,038
05/18/2012 18:39:35
1,403,994
05/18/2012 17:47:21
1
0
.Net SDK for Biometric scanning
I am planning to implement a Biometric authentication system for Card less shopping Purpose is to use the fingerprint scanning as one of authentication method for bank transaction Am looking for a solution in DOT net that can be used to scan finger prints and as I researched could find verifinger, griaule as some of the good SDKs I need a SDK that can perfectly scan the finger print even with images of different qualities/ clarity not only from finger print readers but also scanned images of finger prints Please help me with which one would be a good choice Regards Sreekar
asp.net
.net
null
null
null
null
open
.Net SDK for Biometric scanning === I am planning to implement a Biometric authentication system for Card less shopping Purpose is to use the fingerprint scanning as one of authentication method for bank transaction Am looking for a solution in DOT net that can be used to scan finger prints and as I researched could find verifinger, griaule as some of the good SDKs I need a SDK that can perfectly scan the finger print even with images of different qualities/ clarity not only from finger print readers but also scanned images of finger prints Please help me with which one would be a good choice Regards Sreekar
0
7,303,594
09/05/2011 03:10:59
928,186
09/05/2011 03:10:59
1
0
why am I getting a stack flow error and how to change it
My code is below...I can't see why it says I am having a non static when I am declaring it new public class JavaApplication1 { /** * @param args the command line arguments */ public static void main(String[] args) throws Exception { double weight; //weigh in of meeting String meetingname = "Monday 1"; weight = 4; int curweek = 1; //current week int weeks = 8; //number of weeks Meeting[] meetings; //new meetings int i; //states witch selection String s; //String mynames; int total = 8; //total number of weeks for competition double[] weightloss; weightloss = new double[8]; // TODO code application logic here //System.out.println("weight square root " + Math.sqrt(weight)); //learning on weight //print out who selection screen System.out.println("Week " + curweek + " of competition is"); System.out.println("weightloss size = " + weightloss.length); System.out.println("What would you like to do "); System.out.println(); System.out.println("1. Check on who is winning"); System.out.println("2. Show all weight ins for a meeting"); System.out.println("3. Add a weight in for a meeting"); System.out.println(); //ask for entry one character /*System.out.println("Enter a character"); i = (char)System.in.read(); System.in.read(); //captures enter key System.out.println("You entered " + i);*/ //check if file exists //if no file exists, create meetings s = JOptionPane.showInputDialog("How many meetings will there be"); i = Integer.parseInt(s); JOptionPane.showMessageDialog(null, "There will be " + i + " meetings"); //how many weeks s = JOptionPane.showInputDialog("How many weeks will there be"); weeks = Integer.parseInt(s); JOptionPane.showMessageDialog(null, "There will be " + weeks + " weeks"); meetings = new Meeting [weeks]; //enter names of meetings String[] mynames = new String [i]; for(int j=0; j<i ; j++) { mynames[j] = JOptionPane.showInputDialog("Enter name of meeting " + j); JOptionPane.showMessageDialog(null, "Meeting " + j + "is " + s); } //fill meeting with names fillMeetings(weeks, mynames, meetings); //choose a selection s = JOptionPane.showInputDialog("How many meetings will there be"); i = Integer.parseInt(s); JOptionPane.showMessageDialog(null, "There will be " + i + " meetings"); switch(i) { case 1: System.out.println("The current winner is"); break; case 2: System.out.println("All weight ins for meeting"); break; case 3: System.out.println("Add weigh in for a particular meeting"); System.out.println("Your in week " + curweek); break; case 4: System.out.println("Current place for all meetings"); break; default: System.out.println("Invalid value"); } System.exit(0); } public void fillMeetings(int w, String[] names, Meeting... m){ //fill meetings in array m for w weeks for (int i=0; i<names.length; i++) { m[i].setMeeting(names[i],w); } } }
java
null
null
null
null
09/05/2011 06:21:06
not a real question
why am I getting a stack flow error and how to change it === My code is below...I can't see why it says I am having a non static when I am declaring it new public class JavaApplication1 { /** * @param args the command line arguments */ public static void main(String[] args) throws Exception { double weight; //weigh in of meeting String meetingname = "Monday 1"; weight = 4; int curweek = 1; //current week int weeks = 8; //number of weeks Meeting[] meetings; //new meetings int i; //states witch selection String s; //String mynames; int total = 8; //total number of weeks for competition double[] weightloss; weightloss = new double[8]; // TODO code application logic here //System.out.println("weight square root " + Math.sqrt(weight)); //learning on weight //print out who selection screen System.out.println("Week " + curweek + " of competition is"); System.out.println("weightloss size = " + weightloss.length); System.out.println("What would you like to do "); System.out.println(); System.out.println("1. Check on who is winning"); System.out.println("2. Show all weight ins for a meeting"); System.out.println("3. Add a weight in for a meeting"); System.out.println(); //ask for entry one character /*System.out.println("Enter a character"); i = (char)System.in.read(); System.in.read(); //captures enter key System.out.println("You entered " + i);*/ //check if file exists //if no file exists, create meetings s = JOptionPane.showInputDialog("How many meetings will there be"); i = Integer.parseInt(s); JOptionPane.showMessageDialog(null, "There will be " + i + " meetings"); //how many weeks s = JOptionPane.showInputDialog("How many weeks will there be"); weeks = Integer.parseInt(s); JOptionPane.showMessageDialog(null, "There will be " + weeks + " weeks"); meetings = new Meeting [weeks]; //enter names of meetings String[] mynames = new String [i]; for(int j=0; j<i ; j++) { mynames[j] = JOptionPane.showInputDialog("Enter name of meeting " + j); JOptionPane.showMessageDialog(null, "Meeting " + j + "is " + s); } //fill meeting with names fillMeetings(weeks, mynames, meetings); //choose a selection s = JOptionPane.showInputDialog("How many meetings will there be"); i = Integer.parseInt(s); JOptionPane.showMessageDialog(null, "There will be " + i + " meetings"); switch(i) { case 1: System.out.println("The current winner is"); break; case 2: System.out.println("All weight ins for meeting"); break; case 3: System.out.println("Add weigh in for a particular meeting"); System.out.println("Your in week " + curweek); break; case 4: System.out.println("Current place for all meetings"); break; default: System.out.println("Invalid value"); } System.exit(0); } public void fillMeetings(int w, String[] names, Meeting... m){ //fill meetings in array m for w weeks for (int i=0; i<names.length; i++) { m[i].setMeeting(names[i],w); } } }
1
3,897,007
10/09/2010 17:00:08
459,331
09/27/2010 09:42:30
6
1
Writing in text view of different tabs in android
I have to manage different text views in tabs for chatting in android.In my code if a list item is clicked new tab will be generated having one text view one EditText box and a button.With the construction of the tab a new class having will be initialized which will check whether there is any new message or not after every 30 seconds.If new message comes then this will write to that specific text view of the tab.My sample code is follwing:`ForPractice fp=new ForPractice(tabHost,"abcd");`When a tab is created this class is called.In its constructor I am sending tabtag and tabhost.And this class consists of following code: `public class ForPractice implements Runnable{ String str; Thread thrd; TabHost host; public ForPractice(TabHost tabHost,String name) { str=name; thrd=new Thread(this, name); this.host= host; thrd.start(); } @Override public void run() { while(true) { try { str="This is for test\n"; thrd.sleep(30000); str=""; test(); } catch (Exception e) { // TODO Auto-generated catch block System.out.println(e.getMessage()); } } } private void test() { // get tab by tab, where tag=str (passed during the constructor) // access the textview in this tab // append text(str) in that textview } }`
android
null
null
null
null
null
open
Writing in text view of different tabs in android === I have to manage different text views in tabs for chatting in android.In my code if a list item is clicked new tab will be generated having one text view one EditText box and a button.With the construction of the tab a new class having will be initialized which will check whether there is any new message or not after every 30 seconds.If new message comes then this will write to that specific text view of the tab.My sample code is follwing:`ForPractice fp=new ForPractice(tabHost,"abcd");`When a tab is created this class is called.In its constructor I am sending tabtag and tabhost.And this class consists of following code: `public class ForPractice implements Runnable{ String str; Thread thrd; TabHost host; public ForPractice(TabHost tabHost,String name) { str=name; thrd=new Thread(this, name); this.host= host; thrd.start(); } @Override public void run() { while(true) { try { str="This is for test\n"; thrd.sleep(30000); str=""; test(); } catch (Exception e) { // TODO Auto-generated catch block System.out.println(e.getMessage()); } } } private void test() { // get tab by tab, where tag=str (passed during the constructor) // access the textview in this tab // append text(str) in that textview } }`
0
1,377,679
09/04/2009 07:21:47
161,885
08/24/2009 07:02:03
16
0
Problem with event handling on QToolButton in Linux
I am developing an application, I have added a QToolBar object in that, and have added the QToolButton object on that, I have also connect the clicked() event with that but the problem is that the mouse click event don't work on QToolButton but when I bring focus on that using Tab, then space button works fine, but I want it with mouse click.. any idea? here is the code. pToolBar = new QToolBar(this); pToolBar->setAllowedAreas(Qt::NoToolBarArea);//NoToolBarAreaAllToolBarAreas pToolBar->setFloatable(false); pToolBar->setGeometry(300,0,160,30); QToolButton *playButton=new QToolButton(pToolBar); playButton->setIcon(QIcon("/images/play.png")); playButton->setGeometry(10,0,40,30); playButton->setToolTip("Play/Pause"); connect(playButton, SIGNAL(clicked()),SLOT(playButtonClicked()));
linux
c++
qt
null
null
null
open
Problem with event handling on QToolButton in Linux === I am developing an application, I have added a QToolBar object in that, and have added the QToolButton object on that, I have also connect the clicked() event with that but the problem is that the mouse click event don't work on QToolButton but when I bring focus on that using Tab, then space button works fine, but I want it with mouse click.. any idea? here is the code. pToolBar = new QToolBar(this); pToolBar->setAllowedAreas(Qt::NoToolBarArea);//NoToolBarAreaAllToolBarAreas pToolBar->setFloatable(false); pToolBar->setGeometry(300,0,160,30); QToolButton *playButton=new QToolButton(pToolBar); playButton->setIcon(QIcon("/images/play.png")); playButton->setGeometry(10,0,40,30); playButton->setToolTip("Play/Pause"); connect(playButton, SIGNAL(clicked()),SLOT(playButtonClicked()));
0
7,008,630
08/10/2011 09:34:13
863,684
07/26/2011 14:47:34
1
0
event files in android (etc/input/event*)
I've write a C++ code to read events from the event files of android. But I can't copy such files (etc/input/event) from the device to my PC. When I type pull instruction in the android shell, it takes a long time and does not respond. I will be appreciated if anybody can help me.
android
null
null
null
null
08/10/2011 18:01:07
not a real question
event files in android (etc/input/event*) === I've write a C++ code to read events from the event files of android. But I can't copy such files (etc/input/event) from the device to my PC. When I type pull instruction in the android shell, it takes a long time and does not respond. I will be appreciated if anybody can help me.
1
11,215,121
06/26/2012 20:04:06
1,052,306
11/17/2011 17:01:38
20
1
having trouble getting sales for quarter
I'm trying to pull out the sales totals for quarter 1. I can't seem to get this to work. Any suggestions? $total = 0; $orders = Mage::getModel('sales_order/collection') ->addAttributeToSelect('*') ->addAttributeToFilter('created_at', array( 'from' => '2012-01-01', 'to' => '2012-03-31')); foreach ($orders as $order) { $total += $order->getGrandTotal(); } echo $total;
php
magento
null
null
null
null
open
having trouble getting sales for quarter === I'm trying to pull out the sales totals for quarter 1. I can't seem to get this to work. Any suggestions? $total = 0; $orders = Mage::getModel('sales_order/collection') ->addAttributeToSelect('*') ->addAttributeToFilter('created_at', array( 'from' => '2012-01-01', 'to' => '2012-03-31')); foreach ($orders as $order) { $total += $order->getGrandTotal(); } echo $total;
0
10,975,205
06/11/2012 06:16:35
1,063,461
11/24/2011 07:48:10
1
2
How does ASP.NET MVC work?
About asp.net mvc,I want to know:what's the different from asp.net web form ? And what's the lifecycle? And where are extension points ?
asp.net
asp.net-mvc
null
null
null
06/11/2012 07:42:13
not constructive
How does ASP.NET MVC work? === About asp.net mvc,I want to know:what's the different from asp.net web form ? And what's the lifecycle? And where are extension points ?
4
53,338
09/10/2008 02:41:32
5,408
09/09/2008 13:23:01
11
1
What are the disadvantages of Typed DataSets
I come from a world that favors building your own rather than rely on libraries and frameworks built by others. After escaping this world I have found the joy, and ease, of using such tools as Typed DataSets within Visual Studio. So besides the loss of flexibility what else do you lose? Are there performance factors (disregarding the procs vs dynamic sql debate)? Limitations?
.net
dataset
dal
null
null
null
open
What are the disadvantages of Typed DataSets === I come from a world that favors building your own rather than rely on libraries and frameworks built by others. After escaping this world I have found the joy, and ease, of using such tools as Typed DataSets within Visual Studio. So besides the loss of flexibility what else do you lose? Are there performance factors (disregarding the procs vs dynamic sql debate)? Limitations?
0
6,841,448
07/27/2011 08:27:02
790,794
06/09/2011 11:18:10
28
8
Error messages in Console...
The console is showing following statements every time I run my application either on simulator or on iPhone. What does it actually want to say? <br/> ** ***attempt to pop an unknown autorelease pool (0x6830200) <br/> < Error >: CGContextScaleCTM: invalid context 0x0 <br/> < Error >: CGContextTranslateCTM: invalid context 0x0 <br/> < Error >: CGContextConcatCTM: invalid context 0x0 <br/> < Error >: CGContextDrawImage: invalid context 0x0 <br/> < Error >: CGContextScaleCTM: invalid context 0x0 <br/> < Error >: CGContextTranslateCTM: invalid context 0x0 <br/> < Error >: CGContextConcatCTM: invalid context 0x0 <br/> < Error >: CGContextDrawImage: invalid context 0x0 <br/> < Error >: CGContextScaleCTM: invalid context 0x0 <br/> < Error >: CGContextTranslateCTM: invalid context 0x0 <br/> < Error >: CGContextConcatCTM: invalid context 0x0 <br/> < Error >: CGContextTranslateCTM: invalid context 0x0 <br/> < Error >: CGContextConcatCTM: invalid context 0x0 <br/> < Error >: CGContextDrawImage: invalid context 0x0 <br/>** How to resolve it?
objective-c
xcode
iphone-sdk-4.0
cgcontext
null
null
open
Error messages in Console... === The console is showing following statements every time I run my application either on simulator or on iPhone. What does it actually want to say? <br/> ** ***attempt to pop an unknown autorelease pool (0x6830200) <br/> < Error >: CGContextScaleCTM: invalid context 0x0 <br/> < Error >: CGContextTranslateCTM: invalid context 0x0 <br/> < Error >: CGContextConcatCTM: invalid context 0x0 <br/> < Error >: CGContextDrawImage: invalid context 0x0 <br/> < Error >: CGContextScaleCTM: invalid context 0x0 <br/> < Error >: CGContextTranslateCTM: invalid context 0x0 <br/> < Error >: CGContextConcatCTM: invalid context 0x0 <br/> < Error >: CGContextDrawImage: invalid context 0x0 <br/> < Error >: CGContextScaleCTM: invalid context 0x0 <br/> < Error >: CGContextTranslateCTM: invalid context 0x0 <br/> < Error >: CGContextConcatCTM: invalid context 0x0 <br/> < Error >: CGContextTranslateCTM: invalid context 0x0 <br/> < Error >: CGContextConcatCTM: invalid context 0x0 <br/> < Error >: CGContextDrawImage: invalid context 0x0 <br/>** How to resolve it?
0
8,254,836
11/24/2011 09:35:45
654,019
03/10/2011 17:32:46
215
4
Do you use EasyProp library?
I saw this ([http://code.google.com/p/easyprop/][1]) library and it seems a good library. I am wondering if anybody using it in commercial product? Is it a mature library? [1]: http://code.google.com/p/easyprop/
c#
wpf
null
null
null
11/25/2011 10:07:39
not a real question
Do you use EasyProp library? === I saw this ([http://code.google.com/p/easyprop/][1]) library and it seems a good library. I am wondering if anybody using it in commercial product? Is it a mature library? [1]: http://code.google.com/p/easyprop/
1
9,440,223
02/25/2012 01:13:00
288,570
03/08/2010 07:14:20
76
2
In zc.buildout, how do I install egg A, then install egg B which needs egg A to install correctly?
Specifically, here's the situation I'm running into: I am using zc.buildout to install an application which requires pymssql. Pymssql requires Cython in order to install properly. However, I would like to not modify my running environment, so I would like to do something like: 1. Install Cython 2. Load Cython into buildout 3. Install Pymssql. I thought Buildout did this already, but it looks more like it checks the setup.cfg to ensure that anything that explicitly stated as necessary is installed. Current my buildout looks like: [buildout] parts = required-eggs ... [required-eggs] eggs = Cython pymssql Cython installs fine. Unfortunately pymssql does not: return self.build_and_install(setup_script, setup_base) File "/usr/lib/python2.7/dist-packages/setuptools/command/easy_install.py", line 1101, in build_and_install self.run_setup(setup_script, setup_base, args) File "/usr/lib/python2.7/dist-packages/setuptools/command/easy_install.py", line 1090, in run_setup run_setup(setup_script, args) File "/usr/lib/python2.7/dist-packages/setuptools/sandbox.py", line 29, in run_setup lambda: execfile( File "/usr/lib/python2.7/dist-packages/setuptools/sandbox.py", line 70, in run return func() File "/usr/lib/python2.7/dist-packages/setuptools/sandbox.py", line 31, in <lambda> {'__file__':setup_script, '__name__':'__main__'} File "setup.py", line 41, in <module> ImportError: No module named Cython.Distutils Thus, I think that Cython is installed as an egg, but is not loaded into the python process that is running buildout. Is there some configuration in buildout that will allow me to do this?
python
cython
buildout
pymssql
null
null
open
In zc.buildout, how do I install egg A, then install egg B which needs egg A to install correctly? === Specifically, here's the situation I'm running into: I am using zc.buildout to install an application which requires pymssql. Pymssql requires Cython in order to install properly. However, I would like to not modify my running environment, so I would like to do something like: 1. Install Cython 2. Load Cython into buildout 3. Install Pymssql. I thought Buildout did this already, but it looks more like it checks the setup.cfg to ensure that anything that explicitly stated as necessary is installed. Current my buildout looks like: [buildout] parts = required-eggs ... [required-eggs] eggs = Cython pymssql Cython installs fine. Unfortunately pymssql does not: return self.build_and_install(setup_script, setup_base) File "/usr/lib/python2.7/dist-packages/setuptools/command/easy_install.py", line 1101, in build_and_install self.run_setup(setup_script, setup_base, args) File "/usr/lib/python2.7/dist-packages/setuptools/command/easy_install.py", line 1090, in run_setup run_setup(setup_script, args) File "/usr/lib/python2.7/dist-packages/setuptools/sandbox.py", line 29, in run_setup lambda: execfile( File "/usr/lib/python2.7/dist-packages/setuptools/sandbox.py", line 70, in run return func() File "/usr/lib/python2.7/dist-packages/setuptools/sandbox.py", line 31, in <lambda> {'__file__':setup_script, '__name__':'__main__'} File "setup.py", line 41, in <module> ImportError: No module named Cython.Distutils Thus, I think that Cython is installed as an egg, but is not loaded into the python process that is running buildout. Is there some configuration in buildout that will allow me to do this?
0
11,096,236
06/19/2012 07:23:49
1,154,911
01/17/2012 21:21:18
13
0
In CSS, can I get inline-blocks to display next to each other without floating?
I'm trying to figure out how to use inline-block. For now, I want to know if I'm using it wrong, or if there's a bug. But I do not want to deal with floats, at least for now. I want to have a image with a title under it, and a full description next to it. Other articles have indicated overflow:hidden or vertical-align should do it, but I can't figure it out. I'm using Firefox (I just updated to most recent), but this is more or less what I'm trying to figure out on jsfiddle: http://jsfiddle.net/7LSb8/3/ I would have expected that inline-block would let the 2 divs next to each other, regardless of their contents(including br tags), but the description winds up below the img/title section. Once I have this, then I want to extend it with more of these image/description blocks on the page - like 2 on a row next to each other.
html
css
div
inline-block
null
06/19/2012 11:54:38
too localized
In CSS, can I get inline-blocks to display next to each other without floating? === I'm trying to figure out how to use inline-block. For now, I want to know if I'm using it wrong, or if there's a bug. But I do not want to deal with floats, at least for now. I want to have a image with a title under it, and a full description next to it. Other articles have indicated overflow:hidden or vertical-align should do it, but I can't figure it out. I'm using Firefox (I just updated to most recent), but this is more or less what I'm trying to figure out on jsfiddle: http://jsfiddle.net/7LSb8/3/ I would have expected that inline-block would let the 2 divs next to each other, regardless of their contents(including br tags), but the description winds up below the img/title section. Once I have this, then I want to extend it with more of these image/description blocks on the page - like 2 on a row next to each other.
3
11,667,742
07/26/2012 10:54:27
1,546,022
07/23/2012 13:46:55
7
0
Java send a txt file to a server
So my professor asked me to edit my program so that it sends the contents of a txt file to his server. He gave me a hint telling me to look into java HTTP request. Can you give me an example code showing how to send to a server. Thanks
java
webserver
null
null
null
07/27/2012 12:47:16
not a real question
Java send a txt file to a server === So my professor asked me to edit my program so that it sends the contents of a txt file to his server. He gave me a hint telling me to look into java HTTP request. Can you give me an example code showing how to send to a server. Thanks
1
3,020,779
06/11/2010 06:59:14
92,568
04/18/2009 18:45:13
179
2
Perl and Multimap
Is there way to implement multimap in perl.
perl
null
null
null
null
null
open
Perl and Multimap === Is there way to implement multimap in perl.
0
4,073,530
11/01/2010 22:09:55
256,761
01/22/2010 13:33:30
93
0
Anyone know a CrowdSource Framework or Open source Project?
I'll looking to intagrate some Crowdsource features into a few existing webapps (.NET & php) Features like - Reputation - Comment / tag control based on reputation - VoteUp/Votedown - Badges/rewards etc,etc I'm wondering if anyone knows an Open source or Commercial Framework that can accomadate? The ASP.NET one uses MS Membership provider. Perhaps some 'enhancement' of this? Thanks
php
.net
open-source
crowd
null
05/06/2012 22:26:11
off topic
Anyone know a CrowdSource Framework or Open source Project? === I'll looking to intagrate some Crowdsource features into a few existing webapps (.NET & php) Features like - Reputation - Comment / tag control based on reputation - VoteUp/Votedown - Badges/rewards etc,etc I'm wondering if anyone knows an Open source or Commercial Framework that can accomadate? The ASP.NET one uses MS Membership provider. Perhaps some 'enhancement' of this? Thanks
2
1,740,187
11/16/2009 05:13:38
105,905
05/13/2009 02:26:01
27
1
Linux boot loader
I'm trying to boot Linux on a GPS device from a SD card. I have found some informations about the device on Internet and apparently it's possible to load a customized Windows CE. To achieve this, they use a boot loader file that has the extention ".bld" I extracted the ISO of Ubuntu MID on the SD card, but there is no files with a bld extension. I guess it use a different boot loader system .. which doesn't seem to work on the device. So my question is; Is there a way to use a "bld" file to boot Linux ? If so, how can I create the file ? I'm sorry if the question is stupid or off-track, I don't know much about boot loaders .. In case you wonder, here's the device: http://www.curtisint.com/web/browser.asp?productID=GPD359&catName=GLOBAL%20POSITIONING%20SYSTEM More detailed specs (and mod site): http://gpd359.wikidot.com/article:outofbox
linux
bootloader
null
null
null
11/16/2009 12:31:05
off topic
Linux boot loader === I'm trying to boot Linux on a GPS device from a SD card. I have found some informations about the device on Internet and apparently it's possible to load a customized Windows CE. To achieve this, they use a boot loader file that has the extention ".bld" I extracted the ISO of Ubuntu MID on the SD card, but there is no files with a bld extension. I guess it use a different boot loader system .. which doesn't seem to work on the device. So my question is; Is there a way to use a "bld" file to boot Linux ? If so, how can I create the file ? I'm sorry if the question is stupid or off-track, I don't know much about boot loaders .. In case you wonder, here's the device: http://www.curtisint.com/web/browser.asp?productID=GPD359&catName=GLOBAL%20POSITIONING%20SYSTEM More detailed specs (and mod site): http://gpd359.wikidot.com/article:outofbox
2
11,240,980
06/28/2012 08:42:34
1,487,940
06/28/2012 08:37:38
1
0
How can create browser page with browser?
How can create browser page with browser ? Like for example test environment provided in w3schools.com, we can not see the code
javascript
html
css
null
null
06/28/2012 14:58:47
not a real question
How can create browser page with browser? === How can create browser page with browser ? Like for example test environment provided in w3schools.com, we can not see the code
1
7,710,032
10/10/2011 08:09:18
877,235
08/03/2011 18:39:14
152
14
weird #define declaration, can't understand to what it expand
I have this #define statement in legacy code I'm inspecting in c. #define STEP(x) case x: STEP ## x : WPAN_Startup_Step = x; This is a macro to replace cases in a very big switch state machine. I can't understand what's going on in this macro. to what does it expand to ?
c
define
null
null
null
null
open
weird #define declaration, can't understand to what it expand === I have this #define statement in legacy code I'm inspecting in c. #define STEP(x) case x: STEP ## x : WPAN_Startup_Step = x; This is a macro to replace cases in a very big switch state machine. I can't understand what's going on in this macro. to what does it expand to ?
0
10,087,528
04/10/2012 11:05:55
1,154,781
01/17/2012 20:08:34
1
0
Error on Building openCV program in C++ netbeans
I've tried a simple image inversion program in C in netbeans6.8 with OpenCV2.0 i've successfully configured netbeans with OpenCV but when i try to build my application i get the following error , what I am missing please suggest. ERROR: /usr/bin/make -f nbproject/Makefile-Debug.mk SUBPROJECTS= .build-conf make[1]: Entering directory `/cygdrive/c/Documents and Settings/suresh/My Documents/NetBeansProjects/Myfirst_Project' /usr/bin/make -f nbproject/Makefile-Debug.mk dist/Debug/Cygwin-Windows/myfirst_project.exe make[2]: Entering directory `/cygdrive/c/Documents and Settings/suresh/My Documents/NetBeansProjects/Myfirst_Project' make[2]: *** No rule to make target `main.c', needed by `build/Debug/Cygwin-Windows/main.o'. Stop. make[2]: Leaving directory `/cygdrive/c/Documents and Settings/suresh/My Documents/NetBeansProjects/Myfirst_Project' nbproject/Makefile-Debug.mk:54: recipe for target `.build-conf' failed make[1]: *** [.build-conf] Error 2 make[1]: Leaving directory `/cygdrive/c/Documents and Settings/suresh/My Documents/NetBeansProjects/Myfirst_Project' nbproject/Makefile-impl.mk:39: recipe for target `.build-impl' failed make: *** [.build-impl] Error 2 BUILD FAILED (exit value 2, total time: 703ms)
opencv
null
null
null
null
04/11/2012 14:25:33
too localized
Error on Building openCV program in C++ netbeans === I've tried a simple image inversion program in C in netbeans6.8 with OpenCV2.0 i've successfully configured netbeans with OpenCV but when i try to build my application i get the following error , what I am missing please suggest. ERROR: /usr/bin/make -f nbproject/Makefile-Debug.mk SUBPROJECTS= .build-conf make[1]: Entering directory `/cygdrive/c/Documents and Settings/suresh/My Documents/NetBeansProjects/Myfirst_Project' /usr/bin/make -f nbproject/Makefile-Debug.mk dist/Debug/Cygwin-Windows/myfirst_project.exe make[2]: Entering directory `/cygdrive/c/Documents and Settings/suresh/My Documents/NetBeansProjects/Myfirst_Project' make[2]: *** No rule to make target `main.c', needed by `build/Debug/Cygwin-Windows/main.o'. Stop. make[2]: Leaving directory `/cygdrive/c/Documents and Settings/suresh/My Documents/NetBeansProjects/Myfirst_Project' nbproject/Makefile-Debug.mk:54: recipe for target `.build-conf' failed make[1]: *** [.build-conf] Error 2 make[1]: Leaving directory `/cygdrive/c/Documents and Settings/suresh/My Documents/NetBeansProjects/Myfirst_Project' nbproject/Makefile-impl.mk:39: recipe for target `.build-impl' failed make: *** [.build-impl] Error 2 BUILD FAILED (exit value 2, total time: 703ms)
3
3,217,911
07/10/2010 05:04:18
388,289
07/10/2010 05:04:18
1
0
Testing User Controls that utilize a presenter which in turn utilizes wcf services
I have basic WinForm user controls (view) whose intilization includes a presenter and model. The presenter includes calls to a wcf service. Recently an error has croped up that is very trying. Whenever I drag and drop one of these controls onto my design surface I am presented with an error that the endpoint with name "yadda" could not be found. This same behavior occurs if I try to run the usercontrol test container. If however, I comment out the intialization, add the control to my form, save the form, go to the control and uncomment the intialization, build, and then run my app evrything works fine. All my controls are in a Presentation project which has a reference to anothe rproject that containts the presenters and the models as well as a servic reference to my wcf service. I am hoping someone out that encountered similar difficulties and will have some advise. Thanks
wcf
unit-testing
usercontrols
null
null
null
open
Testing User Controls that utilize a presenter which in turn utilizes wcf services === I have basic WinForm user controls (view) whose intilization includes a presenter and model. The presenter includes calls to a wcf service. Recently an error has croped up that is very trying. Whenever I drag and drop one of these controls onto my design surface I am presented with an error that the endpoint with name "yadda" could not be found. This same behavior occurs if I try to run the usercontrol test container. If however, I comment out the intialization, add the control to my form, save the form, go to the control and uncomment the intialization, build, and then run my app evrything works fine. All my controls are in a Presentation project which has a reference to anothe rproject that containts the presenters and the models as well as a servic reference to my wcf service. I am hoping someone out that encountered similar difficulties and will have some advise. Thanks
0
5,860,036
05/02/2011 17:02:56
734,805
05/02/2011 17:02:56
1
0
please help me on Python
I want to retrieve data from url and insert that data in postgreSQL. Please send me some code examples in which i can upload images to server i am using Django, please help me
web.py
null
null
null
null
05/02/2011 18:10:31
not a real question
please help me on Python === I want to retrieve data from url and insert that data in postgreSQL. Please send me some code examples in which i can upload images to server i am using Django, please help me
1
10,325,012
04/25/2012 23:03:15
1,154,781
01/17/2012 20:08:34
1
0
Matching face from different images
I am beginner in OpenCV. I've detected face successfully and now what i am trying to do is matching the faces from two different images and returning the true or false value. How can i do this in openCV using c++ please help
c++
opencv
null
null
null
04/26/2012 11:55:30
not a real question
Matching face from different images === I am beginner in OpenCV. I've detected face successfully and now what i am trying to do is matching the faces from two different images and returning the true or false value. How can i do this in openCV using c++ please help
1
11,539,775
07/18/2012 10:57:56
93,647
04/21/2009 08:11:02
1,284
15
c# opensource project to draw graphics or should I write that myself?
In my trading software I need to draw graphics. I have huge array (about 20 000 000 items) of [x,y] (where x is time and y is price) and I need to display it on the graphic. I need ability to zoom interesting parts. Also I need ability to add custom labels to display trades and orders (or I can implement this myself). I'm looking for something simple and open. What can you recomend? If I should write that from scratch then what techniques should I use? If you can suggest brilliant library on another language (c++, java or whatever) that would be also fine.
c#
null
null
null
null
07/18/2012 11:20:12
not constructive
c# opensource project to draw graphics or should I write that myself? === In my trading software I need to draw graphics. I have huge array (about 20 000 000 items) of [x,y] (where x is time and y is price) and I need to display it on the graphic. I need ability to zoom interesting parts. Also I need ability to add custom labels to display trades and orders (or I can implement this myself). I'm looking for something simple and open. What can you recomend? If I should write that from scratch then what techniques should I use? If you can suggest brilliant library on another language (c++, java or whatever) that would be also fine.
4
4,348,836
12/03/2010 18:53:07
528,174
12/02/2010 15:34:12
6
0
How to build a web design program in C#
I would like to build my own html gui editor, but I can't figure out the basic structure for the application. Does anyone know of any sample code for building an editor? I would like to use Visual Studio 2010. The part I don't know is how to build a wysiwyg area to display a page that is being designed. Any help is appretiated
c#
html
visual-studio-2010
gui
null
12/03/2010 19:42:25
not a real question
How to build a web design program in C# === I would like to build my own html gui editor, but I can't figure out the basic structure for the application. Does anyone know of any sample code for building an editor? I would like to use Visual Studio 2010. The part I don't know is how to build a wysiwyg area to display a page that is being designed. Any help is appretiated
1
1,324,466
08/24/2009 20:08:18
135,589
07/09/2009 11:33:07
768
50
Practical examples of using symbols in Scala?
Scala has symbols - names that start with a single quote ' and which are a kind of string constants. I know symbols from Ruby (where they start with a colon). In Ruby they are used for some meta-programming tasks, like generating getters and setters for member variables (for example `attr_reader :name` to generate a getter for `name`). I haven't seen a lot of use of symbols in Scala code yet. What are practical uses for symbols in Scala?
scala
symbols
null
null
null
null
open
Practical examples of using symbols in Scala? === Scala has symbols - names that start with a single quote ' and which are a kind of string constants. I know symbols from Ruby (where they start with a colon). In Ruby they are used for some meta-programming tasks, like generating getters and setters for member variables (for example `attr_reader :name` to generate a getter for `name`). I haven't seen a lot of use of symbols in Scala code yet. What are practical uses for symbols in Scala?
0
6,974,598
08/07/2011 17:51:08
835,875
07/08/2011 18:19:29
36
0
Java Int to Represent an Class
I need to get an variable from one of the 100+ Classes I have. the Class from which I get the variable is determined by an Integer. I didn't find a way to do so, since there is 100+ Different Classes, any Ideas how to do that? I tried enum, pretty much failed,I though of switch, but would be huge.
java
class
int
null
null
08/07/2011 18:06:38
not a real question
Java Int to Represent an Class === I need to get an variable from one of the 100+ Classes I have. the Class from which I get the variable is determined by an Integer. I didn't find a way to do so, since there is 100+ Different Classes, any Ideas how to do that? I tried enum, pretty much failed,I though of switch, but would be huge.
1
138,919
09/26/2008 11:41:09
21,067
09/23/2008 12:10:36
33
1
" SEO Vs SEM ?"
Could you any one of help me what is main different between SEO and SEM?
seo
null
null
null
null
04/26/2011 12:04:33
off topic
" SEO Vs SEM ?" === Could you any one of help me what is main different between SEO and SEM?
2
9,504,420
02/29/2012 18:11:27
388,585
07/10/2010 20:34:03
43
5
Haskell: What is the difference between (+1) and (\x->x+1)?
Is there a difference between these two functions? ghct says: Prelude> :t (+1) (+1) :: Num a => a -> a Prelude> :t \x->x+1 \x->x+1 :: Num a => a -> a **But** When I used (+1) syntax in this piece of code: data B = B { pos :: Int, cells :: [Int] } deriving (Show) createB :: Int -> B createB n = B 0 (take n $ repeat 0) size :: B -> Int size b = length $ cells b get_curr :: B -> Int get_curr b = (cells b) !! (pos b) apply :: (Int -> Int) -> B -> B apply f b = let n = pos b h = take n $ cells b -- head t = drop (n + 1) $ cells b -- tail in B n $ h ++ [f (get_curr b)] ++ t -- ... eval :: [Char] -> StateT B IO () eval [] = return () eval (x:xs) = do b <- get put $ case x of '+' -> apply (+1) b '-' -> apply (-1) b '>' -> fwd b '<' -> back b otherwise -> b -- ... prelude (as well as compiler) said: > :load BrainFuck.hs [1 of 1] Compiling BrainFuck ( BrainFuck.hs, interpreted ) BrainFuck.hs:49:40: No instance for (Num (Int -> Int)) arising from the literal `1' Possible fix: add an instance declaration for (Num (Int -> Int)) In the expression: 1 In the first argument of `apply', namely `(- 1)' In the expression: apply (- 1) b Failed, modules loaded: none. What am I doing wrong? sorry if code is not-so-cool (full source here: https://github.com/nskeip/bf/blob/a755b2d27292593d63fe1e63c2a6e01cebc73520/BrainFuck.hs)
haskell
functional-programming
null
null
null
null
open
Haskell: What is the difference between (+1) and (\x->x+1)? === Is there a difference between these two functions? ghct says: Prelude> :t (+1) (+1) :: Num a => a -> a Prelude> :t \x->x+1 \x->x+1 :: Num a => a -> a **But** When I used (+1) syntax in this piece of code: data B = B { pos :: Int, cells :: [Int] } deriving (Show) createB :: Int -> B createB n = B 0 (take n $ repeat 0) size :: B -> Int size b = length $ cells b get_curr :: B -> Int get_curr b = (cells b) !! (pos b) apply :: (Int -> Int) -> B -> B apply f b = let n = pos b h = take n $ cells b -- head t = drop (n + 1) $ cells b -- tail in B n $ h ++ [f (get_curr b)] ++ t -- ... eval :: [Char] -> StateT B IO () eval [] = return () eval (x:xs) = do b <- get put $ case x of '+' -> apply (+1) b '-' -> apply (-1) b '>' -> fwd b '<' -> back b otherwise -> b -- ... prelude (as well as compiler) said: > :load BrainFuck.hs [1 of 1] Compiling BrainFuck ( BrainFuck.hs, interpreted ) BrainFuck.hs:49:40: No instance for (Num (Int -> Int)) arising from the literal `1' Possible fix: add an instance declaration for (Num (Int -> Int)) In the expression: 1 In the first argument of `apply', namely `(- 1)' In the expression: apply (- 1) b Failed, modules loaded: none. What am I doing wrong? sorry if code is not-so-cool (full source here: https://github.com/nskeip/bf/blob/a755b2d27292593d63fe1e63c2a6e01cebc73520/BrainFuck.hs)
0
10,756,207
05/25/2012 14:27:41
1,340,362
05/24/2010 10:47:16
222
7
cross platform web application
I am going to start some projects, basically the web application that will be accessible cross-platform(IOS, Andrioid , Blackberry , windows phone,safari ,windows browser chrome and mozilla etc) after surfing some websites and suggetions I found out, I can use HTML5,CSS3 and JQueryMobile to create such pages, those page will be accessible on all platform. But still I am not clear about the other players like Sencha, Phone-Gap, Application-Craft and all. as per my understanding, these frameworks are providing us environment to create the deploy-able application on IOS, android and other platform. Please suggest and contribute some ideas and what platform we should use if we need to create cross platfrom web application, and what we should not use also. any input will be valuable as I am zero currently. and is there any way to test this web application on windows environment.
html5
jquery-mobile
sencha
null
null
05/25/2012 16:42:41
not a real question
cross platform web application === I am going to start some projects, basically the web application that will be accessible cross-platform(IOS, Andrioid , Blackberry , windows phone,safari ,windows browser chrome and mozilla etc) after surfing some websites and suggetions I found out, I can use HTML5,CSS3 and JQueryMobile to create such pages, those page will be accessible on all platform. But still I am not clear about the other players like Sencha, Phone-Gap, Application-Craft and all. as per my understanding, these frameworks are providing us environment to create the deploy-able application on IOS, android and other platform. Please suggest and contribute some ideas and what platform we should use if we need to create cross platfrom web application, and what we should not use also. any input will be valuable as I am zero currently. and is there any way to test this web application on windows environment.
1
11,046,058
06/15/2012 07:04:02
1,457,976
06/15/2012 06:44:10
1
0
GUI for a simulator that compiles given C codes C#, GTK, Qt or anything else?
New to the community. I want to design a simulator of sorts for my project. It has to already generated C codes (obfuscated codes sometimes, can have complications, may or may not compile with even g++..tried externs and all kinds of stuff..only gcc specific to be precise). It has to dynamically compile these C codes and check if they give correct outputs (expected outputs are specified). I also need a GUI which will give my prof options as to what all errors were there (if any), show the outputs and maybe, as an extension do debugging of sorts (at least point to the c file's line which had an error). Now, I would want to code the backend in C only but the additional UI part is coming in the line. C with GTK for UI is a simple solution but very lengthy too, of course. I am not sure whether a code written in C# would compile the c input files easily (dll method has its own complications). Qt/C++ is also a nice choice but I am scared because of the obfuscated codes and no modifications are allowed to the input codes, of course. Any suggestions for the language/ tool choices I should make to do the job. Learning is not a problem if the after learning part gives me enough satisfaction. I invite your suggestions. Thanks in advance.
c#
c
visual-studio-2010
gtk
simulation
07/13/2012 09:16:06
not a real question
GUI for a simulator that compiles given C codes C#, GTK, Qt or anything else? === New to the community. I want to design a simulator of sorts for my project. It has to already generated C codes (obfuscated codes sometimes, can have complications, may or may not compile with even g++..tried externs and all kinds of stuff..only gcc specific to be precise). It has to dynamically compile these C codes and check if they give correct outputs (expected outputs are specified). I also need a GUI which will give my prof options as to what all errors were there (if any), show the outputs and maybe, as an extension do debugging of sorts (at least point to the c file's line which had an error). Now, I would want to code the backend in C only but the additional UI part is coming in the line. C with GTK for UI is a simple solution but very lengthy too, of course. I am not sure whether a code written in C# would compile the c input files easily (dll method has its own complications). Qt/C++ is also a nice choice but I am scared because of the obfuscated codes and no modifications are allowed to the input codes, of course. Any suggestions for the language/ tool choices I should make to do the job. Learning is not a problem if the after learning part gives me enough satisfaction. I invite your suggestions. Thanks in advance.
1
8,357,936
12/02/2011 14:38:50
656,172
03/12/2011 00:00:09
1,061
41
Website doesn't appear unless www. is used?
There is some sort of DNS error on my clients website that is hosted by HeartInternet. For some reason the site does not appear unless `www.` is specified explicitly. Works: http://www.elmhaven-marina.co.uk Doesn't Work: http://elmhaven-marina.co.uk How can this error be fixed?
dns
web-hosting
null
null
null
12/02/2011 16:34:27
off topic
Website doesn't appear unless www. is used? === There is some sort of DNS error on my clients website that is hosted by HeartInternet. For some reason the site does not appear unless `www.` is specified explicitly. Works: http://www.elmhaven-marina.co.uk Doesn't Work: http://elmhaven-marina.co.uk How can this error be fixed?
2
10,960,319
06/09/2012 10:45:24
1,292,544
03/26/2012 08:53:09
34
3
Conversion of bitmap into jpeg in android
Is there any way to convert a bitmap into jpeg in android?
android
bitmap
jpeg
null
null
06/11/2012 07:34:49
not a real question
Conversion of bitmap into jpeg in android === Is there any way to convert a bitmap into jpeg in android?
1
3,822,389
09/29/2010 14:08:24
173,728
09/15/2009 13:22:27
354
8
trying to login to web form in code.
this is the form <form action="j_security_check" method="post"> <div id="editForm"> <h2>Login</h2> <div class="errors"></div> <div class="row"> <span class="label">Username:</span> <span class="formw"><input type="text" name="j_username"></span> </div> <div class="row"> <span class="label">Password:</span> <span class="formw"><input type="password" name="j_password"></span> </div> <div class="submit"> <input type="submit" value="Login"> </div> </div> </form></body> the Button dosent have a name so im stomped in how to get this to work? the button doens have a ID or name so i cant use the GetElementById or GetElementsByName webBrowser1.Document.All.GetElementsByName("j_username")[0].SetAttribute("Value", "************"); webBrowser1.Document.All.GetElementsByName("j_password")[0].SetAttribute("Value", "******"); webBrowser1.Document.All["Login"].InvokeMember("click"); ; anyone have a suggestion?
c#
autologin
null
null
null
null
open
trying to login to web form in code. === this is the form <form action="j_security_check" method="post"> <div id="editForm"> <h2>Login</h2> <div class="errors"></div> <div class="row"> <span class="label">Username:</span> <span class="formw"><input type="text" name="j_username"></span> </div> <div class="row"> <span class="label">Password:</span> <span class="formw"><input type="password" name="j_password"></span> </div> <div class="submit"> <input type="submit" value="Login"> </div> </div> </form></body> the Button dosent have a name so im stomped in how to get this to work? the button doens have a ID or name so i cant use the GetElementById or GetElementsByName webBrowser1.Document.All.GetElementsByName("j_username")[0].SetAttribute("Value", "************"); webBrowser1.Document.All.GetElementsByName("j_password")[0].SetAttribute("Value", "******"); webBrowser1.Document.All["Login"].InvokeMember("click"); ; anyone have a suggestion?
0
7,795,261
10/17/2011 14:30:07
595,310
01/29/2011 21:32:02
31
8
Shutting down IP multicast on an OSX network interface
Any suggestions appreciated on how to shutdown multicast an OSX IP network interface. I've tried 'ifconfig en1 -multicast' - with no success. Thanks Richard
osx
multicast
null
null
null
10/17/2011 17:46:51
off topic
Shutting down IP multicast on an OSX network interface === Any suggestions appreciated on how to shutdown multicast an OSX IP network interface. I've tried 'ifconfig en1 -multicast' - with no success. Thanks Richard
2
3,922,324
10/13/2010 09:34:01
355,389
06/01/2010 12:19:34
677
40
Pattern for retrieving complex object graphs with Repository Pattern with Entity Framework
We have an ASP.NET MVC site that uses Entity Framework abstractions with Repository and UnitOfWork patterns. What I'm wondering is how others have implemented navigation of complex object graphs with these patterns. Let me give an example from one of our controllers: var model = new EligibilityViewModel { Country = person.Pathway.Country.Name, Pathway = person.Pathway.Name, Answers = person.Answers.ToList(), ScoreResult = new ScoreResult(candidate.Score.Value), DpaText = person.Pathway.Country.Legal.DPA.Description, DpaQuestions = person.Pathway.Country.Legal.DPA.Questions, Terms = person.Pathway.Country.Legal.Terms, HowHearAboutUsOptions = person.Pathway.Referrers }; It's a registration process and pretty much everything hangs off the POCO class Person. In this case we're caching the person through the registration process. I've now started implementing the latter part of the registration process which requires access to data deeper in the object graph. Specifically DPA data which hangs off Legal inside Country. The code above is just mapping out the model information into a simpler format for the ViewModel. My question is do you consider this fairly deep navigation of the graph good practice or would you abstract out the retrieval of the objects further down the graph into repositories?
asp.net
asp.net-mvc
entity-framework
repository-pattern
null
null
open
Pattern for retrieving complex object graphs with Repository Pattern with Entity Framework === We have an ASP.NET MVC site that uses Entity Framework abstractions with Repository and UnitOfWork patterns. What I'm wondering is how others have implemented navigation of complex object graphs with these patterns. Let me give an example from one of our controllers: var model = new EligibilityViewModel { Country = person.Pathway.Country.Name, Pathway = person.Pathway.Name, Answers = person.Answers.ToList(), ScoreResult = new ScoreResult(candidate.Score.Value), DpaText = person.Pathway.Country.Legal.DPA.Description, DpaQuestions = person.Pathway.Country.Legal.DPA.Questions, Terms = person.Pathway.Country.Legal.Terms, HowHearAboutUsOptions = person.Pathway.Referrers }; It's a registration process and pretty much everything hangs off the POCO class Person. In this case we're caching the person through the registration process. I've now started implementing the latter part of the registration process which requires access to data deeper in the object graph. Specifically DPA data which hangs off Legal inside Country. The code above is just mapping out the model information into a simpler format for the ViewModel. My question is do you consider this fairly deep navigation of the graph good practice or would you abstract out the retrieval of the objects further down the graph into repositories?
0
1,333,619
08/26/2009 10:03:13
60,234
01/29/2009 15:26:00
881
26
Can I avoid blocking with my SQL cursor
I've some work to do on a largish database which basically requires calling a stored proc with different parameters for every value in a table (approx. 20k entries). I want to do this without blocking on that table or the other tables involved for each loop. I am also quite happy to deal with cleaning up the result if the process breaks half way through so don't need to be able to rollback the whole operation should it fail part way through. How can I do this? Is it as simple as issuing begin transaction sand commit commands at the start and end of each loop and using a Fast_Forward Read_Only cursor?
sql-server-2005
cursor
blocking
null
null
null
open
Can I avoid blocking with my SQL cursor === I've some work to do on a largish database which basically requires calling a stored proc with different parameters for every value in a table (approx. 20k entries). I want to do this without blocking on that table or the other tables involved for each loop. I am also quite happy to deal with cleaning up the result if the process breaks half way through so don't need to be able to rollback the whole operation should it fail part way through. How can I do this? Is it as simple as issuing begin transaction sand commit commands at the start and end of each loop and using a Fast_Forward Read_Only cursor?
0
4,929,940
02/08/2011 05:34:43
604,168
02/05/2011 07:07:25
30
0
Hyperlink from database for all gamertags?
I would like to be able to connect to a database with this table... +----+----------+-----------+ | id | gamertag | timestamp | +----+----------+-----------+ and then print the hyperlink for each gamertag in the table. I have absolutely no idea where to start... <?php @mysql_connect("$d_host","$d_user","$d_pass") or die ("Could not connect!"); @mysql_select_db("$d_name") or die ("No database!"); $url = "http://www.bungie.net/Stats/Reach/default.aspx?player="; $gamertag = "l RaH l"; print "<a href=\"".$url.rawurlencode($gamertag)."\">".$gamertag."</a>"; ?>
php
mysql
html
null
null
null
open
Hyperlink from database for all gamertags? === I would like to be able to connect to a database with this table... +----+----------+-----------+ | id | gamertag | timestamp | +----+----------+-----------+ and then print the hyperlink for each gamertag in the table. I have absolutely no idea where to start... <?php @mysql_connect("$d_host","$d_user","$d_pass") or die ("Could not connect!"); @mysql_select_db("$d_name") or die ("No database!"); $url = "http://www.bungie.net/Stats/Reach/default.aspx?player="; $gamertag = "l RaH l"; print "<a href=\"".$url.rawurlencode($gamertag)."\">".$gamertag."</a>"; ?>
0
4,313,105
11/30/2010 11:14:28
393,459
07/16/2010 04:13:19
553
29
is HTML object oriented?
SO we can establish that HTML is pretty much a programming language... But I was wondering if it is object oriented too? Like would it be possible for me to create a div and assign its properties to another div.(I understand how I can use js for it) What are the core OO programming language concepts it satisfies? Generally asking to know more about HTML.... Also what the hell is dom? Is it JS or HTML? This is rather confusing? I have seen people talk about dom objects? But then by that they mean id's I have assigned on the HTML tag... So really confused about that... Someone with time to spare please help me out!
html
random
general-development
null
null
11/30/2010 12:53:34
not a real question
is HTML object oriented? === SO we can establish that HTML is pretty much a programming language... But I was wondering if it is object oriented too? Like would it be possible for me to create a div and assign its properties to another div.(I understand how I can use js for it) What are the core OO programming language concepts it satisfies? Generally asking to know more about HTML.... Also what the hell is dom? Is it JS or HTML? This is rather confusing? I have seen people talk about dom objects? But then by that they mean id's I have assigned on the HTML tag... So really confused about that... Someone with time to spare please help me out!
1
6,751,062
07/19/2011 17:02:33
208,057
11/10/2009 18:47:25
18
3
Organization and Structure of Web Application Testing Framework
So I'm looking to bring web application testing into our .Net environment with a framework such as Selenium. At first, it'll probably be the developers writing the tests, but later it may be just the QA team. I'm wondering where the tests should actually live. Should they live in the same solution that the web application lives or should they live in a completely separate solution that is just for the tests? Please, note these are regression tests that will be done via automating a web browser so access to the web app's assemblies is not required. The answer probably is based on the environment and other factors, but I'm curious about what other people have done in this situation.
testing
structure
ui-automation
null
null
null
open
Organization and Structure of Web Application Testing Framework === So I'm looking to bring web application testing into our .Net environment with a framework such as Selenium. At first, it'll probably be the developers writing the tests, but later it may be just the QA team. I'm wondering where the tests should actually live. Should they live in the same solution that the web application lives or should they live in a completely separate solution that is just for the tests? Please, note these are regression tests that will be done via automating a web browser so access to the web app's assemblies is not required. The answer probably is based on the environment and other factors, but I'm curious about what other people have done in this situation.
0
4,064,828
10/31/2010 19:52:13
486,953
10/25/2010 21:32:32
11
0
Misplaced construct in homework
I do all my programming assignments in eclipse first before putting them in putty and submitting them to our teacher. In eclipse, I have this strange error in one of my methods. it says "Syntax error on token(s), misplaced construct(s)." public static int factorial(int iVal, boolean DEBUG) { int result; // Defensive programming if(iVal <= 0) { System.out.println("Error: iVal cannot be a negative number!"); System.exit(0); } // Calculate result int factor = iVal; int counter = iVal - 1; for(int i = counter; i > 1; i--) { if(DEBUG = true) { System.out.println("DEBUG"); System.out.println(" Finding the factorial of " + factor); System.out.println(" Currently working on " + i); System.out.println(" With an intermediate result of" + iVal); } iVal *= i; } result = iVal; // Return result return result; } // End of factorial method ---------- It has the error placed on the line consisting of System.out.println(" Currently working on " + i); Any ideas?
java
homework
construct
null
null
null
open
Misplaced construct in homework === I do all my programming assignments in eclipse first before putting them in putty and submitting them to our teacher. In eclipse, I have this strange error in one of my methods. it says "Syntax error on token(s), misplaced construct(s)." public static int factorial(int iVal, boolean DEBUG) { int result; // Defensive programming if(iVal <= 0) { System.out.println("Error: iVal cannot be a negative number!"); System.exit(0); } // Calculate result int factor = iVal; int counter = iVal - 1; for(int i = counter; i > 1; i--) { if(DEBUG = true) { System.out.println("DEBUG"); System.out.println(" Finding the factorial of " + factor); System.out.println(" Currently working on " + i); System.out.println(" With an intermediate result of" + iVal); } iVal *= i; } result = iVal; // Return result return result; } // End of factorial method ---------- It has the error placed on the line consisting of System.out.println(" Currently working on " + i); Any ideas?
0
6,555,468
07/02/2011 06:30:48
522,047
11/27/2010 05:58:59
286
14
How do you access the content of a text file uploaded with Paperclip / Ruby on Rails?
I'm using Paperclip / S3 for file uploading. I upload text-like files (not .txt, but they are essentially a .txt). In a show controller, I want to be able to get the contents of the uploaded file, but don't see contents as one of its attributes. What can I do here? attachment_file_name: "test.md", attachment_content_type: "application/octet-stream", attachment_file_size: 58, attachment_updated_at: "2011-06-22 01:01:40" PS - Seems like all the Paperclip tutorials are about images, not text files.
ruby-on-rails
paperclip
null
null
null
null
open
How do you access the content of a text file uploaded with Paperclip / Ruby on Rails? === I'm using Paperclip / S3 for file uploading. I upload text-like files (not .txt, but they are essentially a .txt). In a show controller, I want to be able to get the contents of the uploaded file, but don't see contents as one of its attributes. What can I do here? attachment_file_name: "test.md", attachment_content_type: "application/octet-stream", attachment_file_size: 58, attachment_updated_at: "2011-06-22 01:01:40" PS - Seems like all the Paperclip tutorials are about images, not text files.
0
5,075,973
02/22/2011 08:55:43
627,987
02/22/2011 08:55:43
1
0
to create browser for android phones Android
Can we make use of default browser instead of the WebView browser Is there ny API for the default browser..... or we have to compulsory create our own browser through WebView
android
browser
null
null
null
null
open
to create browser for android phones Android === Can we make use of default browser instead of the WebView browser Is there ny API for the default browser..... or we have to compulsory create our own browser through WebView
0
3,503,670
08/17/2010 14:44:21
223,786
12/03/2009 12:08:50
16
1
is anyone know how to display formular in wikipedia ?
in firefox, the label is " :<math>1-\left(1-\frac{1}{m}\right)^{kn}.</math> ", i think there should be one add-on to parse the formular to give right display. thank you.
firefox
null
null
null
null
08/17/2010 14:54:09
off topic
is anyone know how to display formular in wikipedia ? === in firefox, the label is " :<math>1-\left(1-\frac{1}{m}\right)^{kn}.</math> ", i think there should be one add-on to parse the formular to give right display. thank you.
2
7,504,429
09/21/2011 18:01:03
957,520
09/21/2011 17:27:02
1
0
Python/Excel: How to freeze the top line of a generated sheet (or sheets)
This isn't actually a question -- it's more of an FYI. It took me a while to figure this out, since my searching with Google turned up bits and pieces (including some related questions here on StackOverflow), but no article or blurb gave me the whole answer all in one place. I was finally able to figure it out by recording a macro in Excel and looking at its source code and combining what I found there with what I found on the web. Anyway, the following code snippets show two helper functions, plus a sample main() type of function (which I always use, even in Perl and Python apps, since I have a C/C++/Java background). The first helper method will auto-fit every used column on the given sheet. Since the auto-fit logic depends on the data in the cells, as well as the font(s) in use, you shouldn't call this method until the entire sheet has been completely populated with your data. Also, I'm pretty new to VBA, so I'm not so sure that this line: sheet.Cells(1, i).EntireColumn.AutoFit() is correct, but it does seem to work just fine. If it's not entirely correct, maybe you can post a correction. def autoFitSheet(sheet): """Auto-fits all the used columns on the given sheet. Obviously, this method should only be called _after_ the sheet has been populated.""" firstCol = sheet.UsedRange.Column numCols = sheet.UsedRange.Columns.Count for i in range(firstCol, (firstCol + numCols)): sheet.Cells(1, i).EntireColumn.AutoFit() The second helper is a "freeze the top line" method. All it does is freeze the top line of the sheet that you pass it. A side effect of this method is that the sheet becomes the active sheet in the spreadsheet, so you might need/want to activate some other sheet once all your sheets' top lines have been frozen. def freezeTopLine(window, sheet): """Freezes the top line of the given sheet.""" sheet.Activate() window.SplitColumn = 0 window.SplitRow = 1 window.FreezePanes = True The last snippet is a sample main() function, which just shows how to call the two helper methods. I'm actually using code very similar to this to populate a spreadsheet with mutliple tabs/sheets, and it works perfectly (on Windows 7 -- can't guarantee how well it will work on your system). def main(...): # # (whatever...) # excel = win32.gencache.EnsureDispatch('Excel.Application') workbook = excel.Workbooks.Add() sheets = workbook.Sheets window = workbook.Windows(1) sheet1 = workbook.Worksheets('Sheet1') straddles.Name = 'My First Sheet' straddles.Tab.ColorIndex = 6 # yellow sheet2 = workbook.Worksheets('Sheet2') cashSummary.Name = 'Some Other Sheet' cashSummary.Tab.ColorIndex = 4 # bright green # # Populate sheets... # for sheet in sheets: autoFitSheet(sheet) freezeTopLine(sheet) # # (whatever...) # Like I said, it took me a while to figure this out, and I was hoping that maybe I could save someone some of the headache that I went through. Good luck.
python
excel
freeze
null
null
07/10/2012 18:06:56
not a real question
Python/Excel: How to freeze the top line of a generated sheet (or sheets) === This isn't actually a question -- it's more of an FYI. It took me a while to figure this out, since my searching with Google turned up bits and pieces (including some related questions here on StackOverflow), but no article or blurb gave me the whole answer all in one place. I was finally able to figure it out by recording a macro in Excel and looking at its source code and combining what I found there with what I found on the web. Anyway, the following code snippets show two helper functions, plus a sample main() type of function (which I always use, even in Perl and Python apps, since I have a C/C++/Java background). The first helper method will auto-fit every used column on the given sheet. Since the auto-fit logic depends on the data in the cells, as well as the font(s) in use, you shouldn't call this method until the entire sheet has been completely populated with your data. Also, I'm pretty new to VBA, so I'm not so sure that this line: sheet.Cells(1, i).EntireColumn.AutoFit() is correct, but it does seem to work just fine. If it's not entirely correct, maybe you can post a correction. def autoFitSheet(sheet): """Auto-fits all the used columns on the given sheet. Obviously, this method should only be called _after_ the sheet has been populated.""" firstCol = sheet.UsedRange.Column numCols = sheet.UsedRange.Columns.Count for i in range(firstCol, (firstCol + numCols)): sheet.Cells(1, i).EntireColumn.AutoFit() The second helper is a "freeze the top line" method. All it does is freeze the top line of the sheet that you pass it. A side effect of this method is that the sheet becomes the active sheet in the spreadsheet, so you might need/want to activate some other sheet once all your sheets' top lines have been frozen. def freezeTopLine(window, sheet): """Freezes the top line of the given sheet.""" sheet.Activate() window.SplitColumn = 0 window.SplitRow = 1 window.FreezePanes = True The last snippet is a sample main() function, which just shows how to call the two helper methods. I'm actually using code very similar to this to populate a spreadsheet with mutliple tabs/sheets, and it works perfectly (on Windows 7 -- can't guarantee how well it will work on your system). def main(...): # # (whatever...) # excel = win32.gencache.EnsureDispatch('Excel.Application') workbook = excel.Workbooks.Add() sheets = workbook.Sheets window = workbook.Windows(1) sheet1 = workbook.Worksheets('Sheet1') straddles.Name = 'My First Sheet' straddles.Tab.ColorIndex = 6 # yellow sheet2 = workbook.Worksheets('Sheet2') cashSummary.Name = 'Some Other Sheet' cashSummary.Tab.ColorIndex = 4 # bright green # # Populate sheets... # for sheet in sheets: autoFitSheet(sheet) freezeTopLine(sheet) # # (whatever...) # Like I said, it took me a while to figure this out, and I was hoping that maybe I could save someone some of the headache that I went through. Good luck.
1
8,942,881
01/20/2012 14:28:22
676,326
03/25/2011 08:06:05
249
14
fill UI of next activity form the current activity in android
Am working on an android application .Since am a newbie to the Android platform i am bit confusing about how we can manipulate the UI look & feel when there is some complexity. My problem is on a button click am generating an `ArrayList< Some Object >` and i want to fill the UI of next activity by iterating over this ArrayList. Passing this arrayList into the next activity is not possible throgh `Bundle.putExtras` method since it is not supported, only an `ArrayList< String >` will be supported. At this stage only case i can think creating next activity UI from current activity's button click method iteself.. I think about this a lot..but didn't get an idea to solve this. So can anyone suggest a nice way to solve my problem.?? Thanks in advance.
java
android
android-layout
user-interface
null
null
open
fill UI of next activity form the current activity in android === Am working on an android application .Since am a newbie to the Android platform i am bit confusing about how we can manipulate the UI look & feel when there is some complexity. My problem is on a button click am generating an `ArrayList< Some Object >` and i want to fill the UI of next activity by iterating over this ArrayList. Passing this arrayList into the next activity is not possible throgh `Bundle.putExtras` method since it is not supported, only an `ArrayList< String >` will be supported. At this stage only case i can think creating next activity UI from current activity's button click method iteself.. I think about this a lot..but didn't get an idea to solve this. So can anyone suggest a nice way to solve my problem.?? Thanks in advance.
0
4,936,663
02/08/2011 18:10:27
220,299
11/28/2009 00:31:20
7,621
479
Linq to SQL with unique index using ignore duplicate keys option and an Identity column
_db.Comments.InsertAllOnSubmit(comments); _db.SubmitChanges(); There is a unique index on this table with `IGNORE_DUP_KEY = ON`, i know that i'm inserting duplicates i just want to ignore them, i'd rather not check each record manually, as this will be slower. It throws the following: InvalidOperationException: The null value cannot be assigned to a member with type System.Int32 which is a non-nullable value type. I'm assuming this is because the value returned to L2S for the primary key field (it's an IDENTITY Column) is null. To me this seems almost like a bug. Anybody got any ideas, other than individual insert with try/catch or manual checking?
c#
.net
linq-to-sql
null
null
null
open
Linq to SQL with unique index using ignore duplicate keys option and an Identity column === _db.Comments.InsertAllOnSubmit(comments); _db.SubmitChanges(); There is a unique index on this table with `IGNORE_DUP_KEY = ON`, i know that i'm inserting duplicates i just want to ignore them, i'd rather not check each record manually, as this will be slower. It throws the following: InvalidOperationException: The null value cannot be assigned to a member with type System.Int32 which is a non-nullable value type. I'm assuming this is because the value returned to L2S for the primary key field (it's an IDENTITY Column) is null. To me this seems almost like a bug. Anybody got any ideas, other than individual insert with try/catch or manual checking?
0
8,259,818
11/24/2011 16:07:54
259,288
01/26/2010 14:22:48
379
8
Concurrency - why does the last instruction in this function never execute?
I have this code: private void doSomething() throws InterruptedException { WorkerThread w= new WorkerThread(this); w.start(); synchronized (synchObj) { while (!isDone) { synchObj.wait(); } } System.out.println("End"); } Where the calling class implements a method that calls `notifyAll()` on `synchObj` when `WorkerThread` instance is done. Everything works pretty much as expected except the final call to `System.out.println("End");` is never called. Why is that?
java
concurrency
null
null
null
null
open
Concurrency - why does the last instruction in this function never execute? === I have this code: private void doSomething() throws InterruptedException { WorkerThread w= new WorkerThread(this); w.start(); synchronized (synchObj) { while (!isDone) { synchObj.wait(); } } System.out.println("End"); } Where the calling class implements a method that calls `notifyAll()` on `synchObj` when `WorkerThread` instance is done. Everything works pretty much as expected except the final call to `System.out.println("End");` is never called. Why is that?
0
4,675,989
01/13/2011 01:39:53
192,521
10/19/2009 15:53:49
45
1
Prevent Other Month Events From Rendering in jQuery FullCalendar
I'd like to prohibit fullcalendar from displaying events in the other month cells. I figured I could do this with the eventRender event. $('#calendar').fullCalendar({ events: $.fullCalendar.myFeed(), eventRender: function (event, element) { if (event.start.getMonth() != ????) $(element).hide(); } }); I can't figure out what to replace the ???? to get the calendar's current month. Anybody have some tips?
jquery
fullcalendar
null
null
null
null
open
Prevent Other Month Events From Rendering in jQuery FullCalendar === I'd like to prohibit fullcalendar from displaying events in the other month cells. I figured I could do this with the eventRender event. $('#calendar').fullCalendar({ events: $.fullCalendar.myFeed(), eventRender: function (event, element) { if (event.start.getMonth() != ????) $(element).hide(); } }); I can't figure out what to replace the ???? to get the calendar's current month. Anybody have some tips?
0
9,994,574
04/03/2012 13:44:19
1,288,195
03/23/2012 12:05:57
3
0
php login verification
I am now at my wits end. here's what i want to know, how can i check the information provided by a user on my login page (consisting of only username and login) against that which i have in my database? i can already manage to do that but now my problem is 2 things that i have identified. 1) if the information provided is true when compared against that which is stored in my database then i want to direct the user to a different page (i assume the ACTION method in my HTML will take care of that). but if the input is wrong then i want an iteration of the login page so they can re-enter their details. if ($p===$p1) { header("Location:success.php"); } else { header("Location:fail.php"); } above is my code with $p being the value from the password field on the form and $p1 being the value from the database. what now happens with this code is that even if the passwords and even the usernames do not match, the user can still access member pages. i have been able to identify that the problem lies with the "header" method. but even if i swap the two around the user is still directed to success.php. if you don't understand the crux of my question please i implore you do not ignore it just ask me and i'll provide more information. sorry but i can't seem to be able to get the
php
javascript
html
null
null
04/06/2012 10:56:34
not a real question
php login verification === I am now at my wits end. here's what i want to know, how can i check the information provided by a user on my login page (consisting of only username and login) against that which i have in my database? i can already manage to do that but now my problem is 2 things that i have identified. 1) if the information provided is true when compared against that which is stored in my database then i want to direct the user to a different page (i assume the ACTION method in my HTML will take care of that). but if the input is wrong then i want an iteration of the login page so they can re-enter their details. if ($p===$p1) { header("Location:success.php"); } else { header("Location:fail.php"); } above is my code with $p being the value from the password field on the form and $p1 being the value from the database. what now happens with this code is that even if the passwords and even the usernames do not match, the user can still access member pages. i have been able to identify that the problem lies with the "header" method. but even if i swap the two around the user is still directed to success.php. if you don't understand the crux of my question please i implore you do not ignore it just ask me and i'll provide more information. sorry but i can't seem to be able to get the
1