Friday, 9 August 2013

Where can I find good resources explaining conic sections?

Where can I find good resources explaining conic sections?

I'm looking for something that explains them simply or something that has
a lot of examples. The online course I'm taking doesn't explain them in
much detail and I haven't managed to find something that explains it
better. Mainly parabolas and hyperbolas. For parabolas, my course uses the
formula $(x-h)^2 = 4p(y-k)$, so while I did find a useful video on
KhanAcademy, on the subject, he uses a different formula and that just
left me more confused.

Bring value from one webpage to another webpage in Ruby on Rails website without database

Bring value from one webpage to another webpage in Ruby on Rails website
without database

Summary
I'm trying to bring a value from one webpage to another webpage on my Ruby
on Rails site without saving it a second time into my MySQL database. I'm
new to Ruby, so thanks in advance for your patience.
Overview
My website users can save a map they have created. Now, I want them to be
able to edit the maps.
I have a webpage, newmaps.html.erb, that renders the map. The map has a
unique ID:
<%= newsavedmap.id %>
There's an "Edit" button under the map. When the user clicks "edit", I
want him to be taken to another webpage, maptry.html.erb , which is
essentially a form that lets the user edit the map.
Problem
I want that specific newsavedmap.id to transfer over to maptry.html.erb so
that I can load the form with newsavedmap.startingaddress,
newsavedmap.endingaddress, and all of the other data associated with that
record.
I think I'm supposed to use "POST", but I'm not sure how to do that in
this situation. This link has given me some ideas, but my form is not a
Rails form so I'm not sure how to translate it into my own solution: Pass
a custom _form text field parameter to a second page Rails
maptry.html.erb
<div id="control_panel">
<div>
<input id="startingaddress" type="text" name="starthere" size="56"></p>
</div>
<div>
<input id="endingaddress" type="text" name="endhere" size="56"></p>
</div>
<div>
<input onclick="calcRoute();" id="showmapview" value="Show Map">
</div>
</div>

Can we create a new folder inside a standard deploy folder in JBoss?

Can we create a new folder inside a standard deploy folder in JBoss?

I have several libraries that our project requires. I would like to
separate our projects with other existing jar/war/ear files that already
exist in Jboss server/default/deploy folder.
I am thinking of creating a new folder inside that deploy folder and
putting all our project files/dependency jars in that.
Does JBoss pick them up automatically? If not, what is the setting to tell
JBoss to pick up the files in that folder?
Jboss version 4.2.2-GA.
Thanks!

What does " Book within 2 weeks" means?

What does " Book within 2 weeks" means?

Can anyone answer the above question?

Why does the codeigniter cron not working

Why does the codeigniter cron not working

I am trying to set up cronjob in CodeIgniter so that when I run the same
path from terminal it works
This is the Path I have run from the cli(terminal):
/usr/bin/php /home/user_name/path_to_index.php users foo
this works
but when I set this in the crontab file as :
3 * * * * /usr/bin/php /home/user_name/path_to_index.php users foo
this is not working.
any idea what is wrong here?
thanks in advance!

Android Remove Fragment

Android Remove Fragment

I have a quick question, if I remove fragment A from the container and add
fragment B, is the state of fragment A lost?
I have my app where the user takes a picture (fragment A), I was then
hiding fragment A and showing or creating fragment B to allow the user to
review the image. On fragment B the user has the option to retake the
picture, in this case I was removing fragment B and showing fragment A.
The problem was that the camera preview wasn't being re-initialised so the
user wasn't getting the cam preview to take another pic. I remedied this
by removing fragment A from the container when the pic is taken.
The problem is I have many many fragments most of which I need to keep the
state of when navigating between, I know show and hide keep the state but
I don't want to have a 'special case scenario' where I have replace for
the fragment A and B and and show and hide for fragment C,D,E,F....

Globally redirecting in Pyramid...this is printing to the console twice

Globally redirecting in Pyramid...this is printing to the console twice

thanks to Michael Merickel I was able to globally redirect an ip address.
I could have added this as a comment but decided on another question. His
code gives the user an error message. I'd like to also receive an alert
when this happens. I did it by a simple print statement but it
(annoyingly) prints the message twice. I'm only making 1 request on a
simple view (no css files, no js, etc). Is it actually requesting it
twice?
@subscriber('pyramid.events.NewRequest')
def newrequest(event):
request = event.request
if request.remote_addr.startswith('66.'):
print 'hey, we got one...',
raise SomeException('my custom message')
@view_config(context=SomeException, renderer='string')
def exc_view(exc, request):
print 'and another'
return exc.message
Result:
hey, we got one...and another
hey, we got one...and another # why the extra line?