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
6,356,263
06/15/2011 10:22:47
294,642
03/16/2010 10:29:58
1,644
50
SQL: How do I port sql server database via t-sql scripts
I have to port sql server (2008) database with t-sql scripts. I can generate "create" script per each database object (stored procedure, table) from Sql Server Management Studio (though it looks to take much time) How do I port data for tables? I'd like to have scripts like that: INSERT INTO ... VALUES(...) INSERT INTO ... VALUES(...) INSERT INTO ... VALUES(...) ... Can I generate such scripts from Sql Server Management Studio or is there some free 3'rd party utility for that? (I guess there should be). Thank you in advance!
sql
sql-server
tsql
ssms
null
null
open
SQL: How do I port sql server database via t-sql scripts === I have to port sql server (2008) database with t-sql scripts. I can generate "create" script per each database object (stored procedure, table) from Sql Server Management Studio (though it looks to take much time) How do I port data for tables? I'd like to have scripts like that: INSERT INTO ... VALUES(...) INSERT INTO ... VALUES(...) INSERT INTO ... VALUES(...) ... Can I generate such scripts from Sql Server Management Studio or is there some free 3'rd party utility for that? (I guess there should be). Thank you in advance!
0
1,995,905
01/03/2010 19:03:30
165,448
08/29/2009 21:20:18
29
2
Count records returned in a search - ROR
I'm trying to get rails to return an count of the records returned in a search (search results found); I can get rails to count the total amount of records using > Inventory.count However when I enter @advsearch.count it blows up. Any ideas? The code below is my controller: def new @advsearch = Advsearch.new end def create @advsearch = Advsearch.new(params[:advsearch]) if @advsearch.save flash[:notice] = "Mr. Roboto dug through #{(Inventory.count)} records" redirect_to @advsearch else render :action => 'new' end end followed by my model: class Advsearch < ActiveRecord::Base def inventories @inventories ||= find_inventories end private def find_inventories Inventory.find(:all, :conditions => conditions) end def keyword_conditions ["inventories.item LIKE ?", "%#{keywords}%"] unless keywords.blank? end def vender_conditions ["inventories.vender_id = ?", vender_id] unless vender_id.blank? end def area_conditions ["inventories.area_id = ?", area_id] unless area_id.blank? end def chem_conditions ["inventories.chem_id = ?", chem_id] unless chem_id.blank? end def location_conditions ["inventories.location_id = ?", location_id] unless location_id.blank? end def instock_conditions ["inventories.instock = ?", instock] unless instock.blank? end def conditions [conditions_clauses.join(' AND '), *conditions_options] end def conditions_clauses conditions_parts.map { |condition| condition.first } end def conditions_options conditions_parts.map { |condition| condition[1..-1] }.flatten end def conditions_parts private_methods(false).grep(/_conditions$/).map { |m| send(m) }.compact end end
search
ruby-on-rails
controller
null
null
null
open
Count records returned in a search - ROR === I'm trying to get rails to return an count of the records returned in a search (search results found); I can get rails to count the total amount of records using > Inventory.count However when I enter @advsearch.count it blows up. Any ideas? The code below is my controller: def new @advsearch = Advsearch.new end def create @advsearch = Advsearch.new(params[:advsearch]) if @advsearch.save flash[:notice] = "Mr. Roboto dug through #{(Inventory.count)} records" redirect_to @advsearch else render :action => 'new' end end followed by my model: class Advsearch < ActiveRecord::Base def inventories @inventories ||= find_inventories end private def find_inventories Inventory.find(:all, :conditions => conditions) end def keyword_conditions ["inventories.item LIKE ?", "%#{keywords}%"] unless keywords.blank? end def vender_conditions ["inventories.vender_id = ?", vender_id] unless vender_id.blank? end def area_conditions ["inventories.area_id = ?", area_id] unless area_id.blank? end def chem_conditions ["inventories.chem_id = ?", chem_id] unless chem_id.blank? end def location_conditions ["inventories.location_id = ?", location_id] unless location_id.blank? end def instock_conditions ["inventories.instock = ?", instock] unless instock.blank? end def conditions [conditions_clauses.join(' AND '), *conditions_options] end def conditions_clauses conditions_parts.map { |condition| condition.first } end def conditions_options conditions_parts.map { |condition| condition[1..-1] }.flatten end def conditions_parts private_methods(false).grep(/_conditions$/).map { |m| send(m) }.compact end end
0
1,925,576
12/18/2009 00:39:13
233,421
12/17/2009 00:41:31
16
0
Is it worth me learning C as a Web Developer? Will i ever use it?
Is it worth me learning the programming language C as a web developer, currently using PHP and Ruby on Rails? Will i ever need to use it as a web developer? Thank you in advance to all you good people out there?
c
php
ruby-on-rails
null
null
02/01/2012 04:12:02
not constructive
Is it worth me learning C as a Web Developer? Will i ever use it? === Is it worth me learning the programming language C as a web developer, currently using PHP and Ruby on Rails? Will i ever need to use it as a web developer? Thank you in advance to all you good people out there?
4
9,521,385
03/01/2012 17:55:50
946,972
09/15/2011 13:57:51
22
0
database data syn error help please
CREATE TABLE IF NOT EXISTS userdata( UID BIGINT UNSIGNED NOT NULL AUTO_INCREMENT, Username CHAR (50) NOT NULL, DisplayName CHAR (50), Signature CHAR (255), PRIMARY KEY(UID), UNIQUE(UID,Username), INDEX(UID)) CREATE TABLE IF NOT EXISTS addressbook( EID BIGINT UNSIGNED NOT NULL AUTO_INCREMENT, UID BIGINT UNSIGNED NOT NULL, Display CHAR (50), E_Mail CHAR (100) NOT NULL, Info CHAR (255), PRIMARY KEY(EID), UNIQUE(EID), INDEX(EID,UID,Display,E_Mail)) where's the error here because i cant insert in mysql
mysql
null
null
null
null
03/02/2012 03:33:42
too localized
database data syn error help please === CREATE TABLE IF NOT EXISTS userdata( UID BIGINT UNSIGNED NOT NULL AUTO_INCREMENT, Username CHAR (50) NOT NULL, DisplayName CHAR (50), Signature CHAR (255), PRIMARY KEY(UID), UNIQUE(UID,Username), INDEX(UID)) CREATE TABLE IF NOT EXISTS addressbook( EID BIGINT UNSIGNED NOT NULL AUTO_INCREMENT, UID BIGINT UNSIGNED NOT NULL, Display CHAR (50), E_Mail CHAR (100) NOT NULL, Info CHAR (255), PRIMARY KEY(EID), UNIQUE(EID), INDEX(EID,UID,Display,E_Mail)) where's the error here because i cant insert in mysql
3
8,799,693
01/10/2012 07:02:03
1,046,069
11/14/2011 17:40:41
11
0
How Retrieve data to PDF from a web service using itext library?
I am creating a PDF which need to retrieve data from my web service. I am using itext library. I have tried many ways but non of them were successful. i tried the SOAP protocol using javascript but i am getting an error saying 'NotAllowedError: Security settings prevent access to this property or method.' same issue for 'importtextdata' what am i missing? Thank you.
c#
itextsharp
itext
null
null
02/15/2012 13:32:43
too localized
How Retrieve data to PDF from a web service using itext library? === I am creating a PDF which need to retrieve data from my web service. I am using itext library. I have tried many ways but non of them were successful. i tried the SOAP protocol using javascript but i am getting an error saying 'NotAllowedError: Security settings prevent access to this property or method.' same issue for 'importtextdata' what am i missing? Thank you.
3
3,170,258
07/03/2010 03:54:12
225,947
12/06/2009 21:04:22
100
12
Communication between microcontroller and separately powered PCB (electronics)
On one board I have a microcontroller with one power supply and on another I have a Flip Flop with a separate power supply. I want to connect a pin of the microcontroller to the reset pin of the flip flop. Can I just put a wire accross or does it need more than that? I was going to do that but now I'm not sure that would work because it wouldn't be a complete circuit and the two boards may not have quite the same ground levels.
communication
microcontroller
null
null
null
07/03/2010 06:31:46
off topic
Communication between microcontroller and separately powered PCB (electronics) === On one board I have a microcontroller with one power supply and on another I have a Flip Flop with a separate power supply. I want to connect a pin of the microcontroller to the reset pin of the flip flop. Can I just put a wire accross or does it need more than that? I was going to do that but now I'm not sure that would work because it wouldn't be a complete circuit and the two boards may not have quite the same ground levels.
2
7,546,334
09/25/2011 15:03:45
955,256
09/20/2011 16:49:21
30
0
Search for a keyword in C# and output the line as a string
How would it be possible to search for a string e.g. #Test1 in a text file and then output the line below it as a string e.g. Test.txt #Test1 86/100 #Test2 99/100 #Test3 13/100 so if #Test2 was the search keyword "99/200" would be turned into a string
c#
.net
windows
null
null
null
open
Search for a keyword in C# and output the line as a string === How would it be possible to search for a string e.g. #Test1 in a text file and then output the line below it as a string e.g. Test.txt #Test1 86/100 #Test2 99/100 #Test3 13/100 so if #Test2 was the search keyword "99/200" would be turned into a string
0
1,318,928
08/23/2009 16:18:21
113,843
05/28/2009 16:02:07
1
0
libxml-ruby parsing HELP...
Alright, switching from working Hpricot to Libxml-ruby due to speed and well the disappearance of _why, looked at Nokogiri for a second but decided to look at Libxml-ruby for speed and longevity. I must be missing something basic but what im trying to do isn't working, here's my XML string file =<<XML <?xml version="1.0" encoding="utf-8" ?> <feed> <title type="xhtml"></title> <entry xmlns="http://www.w3.org/2005/Atom"> <id>urn:publicid:xx.xxx:xxxxxx</id> <title>US--xxx-xxxxx</title> <updated>2009-08-19T15:49:51.103Z</updated> <published>2009-08-19T15:44:48Z</published> <author> <name>XX</name> </author> <rights>blehh</rights> <content type="text/xml"> <nitf> <head> <docdata> <doc-id regsrc="XX" /> <date.issue norm="20090819T154448Z" /> <ed-msg info="Eds:" /> <doc.rights owner="xx" agent="hxx" type="none" /> <doc.copyright holder="xx" year="2009" /> </docdata> </head> <body> <body.head> <hedline> <hl1 id="headline">headline</hl1> <hl2 id="originalHeadline">blah blah</hl2> </hedline> <byline>john doe<byttl>staffer</byttl></byline> <distributor>xyz</distributor> <dateline> <location>foo</location> </dateline> </body.head> <body.content> <block id="Main"> story content here </block> </body.content> <body.end /> </body> </nitf> </content> </entry> </feed> XML </code></pre> there are about 150 such entries from the complete feed I just want to loop through the 150 entries and then grab out content & attributes but i'm having a hell of a time with libxml-ruby had it working fine with hpricot... This little snippet shows that im not even getting the entries parser = XML::Parser.string(file) doc = parser.parse entries = doc.find('//entry') puts entries.size entries.each do |node| puts node.inspect end Any ideas?, looked through the docs, and couldn't find a simple here's an xml file, and here are samples of getting out x,y,z. This should be pretty simple...
libxml-ruby
nokogiri
hpricot
ruby
null
null
open
libxml-ruby parsing HELP... === Alright, switching from working Hpricot to Libxml-ruby due to speed and well the disappearance of _why, looked at Nokogiri for a second but decided to look at Libxml-ruby for speed and longevity. I must be missing something basic but what im trying to do isn't working, here's my XML string file =<<XML <?xml version="1.0" encoding="utf-8" ?> <feed> <title type="xhtml"></title> <entry xmlns="http://www.w3.org/2005/Atom"> <id>urn:publicid:xx.xxx:xxxxxx</id> <title>US--xxx-xxxxx</title> <updated>2009-08-19T15:49:51.103Z</updated> <published>2009-08-19T15:44:48Z</published> <author> <name>XX</name> </author> <rights>blehh</rights> <content type="text/xml"> <nitf> <head> <docdata> <doc-id regsrc="XX" /> <date.issue norm="20090819T154448Z" /> <ed-msg info="Eds:" /> <doc.rights owner="xx" agent="hxx" type="none" /> <doc.copyright holder="xx" year="2009" /> </docdata> </head> <body> <body.head> <hedline> <hl1 id="headline">headline</hl1> <hl2 id="originalHeadline">blah blah</hl2> </hedline> <byline>john doe<byttl>staffer</byttl></byline> <distributor>xyz</distributor> <dateline> <location>foo</location> </dateline> </body.head> <body.content> <block id="Main"> story content here </block> </body.content> <body.end /> </body> </nitf> </content> </entry> </feed> XML </code></pre> there are about 150 such entries from the complete feed I just want to loop through the 150 entries and then grab out content & attributes but i'm having a hell of a time with libxml-ruby had it working fine with hpricot... This little snippet shows that im not even getting the entries parser = XML::Parser.string(file) doc = parser.parse entries = doc.find('//entry') puts entries.size entries.each do |node| puts node.inspect end Any ideas?, looked through the docs, and couldn't find a simple here's an xml file, and here are samples of getting out x,y,z. This should be pretty simple...
0
9,903,515
03/28/2012 08:13:08
889,496
08/11/2011 08:23:18
11
0
The biggest drawback of MonoTouch
MonoTouch is great for cross-platform app development. This makes a very strong business argument and I am on verge of developing using MonoTouch with prospects of branching into Android and WinMo. Before starting commercial development in MonoTouch I want to ask one last question, just in case I've missed something critical in my research so far: *What do you think is the biggest drawback of MonoTouch as compared to Objective C?* Barring games development, use whatever context comes to your mind. Thanks Steph
objective-c
monotouch
comparison
null
null
03/28/2012 12:42:23
not constructive
The biggest drawback of MonoTouch === MonoTouch is great for cross-platform app development. This makes a very strong business argument and I am on verge of developing using MonoTouch with prospects of branching into Android and WinMo. Before starting commercial development in MonoTouch I want to ask one last question, just in case I've missed something critical in my research so far: *What do you think is the biggest drawback of MonoTouch as compared to Objective C?* Barring games development, use whatever context comes to your mind. Thanks Steph
4
9,631,610
03/09/2012 09:22:47
1,258,924
03/09/2012 09:13:24
1
0
MySQL Inner Join 'Unkown column'
I did my reading on this and still can't make sense why my query doesn't work. It's a rather simple INNER JOIN and we're working on MySQL5. I know, there was a change with join with the precedence of explicitly called joins over comas. But I'm not doing any of that. My assembled query looks like this: SELECT SQL_CALC_FOUND_ROWS k_services.id, service_status, service_tourno, service_date, service_cxlDate, service_difficultPeriod, service_priority, service_currency, service_key_so, service_price_so, service_key_ok, service_price_cfm, service_supplement FROM k_services JOIN k_remarks ON k_remarks.remark_service = k_services.id WHERE k_services.service_market = 2 AND k_remarks.remark_type = 9 LIMIT 0, 25 Which returns me an error: Unknown column 'k_remarks.remark_type' in 'where clause. However, when I pop this exact same query into SQLyog it executes just fine with the desired/expected results. Any ideas? Thank you. a.
mysql
syntax-error
inner-join
iunknown
null
null
open
MySQL Inner Join 'Unkown column' === I did my reading on this and still can't make sense why my query doesn't work. It's a rather simple INNER JOIN and we're working on MySQL5. I know, there was a change with join with the precedence of explicitly called joins over comas. But I'm not doing any of that. My assembled query looks like this: SELECT SQL_CALC_FOUND_ROWS k_services.id, service_status, service_tourno, service_date, service_cxlDate, service_difficultPeriod, service_priority, service_currency, service_key_so, service_price_so, service_key_ok, service_price_cfm, service_supplement FROM k_services JOIN k_remarks ON k_remarks.remark_service = k_services.id WHERE k_services.service_market = 2 AND k_remarks.remark_type = 9 LIMIT 0, 25 Which returns me an error: Unknown column 'k_remarks.remark_type' in 'where clause. However, when I pop this exact same query into SQLyog it executes just fine with the desired/expected results. Any ideas? Thank you. a.
0
8,526,695
12/15/2011 21:14:31
1,067,018
11/26/2011 15:11:13
35
0
MySQL Count rows
I have a database Quiz Attempts Quiz1 1 Quiz1 2 Quiz1 3 Quiz1 4 Quiz2 1 Quiz2 2 I want the output like Quiz count(Attempts) Quiz1 4 Quiz2 2
mysql
null
null
null
null
12/15/2011 22:27:00
not a real question
MySQL Count rows === I have a database Quiz Attempts Quiz1 1 Quiz1 2 Quiz1 3 Quiz1 4 Quiz2 1 Quiz2 2 I want the output like Quiz count(Attempts) Quiz1 4 Quiz2 2
1
8,083,010
11/10/2011 16:38:52
962,242
09/24/2011 03:57:02
6
0
Optimal SQL query
I have a list of ids and need to retrieve each record by id. Our application uses hibernate as ORM framework. What is the optimal way of querying? Using hibernate's find(id) for each id or execute a sql query with where in clause passing list of ids. Thanks Bala
sql
hibernate
query-optimization
null
null
11/10/2011 20:56:48
not a real question
Optimal SQL query === I have a list of ids and need to retrieve each record by id. Our application uses hibernate as ORM framework. What is the optimal way of querying? Using hibernate's find(id) for each id or execute a sql query with where in clause passing list of ids. Thanks Bala
1
7,656,578
10/05/2011 04:00:22
979,644
10/05/2011 03:52:36
1
0
Java application that uses a string method and length
How do I design and implement a Java application that reads a string from the user and prints it one character per line from right to left?
java
null
null
null
null
10/05/2011 04:05:11
not a real question
Java application that uses a string method and length === How do I design and implement a Java application that reads a string from the user and prints it one character per line from right to left?
1
2,039,282
01/11/2010 00:31:32
20,895
09/23/2008 04:36:32
81
7
c# inheritance override question
What would be the output of this? public class Letter { public virtual string AsAString() { return "???"; } public void example() { this.AsAString(); } } public class A : Letter { public override string AsAString() { return "A"; } public void example2() { base.AsAString(); } } new A().example2(); new A().example();
c#
inheritance
null
null
null
null
open
c# inheritance override question === What would be the output of this? public class Letter { public virtual string AsAString() { return "???"; } public void example() { this.AsAString(); } } public class A : Letter { public override string AsAString() { return "A"; } public void example2() { base.AsAString(); } } new A().example2(); new A().example();
0
7,358,547
09/09/2011 07:44:54
189,006
10/13/2009 10:27:55
1,697
72
Probelm in .Net JSON based Web service
I am developing a ASP .Net Web service. I want the data in JSON format. But I am getting only partial results. This is about the environment. > Microsoft Visual Studio 2008 Version 9.0.21022.8 RTM Microsoft .NET > Framework Version 3.5 > > Installed Edition: Professional I have included the following in my code. using System.Web.Script.Services; using System.Web.Script.Serialization; This is the method I am using: [WebMethod(EnableSession = true)] [ScriptMethod(ResponseFormat = ResponseFormat.Json)] public string getDeviceTokens() { ArrayList list = (ArrayList)Session["Session"]; //String s =(String) Session["Session"]; return new JavaScriptSerializer().Serialize(list); } The result I am getting is: **<string>["one","two"]</string>** I need the response as **["one","two"]** What is the problem here? Is there any other setting I need to do?
asp.net
web-services
json
null
null
null
open
Probelm in .Net JSON based Web service === I am developing a ASP .Net Web service. I want the data in JSON format. But I am getting only partial results. This is about the environment. > Microsoft Visual Studio 2008 Version 9.0.21022.8 RTM Microsoft .NET > Framework Version 3.5 > > Installed Edition: Professional I have included the following in my code. using System.Web.Script.Services; using System.Web.Script.Serialization; This is the method I am using: [WebMethod(EnableSession = true)] [ScriptMethod(ResponseFormat = ResponseFormat.Json)] public string getDeviceTokens() { ArrayList list = (ArrayList)Session["Session"]; //String s =(String) Session["Session"]; return new JavaScriptSerializer().Serialize(list); } The result I am getting is: **<string>["one","two"]</string>** I need the response as **["one","two"]** What is the problem here? Is there any other setting I need to do?
0
7,332,772
09/07/2011 11:03:07
932,547
09/07/2011 11:03:07
1
0
what's your programming question? be specific
I have a form with 2 submit buttons: other text controls here <SubmitControl(preview=Preview) (readonly)> <SubmitControl(<None>=Send) (readonly)> After populating the text fields and doing br.submit() it seems it clicks the preview submit. How can I submit the form using the Send button These are the attibutes of the Send button: {'accesskey': 's', 'type': 'submit', 'onclick': 'return submitThisOnce(this);', 'value': 'Send', 'tabindex': '6'} and the javascript functions are: / Only allow form submission ONCE. function submitonce(theform) { smf_formSubmitted = true; } function submitThisOnce(form) { // Hateful, hateful fix for Safari 1.3 beta. if (navigator.userAgent.indexOf('AppleWebKit') != -1) return !smf_formSubmitted; if (typeof(form.form) != "undefined") form = form.form; for (var i = 0; i < form.length; i++) if (typeof(form[i]) != "undefined" && form[i].tagName.toLowerCase() == "textarea") form[i].readOnly = true; return !smf_formSubmitted; }
python
forms
mechanize
null
null
09/07/2011 12:48:42
not a real question
what's your programming question? be specific === I have a form with 2 submit buttons: other text controls here <SubmitControl(preview=Preview) (readonly)> <SubmitControl(<None>=Send) (readonly)> After populating the text fields and doing br.submit() it seems it clicks the preview submit. How can I submit the form using the Send button These are the attibutes of the Send button: {'accesskey': 's', 'type': 'submit', 'onclick': 'return submitThisOnce(this);', 'value': 'Send', 'tabindex': '6'} and the javascript functions are: / Only allow form submission ONCE. function submitonce(theform) { smf_formSubmitted = true; } function submitThisOnce(form) { // Hateful, hateful fix for Safari 1.3 beta. if (navigator.userAgent.indexOf('AppleWebKit') != -1) return !smf_formSubmitted; if (typeof(form.form) != "undefined") form = form.form; for (var i = 0; i < form.length; i++) if (typeof(form[i]) != "undefined" && form[i].tagName.toLowerCase() == "textarea") form[i].readOnly = true; return !smf_formSubmitted; }
1
1,432,619
09/16/2009 12:20:24
169,210
09/06/2009 09:29:40
87
3
How to handle precision in Floating point arithmetic in C
In programming contests, floating point arithmetic related questions say "the error is answer must be less than 1e-6" or "The answer must be correct upto 6 decimal places". Does this mean that I can perform calculations on FP variables without worrying about the precision and only while printing I should write like printf("%.6lf",a); Am I understanding it correctly? And do the above 2 quotes mean the same thing? In one of the questions, when I used a double array and performed some calculations and printed one of the array elements. It printed "-0.000000". What does this mean? But when I used vectors in C++ like vector<double> arr(10,0.0); the same calculations printed "0.000000". Why there is such difference?
floating-point
c
null
null
null
null
open
How to handle precision in Floating point arithmetic in C === In programming contests, floating point arithmetic related questions say "the error is answer must be less than 1e-6" or "The answer must be correct upto 6 decimal places". Does this mean that I can perform calculations on FP variables without worrying about the precision and only while printing I should write like printf("%.6lf",a); Am I understanding it correctly? And do the above 2 quotes mean the same thing? In one of the questions, when I used a double array and performed some calculations and printed one of the array elements. It printed "-0.000000". What does this mean? But when I used vectors in C++ like vector<double> arr(10,0.0); the same calculations printed "0.000000". Why there is such difference?
0
11,310,307
07/03/2012 11:50:48
1,427,776
05/31/2012 07:36:40
6
0
Create a apps that allow to user login with his facebook id and password
I would like to make an apps that user don't input many time when user would like to use this application. I mean, I'm developing a apps in which i don't want to its user create new account or registration for login, it(my apps) should be allow facebook id and password for login. i want to just verify a facebook id and password...correct or not for login in my apps. if any buddy have a simple way for this please show me. Thanks in advance.....!
android
facebook
null
null
null
07/05/2012 03:55:25
not a real question
Create a apps that allow to user login with his facebook id and password === I would like to make an apps that user don't input many time when user would like to use this application. I mean, I'm developing a apps in which i don't want to its user create new account or registration for login, it(my apps) should be allow facebook id and password for login. i want to just verify a facebook id and password...correct or not for login in my apps. if any buddy have a simple way for this please show me. Thanks in advance.....!
1
4,210,534
11/18/2010 00:18:21
435,645
08/31/2010 07:01:49
1
0
String with number as Variable , Unix C question.
I want to use abc1 ,abc2, abc3,abc4,..abc100,as struct variable name. But I don't know how to set this? have no idea. Can anybody help me out? Thanks indeed.
c
string
gcc
ansi
null
11/22/2010 02:49:45
not a real question
String with number as Variable , Unix C question. === I want to use abc1 ,abc2, abc3,abc4,..abc100,as struct variable name. But I don't know how to set this? have no idea. Can anybody help me out? Thanks indeed.
1
5,567,299
04/06/2011 13:40:20
694,917
04/06/2011 13:40:20
1
0
SQL VB.net insert using select AND values
New to using SQL and I am having trouble accomplishing something that I figured would be simple. I am trying to create and INSERT that will insert the MAX() value from the first column in one table to the first column in another table while the rest of the columns will be filled with parameters. I have tried switching my code around to see if I just had the syntax wrong but I've had no luck and I'm not even sure what I'm trying to do is possible (at least in a single INSERT). Here is what I have at the moment: INSERT INTO [Table2] VALUES(SELECT(Number FROM [Table1] WHERE Max(Number)), @p1, @p2, @p3, @p4, @p5, @p6, @p7, @p8, @p9, @p10)
sql
vb.net
tsql
null
null
null
open
SQL VB.net insert using select AND values === New to using SQL and I am having trouble accomplishing something that I figured would be simple. I am trying to create and INSERT that will insert the MAX() value from the first column in one table to the first column in another table while the rest of the columns will be filled with parameters. I have tried switching my code around to see if I just had the syntax wrong but I've had no luck and I'm not even sure what I'm trying to do is possible (at least in a single INSERT). Here is what I have at the moment: INSERT INTO [Table2] VALUES(SELECT(Number FROM [Table1] WHERE Max(Number)), @p1, @p2, @p3, @p4, @p5, @p6, @p7, @p8, @p9, @p10)
0
8,115,743
11/13/2011 23:44:50
1,044,711
11/13/2011 23:31:19
1
0
Transfer HTML elements from one list to another with Javascript
Thanks for reading! Just have a problem with the following javascript function. I have two UL and I need that when the user clicks on a LI, this element transfers to the other UL. I've managed to move them onClick from on list to the other, the problem appears when I try to move again a LI that was previously in the other UL, when that happens it just doesn't work... function testList() { usersA = document.getElementById("users-a"); usersB = document.getElementById("users-b"); for (var i=0; i < usersA.getElementsByTagName("li").length; i++) { usersA.getElementsByTagName("li")[i].onclick = function() { transfer = this.cloneNode(true); usersB.appendChild(transfer); usersA.removeChild(this); return false; } } for (var i=0; i < usersB.getElementsByTagName("li").length; i++) { usersB.getElementsByTagName("li")[i].onclick = function() { transfer = this.cloneNode(true); usersA.appendChild(transfer); usersB.removeChild(this); return false; } } } I know that my logic sucks but it's all I could come up with. Any ideas why it works the first time I transfer a LI but when I try to move back to its original UL it doesn't work? Thanks a lot folks, looking forward to you advice!
javascript
html
dom
javascript-events
null
null
open
Transfer HTML elements from one list to another with Javascript === Thanks for reading! Just have a problem with the following javascript function. I have two UL and I need that when the user clicks on a LI, this element transfers to the other UL. I've managed to move them onClick from on list to the other, the problem appears when I try to move again a LI that was previously in the other UL, when that happens it just doesn't work... function testList() { usersA = document.getElementById("users-a"); usersB = document.getElementById("users-b"); for (var i=0; i < usersA.getElementsByTagName("li").length; i++) { usersA.getElementsByTagName("li")[i].onclick = function() { transfer = this.cloneNode(true); usersB.appendChild(transfer); usersA.removeChild(this); return false; } } for (var i=0; i < usersB.getElementsByTagName("li").length; i++) { usersB.getElementsByTagName("li")[i].onclick = function() { transfer = this.cloneNode(true); usersA.appendChild(transfer); usersB.removeChild(this); return false; } } } I know that my logic sucks but it's all I could come up with. Any ideas why it works the first time I transfer a LI but when I try to move back to its original UL it doesn't work? Thanks a lot folks, looking forward to you advice!
0
11,441,942
07/11/2012 21:42:46
603,840
02/04/2011 21:34:17
754
8
stop warpper div from moving when scaling browser
I have a simple page that has a wrapper with a background color on it. When I scale the browser in to a small size the wrapper pops out of position. Its like 20px at the left was added. Also when you scale the browser in small the input fields drop down to the next line. How can I stop that. [http://www.artaholic.com/push/bc/acc.html][1] [1]: http://www.artaholic.com/push/bc/acc.html
html
css
null
null
null
null
open
stop warpper div from moving when scaling browser === I have a simple page that has a wrapper with a background color on it. When I scale the browser in to a small size the wrapper pops out of position. Its like 20px at the left was added. Also when you scale the browser in small the input fields drop down to the next line. How can I stop that. [http://www.artaholic.com/push/bc/acc.html][1] [1]: http://www.artaholic.com/push/bc/acc.html
0
10,916,455
06/06/2012 14:37:36
1,382,191
05/08/2012 13:29:53
20
0
Is xml code building behind in VS 2010?
Is xml code building behind after generating UML class diagrams?Sorry for the silly question,I don`t have Ultimate edition to check. Thanks in advance.
visual-studio
null
null
null
null
06/07/2012 10:17:58
not a real question
Is xml code building behind in VS 2010? === Is xml code building behind after generating UML class diagrams?Sorry for the silly question,I don`t have Ultimate edition to check. Thanks in advance.
1
8,165,259
11/17/2011 10:02:30
905,318
08/22/2011 06:13:09
377
10
Automatic synchronization via rsync
I need to keep my code synchronized with the same code on virtual machine. Is there a way to monitor file changes and automatically call rsync or something like that?
sync
rsync
null
null
null
11/17/2011 23:26:19
off topic
Automatic synchronization via rsync === I need to keep my code synchronized with the same code on virtual machine. Is there a way to monitor file changes and automatically call rsync or something like that?
2
7,051,754
08/13/2011 16:26:53
893,223
08/13/2011 16:26:53
1
0
Accessing hierarchical data via JDBC
I have a table Menu that has column id and parent. Can we use normal JDBC (no ORM) to load hierarchy data from database???
java
null
null
null
null
08/13/2011 23:45:39
not a real question
Accessing hierarchical data via JDBC === I have a table Menu that has column id and parent. Can we use normal JDBC (no ORM) to load hierarchy data from database???
1
8,757,196
01/06/2012 11:33:19
1,129,862
01/04/2012 11:58:44
1
0
android java with google app engine
I am trying to develop an android application. My requirement is to use the google app engine. how to use google app engine and what is the use of google app engine?
java
android
google-app-engine
null
null
01/06/2012 15:07:12
not a real question
android java with google app engine === I am trying to develop an android application. My requirement is to use the google app engine. how to use google app engine and what is the use of google app engine?
1
5,705,567
04/18/2011 15:54:42
711,368
04/16/2011 17:22:31
6
0
splitting a string with comma(,)
Is there any wy to split a string with comma str.split(",") will give same string? Also var t = str.split("#") let # be any character..then what is value of t...I know split() returns an array
split
comma
null
null
null
04/18/2011 16:01:20
not a real question
splitting a string with comma(,) === Is there any wy to split a string with comma str.split(",") will give same string? Also var t = str.split("#") let # be any character..then what is value of t...I know split() returns an array
1
3,711,530
09/14/2010 17:51:20
201,666
11/03/2009 12:46:58
24
4
Is There any design pattern to make reports in my application?
I am doing an application and i will show some reports to the users. I would like to know if there is a pattern that helps me doing any report that i want. I also would like to provide the user to choose the fields that he wants in the report. I think it would help many people here, because we usually have reports in our applications. Thank's
design-patterns
patterns
report
null
null
09/15/2010 02:38:39
not a real question
Is There any design pattern to make reports in my application? === I am doing an application and i will show some reports to the users. I would like to know if there is a pattern that helps me doing any report that i want. I also would like to provide the user to choose the fields that he wants in the report. I think it would help many people here, because we usually have reports in our applications. Thank's
1
4,191,261
11/16/2010 04:34:30
257,558
01/23/2010 20:48:14
912
27
Marketing Resources for App Developers
Okay, Okay. I know this is a developer site. *BUT*, and I think the moderators and fellow responders would agree: developers these days are usually also the people that market their product. Especially if you're an independent one-man-team like myself. So I think this can be a relevant question on stackoverflow: I'm wondering what resources (links, suggestions, tips) you have used to market your mobile app?
iphone
android
mobile
marketing
null
11/19/2010 14:09:34
off topic
Marketing Resources for App Developers === Okay, Okay. I know this is a developer site. *BUT*, and I think the moderators and fellow responders would agree: developers these days are usually also the people that market their product. Especially if you're an independent one-man-team like myself. So I think this can be a relevant question on stackoverflow: I'm wondering what resources (links, suggestions, tips) you have used to market your mobile app?
2
11,535,047
07/18/2012 05:54:28
1,210,582
02/15/2012 05:56:22
13
0
oracle table is not listing in the Toad schema browser for the particular schema
I have a table named TableA in oracle 11g database, i could able to select this table by using the particular user id in toad, but i dont find this table in the toad schema browser for that schema in the toad. please advice me on why i couldnt able to find that table in the schema browser or how to find that table?. Let me know if any further information is required.
oracle
toad
null
null
null
null
open
oracle table is not listing in the Toad schema browser for the particular schema === I have a table named TableA in oracle 11g database, i could able to select this table by using the particular user id in toad, but i dont find this table in the toad schema browser for that schema in the toad. please advice me on why i couldnt able to find that table in the schema browser or how to find that table?. Let me know if any further information is required.
0
10,373,239
04/29/2012 15:11:08
786,288
06/06/2011 17:14:47
1
0
timers, threads and compiler misbehaviour
I'm having trouble with something and couldn't find any answers about it, as I don't even know what to search for. I have a done a timer class using QueryPerformanceCounter, from my application, I launch a second thread object that has its own instanced timer and I just have an infinite loop getting delta time from the timer and using it to output the number of loop iterations per second. I've noticed that it was giving me weird values so I started printing delta time and found out it was coming as 0 sometimes, so I went inside the method that returns delta time and did some testing. This is my deltaTime() method: double MyTimer2::deltaTime() { LARGE_INTEGER timenow; QueryPerformanceCounter(&timenow); //std::cout << "timenow=" << (double)timenow.QuadPart << " currentticks=" << (double)m_currentTicks.QuadPart << std::endl; double m_deltaTime = (double)(timenow.QuadPart - m_currentTicks.QuadPart) /* 1000.0*/ / (double)m_frequency.QuadPart; m_currentTicks = timenow; if(m_deltaTime < 0.000001) return 0.0; return m_deltaTime; } So, I put a breakpoint on "return 0.0;" and what happens is that it gets there most of the time, which is not correct. However, if I uncomment the printing code and run, I will never stop on the breakpoint. So in theory, my printing code is making it work correctly, whereas if I remove it, things stop working as they should! How is this possible, why is it happening and how can I fix it? I've tried _ReadWriteBarrier() unsuccessfully. Thanks in advance!
multithreading
compiler
timer
queryperformancecounter
null
null
open
timers, threads and compiler misbehaviour === I'm having trouble with something and couldn't find any answers about it, as I don't even know what to search for. I have a done a timer class using QueryPerformanceCounter, from my application, I launch a second thread object that has its own instanced timer and I just have an infinite loop getting delta time from the timer and using it to output the number of loop iterations per second. I've noticed that it was giving me weird values so I started printing delta time and found out it was coming as 0 sometimes, so I went inside the method that returns delta time and did some testing. This is my deltaTime() method: double MyTimer2::deltaTime() { LARGE_INTEGER timenow; QueryPerformanceCounter(&timenow); //std::cout << "timenow=" << (double)timenow.QuadPart << " currentticks=" << (double)m_currentTicks.QuadPart << std::endl; double m_deltaTime = (double)(timenow.QuadPart - m_currentTicks.QuadPart) /* 1000.0*/ / (double)m_frequency.QuadPart; m_currentTicks = timenow; if(m_deltaTime < 0.000001) return 0.0; return m_deltaTime; } So, I put a breakpoint on "return 0.0;" and what happens is that it gets there most of the time, which is not correct. However, if I uncomment the printing code and run, I will never stop on the breakpoint. So in theory, my printing code is making it work correctly, whereas if I remove it, things stop working as they should! How is this possible, why is it happening and how can I fix it? I've tried _ReadWriteBarrier() unsuccessfully. Thanks in advance!
0
4,251,478
11/22/2010 23:57:50
203,898
11/05/2009 18:06:03
177
3
Java and whitespace-as-syntax (ala Python)?
There is a part of java syntax that bugs the crap out of me: that's curly braces and semicolons. Is there some sort of translator that exists that will allow me to use all of the Java syntax except for this? I want to do something like this: public class Hello: public static void main(String[] args): System.out.println("I like turtles.") public class Another: public static void somethingelse(): System.out.println("And boobs") It's Python's whitespace as syntax model, I've grown to love it. I believe it's cleaner, and easier on the eyes. If it doesn't exist, I'm actually considering heavily investing time into writing a parser that would do this for me. Would this cause problems elsewhere in the language? What kind of hiccups can I expect to run into? I want to use all of the rest of the Java syntax exactly how it is otherwise, just want to modify this small niggle.
java
python
syntax
whitespace
null
null
open
Java and whitespace-as-syntax (ala Python)? === There is a part of java syntax that bugs the crap out of me: that's curly braces and semicolons. Is there some sort of translator that exists that will allow me to use all of the Java syntax except for this? I want to do something like this: public class Hello: public static void main(String[] args): System.out.println("I like turtles.") public class Another: public static void somethingelse(): System.out.println("And boobs") It's Python's whitespace as syntax model, I've grown to love it. I believe it's cleaner, and easier on the eyes. If it doesn't exist, I'm actually considering heavily investing time into writing a parser that would do this for me. Would this cause problems elsewhere in the language? What kind of hiccups can I expect to run into? I want to use all of the rest of the Java syntax exactly how it is otherwise, just want to modify this small niggle.
0
9,248,691
02/12/2012 12:19:03
368,691
06/16/2010 21:23:46
1,453
72
Using Drupal, how do I force t('') to populate the string?
I am trying to make sure that all of the translatable strings are present in the database. Some of them appear very rarely (various form validation errors), therefore it would be a pain to reproduce them all. Instead, I've created an admin module that, once called, goes through an array of all translatable strings and executes `echo t('[the string from the array]')`. After this, I expect to be able to translate those strings using `admin/config/regional/translate/translate`. But not all of them are there. * What am I missing? * If that's for some reason not possible, is there any function that would force entry?
php
drupal
internationalization
null
null
null
open
Using Drupal, how do I force t('') to populate the string? === I am trying to make sure that all of the translatable strings are present in the database. Some of them appear very rarely (various form validation errors), therefore it would be a pain to reproduce them all. Instead, I've created an admin module that, once called, goes through an array of all translatable strings and executes `echo t('[the string from the array]')`. After this, I expect to be able to translate those strings using `admin/config/regional/translate/translate`. But not all of them are there. * What am I missing? * If that's for some reason not possible, is there any function that would force entry?
0
10,310,206
04/25/2012 06:07:32
1,115,161
12/25/2011 07:56:31
84
2
mysqldump and crontab(linux)
I want to make an automatic backup of my database, so i wrote like this 00 10 * * * root mysqldump -u root -ppasswordD billing "/home/backup/database_`date '+%m-%d-%Y'`.sql" But it is not working, any ideas please? Thanks and regards,
linux
mysqldump
null
null
null
04/25/2012 10:01:58
not a real question
mysqldump and crontab(linux) === I want to make an automatic backup of my database, so i wrote like this 00 10 * * * root mysqldump -u root -ppasswordD billing "/home/backup/database_`date '+%m-%d-%Y'`.sql" But it is not working, any ideas please? Thanks and regards,
1
5,094,400
02/23/2011 17:19:23
73,226
03/03/2009 13:40:52
37,618
1,564
Performance of Non Clustered Indexes on Heaps vs Clustered Indexes
[This 2007 White Paper][1] compares the performance for individual select/insert/delete/update and range select statements on a table organized as a clustered index vs that on a table organized as a heap with a non clustered index on the same key columns as the CI table. Generally the clustered index option performed better in the tests as there is only one structure to maintain and because there is no need for bookmark lookups. One potentially interesting case not covered by the paper would have been a comparison between a non clustered index on a heap vs a non clustered index on a clustered index. In that instance I would have expected the heap might even perform better as once at the NCI leaf level SQL Server has a RID to follow directly rather than needing to traverse the clustered index. Is anyone aware of similar formal testing that has been carried out in this area and if so what were the results? [1]: http://technet.microsoft.com/en-gb/library/cc917672.aspx
sql-server
indexing
clustered-index
null
null
03/02/2012 15:49:39
off topic
Performance of Non Clustered Indexes on Heaps vs Clustered Indexes === [This 2007 White Paper][1] compares the performance for individual select/insert/delete/update and range select statements on a table organized as a clustered index vs that on a table organized as a heap with a non clustered index on the same key columns as the CI table. Generally the clustered index option performed better in the tests as there is only one structure to maintain and because there is no need for bookmark lookups. One potentially interesting case not covered by the paper would have been a comparison between a non clustered index on a heap vs a non clustered index on a clustered index. In that instance I would have expected the heap might even perform better as once at the NCI leaf level SQL Server has a RID to follow directly rather than needing to traverse the clustered index. Is anyone aware of similar formal testing that has been carried out in this area and if so what were the results? [1]: http://technet.microsoft.com/en-gb/library/cc917672.aspx
2
8,395,978
12/06/2011 06:02:09
1,082,896
12/06/2011 05:25:34
1
0
How to expand IPv6 address in C
I want to expand my IPv6 address.Is there any way to expand that address to a full one? If I get abcd:12::7 then I need to expand it to abcd:0012:0000:0000:0000:0000:0000:0007 mainly for incrementating the address. Solution should be in C
c
null
null
null
null
12/06/2011 22:35:55
not a real question
How to expand IPv6 address in C === I want to expand my IPv6 address.Is there any way to expand that address to a full one? If I get abcd:12::7 then I need to expand it to abcd:0012:0000:0000:0000:0000:0000:0007 mainly for incrementating the address. Solution should be in C
1
895,904
05/22/2009 00:13:07
31,671
10/27/2008 01:07:58
3,199
217
Select inputs and text inputs in HTML - Best way to make equal width?
I've got a simple form like so (illustrative purposes only) <form> <div class="input-row"> <label>Name</label> <input type="text" name="name" /> </div> <div class="input-row"> <label>Country</label> <select name="country"> <option>Australia</option> <option>USA</option> </select> </div> </form> My layout method using CSS is as follows form { width: 500px; } form .input-row { display: block; width: 100%; height: auto; clear: both; overflow: hidden; /* stretch to contain floated children */ margin-bottom: 10px; } form .input-row label { display: block; float: left; } form .input-row input, form .input-row select { display: block; width: 50%; float: right; } This all aligns quite nicely, except my select box (in Firefox anyway) isn't always the same width as my input boxes. It generally has a few pixels shorter width. I've tried changing the width to a pixel size (e.g. 200px) but it has not made a difference. Here is an example ![][1] What is the best way to get these to all have the same width? I hope it doesn't resort to me setting the select box's width individually, or putting them into tables... Thanks! [1]: http://vanquish.websitewelcome.com/~toberua/images/stack-overflow.png
xhtml
css
null
null
null
null
open
Select inputs and text inputs in HTML - Best way to make equal width? === I've got a simple form like so (illustrative purposes only) <form> <div class="input-row"> <label>Name</label> <input type="text" name="name" /> </div> <div class="input-row"> <label>Country</label> <select name="country"> <option>Australia</option> <option>USA</option> </select> </div> </form> My layout method using CSS is as follows form { width: 500px; } form .input-row { display: block; width: 100%; height: auto; clear: both; overflow: hidden; /* stretch to contain floated children */ margin-bottom: 10px; } form .input-row label { display: block; float: left; } form .input-row input, form .input-row select { display: block; width: 50%; float: right; } This all aligns quite nicely, except my select box (in Firefox anyway) isn't always the same width as my input boxes. It generally has a few pixels shorter width. I've tried changing the width to a pixel size (e.g. 200px) but it has not made a difference. Here is an example ![][1] What is the best way to get these to all have the same width? I hope it doesn't resort to me setting the select box's width individually, or putting them into tables... Thanks! [1]: http://vanquish.websitewelcome.com/~toberua/images/stack-overflow.png
0
4,429,757
12/13/2010 14:26:28
478,419
10/17/2010 08:39:15
58
1
Remove line break from textarea
I have a textarea like this: `<textarea tabindex="1" maxlength='2000' id="area"></textarea>` I watch this textarea with jquery: $("#area").keypress(function (e) { if (e.keyCode != 13) return; var msg = $("#area").val().replace("\n", ""); if (!util.isBlank(msg)) { send(msg); $("#area").val(""); } }); send() submits the message to the server if the return key was pressed and if the message is not blank or only containing line spaces. The problem: After sending the message, the textarea is not cleared. On the first page load, the textarea is empty. Once a message was submitted, there is one blank line in the textarea and I don't know how to get rid of it.
javascript
jquery
html
textarea
null
null
open
Remove line break from textarea === I have a textarea like this: `<textarea tabindex="1" maxlength='2000' id="area"></textarea>` I watch this textarea with jquery: $("#area").keypress(function (e) { if (e.keyCode != 13) return; var msg = $("#area").val().replace("\n", ""); if (!util.isBlank(msg)) { send(msg); $("#area").val(""); } }); send() submits the message to the server if the return key was pressed and if the message is not blank or only containing line spaces. The problem: After sending the message, the textarea is not cleared. On the first page load, the textarea is empty. Once a message was submitted, there is one blank line in the textarea and I don't know how to get rid of it.
0
5,488,508
03/30/2011 15:31:27
575,596
01/14/2011 11:25:52
12
0
How do you edit text messages/urls on HTC Desire
So I've been asked this question by another developer in work and I couldn't figure it out. Now having a Desire myself, how the hell do you edit a text message that you are composing? The same for a URL you may have made a typo in? On the iPhone you would hold down on the area where you want to edit and a little zoom bubble would appear and the cursor would be where you want it allowing you to retype. Can this even be done on Android devices?
android
null
null
null
null
03/30/2011 16:19:59
off topic
How do you edit text messages/urls on HTC Desire === So I've been asked this question by another developer in work and I couldn't figure it out. Now having a Desire myself, how the hell do you edit a text message that you are composing? The same for a URL you may have made a typo in? On the iPhone you would hold down on the area where you want to edit and a little zoom bubble would appear and the cursor would be where you want it allowing you to retype. Can this even be done on Android devices?
2
7,885,170
10/25/2011 05:47:50
652,994
03/10/2011 06:20:56
6
0
Is it possible to access the camera of a handset from an application in android?
I require to know if it is possible to open the camera of a handset, from an android application and click a picture to save it? If so, what classes do i use? Please give me a rough idea on how i can go about it.
android
application
camera
null
null
null
open
Is it possible to access the camera of a handset from an application in android? === I require to know if it is possible to open the camera of a handset, from an android application and click a picture to save it? If so, what classes do i use? Please give me a rough idea on how i can go about it.
0
10,518,441
05/09/2012 14:44:54
1,384,891
05/09/2012 14:40:47
1
0
I need help about C homework
Actually i am in interest on C#. but here is an example about C programming. i dont know many about C. could you plss help me , what i have to do. i think i will have to use Arrays but which method i should use ? "Write a C program which reads a paragraph from user that has 20 lines. In each line, words are separated by a single space and each line terminates with an end of line character. Each line has unknown number of words. Write a program to display number of words in each line. Use a function that receives a string variable and returns the number words to the calling function." If the input is: I was in Sofia in this week It was such a great weekend I spend some time in The output will be: Line Word number 1 7 2 6 3 5 which way i should keep ? thank you for your attention
c
arrays
homework
null
null
05/09/2012 14:55:00
not a real question
I need help about C homework === Actually i am in interest on C#. but here is an example about C programming. i dont know many about C. could you plss help me , what i have to do. i think i will have to use Arrays but which method i should use ? "Write a C program which reads a paragraph from user that has 20 lines. In each line, words are separated by a single space and each line terminates with an end of line character. Each line has unknown number of words. Write a program to display number of words in each line. Use a function that receives a string variable and returns the number words to the calling function." If the input is: I was in Sofia in this week It was such a great weekend I spend some time in The output will be: Line Word number 1 7 2 6 3 5 which way i should keep ? thank you for your attention
1
9,311,948
02/16/2012 13:17:37
432,782
08/27/2010 09:58:22
1,183
33
How to consistently prevent crashes caused by handling Core Data's merge notification while iterating over a managed entity
I stumbled onto a very 'rare' concurrency bug in my application today, for which I'm having trouble coming up with a durable solution. The scenario: The application modifies some managed objects on a background thread, after getting data from a server call, and stores it into it's dedicated managed object context. Upon saving, Core Data automatically dispatches the `NSManagedObjectContextDidSaveNotification`, which is handled in my model class by performing a `mergeChangesFromContextDidSaveNotification` on the main thread and its context. What is highly unlikely, but as race conditions go, still prone to happen is that at the exact moment the merge is performed, the UI thread is running through a Core Data backed `NSSet` instance influenced by the merge. This exception is the result: > \*** Terminating app due to uncaught exception 'NSGenericException', reason: '\*** Collection <__NSCFSet: 0x3fb6a0> was mutated while being enumerated.' I can come up with a fix for this single exception, for example by iterating over a copy of the set, but there's something deeper going on here. If I have to take counter measures for this kind of scenario I'll soon be making copies with every iteration that involves a CD set. That can't be the solution, right? And even if, the background thread could have deleted items in the set, or done other things that have an impact which will cause successive exceptions. What am I missing? What is the proper way or place to perform the `mergeChangesFromContextDidSaveNotification` method? Should I encapsulate it into a synchronized/locked method, and even if so, would that prevent this exception at all? Cheers.
core-data
concurrency
iteration
nsmanagedobjectcontext
null
null
open
How to consistently prevent crashes caused by handling Core Data's merge notification while iterating over a managed entity === I stumbled onto a very 'rare' concurrency bug in my application today, for which I'm having trouble coming up with a durable solution. The scenario: The application modifies some managed objects on a background thread, after getting data from a server call, and stores it into it's dedicated managed object context. Upon saving, Core Data automatically dispatches the `NSManagedObjectContextDidSaveNotification`, which is handled in my model class by performing a `mergeChangesFromContextDidSaveNotification` on the main thread and its context. What is highly unlikely, but as race conditions go, still prone to happen is that at the exact moment the merge is performed, the UI thread is running through a Core Data backed `NSSet` instance influenced by the merge. This exception is the result: > \*** Terminating app due to uncaught exception 'NSGenericException', reason: '\*** Collection <__NSCFSet: 0x3fb6a0> was mutated while being enumerated.' I can come up with a fix for this single exception, for example by iterating over a copy of the set, but there's something deeper going on here. If I have to take counter measures for this kind of scenario I'll soon be making copies with every iteration that involves a CD set. That can't be the solution, right? And even if, the background thread could have deleted items in the set, or done other things that have an impact which will cause successive exceptions. What am I missing? What is the proper way or place to perform the `mergeChangesFromContextDidSaveNotification` method? Should I encapsulate it into a synchronized/locked method, and even if so, would that prevent this exception at all? Cheers.
0
11,507,155
07/16/2012 15:09:08
1,074,191
11/30/2011 20:27:37
11
0
KCV Value - 3DES Encryption
What is KCV (Key Check Value) in the context of 3-DES Encryption? Is there good documentation on what is KCV and how it can be used in 3-DES Encryption?
.net
security
encryption
null
null
null
open
KCV Value - 3DES Encryption === What is KCV (Key Check Value) in the context of 3-DES Encryption? Is there good documentation on what is KCV and how it can be used in 3-DES Encryption?
0
3,697,235
09/13/2010 00:17:52
439,667
09/04/2010 15:25:29
20
0
Windows Programming
recently, i began to read about windows programming, and i thought i could start with .NET since it is the "FUTURE" but as i happen to figure out, it is just like a fancy wrapper around COM, COM+, AUTOMATION and the rest of MICROSOFT technologies, so i wanna know if it is essential for any microsoft developer to get aquainted with these techs, i would also appreciate someone mentioning a some good books on the subjects .. thanx, AB
windows
null
null
null
null
09/13/2010 23:53:47
not constructive
Windows Programming === recently, i began to read about windows programming, and i thought i could start with .NET since it is the "FUTURE" but as i happen to figure out, it is just like a fancy wrapper around COM, COM+, AUTOMATION and the rest of MICROSOFT technologies, so i wanna know if it is essential for any microsoft developer to get aquainted with these techs, i would also appreciate someone mentioning a some good books on the subjects .. thanx, AB
4
7,689,972
10/07/2011 16:10:15
984,307
10/07/2011 15:56:23
1
0
Extracting HREF from an A tag using the onmouseout Attribute
I am new to BeautifulSoup, I have been trying to search but can't find an answer.. I trying to extract the href from a tag like this: <A HREF="/ProductList.pasp?cat=is2c&amp;rows=10&amp;start=51" onmouseover="hi('next','next_h')" onmouseout="lo('next','next')"> I have tried: nextPageLinks = soup.FindAll('a',attrs={'onmouseout':'lo(\'next\',\'next\')'}) nextPageLinks = soup.FindAll('a',attrs={'onmouseout':"lo('next','next')"}) nextPageLinks = soup.FindAll('a', onmouseout=True) nextPageLinks = soup.FindAll('a', onmouseout="lo('next','next')") Then: for eachLink in nextPageLinks: prink eachLink['href'] All of these have produced an error: TypeError: 'NoneType' object is not callable Any tips as to what I am doing wrong? Thanks in advance for any help.
python
beautifulsoup
null
null
null
07/30/2012 03:23:45
too localized
Extracting HREF from an A tag using the onmouseout Attribute === I am new to BeautifulSoup, I have been trying to search but can't find an answer.. I trying to extract the href from a tag like this: <A HREF="/ProductList.pasp?cat=is2c&amp;rows=10&amp;start=51" onmouseover="hi('next','next_h')" onmouseout="lo('next','next')"> I have tried: nextPageLinks = soup.FindAll('a',attrs={'onmouseout':'lo(\'next\',\'next\')'}) nextPageLinks = soup.FindAll('a',attrs={'onmouseout':"lo('next','next')"}) nextPageLinks = soup.FindAll('a', onmouseout=True) nextPageLinks = soup.FindAll('a', onmouseout="lo('next','next')") Then: for eachLink in nextPageLinks: prink eachLink['href'] All of these have produced an error: TypeError: 'NoneType' object is not callable Any tips as to what I am doing wrong? Thanks in advance for any help.
3
11,086,773
06/18/2012 16:09:55
478,520
10/17/2010 12:59:42
1,278
26
PHP function use variable from outside
Here is a function function parts($part) { $structure = 'http://'.$site_url.'content/'; echo($structure.$part.'.php'); } It uses a variable $site_url that was defined at the top of this page, but this variable is not being passes in the function. How do we get it to return in the function.
php
function
variables
null
null
null
open
PHP function use variable from outside === Here is a function function parts($part) { $structure = 'http://'.$site_url.'content/'; echo($structure.$part.'.php'); } It uses a variable $site_url that was defined at the top of this page, but this variable is not being passes in the function. How do we get it to return in the function.
0
2,503,131
03/23/2010 19:54:18
300,260
03/23/2010 19:35:31
1
0
Introduce Delay after keyReleased() event
So, I'm working with swing and I need to find a clean (non-CPU-hogging-way) to introduce a delay on a text field. Basically, users will enter a number into this field and the keyReleased() event checks that the input fits a few parameters and then assigns the value to a data storage element in the program. If the data is invalid, it displays a message. Since the routine is called every time they type a letter (unless they type VERY fast), the input process becomes quite annoying (as in general one or two characters of data are not going to fit the allowed parameters). I've tried setting up a timer object and a timer task for it, however it doesn't seem to work very well (because it delays the thread the program is running on). The option to just wait until the data reaches a certain length is also not possible since (as state before) the input can vary in length. Anyone got any ideas? Thanks!
java
swing
delay
null
null
null
open
Introduce Delay after keyReleased() event === So, I'm working with swing and I need to find a clean (non-CPU-hogging-way) to introduce a delay on a text field. Basically, users will enter a number into this field and the keyReleased() event checks that the input fits a few parameters and then assigns the value to a data storage element in the program. If the data is invalid, it displays a message. Since the routine is called every time they type a letter (unless they type VERY fast), the input process becomes quite annoying (as in general one or two characters of data are not going to fit the allowed parameters). I've tried setting up a timer object and a timer task for it, however it doesn't seem to work very well (because it delays the thread the program is running on). The option to just wait until the data reaches a certain length is also not possible since (as state before) the input can vary in length. Anyone got any ideas? Thanks!
0
7,771,996
10/14/2011 18:32:49
995,952
10/14/2011 18:16:14
1
0
Create a facebook event with a picture with Graph API
I want to create an event with a **picture** in facebook from my iOS app using the graph API but everything works except for the picture. My request is like this: NSMutableDictionary *params = [NSMutableDictionary dictionaryWithObjectsAndKeys: @"title of the event", @"name", @"description of the event", @"description", [NSString stringWithFormat:@"%@", [dateFormatter stringFromDate:[[NSDate date] dateByAddingHours:2]]], @"start_time", @"http://.../appicon.png", @"picture", nil]; [facebook requestWithGraphPath:@"me/events" andParams:params andHttpMethod:@"POST" andDelegate:self]; So..does someone know how I could solve this problem?
objective-c
ios
facebook-graph-api
null
null
null
open
Create a facebook event with a picture with Graph API === I want to create an event with a **picture** in facebook from my iOS app using the graph API but everything works except for the picture. My request is like this: NSMutableDictionary *params = [NSMutableDictionary dictionaryWithObjectsAndKeys: @"title of the event", @"name", @"description of the event", @"description", [NSString stringWithFormat:@"%@", [dateFormatter stringFromDate:[[NSDate date] dateByAddingHours:2]]], @"start_time", @"http://.../appicon.png", @"picture", nil]; [facebook requestWithGraphPath:@"me/events" andParams:params andHttpMethod:@"POST" andDelegate:self]; So..does someone know how I could solve this problem?
0
5,733,258
04/20/2011 16:01:14
529,995
12/03/2010 23:08:22
287
18
Textbox on TextChanged event giving error!
I have a textbox in my webpage and I want to fire as soon User clicks or enter something on this textbox. This is my mockup code: <asp:TextBox ID="txtAgentName" runat="server" OnTextChanged = "txtAgentName_TextChanged"></asp:TextBox> But when I am running this webpage it is showing me this err: CS0123: No overload for 'txtAgentName_TextChanged' matches delegate 'System.EventHandler' What I am doing wrong here?
c#
asp.net
textbox
null
null
null
open
Textbox on TextChanged event giving error! === I have a textbox in my webpage and I want to fire as soon User clicks or enter something on this textbox. This is my mockup code: <asp:TextBox ID="txtAgentName" runat="server" OnTextChanged = "txtAgentName_TextChanged"></asp:TextBox> But when I am running this webpage it is showing me this err: CS0123: No overload for 'txtAgentName_TextChanged' matches delegate 'System.EventHandler' What I am doing wrong here?
0
11,263,743
06/29/2012 14:33:57
182,894
10/02/2009 04:00:30
128
9
How to include a mapping as a base to a new mapping?
Is it possibly to use a mapping from a referenced assembly as a base for a new mapping? The reasoning behind this is there are general objects many applications use, thus they reference the CentralDataLayer.dll. The issue is some applications have additional tables that are relational to tables from the CentralDataLayer. So I want to be able to extend these mapping from these applications. The referenced base mapping looks as it normally would: <?xml version="1.0" encoding="utf-8" ?> <hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" assembly="CentralDataLayer" namespace="NHibernate.Map"> <class name="NHibernate.Map.Employee, CentralDataLayer" table="`wt_employee`" schema="`wt_global`"> <id name="Id" column="`emp_id`" type="Int32" unsaved-value="0"> <generator class="native" /> </id> <property name="Number" column="`emp_number`" type="Int32" not-null="true" /> <property name="Email" column="`email`" type="String" length="100" /> <property name="IsFullTime" column="`is_full_time`" type="Boolean" not-null="true" /> <property name="HireDate" column="`hire_date`" type="Date" /> <property name="SsnSerialNumber" column="`last4ssn`" type="String" lazy="true" /> <property name="OfficePhone" column="`work_phone`" type="String" length="10" /> <property name="OfficeExtension" column="`work_phone_extn`" type="String" length="5" /> <component name="UpdateRecord" class="NHibernate.Map.Component.UpdateRecord, CentralDataLayer"> <property name="Date" column="`updated_dt`" type="Date" /> <property name="By" column="`updated_by`" type="String" length="60" /> </component> <many-to-one name="User" column="`user_id`" class="NHibernate.Map.User, CentralDataLayer" unique="true" /> <many-to-one name="Job" column="`job_id`" class="NHibernate.Map.Job, CentralDataLayer" /> </class> </hibernate-mapping> The next a mapping file is the one I'm unsure about: <?xml version="1.0" encoding="utf-8" ?> <hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" assembly="DataLayer" namespace="NHibernate.Map.WIP" auto-import="false"> <class name="NHibernate.Map.WIP.Employee, DataLayer" table="`wt_employee`" schema="`wt_wip`"> <!-- Logically I would do something like this. --> <include class="NHibernate.Map.Employee" table="`wt_employee`" schema="`wt_global`" /> <property name="Active" column="`emp_active`" type="Boolean" not-null="true" /> <property name="DashboardColumnAmount" column="`emp_dashboard_col_amount`" type="Byte" not-null="true" /> </class> </hibernate-mapping> And the resulting class for the NHibernate.Map.WIP.Employee mapping would be: namespace NHibernate.Map.WIP { public class Employee : Map.Employee { #region Fields private bool _active; private byte _dashboardColumnAmount; #endregion Fields #region Properties public virtual bool Active { get { return _active; } set { _active = value; } } public virtual byte DashboardColumnAmount { get { return _dashboardColumnAmount; } set { _dashboardColumnAmount = value; } } #endregion Properties } } Now the developer should be able to use NHibernate.Map.WIP.Employee in there project with the connected NHibernate.Map.Employee Data.
c#-4.0
nhibernate-mapping
partial-classes
null
null
null
open
How to include a mapping as a base to a new mapping? === Is it possibly to use a mapping from a referenced assembly as a base for a new mapping? The reasoning behind this is there are general objects many applications use, thus they reference the CentralDataLayer.dll. The issue is some applications have additional tables that are relational to tables from the CentralDataLayer. So I want to be able to extend these mapping from these applications. The referenced base mapping looks as it normally would: <?xml version="1.0" encoding="utf-8" ?> <hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" assembly="CentralDataLayer" namespace="NHibernate.Map"> <class name="NHibernate.Map.Employee, CentralDataLayer" table="`wt_employee`" schema="`wt_global`"> <id name="Id" column="`emp_id`" type="Int32" unsaved-value="0"> <generator class="native" /> </id> <property name="Number" column="`emp_number`" type="Int32" not-null="true" /> <property name="Email" column="`email`" type="String" length="100" /> <property name="IsFullTime" column="`is_full_time`" type="Boolean" not-null="true" /> <property name="HireDate" column="`hire_date`" type="Date" /> <property name="SsnSerialNumber" column="`last4ssn`" type="String" lazy="true" /> <property name="OfficePhone" column="`work_phone`" type="String" length="10" /> <property name="OfficeExtension" column="`work_phone_extn`" type="String" length="5" /> <component name="UpdateRecord" class="NHibernate.Map.Component.UpdateRecord, CentralDataLayer"> <property name="Date" column="`updated_dt`" type="Date" /> <property name="By" column="`updated_by`" type="String" length="60" /> </component> <many-to-one name="User" column="`user_id`" class="NHibernate.Map.User, CentralDataLayer" unique="true" /> <many-to-one name="Job" column="`job_id`" class="NHibernate.Map.Job, CentralDataLayer" /> </class> </hibernate-mapping> The next a mapping file is the one I'm unsure about: <?xml version="1.0" encoding="utf-8" ?> <hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" assembly="DataLayer" namespace="NHibernate.Map.WIP" auto-import="false"> <class name="NHibernate.Map.WIP.Employee, DataLayer" table="`wt_employee`" schema="`wt_wip`"> <!-- Logically I would do something like this. --> <include class="NHibernate.Map.Employee" table="`wt_employee`" schema="`wt_global`" /> <property name="Active" column="`emp_active`" type="Boolean" not-null="true" /> <property name="DashboardColumnAmount" column="`emp_dashboard_col_amount`" type="Byte" not-null="true" /> </class> </hibernate-mapping> And the resulting class for the NHibernate.Map.WIP.Employee mapping would be: namespace NHibernate.Map.WIP { public class Employee : Map.Employee { #region Fields private bool _active; private byte _dashboardColumnAmount; #endregion Fields #region Properties public virtual bool Active { get { return _active; } set { _active = value; } } public virtual byte DashboardColumnAmount { get { return _dashboardColumnAmount; } set { _dashboardColumnAmount = value; } } #endregion Properties } } Now the developer should be able to use NHibernate.Map.WIP.Employee in there project with the connected NHibernate.Map.Employee Data.
0
7,524,464
09/23/2011 05:04:00
960,438
09/23/2011 05:04:00
1
0
Create List of Best Facebook Pages on Website
About 3/4 the way down on this webpage is a list of facebook pages. [List of Facebook pages on website][1] I'd like to replicate this on a webpage on my own website. Can anyone help tell me whether of not there is a plug-in to create this or do I need to code it myself? I guess I'd have to use the facebook image and font and then get the plug-in for the like button, but I'm hoping there's an easier way. Hope someone can give me some tips. - Scott [1]: http://www.mashpedia.com/scoliosis
facebook
plugins
null
null
null
null
open
Create List of Best Facebook Pages on Website === About 3/4 the way down on this webpage is a list of facebook pages. [List of Facebook pages on website][1] I'd like to replicate this on a webpage on my own website. Can anyone help tell me whether of not there is a plug-in to create this or do I need to code it myself? I guess I'd have to use the facebook image and font and then get the plug-in for the like button, but I'm hoping there's an easier way. Hope someone can give me some tips. - Scott [1]: http://www.mashpedia.com/scoliosis
0
5,838,203
04/29/2011 22:57:08
722,567
04/24/2011 11:37:59
6
0
How to prevent the event of mouse on a div contains anchors viedoes images ..ect to happen
first i hope you got what i want totally from my title:). simply if i have for example a div tag contains an anchor tag or video or any thing that responses to the user mouse or keyboard click to stop responding to that action.the way that i want to fulfill this requirement is by adding an outer div that has the property to cover the entire tags but not hid them . a similar example to my case is under this link of google image a snapshot of stackoverflow image surrounded by the web content but between them there is the gray ,as i think, div with low transparency but when you click it direct you to the page i want the same gray div only to be in the top of every html tags,but even if you click on the the gray area it remains .i don't want any image to be in the top . all my concern in the example under the link is the gray area and the web content behind it not also the image .please don't be confused ! http://images.google.com/imgres?imgurl=http://lankyframe.com/wp-content/uploads/2010/12/javascript-Stack-Overflow-in-Line-0-on-Internet-Explorer-Stack-Overflow-pq-stackoverflow.comquestions226102stack-overflow-in-line-0-on-internet-explorer.jpg&imgrefurl=http://lankyframe.com/%3Fm%3D20101210&usg=__kaBu1zPTHNcizXIfZnKIcOVaEgM=&h=514&w=514&sz=56&hl=en&start=51&zoom=1&tbnid=qtO1sjDTlna4xM:&tbnh=157&tbnw=157&ei=mT27TeSpL9_P4waC1_3lBQ&prev=/search%3Fq%3Dstackoverflow%26hl%3Den%26safe%3Dactive%26biw%3D1366%26bih%3D667%26gbv%3D2%26tbm%3Disch0%2C1641&itbs=1&iact=hc&vpx=1108&vpy=376&dur=722&hovh=201&hovw=201&tx=179&ty=165&page=4&ndsp=15&ved=1t:429,r:14,s:51&biw=1366&bih=667 this the thing that i want to apply my requirement on : as you can see the grayCoverDiv div includes anchor,input text area and button . i want them to appear in my page but when the user tries to click on the anchor or the button he can't. in a way he feels that there is an insulator between him and the tags. <div id="grayCoverDiv"> <a id="someweb" src="weblink">click here</a> <img src="some thing"/> <input type="text"/> <input type="button"/> </div> sorry for the long description , i hope you got what i have said :)
javascript
html
css
null
null
04/30/2011 05:16:03
not a real question
How to prevent the event of mouse on a div contains anchors viedoes images ..ect to happen === first i hope you got what i want totally from my title:). simply if i have for example a div tag contains an anchor tag or video or any thing that responses to the user mouse or keyboard click to stop responding to that action.the way that i want to fulfill this requirement is by adding an outer div that has the property to cover the entire tags but not hid them . a similar example to my case is under this link of google image a snapshot of stackoverflow image surrounded by the web content but between them there is the gray ,as i think, div with low transparency but when you click it direct you to the page i want the same gray div only to be in the top of every html tags,but even if you click on the the gray area it remains .i don't want any image to be in the top . all my concern in the example under the link is the gray area and the web content behind it not also the image .please don't be confused ! http://images.google.com/imgres?imgurl=http://lankyframe.com/wp-content/uploads/2010/12/javascript-Stack-Overflow-in-Line-0-on-Internet-Explorer-Stack-Overflow-pq-stackoverflow.comquestions226102stack-overflow-in-line-0-on-internet-explorer.jpg&imgrefurl=http://lankyframe.com/%3Fm%3D20101210&usg=__kaBu1zPTHNcizXIfZnKIcOVaEgM=&h=514&w=514&sz=56&hl=en&start=51&zoom=1&tbnid=qtO1sjDTlna4xM:&tbnh=157&tbnw=157&ei=mT27TeSpL9_P4waC1_3lBQ&prev=/search%3Fq%3Dstackoverflow%26hl%3Den%26safe%3Dactive%26biw%3D1366%26bih%3D667%26gbv%3D2%26tbm%3Disch0%2C1641&itbs=1&iact=hc&vpx=1108&vpy=376&dur=722&hovh=201&hovw=201&tx=179&ty=165&page=4&ndsp=15&ved=1t:429,r:14,s:51&biw=1366&bih=667 this the thing that i want to apply my requirement on : as you can see the grayCoverDiv div includes anchor,input text area and button . i want them to appear in my page but when the user tries to click on the anchor or the button he can't. in a way he feels that there is an insulator between him and the tags. <div id="grayCoverDiv"> <a id="someweb" src="weblink">click here</a> <img src="some thing"/> <input type="text"/> <input type="button"/> </div> sorry for the long description , i hope you got what i have said :)
1
10,611,834
05/16/2012 04:02:48
1,397,628
05/16/2012 03:51:18
1
0
Where I can find database schema comparison java API?
Now I need to update sql server.I want to write a tool to generate the synchronous sql script.then I need to compare the the database schemas.Does anyone knows where I can find a open java API?I know there are many GUI tools for database comparison,but I need API.
java
database
api
comparison
null
07/13/2012 15:42:03
not a real question
Where I can find database schema comparison java API? === Now I need to update sql server.I want to write a tool to generate the synchronous sql script.then I need to compare the the database schemas.Does anyone knows where I can find a open java API?I know there are many GUI tools for database comparison,but I need API.
1
7,256,608
08/31/2011 11:58:45
291,772
03/11/2010 18:38:45
1,742
34
getSelection without title attribute?
Im using window.getSelection (); to get the selected text. But, if i select an image to, it returns also title of an image. EXAMPLE: <img src="someSrc.jpg" title="image_title" /> My text here ... if i select all an image too, it returns > image_title My text here ... But i need only > My text here ... Is there any way to get only text, without title? Thanks much .
javascript
getselection
null
null
null
null
open
getSelection without title attribute? === Im using window.getSelection (); to get the selected text. But, if i select an image to, it returns also title of an image. EXAMPLE: <img src="someSrc.jpg" title="image_title" /> My text here ... if i select all an image too, it returns > image_title My text here ... But i need only > My text here ... Is there any way to get only text, without title? Thanks much .
0
11,490,871
07/15/2012 09:33:35
1,141,493
01/10/2012 18:02:55
705
0
binary file and compatibility standard information - C++ / JAVA
I am reading Wikipedia article on difference btween JAVA and C++. One difference is that C++ offers 'multiple binary compatibility standards'. Could you explain what this means, or hint at a good reference. I have a clue that it means that binary 'written with' C++ is very portable, can be used on any OS or environment. I would like to have confirmation and more precision. What is it all about? How to generate binaries? What make it not portable? Thanks and regards.
c++
binary
standards
portability
binaryfiles
null
open
binary file and compatibility standard information - C++ / JAVA === I am reading Wikipedia article on difference btween JAVA and C++. One difference is that C++ offers 'multiple binary compatibility standards'. Could you explain what this means, or hint at a good reference. I have a clue that it means that binary 'written with' C++ is very portable, can be used on any OS or environment. I would like to have confirmation and more precision. What is it all about? How to generate binaries? What make it not portable? Thanks and regards.
0
7,435,744
09/15/2011 18:36:17
839,343
07/11/2011 17:18:56
287
3
What is the easiest way to contibute to Mercurial?
[BuildingOnWindows][1] looks very complicated. Is there a simpler way to hack on Mercurial from a Windows system? (I notice that extension development is very easy, because extensions are loaded dynamically. I wonder whether there is a way to get Mercurial modules to load like this.) [1]: http://mercurial.selenic.com/wiki/BuildingOnWindows
python
mercurial
null
null
null
09/16/2011 09:28:47
not constructive
What is the easiest way to contibute to Mercurial? === [BuildingOnWindows][1] looks very complicated. Is there a simpler way to hack on Mercurial from a Windows system? (I notice that extension development is very easy, because extensions are loaded dynamically. I wonder whether there is a way to get Mercurial modules to load like this.) [1]: http://mercurial.selenic.com/wiki/BuildingOnWindows
4
11,745,048
07/31/2012 16:44:13
20,352
09/22/2008 10:46:16
32
3
C# drop down access issue using jquery
I have issue in accesing drop down item from c# code behind Scenario: i am modifying drop down based on user selection using jquery/ajax call. while accesing the drop down item from code behind, still it retains old list. Please help to access updated drop down list from c# code behind. **Sample code** Jquery code : $.ajax({ type: 'POST', url: "SearchEthics.aspx/LoadNewOptions", contentType: 'application/json;charset=utf-8;', dataType: "json", data: "", success: function (data) { $("#dropdown").empty(); $($.parseJSON(data.d)).each(function () { var Option = $('<option />'); xOption.attr('value', this.value).text(this.label); $('#dropdown').append(Option); } }); }, error: function (XMLHttpRequest, textStatus, errorThrown) { alert(errorThrown); } }); C# Code behind code : dropdown.SelectedItem.Value.Trim() // returns old value
c#
javascript
jquery
null
null
null
open
C# drop down access issue using jquery === I have issue in accesing drop down item from c# code behind Scenario: i am modifying drop down based on user selection using jquery/ajax call. while accesing the drop down item from code behind, still it retains old list. Please help to access updated drop down list from c# code behind. **Sample code** Jquery code : $.ajax({ type: 'POST', url: "SearchEthics.aspx/LoadNewOptions", contentType: 'application/json;charset=utf-8;', dataType: "json", data: "", success: function (data) { $("#dropdown").empty(); $($.parseJSON(data.d)).each(function () { var Option = $('<option />'); xOption.attr('value', this.value).text(this.label); $('#dropdown').append(Option); } }); }, error: function (XMLHttpRequest, textStatus, errorThrown) { alert(errorThrown); } }); C# Code behind code : dropdown.SelectedItem.Value.Trim() // returns old value
0
5,585,356
04/07/2011 17:50:00
562,795
01/04/2011 16:03:52
11
0
how to reverse a single linked list
class Node { object a ; Node m_nextnode; } class Linked list { Node m_startN0de; void Reverse() { } can anybody help me to complete the code }
c#
null
null
null
null
04/08/2011 13:36:24
not a real question
how to reverse a single linked list === class Node { object a ; Node m_nextnode; } class Linked list { Node m_startN0de; void Reverse() { } can anybody help me to complete the code }
1
2,135,438
01/25/2010 20:35:54
53,354
01/09/2009 14:24:20
151
13
Delaying SWT Table Refresh
We have a [ViewerFilter][1] for a [TableViewer][2] that is a little slow, so to try to give the impression of awesomeness, we wanted to have the viewer wait 500 milliseconds before refreshing the window (otherwise, it was blocking after every key stroke). Not having any clue what I was doing, I tried creating a class that would check if System.currentTimeMillis() was greater then the time of the last key stroke + 500 from a different thread. This just caused an Invalid thread access exception to be thrown, so I'm lost. [1]: http://help.eclipse.org/help32/index.jsp?topic=/org.eclipse.platform.doc.isv/reference/api/org/eclipse/jface/viewers/ViewerFilter.html [2]: http://help.eclipse.org/help32/index.jsp?topic=/org.eclipse.platform.doc.isv/reference/api/org/eclipse/jface/viewers/TableViewer.html
swt
eclipse-rcp
null
null
null
null
open
Delaying SWT Table Refresh === We have a [ViewerFilter][1] for a [TableViewer][2] that is a little slow, so to try to give the impression of awesomeness, we wanted to have the viewer wait 500 milliseconds before refreshing the window (otherwise, it was blocking after every key stroke). Not having any clue what I was doing, I tried creating a class that would check if System.currentTimeMillis() was greater then the time of the last key stroke + 500 from a different thread. This just caused an Invalid thread access exception to be thrown, so I'm lost. [1]: http://help.eclipse.org/help32/index.jsp?topic=/org.eclipse.platform.doc.isv/reference/api/org/eclipse/jface/viewers/ViewerFilter.html [2]: http://help.eclipse.org/help32/index.jsp?topic=/org.eclipse.platform.doc.isv/reference/api/org/eclipse/jface/viewers/TableViewer.html
0
9,594,960
03/07/2012 02:25:40
1,253,663
03/07/2012 02:23:03
1
0
<exclude> not working for <javac> having multiple <src> tags
Folks, I have an <javac> apache ant task as below <javac destdir="${build}" classpath="xyz.jar" debug="on"> <src path="${src}"/> <src path="${src2}"/> <include name="mypackage/p1/**"/> <include name="mypackage/p2/**"/> <exclude name="mypackage/p1/testpackage/**"/> </javac> But <exclude> is not working. Please let me know whats the problem or any other alternatives. Due to legacy structure we need to put multiple `<src>` tags in `<javac>` Please help. Thanks
java
ant
build
null
null
03/07/2012 14:53:17
not a real question
<exclude> not working for <javac> having multiple <src> tags === Folks, I have an <javac> apache ant task as below <javac destdir="${build}" classpath="xyz.jar" debug="on"> <src path="${src}"/> <src path="${src2}"/> <include name="mypackage/p1/**"/> <include name="mypackage/p2/**"/> <exclude name="mypackage/p1/testpackage/**"/> </javac> But <exclude> is not working. Please let me know whats the problem or any other alternatives. Due to legacy structure we need to put multiple `<src>` tags in `<javac>` Please help. Thanks
1
8,908,879
01/18/2012 10:54:11
54,999
01/14/2009 13:37:21
3,929
7
Select/map each item of a Powershell array to a new array
I have an array of file names in Powershell, and I would like to prepend a path to each of them and get the result in a new array. In C# I could do this using Linq... var files = new string[] { "file1.txt", "file2.txt" }; var path = "c:\temp\"; var filesWithPath = files.Select(f => path + f).ToArray(); But what is the idiomatic way to do this in Powershell? It looks like there is a foreach syntax I could use, but I figure there must be a more concise, functional way to do it.
powershell
null
null
null
null
null
open
Select/map each item of a Powershell array to a new array === I have an array of file names in Powershell, and I would like to prepend a path to each of them and get the result in a new array. In C# I could do this using Linq... var files = new string[] { "file1.txt", "file2.txt" }; var path = "c:\temp\"; var filesWithPath = files.Select(f => path + f).ToArray(); But what is the idiomatic way to do this in Powershell? It looks like there is a foreach syntax I could use, but I figure there must be a more concise, functional way to do it.
0
2,078,636
01/16/2010 19:19:51
232,054
12/15/2009 11:53:32
21
4
Prototypal inheritence - the correct way
I've been looking into doing inheritance in JavaScript the correct prototypal way, according to Douglas Crockford: http://javascript.crockford.com/prototypal.html He writes: "So instead of creating classes, you make prototype objects, and then use the object function to make new instances" I figured this was the way to do it: var objA = { func_a : function() { alert('A'); } }; var objB = Object.create(objA); objB.func_a = function() { alert('B'); } objB.func_b = function() { }; var objA_instance1 = Object.create(objA); var objA_instance2 = Object.create(objA); var objB_instance1 = Object.create(objB); var objB_instance2 = Object.create(objB); etc... But wouldn't this mean that there are now four instances of func_a (since it's isn't part of objA.prototype, it's just "inside" it), or am I not understanding this correctly? Also, is there any way I can reach the overridden function of a function (for example call objA.func_a inside objB.func_a)? Thanks in advance.
javascript
null
null
null
null
null
open
Prototypal inheritence - the correct way === I've been looking into doing inheritance in JavaScript the correct prototypal way, according to Douglas Crockford: http://javascript.crockford.com/prototypal.html He writes: "So instead of creating classes, you make prototype objects, and then use the object function to make new instances" I figured this was the way to do it: var objA = { func_a : function() { alert('A'); } }; var objB = Object.create(objA); objB.func_a = function() { alert('B'); } objB.func_b = function() { }; var objA_instance1 = Object.create(objA); var objA_instance2 = Object.create(objA); var objB_instance1 = Object.create(objB); var objB_instance2 = Object.create(objB); etc... But wouldn't this mean that there are now four instances of func_a (since it's isn't part of objA.prototype, it's just "inside" it), or am I not understanding this correctly? Also, is there any way I can reach the overridden function of a function (for example call objA.func_a inside objB.func_a)? Thanks in advance.
0
5,227,037
03/08/2011 00:37:22
322,772
04/21/2010 23:09:54
11
0
Python throwing errors when no errors exist
I'm writing a script and Python throws an error, but after restarting my IDE (Eclipse) everything worked!?!?! Specifically, I was calling a class's method and got an AttributeError even the method existed and worked previously. Has anyone heard of this or know of a possible solution?
python
null
null
null
null
03/08/2011 08:23:40
not a real question
Python throwing errors when no errors exist === I'm writing a script and Python throws an error, but after restarting my IDE (Eclipse) everything worked!?!?! Specifically, I was calling a class's method and got an AttributeError even the method existed and worked previously. Has anyone heard of this or know of a possible solution?
1
7,647,413
10/04/2011 11:47:32
923,406
09/01/2011 12:00:57
9
0
jQuery.HTML not obeying formating within text
Why dose the following not obey formating, the "li"s have no effect <script> function showENQ() { jQuery('#enqtext').html("<li>showtext</li>"); } $('#enq').live('pageshow', function () { showENQ(); }); </script> <ul data-role="listview" data-filter="true" data-filter-placeholder="Search Enquirylist..." data-theme="e" data-filter-theme="d" > <div id="enqtext"></div> </ul>
jquery
null
null
null
null
null
open
jQuery.HTML not obeying formating within text === Why dose the following not obey formating, the "li"s have no effect <script> function showENQ() { jQuery('#enqtext').html("<li>showtext</li>"); } $('#enq').live('pageshow', function () { showENQ(); }); </script> <ul data-role="listview" data-filter="true" data-filter-placeholder="Search Enquirylist..." data-theme="e" data-filter-theme="d" > <div id="enqtext"></div> </ul>
0
8,925,165
01/19/2012 11:20:28
1,158,308
01/19/2012 11:15:12
1
0
Can someone help me fix this?
//this code looks if the session i made is equal to whatever browser, so i can use the right code. but when i use the code i get a blank page instead of the pdf i want to print if(browser == 'Explorer') { //alert("IE"); window.frames[iFramePdf].focus(); window.frames[iFramePdf].print(); } else if(browser == 'Safari') { //alert("Safari"); var getMyFrame = document.getElementById(elementId); getMyFrame.focus(); getMyFrame.contentWindow.print(); } else if(browser == 'Chrome') { //alert("Chrome"); var getMyFrame = document.getElementById(elementId); getMyFrame.focus(); getMyFrame.contentWindow.print(); } else if(browser == 'Firefox') { //alert("Firefox"); window.open('http://62291.ict-lab.nl/Stage/VDMdm/pdf.php'); }
java
javascript
browser
printing
null
01/20/2012 09:41:46
not a real question
Can someone help me fix this? === //this code looks if the session i made is equal to whatever browser, so i can use the right code. but when i use the code i get a blank page instead of the pdf i want to print if(browser == 'Explorer') { //alert("IE"); window.frames[iFramePdf].focus(); window.frames[iFramePdf].print(); } else if(browser == 'Safari') { //alert("Safari"); var getMyFrame = document.getElementById(elementId); getMyFrame.focus(); getMyFrame.contentWindow.print(); } else if(browser == 'Chrome') { //alert("Chrome"); var getMyFrame = document.getElementById(elementId); getMyFrame.focus(); getMyFrame.contentWindow.print(); } else if(browser == 'Firefox') { //alert("Firefox"); window.open('http://62291.ict-lab.nl/Stage/VDMdm/pdf.php'); }
1
8,813,371
01/11/2012 02:23:42
1,142,162
01/11/2012 01:59:55
1
0
Trying to start a second activity
I am new to Android and I am not sure this is the best way to do this. Here is what im trying to do. In Java im trying to have the initial Activity "Canvas1Activity" set the content view to an instance of another class I have setup "drawCanvas", drawcanvas has an ontouchevent which depending on where the screen is touched starts another activity. I had to add canvas to the drawcanvas constructor Parameter list to get the Intent to work within the onTouchEvent, But now the setConTentView(MyView); gives the error: **The method setContentView(int) in the type Activity is not applicable for the arguments (drawCanvas)** Here is the main Activity package com.oftheseends.canvas1; import android.app.Activity; import android.graphics.Bitmap; import android.os.Bundle; public class Canvas1Activity extends Activity { /** Called when the activity is first created. */ drawCanvas myView; int mx; int my; Bitmap icon1; drawCanvas2 newview; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); myView = new drawCanvas(this, null); setContentView(myView); } } drawcanvas Class package com.oftheseends.canvas1; import android.app.Activity; import android.content.Context; import android.content.Intent; import android.graphics.Bitmap; import android.graphics.BitmapFactory; import android.graphics.Canvas; import android.graphics.Color; import android.view.MotionEvent; import android.view.SurfaceView; import android.view.View; public class drawCanvas extends Activity { Bitmap icon1; Bitmap icondrawcanvas; int mx; int my; public drawCanvas(Context context, Canvas canvas) { super(); icondrawcanvas = BitmapFactory.decodeResource(getResources(), R.drawable.backgroundblocks); canvas.drawBitmap(icondrawcanvas, 0, 0, null); } public boolean onTouchEvent(MotionEvent event) { mx = (int) event.getX(); my = (int) event.getY(); if (my <=240) { Intent canvas2Intent = new Intent("com.oftheseends.canvas5.DRAWCANVAS2"); startActivity(canvas2Intent); }else if(my >240 ){ Intent canvas2Intent = new Intent("com.oftheseends.canvas5.DRAWCANVAS3"); startActivity(canvas2Intent); } return false; } } Thanks for Any suggestions.
java
android
null
null
null
01/12/2012 04:36:44
not a real question
Trying to start a second activity === I am new to Android and I am not sure this is the best way to do this. Here is what im trying to do. In Java im trying to have the initial Activity "Canvas1Activity" set the content view to an instance of another class I have setup "drawCanvas", drawcanvas has an ontouchevent which depending on where the screen is touched starts another activity. I had to add canvas to the drawcanvas constructor Parameter list to get the Intent to work within the onTouchEvent, But now the setConTentView(MyView); gives the error: **The method setContentView(int) in the type Activity is not applicable for the arguments (drawCanvas)** Here is the main Activity package com.oftheseends.canvas1; import android.app.Activity; import android.graphics.Bitmap; import android.os.Bundle; public class Canvas1Activity extends Activity { /** Called when the activity is first created. */ drawCanvas myView; int mx; int my; Bitmap icon1; drawCanvas2 newview; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); myView = new drawCanvas(this, null); setContentView(myView); } } drawcanvas Class package com.oftheseends.canvas1; import android.app.Activity; import android.content.Context; import android.content.Intent; import android.graphics.Bitmap; import android.graphics.BitmapFactory; import android.graphics.Canvas; import android.graphics.Color; import android.view.MotionEvent; import android.view.SurfaceView; import android.view.View; public class drawCanvas extends Activity { Bitmap icon1; Bitmap icondrawcanvas; int mx; int my; public drawCanvas(Context context, Canvas canvas) { super(); icondrawcanvas = BitmapFactory.decodeResource(getResources(), R.drawable.backgroundblocks); canvas.drawBitmap(icondrawcanvas, 0, 0, null); } public boolean onTouchEvent(MotionEvent event) { mx = (int) event.getX(); my = (int) event.getY(); if (my <=240) { Intent canvas2Intent = new Intent("com.oftheseends.canvas5.DRAWCANVAS2"); startActivity(canvas2Intent); }else if(my >240 ){ Intent canvas2Intent = new Intent("com.oftheseends.canvas5.DRAWCANVAS3"); startActivity(canvas2Intent); } return false; } } Thanks for Any suggestions.
1
9,505,348
02/29/2012 19:26:20
941,186
09/12/2011 19:03:11
26
0
Any examples of currency name variations based on location on top of language?
I'm currently tackling the currency part of a PHP e-commerce plugin for a CMS I'm using and I have a question about localized currency names. I understand that currency names are said differently in different languages, for example: Australian Dollar (English) and Dólar Australiano (Spanish) ...just like language names are said differently (Spanish vs Español), but I was wondering if there is any differences based on location as well? Ie, are there any countries/locations that speak the same language but would say a currency name differently?
php
localization
internationalization
null
null
03/01/2012 07:42:55
off topic
Any examples of currency name variations based on location on top of language? === I'm currently tackling the currency part of a PHP e-commerce plugin for a CMS I'm using and I have a question about localized currency names. I understand that currency names are said differently in different languages, for example: Australian Dollar (English) and Dólar Australiano (Spanish) ...just like language names are said differently (Spanish vs Español), but I was wondering if there is any differences based on location as well? Ie, are there any countries/locations that speak the same language but would say a currency name differently?
2
736,047
04/09/2009 21:53:56
40,882
11/26/2008 01:40:12
97
0
Possible to programmatically open Settings app from iPhone?
Is it currently possible to go to Apple's Settings application from a third party iPhone application? It's currently possible to open mail, safari, etc. What about Settings?
iphone
cocoa-touch
null
null
null
null
open
Possible to programmatically open Settings app from iPhone? === Is it currently possible to go to Apple's Settings application from a third party iPhone application? It's currently possible to open mail, safari, etc. What about Settings?
0
10,689,505
05/21/2012 17:09:06
1,381,427
05/08/2012 07:24:29
-1
0
Check internet connectivity when click a button
i want to figure out when a button click , it will check for internet connectivity, if is connected, then will intent to another page. If not, it will toast a message. Somehow, i got saw a lot of example post in this forum but no one is same like mine. Can anyone advice? search.setOnClickListener(new View.OnClickListener() { public void onClick(View v) { Intent gogogo = new Intent(webview.this, viewPage.class); gogogo.putExtra("result", result); startActivity(gogogo); } }); final ConnectivityManager conn_manager = (ConnectivityManager) this.getSystemService(Context.CONNECTIVITY_SERVICE); final NetworkInfo network_info = conn_manager.getActiveNetworkInfo(); if ( network_info != null && network_info.isConnected() ) { return true; } else { return false; } I figure out many post is like coding above but can't have any idea to put on my code above.
android
null
null
null
null
05/25/2012 15:31:01
not a real question
Check internet connectivity when click a button === i want to figure out when a button click , it will check for internet connectivity, if is connected, then will intent to another page. If not, it will toast a message. Somehow, i got saw a lot of example post in this forum but no one is same like mine. Can anyone advice? search.setOnClickListener(new View.OnClickListener() { public void onClick(View v) { Intent gogogo = new Intent(webview.this, viewPage.class); gogogo.putExtra("result", result); startActivity(gogogo); } }); final ConnectivityManager conn_manager = (ConnectivityManager) this.getSystemService(Context.CONNECTIVITY_SERVICE); final NetworkInfo network_info = conn_manager.getActiveNetworkInfo(); if ( network_info != null && network_info.isConnected() ) { return true; } else { return false; } I figure out many post is like coding above but can't have any idea to put on my code above.
1
10,948,840
06/08/2012 12:27:15
1,444,491
06/08/2012 12:19:06
1
0
From an url passed to a php script : extract source code generated by javascript
I think it's possible by passing the url in a command line browser with "exec" an after, get the source code generated. Is there a browser doing this ? or is there another method ? Thank you for your help
php
javascript
webbrowser
null
null
06/08/2012 12:49:23
not a real question
From an url passed to a php script : extract source code generated by javascript === I think it's possible by passing the url in a command line browser with "exec" an after, get the source code generated. Is there a browser doing this ? or is there another method ? Thank you for your help
1
11,489,690
07/15/2012 05:34:12
1,522,486
07/13/2012 03:25:17
1
0
It's just about the coding in Objective-C
NSAutoreleasePool *pool=[[NSAutoreleasePool alloc] init]; Thingie *thing1; thing1=[[Thingie alloc] initWithName:@"thing1" magicNumber:42 shoeSize:10.5]; NSLog(@"%@",thing1); Thingie *anotherThing; anotherThing=[[[Thingie alloc]initWithName:@"thing2" magicNumber:23 shoeSize:13.0]autorelease]; [thing1.subThingies addObject:anotherThing]; anotherThing=[[[Thingie alloc]initWithName:@"thing3" magicNumber:17 shoeSize:9.0]autorelease]; [thing1.subThingies addObject:anotherThing]; NSLog(@"thing with things :%@",thing1); NSData *freezeDried=[NSKeyedArchiver archivedDataWithRootObject:thing1]; //编码成freezeDried [thing1 release]; thing1 =[NSKeyedUnarchiver unarchiveObjectWithData:freezeDried];//解码成thing1 NSLog(@"reconstituted thing:%@",thing1); [pool release]; 2012-07-15 13:23:18.303 PropertyListing-after[394:403] thing1: 42/10.5 ( ) 2012-07-15 13:23:18.305 PropertyListing-after[394:403] thing with things :thing1: 42/10.5 ( "thing2: 23/13.0 (\n)", "thing3: 17/9.0 (\n)" ) 2012-07-15 13:23:18.307 PropertyListing-after[394:403] reconstituted thing:thing1: 0/10.5 ( "thing2: 0/13.0 (\n)", "thing3: 0/9.0 (\n)" ) so I think there must be something wrong in NSKeyedArchiver and NSKeyedArchiver.I don't know why the variable magicNumber losing.I mean it is 0.But it does not lose the float type of variable.I'm confused what is wrong with my programming.Thanks for helping.And I implied successfully.
objective-c
xcode4
null
null
null
07/15/2012 09:09:56
too localized
It's just about the coding in Objective-C === NSAutoreleasePool *pool=[[NSAutoreleasePool alloc] init]; Thingie *thing1; thing1=[[Thingie alloc] initWithName:@"thing1" magicNumber:42 shoeSize:10.5]; NSLog(@"%@",thing1); Thingie *anotherThing; anotherThing=[[[Thingie alloc]initWithName:@"thing2" magicNumber:23 shoeSize:13.0]autorelease]; [thing1.subThingies addObject:anotherThing]; anotherThing=[[[Thingie alloc]initWithName:@"thing3" magicNumber:17 shoeSize:9.0]autorelease]; [thing1.subThingies addObject:anotherThing]; NSLog(@"thing with things :%@",thing1); NSData *freezeDried=[NSKeyedArchiver archivedDataWithRootObject:thing1]; //编码成freezeDried [thing1 release]; thing1 =[NSKeyedUnarchiver unarchiveObjectWithData:freezeDried];//解码成thing1 NSLog(@"reconstituted thing:%@",thing1); [pool release]; 2012-07-15 13:23:18.303 PropertyListing-after[394:403] thing1: 42/10.5 ( ) 2012-07-15 13:23:18.305 PropertyListing-after[394:403] thing with things :thing1: 42/10.5 ( "thing2: 23/13.0 (\n)", "thing3: 17/9.0 (\n)" ) 2012-07-15 13:23:18.307 PropertyListing-after[394:403] reconstituted thing:thing1: 0/10.5 ( "thing2: 0/13.0 (\n)", "thing3: 0/9.0 (\n)" ) so I think there must be something wrong in NSKeyedArchiver and NSKeyedArchiver.I don't know why the variable magicNumber losing.I mean it is 0.But it does not lose the float type of variable.I'm confused what is wrong with my programming.Thanks for helping.And I implied successfully.
3
9,418,293
02/23/2012 17:44:40
1,140,626
01/10/2012 10:28:18
8
0
Removing a jQuery animation when active
I have created a slideshow and have added some jQuery to it, I would like it so that the overlay is disabled when the item is active this is the script I am using: $('.overlay').css('display', 'block'); $('.overlay').css('opacity', 1.0); $('.views_slideshow_jcarousel_pager_item').hover(function() { $('.overlay', this).stop().animate({opacity:0.0},500); }, function() { $('.overlay').stop().animate({opacity:1.0},500); }).click(function() { $(this).closest('.view-content').find('.active').removeClass('active'); $(this).addClass('active'); }); The CSS is: .overlay {position:absolute; display:none; background:url(images/work_img.png) no-repeat 0 0; padding:15px 0 0 15px; width:285px; height:185px; -webkit-border-radius:5px; -moz-border-radius:5px; border-radius:5px; color:#FFF; font-size:18px; z-index:2; cursor:pointer;} You can view the dev site at http://dev.sb.sbdesign1.co.uk If anybody has any ideas on how best to do this then that would be great. Cheers
jquery
css
jcarousel
null
null
null
open
Removing a jQuery animation when active === I have created a slideshow and have added some jQuery to it, I would like it so that the overlay is disabled when the item is active this is the script I am using: $('.overlay').css('display', 'block'); $('.overlay').css('opacity', 1.0); $('.views_slideshow_jcarousel_pager_item').hover(function() { $('.overlay', this).stop().animate({opacity:0.0},500); }, function() { $('.overlay').stop().animate({opacity:1.0},500); }).click(function() { $(this).closest('.view-content').find('.active').removeClass('active'); $(this).addClass('active'); }); The CSS is: .overlay {position:absolute; display:none; background:url(images/work_img.png) no-repeat 0 0; padding:15px 0 0 15px; width:285px; height:185px; -webkit-border-radius:5px; -moz-border-radius:5px; border-radius:5px; color:#FFF; font-size:18px; z-index:2; cursor:pointer;} You can view the dev site at http://dev.sb.sbdesign1.co.uk If anybody has any ideas on how best to do this then that would be great. Cheers
0
8,470,156
12/12/2011 05:04:48
933,882
09/08/2011 01:38:09
38
0
really, how to achieve hibernate runtime instrumentation?
from hibernate docs, we know that in certain case, for lazy-loading to work, we need build-time instrumentation: http://stackoverflow.com/questions/222453/how-to-stop-hibernate-from-eagerly-fetching-many-to- one-associated-object so I did the following: <plugin> <artifactId>maven-antrun-plugin</artifactId> <version>1.3</version> <configuration> <tasks> <taskdef name="instrument" classname="org.hibernate.tool.instrument.javassist.InstrumentTask"> <classpath> <path refid="maven.runtime.classpath" /> <path refid="maven.plugin.classpath" /> </classpath> </taskdef> <instrument verbose="true"> <fileset dir="target/classes"> <include name="**/*.class" /> </fileset> </instrument> </tasks> </configuration> <executions> <execution> <phase>process-classes</phase> <goals> <goal>run</goal> </goals> </execution> </executions> </plugin> but it gave errors java.lang.VerifyError: (class: com/mycompany/dao/UserDaoHibernateImpl$2, method: <init> signature: (Lcom/mycompany/dao/UserDaoHibernateImpl;II)V) Expecting to find object/array on stack this is definitely due to the instrumentation above, since removing it fixes the problem; also websearches also show that this is somehow related to bugs in javaasist and conflicts between spring and hibernate versions. I'm using hibernate 3.5.6-Final, Spring 3.0.6-RELEASE I have tried all combinations of javassist versions, and tried changing javassist to asm, with various versions too, but the problem still exists. Thanks Yan
hibernate
assembly
instrumentation
javassist
null
null
open
really, how to achieve hibernate runtime instrumentation? === from hibernate docs, we know that in certain case, for lazy-loading to work, we need build-time instrumentation: http://stackoverflow.com/questions/222453/how-to-stop-hibernate-from-eagerly-fetching-many-to- one-associated-object so I did the following: <plugin> <artifactId>maven-antrun-plugin</artifactId> <version>1.3</version> <configuration> <tasks> <taskdef name="instrument" classname="org.hibernate.tool.instrument.javassist.InstrumentTask"> <classpath> <path refid="maven.runtime.classpath" /> <path refid="maven.plugin.classpath" /> </classpath> </taskdef> <instrument verbose="true"> <fileset dir="target/classes"> <include name="**/*.class" /> </fileset> </instrument> </tasks> </configuration> <executions> <execution> <phase>process-classes</phase> <goals> <goal>run</goal> </goals> </execution> </executions> </plugin> but it gave errors java.lang.VerifyError: (class: com/mycompany/dao/UserDaoHibernateImpl$2, method: <init> signature: (Lcom/mycompany/dao/UserDaoHibernateImpl;II)V) Expecting to find object/array on stack this is definitely due to the instrumentation above, since removing it fixes the problem; also websearches also show that this is somehow related to bugs in javaasist and conflicts between spring and hibernate versions. I'm using hibernate 3.5.6-Final, Spring 3.0.6-RELEASE I have tried all combinations of javassist versions, and tried changing javassist to asm, with various versions too, but the problem still exists. Thanks Yan
0
8,458,662
12/10/2011 18:01:38
584,612
01/21/2011 15:08:47
21
1
Tips on getting started communicating with a device (dgt chessboard) via USB and displaying fancy 2D graphics
I've agreed to write a graphical display program for the DGT chessboard used in UK chessboxing competitions. The current display is designed for basic functionality rather than crowd-pleasing entertainment so I figured it wouldn't be too difficult to jazz things up a little with my own version... While I've designed graphical applications before, I've not really done anything with USB devices and am unsure where to start. I've managed to get some drivers and can run the manufacturer's test program but am not sure where to go next or how to get started. There is documentation for the driver on the DGT website but my C++ is extremely rusty and I'm not quite sure how to translate this into other languages (got fired from the only c++ job I ever had within 6 months... ): Sooo.... I'm thinking the way forward may be to write a very simple c++ program which takes input from the DGT driver DLL and "broadcasts" the piece positions and clock data somehow in a nice, easy to use format. Then, I'll have an Air app which can listen to these broadcasts and update its whizz-bang graphics accordingly. Only reason I'm going with Air is that the most recent graphical stuff I've done was in Flashpunk, which I rather like to use. If anyone has any good reasons why I should look in to something else, then I'd be happy to do so.
c++
null
null
null
null
12/10/2011 20:51:04
not constructive
Tips on getting started communicating with a device (dgt chessboard) via USB and displaying fancy 2D graphics === I've agreed to write a graphical display program for the DGT chessboard used in UK chessboxing competitions. The current display is designed for basic functionality rather than crowd-pleasing entertainment so I figured it wouldn't be too difficult to jazz things up a little with my own version... While I've designed graphical applications before, I've not really done anything with USB devices and am unsure where to start. I've managed to get some drivers and can run the manufacturer's test program but am not sure where to go next or how to get started. There is documentation for the driver on the DGT website but my C++ is extremely rusty and I'm not quite sure how to translate this into other languages (got fired from the only c++ job I ever had within 6 months... ): Sooo.... I'm thinking the way forward may be to write a very simple c++ program which takes input from the DGT driver DLL and "broadcasts" the piece positions and clock data somehow in a nice, easy to use format. Then, I'll have an Air app which can listen to these broadcasts and update its whizz-bang graphics accordingly. Only reason I'm going with Air is that the most recent graphical stuff I've done was in Flashpunk, which I rather like to use. If anyone has any good reasons why I should look in to something else, then I'd be happy to do so.
4
4,286,678
11/26/2010 15:49:08
133,932
07/06/2009 22:22:12
95
19
phpunit4eclipse on windows
does anyone know how to make phpuit4eclipse work on Windows? http://code.google.com/p/phpunit4eclipse/wiki/j2phpUnitWrapper
phpunit
null
null
null
null
12/30/2011 21:27:49
too localized
phpunit4eclipse on windows === does anyone know how to make phpuit4eclipse work on Windows? http://code.google.com/p/phpunit4eclipse/wiki/j2phpUnitWrapper
3
6,954,726
08/05/2011 10:12:29
803,709
06/17/2011 10:46:54
23
3
Android In-app billing Phonegap 1.0
I know I already asked related question but now it's a bit different situation. I found out that it is possible to implement Android in-app billing in Phonegap project. At least with the final 1.0 release. But it looks like it requires really a lot of code (both native Java and Javascript). Too much work for this task for one developer. Does anyone already did plugin for Phonegap to use Android in-app billing? Or maybe someone developing it right now? New PayPal plugin is good and it works well but I also should implement native Android payments somehow. Please help!
android
phonegap
in-app-purchase
in-app-billing
null
null
open
Android In-app billing Phonegap 1.0 === I know I already asked related question but now it's a bit different situation. I found out that it is possible to implement Android in-app billing in Phonegap project. At least with the final 1.0 release. But it looks like it requires really a lot of code (both native Java and Javascript). Too much work for this task for one developer. Does anyone already did plugin for Phonegap to use Android in-app billing? Or maybe someone developing it right now? New PayPal plugin is good and it works well but I also should implement native Android payments somehow. Please help!
0
7,632,104
10/03/2011 07:23:30
746,349
05/10/2011 07:29:30
26
4
Is there a sample source code for home automation on android?
i wanted to know how the home automation is done in android. if anyone has a sample code of a single switch button for a light to switch on or off..??? it would be helpful for me..i wanted to know how the coding is being done of this. Thanks in advance
android
null
null
null
null
10/03/2011 09:24:02
not a real question
Is there a sample source code for home automation on android? === i wanted to know how the home automation is done in android. if anyone has a sample code of a single switch button for a light to switch on or off..??? it would be helpful for me..i wanted to know how the coding is being done of this. Thanks in advance
1
6,210,732
06/02/2011 05:18:59
780,574
06/02/2011 05:18:59
1
0
iPad web application
I have to develop application for iPad with the following details: Server: Web App running on web server (IIS or Apache) Client: iPad App Whenever there is some changes in iPad App, changes should immediately reflect in web app (i.e. real time sync). Thanks.
ipad
web-applications
null
null
null
06/02/2011 05:30:21
not a real question
iPad web application === I have to develop application for iPad with the following details: Server: Web App running on web server (IIS or Apache) Client: iPad App Whenever there is some changes in iPad App, changes should immediately reflect in web app (i.e. real time sync). Thanks.
1
10,972,739
06/10/2012 22:12:01
1,347,467
04/20/2012 20:52:23
35
0
PHP form processing not working
Recently I moved my site to a new server, but the processing for one of my forms has broken. It seems that the variable $email doesn't get assigned properly and just returns nothing. Here is my HTML and my PHP. I can post the javascript/AJAX too if needed. <form id="newsletter-signup" method="post" action="?action=signup"> <fieldset> <label for="signup-email">Subscribe to our newsletter for news<br /> and exclusive special offers.</label> <br/><br/> <input type="text" name="signup-email" id="signup-email" /> //variable I want to assign <input type="submit" id="signup-button" value="Subscribe" class="button" /> <p id="signup-response"></p> </fieldset> </form> <?php //email signup ajax call if($_GET['action'] == 'signup'){ mysql_connect('localhost','dbuser','dbpass'); mysql_select_db('database'); //sanitize data $email = mysql_real_escape_string($_POST['signup-email']); //variable fails to assign //validate email address - check if input was empty if(empty($email)){ $status = "error"; $message = "You did not enter an email address!"; } else if(!preg_match('/^[^\W][a-zA-Z0-9_]+(\.[a-zA-Z0-9_]+)*\@[a-zA-Z0-9_]+(\.[a-zA-Z0-9_]+)*\.[a-zA-Z]{2,4}$/', $email)){ //validate email address - check if is a valid email address $status = "error"; $message = "You have entered an invalid email address!"; } else { $existingSignup = mysql_query("SELECT * FROM signups WHERE signup_email_address='$email'"); if(mysql_num_rows($existingSignup) < 1){ $date = date('Y-m-d'); $time = date('H:i:s'); $insertSignup = mysql_query("INSERT INTO signups (signup_email_address, signup_date, signup_time) VALUES ('$email','$date','$time')"); if($insertSignup){ //if insert is successful $status = "success"; $message = "You have been signed up!"; } else { //if insert fails $status = "error"; $message = "Ooops, Theres been a technical error!"; } } else { //if already signed up $status = "error"; $message = "This email address has already been registered!"; } } //return json response $data = array( 'status' => $status, 'message' => $message ); echo json_encode($data); exit; } ?>
php
javascript
forms
variables
input
06/13/2012 07:12:48
too localized
PHP form processing not working === Recently I moved my site to a new server, but the processing for one of my forms has broken. It seems that the variable $email doesn't get assigned properly and just returns nothing. Here is my HTML and my PHP. I can post the javascript/AJAX too if needed. <form id="newsletter-signup" method="post" action="?action=signup"> <fieldset> <label for="signup-email">Subscribe to our newsletter for news<br /> and exclusive special offers.</label> <br/><br/> <input type="text" name="signup-email" id="signup-email" /> //variable I want to assign <input type="submit" id="signup-button" value="Subscribe" class="button" /> <p id="signup-response"></p> </fieldset> </form> <?php //email signup ajax call if($_GET['action'] == 'signup'){ mysql_connect('localhost','dbuser','dbpass'); mysql_select_db('database'); //sanitize data $email = mysql_real_escape_string($_POST['signup-email']); //variable fails to assign //validate email address - check if input was empty if(empty($email)){ $status = "error"; $message = "You did not enter an email address!"; } else if(!preg_match('/^[^\W][a-zA-Z0-9_]+(\.[a-zA-Z0-9_]+)*\@[a-zA-Z0-9_]+(\.[a-zA-Z0-9_]+)*\.[a-zA-Z]{2,4}$/', $email)){ //validate email address - check if is a valid email address $status = "error"; $message = "You have entered an invalid email address!"; } else { $existingSignup = mysql_query("SELECT * FROM signups WHERE signup_email_address='$email'"); if(mysql_num_rows($existingSignup) < 1){ $date = date('Y-m-d'); $time = date('H:i:s'); $insertSignup = mysql_query("INSERT INTO signups (signup_email_address, signup_date, signup_time) VALUES ('$email','$date','$time')"); if($insertSignup){ //if insert is successful $status = "success"; $message = "You have been signed up!"; } else { //if insert fails $status = "error"; $message = "Ooops, Theres been a technical error!"; } } else { //if already signed up $status = "error"; $message = "This email address has already been registered!"; } } //return json response $data = array( 'status' => $status, 'message' => $message ); echo json_encode($data); exit; } ?>
3
10,037,713
04/06/2012 00:08:58
1,316,488
04/05/2012 23:37:48
1
0
Sample Unit Test Code for Sales Force Entitlement Code
I found SFDC Apex Trigger code to run on Case creation or update. The code auto-populates the case with an Entitlement. I was excited to find the exact code I needed, since we do not have a developer on staff, and current budget is frozen. Here's our dilemma, we need to have unit test code before we can move this trigger into production. I figured that since this Apex code was available in the cookbook and referenced on Sales Force, that someone would have written and/or posted the test code. I could not find any. I've tried reading all the tips, and best practices for writing unit test code, but since I am not an SFDC developer, this is all over my head, and do not know what to test, what's the correct syntax, or what calls are needed. Can someone help with the test code? Thank you in advance. Here is the code trigger SupportPlanEntitlement on Case (Before Insert, Before Update) { /* When a case is created, auto-populate with the active support plan If the Entitlement Name is not set then, check to see if the Contact on the Case has an active Entitlement and select the first one. If not then check to see if the Account on the Case has an active Entitlement. */ List<Id> contactIds = new List<Id>(); List<Id> acctIds = new List<Id>(); for (Case c: Trigger.new){ if (c.EntitlementId == null && c.ContactId!= null && c.AccountId!= null){ contactIds.add(c.ContactId); acctIds.add(c.AccountId); } } if(contactIds.isEmpty()==false || acctIds.isEmpty()==false){ /* Added check for active entitlement */ List <EntitlementContact> entlContacts = [Select e.EntitlementId,e.ContactId,e.Entitlement.AssetId From EntitlementContact e Where e.ContactId in:contactIds And e.Entitlement.Type = 'Support Plan' And e.Entitlement.EndDate >= Today And e.Entitlement.StartDate <= Today]; if(entlContacts.isEmpty()==false){ for(Case c: Trigger.new){ if(c.EntitlementId == null && c.ContactId!= null){ for(EntitlementContact ec:entlContacts){ if(ec.ContactId==c.ContactId){ c.EntitlementId = ec.EntitlementId; if(c.AssetId==null && ec.Entitlement.AssetId!=null) c.AssetId=ec.Entitlement.AssetId; break; } } // end for } } // end for } else{ List <Entitlement> entls = [Select e.StartDate, e.Id, e.EndDate, e.AccountId, e.AssetId From Entitlement e Where e.AccountId in:acctIds And e.Type = 'Support Plan' And e.EndDate >= Today And e.StartDate <= Today]; if(entls.isEmpty()==false){ for(Case c: Trigger.new){ if(c.EntitlementId == null && c.AccountId!= null){ for(Entitlement e:entls){ if(e.AccountId==c.AccountId){ c.EntitlementId = e.Id; if(c.AssetId==null && e.AssetId!=null) c.AssetId=e.AssetId; break; } } // end for } } // end for } } } // end if(contactIds.isEmpty()==false) }
unit-testing
salesforce
apex-code
null
null
04/09/2012 12:11:25
not a real question
Sample Unit Test Code for Sales Force Entitlement Code === I found SFDC Apex Trigger code to run on Case creation or update. The code auto-populates the case with an Entitlement. I was excited to find the exact code I needed, since we do not have a developer on staff, and current budget is frozen. Here's our dilemma, we need to have unit test code before we can move this trigger into production. I figured that since this Apex code was available in the cookbook and referenced on Sales Force, that someone would have written and/or posted the test code. I could not find any. I've tried reading all the tips, and best practices for writing unit test code, but since I am not an SFDC developer, this is all over my head, and do not know what to test, what's the correct syntax, or what calls are needed. Can someone help with the test code? Thank you in advance. Here is the code trigger SupportPlanEntitlement on Case (Before Insert, Before Update) { /* When a case is created, auto-populate with the active support plan If the Entitlement Name is not set then, check to see if the Contact on the Case has an active Entitlement and select the first one. If not then check to see if the Account on the Case has an active Entitlement. */ List<Id> contactIds = new List<Id>(); List<Id> acctIds = new List<Id>(); for (Case c: Trigger.new){ if (c.EntitlementId == null && c.ContactId!= null && c.AccountId!= null){ contactIds.add(c.ContactId); acctIds.add(c.AccountId); } } if(contactIds.isEmpty()==false || acctIds.isEmpty()==false){ /* Added check for active entitlement */ List <EntitlementContact> entlContacts = [Select e.EntitlementId,e.ContactId,e.Entitlement.AssetId From EntitlementContact e Where e.ContactId in:contactIds And e.Entitlement.Type = 'Support Plan' And e.Entitlement.EndDate >= Today And e.Entitlement.StartDate <= Today]; if(entlContacts.isEmpty()==false){ for(Case c: Trigger.new){ if(c.EntitlementId == null && c.ContactId!= null){ for(EntitlementContact ec:entlContacts){ if(ec.ContactId==c.ContactId){ c.EntitlementId = ec.EntitlementId; if(c.AssetId==null && ec.Entitlement.AssetId!=null) c.AssetId=ec.Entitlement.AssetId; break; } } // end for } } // end for } else{ List <Entitlement> entls = [Select e.StartDate, e.Id, e.EndDate, e.AccountId, e.AssetId From Entitlement e Where e.AccountId in:acctIds And e.Type = 'Support Plan' And e.EndDate >= Today And e.StartDate <= Today]; if(entls.isEmpty()==false){ for(Case c: Trigger.new){ if(c.EntitlementId == null && c.AccountId!= null){ for(Entitlement e:entls){ if(e.AccountId==c.AccountId){ c.EntitlementId = e.Id; if(c.AssetId==null && e.AssetId!=null) c.AssetId=e.AssetId; break; } } // end for } } // end for } } } // end if(contactIds.isEmpty()==false) }
1
10,613,568
05/16/2012 07:04:26
595,090
01/29/2011 16:19:47
19
8
Adding borders to image on click or mouse hover
I want to add round borders to selected image areas on a map, how do I do it?
javascript
jquery
css
asp.net-charts
null
05/18/2012 13:03:15
not a real question
Adding borders to image on click or mouse hover === I want to add round borders to selected image areas on a map, how do I do it?
1
10,140,535
04/13/2012 12:09:32
1,215,913
02/17/2012 09:58:43
165
1
moving from C# WinService to WinForms - removing a form
I've created a WinService, unfortunately Win7 (and Vista) does not support Screen Capture from a service. I'm going to rewrite a program into something different than WinService, something that has no forms.. **what will you suggest?** * Console Application has a console - I don't need any. * WinForms app has a form - I don't need any. **Is it possible to remove a form from winforms application completely?** I don't want to hide a proccess or anything, but I want it to work as a listener on the background (just like a service). How will I close it? Easy! An alternative to "Stop service" should be "End task" from task manager. * having no physical form and no focus is crucial condition.
c#
winforms
service
process
null
null
open
moving from C# WinService to WinForms - removing a form === I've created a WinService, unfortunately Win7 (and Vista) does not support Screen Capture from a service. I'm going to rewrite a program into something different than WinService, something that has no forms.. **what will you suggest?** * Console Application has a console - I don't need any. * WinForms app has a form - I don't need any. **Is it possible to remove a form from winforms application completely?** I don't want to hide a proccess or anything, but I want it to work as a listener on the background (just like a service). How will I close it? Easy! An alternative to "Stop service" should be "End task" from task manager. * having no physical form and no focus is crucial condition.
0
9,377,194
02/21/2012 11:58:01
333,661
11/07/2009 04:00:02
49
12
How do i configure Apache to set last-modified date in http header
I have a client with apache 2.2.17 on FreeBSD. When i issue a request using https I do not get a last-modified date returned in the http header. have tried to add header set "last-modified" but the server asks for 3 parameters. what is the correct format in the apache config files to force last-modified date to be returned in the headers
apache
http-headers
apache2.2
null
null
02/22/2012 14:33:11
off topic
How do i configure Apache to set last-modified date in http header === I have a client with apache 2.2.17 on FreeBSD. When i issue a request using https I do not get a last-modified date returned in the http header. have tried to add header set "last-modified" but the server asks for 3 parameters. what is the correct format in the apache config files to force last-modified date to be returned in the headers
2
8,370,987
12/03/2011 21:01:11
736,533
05/03/2011 16:26:53
21
1
How can i render real-time graphs for some data series in ruby?
I would like to use ruby to simultaniosly render several real-time graphs. How can i do this?
ruby
graph
null
null
null
12/05/2011 10:03:10
not a real question
How can i render real-time graphs for some data series in ruby? === I would like to use ruby to simultaniosly render several real-time graphs. How can i do this?
1
2,716,629
04/26/2010 20:30:53
305,360
03/30/2010 17:59:33
36
2
confirm box when link is clicked
How can I have a confirm box that asks user for confirmation when a user clicks on a link ? can I do this with jquery?
jquery
javascript
null
null
null
null
open
confirm box when link is clicked === How can I have a confirm box that asks user for confirmation when a user clicks on a link ? can I do this with jquery?
0
8,522,896
12/15/2011 15:58:12
801,625
06/16/2011 14:08:07
76
1
Using vim commands in Eclipse
I am very hesitant to ask this question, at the risk of being downvoted & flamed, but I searched & searched, & the most recent thread I can find is from almost 2 yrs ago, so I figure the answer might be different now as technologies have progressed... That said, the question is the same as it was 2 yrs ago when someone else asked it: I'm a C/C++ developer trying to migrate from vim to Eclipse (in Linux) but really miss the vim commands! It looks like the best choices are Vimplugin, Vrapper, Eclim, Viplugin. Can anyone share their experiences using these (pros/cons, great features/bad features)? Then perhaps after a couple of people have shared their experiences, anyone who agrees can upvote to demonstrate agreement. (I realize these types of questions are often frowned upon by experienced users, but they can be immensely helpful to us newbies, so it is much appreciated :-) thanks!
eclipse
vim
null
null
null
12/16/2011 16:15:17
not constructive
Using vim commands in Eclipse === I am very hesitant to ask this question, at the risk of being downvoted & flamed, but I searched & searched, & the most recent thread I can find is from almost 2 yrs ago, so I figure the answer might be different now as technologies have progressed... That said, the question is the same as it was 2 yrs ago when someone else asked it: I'm a C/C++ developer trying to migrate from vim to Eclipse (in Linux) but really miss the vim commands! It looks like the best choices are Vimplugin, Vrapper, Eclim, Viplugin. Can anyone share their experiences using these (pros/cons, great features/bad features)? Then perhaps after a couple of people have shared their experiences, anyone who agrees can upvote to demonstrate agreement. (I realize these types of questions are often frowned upon by experienced users, but they can be immensely helpful to us newbies, so it is much appreciated :-) thanks!
4
9,703,730
03/14/2012 14:18:24
651,720
03/09/2011 14:26:47
1
0
Does HTML5 support cross-window messaging?
The spec says, that I should be able to use postMessage() on a window object. [Mozilla says](https://developer.mozilla.org/en/DOM/window.postMessage), I should be able to do it on an open()'d window, too. However, I've taken Robert Nyman's postMessage example and tried to make it work [across windows](https://www.escde.net/SupportDownloads/test/postMessagedemo.htm). However, neither IE10 nor Chrome seem to provide the postMessage function for a newly opened window. <!-- language: lang-js --> var target = … // original declaration popoutbutton.onclick = function(evt) { realWin = window.open(iframeWin.frameElement.src, "window1", "width=600,height=400,status=yes,scrollbars=no,resizable=yes"); target = realWin; target.focus(); }; // …snip… target.postMessage(myMessage.value, expectorigin); // <-- fails because target.postMessage() is undefined Am I missing something or is this feature simply not there yet?
javascript
html5
internet-explorer-10
null
null
null
open
Does HTML5 support cross-window messaging? === The spec says, that I should be able to use postMessage() on a window object. [Mozilla says](https://developer.mozilla.org/en/DOM/window.postMessage), I should be able to do it on an open()'d window, too. However, I've taken Robert Nyman's postMessage example and tried to make it work [across windows](https://www.escde.net/SupportDownloads/test/postMessagedemo.htm). However, neither IE10 nor Chrome seem to provide the postMessage function for a newly opened window. <!-- language: lang-js --> var target = … // original declaration popoutbutton.onclick = function(evt) { realWin = window.open(iframeWin.frameElement.src, "window1", "width=600,height=400,status=yes,scrollbars=no,resizable=yes"); target = realWin; target.focus(); }; // …snip… target.postMessage(myMessage.value, expectorigin); // <-- fails because target.postMessage() is undefined Am I missing something or is this feature simply not there yet?
0
8,489,713
12/13/2011 13:02:50
513,461
11/19/2010 12:34:33
13
3
java card terminal
I'm searching for java card pos terminals but i don't know which to buy. So far i found those; cards -> http://www.alibaba.com/product-gs/502271268/Just_Click_and_win_java_card.html pos machine -> http://www.alibaba.com/product-gs/517501722/Mobile_NFC_card_reader_with_Printer.html I wonder if the cards will work with this pos machine. is there any one who can make suggestion?
java
javacard
null
null
null
12/13/2011 19:19:52
off topic
java card terminal === I'm searching for java card pos terminals but i don't know which to buy. So far i found those; cards -> http://www.alibaba.com/product-gs/502271268/Just_Click_and_win_java_card.html pos machine -> http://www.alibaba.com/product-gs/517501722/Mobile_NFC_card_reader_with_Printer.html I wonder if the cards will work with this pos machine. is there any one who can make suggestion?
2
7,371,590
09/10/2011 12:13:05
938,146
09/10/2011 12:08:25
1
0
Face Detection(Haar) without opencv
I am currently working on a face detection program using haar classifiers.What i need to do is to extract this code out of opencv and make the code work without opencv libraries i.e. without opencv installed on both windows and linux desktops.I have been trying to do this for a while but with no success.Any suggestions on how to do this? Thanks in advance
c
opencv
face-detection
null
null
09/13/2011 01:58:36
not a real question
Face Detection(Haar) without opencv === I am currently working on a face detection program using haar classifiers.What i need to do is to extract this code out of opencv and make the code work without opencv libraries i.e. without opencv installed on both windows and linux desktops.I have been trying to do this for a while but with no success.Any suggestions on how to do this? Thanks in advance
1
11,504,272
07/16/2012 12:24:24
1,141,591
01/10/2012 19:02:55
3
0
Calculate the minimum and maximum in cvInRangeS
cvCvtColor(frame, hsv_frame, CV_BGR2HSV); cvInRangeS(hsv_frame, hsv_min, hsv_max, thresholded); I try to follow blue ball. To determine the maximum and minimum I open a picture I took with the camera, open it MS paint and doubles at (180/240) result out of me in H And (255/240) the result of S and L then i recive the next values: 108 113 115 112 105 H 145 40 107 129 143 S 97 129 96 102 124 L So I chose the next values: CvScalar hsv_min = cvScalar( 105, 40, 96 ); CvScalar hsv_max = cvScalar( 115, 140, 130); But when I try to follow it hardly ever see him Am I wrong calculation? or what can i do to improve the result?
opencv
null
null
null
null
null
open
Calculate the minimum and maximum in cvInRangeS === cvCvtColor(frame, hsv_frame, CV_BGR2HSV); cvInRangeS(hsv_frame, hsv_min, hsv_max, thresholded); I try to follow blue ball. To determine the maximum and minimum I open a picture I took with the camera, open it MS paint and doubles at (180/240) result out of me in H And (255/240) the result of S and L then i recive the next values: 108 113 115 112 105 H 145 40 107 129 143 S 97 129 96 102 124 L So I chose the next values: CvScalar hsv_min = cvScalar( 105, 40, 96 ); CvScalar hsv_max = cvScalar( 115, 140, 130); But when I try to follow it hardly ever see him Am I wrong calculation? or what can i do to improve the result?
0
7,294,168
09/03/2011 15:59:42
759,866
05/18/2011 19:51:00
1,482
67
How many methods can we reasonably put in an entity before it's considered bloated?
With all those readings about single responsibility principle, decomposition, etc., it's difficult to get an idea of what should be the alarm signal that an entity gets bloated. Is there some good advice/reading somewhere about how many methods we should consider a maximum, or if there are some objective other criteria?
oop
methods
properties
domain-driven-design
srp
09/03/2011 20:37:59
not constructive
How many methods can we reasonably put in an entity before it's considered bloated? === With all those readings about single responsibility principle, decomposition, etc., it's difficult to get an idea of what should be the alarm signal that an entity gets bloated. Is there some good advice/reading somewhere about how many methods we should consider a maximum, or if there are some objective other criteria?
4
5,715,565
04/19/2011 11:22:57
715,084
04/19/2011 11:22:57
1
0
what is the best tool to draw UML diagram from java source code
what is the best tool to draw UML diagram from java source code
java
uml
class-diagram
null
null
04/19/2011 13:08:01
not constructive
what is the best tool to draw UML diagram from java source code === what is the best tool to draw UML diagram from java source code
4
6,848,470
07/27/2011 17:14:21
517,524
11/23/2010 13:58:02
1
0
Adt repository down?
Google's repository for the ADT plugin for eclipse seems to be throwing a 404 error.https://dl-ssl.google.com/android/eclipse/ Is there any alternate way of installing the plugin?
android
eclipse
null
null
null
07/27/2011 21:23:18
off topic
Adt repository down? === Google's repository for the ADT plugin for eclipse seems to be throwing a 404 error.https://dl-ssl.google.com/android/eclipse/ Is there any alternate way of installing the plugin?
2
9,651,997
03/11/2012 02:50:22
1,261,723
03/11/2012 01:13:35
1
0
Finally, is PHP 5.4 Thread Safe?
The PHP community recently announced the release 5.4. So, here is my first question: Is this version finally thread safe? I’ve read a lot of posts here and around on the Net about this hot topic (PHP tread safety) and I must admit that I’m a little bit confused. As of today, my poor understanding on this subject is that the “thread safe” versions of PHP could be used on a multi threaded server such as Apache2-mpm-Worker (or IIS on Windows) when the none thread safe PHP versions should be used on a multi processes server such as Apache2-mpm-Prefork while it’s also my understanding that PHP by itself can’t start multiple threads. I currently use PHP 5.3.10 on a Windows 7-64 system with WampServer2.2d-64 where phpinfo() states: Thread Safety : Enabled and Apache 2.2.21 Loaded modules: mod_php5 and also on another Ubuntu 10.04.3 LTS (64 bit) system with PHP 5.3.2-1ubuntu4.14 where phpinfo() states Tread Safety: disabled and Apache 2.2.14 loaded Modules mod_php5. I thought using mod_php5 automatically loaded a thread safe version of PHP (but I guess I'm wrong). So, here is my second question: Is PHP (any version) truly Thread Safe yes or no? So my third question is: how to enable the thread safety option on my Ubuntu system. And my last question on this subject is: is there a difference in execution times between the thread safe and non thread safe PHP/Apache versions? Thank you in advance for your help and answers. PS: one additional question: How to install PHP 5.3.10 on Ubuntu since this package isn’t proposed by Synaptic?
php
thread-safety
null
null
null
03/11/2012 14:56:00
off topic
Finally, is PHP 5.4 Thread Safe? === The PHP community recently announced the release 5.4. So, here is my first question: Is this version finally thread safe? I’ve read a lot of posts here and around on the Net about this hot topic (PHP tread safety) and I must admit that I’m a little bit confused. As of today, my poor understanding on this subject is that the “thread safe” versions of PHP could be used on a multi threaded server such as Apache2-mpm-Worker (or IIS on Windows) when the none thread safe PHP versions should be used on a multi processes server such as Apache2-mpm-Prefork while it’s also my understanding that PHP by itself can’t start multiple threads. I currently use PHP 5.3.10 on a Windows 7-64 system with WampServer2.2d-64 where phpinfo() states: Thread Safety : Enabled and Apache 2.2.21 Loaded modules: mod_php5 and also on another Ubuntu 10.04.3 LTS (64 bit) system with PHP 5.3.2-1ubuntu4.14 where phpinfo() states Tread Safety: disabled and Apache 2.2.14 loaded Modules mod_php5. I thought using mod_php5 automatically loaded a thread safe version of PHP (but I guess I'm wrong). So, here is my second question: Is PHP (any version) truly Thread Safe yes or no? So my third question is: how to enable the thread safety option on my Ubuntu system. And my last question on this subject is: is there a difference in execution times between the thread safe and non thread safe PHP/Apache versions? Thank you in advance for your help and answers. PS: one additional question: How to install PHP 5.3.10 on Ubuntu since this package isn’t proposed by Synaptic?
2
8,308,450
11/29/2011 09:29:30
999,222
10/17/2011 13:12:26
6
0
custom billing module algorithm/architechture please
**Problem background** I am making a webapp. Users will be able to see their balance within the app at any given moment in time for any custom-set period. So they can print on screen their statement for last 90 days. There they will see the debit (services rendered by us) and credit (funds submitted by user). At the bottom of the table they will see the balance, which is say "-100$" (they owe us) or "+$460" (they have funds for future). But the tricky part is that before the statement there must be the preceding balance at the very start of statement. So that in this example, by the start of the output period they **ALREADY owed us $1000 before**. So at the bottom of the statement I need to sum the preceding balance and the current one for the selected period. **The challenge / the question** How do I start making this module? I am interested in an algorithm tips, db architecture etc. In short, what is the general algorithm (or some) to develop such a module? P.S. my idea already is that I must record the current balance at any balance-related event from the user or the system.
billing
in-app-billing
null
null
null
11/29/2011 14:30:59
too localized
custom billing module algorithm/architechture please === **Problem background** I am making a webapp. Users will be able to see their balance within the app at any given moment in time for any custom-set period. So they can print on screen their statement for last 90 days. There they will see the debit (services rendered by us) and credit (funds submitted by user). At the bottom of the table they will see the balance, which is say "-100$" (they owe us) or "+$460" (they have funds for future). But the tricky part is that before the statement there must be the preceding balance at the very start of statement. So that in this example, by the start of the output period they **ALREADY owed us $1000 before**. So at the bottom of the statement I need to sum the preceding balance and the current one for the selected period. **The challenge / the question** How do I start making this module? I am interested in an algorithm tips, db architecture etc. In short, what is the general algorithm (or some) to develop such a module? P.S. my idea already is that I must record the current balance at any balance-related event from the user or the system.
3
6,443,859
06/22/2011 17:16:14
403,390
07/27/2010 12:45:07
3,557
80
Is evaluating random text dangerous?
I've been passing time this afternoon by generating random strings and passing them through Perl's `eval`. The scripts are strings that contain only the following characters: +-*$_.,/\@()%=` Is there a statistically significant risk that I break something? Note: I don't pass it arguments like `"rm -rf /"`.
perl
null
null
null
null
06/23/2011 00:52:44
too localized
Is evaluating random text dangerous? === I've been passing time this afternoon by generating random strings and passing them through Perl's `eval`. The scripts are strings that contain only the following characters: +-*$_.,/\@()%=` Is there a statistically significant risk that I break something? Note: I don't pass it arguments like `"rm -rf /"`.
3
10,826,047
05/31/2012 00:35:35
1,427,253
05/31/2012 00:27:19
1
0
To add just columns to a QTableView
I have two list widgets. One contains available columns(not entire tables,just columns) from a database table. I have an add pushbutton which adds the columns I want to display on to the other list widget. When I click on the ok push button , I want the columns in the second list widget to be displayed on a QSqlTableModel. My question is as far as ive looked around, I have been able to find stuff for displaying just entire tables. If I need to display just columns,what do I need to do. I tried using the QSqlQueryModel but I keep getting QSqlQuery::exec: database not found error even though my database is open. Is there anyone who knows how to work around this problem?? If you can let me know of other classes that are out there which might help me solve the problem, it will be of great help! Thanks Kailash
c++
qt
null
null
null
08/01/2012 13:19:06
not a real question
To add just columns to a QTableView === I have two list widgets. One contains available columns(not entire tables,just columns) from a database table. I have an add pushbutton which adds the columns I want to display on to the other list widget. When I click on the ok push button , I want the columns in the second list widget to be displayed on a QSqlTableModel. My question is as far as ive looked around, I have been able to find stuff for displaying just entire tables. If I need to display just columns,what do I need to do. I tried using the QSqlQueryModel but I keep getting QSqlQuery::exec: database not found error even though my database is open. Is there anyone who knows how to work around this problem?? If you can let me know of other classes that are out there which might help me solve the problem, it will be of great help! Thanks Kailash
1
6,862,073
07/28/2011 16:05:36
232,310
12/15/2009 17:45:54
232
4
Compare 2 folders and copy new and modified files to 3rd folder
I am looking for a command line tool in windows that does the folder comparison between 2 folders and gives a list of all the Newly added and modified files so I can copy these files to a 3rd directory. I looked into windiff, araxis merge and comp command but did not meet the need (or I missed something). Thanks in advance for the help.
windows
command-line
merge
null
null
07/30/2011 16:36:48
off topic
Compare 2 folders and copy new and modified files to 3rd folder === I am looking for a command line tool in windows that does the folder comparison between 2 folders and gives a list of all the Newly added and modified files so I can copy these files to a 3rd directory. I looked into windiff, araxis merge and comp command but did not meet the need (or I missed something). Thanks in advance for the help.
2
6,965,097
08/06/2011 05:58:36
675,622
03/23/2011 19:58:01
200
1
Python .app shows error on close
An alert comes up when I close the python .app I made with the options "Open Console" ad "Terminate." Why would this be? Python 2.7, mac os 10.6.8, GUI program
python
error-message
py2app
null
null
08/06/2011 12:22:03
not a real question
Python .app shows error on close === An alert comes up when I close the python .app I made with the options "Open Console" ad "Terminate." Why would this be? Python 2.7, mac os 10.6.8, GUI program
1
8,047,573
11/08/2011 08:12:41
786,796
06/07/2011 03:37:15
375
16
How to properly uninstall the previous Excel 2010 add-in before installing the new version with windows installer?
In my setup project, I updated `Version` property, let's say from **1.0.0** to **1.0.1** (Also yes to the new product code), and then set `RemovePreviousVersions` to true. I then rebuilt the setup project. The installation went okay but the funny thing happened when I opened up the Excel. The previous version somehow was NOT removed and still showing on the Ribbon Bar. Apparently the installer didn't work quite right. I am not sure if I missed something or perhaps set up something wrong in the setup project. I'd have thought changing `Version` & `RemovePreviousVersions` would be enough. Maybe I was wrong. So what else do I have to do here? Can anyone give me some pointers? EDT: Just 1 more thing to add here: I don't think I changed either Assembly version or File version when I rebuilding the installer. Which one should I update? The File one or Assembly one or perhaps both? Would it matter if I just keep the original version unchanged?
.net
excel
deployment
vsto
windows-installer
null
open
How to properly uninstall the previous Excel 2010 add-in before installing the new version with windows installer? === In my setup project, I updated `Version` property, let's say from **1.0.0** to **1.0.1** (Also yes to the new product code), and then set `RemovePreviousVersions` to true. I then rebuilt the setup project. The installation went okay but the funny thing happened when I opened up the Excel. The previous version somehow was NOT removed and still showing on the Ribbon Bar. Apparently the installer didn't work quite right. I am not sure if I missed something or perhaps set up something wrong in the setup project. I'd have thought changing `Version` & `RemovePreviousVersions` would be enough. Maybe I was wrong. So what else do I have to do here? Can anyone give me some pointers? EDT: Just 1 more thing to add here: I don't think I changed either Assembly version or File version when I rebuilding the installer. Which one should I update? The File one or Assembly one or perhaps both? Would it matter if I just keep the original version unchanged?
0