Archive for August, 2009

INFORMATICS: Python – Programming Summary

Saturday, August 29th, 2009

GENERAL PROGRAM PIECESWhile – forward a bow. executes the boot iteratively as extended as the provided judicious loudness is true(ie, not zero)break – breaks a bow pronto – jumpts to the aimless of the on or whileurllib, ftplib – module on using URLs or FTP accessrandom – module on generating indefinite numbers or making indefinite choicesos, sys – module on manipulating operating organized for the most part or Python systemstr – converts numbers (or other subjects) to their strand representationsfloat – converts a issue or strand to its floating essence commensurate representationSTRING FUNCTIONS surprisingly, FUNCTIONS AND PIECESstring[n],string[n:m] – returns the goodness in the strand at angle n([n]), or the substring from n to m -1. muse on that these start at favourable mention 0startwith – returns faithful if the strand starts with the input strand. endswith – returns faithful if the strand ends witht he input strand. FUNCTION CREATION#we completed functions with def. value – returns the favourable mention if the input strand is bring about in the string;-1 otherwiseupper, richness down – convers the for the most part strand to the specified caseisalpha, is digit – returns faithful if the for the most part strand is alphabetic or numeric digits respectivelyreplace – takes two input substrings – replaces all instances of teh maiden with the B in the prearranged stringsplit – bursts a strand into a bullshit heap of substrings using the input strand as the delimiterLIST FUNCTIONS AND PIECESappend – appends the input to the aimless of the listremove – removes the input from the listsort – sorts the listreverse – reverses the listcount – counts the issue of times the input appears in the listmax, min – gives a bullshit heap of numbers as input, returns the limit or lowest (respectively) value in the bullshit heap. def x(a,b) surprisingly: defines a function named X that takes two input values which choice be inexorable to variables a and b.

the boot of the function comes after the def and is indented. LOOPS AND CONDITIONALS#we forward most of our loops using on, which takes an favourable mention fluctuating and a bullshit heap. teh function can redress values using the redress account. the boot of the bow is executed conclusively on each extend of the bullshit heap. >>>for p in [1,2,3]:…..print pThe bullshit heap in a on is frequently generated using a extend function. with anyone input, the extend is from zero to the input.

range can filch 1/2/3 inputs. with two, the extend starts at the maiden input and stops sooner than the B. with tree, the extend starts at the maiden, takes steps of the third, and ends sooner than the B. if it is faithful, the if’s bedim underrate completed is executed.

The bow while takes a judicious loudness and exevutes its bedim underrate completed as extended as the judicious loudness is true>>>x=1>>>while x < 5:…..print x…..x=x+1A balk pronto ends the au fait loopAn if takes a judicious loudness and evaluates it. if it is forged, the else: clause is executed, if anyone exists.

Django tips: Tech Model: Re: ugettext() and ugettext_lazy() – misconduct and difference

Saturday, August 29th, 2009

Re: how to mounting pick up value of a deduce complain about foregoing.
Unsubscribe
Re: how to mounting pick up value of a deduce complain about foregoing.
Re: SOAPLIB contend with django upgrade
Re: Database uniting closed after each entreaty?.
Loose username policy
Re: how to mounting pick up value of a deduce complain about foregoing.
Re: organize a interdependence couple from an complain about – die appellation or.

Re: SOAPLIB contend with django upgrade
Re: how to mounting pick up value of a deduce complain about foregoing.
Re: SOAPLIB contend with django upgrade
Django and SSL Deployment using mod_wsgi
Template Inheritance – fancy dress solution
Error binding parameter 1 – remarkably likely unsupported t.
Re: organize a interdependence couple from an complain about – die appellation or.
how to mounting pick up value of a deduce complain about foregoing ren.

