Wednesday, February 29, 2012

[android-developers] How to update the Android SDK and AVD Manager on Eclipse?

When I try to update all installed packages - or see Available
packages, I get the following error message:

Failed to fetch URL https://dl-ssl.google.com/android/repository/addons_list.xml,
reason: File not found

Any suggestions on how to fix this problem?

Regards, Terry

--
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 "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: Using char(36) as a uuid

check out all of the plugins at http://cakedc.github.com all of them are using UUID

--
Larry E. Masters


On Wed, Feb 29, 2012 at 8:53 AM, Ighor Martins <ighor.martins@gmail.com> wrote:
Hello,

I was thinking about the use of integer as primary key of the table or use a char(36) as UUID in the entire project,
What I dont like about the integer, is the auto increment number, So I decided to use char(36) 'cause cake automatically fill it with an UUID, but I dont know if this can slow down the search in DB.

So, anyone who used this before, please tell me about that.
Is that right to use this in tables like: Users, Cars, Categories?


Thanks.

--
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

Re: [android-developers] switching between api level targets in eclipse

At 04:36 PM 2/29/2012, you wrote:
>On Wed, Feb 29, 2012 at 5:05 PM, Ray Tayek
><<mailto:rtayek@ca.rr.com>rtayek@ca.rr.com> wrote:
>i wanted to switch back to 4.0.3, but eclipse seems to be stuck on
>the 4.0.3 target.
>
>
>That's not very clear. Like, what is "seems to be stuck"?

sorry, my bad. it is uses the 2.3.3 avd even though the 4.0.3 target
is checked in eclipse. so it seems to be stuck using the 2.3.3 target.

thanks

---
co-chair http://ocjug.org/

--
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] Why explicit need for Permissions to be specified in Manifest File

> As for the various static analysis comments in the thread, in the denial
> role its quite weak as self-modifying code will hide possibilities from it.
>  As a granting mechanism in the context of the present "everything not
> explicitly granted is denied" model, it could work in the sense of being
> secure in that anything too obscure in its construct would not be granted
> and would simply result in failure (errors or exceptions which would be
> caught or cause crashes).  But I fail to see how this is superior to
> declaring what you want.  Someone who does think it is superior is welcome
> to package their static analysis algorithm as a tool which will scan your
> code base and automatically generate a manifest file...
>

The stowaway tool previous mentioned does tell you (in an approximate
sense) what you need. Sure, it doesn't handle all reflection well,
and maybe not get all instances of content providers, etc... But I
believe that the majority of apps won't do lots of reflection or
obscure string manipulations to content providers. (Obviously there
will be some, as you point out, which is why permissions weren't
inferred in the first place..)

kris

--
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 - شقة للبيع

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

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

isAuthorized redirect

I'm using isAuthorized to check if the user is an admin or a user. If a user tries to access an admin function I want them to be redirected to the previous page. However when isAuthorized returns false the user is redirected to '/'. How can I change this behaviour?

--
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 - شقة بفيصل الطوابق متفرعه من شارع الاربعين

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

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

What is header size attribute in TabLayoutPanel (UiBinder)?

I'm following the UiBinder example for a TabLayoutPanel, and I'm
wondering what a header's size attribute is. From the example in the
javadoc:

<g:TabLayoutPanel barUnit='EM' barHeight='3'>
<g:tab>
<g:header size='7'><b>HTML</b> header</g:header>
<g:Label>able</g:Label>
</g:tab>
...

So what is size, as in <g:header size='7'>? In my own app, I have 3
tabs. Regardless of what I set size to, the headers always appear the
same in IE and Firefox, even when each size is different (say, 0, 7,
and 21).

BTW, as noted in Issue 4694, comments 44 and 45, in IE you **must**
use barUnit='PX', at least if your TabLayoutPanel resides in a
SplitLayoutPanel. If you don't, the tab widget take up the entire
height and the tab bar is not seen.

--
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: USB serial with D2XXSamplefrom FTDI doesn't detect my device.

On Monday, February 27, 2012 4:28:46 PM UTC-5, Gett wrote:
I'm trying to use an FTDI USB chip on Android following the
instructions at:

http://www.ftdichip.com/Android.htm
http://www.ftdichip.com/Support/Documents/TechnicalNotes/TN_134_FTDI_Android_D2XX_Driver.pdf
 
The problem is that when I launch the D2XXSample app, the number of 
devices detected when I click the "Info" button is always 0.
 
I'm working with Android 2.3.4. 

Are you working on an android device that is known to have usb host capability, and has a host (or OTG) driver in its kernel and has decided to go into usb host mode?

Some thing you could try:
 

--
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

[Rails] Re: OpenSSL on rails 2

Yeah but I am sure this did work before. It's been on a web site for
quite some time and has been working. If what you're saying is right
then I'll have to look to see if somehow my sources have been broken...

--
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.

[Google Maps API v2] How do I create more than 10 API keys?

We are creating sites for our clients/partners - each has their own
domains. I have created 10 API keys, and now getting error while
creating the 11the API key:

"An error has occurred. Please retry later."

From what I understand there is no limit on how many API keys we can
create.

How do I create more API keys?

Thanks,

.. Bhavan

--
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.

Re: Using char(36) as a uuid

Whats the reason for disliking auto-incrementing numbers? Its probably the best thing about databases.

On Wednesday, February 29, 2012 6:53:38 AM UTC-8, Ighor Martins wrote:
Hello,

I was thinking about the use of integer as primary key of the table or use a char(36) as UUID in the entire project,
What I dont like about the integer, is the auto increment number, So I decided to use char(36) 'cause cake automatically fill it with an UUID, but I dont know if this can slow down the search in DB.

So, anyone who used this before, please tell me about that.
Is that right to use this in tables like: Users, Cars, Categories?


Thanks.

--
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: OpenSSL on rails 2

