Give a broom to anyone who completes 10 close queue reviews successfully
in a 24 hour period – meta.stackoverflow.com
Remember Winter Bash? How fun was that? I propose that we give a virtual
broom to everyone who completes 10 reviews in any 24 given hour period.
The broom would only last for 24 hours, so to keep …
Monday, 30 September 2013
How to check that cache is working on current page=?iso-8859-1?Q?=3F_=96_drupal.stackexchange.com?=
How to check that cache is working on current page? –
drupal.stackexchange.com
Some modules silently turn off caching on certain pages. How is the
easiest way to check that this is the case and also identify problematic
module?
drupal.stackexchange.com
Some modules silently turn off caching on certain pages. How is the
easiest way to check that this is the case and also identify problematic
module?
Oracle forms migrated from 10g to 11g
Oracle forms migrated from 10g to 11g
Once exported from oracle 10g to 11g, It is saying some java beans are
missing in the form. Is there something we need to change the FORM beans
path in new version.If not, Where are we mentioning the path for java
beans in reports.
Once exported from oracle 10g to 11g, It is saying some java beans are
missing in the form. Is there something we need to change the FORM beans
path in new version.If not, Where are we mentioning the path for java
beans in reports.
How to populate select options dynamically from Model Collection
How to populate select options dynamically from Model Collection
I have a model as defined below class Colors extends Backbone.Model name:
-> [@get("name")] value: -> [@get("value")]
Collection as defined below class @ColorsCollection extends
Backbone.Collection model: Colors
Select tag as define below %select{name: "colorslist" type: "hidden"
value: "" }
Upon an event, I want to dynamically populate the colors select options
with data fetched from ColorsCollection.
I have been looking into select2 documentation but unable to find any
relevant examples.
I have a model as defined below class Colors extends Backbone.Model name:
-> [@get("name")] value: -> [@get("value")]
Collection as defined below class @ColorsCollection extends
Backbone.Collection model: Colors
Select tag as define below %select{name: "colorslist" type: "hidden"
value: "" }
Upon an event, I want to dynamically populate the colors select options
with data fetched from ColorsCollection.
I have been looking into select2 documentation but unable to find any
relevant examples.
Sunday, 29 September 2013
Issues in django deployment with two subdomains using Apache auth
Issues in django deployment with two subdomains using Apache auth
I'm deploying a Django 1.5 with two sites, each one is independent from
the other one (each one has its own database), but these two sites are
subdomains: one is new.mydomain.com and the other dev.mydomain.com. I'm
using Apache with mod_wsgi.
The problem is: I'm Authenticating against Django's user database from
Apache correctly, but when I try to use Django groups with the Apache
authentication I get the following situation:
I can login to one of the subdomains e.g. new without problems, but if I
try to login to the other one (dev) I can't. Apache says that the user
isn't in the allowed groups. Then if I restart Apache and try to login to
dev (which was impossible before) then there is no problem here, but now
it's impossible to login with the other subdomain new!
To sum up: I can't login to the two sudomains at the same time, no matter
which (allowed) users I use.
The virtualhost for new subdomain is (the other one looks like this one
changing paths):
<VirtualHost *:80>
ServerName new.mydomain.com
ServerAlias www.new.mydomain.com
ServerAdmin caumons@gmail.com
Alias /robots.txt
/var/www/sites/master/EurekaStart.git/EurekaStart/robots.txt
Alias /favicon.ico
/var/www/sites/master/EurekaStart.git/EurekaStart/static_collected/img/favicon.ico
Alias /static/
/var/www/sites/master/EurekaStart.git/EurekaStart/static_collected/
<Directory
/var/www/sites/master/EurekaStart.git/EurekaStart/static_collected>
Order deny,allow
Allow from all
</Directory>
Alias /media/ /var/www/sites/master/EurekaStart.git/EurekaStart/media/
<Directory /var/www/sites/master/EurekaStart.git/EurekaStart/media>
Order deny,allow
Allow from all
</Directory>
WSGIDaemonProcess eureka-startups.com
python-path=/var/www/sites/master/EurekaStart.git:/var/www/sites/master/EurekaStart.git/env/lib/python2.7/site-packages
WSGIProcessGroup eureka-startups.com
WSGIScriptAlias /
/var/www/sites/master/EurekaStart.git/EurekaStart/wsgi.py
<Directory /var/www/sites/master/EurekaStart.git/EurekaStart>
<Files wsgi.py>
Order deny,allow
Allow from all
</Files>
</Directory>
<Location "/">
AuthType Basic
AuthName "Enter your guest user & password"
Require group guest
Require valid-user
AuthBasicProvider wsgi
WSGIAuthUserScript
/var/www/sites/master/EurekaStart.git/EurekaStart/wsgi.py
WSGIAuthGroupScript
/var/www/sites/master/EurekaStart.git/EurekaStart/wsgi.py
</Location>
ErrorLog /var/www/sites/master/EurekaStart.git/logs/apache/error.log
TransferLog /var/www/sites/master/EurekaStart.git/logs/apache/access.log
</VirtualHost>
The wsgi.py file for new subdomain looks like (the wsgi file for dev is
exactly like this one):
import os
import sys
from django.core.handlers.wsgi import WSGIHandler
# We need to add the site's root path to sys.path when using Django
Authentication for WSGI
SITE_PKG_PATH = os.path.abspath(os.path.dirname(__file__))
SITE_ROOT_PATH = os.path.abspath(os.path.join(SITE_PKG_PATH, '..'))
sys.path.append(SITE_ROOT_PATH)
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "EurekaStart.settings")
# This import MUST be done after setting `DJANGO_SETTINGS_MODULE`
import django.contrib.auth.handlers.modwsgi as modwsgi
def check_password(environ, user, password):
return modwsgi.check_password(environ, user, password)
def groups_for_user(environ, user):
return modwsgi.groups_for_user(environ, user)
application = WSGIHandler()
I'm deploying a Django 1.5 with two sites, each one is independent from
the other one (each one has its own database), but these two sites are
subdomains: one is new.mydomain.com and the other dev.mydomain.com. I'm
using Apache with mod_wsgi.
The problem is: I'm Authenticating against Django's user database from
Apache correctly, but when I try to use Django groups with the Apache
authentication I get the following situation:
I can login to one of the subdomains e.g. new without problems, but if I
try to login to the other one (dev) I can't. Apache says that the user
isn't in the allowed groups. Then if I restart Apache and try to login to
dev (which was impossible before) then there is no problem here, but now
it's impossible to login with the other subdomain new!
To sum up: I can't login to the two sudomains at the same time, no matter
which (allowed) users I use.
The virtualhost for new subdomain is (the other one looks like this one
changing paths):
<VirtualHost *:80>
ServerName new.mydomain.com
ServerAlias www.new.mydomain.com
ServerAdmin caumons@gmail.com
Alias /robots.txt
/var/www/sites/master/EurekaStart.git/EurekaStart/robots.txt
Alias /favicon.ico
/var/www/sites/master/EurekaStart.git/EurekaStart/static_collected/img/favicon.ico
Alias /static/
/var/www/sites/master/EurekaStart.git/EurekaStart/static_collected/
<Directory
/var/www/sites/master/EurekaStart.git/EurekaStart/static_collected>
Order deny,allow
Allow from all
</Directory>
Alias /media/ /var/www/sites/master/EurekaStart.git/EurekaStart/media/
<Directory /var/www/sites/master/EurekaStart.git/EurekaStart/media>
Order deny,allow
Allow from all
</Directory>
WSGIDaemonProcess eureka-startups.com
python-path=/var/www/sites/master/EurekaStart.git:/var/www/sites/master/EurekaStart.git/env/lib/python2.7/site-packages
WSGIProcessGroup eureka-startups.com
WSGIScriptAlias /
/var/www/sites/master/EurekaStart.git/EurekaStart/wsgi.py
<Directory /var/www/sites/master/EurekaStart.git/EurekaStart>
<Files wsgi.py>
Order deny,allow
Allow from all
</Files>
</Directory>
<Location "/">
AuthType Basic
AuthName "Enter your guest user & password"
Require group guest
Require valid-user
AuthBasicProvider wsgi
WSGIAuthUserScript
/var/www/sites/master/EurekaStart.git/EurekaStart/wsgi.py
WSGIAuthGroupScript
/var/www/sites/master/EurekaStart.git/EurekaStart/wsgi.py
</Location>
ErrorLog /var/www/sites/master/EurekaStart.git/logs/apache/error.log
TransferLog /var/www/sites/master/EurekaStart.git/logs/apache/access.log
</VirtualHost>
The wsgi.py file for new subdomain looks like (the wsgi file for dev is
exactly like this one):
import os
import sys
from django.core.handlers.wsgi import WSGIHandler
# We need to add the site's root path to sys.path when using Django
Authentication for WSGI
SITE_PKG_PATH = os.path.abspath(os.path.dirname(__file__))
SITE_ROOT_PATH = os.path.abspath(os.path.join(SITE_PKG_PATH, '..'))
sys.path.append(SITE_ROOT_PATH)
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "EurekaStart.settings")
# This import MUST be done after setting `DJANGO_SETTINGS_MODULE`
import django.contrib.auth.handlers.modwsgi as modwsgi
def check_password(environ, user, password):
return modwsgi.check_password(environ, user, password)
def groups_for_user(environ, user):
return modwsgi.groups_for_user(environ, user)
application = WSGIHandler()
Using Parse.com to retrieve a new array iOS
Using Parse.com to retrieve a new array iOS
I'm trying to use the parse.com data browser to inset a new string array
into my code.
So if I've got a code with an array of @"blue", @"yellow", @"black", nil
then how can I change it to @"white", @"gold", @"brown", nil ?
In the app, I have the user press a button and one of said string value
appears at random. I would like to put a new array on a backend to have
new values so that I don't have to update the app every time.
Is there an example of how to do this? I haven't been able to get the Data
Browser to replace the array in my code with the array in the data
browser.
I've got:
PFQuery *query = [PFQuery queryWithClassName:@"colorArray"];
self.colors = [query findObjects];
But it crashes when I try to retrieve the values of the array when it gets
to this part of the code in a later method -
NSUInteger index = arc4random_uniform(self.colors.count];
self.colorLabel.text = [self.colors objectAtIndex:index];
self.colors, by the way, is synthesized from the header file as an array.
It looks like the code doesn't understand the "index" part of the equation
when it tries to set the self.colorLabel.text using the obectAtIndex
Am I doing this right? Thanks for any help anyone can give.
I'm trying to use the parse.com data browser to inset a new string array
into my code.
So if I've got a code with an array of @"blue", @"yellow", @"black", nil
then how can I change it to @"white", @"gold", @"brown", nil ?
In the app, I have the user press a button and one of said string value
appears at random. I would like to put a new array on a backend to have
new values so that I don't have to update the app every time.
Is there an example of how to do this? I haven't been able to get the Data
Browser to replace the array in my code with the array in the data
browser.
I've got:
PFQuery *query = [PFQuery queryWithClassName:@"colorArray"];
self.colors = [query findObjects];
But it crashes when I try to retrieve the values of the array when it gets
to this part of the code in a later method -
NSUInteger index = arc4random_uniform(self.colors.count];
self.colorLabel.text = [self.colors objectAtIndex:index];
self.colors, by the way, is synthesized from the header file as an array.
It looks like the code doesn't understand the "index" part of the equation
when it tries to set the self.colorLabel.text using the obectAtIndex
Am I doing this right? Thanks for any help anyone can give.
ORA-00902: invalid datatype
ORA-00902: invalid datatype
I am getting the above error when I run the following query
create table customer (
cust_fname varchar2(15) NOT NULL,
cust_lname varchar2(15) NOT NULL,
cust_id number(9,0) NOT NULL,
address varchar2(40) NOT NULL,
city varchar2(14) NOT NULL,
postal_code number(6,0) NOT NULL,
country varchar2(14) NOT NULL,
phone_no number(12,0) NOT NULL,
e-mail varchar2(30) NOT NULL,
password varchar2(10) NOT NULL,
primary key(cust_id),
check(e-mail like '_%@_%._%')
);
Please tell what is the problem.
I am getting the above error when I run the following query
create table customer (
cust_fname varchar2(15) NOT NULL,
cust_lname varchar2(15) NOT NULL,
cust_id number(9,0) NOT NULL,
address varchar2(40) NOT NULL,
city varchar2(14) NOT NULL,
postal_code number(6,0) NOT NULL,
country varchar2(14) NOT NULL,
phone_no number(12,0) NOT NULL,
e-mail varchar2(30) NOT NULL,
password varchar2(10) NOT NULL,
primary key(cust_id),
check(e-mail like '_%@_%._%')
);
Please tell what is the problem.
Subscribe to:
Posts (Atom)