Saturday, April 30, 2011

blank=True, null=True dont work with UserProfile

Hello friends, I have the following models,

the problem is that the fields null = True and blank = True,

are being validated when they should enter zero plumb, can someone help me?



class UserProfile(models.Model):
    sexo = models.CharField(choices=(("masculino","masculino"),("feminino","feminino")),max_length=100)
    cpf = models.CharField("Cpf", max_length=15,blank=False)
    telefone = models.CharField(max_length=100, blank=True, null=True)  <-- Here the problem
    celular = models.CharField("Celular",blank = True, null = True ,max_length=100)
    endereco = models.CharField(u"Endereço",max_length=100,blank=False)
    numero = models.CharField(u"Número",max_length=100,blank=False)
    complemento = models.CharField("Complemento",max_length=100,blank=True,null=True)
    bairro = models.CharField("Bairro",max_length=100,blank=False)
    cidade = models.CharField("Cidade",max_length=100,blank=False)
    estado = models.CharField("Estado",choices=UF_CHOICES,max_length=100)
    cep = models.CharField("Cep",max_length=100,blank=False)

    data_nascimento = models.DateField(blank=True,null=True,)
    saldoBid = models.IntegerField("Saldo de Bids",blank=True,null=True,default=5)
    user = models.OneToOneField(User, unique=True, primary_key=True, related_name='profile')
  

    def __unicode__(self):
        return self.user.first_name

def user_post_save(sender, instance, signal, *args, **kwargs):
    profile, new = UserProfile.objects.get_or_create(user=instance)

signals.post_save.connect(user_post_save, sender=User)

--
Daniel Corbe Hahne Latorre
daniel@corbe.com.br
55 48 9618-5115 
skype: daniel_corbe

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

[android-developers] Re: Enable imported account contacts programmatically

Anybody? Hints? Thoughts?

On Apr 29, 9:46 am, "droidin.net" <dr...@hireadroid.com> wrote:
> I'm successfully importing external contacts into the newly created
> account using this tutorialhttp://goo.gl/sLJeN. The account is setup
> to re-sync programmatically and yet to be able to see the synced
> contact, unless the contact dupe is found, I need to do Contacts->Menu->Display options->Find account->Check "All Contacts". I'm already
>
> dreading angry users enabling contact sync and not being able to see
> anything so the question is: is it possible to set display option for
> includingimportedaccount contacts programmatically? So when user opt
> for account creation he doesn't need to do anything else to seeimportedcontacts?

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: django-cas-consumer template question

Your user must be registered on service with django-cas-provider.
Insead of django-cas-consumer i recomend to use django-cas [1]

[1] http://code.google.com/p/django-cas/

On Fri, Apr 29, 2011 at 8:48 PM, Stodge <stodge@gmail.com> wrote:
Of course! Thanks - I have the template working, now I need to get the
login functionality working for the consumer.



On Apr 29, 9:35 am, Alex Kamedov <kame...@gmail.com> wrote:
> Your user must be redirected from django-cas-consumer login view to
> django-cas-provider
> login. Login form is shown on service with django-cas-provider.
>
> On Fri, Apr 29, 2011 at 7:30 PM, Stodge <sto...@gmail.com> wrote:
> > django-cas-consumer
>
> --
> Alex Kamedov
> skype: kamedov    www: kamedov.ru

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.




--
Alex Kamedov
skype: kamedov    www: kamedov.ru

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

[Rails] Re: "uninitialized constant PostsController::Post"

On Apr 30, 12:08 pm, Colin Law <clan...@googlemail.com> wrote:
> On 30 April 2011 16:40, amrit pal pathak <amritpalpath...@gmail.com> wrote:
>
> > This time i read scaffold tutorial very  carefully and finally try to
> > generate a form without using the scaffold(just used a controller and
> > view ).what i have done till now ,is as follow.Using rails 3.0.7.
>
> >                                 "rails generate controller posts
> > index"
>
> >  1) post_controller.rb
>
> >  class PostsController < ApplicationController
> >  def index
> >  @post=Post.new
>
> Why are you making a post in the index action?  This action should
> just be showing posts.
Yes Colin,this method was used for showing phosts.But this
is not a ard and fast rule that it must be used for showing posts.I
just doing experiment ,so used it for creating .
>
>
>
>
>
>
>
>
>
> >  end
> >  def create
> >  @post = Post.new(params[:post])
> >  respond_to do |format|
> >  end
> >  end
> >  end
>
> > 2)index.html.erb
>
> >  <h1>Posts#index</h1>
> > <p>Find me in app/views/posts/index.html.erb</p>
> > <%= link_to 'New Post', new_post_path%>
> > <%= form_for(@post) do |f| %>
> >  <div class="field">
> >    <%= f.label :name %><br />
> >    <%= f.text_field :name %>
> >  </div>
> >  <div class="field">
> >    <%= f.label :title %><br />
> >    <%= f.text_field :title %>
> >  </div>
> >  <div class="field">
> >    <%= f.label :content %><br />
> >    <%= f.text_area :content %>
> >  </div>
> >  <div class="actions">
> >    <%= f.submit %>
> >  </div>
> > <% end %>
>
> >                             i didnt create any model because i just
> > want to create a simple form first.so when i brower to "localhost:3000/
> > posts/index", it says
>
> >  "uninitialized constant PostsController::Post
>
> You have not told us which line is failing, but I guess it is the one that says
> @post=Post.new
> which says make a new Post object, but since you have not written the
> Post model how can it make a Post object?
>
> You cannot make a form for an object without defining the model first.
>  form_for( @post ) makes a form for the object @post.
@Colin and Walter
ok,model is must.Created a model as.
"rails generate model post" and then
did "rake db:create"(it created a database) and then "rake
db:migrate"(it created a posts tables in database).but now when i
browse to "locahost:3000/posts/index",it says


