text stringlengths 256 65.5k |
|---|
I'm attempting to upgrade my work machine from 12.04 to 14.04, but having issues.
sudo update-manager -d:
** (update-manager:20416): WARNING **: Command line `dbus-launch --autolaunch=f01c8e2b23ace751460ef7f800000009 --binary-syntax --close-stderr' exited with non-zero exit status 1: Autolaunch error: X11 initializatio... |
I am new to Python so bear with me. I use the pyDev plugin fore eclipse. There are three files:
tool.py:
from gui import Tool_Window
import wx
import settings
if __name__ == '__main__':
window = wx.App()
Tool_Window(None, settings.WindowHeader)
window.MainLoop()
Tool_Window.py:
from Tool import settings
im... |
How do I connect to Gmail and determine which messages have attachments? I then want to download each attachment, printing out the Subject: and From: for each message as I process it.
Hard one :-)
import email, getpass, imaplib, os
detach_dir = '.' # directory where to save attachments (default: current)
user = raw_inp... |
smo
Re : logiciel creation/remasterisation/clonage de distributions base ubuntu
je viens d ajouter quetzal i386 je telecharge pour tester je maj le git apres si ok ... (pas d raisons..)
ht5streamer, streaming youtube/dailymotion...: http://forum.ubuntu-fr.org/viewtopic.php?id=1299461 / http://ht5streamer.free.fr
ubukey... |
im getting this error:
cursor.execute('INSERT INTO COURSE (title) VALUES (?)',(title))
sqlite3.ProgrammingError: Incorrect number of bindings supplied. The current statement uses 1, and there are 11 supplied.
Here is my code:
try:
cursor.execute("""CREATE TABLE COURSE
(course_id INTEGER PRIMARY KEY,... |
leoperbo's answer worked for me with Ubuntu 12.04 but I
had to change the 266 number at leoperbo's suggested command.
You shouldn't use this command without carefully finding the 3-digit number
xinput set-int-prop NN 266 8 2 3 0 0 1 2 3
The other command though should work without problems (had numbers for the set... |
Brubeck is a flexible Python web framework that aims to make the process of building scalable web services easy.
Brubeck's design is discussed in depth in the provided documentation. There, you will find lots of code samples for building request handlers, authentication, rendering templates, managing databases and more... |
从PostgreSQL 9.3版本开始,JSON已经成为内置数据类型,“一等公民”啦。
还在羡慕什么文档数据库或者BSON么,赶紧玩玩吧。另外9.4版本,提供JSONB(Binary),提供更多JSON函数和索引支持。
刚好手头有一个需求,是涉及到数组类型的,懒的插入多条数据库记录,想起了ARRAY数据类型。
常用的读取操作符目前大概有三类:->、->>和#>。还是直接看SQL查询的例子吧。
先看->类:
postgres=# select '[1,2,3]'::json->2;
?column?
----------
3
(1 row)
postgres=# select '{"a":1,"b":2}'::json->'b';... |
#1676 Le 28/06/2012, à 20:51
AnsuzPeorth
Re : [glade2script-GTK2] Interface graphique pour script bash ou autre.
re,
Bon, pour les whitelits, il faut indiquer la section et la variable ... Je vais réfléchir pour faire mieux ... Mais je pense que ce sera dur de faire différent, il faut bien indiquer la section et la var... |
I am coding a application with Python and Tkinger.
After some work, I ran into a problem: In my Tkinter application I have some entry widget and the user put number in it.
I was wondering if it would be possible for me to restrick the entered value to int, float, long.
This would prevent a lot of error...
I am using Wi... |
streamer.py
import vlc # libVLC
import time
class Streamer():
def __init__(self):
self.Instance = vlc.Instance()
sout = "#transcode{acodec=mp3,ab=128,channels=2,samplerate=44100}:http{dst=:8090/streamer.mp3}"
self.media_files = ["file.mp3", "file2.mp3"]
self.Instance.vlm_add_broadcas... |
If you need both the sorted list and the list of indices, you could do:
>>> L = [2,3,1,4,5]
>>> from operator import itemgetter
>>> indices, L_sorted = zip(*sorted(enumerate(L), key=itemgetter(1)))
>>> list(L_sorted)
[1, 2, 3, 4, 5]
>>> list(indices)
[2, 0, 1, 3, 4]
Or, for Python <2.4 (no itemgetter or sorted):
>>> t... |
Hizoka
Re : [g2s] GUI d'extraction de fichiers mkv
En fait la fonction qui permet d'extraire dans le même dossier, il faut cliquer dessus à chaque fois. Tu pourrais pas mettre une option à cocher dans préférences qui permettrait de la garder toujours active ?
Réinitialise les préférences.
Par contre il n'y a plus l’icô... |
I want to define an exit code for some exceptions and some exceptions only. I want that the only input is that dictionary with the definition.
import sys
exit_codes = { ValueError:'10', KeyError:'25' }
try:
raise Some_Exception
except Exception as exit_err:
if any([isinstance(exit_err, exceptions) for exception... |
A Guide to Testing in Django
For many people, testing their Django applications is a mystery. They hear that they should be testing their code but often have no clue how to get started. And when they hit the testing docs, they find a deep dive on what functionality is available, but no guidance on how to implement.
Thi... |
I have just tried to upgrade to 13.10 from 13.04 and I have received the following error in console
Checking for a new Ubuntu release
authenticate 'saucy.tar.gz' against 'saucy.tar.gz.gpg'
extracting 'saucy.tar.gz'
Traceback (most recent call last):
File "/tmp/user/0/ubuntu-release-upgrader-xnzjbd/saucy", line 10, i... |
Yes, using custom tags. Example in Python, making the !join tag join strings in an array:
import yaml
## define custom tag handler
def join(loader, node):
seq = loader.construct_sequence(node)
return ''.join([str(i) for i in seq])
## register the tag handler
yaml.add_constructor('!join', join)
## using your sam... |
loic_e
Kubuntu Dapper sur Sony VAIO VGN-FE28H
Voici la procédure d'installation utilisée pour installer Kubuntu Dapper sur un Vaio VGN-FE28H:
Caractéristiques:
Processeur Intel Core Duo
Fréquence 1.67 GHz
Quantité de RAM 1 Go
Type de RAM DDR2-SDRAM
Disque dur 160 Go
Puce graphique nVIDIA GeForce 7400 Turbo Cache
Taille... |
What is the best way to represent and solve a maze given an image?
Given an JPEG image (as seen above), what's the best way to read it in, parse it into some data structure and solve the maze? My first instinct is to read the image in pixel by pixel and store it in a list (array) of boolean values: True for a white pix... |
When compiling a beamer presentation and using the following \author command
\author{Name \\ \texttt{my.email@domain.com}}
I get the following hyperref warning in my logfile
Package hyperref Warning: Token not allowed in a PDF string (PDFDocEncoding):
(hyperref) removing `\\' on input line 15.
Package h... |
Dark42100
[Résolu] Plus de bureau
Bonjour à tous.
Suite à une mise à jour et un redémarrage, le bureau est devenu gris, les icônes ont disparu. J'ai accès via un click droit au navigateur et au terminale. J'ai regardé différents topic via ce site ou d'autres mais aucun n'a résolu mon problème. En plus je suis loin d'êt... |
def print_list(l):
for item in l:
if isinstance(item, list):
print_list(item)
else:
print(item)
I have written this function which uses recursion to properly print a list, but my question is when I give it an argument like [[1, 2, 3], 4] according to me it should terminate a... |
Django newbie question....
I'm trying to write a search form and maintain the state of the input box between the search request and the search results.
Here's my form:
class SearchForm(forms.Form):
q = forms.CharField(label='Search: ', max_length=50)
And here's my views code:
def search(request, q=""):
if (q !... |
The autoregression continues this week with an intrinsic conditional autoregressive, or CAR model, in PyMC. There are many, many ways to introduce spatial effects into a modelling framework; due to the availability of cheap MCMC sampling, particularly in WinBUGS, CAR models have been widely used over the past decade to... |
Following on this question,
I would like any advice on how to create a link map of blogs so to reflect the "social network" between the bloggers.
Such a scrapper/service would take a starting point of a blog or two, and start adding links and mapping the links between them.
What would you recommend for doing that ?
(I ... |
What's the easiest way to shuffle an array with python?
import random
random.shuffle(array)
import random
random.shuffle(array)
The other answers are the easiest, however it's a bit annoying that the
import random
def my_shuffle(array):
random.shuffle(array)
return array
Then you can do lines lik... |
Contents
Introduction
Build options
Feature removal
SCCS version strings, file size 953136
Hesiod name service, file size 942468
Yellow Pages (YP), file size 917368
IPv6 support, file size 909272
Stack smashing protection (SSP), file size 894764
Remote procedure call (RPC), file size 806036
Execution profiling control,... |
grandtoubab
Re : La mise a jour clamAV et clamtk
Salut
Pour que ça se mette à jour automatiquement, on crée une nouvelle tâche quotidienne:
@ubuntu-desktop:~$ sudo gedit /etc/cron.daily/clamav
on y mets les lignes suivantes:
#!/bin/sh
/usr/bin/freshclam >> /var/log/resul_freshclam.txt
on mets les droits d'exécution:
... |
Pylades
/* Topic des codeurs couche-tard [1] */
Bienvenue dans le TdCCT 0x1.
Ceci est la suite de ce fil.
Voici le rappel des règles du jeu, formulées par le message initial de samuncle :
Bienvenue dans ce nouveau topic psychédélique, ou le but est de coder le plus tard possible (oui, c’est bien connu, il est plus faci... |
I need to write a module to detect similar documents. I have read many papers of fingerprints of documents techniques and others, but I do not know how to write code or implement such a solution. The algorithm should work for Chinese, Japanese, English and German language or be language independent. How can I accomplis... |
As the server is using gzip encription I am getting an error torrent while downloading.
<?
$path_parts = pathinfo("http://torcache.com/torrent/56A250DC4CD64F6C304631897F1108D413FE76C7.torrent");
$name= $path_parts['basename'];
$d="torrent/".$name;
if(!copy($f,$d))
{
echo "not copied";
}
else
{
echo "copied";
}
?>
Th... |
jQuery and Ajax
While web2py is mainly for server-side development, the welcome scaffolding app comes with the base jQuery library[jquery], jQuery calendars (date picker, datetime picker and clock), and some additional JavaScript functions based on jQuery.
Nothing in web2py prevents you from using other Ajax libraries ... |
benjou
Re : Aidez moi s'il vous plait pour mon projet
benoit@laptop-benoit:~$ picard
Traceback (most recent call last):
File "/usr/bin/picard", line 2, in ?
from picard.tagger import main; main('/usr/share/locale')
File "/usr/lib/python2.4/site-packages/picard/tagger.py", line 73, in ?
from picard import ev... |
I've tried a couple of searches and I don't think this has been asked, but if this is a duplicate please forgive me. I'm trying to use urllib on python-2.7 to read from a web page. Very simple application, all I want to do is get some text from a page. Unfortunately the following code:
import urllib
address = "http://g... |
Digging Up Django Class-based Views - 1
Abstract
This post refers to Django 1.5. Please be warned that some of the matters discussed here, some solutions or the given code can be outdated by more recent Django versions
Django programmers that started with versions prior to 1.3 are used to deal with views as functions, ... |
I'm making a sports forecasting app which should be able to let people keep track of their math forecasts.
The HTML has 48 matches so far and they have to fill the score for each one, however when I try to save scores this error keeps coming up:
invalid literal for int() with base 10: ''
Here is my view:
@login_requir... |
I am writing a simple platform game, and I've found that when removing 'ghost' instances, they persist and are not garbage collected. It seems that although I am removing all references, the ghost objects have some kind of internal references that are preventing them being garbage collected. Specifically they have attr... |
nicky940
Re : Generateur de sources.list en Francais
bonsoir
je suis un nouvelle utilisateur d'ubuntu l'installation c'est dérouler a merveille version 9.10 jai depuis quelque temps un problème avec les mise jour qui m'indique un sens interdit qui m'indique ce message d'erreur :un problème irrémédiable est survenu pend... |
Suppose I have the following directory structure:
workspace/ __init__.py ys_manage/ __init__.py manage.py ys_utils/ __init__.py project_dicts.py
Now, suppose I need access to project_dicts.py in manage.py. Also, my $PATH includes /home/rico/workspace/ys_manage.
I need to be able to run manage.py from any directory on m... |
I've been using OpenCV methods to get images from my camera. I'd like to decode QR codes from those images using the zbar library, but after I convert the images to PIL to be processed by zbar, it doesn't seem like the decoding is working.
import cv2.cv as cv
import zbar
from PIL import Image
cv.NamedWindow("camera", 1... |
I've been looking high and low for a solution to this simple problem but I can't find it anywhere! There are a loads of posts detailing semilog / loglog plotting of data in 2D e.g. plt.setxscale('log') however I'm interested in using log scales on a 3d plot(mplot3d).
I don't have the exact code to hand and so can't pos... |
I'm trying to write a simple Echo client in Twisted that sends keyboard input to the server, and is terminated by the user entering 'q' on it's own. In short, I'm just trying to modify the simple echo client (and variants) found on this page. Nothing sexy at all, just the basics.
I'm struggling with the very basic even... |
Audiofeeline
Modifier GRUB avec GRUB CUSTOMIZER
Bonjour à tous,
alors que je surfais paisiblement, je suis tombé sur un article de Tux-Planet qui présente GRUB CUSTOMIZER : http://www.tux-planet.fr/grub-customizer/
Je tenais à vous en faire part car ça faisait un petit moment que je cherchais une telle solution.
Bien à... |
Can anyone provide a minimal working example using the Yapsy plugin framework?
Here's a very simple example. It has three files:
You could add more plugins to the plugins directory, and this script would loop around them all.
There's another more complicated example at http://lateral.netmanagers.com.ar/weblog/posts/BB9... |
I'm writing a python CGI script that will query a MySQL database. I'm using the MySQLdb module. Since the database will be queryed repeatedly, I wrote this function....
def getDatabaseResult(sqlQuery,connectioninfohere):
# connect to the database
vDatabase = MySQLdb.connect(connectioninfohere)
# create a cu... |
The objective of my application is to control some LEDs on my embedded target from the ethernet link. My embedded board supports lighttpd web server. From this web server, I can run python scripts that read to devices on my board no problem. The problem comes when I am trying to write to those devices. The lighttpd ser... |
JavaScript
hiyatran — 2011-08-24T22:56:44-04:00 — #1
I would like to display the elements in my array but it is NOT working. Here's my code:
<HTML>
<HEAD>
<TITLE>Test Input</TITLE>
<script type="text/javascript">
function addtext() {
var openURL=new Array("http://google.com","http://yahoo.com","http://www.msn.com","... |
game design
last_year23 at February 28th, 2007 17:40 — #1
Hi, I am newbie in Blender, and I have modelled a character and added an armature, I am trying to load the mesh using cal3d in my project.
I am using a cal3d exporter but I am having strange results.
I ckecked the mesh with cal3d viewer.
The rotation of the anim... |
janosch
[Résolu] Problème de paquet cassé...
Bonjour,
je me permets de solliciter votre aide car je ne m'en sort malheureusement pas du tout.
J'ai eu la malencontreuse idée de faire un glisser-déposer d'un fichier vidéo présent sur mon bureau, sur l’icône de VLC présente dans le dock Cairo, pensant naïvement que cela a... |
I'm trying to use django-simple-autocomplete in a form. However, when I add debug prints to the simple_autocomplete.widgets, I see that for each form field's widget's __init__() is called twice, first with the parameters supplied in the form specification and a second time without any arguments, which obviously breaks ... |
<a href = "{% url 'ngraph' %}">Customer Count</a>
When I click on customer count it works only once and to make it work I have to run the program again, what is the problem here ? And what I have noticed is once the link localhost:8000/graph is (customer count) clicked, works but makes busy to localhost:8000 and doesn... |
What I find most elegant is the following:
b = np.insert(a, 3, values=0, axis=1) # insert values before column 3
An advantage of insert is that it also allows you to insert columns (or rows) at other places inside the array. Also instead of inserting a single value you can easily insert a whole vector, for instance do... |
Manapság már el sem tudunk képzelni számítógépet hálózati csatlakozás nélkül. A hálózati csatolókártyák hozzáadása és beállítása egy FreeBSD rendszergazda mindennapos feladata.
Mielőtt bárminek is nekikezdenénk, érdemes tisztában lennünk azzal, hogy a rendelkezésünkre álló kártya milyen típusú, milyen chipet használ és... |
I am trying to get a page from wikipedia. I have already added a 'User-Agent' header to my request. However, when I open the page using urllib2.urlopen I get the following page as a result: ERROR: The requested URL could not be retrieved
ERROR
The requested URL could not be retrieved
While trying to retrieve the URL th... |
I need a command to quickly see in terminal essential information about an audio or video file.
(Then I'll consider adding that to Thunar's custom actions, etc.)
I need a command to quickly see in terminal essential information about an audio or video file.
(Then I'll consider adding that to Thunar's custom actions, et... |
I hear a lot of talk about Daemons running on my Ubuntu computer - what are they?
In short, a Daemon is a
Daemons can just be normal programs that run in the background, however most are created by starting a process, forking it and exiting the parent.
To fork a process means to create an exact copy of it. The parent o... |
Interpreting Output
The statistical output shows the number of times a method was called (ncalls), the total time spent in the specified method but not in any of its children (tottime), the amount of time spent for each call to the specified method (the first percall), the amount of time spent in a method and calls to ... |
spyke
Re : La communauté du jeux sous Linux http://www.JeuxLinux.fr
jerhum oki mais alors je ny arrive pas a les faire tourner justement est ce normale comme wolfenstein , quake4 etc.....
Hors ligne
foxylechou
Re : La communauté du jeux sous Linux http://www.JeuxLinux.fr
il faut autoriser le fichier a être exécuter dan... |
Pylades
Re : /* Topic des codeurs couche-tard [1] */
It works! \o/
Bon, alors, vous en pensez quoi ? On met le planeur ? Avant le titre ? Après ?
“Any if-statement is a goto. As are all structured loops.
“And sometimes structure is good. When it’s good, you should use it.
“And sometimes structure is _bad_, and gets int... |
Presuming the words need to be found separately (that is, you want to count words as made by str.split()):
Edit: as suggested in the comments, a Counter is a good option here:
from collections import Counter
def count_many(needles, haystack):
count = Counter(haystack.split())
return {key: count[key] for key in ... |
Adding and configuring a network interface card (NIC) is a common task for any FreeBSD administrator.
First, determine the model of the NIC and the chip it uses. FreeBSD supports a wide variety of NICs. Check the Hardware Compatibility List for the FreeBSD release to see if the NIC is supported.
If the NIC is supported... |
Here's what I have so far:
import string
So I have the user write a 5 worded sentence asking for only 5 words:
def main(sentence = raw_input("Enter a 5 worded sentence: ")):
if len(words)<5:
words = string.split(sentence)
wordCount = len(words)
print "The total word count is:", wordCount
I... |
The REST of the Web
by Jason R. Briggs
04/27/2005
My team has recently been working to refactor our existing, traditional web interface, in order to expose web services instead. In doing so, we've spun the old web front end out into a separate application, which calls the various web services to perform the critical wo... |
The installation process was successful but I get error messages when opening any application. The instructions I followed were from here. How do I go about it? I am using Ubuntu 10.04. The error message I get is
Unhandled exception: assertion failed in 32-bit code (0x6b02b832).
Register dump:
CS:0073 SS:007b DS:007b ... |
I have the celery==3.0.12 and djcelery==3.0.11 installed in my system with django version 1.4.1. I was trying to process some tasks asynchronously using celery in one of my project and it was not working. So for testing I started a new django project, defined the sample task add and invoked it from the shell like this
... |
I need help in reading these textfiles, somehow when i do a recursive loop, the other loop always gets reset to the 1st line.
import sys
import codecs # there are actually more utf-8 char to the lines, so i needed codecs
reload(sys)
sys.setdefaultencoding('utf-8')
reader = codecs.open("txtfile1", 'r', 'utf-8')
reader2 ... |
I have a directory with all Dependencies in .deb format.
But there are lots of them. I need only those that i need for gimp.
biggenius@hacbook:~/Desktop/rocks/packages$ dpkg-deb -I gimp_2.6.12-1ubuntu1_i386.deb
new debian package, version 2.0.
size 4722192 bytes: control archive= 7927 bytes.
1894 bytes, 27 li... |
JavaScript
ramsz — 2013-03-03T07:09:13-05:00 — #1
Hi there, Ive got the following problem with a code ive come across.
Code:
<script language="javascript">
function checkAge()
{
/* the minumum age you want to allow in */
var min_age = 16;
/* change "age_form" to whatever your form has for a name="..." */
... |
siscard
Re : Open Office, Reconnaissance de caractères, Xsane, Kooka et Cie...
L'erreur de segmentation est revenue comme elle avait disparue.
Si quelqu'un a une idée, je suis preneur.
Tout ce que j'ai trouvé, c'est que le logiciel essaie d'utiliser un espace de mémoire qui ne lui est pas attribué; alors cela provient ... |
I currently have several scripts that need to group a set of points into "levels" by height. The assumption is that the z-values of the points will cluster loosely around certain values corresponding to the levels, with large-ish gaps in between the clusters.
So I have the following function:
def level_boundaries(zvalu... |
How do I get the MIN() of a datetime column and a literal datetime in SQL Alchemy v0.6.4? I want to clamp a datetime result to a specific range.
I've been using sqlalchemy.func.min(column, literal_datetime). This seems to work fine in SQLite but not at all with MySQL, which no doubt means I'm going about this wrong. Th... |
So according to this PR on github the capability to embed a kernel into a PyQt4 program is now in the master. Can anyone give an example of how to actually do it? I can't find any documentation. There was this previous attempt: epatter's gist but the names of the modules must have changed because I can't even import.
T... |
I started working on a chapter for the Ubuntu Developers' Manual. The chapter will be on how to use media in your apps. That chapter will cover:
Playing a system sound
Showing an picture
Playing a sound file
Playing a video
Playing from a web cam
Composing media
I created an app for demonstrating some of these things i... |
16 Aug 2014
Time management is a key quality of any successful person. I have been workingpretty hard these days to improve me efficiency. Today, I have decided tofollow this pattern while at work.
Here is the breakdown. Let's assume the net hour spent at work is 8.
50% Time (4 hrs) - Writing Code.
5% Time (24 min) - D... |
I am new to developing applications, and I have been trying to familiarize myself with doing so with Flask. I followed their great tutorial and read their equally-detailed documentation to create my first basic app which uses a SQLite3 database.
To accomplish this, and per their instructions, I imported the following:
... |
Vous n'êtes pas identifié.
Annonce
Faites la différenceentre le
service WordPress.com et l'application libre WordPress.
Mettez-vous à jour ! WordPress 4.0 est disponible en français.
Annonce 1: Le
Codex en françaisa besoin de vous pour avancer !
Annonce 2: Avant de poster, n'oubliez pas de faire une petite
recherc... |
I have this list:
[(3, 28), (25, 126), (25, 127), (26, 59)]
How can I turn it into this:
[(28, 3), (126, 25), (127, 25), (59, 26)]
I just want to reverse what is in the tuple
>>> lst = [(3, 28), (25, 126), (25, 127), (26, 59)]
>>> [i[::-1] for i in lst]
[(28, 3), (126, 25), (127, 25), (59, 26)]
If you know the tuples ... |
I am reading from a file with data like this:
{"day" :"Monday", "alarm":"on", "kids":"School" , "work":"days"}
{"day" :"Tuesday", "alarm":"on", "kids":"School" , "work":"days"}
{"day" :"Wednesday", "alarm":"on", "kids":"School" , "work":"days"}
{"day" :"Thursday", "alarm":"on", "kids":"School" , "work":"nights"}
{"day"... |
If I understand the question, you want the Cartesian Product of n sets of puppies.
It is easy to get the Cartesian Product if you know at compile time how many sets there are:
from p1 in dog1.Puppies
from p2 in dog2.Puppies
from p3 in dog3.Puppies
select new {p1, p2, p3};
Suppose dog1 has puppies p11, p12, dog2 has pu... |
pontiac76
[résolu]Google Ok mais pas internet avec Ubuntu 12.04
Bonjour,
J'ai posté hier un message à propos de mon impossibilité d'aller sur internet sauf sur sur google avec mon installation toute neuve d'Ubuntu 12.04 LTS sur un second disque dur de mon pc fixe.
Devant l'absence de réponse, j'ai relu les règles du fo... |
I ran sudo apt-get upgrade on my 12.04 server, and I have become stuck with a PostgreSQL dependency.
The console output (of sudo apt-get -f install) is below:
dpkg: dependency problems prevent configuration of postgresql-9.1:
postgresql-client-9.1 (9.1.7-0ubuntu12.04) breaks postgresql-9.1 (<< 9.1.7-0ubuntu12.04) and... |
blob: 6d5e512d03f9bd634cbf05acbef85acdb8e4b974 (
plain
)
INSTALLATION
------------
Decompress the print-n.x-n.n.tar.gz file into your Drupal modules
directory (usually sites/all/modules, see http://drupal.org/node/176044 for
more information).
Enable the print module: Administer > Site building > Modules
(admin/build... |
I have a python function defined as follows which i use to delete from list1 the items which are already in list2. I am using python 2.6.2 on windows XP
def compareLists(list1, list2):
curIndex = 0
while curIndex < len(list1):
if list1[curIndex] in list2:
list1.pop(curIndex)
else:
... |
Topic: Error 500, Upgrading from OpenSource to Pro
Hi Guys !
Finaly i buyed this Masterpiece of Mailserver and now i upgraded to iRedAdmin Pro.
Used the guide from Zhang.
in my apache log i get this error:
[Thu Oct 07 13:31:22 2010] [error] [client 80.123.169.178] mod_wsgi (pid=3289): Target WSGI script '/usr/share/apa... |
Shanx
Re : /* Topic des codeurs [8] */
Gnagnagna...
J'ai corrigé l'indentation, par contre pour découper le main je vais attendre que le programme fonctionne...
/**** PENDU ****/
#include<stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include <ctype.h>
#define TAILLE_MAX 50
void clean_stdin(void);
... |
I am beginning to learn Python after being trapped using VB6 forever. To help myself learn some gui with Tkinter, I'm making a simple slot machine. To animate the wheels, I have a ~300x2000 image that has all of the pictures I intend to use displayed as a strip. About 6 pictures right now. I just show part of the image... |
I'm sure there's a good simple elegant one-liner in Ruby to give you the number of days in a given month, accounting for year, such as "February 1997". What is it?
This is the implementation from ActiveSupport (a little adapted):
COMMON_YEAR_DAYS_IN_MONTH = [nil, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]
def days... |
I am implementing a library module to serve as client for couchdb change notifications. I want to have the library in "continuous" mode, that is, the connection must remain open forever, or at least it must reconnect if the connection has been closed, so that couchdb has a channel to notify of any new changes happening... |
I am getting an error in the subprocess module while the running the code below. The arguments horizontaldeviation and vertical deviation are floats and I am running a binary .exe file carddetector that takes command line float arguments.
**Traceback (most recent call last):
File "C:\Python27\card_detection_test\run_... |
Introducción
web2py[web2py] es un marco de código abierto para el desarrollo ágil de aplicaciones web seguras conectadas a servicios de bases de datos; está programado en Python[python] y es programable en Python. web2py es un marco de desarrollo completamente integrado, es decir, contiene todos los componentes que nec... |
sali10
ecrire un script
bonjour tout le monde
je voulais ecrire un script en C , qui manipule un fichier texte, il doit lire le fichier et faire des modification par exemple a chaque fois qu'il rencotre le mot 'a5b6 il le remplace par ahbv....comment proceder?
Hors ligne
Jean-Julien
Re : ecrire un script
J'ai l'impress... |
Trudy
Résolu ! Ouvrir fenêtre Dépôts
Bonjour, Je voudrais savoir comment ouvrir la fenêtre Dépots, si je ne l'ai pas dans Système-Aministration ... Merci pour vos réponses !
Dernière modification par Trudy (Le 04/12/2005, à 15:57)
Hors ligne
Express
Re : Résolu ! Ouvrir fenêtre Dépôts
Ca s'appel "Gestionnaire de paquet... |
hectorau_ben
Re : [tuto]Installation de Dofus 2.0 par paquet debian et rpm (pour la doc)
Même si tu m'as toujours pas répondu, dofus marche parfaitement, sans AUCUN ralentissement, mais le son ne marche pas ... Même si l'Updater est ouvert et que j'ai activé le son dans le options et biensûr, je n'ai pas trouvé la solu... |
Here is the code I ran:
import timeit
print timeit.Timer('''a = sorted(x)''', '''x = [(2, 'bla'), (4, 'boo'), (3, 4), (1, 2) , (0, 1), (4, 3), (2, 1) , (0, 0)]''').timeit(number = 1000)
print timeit.Timer('''a=x[:];a.sort()''', '''x = [(2, 'bla'), (4, 'boo'), (3, 4), (1, 2) , (0, 1), (4, 3), (2, 1) , (0, 0)]''').timeit... |
The handiness comes at the expense of dumb mistakes not being detected at the earliest possible time, as close to the buggy line of code as possible.
I think the handiness of this particular feature would be occasional at best, whereas dumb mistakes happen all the time.
Certainly a SQL-like NULL would be bad for testin... |
previous, i using "manage.py runserver" to run django, now, i want to use xampp. i copied mod_wsgi.so to xampp/apache/modules.project demo have:init.py, manage.py, settings.py, urls.py, views.py, django.wsgidjango.wsgi:
import os
import os.path
import sys
sys.path.append('.../xampp/htdocs/demo')
os.environ['DJANGO_SETT... |
So I'm trying to understand this simple merge and sort algorithm in python. Here's the code:
def merge(left, right, lt):
"""Assumes left and right are sorted lists.
lt defines an ordering on the elements of the lists.
Returns a new sorted(by lt) list containing the same elements
as (left + right) would ... |
Rarely I receive the following error:
Exception in thread Thread-1240:
Traceback (most recent call last):
File "C:\Python26\lib\threading.py", line 534, in __bootstrap_inner
self.run()
File "C:\Python26\lib\threading.py", line 738, in run
self.function(*self.args, **self.kwargs)
File "C:\Users\MyUser\Docu... |
So I was doing some configuration for ssh. When I later then did this command:
lsof -i tcp|grep ^ssh
I got a list of what I was expecting to happen. However, something I never noticed before was that everything was being called "penguin.local" as my machine. This isn't odd, because I know I named my laptop as "penguin"... |
I am new on python and I would like to know how can I change a code written for PyQt3 to work on PyQt4. For example: the code bellow should work fine for PyQt3, what should I change on it to make it work on PyQt4?
Thanks.
import sys
from qt import *
class dlgLabel(QDialog):
def __init__(self,parent = None,name = None,m... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.