[web2py] Generate the nth Pell Number

2012-11-04 Thread Sanjeet Roy
we are required to write a program in python which generates a nth Pell number using Recursion and Memoization. Please help me as soon as possible A Pell number (nth Pell number is represented as P (n)) is recursively defined as:  0 if n = 0;  Pn = 1 if n = 1;   2Pn−1 + Pn−2 otherwise. The

[web2py] how to find the Manhattan distance of the given question in python

2012-11-04 Thread Sanjeet Roy
Assume a Taxicab is located at the origin (0,0) in the below Grid. The hori- zontal and vertical lines in the Grid is the road on which his taxi can move. If the cab wants to move to a place, say (3,4), the distance the cab has to travel is (3 - 0) + (4 - 0) = 7 units. The distance calculated in

[web2py] Image Optimization

2012-06-26 Thread Sanjeet Roy
Can anyone tell me how can i optimize the image when the user will be uploaded ? Acually i want to create a web application where the user can upload and see the image on the categorization of album.i want optimize image should be appeared in the thumbnail --

Re: [web2py] Re: Upload the more than 100 MB file

2012-06-20 Thread Sanjeet Roy
something very large. I suspect there is something in your model that is causing the problem. Can we see your model? On Saturday, 16 June 2012 00:15:35 UTC-5, Sanjeet Roy wrote: Can i upload the more than 100 mb file using web2py when i tried got the error:- Traceback (most recent call

Re: [web2py] Re: Upload the more than 100 MB file

2012-06-20 Thread Sanjeet Roy
server. Moreover the upload is definitively not stored in Ram (unless your app does). Thanks Massimo i will try on different web Server. On Wednesday, 20 June 2012 04:57:39 UTC-5, Sanjeet Roy wrote: Hi Massimo, I am going to make a web application in which, requires to upload more than

[web2py] Upload the more than 100 MB file

2012-06-15 Thread Sanjeet Roy
Can i upload the more than 100 mb file using web2py when i tried got the error:- Traceback (most recent call last): File /home/tls-sanjeet/Desktop/web2py/gluon/restricted.py, line 205, in restricted exec ccode in environment File

[web2py] Set the permission on the selectable in SQLFORM.grid

2012-06-01 Thread Sanjeet Roy
HIi i am useng the following codes :- def test(): table = SQLFORM.grid(db.abc,create=(auth.has_permission('CRUD','auth_user') or auth.has_permission('Admin','auth_user')), maxtextlength=100, selectable = (lambda ids: del_abc(ids) and (auth.has_permission('Admin','auth_user'

Re: [web2py] Set the permission on the selectable in SQLFORM.grid

2012-06-01 Thread Sanjeet Roy
Thanks Johann On Fri, Jun 1, 2012 at 2:53 PM, Johann Spies johann.sp...@gmail.com wrote: On 1 June 2012 10:18, Sanjeet Roy sanjeet.ro...@gmail.com wrote: HIi i am useng the following codes :- def test(): table = SQLFORM.grid(db.abc,create=(auth.has_permission('CRUD','auth_user

Re: [web2py] Re: How to does post in RESTful

2012-05-31 Thread Sanjeet Roy
) return dict(person = db.person(id)) def POST(tablename,**fields): if not tablename=='person': raise HTTP(400) return db.person.validate_and_insert(**fields) return locals() On Thu, May 31, 2012 at 11:22 AM, Sanjeet Roy sanjeet.ro...@gmail.comwrote: Anthony i tried

Re: [web2py] Re: How to does post in RESTful

2012-05-31 Thread Sanjeet Roy
username and password with your curl or wget request? Anthony On Thursday, May 31, 2012 1:52:19 AM UTC-4, Sanjeet Roy wrote: Anthony i tried the following code it is showing method not allowed when i want to access :- @auth.requires_login() @request.restful() def get_project(): proj

Re: [web2py] Re: How to does post in RESTful

2012-05-30 Thread Sanjeet Roy
) if parser.status == 200: return dict(content=parser.response) else: raise HTTP(parser.status,parser.error) return locals() On Wed, May 30, 2012 at 9:51 AM, Sanjeet Roy sanjeet.ro...@gmail.comwrote: Thanks Anthony now i got it and i am able to post the request

Re: [web2py] Re: How to does post in RESTful

2012-05-30 Thread Sanjeet Roy
probably have to enable basic authentication: http://web2py.com/books/default/chapter/29/9#Access-Control-and-Basic-Authentication. Once logged in, the user record should be available in auth.user. Anthony On Thursday, May 31, 2012 12:36:08 AM UTC-4, Sanjeet Roy wrote: Hii Anthony I am

[web2py] Re: How to Create the RESTful API for the Web Application

2012-05-29 Thread Sanjeet Roy
Hii William I tried the example which are given but i get the empty value in the json and the xml which are returned On Tuesday, May 29, 2012 12:20:46 AM UTC+5:30, Sanjeet Roy wrote: Can anyone tell me how to create the API or the RESTful API for the Application which are developed

Re: [web2py] Re: How to Create the RESTful API for the Web Application

2012-05-29 Thread Sanjeet Roy
PM, Sanjeet Roy sanjeet.ro...@gmail.comwrote: Hii William I tried the example which are given but i get the empty value in the json and the xml which are returned On Tuesday, May 29, 2012 12:20:46 AM UTC+5:30, Sanjeet Roy wrote: Can anyone tell me how to create the API or the RESTful API

[web2py] Get and Post the value from Chrome extension in our database

2012-05-29 Thread Sanjeet Roy
I created the one chrome extension by using manifest.json which is used to pop-up the html page where i want the value in drop-down from our database when the user will be login and they can also submit some text box values from the extension which will be stored in our database.

[web2py] How to does post in RESTful

2012-05-29 Thread Sanjeet Roy
i am using the following controller can any one tell me how to pass the value in URL to insert the data in database i am trying : http://127.0.0.1:8000/myapp/api/get_person/?owner=sanjeetname=royinfo=bangalore it gives the invalid argument can anyone tell me how i pass the valid argument to

Re: [web2py] Re: How to does post in RESTful

2012-05-29 Thread Sanjeet Roy
(e.g., from the browser, it could be via form submission or an Ajax POST request, possibly using jQuery). Anthony On Tuesday, May 29, 2012 2:35:07 PM UTC-4, Sanjeet Roy wrote: i am using the following controller can any one tell me how to pass the value in URL to insert the data in database i

Re: [web2py] Re: How to does post in RESTful

2012-05-29 Thread Sanjeet Roy
/jQuery.post/). Anthony On Tuesday, May 29, 2012 3:01:09 PM UTC-4, Sanjeet Roy wrote: Hii Anthony i have the following in my db:- db.define_table('person',**Field('name'),Field('**birthdate','date')) db.define_table('dog',Field('**name'),Field('owner',db.** person),Field('info','text

Re: [web2py] Re: How to does post in RESTful

2012-05-29 Thread Sanjeet Roy
On Tuesday, May 29, 2012 10:29:06 PM UTC-4, Sanjeet Roy wrote: Hi Anthony actually i didn't get you i want ipost the data something like that which are given in the following link :- http://www.mail-archive.com/**web2py@googlegroups.com/**msg70275.htmlhttp://www.mail-archive.com/web2py

[web2py] How to Create the RESTful API for the Web Application

2012-05-28 Thread Sanjeet Roy
Can anyone tell me how to create the API or the RESTful API for the Application which are developed in web2py. I want to develop our own API for my application is it possible? If possible than help me how to develop.

Re: [web2py] Re: How to Create the RESTful API for the Web Application

2012-05-28 Thread Sanjeet Roy
then you'll probably want to take a second to go through the docs first. I hope that helps. On Monday, May 28, 2012 1:50:46 PM UTC-5, Sanjeet Roy wrote: Can anyone tell me how to create the API or the RESTful API for the Application which are developed in web2py. I want to develop our own

[web2py] Facing the trouble in ajax request

2012-05-25 Thread Sanjeet Roy
When i make request from the drop down by using onchange event with ajax call it only return the first word on my target suppose:- I am showing the White Cat in drop down on the html page using the list[] which are returned from the controller but when i make the ajax call by using onchange

Re: [web2py] Facing the trouble in ajax request

2012-05-25 Thread Sanjeet Roy
Thanks johann i resolve it. On Fri, May 25, 2012 at 3:45 PM, Johann Spies johann.sp...@gmail.comwrote: On 25 May 2012 11:15, Sanjeet Roy sanjeet.ro...@gmail.com wrote: When i make request from the drop down by using onchange event with ajax call it only return the first word on my target

[web2py] Get the Value of Contenteditable

2012-05-08 Thread Sanjeet Roy
Can any one explain how we get the value of the contenteditable in our controller ?

[web2py] Re: creating manual login form

2012-04-20 Thread Sanjeet Roy
Its come by default with web2py so why you want to use manual login can you explain ? You have to customize it according to your requirements. On Friday, April 20, 2012 3:53:41 PM UTC+5:30, Sonu Srivastava wrote: i create reagister form using auth_user but unable to create a manual login

[web2py] Re: Digitally signed URLs

2012-04-18 Thread Sanjeet Roy
you have to use this its working fine :- def one(): KEY = 'mykey' return dict(link=URL('two', vars=dict(a=123), hmac_key=KEY)) def two(): if not URL.verify(hmac_key=KEY): raise HTTP(403) # do something return locals() On Sunday, April 15, 2012 7:33:00 AM UTC+5:30,

[web2py] Re: unable to login in web2py through janrain

2012-04-11 Thread Sanjeet Roy
Janrain Engage is a service that provides middleware authentication. You can register with Janrain http://Janrain.com, register a domain (the name of your app) and set of URLs you will be using, and they will provide you with an API key. On Tuesday, April 10, 2012 10:58:52 AM UTC+5:30, Sonu

[web2py] Re: unable to login in web2py through janrain

2012-04-11 Thread Sanjeet Roy
Hi Sonu, Please read this again :- *register a domain (the name of your app) and set of URLs you will be using* than use the key and the domain name with this following code it will work like charm i allready tried. from gluon.contrib.login_methods.rpx_account import RPXAccount

[web2py] Re: unable to login in web2py through janrain

2012-04-10 Thread Sanjeet Roy
Sonu are you tried this following link where you have to include the your RPXAccount application key and the domain name it is working fine http://web2py.com/books/default/chapter/29/9#Other-login-methods-and-login-forms and

[web2py] Multiple target by using the Ajax

2012-04-09 Thread Sanjeet Roy
How to call the multiple function or set the multiple target via Ajax

[web2py] Re: Multiple target by using the Ajax

2012-04-09 Thread Sanjeet Roy
Thanks i will try On Monday, April 9, 2012 12:02:31 PM UTC+5:30, Sanjeet Roy wrote: How to call the multiple function or set the multiple target via Ajax

[web2py] Re: new web2py cheatsheet

2012-04-09 Thread Sanjeet Roy
Thanks Massimo On Tuesday, April 10, 2012 8:57:32 AM UTC+5:30, Massimo Di Pierro wrote: Let's debug it first. On Monday, 9 April 2012 21:34:57 UTC-5, JorgeH wrote: This should be pinned :) On Monday, April 9, 2012 3:44:22 PM UTC-5, Massimo Di Pierro wrote:

[web2py] select data from database using date

2012-01-29 Thread Sanjeet roy
I have one date column due_date here i want to select the all data between dates one is starting date and one is end date both are taken manually so if the user select cmnpny and start and end date all the data related to company between choosen date should be come my code is below but i don't

Re: [web2py] select data from database using date

2012-01-29 Thread Sanjeet roy
Thanks Bruce My Problem is solved