Saturday, December 31, 2011

Re: How to "custom belongsto" in CakePHP 2?

BelongsTo is simply a left join, (on the retrieval side)...

I think what you are looking for is the Relationship conditions option. (Which will create the ON statement in SQL)

So what you want is something that looks like...

Radpostauth Model...

var $belongsTo = array(
'Wdevice' => array(
'className' => 'Wdevice',
'foreignKey' => false,
'conditions' => array(
 Wdevice.device_mac = radpostauth.username
)
);

--
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: Multiple Businesses in one database

I do a very similar thing to allow users multiple profiles. So they can segregate their data by company, or family, or team.

Here is the basic logic.

In the appController beforeFilter() method set the logged in user to the appModel class that you are fetching. Such as...
AppModel::setActiveUser($this->Auth->user());

Of course you will need to set up a static property in the AppModel. Such as...
public static $activeUser;
public static function setActiveUser($appUser){
self::$activeUser = $appUser;
}

Once you do this, any model that is based on multi-business logic, will have access to the current logged in user.

Now, in your Events model, you could add the following code... (or something similar)
function beforeFind($qd){
if(isset(parent::$activeUser['User']['business_id'])){
$qd['conditions'][] = array(
'Event.business_id '=> parent::$activeUser['User']['business_id']
 );
}
return $qd;
}


If you want to do a much simpler method...
You can simply add a condition to the paginate options in the controller index method.
$appUser = $this->Auth->user();
$this->paginate['conditions'][] = array('Event.business_id' => $appUser['User']['business_id']);

Happy Coding!

--
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] Rails 3.1.0 - Asset pipeline

Hi, all :)

Happy new year :)

I referred to http://edgeguides.rubyonrails.org/asset_pipeline.html
for rails 3.1.0,
1) it does say that assets related to the application (ie. need
preprocessing) can live in the myapp/app/assets directory
2) it does say that files which need no preprocessing can still live
in the public/ directory.

I can access files places in the myapp/app/assets directory with no
problems but
how do I access my files in public? For example, public/images/rails-
logo.png?

When I access that path via the webbrowser, I get an error, 'No route
matches [GET] "/public/images/rails-logo.png" '.


thank you

Gordon

--
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) http://123maza.com/48/silver424/

http://123maza.com/48/silver424/

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

[Rails] 'require_tree .' does not seem to be including the available *.js files as expected. Why?

Hi, all,

Happy new year :)

Referring to http://guides.rubyonrails.org/asset_pipeline.html, it
seems that 'require_tree .' in myapp/app/assets/javascripts/
application.js will include all *.js files in the myapp/app/assets/
javascripts/.


I have a few other *.js files in this directory : parts.js, makes.js
and categories.js.


Here's an extract from the html file I am viewing:

--------------- Extract start -----------------------

<!DOCTYPE html>
<html>
<head>
<title>My App</title>

<script src="/javascripts/jquery.js" type="text/javascript"></
script>
<script src="/javascripts/application.js" type="text/javascript"></
script>
<script src="/javascripts/jquery.min.js" type="text/javascript"></
script>
<script src="/javascripts/jquery_ujs.js" type="text/javascript"></
script>
<!--, "http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/
jquery.min.js" %>
- "jquery.js", "application.js", "jquery.min.js" , "jquery_ujs.js" -->

<!-- :defaults, "jquery.min.js" -->
<meta content="authenticity_token" name="csrf-param" />
<meta content="jfiFh0CGHgl5F6mX/dORtk1y6IMfnbCavwgx4bVYXbA="
name="csrf-token" />
</head>
<body>


--------------- Extract end -----------------------

My 'app/assets/javascripts/application.js' file is:


--------------- Extract start -----------------------
//= require jquery
//= require jquery_ujs
//= require_tree .

--------------- Extract end -----------------------


My question: I am using rails 3.1.0 and when I open up a page in the
webbrowser and view source, I am not seeing the 3 js files above
being included. Why are the 3 files not included? Is require_tree
broken?

Thank you :)

Gordon

--
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: Happy new year

New year wishes to everyone,,

regards,
girish ms
On Sun, Jan 1, 2012 at 10:24 AM, Nikhil Verma <varma.nikhil22@gmail.com> wrote:
Happy new year to all of you.


On Sun, Jan 1, 2012 at 10:22 AM, yati sagade <yati.sagade@gmail.com> wrote:
Happy new year all :)


On Sun, Jan 1, 2012 at 7:54 AM, Adrien Lemaire <adrien.lemaire@aquasys.co.jp> wrote:
Happy new year dear folks !

On Jan 1, 1:48 am, Sławomir Zborowski <stilew...@gmail.com> wrote:
> Happy new year, Django users :-) !

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



--
Regards
Nikhil Verma
+91-958-273-3156


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



--
Girish M S

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

[Lovers India] Hansika Motwani photos..



--
Thanks & Regards

SHYJITH M

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

[Rails] Re: how to pass form values within an ajax call?

1. The following javascript is being defined in myapp/public/
javascripts/application.js

jQuery(function($) {
// when the #search field changes
$("#category").change(function() {
// make a POST call and replace the content
$.post(<%= category_sub_categories_path %>, function(data) {
$("#results").html(data);
});
});
})

2. this javascript is being applied to the myapp/app/views/parts/
_form.html.erb partial template

My question is, if there is a rails variable, @categories in the
partial template, I need to pass the @categories.id value to the
javascript from there.
Would this work?