On Feb 29, 5:30 pm, John Lane <li...@ruby-forum.com> wrote:
> Hi list,
>
>
> wrong argument type Class (expected Module)
>
> Application Trace | Framework Trace | Full Trace
>
> lib/mymodule.rb:65:in `include'
> lib/mymodule.rb:65
> app/controllers/application.rb:8
>
> The code snippet referred to is a module of the form:
>
> 60 module Mymodule
> 61
> 62  require 'openssl'
> 63  include OpenSSL
> 64  include PKey
> 65  include Cipher
>
> So I suspect I have something wrong with my OpenSSL in rvm, but I don't
> know what.
>

>> require "openssl"
=> true
>> module Foo
| include OpenSSL::Cipher
| end
TypeError: wrong argument type Class (expected Module)
(ripl):5:in `include'
(ripl):5:in `<module:Foo>'
(ripl):4:in `<main>'

You're trying to include a class into a module, OpenSSL::Cipher is a
class while PKey and OpenSSL itself is a module.

--
Luis Lavena

--
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] link_to alphabetical search

Hi all,

I have a link_to method in rails for each letter of the alphabet (early
days yet, will put it in a loop later). I have the same for a console on
another page and that one works fine but the one on my page for the
letters does not.

I have the following in my model:

def index
user_relation = case params[:username].present?
when true then User.where(:username => params[:username])
else User
end

@users = user_relation.paginate :page=>params[:page], :order =>
'created_at desc', :per_page => 10
end

and this is an example in my index:

<%= link_to 'A', users_path(:username => 'A'), {:style=>'color:#FFFFFF',
:class => "tabel-3"}%>

Now if I click on A it does not return any results despite there being
many users with the letter A but if I was to for example put in the
brackets the name AdrianShaw (one of the users in my database) and click
A it would return that exact user. What it seems to be doing is search
but only for exact match results, anything less than the full word and
it does not return.

How would I go about doing this so that it gets all users with the first
letter A and so on?

Thanks
Christopher Jones

--
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: [Rails] rails and javascript

On Tue, Feb 28, 2012 at 16:50, Dev Guy <devguy.ca@gmail.com> wrote:

> I want to add a dropdown selection box that when an item is selected a
> javascript function gets called, is there an easy way to do this with
> Rails?

Sure, though it's not Rails-specific; just use the onchange attribute. See:

http://www.w3schools.com/jsref/event_onchange.asp

for an intro to the concept.

-Dave

--
Dave Aronson:  Available Cleared Ruby on Rails Freelancer
(NoVa/DC/Remote) -- see www.DaveAronson.com, and blogs at
www.Codosaur.us, www.Dare2XL.com, www.RecruitingRants.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.

Filtering model searches by a property (as opposed to a field)

Hi all,

I have the following model:

<models.py>
class Todo(models.Model):
name = models.CharField(max_length=200)
due_date = models.DateTimeField()
location = models.CharField(max_length=200)
type = models.CharField(max_length=4, choices=TODO_TYPES)
owner = models.ForeignKey(User, verbose_name='owner')
done = models.BooleanField(default=False)
def _get_due_week(self):
return int(self.due_date.strftime("%W"))
due_week = property(_get_due_week)
def __unicode__(self):
return self.name
</models.py>

and this search code:

<views.py>
...
user = request.user
this_week = int(date.strftime("%W"))
this_weeks_todos =
Todo.objects.filter(owner__id=user.id).filter(due_week=this_week)
...
</views.py>

But I get:

"Cannot resolve keyword 'due_week' into field. Choices are: done,
due_date, id, location, name, owner, type"

Is it not possible to filter based on a property?

What is the correct method for doing this?

Thanks in advance for your help.

Tom

--
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.

Error on Tutorial Part 3 - https://docs.djangoproject.com/en/1.3/intro/tutorial03/

Hello All,

I'm going through the tutorial on djangoproject.com, and can't seem to
hurdle over this section that reads "Write views that actually do
something"

Here's the code I have so far, which is directly copied from the
tutorial or prescribed by the tutorial:

views.py:
"from django.template import Context, loader
from polls.models import Poll
from django.http import HttpResponse

def index(request):
latest_poll_list = Poll.objects.all().order_by('-pub_date')[:5]
t = loader.get_template('polls/index.html')
c = Context({
'latest_poll_list': latest_poll_list,
})
return HttpResponse(t.render(c))"

settings.py:
"...
TEMPLATE_DIRS = (
# Put strings here, like "/home/html/django_templates" or "C:/www/
django/templates".
# Always use forward slashes, even on Windows.
# Don't forget to use absolute paths, not relative paths.
'C:/Python27/my_Djando_projects/mysite/My_Templates/admin/
base_site.html'
'C:/Python27/my_Djando_projects/mysite/My_Templates/admin/
index.html'
'C:/Python27/my_Djando_projects/mysite/My_Templates/polls/
index.html'
)
..."


index.html:
"{% if latest_poll_list %}
<ul>
{% for poll in latest_poll_list %}
<li><a href="/polls/{{ poll.id }}/">{{ poll.question }}</a></
li>
{% endfor %}
</ul>
{% else %}
<p>No polls are available.</p>
{% endif %}
"


I keep getting the same error, which reads:


TemplateDoesNotExist at /polls/

polls/index.html

Request Method: GET
Request URL: http://localhost:8000/polls/
Django Version: 1.3.1
Exception Type: TemplateDoesNotExist
Exception Value:

polls/index.html

Exception Location: C:\Python27\lib\site-packages\django\template
\loader.py in find_template, line 138
Python Executable: C:\Python27\python.exe
Python Version: 2.7.2
Python Path:

['C:\\Python27\\my_Djando_projects\\mysite',
'C:\\Windows\\system32\\python27.zip',
'C:\\Python27\\DLLs',
'C:\\Python27\\lib',
'C:\\Python27\\lib\\plat-win',
'C:\\Python27\\lib\\lib-tk',
'C:\\Python27',
'C:\\Python27\\lib\\site-packages']