Showing /home/amrit/final/app/views/posts/index.html.erb where line #4
raised:
undefined method `posts_path' for #<#<Class:0xb67f7784>:0xb67f5560>

Thanks for support!!

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

[android-developers] ViewHolder paradigm vs. using View.setTag()

In the Google I/O 2010 - The world of ListView talk shown here:

http://www.youtube.com/watch?v=wDBM6wVEO70&t=17m38s

a 'ViewHolder' paradigm is suggested to cache views and avoid the
findViewById lookup. Could the same thing be achieved by using the
setTag(id, Object) method on View, and simply use the View's tag map
to store the reference by resource ID? I think this would work, but
would it introduce any memory leak (or other) problems?


public static final View getCachedViewByTagId(View parentView, int
viewToFindId) {
Object object = parentView.getTag(viewToFindId);

if(object == null) {
object = parentView.findViewById(viewToFindId);

if(object != null) {
parentView.setTag(viewToFindId, object);
}
}

return (View)object;
}

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Re: Flaky Touch Screen on Nexus One

On Apr 30, 11:39 pm, Romain Guy <romain...@android.com> wrote:
> Figuring out which items are visible is pretty easy, you can use
> ListView.getFirstVisiblePosition() to know what section of your adapter is
> visible (getFirstVisiblePosition() + getChildCount() - 1 gives you the last
> visible position.)

Ok. So are you also agreeing that I should NOT be calling
Adapter.notifyDatasetChanged() to have the ListView automatically
refresh itself? And I should be updating the data in the cells myself
behind the scenes when individual data changes (but the overall
dataset count remains the same as before)? If so, this is complete
news to me. This completely defeats the purpose of having an Adaptor,
and breaks the MVC paradigm. The only thing I should have to do in my
code is tell the Adaptor that my dataset has changed, and the view
should redraw accordingly. Adaptor should have a
notifyDatasetChangedAtIndexes(int[] indexes) at the very least, rather
than force the developer to update the cells manually. I guess I'm
surprised Google is indicating the need for manual updates of data in
the cells.

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

"unneccessary" query

Hello!

Here is my code: http://bin.cakephp.org/view/69119931

What causes those 3 extra select count by primary key?
I'm talking about query No. 20, 21, 22

If it's for checking the existence of row with given id, then
why does not appear when member not exists (before insert)?

Thanks in advance!

QXY

--
Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php

[android-developers] Re: Flaky Touch Screen on Nexus One

On Apr 30, 11:05 pm, Streets Of Boston <flyingdutc...@gmail.com>
wrote:
> Yes, you're right about that. Calling notifyDataSetChanged on the adapter is
> the best way to go and you should use it in 99% of cases. However, in some
> cases rules should be broken. :)
> A call to notifyDataSetChanged redraws all the children in the ListView and
> is relatively expensive and you get the side effects you notice in your
> example (touch issues).
> In this case, another solution may be necessary, where visible list-items
> (child-views of the ListView) or their children update *themselves*.
> You could do this by tagging list-item views (contentView-s) by calling
> setTag an do a getTag on all the ListView's child-views to be able to find
> them back when they need updating.

I continue to disagree with this. First of all, the ListView should
only be redrawing what is visible on the screen. That is why the
Adaptor has a getView(int position...) method, so that the ListView
can be smart about which views it needs to redraw. Second of all, the
children VIEWS should not be responsible for updating themselves when
the underlying data changes. This is precisely why the ListView's
Adaptor has a notifyDatasetChanged! So that you can give a hint do
the ListView that the data has changed, and so that it can ask for the
Views it needs to update. the getView() method on Adaptor also has a
"View convertView" arg so that it can pass the getView() method a
recycled view to update. At the very worst, Adaptor needs to be
updated to have a "notifyDatasetChangedAtIndex(int[] indexes)" method
so that the ListView can be even smarter about which row(s) to
redisplay (instead of redisplaying the visible rows as it currently
does). In any case, I just don't see why my VIEW code should be smart
about updating itself when the underlying data changes; in other words
isn't that what the Adaptor is supposed to do for me?


--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Re: Flaky Touch Screen on Nexus One

Yes, you're right about that. Calling notifyDataSetChanged on the adapter is the best way to go and you should use it in 99% of cases. However, in some cases rules should be broken. :)
A call to notifyDataSetChanged redraws all the children in the ListView and is relatively expensive and you get the side effects you notice in your example (touch issues).
In this case, another solution may be necessary, where visible list-items (child-views of the ListView) or their children update themselves.
You could do this by tagging list-item views (contentView-s) by calling setTag an do a getTag on all the ListView's child-views to be able to find them back when they need updating.

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Re: Flaky Touch Screen on Nexus One

By the way, this Google I/O video on ListView seems to indicate it is
perfectly acceptable, and in fact required, that you call
notifyDatasetChanged() when anything in your dataset changes (either
individual cell content, or data set size). Nothing in this video
says you should be iterating through your list view cell Views
manually and updating them yourself (rather than call
notifyDatasetChanged()). In fact, this video says never manually
access the Views in your ListView!

http://www.youtube.com/watch?v=wDBM6wVEO70&t=17m38s

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: How do I set permissions for manual install of 1.3 for ubuntu 11.04?

On Sat, Apr 30, 2011 at 12:57, jsierra <joshuasierra@gmail.com> wrote:
> I installed django 1.3 manually on my laptop, since ubuntu 11.04 does not
> ship with 1.3 and I want to be able to run django-admin without having to
> sudo the command when creating projects and subsequently having to use sudo
> with manage.py. I want to mimic whatever permissions that allowed me to use
> the django-admin as a normal user, just like the ubuntu package does.

You will need to be able to save things in /usr/local/lib/python*/

I've made those dirs owner root, group "staff", chmod 775 with
setguid, and put myself in staff. I think that's how it's done.

The other thing you could try is installing it somewhere else, using
the command line switch (eg ~/src), and then symlinking to that dir
from /usr/local/lib/python*/dist-packages

That's off the top of my head and may be completely the wrong way to
go about it.


> Here is the error i get with running django-admin without sudo:
>
> Traceback (most recent call last):
>   File "/usr/local/bin/django-admin.py", line 5, in <module>
>     management.execute_from_command_line()
>   File
> "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py",
> line 429, in execute_from_command_line
>
>   File
> "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py",
> line 379, in execute
>
>   File
> "/usr/local/lib/python2.7/dist-packages/django/core/management/base.py",
> line 191, in run_from_argv
>   File
> "/usr/local/lib/python2.7/dist-packages/django/core/management/base.py",
> line 220, in execute
>   File
> "/usr/local/lib/python2.7/dist-packages/django/core/management/base.py",
> line 322, in handle
>   File
> "/usr/local/lib/python2.7/dist-packages/django/core/management/commands/startproject.py",
> line 30, in handle_label
>   File
> "/usr/local/lib/python2.7/dist-packages/django/core/management/base.py",
> line 407, in copy_helper
> IOError: [Errno 13] Permission denied:
> '/usr/local/lib/python2.7/dist-packages/django/conf/project_template/settings.py'
>
> Regards,
> Joshua Sierra
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscribe@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>

--
Benford's law, also called the first-digit law, states that in lists
of numbers from many (but not all) real-life sources of data, the
leading digit is distributed in a specific, non-uniform way. According
to this law, the first digit is 1 almost one third of the time, and
larger digits occur as the leading digit with lower and lower
frequency, to the point where 9 as a first digit occurs less than one
time in twenty. (via @cyberu)
from The Best of Wikipedia http://bestofwikipedia.tumblr.com/

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

[Google Maps API v2] Re: Using Google Maps as part of a form?

Looks promising, I was looking to put my form (job specs to MySQL) in the "Get Directions" panel, and I think it's doable, but in the marker works too, I'll just make the from open by default so users can easily figure it out and put a To field at the bottom of the form. Now that I started to read that tutorial I think I was looking for a chunk of code and build from that. It now looks like development for Google Maps is stacking and configuring APIs.

--
You received this message because you are subscribed to the Google Groups "Google Maps API V2" group.
To post to this group, send email to google-maps-api@googlegroups.com.
To unsubscribe from this group, send email to google-maps-api+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-maps-api?hl=en.

[Rails] Rails 3 with TinyMce

Hi,
I'm using TinyMce with Rails 3 to input rich text.
when i enter a text into tinymce editor , the text is saved in the
database as <p> text </p> so a p tag is added to the text!!.
i need some help
Best regards.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

[Google Maps API v2] Re: Getting center and zoom of a map from an XML file

> So the code I'd like to get from an external file is
>
> map.setCenter(new GLatLng(-22, 147), 5); [lat - lng - zoom]
>
> and
>
> show("Accommodation"); [show or hide]
> show("Activities"); [show or hide]

You don't get "code" for your markers from the XML file, you parse out
data items like lat, long, image url etc. and then use those in your
code.
Seems to me it would make sense to follow a similar process.
You can put what you like in XML format ; why not consider adding an
element like
<mapstyle zoom="5" lat="22.5" lng="134.2" cat1="show"
cat2="hide" ... >
and adapting your parser to interpret it.

It might actually be a bit more versatile to do something like
<mapstyle zoom="5" lat="22.5" lng="134.2" />
<category name="Travel Guides" initial="show" />
<category name="Accommodation" initial="hide" />
etc.
That allows more flexibility in category names without rewriting code,
future extensions to supply marker icons per category, and so on.
It's probably smart to code defensively so that some default actions
are taken, if your special elements are not found in the XML.

--
You received this message because you are subscribed to the Google Groups "Google Maps API V2" group.
To post to this group, send email to google-maps-api@googlegroups.com.
To unsubscribe from this group, send email to google-maps-api+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-maps-api?hl=en.

[Google Maps API v2] Re: Using Google Maps as part of a form?

> Is the stock
> Google Maps UI available to use as a foundation for my form, as opposed to
> building it myself?

No.

--
You received this message because you are subscribed to the Google Groups "Google Maps API V2" group.
To post to this group, send email to google-maps-api@googlegroups.com.
To unsubscribe from this group, send email to google-maps-api+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-maps-api?hl=en.

[Rails] Re: Best Rails environment for Windows 7

Colin Law wrote in post #995944:

> A cautionary note, a new version of Ubuntu (11.04) has just been
> released, which has made major changes to the UI and still has some
> teething issues. I would advise an Ubuntu newcomer to install 10.10
> for the moment (or even 10.04, the so called Long Term Support
> release).
>
> Colin

Nothing wrong with 10.04 or 10.10. However, running Gnome 2.32.1 on
11.04 Works great. You do not need to run Unity if you don't want to.

To the OP: Switch to Ubuntu - It *will* change your life.

--
Posted via http://www.ruby-forum.com/.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

Re: return Json values cakephp 1.3.8

Resolved

$.getJSON('/ubicaciones/cities/obtener_provincias',

--
Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php

3akarat.com - من مالك مباشرتا شقه 140 متر امام حدائق المنتزه بالاسكندريه بالصور

إعلان جديد من عقارات دوت كوم تفاصيل الأعلان : تفاصيل الإعلان . . .

عقارات دوت كوم
----------------------------------------------------------------------------------------

[Rails] Modify Gemfile and lock

So I'm working on making my own heroku like stack. I have everything
except the hooks done now. My problem is that when I modify the Gemfile
to include MySQL2 if it's not already included, that I have to also
modify the Gemfile lock. Is there any library that can help with this?

--
Posted via http://www.ruby-forum.com/.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

3akarat.com - قطعة ارض بالزمالك 675م بها رخصة 8 ادوار زقابلة للتعليه

إعلان جديد من عقارات دوت كوم تفاصيل الأعلان : تفاصيل الإعلان . . .

عقارات دوت كوم
----------------------------------------------------------------------------------------

Very simple GWT Canvas Demo

I thought I'd share my very simple GWT canvas demo. I made this to show that uploading in base64 was broken at the moment.

http://demogwtcanvas.appspot.com - Demo
http://code.google.com/p/gwt-examples/source/browse/trunk/DemoGwtCanvas/src/org/gonevertical/democanvas/client/UploadImage.java - source code for it
http://code.google.com/p/gwt-examples/source/browse/trunk/DemoGwtCanvas/src/org/gonevertical/democanvas/client/ImageUtils.java

Brandon Donnelson
http://gwt-examples.googlecode.com

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

Re: Help with virtualFields

Hey,

first thing to check is a pr($divisions) in your controller to check
if the data from your find()-call is correct (and your virtual field
is included).

Second thing is that a select as I remember should look like this
within a view:

echo $this->Form->input(__('Division', true), array(
'type' => 'select',
'options' => divisions
);

Your code looks a bit confusing when it comes to the view.
Normally when your array for the Drop-Down-Options is formatted well,
you do not need to set $divisions variable within the options of the
select input.

So I guess your list array (e.g. $key => $value pairs) is not correct
formatted.

Could you post the pr()-result of your $divisions array here?

Regards,

DD

--
Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php

[Rails] Re: Re: Re: Re: Form parameters not passing to controller

Colin Law wrote in post #995978:
> On 30 April 2011 18:00, David Mr. <lists@ruby-forum.com> wrote:
>>>
>>> So gamma[:C] is not a collection. Have a look at the Rails Guide on
>>
>>
>> attr_accessor :setA, :setB, :setAList, :setBList, :google
>
> First I would stick to the Rails conventions when naming things, so
> these should be set_a and so on.
>
>> before_create :setup_data
>> before_save :setup_data
>> def setup_data
>> debugger
>> setax = []
>> setbx = []
>
> You don't need the above as split will return an array
>
>> setax = setA.split(" ")
>> setbx = setB.split(" ")
>
> Are you saying that this method gets called ok but at this point,
> checked in the debugger, that setA has a sensible value but setax does
> not?
>
> It might help also if you explained whether any of the variables are
> db columns and which are just instance variables.
>
> Colin

As a quick reply...

Yes setA has a sensible -as expected value, but setax is always nil. I
can go to the debugger window and do setax = setA.split(" ") and then
setax has the proper value. How is that happening?

No, the variables are not the column names. The setA and setB data are
put into a table named 'searches' and column named 'terms'. The setA
and setB data are entered from a form using form_for.

Thanks

--
Posted via http://www.ruby-forum.com/.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

[android-developers] Re: Updated .apk wants uninstall first

It is fine to do that, but the Release version has a different signature. So if they have the Development apk installed, then they have no choice but to uninstall that to install the Market apk. This is only the case when going from Development -> Market...any subsequent updates will be fine and data will be retained.

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Re: Updated .apk wants uninstall first

Ok, so when I right click my project and Run As -> Android Application it installs on the VM but also creates the .apk file in the bin folder and that is what I'm coping and sending to friends. Is this incorrect to do?

I'm still a novice with Android.

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Updated .apk wants uninstall first

Where do I change the cert? That doesn't sound like something I've done (knowingly).

When doing my development on the ADV with eclipse I make my changes and rerun the program. It reinstalls everything but I don't loose data. Only when I try to push it to a real phone does it want an uninstall.

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] When exactly do you need to handle DeadObjectException with services?

Hi there,

In the Additional Notes section here:
http://www.devdiv.com/android/docs/guide/topics/fundamentals/bound-services.html#Binding
it says: "You should always trap DeadObjectException exceptions, which
are thrown when the connection has broken. This is the only exception
thrown by remote methods."

1) Does that mean that for all calls of the client to the service's
methods you need to try/catch the DeadObjectException? Even
getService() in onServiceConnected() can throw it?

2) If my service only uses a local binder (LocalBinder in the example
from the above link), so it is private to my own application and runs
in the same process as the client, can I then still get
DeadObjectException? I wonder because I see with this type of binding
that the service does *not* appear in the services overview of a
device or emulator, which makes sense to me because it is "tightly"
connected to the activity that bound to it. That to me means you (nor
the Android runtime) can end the service on its own, so never a chance
on DeadObjectException... True?

Thanks!
Marco


--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

3akarat.com - شقة تمليك بالهرم

إعلان جديد من عقارات دوت كوم تفاصيل الأعلان : تفاصيل الإعلان . . .

عقارات دوت كوم
----------------------------------------------------------------------------------------

[android-developers] Re: AdSense in Admob banner?

I know where's the problem - my network operator in Poland (Era, from
T-Mobile) adds a service called 'Compressor mini' (which is in fact
Opera Mini feature), that is to limit data transfer.
Unfortunately it adds as well this toolbars.

Don't even ask - I'm pissed as hell on them, especially they disagree
to turn it off.


On 30 Kwi, 20:09, groob <krzysztof.grobe...@gmail.com> wrote:
> Hello, Nikolay!
>
> Thanks for your answer.
>
> I think it is not the code I should blame here.
> When I'm launching on my device Admob's examples (BannerEssentials,
> Banner-Details) I get exactly the same result.
> Also bannrers in other applications I downloaded from the market look
> equal.
> This makes me more think of my device and applications installed on it
> being guilty of the problem.
> Unfortunately I have no other Android phone available at the moment
> and emulators are displaying correctly red Admob test banner.
>
> It looks to me like AdSense's HTML code is, after being received,
> somehow wrapped (interpretted?) by some app installed on my device and
> thus not fitting the default 320x50px space.
>
> Your advice on changing Admob console settings doesn't help either -
> once AdSense disabled, no ads are received. I think Google want to
> teach me a lesson that fill rate will decrease indeed without
> AdSense. ;)
>
> Best,
> groob.
>
> On 30 Kwi, 05:23, Nikolay Elenkov <nikolay.elen...@gmail.com> wrote:
>
>
>
>
>
>
>
> > On Sat, Apr 30, 2011 at 10:37 AM, groob <krzysztof.grobe...@gmail.com> wrote:
>
> > > The questions I have:
> > > - Have I made a mistake in implementation and 'Ads by Google' can be
> > > excluded from being displayed?
>
> > We can't know without seeing your code. BTW I think you can turn off
> > the features to display AdSends ads in theAdmobconsole if that
> > doesn't work for you. You can fix the ad view's height to 50dp, that
> > would at least make sure it doesn't change size.
>
> > > - Maybe my rooted device acts different and it is causing regular
> > >Admobbanners to not display?
>
> > Unlikely. I use rooted NexusOne and have never seen this.AdSense
> >  ads are served only if there are noAdmobads available. Again,
>
> > check yourAdmobconsole.
>
> > > - Has anyone experienced the same? What are your thoughts? IMO
> > > presenting something like this is nonsense and will only make users
> > > upset - no marketing value, almost impossible to interract with,
> > > providing no information. It is more like a nightmare to both
> > > publisher and advertisers.
>
> > I agree it's not nice, but I haven't seen anything like it. Might be some
> > temporary glitch? Is it consistent?

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: Do you think to release handlers ?

You'd generally add it in onAttach/onLoad and remove it in onDetach/onUnload.

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

[android-developers] How does the ActivityStack behave when it contains thousands of Activities?

In my app I have a about a dozen of different Activities. These
Activities are connected (can call each other with startActivity()) in
such a way, that the user can theoretically keep running in circles -
always jumping to the next Activity, never going back. Also, I really
need to maintain a proper Activity history: if the user presses the
back button, the app returns to the previous Activity, with the
previous content.

Question: Suppose the user's using the app for an extended amount of
time, going in circles between Activites as mentioned above, resulting
an ever-growing ActivityStack. Every Activity saves some state on
onSaveInstanceState() too.

- Is this a problem? (I'm afraid it is, I guess it's a memory leak to
have tens of thousands of Activity records on the stack, especially if
these save their state).
- Is there a way to limit the size of the default Android
ActivityStack's size? (size limit is X, we delete the oldest record if
it gets filled up)

Any suggestions / alternative solutions are welcome.

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Handling ACTION_SCREEN in a widget

Hi,

I'm doing a widget that needs to be update on screen_on or on
user_present. As I'm not hable to register a BroadcastReceiver inside
the widget I'm doing it in a Service that is triggered by the widget
like this:

Widget.java:
    @Override
    public void onEnabled(Context context) {
        super.onEnabled(context);
        context.startService(new Intent(context,
WidgetService.class).setAction(WidgetService.ACTION_WIDGET_START));
    }

WidgetService.java:
    @Override
    public void onStart(Intent intent, int startId) {
        super.onStart(intent, startId);

        String action = intent.getAction();
        Log.d(LOG_APP,"WidgetService onStart: "+action);


        if (ACTION_WIDGET_STOP.equals(action)) {
            this.unregisterReceiver(mReceiver);
            stopSelf();
            return;
        } else if (ACTION_WIDGET_START.equals(action)) {
            // register receiver that handles screen on and screen off logic
            IntentFilter filter = new IntentFilter(Intent.ACTION_SCREEN_ON);
            this.registerReceiver(mReceiver, filter);
            return;
        }

The problem is that when I try to register the receiver I get the
error that the service has leaked IntentReceiver because it was
already registered. Ive checked and no duplicate registration was done
in my code.

Do you have any idea what I'm overlooking?

Thanks,
PMD

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

django uwsgi

I am trying to deploy a django project with nginx and uwsgi. I think I
have it all set up right but when I hit the site I get the following
error:

No module named project.urls

I know everything else is working because I still have debug on and
can see that settings.py is being read.
I know I'm forgetting something stupid but I can't figure it out so
any help appreciated.

Here is the wsgi.py file I am running:

import os
import sys

from os.path import abspath, dirname, join
from site import addsitedir

PROJECT_ROOT = abspath(dirname(__file__))

addsitedir(PROJECT_ROOT)
os.environ['DJANGO_SETTINGS_MODULE']='settings'

import django.core.handlers.wsgi
application = django.core.handlers.wsgi.WSGIHandler()

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

Re: [Rails] Re: Re: Re: Form parameters not passing to controller

On 30 April 2011 18:00, David Mr. <lists@ruby-forum.com> wrote:
> Colin Law wrote in post #995918:
>> On 29 April 2011 22:40, David Mr. <lists@ruby-forum.com> wrote:
>>>>> /home/brad/Documents/blogazer/app/models/search.rb:201:in
>>> Here is the code from around line 201 in search.rb:
>>>
>>> def set_from_sources(sources)
>>>  final = Set.new
>>>   sources.each do |source|
>>
>> The error suggests that sources is not a collection
>>
>>>   p = Page.find_by_id source
>>>   h = YAML.load(p.data)
>>>   final.merge h.keys
>>>  end
>>>  final
>>> end
>>>
>>> Here is line 107 in search.rb:
>>> gamma[:D] = set_from_sources(gamma[:C]) - (txv[:a] + txv[:b])
>>
>> So gamma[:C] is not a collection.  Have a look at the Rails Guide on
>> debugging and find how to use ruby-debug to break into your code so
>> you can examine gamma.
>>
>> Colin
>
> OK.  I used debugger and found that 'setax and 'setbx' are nil instead
> of being assigned the strings in 'setA.split(" ")' and setB.split(" ").
>
> Using debugger I verified that setA has the proper string value entered
> at the form.
>
> Even if I change the code to setax = setA, setax is always nil.
>
> Does the fact that setA and setB are in the Attribute-Accessor list make
> a difference in the way I should assign other variables their value?
>
> Here is the code:
>
> class Search < ActiveRecord::Base
>  belongs_to :project
>  has_one :user, :through => :project
>
>  attr_accessor :setA, :setB, :setAList, :setBList, :google

First I would stick to the Rails conventions when naming things, so
these should be set_a and so on.

>  before_create :setup_data
>  before_save :setup_data
>  def setup_data
>   debugger
>    setax = []
>    setbx = []

You don't need the above as split will return an array

>    setax = setA.split(" ")
>    setbx = setB.split(" ")

Are you saying that this method gets called ok but at this point,
checked in the debugger, that setA has a sensible value but setax does
not?

It might help also if you explained whether any of the variables are
db columns and which are just instance variables.

Colin

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

(GugukluhayaT) enjoy with us

http://123maza.com/75/play948/

--
You received this message because you are subscribed to the Google Groups "Gugukluhayat" group.
To post to this group, send email to gugukluhayat@googlegroups.com.
To unsubscribe from this group, send email to gugukluhayat+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/gugukluhayat?hl=en.

[android-developers] Using Preferences From xml resource in BroadCast receiver

Hi can any one give me some code to use Preferences from my settings.xml Preference file in a BroadcastRecevier?
Thank you 

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Re: How to get the text height

decent()-acent()

On Apr 30, 5:49 am, a a <harvey.a...@gmail.com> wrote:
> paint.measureText("text")  return the width, how can i get the height
> of the "text"?

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Re: Change UI when executing an instruction

I've made this:
public void onRegistrationDone(String localProfileUri, long
expiryTime) {
updateStatus("Registered to server.");
Log.d("SUCCEED","Registration DONE");

ImageView iconView = (ImageView)
findViewById(R.id.connected);
iconView.setVisibility(1);

}
But the image diesn't shows!
Here is also my XML file:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/
android"
android:orientation="vertical" android:layout_width="fill_parent"
android:layout_height="fill_parent">

<TextView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/sipLabel"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
/>
<ImageView android:id="@+id/connected" android:src="@drawable/
connected" android:layout_below="@id/sipLabel"
android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_weight="0.35"
android:gravity="center"
android:visibility="invisible" />
</LinearLayout>

What could be the problem?
Thank you very much.


On 30 avr, 16:14, Dianne Hackborn <hack...@android.com> wrote:
> setContentView() completely replaces your current UI with a new one.  If you
> just want to make an image shown, you need to modify the current UI -- for
> example have an ImageView containing the image which you change between
> View.INVISIBLE and View.VISIBLE.
>  On Apr 30, 2011 10:48 AM, "Alaeddine Ghribi" <alaeddineghr...@gmail.com>
> wrote:
>
>
>
>
>
>
>
> > Hello,
> > I want to change the UI(if possible just add an image to the UI) when
> > i'm well connected to the server(i'm developping a SIP application) by
> > adding an imaged "Connected" .
> > In fact, i've made this but i have a FC:
> > public void onRegistrationDone(String localProfileUri, long
> > expiryTime) {
> > updateStatus("Registered to server.");
> > Log.d("SUCCEED","Registration DONE");
> > setContentView(R.layout.connected);
> > }
>
> > connected is an XMl file that has a textview(with same id as the
> > main.xml) and the image that i want to add.
> > How can i do this?
>
> > Thank you very much.
>
> > --
> > You received this message because you are subscribed to the Google
> > Groups "Android Developers" group.
> > To post to this group, send email to android-developers@googlegroups.com
> > To unsubscribe from this group, send email to
> > android-developers+unsubscribe@googlegroups.com
> > For more options, visit this group at
> >http://groups.google.com/group/android-developers?hl=en

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: problem installing django 1.3 in virtualenv

nah, theres something else going on here, i've successfully
uninstalled then downloaded 1.3 with pip but when i open up the
settings file, the staticfiles stuff and the logging stuff are
missing.

used pip install django==1.3 -E envname

but on the mac its definitely brought down the right version.

anyone else seeing the same?

On Apr 30, 3:40 pm, christian verkerk <christianverk...@gmail.com>
wrote:
> Sometimes virtualenv does not delete an existing install out of the
> MY_ENV/build directory causing an upgrade to fail. delete that build
> directory and try again.
>
> Also using sudo can somethings screw things up...
>
> On Apr 30, 4:34 pm, shofty <m...@shofty.me> wrote:
>
>
>
>
>
>
>
> > is there something wrong with the packages at whatever server they are
> > hosted?
>
> > pip install upgrade django==1.3 -E envname just isnt working.
>
> > installed django into the virtualenv just this morning and its put
> > 1.2.3 in there. can get it to upgrade to 1.3 at all.
>
> > if i recall theres a possibility that a version will be taken down if
> > there is a security issue? or am i making that up?

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

Re: django-admin.py startproject mysite

Thank you for your reply,
Python is in my system PATH but How to add django-admin in my path. I
mean what will be the enviroment variable for django-admin that i have
to put in my system PATH?

On Apr 30, 4:37 am, Yongning Liang <liangyongn...@gmail.com> wrote:
> type this in Windows
> python django-admin.py startproject mysite
> if it doesn't work, make sure that both python and django-admin in you
> system PATH
>
>
>
>
>
>
>
> On Sat, Apr 30, 2011 at 5:38 AM, Daisy <omnia.za...@gmail.com> wrote:
> > Greetings all;
>
> > I have a problem also with the "django-admin.py startproject mysite"
> > command
>
> > when i type it, it didn't create the directory mysite instead it opens
> > the django-admin.py in a notepad++
>
> > I don't know how to fix this?
> > any ideas please.
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "Django users" group.
> > To post to this group, send email to django-users@googlegroups.com.
> > To unsubscribe from this group, send email to
> > django-users+unsubscribe@googlegroups.com.
> > For more options, visit this group at
> >http://groups.google.com/group/django-users?hl=en.

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

[android-developers] Security exception with launchMode="singleTask"

Hello,

I have declared the launch mode of my activity to be singleTask. If I
launch my application, press the home button, go to an email client
(gmail in this case) & preview an attachment using my application, I
am experiencing a security exception on Android versions 2.3 & later,
which says that I do not have the permissions to access gmail
attachments. The exception does not occur on prior versions & if I do
not use singleTask as the launchMode.

Is this a known issue?

Any help will be really appreciated.

Thanks,
Akshay

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Re: Update Contacts

Hhhmmm, maybe you should try

newUpdate(ContactsContract.Data.CONTENT_URI)

instead of

newUpdate(ContactsContract.Contacts.CONTENT_URI)

I hope it helps :-)

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: Does GWT 2.2 Canvas support transparency like GWTCanvas?

From the GWT 2.2 announcement: http://gwtcanvasdemo.appspot.com/ (click the "view the source" link at the bottom)

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

Re: [android-developers] Removing a specific over lay item

On 29 April 2011 20:46, TreKing <trekingapp@gmail.com> wrote:
 
Please i need help its  urgent any  help 
WHAT KIND OF RESPONSE DO YOU EXPECT IN 4 MINUTES?

Urgent? :)

Regards,
Marcin Orlowski

Tray Agenda - keep you daily schedule handy...
Date In Tray - current date at glance...
WebnetMobile on Facebook and Twitter

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: Does GWT 2.2 Canvas support transparency like GWTCanvas?

Hi,

where can I find a minimal example of using the GWT Canvas?

Magnus

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

Friday, April 29, 2011

[android-developers] how to make abc.img file in android programatically?

hi,

can anyone tell me how can we make imagefile like abc,img in android.
(except giving extension while file writing).

regards,
hitendrasinh gohil

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

DialogBox.center does not center correctly

Hi,

I have a problem with centering a DialogBox.

I create it, add some widgets (the size of which I set at the same
time!), and call center:
(Pseudecode)

DialogBox d = new DialogBox ();
AbsolutePanel t = new AbsolutePanel();
t.setSize("1000px","700px");
d.add(t);
d.center();

However, the DialogBox is not centered correctly. It's placed too much
to the right. (If its size is smaller, it's placed too much to the
left. #-))

I wondered if i should call forceLayout, but there is no such method
in DialogBox.

What can I do?

Thanks
Magnus

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

Re: Sessions expiring with `Security.level` set to low and the `Session.timeout` set to 12000

There's not much info to go on here. Presumably you are using the Auth component and the user is logged in? If so, is the action she is trying to access allowed? Look in $this->Auth->allow in the controller (or app_controller is allowed actions have been set there).

Jeremy Burns
Class Outfit

jeremyburns@classoutfit.com
http://www.classoutfit.com

On 30 Apr 2011, at 04:15, mattalexx wrote:

> My client is complaining that she posts a form and gets kicked to her
> login. I have the following code in `app/config/core.php`:
>
> Configure::write('Session.timeout', '12000');
> Configure::write('Security.level', 'low');
>
> Sessions should last 1,000 hours with these settings, right? So what
> else is going on?
>
> I realize that the client might be reporting the bug to me incorrectly
> and that there may be other factors involved, but I'm not even sure
> what to ask her about.
>
> --
> Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org
> Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions.
>
>
> To unsubscribe from this group, send email to
> cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php

--
Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php

[Rails] Re: How to give link between two files of same view?

On Apr 29, 11:33 am, Hassan Schroeder <hassan.schroe...@gmail.com>
wrote:
> On Fri, Apr 29, 2011 at 8:08 AM, amrit pal pathak
>
> <amritpalpath...@gmail.com> wrote:
> > I have one controller(home) with two methods(empty) ,name are
> > index,new).Corressponding have 2 .html.erb files in home view.How to
> > give a link from file index.html.erb to new.html.erb i.e syntax?
> >       I tried <%=link_to 'Click me',home_new_path%>,but it failed
>
> FYI, "it failed" is not a very useful problem description.
>
> Regardless, you should be able to see the proper syntax if you run
> `rake routes`

1) rake routes say:
(in /home/amrit/mani)
home_index GET /home/index(.:format)
{:action=>"index", :controller=>"home"}

2) Then i changed the syntax in index.html.erb file as:
<%=link_to "Goodbyyye",:action=>"new", :controller=>"home"%>

Again strucked error,says:
No route matches {:controller=>"home", :action=>"new"}

Thank you

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

[Rails] Ruby's FTP in cPanel

Hi guys,

how do you use Ruby's FTP in cPanel???

--
Posted via http://www.ruby-forum.com/.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

lite

http://123maza.com/65/born511/

--
You received this message because you are subscribed to the Google Groups "BeautiControl-Alabama-Gadsden" group.
To post to this group, send email to beauticontrol-alabama-gadsden@googlegroups.com.
To unsubscribe from this group, send email to beauticontrol-alabama-gadsden+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/beauticontrol-alabama-gadsden?hl=en.

[Rails] Re: Rails doesn't populate dynamic generated fields on error on posting

adnan khan wrote in post #995336:
> In our raols application we have a page where upon submit we save data
> in db. On this page, we have some fields which are dynamically
> generated and I see that in case of a validation error when page
> reloads it doesn't populate these fields with the values present upon
> posting.

What do you mean by your fields being dynamically generated? It's the
normal case for all the fields, along with the form itself, to be
dynamically generated in Rails applications. That's what form helper
methods do.

Do you mean you're adding them with JavaScript? If that's the case then
JavaScript would be needed to manage their contents as well.

--
Posted via http://www.ruby-forum.com/.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

please help

for a particular project with login system which type u all suggest is the best.

1. login system to be create by self model
2. to use the login system provided by django

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

Re: Cake 1.2 problem with XML files in plugin vendors folder

On Fri, Apr 29, 2011 at 10:27 PM, Jamie <jamie.nay@gmail.com> wrote:
> There's no code because all he's trying to do is access an XML file
> from his web browser. What are you expecting, a screen shot of his
> browser to verify the URL? His question is about why Cake is
> intercepting his request for a static file.

@lsenft: I missed the "serve" part. I saw "load" and presumed this was
about something in your code. I apologise for the mistake. There have
been a lot of people posting questions lately who give next to no
information about their problem. Hence my response, and the link I
posted.

That said, calling me a "fucking dick" is pretty immature. Let's try
to be civil.

> But, you know, good job welcoming someone into the community. It's
> attitudes like yours that poison open source projects. If you don't
> want to read the questions, then leave the group.

Nothing but poison, poison, poison. HAND.

--
Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php

Re: Does GWT 2.2 Canvas support transparency like GWTCanvas?

Please ignore.  The rgba(...) string approach works.

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

Re: [android-developers] Getting notified when a device administrator is enabled/disabled

I don't understand how you can require some device admin.  If it isn't your own admin, how can you trust that it is actually doing what you want in any way.

If you want to have some controls provided by a device admin, you should write one and it can implement whatever communication with your apps that you want.

On Fri, Apr 29, 2011 at 9:24 PM, Rick Alther <rick.alther@gmail.com> wrote:
Thanks for the quick response Diane.  No, I am not writing an Admin, nor do I want to.  However, I am writing some security tools for our corporation and we require a Device Admin on the device to enforce our security policy.  So, one of the things I'm doing is looking to see that they have a Device Admin installed and active (easy enough), but since the user can turn it off anytime they want, I'd like to be notified when it becomes disabled (and reenabled again).  I don't intend to do anything more with the info and I never expected to be able to affect an Admin in any way.  It's more of a notification/awareness thing.

I can set an alarm and query the list of active device admins periodically, but polling seems such a waste when a simple broadcast would suffice.

Thanks,
- Rick Alther

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en



--
Dianne Hackborn
Android framework engineer
hackbod@android.com

Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails.  All such questions should be posted on public forums, where I and others can see and answer them.

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: Cake 1.2 problem with XML files in plugin vendors folder

Hi Levi,

Ignore the trolls. They won't survive I'd you don't feed them. :)

Unfortunately. in version 1.2 you can only serve plugin img, CSS, and
JS files, and only from folders with those names. There's much more
freedom in 1.3. Each plugin has its own webroot folder.

- Jamie

On Apr 29, 7:49 am, lsenft <lse...@gmail.com> wrote:
> There isn't any code.  Its just a plain static xml file.  When I put
> an image, css or js file into vendors folder I can access it with a
> url like /plugin_name/img/myimage.jpg.  When I try to access files of
> other types I get the myfile.extController could not be found error.
>
> I get the impression that I either need to add some code to handle
> different content types, or serve the static xml file from a different
> location.
>
> Levi
>
> On Apr 28, 1:28 pm, cricket <zijn.digi...@gmail.com> wrote:
>
>
>
> > On Thu, Apr 28, 2011 at 12:30 PM, lsenft <lse...@gmail.com> wrote:
> > > I would like to load an XML file from a plugin vendors folder.  I get
> > > the following error:
>
> > > Error: myfile.xmlController could not be found.
>
> > > Is there a way to serve xml files from a plugin's vendors folder?
>
> > What's the code that leads to the error?
>
> > Some days, it's like every other person posting to this list assumes
> > everyone else can read minds.

--
Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php

Re: [android-developers] Getting notified when a device administrator is enabled/disabled

Thanks for the quick response Diane.  No, I am not writing an Admin, nor do I want to.  However, I am writing some security tools for our corporation and we require a Device Admin on the device to enforce our security policy.  So, one of the things I'm doing is looking to see that they have a Device Admin installed and active (easy enough), but since the user can turn it off anytime they want, I'd like to be notified when it becomes disabled (and reenabled again).  I don't intend to do anything more with the info and I never expected to be able to affect an Admin in any way.  It's more of a notification/awareness thing.

I can set an alarm and query the list of active device admins periodically, but polling seems such a waste when a simple broadcast would suffice.

Thanks,
- Rick Alther

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: Does GWT 2.2 Canvas support transparency like GWTCanvas?

I tried using an rgba(...) string.  This works with Firefox but not Chrome, Safari, nor Opera.

So GWT 2.2 Canvas doesn't support colors with alpha values?  How come GWTCanvas does?

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

Does GWT 2.2 Canvas support transparency like GWTCanvas?

CssColor doesn't have an alpha value like Color does with GWTCanvas.

So how do I handle transparency with GWT 2.2 Canvas?

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

Re: [Rails] Re: How to set new object fields with not-hash object in ActiveRecord?

Fred, thanks for your reply.

On Sat, Apr 30, 2011 at 12:29 AM, Frederick Cheung
<frederick.cheung@gmail.com> wrote:
>
>
> On Apr 29, 11:16 am, Haruka YAGNI <hya...@gmail.com> wrote:
>> Hi, everyone.
>> I am using Geokit and Geokit-Rails3 on Ruby on Rails 3.0.3 / Ruby
>> 1.8.7.
>>
>> My model Location (which acts_as_mappable) is often created with lat
>> and lng.
>>
>> For avoiding repeating yourself, I tried to override initialize method
>> and try to use Geokit::LatLng.normalize (this method creates a LatLng
>> object from string/array/etc..), but the following codes does not
>> work, and show curious errors.
>>
>> There are also tests using the original style (:lat=>..., :lng=>...)
>> and they works fine.
>> According to "p ll" in location.rb, ll is correct.
>>
>> Thanks in advance.
>>
>> -- location.rb
>> class Location < ActiveRecord::Base
>>   acts_as_mappable :default_units=>:kms, :default_formula=>:flat
>>   attr_accessible :lat, :lng
>>
>>   def initialize(args)
>>     begin
>>       ll = Geokit::LatLng.normalize(args)
>>       p ll
>>       lat = ll.lat; lng = ll.lng
>>     rescue
>>       super
>>     end
> This doesn't actually set your attributes, it just creates 2 local
> variables.
> Moreover, you're not (unless an exception is thrown) calling super, so
> active record's internal state isn't setup correctly - somethig like
> super(:lat => ll.lat, :lng => ll.lng) is probably alright.

Thanks, it passes the test.
super(in rescue) is called when the parameter is a normal hash, because
Geokit::LatLng.normalize throws an exception when it cannot make
LatLng object from the argument, and LatLng does not support a hash.

> You probably also want to be careful of the case where the object is
> being loaded from the database

Some sites warns that AR does not call initialize method on loading a object
from DB. I just use my custom initialization on newly creating a object from
a form input.

As long as I tested (just make a new object and load it), this method works
without problem.
Is there possibility of some bugs? How can I test it?

>
> Fred
>
>
>>   end
>> end
>>
>> -- a part of location_spec.rb
>>     it "should make new Location from LatLng object" do
>>       Location.create!(Geokit::LatLng.normalize("35,135")).lat.should
>> == 35
>>     end
>>
>>     it "should make new Location from String" do
>>       Location.create!("35, 150").lat.should == 35
>>     end
>>
>>     it "should make new Location from Array" do
>>       p Location.new([35,150])#.lat.should == 35
>>     end
>>
>> -- errors (shortly)
>>   NoMethodError: ... while evaluationg nil.[]
>>   NoMethodError: undefined method `has_key?' for nil:NilClass  (in `p')
>
> --
> You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
> To post to this group, send email to rubyonrails-talk@googlegroups.com.
> To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
>
>

--
Haruka YAGNI
hyagni@gmail.com

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

Controlled shutdown of dev mode in Eclipse

Hi

Does anyone know a way to get Jetty to shutdown in a more orderly fashion? When you press the red
square in the Development Mode UI, it just stops dead - consequently some of my server shutdown
scripts don't run.

I'd like to be able to detect the servlet context listener contextDestroyed event.

TIA

Alan

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

[android-developers] Re: how to debug android device driver with ddd or gdbserver between Phone and PC

Native code building and debugging was described here: http://betelco.blogspot.com/2010/01/buildingdebugging-android-native-c.html
But you cannot debug device driver.

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Re: new to Android wrld and I need some tips

THIS! I found the videos on Marakana.com to be exceptional. There's a lot of good stuff in there to learn Android from the ground up, especially if you're well-versed in Java already.

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

3akarat.com - جسر السويس

إعلان جديد من عقارات دوت كوم تفاصيل الأعلان : تفاصيل الإعلان . . .

عقارات دوت كوم
----------------------------------------------------------------------------------------


Real Estate