If somebody understands this and could comment, kindly share your
input.
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.

[android-developers] Re: NPE in Pre Compiler using Eclipse 3.7.1

I looked at another two projects that use a different library and I
have a different problem that is new, as I had recently built this and
put it on the market:
R cannot be resolved to a variable

For this line:
case R.id.clear_menu:

I have the ids defined in the library, as they are shared for both
projects, and this used to work.

So, I think the fact that I am not copying the res files from the
library to the actual projects may be the problem, which to me seems
to be a bug.

On Dec 31, 10:20 pm, James Black <planiturth...@gmail.com> wrote:
> I recently updated my SDK, and in one project I am getting this error:
>
> !ENTRY com.android.ide.eclipse.adt 4 0 2011-12-31 22:08:11.403
> !MESSAGE Unknown error: java.lang.NullPointerException
> !STACK 0
> java.lang.NullPointerException
> at
> com.android.ide.eclipse.adt.internal.build.AaptParser.getResourceFromFullPa th(AaptParser.java:721)
> at
> com.android.ide.eclipse.adt.internal.build.AaptParser.checkAndMark(AaptPars er.java:473)
> at
> com.android.ide.eclipse.adt.internal.build.AaptParser.parseOutput(AaptParse r.java:370)
> at
> com.android.ide.eclipse.adt.internal.build.builders.PostCompilerBuilder.bui ld(PostCompilerBuilder.java:599)
> at
> org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:728)
> at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
> at
> org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java: 199)
> at
> org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java: 321)
> at
> org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:396)
> at org.eclipse.core.internal.resources.Project$1.run(Project.java:618)
> at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2344)
> at
> org.eclipse.core.internal.resources.Project.internalBuild(Project.java:597)
> at org.eclipse.core.internal.resources.Project.build(Project.java:124)
> at
> com.android.ide.eclipse.adt.internal.project.ProjectHelper.doFullIncrementa lDebugBuild(ProjectHelper.java:961)
> at
> com.android.ide.eclipse.adt.internal.launch.LaunchConfigDelegate.launch(Lau nchConfigDelegate.java:146)
> at
> org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfigurat ion.java:854)
> at
> org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfigurat ion.java:703)
> at
> org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(DebugUIPlugin.ja va:928)
> at
> org.eclipse.debug.internal.ui.DebugUIPlugin$8.run(DebugUIPlugin.java:1132)
> at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
>
> I have this in project.properties:
> android.library.reference.1=../BookTrackerLib
>
> java.runtime.version=1.6.0_29-b11
>
> [image: image.png]
>
> For my project, everything is done in the library, so here is my main
> activity:
> public class BookTrackerActivity extends BookTrackerLibActivity {
> public void onCreate(Bundle savedInstanceState) {
> mContext = this;
> super.onCreate(savedInstanceState);
>
> }
> }
>
> I don't know what else may be needed to help solve this problem.  I have
> cleaned both projects, rebuilt the library, then restarted Eclipse, rebuilt
> the main project, still have the same error.
> --
> "I know that you believe you understand what you think I said, but I'm not
> sure you realize that what you heard is not what I meant."
> - Robert McCloskey
>
>  image.png
> 14KViewDownload

--
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-admin.py startproject will NOT work.

>
> No, that's not wrong, that's how it should be. The python interpreter
> is in your path, but you're telling the interpreter which file to run.
> If you tell it to run a file args.py and there is no such file in the
> current directory, it's correct to give you an error message.
>
> Does this little script tell you correctly the number of arguments you
> pass to it?
>
> --bart

Ok I've had a breakthrough (I guess,lol). I started a command prompt
from my Python Scripts folder (C:\Python27\Scripts\), typed in "Python
django-admin.py startproject mysite", and it worked!! I now have the
"mysite" folder with appropriate subfolders (__init__.py,
manage.py,settings.py,urls.py).

Is this working correctly?? Should I have to create Projects in the
Python Scripts Folder?? Should it work from another (any misc dir)
dir??

And, can I leave it in the Scripts Folder or should I move it?? If I
do move it, will that cause other problems??

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

3akarat.com - شقق تمليك على النيل

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

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

Re: Cake is NOT able to connect to the database.

I tried this as well, created database as you mentioned below with
testuser, change the configure file as below. But the result is same
as below, still can't connect to DB.
<?php
class DATABASE_CONFIG {
public $default = array(
'datasource' => 'Database/Mysql',
'persistent' => false,
'host' => 'localhost',
'login' => 'testuser',
'password' => '123456',
'database' => 'cake_testing',
'prefix' => '',
'encoding' => ''
);
}

On 1月1日, 上午1时49分, Sam Sherlock <sam.sherl...@gmail.com> wrote:
> because this is blank
>
> 'database' => '',
>
> what is the name of the mysql database your connecting to?
>
> mysql -u testuser -p123456 -h localhost
> mysql>CREATE DATABASE cake_testing;
> mysql>exit;
>
> then use 'database' => 'cake_testing',

--
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: Re[6]: [Rails] bundle --deployment & --no-deployment

On Sat, Dec 31, 2011 at 2:18 PM, Ralph Shnelvar <ralphs@dos32.com> wrote:

> jw_player needs to have videos somewhere in public.
>
> Can a link to cloud storage be placed there?  I am a complete noobie when it comes to cloud stuff and heroku.

This has nothing to do with Heroku specifically.

I've never used fw_player, but a quick glance at the docs shows it
(apparently) accepts a URL as a 'file' argument. Easiest way to find
out is try it.