Server time: Wed, 29 Feb 2012 11:32:54 -0800
Template-loader postmortem

Django tried loading these templates, in this order:

Using loader django.template.loaders.filesystem.Loader:
c:\python27\my_djando_projects\mysite\my_templates\admin
\base_site.html
c:\python27\my_djando_projects\mysite\my_templates\admin\index.html
c:\python27\my_djando_projects\mysite\my_templates\polls\index.html
\polls\index.html (File does not exist)
Using loader django.template.loaders.app_directories.Loader:
c:\python27\lib\site-packages\django\contrib\admin\templates\polls
\index.html (File does not exist)


What on earth am I doing wrong here? I've so many different variations
of my settings.py, views.py, and index.html. Any help would be much
appreciated.


Thanks,

SB

--
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: is there a way to know the length of an streaming audio file?

anybody?

On Wednesday, February 29, 2012 12:02:55 AM UTC-5, IS SOA wrote:
i am streaming the audio files and wondering is there a way in the
code can find out the length (time) of the song for displaying purpose

something like this:

Song Name 05.20

--
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: Using char(36) as a uuid

it will slow things down and it will store a lot of overhead data (due
to the byte size of those chars compared to integers).
but if speed isnt that big of an issue you are fine.
it gets problematic in the 10000 to 50000 record area
everything from then on you will really feel - especially with some
more joins going on

in one project the boss wanted to use UUIDs everywhere. database size
is more than twice it would be with AIIDs (due to many foreign_id
fields).
I personally favor a mix (only there where necessary)
but that has other downsites or limitations. so in the end it is a
matter of personal preference as long as the data stays in a specific
range.

On 29 Feb., 15:53, Ighor Martins <ighor.mart...@gmail.com> wrote:
> Hello,
>
> I was thinking about the use of integer as primary key of the table or use
> a char(36) as UUID in the entire project,
> What I dont like about the integer, is the auto increment number, So I
> decided to use char(36) 'cause cake automatically fill it with an UUID, but
> I dont know if this can slow down the search in DB.
>
> So, anyone who used this before, please tell me about that.
> Is that right to use this in tables like: Users, Cars, Categories?
>
> Thanks.

--
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 - الغردقة

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

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

Loading multi-line SQL as part of syncdb

The problem is: This doesn't work, as is well-known, because the current code breaks sql/<modelname>.sql files into lines, and that fails if the SQL statement is multiline.

The fix is generally noted to be, to quote mtredinnick on bug #3214:

> If you want to pass in complex SQL, catch the post-syncdb signal and work directly with a django.db.backend.cursor. You will know precisely what database you're talking to and can use the appropriate syntax and calling mechanisms.

Except the documentation of the post_syncdb signal says:

> It is important that handlers of this signal perform idempotent changes (e.g. no database alterations) as this may cause the flush management command to fail if it also ran during the syncdb command.

So, either the documentation is overstating the case, or the proposed solution is wrong. Any guidance as to the right way to apply multi-line SQL during syncdb?

Best,
--
-- Christophe Pettus
xof@thebuild.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.

Re: Accessint GWT's HIstory Stack

Thanks for your input.

Regarding History object and the firing of ValueChangeEvents... I've confirmed that the events are not being fired with this:

   
    History.addValueChangeHandler(new ValueChangeHandler<String>() {

      @Override
      public void onValueChange(ValueChangeEvent<String> event) {
        Window.alert("history changed");
      }
     
    });

I am wondering if the use of Places and the MVP framework has something to do with this... The way navigation works in my app is via "clientFactory.getPlaceController().goTo(place);" and if the user stays within the same "Place" (ie same token prefix) no event is fired. However, I am able to detect the user navigation via:

    eventBus.addHandler(PlaceChangeRequestEvent.TYPE, new PlaceChangeRequestEvent.Handler() {

      @Override
      public void onPlaceChangeRequest(PlaceChangeRequestEvent event) {
        Window.alert("new place requested");
       
      }
     
    });

And since what I'm really after is the user navigation not the tokens themselves, this is sufficient for me... Why I'm not getting the ValueChangeEvents from the History object is a mystery to me...

On Monday, February 27, 2012 5:38:31 PM UTC-5, Jens wrote:
I like the idea, but I'm finding that the value change event only fires when prefix portion of the token changes.

Thanks for your reply... By the way, am I right that the value change event only fires this way?

History.addValueChangeHandler() always fires a ValueChangeEvent if the history stack changes. Otherwise it wouldn't be possible to switch between places of the same type but with different internal state (e.g. #DetailsPlace:1 and #DetailsPlace:2).

Honestly I wouldn't skip any history tokens when a user hits the back button. When the user edits 3 documents in a row then he maybe wants to switch between them back and forth for some reason. I found it more natural if I would have to hit 3 times the back button to be back at the INDEX place if I have navigated to three different documents. Thats what you would expect from normal web navigation. 
In addition your app can provide a link like "back to index view" so that the user can directly jump back to the INDEX place if I really wants to.

-- J.

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/bjfngPbG2HIJ.
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.

3akarat.com - تـعلن شركـــــة الــــجويـــلي عنــــ ... أرض فضاء 463متر مربع

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

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

Re: [Rails] Re: Deploying to a DMZ

On 29 Feb 2012, at 17:33, Bert Gloan wrote:

> yes - I have thought of similar things, but just to clarify:
> I cannot do a git pull from the DMZ inside the firewall as a
> deployment
> method, I cannot compile locally on the DMZ machine, my test target is
> the same OS as the test/dev envs, so compiled assets will work when
> transferred directly.
>
> The 'production branched' local repo may be my best approach
> though ...
> I just think that others must have encountered this problem. Was
> always
> surprised that cap didnt have some kind of push approach.

It actually does or at least did: https://groups.google.com/group/capistrano/browse_thread/thread/d00a703c99353567/642026e315d64461?hl=en


Best regards

Peter De Berdt

--
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] Re: group validation

