text
stringlengths
256
65.5k
I have a frame with a few different panels and every panel shall get the same background image. So I found this example: http://www.blog.pythonlibrary.org/2010/03/18/wxpython-putting-a-background-image-on-a-panel/ I copied the "def OnEraseBackground(self, evt)" from this example and Bind it to EVT_ERASE_BACKGROUND. Res...
I'm trying to learn how to utilize OAuth for an application I'm developing, and I can't seem to wrap my head around the verification code part and the point of a redirect URI. Here's what I have.. I don't understand the point of a redirect URI, and once I do get a valid verification code. How would I even go about pull...
What you should have done. >>> b='\xc3\xa9' >>> b '\xc3\xa9' >>> b.decode("UTF-8") u'\xe9' Since you didn't show the broken code that caused the problem, all we can do is make a complex problem more complex. This appears to be what you're seeing. >>> c u'\xc3\xa9' >>> c.decode("UTF-8") Traceback (most recent call last...
nad paquets casée Bonjour, je comprend pas dans le gestionnaire de paquet quand je veut faire une mise a jours il me dise de corrigee d'abord les paquets casser. je vois pas il sont ou les paquets casser, si vous pouriez m'aider sa serait super merci cette erreur et arriver apres que j'ai modifier le fichier source.lis...
i am looking to start doing a 5x5 (stronglifts, specifically), but i have a grade 2 AC joint separation in my shoulder from a while ago. my physical therapist had me doing isolations to help strengthen the muscles supporting the joint, and has now cleared me to start doing any lift i want, just advising that i start wi...
if month == 1 or 10: month1 = 0 if month == 2 or 3 or 11: month1 = 3 if month == 4 or 7: month1 = 6 if month == 5: month1 = 1 if month == 6: month1 = 4 if month == 8: month1 = 2 if month == 9 or 12: month1 = 5 This code always returns month1 5. I'm quite new at programming, what am I doing ...
The Moko b>Note: at the end of this article is a rebuttal I saw an ad for Polaroid recently that consisted of a polaroid picture of a guy with a full facial moko (as well as a bald head and what appears to be at least a 4 ga hoop through his earlobe). The copy is a dialogue between two parents about their daughter's n...
Le Viking Miro refuse de se lancer :-( Salut à tous, Je rencontre un pb avec Miro, logiciel qui a par ailleurs l'air alléchant. Je l'ai installé via Synaptic, en rajoutant la ligne "ad hoc" dans les dépà´ts et l'icà´ne apparaà®t bien dans mon menu d'applications, mais rien ne se passe quand j'essaie de le lancer. J'ai ...
I have been looking at form validation in python using Django as this seems to be the default way to do it, other than checking each field, performing some validation and kicking out a specific message for each field that is badly formed. Ideally I want the benefits of form validation, but I do not know how to couple t...
Code Hard-Wrapping. I've configured Vim to automatically (as I type) hard wrap long lines of comments on 80 columns. Works well. However, it does not seem to wrap code automatically. I thought adding set formatoptions+=t (currently I have set formatoptions=c,r,q,a,n) would do the trick, but it does not. Additionally, i...
Here is a input list: ['a', 'b', 'b', 'c', 'c', 'd'] The output I expect should be: [[0, 'a'], [1, 'b'], [1, 'b'], [2, 'c'], [2, 'c'], [3, 'd']] I try to use map() >>> map(lambda (index, word): [index, word], enumerate([['a', 'b', 'b', 'c', 'c', 'd']]) [[0, 'a'], [1, 'b'], [2, 'b'], [3, 'c'], [4, 'c'], [5, 'd']] How c...
I have an application with a "BaseVisibilizer" class that is base class for two other classes: class BaseVisibilizer(declarativeBase): __tablename__ = "base_visibilizers" _polymorphicIdentity = Column("polymorphic_identity", String(20), key="polymorphicIdentity") __mapper_args__ = { ...
I've been working on using python to get access to Facebook insights information. I was able to get public information (e.g. 'likes' from cocacola's page) in addition to app insights for apps that I have developed. Because I am the admin and developer for both pages and apps, when I go to facebook.com/insights I will s...
Your Code !! import time,TestClass n1,n2,n3 = 250,250,250 z = TestClass.zeros(n1,n2,n3) start = time.time() TestClass.overloaded([z,z,z]) print 'time =',(time.time()-start) Facts !! Jython is Java based (well we already know that !!) When you do n1,n2,n3 = 250,250,250 and say z = TestClass.zeros(n1,n2,n3) then essenti...
Say I have settings.py file with a bunch of constants (maybe more, in the future). How do I access those variables in a Jinja template? Flask automatically includes your application's config in the standard context. So if you used You need to define a @app.context_processor def inject_globals(): return dict( ...
In a twisted application you can install more than one protocol-factory-client instance Twisted will handle connection for all application. So you can instanciate as server/client as you want and , you're right , reactor.run() must be launch only one time. So you can import your protocole and thant run the reactor loop...
I want to generate a string of size N. It should be made up of numbers and uppercase English letters such as: 6U1S75 4Z4UKK U911K4 How can I achieve this in a pythonic way? ''.join(random.choice(string.ascii_uppercase + string.digits) for _ in range(N)) >>> import string >>> import random >>> def id_generator(size=6, ...
Extending on Tadeck's Django answer above, the use of 'class Meta:' in Django is just normal Python too. The internal class is a convenient namespace for shared data among the class instances (hence the name Meta for 'metadata' but you can call it anything you like). While in Django it's generally read only configurati...
See object.__hash__ Notice that Changed in version 2.5: __hash__() may now also return a long integer object; the 32-bit integer is then derived from the hash of that object. In your case, expected 12544897317L is a long integer object, Python derived the 32-bit integer -340004569 by (12544897317 & 0xFFFFFFFF) - ...
Module: Math Defined in: math.c Overview The Math module contains module functions for basic trigonometricand transcendental functions. See class Float for a list ofconstants that define Ruby's floating point accuracy. Defined Under Namespace Classes: Constant Summary PI = DBL2NUM(atan(1.0)*4.0) E = DBL2NUM(exp(1.0)) C...
blob: 4b0e3021563655b1fe896d757b4dc6a7cb64fa89 ( plain ) # $Id$ # # Portuguese (Portugal) translation of Drupal (print) # Copyright YEAR NAME <EMAIL@ADDRESS> # msgid "" msgstr "" "Project-Id-Version: PROJECT VERSION\n" "POT-Creation-Date: 2009-05-13 03:16+0200\n" "PO-Revision-Date: 2009-05-13 13:04+0100\n" "Last-Transl...
I'm trying to match a "#" followed by letters if and only if it's preceded by newline, whitespace or is the first character in a string. The first two I've done, but I'm having a hard time matching if it's the first character in a string. I'm trying to find a use for '\A', but it doesn't work to just add it to the clas...
I am a very novice python user so please pardon if I am violating any user ettiquette. Please help, I have a text file that looks something like this: ID: 000001Name: John SmithEmail: jsmith@ibm.comCompany: IBMblah1: ablah2: bblah3: cID: 000002Name: Jane DoeEmail: jdoe@ibm.comCompany: IBMblah1: ablah2: bblah3: cID:0000...
Introduction "How do I remove duplicate rows from a table" is a common questionin the newsgroups, and here we will look at a few different techniques forachieving this. Databases can easily be designed to disallow duplicates (which I will discussat the bottom of the article) but the issue can still arise. For example,d...
PyPN is an extension that allows you to use Python to script almost anything in PN. This can be simple text formatting, or complex macros for automation. See Install PyPN for installation instructions. After PyPN is installed, go to View > Window > Scripts (or press Alt+F10). You should be able to see the Scripts menu,...
I've recently given Microsoft's Azure Cloud Framework a try and have written down the steps I followed to successfully deploy a python Flask app on an Azure VM. To set up an account with Azure, go here. Microsoft is currently offering a 90 day free trial of their cloud services. A bit of disclaimer before we get starte...
Wget prints out speed information to stdout in a very clear manner, where the speed is shown and refreshed whilst the file is downloaded, and a bar scrolls across the screen. I'd like to replicate this sort of output, in a Python program. How is this possible? I thought the curses library should be able to do this; thi...
chaoswizard Re : TVDownloader: télécharger les médias du net ! Une idée ca pourrait sympas aussi de récupérer a partir de daylimotion ou youtube : vous savez genre des chaines de groupe : http://www.youtube.com/user/ProdigyChannel exemple france inter : http://www.dailymotion.com/franceinter C'est jouable. Dans ce cas ...
Using MCEdit, you can go back to your original spawn point by using "Move Spawn Point" on the hotbar and select "Goto Spawn". Then you can follow your history to try to figure out where your bed is. If you really can't figure out, you can try the following MCEdit Filter. It will help you find your bed, but may actually...
I am a physicist who is trying to model the current-voltage characteristics of a superconductor-superconductor junction. The equation for this model is: \begin{align} I(V) = \frac{1}{eR_{\mathrm{n-n}}}\int_{-\infty}^{\infty}\frac{|E|}{[E^{2} - \Delta_{1}^{2}]^{1/2}}\frac{|E + eV|}{[(E + eV)^{2} - \Delta_{2}^{2}]^{1/2}}...
I have three constraints, and, as usual, I can only figure out how to satisfy any two of them at the same time: Multi-dimensional array Named columns Different columns include different data types (so everything in col 1 is a string, but col 2 is all Decimal, etc.) I'm currently using numpy ndarrays to store my data wi...
Going from a base class to a derived class is generally a sign of bad design in a program. The method you propose, using hasattr, can be a serious problem. I'll show you: # defined in some open source library class MyObject(object): def what_is_derived(self): if hasattr(self, 'derived1'): return...
I have a simple function to remove a "word" from some text: def remove_word_from(word, text): if not text or not word: return text rec = re.compile(r'(^|\s)(' + word + ')($|\s)', re.IGNORECASE) return rec.sub(r'\1\3', text, 1) The problem, of course, is that if word contains characters such as "(" or "...
Today I finally took the plunge and upgraded my desktop machine from 11.10 to 12.04 using the upgrade process, not a fresh install. One of the first things I tested after the upgrade completed was a little python library I have that plays sound through pulseaudio, basically a python 2.x port of the answer to http://ask...
Recommended usage. The short answer is: Use markdown(untrusted, safe_mode=remove, enable_attributes=False). Make sure you have an up-to-date version of the Markdown library, as older versions have some security problems. You could also run the output through a HTML sanitizer, like HTML Purifier. Rationale. It is a good...
Can you recommend a minimalistic python webserver that I can embedded in my Desktop Application. How minimalistic and for what purpose? SimpleHTTPServer comes free as part of the standard Python libraries. I'm becoming a big fan of the newly released circuits library. It's a component/event framework that comes with a ...
Short version: Is there way to achieve in Python the same effect achieved by Perl's Carp::carputility? Long version (for those unfamiliar with Carp::carp): Suppose we are implementing some library API function (i.e., it is meant to be used by other programmers in their code), say spam, and suppose that spam includes so...
This month we'll use NumPy and DISLIN to create, display, and manipulate a basic geometric image. At the heart of image manipulation are special matrices that can be used to create effects. You can use these effects separately or combine them for more complex operations. While the focus is on two-dimensional operations...
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...
From time to time I come to ideas of actions I'd like to have available in a menu which pops up when I right-click on files in Nautilus. How to add them there? Is there something like Thunar UCA plugin for Nautilus? Context menus of Nautilus can be customized by Nautilus extensions. You can also place plain shell scrip...
I am getting confused on how to design the architecure of crawler. I have the search where I have pagination: next page links to follow a list of products on one page individual links to be crawled to get the description I have the following code: def parse_page(self, response): hxs = HtmlXPathSelector(response) ...
I create a custom db.Property subclass: class PropertyFoo(db.StringProperty): def validate(self, value): # Yes this is a pointless validator, but please read on return value def get_value_for_datastore(self, model_instance): return super(PropertyFoo, self).get_value_for_datastore(model_instance) def m...
I basically want to save the facebook ID of a given user so I can receive more material via Facebook. Ideally I want a solution that neither uses javascript nor cookie, just serverside but there was no example, just directions, so I've put together one we can discuss. Here's the code that I think works when I just link...
I'm plotting some histograms and having trouble with the histtype=stepfilled. The filling curve has obviously some wrong anchor points: Or am I missing some settings? The code is pretty straight forward: ax2 = fig.add_subplot(212) ax2.hist(self._neutrinoEnergies, histtype='stepfilled', color=colors.pop()) ax2.set_title...
There's two parts to this answer. First you need to expose your interface in Python in a way which allows Python implementations to override parts of it at will. Then you need to show your C++ program (in main how to call Python. Exposing the existing interface to Python: The first part is pretty easy to do with SWIG. ...
I am trying to plot data that I receive over a socket. I am using "Matplotlib" as the plotting library and "cPickle" to serialize python objects. When I run my code, plot window opens and hangs up. I have tried a couple of ways to get around it, but no help Don't know if this might help, but...I am using "Python 2.7 - ...
®om [Sondage] Temps de démarrage Salut, Quelle est votre durée de boot sous ubuntu hardy, entre le moment où vous appuyez sur "POWER" et le moment où tout est totalement chargé? Moi entre 1mn30 et 2mn. Je trouve que c'est assez long, et je voudrais savoir si ça fait pareil chez tout le monde. Ce qui se lance au démarra...
You are never calling your squares function, so it is not doing anything. List comprehensions are in fact faster: >>> import timeit >>> def squares(values): ... lst = [] ... for x in range(values): ... lst.append(x*x) ... return lst ... >>> def squares_comp(values): ... return [x*x for x in ran...
I don't know what you mean by "overriding the entire view", because this kind of thing is what makes Django so nifty to use, the ability to bolt on extra functionality without too much fuss. Assuming that I'm not about to put my entire foot into my mouth, this is how I would approach it: Adding notes to something shoul...
According to the urllib2 documentation, Because the default handlers handle redirects (codes in the 300 range), and codes in the 100-299 range indicate success, you will usually only see error codes in the 400-599 range. And yet the following code request = urllib2.Request(url, data, headers) response = urllib2.urlopen...
I'm trying to brush up on my python skills, and I'm dicking around with writing classes but I seem to have run into a really confusing error. Despite importing the .py file containing my class, python is insistent that the class doesn't actually exist. class def: class greeter: def __init__(self, arg1=None): ...
#8526 Le 21/02/2013, à 22:33 The Uploader Re : Topic des Couche-Tard (cinquante-sept) Pas chez moi. Passer de Ubuntu 10.04 à Xubuntu 12.04 LTS ASUS N56VV (UEFI + GPT, Core i5-3230M @ 2.60GHz, Intel HD4000 + GeForce 750M, 12 Go de RAM, SSD 1 To) Système principal : Archlinux (amd64), avec KDE Système oublié la plupart d...
So this is my first project with Django. As a result, I seem to learn new things about how it handles models every day. Because of this, my database is changing every day. Each time I want to update my database, I need to drop it, create it, run syncdb, and then populate it with user data. I was hoping to automate this...
I have a matplotlib code for creating a set of three subplots which share the same axes. My problem is that I am trying to plot an ellipse on each of these subplots, but the ellipse only shows up on one of the subplots. Can anyone tell me what I'm doing wrong? Sorry if this kind of thing has already been answered elsew...
I'm starting to use Flash CS6 for the first time to try and make Scaleform UI's for UDK. I'm following this simple tutorial: http://goo.gl/yedMU. I've followed it to the letter but can't seem to get it to work. I even have tried it again in a new project but it ends up with the same error. I've triple checked each name...
Modules are dynamic components that you can drop into a template. The end-user will then get a chance to configure the component for each page that they user creates. Some of our modules include: "text", "image", "rich_text", "form", and "menu": A module is added to a page like so: {% module_type "a_unique_name" label=...
#0 Re : -1 » Open Office, Reconnaissance de caractères, Xsane, Kooka et Cie... » Le 31/07/2007, à 20:24 Scoaz Réponses : 516 Bonjour, J'ai un "problème" dans le genre. J'essaye de travailler avec kooka/ocrad ou kooka/gocr, mais le résultat est catastrophique. Ce que je tente de faire est assez spécial. Il s'agit de rec...
def on_btn_new_subject_activate(self, widget): self.subjects.append_page(Gtk.TextView(), "Testing") I am trying to create a new tab on a text area but I whenever the signal is called by the event (I click the button), this happens: TypeError: Expected Gtk.Widget, but got GObjectMeta I have also tried variations on...
As part of a larger program, I am using git to check the program itself for updates. Of course, the user will need git installed to do so. I've created a small bit of python3 code to check if the user has git installed, but it does not seem to work: import linecache import time import os git = linecache.getline('info.t...
metalux [Résolu]Erreur python avec add-apt-repository Bonjour, Tout est dans le titre. Voici le retour du terminal Exception in thread Thread-1: Traceback (most recent call last): File "/usr/lib/python2.7/threading.py", line 551, in __bootstrap_inner self.run() File "/usr/lib/python2.7/dist-packages/softwarepro...
I'm using fixture to test a Pylons app, but I stumbled upon a problem. Let's say I have such data set: class CompanyData(DataSet): class test_company: company_full_name = u'Firma Tęst' company_short_name = u'TęstCo' class UserData(DataSet): class test_user: user_login = 'testuser' ...
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... ~19 users here now A sub-reddit for the timeless and infinitely powerful editor. Want to see what Emacs is capable o...
For Python: >>> import random >>> dst = 70, 20, 10 >>> vls = 'a', 'b', 'c' >>> picks = [v for v, d in zip(vls, dst) for _ in range(d)] >>> for _ in range(12): print random.choice(picks), ... a c c b a a a a a a a a >>> for _ in range(12): print random.choice(picks), ... a c a c a b b b a a a a >>> for _ in range(12):...
PPdM goolgle et Ubuntu 64bits Salut Je vous soumet un probleme recurent que je croyais du a ma config matérielle mais qui se manifeste sur un autre PC totalement différent. Les accès a google (tout les sites) sont très lent quand ce n'est pas impossible sur les config en 64 BIts, j'ai deux PC (un portable et un fixe) q...
How do I get a list of all files (and directories) in a given directory in Python? This is a way to traverse every file and directory in a directory tree: import os for dirname, dirnames, filenames in os.walk('.'): # print path to all subdirectories first. for subdirname in dirnames: print os.path.join(...
After configuring and installing IPython to run under python3, as explained by this wiki, and having completed all the steps, I still get: gmask@Gbuntu:~$ ipython3 qtconsole No command 'ipython3' found, did you mean: Command 'ipythonx' from package 'ipython' (universe) Command 'ipython' from package 'ipython' (universe...
I am trying to make a search engine, running on the web. So I used mod_wsgi to get the query from the webpage by python. Then, I used zeromq to send the query to C++ searching program. But the problem is, it seems zeromq and mod_wsgi does not work together. It is definitely true that python can import zmq (I tested it)...
I normally use avidemux to convert mp4s to Xvid AVI for my Philips Streamium SLM5500. Normally I select MPEG-4 ASP (Xvid) at Two Pass with an average bitrate f 1500kb/s for video and AC3 (lav) audio and it converts correctly. However, I'm trying to using avconv so I can automate the process with a script, but when I do...
Your other option, which I hadn't even considered, is to implement the sum in sparse format yourself, so that you can take full advantage of the periodic nature of your array. This can be very easy to do, if you abuse this peculiar behavior of scipy's sparse matrices: >>> a = sps.csr_matrix([1,2,3,4]) >>> a.data array(...
This greeted me with a friendly debugger prompt. What next? I always like to know where I am, so doing a list is a good start: (Pdb) l 30 except: 31 #if we hit an exception, we can rely on tmp_dict being a backup to the point of the exception 32 return...
Consider code like this: import numpy as np cimport numpy as np cdef inline inc(np.ndarray[np.int32_t] arr, int i): arr[i]+= 1 def test1(np.ndarray[np.int32_t] arr): cdef int i for i in xrange(len(arr)): inc(arr, i) def test2(np.ndarray[np.int32_t] arr): cdef int i for i in xrange(len(arr)):...
Networking is an essential task in software applications nowadays. Many programming languages have support for network programming to various extents. While the core libraries of most languages allow low-level socket programming, other libraries and third-party extensions often facilitate higher-level Internet protocol...
Does anybody have an Xcode script for generating @property and @synthsize directives for instance variables in a class? I use Accessorizer which does this and a whole lot more. very inexpensive and powerful. This is the one I came up with based on one I found a long time ago, rewritten in Python and with the improvemen...
raspouillas Re : Topic des lève-tôt… Faisons manger leurs caleçons aux couche-tard! [4] Je ne faisait aucune allusion au problème de @souen. Dernière modification par raspouillas (Le 15/06/2012, à 20:37) ljere Re : Topic des lève-tôt… Faisons manger leurs caleçons aux couche-tard! [4] alors voici la première partie du ...
If you want to give a little life to interactive (or not) elements, it’s always nice to have more tricks to manipulate images for nifty effects. One of such ways is mapping a Texture on a special canvas instruction, that will distort your texture based on the position of its points. [kivy.graphics.Mesh](http://kivy.o...
n3o51 Re : ADesk Bar : Barre de lancement rapide [python/gtk/cairo] Ah ok je regarde ça merci, bone je n'arrive pas as avoir les options du plugins c'est ou ? je clique dessus est pas possible de modifier Dernière modification par n3o51 (Le 08/02/2012, à 21:10) Welcome to the real world ________________________________...
Hello. This is my first post so I hope I don't mess it up too bad . I'm working on the audio code for a language called Unicon and am having some trouble getting the linux code to work properly with threading and playing more than one sound at a time. We are using openAL and OggVorbis for now with some support for MP3 ...
I'm designing a GUI python program and I decided to use GTK+3. Reading some docs here: http://python-gtk-3-tutorial.readthedocs.org/en/latest/index.html I know that I could use the gi.repository.Gtk module as API to GTK+3 libs. But while I'm trying to do so it keeps warning me that it is using the GTK+2 module: >>> imp...
The centerpiece of the Django object-relational mapping scheme is the Model. A model is the single, definitive source of information about your data. It contains the essential fields and behaviors of the data you’re storing. Generally, each model maps to a single database table, in a way that is mostly decoupled from...
When trying to refresh a materialized view based on a query that uses a mssql table (using the SqlServer Gateway), I run into the following error: After some investigation I found this was caused by a “NOT NULL” constraint on the mview-table. A small scenario: ORA-12008: error in materialized view refresh path ORA-0140...
JavaScript newguy99 — 2012-10-06T10:37:52-04:00 — #1 Hello Every one Im using window.open(URL,name,specs,replace) to open a new page it works fine with Chrome V22 and Firefox 12 But when i use it with IE9 it gives me a strange behavior When i click it open a new page but the original page changes to the main root of th...
I am using WSGI 3.3 for python 2.7.3 (32bit) for Apache 2.2. I got the binary WSGI from http://code.google.com/p/modwsgi/downloads/detail?name=mod_wsgi-win32-ap22py27-3.3.so. I have been trying to deploy an application but keep on receiving the ImportError: no module named _socket. I have included my wsgi and error log...
senjy Erreur fatal postfix sur email en spam ou pas Bonjour, J'ai installé un serveur postfix et j'utilise un script php maison qui marche, mais le résultat est un peu étrange. 1. Certains mails envoyés partent dans la boite spam de l'utilisateur 2. D'autres envoyés fonctionnent Dans /var/log tout semble tres bien se p...
In my project, I use the multiprocessing class in order to run tasks parallely. I want to use threading instead, as it has better performance (my tasks are TCP/IP bound, not CPU or I/O bound). multiprocessing has wonderful functions, as Pool.imap_unordered and Pool.map_async, that does not exist in the threading class....
Simple question: I am using pyplot, I have 4 subplots. How to set a single, main title above all the subplots? title() sets it above the last subplot. Use plt.suptitle: import matplotlib.pyplot as plt import numpy as np fig=plt.figure() data=np.arange(900).reshape((30,30)) for i in range(1,5): ax=fig.add_subplot(2,...
How Shellcodes Work by Peter Mikhalenko 05/18/2006 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 ...
first post here.In Django, I want to have many files be associated with a particular model, so I'm doing a seperate model called files and have model 'A' 'have many' files. But I want my files to be saved in director named by model 'A'. So For example I want something like this: class Show(models.Model): name = mo...
Create a VBO containing all of the sprite's frames, and make your glDrawArrays call with the appropriate (frameNumber * 4) in the first param. If you want to get even more clever about it, you could make it a static VBO and do your billboarding formula in your vertex shader. The sprite origin would then become a shader...
Mindiell Re : Topic des lève-tôt… Faisons manger leurs caleçons aux couche-tard! [4] Si c'est Floyd Pepper... Eh mais c'est l'week-end ! Hors ligne PPdM Re : Topic des lève-tôt… Faisons manger leurs caleçons aux couche-tard! [4] Bonjour, Golgoth devait en bricoler un mais il n'a pas dis quand! Hors ligne raspouillas Re...
Topic: OpenOpt does not give consistant results I have tried to use OpenOpt but I have some troubles because it does not always give the same result even though the input is exactly the same. Is there some kind of random initial guess build into the optimizer or am I missing something. Below I have an example from matp...
See Understanding Techniques for WCAG Success Criteria for important information about the usage of these informative techniques and how they relate to the normative WCAG 2.0 success criteria. The Applicability section explains the scope of the technique, and the presence of techniques for a specific technology does no...
HelloI am trying to deploy my django project which is located at home/doga/headend/ and just to run it on the localhost (will be a LAN accessable project). My main problem is that I can use the site well however the /admin/ folder is giving me Internal Server Error error. anyway here is my etc/apache2/sites-available/d...
I have a web page containing a login form which loads via HTTP, but it submits the data via HTTPS. I'm using python-mechanize to log into this site, but it seems that the data is submitted via HTTP. My code is looks like this: import mechanize b = mechanize.Browser() b.open('http://site.com') form = b.forms().next() #...
Context processors are awesome. Say you have a different user model and you want to includethat in every response. Instead of doing this: def myview(request, arg, arg2=None, template='my/template.html'): ''' My view... ''' response = dict() myuser = MyUser.objects.get(user=request.user) response['my_use...
Occasionally, my system gets into a state where some kernels are missing a module or two, because DKMS somehow forgot to compile those modules for that kernel. Rather than spend time diagnosing the problem, it would be nice if there was a single command I could run that woudl just rebuild every dkms-controlled module f...
I am uploading files to my shell account using scp. As I need different permissions on the server than on my computer, I'd like to have a way to easily change the permissions upon upload without needing to ssh to the account and change them manually. If you're copying from a windows machine, you can use WinSCP to copy,...
kidseb Probleme conky et température cpu Bonjour Je souhaite afficher la température de mon cpu (qui en passant et AMD FX6200) J'ai installer lm-sensors, et avec la commande sensors : it8720-isa-0228 Adapter: ISA adapter in0: +0.90 V (min = +0.00 V, max = +4.08 V) in1: +1.49 V (min = +0.00 V, max...
I have a model class defined as below: class Vehicle(models.Model): stock_number = models.CharField(max_length=6) vin = models.CharField(max_length=17) year = models.PositiveSmallIntegerField() manufacturer = models.CharField(max_length=15) manufacturer_popularity = models.CharField(max_length=1, bl...
xbindkeys.. sudo apt-get install xbindkeys Xbindkeys is a very versatile program that lets you remap keys very easily. It uses a config file, my default located in your home directory, to change key bindings into certain commands. To create a default config file you use the command: xbindkeys --defaults Which prints t...
I've implemented most of the BitTorrent protocol in Java. The problem is that for some reason none of the peers are sending me any of the pieces I request. (After 3 hours I received only 2 piece-messages) My handshaking is as follows: send 19 send "BitTorrent protocol" send 8 zero'd reserved bytes send info_hash (20 by...