Create an Amazon S3 account and upload a video file to it; put that
URL in a page on your development machine. When it works there,
it'll work anywhere :-)

--
Hassan Schroeder ------------------------ hassan.schroeder@gmail.com
http://about.me/hassanschroeder
twitter: @hassan

--
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: USStateField default value

hi erisa,

please try passing "initial" instead of default.

On 31 Aralık 2011, 23:52, Erisa <bruceaw...@gmail.com> wrote:
> I wanted to have a select box for the state with California as the
> default.  I first tried in my model the following:
>
> state = USStateField(blank=True, default='CA')
>
> This gave me the error "TypeError: __init__() got an unexpected
> keyword argument 'default'".
>
> But the following works (i.e., California is the default and I have a
> nice select box):
>
> state = models.CharField(blank=True, max_length=2,
> choices=STATE_CHOICES, default='CA')
>
> Could this be a bug?  I am using 1.3.

--
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] can use ATM cum debit card of State Bank of India (SBI) for registration.

On Sat, Dec 31, 2011 at 3:17 AM, Mohd Arshi Khan <arshikhan4u@gmail.com> wrote:
it is possible to use ATM cum Debit Card of State Bank of India (SBI) for registration on android Market for publish my App.

Why don't you just try it and see ... ?

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

[Rails] an advice for menu navigation.

I'm using simple-navigation but I want try other solutions, for
example with jquery.
What do you use for navigation menus with one or more levels?

--
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] Why isn't "layoutopt" in my sdk?

I noticed the mention of the "layoutopt" tool in the Android Training pages.  I see that I don't have that in my sdk distro anywhere. I've kept the SDK installed from the ADT pretty up to date, but perhaps that's separate from this.

Why might it be 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

Re: django-admin.py startproject will NOT work.

On Dec 31, 6:48 pm, Bart Nagel <b...@tremby.net> wrote:
> At 2011-12-31 15:43:36 -0800, Chris Kavanagh wrote:
>
> > Ok, I CAN start the Python Interpreter from the command line by just
> > typing "python" then "enter".
>
> > I saved the file "args.py" in the Python Scripts folder. When I try to
> > run it from command prompt, I get the message  "python: can't open
> > file 'args.py': [Errno 2] No such file or directory".
>
> > The only way I CAN get it to open, is to change (cd into) into the
> > python scripts folder (where I saved args.py) then run it (type
> > "python args.py" in command prompt). So, obviously something is wrong.
>
> No, that's not wrong, that's how it should be. The python interpreter
> is in your path, but you're telling the interpreter which file to run.
> If you tell it to run a file args.py and there is no such file in the
> current directory, it's correct to give you an error message.
>
> Does this little script tell you correctly the number of arguments you
> pass to it?
>
> --bart

Yes, it tells me the number of args.

BTW, thanks for the patience.

--
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: GWT application freezes when new version is deployed while using it

runAsync are not expected to do RPC, these are separated concerns.

But you pass a RunAsyncCallback to GWT.runAsync(), and the onFailure of this callback is indeed called when the fragment cannot be loaded.

--
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/-/MoNo9cCwB30J.
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: django-admin.py startproject will NOT work.

On Dec 31, 6:18 pm, Bart Nagel <b...@tremby.net> wrote:
> At 2011-12-31 15:01:39 -0800, Chris Kavanagh wrote:
>
>
>
>
>
>
>
>
>
> > On Dec 31, 11:58 am, Bart Nagel <b...@tremby.net> wrote:
> > > What about other Python programs? Do they have the same problem?
>
> > > Put this next paragraph in a file and run it with different numbers of
> > > arguments and see what happens.
>
> > > import sys
> > > print "%d arguments" % len(sys.argv)
>
> > > Save it as args.py
>
> > > Run
> > > python args.py
> > > python args.py arg1
> > > python args.py arg1 arg2
>
> > As far as other programs, I'm not sure. I'm not a programmer (just
> > learned Python over the last few months) so I haven't tried any other
> > programs yet.
>
> > Ok, so save the paragraph in a file, then run the commands from the
> > command line EXACTLY as you have them? In other words, from command
> > line, type in Python args.py, then python args.py arg1, and python
> > args.py arg 2??
>
> > Forgive my ignorance, working from the command line with this stuff is
> > new to me. And I've never understood exactly what command line args
> > are. . .But I'm learning.
>
> The command line is the dream, you'll come to love it. Well, maybe not
> the Windows one.
>
> I guess first up just run
>     python
> and see if you get the interactive Python shell. Or maybe you need
>     python.exe
> since you're on Windows? Anyway, if you get the shell, the python
> executable is in your path and works to at least some extent. If you
> don't get the shell, and you get "command not found" or something (I
> don't have a Windows box so I don't know exactly what it would look
> like) you may need to use the full path to the executable, as people
> before have suggested.
>
> So those two lines ("import..." and "print...") make a very simple
> Python script which just outputs the number of arguments it thinks it
> was given.
>
> Invoke the script with Python just as you're meant to do for the
> Django script. On linux I just run
>     python args.py
> and it tells me "1 arguments". If I run
>     python args.py something
> it tells me "2 arguments" and so on.
>
> What behaviour do you get?
>
> The point of this is that if this python script can see the arguments
> then I can see absolutely no reason why your django-admin.py script
> would not see them, and I would be stumped.
>
> --bart

Ok, I CAN start the Python Interpreter from the command line by just
typing "python" then "enter".