3) If your timeStart and endTime are intended as "times in a day"
> and not an absolute time in history, you might use my 'relativity' gem
>
> https://github.com/petervandenabeele/relativity
>
> It also has a DayTimeRange that may be useful for what you are trying
> to do. If you use a standardized separator you could even write an
> equality or overlap comparator for DayTimeRange class.
>
> HTH,
>
> Peter

thank you it help me alot more power to us all

--
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: [Rails] Re: Re: Re: If photo field blank then?

On Feb 29, 2012, at 10:45 AM, Christopher Jones wrote:

> Walter Davis wrote in post #1049480:
>> On Feb 29, 2012, at 10:31 AM, Christopher Jones wrote:
>>
>>>>
>>> Hey Walter, good shout.
>>>
>>> I don't know where it is getting that line from.
>>
>> Aha! That is coming from deep in the heart of Paperclip. You have two
>> options. First, put your missing icon image at that path in your
>> application. Second, choose a different method to test on your model.
>> Instead of using the image accessor, look for one of the actual database
>> columns in your model. (Look in db/schema.rb at your column names, pick
>> something like photo_file_name or the local equivalent.) Then make the
>> test in the method something to match:
>>
>> (user.photo_file_name?) ? photo.url : 'default.png'
>>
>> The problem, as I should have picked up on from your earlier mention of
>> the missing photo never appearing, is that photo.url always returns
>> *something*, so it's not a good test subject for the ternary operator.
>>
>> Walter
>
> Fixed it,
>
> I simply added default_url : guest.png to my has_attached_file :photo
> model method.

Good one. Then you can also remove the whole custom accessor method, because any request of photo.url will always return something useful now. Just go back to where you started, with image_tag user.photo.url.

Walter


--
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] Re: Re: If photo field blank then?

Walter Davis wrote in post #1049473:
> On Feb 29, 2012, at 10:04 AM, Christopher Jones wrote:
>
>>
>> <%= image_tag user.user_photo, :height => 50, :width => 50 %>
>>
>> I don't know what is stopping it from displaying the guest.png because
>> if I changed the line to photo.url.blank? then it will display the
>> guest.png for every user but with the present or simply photo.url line
>> it just doesn't display the guest.png for any of them.
>
> Could you put just this in your view (replacing your current image tag):
>
> <%= user.user_photo %>
>
> And see what prints out in the browser. My guess is that it will be
> something, but I don't know what that is. Also, are you seeing any
> errors in the console when you test this locally?
>
> Walter

Hey Walter, good shout.

I just checked my console and I see this for the images section for
those users who don't have an image:


Started GET "/photos/original/missing.png" for 127.0.0.1 at 2012-02-29
15:29:16 +0000

ActionController::RoutingError (No route matches [GET]
"/photos/original/missing.png"):

I don't know where it is getting that line from.

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: How to get coordinates of the button programmatically?

AbsoluteLayout is deprecated. If you're using this ViewGroup, then
you're probably 'doing it wrong'. Android UI programming avoids
absolute placement values for components because there are so may
different screen types (resolutions, densities etc).

On Feb 29, 5:27 am, android developer
<android.developer4...@gmail.com> wrote:
> I have one button in an AbsoluteLayout in an XML file. From there I am able
> to set the (x,y) position of the button.
>
> How can I get and set the (x,y) coordinates of the button programmatically?
>
> Thanks all.

--
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

[Rails] group validation

hi im new in rails and starting to develop my application which is a
online reservation im just wondering if there is a way in Ruby on
rails to group a validation

ei. i want to validate the uniqueness of date first in the database
and check what are the timeStart and endTime entries in that
particular date and validate its uniqueness(timeStart and endTime)
base on the date? is it possible in validation or do i have to make a
controller or method for it?

to sum up my application can book a reservation in a same date but not
in a same date and time

