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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
3,889,239 | 10/08/2010 09:22:21 | 406,629 | 07/30/2010 10:29:55 | 6 | 0 | need OCR c# code for text recognition in images | HI i need to find the text that are in images programmatically...
Please any one share me the code or links regarding this | c# | source-code | ocr | null | null | 07/03/2012 01:03:06 | not a real question | need OCR c# code for text recognition in images
===
HI i need to find the text that are in images programmatically...
Please any one share me the code or links regarding this | 1 |
8,396,615 | 12/06/2011 07:33:29 | 823,528 | 06/30/2011 17:29:32 | 12 | 2 | How to make a conceptual dependency of John begged marry for a pencil? | Show a conceptual dependency representation of the sentence
i) John begged Marry for a pencil
ii) Did John talk to Marry?
Very important please help | artificial-intelligence | knowledge | null | null | null | 12/06/2011 09:38:26 | too localized | How to make a conceptual dependency of John begged marry for a pencil?
===
Show a conceptual dependency representation of the sentence
i) John begged Marry for a pencil
ii) Did John talk to Marry?
Very important please help | 3 |
5,166,489 | 03/02/2011 10:58:11 | 375,224 | 06/01/2010 12:26:14 | 1,236 | 113 | regular expression for country code | Regular expression for country code like +91 for India | php | null | null | null | null | 03/02/2011 11:02:21 | not a real question | regular expression for country code
===
Regular expression for country code like +91 for India | 1 |
4,659,275 | 01/11/2011 15:29:36 | 479,112 | 10/17/2010 22:42:53 | 76 | 0 | jQuery UI Highlight new <li> with bullet point | I have an ajax list that updates (as notifications). However, what I'm trying to do is jQuery UI Hightlight to show a new `<li>` that is appended to the `<ul>...</ul>`. The `<li>` however has a image bullet point which disappears for the duration of the highlight.
Is there any way to highlight the entire `<li> ... </li>` include the bullet point itself.
What I assume happens is a background is added to the `<li>` for the duration of the hightlight which then overrides the bullet point background.
**jQuery**
`$(data).hide().prependTo("ul.notifications").fadeIn("slow", function() {
$(this).effect("highlight", {}, 3000);
});`
Thanks :) | jquery | jquery-ui | null | null | null | null | open | jQuery UI Highlight new <li> with bullet point
===
I have an ajax list that updates (as notifications). However, what I'm trying to do is jQuery UI Hightlight to show a new `<li>` that is appended to the `<ul>...</ul>`. The `<li>` however has a image bullet point which disappears for the duration of the highlight.
Is there any way to highlight the entire `<li> ... </li>` include the bullet point itself.
What I assume happens is a background is added to the `<li>` for the duration of the hightlight which then overrides the bullet point background.
**jQuery**
`$(data).hide().prependTo("ul.notifications").fadeIn("slow", function() {
$(this).effect("highlight", {}, 3000);
});`
Thanks :) | 0 |
4,248,046 | 11/22/2010 17:05:17 | 377,739 | 06/28/2010 04:32:36 | 130 | 2 | How to hide UITabbar and UINavigationBar at the top when UIView changes to LandscapeOrientation? |
I am using tabbarcontroller application with 4 tabs, each tab integrate with UInvaigationcontroller, when get in to detail page from first page, showing html text in UIWebview. when you do orientation to Landscape, need to hide tabbarcontroller and navigation controller from that particular page.
Regards
sri | uiinterfaceorientation | null | null | null | null | null | open | How to hide UITabbar and UINavigationBar at the top when UIView changes to LandscapeOrientation?
===
I am using tabbarcontroller application with 4 tabs, each tab integrate with UInvaigationcontroller, when get in to detail page from first page, showing html text in UIWebview. when you do orientation to Landscape, need to hide tabbarcontroller and navigation controller from that particular page.
Regards
sri | 0 |
6,881,409 | 07/30/2011 05:59:57 | 870,379 | 07/30/2011 05:59:57 | 1 | 0 | how to implement app likes 'Lovecall'? | I wanna do functionality like 'Lovecall' or iphone homepage, which can redraw icons automatically with animation. Can you give me idea about how to implement?(Demo is the best).
thanks | iphone-sdk-4.0 | null | null | null | null | null | open | how to implement app likes 'Lovecall'?
===
I wanna do functionality like 'Lovecall' or iphone homepage, which can redraw icons automatically with animation. Can you give me idea about how to implement?(Demo is the best).
thanks | 0 |
10,093,194 | 04/10/2012 17:08:21 | 1,227,300 | 02/23/2012 01:55:09 | 1 | 0 | I 'm finding an open source lexical network vulnerabilities scanner. Can you help me? | In this semester of my univ, I 'm learning about network security. And I 'm finding an open source lexical network vulnerabilities scanner.
Can you take me some names or links about this?
Thanks very much! | security | open-source | null | null | null | 04/10/2012 17:57:22 | off topic | I 'm finding an open source lexical network vulnerabilities scanner. Can you help me?
===
In this semester of my univ, I 'm learning about network security. And I 'm finding an open source lexical network vulnerabilities scanner.
Can you take me some names or links about this?
Thanks very much! | 2 |
4,206,369 | 11/17/2010 16:02:10 | 234,451 | 12/18/2009 10:14:57 | 2,057 | 164 | Tortoise client on VisualSVN server | I've been trying to figure out how to browse the root of the server using the Tortoise svn 'Repo browser'. When I go to the root, it doesn't list any folders, and I just get a message,
OPTIONS of 'http://example.com:8443':200 OK (http://example.com:8443)
Rather than a full list of the folders on the server. I've had a quick poke around on the Visual SVN site and I can't see anything for this. I spend way more time in my project's in Explorer than I do opening new tabs for browsing a server in my browser, just to paste it back into my svn client.
Can anyone point me in the right directions please? | svn | tortoisesvn | visualsvn | null | null | null | open | Tortoise client on VisualSVN server
===
I've been trying to figure out how to browse the root of the server using the Tortoise svn 'Repo browser'. When I go to the root, it doesn't list any folders, and I just get a message,
OPTIONS of 'http://example.com:8443':200 OK (http://example.com:8443)
Rather than a full list of the folders on the server. I've had a quick poke around on the Visual SVN site and I can't see anything for this. I spend way more time in my project's in Explorer than I do opening new tabs for browsing a server in my browser, just to paste it back into my svn client.
Can anyone point me in the right directions please? | 0 |
3,858,043 | 10/04/2010 18:27:37 | 207,524 | 11/10/2009 05:05:37 | 1,015 | 1 | overloading operator >>() | My knowledge of C++ is small as I have only taken a couple classes. I undersand the basic case of using a friend function to overload the input, output stream operator for the "simple book example" of a Point object that has x, y instance variables. I am looking at a real project now, trying to understand what someone wrote and am getting the error:
error C2679: binary '>>' : no operator found which takes a right-hand operand of type 'const char [2]' (or there is no acceptable conversion)
1> c:\program files\microsoft visual studio 9.0\vc\include\istream(1000): could be 'std::basic_istream<_Elem,_Traits> &std::operator >><std::char_traits<char>>(std::basic_istream<_Elem,_Traits> &,signed char *)' [found using argument-dependent lookup]
1> with
1> [
1> _Elem=char,
1> _Traits=std::char_traits<char>
1> ]
Noob question (1), can someone explain what basic_istream is? The error points to:
template<class _Traits> inline
basic_istream<char, _Traits>& __CLRCALL_OR_CDECL operator>>(
basic_istream<char, _Traits>& _Istr, signed char *_Str)
{ // extract a signed char NTBS
return (_Istr >> (char *)_Str);
}
The other part the error points to is:
void input(std::istream &in = std::cin)
{in >> "(" >> X >> "," >> Y >> "," >> Z >> ")" ; }
inline friend std::istream& operator >> (std::istream& in, Coord &val)
{val.input(in); return in; };
Not sure what the error is looking at with my limited knowledge. It seems to be complaining about not the right type in the inline friend std::istream& operator>> function because of something wrong in the basic_istream template (which I'm not sure what is happening there). Any advice would be greatly appreciated. Thanks! | c++ | operator-overloading | null | null | null | null | open | overloading operator >>()
===
My knowledge of C++ is small as I have only taken a couple classes. I undersand the basic case of using a friend function to overload the input, output stream operator for the "simple book example" of a Point object that has x, y instance variables. I am looking at a real project now, trying to understand what someone wrote and am getting the error:
error C2679: binary '>>' : no operator found which takes a right-hand operand of type 'const char [2]' (or there is no acceptable conversion)
1> c:\program files\microsoft visual studio 9.0\vc\include\istream(1000): could be 'std::basic_istream<_Elem,_Traits> &std::operator >><std::char_traits<char>>(std::basic_istream<_Elem,_Traits> &,signed char *)' [found using argument-dependent lookup]
1> with
1> [
1> _Elem=char,
1> _Traits=std::char_traits<char>
1> ]
Noob question (1), can someone explain what basic_istream is? The error points to:
template<class _Traits> inline
basic_istream<char, _Traits>& __CLRCALL_OR_CDECL operator>>(
basic_istream<char, _Traits>& _Istr, signed char *_Str)
{ // extract a signed char NTBS
return (_Istr >> (char *)_Str);
}
The other part the error points to is:
void input(std::istream &in = std::cin)
{in >> "(" >> X >> "," >> Y >> "," >> Z >> ")" ; }
inline friend std::istream& operator >> (std::istream& in, Coord &val)
{val.input(in); return in; };
Not sure what the error is looking at with my limited knowledge. It seems to be complaining about not the right type in the inline friend std::istream& operator>> function because of something wrong in the basic_istream template (which I'm not sure what is happening there). Any advice would be greatly appreciated. Thanks! | 0 |
8,859,422 | 01/14/2012 01:35:21 | 1,021,294 | 10/31/2011 01:54:59 | 18 | 0 | Ambiguous default constructor | I have header file
class HuffNode { HuffNode(); HuffNode(int weight); HuffNode(char
elem); HuffNode(char elem,int weight); int weight; char element;
HuffNode* left; HuffNode* right; };
and cpp file
#include "HuffNode.h"
HuffNode::HuffNode():left(NULL),right(NULL){
}
HuffNode::HuffNode(int wght):weight(wght),left(NULL),right(NULL){
}
HuffNode::HuffNode(char elem):element(elem),left(NULL),right(NULL){
}
HuffNode::HuffNode(char elem,int wght):weight(wght),element(elem),left(NULL),right(NULL)
{
}
The Line
Node *p=new HuffNode; //or newHuffNode();
is giving compiler error :
'HuffNode' is ambiguous '
Candidates are:
HuffNode(int)
HuffNode()
'
Can you help please?
| c++ | eclipse | null | null | null | 01/15/2012 04:48:05 | not a real question | Ambiguous default constructor
===
I have header file
class HuffNode { HuffNode(); HuffNode(int weight); HuffNode(char
elem); HuffNode(char elem,int weight); int weight; char element;
HuffNode* left; HuffNode* right; };
and cpp file
#include "HuffNode.h"
HuffNode::HuffNode():left(NULL),right(NULL){
}
HuffNode::HuffNode(int wght):weight(wght),left(NULL),right(NULL){
}
HuffNode::HuffNode(char elem):element(elem),left(NULL),right(NULL){
}
HuffNode::HuffNode(char elem,int wght):weight(wght),element(elem),left(NULL),right(NULL)
{
}
The Line
Node *p=new HuffNode; //or newHuffNode();
is giving compiler error :
'HuffNode' is ambiguous '
Candidates are:
HuffNode(int)
HuffNode()
'
Can you help please?
| 1 |
1,527,208 | 10/06/2009 18:15:43 | 107,166 | 05/14/2009 15:39:11 | 302 | 32 | mMS SQL 2008 data types | What are the different MS SQL 2008 data types?
I am specifically trying to find the equivalent of a long int. | sql | sql-server-2008 | database-design | null | null | null | open | mMS SQL 2008 data types
===
What are the different MS SQL 2008 data types?
I am specifically trying to find the equivalent of a long int. | 0 |
609,192 | 03/04/2009 04:10:37 | 48,067 | 12/20/2008 23:47:47 | 76 | 4 | javascript loading conditional statement | I've been struggling for days with getting rid of an error in IE, and to 'almost' no avail.
I just tried loading jquery 1.2.6 instead of 1.3.2, and the error has gone away (though the site is noticeably slower now).
However, I suspect I may be stuck with this solution. Is there a browser based way to include the script similar to the css conditional statements?
I can do it serverside if I need to, but client-side would be nice.
| javascript | internet-explorer | null | null | null | null | open | javascript loading conditional statement
===
I've been struggling for days with getting rid of an error in IE, and to 'almost' no avail.
I just tried loading jquery 1.2.6 instead of 1.3.2, and the error has gone away (though the site is noticeably slower now).
However, I suspect I may be stuck with this solution. Is there a browser based way to include the script similar to the css conditional statements?
I can do it serverside if I need to, but client-side would be nice.
| 0 |
9,019,590 | 01/26/2012 14:29:34 | 956,397 | 09/21/2011 07:38:09 | 2,476 | 227 | Use or avoid regexp? | As programmer I need to filter, search and validate data every day. For all those problems I need to decide if I use a regular expression or plain php.
Is there an best practices way? | php | regex | null | null | null | 01/26/2012 14:37:19 | not a real question | Use or avoid regexp?
===
As programmer I need to filter, search and validate data every day. For all those problems I need to decide if I use a regular expression or plain php.
Is there an best practices way? | 1 |
11,618,754 | 07/23/2012 19:00:51 | 1,446,460 | 06/09/2012 17:12:13 | 331 | 46 | How do I bottom margin words in a left column whenever there is a ul in a right column? | Right now I have an html setup where there is a top space with two column divs below. I am kind of new to css, and I want know if there is any way to bottom margin the words in the left div whenever there is a ul in the right div.
Here is the html:
<div id="resume">
<div id="heading">
</div>
<div class="resume-section">
<div class="left-col">
<p>word</p>
</div>
<div class="right-col">
<ul>
<li>something</li>
<li>something</li>
</ul>
</div>
</div>
</div>
I have tried
.resume-section > .left-col < .right-col > ul { margin-bottom:200px; }
and
.resume-section > .left-col , .right-col > ul { margin-bottom:200px; }
and nothing happened.
Any suggestions on how I can do this? I'll post a jsfiddle if you request one.
| html | css | null | null | null | null | open | How do I bottom margin words in a left column whenever there is a ul in a right column?
===
Right now I have an html setup where there is a top space with two column divs below. I am kind of new to css, and I want know if there is any way to bottom margin the words in the left div whenever there is a ul in the right div.
Here is the html:
<div id="resume">
<div id="heading">
</div>
<div class="resume-section">
<div class="left-col">
<p>word</p>
</div>
<div class="right-col">
<ul>
<li>something</li>
<li>something</li>
</ul>
</div>
</div>
</div>
I have tried
.resume-section > .left-col < .right-col > ul { margin-bottom:200px; }
and
.resume-section > .left-col , .right-col > ul { margin-bottom:200px; }
and nothing happened.
Any suggestions on how I can do this? I'll post a jsfiddle if you request one.
| 0 |
11,122,954 | 06/20/2012 15:29:43 | 759,880 | 05/18/2011 19:58:07 | 463 | 4 | How to forget remembered option in IDEA | I chose the option to open another project in the same window, and to have IDEA remember that, but I know I want to open multiple projects in separate windows. But IDEA remembers my first choice, and I couldn't find how to undo that. Any suggestion?
| intellij-idea | null | null | null | null | null | open | How to forget remembered option in IDEA
===
I chose the option to open another project in the same window, and to have IDEA remember that, but I know I want to open multiple projects in separate windows. But IDEA remembers my first choice, and I couldn't find how to undo that. Any suggestion?
| 0 |
9,464,652 | 02/27/2012 11:58:19 | 1,169,485 | 01/25/2012 15:16:03 | 1 | 0 | Huge scale MySQL database for stats storage - what do you recommend? | A project I am busy on now requires many different kinds of stats, most notably number of visits/views to a product detail page for a specific period of time. This would of course require storing each visit in a table, e.g.
id | visit_date (which will be a UNIX_TIMESTAMP()) | product_id | ip_address (for country-related stats)
This way stats can be generated per product and for a selected time-frame and (using a DB like MaxMind GeoIP) per city/country as well.
Only problem is this table will fill with millions and millions of records very quickly. Any recommendations on how I should approach this the most efficient way? | mysql | database | performance | optimization | scale | 02/28/2012 14:10:19 | not constructive | Huge scale MySQL database for stats storage - what do you recommend?
===
A project I am busy on now requires many different kinds of stats, most notably number of visits/views to a product detail page for a specific period of time. This would of course require storing each visit in a table, e.g.
id | visit_date (which will be a UNIX_TIMESTAMP()) | product_id | ip_address (for country-related stats)
This way stats can be generated per product and for a selected time-frame and (using a DB like MaxMind GeoIP) per city/country as well.
Only problem is this table will fill with millions and millions of records very quickly. Any recommendations on how I should approach this the most efficient way? | 4 |
11,029,625 | 06/14/2012 08:45:52 | 1,383,150 | 05/08/2012 21:18:57 | 1 | 0 | Best strategy for custom profile properties in MVC 3 | I need to implement some (maybe 10) custom properties for logged in users for my MVC3 vb.net web app.
These will define how certain data is displayed within my views.
I can think of a couple of possible solutions..
1 - Session variables. Will do the job but seems a bit untidy, and can't be strongly typed
2 - custom properties of the current user object; is that even possible?
3 - Custom profile provider. Looks like it might be a good option.
Has anyone got any tips on what worked well for them?
I already have custom membership and role providers that are working fine.
Thanks! | asp.net-mvc | vb.net | null | null | null | null | open | Best strategy for custom profile properties in MVC 3
===
I need to implement some (maybe 10) custom properties for logged in users for my MVC3 vb.net web app.
These will define how certain data is displayed within my views.
I can think of a couple of possible solutions..
1 - Session variables. Will do the job but seems a bit untidy, and can't be strongly typed
2 - custom properties of the current user object; is that even possible?
3 - Custom profile provider. Looks like it might be a good option.
Has anyone got any tips on what worked well for them?
I already have custom membership and role providers that are working fine.
Thanks! | 0 |
8,474,239 | 12/12/2011 12:21:55 | 940,267 | 09/12/2011 09:53:15 | 199 | 3 | How to get this google returned JSON parsed in java? | I am using google web service which returns a JSON to retrieve the current location with the GPS coordinates.
I am able to convert all the JSON using the java code but not this JSON alone.
Can anyone help me with this.
This is the json link.
[Click here][1]
[1]: http://maps.googleapis.com/maps/api/geocode/json?latlng=9.93402,78.130989&sensor=true
http://maps.googleapis.com/maps/api/geocode/json?latlng=9.93402,78.130989&sensor=true | android | json | web-services | google | location | null | open | How to get this google returned JSON parsed in java?
===
I am using google web service which returns a JSON to retrieve the current location with the GPS coordinates.
I am able to convert all the JSON using the java code but not this JSON alone.
Can anyone help me with this.
This is the json link.
[Click here][1]
[1]: http://maps.googleapis.com/maps/api/geocode/json?latlng=9.93402,78.130989&sensor=true
http://maps.googleapis.com/maps/api/geocode/json?latlng=9.93402,78.130989&sensor=true | 0 |
3,262,672 | 07/16/2010 07:11:43 | 389,200 | 07/12/2010 05:12:35 | 3 | 0 | Inventory Management System in 3 Hours? | **Inventory Requisition Process:**
Whenever a user requires inventory, user generates an inventory requisition, and if the inventory is available, the inventory will be directly issued and user’s inventory account will be updated. In case the inventory is not available, the purchase order will be generated for the required inventory to the corresponding vendor and sent to the vendor. Once the purchase order is received back, it will be updated as per the received inventory items. Finally the payment of the purchase order will be made. Hence the inventory will be updated accordingly. Once the inventory becomes available, based on inventory requisition, it will be issued to the end user, and the user’s inventory account will be updated.
----------
**Test Requirement:**
On the basis of Inventory Management System, business process, and system design provided to you, you are required to develop “Inventory Management” and “Purchase Order Management” modules. You can use language of your choice for developing the given system.
**Inventory Management Module:**
Inventory Management Module handles the inventory requisition, inventory issuance, and inventory stocks maintenance.
**Purchase Order Management Module:**
Purchase Order Management Module handles the purchase order generation and purchase order receiving.
----------
**My Question**<br>
What will be strategy you use to develop this type of application in 3 Hours to achieve target.
1. **Application Type**
<br>Asp.net Application or Winform Application
2. **Architecture**
<br>Should we make proper classes for all entity and then work on it? and stored procedures. Or just working on controls value and pass run time SQL quires?
2. **Database Design**
<br>What would be the ERD of this Application?
2. **Reference Material**
<br>Please give reference of materials where i can demo online these modules?
| database | database-design | inventory | purchase-order | null | 07/16/2010 07:27:11 | not a real question | Inventory Management System in 3 Hours?
===
**Inventory Requisition Process:**
Whenever a user requires inventory, user generates an inventory requisition, and if the inventory is available, the inventory will be directly issued and user’s inventory account will be updated. In case the inventory is not available, the purchase order will be generated for the required inventory to the corresponding vendor and sent to the vendor. Once the purchase order is received back, it will be updated as per the received inventory items. Finally the payment of the purchase order will be made. Hence the inventory will be updated accordingly. Once the inventory becomes available, based on inventory requisition, it will be issued to the end user, and the user’s inventory account will be updated.
----------
**Test Requirement:**
On the basis of Inventory Management System, business process, and system design provided to you, you are required to develop “Inventory Management” and “Purchase Order Management” modules. You can use language of your choice for developing the given system.
**Inventory Management Module:**
Inventory Management Module handles the inventory requisition, inventory issuance, and inventory stocks maintenance.
**Purchase Order Management Module:**
Purchase Order Management Module handles the purchase order generation and purchase order receiving.
----------
**My Question**<br>
What will be strategy you use to develop this type of application in 3 Hours to achieve target.
1. **Application Type**
<br>Asp.net Application or Winform Application
2. **Architecture**
<br>Should we make proper classes for all entity and then work on it? and stored procedures. Or just working on controls value and pass run time SQL quires?
2. **Database Design**
<br>What would be the ERD of this Application?
2. **Reference Material**
<br>Please give reference of materials where i can demo online these modules?
| 1 |
8,170,899 | 11/17/2011 16:41:15 | 955,237 | 09/20/2011 16:33:30 | 62 | 1 | Access denied for user 'root'@'localhost' (using password: YES) Works sometimes rails | I have a couple of versions of a project that run with mysql2. I have a version on my desktop which works fine. However i uploaded it on svn and that also works. After a colleague of mine added some css files now it stopped working. It gives the above error. Previously i had problems with passwords etc which gave the same error which i resolved. Now the version on my desktop alone works however the source controlled version is not working. Any idea where i should check for any problems? I also added a mysql dump file into the project folder. | mysql | ruby-on-rails | ruby | ruby-on-rails-3 | mysqldump | null | open | Access denied for user 'root'@'localhost' (using password: YES) Works sometimes rails
===
I have a couple of versions of a project that run with mysql2. I have a version on my desktop which works fine. However i uploaded it on svn and that also works. After a colleague of mine added some css files now it stopped working. It gives the above error. Previously i had problems with passwords etc which gave the same error which i resolved. Now the version on my desktop alone works however the source controlled version is not working. Any idea where i should check for any problems? I also added a mysql dump file into the project folder. | 0 |
7,393,071 | 09/12/2011 19:43:05 | 691,993 | 04/04/2011 23:39:49 | 13 | 1 | ActiveAndroid, db4o, Ormlite — which one to use? | I wonder if someone could share his experience of using these db frameworks for ORM in Android. Let's try to find a winner! | android | db4o | ormlite | activeandroid | null | 09/13/2011 14:15:31 | not constructive | ActiveAndroid, db4o, Ormlite — which one to use?
===
I wonder if someone could share his experience of using these db frameworks for ORM in Android. Let's try to find a winner! | 4 |
7,129,718 | 08/20/2011 04:44:59 | 40,536 | 11/25/2008 06:37:47 | 110 | 1 | Are there anything like Facebook game platform where users from the website can play multiplayer games developed by third party developers? | I would like to also know the complexity or any tips for building such a system. I would like to create a game platform website and just create a user community around it and leave the app developers create short simple multiplayer games. The user community from my platform(which would be a website) would be able to play these third party developer games with and against one another. Any suggestion or reference of such existing systems would be of great help. | social | multiplayer | web2.0 | null | null | 08/20/2011 23:15:24 | off topic | Are there anything like Facebook game platform where users from the website can play multiplayer games developed by third party developers?
===
I would like to also know the complexity or any tips for building such a system. I would like to create a game platform website and just create a user community around it and leave the app developers create short simple multiplayer games. The user community from my platform(which would be a website) would be able to play these third party developer games with and against one another. Any suggestion or reference of such existing systems would be of great help. | 2 |
8,252,860 | 11/24/2011 06:11:03 | 992,716 | 10/13/2011 05:02:47 | 1 | 0 | Pygame move object position from one point to another at constant speed | I have a bunch of objects at different coordinates, and I need to animate them moving to another coordinate
ie.
one object is at coodinate (234,30) and I need it to go to (310,540).
How do I do this in pygame? I tried messing around with slope and stuff like that but I couldn't get my object,s position to smoothly go there.
Thanks. | python | animation | pygame | null | null | null | open | Pygame move object position from one point to another at constant speed
===
I have a bunch of objects at different coordinates, and I need to animate them moving to another coordinate
ie.
one object is at coodinate (234,30) and I need it to go to (310,540).
How do I do this in pygame? I tried messing around with slope and stuff like that but I couldn't get my object,s position to smoothly go there.
Thanks. | 0 |
32,454 | 08/28/2008 14:43:55 | 2,871 | 08/25/2008 16:56:00 | 1 | 1 | Helpful snippits? | I'm a relatively new coder, and I'm looking to increase my snippits library. What are some of your most used snippits? I'm mainly looking for ones that I might not have thought about until I've had more experience, but will make me more productive.
Have a snippit that is particularly clever? Post it! | code-snippets | null | null | null | null | 04/19/2012 15:15:37 | not constructive | Helpful snippits?
===
I'm a relatively new coder, and I'm looking to increase my snippits library. What are some of your most used snippits? I'm mainly looking for ones that I might not have thought about until I've had more experience, but will make me more productive.
Have a snippit that is particularly clever? Post it! | 4 |
5,400,757 | 03/23/2011 03:58:29 | 672,360 | 03/23/2011 03:58:29 | 1 | 0 | how to call method from java file in javascript? | i am new in javascript. i want to know how to call a simple method in java file from javascript program. could you please give me a simple example as well?
thank you | java | javascript | methods | null | null | null | open | how to call method from java file in javascript?
===
i am new in javascript. i want to know how to call a simple method in java file from javascript program. could you please give me a simple example as well?
thank you | 0 |
9,633,618 | 03/09/2012 11:52:34 | 1,259,221 | 03/09/2012 11:48:39 | 1 | 0 | UserWarning: libxml2 not available | At the end of a migration of my zope2.9.6 from a gentoo distribution to a cento5 one in which i compiled a specific python version (python-2.4.6) used for running zope when i run
/opt/instances/zope-2.9.6/bin/runzope
i got the following warning
/opt/instances/zope-2.9.6/Products/Marshall/handlers/__init__.py:38: UserWarning: libxml2 not available. Unable to register libxml2 based marshallers
warnings.warn('libxml2 not available. Unable to register libxml2 based ' \
how can i solve this issue? | plone | libxml2 | null | null | null | null | open | UserWarning: libxml2 not available
===
At the end of a migration of my zope2.9.6 from a gentoo distribution to a cento5 one in which i compiled a specific python version (python-2.4.6) used for running zope when i run
/opt/instances/zope-2.9.6/bin/runzope
i got the following warning
/opt/instances/zope-2.9.6/Products/Marshall/handlers/__init__.py:38: UserWarning: libxml2 not available. Unable to register libxml2 based marshallers
warnings.warn('libxml2 not available. Unable to register libxml2 based ' \
how can i solve this issue? | 0 |
10,159,535 | 04/15/2012 04:35:00 | 1,334,088 | 04/15/2012 04:20:46 | 1 | 0 | SYN flod DDoS attack | I want to do a project on SYN flood DDoS attack. I got source code from [this site][1]. No bugs, runs properly. But it cannot stop services of any website. Should I add any additional code to this source or by this source it is not possible to stop services of any site.
[1]: http://www.binarytides.com/blog/syn-flood-dos-attack/ | c | attach | ddos | null | null | 04/16/2012 14:39:33 | not a real question | SYN flod DDoS attack
===
I want to do a project on SYN flood DDoS attack. I got source code from [this site][1]. No bugs, runs properly. But it cannot stop services of any website. Should I add any additional code to this source or by this source it is not possible to stop services of any site.
[1]: http://www.binarytides.com/blog/syn-flood-dos-attack/ | 1 |
3,216,971 | 07/09/2010 22:35:20 | 407,502 | 06/25/2010 16:20:39 | 50 | 9 | Is there a per-method cost to object instantiation in Java? | I am hearing from another developer that an object is too expensive to instantiate repeatedly because "it has a bunch of methods."
My understanding (from Bloch, mostly) was that object creation is costly mostly through things done explicitly in the constructor, especially creating other expensive objects.
Is there a per-method cost for a new object in Java? I'm thinking not, but I need references if anyone has them.
Thanks! | java | null | null | null | null | null | open | Is there a per-method cost to object instantiation in Java?
===
I am hearing from another developer that an object is too expensive to instantiate repeatedly because "it has a bunch of methods."
My understanding (from Bloch, mostly) was that object creation is costly mostly through things done explicitly in the constructor, especially creating other expensive objects.
Is there a per-method cost for a new object in Java? I'm thinking not, but I need references if anyone has them.
Thanks! | 0 |
9,142,511 | 02/04/2012 16:44:50 | 1,165,727 | 01/23/2012 20:11:02 | 5 | 0 | Castor Generated Classes (XML Marshalling) - XSD Unavailable | I recently moved to a project where I noticed there have a specific requirement to store some data as XML.
The prior team used Castor generated classes to Marshall and Unmarshall the data.
I have a new requirement now that requires me to add some additional (yet optional) fields to this XML. However I realized the prior team supposedly never checked in the XSD at all and I have no way to reach out to them.
The XSD for sure was large and complex since it is responsible for generating around 50 classes. So writing the XSD again is going to be error prone and also a risk that I might end up creating XMLs now that are in compatible with the old XML.
The other alternative I thought of was using a tool like XML Spy and try to reverse engineer the XSD from the XML, however that sounds a bit difficult too since I will need to reverse engineer 20 odd XMLs to generate XSDs and then merge all these XSDs into one, since the XML had several optional sections. There is still an element of error possible in this approach.
The best option I can think of is reverse engineering the classes to an XSD - however Castor supposedly does not support this feature. So I don't have the means to convert these Castor generated classes back to an XSD! While the classes generated by Castor do have some Castor specific methods, in essence they are Pojos if the Castor specific methods are ignored!
Do we have any suggestions here for getting or generating the XSD from java classes? Do we have any other suggestions to solve the issues I discussed?
Thank you.
| xsd | xml-schema | reverse-engineering | castor | jaxp | null | open | Castor Generated Classes (XML Marshalling) - XSD Unavailable
===
I recently moved to a project where I noticed there have a specific requirement to store some data as XML.
The prior team used Castor generated classes to Marshall and Unmarshall the data.
I have a new requirement now that requires me to add some additional (yet optional) fields to this XML. However I realized the prior team supposedly never checked in the XSD at all and I have no way to reach out to them.
The XSD for sure was large and complex since it is responsible for generating around 50 classes. So writing the XSD again is going to be error prone and also a risk that I might end up creating XMLs now that are in compatible with the old XML.
The other alternative I thought of was using a tool like XML Spy and try to reverse engineer the XSD from the XML, however that sounds a bit difficult too since I will need to reverse engineer 20 odd XMLs to generate XSDs and then merge all these XSDs into one, since the XML had several optional sections. There is still an element of error possible in this approach.
The best option I can think of is reverse engineering the classes to an XSD - however Castor supposedly does not support this feature. So I don't have the means to convert these Castor generated classes back to an XSD! While the classes generated by Castor do have some Castor specific methods, in essence they are Pojos if the Castor specific methods are ignored!
Do we have any suggestions here for getting or generating the XSD from java classes? Do we have any other suggestions to solve the issues I discussed?
Thank you.
| 0 |
10,379,266 | 04/30/2012 06:13:21 | 942,533 | 09/13/2011 12:29:54 | 68 | 0 | C# program to track in which drive it should be installed and keeping a track | I have an issue. could not resolve it So posting it here. Actually when any installation goes on it will asked to the user in which drive we should install. So it installs there and keeps a track of where it got installed.
So in the same way i wish to ask the user by a C# program in which drive he wants to keep a file and later I should be able to track it.
I mean to Say suppose the user installs in C drive later he uninstalls it and installs in D drive. I wish to know in which drive it is being put not by searching but in any other way. Like a registry or so which i can check where it is and get the details from it.
Kindly help me.
Thanks,
Sindhu | c# | windows | winforms | null | null | null | open | C# program to track in which drive it should be installed and keeping a track
===
I have an issue. could not resolve it So posting it here. Actually when any installation goes on it will asked to the user in which drive we should install. So it installs there and keeps a track of where it got installed.
So in the same way i wish to ask the user by a C# program in which drive he wants to keep a file and later I should be able to track it.
I mean to Say suppose the user installs in C drive later he uninstalls it and installs in D drive. I wish to know in which drive it is being put not by searching but in any other way. Like a registry or so which i can check where it is and get the details from it.
Kindly help me.
Thanks,
Sindhu | 0 |
8,989,332 | 01/24/2012 15:22:57 | 1,167,273 | 01/24/2012 14:56:24 | 1 | 0 | Not sure what type of Excel formula (SUM, SUMIF ect...) to use for my calculation, can you get me going in the right direction? | In Excel Formulas there are so many different functions, that I am not sure which to use to get started. So if I were to give you an example could you point me in the right direction for learning what I need to do?
Ok so say you want 6 Apples (D3)
And you want 3 oranges (D4) (also buying 1-7 apples gets you 1 orange free so they only need to pay for 2 oranges but if they buy 8-14 they get 2 oranges free and if they buy 15-21 they would get 3 oranges free and so on and so on. multiples of 7 apples get you a free orange)
And 5 grapes (D5) (these are sold by the 3, so no matter if you buy 5 you get charged 2 because these are only sold in 3's)
And 4 Bananas (D6) (sold by the each)
So is there a way to formulate this and make it all be one price in I3? The prices are D3=E11, D4=E12, D5=E13 and D6=E14 but for some reason it will not pick anything up past D4=E12, the code stops changing colors when I am putting in the formula.
Not sure if this makes any sense so any help you can give would be greatly appreciated!
| excel | formulas | null | null | null | null | open | Not sure what type of Excel formula (SUM, SUMIF ect...) to use for my calculation, can you get me going in the right direction?
===
In Excel Formulas there are so many different functions, that I am not sure which to use to get started. So if I were to give you an example could you point me in the right direction for learning what I need to do?
Ok so say you want 6 Apples (D3)
And you want 3 oranges (D4) (also buying 1-7 apples gets you 1 orange free so they only need to pay for 2 oranges but if they buy 8-14 they get 2 oranges free and if they buy 15-21 they would get 3 oranges free and so on and so on. multiples of 7 apples get you a free orange)
And 5 grapes (D5) (these are sold by the 3, so no matter if you buy 5 you get charged 2 because these are only sold in 3's)
And 4 Bananas (D6) (sold by the each)
So is there a way to formulate this and make it all be one price in I3? The prices are D3=E11, D4=E12, D5=E13 and D6=E14 but for some reason it will not pick anything up past D4=E12, the code stops changing colors when I am putting in the formula.
Not sure if this makes any sense so any help you can give would be greatly appreciated!
| 0 |
110,390 | 09/21/2008 06:25:02 | 18,658 | 09/19/2008 08:49:09 | 461 | 45 | What's a good Common Lisp implementation for Windows? | What's your favourite? | common-lisp | lisp | implementation | language-implementation | recommendation | 05/05/2012 13:37:25 | not constructive | What's a good Common Lisp implementation for Windows?
===
What's your favourite? | 4 |
7,883,436 | 10/25/2011 00:29:06 | 663,341 | 03/16/2011 21:44:30 | 326 | 9 | Why is the C++ For Loop stopping by itself? | This is really weird :S
Below in my code, I have a nested for loop of i and j. When I enter the value of 6 for n (when the program prompts for input) the for loop simply doesn't iterate properly, it stops at random places and continues with new values of i.
For n = 6, below is what stderr outputs (for values of i and j that I threw in for debugging inside my code)
(COMING IN NEXT UPDATE OF QUESTION)
#include <iostream>
#include <fstream>
#include <sstream>
#include <vector>
#include <algorithm>
#include <map>
#include <set>
#include <stack>
#include <queue>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <cctype>
#include <ctime>
#define DEBUG
using namespace std;
int main ()
{
#ifndef DEBUG
freopen ("DATA4.txt","r",stdin);
freopen ("OUT4.txt","w",stdout);
#endif
for (int _t=0;_t<5;_t++){
int n;
cin>>n;
set<pair<int,int> > poss;
for (int i = 1; i<=n; i++){
for (int j = 1; j<=n; j++){
cerr<<i<<" "<<j<<endl; //Why doesn't this show results 1 1 then 1 2 then 1 3, why does it go to 2 2?
//cerr<<n<<endl;
if (i*j<=n){
int tmp1 = i, tmp2 = j;
i = max(tmp1,tmp2);
j = min(tmp1,tmp2);
//cerr<<i<<" "<<j<<endl;
poss.insert(make_pair(i,j));
}
}
}
cout<<poss.size()<<endl;
}
return 0;
}
| c++ | null | null | null | null | 10/25/2011 01:03:44 | not a real question | Why is the C++ For Loop stopping by itself?
===
This is really weird :S
Below in my code, I have a nested for loop of i and j. When I enter the value of 6 for n (when the program prompts for input) the for loop simply doesn't iterate properly, it stops at random places and continues with new values of i.
For n = 6, below is what stderr outputs (for values of i and j that I threw in for debugging inside my code)
(COMING IN NEXT UPDATE OF QUESTION)
#include <iostream>
#include <fstream>
#include <sstream>
#include <vector>
#include <algorithm>
#include <map>
#include <set>
#include <stack>
#include <queue>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <cctype>
#include <ctime>
#define DEBUG
using namespace std;
int main ()
{
#ifndef DEBUG
freopen ("DATA4.txt","r",stdin);
freopen ("OUT4.txt","w",stdout);
#endif
for (int _t=0;_t<5;_t++){
int n;
cin>>n;
set<pair<int,int> > poss;
for (int i = 1; i<=n; i++){
for (int j = 1; j<=n; j++){
cerr<<i<<" "<<j<<endl; //Why doesn't this show results 1 1 then 1 2 then 1 3, why does it go to 2 2?
//cerr<<n<<endl;
if (i*j<=n){
int tmp1 = i, tmp2 = j;
i = max(tmp1,tmp2);
j = min(tmp1,tmp2);
//cerr<<i<<" "<<j<<endl;
poss.insert(make_pair(i,j));
}
}
}
cout<<poss.size()<<endl;
}
return 0;
}
| 1 |
8,503,297 | 12/14/2011 10:55:00 | 1,097,627 | 12/14/2011 10:53:25 | 1 | 0 | Oracle SQL query | "select f.equipment_ID, f.LOT_NUM from fab.drill_solas f where f.equipment_ID = (select a.equipment_ID from fab.drill_solas a where (sysdate-a.prod_date) <=31 and a.prod_date = maxdate and group by a.EQUIPMENT_ID ) and f.prod_date = (select max(l.prod_date) as maxdate from fab.drill_solas l where (sysdate-l.prod_date) <=31 and l.equipment_ID=f.equipment_ID group by l.EQUIPMENT_ID) and (sysdate-f.prod_date)<=31"
I think my query is very wrong...
but i can't think of a better way for the sub query | sql | oracle | null | null | null | 12/14/2011 21:22:56 | not a real question | Oracle SQL query
===
"select f.equipment_ID, f.LOT_NUM from fab.drill_solas f where f.equipment_ID = (select a.equipment_ID from fab.drill_solas a where (sysdate-a.prod_date) <=31 and a.prod_date = maxdate and group by a.EQUIPMENT_ID ) and f.prod_date = (select max(l.prod_date) as maxdate from fab.drill_solas l where (sysdate-l.prod_date) <=31 and l.equipment_ID=f.equipment_ID group by l.EQUIPMENT_ID) and (sysdate-f.prod_date)<=31"
I think my query is very wrong...
but i can't think of a better way for the sub query | 1 |
3,350,029 | 07/28/2010 04:54:41 | 243,613 | 01/05/2010 02:18:31 | 1,499 | 64 | CURL vs fsockopen chunking | This may seem kind of weird.. but I need to evaluate/parse chunks being sent over HTTP with PHP.
It's of note to say that the HTTP stream may never end. Is there any way I can parse chunks **as I get them** with CURL?
Or do I have to resort to some home-brewed `fsockopen()` solution? | php | curl | chunked-encoding | fsockopen | null | null | open | CURL vs fsockopen chunking
===
This may seem kind of weird.. but I need to evaluate/parse chunks being sent over HTTP with PHP.
It's of note to say that the HTTP stream may never end. Is there any way I can parse chunks **as I get them** with CURL?
Or do I have to resort to some home-brewed `fsockopen()` solution? | 0 |
6,854,695 | 07/28/2011 06:04:05 | 866,802 | 07/28/2011 06:04:05 | 1 | 0 | Problem making a button bigger using animation in WPF | I have a button of a certain size. When I use a storyboard etc. to enlarge it, it gets clipped to the original button size even though it is enlarging. | wpf | animation | null | null | null | 07/28/2011 11:20:18 | not a real question | Problem making a button bigger using animation in WPF
===
I have a button of a certain size. When I use a storyboard etc. to enlarge it, it gets clipped to the original button size even though it is enlarging. | 1 |
6,835,965 | 07/26/2011 20:10:19 | 509,677 | 11/16/2010 15:22:29 | 199 | 10 | Rails 3 / Ajax - Turning link_to into a Jquery link | I'm attempting to change a hyperlink into a ajax link. That way I can link to an external target while updating model data without having to send the user to a custom controller action to handle a post/redirect.
My application is a basic image gallery, each image links to an external website:
Here's my partial _pictures.html.erb:
<% @galleries.each do |g| %>
<% for image in g.images %>
<div id="picture">
<%= render 'top_nav'%>
<%= link_to g.source, :target => true do %>
<%= image_tag image.file_url(:preview) %>
<% end %>
<%= will_paginate(@galleries, :next_label => "Forward", :previous_label => "Previous") %>
</div>
<br />
<div class="image_description">
<h2>
<%= g.title %>,
<span class="time">
<%= distance_of_time_in_words(g.created_at, Time.now, include_seconds = false)%> ago
</span>
</h2>
</div>
<% end %>
<% end %>
Which is rendered on my index.html.erb:
<h1>Share and click images to unlock more...</h1>
<div id="galleries">
<%= render 'pictures' %>
</div>
I believe I've been able to change the link into an ajax link with the follow in application.js:
$(function() {
$("#picture a").live("click", function() {
return false;
});
});
As the link_to doesn't work (which I expected). Now, I'm trying to write the handler(not sure if that's the correct word) in the index.js.erb, I know this is way wrong, but what I've pieced together is:
$("#picture").html.("<%= escape_javascript(render)("pictures")) %>")
How do I get this link back working, but with via javascript? And if I wanted to make an ajax call to a model method, where would I begin writing that code, in application.js or index.js.erb?
Obligatory defense mechanism: I suck at javascript.
| jquery | ruby-on-rails | ajax | ruby-on-rails-3 | null | null | open | Rails 3 / Ajax - Turning link_to into a Jquery link
===
I'm attempting to change a hyperlink into a ajax link. That way I can link to an external target while updating model data without having to send the user to a custom controller action to handle a post/redirect.
My application is a basic image gallery, each image links to an external website:
Here's my partial _pictures.html.erb:
<% @galleries.each do |g| %>
<% for image in g.images %>
<div id="picture">
<%= render 'top_nav'%>
<%= link_to g.source, :target => true do %>
<%= image_tag image.file_url(:preview) %>
<% end %>
<%= will_paginate(@galleries, :next_label => "Forward", :previous_label => "Previous") %>
</div>
<br />
<div class="image_description">
<h2>
<%= g.title %>,
<span class="time">
<%= distance_of_time_in_words(g.created_at, Time.now, include_seconds = false)%> ago
</span>
</h2>
</div>
<% end %>
<% end %>
Which is rendered on my index.html.erb:
<h1>Share and click images to unlock more...</h1>
<div id="galleries">
<%= render 'pictures' %>
</div>
I believe I've been able to change the link into an ajax link with the follow in application.js:
$(function() {
$("#picture a").live("click", function() {
return false;
});
});
As the link_to doesn't work (which I expected). Now, I'm trying to write the handler(not sure if that's the correct word) in the index.js.erb, I know this is way wrong, but what I've pieced together is:
$("#picture").html.("<%= escape_javascript(render)("pictures")) %>")
How do I get this link back working, but with via javascript? And if I wanted to make an ajax call to a model method, where would I begin writing that code, in application.js or index.js.erb?
Obligatory defense mechanism: I suck at javascript.
| 0 |
10,951,631 | 06/08/2012 15:20:42 | 1,240,522 | 02/29/2012 14:42:03 | 1 | 0 | CherryPy always returning HTTP 200 | I'm having a bit of a problem when browsing to a non-existent resource. I get a response code of 200 instead of 404.
I'm using the MethodDispatcher and I have a class that overloads the __getattr__ method to instantiate a resource if a child exists or to return AttributeError if one doesn't. My class is always returning the AttributeError correctly, but the data I actually get is always from the last good resource.
Here's a simplified (except for __getattr__) version of my class:
class BaseResource(object):
exposed = True
def __init__(self, name):
self.children = [] # Pretend this has child resources
def __getattr__(self, name):
if name in self._children:
uuid, application, obj_type, server = self._children[name]
try:
resource = getattr(app[application], obj_type)
except AttributeError as e:
raise cherrypy.HTTPError(500, e)
return resource(uuid)
else:
raise AttributeError('Child with name \'{}\' could not be found.'.format(name))
def GET(self):
cherrypy.log.error('*** {} not found, raising AttributeError'.format(name))
return 'GET request for {}'.format(self._name)
So fetching I get the following when I browse to the following resources:
http://localhost:8000/users - This resource exists, so it returns it correctly.
http://localhost:8000/users/fake - This returns the "users" resource giving an HTTP 200.
http://localhost:8000/users/fake/reallyfake - This returns the "users" resource again.
So my question is, where can I start looking to find out why my code isn't returning a 404 for a non-existent resource. I'm sure I've done something wrong, but I'm not sure what. | python | cherrypy | null | null | null | 06/16/2012 09:10:18 | too localized | CherryPy always returning HTTP 200
===
I'm having a bit of a problem when browsing to a non-existent resource. I get a response code of 200 instead of 404.
I'm using the MethodDispatcher and I have a class that overloads the __getattr__ method to instantiate a resource if a child exists or to return AttributeError if one doesn't. My class is always returning the AttributeError correctly, but the data I actually get is always from the last good resource.
Here's a simplified (except for __getattr__) version of my class:
class BaseResource(object):
exposed = True
def __init__(self, name):
self.children = [] # Pretend this has child resources
def __getattr__(self, name):
if name in self._children:
uuid, application, obj_type, server = self._children[name]
try:
resource = getattr(app[application], obj_type)
except AttributeError as e:
raise cherrypy.HTTPError(500, e)
return resource(uuid)
else:
raise AttributeError('Child with name \'{}\' could not be found.'.format(name))
def GET(self):
cherrypy.log.error('*** {} not found, raising AttributeError'.format(name))
return 'GET request for {}'.format(self._name)
So fetching I get the following when I browse to the following resources:
http://localhost:8000/users - This resource exists, so it returns it correctly.
http://localhost:8000/users/fake - This returns the "users" resource giving an HTTP 200.
http://localhost:8000/users/fake/reallyfake - This returns the "users" resource again.
So my question is, where can I start looking to find out why my code isn't returning a 404 for a non-existent resource. I'm sure I've done something wrong, but I'm not sure what. | 3 |
11,132,892 | 06/21/2012 06:45:26 | 645,127 | 03/04/2011 16:50:43 | 719 | 27 | How to remove cloned git repo from a second git repo? | I accidentally added a cloned git repository to a working copy clone of my repository, and pushed the changes to my remote. I did not use git submodule to do that, but rather did something like "git add somedir.git".
Now whenever I clone my repo, I get an empty "somedir.git" directory. I cannot do a "git rm -r somedir", because git complains "somedir.git is a directory".
How can I get rid of this directory or convert it into a proper submodule? The directory is completely empty after cloning, not even a .git/ folder in there. | git | git-submodules | null | null | null | null | open | How to remove cloned git repo from a second git repo?
===
I accidentally added a cloned git repository to a working copy clone of my repository, and pushed the changes to my remote. I did not use git submodule to do that, but rather did something like "git add somedir.git".
Now whenever I clone my repo, I get an empty "somedir.git" directory. I cannot do a "git rm -r somedir", because git complains "somedir.git is a directory".
How can I get rid of this directory or convert it into a proper submodule? The directory is completely empty after cloning, not even a .git/ folder in there. | 0 |
4,486,919 | 12/20/2010 04:41:15 | 548,206 | 12/20/2010 04:41:15 | 1 | 0 | How to Add contacts to Windows Live Mail using C# | Am writing an application to add contacts to windows Live mailbut i cant find any document on that. And also i dont know if is the same as the outlook....Cant find even the dll for that
Thanks hope someone can help | c# | windows | email | live | null | null | open | How to Add contacts to Windows Live Mail using C#
===
Am writing an application to add contacts to windows Live mailbut i cant find any document on that. And also i dont know if is the same as the outlook....Cant find even the dll for that
Thanks hope someone can help | 0 |
1,843,221 | 12/03/2009 21:57:19 | 224,269 | 12/03/2009 21:17:44 | 1 | 0 | Restrict method access to a specific class in C++ | I have two closely related classes which I'll call Widget and Sprocket. Sprocket has a set of methods which I want to be callable from Widget but not from any other class. I also don't want to just declare Widget a friend of Spocket because that would give Widget access to ALL protected and private members. I want to restrict Widget's access to only a specific set of methods.
One solution I came up with is to create a nested class inside Sprocket that contains wrappers for these methods and make Widget a friend of this nested class. For example:
class Sprocket
{
public:
class WidgetInterface
{
friend class Widget;
WidgetInterface(Sprocket* parent) : mParent(parent) {}
private:
void A() { mParent->A(); }
void B() { mParent->B(); }
Sprocket* mParent;
};
private:
void A() { ... }
void B() { ... }
};
class Widget
{
public:
Widget(Sprocket* sprock) : mSprocketIface(sprock) {}
void doStuff() { mSprocketIface.A(); } // Widget can call Sprocket::A()
private:
Sprocket::WidgetInterface mSprocketIface;
};
This results in some code duplication because the method signatures are now declared in two places, but it works. But now suppose I want to add a subclass of Widget called SpecialWidget and I want that class to also have access to the Sprocket methods. I can simply add this new class to the Sprocket friends list or I can add yet another set of protected wrappers in Widget that SpecialWidget (and any other subclass) can access but you can see that this is now becoming a maintenance issue. I don't want to have to update the friends list or the wrappers if I add new classes or change the method signature. If I use the "add another set of wrappers" approach, the method signatures will be duplicated in three places!
Does anyone know of a simpler, cleaner way to do this? | c++ | inheritance | null | null | null | null | open | Restrict method access to a specific class in C++
===
I have two closely related classes which I'll call Widget and Sprocket. Sprocket has a set of methods which I want to be callable from Widget but not from any other class. I also don't want to just declare Widget a friend of Spocket because that would give Widget access to ALL protected and private members. I want to restrict Widget's access to only a specific set of methods.
One solution I came up with is to create a nested class inside Sprocket that contains wrappers for these methods and make Widget a friend of this nested class. For example:
class Sprocket
{
public:
class WidgetInterface
{
friend class Widget;
WidgetInterface(Sprocket* parent) : mParent(parent) {}
private:
void A() { mParent->A(); }
void B() { mParent->B(); }
Sprocket* mParent;
};
private:
void A() { ... }
void B() { ... }
};
class Widget
{
public:
Widget(Sprocket* sprock) : mSprocketIface(sprock) {}
void doStuff() { mSprocketIface.A(); } // Widget can call Sprocket::A()
private:
Sprocket::WidgetInterface mSprocketIface;
};
This results in some code duplication because the method signatures are now declared in two places, but it works. But now suppose I want to add a subclass of Widget called SpecialWidget and I want that class to also have access to the Sprocket methods. I can simply add this new class to the Sprocket friends list or I can add yet another set of protected wrappers in Widget that SpecialWidget (and any other subclass) can access but you can see that this is now becoming a maintenance issue. I don't want to have to update the friends list or the wrappers if I add new classes or change the method signature. If I use the "add another set of wrappers" approach, the method signatures will be duplicated in three places!
Does anyone know of a simpler, cleaner way to do this? | 0 |
8,974,406 | 01/23/2012 15:51:13 | 1,101,686 | 12/16/2011 09:57:39 | 30 | 1 | function to submit forms one after the other | Can someone help me please.
I have the following (simplified) code.
function save_all_des(){
document.getElementById("form_zoom1").submit();
document.getElementById("form_zoom2").submit();
}
I am submitting two forms, which have input of the same names but with different values. Individually they submit ok. Also in IE9 they submit correctly when called as shown. However in FF only the second works.
It appears that the second is submitting over the first. I've tried using separate functions but they too seem to run at the same time. How do I make sure the code behind the form submittal is fininshed before the second submission? I have used jquery a little but I don't know how to use callback and ajax (yet).
Any help appreciated.
Thanks | javascript | jquery | forms | callback | null | null | open | function to submit forms one after the other
===
Can someone help me please.
I have the following (simplified) code.
function save_all_des(){
document.getElementById("form_zoom1").submit();
document.getElementById("form_zoom2").submit();
}
I am submitting two forms, which have input of the same names but with different values. Individually they submit ok. Also in IE9 they submit correctly when called as shown. However in FF only the second works.
It appears that the second is submitting over the first. I've tried using separate functions but they too seem to run at the same time. How do I make sure the code behind the form submittal is fininshed before the second submission? I have used jquery a little but I don't know how to use callback and ajax (yet).
Any help appreciated.
Thanks | 0 |
2,994,796 | 06/08/2010 04:44:33 | 350,522 | 05/26/2010 04:20:46 | 8 | 0 | Warning: implode() [function.implode]: on Wordpress page | I just moved a wordpress site from one server to another, and I keep getting this error.
Warning: implode() [function.implode]: Invalid arguments passed in /home/finer/public_html/wp-content/themes/barely-corporate/template_portfolio.php on line 41
I have been on the Wordpress support site but couldn't find a solution. Can someone please HELP!? Here is the link to the page where the error keeps coming up:
[http://finerthingsforher.com/?page_id=14][1]
[1]: http://finerthingsforher.com/?page_id=14 | wordpress | function | implode | null | null | 06/08/2010 09:54:28 | not a real question | Warning: implode() [function.implode]: on Wordpress page
===
I just moved a wordpress site from one server to another, and I keep getting this error.
Warning: implode() [function.implode]: Invalid arguments passed in /home/finer/public_html/wp-content/themes/barely-corporate/template_portfolio.php on line 41
I have been on the Wordpress support site but couldn't find a solution. Can someone please HELP!? Here is the link to the page where the error keeps coming up:
[http://finerthingsforher.com/?page_id=14][1]
[1]: http://finerthingsforher.com/?page_id=14 | 1 |
10,407,273 | 05/02/2012 03:20:30 | 1,369,062 | 05/02/2012 03:08:38 | 1 | 0 | Can an Android app running on a WiFi hotspot-enabled phone 'see' the LAN? | I have a phone that's capable of being a WiFi-hotspot. Our sporting group has an application that runs on both Android and iOS and can talk to each other over a WiFi access point (the IP of the device is displayed, and that IP address is entered into any other device that wants to talk to this device. They're all on the same subnet, and don't need internet access, they just want to talk to each other).
We frequently use the phones as WiFi hotspots, and everything works EXCEPT for if the application is brought up on the phone that has the WiFi hotspot enabled -- Then it thinks there's no WiFi available.
The question is: Can an application that's running on the WiFi hotspot-enabled phone use the LAN at all, or can it only 'see' the WAN interface? | android | networking | wifi | personal-hotspot | null | 05/02/2012 03:26:31 | off topic | Can an Android app running on a WiFi hotspot-enabled phone 'see' the LAN?
===
I have a phone that's capable of being a WiFi-hotspot. Our sporting group has an application that runs on both Android and iOS and can talk to each other over a WiFi access point (the IP of the device is displayed, and that IP address is entered into any other device that wants to talk to this device. They're all on the same subnet, and don't need internet access, they just want to talk to each other).
We frequently use the phones as WiFi hotspots, and everything works EXCEPT for if the application is brought up on the phone that has the WiFi hotspot enabled -- Then it thinks there's no WiFi available.
The question is: Can an application that's running on the WiFi hotspot-enabled phone use the LAN at all, or can it only 'see' the WAN interface? | 2 |
4,119,813 | 11/07/2010 21:31:38 | 170,803 | 09/09/2009 12:00:12 | 53 | 4 | Django - converting URL into links, images, objects | I'm creating simple comment-like application and need to convert normal urls into links, image links into images and yt/vimeo/etc. links into flash objects. E.g.:
http://foo.bar to <a href="http://foo.bar">http://foo.bar</a>
http://foo.bar/image.gif to <img src="http://foo.bar/image.gif"/>
etc.
Of course i can write all of that by myself, but i think it's such obvious piece of code that somebody has already wrote it (maybe even with splitting text into <p></p> paragraphs). I was googling for some time but couldn't find anything complex, just few snippets. Does filter (or something like that) exist?
Thanks!
PS. There is urlize but it works only for the first case.
| python | django | parsing | filter | null | null | open | Django - converting URL into links, images, objects
===
I'm creating simple comment-like application and need to convert normal urls into links, image links into images and yt/vimeo/etc. links into flash objects. E.g.:
http://foo.bar to <a href="http://foo.bar">http://foo.bar</a>
http://foo.bar/image.gif to <img src="http://foo.bar/image.gif"/>
etc.
Of course i can write all of that by myself, but i think it's such obvious piece of code that somebody has already wrote it (maybe even with splitting text into <p></p> paragraphs). I was googling for some time but couldn't find anything complex, just few snippets. Does filter (or something like that) exist?
Thanks!
PS. There is urlize but it works only for the first case.
| 0 |
3,901,219 | 10/10/2010 16:55:42 | 301,032 | 03/24/2010 17:01:40 | 137 | 0 | How to apply software development learning | Apologies if the question seems a little vague, ill see if i can clarify.
Im approaching the end of my CS course at university and im beginning to look at jobs, however im running into a problem that i suspect applies to a lot near graduates. Over the past 3 years ive learnt how to do lots of very clever things; the principles of OO programming, project management, systems analysis etc, but if i went into a job tomorrow tomorrow, and was told "write an application that does x" i wouldnt know where to begin.
I feel like ive got a lot of very useful skills and knowledge but no idea how to pull it all together. What i want to know is how did everyone go about overcoming this hurdle, are there any particular routes to take? any career paths that help with this problem in particular, or is it simply experience?
Any suggestions would be greatly appreciated and im sure would be of assistance to anyone else in my position that comes across this thread. | career-development | null | null | null | null | 10/11/2010 06:25:03 | not constructive | How to apply software development learning
===
Apologies if the question seems a little vague, ill see if i can clarify.
Im approaching the end of my CS course at university and im beginning to look at jobs, however im running into a problem that i suspect applies to a lot near graduates. Over the past 3 years ive learnt how to do lots of very clever things; the principles of OO programming, project management, systems analysis etc, but if i went into a job tomorrow tomorrow, and was told "write an application that does x" i wouldnt know where to begin.
I feel like ive got a lot of very useful skills and knowledge but no idea how to pull it all together. What i want to know is how did everyone go about overcoming this hurdle, are there any particular routes to take? any career paths that help with this problem in particular, or is it simply experience?
Any suggestions would be greatly appreciated and im sure would be of assistance to anyone else in my position that comes across this thread. | 4 |
7,104,883 | 08/18/2011 09:05:48 | 827,629 | 07/04/2011 06:43:44 | 19 | 0 | Making a call programatically from iphone app and returning back to the app after ending the call | I am trying to initiate a call from my iphone app,and I did it the follwing way..
-(IBAction) call:(id)sender
{
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Call Besito" message:@"\n\n\n"
delegate:self cancelButtonTitle:@"Cancel" otherButtonTitles:@"Submit", nil];
[alert show];
[alert release];
}
- (void)alertView:(UIAlertView *)alertView willDismissWithButtonIndex:(NSInteger)buttonIndex
{
if (buttonIndex != [alertView cancelButtonIndex])
{
NSString *phone_number = @"0911234567"; // assing dynamically from your code
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:[NSString stringWithFormat:@"tel:%@", phone_number]]];
NSString *phone_number = @"09008934848";
NSString *phoneStr = [[NSString alloc] initWithFormat:@"tel:%@",phone_number];
NSURL *phoneURL = [[NSURL alloc] initWithString:phoneStr];
[[UIApplication sharedApplication] openURL:phoneURL];
[phoneURL release];
[phoneStr release];
}
}
by the above code..**I am able to successfully make a call..but when i end a call,i m not able to return to my app**
So,I want to know how to achieve,that..also please tell me how we can initiate a call using webview...
Thanks&Regards
Ranjit | iphone | objective-c | ios | iphone-sdk-4.0 | null | null | open | Making a call programatically from iphone app and returning back to the app after ending the call
===
I am trying to initiate a call from my iphone app,and I did it the follwing way..
-(IBAction) call:(id)sender
{
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Call Besito" message:@"\n\n\n"
delegate:self cancelButtonTitle:@"Cancel" otherButtonTitles:@"Submit", nil];
[alert show];
[alert release];
}
- (void)alertView:(UIAlertView *)alertView willDismissWithButtonIndex:(NSInteger)buttonIndex
{
if (buttonIndex != [alertView cancelButtonIndex])
{
NSString *phone_number = @"0911234567"; // assing dynamically from your code
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:[NSString stringWithFormat:@"tel:%@", phone_number]]];
NSString *phone_number = @"09008934848";
NSString *phoneStr = [[NSString alloc] initWithFormat:@"tel:%@",phone_number];
NSURL *phoneURL = [[NSURL alloc] initWithString:phoneStr];
[[UIApplication sharedApplication] openURL:phoneURL];
[phoneURL release];
[phoneStr release];
}
}
by the above code..**I am able to successfully make a call..but when i end a call,i m not able to return to my app**
So,I want to know how to achieve,that..also please tell me how we can initiate a call using webview...
Thanks&Regards
Ranjit | 0 |
10,246,928 | 04/20/2012 13:11:02 | 1,200,185 | 02/09/2012 16:55:16 | 76 | 0 | How do I count the number of instances from 2 columns where a given string appears? | Here's an example table:
games_table
----------------------------------------------------
| home_team | away_team | game_outcome |
----------------------------------------------------
| Chelsea | Arsenal | Home wins |
----------------------------------------------------
| Everton | Liverpool | Away wins |
----------------------------------------------------
| Arsenal | Chelsea | Home wins |
----------------------------------------------------
What I need is the number of times 'Chelsea' appears WHERE the game_outcome = 'Home wins' which is 2 in this example.
Normally this would be very easy but I'm stuck because I have to search 2 columns.
I really need some insight. This is in SQL-Server 2008.
| sql-server | null | null | null | null | null | open | How do I count the number of instances from 2 columns where a given string appears?
===
Here's an example table:
games_table
----------------------------------------------------
| home_team | away_team | game_outcome |
----------------------------------------------------
| Chelsea | Arsenal | Home wins |
----------------------------------------------------
| Everton | Liverpool | Away wins |
----------------------------------------------------
| Arsenal | Chelsea | Home wins |
----------------------------------------------------
What I need is the number of times 'Chelsea' appears WHERE the game_outcome = 'Home wins' which is 2 in this example.
Normally this would be very easy but I'm stuck because I have to search 2 columns.
I really need some insight. This is in SQL-Server 2008.
| 0 |
3,951,586 | 10/17/2010 01:30:26 | 665,392 | 02/27/2010 09:27:37 | 46 | 19 | MS future .net P/InVoke Android Delphi c++ price compertition | Today C# and a modern copy of Delphi is getting very expressive for a student /hobbyist to start out on with a $2,000 price tag to get started. I remember when you could get started at a 10th of the price with Delphi. And a very large array of small programs came about in all sorts of fields. The ones that come through that hobby level are ether working for people or people that have marketed their own product.
Now we have P/Invoke as our future and MS plays the big daddy and markets it self.
And thinks every one will tag along as little puppies. The truth is they are trying to set a standard that with out us tagging along MS will be in problems.
At the same time MS has to address the future and as programmers Android devices will be 60% of the future world market and students will take them up fast. Why 1/ portable 2/ they communicate for the student in many more ways. 3/ price.
As MS sales have dropped in resent years they will drop further and apple shears man are they about to fall real bad.
To me windows XP will hang on because future sales will drop and I find average person thinks XP is complex enough to maintain !!!!!!!!!!!!!!!!
And yes there is the power gamer out their and computers have just gone over the 4 gig barrier to 8 gig. But the least leap in size is wasted because of .net P/invoke with ANSSI and 64 bit pointers effectively using twice the space. 90% of users do not use 0.5 of a gig of memory and 70% of all users use English. There is clearly a limit to IBM programming power as proce4ssors only go so fast!!!!!!!. Android devices are using UTF-8 that is not supported by MS properly. UTF-8 is an extension of ACSSI that is so compatible with Delphi and those other languages, So I want to suggest this.
Create and market a freeware Delphi *.Dll called D/Invoke!!!!!!!!! 1/ UTF-8 to ACSSI interfacing. 2/ 32 and 64 bit platform for old XP computers and users that will never use more than 4 gig memory space. 3/ Write the Dll in Delphi that its not C++ compatible that .net cannot interfere with the standard. And a future consideration is communication with the Java JNI for Java communication. 4/ Create freeware code that links with Delphi 3 to Delphi 6 as some projects out already have done some work. Except in the area of threads. In may ways many projects will just need recompiling once everything in this project is sorted. Then all projects made with D/Invoke will run faster than .Net, use the best text system UTF-8, Be Future proofed better than .net, communicate to important languages like Java. And students can learn to develop at cheaper prices producing a big development base again.
What do people think!!!!!!!!!!!!!!!
| android | windows | delphi | null | null | 10/17/2010 01:37:34 | not a real question | MS future .net P/InVoke Android Delphi c++ price compertition
===
Today C# and a modern copy of Delphi is getting very expressive for a student /hobbyist to start out on with a $2,000 price tag to get started. I remember when you could get started at a 10th of the price with Delphi. And a very large array of small programs came about in all sorts of fields. The ones that come through that hobby level are ether working for people or people that have marketed their own product.
Now we have P/Invoke as our future and MS plays the big daddy and markets it self.
And thinks every one will tag along as little puppies. The truth is they are trying to set a standard that with out us tagging along MS will be in problems.
At the same time MS has to address the future and as programmers Android devices will be 60% of the future world market and students will take them up fast. Why 1/ portable 2/ they communicate for the student in many more ways. 3/ price.
As MS sales have dropped in resent years they will drop further and apple shears man are they about to fall real bad.
To me windows XP will hang on because future sales will drop and I find average person thinks XP is complex enough to maintain !!!!!!!!!!!!!!!!
And yes there is the power gamer out their and computers have just gone over the 4 gig barrier to 8 gig. But the least leap in size is wasted because of .net P/invoke with ANSSI and 64 bit pointers effectively using twice the space. 90% of users do not use 0.5 of a gig of memory and 70% of all users use English. There is clearly a limit to IBM programming power as proce4ssors only go so fast!!!!!!!. Android devices are using UTF-8 that is not supported by MS properly. UTF-8 is an extension of ACSSI that is so compatible with Delphi and those other languages, So I want to suggest this.
Create and market a freeware Delphi *.Dll called D/Invoke!!!!!!!!! 1/ UTF-8 to ACSSI interfacing. 2/ 32 and 64 bit platform for old XP computers and users that will never use more than 4 gig memory space. 3/ Write the Dll in Delphi that its not C++ compatible that .net cannot interfere with the standard. And a future consideration is communication with the Java JNI for Java communication. 4/ Create freeware code that links with Delphi 3 to Delphi 6 as some projects out already have done some work. Except in the area of threads. In may ways many projects will just need recompiling once everything in this project is sorted. Then all projects made with D/Invoke will run faster than .Net, use the best text system UTF-8, Be Future proofed better than .net, communicate to important languages like Java. And students can learn to develop at cheaper prices producing a big development base again.
What do people think!!!!!!!!!!!!!!!
| 1 |
6,981,683 | 08/08/2011 11:52:44 | 792,318 | 06/10/2011 07:34:34 | 6 | 0 | Developing IE toolbar | I would like to implement the feature of skype toolbar in my application as toolbar recognizes phone and Skype numbers in web pages and replacing the phone number on webpages, together with a Skype drop-down menu and a skype icon that can be clicked to call the number using Skype.
Anybody can suggest how to implement this feature for IE using c++.
Thanks a lot. | c++ | null | null | null | null | 08/08/2011 12:23:26 | not a real question | Developing IE toolbar
===
I would like to implement the feature of skype toolbar in my application as toolbar recognizes phone and Skype numbers in web pages and replacing the phone number on webpages, together with a Skype drop-down menu and a skype icon that can be clicked to call the number using Skype.
Anybody can suggest how to implement this feature for IE using c++.
Thanks a lot. | 1 |
2,512,292 | 03/24/2010 23:52:28 | 182,172 | 09/30/2009 23:11:53 | 478 | 17 | How to host different applications without subdomains in Heroku? | I would like to have different applications under the same domain using Heroku.
Because of the name of the domain, I would like to access the applications using folders (mydomain.com/app) instead of using subdomains (app.mydomain.com), is this possible? Thanks | naming-conventions | heroku | ruby-on-rails | null | null | null | open | How to host different applications without subdomains in Heroku?
===
I would like to have different applications under the same domain using Heroku.
Because of the name of the domain, I would like to access the applications using folders (mydomain.com/app) instead of using subdomains (app.mydomain.com), is this possible? Thanks | 0 |
2,066,809 | 01/14/2010 19:09:13 | 180,294 | 09/28/2009 11:42:18 | 87 | 11 | CSS positions image in centre of screen in all browsers but IE | I couldn't find a similiar question in the related questions section, so figured I'd try my luck.
I'm designing a page where the load time will noticeably long enough to where a loading icon could appear. Currently I have it set so that the icon displays in the center of the screen, with a translucent overlay over the page until page load is complete. Here's the code that I am using
<style type="text/css">
#overLayBackground{
background-color: rgb(250, 250, 250);
opacity: 0.7; /* Safari, Opera */
-moz-opacity:0.25; /* FireFox */
filter: alpha(opacity=70); /* IE */
z-index: 200;
height: 100%;
width: 100%;
background-repeat:repeat;
position:fixed;
top: 0px;
left: 0px;
text-align:center;
line-height: 240px;
}
#overLayBackground>img {
position:absolute; bottom:0; top:0; left:0; right:0; margin:auto;
}
<div id="overLayBackground">
<img src="www.example.com/images/loading.gif" title="Image" alt="The image" />
</div>
</style>
Now this works as expected in Firefox and Chrome, but IE has the icon showing in the top left hand corner. Is there a way to have it behave as the other browsers and position it in the center of the screen?
Thanks in advance. | css | internet-explorer | null | null | null | null | open | CSS positions image in centre of screen in all browsers but IE
===
I couldn't find a similiar question in the related questions section, so figured I'd try my luck.
I'm designing a page where the load time will noticeably long enough to where a loading icon could appear. Currently I have it set so that the icon displays in the center of the screen, with a translucent overlay over the page until page load is complete. Here's the code that I am using
<style type="text/css">
#overLayBackground{
background-color: rgb(250, 250, 250);
opacity: 0.7; /* Safari, Opera */
-moz-opacity:0.25; /* FireFox */
filter: alpha(opacity=70); /* IE */
z-index: 200;
height: 100%;
width: 100%;
background-repeat:repeat;
position:fixed;
top: 0px;
left: 0px;
text-align:center;
line-height: 240px;
}
#overLayBackground>img {
position:absolute; bottom:0; top:0; left:0; right:0; margin:auto;
}
<div id="overLayBackground">
<img src="www.example.com/images/loading.gif" title="Image" alt="The image" />
</div>
</style>
Now this works as expected in Firefox and Chrome, but IE has the icon showing in the top left hand corner. Is there a way to have it behave as the other browsers and position it in the center of the screen?
Thanks in advance. | 0 |
10,638,026 | 05/17/2012 14:47:36 | 817,314 | 06/27/2011 12:00:19 | 322 | 4 | asp.net mvc3, which layer should I put my code in? | I am building an applicaiton using asp.net mvc3. I added two layers to this project, repository and service layer. some of my code, I am not sure which layer I should put them in.
on my register page, to create an account, I only ask user to enter their email and password. before I add it to the database, my user table need more info.
I need to add:
user.ip= "1.1.1.1";
user.createddate="11/11/1911";
....
so above code, where should I put them? webui, repoistory or service layer. | asp.net-mvc | asp.net-mvc-3 | repository-pattern | service-layer | null | null | open | asp.net mvc3, which layer should I put my code in?
===
I am building an applicaiton using asp.net mvc3. I added two layers to this project, repository and service layer. some of my code, I am not sure which layer I should put them in.
on my register page, to create an account, I only ask user to enter their email and password. before I add it to the database, my user table need more info.
I need to add:
user.ip= "1.1.1.1";
user.createddate="11/11/1911";
....
so above code, where should I put them? webui, repoistory or service layer. | 0 |
1,965,804 | 12/27/2009 11:58:11 | 227,187 | 12/08/2009 14:33:50 | 27 | 0 | How to get meters in pixel in mapkit? | I wanted to test the mapKit and wanted to make my own overlay to display the accuracy of my position.
If i have a zoom factor of for example .005 which radius does my circle around me has to have(If my accuracy is for example 500m)?
Would be great to get some help :)
Thanks a lot. | mapkit | iphone | size | accuracy | core-location | null | open | How to get meters in pixel in mapkit?
===
I wanted to test the mapKit and wanted to make my own overlay to display the accuracy of my position.
If i have a zoom factor of for example .005 which radius does my circle around me has to have(If my accuracy is for example 500m)?
Would be great to get some help :)
Thanks a lot. | 0 |
11,445,735 | 07/12/2012 05:54:23 | 329,365 | 04/30/2010 00:43:46 | 472 | 12 | Generic interface for photocopiers - where to begin? | This is a slightly curly one. I have a need to connect (either by network, or direct cable) to a variety of photocopiers (all different brands and models) and to retrieve digital copies of anything that gets photocopied (a great start would be to detect that a copying event is taking place). I have literally no idea where to begin. What technologies should I be investigating to achieve something like this?
I'm 100% sure that I'll need to implement different methodologies for each brand, and I'm prepared to discover that most machines are locked up quite tightly so this may be a fruitless endeavor.
Any assistance would be appreciated!
| python | hardware | null | null | null | 07/12/2012 07:21:03 | not constructive | Generic interface for photocopiers - where to begin?
===
This is a slightly curly one. I have a need to connect (either by network, or direct cable) to a variety of photocopiers (all different brands and models) and to retrieve digital copies of anything that gets photocopied (a great start would be to detect that a copying event is taking place). I have literally no idea where to begin. What technologies should I be investigating to achieve something like this?
I'm 100% sure that I'll need to implement different methodologies for each brand, and I'm prepared to discover that most machines are locked up quite tightly so this may be a fruitless endeavor.
Any assistance would be appreciated!
| 4 |
2,649,596 | 04/15/2010 23:07:21 | 307,536 | 04/02/2010 08:06:16 | 13 | 1 | MySQL: Limit rows linked to each joined row | **Specifications: MySQL 4.1+**
I've certain situation that requires certain result set from MySQL query, let's see the current query first & then ask my question:
SELECT thread.dateline AS tdateline, post.dateline AS pdateline, MIN(post.dateline)
FROM thread AS thread
LEFT JOIN post AS post ON(thread.threadid = post.threadid)
LEFT JOIN forum AS forum ON(thread.forumid = forum.forumid)
WHERE post.postid != thread.firstpostid
AND thread.open = 1
AND thread.visible = 1
AND thread.replycount >= 1
AND post.visible = 1
AND (forum.options & 1)
AND (forum.options & 2)
AND (forum.options & 4)
AND forum.forumid IN(1,2,3)
GROUP BY post.threadid
ORDER BY tdateline DESC, pdateline ASC
As you can see, mainly I need to select dateline of threads from 'thread' table, in addition to dateline of the second post of each thread, that's all under the conditions you see in the WHERE CLAUSE. Since each thread has many posts, and I need only one result per thread, I've used GROUP BY CLAUSE for that purpose.
This query will return only one post's dateline with it's related unique thread.
**My questions are:**
1. How to limit returned threads per
each forum!? Suppose I need only 5
threads -as a maximum- to be
returned for each forum declared in
the WHERE CLAUSE 'forum.forumid
IN(1,2,3)', how can this be
achieved.
2. Is there any recommendations for
optimizing this query (of course
after solving the first point)?
**Notes:**
I prefer not to use sub-queries, but if it's the only solution available I'll accept it. Double queries not recommended. I'm sure there's a smart solution for this situation.
**Appreciated advice in advance :)** | mysql | sql | limit | query | join | null | open | MySQL: Limit rows linked to each joined row
===
**Specifications: MySQL 4.1+**
I've certain situation that requires certain result set from MySQL query, let's see the current query first & then ask my question:
SELECT thread.dateline AS tdateline, post.dateline AS pdateline, MIN(post.dateline)
FROM thread AS thread
LEFT JOIN post AS post ON(thread.threadid = post.threadid)
LEFT JOIN forum AS forum ON(thread.forumid = forum.forumid)
WHERE post.postid != thread.firstpostid
AND thread.open = 1
AND thread.visible = 1
AND thread.replycount >= 1
AND post.visible = 1
AND (forum.options & 1)
AND (forum.options & 2)
AND (forum.options & 4)
AND forum.forumid IN(1,2,3)
GROUP BY post.threadid
ORDER BY tdateline DESC, pdateline ASC
As you can see, mainly I need to select dateline of threads from 'thread' table, in addition to dateline of the second post of each thread, that's all under the conditions you see in the WHERE CLAUSE. Since each thread has many posts, and I need only one result per thread, I've used GROUP BY CLAUSE for that purpose.
This query will return only one post's dateline with it's related unique thread.
**My questions are:**
1. How to limit returned threads per
each forum!? Suppose I need only 5
threads -as a maximum- to be
returned for each forum declared in
the WHERE CLAUSE 'forum.forumid
IN(1,2,3)', how can this be
achieved.
2. Is there any recommendations for
optimizing this query (of course
after solving the first point)?
**Notes:**
I prefer not to use sub-queries, but if it's the only solution available I'll accept it. Double queries not recommended. I'm sure there's a smart solution for this situation.
**Appreciated advice in advance :)** | 0 |
6,419,234 | 06/21/2011 00:58:35 | 805,797 | 06/19/2011 22:55:32 | 6 | 0 | How to print like a chart JAVA HELP PLEASE RELATIVELY EASY!!! | I have almost this entire calendar project I'm doing finished, but need help printing out the days under the months in a chart format. The chart has to look like this if you don't get what I mean:
Sunday Monday Tuesday Wednesday etc.
1................2............3.............4....................................................................................................................5................6...........7..............8 etc. (Without all those dots I put in)
The months don't have to go in a chart or anything, just the days. So anyways there are two classes, calendar and months. Calendar is finished and 100% correct because it was given to us completed by the professor, and he said not to change anything. I'm almost done with months but need a little help.
Here's the completed class calendary which doesn't need to be changed:
import java.util.Scanner;
public class Calendar
{
static final int FEBRUARY = 2;
static final int MONTHS_PER_YEAR = 12;
static int [] daysPerMonth =
{0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
static String [] months =
{"", " Januray", "February", " March", " April",
" May", " June", " July", " August",
"September", " October", "November", "December"};
public static void main(String[] args)
{
Scanner in = new Scanner(System.in);
System.out.print("Enter the year? (yyyy): ");
int year = in.nextInt();
int firstDay = firstDayOfYear(year);
// February: Check for leap year
daysPerMonth [FEBRUARY] = isLeapYear(year) ? 29 : 28;
for (int i=1; i <= MONTHS_PER_YEAR; i++) {
Month month = new Month(daysPerMonth[i], firstDay);
System.out.println("\n\n "+months[i]+" "+year);
month.printMonth();
firstDay = month.getFirstDayOfNextMonth();
}
}
private static boolean isLeapYear(int year) {
return ((year%4 == 0) && (year%100 != 0)) || (year%400 == 0);
}
private static int firstDayOfYear(int year) {
return (2 * (13) + (3 * (13+1)/5) + (year-1) + ((year-1)/4)
- ((year-1)/100) + ((year-1)/400) + 2) % 7;
}
}
So don't worry about that to much except for what to call. The second thing I have to do is my months class. I believe it's mostly working, except for the printMonth method in the Month class.
Here's the Month class:
public class Month {
public int daysPerMonth;
public int firstDay;
public Month(int daysPerMonth, int firstDay){
this.daysPerMonth = daysPerMonth;
this.firstDay = firstDay;
}
public int getFirstDayOfNextMonth() {
int nextDay = firstDay + 1;
for(int i = 0; i < daysPerMonth; i++) {
if(firstDay + 1 > daysPerMonth - 1) {
nextDay = 0;
}
else {
nextDay++;
}
}
return nextDay;
}
public void printMonth() {
String [] days = {"Sun", "Mon", "Tues", "Wed", "Thurs", "Fri", "Sat"};
System.out.println(days);
}
}
As of right now, the output always has the months come out correctly but then under every month it will say something wierd like: [Ljava.lang.String;@14318bb , or some other weird output that I don't get why it's doing.
Also, I think I messed up something with the getFirstDayOfNextMonth class not sure how though. THANK YOU SO MUCH FOR ANY HELP, I'M NOT SAYING DO THE WORK FOR ME BY ANY MEANS, BUT HELP WOULD BE GREATLY APPRECIATED | java | homework | class | methods | calendar | 06/21/2011 09:02:57 | too localized | How to print like a chart JAVA HELP PLEASE RELATIVELY EASY!!!
===
I have almost this entire calendar project I'm doing finished, but need help printing out the days under the months in a chart format. The chart has to look like this if you don't get what I mean:
Sunday Monday Tuesday Wednesday etc.
1................2............3.............4....................................................................................................................5................6...........7..............8 etc. (Without all those dots I put in)
The months don't have to go in a chart or anything, just the days. So anyways there are two classes, calendar and months. Calendar is finished and 100% correct because it was given to us completed by the professor, and he said not to change anything. I'm almost done with months but need a little help.
Here's the completed class calendary which doesn't need to be changed:
import java.util.Scanner;
public class Calendar
{
static final int FEBRUARY = 2;
static final int MONTHS_PER_YEAR = 12;
static int [] daysPerMonth =
{0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
static String [] months =
{"", " Januray", "February", " March", " April",
" May", " June", " July", " August",
"September", " October", "November", "December"};
public static void main(String[] args)
{
Scanner in = new Scanner(System.in);
System.out.print("Enter the year? (yyyy): ");
int year = in.nextInt();
int firstDay = firstDayOfYear(year);
// February: Check for leap year
daysPerMonth [FEBRUARY] = isLeapYear(year) ? 29 : 28;
for (int i=1; i <= MONTHS_PER_YEAR; i++) {
Month month = new Month(daysPerMonth[i], firstDay);
System.out.println("\n\n "+months[i]+" "+year);
month.printMonth();
firstDay = month.getFirstDayOfNextMonth();
}
}
private static boolean isLeapYear(int year) {
return ((year%4 == 0) && (year%100 != 0)) || (year%400 == 0);
}
private static int firstDayOfYear(int year) {
return (2 * (13) + (3 * (13+1)/5) + (year-1) + ((year-1)/4)
- ((year-1)/100) + ((year-1)/400) + 2) % 7;
}
}
So don't worry about that to much except for what to call. The second thing I have to do is my months class. I believe it's mostly working, except for the printMonth method in the Month class.
Here's the Month class:
public class Month {
public int daysPerMonth;
public int firstDay;
public Month(int daysPerMonth, int firstDay){
this.daysPerMonth = daysPerMonth;
this.firstDay = firstDay;
}
public int getFirstDayOfNextMonth() {
int nextDay = firstDay + 1;
for(int i = 0; i < daysPerMonth; i++) {
if(firstDay + 1 > daysPerMonth - 1) {
nextDay = 0;
}
else {
nextDay++;
}
}
return nextDay;
}
public void printMonth() {
String [] days = {"Sun", "Mon", "Tues", "Wed", "Thurs", "Fri", "Sat"};
System.out.println(days);
}
}
As of right now, the output always has the months come out correctly but then under every month it will say something wierd like: [Ljava.lang.String;@14318bb , or some other weird output that I don't get why it's doing.
Also, I think I messed up something with the getFirstDayOfNextMonth class not sure how though. THANK YOU SO MUCH FOR ANY HELP, I'M NOT SAYING DO THE WORK FOR ME BY ANY MEANS, BUT HELP WOULD BE GREATLY APPRECIATED | 3 |
7,509,707 | 09/22/2011 04:50:16 | 279,311 | 02/23/2010 09:37:07 | 361 | 9 | best way to solve the sorting problem | If I have been given 10 cards which is in random order and i have to pick cards from deck and replace an existing card in my rack , and aim is to sort all 10 cards and with at least 3 consecutive cards, what algorithm can I use? | algorithm | sorting | null | null | null | 09/22/2011 05:55:51 | not a real question | best way to solve the sorting problem
===
If I have been given 10 cards which is in random order and i have to pick cards from deck and replace an existing card in my rack , and aim is to sort all 10 cards and with at least 3 consecutive cards, what algorithm can I use? | 1 |
1,162,219 | 07/21/2009 23:08:46 | 106,778 | 05/14/2009 02:21:44 | 106 | 15 | Advanced Postgres resources? | I have been using Postgres for almost a year now and I've been able to accomplish all the tasks at hand so far by googling what I need. I'm looking for a good Postgres resource so I can discover things that are possible aside from just querying and maybe to learn things beyond what I need (or I didn't know that I needed). Of course, it should be Postgres specific. | postgresql | books | null | null | null | 01/06/2012 20:46:07 | not constructive | Advanced Postgres resources?
===
I have been using Postgres for almost a year now and I've been able to accomplish all the tasks at hand so far by googling what I need. I'm looking for a good Postgres resource so I can discover things that are possible aside from just querying and maybe to learn things beyond what I need (or I didn't know that I needed). Of course, it should be Postgres specific. | 4 |
11,680,570 | 07/27/2012 02:12:06 | 125,148 | 06/18/2009 14:31:25 | 1,255 | 24 | How to generate a WSDL file? | i have created a webservice [.asmx] file. This web service will actually get a string as Input and insert the values to database.
Now this webservice will be called by another application, so they are asking wsdl file from me to access consume this webservice.
I know that, wsdl can be created via cmd to generate a .cs or .vb or .dll files
And there is also a xml generated when i user ?wsdl along with my URL
But i am confused which one to provide ??!!!
| .net | web-services | wsdl | null | null | null | open | How to generate a WSDL file?
===
i have created a webservice [.asmx] file. This web service will actually get a string as Input and insert the values to database.
Now this webservice will be called by another application, so they are asking wsdl file from me to access consume this webservice.
I know that, wsdl can be created via cmd to generate a .cs or .vb or .dll files
And there is also a xml generated when i user ?wsdl along with my URL
But i am confused which one to provide ??!!!
| 0 |
5,334,903 | 03/17/2011 04:35:27 | 555,690 | 12/28/2010 06:15:35 | 421 | 2 | Mandatory to use XCode SDK 4? | Well you know they just released this new XCode 4 version thing...... I am still using version 3.x.x.
Is it mandatory to use XCode 4 for my iPhone apps to be approved? | xcode | ios | null | null | null | null | open | Mandatory to use XCode SDK 4?
===
Well you know they just released this new XCode 4 version thing...... I am still using version 3.x.x.
Is it mandatory to use XCode 4 for my iPhone apps to be approved? | 0 |
9,912,500 | 03/28/2012 17:15:08 | 1,255,271 | 03/07/2012 17:02:27 | 1 | 0 | Set up a sub sub domain? | I have a site, for this purpose, it is example.com.
I have subdomains, such as projects.example.com, but I would like to have domains such as linux.projects.example.com or dl.projects.example.com.
I run an Ubuntu Server with Apache2.
Also, my DNS registrar is 123-Reg.
Thanks in advance!!! | ubuntu | subdomains | null | null | null | 04/01/2012 07:51:48 | off topic | Set up a sub sub domain?
===
I have a site, for this purpose, it is example.com.
I have subdomains, such as projects.example.com, but I would like to have domains such as linux.projects.example.com or dl.projects.example.com.
I run an Ubuntu Server with Apache2.
Also, my DNS registrar is 123-Reg.
Thanks in advance!!! | 2 |
6,741,810 | 07/19/2011 02:52:21 | 257,635 | 01/24/2010 01:11:32 | 884 | 19 | Should we avoid turning on warnings for the complete program? | I have subscribed to `beginners-unsubscribe@perl.org`
A discussion was going on there and a guy was suggesting that you should not use
#!/usr/bin/perl -w
This will turn on the warning for the complete program.
He said:
> Please do not use -w in the hashbang, it forces
> warnings everywhere, even when modules didn't want warnings. You'll
> get weird error messages if you leave that in. Instead just write "use
> warnings;" at the top of your code and you'll be fine. :)
>
It activates warnings for code you did not write.
>
> It is an extremely good idea to enable warnings for all code you write
> yourself. However if you enable it for code written by authors who did
> not want warnings, or for old modules, then you will get pointless
> messages you cannot fix.
>
> I said: So you want to say we should put use warnings only in some
> part of the code.
>
> He replied: Yes, specifically: Only the code you wrote yourself.
instead of doing this you should use the `warnings` pragma in the code you wrote yourself not for the complete program.
----------
I used to write -w in the shebang so that I can turn on the warnings for the complete program. But after this discussion I am confused whether should I follow that guy or not. Is he right? Should we avoid turning on warnings for the complete program?
Usually what I follow is
#!/usr/bin/perl
use strict;
use warnings;
#now start actual coding from here
#...............................
#...............................
| perl | discussion | null | null | null | 04/05/2012 15:47:30 | not constructive | Should we avoid turning on warnings for the complete program?
===
I have subscribed to `beginners-unsubscribe@perl.org`
A discussion was going on there and a guy was suggesting that you should not use
#!/usr/bin/perl -w
This will turn on the warning for the complete program.
He said:
> Please do not use -w in the hashbang, it forces
> warnings everywhere, even when modules didn't want warnings. You'll
> get weird error messages if you leave that in. Instead just write "use
> warnings;" at the top of your code and you'll be fine. :)
>
It activates warnings for code you did not write.
>
> It is an extremely good idea to enable warnings for all code you write
> yourself. However if you enable it for code written by authors who did
> not want warnings, or for old modules, then you will get pointless
> messages you cannot fix.
>
> I said: So you want to say we should put use warnings only in some
> part of the code.
>
> He replied: Yes, specifically: Only the code you wrote yourself.
instead of doing this you should use the `warnings` pragma in the code you wrote yourself not for the complete program.
----------
I used to write -w in the shebang so that I can turn on the warnings for the complete program. But after this discussion I am confused whether should I follow that guy or not. Is he right? Should we avoid turning on warnings for the complete program?
Usually what I follow is
#!/usr/bin/perl
use strict;
use warnings;
#now start actual coding from here
#...............................
#...............................
| 4 |
7,391,090 | 09/12/2011 16:35:07 | 63,392 | 02/06/2009 16:32:16 | 762 | 18 | Insert data and set foreign keys with Postgres | I have to migrate a large amount of existing data in a Postgres DB after a schema change.
In the old schema a country attribute would be stored in the users table. Now the country attribute has been moved into a separate address table:
users:
country # OLD
address_id # NEW
addresses:
id
country
When migrating the data, I'm having problems setting the foreign keys in the users table after inserting the addresses:
INSERT INTO addresses (country)
SELECT country FROM users WHERE address_id IS NULL
RETURNING id;
**How do I propagate the IDs of the inserted rows and set the foreign key references in the users table?**
The only solution I could come up with so far is creating a temporary user_id column in the addresses table and then updating the the address_id:
UPDATE users SET address_id = a.id FROM addresses AS a
WHERE users.id = a.user_id;
However, this turned out to be extremely slow (despite using indices on both users.id and addresses.user_id).
**Is there any other way to insert derived data into one table and setting the foreign key reference to the inserted data in the other (without changing the schema itself)?**
I'm using Postgres 8.3.14.
Thanks | sql | postgresql | data-migration | null | null | null | open | Insert data and set foreign keys with Postgres
===
I have to migrate a large amount of existing data in a Postgres DB after a schema change.
In the old schema a country attribute would be stored in the users table. Now the country attribute has been moved into a separate address table:
users:
country # OLD
address_id # NEW
addresses:
id
country
When migrating the data, I'm having problems setting the foreign keys in the users table after inserting the addresses:
INSERT INTO addresses (country)
SELECT country FROM users WHERE address_id IS NULL
RETURNING id;
**How do I propagate the IDs of the inserted rows and set the foreign key references in the users table?**
The only solution I could come up with so far is creating a temporary user_id column in the addresses table and then updating the the address_id:
UPDATE users SET address_id = a.id FROM addresses AS a
WHERE users.id = a.user_id;
However, this turned out to be extremely slow (despite using indices on both users.id and addresses.user_id).
**Is there any other way to insert derived data into one table and setting the foreign key reference to the inserted data in the other (without changing the schema itself)?**
I'm using Postgres 8.3.14.
Thanks | 0 |
10,775,139 | 05/27/2012 15:33:03 | 1,305,587 | 03/31/2012 21:59:16 | 3 | 0 | Opera browser extension extension-reload via function | I'm developing an extension for Opera Browser and I'm searching for a function that is able to reload an Opera extension or an alternative way to solve my problem. I want the user to be able to switch between an old version of the extension (the list view or 'newmenu') and the new version (the normal view or 'oldmenu').
The code to do this is as follows:
<a id="switch" href="javascript: void(0)" onClick="widget.preferences.version = 'newmenu'; document.getElementById('switch').innerHTML = 'Please reload the extension';">[Switch to Normal View]</a>
The **widget.preferences.version = 'newmenu'** in this **oldmenu.html** file, sets the user preference to use the new menu and **widget.preferences.version = 'oldmenu'** (not shown here), which is located in the **menu.html**, sets the user preference to use the old menu.
Then, in the **index.html** file, the extension checks whether it has to show the old menu or the new menu.
if (widget.preferences.version == "oldmenu") {
var ToolbarUIItemProperties = {title: "4chan Boards", icon: "icons/icon_64x64.png", popup: {href: "oldmenu.html", width: 220, height: 620}}
} else {
var ToolbarUIItemProperties = {title: "4chan Boards", icon: "icons/icon_64x64.png", popup: {href: "menu.html", width: 250, height: 350}}
}
Now, the problem is that for this code to execute, the user has to manually reload the extension, which is very ugly.
And well, since the Opera Developing Forum is currently unreachable (bad gateways and long loading times), I guess this is the best place to ask my question. Thanks for your time. | extension | opera | reload | null | null | null | open | Opera browser extension extension-reload via function
===
I'm developing an extension for Opera Browser and I'm searching for a function that is able to reload an Opera extension or an alternative way to solve my problem. I want the user to be able to switch between an old version of the extension (the list view or 'newmenu') and the new version (the normal view or 'oldmenu').
The code to do this is as follows:
<a id="switch" href="javascript: void(0)" onClick="widget.preferences.version = 'newmenu'; document.getElementById('switch').innerHTML = 'Please reload the extension';">[Switch to Normal View]</a>
The **widget.preferences.version = 'newmenu'** in this **oldmenu.html** file, sets the user preference to use the new menu and **widget.preferences.version = 'oldmenu'** (not shown here), which is located in the **menu.html**, sets the user preference to use the old menu.
Then, in the **index.html** file, the extension checks whether it has to show the old menu or the new menu.
if (widget.preferences.version == "oldmenu") {
var ToolbarUIItemProperties = {title: "4chan Boards", icon: "icons/icon_64x64.png", popup: {href: "oldmenu.html", width: 220, height: 620}}
} else {
var ToolbarUIItemProperties = {title: "4chan Boards", icon: "icons/icon_64x64.png", popup: {href: "menu.html", width: 250, height: 350}}
}
Now, the problem is that for this code to execute, the user has to manually reload the extension, which is very ugly.
And well, since the Opera Developing Forum is currently unreachable (bad gateways and long loading times), I guess this is the best place to ask my question. Thanks for your time. | 0 |
11,063,198 | 06/16/2012 11:56:53 | 1,460,532 | 06/16/2012 11:24:20 | 1 | 0 | how can i perform actions on selecting an item in spinner | I am writing code for a small application in that application in the home page i used a spinner and a button ... and i put some selections in the spinner like .... India America China Japan ..... etc.. If i select India and click the submit button then how can i get an xml files for selecting India and another xml file for selecting America ????
can any one please tell me how can i achieve it....
if u had any demo programs for that plese send it to me.... revanthmaturi@gmail.com | java | android | xml | null | null | 06/17/2012 11:06:40 | not a real question | how can i perform actions on selecting an item in spinner
===
I am writing code for a small application in that application in the home page i used a spinner and a button ... and i put some selections in the spinner like .... India America China Japan ..... etc.. If i select India and click the submit button then how can i get an xml files for selecting India and another xml file for selecting America ????
can any one please tell me how can i achieve it....
if u had any demo programs for that plese send it to me.... revanthmaturi@gmail.com | 1 |
3,902,502 | 10/10/2010 22:34:02 | 342,870 | 05/17/2010 08:43:15 | 6 | 0 | Can't find out callback function | Hi plz help me i can't find out callback function for CURLOPT_WRITEFUNCTION to download images and save it to file or memory. Thank you for help. | c# | libcurl | null | null | null | 10/11/2010 00:46:28 | not a real question | Can't find out callback function
===
Hi plz help me i can't find out callback function for CURLOPT_WRITEFUNCTION to download images and save it to file or memory. Thank you for help. | 1 |
7,809,334 | 10/18/2011 14:56:29 | 1,001,352 | 10/18/2011 14:38:20 | 1 | 0 | parsing a numbre phone in a text with regex | I want to parse phone numbers from many countries around the world using a regex I need the phone numbers I can come in many different ways and need to catch them all.
Examples.
00212 23254324
+212 324324324
232 2 121 343
234/2354323
122 232 23 213
3123-321-321
With bars, spaces, dashes.
Thanks | xml | regex | parsing | null | null | 10/18/2011 21:05:58 | not a real question | parsing a numbre phone in a text with regex
===
I want to parse phone numbers from many countries around the world using a regex I need the phone numbers I can come in many different ways and need to catch them all.
Examples.
00212 23254324
+212 324324324
232 2 121 343
234/2354323
122 232 23 213
3123-321-321
With bars, spaces, dashes.
Thanks | 1 |
10,099,487 | 04/11/2012 03:40:00 | 1,325,541 | 04/11/2012 03:08:54 | 1 | 0 | Creating a dynamic tree array from another array | I have an array, lets call it $childrenIds, it outputs as follows:
array(
[74252] => Array
(
[0] => 1753
[1] => 1757
[2] => 1758
[3] => 1760
)
[74238] => Array
(
[0] => 1753
[1] => 1755
[2] => 1758
[3] => 1761
)
[76476] => Array
(
[0] => 1754
[1] => 1755
[2] => 1758
[3] => 1763
)
[76478] => Array
(
[0] => 1754
[1] => 1756
[2] => 1758
[3] => 1763
)
[76480] => Array
(
[0] => 1754
[1] => 1757
[2] => 1758
[3] => 1763
)
[74253] => Array
(
[0] => 1753
[1] => 1757
[2] => 1759
[3] => 1760
)
);
What i need to do is create a new array from this, where the e.g. [74252] is ignored,
but the children of each sub array are pathed...
So using this example my output would be something like:
array(
[1753] => Array
(
[1757] => Array
(
[1758] => Array
(
1760
),
[1759] => Array
(
1760
),
)
[1755] => Array
(
1758 => Array
(
1761
)
)
)
),
[1754] => Array
(
[1755] => Array
(
[1758] => Array
(
1763
)
),
[1756] => Array
(
[1758] => Array
(
1763
)
),
[1757] => Array
(
[1758] => Array
(
1763
)
)
)
);
So there will not always be 4 sub array elements, that is dynamic...
Hopefully I have explained this clearly, been searching for a few hours and can't find a solution that meets all of my requires, if I overlooked one, I apologize in advance.
Thanks
| php | arrays | null | null | null | null | open | Creating a dynamic tree array from another array
===
I have an array, lets call it $childrenIds, it outputs as follows:
array(
[74252] => Array
(
[0] => 1753
[1] => 1757
[2] => 1758
[3] => 1760
)
[74238] => Array
(
[0] => 1753
[1] => 1755
[2] => 1758
[3] => 1761
)
[76476] => Array
(
[0] => 1754
[1] => 1755
[2] => 1758
[3] => 1763
)
[76478] => Array
(
[0] => 1754
[1] => 1756
[2] => 1758
[3] => 1763
)
[76480] => Array
(
[0] => 1754
[1] => 1757
[2] => 1758
[3] => 1763
)
[74253] => Array
(
[0] => 1753
[1] => 1757
[2] => 1759
[3] => 1760
)
);
What i need to do is create a new array from this, where the e.g. [74252] is ignored,
but the children of each sub array are pathed...
So using this example my output would be something like:
array(
[1753] => Array
(
[1757] => Array
(
[1758] => Array
(
1760
),
[1759] => Array
(
1760
),
)
[1755] => Array
(
1758 => Array
(
1761
)
)
)
),
[1754] => Array
(
[1755] => Array
(
[1758] => Array
(
1763
)
),
[1756] => Array
(
[1758] => Array
(
1763
)
),
[1757] => Array
(
[1758] => Array
(
1763
)
)
)
);
So there will not always be 4 sub array elements, that is dynamic...
Hopefully I have explained this clearly, been searching for a few hours and can't find a solution that meets all of my requires, if I overlooked one, I apologize in advance.
Thanks
| 0 |
9,931,936 | 03/29/2012 19:15:15 | 1,000,089 | 10/17/2011 22:39:16 | 1 | 0 | Capital letters in console | Can i input only capital letters in console(C++)?
I talking about automatically input, regardless of the capslock is on or off? | visual-c++ | console | null | null | null | 03/31/2012 00:41:11 | not a real question | Capital letters in console
===
Can i input only capital letters in console(C++)?
I talking about automatically input, regardless of the capslock is on or off? | 1 |
3,536,589 | 08/21/2010 06:20:40 | 415,078 | 08/09/2010 12:35:30 | 16 | 3 | What is more efficient IList<T> or IEnumerable<T> | What is more efficient way to make methods return IList<'T'> or IEnumerable<'T'> ?
IEnumerable<'T'> it is immutable collection but IList<'T'> mutable and contain a lot of useful methods and properties.
To cast IList<'T'> to IEnumerable<'T'> it is just reference copy:
IList<'T'> l = new List<'T'>();
IEnumerable<'T'> e = l;
To cast IEnumerable<'T'> to List<'T'> we need to iterate each element or to call ToList() method:
IEnumerable<'T'>.ToList();
or may pass IEnumerable<'T'> to List<'T'> constructor which doing the same iteration somewhere within its constructor.
List<'T'> l = new List<'T'>(e);
Which cases you think is more efficient? Which you prefer more in your practice? | c#-4.0 | null | null | null | null | null | open | What is more efficient IList<T> or IEnumerable<T>
===
What is more efficient way to make methods return IList<'T'> or IEnumerable<'T'> ?
IEnumerable<'T'> it is immutable collection but IList<'T'> mutable and contain a lot of useful methods and properties.
To cast IList<'T'> to IEnumerable<'T'> it is just reference copy:
IList<'T'> l = new List<'T'>();
IEnumerable<'T'> e = l;
To cast IEnumerable<'T'> to List<'T'> we need to iterate each element or to call ToList() method:
IEnumerable<'T'>.ToList();
or may pass IEnumerable<'T'> to List<'T'> constructor which doing the same iteration somewhere within its constructor.
List<'T'> l = new List<'T'>(e);
Which cases you think is more efficient? Which you prefer more in your practice? | 0 |
1,687,063 | 11/06/2009 11:39:18 | 124,194 | 06/17/2009 08:58:13 | 1 | 1 | Access List items in hidden "Forms" folder using Lists.GetListItems | Is it possible to access the list items in the (hidden) "Forms" subfolder of a document library using the `Lists.GetListItems` web service method? I need to set the content type of uploaded document templates using `Lists.UpdateListItems`, otherwise, document created from these templates will have the 'Document' content type and not the content type the template had been assigned to.
`Lists.UpdateListItems` works in subfolders of the "Forms"' folder, but I need the `ows_UniqueId` of the list item that represents the uploaded file, and I can only get it using `List.GetListItems`.
Is there maybe another method of uploading files to SharePoint document libraries, in which you can set the content type?
| sharepoint | list | web-services | null | null | null | open | Access List items in hidden "Forms" folder using Lists.GetListItems
===
Is it possible to access the list items in the (hidden) "Forms" subfolder of a document library using the `Lists.GetListItems` web service method? I need to set the content type of uploaded document templates using `Lists.UpdateListItems`, otherwise, document created from these templates will have the 'Document' content type and not the content type the template had been assigned to.
`Lists.UpdateListItems` works in subfolders of the "Forms"' folder, but I need the `ows_UniqueId` of the list item that represents the uploaded file, and I can only get it using `List.GetListItems`.
Is there maybe another method of uploading files to SharePoint document libraries, in which you can set the content type?
| 0 |
4,904,813 | 02/05/2011 02:51:19 | 586,114 | 01/23/2011 03:22:50 | 5 | 0 | Trouble with accessing a member function | I'm using the EasyBMP library. This library has a method:
int red = image(i, j)->Red;
// Gets the value stored in the red channel at coordinates (i, j) of the BMP named image and stores it into the int named red.
Here's the code that I have:
`int red = images[i](x, y)->Red;`//images is a dynamic array, I'm using a for loop here
images is a member variable of the class with this declaration:
Image **images;
The error I'm getting is:
scene.cpp:195: error: ‘*(((Image**)((const Scene*)this)->Scene::images) + ((Image**)(((long unsigned int)i) * 8ul)))’ cannot be used as a function
I understand where its getting mixed up, but I dont know how to fix it. Any ideas?
| c++ | null | null | null | null | null | open | Trouble with accessing a member function
===
I'm using the EasyBMP library. This library has a method:
int red = image(i, j)->Red;
// Gets the value stored in the red channel at coordinates (i, j) of the BMP named image and stores it into the int named red.
Here's the code that I have:
`int red = images[i](x, y)->Red;`//images is a dynamic array, I'm using a for loop here
images is a member variable of the class with this declaration:
Image **images;
The error I'm getting is:
scene.cpp:195: error: ‘*(((Image**)((const Scene*)this)->Scene::images) + ((Image**)(((long unsigned int)i) * 8ul)))’ cannot be used as a function
I understand where its getting mixed up, but I dont know how to fix it. Any ideas?
| 0 |
11,657,149 | 07/25/2012 19:30:07 | 1,535,578 | 07/18/2012 16:58:36 | 1 | 0 | delete the third character of a string OBJETIVE C | do the opposite of this
[stringPhone insertString:@"9" atIndex:[stringPhone length ]-8];
I tried to do in many ways and it still fails | iphone | objective-c | ios | string | delete | 07/26/2012 09:01:49 | not a real question | delete the third character of a string OBJETIVE C
===
do the opposite of this
[stringPhone insertString:@"9" atIndex:[stringPhone length ]-8];
I tried to do in many ways and it still fails | 1 |
2,461,718 | 03/17/2010 11:14:07 | 283,538 | 03/01/2010 10:53:04 | 17 | 1 | NHibernate - fast way to clear out database | I intend to perform some automated integration tests. This requires the db to be put back into a 'clean state'. Is this the fastest/best way to do this:
var cfg = new Configuration(); cfg.Configure(); cfg.AddAssembly("Bla"); new SchemaExport(cfg).Execute(false, true, false);
Thanks.
Christian | nhibernate | integration-testing | null | null | null | null | open | NHibernate - fast way to clear out database
===
I intend to perform some automated integration tests. This requires the db to be put back into a 'clean state'. Is this the fastest/best way to do this:
var cfg = new Configuration(); cfg.Configure(); cfg.AddAssembly("Bla"); new SchemaExport(cfg).Execute(false, true, false);
Thanks.
Christian | 0 |
11,429,649 | 07/11/2012 09:32:22 | 1,427,460 | 05/31/2012 04:15:21 | 346 | 19 | is FileCleaner to avoid multiple deployments in web app? | Eclipse is giving Out of memory exception on my UNIX machine ,Having jdk 1.6.while trying to run my web application multiple times without terminating my local application server .
Then increased my heap space through vm arguments and also tried with changing Eclipse.ini.
But no use .
googled for sometime
and came to know that it is problem with the webapp classLoader multiple deployments .I am unable to find a solution for this problem .please give a solution to overcome this .
I found to use **FileCleaner** for to avoid multiple deployment and written code in LogoutServlet.
@Override
protected void doPost(HttpServletRequest req, HttpServletResponse resp)
throws ServletException, IOException {
req.getSession().invalidate();
FileCleaner.getInstance().exitWhenFinished();
resp.sendRedirect("/index");
}
But it is not working.
Thanks in advance . | java | eclipse | null | null | null | null | open | is FileCleaner to avoid multiple deployments in web app?
===
Eclipse is giving Out of memory exception on my UNIX machine ,Having jdk 1.6.while trying to run my web application multiple times without terminating my local application server .
Then increased my heap space through vm arguments and also tried with changing Eclipse.ini.
But no use .
googled for sometime
and came to know that it is problem with the webapp classLoader multiple deployments .I am unable to find a solution for this problem .please give a solution to overcome this .
I found to use **FileCleaner** for to avoid multiple deployment and written code in LogoutServlet.
@Override
protected void doPost(HttpServletRequest req, HttpServletResponse resp)
throws ServletException, IOException {
req.getSession().invalidate();
FileCleaner.getInstance().exitWhenFinished();
resp.sendRedirect("/index");
}
But it is not working.
Thanks in advance . | 0 |
2,354,299 | 03/01/2010 07:02:10 | 225,381 | 12/05/2009 06:30:28 | 76 | 7 | How much time in a week a programmer should spend on coding and learning | I am final year college student. I am trying to figure out how much time i should spend on coding and learning. | programmer | time | null | null | null | 03/04/2012 05:34:14 | off topic | How much time in a week a programmer should spend on coding and learning
===
I am final year college student. I am trying to figure out how much time i should spend on coding and learning. | 2 |
5,761,413 | 04/23/2011 01:02:28 | 577,455 | 01/16/2011 12:02:24 | 345 | 1 | How to edit ini directive? | I'm working on Mac 10.6.6. with php 5.3 installed with MAMP. I've run into a problem trying to install Pear. A blog I found suggested a solution that requires me to to set the following ini directive:
detect_unicode = Off
Can someone tell me how to do it?
I went looking through MAMP folder but couldn't see PHP ini file. Note, I'm very inexperienced working with the command line.
Thanks if you can help. | php | pear | mamp | null | null | null | open | How to edit ini directive?
===
I'm working on Mac 10.6.6. with php 5.3 installed with MAMP. I've run into a problem trying to install Pear. A blog I found suggested a solution that requires me to to set the following ini directive:
detect_unicode = Off
Can someone tell me how to do it?
I went looking through MAMP folder but couldn't see PHP ini file. Note, I'm very inexperienced working with the command line.
Thanks if you can help. | 0 |
8,604,422 | 12/22/2011 13:18:01 | 429,377 | 05/18/2010 13:03:58 | 1,412 | 43 | Convert list of Java objects to list of JSON and use it in JavaScript | i have list of **java objects** from type **User** which has properties **id,name,email**
and i want to be able to **process on this list** in a **javascript function**, so i found that i should **convert this list to JSON objects first**, so my questions are:
1. What **library** should i use to accomplish that ?
2. How to **convert** from **list of java objects** to **list of JSON objects** ?
3. How to **access this list** of **JSON objects** in a **javascript function** ?
| javascript | json | java-ee | jsf-2.0 | null | 12/22/2011 14:07:06 | not a real question | Convert list of Java objects to list of JSON and use it in JavaScript
===
i have list of **java objects** from type **User** which has properties **id,name,email**
and i want to be able to **process on this list** in a **javascript function**, so i found that i should **convert this list to JSON objects first**, so my questions are:
1. What **library** should i use to accomplish that ?
2. How to **convert** from **list of java objects** to **list of JSON objects** ?
3. How to **access this list** of **JSON objects** in a **javascript function** ?
| 1 |
7,084,309 | 08/16/2011 20:06:16 | 897,432 | 08/16/2011 19:58:29 | 1 | 0 | Partial EMMA code coverage in Scala Case Class for IntelliJ IDEA 10.5 | I'm using IntelliJ IDEA 10.5 with the Scala plugin v0.4.1338 updated on August 14th, and Scala 2.9.0.1. I recently began using the EMMA test coverage utility in IDEA to generate coverage reports.
I cannot determine why the constructor line of my Scala case class is only showing partial (yellow) coverage. I have looked in the EMMA FAQs and researched the matter online with no success. Does anyone have any idea how I can reach 100% coverage on a case class? | scala | intellij-idea | code-coverage | emma | null | null | open | Partial EMMA code coverage in Scala Case Class for IntelliJ IDEA 10.5
===
I'm using IntelliJ IDEA 10.5 with the Scala plugin v0.4.1338 updated on August 14th, and Scala 2.9.0.1. I recently began using the EMMA test coverage utility in IDEA to generate coverage reports.
I cannot determine why the constructor line of my Scala case class is only showing partial (yellow) coverage. I have looked in the EMMA FAQs and researched the matter online with no success. Does anyone have any idea how I can reach 100% coverage on a case class? | 0 |
11,479,830 | 07/14/2012 00:04:11 | 1,524,841 | 07/13/2012 23:49:18 | 1 | 0 | Confuzed about the future of programming | I am a young undergraduate engineering student who needs your help about his future.
Let me be clear from the beginning. I love electronics. Analog electronics, especially. But, what I see is that programming has taken over the world. You see programming languages and algorithms everywhere, from sites about jobs to the best magazines in the field (IEEE magazines). It is like we have found a limit in electronics and software is the only way to push this industry forward. I dare you to take a look at a hardware magazine. The closest thing you are going to see about analog electronics is mathematics related to signal processing theory, which assume the existence of the actual devices they are going to use.
So here is my dilemma. Should I, also, choose the way of software? The problem is that I don't like writing code, except of assembly, but I like mathematics.
Thank you. | hardware | electronics | null | null | null | 07/14/2012 22:53:02 | off topic | Confuzed about the future of programming
===
I am a young undergraduate engineering student who needs your help about his future.
Let me be clear from the beginning. I love electronics. Analog electronics, especially. But, what I see is that programming has taken over the world. You see programming languages and algorithms everywhere, from sites about jobs to the best magazines in the field (IEEE magazines). It is like we have found a limit in electronics and software is the only way to push this industry forward. I dare you to take a look at a hardware magazine. The closest thing you are going to see about analog electronics is mathematics related to signal processing theory, which assume the existence of the actual devices they are going to use.
So here is my dilemma. Should I, also, choose the way of software? The problem is that I don't like writing code, except of assembly, but I like mathematics.
Thank you. | 2 |
10,145,739 | 04/13/2012 17:47:24 | 1,281,930 | 03/20/2012 20:44:25 | 117 | 14 | wamp server locally denied? | I have just installed Wamp Server 2 to my pc. and I cannot access phpmyadmin, or even index.php at root directory, it all gives 403 Forbidden.
I have also tried to change permission from alias.conf it did not work.
Do you have any idea how to solve this, or any offer is worth to try, please share.
Thanks in advance.
PS: OS: W7, antivirus KasperSky, windows firewall off.
EDIT: restarting wamp solved phpmyadmin access but directory access (ie: `http://localhost/index.php`) is still forbidden.
EDIT2: I can now access my index.php through the url: `127.0.0.1/index.php` but I cannot still access `http://localhost/index.php` and I shall use `http://localhost/` | wampserver | http-status-code-403 | null | null | null | null | open | wamp server locally denied?
===
I have just installed Wamp Server 2 to my pc. and I cannot access phpmyadmin, or even index.php at root directory, it all gives 403 Forbidden.
I have also tried to change permission from alias.conf it did not work.
Do you have any idea how to solve this, or any offer is worth to try, please share.
Thanks in advance.
PS: OS: W7, antivirus KasperSky, windows firewall off.
EDIT: restarting wamp solved phpmyadmin access but directory access (ie: `http://localhost/index.php`) is still forbidden.
EDIT2: I can now access my index.php through the url: `127.0.0.1/index.php` but I cannot still access `http://localhost/index.php` and I shall use `http://localhost/` | 0 |
11,412,631 | 07/10/2012 11:45:40 | 1,511,085 | 07/09/2012 05:42:58 | 1 | 0 | can u pls tell me whats wrong in my app, it doesn't have any compile errors | 07-10 17:12:50.992: E/Trace(1287): error opening trace file: No such file or directory (2)
07-10 17:12:51.652: I/Choreographer(1287): Skipped 49 frames! The application may be doing too much work on its main thread.
07-10 17:12:51.772: D/gralloc_goldfish(1287): Emulator without GPU emulation detected.
07-10 17:13:08.652: D/AndroidRuntime(1287): Shutting down VM
07-10 17:13:08.652: W/dalvikvm(1287): threadid=1: thread exiting with uncaught exception (group=0x40a13300)
07-10 17:13:08.717: E/AndroidRuntime(1287): FATAL EXCEPTION: main
07-10 17:13:08.717: E/AndroidRuntime(1287): java.lang.IllegalStateException: Could not execute method of the activity
07-10 17:13:08.717: E/AndroidRuntime(1287): at android.view.View$1.onClick(View.java:3591)
07-10 17:13:08.717: E/AndroidRuntime(1287): at android.view.View.performClick(View.java:4084)
07-10 17:13:08.717: E/AndroidRuntime(1287): at android.view.View$PerformClick.run(View.java:16966)
07-10 17:13:08.717: E/AndroidRuntime(1287): at android.os.Handler.handleCallback(Handler.java:615)
07-10 17:13:08.717: E/AndroidRuntime(1287): at android.os.Handler.dispatchMessage(Handler.java:92)
07-10 17:13:08.717: E/AndroidRuntime(1287): at android.os.Looper.loop(Looper.java:137)
07-10 17:13:08.717: E/AndroidRuntime(1287): at android.app.ActivityThread.main(ActivityThread.java:4745)
07-10 17:13:08.717: E/AndroidRuntime(1287): at java.lang.reflect.Method.invokeNative(Native Method)
07-10 17:13:08.717: E/AndroidRuntime(1287): at java.lang.reflect.Method.invoke(Method.java:511)
07-10 17:13:08.717: E/AndroidRuntime(1287): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786)
07-10 17:13:08.717: E/AndroidRuntime(1287): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
07-10 17:13:08.717: E/AndroidRuntime(1287): at dalvik.system.NativeStart.main(Native Method)
07-10 17:13:08.717: E/AndroidRuntime(1287): Caused by: java.lang.reflect.InvocationTargetException
07-10 17:13:08.717: E/AndroidRuntime(1287): at java.lang.reflect.Method.invokeNative(Native Method)
07-10 17:13:08.717: E/AndroidRuntime(1287): at java.lang.reflect.Method.invoke(Method.java:511)
07-10 17:13:08.717: E/AndroidRuntime(1287): at android.view.View$1.onClick(View.java:3586)
07-10 17:13:08.717: E/AndroidRuntime(1287): ... 11 more
07-10 17:13:08.717: E/AndroidRuntime(1287): Caused by: android.content.ActivityNotFoundException: Unable to find explicit activity class {com.example.send/com.example.send.DisplayActivityMessage}; have you declared this activity in your AndroidManifest.xml?
07-10 17:13:08.717: E/AndroidRuntime(1287): at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:1541)
07-10 17:13:08.717: E/AndroidRuntime(1287): at android.app.Instrumentation.execStartActivity(Instrumentation.java:1416)
07-10 17:13:08.717: E/AndroidRuntime(1287): at android.app.Activity.startActivityForResult(Activity.java:3351)
07-10 17:13:08.717: E/AndroidRuntime(1287): at android.app.Activity.startActivityForResult(Activity.java:3312)
07-10 17:13:08.717: E/AndroidRuntime(1287): at android.app.Activity.startActivity(Activity.java:3522)
07-10 17:13:08.717: E/AndroidRuntime(1287): at android.app.Activity.startActivity(Activity.java:3490)
07-10 17:13:08.717: E/AndroidRuntime(1287): at com.example.send.send.sendMessage(send.java:25)
07-10 17:13:08.717: E/AndroidRuntime(1287): ... 14 more
07-10 17:13:10.875: I/Process(1287): Sending signal. PID: 1287 SIG: 9
| android | null | null | null | null | 07/10/2012 11:48:52 | not a real question | can u pls tell me whats wrong in my app, it doesn't have any compile errors
===
07-10 17:12:50.992: E/Trace(1287): error opening trace file: No such file or directory (2)
07-10 17:12:51.652: I/Choreographer(1287): Skipped 49 frames! The application may be doing too much work on its main thread.
07-10 17:12:51.772: D/gralloc_goldfish(1287): Emulator without GPU emulation detected.
07-10 17:13:08.652: D/AndroidRuntime(1287): Shutting down VM
07-10 17:13:08.652: W/dalvikvm(1287): threadid=1: thread exiting with uncaught exception (group=0x40a13300)
07-10 17:13:08.717: E/AndroidRuntime(1287): FATAL EXCEPTION: main
07-10 17:13:08.717: E/AndroidRuntime(1287): java.lang.IllegalStateException: Could not execute method of the activity
07-10 17:13:08.717: E/AndroidRuntime(1287): at android.view.View$1.onClick(View.java:3591)
07-10 17:13:08.717: E/AndroidRuntime(1287): at android.view.View.performClick(View.java:4084)
07-10 17:13:08.717: E/AndroidRuntime(1287): at android.view.View$PerformClick.run(View.java:16966)
07-10 17:13:08.717: E/AndroidRuntime(1287): at android.os.Handler.handleCallback(Handler.java:615)
07-10 17:13:08.717: E/AndroidRuntime(1287): at android.os.Handler.dispatchMessage(Handler.java:92)
07-10 17:13:08.717: E/AndroidRuntime(1287): at android.os.Looper.loop(Looper.java:137)
07-10 17:13:08.717: E/AndroidRuntime(1287): at android.app.ActivityThread.main(ActivityThread.java:4745)
07-10 17:13:08.717: E/AndroidRuntime(1287): at java.lang.reflect.Method.invokeNative(Native Method)
07-10 17:13:08.717: E/AndroidRuntime(1287): at java.lang.reflect.Method.invoke(Method.java:511)
07-10 17:13:08.717: E/AndroidRuntime(1287): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786)
07-10 17:13:08.717: E/AndroidRuntime(1287): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
07-10 17:13:08.717: E/AndroidRuntime(1287): at dalvik.system.NativeStart.main(Native Method)
07-10 17:13:08.717: E/AndroidRuntime(1287): Caused by: java.lang.reflect.InvocationTargetException
07-10 17:13:08.717: E/AndroidRuntime(1287): at java.lang.reflect.Method.invokeNative(Native Method)
07-10 17:13:08.717: E/AndroidRuntime(1287): at java.lang.reflect.Method.invoke(Method.java:511)
07-10 17:13:08.717: E/AndroidRuntime(1287): at android.view.View$1.onClick(View.java:3586)
07-10 17:13:08.717: E/AndroidRuntime(1287): ... 11 more
07-10 17:13:08.717: E/AndroidRuntime(1287): Caused by: android.content.ActivityNotFoundException: Unable to find explicit activity class {com.example.send/com.example.send.DisplayActivityMessage}; have you declared this activity in your AndroidManifest.xml?
07-10 17:13:08.717: E/AndroidRuntime(1287): at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:1541)
07-10 17:13:08.717: E/AndroidRuntime(1287): at android.app.Instrumentation.execStartActivity(Instrumentation.java:1416)
07-10 17:13:08.717: E/AndroidRuntime(1287): at android.app.Activity.startActivityForResult(Activity.java:3351)
07-10 17:13:08.717: E/AndroidRuntime(1287): at android.app.Activity.startActivityForResult(Activity.java:3312)
07-10 17:13:08.717: E/AndroidRuntime(1287): at android.app.Activity.startActivity(Activity.java:3522)
07-10 17:13:08.717: E/AndroidRuntime(1287): at android.app.Activity.startActivity(Activity.java:3490)
07-10 17:13:08.717: E/AndroidRuntime(1287): at com.example.send.send.sendMessage(send.java:25)
07-10 17:13:08.717: E/AndroidRuntime(1287): ... 14 more
07-10 17:13:10.875: I/Process(1287): Sending signal. PID: 1287 SIG: 9
| 1 |
2,320,516 | 02/23/2010 18:00:34 | 40,999 | 11/26/2008 12:25:39 | 861 | 39 | Automating Firefox and Chrome browsers | I am looking for a way to automate couple of browsers... Firefox and Chrome (for now on just Windows) from an external application/process.
Is there a way to do things along these lines:
1. Start the browser with a URL
2. Have the browser load up the page, run script etc.
3. Inspect the DOM
For reference, IE can be automated using the InternetExplorer.Application object which can be created in a shell script using the following javascript, and then I can walk the DOM API:
var ie = new ActiveXObject('InternetExplorer.Application');
The motivating scenario here is automated testing. I'd like to load up the page containing the test code, and gather results after the test has run. | firefox | google-chrome | automation | testing | null | 05/17/2012 13:50:22 | not a real question | Automating Firefox and Chrome browsers
===
I am looking for a way to automate couple of browsers... Firefox and Chrome (for now on just Windows) from an external application/process.
Is there a way to do things along these lines:
1. Start the browser with a URL
2. Have the browser load up the page, run script etc.
3. Inspect the DOM
For reference, IE can be automated using the InternetExplorer.Application object which can be created in a shell script using the following javascript, and then I can walk the DOM API:
var ie = new ActiveXObject('InternetExplorer.Application');
The motivating scenario here is automated testing. I'd like to load up the page containing the test code, and gather results after the test has run. | 1 |
2,483,083 | 03/20/2010 12:58:38 | 214,624 | 11/19/2009 14:23:33 | 20 | 1 | How to convert any text/font to its bezier path representation? | I have a bezier path library to draw complex bezier paths without problem. Now, I need to know how to read a text or font and extract its path information to draw it as a path instead of as text.
I came across a C applicaiton, [FontForge](http://fontforge.sourceforge.net/). It does exactly what I need, picks any font and extract its path information. But what I need to know is how it does it to add that feature to my drawing library.
| geometry | beizer | text | fonts | null | null | open | How to convert any text/font to its bezier path representation?
===
I have a bezier path library to draw complex bezier paths without problem. Now, I need to know how to read a text or font and extract its path information to draw it as a path instead of as text.
I came across a C applicaiton, [FontForge](http://fontforge.sourceforge.net/). It does exactly what I need, picks any font and extract its path information. But what I need to know is how it does it to add that feature to my drawing library.
| 0 |
6,451,948 | 06/23/2011 09:28:12 | 338,843 | 05/11/2010 23:53:37 | 350 | 24 | Does Objective C implementation is much slower plain C? (optimization) | I'm working on painting application and implementing flood fill.
I implemented it using Objective C but without using any Apple's framework. Basically algorithm was ported from plain C.
At the moment there are 2 implementations - Floodfill4 anf Scanline floodfill.
Both spend around 5secs on iPad to fill 800x600 rectangle.
Here is my algorithm:
https://github.com/OgreSwamp/ObjFloodFill/blob/master/src/FloodFill.m
Do you think it is worth to invest some time to port it to pure C. Will I have sighnificant performance increase?
Do you see any other way to increase performance?
Thanks! | iphone | objective-c | c | ios | algorithm | 06/23/2011 10:38:53 | off topic | Does Objective C implementation is much slower plain C? (optimization)
===
I'm working on painting application and implementing flood fill.
I implemented it using Objective C but without using any Apple's framework. Basically algorithm was ported from plain C.
At the moment there are 2 implementations - Floodfill4 anf Scanline floodfill.
Both spend around 5secs on iPad to fill 800x600 rectangle.
Here is my algorithm:
https://github.com/OgreSwamp/ObjFloodFill/blob/master/src/FloodFill.m
Do you think it is worth to invest some time to port it to pure C. Will I have sighnificant performance increase?
Do you see any other way to increase performance?
Thanks! | 2 |
10,474,005 | 05/06/2012 20:28:43 | 1,173,680 | 01/27/2012 14:28:02 | 20 | 2 | Menu not working with on page anchors and out of page anchors | Not really sure how to phrase my question but here's my issue:
I have a php template type site where the main navigation is in it's own file. Some of the navigation buttons point to anchors on the main page and some go to other pages completely.
My original menu used links like index.php#<someid> for the on page anchors and index.php?page=<somepagename> for the off page links. I had two issues with this:
1. When I selected an on page link the page seemed to refresh and it was slow taking me to the place on the page the link was connected to.
2. I'm using htaccess to redirect my url from mydomaincom/index.php to mydomaincom/ and found that my nav didn't work in Safari since my href addresses where index.php#value and Safari v5 wouldn't carry over the anchor links.
Rather than turn off my redirect I just changed the urls to point to mydomaincom/#value. Not only did this work great for all browsers but it also made my page quicker.
Now however when I'm on one of the other pages say index.php?page=photos and I use the nav it just tries to find the anchors on that page (which makes sense but obviously not what I want).
What it's doing now:
mydomaincom/index.php?page=photos#<idname>
What I need it to do:
mydomaincom/#<idname>
Since the same nav file is used for all pages do I need to create a nave link variable so that when the nav is on a non-index.php page the link urls that hook to the index.php on page anchors uses the full url?
Hopefully this makes sense. Any suggestions? Also trying to keep this search engine/Google friendly :)
Thanks! | php | html | navigation | links | null | null | open | Menu not working with on page anchors and out of page anchors
===
Not really sure how to phrase my question but here's my issue:
I have a php template type site where the main navigation is in it's own file. Some of the navigation buttons point to anchors on the main page and some go to other pages completely.
My original menu used links like index.php#<someid> for the on page anchors and index.php?page=<somepagename> for the off page links. I had two issues with this:
1. When I selected an on page link the page seemed to refresh and it was slow taking me to the place on the page the link was connected to.
2. I'm using htaccess to redirect my url from mydomaincom/index.php to mydomaincom/ and found that my nav didn't work in Safari since my href addresses where index.php#value and Safari v5 wouldn't carry over the anchor links.
Rather than turn off my redirect I just changed the urls to point to mydomaincom/#value. Not only did this work great for all browsers but it also made my page quicker.
Now however when I'm on one of the other pages say index.php?page=photos and I use the nav it just tries to find the anchors on that page (which makes sense but obviously not what I want).
What it's doing now:
mydomaincom/index.php?page=photos#<idname>
What I need it to do:
mydomaincom/#<idname>
Since the same nav file is used for all pages do I need to create a nave link variable so that when the nav is on a non-index.php page the link urls that hook to the index.php on page anchors uses the full url?
Hopefully this makes sense. Any suggestions? Also trying to keep this search engine/Google friendly :)
Thanks! | 0 |
6,604,136 | 07/06/2011 23:15:16 | 340,947 | 05/14/2010 05:16:31 | 575 | 11 | Initializing with a subclass's ctor | struct A {
B b;
A(int x):b(x){}
A(int x, float g) // how to implement this? I want to init b as a C.
};
struct B {
enum {e_c, e_d} type;
int i;
B(int i_):i(i_){}
};
struct C : public B {
float f;
C(int i_, float f_):B(i),f(f_){}
};
struct D : public B {
double ff;
D(int i_, double d):B(i),ff(d){}
};
Perhaps there is another way to code this? Originally I just had the class B, but I decided to split it up so I didn't keep adding (incompatible/mutually exclusive) fields to B. My solution was, when A uses b it checks b's enum to see what type it is, then casts a B* to a C* or a D* to get the float or double. My problem is now I don't know how to let A initialize b. Does the language even let me do something like that?
**edit**: I just realized A's b couldn't possibly have allocated space to allow for C or D's extra fields. There wouldn't be any available space to store the float or double. So I guess the right way to do what i want is to add into B a `union {float f; double ff;};`? | c++ | oop | null | null | null | null | open | Initializing with a subclass's ctor
===
struct A {
B b;
A(int x):b(x){}
A(int x, float g) // how to implement this? I want to init b as a C.
};
struct B {
enum {e_c, e_d} type;
int i;
B(int i_):i(i_){}
};
struct C : public B {
float f;
C(int i_, float f_):B(i),f(f_){}
};
struct D : public B {
double ff;
D(int i_, double d):B(i),ff(d){}
};
Perhaps there is another way to code this? Originally I just had the class B, but I decided to split it up so I didn't keep adding (incompatible/mutually exclusive) fields to B. My solution was, when A uses b it checks b's enum to see what type it is, then casts a B* to a C* or a D* to get the float or double. My problem is now I don't know how to let A initialize b. Does the language even let me do something like that?
**edit**: I just realized A's b couldn't possibly have allocated space to allow for C or D's extra fields. There wouldn't be any available space to store the float or double. So I guess the right way to do what i want is to add into B a `union {float f; double ff;};`? | 0 |
8,198,035 | 11/19/2011 23:03:33 | 410,137 | 08/03/2010 21:03:48 | 117 | 1 | Should I use R or Octave for modification of tab delimitated text files? | I have a bunch of text files with tab delimited data, like so
X Y Z
1 2 Q
K 4 2
I want to examine these for certain properties, and then modify them in different ways depending on the result, eventually creating new text files with information added and/or deleted.
Now, according to my own investigations, both R and Octave could probably do this. Should I prefer one of them over the other for this task?
| r | octave | null | null | null | null | open | Should I use R or Octave for modification of tab delimitated text files?
===
I have a bunch of text files with tab delimited data, like so
X Y Z
1 2 Q
K 4 2
I want to examine these for certain properties, and then modify them in different ways depending on the result, eventually creating new text files with information added and/or deleted.
Now, according to my own investigations, both R and Octave could probably do this. Should I prefer one of them over the other for this task?
| 0 |
10,356,838 | 04/27/2012 19:38:45 | 377,671 | 06/28/2010 01:26:02 | 87 | 2 | How to integrate Meteor and Ext.js? | I´m trying to figure out the most elegant way of bringing Meteor and Ext together.
Obviously Ext has it´s own Ext.data.Store and Proxies to handle REST backends. Meteor has a publish/subscribe model with pusing updates automatically.
My first thought would be do write a custom "MeteorProxy" and to handle all the update events there. I´m not sure though this is wise in terms of filtering or sorting data. Ideally filtering should take place on the Meteor side because data sorts/filters ideally should persist across to other (non-ext) views of the data.
Alternatively there would be e.g. the way of using the MemoryProxy and write some glue code to update it... | javascript | extjs | meteor | null | null | 04/30/2012 23:08:16 | not a real question | How to integrate Meteor and Ext.js?
===
I´m trying to figure out the most elegant way of bringing Meteor and Ext together.
Obviously Ext has it´s own Ext.data.Store and Proxies to handle REST backends. Meteor has a publish/subscribe model with pusing updates automatically.
My first thought would be do write a custom "MeteorProxy" and to handle all the update events there. I´m not sure though this is wise in terms of filtering or sorting data. Ideally filtering should take place on the Meteor side because data sorts/filters ideally should persist across to other (non-ext) views of the data.
Alternatively there would be e.g. the way of using the MemoryProxy and write some glue code to update it... | 1 |
10,977,100 | 06/11/2012 09:04:51 | 1,077,160 | 12/02/2011 10:13:49 | 150 | 28 | Foursquare API for venue user image error | The Foursquare API has divided its photo tag for user as prefix and suffix. But if I merge them to form a full image URL and paste this in my browser, gives me errors that says the image can't be displayed because it contains errors. Is it because server is temporarily unavailable or anything else ?
Any clue ?
I am using the API for Venue Detail .
Thanks in Advanced. | php | api | foursquare | null | null | null | open | Foursquare API for venue user image error
===
The Foursquare API has divided its photo tag for user as prefix and suffix. But if I merge them to form a full image URL and paste this in my browser, gives me errors that says the image can't be displayed because it contains errors. Is it because server is temporarily unavailable or anything else ?
Any clue ?
I am using the API for Venue Detail .
Thanks in Advanced. | 0 |
8,636,260 | 12/26/2011 13:35:11 | 1,080,494 | 12/04/2011 20:24:00 | 23 | 0 | Python tkinter grid manager? | I just learned how to use tkinter in Python (3.2.2), and I'm having some problem using the grid manager. When I put button.grid(sticky=SE), for example, the button is not being put in the bottom-right and is just being put in the upper-left, ignoring the sticky value. What am I doing wrong here? I tried to search it but I couldn't really find out what I am doing wrong. | python | grid | python-3.x | tkinter | sticky | null | open | Python tkinter grid manager?
===
I just learned how to use tkinter in Python (3.2.2), and I'm having some problem using the grid manager. When I put button.grid(sticky=SE), for example, the button is not being put in the bottom-right and is just being put in the upper-left, ignoring the sticky value. What am I doing wrong here? I tried to search it but I couldn't really find out what I am doing wrong. | 0 |
7,160,777 | 08/23/2011 12:06:27 | 884,758 | 08/08/2011 20:16:39 | 6 | 0 | how to use JStun in java? | how to use JStun in java? i really did not understand about the JStun although i read t..
can anyone give any simple way or example about how to use JStun in java?
-----------------------------------------------------------------------------
how to use JStun in java? i really did not understand about the JStun although i read t..
can anyone give any simple way or example about how to use JStun in java?
| java | udp | tunnel | null | null | 08/23/2011 15:01:22 | not a real question | how to use JStun in java?
===
how to use JStun in java? i really did not understand about the JStun although i read t..
can anyone give any simple way or example about how to use JStun in java?
-----------------------------------------------------------------------------
how to use JStun in java? i really did not understand about the JStun although i read t..
can anyone give any simple way or example about how to use JStun in java?
| 1 |
7,445,031 | 09/16/2011 13:00:00 | 948,851 | 09/16/2011 13:00:00 | 1 | 0 | Auto Refresh document title? | I have tried many ways to have the page title automatically update every 2.5 seconds so the title can display how many unread messages they have.
Here is what I have tried:
setInterval(function() {
document.title = "<?php echo $inboxcc; ?>";
}, 3000);
and
$(function() {
setInterval(function() {
$(this).attr("title", "<?php echo $inboxcc; ?>");
}, 3000);
});
But none of them work. Any suggestions would be appreciated.
Thanks | javascript | jquery | refresh | title | setinterval | null | open | Auto Refresh document title?
===
I have tried many ways to have the page title automatically update every 2.5 seconds so the title can display how many unread messages they have.
Here is what I have tried:
setInterval(function() {
document.title = "<?php echo $inboxcc; ?>";
}, 3000);
and
$(function() {
setInterval(function() {
$(this).attr("title", "<?php echo $inboxcc; ?>");
}, 3000);
});
But none of them work. Any suggestions would be appreciated.
Thanks | 0 |
9,475,097 | 02/28/2012 01:29:12 | 1,160,361 | 01/20/2012 09:59:22 | 156 | 10 | C++: Strings with whitespace in a list? | I have this function sentanceParse whit a string input which returns a list<string>. The input might be something like "Hello my name is Anton. What's your name?" and then the return value would be a list containing "Hello my name is Anton" and "What's your name?". However, this is not what happens. It seems as if the whitespaces in the sentances are treades like a separator and therefore the return is rather "Hello", "my", "name" etc instead of what I expected.
How would you propose I solve this?
As I am not a 100% sure the problem does not lie within my code, I will add that to the post as well:
Main:
list<string> mylist = sentanceParse(textCipher);
list<string>::iterator it;
for(it = mylist.begin(); it != mylist.end(); it++){
textCipher = *it;
cout << textCipher << endl; //This prints out the words separately instead of the entire sentances.
sentanceParse:
list<string> sentanceParse(string strParse){
list<string> strList;
int len = strParse.length();
int pos = 0;
int count = 0;
for(int i = 0; i < len; i++){
if(strParse.at(i) == '.' || strParse.at(i) == '!' || strParse.at(i) == '?'){
if(i < strParse.length() - 1){
while(i < strParse.length() - 1 && (strParse.at(i+1) == '.' || strParse.at(i+1) == '!' || strParse.at(i+1) == '?')){
if(strParse.at(i+1) == '?'){
strParse.replace(i, 1, "?");
}
strParse.erase(i+1, 1);
len -= 1;
}
}
char strTemp[2000];
int lenTemp = strParse.copy(strTemp, i - pos + 1, pos);
strTemp[lenTemp] = '\0';
std::string strAdd(strTemp);
strList.push_back(strAdd);
pos = i + 1;
count ++;
}
}
if(count == 0){
strList.push_back(strParse);
}
return strList;
} | c++ | string | list | whitespace | null | null | open | C++: Strings with whitespace in a list?
===
I have this function sentanceParse whit a string input which returns a list<string>. The input might be something like "Hello my name is Anton. What's your name?" and then the return value would be a list containing "Hello my name is Anton" and "What's your name?". However, this is not what happens. It seems as if the whitespaces in the sentances are treades like a separator and therefore the return is rather "Hello", "my", "name" etc instead of what I expected.
How would you propose I solve this?
As I am not a 100% sure the problem does not lie within my code, I will add that to the post as well:
Main:
list<string> mylist = sentanceParse(textCipher);
list<string>::iterator it;
for(it = mylist.begin(); it != mylist.end(); it++){
textCipher = *it;
cout << textCipher << endl; //This prints out the words separately instead of the entire sentances.
sentanceParse:
list<string> sentanceParse(string strParse){
list<string> strList;
int len = strParse.length();
int pos = 0;
int count = 0;
for(int i = 0; i < len; i++){
if(strParse.at(i) == '.' || strParse.at(i) == '!' || strParse.at(i) == '?'){
if(i < strParse.length() - 1){
while(i < strParse.length() - 1 && (strParse.at(i+1) == '.' || strParse.at(i+1) == '!' || strParse.at(i+1) == '?')){
if(strParse.at(i+1) == '?'){
strParse.replace(i, 1, "?");
}
strParse.erase(i+1, 1);
len -= 1;
}
}
char strTemp[2000];
int lenTemp = strParse.copy(strTemp, i - pos + 1, pos);
strTemp[lenTemp] = '\0';
std::string strAdd(strTemp);
strList.push_back(strAdd);
pos = i + 1;
count ++;
}
}
if(count == 0){
strList.push_back(strParse);
}
return strList;
} | 0 |
6,614,868 | 07/07/2011 17:46:23 | 834,077 | 07/07/2011 17:46:23 | 1 | 0 | Waiting for event to be handled | I have one function let's call it Func1 and `it contains` Func2 & event handler.
Now what I would like to achieve is `not let` function (Func1) return value till Func2 fires and handles event.
Basically Func1 has string as return value and string value is set inside even handler so I need to wait for event to be handled and then return value.
Code Example
public static string Fun1 ()
{
string stringToReturn = String.Empty;
Func2(); //Func2 will after few sec fire event bellow
example.MyEvent += (object sender, WebBrowserDocumentCompletedEventArgs e) =>
{
stringToReturn = "example"; //this wont be hardcoded
};
//wait for event to be handled and then return value
return stringToReturn;
}
| c# | events | wait | null | null | null | open | Waiting for event to be handled
===
I have one function let's call it Func1 and `it contains` Func2 & event handler.
Now what I would like to achieve is `not let` function (Func1) return value till Func2 fires and handles event.
Basically Func1 has string as return value and string value is set inside even handler so I need to wait for event to be handled and then return value.
Code Example
public static string Fun1 ()
{
string stringToReturn = String.Empty;
Func2(); //Func2 will after few sec fire event bellow
example.MyEvent += (object sender, WebBrowserDocumentCompletedEventArgs e) =>
{
stringToReturn = "example"; //this wont be hardcoded
};
//wait for event to be handled and then return value
return stringToReturn;
}
| 0 |
8,909,209 | 01/18/2012 11:20:52 | 1,132,037 | 01/05/2012 11:43:36 | 1 | 0 | error in crawler method by using firefox | I got below error
python niada.py
Traceback (most recent call last):
File "niada.py", line 10, in <module>
status, response = http.request('http://www.niada.com/member_directory.php?te_mode=map_view')
File "/usr/lib/pymodules/python2.6/httplib2/__init__.py", line 1129, in request
(response, content) = self._request(conn, authority, uri, request_uri, method, body, headers, redirections, cachekey)
File "/usr/lib/pymodules/python2.6/httplib2/__init__.py", line 901, in _request
(response, content) = self._conn_request(conn, request_uri, method, body, headers)
File "/usr/lib/pymodules/python2.6/httplib2/__init__.py", line 887, in _conn_request
content = _decompressContent(response, content)
File "/usr/lib/pymodules/python2.6/httplib2/__init__.py", line 358, in _decompressContent
raise FailedToDecompressContent(_("Content purported to be compressed with %s but failed to decompress.") % response.get('content-encoding'), response, content)
httplib2.FailedToDecompressContent: Content purported to be compressed with gzip but failed to decompress.
I unable to clear this error,my python.How can be solved
please help me
| python | selenium | null | null | null | null | open | error in crawler method by using firefox
===
I got below error
python niada.py
Traceback (most recent call last):
File "niada.py", line 10, in <module>
status, response = http.request('http://www.niada.com/member_directory.php?te_mode=map_view')
File "/usr/lib/pymodules/python2.6/httplib2/__init__.py", line 1129, in request
(response, content) = self._request(conn, authority, uri, request_uri, method, body, headers, redirections, cachekey)
File "/usr/lib/pymodules/python2.6/httplib2/__init__.py", line 901, in _request
(response, content) = self._conn_request(conn, request_uri, method, body, headers)
File "/usr/lib/pymodules/python2.6/httplib2/__init__.py", line 887, in _conn_request
content = _decompressContent(response, content)
File "/usr/lib/pymodules/python2.6/httplib2/__init__.py", line 358, in _decompressContent
raise FailedToDecompressContent(_("Content purported to be compressed with %s but failed to decompress.") % response.get('content-encoding'), response, content)
httplib2.FailedToDecompressContent: Content purported to be compressed with gzip but failed to decompress.
I unable to clear this error,my python.How can be solved
please help me
| 0 |
9,051,411 | 01/29/2012 06:31:07 | 772,834 | 05/27/2011 09:47:05 | 25 | 0 | Getting started with WPF apllications in vb 2010 because winforms has no graphical sense | Hello i have been using vb.net for a little while now and i am annoyed that you can't have true transparent images or even simple fading for a rich interface experience. but luckily there's WPF! but i have no idea on how to use it and even fading an image on that which by an image i mean a button made out of a hover, normal and down .png file state, not coded gradients through XAML, is not that simple!? i only started designing websites with css and html and jQuery about three weeks ago but i can see some similarities in the languages. so if one of you guys could please point me in the right direction that would be great and maybe also you could show me how to create a fading hover button :) with XAML. Thank you | wpf | vb.net | xaml | png | fade | 01/31/2012 15:50:52 | not a real question | Getting started with WPF apllications in vb 2010 because winforms has no graphical sense
===
Hello i have been using vb.net for a little while now and i am annoyed that you can't have true transparent images or even simple fading for a rich interface experience. but luckily there's WPF! but i have no idea on how to use it and even fading an image on that which by an image i mean a button made out of a hover, normal and down .png file state, not coded gradients through XAML, is not that simple!? i only started designing websites with css and html and jQuery about three weeks ago but i can see some similarities in the languages. so if one of you guys could please point me in the right direction that would be great and maybe also you could show me how to create a fading hover button :) with XAML. Thank you | 1 |
9,826,945 | 03/22/2012 16:57:57 | 832,560 | 07/06/2011 23:17:13 | 64 | 0 | BadKeyError: Invalid string key incorrect padding | I'm using a standard couple of lines of code to retrieve a key from a http get request and use it to get something from the datastore, but am running into a problem that I haven't encountered before. This is only happening on the live (deployed) version - there are no problems when running the code on the dev server.
The code snippet:
imgId = self.request.args.get("img_id")
imageInfo = db.get(imgId)
And an error example:
BadKeyError: Invalid string key ahFjeWJlcm5hdXRzcHJvamVjdHINCxIFSW1hZ2UY1oYDDA=. Details: Incorrect padding
If I log the value of imgId right before the db.get, it is correct (without the appended "=" from the debug message). Does anyone know what might be causing this? | python | google-app-engine | null | null | null | 03/23/2012 22:40:38 | too localized | BadKeyError: Invalid string key incorrect padding
===
I'm using a standard couple of lines of code to retrieve a key from a http get request and use it to get something from the datastore, but am running into a problem that I haven't encountered before. This is only happening on the live (deployed) version - there are no problems when running the code on the dev server.
The code snippet:
imgId = self.request.args.get("img_id")
imageInfo = db.get(imgId)
And an error example:
BadKeyError: Invalid string key ahFjeWJlcm5hdXRzcHJvamVjdHINCxIFSW1hZ2UY1oYDDA=. Details: Incorrect padding
If I log the value of imgId right before the db.get, it is correct (without the appended "=" from the debug message). Does anyone know what might be causing this? | 3 |
6,917,764 | 08/02/2011 19:52:56 | 875,303 | 08/02/2011 19:05:19 | 1 | 0 | Facebook chat plugin: is there is a way to add friends-only option for the fb:live-stream plug in? | I wonder if there is a way to add friends-only option for the fb:live-stream plug in?
It was mentioned here https://developers.facebook.com/blog/post/258/ and I see a screenshot over here http://www.fbhive.com/facebook-releases-live-stream-box-allows-real-time-user-updates-for-live-events but can't find how to do anymore.. was this option deprecated??
many thanks in advance for your help.. | facebook | plugins | null | null | null | null | open | Facebook chat plugin: is there is a way to add friends-only option for the fb:live-stream plug in?
===
I wonder if there is a way to add friends-only option for the fb:live-stream plug in?
It was mentioned here https://developers.facebook.com/blog/post/258/ and I see a screenshot over here http://www.fbhive.com/facebook-releases-live-stream-box-allows-real-time-user-updates-for-live-events but can't find how to do anymore.. was this option deprecated??
many thanks in advance for your help.. | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.