I saved the file "args.py" in the Python Scripts folder. When I try to
run it from command prompt, I get the message "python: can't open
file 'args.py': [Errno 2] No such file or directory".

The only way I CAN get it to open, is to change (cd into) into the
python scripts folder (where I saved args.py) then run it (type
"python args.py" in command prompt). So, obviously something is wrong.

--
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] Oh btw...

HAPPY NEW YEAR

from my I&iPhone

--
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] Which of you...

Have time for a project?

from my I&iPhone

--
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: django-admin.py startproject will NOT work.

On Dec 31, 11:58 am, Bart Nagel <b...@tremby.net> wrote:
> At 2011-12-31 19:47:35 +0300, Timothy Makobu wrote:
>
> > File associations are fine i reckon, because django-admin is giving you the
> > help message because for some reason it thinks you're *giving it improper
> > input*.
>
> What about other Python programs? Do they have the same problem?
>
> Put this next paragraph in a file and run it with different numbers of
> arguments and see what happens.
>
> import sys
> print "%d arguments" % len(sys.argv)
>
> Save it as args.py
>
> Run
>     python args.py
>     python args.py arg1
>     python args.py arg1 arg2

As far as other programs, I'm not sure. I'm not a programmer (just
learned Python over the last few months) so I haven't tried any other
programs yet.

Ok, so save the paragraph in a file, then run the commands from the
command line EXACTLY as you have them? In other words, from command
line, type in Python args.py, then python args.py arg1, and python
args.py arg 2??

Forgive my ignorance, working from the command line with this stuff is
new to me. And I've never understood exactly what command line args
are. . .But I'm learning.

And THANK YOU ALL FOR THE HELP!!!

--
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 will NOT work.

On Dec 31, 11:47 am, Timothy Makobu <makobu.mwambir...@gmail.com>
wrote:
> Hi,
>
> File associations are fine i reckon, because django-admin is giving you the
> help message because for some reason it thinks you're *giving it improper
> input*.
>
>So, you're saying you don't believe this is the problem (File Associations)?? I don't think it is either, but I thought it was worth a try. It was in a Stack Overflow question about Python (Windows) not accepting command line args.

--
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 will NOT work.

On Dec 31, 12:13 pm, Andre Terra <andrete...@gmail.com> wrote:
> This has been answered before:
>
> http://groups.google.com/group/django-users/browse_thread/thread/9d53...
>
> Cheers,
> AT
>
>
> Yes, I saw that thread, and I tried changing my registry as suggested. And the other 'work around'. Neither worked.
>
>
>
>

--
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[6]: [Rails] bundle --deployment & --no-deployment

Hassan,

Saturday, December 31, 2011, 11:27:29 AM, you wrote:

HS> On Sat, Dec 31, 2011 at 10:18 AM, Ralph Shnelvar <ralphs@dos32.com> wrote:

>> Question:  Does that mean I can't add more gems to the gemfile when I do the next upload?

HS> No, each deployment reads the Gemfile and loads what it needs.

>> If I need to fix one .rb file (or whatever), do I have to upload the entire app?

HS> Sure, but it's just `git push heroku master` and wait a minute -- not a
HS> big deal. Though for quick deployments *anywhere* it's a good idea
HS> to separate out large assets (images, video, sound) to some cloud
HS> storage provider (e.g. AWS S3).

jw_player needs to have videos somewhere in public.

Can a link to cloud storage be placed there? I am a complete noobie when it comes to cloud stuff and heroku.

Ralph Shnelvar

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

USStateField default value

I wanted to have a select box for the state with California as the
default. I first tried in my model the following:

state = USStateField(blank=True, default='CA')

This gave me the error "TypeError: __init__() got an unexpected
keyword argument 'default'".

But the following works (i.e., California is the default and I have a
nice select box):

state = models.CharField(blank=True, max_length=2,
choices=STATE_CHOICES, default='CA')

Could this be a bug? I am using 1.3.

--
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] Re: Expandedlistview

On Sat, Dec 31, 2011 at 6:21 AM, Sean751 <sean751@gmail.com> wrote:
There is an example for using the onChildClick and in onCreate the line getExpandableListView().setOnChildClickListener(this); is included

That implies that in this example the class referred to by "this" implements the OnGroupClickListener interface. Does it?
 
so if I want to also have onGroup click I assumed that I need getExpandableListView().setOnGroupClickListener(this);

You need an OnGroupClickListener, where you get it from, whether it is "this" or another instance, is fairly irrelevant. 
 
but that causes an error the suggestion in Eclipse is to change it to getExpandableListView().setOnGroupClickListener((OnGroupClickListener) this);

Eclipse doesn't know any better. You should. This will get it to compile but will crash as you saw.
 
I am after any item click if there is another way, the code that I want to run onClick is the same for Group or Child. I can see in the parent class there is an event but I don't know how to use it, I am new to this.

You may need to take a step back and learn some Java first, as it appears you're getting hung up on some basic semantics of the language.

-------------------------------------------------------------------------------------------------
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: Happy New Year – Django on display in Times Square!

awesome!

2011/12/31 Jason Ford <jason@feedmagnet.com>:
> Our app, FeedMagnet (built in Django!) gathers content from social
> networks in real-time, curate the feed, and then display it. All day
> today, FeedMagnet is powering the Verizon screen in Times Square
> (running on the giant MTV HD display) – showing real-time posts from
> Facebook, G+, and Twitter, plus photos from Instagram and a giant
> Foursquare avatar montage and checkin counter. It's pretty awesome.
>
> http://instagr.am/p/dPWfx/
>
> If you happen to be in Times Square for the New Years party, tell the
> folks around you that big social media screen is powered by Django and
> Python!
>
> - Jason (founder of FeedMagnet)
>
> --
> 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.