sorry for my bad english my Reservation database is:
0 id INTEGER 1 1
1 lname varchar(25 1 0
2 fname varchar(25 1 0
3 contactnum integer 1 0
4 email varchar(10 1 0
5 date date 1 '2012-03-0 0
6 timeStart time 1 '---
:hour 0
7 timeEnd time 1 '---
:hour 0
8 numGuest integer 0 5 0
9 totalCost decimal(2) 0 0
10 confirm boolean 0 'f' 0
11 created_at datetime 0 0
12 updated_at datetime 0 0

--
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: Post data Query Dict - Why not a list ?

On Wed, Feb 29, 2012 at 1:46 PM, Andre Terra <andreterra@gmail.com> wrote:
> I may be misunderstanding something, but for one reason lists are not
> ordered, so you'd never know which item to get, agreed?
>

Lists are ordered, I think you are confusing something :)

Cheers

Tom

--
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: [android-developers] switching views

yes...u have to show multiple views withthe help of TabHost....genrally all the apps
used TabHost...

--
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: Find condition on Date field

Found the solution, not sure if it is the Cake way of doing it but it
works.
$conditions = array('YEAR(MonthlyReturn.month)' => $sel_year); <---
match by year only
$conditions = array('MONTH(MonthlyReturn.month)' => $sel_month); <---
match by month only

On Feb 29, 10:32 am, Kro <yenohamonin...@gmail.com> wrote:
> Hi,
> I am trying to filter a VIEW by month and year using separate drop
> lists. My code works fine if a year and month selection is made but I
> want to be able to filter based on a selection in either one, i.e. not
> force a selection of both.
> As it stands I am concatenating the year and month selections (day is
> always 01) as follows:
>
> $sel_date = $sel_year.'-'.$sel_month.'-01';
> $conditions = array('MonthlyReturn.month' => $sel_date); <---note
> MonthlyReturn.month is actually aDATEfield
>
> I tried $conditions = array('MonthlyReturn.month.YEAR' => $sel_year);
>
> Is it possible to add aconditionwhich only searches by either month
> or year?

--
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: How to get coordinates of the button programmatically?

AbsoluteLayout.addView(View, new
AbsoluteLayout.LayoutParams(LayoutParams.WRAP_CONTENT,
LayoutParams.WRAP_CONTENT, int x, int y));

On 29 Лют, 07:27, android developer <android.developer4...@gmail.com>
wrote:
> I have one button in an AbsoluteLayout in an XML file. From there I am able
> to set the (x,y) position of the button.
>
> How can I get and set the (x,y) coordinates of the button programmatically?
>
> Thanks all.

--
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] GPS "hot" and "cold" start determination

Hello, is it possible to determine GPS starting mode, known as "cold"
and "hot" starts?

I would like to create a little GPS manager, and I have to decide some
power managements.

Thanks.

--
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

[Google Maps API v2] GMarker missing

Hi,

pretty new here...

go to: http://www.papajohns.co.uk/store-locator.aspx?postcode=wd18%200pd
&
compare against: http://www.papajohns.co.uk/store-locator.aspx?postcode=hp1%201ed

the code that generates these maps are in the page. in the 1st
instance, the marker icon image is missing. in the second instance,
it's not. not certain why the same code works in 1 case but not in
another.

can someone help?

- O8

--
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.

Re: Is it able to nest block in a conditional tag in the template of Django 1.3?

On Wed, Feb 29, 2012 at 7:20 AM, Patto <pat.inside@gmail.com> wrote:
> Here is my need:
>
> {% if request.user.is_csr %}
>       {% block csr_block %}
>
>
>
> {% endif %}
>

No. Inside child templates, most nodes outside of blocks are ignored.
You can do this instead:

{% block csr_block %}
{% if request.user.is_csr %}
...
{% else %}
{{ block.super }}
{% endif %}
{% endblock %}

Cheers

Tom

--
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: what is gwt.codesvr=127.0.0.1:9997 used for ?



On Tuesday, February 28, 2012 5:00:24 AM UTC+1, YuHong Yang wrote:
gwt compiles java to bytecode and javascript, does the browser send
the debug info to this address?

gwt.codesvr in the URL's query-string is a signal for the *.nocache.js script to load hosted.html (or devmode.js, or similar, depends on your version of GWT and the linker you use) instead of one of the *.cache.html (or *.cache.js) files of your compiled app. The hosted.html loads the DevMode plugin in the browser and initializes it so it tries to connect to your DevMode "server" (possibly running within Eclipse) at the host and port given as the gwt.codesvr value (127.0.0.1:9997 in your example).

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/FOWQIRFr-lwJ.
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: Push Notification

Hi Sugan ,
there s something C2DM. Funda is u hav to connect ur device to some server . and there will be one background service will be running. whenever new message will come to server ... service will through notification. 

in android there c2dm already there. u can use decona and metero also( http://deacon.daverea.com/


Enjoy 
Moktarul anam 


On Monday, 27 February 2012 17:33:38 UTC+5:30, Sugan wrote:
Hai,
      I am new to Android what is Push Notification ?how to use in
Android ?Can anyone help me with examples thank u

--
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: [Lovers India] Uske bin chup rehna...!!!

very nice


On 2/29/12, Akash Love <akash.u2007@gmail.com> wrote:
> *Uske bin chup-chup rehna aacha lagta hai
> khamoshi se ek dard ko sehna aacha lagta hai
> jis hasti ki yaad mein aansun baraste hai
> samne uske kuch na kehna aacha lagta hai
> milkar usse bichad na jaye darte rehte hai
> isliye bas dur hi rehna aacha lagta hai
> jee chahe apni sari khushiyan laakar usko de du
> uske pyaar mein sab kuch khona aacha lagta hai
> uska milna na milna kismat ki baat hai
> pal pal uski yaad mein rona aacha lagta hai
> uske bina sari khushiyan ajeeb lagti hai
> ro ro kar uski yaad mein sona aacha lagta hai
> Humse mohbbaton ki numayaishe na ho saki
> Bas itna jante hai
> USKO chahte rehna aacha lagta hai*
>
> --
> *Regards,*
>
> *☺☺☺Akash☺☺☺*
>
> *♫ Mobile :+91 98244 04581*
>
> *E-mail : akash.u2007@gmail.com; akash.u2007@rediffmail.com*
> info@infowithfun.com; anil@infowithfun.com.
> *Website : www.infowithfun.com*
>
> *"Believe where others doubt.Work where others refuse.Save where others
> waste.
> Stay where others quit.Dare to be different. Be a winner....!!! "*
>
> --
> You received this message because you are subscribed to the Google
> Groups "Lovers India" group.
> To post to this group, send email to loversindia@googlegroups.com
> To unsubscribe from this group, send email to
> loversindia+unsubscribe@googlegroups.com
> http://groups.google.co.in/group/loversindia
>


--
ALI JAMALI
WORKING FOR IGLOO
AS A COMPUTER OPERATOR

--
You received this message because you are subscribed to the Google
Groups "Lovers India" group.
To post to this group, send email to loversindia@googlegroups.com
To unsubscribe from this group, send email to
loversindia+unsubscribe@googlegroups.com
http://groups.google.co.in/group/loversindia

Find condition on Date field

Hi,
I am trying to filter a VIEW by month and year using separate drop
lists. My code works fine if a year and month selection is made but I
want to be able to filter based on a selection in either one, i.e. not
force a selection of both.
As it stands I am concatenating the year and month selections (day is
always 01) as follows:

$sel_date = $sel_year.'-'.$sel_month.'-01';
$conditions = array('MonthlyReturn.month' => $sel_date); <---note
MonthlyReturn.month is actually a DATE field

I tried $conditions = array('MonthlyReturn.month.YEAR' => $sel_year);

Is it possible to add a condition which only searches by either month
or year?

--
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: Google Plugin for Eclipse : offline installation

Found it here :
http://code.google.com/intl/fr-FR/eclipse/docs/install-from-zip.html

On Wed, Feb 29, 2012 at 6:38 AM, Celinio <cel975@gmail.com> wrote:
Hello,

I want to install GWT Designer (UIBinder), which is part of the Google Plugin for Eclipse.
I cannot install it at work through Eclipse due to some proxy restrictions.

http://code.google.com/eclipse/docs/download.html

Where can I download the plugin for an offline installation ?

I cannot find the files anywhere. Why is that ?

Thanks for helping.

--
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.

3akarat.com - أرض بمدينة بدر مرخصة للبيع

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

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

[android-developers] Re: how to set the preferred rotation ?

Le mardi 28 février 2012 20:55:14 UTC+1, Yan a écrit :
Add to your manifest
android:screenOrientation="landscape"

On Feb 26, 1:13 pm, mobidyc <mobi...@gmail.com> wrote:
> Hi,
>
> I want to set the preferred orientation for the system, How can I
> define it ?
>
> I tried to define in landscape with :
> android.provider.Settings.System.putInt(getContentResolver(),
> "user_rotation", Surface.ROTATION_90);

I don't want to set the orientation for my activity or my application, I already found how to do this.
I want to define the preferred orientation for the android system.

In this way, with the ACCELEROMETER_ROTATION defined to false, if I launch for example the browser, or any other application, it will start and stay  in the orientation defined.
 

--
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] how to get the link speed in the specified application

Hi,

I develop the application which the link speed(Rx) displayed in the
activity.
But, I faced the problem that I do not know how to calculate/get the
link speed...

I guess the TrafficStats class is used in order to perform such an
implementation.
Is it wrong?

Could you provide me any information if you know some knowledge how to
implement this.

I am sorry because I am lack of my English skill...

BR,

--
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: [Rails] ensuring random list of numbers are unique

On 29 February 2012 00:10, John Merlino <stoicism1@aol.com> wrote:
> 500.times.map {  Integer((rand * 1) * 1000) / Float(1000) }
>
> Basically, this gives me a list of 500 random decimal numbers that are
> rounded to 3 places. However, I also want to make sure that all are
> unique.

This is a classic "how do I achieve my solution?", rather than a
"here's my problem... how can I solve it" post...

Can we back up a second please?
What are you trying to achieve with this list of 500 numbers? And what
do you want to do if the list you have generated does contain
duplicates?
As already said, you can use the .uniq method to remove dupes - but
that might leave you with an array of 496 elements... would that be a
problem? Are you really asking "how do I generate an array of 500
random numbers"?

What do you want to do with these 500 random numbers? Considering that
one user could make a request and get their 500 randoms, and another
user could do the same - there could be duplicates across users. Is
this going to be a problem?

Please try to ask clearer questions, as the way it stands, I could
spend ages of my time coming up with solutions to what I *think* is
your problem, just to have you say "nope... that's not what I was
after". Multiply that across the subscribers to this list, and you've
wasted a hell of a lot of peoples' time around the world :-/


PS BTW Why are you multiplying by 1 in your example code? (and does
that line even work if you paste it into your console, as it explodes
for me with a LocalJumpError... but that may just be Ruby versions...)

--
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: [Rails] getting error:undefined method 'current'

On 29 February 2012 05:22, sachin kewale <sachinkewale@gmail.com> wrote:
>
>
> On Tue, Feb 28, 2012 at 5:31 PM, Colin Law <clanlaw@googlemail.com> wrote:
>>
>> On 28 February 2012 11:53, sachin kewale <sachinkewale@gmail.com> wrote:
>> >
>> >
>> > On Tue, Feb 28, 2012 at 5:06 PM, Michael Pavling <pavling@gmail.com>
>> > wrote:
>> >>
>> >> On 28 February 2012 11:26, sachin kewale <sachinkewale@gmail.com>
>> >> wrote:
>> >> >    i am getting an error 'undefined method 'current' for 852:Fixnum',
>> >> > the
>> >> > error coming for following line
>> >> >
>> >> > <%if @expert_pagination.current.previous%>
>> >>
>> >> ....and the value of @expert_pagination is what? Have you debugged it
>> >> to
>> >> see?
>> >> I assume you expect it to be an object of some sort with a method
>> >> ".current"; but the error is telling you that it's a Fixnum...
>> >>
>> >
>> > yes the @expert_pagination is object
>>
>> No it is not an object, it is a number.  Have a look at the Rails
>> Guide on Debugging to get ideas on how to work out what is going on.
>>
>> Colin
> ...
>
> yes it is number ,but when the number is like 6,7 it is giving an error
> ''undefined method 'current' for 852:Fixnum''

I don't understand what you are saying, you accept that
@expert_pagination is a number, but then expect to be able to say
@expert_pagination.current. A number does not have a method current
so the error is shown. What do you expect @expert_pagination.current
to do if @expert_pagination is a simple number?

I also don't understand what you mean by "when the number is like 6,7"
6,7 is not a number, or do you mean 6.7?

Have you followed my earlier suggestion to read the Rails Guide on
debugging in order to find out what is going on? Please answer this
question if you reply, do not just ignore it.

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.

Tuesday, February 28, 2012

[android-developers] Application Licensing for 7 days trial period in Android

Where i have to change in the Server Managed Policy class so that it
works only for 7 days trial and after that user have to buy the app
from android market place?

--
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] conversion to dalvik format failed error 1

