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
4,895,084
02/04/2011 06:09:46
475,349
09/08/2010 13:04:04
61
1
cross sign in android project appearing
I am developing an android application.Its showing no errors in xml or java file.iTS displaying message Your project contains errors.Please fix them before running application what should i do next.How should i pursue. Thanks in advance Tushar sahni
android
null
null
null
null
04/30/2011 16:14:05
not a real question
cross sign in android project appearing === I am developing an android application.Its showing no errors in xml or java file.iTS displaying message Your project contains errors.Please fix them before running application what should i do next.How should i pursue. Thanks in advance Tushar sahni
1
3,856,293
10/04/2010 14:42:12
416,575
10/03/2009 18:49:04
21
0
how to convert seconds to time format ?
for some reason i convert a time format like : 03:30 to seconds 3*3600 + 30*60 , now .. i wanna convert it back to it's first ( same ) format upthere ... how could that be ? My attempt : 3*3600 + 30*60 = 12600 12600 / 60 = 210 / 60 = 3.5 , floor(3.5) = 3 = hour now .. what about the minutes ?? considering the value can be like 19:00 or 02:51 ... i think you got the picture and by the way, how to convert 2:0 for example to 02:00 using RegEx ? Thanks in advance
php
time
format
null
null
null
open
how to convert seconds to time format ? === for some reason i convert a time format like : 03:30 to seconds 3*3600 + 30*60 , now .. i wanna convert it back to it's first ( same ) format upthere ... how could that be ? My attempt : 3*3600 + 30*60 = 12600 12600 / 60 = 210 / 60 = 3.5 , floor(3.5) = 3 = hour now .. what about the minutes ?? considering the value can be like 19:00 or 02:51 ... i think you got the picture and by the way, how to convert 2:0 for example to 02:00 using RegEx ? Thanks in advance
0
5,609,894
04/10/2011 05:02:53
616,280
02/14/2011 13:43:10
130
11
Problem with installing
I don't know what happen with my apps. it never happen before. it showing error like this. > [2011-04-10 11:53:22 - Rocket Project] Installation error: INSTALL_PARSE_FAILED_MANIFEST_MALFORMED > [2011-04-10 11:53:22 - Rocket Project] Please check logcat output for more details. > [2011-04-10 11:53:22 - Rocket Project] Launch canceled! please help me.
android
null
null
null
null
null
open
Problem with installing === I don't know what happen with my apps. it never happen before. it showing error like this. > [2011-04-10 11:53:22 - Rocket Project] Installation error: INSTALL_PARSE_FAILED_MANIFEST_MALFORMED > [2011-04-10 11:53:22 - Rocket Project] Please check logcat output for more details. > [2011-04-10 11:53:22 - Rocket Project] Launch canceled! please help me.
0
5,297,343
03/14/2011 10:27:08
448,078
09/15/2010 06:58:29
75
2
Best free tool for managing java keystores and security certificates
What is best free tool for managing java keystores and security certificates? Thanks.
java
security
certificate
keystore
null
09/19/2011 12:10:42
not constructive
Best free tool for managing java keystores and security certificates === What is best free tool for managing java keystores and security certificates? Thanks.
4
11,671,926
07/26/2012 14:47:13
842,358
07/13/2011 09:19:49
158
9
How to solve MySQL 2002 - The server is not responding .....on Windows 7
I have installed **XAMPP 1.7.4** on my Windows 7 64-bit desktop. The **Apache 2.2** service is running properly but the **mysql** service is not running. On running **phpMyAdmin**, in the browser, it says : > #2002 - The server is not responding (or the local MySQL server's socket is not correctly configured) I tried few work-arounds as mentioned in the following web-pages, but they did not work: - http://www.apachefriends.org/f/viewtopic.php?p=187101&sid=3daa46338fc5b9c70d141c986bc6b5a1 - http://forums.techguy.org/web-design-development/994597-solved-phpmyadmin-2002-server-not.html - http://sakafi.wordpress.com/2009/03/14/2002-the-server-is-not-responding-or-local-mysql-servers-socket-is-not-correctly-configured/ I have also completely removed and re-installed XAMPP several times, but it did not help. Some of the solutions recommend changed the `socket` parameter in **my.ini** and **php.ini** to **\tmp\mysql.sock**. One thing that I have noticed is that there is no **mysql.sock** file in the **C:\xampp\tmp** folder. How do I resolve this issue? Thanks in advance
mysql
sockets
xampp
null
null
07/28/2012 21:00:46
off topic
How to solve MySQL 2002 - The server is not responding .....on Windows 7 === I have installed **XAMPP 1.7.4** on my Windows 7 64-bit desktop. The **Apache 2.2** service is running properly but the **mysql** service is not running. On running **phpMyAdmin**, in the browser, it says : > #2002 - The server is not responding (or the local MySQL server's socket is not correctly configured) I tried few work-arounds as mentioned in the following web-pages, but they did not work: - http://www.apachefriends.org/f/viewtopic.php?p=187101&sid=3daa46338fc5b9c70d141c986bc6b5a1 - http://forums.techguy.org/web-design-development/994597-solved-phpmyadmin-2002-server-not.html - http://sakafi.wordpress.com/2009/03/14/2002-the-server-is-not-responding-or-local-mysql-servers-socket-is-not-correctly-configured/ I have also completely removed and re-installed XAMPP several times, but it did not help. Some of the solutions recommend changed the `socket` parameter in **my.ini** and **php.ini** to **\tmp\mysql.sock**. One thing that I have noticed is that there is no **mysql.sock** file in the **C:\xampp\tmp** folder. How do I resolve this issue? Thanks in advance
2
9,941,368
03/30/2012 10:36:26
1,172,914
01/27/2012 06:14:07
81
2
What is the format of Indian mobile number
I know that a mobile number is composed of Mcc+mnc+lac+cellid as per http://www.opencellid.org/ but now how can i find it for an Indian mobile number ? as per 1) MCC (Mobile country code) 2)MNC (Mobile decimal code) 3)Lac (Local area code) 4)cell id ( cell id)
mobile
numberformat
mobile-country-code
null
null
04/24/2012 03:17:58
off topic
What is the format of Indian mobile number === I know that a mobile number is composed of Mcc+mnc+lac+cellid as per http://www.opencellid.org/ but now how can i find it for an Indian mobile number ? as per 1) MCC (Mobile country code) 2)MNC (Mobile decimal code) 3)Lac (Local area code) 4)cell id ( cell id)
2
2,509,051
03/24/2010 15:41:53
117,039
06/04/2009 03:26:15
580
0
database design tool question
is there a good database design tool can generate sql script to create database (tables) in major database (Oracle, MySQL, SQL server, Sybase) without any changes? Which design tool are you think is good.
database
database-design
null
null
null
06/03/2012 05:23:19
not constructive
database design tool question === is there a good database design tool can generate sql script to create database (tables) in major database (Oracle, MySQL, SQL server, Sybase) without any changes? Which design tool are you think is good.
4
6,138,848
05/26/2011 12:57:56
771,336
05/26/2011 12:57:56
1
0
Ubuntu 11.04: Installing PIL into a virtualenv with PIP
I have spent hours now trying to figure this out. I do the following: sudo apt-get install python-dev sudo apt-get install libjpeg8-dev sudo apt-get install libfreetype6 libfreetype6-dev mkvirtualenv -p python2.7 --no-site-packages foobar pip install PIL Whenever I try to upload an image in my django-cms website I get an error message (I am too lazy to debug the thing and find out the real error message, but if that is needed, let me know).
python
ubuntu
pil
virtualenv
pip
01/15/2012 04:21:04
not a real question
Ubuntu 11.04: Installing PIL into a virtualenv with PIP === I have spent hours now trying to figure this out. I do the following: sudo apt-get install python-dev sudo apt-get install libjpeg8-dev sudo apt-get install libfreetype6 libfreetype6-dev mkvirtualenv -p python2.7 --no-site-packages foobar pip install PIL Whenever I try to upload an image in my django-cms website I get an error message (I am too lazy to debug the thing and find out the real error message, but if that is needed, let me know).
1
3,870,463
10/06/2010 07:56:43
43,907
12/06/2008 09:03:27
1,908
0
Is there any script for Open/Close sql-server 2008 ?
Is there any script (any batch file) for Open/Close sql-server 2008 ? thank's in advance
sql-server-2008
null
null
null
null
10/06/2010 08:40:34
not a real question
Is there any script for Open/Close sql-server 2008 ? === Is there any script (any batch file) for Open/Close sql-server 2008 ? thank's in advance
1
5,231,726
03/08/2011 11:18:53
649,696
03/08/2011 11:18:53
1
0
iPhone app crash with iOS 4.3
This is an image with the error I get http://cl.ly/549l the app works fine with iOS 4.2.1 and with previous versions. Please somebody tell me what it mean! Thanks
iphone
xcode4
ios4.3
null
null
07/21/2011 01:28:29
too localized
iPhone app crash with iOS 4.3 === This is an image with the error I get http://cl.ly/549l the app works fine with iOS 4.2.1 and with previous versions. Please somebody tell me what it mean! Thanks
3
674,505
03/23/2009 17:53:48
1,492
08/15/2008 21:46:00
490
19
Looking for an alternative to Trac: Project management and bug tracking system for multiple projects.
We are using **[Trac][1]** as the main project management / bug tracking tool in our job. The pros in Trac: - Free software (free as in free beer and free speech). - SVN integration. - Easy to use, user-friendly, etc. - Different permissions. We started using it for our software projects, one instance of Trac per project. Here's where I found the first con. As the Trac admin, I have to install a new instance of Trac for every new project, and configure a user file with different permissions. So I have to be aware of the different instances of Trac, user names, permissions, directories, etc. We even found Trac useful for inner management. We have an instance of Trac to handle tickets from the different area managers, with the upper management. Basically, we use most of the features in Trac and found it really useful to solve our task management / bug tracking problems. For software development, and general management too. I'm looking for a multiple project management software, in the spirit of Trac, but with one centralized administration of some kind. One where I can give different users different permissions for different projects. I've read about **[Jira][2]**, but I've been told it's an overkill for the size of our company. I also saw **[Redmine][3]** on some project management/bug tracking questions here at StackOverflow. It seems as the closest product to what I'm looking for. What would you recommend? Have you tried Redmine? Is it worth migrating our current projects and Trac data to Redmine? I must add, I've seen some multiple-project hacks for Trac, but none of them seemed convincing enough. [1]: http://trac.edgewall.org/ [2]: http://www.atlassian.com/software/jira/ [3]: http://www.redmine.org/
project-management
bug-tracking
null
null
null
null
open
Looking for an alternative to Trac: Project management and bug tracking system for multiple projects. === We are using **[Trac][1]** as the main project management / bug tracking tool in our job. The pros in Trac: - Free software (free as in free beer and free speech). - SVN integration. - Easy to use, user-friendly, etc. - Different permissions. We started using it for our software projects, one instance of Trac per project. Here's where I found the first con. As the Trac admin, I have to install a new instance of Trac for every new project, and configure a user file with different permissions. So I have to be aware of the different instances of Trac, user names, permissions, directories, etc. We even found Trac useful for inner management. We have an instance of Trac to handle tickets from the different area managers, with the upper management. Basically, we use most of the features in Trac and found it really useful to solve our task management / bug tracking problems. For software development, and general management too. I'm looking for a multiple project management software, in the spirit of Trac, but with one centralized administration of some kind. One where I can give different users different permissions for different projects. I've read about **[Jira][2]**, but I've been told it's an overkill for the size of our company. I also saw **[Redmine][3]** on some project management/bug tracking questions here at StackOverflow. It seems as the closest product to what I'm looking for. What would you recommend? Have you tried Redmine? Is it worth migrating our current projects and Trac data to Redmine? I must add, I've seen some multiple-project hacks for Trac, but none of them seemed convincing enough. [1]: http://trac.edgewall.org/ [2]: http://www.atlassian.com/software/jira/ [3]: http://www.redmine.org/
0
6,014,325
05/16/2011 07:32:25
701,049
04/10/2011 17:16:09
172
5
Password strength
I wonder how to measure password strength best. I found two different pages: http://rumkin.com/tools/password/passchk.php and http://www.passwordmeter.com/ and they give completely different results about different passwords. Somehow it's obvious to measure in bit, but than it could be hard to tell how many different chars to take into account, e.g.: let's say my password is aB*, than someone using brute-force would have to use special chars, upper and lower letters, thus ~60 different chars, i.e. 60^3 combinations. Thanks so far!
passwords
bit
null
null
null
05/16/2011 08:30:35
off topic
Password strength === I wonder how to measure password strength best. I found two different pages: http://rumkin.com/tools/password/passchk.php and http://www.passwordmeter.com/ and they give completely different results about different passwords. Somehow it's obvious to measure in bit, but than it could be hard to tell how many different chars to take into account, e.g.: let's say my password is aB*, than someone using brute-force would have to use special chars, upper and lower letters, thus ~60 different chars, i.e. 60^3 combinations. Thanks so far!
2
10,240,286
04/20/2012 04:29:03
1,338,942
04/17/2012 13:47:09
6
0
Not getting an output from my inputs
http://pastebin.com/YmeB2D1N Essentially, my program has two EditTexts, a Button, and a TextView. You input a number/string into the EditText, and an output is supposed to be shown in the TextView. However, all i get is a 'There is no Department'. How do i fix this?
android
eclipse
output
null
null
null
open
Not getting an output from my inputs === http://pastebin.com/YmeB2D1N Essentially, my program has two EditTexts, a Button, and a TextView. You input a number/string into the EditText, and an output is supposed to be shown in the TextView. However, all i get is a 'There is no Department'. How do i fix this?
0
1,798,077
11/25/2009 16:17:45
207,335
11/09/2009 21:57:04
41
8
Good opensource OCR in C#
Is there a good open source OCR implementation in C#. I am trying to solve below problem. I have a document which contains boxes and people enter their id number in the box. Now I want to figure out the id number in program. Thank you, Bala
csharp
ocr
null
null
null
06/05/2012 23:12:21
not constructive
Good opensource OCR in C# === Is there a good open source OCR implementation in C#. I am trying to solve below problem. I have a document which contains boxes and people enter their id number in the box. Now I want to figure out the id number in program. Thank you, Bala
4
11,384,515
07/08/2012 15:55:30
945,682
09/14/2011 23:08:50
20
2
database structure for school
I have to develop a web app for school please need help **how to manage attendance of students and teachers**
php
mysql
database
query
database-design
07/08/2012 16:08:11
not a real question
database structure for school === I have to develop a web app for school please need help **how to manage attendance of students and teachers**
1
9,873,346
03/26/2012 13:48:09
1,288,965
03/23/2012 18:48:45
6
0
Visual basic 6 Error 3011 Jet Engine cannot find Object when using RecordSource property on Data Control
I'm trying to filter a Grid using the RecordSource parameter but it give me error 3011, the RecordSource works well when you only specify the name of the table, but when you want to specify a query is when it give me the error. This is the query i want to perform: Data1.RecordSource = "Select TELEFONO,INTERNO,SECTOR,EMAIL,MUTUALISTA,EMERGENCIA,DIRECCION,DEPARTAMENTO,CIUDAD,LOCALIDAD,CP from EMPLEADOS WHERE NOMBRE ='nmm'" Data1.Refresh
query
basic
null
null
null
03/27/2012 14:18:48
not a real question
Visual basic 6 Error 3011 Jet Engine cannot find Object when using RecordSource property on Data Control === I'm trying to filter a Grid using the RecordSource parameter but it give me error 3011, the RecordSource works well when you only specify the name of the table, but when you want to specify a query is when it give me the error. This is the query i want to perform: Data1.RecordSource = "Select TELEFONO,INTERNO,SECTOR,EMAIL,MUTUALISTA,EMERGENCIA,DIRECCION,DEPARTAMENTO,CIUDAD,LOCALIDAD,CP from EMPLEADOS WHERE NOMBRE ='nmm'" Data1.Refresh
1
1,766,339
11/19/2009 20:37:40
214,953
11/19/2009 20:37:40
1
0
When should I give out my iPhone UDID?
When should I give out my iPhone UDID? A company is developing an application for my company for the iphone wants my UDID. Are there any risks to me as an individual giving this out? Many thanks
iphone
udid
mobile
smart
phone
11/20/2009 22:02:20
off topic
When should I give out my iPhone UDID? === When should I give out my iPhone UDID? A company is developing an application for my company for the iphone wants my UDID. Are there any risks to me as an individual giving this out? Many thanks
2
7,667,334
10/05/2011 20:29:37
342,059
05/15/2010 18:53:52
341
4
Increasing capacity of RAID5 array
Assume that I built an 2TB RAID5 array and its running and some data is stored on it. Now I need to increase its size to 5TB. Can I increase capacity (By adding extra drives)? How? If Yes is it possible to do this while RAID array is working? Thanks
raid
capacity
raid5
null
null
10/05/2011 20:42:22
off topic
Increasing capacity of RAID5 array === Assume that I built an 2TB RAID5 array and its running and some data is stored on it. Now I need to increase its size to 5TB. Can I increase capacity (By adding extra drives)? How? If Yes is it possible to do this while RAID array is working? Thanks
2
7,802,199
10/18/2011 03:46:46
995,668
10/14/2011 15:21:14
2
0
Any clue on what hash was used in this?
I want to know what it was used for this to hash 2418c997-4a7b-4bd1-8297-f7c5ce7d75e0 Also how come this 2418c997-4a7b-4bd1-8297-f7c5ce7d75e0`.axd` can show a photo?
php
hash
null
null
null
10/18/2011 03:52:18
not a real question
Any clue on what hash was used in this? === I want to know what it was used for this to hash 2418c997-4a7b-4bd1-8297-f7c5ce7d75e0 Also how come this 2418c997-4a7b-4bd1-8297-f7c5ce7d75e0`.axd` can show a photo?
1
8,776,906
01/08/2012 10:50:53
880,182
08/05/2011 08:33:16
39
1
Allow user to register to Openfire server using OpenLDAP
I've successfully setup Openfire 3.7.1 communicating with OpenLDAP 2.4.28 on ArchLinux 2011.08.19. I want XMPP users to be able to register and the registration should be accepted by OpenLDAP server and (because it's LDAP) the registration should be global. So if a user comes in, registers through XMPP, he should be able to login on the web or access his public FTP. The same with web registration. How can I accomplish this? my current slapd config is this: include /etc/openldap/schema/core.schema include /etc/openldap/schema/cosine.schema include /etc/openldap/schema/inetorgperson.schema pidfile /run/openldap/slapd.pid argsfile /run/openldap/slapd.args access to dn.subtree="dc=domain,dc=tld" attrs=uid,userPassword by self write by anonymous auth by * none access to dn.children="dc=domain,dc=tld" attrs=cn,gn,sn,displayName,mail,mobile,homePhone,homePostalAddress,telephoneNumber by self write by * read access to dn.subtree="dc=domain,dc=tld" by * read access to * by * read database bdb suffix "dc=domain,dc=tld" rootdn "cn=Manager,dc=domain,dc=tld" rootpw {SSHA}secret directory /var/lib/openldap/openldap-data index objectClass eq
active-directory
ldap
xmpp
openfire
openldap
01/08/2012 22:55:07
off topic
Allow user to register to Openfire server using OpenLDAP === I've successfully setup Openfire 3.7.1 communicating with OpenLDAP 2.4.28 on ArchLinux 2011.08.19. I want XMPP users to be able to register and the registration should be accepted by OpenLDAP server and (because it's LDAP) the registration should be global. So if a user comes in, registers through XMPP, he should be able to login on the web or access his public FTP. The same with web registration. How can I accomplish this? my current slapd config is this: include /etc/openldap/schema/core.schema include /etc/openldap/schema/cosine.schema include /etc/openldap/schema/inetorgperson.schema pidfile /run/openldap/slapd.pid argsfile /run/openldap/slapd.args access to dn.subtree="dc=domain,dc=tld" attrs=uid,userPassword by self write by anonymous auth by * none access to dn.children="dc=domain,dc=tld" attrs=cn,gn,sn,displayName,mail,mobile,homePhone,homePostalAddress,telephoneNumber by self write by * read access to dn.subtree="dc=domain,dc=tld" by * read access to * by * read database bdb suffix "dc=domain,dc=tld" rootdn "cn=Manager,dc=domain,dc=tld" rootpw {SSHA}secret directory /var/lib/openldap/openldap-data index objectClass eq
2
7,057,956
08/14/2011 16:04:34
893,390
08/13/2011 20:55:19
268
10
Multiple associations with one table
I've searched a bit before asking this but I definitely can't get it working... I've got a Group model which has a manager_id, a designer_id and other user ids corresponding to different user roles in this group. They are has_one User associations in the Group model with different foreign keys. I've tried multiple belongs_to associations in the User model but... a User which belong to the group (they have a group_id column) can be one of these roles and I realy don't know how to check these and how to do the associations in the User model. Thank you in advance. PS: The users can just belong to one group, that's why I've simply put the group_id in the User model and not on a join table.
ruby-on-rails-3
null
null
null
null
null
open
Multiple associations with one table === I've searched a bit before asking this but I definitely can't get it working... I've got a Group model which has a manager_id, a designer_id and other user ids corresponding to different user roles in this group. They are has_one User associations in the Group model with different foreign keys. I've tried multiple belongs_to associations in the User model but... a User which belong to the group (they have a group_id column) can be one of these roles and I realy don't know how to check these and how to do the associations in the User model. Thank you in advance. PS: The users can just belong to one group, that's why I've simply put the group_id in the User model and not on a join table.
0
435,588
01/12/2009 14:34:22
12,254
09/16/2008 13:45:48
301
18
What is the best way to implement a variable-sized multi-line UITableCell?
I'm trying to display a table full of twitter statuses (yes, this is the [Stanford Presence 2][1] assignment), which are variably sized. I can relatively easily determine the appropriate height for my rows with code that approximates (from [accompanying lecture 9][2]): - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *) indexPath { NSString *text = ...; UIFont *font = [UIFont systemFontOfSize:...]; CGSize withinSize = CGSizeMake(tableView.width, 1000]; CGSize size = [text sizeWithFont:font constrainedToSize:withinSize lineBreakMode:UILineBreakModeWordWrap]; return size.height + somePadding; } I have tried two approaches (and some tweaks to both) to get a multi-line word-wrapping field of text into my table row. 1) Add a UILabel as a subview to my custom UITableCell subclass, and set the numberOfLines property to either a calculated number based on the height above (say, 6), or to 0 (theoretically unlimited). The numberOfLines is ignored; I see either 1 or 2 lines, and no more. 2) Add a read-only UITextView as a subview. This has the problem that the UITextView eats my scrolling; I end up scrolling inside a UITextView row instead of moving smoothly from row to row. If I disable scrolling on the UITextView, I end up being unable to scroll at all.<br> <br> This is a pretty common thing to do; what's the best way to accomplish it? [1]: http://cs193p.stanford.edu/downloads/AssignmentPresence2.pdf [2]: http://cs193p.stanford.edu/downloads/09-TableViews.pdf
iphone
objective-c
cocoa-touch
null
null
null
open
What is the best way to implement a variable-sized multi-line UITableCell? === I'm trying to display a table full of twitter statuses (yes, this is the [Stanford Presence 2][1] assignment), which are variably sized. I can relatively easily determine the appropriate height for my rows with code that approximates (from [accompanying lecture 9][2]): - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *) indexPath { NSString *text = ...; UIFont *font = [UIFont systemFontOfSize:...]; CGSize withinSize = CGSizeMake(tableView.width, 1000]; CGSize size = [text sizeWithFont:font constrainedToSize:withinSize lineBreakMode:UILineBreakModeWordWrap]; return size.height + somePadding; } I have tried two approaches (and some tweaks to both) to get a multi-line word-wrapping field of text into my table row. 1) Add a UILabel as a subview to my custom UITableCell subclass, and set the numberOfLines property to either a calculated number based on the height above (say, 6), or to 0 (theoretically unlimited). The numberOfLines is ignored; I see either 1 or 2 lines, and no more. 2) Add a read-only UITextView as a subview. This has the problem that the UITextView eats my scrolling; I end up scrolling inside a UITextView row instead of moving smoothly from row to row. If I disable scrolling on the UITextView, I end up being unable to scroll at all.<br> <br> This is a pretty common thing to do; what's the best way to accomplish it? [1]: http://cs193p.stanford.edu/downloads/AssignmentPresence2.pdf [2]: http://cs193p.stanford.edu/downloads/09-TableViews.pdf
0
10,716,383
05/23/2012 08:40:03
824,624
07/01/2011 09:43:47
8
1
in drupal 7, how can drupal link to another remote service, consume the data in the web service such as nodejs?
I am using the drupal 7 for my CMS server, at the same time, I have a nodejs based server, I need the drupal link to my nodejs server in order to make drupal consume the data in the nodejs based server, which will expose the restful service interface Is there such a module that could link to the remote web service like nodejs rest, consume the data in the web service and expose the remote data as a view? and how to establish the authentication between drupal and nodejs?
drupal
node.js
remote-server
null
null
05/23/2012 23:49:01
not constructive
in drupal 7, how can drupal link to another remote service, consume the data in the web service such as nodejs? === I am using the drupal 7 for my CMS server, at the same time, I have a nodejs based server, I need the drupal link to my nodejs server in order to make drupal consume the data in the nodejs based server, which will expose the restful service interface Is there such a module that could link to the remote web service like nodejs rest, consume the data in the web service and expose the remote data as a view? and how to establish the authentication between drupal and nodejs?
4
11,031,122
06/14/2012 10:22:40
936,917
09/09/2011 14:06:04
74
5
Can't get all avents for a Google Calendar
with google-api-java-client I would like to get/retrieve all the event for a specific Calendar, is it possible ? I have initialized my CalendarService and Feed : CalendarService service = new CalendarService("Toto"); service.setUserCredentials(userName, userPassword); CalendarFeed safescreenFeed = service.getFeed(new URL("https://www.google.com/calendar/feeds/toto@gmail.com/owncalendars/full"), CalendarFeed.class); // Print the title of each calendar for (int i = 0; i < safescreenFeed.getEntries().size(); i++) { CalendarEntry entry = safescreenFeed.getEntries().get(i); System.out.println("\t" + entry.getTitle().getPlainText()); if(entry.getTitle().getPlainText().equals("MySpecificCalendar")) { System.out.println("MySpecificCalendar and wanted calendar !!!!"); System.out.println(entry.getContent()); } } So, I got my MySpecificCalendar and now I want to get/retrieve all events for this calendar. I have tested this but it's not working: CalendarEventFeed resultFeed = service.getFeed(new URl (https://www.google.com/calendar/feeds/toto@gmail.com/private/full), CalendarEventFeed.class); System.out.println("All events on your calendar:"); for (int i = 0; i < resultFeed.getEntries().size(); i++) { CalendarEventEntry entry = resultFeed.getEntries().get(i); System.out.println("\t" + entry.getTitle().getPlainText()); } } It not print anything. Have you an idea of the problems? Thanks!
google-calendar
google-api-java-client
null
null
null
null
open
Can't get all avents for a Google Calendar === with google-api-java-client I would like to get/retrieve all the event for a specific Calendar, is it possible ? I have initialized my CalendarService and Feed : CalendarService service = new CalendarService("Toto"); service.setUserCredentials(userName, userPassword); CalendarFeed safescreenFeed = service.getFeed(new URL("https://www.google.com/calendar/feeds/toto@gmail.com/owncalendars/full"), CalendarFeed.class); // Print the title of each calendar for (int i = 0; i < safescreenFeed.getEntries().size(); i++) { CalendarEntry entry = safescreenFeed.getEntries().get(i); System.out.println("\t" + entry.getTitle().getPlainText()); if(entry.getTitle().getPlainText().equals("MySpecificCalendar")) { System.out.println("MySpecificCalendar and wanted calendar !!!!"); System.out.println(entry.getContent()); } } So, I got my MySpecificCalendar and now I want to get/retrieve all events for this calendar. I have tested this but it's not working: CalendarEventFeed resultFeed = service.getFeed(new URl (https://www.google.com/calendar/feeds/toto@gmail.com/private/full), CalendarEventFeed.class); System.out.println("All events on your calendar:"); for (int i = 0; i < resultFeed.getEntries().size(); i++) { CalendarEventEntry entry = resultFeed.getEntries().get(i); System.out.println("\t" + entry.getTitle().getPlainText()); } } It not print anything. Have you an idea of the problems? Thanks!
0
10,872,439
06/03/2012 17:29:49
1,030,166
11/04/2011 17:32:03
110
9
jQuery Datatables fnRender not returning data after Ajax Loaded Page
I have ajQuery Datatables table rendered which is using dynamically loaded data. The fnRender function shows a <a href link with an image for editing the table row. via a seperate page. Everything works perfect if the page is loaded normally. If I dynamically load the page into a div section, via ajax and call the datatable() function (in the same way as before) the fnRender is not creating the link anymore. Only plain text will be rendered then (if I replace the link with a string). Is there any other way to get the link inside the table? here the code: var tables = $('#table1').dataTable({ "sDom": "rt", bJQueryUI: false, "sPaginationType": "full_numbers", bProcessing: true, bServerSide: true, sAjaxSource: '@Url.Action("IndexJSON", "UserStats")', "aaSorting": [[0, "desc"]], fnServerData: function (url, data, callback) { $.ajax({ "url": url, "data": data, "success": callback, "dataType": "json", "type": "POST", "cache": false, "error": function () { alert("DataTables warning: JSON data from server failed to load or be parsed. " + "This is most likely to be caused by a JSON formatting error."); } }); }, "aoColumns": [ { "bSortable": true }, { "bSortable": true }, { "bSortable": true }, { "bSortable": true }, { "bSortable": true }, { "bSortable": true }, { "sType": "string", "bSearchable": false, "bSortable": false, "sDefaultContent": "", "bUseRendered": false, "fnRender": function (oObj, sVal ) { return '<img border="0" width="16px" src="/Images/Buttons/edit_round.png"/>'; // return '<a href =\"UserStats/Edit/' + oObj.aData[6] + '\">edit<img border="0" width="16px" src="/Images/Buttons/edit_round.png"/></a>' // +'<a href =\"UserStats/Delete/' + oObj.aData[6] + '\"><img border="0" width="16px" src="/Images/Buttons/delete_round.png"/></a>'; } }, ] });
asp.net-mvc
datatables
null
null
null
06/21/2012 12:28:19
not a real question
jQuery Datatables fnRender not returning data after Ajax Loaded Page === I have ajQuery Datatables table rendered which is using dynamically loaded data. The fnRender function shows a <a href link with an image for editing the table row. via a seperate page. Everything works perfect if the page is loaded normally. If I dynamically load the page into a div section, via ajax and call the datatable() function (in the same way as before) the fnRender is not creating the link anymore. Only plain text will be rendered then (if I replace the link with a string). Is there any other way to get the link inside the table? here the code: var tables = $('#table1').dataTable({ "sDom": "rt", bJQueryUI: false, "sPaginationType": "full_numbers", bProcessing: true, bServerSide: true, sAjaxSource: '@Url.Action("IndexJSON", "UserStats")', "aaSorting": [[0, "desc"]], fnServerData: function (url, data, callback) { $.ajax({ "url": url, "data": data, "success": callback, "dataType": "json", "type": "POST", "cache": false, "error": function () { alert("DataTables warning: JSON data from server failed to load or be parsed. " + "This is most likely to be caused by a JSON formatting error."); } }); }, "aoColumns": [ { "bSortable": true }, { "bSortable": true }, { "bSortable": true }, { "bSortable": true }, { "bSortable": true }, { "bSortable": true }, { "sType": "string", "bSearchable": false, "bSortable": false, "sDefaultContent": "", "bUseRendered": false, "fnRender": function (oObj, sVal ) { return '<img border="0" width="16px" src="/Images/Buttons/edit_round.png"/>'; // return '<a href =\"UserStats/Edit/' + oObj.aData[6] + '\">edit<img border="0" width="16px" src="/Images/Buttons/edit_round.png"/></a>' // +'<a href =\"UserStats/Delete/' + oObj.aData[6] + '\"><img border="0" width="16px" src="/Images/Buttons/delete_round.png"/></a>'; } }, ] });
1
11,491,338
07/15/2012 11:03:56
1,175,434
01/28/2012 16:13:04
16
1
My program usage more memory, help me
Hello i made a program which use webbrowser control and 2 timers. each timer (100 and 800 interval) work with same time. when i run program, it'll usage memory more and more... thread could help? please guide me how to fix it? thank you.
c#
.net
visual-studio-2010
winapp
null
07/15/2012 11:16:24
not a real question
My program usage more memory, help me === Hello i made a program which use webbrowser control and 2 timers. each timer (100 and 800 interval) work with same time. when i run program, it'll usage memory more and more... thread could help? please guide me how to fix it? thank you.
1
5,250,215
03/09/2011 18:09:07
647,023
03/06/2011 15:07:24
1
1
need help on auto generated school year
How to make auto generated school year like this 2010-2011 in vb6 ?? any idea? guys! need help!
vb6
null
null
null
null
07/20/2012 17:59:30
too localized
need help on auto generated school year === How to make auto generated school year like this 2010-2011 in vb6 ?? any idea? guys! need help!
3
8,384,783
12/05/2011 11:44:45
1,060,671
10/26/2010 20:29:38
13
1
Database structure Facebook status post
What is the database design Facebook uses for it's wall posts ? At facebook we can place a status update that could be any of the following objects: - a message - a video - a url (renders preview of the url) - a photo - etc Most of these objects share a lot of similarity. If we want to create a similiar site like facebook, would it be smart to have 1 table with all the objects and a lot of NULL fields or would it be smarter to have a table for each object type. How did facebook manage this in the early days?
mysql
facebook
database-design
null
null
12/05/2011 11:54:23
not a real question
Database structure Facebook status post === What is the database design Facebook uses for it's wall posts ? At facebook we can place a status update that could be any of the following objects: - a message - a video - a url (renders preview of the url) - a photo - etc Most of these objects share a lot of similarity. If we want to create a similiar site like facebook, would it be smart to have 1 table with all the objects and a lot of NULL fields or would it be smarter to have a table for each object type. How did facebook manage this in the early days?
1
4,532,999
12/26/2010 06:42:42
243,213
01/04/2010 13:52:34
1,408
166
Will HTML5 replace silverlight?
A while ago I read a news [here][1], that **Microsoft changed its strategy for silverlight and will replace it with HTML5**. As it is a controversial discussion, some guys from Microsoft and other corporation wrote about it and some agreed and some don't? As it is important to be aware of near future of tools that you are using, what do you think, Will Microsoft replace Silverlight with HTML5 or not? I myself believe that **it will happen in 2012**, the time that HTML5 released completely, and Microsoft are releasing **VS2012**. [1]: http://www.zdnet.com/blog/microsoft/microsoft-our-strategy-with-silverlight-has-shifted/7834
html
silverlight
html5
survey
news
12/26/2010 07:20:58
off topic
Will HTML5 replace silverlight? === A while ago I read a news [here][1], that **Microsoft changed its strategy for silverlight and will replace it with HTML5**. As it is a controversial discussion, some guys from Microsoft and other corporation wrote about it and some agreed and some don't? As it is important to be aware of near future of tools that you are using, what do you think, Will Microsoft replace Silverlight with HTML5 or not? I myself believe that **it will happen in 2012**, the time that HTML5 released completely, and Microsoft are releasing **VS2012**. [1]: http://www.zdnet.com/blog/microsoft/microsoft-our-strategy-with-silverlight-has-shifted/7834
2
47,278
09/06/2008 06:16:34
3,839
08/31/2008 10:11:12
292
28
How to get the most of out laptop batteries
What strategies should you employ to make laptop batteries last?
osx
laptop
hardware
null
null
08/14/2011 23:29:14
off topic
How to get the most of out laptop batteries === What strategies should you employ to make laptop batteries last?
2
3,965,373
10/19/2010 04:39:44
193,251
10/20/2009 16:38:35
660
19
Recommend classes for handling xml configuration file in C#?
I am writing a program that need to store some configuration information. I thought XML would be a good choice, but I do not want to learn XML in C# from scratch. Could you recommend good ways/classes handling this task?
c#
xml
configuration
null
null
06/13/2012 13:31:27
not constructive
Recommend classes for handling xml configuration file in C#? === I am writing a program that need to store some configuration information. I thought XML would be a good choice, but I do not want to learn XML in C# from scratch. Could you recommend good ways/classes handling this task?
4
9,905,613
03/28/2012 10:28:05
1,297,862
03/28/2012 10:15:03
1
0
Please suggest best practices for decompse a user story in TDD way (Java)
Please suggest best practices for decompse a user story in TDD way. Best practices and tips for decomposing a given user story in short time by following TDD approch. If explain with example, it would be helpfull alot.
java
tdd
agile
decomposition
pp
03/28/2012 10:34:23
off topic
Please suggest best practices for decompse a user story in TDD way (Java) === Please suggest best practices for decompse a user story in TDD way. Best practices and tips for decomposing a given user story in short time by following TDD approch. If explain with example, it would be helpfull alot.
2
10,603,848
05/15/2012 15:19:17
1,180,313
01/31/2012 12:28:45
6
0
Send notification to perticular client in a room in nodeJS
I want to send a notification to a selected client among all users in a particular room. Is there anyway that i can set the client Id to the user id and later search for the user id in a particular room and send the notification. Thanks in advance
node.js
push-notification
socket.io
null
null
05/16/2012 20:56:34
too localized
Send notification to perticular client in a room in nodeJS === I want to send a notification to a selected client among all users in a particular room. Is there anyway that i can set the client Id to the user id and later search for the user id in a particular room and send the notification. Thanks in advance
3
11,319,683
07/03/2012 21:48:22
1,500,037
07/03/2012 21:35:27
1
0
Removing elements individually without effecting Add Elements function
I'm working on a project involving html/xml generated-qr codes and I want to find a solution on how to delete form elements individually without effecting the Add Elements button(adds form elements with a button). So here are the codes I have so far: '<script> $(document).ready(function() { var i=0; $(".btn").click(function addFormField(){ $('form#addf').append('<div><label class="formlb">Element '+i+':</label><input class="forment" type="text" name="ne'+i+'" id="ne'+i+'" placeholder="entry" /><a id="adv'+i+'" class="adv" data-toggle="collapse" data-target="#appr"> advanced test </a><div id="nft'+i+'" class="nft'+i+' hd collapse in"><label class="formlb">Title:</label><input class="forment" type="text" name="newtitle" placeholder="title"/></div><div id="appr" class="collapse in"><input type="text" name="entry" /><button class="abort" id="delete" onclick="removeFormField();">Delete Elements</button></div>'); i++; return true; }); }); </script> <script> $(document).ready(function() { $("button#delete").click(function removeFormField('id') { $('id').remove(); }); }); </script>' is there any way to fix this to make it work properly?
javascript
null
null
null
null
07/03/2012 21:50:08
not a real question
Removing elements individually without effecting Add Elements function === I'm working on a project involving html/xml generated-qr codes and I want to find a solution on how to delete form elements individually without effecting the Add Elements button(adds form elements with a button). So here are the codes I have so far: '<script> $(document).ready(function() { var i=0; $(".btn").click(function addFormField(){ $('form#addf').append('<div><label class="formlb">Element '+i+':</label><input class="forment" type="text" name="ne'+i+'" id="ne'+i+'" placeholder="entry" /><a id="adv'+i+'" class="adv" data-toggle="collapse" data-target="#appr"> advanced test </a><div id="nft'+i+'" class="nft'+i+' hd collapse in"><label class="formlb">Title:</label><input class="forment" type="text" name="newtitle" placeholder="title"/></div><div id="appr" class="collapse in"><input type="text" name="entry" /><button class="abort" id="delete" onclick="removeFormField();">Delete Elements</button></div>'); i++; return true; }); }); </script> <script> $(document).ready(function() { $("button#delete").click(function removeFormField('id') { $('id').remove(); }); }); </script>' is there any way to fix this to make it work properly?
1
9,560,514
03/05/2012 01:14:16
1,218,198
02/18/2012 15:08:41
46
3
Does anyone have a good tutorial in nosql with php
I am trying to get to understand nosql and how to use it with php so if anybody have a link to a tutorial that would be nice. Thanks in advance.
php
nosql
null
null
null
03/05/2012 18:20:41
not a real question
Does anyone have a good tutorial in nosql with php === I am trying to get to understand nosql and how to use it with php so if anybody have a link to a tutorial that would be nice. Thanks in advance.
1
11,749,256
07/31/2012 21:27:18
1,526,641
07/15/2012 08:17:01
1
0
I am looking for good JEE programming books
I need a recommendation about books on J2EE programming and also on developing web applications in JAVA. Thanks in advance.
java
null
null
null
null
07/31/2012 21:28:59
not a real question
I am looking for good JEE programming books === I need a recommendation about books on J2EE programming and also on developing web applications in JAVA. Thanks in advance.
1
4,991,984
02/14/2011 12:08:59
497,006
11/04/2010 09:42:01
3
0
context menu is not display in web project in flex
context menu is working well in desktop project but not display in web project...........kindly help and suggest if anyone has some suitable answer
flex
actionscript-3
null
null
null
null
open
context menu is not display in web project in flex === context menu is working well in desktop project but not display in web project...........kindly help and suggest if anyone has some suitable answer
0
10,206,295
04/18/2012 09:12:11
1,271,519
03/15/2012 12:34:54
11
3
Enable email keyboard on android for input type email
Is it possible to show email friendly keyboard on android, similar to iphone when you have a text field with input type="email".
android
email
types
input
keyboard
04/18/2012 16:03:27
not a real question
Enable email keyboard on android for input type email === Is it possible to show email friendly keyboard on android, similar to iphone when you have a text field with input type="email".
1
6,912,669
08/02/2011 13:14:25
810,220
06/22/2011 11:15:41
9
0
onPictureTaken function the light is automatically go down
I've run into such a problem. The problem is that when I use onPictureTaken function the light is automatically go down. What should I do with it? I want the light not to turn off. Photo : if (v == shot) { camera.takePicture (null, null, null, this); } flashlight: if (prefs.getBoolean (getString (R.string.torch), false)) { Parameters params = camera.getParameters (); params.setFlashMode (Parameters.FLASH_MODE_TORCH); camera.setParameters (params); }
android
camera
null
null
null
null
open
onPictureTaken function the light is automatically go down === I've run into such a problem. The problem is that when I use onPictureTaken function the light is automatically go down. What should I do with it? I want the light not to turn off. Photo : if (v == shot) { camera.takePicture (null, null, null, this); } flashlight: if (prefs.getBoolean (getString (R.string.torch), false)) { Parameters params = camera.getParameters (); params.setFlashMode (Parameters.FLASH_MODE_TORCH); camera.setParameters (params); }
0
3,989,319
10/21/2010 15:48:06
104,767
05/11/2009 12:47:30
1,922
45
Zip N IEnumerable<T>s together? Iterate over them simultaneously?
I have:- IEnumerable<IEnumerable<T>> items; and I'd like to create:- IEnumerable<IEnumerable<T>> results; where the first item in "results" is an IEnumerable of the first item of each of the IEnumerables of "items", the second item in "results" is an IEnumerable of the second item of each of "items", etc. The IEnumerables aren't necessarily the same lengths. If some of the IEnumerables in items don't have an element at a particular index, then I'd expect the matching IEnumerable in results to have fewer items in it. For example:- items = { "1", "2", "3", "4" } , { "a", "b", "c" }; results = { "1", "a" } , { "2", "b" }, { "3", "c" }, { "4" }; I don't know in advance how many sequences there are, nor how many elements are in each sequence. I might have 1,000 sequences with 1,000,000 elements in each, and I might only need the first ~10, so I'd like to use the (lazy) enumeration of the source sequences if I can. In particular I don't want to create a new data structure if I can help it. Is there a built-in method (similar to IEnumerable<T>.Zip) that can do this? Is there another way?
c#
.net
linq
null
null
null
open
Zip N IEnumerable<T>s together? Iterate over them simultaneously? === I have:- IEnumerable<IEnumerable<T>> items; and I'd like to create:- IEnumerable<IEnumerable<T>> results; where the first item in "results" is an IEnumerable of the first item of each of the IEnumerables of "items", the second item in "results" is an IEnumerable of the second item of each of "items", etc. The IEnumerables aren't necessarily the same lengths. If some of the IEnumerables in items don't have an element at a particular index, then I'd expect the matching IEnumerable in results to have fewer items in it. For example:- items = { "1", "2", "3", "4" } , { "a", "b", "c" }; results = { "1", "a" } , { "2", "b" }, { "3", "c" }, { "4" }; I don't know in advance how many sequences there are, nor how many elements are in each sequence. I might have 1,000 sequences with 1,000,000 elements in each, and I might only need the first ~10, so I'd like to use the (lazy) enumeration of the source sequences if I can. In particular I don't want to create a new data structure if I can help it. Is there a built-in method (similar to IEnumerable<T>.Zip) that can do this? Is there another way?
0
9,239,516
02/11/2012 10:35:18
647,782
03/07/2011 08:03:30
286
31
Android Inflate Exception occurred
What i have to do for this memory problem ? 02-11 15:40:30.959: E/AndroidRuntime(5108): FATAL EXCEPTION: main 02-11 15:40:30.959: E/AndroidRuntime(5108): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.firewards/com.firewards.Menu}: android.view.InflateException: Binary XML file line #122: Error inflating class <unknown> 02-11 15:40:30.959: E/AndroidRuntime(5108): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1651) 02-11 15:40:30.959: E/AndroidRuntime(5108): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1667) 02-11 15:40:30.959: E/AndroidRuntime(5108): at android.app.ActivityThread.access$1500(ActivityThread.java:117) 02-11 15:40:30.959: E/AndroidRuntime(5108): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:931) 02-11 15:40:30.959: E/AndroidRuntime(5108): at android.os.Handler.dispatchMessage(Handler.java:99) 02-11 15:40:30.959: E/AndroidRuntime(5108): at android.os.Looper.loop(Looper.java:123) 02-11 15:40:30.959: E/AndroidRuntime(5108): at android.app.ActivityThread.main(ActivityThread.java:3729) 02-11 15:40:30.959: E/AndroidRuntime(5108): at java.lang.reflect.Method.invokeNative(Native Method) 02-11 15:40:30.959: E/AndroidRuntime(5108): at java.lang.reflect.Method.invoke(Method.java:507) 02-11 15:40:30.959: E/AndroidRuntime(5108): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:874) 02-11 15:40:30.959: E/AndroidRuntime(5108): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:632) 02-11 15:40:30.959: E/AndroidRuntime(5108): at dalvik.system.NativeStart.main(Native Method) 02-11 15:40:30.959: E/AndroidRuntime(5108): Caused by: android.view.InflateException: Binary XML file line #122: Error inflating class <unknown> 02-11 15:40:30.959: E/AndroidRuntime(5108): at android.view.LayoutInflater.createView(LayoutInflater.java:518) 02-11 15:40:30.959: E/AndroidRuntime(5108): at com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:56) 02-11 15:40:30.959: E/AndroidRuntime(5108): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:568) 02-11 15:40:30.959: E/AndroidRuntime(5108): at android.view.LayoutInflater.rInflate(LayoutInflater.java:623) 02-11 15:40:30.959: E/AndroidRuntime(5108): at android.view.LayoutInflater.rInflate(LayoutInflater.java:626) 02-11 15:40:30.959: E/AndroidRuntime(5108): at android.view.LayoutInflater.rInflate(LayoutInflater.java:626) 02-11 15:40:30.959: E/AndroidRuntime(5108): at android.view.LayoutInflater.rInflate(LayoutInflater.java:626) 02-11 15:40:30.959: E/AndroidRuntime(5108): at android.view.LayoutInflater.rInflate(LayoutInflater.java:626) 02-11 15:40:30.959: E/AndroidRuntime(5108): at android.view.LayoutInflater.rInflate(LayoutInflater.java:626) 02-11 15:40:30.959: E/AndroidRuntime(5108): at android.view.LayoutInflater.inflate(LayoutInflater.java:408) 02-11 15:40:30.959: E/AndroidRuntime(5108): at android.view.LayoutInflater.inflate(LayoutInflater.java:320) 02-11 15:40:30.959: E/AndroidRuntime(5108): at android.view.LayoutInflater.inflate(LayoutInflater.java:276) 02-11 15:40:30.959: E/AndroidRuntime(5108): at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:207) 02-11 15:40:30.959: E/AndroidRuntime(5108): at android.app.Activity.setContentView(Activity.java:1657) 02-11 15:40:30.959: E/AndroidRuntime(5108): at com.firewards.Menu.onCreate(Menu.java:66) 02-11 15:40:30.959: E/AndroidRuntime(5108): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047) 02-11 15:40:30.959: E/AndroidRuntime(5108): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1615) 02-11 15:40:30.959: E/AndroidRuntime(5108): ... 11 more 02-11 15:40:30.959: E/AndroidRuntime(5108): Caused by: java.lang.reflect.InvocationTargetException 02-11 15:40:30.959: E/AndroidRuntime(5108): at java.lang.reflect.Constructor.constructNative(Native Method) 02-11 15:40:30.959: E/AndroidRuntime(5108): at java.lang.reflect.Constructor.newInstance(Constructor.java:415) 02-11 15:40:30.959: E/AndroidRuntime(5108): at android.view.LayoutInflater.createView(LayoutInflater.java:505) 02-11 15:40:30.959: E/AndroidRuntime(5108): ... 27 more 02-11 15:40:30.959: E/AndroidRuntime(5108): Caused by: java.lang.OutOfMemoryError: bitmap size exceeds VM budget 02-11 15:40:30.959: E/AndroidRuntime(5108): at android.graphics.BitmapFactory.nativeDecodeAsset(Native Method) 02-11 15:40:30.959: E/AndroidRuntime(5108): at android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:460) 02-11 15:40:30.959: E/AndroidRuntime(5108): at android.graphics.BitmapFactory.decodeResourceStream(BitmapFactory.java:336) 02-11 15:40:30.959: E/AndroidRuntime(5108): at android.graphics.drawable.Drawable.createFromResourceStream(Drawable.java:697) 02-11 15:40:30.959: E/AndroidRuntime(5108): at android.content.res.Resources.loadDrawable(Resources.java:1709) 02-11 15:40:30.959: E/AndroidRuntime(5108): at android.content.res.TypedArray.getDrawable(TypedArray.java:601) 02-11 15:40:30.959: E/AndroidRuntime(5108): at android.view.View.<init>(View.java:1951) 02-11 15:40:30.959: E/AndroidRuntime(5108): at android.widget.ImageView.<init>(ImageView.java:112) 02-11 15:40:30.959: E/AndroidRuntime(5108): at android.widget.ImageButton.<init>(ImageButton.java:85) 02-11 15:40:30.959: E/AndroidRuntime(5108): at android.widget.ImageButton.<init>(ImageButton.java:81) 02-11 15:40:30.959: E/AndroidRuntime(5108): ... 30 more
android
memory
null
null
null
null
open
Android Inflate Exception occurred === What i have to do for this memory problem ? 02-11 15:40:30.959: E/AndroidRuntime(5108): FATAL EXCEPTION: main 02-11 15:40:30.959: E/AndroidRuntime(5108): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.firewards/com.firewards.Menu}: android.view.InflateException: Binary XML file line #122: Error inflating class <unknown> 02-11 15:40:30.959: E/AndroidRuntime(5108): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1651) 02-11 15:40:30.959: E/AndroidRuntime(5108): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1667) 02-11 15:40:30.959: E/AndroidRuntime(5108): at android.app.ActivityThread.access$1500(ActivityThread.java:117) 02-11 15:40:30.959: E/AndroidRuntime(5108): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:931) 02-11 15:40:30.959: E/AndroidRuntime(5108): at android.os.Handler.dispatchMessage(Handler.java:99) 02-11 15:40:30.959: E/AndroidRuntime(5108): at android.os.Looper.loop(Looper.java:123) 02-11 15:40:30.959: E/AndroidRuntime(5108): at android.app.ActivityThread.main(ActivityThread.java:3729) 02-11 15:40:30.959: E/AndroidRuntime(5108): at java.lang.reflect.Method.invokeNative(Native Method) 02-11 15:40:30.959: E/AndroidRuntime(5108): at java.lang.reflect.Method.invoke(Method.java:507) 02-11 15:40:30.959: E/AndroidRuntime(5108): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:874) 02-11 15:40:30.959: E/AndroidRuntime(5108): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:632) 02-11 15:40:30.959: E/AndroidRuntime(5108): at dalvik.system.NativeStart.main(Native Method) 02-11 15:40:30.959: E/AndroidRuntime(5108): Caused by: android.view.InflateException: Binary XML file line #122: Error inflating class <unknown> 02-11 15:40:30.959: E/AndroidRuntime(5108): at android.view.LayoutInflater.createView(LayoutInflater.java:518) 02-11 15:40:30.959: E/AndroidRuntime(5108): at com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:56) 02-11 15:40:30.959: E/AndroidRuntime(5108): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:568) 02-11 15:40:30.959: E/AndroidRuntime(5108): at android.view.LayoutInflater.rInflate(LayoutInflater.java:623) 02-11 15:40:30.959: E/AndroidRuntime(5108): at android.view.LayoutInflater.rInflate(LayoutInflater.java:626) 02-11 15:40:30.959: E/AndroidRuntime(5108): at android.view.LayoutInflater.rInflate(LayoutInflater.java:626) 02-11 15:40:30.959: E/AndroidRuntime(5108): at android.view.LayoutInflater.rInflate(LayoutInflater.java:626) 02-11 15:40:30.959: E/AndroidRuntime(5108): at android.view.LayoutInflater.rInflate(LayoutInflater.java:626) 02-11 15:40:30.959: E/AndroidRuntime(5108): at android.view.LayoutInflater.rInflate(LayoutInflater.java:626) 02-11 15:40:30.959: E/AndroidRuntime(5108): at android.view.LayoutInflater.inflate(LayoutInflater.java:408) 02-11 15:40:30.959: E/AndroidRuntime(5108): at android.view.LayoutInflater.inflate(LayoutInflater.java:320) 02-11 15:40:30.959: E/AndroidRuntime(5108): at android.view.LayoutInflater.inflate(LayoutInflater.java:276) 02-11 15:40:30.959: E/AndroidRuntime(5108): at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:207) 02-11 15:40:30.959: E/AndroidRuntime(5108): at android.app.Activity.setContentView(Activity.java:1657) 02-11 15:40:30.959: E/AndroidRuntime(5108): at com.firewards.Menu.onCreate(Menu.java:66) 02-11 15:40:30.959: E/AndroidRuntime(5108): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047) 02-11 15:40:30.959: E/AndroidRuntime(5108): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1615) 02-11 15:40:30.959: E/AndroidRuntime(5108): ... 11 more 02-11 15:40:30.959: E/AndroidRuntime(5108): Caused by: java.lang.reflect.InvocationTargetException 02-11 15:40:30.959: E/AndroidRuntime(5108): at java.lang.reflect.Constructor.constructNative(Native Method) 02-11 15:40:30.959: E/AndroidRuntime(5108): at java.lang.reflect.Constructor.newInstance(Constructor.java:415) 02-11 15:40:30.959: E/AndroidRuntime(5108): at android.view.LayoutInflater.createView(LayoutInflater.java:505) 02-11 15:40:30.959: E/AndroidRuntime(5108): ... 27 more 02-11 15:40:30.959: E/AndroidRuntime(5108): Caused by: java.lang.OutOfMemoryError: bitmap size exceeds VM budget 02-11 15:40:30.959: E/AndroidRuntime(5108): at android.graphics.BitmapFactory.nativeDecodeAsset(Native Method) 02-11 15:40:30.959: E/AndroidRuntime(5108): at android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:460) 02-11 15:40:30.959: E/AndroidRuntime(5108): at android.graphics.BitmapFactory.decodeResourceStream(BitmapFactory.java:336) 02-11 15:40:30.959: E/AndroidRuntime(5108): at android.graphics.drawable.Drawable.createFromResourceStream(Drawable.java:697) 02-11 15:40:30.959: E/AndroidRuntime(5108): at android.content.res.Resources.loadDrawable(Resources.java:1709) 02-11 15:40:30.959: E/AndroidRuntime(5108): at android.content.res.TypedArray.getDrawable(TypedArray.java:601) 02-11 15:40:30.959: E/AndroidRuntime(5108): at android.view.View.<init>(View.java:1951) 02-11 15:40:30.959: E/AndroidRuntime(5108): at android.widget.ImageView.<init>(ImageView.java:112) 02-11 15:40:30.959: E/AndroidRuntime(5108): at android.widget.ImageButton.<init>(ImageButton.java:85) 02-11 15:40:30.959: E/AndroidRuntime(5108): at android.widget.ImageButton.<init>(ImageButton.java:81) 02-11 15:40:30.959: E/AndroidRuntime(5108): ... 30 more
0
254,152
10/31/2008 16:41:28
14,673
09/17/2008 01:55:17
81
5
How NULLs are stored into a database ?
I'm curious to know how NULLs are stored into a database ? It surely depends on the database server but I would like to have an general idea about it. *** First try: Suppose that the server put a undefined value (could be anything) into the field for a NULL value. Could you be very lucky and retrieve the NULL value with ...WHERE field = 'the undefined value (remember, could be anything...)' *** Second try: Does the server have a flag or any meta-data somewhere to indicate this field is NULL ? Then the server must read this meta data to verify the field. If the meta-data indicates a NULL value and if the query doesn't have "field IS NULL", then the record is ignored. *** It seems too easy...
null
database
value
nullvalue
null
null
open
How NULLs are stored into a database ? === I'm curious to know how NULLs are stored into a database ? It surely depends on the database server but I would like to have an general idea about it. *** First try: Suppose that the server put a undefined value (could be anything) into the field for a NULL value. Could you be very lucky and retrieve the NULL value with ...WHERE field = 'the undefined value (remember, could be anything...)' *** Second try: Does the server have a flag or any meta-data somewhere to indicate this field is NULL ? Then the server must read this meta data to verify the field. If the meta-data indicates a NULL value and if the query doesn't have "field IS NULL", then the record is ignored. *** It seems too easy...
0
2,226,897
02/09/2010 05:13:48
264,843
02/02/2010 23:58:44
173
0
Open panel appears then disappears immediately
I am using this code: NSOpenPanel *openPanel = [NSOpenPanel openPanel]; [openPanel beginForDirectory:nil file:nil types:[NSImage imageFileTypes] modelessDelegate:self didEndSelector:NULL contextInfo:NULL]; This is the only code in the method. When the method is called, the open panel appears on-screen for a second then disappears. How do I prevent this? Thanks.
cocoa
objective-c
appkit
xcode
null
null
open
Open panel appears then disappears immediately === I am using this code: NSOpenPanel *openPanel = [NSOpenPanel openPanel]; [openPanel beginForDirectory:nil file:nil types:[NSImage imageFileTypes] modelessDelegate:self didEndSelector:NULL contextInfo:NULL]; This is the only code in the method. When the method is called, the open panel appears on-screen for a second then disappears. How do I prevent this? Thanks.
0
11,539,277
07/18/2012 10:27:21
1,534,427
07/18/2012 10:17:53
1
0
AIR HTMLLoader, loaded swf full screen no interactive
When I load webpage into AIR's mx:HTML component, and webpage contains flash with full screen option, after going full screen nothing happens no interaction with object. The most strange thing is if I load swf with simple 'full screen app' with 1 or 2 objects on stage, it works perfect, but if loaded something like game app, it does not...
actionscript-3
flex
air
fullscreen
null
null
open
AIR HTMLLoader, loaded swf full screen no interactive === When I load webpage into AIR's mx:HTML component, and webpage contains flash with full screen option, after going full screen nothing happens no interaction with object. The most strange thing is if I load swf with simple 'full screen app' with 1 or 2 objects on stage, it works perfect, but if loaded something like game app, it does not...
0
6,735,807
07/18/2011 16:02:51
565,635
01/06/2011 15:21:05
7,962
369
Writing a programming language
#Disclaimer: Yes I know this will take 3 years, at least. I am looking forward to writing a new interpreted programming language. I have a quite solid idea of what I want in terms of dynamicness, syntax, object model, etc, etc. Now that I have the idea, I have a few questions before I start: 1. Should I begin writing the full specification and then implement, or write them both all along? 2. I'm still doubting between C and C++. C++ would allow for more clean design and faster development while C would (maybe) ensure portability to more platforms (microprocessors?). Performance is a must. 3. Should I try to interest people for the project before the first working prototype so they can cooperate (the end product will be a liberal license anyway), or keep working alone until I have something that runs? 4. How modular should it be? I am sure that I won't immediately start working on a bytecode interpreter but something easier to implement but slower thing first, so modularity is a must in order to be able to extend later, but I guess overdoing it will hamper performance and clearity.
programming-languages
null
null
null
null
07/18/2011 18:42:18
off topic
Writing a programming language === #Disclaimer: Yes I know this will take 3 years, at least. I am looking forward to writing a new interpreted programming language. I have a quite solid idea of what I want in terms of dynamicness, syntax, object model, etc, etc. Now that I have the idea, I have a few questions before I start: 1. Should I begin writing the full specification and then implement, or write them both all along? 2. I'm still doubting between C and C++. C++ would allow for more clean design and faster development while C would (maybe) ensure portability to more platforms (microprocessors?). Performance is a must. 3. Should I try to interest people for the project before the first working prototype so they can cooperate (the end product will be a liberal license anyway), or keep working alone until I have something that runs? 4. How modular should it be? I am sure that I won't immediately start working on a bytecode interpreter but something easier to implement but slower thing first, so modularity is a must in order to be able to extend later, but I guess overdoing it will hamper performance and clearity.
2
7,841,085
10/20/2011 19:21:21
407,236
07/31/2010 00:57:36
1,170
8
Suggestion needed for package names
I have a couple of packages I have trouble naming. - This package contains classes and interfaces for communicating with external servers through client software. The external servers are not part of our system, but required for daily operations. - This package contains classes and interfaces that import and export data. Any suggestions?
java
naming
null
null
null
10/26/2011 14:06:01
not constructive
Suggestion needed for package names === I have a couple of packages I have trouble naming. - This package contains classes and interfaces for communicating with external servers through client software. The external servers are not part of our system, but required for daily operations. - This package contains classes and interfaces that import and export data. Any suggestions?
4
10,140,022
04/13/2012 11:33:27
510,746
11/17/2010 12:10:22
58
1
When traverse a HashMap, I get NullPointerException
This is my code: HashMap<String, HashSet<String>> map; .... for(Map.Entry<String, HashSet<String>> entry : map.entrySet()) { } And I get the exception: **Exception in thread "main" java.lang.NullPointerException at key.test.EnwikiOutlink.main(EnwikiOutlink.java:68)** The map object has more than 10,000 map objects, I run it in server machine and couldn't debug. But when I decrease the size of this map(under 10,000), program runs ok. What's the reason of the problem, and the solution? Thanks!
java
map
null
null
null
04/14/2012 20:09:38
not a real question
When traverse a HashMap, I get NullPointerException === This is my code: HashMap<String, HashSet<String>> map; .... for(Map.Entry<String, HashSet<String>> entry : map.entrySet()) { } And I get the exception: **Exception in thread "main" java.lang.NullPointerException at key.test.EnwikiOutlink.main(EnwikiOutlink.java:68)** The map object has more than 10,000 map objects, I run it in server machine and couldn't debug. But when I decrease the size of this map(under 10,000), program runs ok. What's the reason of the problem, and the solution? Thanks!
1
2,839,660
05/15/2010 09:52:32
192,339
10/19/2009 09:55:26
19
2
Is there an easy way to convert autocad polygons to adobe swf format?
I am looking for a easy way to convert Autocad polygons to swf files. Is there a converter for that? Or is there an intermediatory format that can be used to convert from polygons to the adobe flash swfs. Each polygon would be a swf file.
autocad
flash
swf
dwg
null
null
open
Is there an easy way to convert autocad polygons to adobe swf format? === I am looking for a easy way to convert Autocad polygons to swf files. Is there a converter for that? Or is there an intermediatory format that can be used to convert from polygons to the adobe flash swfs. Each polygon would be a swf file.
0
4,752,838
01/20/2011 21:30:53
583,633
01/20/2011 21:30:53
1
0
Dynamic Manifest File for "android_secret_code"
Hi I'm following http://android.amberfog.com/?p=422 to start an activity by a secret code using below code: <action android:name="android.provider.Telephony.SECRET_CODE" /> <data android:scheme="android_secret_code" android:host="4636" /> What I would like to do is to have an option in the application itself, where the user can change the secret code to something they wish. So as a default, user presses *#*#4636#*#* to get into application, and when user changes to some other code, say 5555, for the next launch it uses 5555 to launch application. Are there anyways to do this? I first thought about getting this code from strings.xml, but then I realized that I can't change the resources in strings.xml in runtime. I, then, thought about putting this value into sqllite database or to shared preference, but I am not sure if I can pull this value back to manifest. Are there any good ideas to do this? I could also not use secret_code, but when user calls certain number (say 33334) then the application launch. Then user can change this number in the application. If this is possible, I can cope with this way too. I know the above is possible in Shady_SMS but not sure how this application handled this.
android
dynamic
manifest
secret
null
null
open
Dynamic Manifest File for "android_secret_code" === Hi I'm following http://android.amberfog.com/?p=422 to start an activity by a secret code using below code: <action android:name="android.provider.Telephony.SECRET_CODE" /> <data android:scheme="android_secret_code" android:host="4636" /> What I would like to do is to have an option in the application itself, where the user can change the secret code to something they wish. So as a default, user presses *#*#4636#*#* to get into application, and when user changes to some other code, say 5555, for the next launch it uses 5555 to launch application. Are there anyways to do this? I first thought about getting this code from strings.xml, but then I realized that I can't change the resources in strings.xml in runtime. I, then, thought about putting this value into sqllite database or to shared preference, but I am not sure if I can pull this value back to manifest. Are there any good ideas to do this? I could also not use secret_code, but when user calls certain number (say 33334) then the application launch. Then user can change this number in the application. If this is possible, I can cope with this way too. I know the above is possible in Shady_SMS but not sure how this application handled this.
0
5,327,840
03/16/2011 15:47:55
662,803
03/16/2011 15:47:55
1
0
Finding the set of words that can be spelled with a given set of letters
The problem I'm facing is to create an efficient algorithm that returns the list of words from a fixed word list that can be spelled by using a certain set of letters (this set being the input), with this set having no upper bound (or no useful one at least). More specifically, this algorithm needs to provide solutions in real time for a constantly augmenting input, though the output can be streamed out slowly as long as the first few output elements come out relatively quickly. **Note: the input's real augmentation occurs only in the form of adding on to the existing set. When a word is chosen, the LetterStock is depleted of all the letters used and the algorithm is run from scratch again. The set of possible characters are the 26 standard roman letters. The stock of each letter can be anywhere from 0->infinity (for all intensive purposes) and each letter can only be used once (e.g. a,b,l will not return "ball", though a,bb,d,lll will) The word list being worked with is constant, so if any pre-calculated hashing solution would be useful to speed up runtime performance, that is an option (though I cannot think of a good way to do this). However, the word list is large (~40,000 elements). Thus far, the best algorithm I've devised involves iterating through the whole set of words using a copy of the letter stock array and checking each word letter-by-letter, depleting the copy stock and seeing if any letter goes below 0. If so, I move on, if not and I reach the end of the word, I add the word to the solution set. After going through the whole set of words, I start from the beginning again looking for words that I can spell now that 1 or more character have been added to my LetterStock. // Pass in the string and a copy of the LetterStock 26-entry array bool canBeSpelled(string str, int *letterStock) { for(int i=0; i<str.length; i++) { letterStock[str[i]-65]--; // deplete the letter stock for the given letter if(letterStock[str[i]-65] < 0) return false; } return true; } My question thus is: Is this implementation optimal and if not, what is a better one?
c#
java
c++
regex
real-time
null
open
Finding the set of words that can be spelled with a given set of letters === The problem I'm facing is to create an efficient algorithm that returns the list of words from a fixed word list that can be spelled by using a certain set of letters (this set being the input), with this set having no upper bound (or no useful one at least). More specifically, this algorithm needs to provide solutions in real time for a constantly augmenting input, though the output can be streamed out slowly as long as the first few output elements come out relatively quickly. **Note: the input's real augmentation occurs only in the form of adding on to the existing set. When a word is chosen, the LetterStock is depleted of all the letters used and the algorithm is run from scratch again. The set of possible characters are the 26 standard roman letters. The stock of each letter can be anywhere from 0->infinity (for all intensive purposes) and each letter can only be used once (e.g. a,b,l will not return "ball", though a,bb,d,lll will) The word list being worked with is constant, so if any pre-calculated hashing solution would be useful to speed up runtime performance, that is an option (though I cannot think of a good way to do this). However, the word list is large (~40,000 elements). Thus far, the best algorithm I've devised involves iterating through the whole set of words using a copy of the letter stock array and checking each word letter-by-letter, depleting the copy stock and seeing if any letter goes below 0. If so, I move on, if not and I reach the end of the word, I add the word to the solution set. After going through the whole set of words, I start from the beginning again looking for words that I can spell now that 1 or more character have been added to my LetterStock. // Pass in the string and a copy of the LetterStock 26-entry array bool canBeSpelled(string str, int *letterStock) { for(int i=0; i<str.length; i++) { letterStock[str[i]-65]--; // deplete the letter stock for the given letter if(letterStock[str[i]-65] < 0) return false; } return true; } My question thus is: Is this implementation optimal and if not, what is a better one?
0
5,687,173
04/16/2011 14:30:31
506,374
11/13/2010 00:02:51
3
0
php GD problem, black image created
i'v been pulling my hair over this for a couple of hours now, i am working on an image cropping module for magento, it works fine on my localhost but when i upload the file online it doesn't work! gd creates a black image. i'v tried everything.. checked permission, file paths, and it doesn't show any errors.. here is the code that creates the image <?php $id = $_GET['id']; $crop = $_GET['crop']; $token = $_GET['token']; if ($id !== '' && $crop !== '') { $crop = explode(":", $crop); $product = Mage::getModel('catalog/product')->load($id); $file = $product->getMediaConfig()->getMediaUrl($product->getImage()); $src = $file; $targ_w = $crop[0]; $targ_h = $crop[1]; $img_r = imagecreatefromjpeg($src); $dst_r = imagecreatetruecolor( $crop[6], $crop[7] ); imagecopyresampled($dst_r,$img_r, 0,0, $crop[2],$crop[3], $crop[6],$crop[7], $crop[6],$crop[7]); $dir = '../truecolor/images/'.$id.'/test/'; if (!file_exists($dir)) { mkdir($dir, 0777); } $filename = '../truecolor/images/'.$id.'/test/sw_'.$id.'.jpg'; if (file_exists($filename)) { unlink($filename); } imagejpeg($dst_r,$filename,100); ?> would really appreciate any help with this..
php
magento
gd
null
null
null
open
php GD problem, black image created === i'v been pulling my hair over this for a couple of hours now, i am working on an image cropping module for magento, it works fine on my localhost but when i upload the file online it doesn't work! gd creates a black image. i'v tried everything.. checked permission, file paths, and it doesn't show any errors.. here is the code that creates the image <?php $id = $_GET['id']; $crop = $_GET['crop']; $token = $_GET['token']; if ($id !== '' && $crop !== '') { $crop = explode(":", $crop); $product = Mage::getModel('catalog/product')->load($id); $file = $product->getMediaConfig()->getMediaUrl($product->getImage()); $src = $file; $targ_w = $crop[0]; $targ_h = $crop[1]; $img_r = imagecreatefromjpeg($src); $dst_r = imagecreatetruecolor( $crop[6], $crop[7] ); imagecopyresampled($dst_r,$img_r, 0,0, $crop[2],$crop[3], $crop[6],$crop[7], $crop[6],$crop[7]); $dir = '../truecolor/images/'.$id.'/test/'; if (!file_exists($dir)) { mkdir($dir, 0777); } $filename = '../truecolor/images/'.$id.'/test/sw_'.$id.'.jpg'; if (file_exists($filename)) { unlink($filename); } imagejpeg($dst_r,$filename,100); ?> would really appreciate any help with this..
0
7,066,669
08/15/2011 15:12:11
299,785
03/23/2010 10:21:49
93
3
Boost lock() analog
For my cross-thread application i start to use boost. And i can't understand HOW i can implement code to reproduce behavior of standard critical section in Win32API or .net lock analog? I want to write method Foo(), whose can be called from different threads(#1!), to control write operations to a shared fields. But critical section implementation should allow recursive call(#2!) of him self (Foo() -> Foo()). in C# this implementation is very very simple object _synch = new object(); void Foo() { lock (_synch) // one thread can't be lock by him self, but another threads must wait untill { // do some works if (...) { Foo(); } } }
c++
multithreading
boost
synchronization
critical-section
null
open
Boost lock() analog === For my cross-thread application i start to use boost. And i can't understand HOW i can implement code to reproduce behavior of standard critical section in Win32API or .net lock analog? I want to write method Foo(), whose can be called from different threads(#1!), to control write operations to a shared fields. But critical section implementation should allow recursive call(#2!) of him self (Foo() -> Foo()). in C# this implementation is very very simple object _synch = new object(); void Foo() { lock (_synch) // one thread can't be lock by him self, but another threads must wait untill { // do some works if (...) { Foo(); } } }
0
4,756,022
01/21/2011 06:26:51
579,452
01/18/2011 05:31:36
1
0
Best books/sites/blogs to learn DataStructures and Algorithms as a starting level?????
Could you please, can any one tell me the best books/sites/blogs to learn DataStructures and Algorithms as a starting level? Thanks in advance.
data-structures
null
null
null
null
07/18/2012 10:09:57
not constructive
Best books/sites/blogs to learn DataStructures and Algorithms as a starting level????? === Could you please, can any one tell me the best books/sites/blogs to learn DataStructures and Algorithms as a starting level? Thanks in advance.
4
6,812,631
07/25/2011 06:52:40
861,020
07/25/2011 06:41:40
1
0
HTML with PHP and FPDF, how to embed dynamic PDFs?
I have a website that dynamically generates PDFs using FPDF (from fpdf.org) based on an HTML form passed to a PHP script. As of right now, it all works fine to the point where the information passes through and the FPDF generates the PDF. However, I've been looking into embedding options and can't quite get it to work properly. I have other areas of my page that embed PDFs, but they are ones that I generate and save to the server. My question is, is it possible to dynamically generate a PDF and output it directly to the browser ($pdf->Output();) inside an emedded area of an HTML page? Right now it just generates and takes up the entire window, but I would like to include other information along with the PDF, such as instructions and what not. I attempted to output the pdf as a string into a variable, via: $output = $pdf->Output('','S'); This did output the information as a string into the $output variable; however, I wasn't sure if I was able to embed that. I tried specifying a MIME type (as application/pdf), but the only other available attribute is "src", so I wasn't sure if I could use the string anywhere. I have used 2 different techniques for embedding PDFs in the past. <embed> tags and an <iframe> with google document viewer, but after toying with them for a while, I wasn't able to get this to work =( Anyone have any ideas?
php
html
pdf-generation
embed
fpdf
null
open
HTML with PHP and FPDF, how to embed dynamic PDFs? === I have a website that dynamically generates PDFs using FPDF (from fpdf.org) based on an HTML form passed to a PHP script. As of right now, it all works fine to the point where the information passes through and the FPDF generates the PDF. However, I've been looking into embedding options and can't quite get it to work properly. I have other areas of my page that embed PDFs, but they are ones that I generate and save to the server. My question is, is it possible to dynamically generate a PDF and output it directly to the browser ($pdf->Output();) inside an emedded area of an HTML page? Right now it just generates and takes up the entire window, but I would like to include other information along with the PDF, such as instructions and what not. I attempted to output the pdf as a string into a variable, via: $output = $pdf->Output('','S'); This did output the information as a string into the $output variable; however, I wasn't sure if I was able to embed that. I tried specifying a MIME type (as application/pdf), but the only other available attribute is "src", so I wasn't sure if I could use the string anywhere. I have used 2 different techniques for embedding PDFs in the past. <embed> tags and an <iframe> with google document viewer, but after toying with them for a while, I wasn't able to get this to work =( Anyone have any ideas?
0
3,767,742
09/22/2010 09:05:14
454,840
09/22/2010 09:05:14
1
0
please help me with this
i want to send a file using c in an adhoc network in mt linux platform...plz help me with the header files and functions that i need to use
c
null
null
null
null
09/22/2010 11:00:23
not a real question
please help me with this === i want to send a file using c in an adhoc network in mt linux platform...plz help me with the header files and functions that i need to use
1
10,784,016
05/28/2012 11:34:37
1,034,801
11/08/2011 01:51:54
79
0
Increase/Decrease a textfield value using PHP
I have a reservation system and I allow guest to input # of room in a textfield. I want to know if the room is still available after he/she enter in the textbox using PHP. I am thinking about two buttons with negative(-) and positive (+) value. But I don't want to reload the page because of this. I am thinking about Ajax/jQuery to do this. Is there any sample you can provide? Thank you
php
jquery
ajax
null
null
05/28/2012 11:45:10
not a real question
Increase/Decrease a textfield value using PHP === I have a reservation system and I allow guest to input # of room in a textfield. I want to know if the room is still available after he/she enter in the textbox using PHP. I am thinking about two buttons with negative(-) and positive (+) value. But I don't want to reload the page because of this. I am thinking about Ajax/jQuery to do this. Is there any sample you can provide? Thank you
1
9,701,888
03/14/2012 12:22:09
1,268,726
03/14/2012 10:30:10
1
0
Good OO implemented newsletter solution, PHP based (free or onetime fee for source code)?
we are using Malchimp for handling our newsletters. But we need more (specific) features, then its offering. So we decided to develop required features (whole new solution) and run it by ourself. But for sure we don't want start from zero and reinventing wheel. Thus we are looking for some already existing newsletter solution, similar to Malchimp (based on features), which we will be able to use as basement for our new system. Therefore it can be some open/free project or some commercial, which allowing to buy license and after to modify codes for our needs. My question is, if you know about some project/solution, which will met following list of criteria: - PHP/MySQL based - free or one time purchase fee for source codes - good OO implementation (for easy modification/rework) - features for instance like A/B split testing, open/click tracking, bounce handling, subs./unsubs. handling, templates, groups/segmentation, statistics, etc. - (able to handle up to 1M email addresses, up to 100k emails/hour) - projects like phpList, tellmatic, pommo are NOT suitable So do you know, or have directly expirience with some another projects/commercial solutions? We found interesting for exmaple commercial solutions like - nuevomailer.com - mailmachinepro.com - mailing-manager.com but we would like to know quality of source code before purchase. Or ideally to have some recommendation from some1 of you based on yours expirience. Thanks for any reply.
php
email
projects-and-solutions
newsletter
null
03/14/2012 17:30:59
not constructive
Good OO implemented newsletter solution, PHP based (free or onetime fee for source code)? === we are using Malchimp for handling our newsletters. But we need more (specific) features, then its offering. So we decided to develop required features (whole new solution) and run it by ourself. But for sure we don't want start from zero and reinventing wheel. Thus we are looking for some already existing newsletter solution, similar to Malchimp (based on features), which we will be able to use as basement for our new system. Therefore it can be some open/free project or some commercial, which allowing to buy license and after to modify codes for our needs. My question is, if you know about some project/solution, which will met following list of criteria: - PHP/MySQL based - free or one time purchase fee for source codes - good OO implementation (for easy modification/rework) - features for instance like A/B split testing, open/click tracking, bounce handling, subs./unsubs. handling, templates, groups/segmentation, statistics, etc. - (able to handle up to 1M email addresses, up to 100k emails/hour) - projects like phpList, tellmatic, pommo are NOT suitable So do you know, or have directly expirience with some another projects/commercial solutions? We found interesting for exmaple commercial solutions like - nuevomailer.com - mailmachinepro.com - mailing-manager.com but we would like to know quality of source code before purchase. Or ideally to have some recommendation from some1 of you based on yours expirience. Thanks for any reply.
4
5,713,183
04/19/2011 07:47:21
690,067
04/03/2011 17:51:17
1
0
basic fetching of a url's html body with python 3.x
I'm a Python newbie. I have been a little confused by the differences between the old urllib and urllib2 in Python 2.x and the new urllib in Python 3, and among other things I'm not sure when data needs to be encoded before being sent to urlopen. I have been trying to fetch the html body of a url, using a POST so that I can send parameters. The webpage displays sunshine data for a country over a particular hour of a given day. I have tried without encoding/decoding and the printout is a string of bytes with b at the beginning. The code I then tried was import urllib.request, urllib.parse, urllib.error def scrape(someurl): try: values = {'LANG': 'en', 'DATE' : '1303160400', 'CONT' : 'euro', 'LAND' : 'UK', 'KEY' : 'UK', 'SORT': '2', 'INT' : '06', 'TYPE' : 'sonnestd', 'ART' : 'karte', 'RUBRIK' : 'akt', 'R': '310', 'CEL': 'C'} data = urllib.parse.urlencode(values) data = data.encode("utf-8") response = urllib.request.urlopen(someurl, data) html = response.read().decode("utf-8") print(html) except urllib.error.HTTPError as e: print(e.code) print(e.read()) myscrape = scrape("http://www.weatheronline.co.uk/weather/maps/current") The error is Traceback (most recent call last): File "/Users/Me/Desktop/weather.py", line 57, in <module> myscrape = scrape("http://www.weatheronline.co.uk/weather/maps/current") File "/Users/Me/Desktop/weather.py", line 37, in scrape html = response.read().decode("utf-8") UnicodeDecodeError: 'utf8' codec can't decode byte 0x80 in position 10: invalid start byte Without encoding/decoding I get a suspiciously short string of bytes anyway, so I wonder whether the request is failing in some other way b'GIF89a\x01\x00\x01\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00!\xf9\x04\x01\x00\x00\x00\x00,\x00\x00\x00\x00\x01\x00\x01\x00\x00\x02\x02D\x01\x00;'
python
url
urllib2
fetching
null
null
open
basic fetching of a url's html body with python 3.x === I'm a Python newbie. I have been a little confused by the differences between the old urllib and urllib2 in Python 2.x and the new urllib in Python 3, and among other things I'm not sure when data needs to be encoded before being sent to urlopen. I have been trying to fetch the html body of a url, using a POST so that I can send parameters. The webpage displays sunshine data for a country over a particular hour of a given day. I have tried without encoding/decoding and the printout is a string of bytes with b at the beginning. The code I then tried was import urllib.request, urllib.parse, urllib.error def scrape(someurl): try: values = {'LANG': 'en', 'DATE' : '1303160400', 'CONT' : 'euro', 'LAND' : 'UK', 'KEY' : 'UK', 'SORT': '2', 'INT' : '06', 'TYPE' : 'sonnestd', 'ART' : 'karte', 'RUBRIK' : 'akt', 'R': '310', 'CEL': 'C'} data = urllib.parse.urlencode(values) data = data.encode("utf-8") response = urllib.request.urlopen(someurl, data) html = response.read().decode("utf-8") print(html) except urllib.error.HTTPError as e: print(e.code) print(e.read()) myscrape = scrape("http://www.weatheronline.co.uk/weather/maps/current") The error is Traceback (most recent call last): File "/Users/Me/Desktop/weather.py", line 57, in <module> myscrape = scrape("http://www.weatheronline.co.uk/weather/maps/current") File "/Users/Me/Desktop/weather.py", line 37, in scrape html = response.read().decode("utf-8") UnicodeDecodeError: 'utf8' codec can't decode byte 0x80 in position 10: invalid start byte Without encoding/decoding I get a suspiciously short string of bytes anyway, so I wonder whether the request is failing in some other way b'GIF89a\x01\x00\x01\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00!\xf9\x04\x01\x00\x00\x00\x00,\x00\x00\x00\x00\x01\x00\x01\x00\x00\x02\x02D\x01\x00;'
0
10,730,177
05/24/2012 01:57:45
1,337,444
04/16/2012 23:11:15
1
0
SQL srever join unrelated tables
i have two unrelaled table: PEOPLE table: NAME | AGE ---------- DAVE | 43 ANNE | 25 MIKE | 58 PLACES table: COUNTRY | TOWN ---------------- USA | WILMINGTON GER | BERLIN POR | LISBON JPN | KYOTO I want a Result like this: NAME | AGE | COUNTRY | TOWN ----------------------------- ANNE | 25 | GER | BERLIN DAVE | 43 | JPN | KYOTO MIKE | 58 | POR | LISBON | USA | WILMINGTON
sql
sql-server
tsql
sql-server-2005
null
05/24/2012 11:21:04
not a real question
SQL srever join unrelated tables === i have two unrelaled table: PEOPLE table: NAME | AGE ---------- DAVE | 43 ANNE | 25 MIKE | 58 PLACES table: COUNTRY | TOWN ---------------- USA | WILMINGTON GER | BERLIN POR | LISBON JPN | KYOTO I want a Result like this: NAME | AGE | COUNTRY | TOWN ----------------------------- ANNE | 25 | GER | BERLIN DAVE | 43 | JPN | KYOTO MIKE | 58 | POR | LISBON | USA | WILMINGTON
1
6,368,131
06/16/2011 06:53:56
788,711
06/08/2011 07:02:38
1
0
STL Map as a default arguement.
How to pass stl map as a default arguement?
c++
stl
null
null
null
06/16/2011 08:41:30
not a real question
STL Map as a default arguement. === How to pass stl map as a default arguement?
1
4,901,283
02/04/2011 17:57:30
548,744
12/20/2010 14:28:13
81
6
Anything else like Skybound Stylizer out there?
I hate to say it but I'm crack addicted to [Sybound Stylizer 5][1] It's a rare purchase for me because I normally only go with open-source or software that has 'per user' licensing. The license and DRM on this thing are horrid. It does a hardware check (including a check for the existance of a battery) and only lets you install on one laptop and one desktop. Of course, I've got a work desktop and laptop as well as a two home desktops and two home laptops. I'd love to use the thing at home but there's no way I'm going to pay for another seperate license when I'm just one guy with mutliple machines no one else uses but me. Aside from my loathing of the license type and DRM, the $79 price seems reasonable (no problem there). I've tried searching for hours and can't find another css editor that visually works on the rendered pages. I'm using Rails and the whole Stylizer concept of being a multi-engine web browser that lets you target elements on the rendered page is a life saver. Nothing else I've seen would really add any benifit above Rubymines CSS editing (which btw - thank you for the per-user license Jetbrains). If someone else had something similiar, I'd gladly pay twice the price for a per-user license. Funny - I'd be happy paying $150 for a per user license, but the thought of paying for two $79 license because (my gosh) I use two different laptops annoys the crap out of me. Thanks! [1]: http://www.skybound.ca/
css
null
null
null
null
12/21/2011 04:33:30
not constructive
Anything else like Skybound Stylizer out there? === I hate to say it but I'm crack addicted to [Sybound Stylizer 5][1] It's a rare purchase for me because I normally only go with open-source or software that has 'per user' licensing. The license and DRM on this thing are horrid. It does a hardware check (including a check for the existance of a battery) and only lets you install on one laptop and one desktop. Of course, I've got a work desktop and laptop as well as a two home desktops and two home laptops. I'd love to use the thing at home but there's no way I'm going to pay for another seperate license when I'm just one guy with mutliple machines no one else uses but me. Aside from my loathing of the license type and DRM, the $79 price seems reasonable (no problem there). I've tried searching for hours and can't find another css editor that visually works on the rendered pages. I'm using Rails and the whole Stylizer concept of being a multi-engine web browser that lets you target elements on the rendered page is a life saver. Nothing else I've seen would really add any benifit above Rubymines CSS editing (which btw - thank you for the per-user license Jetbrains). If someone else had something similiar, I'd gladly pay twice the price for a per-user license. Funny - I'd be happy paying $150 for a per user license, but the thought of paying for two $79 license because (my gosh) I use two different laptops annoys the crap out of me. Thanks! [1]: http://www.skybound.ca/
4
7,292,287
09/03/2011 09:28:09
396,732
07/20/2010 11:39:44
644
17
What will probably be the biggest changes (losses) switching from Seam 2 to plain JavaEE 6?
Question pretty much says it all, though explicitly I'm looking for the things I will probably miss about Seam 2 in a Java EE 6 environment ("losses"). For my latest (small) project JavaEE 6 or more specifically JSF 2 was a fix requirement, so using Seam 2 wasn't an option (and won't be). Even though some people said to get Seam 2 working with JSF 2, I never made it. So far I've only used Seam 2 and I fear switching to a plain JavaEE environment poses more of a problem than I'm currently aware. The project has the following basic/core requirements: * Role and permission-based security concept (~50 users) * JPA 2 transactional persistence * ... The rest will be rather GUI-based, search forms, client validation etc. which will be handled be RichFaces 4 and JavaEE 6 bean validation. There are no web services, no restful URLs, no messaging, no emailing. I can see that using Seam security would defintitely be a loss, but I'm not sure about what Seam persistence, the entity/query framework, JBoss EL, and others would be, **especially the overall programming model** (navigation, EL, beans). Note that we will be able to add Seam 3 modules when it makes sense, so you might include Seam 3 in the discussion in the "gains" section. So, can anybody clear this up a little? (it doesn't have to be a complete wrap-up, whatever springs to your mind, go ahead) PS: I wasn't able to connect to the Seam forums so I felt I needed to ask here.
seam
java-ee-6
seam2
seam3
null
null
open
What will probably be the biggest changes (losses) switching from Seam 2 to plain JavaEE 6? === Question pretty much says it all, though explicitly I'm looking for the things I will probably miss about Seam 2 in a Java EE 6 environment ("losses"). For my latest (small) project JavaEE 6 or more specifically JSF 2 was a fix requirement, so using Seam 2 wasn't an option (and won't be). Even though some people said to get Seam 2 working with JSF 2, I never made it. So far I've only used Seam 2 and I fear switching to a plain JavaEE environment poses more of a problem than I'm currently aware. The project has the following basic/core requirements: * Role and permission-based security concept (~50 users) * JPA 2 transactional persistence * ... The rest will be rather GUI-based, search forms, client validation etc. which will be handled be RichFaces 4 and JavaEE 6 bean validation. There are no web services, no restful URLs, no messaging, no emailing. I can see that using Seam security would defintitely be a loss, but I'm not sure about what Seam persistence, the entity/query framework, JBoss EL, and others would be, **especially the overall programming model** (navigation, EL, beans). Note that we will be able to add Seam 3 modules when it makes sense, so you might include Seam 3 in the discussion in the "gains" section. So, can anybody clear this up a little? (it doesn't have to be a complete wrap-up, whatever springs to your mind, go ahead) PS: I wasn't able to connect to the Seam forums so I felt I needed to ask here.
0
6,984,193
08/08/2011 15:06:09
884,320
08/08/2011 15:06:09
1
0
Jersey client API WebResource accept() not setting MIME header correctly?
public static WebResource createWebResource() { final ClientConfig cc = new DefaultClientConfig(); final Client c = Client.create(cc); final WebResource wr = c.resource("http://localhost:19801/wtg_inventory_war/wtg/rest") .path(inv); return wr; } public void tester() { final WebResource wr = JaxrsClientUtil.createWebResource() .path("wtg-service"); wr.accept(MediaType.APPLICATION_XML); String response = wr.path("get-services") .type(MediaType.APPLICATION_XML) .get(String.class); System.out.println(response); } Server side: @Path("get-services") @GET @Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML}) public Response handleFindInventoryServices( @Context WtgSpringContainer ioc // Spring config for service operations ) { System.out.println("Got a service listing request..."); LOGGER.info("Got a service listing request"); Get the app specific data formatted in JAXB XML or JSON... . . . return Response.ok(msg).build(); } Regardless of what the client side sets for acceptable media type, JSON comes back? Using curl with -HAccept:application/json or application/xml works fine. I'd like to test my server with both without changing the server side. Any pointers as to why I cannot force the server to XML as my preferred MIME type?
jersey
null
null
null
null
null
open
Jersey client API WebResource accept() not setting MIME header correctly? === public static WebResource createWebResource() { final ClientConfig cc = new DefaultClientConfig(); final Client c = Client.create(cc); final WebResource wr = c.resource("http://localhost:19801/wtg_inventory_war/wtg/rest") .path(inv); return wr; } public void tester() { final WebResource wr = JaxrsClientUtil.createWebResource() .path("wtg-service"); wr.accept(MediaType.APPLICATION_XML); String response = wr.path("get-services") .type(MediaType.APPLICATION_XML) .get(String.class); System.out.println(response); } Server side: @Path("get-services") @GET @Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML}) public Response handleFindInventoryServices( @Context WtgSpringContainer ioc // Spring config for service operations ) { System.out.println("Got a service listing request..."); LOGGER.info("Got a service listing request"); Get the app specific data formatted in JAXB XML or JSON... . . . return Response.ok(msg).build(); } Regardless of what the client side sets for acceptable media type, JSON comes back? Using curl with -HAccept:application/json or application/xml works fine. I'd like to test my server with both without changing the server side. Any pointers as to why I cannot force the server to XML as my preferred MIME type?
0
10,985,340
06/11/2012 18:11:18
1,395,850
05/15/2012 10:03:09
29
2
How to read line to line when my txt is in the raw folder?
I have a txt in my raw folder with this text: 38.706937,-0.494406,Alcoy,Alcoy,Comunidad Valenciana 37.605651,-0.991294,Vuelo1,Cartagena,Región de Murcia 37.652022,-0.719147,Vuelo2,La Manga del Mar Menor,Región de Murcia 42.817988,-1.644183,Vuelo3,Pamplona,Navarra 36.750779,-5.812395,Vuelo4,Arcos de la frontera,Andalucia And a method where I do this: private void leerPuntosApp(){ InputStream stream =getResources().openRawResource(R.raw.sitios); BufferedReader brin = new BufferedReader(new InputStreamReader(stream)); String todoPartes = null; try { while(brin.read() != -1){ todoPartes = brin.readLine(); dibujarPuntos(todoPartes); } } catch (IOException e) { e.printStackTrace(); } } private void dibujarPuntos(String punto){ Toast.makeText(this, punto, Toast.LENGTH_SHORT).show(); String []separados = punto.split(","); for(int i =0;i<separados.length;i++){ Dialog dialog = hacerDialogo(separados[0],separados[1], separados[2],separados[3],separados[4]); itemOverlay = new CargarItem(puntosMapa,this,dialog); lat = Double.parseDouble(separados[0])*1E6; lon = Double.parseDouble(separados[1])*1E6; GeoPoint point = new GeoPoint(lat.intValue(),lon.intValue()); //GeoPoint point = calcularCoordenadas(listaDeSitios.get(i).getCiudad()); item = new OverlayItem(point,separados[2], null); itemOverlay.addOverlay(item); mapOverlays.add(itemOverlay); mapView.postInvalidate(); } } The strange thing is that the method dibujarPuntos just draw the first point but the toast shows me all the lines. Thank you for your help.
android
raw
null
null
null
null
open
How to read line to line when my txt is in the raw folder? === I have a txt in my raw folder with this text: 38.706937,-0.494406,Alcoy,Alcoy,Comunidad Valenciana 37.605651,-0.991294,Vuelo1,Cartagena,Región de Murcia 37.652022,-0.719147,Vuelo2,La Manga del Mar Menor,Región de Murcia 42.817988,-1.644183,Vuelo3,Pamplona,Navarra 36.750779,-5.812395,Vuelo4,Arcos de la frontera,Andalucia And a method where I do this: private void leerPuntosApp(){ InputStream stream =getResources().openRawResource(R.raw.sitios); BufferedReader brin = new BufferedReader(new InputStreamReader(stream)); String todoPartes = null; try { while(brin.read() != -1){ todoPartes = brin.readLine(); dibujarPuntos(todoPartes); } } catch (IOException e) { e.printStackTrace(); } } private void dibujarPuntos(String punto){ Toast.makeText(this, punto, Toast.LENGTH_SHORT).show(); String []separados = punto.split(","); for(int i =0;i<separados.length;i++){ Dialog dialog = hacerDialogo(separados[0],separados[1], separados[2],separados[3],separados[4]); itemOverlay = new CargarItem(puntosMapa,this,dialog); lat = Double.parseDouble(separados[0])*1E6; lon = Double.parseDouble(separados[1])*1E6; GeoPoint point = new GeoPoint(lat.intValue(),lon.intValue()); //GeoPoint point = calcularCoordenadas(listaDeSitios.get(i).getCiudad()); item = new OverlayItem(point,separados[2], null); itemOverlay.addOverlay(item); mapOverlays.add(itemOverlay); mapView.postInvalidate(); } } The strange thing is that the method dibujarPuntos just draw the first point but the toast shows me all the lines. Thank you for your help.
0
2,368,034
03/03/2010 00:41:06
25,549
10/06/2008 16:41:39
1,510
59
Any early impressions of PyCharm for Python, Django and web development?
I just discovered [PyCharm][1], which is a Python/Django/web IDE currently in "public preview" being developed by JetBrains. Has anyone been using it for the last month it has been available, and if so, what are your impressions of it compared to other IDEs that are available such as: - Komodo - Wing IDE - Eclipse + Pydev - Aptana [1]: http://www.jetbrains.com/pycharm/
pycharm
python
django
ide
null
03/03/2012 01:57:12
not constructive
Any early impressions of PyCharm for Python, Django and web development? === I just discovered [PyCharm][1], which is a Python/Django/web IDE currently in "public preview" being developed by JetBrains. Has anyone been using it for the last month it has been available, and if so, what are your impressions of it compared to other IDEs that are available such as: - Komodo - Wing IDE - Eclipse + Pydev - Aptana [1]: http://www.jetbrains.com/pycharm/
4
5,991,830
05/13/2011 12:28:41
752,354
05/13/2011 12:28:41
1
0
shuffle array elements
I found this code online for shuffling array elements, it works well, but I can't understand the `for` loop here shuffle = function(o) { for(var j, x, i = o.length; i; j = parseInt(Math.random() * i), x = o[--i], o[i] = o[j], o[j] = x); return o; }; any help is appreciated, thank you !
jquery
for-loop
null
null
null
null
open
shuffle array elements === I found this code online for shuffling array elements, it works well, but I can't understand the `for` loop here shuffle = function(o) { for(var j, x, i = o.length; i; j = parseInt(Math.random() * i), x = o[--i], o[i] = o[j], o[j] = x); return o; }; any help is appreciated, thank you !
0
9,333,232
02/17/2012 18:08:42
1,121,213
12/29/2011 12:56:53
30
0
Declare array of objects, in simpliest way?
How can I shorten declare and instantied array of objects? <code> class clsPerson{public int x, y;} ... clsPerson[] objArr = new clsPerson[1000]; //<strong>How invoke here constructor? without creating for loop and objArr[i] = new clsPerson(); </strong> </code>
c#
arrays
object
constructor
new-operator
null
open
Declare array of objects, in simpliest way? === How can I shorten declare and instantied array of objects? <code> class clsPerson{public int x, y;} ... clsPerson[] objArr = new clsPerson[1000]; //<strong>How invoke here constructor? without creating for loop and objArr[i] = new clsPerson(); </strong> </code>
0
5,586,775
04/07/2011 19:51:39
38
08/01/2008 12:44:28
970
32
Control flow graph of a program
I'm taking a compiler class right now and we're at the point where we have to build a CFG in order to implement optimizations. One thing I can't figure out is how many CFGs are there for a program? Every example I ever see seems to be the CGF of a simple code segment. So, if you have a program that has say three functions. Do you have a separate CFG for each function or is there one big CFG for the entire program?
computer-science
compiler-theory
compiler-design
cfg
null
null
open
Control flow graph of a program === I'm taking a compiler class right now and we're at the point where we have to build a CFG in order to implement optimizations. One thing I can't figure out is how many CFGs are there for a program? Every example I ever see seems to be the CGF of a simple code segment. So, if you have a program that has say three functions. Do you have a separate CFG for each function or is there one big CFG for the entire program?
0
5,567,941
04/06/2011 14:23:58
213,926
11/18/2009 16:54:39
133
8
Custom Keyboard Shortcuts in Windows
Does anyone know if it is possible to define a keyboard shortcut sequence that can result in the insert of text? I do a lot of editing and tend to repeat certain sequences of html codes in textboxes and textareas in the browser. I would like to be able to define a shortcut sequence that inserts the html codes automatically. Is it do-able in Windows XP Pro?
keyboard-shortcuts
null
null
null
null
04/06/2011 14:51:40
off topic
Custom Keyboard Shortcuts in Windows === Does anyone know if it is possible to define a keyboard shortcut sequence that can result in the insert of text? I do a lot of editing and tend to repeat certain sequences of html codes in textboxes and textareas in the browser. I would like to be able to define a shortcut sequence that inserts the html codes automatically. Is it do-able in Windows XP Pro?
2
528,922
02/09/2009 16:47:21
258
08/04/2008 07:59:04
109
6
How should I structure this application?
I am writing an iPhone application which requires the user to enter their mobile no and pin code and press an accept button before they continue into the application. Previously I had (each view is in a different Xib) AppDelegate - if {registered add load RootView (which is main view)} else {load RegistrationView subview} But then when the RegistrationView loaded it would appear under the status bar Then I tried AppDelegate - if {registered add load RootView (which is reg view)} else {load RootView and then immediately push HomeView} But then the UINavigationController doesnt appear to work on the main page What would be the best way to implement this? Should I put both home pages in the same xib?
iphone
objective-c
null
null
null
null
open
How should I structure this application? === I am writing an iPhone application which requires the user to enter their mobile no and pin code and press an accept button before they continue into the application. Previously I had (each view is in a different Xib) AppDelegate - if {registered add load RootView (which is main view)} else {load RegistrationView subview} But then when the RegistrationView loaded it would appear under the status bar Then I tried AppDelegate - if {registered add load RootView (which is reg view)} else {load RootView and then immediately push HomeView} But then the UINavigationController doesnt appear to work on the main page What would be the best way to implement this? Should I put both home pages in the same xib?
0
11,229,779
06/27/2012 15:27:56
334,369
05/06/2010 11:37:11
566
10
Is there any differance between Deleting/Editing field from UI through Custom code in Sharepoint List?
Is there any differance between Deleting/Editing field from UI through Custom code in Sharepoint List? I am deleting task list field from UI, field setting-> delete field. Writing code getting SPField objec and deleting field. Do we have any differance?
list
sharepoint
delete
spfield
null
06/27/2012 16:40:54
not a real question
Is there any differance between Deleting/Editing field from UI through Custom code in Sharepoint List? === Is there any differance between Deleting/Editing field from UI through Custom code in Sharepoint List? I am deleting task list field from UI, field setting-> delete field. Writing code getting SPField objec and deleting field. Do we have any differance?
1
11,395,387
07/09/2012 12:51:12
4,241
09/02/2008 13:53:20
842
25
Should I ignore SCSS?
I consider myself and excellent CSS writer. Lately, I have had some requests to code in SCSS. However, I don't run Ruby in my environment and am weighing whether I should deal with that overhead. And yes, I know there are some work arounds to compile the SCSS. So, should I go out of my way to learn and support SCSS, or should I consider it strictly a Ruby gem that has nothing to do with what I do?
ruby-on-rails
ruby
scss
null
null
07/09/2012 13:10:17
not constructive
Should I ignore SCSS? === I consider myself and excellent CSS writer. Lately, I have had some requests to code in SCSS. However, I don't run Ruby in my environment and am weighing whether I should deal with that overhead. And yes, I know there are some work arounds to compile the SCSS. So, should I go out of my way to learn and support SCSS, or should I consider it strictly a Ruby gem that has nothing to do with what I do?
4
4,328,498
12/01/2010 19:58:10
770,022
08/30/2010 15:25:57
218
1
HTML Homework that doesnt pass validation but displays fine.
I was asked by the professor to use http://validator.w3.org/ this web site to validate my html file. It gives me errors. The first error is: Line 1, Column 1: no document type declaration; implying "<!DOCTYPE HTML SYSTEM>" Second error is: Line 11, Column 64: required attribute "ALT" not specified <p align="center"><img src="Koala.gif" width="100" height="100">✉ The attribute given above is required for an element that you've used, but you have omitted it. For instance, in most HTML and XHTML document types the "type" attribute is required on the "script" element and the "alt" attribute is required for the "img" element. Typical values for type are type="text/css" for <style> and type="text/javascript" for <script>. Can anyone tell what is wrong? It displays just fine in my browser I am using IE 8. But the professor says if it fails in this validation check then the assignment is incomplete. Any help would be great. <html> <head> <title>Randy's first html web page !</title> </head> <body bgcolor="#000066" text="#00ff44"> <h1 align="center"> Hello Professor</h1> <h2 align="center"> By: Randy White</h2> <p> I haven't done anything like this before.</p> <p> Seems to be ok</p> <p align="center"><img src="Koala.gif" width="100" height="100"> <table border="1"> <tr> <th>Month</th> <th>Day</th> <th>Year</th> </tr> <tr> <td>December</td> <td>1</td> <td>2010</td> </tr> </table> </body> </html>
html
null
null
null
null
null
open
HTML Homework that doesnt pass validation but displays fine. === I was asked by the professor to use http://validator.w3.org/ this web site to validate my html file. It gives me errors. The first error is: Line 1, Column 1: no document type declaration; implying "<!DOCTYPE HTML SYSTEM>" Second error is: Line 11, Column 64: required attribute "ALT" not specified <p align="center"><img src="Koala.gif" width="100" height="100">✉ The attribute given above is required for an element that you've used, but you have omitted it. For instance, in most HTML and XHTML document types the "type" attribute is required on the "script" element and the "alt" attribute is required for the "img" element. Typical values for type are type="text/css" for <style> and type="text/javascript" for <script>. Can anyone tell what is wrong? It displays just fine in my browser I am using IE 8. But the professor says if it fails in this validation check then the assignment is incomplete. Any help would be great. <html> <head> <title>Randy's first html web page !</title> </head> <body bgcolor="#000066" text="#00ff44"> <h1 align="center"> Hello Professor</h1> <h2 align="center"> By: Randy White</h2> <p> I haven't done anything like this before.</p> <p> Seems to be ok</p> <p align="center"><img src="Koala.gif" width="100" height="100"> <table border="1"> <tr> <th>Month</th> <th>Day</th> <th>Year</th> </tr> <tr> <td>December</td> <td>1</td> <td>2010</td> </tr> </table> </body> </html>
0
4,740,704
01/19/2011 21:00:38
582,106
01/19/2011 21:00:38
1
0
Mod_rewrite matching both subdomain and query string
I'm currently mod_rewriting domain.com/a/123/abc to page.php?this=123&that=abc with: RewriteRule ^a/([^/]+)/([^/]+)/?$ page.php?this=$1&that=$2 [L] Additionally I now want to mod_rewrite a.domain.com/123/abc to page.php?this=123&that=abc So both a.domain.com/123/abc and domain.com/a/123/abc will redirect to page.php?this=123&that=abc My problem is matching both the subdomain and the query string. This is what I've been working on but it's still not rewriting properly. RewriteCond %{HTTP_HOST} ^a\.domain\.com/ [NC] RewriteCond %{QUERY_STRING} /([^/]+)/([^/]+)/?$ [NC] RewriteRule ^(.*) /a/$1/$2 [L] Note that wildcard domains are set up (*.domain.com). It is just the htaccess mod_rewriting that is failing.
php
apache
.htaccess
httpd
null
null
open
Mod_rewrite matching both subdomain and query string === I'm currently mod_rewriting domain.com/a/123/abc to page.php?this=123&that=abc with: RewriteRule ^a/([^/]+)/([^/]+)/?$ page.php?this=$1&that=$2 [L] Additionally I now want to mod_rewrite a.domain.com/123/abc to page.php?this=123&that=abc So both a.domain.com/123/abc and domain.com/a/123/abc will redirect to page.php?this=123&that=abc My problem is matching both the subdomain and the query string. This is what I've been working on but it's still not rewriting properly. RewriteCond %{HTTP_HOST} ^a\.domain\.com/ [NC] RewriteCond %{QUERY_STRING} /([^/]+)/([^/]+)/?$ [NC] RewriteRule ^(.*) /a/$1/$2 [L] Note that wildcard domains are set up (*.domain.com). It is just the htaccess mod_rewriting that is failing.
0
9,102,763
02/01/2012 20:24:14
13,227
09/16/2008 17:43:51
6,875
137
Is there a nice html5 2D graphics library that can be used nicely with Three.js?
I'm using Three.js to create some 3D graphics using webgl in a canvas element. Is there a nice library to draw 2D elements over the top of the 3D graphics. Something like the HUD of a 3D game. I want to draw some images or text on the screen over the 3D stuff. Any ideas? Can it be done with Three.js?
html5
graphics
canvas
2d
three.js
null
open
Is there a nice html5 2D graphics library that can be used nicely with Three.js? === I'm using Three.js to create some 3D graphics using webgl in a canvas element. Is there a nice library to draw 2D elements over the top of the 3D graphics. Something like the HUD of a 3D game. I want to draw some images or text on the screen over the 3D stuff. Any ideas? Can it be done with Three.js?
0
5,648,234
04/13/2011 11:13:26
640,627
03/02/2011 05:49:18
21
2
html-php form submission after validation through javascript
Whait i intend to do is : first validate a form and then process if some conditions are satisfied. I have pasted the prototype of my code below. I have cross checked for any minor/silly errors. Thanks code: <form id = "myform" action = process.php method = 'post'> //some form elements here <input type="submit" value="Submit this form"onclick="validate();return false;" /> </form> <script type="text/javascript"> function validate(){ if(validated) myform.submit(); else Alert(Some message); </script> }
php
javascript
javascript-events
html-form
null
04/13/2011 11:23:48
not a real question
html-php form submission after validation through javascript === Whait i intend to do is : first validate a form and then process if some conditions are satisfied. I have pasted the prototype of my code below. I have cross checked for any minor/silly errors. Thanks code: <form id = "myform" action = process.php method = 'post'> //some form elements here <input type="submit" value="Submit this form"onclick="validate();return false;" /> </form> <script type="text/javascript"> function validate(){ if(validated) myform.submit(); else Alert(Some message); </script> }
1
2,227,621
02/09/2010 08:12:57
269,304
02/09/2010 07:50:45
1
0
How to move a particular texture around screen in android using opengl es ?
I am very new to OpenGL ES. I am implementing some demo app to load multiple textures on the screen. For demo purpose I have loaded 2 textures in 2 different locations on the screen using glTranslatef() and glBindTextures() twice. Now I am able to see 2 different images on the screen. Now I want to move one particular texture across the screen using mouse. I know it may be silly topic, but please help me in this.. Thanks in advance..
android
opengl-es
null
null
null
null
open
How to move a particular texture around screen in android using opengl es ? === I am very new to OpenGL ES. I am implementing some demo app to load multiple textures on the screen. For demo purpose I have loaded 2 textures in 2 different locations on the screen using glTranslatef() and glBindTextures() twice. Now I am able to see 2 different images on the screen. Now I want to move one particular texture across the screen using mouse. I know it may be silly topic, but please help me in this.. Thanks in advance..
0
8,383,388
12/05/2011 09:43:00
769,677
05/25/2011 13:42:35
138
19
Pagination without query number of pages?
How can I do a pagination system without query number of elements and without getting all elements from db
php
mysql
null
null
null
12/05/2011 17:26:26
not a real question
Pagination without query number of pages? === How can I do a pagination system without query number of elements and without getting all elements from db
1
2,561,768
04/01/2010 16:00:31
86,381
04/02/2009 19:35:18
493
14
C# Property Access vs Interface Implementation
I'm writing a class to represent a [Pivot](http://www.getpivot.com) Collection, the root object recognized by Pivot. A Collection has several attributes, a list of facet categories (each represented by a `FacetCategory` object) and a list of items (each represented by a `PivotItem` object). Therefore, an extremely simplified Collection reads: public class Collection { private List<FacetCategory> categories; private List<PivotItem> items; // other attributes } What I'm unsure of is how to properly grant access to those two lists. Because declaration order of both facet categories and items is visible to the user, I can't use sets, but the class also shouldn't allow duplicate categories or items. Furthermore, I'd like to make the Collection object as easy to use as possible. So my choices are: 1. Have Collection implement `IList<PivotItem>` and have accessor methods for `FacetCategory`: In this case, one would add an item to Collection `foo` by writing `foo.Add(bar)`. This works, but since a Collection is equally both kinds of list making it only pass as a list for one type (category or item) seems like a subpar solution. 2. Create nested wrapper classes for `List` (`CategoryList` and `ItemList`). This has the advantage of making a consistent interface but the downside is that these properties would no longer be able to serve as lists (because I need to override the non-virtual `Add` method I have to implement `IList` rather than subclass `List`. Implicit casting wouldn't work because that would return the `Add` method to its normal behavior. Also, for reasons I can't figure out, `IList` is missing an `AddRange` method... public class Collection { private class CategoryList: IList<FacetCategory> { // ... } private readonly CategoryList categories = new CategoryList(); private readonly ItemList items = new ItemList(); public CategoryList FacetCategories { get { return categories; } set { categories.Clear(); categories.AddRange(value); } } public ItemList Items { get { return items; } set { items.Clear(); items.AddRange(value); } } } Finally, the third option is to combine options one and two, so that Collection implements `IList<PivotItem>` and has a property `FacetCategories`. **Question:** Which of these three is most appropriate, and why?
c#
collections
inheritance
null
null
null
open
C# Property Access vs Interface Implementation === I'm writing a class to represent a [Pivot](http://www.getpivot.com) Collection, the root object recognized by Pivot. A Collection has several attributes, a list of facet categories (each represented by a `FacetCategory` object) and a list of items (each represented by a `PivotItem` object). Therefore, an extremely simplified Collection reads: public class Collection { private List<FacetCategory> categories; private List<PivotItem> items; // other attributes } What I'm unsure of is how to properly grant access to those two lists. Because declaration order of both facet categories and items is visible to the user, I can't use sets, but the class also shouldn't allow duplicate categories or items. Furthermore, I'd like to make the Collection object as easy to use as possible. So my choices are: 1. Have Collection implement `IList<PivotItem>` and have accessor methods for `FacetCategory`: In this case, one would add an item to Collection `foo` by writing `foo.Add(bar)`. This works, but since a Collection is equally both kinds of list making it only pass as a list for one type (category or item) seems like a subpar solution. 2. Create nested wrapper classes for `List` (`CategoryList` and `ItemList`). This has the advantage of making a consistent interface but the downside is that these properties would no longer be able to serve as lists (because I need to override the non-virtual `Add` method I have to implement `IList` rather than subclass `List`. Implicit casting wouldn't work because that would return the `Add` method to its normal behavior. Also, for reasons I can't figure out, `IList` is missing an `AddRange` method... public class Collection { private class CategoryList: IList<FacetCategory> { // ... } private readonly CategoryList categories = new CategoryList(); private readonly ItemList items = new ItemList(); public CategoryList FacetCategories { get { return categories; } set { categories.Clear(); categories.AddRange(value); } } public ItemList Items { get { return items; } set { items.Clear(); items.AddRange(value); } } } Finally, the third option is to combine options one and two, so that Collection implements `IList<PivotItem>` and has a property `FacetCategories`. **Question:** Which of these three is most appropriate, and why?
0
10,808,889
05/30/2012 01:26:56
173,634
09/15/2009 10:21:27
1,935
2
Given a day name in a string, how can I get a Time object representing that day within the current week?
Given a string with day name, i.e. `"Wednesday"`, how can I get a Time object representing that day within the current week (Monday - Sunday)? So for example, if the current day is Tuesday 29 May, and the string is `"Monday"`, the time object should represent `Monday 28 May`. If the string is `"Friday"`, it should be `Friday 1 June`. Whereas if the current day is Tuesday 5 June, and the string is `"Monday"`, the time object should represent `Monday 4 May`. If the string is `"Friday"`, it should be `Friday 8 June`. I am using Rails 3.2.0 and Ruby 1.9.2
ruby-on-rails
ruby
ruby-on-rails-3
time
null
null
open
Given a day name in a string, how can I get a Time object representing that day within the current week? === Given a string with day name, i.e. `"Wednesday"`, how can I get a Time object representing that day within the current week (Monday - Sunday)? So for example, if the current day is Tuesday 29 May, and the string is `"Monday"`, the time object should represent `Monday 28 May`. If the string is `"Friday"`, it should be `Friday 1 June`. Whereas if the current day is Tuesday 5 June, and the string is `"Monday"`, the time object should represent `Monday 4 May`. If the string is `"Friday"`, it should be `Friday 8 June`. I am using Rails 3.2.0 and Ruby 1.9.2
0
11,026,550
06/14/2012 04:11:48
1,352,747
04/24/2012 03:28:10
117
9
What is suitable Xcode for 10.6.8?
Can anybody tell me that what is suitable Xcode version for 10.6.8(snow leopard)?Does Xcode 4.2 installed on it?
iphone
ios
xcode
null
null
null
open
What is suitable Xcode for 10.6.8? === Can anybody tell me that what is suitable Xcode version for 10.6.8(snow leopard)?Does Xcode 4.2 installed on it?
0
8,078,913
11/10/2011 11:37:54
517,595
11/23/2010 15:03:45
41
1
Magento upsell_products raises error "must be an instance of Mage_Catalog_Model_Resource_Eav_Mysql4_Product_Collection"
Putting this line to view.phtml ... <?php echo $this->getChildHtml('upsell_products') ?> ... raises this error: Recoverable Error: Argument 1 passed to Mage_Catalog_Block_Product_Abstract::_addProductAttributesAndPrices() must be an instance of Mage_Catalog_Model_Resource_Eav_Mysql4_Product_Collection, instance of Mage_Catalog_Model_Resource_Product_Link_Product_Collection given, called in D:\active\flavs\src\app\code\core\Mage\Catalog\Block\Product\List\Upsell.php on line 65 and defined in D:\active\flavs\src\app\code\local\Mage\Catalog\Block\Product\Abstract.php on line 355 #0 D:\active\flavs\src\app\code\local\Mage\Catalog\Block\Product\Abstract.php(355): mageCoreErrorHandler(4096, 'Argument 1 pass...', 'D:\active\flavs...', 355, Array) #1 D:\active\flavs\src\app\code\core\Mage\Catalog\Block\Product\List\Upsell.php(65): Mage_Catalog_Block_Product_Abstract->_addProductAttributesAndPrices(Object(Mage_Catalog_Model_Resource_Product_Link_Product_Collection)) #2 D:\active\flavs\src\app\code\core\Mage\Catalog\Block\Product\List\Upsell.php(94): Mage_Catalog_Block_Product_List_Upsell->_prepareData() #3 D:\active\flavs\src\app\code\core\Mage\Core\Block\Abstract.php(862): Mage_Catalog_Block_Product_List_Upsell->_beforeToHtml() #4 D:\active\flavs\src\app\code\core\Mage\Core\Block\Abstract.php(582): Mage_Core_Block_Abstract->toHtml() #5 D:\active\flavs\src\app\code\core\Mage\Core\Block\Abstract.php(526): Mage_Core_Block_Abstract->_getChildHtml('upsell_products', true) #6 D:\active\flavs\src\app\design\frontend\default\flavs\template\catalog\product\view.phtml(163): Mage_Core_Block_Abstract->getChildHtml('upsell_products') I found only one [forum topic][1] and it says that there is magento 1.6 core with not compatible modules. Can you help me to solve this problem, please? [1]: http://magento-forum.ru/topic/1360/
php
error-message
magento
null
null
null
open
Magento upsell_products raises error "must be an instance of Mage_Catalog_Model_Resource_Eav_Mysql4_Product_Collection" === Putting this line to view.phtml ... <?php echo $this->getChildHtml('upsell_products') ?> ... raises this error: Recoverable Error: Argument 1 passed to Mage_Catalog_Block_Product_Abstract::_addProductAttributesAndPrices() must be an instance of Mage_Catalog_Model_Resource_Eav_Mysql4_Product_Collection, instance of Mage_Catalog_Model_Resource_Product_Link_Product_Collection given, called in D:\active\flavs\src\app\code\core\Mage\Catalog\Block\Product\List\Upsell.php on line 65 and defined in D:\active\flavs\src\app\code\local\Mage\Catalog\Block\Product\Abstract.php on line 355 #0 D:\active\flavs\src\app\code\local\Mage\Catalog\Block\Product\Abstract.php(355): mageCoreErrorHandler(4096, 'Argument 1 pass...', 'D:\active\flavs...', 355, Array) #1 D:\active\flavs\src\app\code\core\Mage\Catalog\Block\Product\List\Upsell.php(65): Mage_Catalog_Block_Product_Abstract->_addProductAttributesAndPrices(Object(Mage_Catalog_Model_Resource_Product_Link_Product_Collection)) #2 D:\active\flavs\src\app\code\core\Mage\Catalog\Block\Product\List\Upsell.php(94): Mage_Catalog_Block_Product_List_Upsell->_prepareData() #3 D:\active\flavs\src\app\code\core\Mage\Core\Block\Abstract.php(862): Mage_Catalog_Block_Product_List_Upsell->_beforeToHtml() #4 D:\active\flavs\src\app\code\core\Mage\Core\Block\Abstract.php(582): Mage_Core_Block_Abstract->toHtml() #5 D:\active\flavs\src\app\code\core\Mage\Core\Block\Abstract.php(526): Mage_Core_Block_Abstract->_getChildHtml('upsell_products', true) #6 D:\active\flavs\src\app\design\frontend\default\flavs\template\catalog\product\view.phtml(163): Mage_Core_Block_Abstract->getChildHtml('upsell_products') I found only one [forum topic][1] and it says that there is magento 1.6 core with not compatible modules. Can you help me to solve this problem, please? [1]: http://magento-forum.ru/topic/1360/
0
8,812,759
01/11/2012 00:52:24
322,177
04/21/2010 10:40:42
5
0
Android: Expandable List View Item Buttons Get Pressed When Item Gets Pressed
I have an expandable list, with an list item layout that has check box buttons in it. I have state list drawables for the buttons. When the user touches the list item, the buttons transition to pressed state. When the user releases the press, the buttons return to normal state. I'd like the buttons not to transition to this pressed state (it looks weird for the user) The code for the list item looks like: <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="wrap_content" android:background="@drawable/background" android:orientation="horizontal" > <CheckBox android:id="@+id/vote_minus_one" android:layout_width="40dp" android:layout_height="40dp" android:layout_above="@+id/marginBottom" android:layout_marginRight="5dp" android:layout_marginTop="6dp" android:layout_toLeftOf="@+id/vote_plus_one" android:background="@drawable/vote_down_button" android:button="@null" android:focusable="false" android:focusableInTouchMode="false" /> </RelativeLayout> And the button: <?xml version="1.0" encoding="utf-8"?> <selector xmlns:android="http://schemas.android.com/apk/res/android"> <!-- Pressed --> <item android:state_pressed="true" android:drawable="@drawable/track_icon_check_green_bg_green" /> <!-- Checked --> <item android:state_checked="true" android:drawable="@drawable/track_icon_check_green_bg_green" /> <!-- Disabled --> <item android:state_enabled="false" android:drawable="@drawable/track_icon_check_gray_bg_gray" /> <!-- Normal --> <item android:drawable="@drawable/track_icon_check_green_bg_gray" /> </selector> Any ideas? It seems like the press on the parent view is getting transmitted to the child views, but I'm not sure how to prevent this.
java
android
null
null
null
null
open
Android: Expandable List View Item Buttons Get Pressed When Item Gets Pressed === I have an expandable list, with an list item layout that has check box buttons in it. I have state list drawables for the buttons. When the user touches the list item, the buttons transition to pressed state. When the user releases the press, the buttons return to normal state. I'd like the buttons not to transition to this pressed state (it looks weird for the user) The code for the list item looks like: <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="wrap_content" android:background="@drawable/background" android:orientation="horizontal" > <CheckBox android:id="@+id/vote_minus_one" android:layout_width="40dp" android:layout_height="40dp" android:layout_above="@+id/marginBottom" android:layout_marginRight="5dp" android:layout_marginTop="6dp" android:layout_toLeftOf="@+id/vote_plus_one" android:background="@drawable/vote_down_button" android:button="@null" android:focusable="false" android:focusableInTouchMode="false" /> </RelativeLayout> And the button: <?xml version="1.0" encoding="utf-8"?> <selector xmlns:android="http://schemas.android.com/apk/res/android"> <!-- Pressed --> <item android:state_pressed="true" android:drawable="@drawable/track_icon_check_green_bg_green" /> <!-- Checked --> <item android:state_checked="true" android:drawable="@drawable/track_icon_check_green_bg_green" /> <!-- Disabled --> <item android:state_enabled="false" android:drawable="@drawable/track_icon_check_gray_bg_gray" /> <!-- Normal --> <item android:drawable="@drawable/track_icon_check_green_bg_gray" /> </selector> Any ideas? It seems like the press on the parent view is getting transmitted to the child views, but I'm not sure how to prevent this.
0
10,512,898
05/09/2012 09:01:42
1,163,736
01/22/2012 18:08:34
104
0
Passing array using jquery Post
var sc = new Array(); var i =0; el.find(".colorable").each(function () { sc[i++] = $(this).attr("src"); }); $.post("/Edit/ChangeImageColor", { src : sc , s: source, t: target }, function () { alert("done"); }); I am trying to pass array `( sc ) ` to server but it shows null in src public JsonResult ChangeImageColor(string[] src, string s, string t) { Can anybody tell me what i am missing?
javascript
jquery
null
null
null
05/29/2012 04:35:30
too localized
Passing array using jquery Post === var sc = new Array(); var i =0; el.find(".colorable").each(function () { sc[i++] = $(this).attr("src"); }); $.post("/Edit/ChangeImageColor", { src : sc , s: source, t: target }, function () { alert("done"); }); I am trying to pass array `( sc ) ` to server but it shows null in src public JsonResult ChangeImageColor(string[] src, string s, string t) { Can anybody tell me what i am missing?
3
2,707,860
04/25/2010 10:29:24
325,418
05/09/2009 15:50:29
3,192
104
In SQL, can we always write an inner join statement as a main query and subquery if we only want to find the intersection?
In SQL, can we always write an inner join statement as a main query and subquery or vice versa if we only want to find the intersection? For example, select * from gifts g where g.giftID in (select giftID from sentGifts); can do a join and show the gifts sent in the sentGifts table, but it won't be able to show the sentTime because that is inside the subquery. But if all we care is to find the intersection, without caring what is being displayed, then we can always convert one to the other?
sql
mysql
join
subquery
inner-join
null
open
In SQL, can we always write an inner join statement as a main query and subquery if we only want to find the intersection? === In SQL, can we always write an inner join statement as a main query and subquery or vice versa if we only want to find the intersection? For example, select * from gifts g where g.giftID in (select giftID from sentGifts); can do a join and show the gifts sent in the sentGifts table, but it won't be able to show the sentTime because that is inside the subquery. But if all we care is to find the intersection, without caring what is being displayed, then we can always convert one to the other?
0
2,926,421
05/28/2010 03:06:31
352,538
05/28/2010 03:06:31
1
0
Regular Expression - capturing contents of <select>
I'm trying to use a regular expression to capture the contents of all option values inside an HTML select element For example, in: <select name="test"> <option value="blah">one</option> <option value="mehh">two</option> <option value="rawr">three</option> </select> I'd like to capture one two and three into an array. My current code is var pages = responseDetails.responseText.match(/<select name="page" .+?>(?:\s*<option .+?>([^<]+)<\/option>)+\s*<\/select>/); for (var c = 0; c<pages.length; c++) { alert(pages[c]); } But it only captures the last value, in this case, "three". How can I modify this to capture all of them? Thanks!
javascript
html
regex
null
null
null
open
Regular Expression - capturing contents of <select> === I'm trying to use a regular expression to capture the contents of all option values inside an HTML select element For example, in: <select name="test"> <option value="blah">one</option> <option value="mehh">two</option> <option value="rawr">three</option> </select> I'd like to capture one two and three into an array. My current code is var pages = responseDetails.responseText.match(/<select name="page" .+?>(?:\s*<option .+?>([^<]+)<\/option>)+\s*<\/select>/); for (var c = 0; c<pages.length; c++) { alert(pages[c]); } But it only captures the last value, in this case, "three". How can I modify this to capture all of them? Thanks!
0
9,474,180
02/27/2012 23:42:01
514,641
11/20/2010 11:49:40
46
7
zend select statement with string
I've spent 2 hours for just a select statement. What am I doing wrong? public function fetchSpecific($moderatorid = 1) { $resultSet = $this->getDbTable()->fetchAll("moderatorid = ".$moderatorid); $entries = array(); foreach ($resultSet as $row) { $entry = new Application_Model_Network(); $entry->setId($row->id) ->setName($row->name) ->setModeratorId($row->moderatorid); $entries[] = $entry; } return $entries; } It is all about this line: $resultSet = $this->getDbTable()->fetchAll("moderatorid = ".$moderatorid); It give me an error likes this: Message: SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')' at line 1
php
sql
string
zend-framework
select
null
open
zend select statement with string === I've spent 2 hours for just a select statement. What am I doing wrong? public function fetchSpecific($moderatorid = 1) { $resultSet = $this->getDbTable()->fetchAll("moderatorid = ".$moderatorid); $entries = array(); foreach ($resultSet as $row) { $entry = new Application_Model_Network(); $entry->setId($row->id) ->setName($row->name) ->setModeratorId($row->moderatorid); $entries[] = $entry; } return $entries; } It is all about this line: $resultSet = $this->getDbTable()->fetchAll("moderatorid = ".$moderatorid); It give me an error likes this: Message: SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')' at line 1
0
2,184,407
02/02/2010 13:44:23
255,560
01/21/2010 07:20:23
8
1
When typing in a cell beyond the size, only that cell should temporarily go beyond its boundaries (like excel)
When typing in a datagrid cell beyond the size, only that cell should temporarily go beyond its boundaries (like excel)
flex
null
null
null
null
02/24/2010 04:14:31
not a real question
When typing in a cell beyond the size, only that cell should temporarily go beyond its boundaries (like excel) === When typing in a datagrid cell beyond the size, only that cell should temporarily go beyond its boundaries (like excel)
1
6,463,448
06/24/2011 04:39:42
815,068
06/13/2011 17:17:04
1
0
How to upload remote_url Images using paperclip plugin in Ruby on Rails
I am new ROR Developer. i want to upload more than 500000 remote url images using paperclip. i got an error Error = Too many links - /var/www/railsapp/sample_app/public/system/photos/5815 Error = Too many links - /var/www/railsapp/sample_app/public/system/photos/48347 Time Out : Error = execution expired Error = undefined method `request_uri' for #<URI::Generic:0x7f565dc6f218 URL:> can you anybody clarify it? i struggle this position. Here my rake task for uploading remote url images: Book.find_in_batches(:conditions=>["image_url is not null and book_id is not null and active=true"],:batch_size=>10000) do |books| books.each do |book| begin book=Book.find_by_id(book.book_id) url = URI.parse(book.image_url) Net::HTTP.start(url.host, url.port) do |http| if http.head(url.request_uri).code == "200" Book.update_attribute(:photo,open(url)) end end rescue Timeout::Error => e app_logger.debug("Book Photo data load Time Out : Error = #{e}") rescue Exception => e app_logger.debug("Book Photo data load : Error = #{e}") end end end
ruby
null
null
null
null
null
open
How to upload remote_url Images using paperclip plugin in Ruby on Rails === I am new ROR Developer. i want to upload more than 500000 remote url images using paperclip. i got an error Error = Too many links - /var/www/railsapp/sample_app/public/system/photos/5815 Error = Too many links - /var/www/railsapp/sample_app/public/system/photos/48347 Time Out : Error = execution expired Error = undefined method `request_uri' for #<URI::Generic:0x7f565dc6f218 URL:> can you anybody clarify it? i struggle this position. Here my rake task for uploading remote url images: Book.find_in_batches(:conditions=>["image_url is not null and book_id is not null and active=true"],:batch_size=>10000) do |books| books.each do |book| begin book=Book.find_by_id(book.book_id) url = URI.parse(book.image_url) Net::HTTP.start(url.host, url.port) do |http| if http.head(url.request_uri).code == "200" Book.update_attribute(:photo,open(url)) end end rescue Timeout::Error => e app_logger.debug("Book Photo data load Time Out : Error = #{e}") rescue Exception => e app_logger.debug("Book Photo data load : Error = #{e}") end end end
0
7,724,761
10/11/2011 10:44:33
622,905
02/18/2011 09:55:43
1
0
Need concept for php chat application
I need to develop a module called 'chat with doctor'. User can able to chat with the doctor for that he has to pay some amount to website. Say example user got purchase the Package worth : 2$ =>5min. After 5 min chat will be closed , timer should be shown while chatting. How can we do this?
php
javascript
mysql
null
null
10/11/2011 11:07:48
not a real question
Need concept for php chat application === I need to develop a module called 'chat with doctor'. User can able to chat with the doctor for that he has to pay some amount to website. Say example user got purchase the Package worth : 2$ =>5min. After 5 min chat will be closed , timer should be shown while chatting. How can we do this?
1
9,716,080
03/15/2012 08:22:02
966,638
09/27/2011 08:52:12
601
15
Beginner - Jquery syntax about Url.Content
currentObject = someValue; var src = '<%=Url.Content("~/Content/images/locations/" + currentObject + ".jpg")%>'; But since Url.Content is in ', the currentObject is 'currentObject', and not its value. How to write the above code with currentObject's value, not name?
jquery
null
null
null
null
null
open
Beginner - Jquery syntax about Url.Content === currentObject = someValue; var src = '<%=Url.Content("~/Content/images/locations/" + currentObject + ".jpg")%>'; But since Url.Content is in ', the currentObject is 'currentObject', and not its value. How to write the above code with currentObject's value, not name?
0
6,691,452
07/14/2011 10:03:16
251,304
01/08/2010 15:08:23
714
54
Basic concept of development of multiplayer online game?
I want to develop a game for multi user can play at a time with together in iphone, i don't have any idea about concept of online game development. please help me out?
iphone
null
null
null
null
07/14/2011 16:32:32
not constructive
Basic concept of development of multiplayer online game? === I want to develop a game for multi user can play at a time with together in iphone, i don't have any idea about concept of online game development. please help me out?
4
11,019,514
06/13/2012 16:43:31
1,373,214
05/03/2012 17:38:22
29
1
Efficient way to replicate a database over the internet
I need to code a solution to replicate a database from one physical site to a cloud server over HTTP (preferably using Java). I would like some recomendations on how to do that. The porpose of this is to remotely monitor (using a java web application) a process that is happening at the orginal database site. I need to replicate the DB bucause the original site often has serious conectivity limitations, so i can't have my web monitor to directly connect to the orinal DB. **A little information about the on-site process:** A dozen sensors monitor various aspects of the process and the data collected is processed and inserted at the databse at the rate of 1 record/minute. At the time, a local team complements the stored records with aditional data. I can interfere in the local team work process, but i cannot interfere in the data accquisition and the original database insertion. I can also add server tasks on the original site in order to have scheduled tasks and/or daemons running. My preference is transfer the database as it grows. **The options i have considered:** - Periodical direct database insertions (on the cloud replica) from an application running on the local site - Periodicaly export data to XML and transfering to the remote cloud, where i would have another daemon to import the data. - Socket connection transfering the data from the local site to the remote site. What do you suggest?
http
database-replication
null
null
null
06/14/2012 17:50:20
not constructive
Efficient way to replicate a database over the internet === I need to code a solution to replicate a database from one physical site to a cloud server over HTTP (preferably using Java). I would like some recomendations on how to do that. The porpose of this is to remotely monitor (using a java web application) a process that is happening at the orginal database site. I need to replicate the DB bucause the original site often has serious conectivity limitations, so i can't have my web monitor to directly connect to the orinal DB. **A little information about the on-site process:** A dozen sensors monitor various aspects of the process and the data collected is processed and inserted at the databse at the rate of 1 record/minute. At the time, a local team complements the stored records with aditional data. I can interfere in the local team work process, but i cannot interfere in the data accquisition and the original database insertion. I can also add server tasks on the original site in order to have scheduled tasks and/or daemons running. My preference is transfer the database as it grows. **The options i have considered:** - Periodical direct database insertions (on the cloud replica) from an application running on the local site - Periodicaly export data to XML and transfering to the remote cloud, where i would have another daemon to import the data. - Socket connection transfering the data from the local site to the remote site. What do you suggest?
4
2,795,224
05/08/2010 18:47:28
336,265
05/08/2010 16:18:48
1
0
Android: How/where to put gesture code into IME?
I'm new to Android but I'm trying to create an IME that allows for gesture-character recognition. I can already do simple apps that perform gesture recognition but am not sure where to hook in the gesture views/obj with an IME. Here is a starting skeleton of what I have for the IME so far. I would like to use android.gesture.Gesture/Prediction/GestureOverlayView/OnGesturePerformedListener. Does anyone have advice? -- CardinalFIB gestureIME.java public class gestureIME extends InputMethodService { private static Keyboard keyboard; private static KeyboardView kView; private int lastDisplayWidth; @Override public void onCreate() { super.onCreate(); } @Override public void onInitializeInterface() { int displayWidth; if (keyboard != null) { displayWidth = getMaxWidth(); if (displayWidth == lastDisplayWidth) return; else lastDisplayWidth = getMaxWidth(); } keyboard = new GestureKeyboard(this, R.xml.keyboard); } @Override public View onCreateInputView() { kView = (KeyboardView) getLayoutInflater().inflate(R.layout.input, null); kView.setOnKeyboardActionListener(kListener); kView.setKeyboard(keyboard); return kView; } @Override public View onCreateCandidatesView() { return null; } @Override public void onStartInputView(EditorInfo attribute, boolean restarting) { super.onStartInputView(attribute, restarting); kView.setKeyboard(keyboard); kView.closing(); //what does this do??? } @Override public void onStartInput(EditorInfo attribute, boolean restarting) { super.onStartInput(attribute, restarting); } @Override public void onFinishInput() { super.onFinishInput(); } public KeyboardView.OnKeyboardActionListener kListener = new KeyboardView.OnKeyboardActionListener() { @Override public void onKey(int keyCode, int[] otherKeyCodes) { if(keyCode==Keyboard.KEYCODE_CANCEL) handleClose(); if(keyCode==10) getCurrentInputConnection().commitText(String.valueOf((char) keyCode), 1); //keyCode RETURN } @Override public void onPress(int primaryCode) {} // TODO Auto-generated method stub @Override public void onRelease(int primaryCode) {} // TODO Auto-generated method stub @Override public void onText(CharSequence text) {} // TODO Auto-generated method stub @Override public void swipeDown() {} // TODO Auto-generated method stub @Override public void swipeLeft() {} // TODO Auto-generated method stub @Override public void swipeRight() {} // TODO Auto-generated method stub @Override public void swipeUp() {} // TODO Auto-generated method stub }; private void handleClose() { requestHideSelf(0); kView.closing(); } } GestureKeyboard.java package com.android.jt.gestureIME; import android.content.Context; import android.inputmethodservice.Keyboard; public class GestureKeyboard extends Keyboard { public GestureKeyboard(Context context, int xmlLayoutResId) { super(context, xmlLayoutResId); } } GesureKeyboardView.java package com.android.jt.gestureIME; import android.content.Context; import android.inputmethodservice.KeyboardView; import android.inputmethodservice.Keyboard.Key; import android.util.AttributeSet; public class GestureKeyboardView extends KeyboardView { public GestureKeyboardView(Context context, AttributeSet attrs) { super(context, attrs); } public GestureKeyboardView(Context context, AttributeSet attrs, int defStyle) { super(context, attrs, defStyle); } @Override protected boolean onLongPress(Key key) { return super.onLongPress(key); } } keyboard.xml <?xml version="1.0" encoding="utf-8"?> <Keyboard xmlns:android="http://schemas.android.com/apk/res/android" android:keyWidth="10%p" android:horizontalGap="0px" android:verticalGap="0px" android:keyHeight="@dimen/key_height" > <Row android:rowEdgeFlags="bottom"> <Key android:codes="-3" android:keyLabel="Close" android:keyWidth="20%p" android:keyEdgeFlags="left"/> <Key android:codes="10" android:keyLabel="Return" android:keyWidth="20%p" android:keyEdgeFlags="right"/> </Row> </Keyboard> input.xml <?xml version="1.0" encoding="utf-8"?> <com.android.jt.gestureIME.GestureKeyboardView xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/gkeyboard" android:layout_alignParentBottom="true" android:layout_width="fill_parent" android:layout_height="wrap_content" />
android
ime
gestures
character
gesture-recognition
null
open
Android: How/where to put gesture code into IME? === I'm new to Android but I'm trying to create an IME that allows for gesture-character recognition. I can already do simple apps that perform gesture recognition but am not sure where to hook in the gesture views/obj with an IME. Here is a starting skeleton of what I have for the IME so far. I would like to use android.gesture.Gesture/Prediction/GestureOverlayView/OnGesturePerformedListener. Does anyone have advice? -- CardinalFIB gestureIME.java public class gestureIME extends InputMethodService { private static Keyboard keyboard; private static KeyboardView kView; private int lastDisplayWidth; @Override public void onCreate() { super.onCreate(); } @Override public void onInitializeInterface() { int displayWidth; if (keyboard != null) { displayWidth = getMaxWidth(); if (displayWidth == lastDisplayWidth) return; else lastDisplayWidth = getMaxWidth(); } keyboard = new GestureKeyboard(this, R.xml.keyboard); } @Override public View onCreateInputView() { kView = (KeyboardView) getLayoutInflater().inflate(R.layout.input, null); kView.setOnKeyboardActionListener(kListener); kView.setKeyboard(keyboard); return kView; } @Override public View onCreateCandidatesView() { return null; } @Override public void onStartInputView(EditorInfo attribute, boolean restarting) { super.onStartInputView(attribute, restarting); kView.setKeyboard(keyboard); kView.closing(); //what does this do??? } @Override public void onStartInput(EditorInfo attribute, boolean restarting) { super.onStartInput(attribute, restarting); } @Override public void onFinishInput() { super.onFinishInput(); } public KeyboardView.OnKeyboardActionListener kListener = new KeyboardView.OnKeyboardActionListener() { @Override public void onKey(int keyCode, int[] otherKeyCodes) { if(keyCode==Keyboard.KEYCODE_CANCEL) handleClose(); if(keyCode==10) getCurrentInputConnection().commitText(String.valueOf((char) keyCode), 1); //keyCode RETURN } @Override public void onPress(int primaryCode) {} // TODO Auto-generated method stub @Override public void onRelease(int primaryCode) {} // TODO Auto-generated method stub @Override public void onText(CharSequence text) {} // TODO Auto-generated method stub @Override public void swipeDown() {} // TODO Auto-generated method stub @Override public void swipeLeft() {} // TODO Auto-generated method stub @Override public void swipeRight() {} // TODO Auto-generated method stub @Override public void swipeUp() {} // TODO Auto-generated method stub }; private void handleClose() { requestHideSelf(0); kView.closing(); } } GestureKeyboard.java package com.android.jt.gestureIME; import android.content.Context; import android.inputmethodservice.Keyboard; public class GestureKeyboard extends Keyboard { public GestureKeyboard(Context context, int xmlLayoutResId) { super(context, xmlLayoutResId); } } GesureKeyboardView.java package com.android.jt.gestureIME; import android.content.Context; import android.inputmethodservice.KeyboardView; import android.inputmethodservice.Keyboard.Key; import android.util.AttributeSet; public class GestureKeyboardView extends KeyboardView { public GestureKeyboardView(Context context, AttributeSet attrs) { super(context, attrs); } public GestureKeyboardView(Context context, AttributeSet attrs, int defStyle) { super(context, attrs, defStyle); } @Override protected boolean onLongPress(Key key) { return super.onLongPress(key); } } keyboard.xml <?xml version="1.0" encoding="utf-8"?> <Keyboard xmlns:android="http://schemas.android.com/apk/res/android" android:keyWidth="10%p" android:horizontalGap="0px" android:verticalGap="0px" android:keyHeight="@dimen/key_height" > <Row android:rowEdgeFlags="bottom"> <Key android:codes="-3" android:keyLabel="Close" android:keyWidth="20%p" android:keyEdgeFlags="left"/> <Key android:codes="10" android:keyLabel="Return" android:keyWidth="20%p" android:keyEdgeFlags="right"/> </Row> </Keyboard> input.xml <?xml version="1.0" encoding="utf-8"?> <com.android.jt.gestureIME.GestureKeyboardView xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/gkeyboard" android:layout_alignParentBottom="true" android:layout_width="fill_parent" android:layout_height="wrap_content" />
0
3,010,344
06/09/2010 22:06:30
18,565
09/19/2008 06:03:39
2,892
189
Is there a good (standalone) PHPDoc parser class or function in PHP?
I'm looking for some method of converting a PHP Docblock (as used for generating documentation by tools like Doxygen) into a structure I can inspect in PHP. For example, I want to parse the following lines: <pre><code> /** * Multiply two values * @CHECKME * * @author someone * @created eons ago * * @param integer $x * @param integer $x * * @return integer */ function multiply($x, $y) { return $x * $y; } </code></pre> Into something similar to: <pre><code> array( 'author' => 'someone' ,'created' => 'eons ago' ,'param' => array( 'integer $x' ,'integer $y' ) ,'_flags' => array( '@CHECKME' ) ); </code></pre> I explicitly __cannot use__ PEAR or any such library, it has to be relatively standalone. Any given solution that is better than using a bunch of regexes after stripping away comment outline would be awesome.
php
parsing
phpdoc
null
null
05/02/2012 19:03:06
not a real question
Is there a good (standalone) PHPDoc parser class or function in PHP? === I'm looking for some method of converting a PHP Docblock (as used for generating documentation by tools like Doxygen) into a structure I can inspect in PHP. For example, I want to parse the following lines: <pre><code> /** * Multiply two values * @CHECKME * * @author someone * @created eons ago * * @param integer $x * @param integer $x * * @return integer */ function multiply($x, $y) { return $x * $y; } </code></pre> Into something similar to: <pre><code> array( 'author' => 'someone' ,'created' => 'eons ago' ,'param' => array( 'integer $x' ,'integer $y' ) ,'_flags' => array( '@CHECKME' ) ); </code></pre> I explicitly __cannot use__ PEAR or any such library, it has to be relatively standalone. Any given solution that is better than using a bunch of regexes after stripping away comment outline would be awesome.
1
5,317,141
03/15/2011 19:47:07
295,675
03/17/2010 13:26:39
1,274
81
Memory issues without hitting Heap Limit?
So, for my particular application, I have a pretty large list of items in my ListView, upwards of 10,000+ items. I don't keep all the items in memory, but rather I lazy-load them around 150 at a time from a database. I'm using an LRU cache to only keep the last 500 or so items around, but the problem is that even so, sooner or later I run into memory issues. This error eventually starts spamming my Logcat when I move around the list view: 03-15 12:36:45.114: ERROR/dalvikvm-heap(8971): 86400-byte external allocation too large for this process. 03-15 12:36:45.114: ERROR/GraphicsJNI(8971): VM won't let us allocate 86400 bytes Once I get into this state, if I click on an item to go to the next info activity, it'll crash with an OutOfMemory exception. Before this, it's perfectly fine and can go into the info activity just fine. Looking at my memory usage in DDMS, the heap size is only around 6, and actual usage is only around 5mb when the errors start popping up. The info activity does contain some images and stuff, but definitely not an extreme amount, and only bumps up the usage by like 100kb or so. This is no where near the usual 16mb heap limit that I've heard tossed around. Any ideas?
android
outofmemoryexception
null
null
null
null
open
Memory issues without hitting Heap Limit? === So, for my particular application, I have a pretty large list of items in my ListView, upwards of 10,000+ items. I don't keep all the items in memory, but rather I lazy-load them around 150 at a time from a database. I'm using an LRU cache to only keep the last 500 or so items around, but the problem is that even so, sooner or later I run into memory issues. This error eventually starts spamming my Logcat when I move around the list view: 03-15 12:36:45.114: ERROR/dalvikvm-heap(8971): 86400-byte external allocation too large for this process. 03-15 12:36:45.114: ERROR/GraphicsJNI(8971): VM won't let us allocate 86400 bytes Once I get into this state, if I click on an item to go to the next info activity, it'll crash with an OutOfMemory exception. Before this, it's perfectly fine and can go into the info activity just fine. Looking at my memory usage in DDMS, the heap size is only around 6, and actual usage is only around 5mb when the errors start popping up. The info activity does contain some images and stuff, but definitely not an extreme amount, and only bumps up the usage by like 100kb or so. This is no where near the usual 16mb heap limit that I've heard tossed around. Any ideas?
0
2,680,816
04/21/2010 06:43:42
34,537
11/05/2008 03:00:23
4,362
97
What is a read only collection in C#?
I ran a security code analyst i found myself having a [CA2105 warning](http://msdn.microsoft.com/en-us/library/ms182299%28VS.100%29.aspx). I looked at the grade tampering example. I didnt realize you can assign int[] to a readonly int. I thought readonly was like the C++ const and makes it illegal. The How to Fix Violations suggest i clone the object (which i dont want to do) or 'Replace the array with a strongly typed collection that cannot be changed'. I clicked the link and see 'ArrayList' and adding each element one by one and it doesnt look like you can prevent something adding more. So when i have this piece of code what is the easiest or best way to make it a read only collection? public static readonly string[] example = { "a", "b", "sfsdg", "sdgfhf", "erfdgf", "last one"};
c#
readonly
readonlycollection
null
null
null
open
What is a read only collection in C#? === I ran a security code analyst i found myself having a [CA2105 warning](http://msdn.microsoft.com/en-us/library/ms182299%28VS.100%29.aspx). I looked at the grade tampering example. I didnt realize you can assign int[] to a readonly int. I thought readonly was like the C++ const and makes it illegal. The How to Fix Violations suggest i clone the object (which i dont want to do) or 'Replace the array with a strongly typed collection that cannot be changed'. I clicked the link and see 'ArrayList' and adding each element one by one and it doesnt look like you can prevent something adding more. So when i have this piece of code what is the easiest or best way to make it a read only collection? public static readonly string[] example = { "a", "b", "sfsdg", "sdgfhf", "erfdgf", "last one"};
0
9,972,764
04/02/2012 08:00:40
1,257,239
03/08/2012 14:42:28
8
1
Good books about Java-Rest-Webservices?
What are good books about creating Rest-Service in Java (preferrably using Glassfish)? I would be especially interested in best practices or patterns. Maybe anyone also knows any good web resources regarding Rest.
java
rest
glassfish
null
null
04/03/2012 02:30:17
not constructive
Good books about Java-Rest-Webservices? === What are good books about creating Rest-Service in Java (preferrably using Glassfish)? I would be especially interested in best practices or patterns. Maybe anyone also knows any good web resources regarding Rest.
4
2,929,474
05/28/2010 13:43:58
213,828
11/18/2009 14:53:54
1
1
Using MAC STYLE with Qt
How do I apply the "mac style" on my forms and windows? Using Qt (C + +)
c++
qt
qt4
creator
null
null
open
Using MAC STYLE with Qt === How do I apply the "mac style" on my forms and windows? Using Qt (C + +)
0
4,850,018
01/31/2011 10:52:04
568,960
01/09/2011 17:24:02
68
1
Error List is not populating in my visual studio 2008.
Error List is not populating in my visual studio.What might be the problem? Regards, NSJ
visual-studio-2008
null
null
null
null
01/31/2011 12:54:19
not a real question
Error List is not populating in my visual studio 2008. === Error List is not populating in my visual studio.What might be the problem? Regards, NSJ
1