Re: A new-comer nightmare, the learning curve and best-practices

well first off i'm not sure how RequestFactory is related to spring, it is more related to orm frameworks integration into GWT. 
actually GWT has a lot more integration with gin (the client side of guice in gwt)  and guice then spring, (unless i'm wrong, but i saw a lot more frameworks using it then with spring). 
as for the lack of/sparse documentation, yep, it is a problem, sometimes i think gwt acts more like a start-up company then well founded one like google, although the developer guide does cover most of the bits, the nuts and bolts are hidden away, without proper documentation aside from the source code (and there's a lot of it).
as for the too much code problem, yep, that's also a problem which seems to be increasing with each major of gwt. 
this is why i've seen frameworks result in code generation of boilerplate codes the ease up this pain. 

although the MVP articles are good, they are rather confusing as GWT doesn't have a direct implementation of them, this is because the Activity Places framework, doesn't exactly cover that (you should replace the word Activity with presenter)  

for the UI, you should stop thinking in terms of pages, but start thinking like a desktop developer, the html page is just a thin cover host, it does nothing more then serve your app to the browser, from then on GWT takes over. 

--
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/-/lemNGp_G-jwJ.
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.

Django dev/deploy environment for distributed agile teams

Hi everybody, we are working in a geographically distributed agile team. I am trying to design and configure our development environment and deployment procedures and need to know about your valuable experiences. My requirements are:

* Each new developer can kick-start developing: dev environment and all installs/configs (python related) should be achievable in 15 minutes. This procedure should be automated and repeatable.

* Everybody can pull & build whole project locally and run complete *functional* test suite

* Upon pushing code in our Github repo, it will be pulled out by our build/staging server automatically --> all *functional* & *non-functional* tests will be run by Jenkins --> if successful: we can test it manually on this server too.

* Admins can choose some features or profiles on this staging server and deploy them to live (production) server by ideally executing a script


I've read a lot about virtualenv, pip, fabric, puppet, chef & blueprint and used some of them but want to hear more about your recommendations, best practices and potential pitfalls. Appreciate it very much.

Happy new year :)

--
Ashkan

--
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] Using image from gallery in application

I am writing an intent to allow the user to pull an image from the
gallery:

Intent getImage = new Intent(Intent.ACTION_GET_CONTENT);

getImage.setType("image/*");
getImage.putExtra("outputX", width);
getImage.putExtra("outputY", height);
getImage.putExtra("aspectX", width);
getImage.putExtra("aspectY", height);
getImage.putExtra("noFaceDetection", true);
getImage.putExtra("scale", true);
getImage.putExtra("crop", "true");
getImage.putExtra("setWallpaper", false);