Hi all,
How can i overcome the following error "Dx 1 error;
aborting Conversion to Dalvik format failed with error 1"

--
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: spinner background problems going from 4.0.3 to 2.3.3

Being a newbie is no excuse for not reading the documentation. There
is a long one describing themes right in the SDK.

On Feb 29, 8:51 am, Ray Tayek <rta...@ca.rr.com> wrote:
> At 04:39 PM 2/28/2012, you wrote:
>
> >On Tue, Feb 28, 2012 at 6:29 PM, Ray Tayek
> ><<mailto:rta...@ca.rr.com>rta...@ca.rr.com> wrote:
> >is there any workaround for this?
>
> >Unless you are prepared to override the theme completely,
>
> not unless i have to.
>
> >  don't bother setting the background.
>
> i did not have to set the background for the spinner in 4.0.3.
>
> >  Let the default platform version themes prevail.
>
> i'm a real newbie. are there any choices for themes in 2.3.3?
>
> thanks
>
> ---
> co-chairhttp://ocjug.org/

--
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

Learning Django: DjangoProject Poll application

https://docs.djangoproject.com/en/dev/intro/tutorial01/

I'm using the Djangostack (Python 2.7.2+; Django 1.3.1-1) from Bitnami
ran on Ubuntu 11.10 with PostgreSQL 9.1.2