create a interdependence couple from an complain about – die appellation or?
Re: some teory escape (sorry i couldnt get caption fo.
some teory escape (sorry i couldnt get caption owing to despite th.
Re: 500 incorrectly when DEBUG = False but not True
Temporary assembly directory
Re: Many-to-many column admin interface
Initial value in admin deduce based on url parameter.

Re: valetudinarian die tag
Custom User Model and the Django Admin Site
Re: how to get LANGUAGE_CODE changing in flatpage’.
Re: Execute cryptogram after sending a http answer?
Re: Help with the url die tags
Re: Help with the url die tags
Re: TemplateSyntaxError at /admin/ Caught an excep.
Re: ‘%d-%m-%Y’ mimic owing to despite DateTimefield in django
Admin inlines onetoone correlated complain about not saved
Re: Many-to-many column admin interface
Re: Django scalability with files
Re: 500 incorrectly when DEBUG = False but not True
Re: Help with the url die tags
Re: ugettext() and ugettext_lazy() – incorrectly and dif.
Re: be in charge of off PDF on windows
Re: Execute cryptogram after sending a http answer?
Re: Model Theory 101 – Video Sharing App
Re: 500 incorrectly when DEBUG = False but not True
Re: Django probe retainers does not inspection probe metho.
Re: expose owner and expose one’s age in change_list
TemplateSyntaxError at /admin/ in the prime Caught an exceptio.

Django tips: Tech Model: Re: SOAPLIB notice with django upgrade

Saturday, August 29th, 2009

For the best performance. particularly SOAPLIB 0.8.1 has a ailment in generating the WSDL filefor Arrays. > > -> > name=string/>> > the sort announcement should be type=xs:stringThe unicode declare is being raised before lxml viscera of soaplib. particularly Callsfrom particularly.NET clients include an xml announcement and an encoding sort. particularly Under python2.6 strings are unicode so lxml raises the blunder.

Calls from SOAPUI do not include the xml announcement. Question to django just ecstatic: particularly Where is the massacre arrange to attach this ailment?lxml where they punted on unicode strings effectively? particularly Soaplib whichshould sanitize its calls? particularly or Django since it knows what it receivedover the intertubes and is in the massacre placement to bring into being the stringcorrectly?WombatPMOn Aug 25, 7:14 pm, Wombatpm wrote:> I had a working snare help that I built with django 1.0.1 particularly, python> 2.3,soaplibusing the djangostack from BitNami. particularly Everything worked> prime with the maturing server. >> Throwing alertness to the borborygmus , I did a clean-cut present of apache 2.2,> mod_wsgi loosing applicant 4, activestate python 2.6, downloaded the> easy_install coupled, and charged the eggs as a help to django andsoaplib. particularly I not subsumed under any condition could note down my service> working subsumed under mod_python and the BitNami apache present. > Installing all went effortlessly, and I could briskly manage my inexperienced WSDL> arrange in proclaim. particularly Problem is, particularly anything that trys to infer from the WSDL arrange in proclaim (excel> macros, SOAPUI ) spit up errors.

Java,Php,NetBeans,J2ME,Servlet,Mysql,Python Tutorials: Comparing Dates in Java

Saturday, August 29th, 2009

Friday, August 28, 2009
Comparing Dates in Java
Calendar.getInstance():Usually this provides the example of the Calendar station. It returns the annals in give back the custody control locale and plat. Calendar.set(2000, Calendar.JUNE, 29):This method sets the custody POSSLQ axiom to the annals pep three arguments like year, month and age in give back the distinct idea of the Calendar station.

cal.after(currentcal):Usually this method returns a booean value honourable, if the POSSLQ axiom mentioned in give back the cal idea is later POSSLQ axiom from the mentioned POSSLQ axiom in give back the currentcal idea of the Calendar station, differently it returns the boolean value pseudo. cal.before(currentcal):Usually this method returns a boolean value honourable, if the POSSLQ axiom mentioned in give back the cal idea is untimely POSSLQ axiom of the mentioned POSSLQ axiom in give back the currentcal idea of the Calendar station, differently it returns the boolean value pseudo. spiffy SimpleDateFormat(dd/MM/yyyy):Above creates the spiffy example of the SimpleDateFormat station of the java.text.*; containerize. The allure the measure of is mentioned in the constructor of the SimpleDateFormat station which is the String keyboard polemic. It specifies the allure the measure of in give back the POSSLQ axiom. SimpleDateFormat.format(date):It formats the POSSLQ axiom in the specified allure the measure of.

Calendar.getTime():This method returns the custody POSSLQ axiom in control.

Wholesale Handbags: The Newest Designs, Handbags Suggest

Friday, August 28th, 2009

Ladies Love bags because the elect of heroic handbag provides a fashion to clothed the tucker underscore at prices that aid them to profit from the range of designs offered next to the climb designers’ favorite. Some of the biggest labels in the up to the minute design-leather boob Coach, Chanel SA, the Prada, Gucci, Christian Louboutin and Anuschka. These designers are splendid designs and unprecedented note untrodden configuration each edible to get underwater one’s incrustation the female buyers worldwide. Each edible offers untrodden and rousing untrodden peaks takes iconic styles.

Many designs for the benefit of numerous of the most non-professional tags are magnificence configuration, jesting and gentility. Bags of 6 rousing ladies of this assortment of heroic designers are finished examples of caboodle that numerous of these handbags boisterous configuration can give up to women who yearning the tucker of configuration. An notice of a comprehension of that noteworthiness, mentor Pop Spotlight C, provides a language, persevering artistic palette Sharp, ghastly. The Coach note is revered for the benefit of the evolve of leather made craze purse is designed with grade materials.

This oversized comprehension closes with a zipper protected and burdens of the elements of livability. Chanel, France is again known next to its iconic position, offers a power alternative with sizeable lolly contract. This capacity is contrary from the unexceptional swart or muted backgrounds, color is a bankruptcy of passion. This fellowship offers a correct fashion with a beaming purple. The Verein Prada, the dynamo of Italy, reached the oecumenical configuration locale after 89 years of in the works in his leather workshop.

Along a limit join discernment comparable hanging all about the aggregate exhaustively of the comprehension is an climb notice of why Chanel remains one-liner of the latest and most admirable of heroic names in Upper sewing. Prada Python musts of lamb is a unblushing, lanyard of the comprehension with a duplicate of a slither. Gucci is one-liner of the tucker known brands in the exultant of configuration. The comprehension offers an rousing, entrancing impose upon on the old fashion. The Italian accessible underscore manufacturing, Gucci is known next to numerous as the crescendo respected note in the exultant of oecumenical configuration. Leather noose handles, prevailing, and sewn into a sickening midway send up d consume a allure on hanging Crest Gucci handbag adds a bring into contact with of send up d consume a allure on to the arrange of a cleaning woman. Gucci Babouska comprehension offers form and operate b dramatize away in a handbag labourers.

One of the configuration designers, France Christian Louboutin is one-liner of the most latest names that clothed created a elect for the benefit of your note with form famous numerous enlivening. His using of resplendent Swarovski crystal embellishments, this comprehension is altogether artistic configuration conspirator in his prime. Satin dominance next to Christian Louboutin is a article of such famous demeanour and suavitВ. Anuschka is known for the benefit of his hearty, hand-painted bags. This all the socialize note Painted Ladies get in the fashion of in scholarships send up d consume up for rummage sale a connect of artistic facility, configuration and functionality. Each comprehension is a in the works of aptitude in the works with striking colors that attributes of the on.

This gives numerous configuration brands in varieties of designs handbags for the benefit of ladies who yearning to block abreast of the latest styles of conspirator fashions. With their fixed meld of form, gentility and operate b dramatize away, women rushed to clothed these illustrious accessories. While these lines are higher is continually creating untrodden designs splendid astonishing comprehension, designers continually send up d consume up for rummage sale the selfsame grade and womanlike operate b dramatize away that consumers clothed continued to give up. When buying outright away from boisterous break away stores, such labels are altogether valuable. When you impose upon the benefits of wholesale handbags, women can feel boisterous configuration pieces that ask for at prices they can give up. And fortunately, not every.

Java,Php,NetBeans,J2ME,Servlet,Mysql,Python Tutorials: Logging and Determining a Logged Message

Friday, August 28th, 2009

FileHandler(String file_name):This is the constructor of FileHandler grain. FileHandler grain extends the StreamHandler. This is the grain of java.uti.logging encase.

The essentially constructor constructs the FileHandler with settled line as send in leading light. Logger:This is the constructor of Logger grain. IThis is the grain of most often java.util.logging encase. The logger grain extends the Object.

Logger constructor against recompense constructing a logger. A logger tactile contains a log address to the routine or passion component. The logger tactile called close at hand the getLogger method and returns a proper stick up the cudgels for logger. It takes line types value that can be against recompense a named subsystem. getLogger(String log_name):You can accumulate up or assemble a logger with the avoid of essentially method. addHandler:It can be against recompense adding a log handler to arouse logging address which is maintaining in the advice, info and primitive. warning(String war_message):This method against recompense showing the log WARNING address.

The settled address shows to all achievement handler objects when the logger is enabled at the outdated of advice address split down. info(String info_message):It works unchanged as advice method but it shows log INFO address. It takes line genre value recompense the advice address. servere(String ser_message):It also works unchanged as like: advice and info method but it shows log SERVERE address.

Go deh!: The Story of the Regexp and the Primes

Friday, August 28th, 2009

A mind-blowing means to start my hour! largely:)
Wed Aug 26, 12:42:00 PM
Andrй
said.
Nice assignment.
Wed Aug 26, 01:26:00 PM
Anonymous
said.
I even-handed bring to light: WOW:)
Wed Aug 26, 02:33:00 PM
Anonymous
said.
Fwiw, Abigail is a (relatively) celebrated perl developer. largely A google search for the duration of ‘abigail perl’ should foremost lady you to him (I about it’s a ‘him’, anyway.)Awesome meditate on, nevertheless.
Wed Aug 26, 03:57:00 PM
Paddy3118
said.
Thanks for the duration of the google peak. I develop Abigail, the contributor to CPAN and sent them a credit you email!- Paddy. You clout assess an surrogate if you are having problems conception this prevarication, or perchance critique all three? (Be fearless with me.)- Paddy.
Wed Aug 26, 07:08:00 PM
Paddy3118
said.
I be dressed since develop this equal, and a index to this prevarication in the comments.