startActivityForResult(Intent.createChooser(getImage, "Select
Background Image"), 0x10);

Everything is working fine and a new image is generated from the
gallery except it looks like the image that comes back cropped is in a
lower quality format from the original image, like 16 bit color format
instead of 32 bit.

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

GWT i18n - locale set by property provider is not reflected at the client side

I am setting the locale value using the property provider( returns
value dynamically based on certain conditions). This class is called
every time the browser issues a new request. But the UI is not
rendered with the locale returned by the property provider. If the
property provider returns different values on each request, the value
returned for the first time by this class is used by GWT client side
code(onModuleLoad()).

If i use
LocaleInfo.getCurrentLocale().getLocaleName()

at the client code(onModuleLoad()), the first value returned by the
property provider is returned here.

Any help.

--
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: CakePHP and a normalized database

Clint,Thanks a lot! Your code worked and now I am able to retrieve
information from different tables within the User model.
Now, my next question would be. How would inserting data work? Does
cakephp take care of that automatically as well?
Thanks,
Luis
On Dec 30, 7:56 pm, Clint <ctf...@student.monash.edu> wrote:
> Hi, the following should help (for v1.3)
>
> It joins the User to the Person and then to the Address.. linking the rest of the tables should be similar.
>
> <?php
>
> class User extends AppModel {
>     var $name = 'User';
>
>     var $hasOne = array(
>         'Person' => array(
>             'className'    => 'Person',
>             'foreignKey'   => 'id',
>             'dependent'    => true,
>             ),
>         'Address' => array(
>             'className' => 'Address',
>             'foreignKey' => false,
>             'type' => 'LEFT',
>             'conditions' => array('Address.id = Person.address_id')
>             )
>         );
>
> }
>
> ?>
>
> If you use the foreignKey option when trying to link in Address, it tries to match the User.id to the Address.id, hence why I've set the condition instead. I was hoping that you could do nested 'hasOne' options, but doesn't seem so..
>
> Clint
>
>
>
>
>
>
>
> > Quick question, I have the following normalized MySQL database with
> > tables:
>
> > Users
> >  - id
> >  - username
> >  - password
> >  - person_id
>
> > People
> >  - id
> >  - firstname
> >  - lastname
> >  - address_id
> >  - email_id
>
> > Addresses
> >  - id
> >  - address
> >  - city_id
> >  - state_id
> >  - country_id
> >  - zipcode_id
>
> > Countries
> >  - id
> >  - country
>
> > I have been having problems setting the correct cakephp Model
> > relations between them. Actually, after reading the documentation I'm
> > not really sure if it's even possible to have this kind of databas
> > structure work with cakephp.
>
> > So far this is what I have:
> > Users - belongsTo/hasOne - People (person_id)
> > People - belongsTo/hasOne - Addresses (address_id)
> > Addresses - belongsTo/hasOne - Countries (country_id)
>
> > So, when I use the User model how can I have cakephp return everything
> > from the user's firstname, lastname, to the address including country
> > and states?
> > To make matters more difficult, how can I have cakePHP (using the
> > FormHelper) insert an user account that has the firstname and lastname
> > (this I already got working), and also the address, city, state and
> > country (this I can't figure it out)?
>
> > My issue is that the Countries table for example is related to the
> > Address table but not to the People table directly nor the Users table
> > directly.
>
> > Any help or guidance would be truly appreciated.
>
> > Thanks in advance.
>
> > --
> > Our newest site for the community: CakePHP Video Tutorialshttp://tv.cakephp.org
> > Check out the new CakePHP Questions sitehttp://ask.cakephp.organd 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 athttp://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: django-admin.py startproject will NOT work.

On Fri, Dec 30, 2011 at 4:04 PM, Chris Kavanagh <ckava3@gmail.com> wrote:
>>
>>   C:\python27\python C:\path\to\django-admin startproject foo
>>
>> or, if you have C:\python27 in the PATH, simply:
>>
>>   python C:\path\to\django-admin startproject foo
>>
>
> Thanks for the reply, however it didn't work. I get the exact same
> thing: "Usage: django-admin.py subcommand [options] [args]" with
> options below for help.
>

Try both, I think both of them should work.

BUT, that isn't the important part. The important part is abut you should
make sure you execute it with the Python interpreter.

Forget about trying to simple invoke django-admin (or django-admin.py)
as a standalone program.

Good luck.

--
Ramiro Morales

--
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[2]: [Rails] Conflicting libraries: jQuery.js & accordion.js

Friday, December 30, 2011, 7:09:08 PM, you wrote:

CW> On Fri, 2011-12-30 at 12:21 -0700, Ralph Shnelvar wrote:
>> I have a library conflict between jQuery.js & accordion.js
>>
>> The first line of accordion.js is
>>
>> $(document).ready(function() {
>>
>>
>> Firebug displays
>> $(document).ready is not a function
>>
>>
>> I have read http://docs.jquery.com/Using_jQuery_with_Other_Libraries. This link is an explanation of how to resolve the conflict.
>>
>>
>>
>> To that end I have in a partial haml file
>>
>> (function($) {
>> = javascript_include_tag 'accordion.js'
>> })(jQuery);
>>
>>
>> The rendered output is
>> (function($) {
>> <script src="/assets/accordion.js?body=1" type="text/javascript"></script>
>> })(jQuery);
>>
>>
>>
>> but I am still getting the
>> $(document).ready is not a function
>> error message.
>>
>>
>>
>> Is what I am trying to do even legal?
CW> ----
CW> sounds as if you tinkered with application.js or removed the reference
CW> to it completely and thus jquery isn't loaded at all.

Craig:

I modified accordion.js by wrapping it in
(function($) { ... })(jQuery);

And everything works.


If I don't do it, the text
(function($) {
})(jQuery);
ends up being displayed on the webpage as the 1st two lines. I didn't see it before.


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

Happy new year

Happy new year, Django users :-) !

--
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 will NOT work.

While looking for a solution, I found someone with a similar problem.
he thought there was a problem with the way Python Files are
associated. So I did what was suggested on the command line, using
"assoc.py" and ftype Python.File. What I got back is listed below. I
don't think this is right according to what the message said.
According to him, it should've returned ".py=Python.File" and
"Python.File="C:\Python25\python.exe" "%1" %*". . .Obviously mine was
different. Any suggestions???


C:\>assoc .py
.py=py_auto_file

C:\>ftype python.file
File type 'python.file' not found or no open command associated with
it.

--
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] Re: latitude / longitude / altitude / direction of photo/image-taken in metadata of android-camera ?

If you start the gps fix early on in the application, perhaps have an activity they go to before they take the picture, or, at least, let them know there is no GPS fix, then you can get the time to get that before they take the picture.

On Sat, Dec 31, 2011 at 8:56 AM, lbendlin <lutz@bendlin.us> wrote:
you're probably using network location which gives you the illusion of a quicker GPS fix. Switch that off, then start the camera app, and see how long it takes to get a real GPS fix. We're talking tens of seconds here.

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



--
"I know that you believe you understand what you think I said, but I'm not sure you realize that what you heard is not what I meant."
- Robert McCloskey

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

(GugukluhayaT) http://icine.blogspot.com/2011/12/mamta-mohan-das-engagement-photos.html

Mamta Mohan Das Engagement Photos Stills

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

3akarat.com - فرصه شقه 185م اللبينى الرئيسى

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

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

3akarat.com - للبيع شقه بشبرا مصر

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

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

3akarat.com - اراضي زراعية

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

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

Re: get current url as array

You should be able to get the data you need in $this->params.

Mike Karthauser
Brightstorm limited
Tel: 07939252144

On 31 Dec 2011, at 12:01, euromark <dereuromark@googlemail.com> wrote:

> any feedback?
> seems like this is a missing functionality.
>
> example:
> admin/authplugin/users/edit/2
>
> I would expect to find some router method to get
>
> $url = array(
> 'admin' => 1
> 'plugin' => 'authplugin'
> 'controller' => 'users'
> 'action' => 'edit'
> 2
> )
> for example
> maybe with Router::urlAsArray()
> which would be similar to the result of Router::parse() but it already
> contains the passed and named params as expected
> to easily adjust it before passing it to Html::url() or Html::link():
>
> $url[#] = 'somehash';
> or
> $url[] = 'somepassedparam';
> or
> $url['key'] = 'somenamedparam';
>
> echo $this->Html->link('Title', $url);
>
>
>
>
> On 28 Dez., 21:59, euromark <dereurom...@googlemail.com> wrote:
>> ...or for any url for that matter (for adding some named/pass params
>> etc)
>>
>> PS: I forgot
>> if (isset($urlParams['prefix'])) {
>> unset($urlParams['prefix']);
>> }
>>
>> On 28 Dez., 21:04, euromark <dereurom...@googlemail.com> wrote:
>>
>>
>>
>>
>>
>>
>>
>>> am I missing sth or is there no url() method etc for returning the
>>> current url as array?
>>> I only know this way:
>>
>>> $urlParams = Router::getParams(true);
>>> $urlParams = am($urlParams, $urlParams['named'],
>>> $urlParams['pass']);
>>> unset($urlParams['named']);
>>> unset($urlParams['pass']);
>>
>>> but it seems a little bit like overhead...
>>> does anyone know how to do that easier?
>>> maybe we should introduce Router::urlAsArray()
>>> with default NULL => return current ?
>
> --
> 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: get current url as array

any feedback?
seems like this is a missing functionality.

example:
admin/authplugin/users/edit/2

I would expect to find some router method to get

$url = array(
'admin' => 1
'plugin' => 'authplugin'
'controller' => 'users'
'action' => 'edit'
2
)
for example
maybe with Router::urlAsArray()
which would be similar to the result of Router::parse() but it already
contains the passed and named params as expected
to easily adjust it before passing it to Html::url() or Html::link():

$url[#] = 'somehash';
or
$url[] = 'somepassedparam';
or
$url['key'] = 'somenamedparam';

echo $this->Html->link('Title', $url);


On 28 Dez., 21:59, euromark <dereurom...@googlemail.com> wrote:
> ...or for any url for that matter (for adding some named/pass params
> etc)
>
> PS: I forgot
>         if (isset($urlParams['prefix'])) {
>                 unset($urlParams['prefix']);
>         }
>
> On 28 Dez., 21:04, euromark <dereurom...@googlemail.com> wrote:
>
>
>
>
>
>
>
> > am I missing sth or is there no url() method etc for returning the
> > current url as array?
> > I only know this way:
>
> >                 $urlParams = Router::getParams(true);
> >                 $urlParams = am($urlParams, $urlParams['named'],
> > $urlParams['pass']);
> >                 unset($urlParams['named']);
> >                 unset($urlParams['pass']);
>
> > but it seems a little bit like overhead...
> > does anyone know how to do that easier?
> > maybe we should introduce Router::urlAsArray()
> > with default NULL => return current ?

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

Django app for IP address lookup

Hi guys,

Just sharing a simple Django app that allows you to do IP address lookup:

Happy new year!

--
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: Managers of related fields

On Fri, 30 Dec 2011 19:37:54 -0800 (PST)
Daniel Kaplun <min@dvir.us> wrote:

> I have Articles that refer to Authors using
> ForeignKey(related_name='articles'). Given an Author author, I'd like
> to be able to use the default manager for author.articles, but I'd
> also like to have author.published_articles, using a custom manager.
> Is this possible?

At the moment, this is not possible, as Django always uses the default
manager when doing the reverse lookup on foreign keys (as well as when
doing lookups in many-to-many relations).

However, there is a patch currently pending review in ticket #3871 [1]
which makes it possible to select which manager instead of the default
manager is used in these lookups.


As I wrote the last iteration of this patch myself, I cannot review it
myself. If you feel confident, please have a look at it and mark it as
"ready for check-in" if you think it is.

Otherwise please head over to <django-developers@googlegroups.com> and
present your use-case there, hopefully finding somebody who can take a
look at the latest progress in ticket #3871.

Regards,
Sebastian.

[1] https://code.djangoproject.com/ticket/3871

--
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] Daily Routine

+1 to "whenever" gem for the exact reasons benjamin points out.

Gautam Pai

On Sat, Dec 31, 2011 at 12:45 AM, Benjamin Iandavid Rodriguez <ian.rgz@gmail.com> wrote:
You also might want to have a look at the Whenever gem it provides neat syntax all done with ruby and integrates well with capistrano.

https://github.com/javan/whenever

Hope this helps!


2011/12/30 Peter Hickman <peterhickman386@googlemail.com>
That way the crons can also be maintained when you use capistrano and
they will be deployed to new machines if needed. It makes a great deal
of sense to bundle the application specific crons with he application
itself.

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


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

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

Can  any one please explain
 I am trying to make.apk for Galaxy Tab in that it takes images from  drawable-large  folder but still  in emulator  image size is very small, why images are not in  proper size.

--
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: DebugKit Toolbar - core processing (derived)

Turn debug off, check if Cake caches files in app/tmp

--
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: A question regarding AsyncTask

How about using publishProgress() and onProgressUpdate() to notify the user? You may already be using it to keep the user updated to the progress of the download, but seems to me you could use it to let them know about post-download processing too.

String

--
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: Obsolete proguard file

proguard is some type of 3rd party file for version checking or
similar.
I normally ignore them or just delete them.

On Dec 31, 5:38 am, bob <b...@coolfone.comze.com> wrote:
> Can someone explain in a nutshell what this means?
>
> Obsolete proguard file; use -keepclasseswithmembers instead of -
> keepclasseswithmembernames

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

Friday, December 30, 2011

{smartbroker} SPRINGS TYPE 4 MIDDLE FOR RENT

FOR RENT
SPRINGS
TYPE 4 MIDDLE (2BR+STUDY) BACK TO BACK, READY GARDEN
SEMI EQUIPPED KITCHEN
RENT= 85,000/- ONLY
CONTACT CALL OR SMS
+971558472210


--
*For Further Inquires Please Don't Hesitate to Call
Best Regards*
*Qazal Arsalan*
*Property Consultant
*
*Mobile: / +971 55 8472210 *

*Note:
(Prices & Availabilities may change without any Notification)*

--
member of
(almadani real estate - abu dhabi)-to join send email to
{saifemail@yahoo.com}

[android-developers] Re: Android unit testing with ContentProviders and databases

I guess you gave the obvious answer yourself: Don't hardcode the name.
Use a variable, maybe a system setting or something from a config file
that can be accessed by all your apps and put an if/else block in your
provider....

Greetings from Berne,
Stephan

On 31 Dez., 01:05, barry <barry.drinkwa...@gmail.com> wrote:
> I have an app that uses a ContentProvider to serve data instead of
> directly accessing the database. The application is working as
> expected but I have a problem with unit tests: how can I force the
> ContentProvider to use a test database rather than a 'live' one? If I
> wasn't using a ContentProvider I could pass a different database name
> to the Constructor of my `SQLiteOpenHelper` sublass, but now the
> database is created with a call to onCreate() in my ContentProvider:
>
>         @Override
>         public boolean onCreate()
>         {
>                 UKMPGDataProvider.init(getContext(), Constants.DATABASE_NAME);
>                 return (UKMPGDataProvider.getWritableDatabase() == null) ? false :
> true;
>         }
>
> As you can see, the database name is hardcoded.
>
> Is there a way to pass a test name into the ContentProvider?

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

google form filling
http://gsonlinejobs.yolasite.com/

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

Re: Misfiring signal handler

If you can create a self-contained small example project which does
this, it would make it much easier to debug this. I don't know why the
signal misfired, and I don't see a way that it could misfire. So,
without some ability to reproduce this it is hard to help.

- Anssi

On Dec 30, 5:40 pm, Jay Wineinger <jay.winein...@gmail.com> wrote:
> Hey guys,
>
> I have an odd problem where a post_save signal handler is getting
> called from a class different than what I specified as the sender.
> The code is athttp://dpaste.com/hold/679348/and also below for when
> the pastebin is deleted.
>
> I'm connecting the rating_denormalizer() function to the post_save
> signal of the Rating model.  However, when I visit the site with a
> fresh browser a new Session is created and for some reason, this
> signal handler is called with a Session instance.
>
> I was able to fix this by moving this code from users/signals.py to
> bars/signals.py, directly importing Rating instead of using get_model,
> and moving the AppUser import inside rating_denormalizer().  However,
> I still would like to figure out why this was happening.
>
> # users/signals.py
> from django.db.models.signals import post_save
> from django.db.models import F, get_model
>
> Rating = get_model('bars','Rating')
> AppUser = get_model('users','AppUser')
>
> def rating_denormalizer(sender, instance, created, **kwargs):
>     """
>     Post-save signal handler on Rating to keep the denormalized fields
> on
>     AppUser up-to-date
>     """
>     if created:
>         AppUser.objects.filter(pk=instance.user_id).update(
>             rating_count=F('rating_count') + 1,
>             last_rating=instance.created,
>         )
> post_save.connect(rating_denormalizer, sender=Rating,
> dispatch_uid='rating_denormalizer')
>
> # Get a 500 error when going to /admin/ with a fresh browser
> 2011-12-27 16:45:07,608 ERROR Internal Server Error: /admin/
> Traceback (most recent call last):
>   File "/var/www/python/myapp/lib/python2.6/site-packages/django/core/
> handlers/base.py", line 178, in get_response
>     response = middleware_method(request, response)
>   File "/var/www/python/myapp/lib/python2.6/site-packages/django/
> contrib/sessions/middleware.py", line 36, in process_response
>     request.session.save()
>   File "/var/www/python/myapp/lib/python2.6/site-packages/django/
> contrib/sessions/backends/db.py", line 63, in save
>     obj.save(force_insert=must_create, using=using)
>   File "/var/www/python/myapp/lib/python2.6/site-packages/django/db/
> models/base.py", line 460, in save
>     self.save_base(using=using, force_insert=force_insert,
> force_update=force_update)
>   File "/var/www/python/myapp/lib/python2.6/site-packages/django/db/
> models/base.py", line 570, in save_base
>     created=(not record_exists), raw=raw, using=using)
>   File "/var/www/python/myapp/lib/python2.6/site-packages/django/
> dispatch/dispatcher.py", line 172, in send
>     response = receiver(signal=self, sender=sender, **named)
>   File "/var/www/python/myapp/App/users/signals.py", line 13, in
> rating_denormalizer
>     AppUser.objects.filter(pk=instance.user_id).update(
> AttributeError: 'Session' object has no attribute 'user_id'

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


Real Estate