Sorry for my newbie question.

I got to the portion where it asks me to import timezone from the
django.utils module but all I manage to receive is:

>>> from django.utils import timezone
Traceback (most recent call last):
File "<console>", line 1, in <module>
ImportError: cannot import name timezone

If I cannot do the above, I cannot get to the next line in the shell:

>>> p = Poll(question="What's new?", pub_date=timezone.now())


Anybody ever encounter this issue? I've attempted to look for a
timezone setting in my settings.py and the only setting I can modify
seems to be the location. A preliminary Google search and
StackOverflow search turned up nothing. Your help is greatly
appreciated. Thanks!

--
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: Scoped Activerecord query

@avenger_powers = Power.where(whatever).includes(User.all.superhero)

On Feb 28, 12:36 am, simpleton <brand.magn...@gmail.com> wrote:
> I have a User model with a scope :superhero and I want to do an AR
> query along the lines of:
>
> @avengers_powers = Power.where(etc.).includes(User.where( #{this is
> where I want to limit by superhero scope} ))
>
> My users schema is:
>
> create_table "users", :force => true do |t|
>     t.string   "uid"
>     t.string   "name"
>     t.datetime "created_at"
>     t.datetime "updated_at"
>     t.string   "token"
>     t.text     "ability"
>     t.string   "location"
> end
>
> My user model has:
>
> scope :superhero, where("ability like '%laser vision%' OR ability like
> '%invisibility%'")
> scope :hobo, where("location like '%cardboard box%'")
>
> Seeing as :superhero and :hobo aren't attributes on the user model,
> how would I query it?

--
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.

Model Array index issue

I have a weird problem with Models and array's

I moved a website from a test server to the live server.
In the new situate all my code started to complaine about undefined
indexes. When debugging an array I see that the array indexes became
numbers instead of the Model names!? What can be the problem of that I
use the exact same installation of cakephp?


Below the 2 examples of arrays.

this is how the array should be.
---------------------------------------------
Array
(
[0] => Array
(
[MenuItemsTemplates] => Array
(
[id] => 152
[menu_item_id] => 1
)

)

This is the array on the live server
----------------------------------------------------
Array
(
[0] => Array
(
[0] => Array
(
[id] => 152
[menu_item_id] => 1

)

)

--
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: [Rails] ensuring random list of numbers are unique

> 500.times.map { Integer((rand * 1) * 1000) / Float(1000) }
>
> Basically, this gives me a list of 500 random decimal numbers that are
> rounded to 3 places. However, I also want to make sure that all are
> unique.

Tack a .uniq to the end...

http://ruby-doc.org/core-1.9.3/Array.html#method-i-uniq

-philip

--
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] Re: ActiveRecord::ConnectionNotEstablished

I changed the gem file and succeeded with the db:create and created the
three databases only for once after that I can't use any of my mysql
database connections not only in ror applications
the message is : Access denied for user 'root'@'localhost' (using
password: YES) (Mysql::AccessDeniedError)
I am using ruby on windows

this is an example of a database connection
ActiveRecord::Base.establish_connection(
:adapter => "mysql",
:host => "127.0.0.1",
:database => "database",
:username => "root",
:password => "*********"
)

regards,

--
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 - محافظة بورسعيد ارض الجولف

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

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

Re: [android-developers] what kind of database should I use

http://developer.android.com/guide/topics/data/data-storage.html

-------------------------------------------------------------------------------------------------
TreKing - Chicago transit tracking app for Android-powered devices

--
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 1.4b1; syncdb parameters

On Feb 28, 4:39 pm, Ramiro Morales <cra...@gmail.com> wrote:

> I suspect the reason is a cleanup performed during the 1.4 development cycle
> in handling of options passed to management commands that focused in the
> options passed via the command line.
>
> You are seeing this because presumably you are using the command y calling it
> from Python code. A valid use case. Perhaps an addition to the release notes
> would be helpful.
>
> Now, the mentioned cleanup was performed well before the 1.4 alpha (Dec 27
> 2011): 1 Oct 23 2011 so I don't understand how you are seeing the change in
> behavior between alpha1 and beta1.
>
> --
> Ramiro Morales

Sorry, my fault, seems it was version 1.3 without this bug, but 1.4a
also has it. Thanks for your reply.

--
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.

sql query builder widget

This is my first attempt at a re-usable GWT widget. The idea is that
it allows normal users to do intermediate level queries without
needing to know SQL. The widget just needs to be fed meta data to
generate SQL...

I've knocked together a demo:
http://redquerybuilder.appspot.com/

Would this be useful to anybody? What are the biggest features missing/
broken?

Basically I'm wondering if it is worth me bothering with cleaning up
the code etc

Cheers

Sam

--
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] i wanna buy best rails tutorials

Have you looked at the RailsGuides site, http://guides.rubyonrails.org/


On Tue, Feb 28, 2012 at 9:14 AM, Javier Quarite <jquarites@gmail.com> wrote:
>
> Codeschool.com?
>
> It also has a free basic rails course
>
> Javier Q.
>
> --
> 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.

--
Kind Regards,
Rajinder Yadav

SafetyNet Test Driven Development
http://safetynet.devmentor.org

--
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] rails and javascript

Hi,

I want to add a dropdown selection box that when an item is selected a
javascript function gets called, is there an easy way to do this with
Rails?