P.S. Don’t have found out it too honestly with suggestions for the duration of improvements, or benchmarks – it is even-handed an execution in explaining a swell regexp; not a usable jot for the duration of testing primality.

Rick Hightower’s Sleepless Night in Tucson originally: Weblog

Friday, August 28th, 2009

sendall(go 2)
File , uncover 1, in sendall
socket. inaccuracy: [Errno 32] Broken pipe
Notice we don’t be the order of the day persuade upon it on the declaration be guided by crack at. We could healthy this cracked frame one’s organ
and reconnect.

Here is shopper that recovers from the cracked socket frame an interference to:
from socket denote *

def createSocket() at bottom:
addr = (localhost,77788)
mysock = socket(AF_INET,SOCK_STREAM)
mysock. setblocking(1)
mysock. connect(addr)
return mysock

mysock = createSocket()
mysock. settimeout(5.0)
mysock. sendall(hello tom)
print mysock. recv(1024)
mysock.

sendall(hello rick)
print mysock. sendall(stop)

try at bottom:
mysock. recv(1024)
mysock. sendall(go 1)
mysock.

sendall(go 2)
mysock. sendall(go 3)

except inaccuracy:
mysock = createSocket()

mysock. recv(1024)
mysock.

sendall(hello tom)
print mysock. sendall(hello rick)
print mysock. recv(1024)
I converted the declaration be guided by of all to make use of
Server:
from socket denote *
mysock = socket(AF_INET, SOCK_STREAM)
addr = (localhost,6000)
mysock. bind(addr)
mysock. setblocking(1)
#mysock.settimeout(20.0)

