text stringlengths 256 65.5k |
|---|
I have two arrays of x-y coordinates, and I would like to find the minimum Euclidean distance between each point in one array with all the points in the other array. The arrays are not necessarily the same size. For example:
xy1=numpy.array(
[[ 243, 3173],
[ 525, 2997]])
xy2=numpy.array(
[[ 682, 2644],
[ 277, 2651]... |
Python Classes
To create your own custom objects, you must define a sort of template, or cookie cutter, called a class. You do so in Python using the class statement, followed by the name of the class and a colon. Following this, the body of the class definition contains the properties and methods that will be availabl... |
This program has been disqualified.
Author dllu
Submission date 2011-05-27 21:24:45.362692
Rating 7784
Matches played 1543
Win rate 77.84
#DNA Polymerase
#This enzyme helps with DNA replication.
import random
if not input:
limit = 35
telomere = 27
DNA_strand0=""
DNA_strand1=""
DNA_strand2=output = random.choice(['... |
I've created an application that I'd like to submit through the Ubuntu app developer process. One of the requirements for the process is that when installed, all files go into the /opt/extras.ubuntu.com/<appname> directory.
Through changes in packaging and with help from others I've achieved that, but now I'm facing a ... |
Anyways, the idea is the following: you want to change the class attributes before it becomes final -- there are things you just can't do in Python after a class is already declared (Python uses this technique for creating properties -- in my specific use-case I'm using it to overcome some limitations that Django has i... |
#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;... |
researchHping
hping is a TCP/IP packet forging tool with embedded Tcl scripting functionality. Developed by antirez in 1998, it is now in its 3rd release. The tool runs on all major operatings systems including Linux, *BSD, and Windows.
Port Scanning
Host Discovery
OS Fingerprinting
Sniffer
Backdoor
File Transfer
Cover... |
sushiavarié
[résolu] Steam : L4D2 ne se lance plus
Bonjour,
Je rencontre un problème avec L4D2 qui me fait bien péter un joint....
Déjà commençons par ma machine :
ubuntu 12.04 64
CG Ati radeon HD 4890
Driver 13.1 https://launchpad.net/~makson96/+archive/fglrx
Pour faire simple j'ai pu jouer sans aucun souci cet après-... |
Yoko 12
[Résolu] Problème avec apt-get update
Bonsoir à tous,
Après avoir fait des changement dans mon sources.list, j'ai voulut lancer apt-get update. Mais il reste bloqué à 36%, après il me dit que le delais de connexion est dépasser pour se connecter au serveurs.
Voici le contenu de mon sources.list (j'imagine qu'el... |
I keep receiving the following router advertisement every few seconds from my router on ipv6 despite disabling my wireless ipv6 connection:
# tcpdump -vv 'ip6 and icmp6'
tcpdump: listening on wlth0, link-type EN10MB (Ethernet), capture size 65535 bytes
10:01:33.260428 IP6 (hlim 255, next-header ICMPv6 (58) payload leng... |
My connection keep dropping out: I have to click on my home wifi-network to disconnect and reconnect to the internet.
I tried to set MTU to 1500 as this post[1] suggest but my wireless keep dropping! [1] http://mylinuxramblings.wordpress.com/2011/10/16/how-to-stop-ubuntu-11-10-wireless-dropping-out/
The following quest... |
Referring on this question, I have a similar -but not the same- problem..
On my way, I'll have some text file, structured like:
var_a: 'home'var_b: 'car'var_c: 15.5
And I need that python read the file and then create a variable named var_a with value 'home', and so on.
Example:
#python stuff over here
getVarFromFile(f... |
It's a bird, it's a plane, no it is Guido Van Rossum and the App Engine Team. After cranking through writing an instructional application this weekend using Google App Engine, I have to say I am really impressed. In fact my exact thought are "Holy $!ck, this is awesome!
If you haven't heard about Google App Engine yet,... |
In Snow Leopard the Play / Pause media button (on the F8 key) opens up iTunes. How can I disable that? Preferably keeping the old Leopard behaviour, so I can use it to control other media applications (e.g. Spotify).
a better temporary fix is to start quicktime and just have it running(not playing a movie) in the backg... |
I've been experimenting with the ping utility on Linux. I set a mtu of 500 bytes on my router. Now, when I ping to an external host, I get the following output:
ping -c 3 -s 1300 10.0.2.1
PING 10.0.2.1 (10.0.2.1) 1300(1328) bytes of data.
From 10.0.1.254 icmp_seq=1 Frag needed and DF set (mtu = 500)
1308 bytes... |
You might have a broken cable and/or connector:
Install aLogCat and unplug the USB cable then clear the logs, then re-plug the USB cable. You should see something like this:
--------- beginning of /dev/log/system
D/Vold ( 132): USB connected
D/Vold ( 132): Share method ums now available
I/StorageNotification( ... |
You may be able to use a variation of the following technique - which forces repeated 'MIN/MAX' range scans:
Assumptions
You can produce a list of all possible year/month combinations
number is not null (which it can't be as it is in the PK, but I mention it as there is a way of working around if nulls are permitted)
t... |
For a class project I'm trying to do some socket programming Python but running into a very basic issue. I can't create a TCP connection from my laptop to a lab machine. (Which I'm hoping to use as the "server") Without even getting into the scripts I have written, I've been simply trying interpreter line commands with... |
I'm trying to use Google App Engine to deploy a BootlePy + PeeWee web application.
I use PeeWee with SQLite.
Here is PeeWee's source code:
try:
import sqlite3
except ImportError:
sqlite3 = None
Here is the error I'm getting in my Google App Engine development console:
ImportError: No module named _sqlite3
Why ... |
bleuberry
Re : [astuce] Un fichier HOSTS qui combat les pubs et liens malveillants !
si sa fonctionne sur chrome Adblock ?:P
Dernière modification par bleuberry (Le 22/02/2010, à 11:24)
Hors ligne
sergeG75018
Re : [astuce] Un fichier HOSTS qui combat les pubs et liens malveillants !
Ça fonctionne pas avec epiphany
Hors... |
The first thing to do after a successful completion of the file dialog is ask the dialog what the selected pathname was, and then use this to modify the frame's title and to open a BookSet file.
Take a look at the next line. It reenables the BookSet menu since there is now a file open. It's really two statements in one... |
gtk.Settings — an object that contains the global settings for thewidgets on a gtk.gdk.Screen
class gtk.Settings(gobject.GObject):
def set_string_property(name, v_string, origin)
def set_long_property(name, v_long, origin)
def set_double_property(name, v_double, origin)
Functions
def gtk.settings_get_d... |
I'm trying to create a super-simplistic Virtual In / Out Board using wx/Python. I've got the following code in place for one of my requests to the server where I'll be storing the data:
data = urllib.urlencode({'q': 'Status'})
u = urllib2.urlopen('http://myserver/inout-tracker', data)
for line in u.readlines():
print... |
Android is not going to be as easy as iOS. There is no Bonjour equivalent.
Android 4.0, Ice Cream Sandwich, introduced Wi-Fi Direct Peer to Peer networking. At first I hoped it might be able to be scanned in the the way your thinking, but it helps Android devices communicate without an access point, so they're not real... |
Python 3/ 1780C
This problem can be converted to the exact cover problem. We can use Knuth's AlgorithmX to solve the exact cover problem.
I'll post the details about converting from input data to a 0-1 matrix later. It's very interesting.
Solving exact cover problem with AlgorithmX is very fast. On my machine, the exam... |
I have searched high and low on this site and many others and have found similar questions, but none of the answers have worked for me (usually just accounting for the tuple). I'm writing a python script to parse html pages and populate a database. I have almost everything working except the populating part...
Here is ... |
Topic: iRedMail in jail?
Do iRedMail is working in jails?
----
Urgent issue? Pay iRedMail developer to solve it remotely at $39.
Works on Red Hat Enterprise Linux, CentOS, Debian, Ubuntu, FreeBSD, OpenBSD
You are not logged in. Please login or register.
Do iRedMail is working in jails?
----
Sorry, you didn't explain cl... |
Make a tiny Python script named "UpdateSRS.py":
import sys
from glob import glob
from osgeo import gdal, osr
# Define your projection here
sr = osr.SpatialReference()
# For example, UTM Zone 11
sr.SetUTM(11)
sr_wkt = sr.ExportToWkt()
file_list = set()
for arg in sys.argv[1:]:
file_list.update(glob(arg))
for file in... |
I have a trouble with PySide/PyDev/Eclipse
I typed this code :
import sys
from PySide.QtWebKit import *
from PySide.QtCore import *
from PySide.QtGui import *
app=QApplication(sys.argv)
web=QWebView()
web.load(QUrl('http://google.com'))
web.show()
Eclipse shows red crosses on the side, and says QApplication and QWebVi... |
def makecounter():
return collections.defaultdict(int)
class RankedIndex(object):
def __init__(self):
self._inverted_index = collections.defaultdict(list)
self._documents = []
self._inverted_index = collections.defaultdict(makecounter)
def index_dir(self, base_path):
num_files_indexed = 0
all... |
I have Ubuntu 8.10, and I'm trying to get compiz to start. It complains that Xgl, texture_from_pixmap and "Composite extension" are all not present.
It works fine when I only have one monitor enabled.
Here are most of the system details below:
# When starting compiz, I get these errors:
--------------------------------... |
#0 Re : -1 » Votre pseudo: » Le 19/08/2009, à 19:33
#1 Re : -1 » Generateur de sources.list en Francais » Le 16/08/2009, à 09:46
#2 -1 » Homeplayer ko » Le 31/08/2009, à 05:00
Hopeless01
Réponses : 4
Bonjour,
Il m'est impossible de lancer HP, que ce soit via le lanceur ou via homeplayer.sh. Or il y a deux jours il fonc... |
For me, SVG has something of the magical flair I first found in HTML in the nineties, back when it was the new bleeding edge New Thing, but I argue that it's even more fun than HTML was. The W3C SVG specs are not prohibitively difficult to read, and of course you have much greater graphical freedom than structured docu... |
Working with Python, Twisted, Redis and txredisapi.
How can I get the SubscriberProtocol for subscribe and unsubscribe to channels after the connection has been made?
I guess I need to get the instance of the SubscriberProtocol and then I can use "subscribe" and "unsubscribe" methods but don't know how to get it.
Code ... |
Desired Output
I want a function to return a list such that, given a "jumbled" list l, each element is the index of the corresponding element of l, if l was sorted. (I'm failing to think of a less convoluted way of saying this, sorry.)
Examples
f([3,1,2]) = [2,0,1]
f([3,1,2,2,3]) = [3,0,1,2,4], since the input sorted i... |
It's tremendously difficult to argue a RESTful approach to a service-oriented architecture (SOA), when the corporate mindshare is SOAP--where project stakeholders tout the SOA buzzword, nod their heads sagely when you say SOAP, nod their heads again when you say XML-RPC, and then look blankly when you mention REST. At ... |
Maisondouf
Re : Postfix est en train de me rendre fou ...
Pourtant à première vue, ce que tu veux pouvoir gérer n'est pas spécialement complexe mais je ne sais peut-être pas tout.
ASUS M5A88-v EVO avec AMD FX(tm)-8120 Eight-Core Processor, OS principal Precise 12.04.1 LTS 63bits½
Bricoleur, menteur, inculte, inadapté s... |
peterp@n
Re : Logiciel de CAO 2D/3D (Conception Mecanique)
Cool, ca se paufine bien tout ça.
C'est avec quelle versions exactement la vidéo ?
Ubuntu 12.04 64bits, Raspbian “wheezy”, Tango Studio sauce debian
Un bureau d'études techniques pour le bâtiment avec des logiciels libre.
Entreprise de construction bois. - Form... |
A few years ago, I moved a co-located site over to Amazon Web Services. This included web servers, data base servers, load balancers, etc. At the time I figured an ample 8GB would be sufficient space to house our modest Postgresql database. I was right… for a time.
Two years after the move, we started to run out of spa... |
Components and plugins
Components and plugins are relatively new features of web2py, and there is some disagreement between developers about what they are and what they should be. Most of the confusion stems from the different uses of these terms in other software projects and from the fact that developers are still wo... |
Fair warning, complete newbie to python, just wanted to implement something in python, Any suggestions welcome. Build tree with 10000 runs in 0.2 sec. Where as 10000 calls of query runs in around 30 sec. Something must me wrong. Build tree takes O(n),where as 10000 queries should take O(n logn). Any help appreciated.
c... |
wlourf
Postez vos scripts Lua pour Conky !
Bonsoir à tous ceux pour qui chaque pixel du bureau compte,
J'ouvre ce topic suite aux discussions sur le topic des conky pour discuter des scripts Lua dans conky.
Lua est un langage de script léger et facile a utiliser qui permet d'ajouter de nouvelles fonctionnalités à nos c... |
I thought I would share the part of my twitterbrite scripts that uploads videos to Youtube. Its about 30 lines long, and took me an hour or so to write. Most of my time was spent figuring out form fields to fill out rather than writing code though….
I’ve broken the script down to three parts: logging in, setting the vi... |
I've been trying to find RAII in Python. Resource Allocation Is Initialization is a pattern in C++ whereby an object is initialized as it is created. If it fails, then it throws an exception. In this way, the programmer knows that the object will never be left in a half-constructed state. Python can do this much.
But R... |
henry-006
Re : [script] Pixup : Poster une image rapidement sur un forum
ah désolé, moi ch'suis allé direct dans la logithèque, comme un bon bourrin,
OS: Ubuntu 12.10 (Quetzal quantal ) 64 bits + Windows XP pro SP2 x32 en double boot
PC Medion / Processeur: Intel core2 Duo (CPU 2.80GHz) Mémoire vive:3029 MiB
Carte Grap... |
I have two problems:
Button 'Today' does not work because the calendar is not initialized with the selected value, and initialize the current month.
I need override onclick for button 'Done' - how do this?
script:
$('.datefield_month').datepicker({
changeMonth: true,
changeYear: true,
... |
enebre
Re : Gmediafinder : Youtube/dailymotion/vimeo.. sans flash et bien plus....
bonjour smo,
je viens de réinstaller gmf sur mon petit netbook et
git clone git://github.com/smolleyes/gmediafinder2.git gmf2
cd gmf2/Gmediafinder
python gmediafinder.py
je constate que python-mecahanize n'est plus intégré dans les deps... |
The major weakness of your algorithm is that, for every subword, you need to compare it to every other word in the dictionary. You don't need to do that, really - if your word begins with 'a', you don't really need to see if it matches words that begin with 'b'. If the next letter is 'c', then you don't really care to ... |
#0 Re : -1 » Laptop pour le lycée » Le 14/09/2014, à 12:51
#1 Re : -1 » Lecteur-graveur CD/DVD - Lubuntu - Toshiba P10-104 dysfonctionnement » Le 18/09/2014, à 00:01
J5012
Réponses : 4
- le tiroir s'ouvre → presence de 12V
- il anihile completement une souris usb ... → probleme de 5V + insuffisance de courant (moins de... |
Traceback (most recent call last):
File "/usr/lib/python2.7/runpy.py", line 162, in _run_module_as_main
"__main__", fname, loader, pkg_name)
File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
exec code in run_globals
File "uploader.zip/__main__.py", line 10, in <module>
File "uploader.zip/__main_... |
yann458
Probléme avec l'utilitaire Motion
Bonjour,
L'utilitaire Motion fonctionne bien avec ma webcam.
Mais J'ai changer de webcam en passant à la marque Logitech c270 (edition limité) ,
l'utilitaire gucsview , à l'air de bin fonctionner.
Par contre avec l'utilitaire motion , ça ne marche pas et aucune mise à jour de c... |
What is 'if __name__ == "__main__"' for?
The if __name__ == "__main__": ... trick exists in Python so that ourPython files can act as either reusable modules, or as standaloneprograms. As a toy example, let’s say that we have two files:
$ cat mymath.py
def square(x):
return x * x
if __name__ == '__main__':
prin... |
malbo
[Tuto] identifier si on est dans un système UEFI ou Bios
ATTENTION : CETTE MÉTHODE D’IDENTIFICATION EST OBSOLÈTE : IL FAUT UTILISER LA PROCÉDURE DE LA DOC : http://doc.ubuntu-fr.org/efi#identifier … n_mode_efi
Le problème se pose pour des PC achetés en 2011 (et +) pour ceux qui souhaitent faire cohabiter Windows ... |
Hmm, bug in iRedAPD-1.3.8. Please find below lines in /opt/iredapd/libs/ldaplib.py (about line 209 to 212):
# Return if recipient account doesn't exist.
if recipientDn is None or recipientLdif is None:
self.logger.debug('Recipient DN or LDIF is None.')
return SMTP... |
xxkirastarothxx
Re : MegaUpload : BotMU v1.0.1
Tucan a l'avantage de gérer les captcha pour les services qui en ont (enfin... un popup s'ouvre avec l'image, et l'utilisateur doit saisir lui même le texte)
Aaah ok c'est comme ça qu'il fait.
Par-ce que j'ai déjà essayé de pété des capcha avec des OCR, pour certains ça fo... |
E
F
L
S
T
ONE_AS_ONE = '1 AS one'
exists?(conditions = :none) Link
Returns true if a record exists in the table that matches theid or conditions given, or false otherwise. Theargument can take six forms:
Integer - Finds the record with this primary key.
String - Finds the record with a primary key corresponding to this... |
general dev
cybrid at November 5th, 2005 08:08 — #1
Well, I'm totally new to this kind of class, so after searching a bit I found out this tuto about Singleton Pattern What I still don't understand very well is that in this piece of code
class Singleton
{
public:
static Singleton* Instance();
protected:
... |
alex2423
Plus d'accès à la TV de SFR via VLC sur le PC
Hello tout le monde,
Je fais partie de ceux qui n'ont pas de TV. J'ai juste un bel écran Dell 24" que j'utilise comme TV. Je regardais la TV avec VLC via le flux SFR.
Depuis 1 mois à peu près, je n'ai plus d'image. J'ai encore le son.
Est ce que vous avez ce meme s... |
JavaScript
todd_temple — 2014-01-09T11:07:17-05:00 — #1
I have a page shown here that uses a modified PrettyPhoto gallery. The modification is for it to show a thumbnail view of the other images within the same gallery along the bottom of the overlay image. Works well for me, but the client is unhappy about the small s... |
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... |
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... |
JavaScript
ckdoublenecks — 2011-04-11T12:23:44-04:00 — #1
I took a working program and modified it to use different values and can't seem to make it work now. I want have the datepaid, pd & paidsum insert when I key in the amtpaid .
<html><head>
<!--when the paidamt is keyed in, the current date, pd & paidsum are autoi... |
The Problem
The summarized problem is that I'm getting MemoryErrors thrown left and right when I package my application with PyInstaller. I suspect it has something to do with the main queue object not being garbage collected, however, I'm pretty in the dark here. It runs 100% OK when run from source and occupies only ... |
Screenshot / Code Snippet
import pyso
# Install the Server Fault API version 1.0.
pyso.install_site(pyso.APISite("api.serverfault.com", "1.0"))
# Get all the names of the moderators.
print list((m["display_name"] for m in pyso.get_all_moderators()))
# Get question titles by user ID.
print list(q["title"] for q in pyso.... |
Are there any experiments I can do to derive the speed of light with only common household tools?
I don't know if it qualify as home experiment, but you can use the internet to get access to thousands of kilometres of optical fibres for free. It allows you to measure the speed of light in the fibres, which is
From Pari... |
I have to implement Celery in a pre-existing system. The previous version of the system already used Python standard logging.
My code is similar to the code below. Process one and process two are non-Celery functions, which are logging everywhere. We are using the logging to track data loss if something bad happens.
@t... |
In the C construct, the conditional define #ifdef tests whether "SOMETHING" exists only, where your python expression tests whether the value of the expression is either True or False, in my opinion two very different things, in addition, the C construct is evaluated at compile time.
"something" based in your original ... |
evann83
Mode superutilisateur
Bonjour
Me voici avec un soucis que je n'arrive pas a résoudre:
j'aimera utiliser la commande "javac" pour pouvoir compiler un fichier java sur mon bureau mais apparement il n'a pas envie puisque il me demande d'installer la JDK, logique je me suis dis après coups. Me voilà parti pour inst... |
I have a large .txt with data in bad formats. I would like to remove some rows and convert rest of data to float numbers. I would like to remove rows with 'X' or 'XX', The rest I should convert to float, number like 4;00.1 should be converted to 4.001 The file looks like this sample:
0,1,10/09/2012,3:01,4;09.1,5,6,7,8,... |
In part 1 we covered how to access the project’s layer treeand read its data. Now let’s focus on building and manipulating layer trees.We’ll also look at how to receive updates about changes within a layer tree.
Starting with an empty project, first we will get access to the layer tree and create some memorylayers for ... |
I solved the problem using this (horribly inefficient method):
def createList(word, wordList):
#Made a set, because for some reason permutations was returning duplicates.
#Returns all permutations if they're in the wordList
return set([''.join(item) for item in itertools.permutations(word) if ''.join(item... |
Emails and SMS
Setting up email
Web2py provides the gluon.tools.Mail class to make it easy to send emails using web2py. One can define a mailer with
from gluon.tools import Mail
mail = Mail()
mail.settings.server = 'smtp.example.com:25'
mail.settings.sender = 'you@example.com'
mail.settings.login = 'username:password'
... |
ljere
Re : [5] Conky : Postez vos conkyrc ou certaines parties intéressantes
Bonjour,
J'avais posé une question dans la partie réseaux et internet du forum (http://forum.ubuntu-fr.org/viewtopic.php?id=1243931), mais peut-être qu'ici ce sera mieux.
Mon PC est connecté à internet via une clé 3G. J'ai un volume de télécha... |
use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
~11 users here now
News and links for Django developers.
I have tried to be happy with django, I really have. (self.... |
Free OPC-UA is LGPL C++ library to develop server and client OPC-UA applications. Python bindings can be found in the opcua-python repository.
The library is under development but works will all tested clients. It support addressspace browse, read, write and address space modification as well as subscriptions and datac... |
I TAed a mid-level class, though, so by the time I met the students, they didn’t just know how to program, they’d also mastered more in-depth concepts like pointers, recursion, computer architecture, and algorithms.
Last Sunday, for the first time, I had the chance to teach someone to programwho’d never written a line ... |
move along.
I’ve used Comcast as my ISP ever since they started providing Internet access in my area. We’ve been through some rough times together, but nothing in comparison to the nightmare that was BellSouth DSL. Recently EPB started offering fiber access. Hesitant to switch as I’ve grown rather fond of my IP address... |
In our previous article, we discussed what the POI project is all about, showed how to read and write OLE 2 Compound Document files, and gave a brief history of the POI project. Probably half of the folks who read that article are scratching their heads now, thinking "How do I write out a spreadsheet?" Good news! In th... |
I am running a cherrypy 3.2.0 server with Python 2.5.1, which gives the following error every few days on any instruction from UI until it is killed and re-started:-
[29/Mar/2012:06:37:57] HTTP Traceback (most recent call last):
File "/usr/lib/python2.5/site-packages/CherryPy-3.2.0-py2.5.egg/cherrypy/_cprequest.py", li... |
ids = []
for object in objects:
ids += [object.id]
You can use a list comprehension:
ids = [object.id for object in objects]
For your reference:
Both produce the same result. In many cases, a list comprehension is an elegant and pythonic way to do the same as what you mentioned.
Another way:
ids = map(lambda x: x.i... |
JavaScript
reedbird8 — 2012-10-02T13:44:41-04:00 — #1
Not sure if this is the best place to ask this, or if it can be done, but here it goes.
Is there a way to generate a tooltip anytime a certain word or phrase appears within my site? Ideally, I'd like to create a series of tooltips for some terminology. Essentially, ... |
Deployment recipes
There are multiple ways to deploy web2py in a production environment. The details depend on the configuration and the services provided by the host.
In this chapter we consider the following issues:
Production deployment (Apache, Lighttpd, Cherokee)
Security
Scalability
Deployment on the Google App E... |
pld1
Probleme de Fréquence avec Driver NVIDIA
Salut a tous
je réarive sur ce forum pour poster mon nouveau probleme de drivers propriétaires de carte graphique nvidia....
au moment de lancer X, il l met le logo nvidia, et hop, ecran noir avec ubuntu breezy et en dessous login, et 2s apres le logo nvidia, et 2s apres l'... |
VB.NET OOP Part 4: Determining Constructors
by Budi Kurniawan, co-author of
VB.NET Core Classes in a Nutshell
11/25/2002
We all know that constructors can be used to initialize values. But, did you know that you can use determining constructors to "shape" the objects of a class? In this OOP series article, Budi Kurniaw... |
Developing a PythonWin Sample Application
During the rest of this section, we will develop a sample application using PythonWin. This will lead us through many of the important MFC and PythonWin concepts, while also leveraging the dynamic nature of PythonWin.
MFC itself has a tutorial/sample called Scribble, which deli... |
An Introduction to GraphViz and dot
Pages: 1, 2
Basic Concepts of dot
A generic dot graph is composed of nodes and edges. Our hello.dot example contains a single node and no edges. Edges enter in the game when there are relationships between nodes, for instance hierarchical relationships as in this example, which produ... |
偏学术,比较抽象,不如《万历十五年》好看。
錢穆有文俠風,讀這本書,能看到這樣一個影子,上馬擊狂胡,下馬草軍書。他也是個民族主義者,提到元清,幾乎沒一句好話。所以要貫通國史,還得多讀讀別的書。總體來說,讀這本書時常感醍醐灌頂,為習國史者必讀。
自序中對治史的方法論讓我受益匪淺,本書語氣平和、娓娓道來,像講故事一樣講曆史,但又嚴謹、廣博、不膚淺,風格和其它史書大不一樣,我一直理想中的史書就是這樣,不要給曆史背太重的包袱,不要帶著一定要學點什麽的目的讀曆史。
本書的缺點是詳略失當。有些地方太簡略,比如匈奴的衰落,五單于爭立一筆帶過。有些地方太詳細,鴻門宴幾乎是史記的譯文。作爲一部通史,應該有大曆史觀,能站在較高的層面上把曆史的脈絡梳理清... |
lukophron
[python]Monsieur Cinéscript
Salut,
Suite à une demande, j'ai pondu un script python pour mettre à jour la liste des films trouvés sur le topic-jeu Quel film c'est ?
Ça tourne, ça remplit son objectif (et son deuxième objectif qui était de me remettre à apprendre Python ^^)
Maintenant, il y aurait mieux.
Je po... |
Using my rudimentary knowledge of Python, I was interested in exploring the use of rpy2 to eventually be able to bring together spatial data analysis done in Python, with some higher level tools in R – in this case the powerful graphics library ggplot2 to visualize the results.
My setup is Mac OS 10.7.3, Python 2.7, R ... |
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... |
Reading data from two text files
Oct 3, 2012 at 3:38pm UTC
Hello!
To start off with I am trying to pass a argument through the command line and look through two .text files. For example I would input a student number (lets says 111222333) from the command line, it would then look through both .txt files and display inf... |
YannUbuntu
Re : [glade2script-GTK3] Interface graphique pour script bash ou autre.
Coucou
qques news:
- l'inversion dans l'ouverture de l'expander entre gtk2 et 3 devait être un bug de gtk3 car maintenant dans Precise c'est revenu au même fonctionnement qu'avec gtk2.
- j'obtiens quelques warnings dans Precise :
ça n'a ... |
What I would like to figure out how to sum every two rows of an array. EG convert a to b in this example:
a=array([[ 0, 1, 2, 3],
[ 4, 5, 6, 7],
[ 8, 9, 10, 11],
[12, 13, 14, 15]])
b=array([[ 4, 6, 8, 10],
[20, 22, 24, 26]])
Current code looks something like this:
b=[]
for num in r... |
L4ur3nt
Accéder au NAS DNS320 depuis toutes les applications sur Ubuntu 12.10
Bonjour, j'ai un soucis de connection à mon NAS DNS 320 sur Ubuntu 12.10.
J'arrive à y avoir accès en recherchant dans le réseau local mais je parviens pas à "accéder au NAS depuis toutes les applications"
J'ai déjà consulté plusieurs anciens... |
Somebody please explain me the Miller Rabin Primality test
'And fun? If maths is fun, then getting a tooth extraction is fun. A viral infection is fun. Rabies shots are fun.'
'God exists because Mathematics is consistent, and the devil exists because we cannot prove it'
'Humanity is still kept intact. It remains within... |
I am a beginner with C++. I have a new project at work where I have to learn it, so I'm trying some things just to test my understanding. For this problem, I'm trying to read a file and then print it on screen. Super simple, just trying to get good at it and understand the functions that I'm using. I copied some text f... |
I want to save name of the error and the traceback details into a variable..
import sys
try:
try:
print x
except Exception, ex:
raise NameError
except Exception, er:
print "0", sys.exc_info()[0]
print "1", sys.exc_info()[1]
print "2", sys.exc_info()[2]
Output Getting:
0 <type 'excep... |
Music Theory for (Non)Musicians and (Non)Programmers
The Circle of Fifths, Part One
Introduction: The goal of this series to learn how to derive and encode all of music theory. While this is partly a programmer-centric series, you don't have to understand a single line of code to understand what is happening here. In f... |
It's not an easy task to find a vulnerable service and find an exploit for it. It's also not easy to defend against users who might want to exploit your system, if you are a system administrator. However, writing an exploit by yourself, to convert a news line from bug tracker into a working lockpick, is much more diffi... |
[ < ] [ > ] [ << ] [ Up ] [ >> ] [Top] [Contents] [Index] [ ? ]
libbzip2
This chapter describes the programming interface to libbzip2.
For general background information, particularly about memory use and performance aspects, you'd be well advised to read Chapter 2 as well.
[ < ] [ > ] [ << ] [ Up ] [ >> ] [Top] [Conte... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.