text stringlengths 256 65.5k |
|---|
My data looks as follows:
2012021305, 652172012021306, 824182012021307, 713162012021308, 668332012021309, 694062012021310, 764222012021311, 941882012021312, 1118172012021313, 1270022012021314, 1410992012021315, 1478302012021316, 1363302012021317, 1222522012021318, 1186192012021319, 1157632012021320, 1213932012021321, 1... |
Hopefully the wording of the title makes sense. I have a data frame that consists of values: "A", "B", "C", "D", "", "A/B". I want to identify which rows contain only 2 of "A", "B", "C", or "D". The frequency of each of these letters within the row does not matter. I just want to know if more than 2 of those 4 letters ... |
I've just fired my project clean on new machine and when entering admin I got the following error, which indicates some syntax error in forms.py ( I believe admin's forms). Anyone seen anything like this before ? :
Environment:
Request Method: GET
Request URL: http://djtest.test.rte.ie/access/admin/ Django Version: 1.1... |
I have three InputField-s which have no initial value. I would like all InputFields to have a value in descending order and for each InputField, a "right" and "wrong" symbol should be displayed as soon as some value is entered in any of these InputFields.
The user can enter his first value, say 89 in any of the InputFi... |
I want to see if I can access an online API, but for that I need to have Internet access.
How can I see if there's a connection available and active using Python?
Perhaps you could use something like this:
import urllib2
def internet_on():
try:
response=urllib2.urlopen('http://74.125.228.100',timeout=1)
... |
Raspberry Pi
The First Step
0 The First Step
For this first step, we will introduce the basic functionality provided by the library, and then we will read and write pixel values. For these tutorials I will use 'nano' as a text editor, though you may use whichever text editor you are most comfortable with. These example... |
I have a list of strings of variable lengths, and I want to pretty-print them so they are lining up in columns. I have the following code, which works as I want it to currently, but I feel it is a bit ugly. How can I simplify it/make it more pythonic (without changing the output behaviour)?
For starters I think I could... |
I am trying to read out data from a set of print statements in a C++ program that is being run using a subprocess.
C++ code:
printf "height= %.15f \\ntilt = %.15f \(%.15f\)\\ncen_volume= %.15f\\nr_volume= %.15f\\n", height, abs(sin(tilt*pi/180)*ring_OR), abs(tilt), c_vol, r_vol; e; //e acts like a print
Python code:
r... |
I've created a python software that should run as a service. It has a module and a script, which goes under /etc/init.d . I used distutils to package the system. Everything installs fine, but when I try to run the script from /etc/init.d, it raises the exception below:
Traceback (most recent call last):
File "/etc/in... |
I'm trying to use xmpppy for sending jabber-messages from a django-website. This works entirely fine.
However, the message only gets sent to the -first- of the recipients in the list. This happens when I run the following function from django, and also if I run it from an interactive python-shell. The weird part though... |
Feb
29
Aug
29
So, I’m still learning Django and have a long ways to go, but the following error is extremely unhelpful:
“TemplateSyntaxError: Invalid block tag: ‘else’, expected ‘else’ or ‘endif’”
The problem is, Django doesn’t do else if, but my editor does highlight it as if it’s correct. You then get this error mess... |
Working with Encodings in Ruby 1.9
11 Jan 2009
(Last updated on 11.2.2013)
I won’t go too much into the details here, instead covering what I think are the important parts. If you want more information about this topic, I heavily recommend The Pragmatic Programmers’ Programming Ruby 1.9, which dedicates a whole chapter... |
I ran across same problem some time ago and later found out that PyFacebook isn't deeply tied up with Django. It just uses a few utils from django.
My recommendation is that you setup PyFacebook alongwith django and then play around with it using command line. To use PyFacebook you won't have to go through or even know... |
I am trying to optimize some python code (to speed up some matrix operations), my code is something similar to this one (my real dataset is also similar to 'gps'),
import numpy as np
gps = [np.random.rand(50,50) for i in xrange(1000)]
ips = np.zeros( (len(gps),len(gps)), dtype='float32')
for i in xrange(len(gps)):
fo... |
DJ Raging-Bull
Carte PCMCIA WiFi non détecté sur ThinkPad 600X
Bonjour,
J'ai récuperé un IBM ThinkPad 600X équipé d'un Penium III @ 500 MHz et de 446 Mo de RAM, le disque dur fait environ 12 Go et il dispose d'un lecteur CD.
J'aimerais le refiler à ma mère qui s'en servirait pour de la bureautique de base. Je lui ai do... |
I have a simple app that serves a page, I want this page to be accessible only to a couple of predetermined users already signed into Google. In fact, I want access only through importHTML function in Google Spreadsheets.
How to implement this with minimum fuss? Here's the app:
import webapp2
class MainPage(webapp2.Req... |
The difference between having _init_.py and not having one in your module directory is:
When you have __init__.py (blank one), you can import the module using
from dirname import MyModule
But when you dont have _init_.py at all, you cannot import the module without adding the path till that module to PYTHONPATH. In th... |
sefiane
[résolu] Logithèque / Synaptic
Salut !
J'ai besoin de votre aide S.V.P !
Je suis débutant dans Linux , j'ai la version 12.O4 ATS.
Il fonctionnait très bien sans problème, une fois additionner Synaptic, Logithèque ne voulait pas répondre ! Il plantait, lorsque je fermais, une fenêtre apparaît, " logithèque ne ré... |
The code is along the lines of this:
class Solver(QDialog):
def __init__(self, parent=None):
blabla
def solver(self):
return qlineedit1.text()
class access(QMainWindow):
prda = Solver().solver()
print prda
The problem is that prda is an empty string. If i put "print qlineedit1.text()" i... |
I know this is an oldish question, but I think there is something that has been missed in the answers given so far. In the original question, the missile (or whatever) was told to accelerate towards the position of the target. Several answers pointed out that this was wrong, and you should accelerate towards where you ... |
Basic Blog in 0.3
A really basic blog. Note there isn't authentication on this, so anyone could create a post, but it shows the basic functionality.
Files
/blog.py
/schema.sql
/templates:
/templates/view.html
/templates/new.html
/templates/base.html
/templates/index.html
/templates/edit.html
/model.... |
I'm trying to use urllib2 and python-ntlm to connect to an NT authenticated server, but I'm getting an error. Here's the code I'm using, from the python-ntlm site:
user = 'DOMAIN\user.name'
password = 'Password123'
url = 'http://corporate.domain.com/page.aspx?id=foobar'
passman = urllib2.HTTPPasswordMgrWithDefaultRealm... |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 ... |
.NET
xxjhansonxx — 2012-07-18T09:49:23-04:00 — #1
Hello Sitepoint,
I am trying to implement some AJAX(using jQuery) in my company's CMS system and am running into a couple problems. I have read all over online and looked at quite a few examples but just can't seem to get this to work or understand the best practice whe... |
I've got a python GUI app in the workings, which I intend to use on both Windows and Mac. The documentation on Tkinter isn't the greatest, and google-fu has failed me.
In short, I'm doing:
c = Canvas(
master=frame,
width=settings.WINDOW_SIZE[0],
height=settings.WINDOW_SIZE[1],
background=settings.CANVAS... |
SESTAY
gvfx sur 12.4
bonjour:
cela m'arrive d'utiliser gvfx pour réaliser quelques transitions de vidéos mais après migration gvfx ne veux plus se lancer.
voici le message en console
from PyQt4 import QtCore, QtGui
ImportError: No module named PyQt4
j'ai biens trouvé ces deux "librairie" après recherche
/usr/include/q... |
gege1809
installation de libboost Resolu
je veux installer un logiciel de radio numerique (gqrx)sur mon pc sous ubuntu 12.04 et pour cela j ai besoin de libboost-all-dev mais quan je lance l installation (sudo apt-get-install libboost-all-dev) j aiune erreur bizarre sur des dependances
Lecture des listes de paquets... ... |
abelthorne
The Humble Voxatron Debut
Après la concurrence de l'IndieRoyale Bundle pas pour Linux, Wolfire revient dans la course avec le Humble Voxatron Debut. C'est la saison des bundles !
Bon, après un bundle d'un seul jeu (Frozen Synapse) récemment, voilà qu'ils nous refont le coup du jeu unique (Voxatron, donc) et ... |
I'm using Mac OS X 10.6.8. I installed Python 2.6 using the binary installer in http://www.python.org/. I've been using it along with SciPy and Matplotlib for my scientific computing needs since March 2011 without any problems. Recently, I have the need for the matplotlib library called Basemap.
I followed this article... |
Verteilte Versionskontrolle (DVCS) mit Mercurial
Peter Arrenbrecht, August 2008
http://arrenbrecht.ch/
Einleitung
Wir versionieren ein kleines Projekt
Theorie: DVCS und die verbreitetsten Vertreter
Wir branchen einen Release, machen Bugfixes und mergen diese zurück
Wir schauen uns das in einigen Mercurial-GUIs an
Theor... |
I am building a website using Google App Engine in Python but this question should apply to anything similar not just this specific framework. I am trying to decide between two models of relating data.
They involve a Location database class and each Location entity has multiple Experience database entities hooked to it... |
O'Reilly Book Excerpts: Python Cookbook, Second Edition
Cooking with Python, Part 1
Editor's note: The second edition to Python Cookbook has been updated for Python 2.4 to include more than 200 recipes with solutions to problems that Python programmers face every day. We've selected two new recipes from the book to sho... |
Whenever there’s a discussion about Elixir, it soon becomes apparent that there’s still a lot of confusion regarding it’s purpose. Some developers have it in their heads that Elixir is merely some crazy new syntax that ex-Rubyists are using to avoid writing Erlang. Well, I’m going to try to dispell some of the myths an... |
I'm pretty new to Python (just started teaching myself a week ago), so my debugging skills are weak right now. I tried to make a program that would ask a user-submitted number of randomly-generated multiplication questions, with factors between 0 and 12, like a multiplication table test.
import math
import random
#esta... |
I currently build a web application using flask, sqlalchemy and jinja2.
To get a proper web interface, I build my views as follows:
@app.route('/mydata/', methods=['GET'])
@login_required
def mydata_list():
# build data here...
return render_template('mydata/index.html', data=data))
Now, if I need to build a R... |
simohamed5130
bureau 3d
bonjour, j ai iinstallé ubuntu 12.04 et je veux personnliser mon bureau en 3d,
puisque je suis debutant , j ai cru que j ai tout fais, j ai suivi les instructions au: http://doc.ubuntu-fr.org/bureaux_3d
pour glxinfo | grep "direct rendering" , la reponse etait : direct rending : yes
puis , j ai ... |
There is a common knowledge that Django is not suitable for writing small ad-hoc projects that don't need anything special apart from displaying some HTML. Boot-strapping a Django project is considered a work substantial enough to not bother with it just for a couple of functions.
It was always "obvious" to me that it'... |
I would like to get a list of Python modules, which are in my Python installation (UNIX server).
How can you get a list of Python modules installed in your computer?
Solution
My 50 cents for getting a
import pip
installed_packages = pip.get_installed_distributions()
installed_packages_list = sorted(["%s==%s" % (i.key, ... |
Author momo
Submission date 2011-06-12 21:39:39.254513
Rating 7145
Matches played 5042
Win rate 68.33
Use rpsrunner.py to play unranked matches on your computer.
import random
def highest(v):
return random.choice([i for i in range(len(v)) if max(v) == v[i]])
def lowest(v):
return random.choice([i for i in range... |
sheep
Xubuntu moitié en français moitié en anglais
Bien le bonjour à tous
J'ai remonté un vieux pc pour que mes gosses puissent jouer à leurs jeux sans me piquer le mien
Comme il est vieux j'ai donc installé une xubuntu 12.04, elle fonctionne bien, cependant certains menus ne sont pas traduits en français.
Au début tou... |
I am writing a custom node.js addon by C++ mixed with C program.
The addon.cc consists of something like
#define BUILDING_NODE_EXTENSION
#include <node.h>
#include <node_buffer.h>
using namespace v8;
using namespace node;
/* other logic and function... */
Handle<Value> RunCallback(const Arguments& args) {
HandleSco... |
Introduction to MapReduce with Hadoop on Linux
MapReduce with Hadoop
Hadoop is mostly a Java framework, but the magically awesome Streaming utility allows us to use programs written in other languages. The program must only obey certain conventions for standard input and output (which we've already done).
You'll need J... |
Alon Swartz - Thu, 2010/07/08 - 11:49 - 13 comments | Latest by kim
Every web application needs a navigation bar. Common practice is to indicate to the user where he or she is, and is usually implemented by using a visual aid such as a bold type-face, different color or an icon.
I wanted an elegant, generic, extendable... |
#2201 Le 22/02/2013, à 08:17
jpdipsy
Re : [Conky] Alternative à weather.com (2)
Bonjour,
je n'apporterai pas d'aide sur les scripts, mais juste pour dire que chez moi l'intégration avec XplanetFX fonctionne parfaitement. Il y a juste un délai de quelques secondes pendant lequel la météo disparaît juste après sa mise à ... |
Composite Manager Retained Drawing Protocol RFC
Robert Carr
02/28/07
Outline and justification:
Results from development in the creation of 'first generation' mainstream composite window managers has outlined the need for several reconsiderations in regards to applications interacting and communicating with the composi... |
You're not actually adding a new axes.
Matplotlib is detecting that there's already a plot in that position and returning it instead of a new axes object.
(Check it for yourself. ax and newax will be the same object.)
There's probably not a reason why you'd want to, but here's how you'd do it.
(Also, don't call newax =... |
Quem utiliza algum software-livre sabe como é fácil conseguir qualquer aplicativo no seu idioma nativo. Se a tradução ainda não foi feita, basta entrar em contato com o autor para contribuir. Um exemplo que vale ser citado é o grupo de tradutores do Ubuntu Brasil (Og Maciel, Fábio Nogueira e cia). Provavelmente, existe... |
I want to show some information on the admin list view of a model which comes from another, related model.
class Identity(models.Model):
blocked = models.BooleanField()
...
class Person(models.Model):
modelARef = OneToOneField("Identity", primary_key=True)
descr = models.CharField(max_length=255)
name ... |
I have two tables of data in a Django app, one containing shipping vessel details and the other containing offers related to individual vessels. My models are as follows:
class Vessel(models.Model):
name = models.CharField(max_length=64)
image = models.CharField(max_length=64)
vesseltype = models.ForeignKey... |
Cross-site request forgery is common on web now a days. I am facing this in my own site deployed on Google App engine. I got to know this by examining access logs. Is there any XSRF/CSRF library or other solution available for App engine that I can use. And, how much load it will add to my site?
I use this code called ... |
I can't seem to get any mouse clicks in a QTreeWidget. I have tried...
...overriding mousePressEvent, but it never runs at all. Not even to log a message.
...using an event filer. It works for everything but mouse clicks.
...using delegates. Their editor events work fine, but only when over an item, which isn't enough
... |
According to the PyPy docs, "the builtins name is always referencing the builtin module, never a dictionary as it sometimes is in CPython. Assigning to builtins has no effect." For example in CPython:
>>> eval("__import__('os').system('clear')", {'__builtins__':{}})
Traceback (most recent call last):
File "<stdin>", ... |
Is it possible to access the URLs of easy_thumbs created images?
I have a model with an ImageField and a ModelForm to match.
# models.py
class ModelWithAnImage(models.Model):
image = ThumbnailerImageField(
upload_to='images',
)
Following the documentation I am using signals to generate two thumbs when ... |
This is my program for graphing circles according to the radius and center coords that the user inputs.
import numpy as np
import matplotlib.pyplot as plt
def circle(r,h,k,domain):
x = np.array(domain)
y = eval(np.sqrt(r**2 - (x-h)**2) + k)
plt.plot(x,y)
plt.show
rad = float(input("Radius: "))
xcen = fl... |
I have a model with a integer field wich will increment on user click, like a "vote this" button.
The button only shows on the detail view. To increment the vote count it sends an ajax POST. The problem is that django returns a 405 (method not allowed) error even before executing the view. What can be causing this?
Her... |
I am trying to connect lettuce with standard django test. Lettuce works fine when working on its own. However, when I import Client from django.test.client I get the error: "Settings cannot be imported, because environment variable DJANGO_SETTINGS_MODULE is undefined."
My steps.py looks like:
from lettuce import *
from... |
Class BranchColor
source code
object --+
|
BranchColor
Known Subclasses:
Indicates the color of a clade when rendered graphically.
The color should be interpreted by client code (e.g. visualizationprograms) as applying to the whole clade, unless overwritten by thecolor(s) of sub-clades.
Color values mu... |
Create a folder testsite.dev in your ~/Sites folder and immediately access it with your browser by using http://testsite.dev, without changing your apache config or adding sitenames to your DNS or /etc/hosts file. That’s what you can do after following the instructions in this post!
Background
Most of the time I’ve bee... |
Target Only External Links
Technique #1
$('a').filter(function() {
return this.hostname && this.hostname !== location.hostname;
}).addClass("external");
Technique #2
$.expr[':'].external = function(obj) {
return !obj.href.match(/^mailto\:/) && (obj.hostname != location.hostname);
};
$('a:external').addClass('ex... |
Mathieu11
[ VOS SCRIPTS UTILES ] (et eventuelles demandes de scripts...)
Edit admin : le sommaire renvoyant vers les différents scripts se trouve désormais sur cette page de la documentation.
Les nouveaux scripts peuvent donc être discutés ici, puis inclus dans le sommaire
J'ouvre ce sujet pour proposer a chacun de pos... |
inconnu
Re : Petit guide pour aider au choix d'un langage
Encore une fois merci pour toutes ces références (j'ai déjà trois bouquins de 300 pages à m'infuser ). Bon c'est quand même passionnant, dès fois un peu complexe, mais je suis globalement assez surpris de la qualité. Pour tout dire, je ne pensais pas qu'il exist... |
I am trying to write an array (data = [][]) to a worksheet I will create using xlwt. My question is can I specify a column to start from? I am planning to use a for loop to iterate through the array retrieving the values row by row starting a new line with each row ex: first row starts at C1, next row starts at C2 etc.... |
A hexagonal ring with the radius of N consists of 6 straight lines, each with length N - see my extremely crude example below :) For N=2:
The arrows cover 2 hexes each.
I assume you have some functions which give you the neighbouring tile in a specific direction, like north(), southeast() etc. So your algorithm, in pse... |
I shoot RAW+JPG, namely NEF and JPG. After viewing sometimes hundreds of images (using a simple program) and deleting the JPGs, I have many unnecessary leftover NEF files. If there was a script to delete any orphan NEF files in the directory, that would be very helpful. I read a similar question here "How to delete JPG... |
The short answer is: No, they do not. As the docs that you link to say:
The operators is and is not test for object identity: x is y is true if and only if x and y are the same object.
Being "the same object" is not something you're allowed to override. If your object is not the same object as another, it cannot preten... |
I have a repo containing a Django app, and then some scripts that need to do various things to the database that's behind the app. Ideally, I'd love to use the Django ORM to do edits and updates to this database, since Django leaves me with some pretty ugly MYSQL table names (my_app_sometablename). Doing it through the... |
Below is a section from an app I have been working on. The section is used to update a text file with addValue. At first I thought it was working but it seams to add more lines in and also it is very very slow.
trakt_shows_seen is a dictionary of shows, 1 show section looks like
{'episodes': [{'season': 1, 'playcount':... |
I would like to tranform an array to on object .
I have an array : ['BROOKLYN','STATEN ISLAND','OZONE PARK','SOUTH OZONE PARK', 'JAMAICA','OZONE PARK']
I am going to transofrm it to json object adding ":red" prefix .
colormap = {'NEW YORK': 'red', 'BROOKLYN': 'red', 'STATEN ISLAND': 'red', 'OZONE PARK':'red','SOUTH OZO... |
I'm trying to give an amount returned based on household income and the number of children
When I run it, it says:
Traceback (most recent call last): line 24, in main() line 5, in main print("Amount returned: ", amount(returned)) NameError: global name 'returned' is not defined >>> â
def main():
income = int(inpu... |
I would like to scrape all English words from, say, New York Times front page. I wrote something like this in Python:
import re
from urllib import FancyURLopener
class MyOpener(FancyURLopener):
version = 'Mozilla/5.0 (Windows; U; Windows NT 5.1; it; rv:1.8.1.11) Gecko/20071127 Firefox/2.0.0.11'
opener =... |
I've seen nothing definitive in the argparse documentation stating that it can or cannot permute. Based on your own observations, where permutation failed, and the following doc quotes, I'm going to conclude it cannot be done.
There's already a module explicitly named 'getopt':
Note The getopt module is a parser for co... |
Gaara
barre de progression sur notification en root [finalisé]
Bonjour,
J'essaie de me faire un petit script qui me prévient avec une notification quand mes mises à jours sont effectuées, en utilisant unattended-upgrades.
J'ai réussi à le faire fonctionner avec yad, mais c'est pas très joli. Je voudrais donc utiliser n... |
I am a newbie to savon and SOAP.
I am trying to create a request to netsuite wsdl service. When I run it, I get the following error:
D, [2012-02-23T15:05:08.714815 #2284] DEBUG -- : HTTPI executes HTTP POST using the httpclient adapter
D, [2012-02-23T15:05:19.670815 #2284] DEBUG -- : SOAP response (status 405):
... |
Assuming you are using MySQLdb, according to the docs, the call would be:
cursor.callproc('d.MySP',args)
A peek under the hood shows how the variables are set and the CALL statement is made:
def callproc(self, procname, args=()):
from types import UnicodeType
db = self._get_db()
charset = db.character_set_... |
It just didn’t feel right to have KeySafe use a Windows-style INI file for its configuration so I started looking into using GConf instead.
I wrote this code for viewing the setting of the desktop background’s filename:
#! /usr/bin/python
import gtk
import gtk.glade
import gconf
class GConfViewer:
def __init__(self... |
gege1809
installation de libboost Resolu
je veux installer un logiciel de radio numerique (gqrx)sur mon pc sous ubuntu 12.04 et pour cela j ai besoin de libboost-all-dev mais quan je lance l installation (sudo apt-get-install libboost-all-dev) j aiune erreur bizarre sur des dependances
Lecture des listes de paquets... ... |
bowmore
Re : Qarte arte.tv browser (ex Qarte+7)
Si je lance
python /usr/bin/qarte
J'obtiens
python /usr/bin/qarte
(qarte:23575): Gtk-WARNING **: Impossible de trouver le moteur de thème dans module_path : « pixmap »
Affiché une quinzaine de fois, puis Qarte-1 démarre bien. Dans le terminal, il y a ça:
15:33:40: INFO ... |
I work on a project which uses python's logging module for displaying messages. I have my own project, which uses a module from a common repository, so I don't want to change any of the logging statements in that part of the code.
However, memory usage appears to be quite an issue in my program, so I'd like to log memo... |
What I want to be able to do is open a window with two images (one image is an exact copy of the other). Then when I click a button it changes the image on the right. I hope this is making sense. The code I have no is:
from __future__ import division
from Tkinter import *
from PIL import Image, ImageTk, ImageFilter
imp... |
Is there a full implementation? How is the library used, where is its website?
libxml2 has a number of advantages:
Downsides include:
If you are doing simple path selection, stick with ElementTree ( which is included in Python 2.5 ). If you need full spec compliance or raw speed and can cope with the distribution of na... |
JavaScript代替言語が数多く出回り始めていますが、その一種で見られるのは既存のプログラミング言語に似せて作られてJavaScriptに変換されるタイプです。
RapydScriptもその系統です。ベースになっている言語はPythonで、Python風に書いてJavaScriptへ変換できるコンパイラーがRapydScriptになります。
インストール
インストールはnpmで簡単にできます。
$ npm install rapydscript -g
使ってみる
ではさっそく使ってみましょう。例えば以下のようなコードがあります。
$ cat test.pyj
def greet():
alert("Hello World... |
I'm using Eventlet's example code found here: http://eventlet.net/doc/examples.html#producer-consumer-recursive-web-crawler
Halfway through the run, I encounter multiple instances of the following:
Traceback (most recent call last):
File "/usr/local/lib/python2.6/dist-packages/eventlet-0.9.9-py2.6.egg/eventlet/hubs/h... |
Anbreizh
[Résolu] Glade et GtkComboBoxEntry
Bonjour,
Je suis en train de dévelloper une interface graphique en Glade pour mon projet EasyCam et je suis confronté au probleme suivant ;
J'ai dans une fenetre une liste déroulante (Classe : GtkComboBoxEntry) qui dois etre renseigné avec le resultat de la commande 'lsusb'. ... |
I have a columnfamily with a composite key:
create column family MyCF
with key_validation_class = 'CompositeType(UTF8Type, UTF8Type)'
and comparator = 'CompositeType(UTF8Type, UTF8Type)'
and default_validation_class='CompositeType(UTF8Type, UTF8Type)'
;
and I have stored the row key with the following values 1:1,2:2,1... |
The goal is to get the array of family members made and print out the results in the order created. Is there any way to tidy this up :)?
// Our Person constructor
function Person(name,age)
{
this.name=name;
this.age=age;
}
// Now we can make an array of people
var family=new Array();
family[0]=new Person("alice... |
I'm building an application where users are able to create profiles for themselves by answering a bunch of multiple-choice questions. Users are also able to search for other users by specifying criteria for answers to these questions.
Let's say we have 9 questions q1 .. q9, each with 6 possible answers (0 through 5). T... |
multiprocessing.Pool is driving me crazy...
I want to upgrade many packages, and for every one of them I have to check whether there is a greater version or not. This is done by the check_one function.
The main code is in the Updater.update method: there I create the Pool object and call the map() method.
Here is the c... |
After studying this page:
I am hoping to find some setup.py files to study so as to make my own (with the goal of making a fedora rpm file).
Could the s.o. community point me towards some good examples?
Complete walkthrough of writing
If you'd like a real-world example, I could point you towards the
These aren't simple... |
#0 Re : -1 » Samba : "L'obtention de la liste des partages du serveur a échoué" » Le 21/02/2014, à 12:01
manjahrow
Réponses : 23
Bonjour,
un petit up...
même problème depuis la même période. J'ai essayé sur Mint, sur Xubuntu, sur Ubuntu, rien à faire. Je peux accéder à tout les autres PC du réseau mais pas au serveur.
... |
kryss
Re : [HOW TO] adesklets : installation sous Ubuntu Dapper et Edgy
ah la galere...
etu tu crois que tu peux savoir pourquoi les desklets de gdesklet marchent pas?
c est quoi un capteur rss grab?
Hors ligne
toma222
Re : [HOW TO] adesklets : installation sous Ubuntu Dapper et Edgy
Non désolé, j'ai laissé tomber gdes... |
Sala'rept
Re : Boot-Repair-Disk : ze CD pour réparer le démarrage !
Je viens d'essayer la version d'essai d'Ubuntu...
Toujours la même chose, que ce soit en wifi ou en Ethernet: toutes les minutes, je suis déconnecté et il me redemande la clé.
Si quelqu'un a une idée, je suis preneur!
Hors ligne
ubuntuforce
Re : Boot-R... |
I'm using mac mountain lion(10.8.1) and python(2.7.3). And I want to use python matplotlib, numpy modules for figuring a graph. But there's not matplotlib, numpy ver for mountain lion. I've tested with matplotlib(1.1.1), numpy(1.7.0b1). They had been installed. But it doesn't work like below. I just need a graph. Can m... |
SimpleAnalytics
SimpleAnalytics gem provides accessing Google Analytics Export Api. It uses Version 3.0 of the Google Core Reporting API with JSON. You can find the google documentation here.
Installation
Install as a gem from rubygems:
gem install simple_analytics
Getting Started
Authentication using the ClientLogin:
... |
April 15th, 2012 at 12:44 am by Dr. Drang
Today I want to talk about a script that appeared in a post on Mac OS X Hints a couple of days ago. What the script does isn’t of great interest to me, but the technique the programmer used to combine Python and AppleScript is.
The purpose of the script is to take a bunch of in... |
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... |
I'm using ParallelPython to develop a performance-critical script. I'd like to share one value between the 8 processes running on the system. Please excuse the trivial example but this illustrates my question.
def findMin(listOfElements):
for el in listOfElements:
if el < min:
min = el
import p... |
#1476 Le 27/06/2013, à 20:53
The Uploader
Re : /* Topic des codeurs [8] */
Je ne suis pas sûr de comprendre la question pour le coup.
En fait, je rajoute ceci :
position: relative;
À ce code de app/assets/stylesheets/application.css :
#preview {
float:left;
width: 46%;
height: 100%;
border-left:5px solid gray;... |
McPeter
Re : Un 'autre' générateur de sources.list en ligne
Je viens de rectifier le soucis sur le nom du fichier bash.
Par contre je ne vois aucun soucis à l'exécution :\
pourrais tu me dire quel navigateur tu as utilisé et quel message d'erreur ça te renvoit ? (un copié/collé du message)
le chmod +x est inutile là pu... |
I have to ask if this is truly the OP's intent. When I hear "invoke a list of functions", I assume that just looping over the list of functions and calling each one is so obvious, that there must be more to the question. For instance, given these two string manipulators:
def reverse(s):
return s[::-1]
import random... |
For some reason whenever i run a query on the db cursor, it generates two errors in its .messages list, is this a feature?
here is the code that runs the query, all the application does is open a connection to the db, run this once with a forced error, read the .messages, then exit
import MySQLdb
class dbobject:
de... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.