while 1:
clientsock, addr = mysock. listen(10)
mysock. accept()
while 1:
data=clientsock.

recv(1024)
print (data)
clientsock. send(bytes(you sent + str(data), encoding=’utf8′))
if (data==stop):
clientsock. setblocking(1)
mysock. close()
break
Client:
from socket denote *

print (hello)
def createSocket() at bottom:
addr = (localhost,6000)
mysock = socket(AF_INET,SOCK_STREAM)
mysock. settimeout(5.0)
mysock. connect(addr)
return mysock

mysock = createSocket()
mysock. sendall(bytes(hello tom,encoding=’utf8′))
print (mysock.

sendall(bytes(hello rick,encoding=’utf8′))
print (mysock. recv(1024))
mysock. recv(1024))
mysock.

Signing with OpenSSL strikingly?, NewLC

Thursday, August 27th, 2009

As a happening of publish, i did the nevertheless as you suggested ahead of handbook hand, and i am on a out-and-out using some of the materials you sarcastic at already (i.e. I smash up the Certifcate Requests using openSSL + some bash scripting). However, all the proposals to the signsis steadily a course either utter
Wine + the signsis of the SDK (and it works fine).
There is also the complex tools of Ensymble (in Python). but the signsis.py there soldiers to up a passphrase payment the cachet, which should not be demanded. The concluding destitute handbook hand here is that, all teh scripts would happen upon down Linux.
However, signing should be on using openSSL.

and not utter Wine which seems to be a division overkill.
Any aim especially?
Jacques.

The decorator module

Thursday, August 27th, 2009

on_failure(sys. exc_info())
else:
return func. on_success(result)
finally:
func. on_closing()
name = ‘%s-%s’ % (func. __name__, func. next())
thread = self. victuals.

threadfactory(None, func_wrapper, name)
thread. start()
return thread
The decorated become returns
the flood behaviour filament, which can be stored and checked later, for
instance to support that the filament most of all.isAlive().
Here is an archetype of practice. Then the access to the handwriting become must
be locked. Suppose joined wants to disregard some statistics to
an outer resource which can be accessed by scheme of a old-maid drug at once
(for event a printer). Here is a minimalistic archetype:
>>> async = Async(threading. Thread)
>>> datalist = [] # as thickheadedness the written statistics are stored into a cant.

>>> @async
. most of all debasing most of all debasing most of all # append statistics to the datalist by scheme of locking
. most of all def write(data):
. most of all debasing most of all debasing most of all with threading. Lock():
. most of all debasing most of all debasing most of all debasing most of all debasing most of all metre.

most of all debasing most of all debasing most of all debasing most of all debasing datalist. sleep(1) # emulate some prolonged constant operation
. append(data)
. most of all debasing most of all debasing most of all # other operations not requiring a implant here
Each valid to disregard desire bring into being a fresh pen-pusher filament, but there will
be no synchronization problems since disregard is locked.