Thanks!

--
Kind Regards,
Rajinder Yadav

SafetyNet Test Driven Development
http://safetynet.devmentor.org

--
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: [Rails] Re: ActiveRecord::ConnectionNotEstablished

On 28 February 2012 20:42, rubix Rubix <lists@ruby-forum.com> wrote:
> I found this too in internet, but I don't know how to do it?
> how to get gem mysql2 in gemfile and what gemfile exactly?

The file is the file Gemfile in the root of your rails project (this
file is mentioned in the tutorial). I think maybe you would be best
to follow the tutorial /exactly/ for the moment, rather than trying to
use mysql. Then when you have worked through that simple one go on to
railstutorial.org (which is free to use online) which will introduce
you to more concepts and techniques, rather than hoping for people
here to help with every little issue you have.

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.

[android-developers] monkeyrunner device.type() dropping characters

trying to learn how to write monkeyrunner scripts in python:


device.startActivity( component='com.android.calculator2/.Calculator' )
time.sleep(1)
device.type( '2*3=' )

starts the calculator, accepts the input and displays the proper
result. However


device.startActivity( component='com.android.browser/.BrowserActivity',
uri='http://www.amazon.com' )
time.sleep(5)
device.type('www.yahoo.com')
device.press('KEYCODE_ENTER', 'DOWN_AND_UP')

starts the browser with www.amazon.com just fine, but then the first
two 'w' from www.yahoo.com get dropped. I've tried varying the sleep
time and also sending each individual character one device.press() at
a time, but trying to send keystrokes to the browser always results in
leading characters getting dropped.

What am I missing?

--
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 - فرصة شقة للبيع بالتجمع الخامس 164م

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

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

[Rails] Re: ActiveRecord::ConnectionNotEstablished

I found this too in internet, but I don't know how to do it?
how to get gem mysql2 in gemfile and what gemfile exactly?

regards,

--
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.

new plugable django app released (django-hitcount-mixed-object)

I recently released a plugable django app (django-hitcount-mixed-
object) in order to count hits/views over mixed object using NoSQL in
order to increase the performance of this functionality.

To count hits/views of simple objects is a simple task, in comparison
with mixed objects.

What is a mixed object?. Let's see with a use case.

Imagine that your app allows customize the ordered items, similar how
happen at ordering food sites. I mean that two ordered items can
specify the same dish, but with different toppings. and you need to
know how many times the same dish with the sames toppings have been
ordered.

In this case, the composition of dish with toppings ordered is the
mixed object, and it can be divided into:
1) object -> match with dish
2) related objects -> match with toppings

If this example or similar one is your problem, this django app is for
you.

Your are welcome to send your feedback about the this plugable. You
can download it from pypi[1] or make a fork at github[2]

[1] - http://pypi.python.org/pypi/django-hitcount-mixed-object/

[2] - https://github.com/rmaceissoft/django-hitcount-mixed-object

--
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: Multiple APK Support issue?

I'm only differentiating (trying to anyway) based on screen sizes, so
target SDK shouldn't matter, at least according to this:
http://developer.android.com/guide/market/publishing/multiple-apks.html
But at any rate, here is what I have: <uses-sdk
android:minSdkVersion="2" targetSdkVersion="10"/>

On Feb 28, 2:45 pm, TreKing <treking...@gmail.com> wrote:
> On Tue, Feb 28, 2012 at 1:40 PM, jeka <jro...@gmail.com> wrote:
> > Any advice?
>
> Your target SDK value may be a factor.
>
> --------------------------------------------------------------------------- ----------------------
> TreKing <http://sites.google.com/site/rezmobileapps/treking> - Chicago
> transit tracking app for Android-powered devices

--
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] Multiple APK Support issue?

Hello.

I'm trying to build an APK for small screens only, and so, specify
this in my manifest:
<supports-screens android:smallScreens="true"
android:normalScreens="false"
android:largeScreens="false"
android:xlargeScreens="false"
android:anyDensity="true" />

then I build my APK and upload it to the market, however, on the
market this information is shown for the new APK:

API level: 2-16+
Supported screens: small-xlarge
OpenGL textures: all

so, clearly the supported screens part is not what I expect to see.
Any advice?

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] Any *working* code examples utilizing Android's RTP helper classes (RtpStream/AudioGroup/AudioStream)??

Since Android API 12, RTP is supported in the SDK, which includes
RtpStream as the base class, and AudioStream, AudioCodec, and
AudioGroup. However, so far I've found next to no documentation,
examples, or tutorials to help in constructing *working* code based on
these APIs.

Does anybody know if/where there are ANY code examples out there?
Thnx.

--
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

[Rails] Using a string column instead of an id column to differentiate records

How do you decide whether to use a string column or an id column to differentiate between different types of records?

Suppose you have a relationships table that maps users to forums. The possible relationships can be: subscriber, moderator, owner.

When does it make sense to move those relationship types to their own table and reference them through a relationship_type_id column? What's the criteria? Or is it better to use a string column to differentiate them?

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/t2scvYNus4UJ.
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: Request for Ideas: how to handle a major upgrade to my App

Interesting, hadn't thought of in-app purchases.

That may work as well because I currently have a Free version of the
app and two separate Paid versions (all build from the same codebase
though). Having an In-App purchase would be neat.

There is a downside though: the paid version of my app is very highly
rated because the folks who buy it (generally) understand what it is
for and how to use it...the ratings for the Free version suffer from
the normal idiot pollution that affects many free apps.


Will need to think about that.


On Feb 27, 3:20 pm, John Coryat <cor...@gmail.com> wrote:
> Here's a way you can migrate your paid users...
>
> Release your new app as free with in-app purchase and create a way to use
> an unlock code. You'll need a server interface to check the validity of the
> code and a way of telling your existing customers about it. Using an unlock
> code will make it possible for paid users to download your new free app and
> use it without having to pay again.
>
> -John Coryat

--
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


Real Estate