Search Results

Search found 382 results on 16 pages for 'pierre 303'.

Page 8/16 | < Previous Page | 4 5 6 7 8 9 10 11 12 13 14 15  | Next Page >

  • Bash alias to open Vim at last cursor position mark

    - by Pierre LaFayette
    The mark " in Vim takes you to your last cursor position. I want to create an alias that will open my Vim instance and jump to that mark; something which is obviously extremely useful. This works from the command line: $ vim -c "'\"" File.cpp Now I want to make an alias for this: $ alias v='vim -c "'\""' Well that's not going to work! You need to escape the first single quote you say... $ alias v='vim -c "\'\""' Hmm. That didn't work either... So I try a whole lot of variations of single quoted and double quoted madness, bang my head against the table and load up stackoverflow in my browser, and here we are. How do I properly escape this alias?

    Read the article

  • Does RVM "failover" to another ruby instance on error?

    - by JohnMetta
    Have a strange problem in that I have a Rake task that seems to be using multiple versions of Ruby. When one fails, it seems to try another one. Details MacBook running 10.6.5 rvm 1.1.0 Rubies: 1.8.7-p302, ree-1.8.7-2010.02, ruby-1.9.2-p0 Rake 0.8.7 Gem 1.3.7 Veewee (provisioning Virtual Machines using Opcode.com, Vagrant and Chef) I'm not entirely sure the specific details of the error matter, but since it might be an issue with Veewee itself. So, what I'm trying to do is build a new box base on a veewee definition. The command fails with an error about a missing method- but what's interesting is how it fails. Errors I managed to figure out that if I only have one Ruby installed with RVM, it just fails. If I have more than one Ruby install, it fails at the same place, but execution seems to continue in another interpreter. Here are two different clipped console outputs. I've clipped them for size. The full outputs of each error are available as a gist. One Ruby version installed Here is the command run when I only have a single version of Ruby (1.8.7) available in RVM boudica:veewee john$ rvm rake build['mettabox'] --trace rvm 1.1.0 by Wayne E. Seguin ([email protected]) [http://rvm.beginrescueend.com/] (in /Users/john/Work/veewee) ** Invoke build (first_time) ** Execute build … creating new harddrive rake aborted! undefined method `max_vdi_size' for #<VirtualBox::SystemProperties:0x102d6af80> /Users/john/.rvm/gems/ruby-1.8.7-p302/gems/virtualbox-0.8.3/lib/virtualbox/abstract_model/dirty.rb:172:in `method_missing' <------ stacktraces cut ----------> /Users/john/.rvm/gems/ruby-1.8.7-p302/gems/rake-0.8.7/bin/rake:31 /Users/john/.rvm/gems/ruby-1.8.7-p302@global/bin/rake:19:in `load' /Users/john/.rvm/gems/ruby-1.8.7-p302@global/bin/rake:19 Multiple Ruby Versions Here is the same command run with three versions of Ruby available in RVM. Prior to doing this, I used "rvm use 1.8.7." Again, I don't know how important the details of the specific errors are- what's interesting to me is that there are three separate errors- each with it's own stacktrace- and each in a different Ruby interpreter. Look at the bottom of each stacktrace and you'll see that they are all sourced from different interpreter locations- First ree-1.8.7, then ruby-1.8.7, then ruby-1.9.2: boudica:veewee john$ rvm rake build['mettabox'] --trace rvm 1.1.0 by Wayne E. Seguin ([email protected]) [http://rvm.beginrescueend.com/] (in /Users/john/Work/veewee) ** Invoke build (first_time) ** Execute build … creating new harddrive rake aborted! undefined method `max_vdi_size' for #<VirtualBox::SystemProperties:0x1059dd608> /Users/john/.rvm/gems/ree-1.8.7-2010.02/gems/virtualbox-0.8.3/lib/virtualbox/abstract_model/dirty.rb:172:in `method_missing' … /Users/john/.rvm/gems/ree-1.8.7-2010.02/gems/rake-0.8.7/bin/rake:31 /Users/john/.rvm/gems/ree-1.8.7-2010.02@global/bin/rake:19:in `load' /Users/john/.rvm/gems/ree-1.8.7-2010.02@global/bin/rake:19 (in /Users/john/Work/veewee) ** Invoke build (first_time) ** Execute build isofile ubuntu-10.04.1-server-amd64.iso is available ["a1b857f92eecaf9f0a31ecfc39dee906", "30b5c6fdddbfe7b397fe506400be698d"] [] Last good state: -1 Current step: 0 last good state -1 destroying machine+disks (re-)executing step 0-initial-a1b857f92eecaf9f0a31ecfc39dee906 VBoxManage: error: Machine settings file '/Users/john/VirtualBox VMs/mettabox/mettabox.vbox' already exists VBoxManage: error: Details: code VBOX_E_FILE_ERROR (0x80bb0004), component Machine, interface IMachine, callee nsISupports Context: "CreateMachine(bstrSettingsFile.raw(), name.raw(), osTypeId.raw(), Guid(id).toUtf16().raw(), FALSE , machine.asOutParam())" at line 247 of file VBoxManageMisc.cpp rake aborted! undefined method `memory_size=' for nil:NilClass /Users/john/Work/veewee/lib/veewee/session.rb:303:in `create_vm' /Users/john/Work/veewee/lib/veewee/session.rb:166:in `build' /Users/john/Work/veewee/lib/veewee/session.rb:560:in `transaction' /Users/john/Work/veewee/lib/veewee/session.rb:163:in `build' /Users/john/Work/veewee/Rakefile:87 /Users/john/.rvm/gems/ruby-1.8.7-p302/gems/rake-0.8.7/lib/rake.rb:636:in `call' /Users/john/.rvm/gems/ruby-1.8.7-p302/gems/rake-0.8.7/lib/rake.rb:636:in `execute' /Users/john/.rvm/gems/ruby-1.8.7-p302/gems/rake-0.8.7/lib/rake.rb:631:in `each' … /Users/john/.rvm/gems/ruby-1.8.7-p302/gems/rake-0.8.7/bin/rake:31 /Users/john/.rvm/gems/ruby-1.8.7-p302@global/bin/rake:19:in `load' /Users/john/.rvm/gems/ruby-1.8.7-p302@global/bin/rake:19 (in /Users/john/Work/veewee) ** Invoke build (first_time) ** Execute build isofile ubuntu-10.04.1-server-amd64.iso is available ["a9c4ab3257e1da3479c984eae9905c2a", "30b5c6fdddbfe7b397fe506400be698d"] [] Last good state: -1 Current step: 0 last good state -1 (re-)executing step 0-initial-a9c4ab3257e1da3479c984eae9905c2a VBoxManage: error: Machine settings file '/Users/john/VirtualBox VMs/mettabox/mettabox.vbox' already exists VBoxManage: error: Details: code VBOX_E_FILE_ERROR (0x80bb0004), component Machine, interface IMachine, callee nsISupports Context: "CreateMachine(bstrSettingsFile.raw(), name.raw(), osTypeId.raw(), Guid(id).toUtf16().raw(), FALSE , machine.asOutParam())" at line 247 of file VBoxManageMisc.cpp rake aborted! undefined method `memory_size=' for nil:NilClass /Users/john/Work/veewee/lib/veewee/session.rb:303:in `create_vm' /Users/john/Work/veewee/lib/veewee/session.rb:166:in `block in build' /Users/john/Work/veewee/lib/veewee/session.rb:560:in `transaction' /Users/john/Work/veewee/lib/veewee/session.rb:163:in `build' /Users/john/Work/veewee/Rakefile:87:in `block in <top (required)>' /Users/john/.rvm/rubies/ruby-1.9.2-p0/lib/ruby/1.9.1/rake.rb:634:in `call' /Users/john/.rvm/rubies/ruby-1.9.2-p0/lib/ruby/1.9.1/rake.rb:634:in `block in execute' … /Users/john/.rvm/rubies/ruby-1.9.2-p0/lib/ruby/1.9.1/rake.rb:2013:in `top_level' /Users/john/.rvm/rubies/ruby-1.9.2-p0/lib/ruby/1.9.1/rake.rb:1992:in `run' /Users/john/.rvm/rubies/ruby-1.9.2-p0/bin/rake:35:in `<main>' It isn't until we reach the last installed version of Ruby that execution halts. Discussion Does anyone have any idea what's going on here? Has anyone seen this "failover"-like behavior before? It seems strange to me that the first exception would not halt execution as it did with one interpreter, but I wonder if there are things happening when RVM is installed that we Ruby developers are not considering.

    Read the article

  • Detect and record a sound with python

    - by Jean-Pierre
    I'm using this program to record a sound in python: import pyaudio import wave import sys chunk = 1024 FORMAT = pyaudio.paInt16 CHANNELS = 1 RATE = 44100 RECORD_SECONDS = 5 WAVE_OUTPUT_FILENAME = "output.wav" p = pyaudio.PyAudio() stream = p.open(format = FORMAT, channels = CHANNELS, rate = RATE, input = True, frames_per_buffer = chunk) print "* recording" all = [] for i in range(0, RATE / chunk * RECORD_SECONDS): data = stream.read(chunk) all.append(data) print "* done recording" stream.close() p.terminate() write data to WAVE file data = ''.join(all) wf = wave.open(WAVE_OUTPUT_FILENAME, 'wb') wf.setnchannels(CHANNELS) wf.setsampwidth(p.get_sample_size(FORMAT)) wf.setframerate(RATE) wf.writeframes(data) wf.close() I want to change the program to start recording when sound is detected by the sound card input. Probably should compare the input sound level in Chunk, but how do this?

    Read the article

  • XML streaming with XProc.

    - by Pierre
    Hi all, I'm playing with xproc, the XML pipeline language and http://xmlcalabash.com/. I'd like to find an example for streaming large xml documents. for example, given the following huge xml document: <Books> <Book> <title>Book-1</title> </Book> <Book> <title>Book-2</title> </Book> <Book> <title>Book-3</title> </Book> <!-- many many.... --> <Book> <title>Book-N</title> </Book> </Books> How should I proceed to loop (streaming) over x-N documents like <Books> <Book> <title>Book-x</title> </Book> </Books> and treat each document with a xslt ? is it possible with xproc ?

    Read the article

  • Facebook dialogs keep popping up in Firefox

    - by Pierre Olivier Martel
    I have a facebook application running in a FBML canvas and I have a problem with dialogs (either extended permissions or stream publish dialogs). Once they popup, they keep popping up for every subsequent requests. I've tested it in Chrome and everything works fine. It seems that the URL is chained in Firefox, which gives cryptic long urls like : http://apps.facebook.com/webdweller-po/discover?_fb_q=1&_fb_qsub=apps.facebook.com#!/webdweller-dev/?_fb_q=1&_fb_qsub=apps.facebook.com Did anybody experienced such a bug?

    Read the article

  • Wondering how Facebook does the "Mutual friends" feature

    - by Pierre
    Hello, I'm currently developing an application to allow students to manage their courses, and I don't really know how to design the database for a specific feature. The client wants, a lot like Facebook, that when a student displays the list of people currently in a specific course, the people with the most mutual courses are displayed first. As an additional feature, I would like to add a search feature to allow students to search for another one, and displaying first in the search results the people with most mutual courses. I currently use MySQL, I plan to use Cassandra for some other features, and I also use Memcached for result caching. Thanks.

    Read the article

  • How to retrieve multiple anchors URLs with jQuery ?

    - by pierre-guillaume-degans
    Hello, I would like to create a javascript playlist with Jplayer. This is a nice and easy tool, however I never coded with javascript. Look at the javascript used in this demo. It uses a list to store MP3 and Ogg files : var myPlayList = [ {name:"Tempered Song",mp3:"http://www.miaowmusic.com/mp3/Miaow-01-Tempered-song.mp3",ogg:"http://www.miaowmusic.com/ogg/Miaow-01-Tempered-song.ogg"}, {name:"Hidden",mp3:"http://www.miaowmusic.com/mp3/Miaow-02-Hidden.mp3",ogg:"http://www.miaowmusic.com/ogg/Miaow-02-Hidden.ogg"}, {name:"Lentement",mp3:"http://www.miaowmusic.com/mp3/Miaow-03-Lentement.mp3",ogg:"http://www.miaowmusic.com/ogg/Miaow-03-Lentement.ogg"}, {name:"Lismore",mp3:"http://www.miaowmusic.com/mp3/Miaow-04-Lismore.mp3",ogg:"http://www.miaowmusic.com/ogg/Miaow-04-Lismore.ogg"}, {name:"The Separation",mp3:"http://www.miaowmusic.com/mp3/Miaow-05-The-separation.mp3",ogg:"http://www.miaowmusic.com/ogg/Miaow-05-The-separation.ogg"}, {name:"Beside Me",mp3:"http://www.miaowmusic.com/mp3/Miaow-06-Beside-me.mp3",ogg:"http://www.miaowmusic.com/ogg/Miaow-06-Beside-me.ogg"}, ]; So for now, I just use a django template (but it could be another template engine) to create this variable. However I would like to create this list (myPlayList) dynamically with a javascript function which would retrieve the MP3 urls and the Ogg vorbis URLs from the HTML code. Thus, from this HTML code...: <body> <article id="track-0"> <h1>lorem ipsum</h1> <ul> <li><a href="...">Mp3</a></li> <li><a href="...">Vorbis</a></li> <li><a href="...">Flac</a></li> </ul> </article> <article id="track-1"> <h1>lorem ipsum</h1> <ul> <li><a href="...">Mp3</a></li> <li><a href="...">Vorbis</a></li> <li><a href="...">Flac</a></li> </ul> </article> <article id="track-2"> <h1>lorem ipsum</h1> <ul> <li><a href="...">Mp3</a></li> <li><a href="...">Vorbis</a></li> <li><a href="...">Flac</a></li> </ul> </article> </body> ... I need to build a javascript list like this (where each index of the list represents the track-ID in the HTML: var files = [ {mp3:"...", ogg:"..."}, {mp3:"...", ogg:"..."}, {mp3:"...", ogg:"..."}, ]; Please excuse me for my ugly english. If you need more informations just tell me. Thank you. :-)

    Read the article

  • Django - Specifying default attr for Custom widget

    - by Pierre de LESPINAY
    I have created this widget class DateTimeWidget(forms.TextInput): attr = {'class': 'datetimepicker'} class Media: js = ('js/jquery-ui-timepicker-addon.js',) Then I use it on my form class SessionForm(forms.ModelForm): class Meta: model = Session def __init__(self, *args, **kwargs): super(SessionForm, self).__init__(*args, **kwargs) self.fields['start_time'].widget = DateTimeWidget() self.fields['end_time'].widget = DateTimeWidget() No css class is applied to my fields (I'm expecting datetimepicker applied to both start_time & end_time). I imagine I have put attr at a wrong location. Where am I supposed to specify it ?

    Read the article

  • sendData (lib AsyncSocket) just before iPhone quit

    - by Pierre
    I have an iPhone application that send datas via wifi on my mac. I would like to send a logout message to my mac when I quit the iPhone app. I tried to send it on the : -applicationWillTerminate methode but it seems that the application shut down my service before. How and where can I send my message just before the exit ? Thanks a lot !

    Read the article

  • Core Data and NSDate

    - by Pierre
    Hi ! I read this post but I don't really understand the code... I have a core data database with an Entity and some attributes. One of them is named "myDate" and has for type NSDate. Now I want to to display each date but eliminate dates with same day-month-year and display them ascendantly . Have you got an idea? Thanks a lot !

    Read the article

  • Why is there no code-folding in emacs ?

    - by Pierre
    There are several questions on SO about how to get code folding in emacs, without having to add any special characters like "markers" in the comments for example. Someone said that there was "no perfect solution." It seems that it could be done by parsing the source of the program being written and look for matching parenthesis or bracket, or to do it based on indentation. You could also use a combination of scripts that use different methods. So why is it commonly accepted that there is no "perfect" and straightforward way to get code-folding in emac? Is there something in emacs or its architecture that makes it hard to program? If it were easy, after so many years of smart people using emacs you would think that someone would have wrote it.

    Read the article

  • include_once error : failed to open stream in Boonex Dolphin v7.0.9

    - by Guillaume Pierre
    first let me say I'm a beginner in PHP, specifically PHP Object-oriented programming. I'm working on a V7.0.9 dolphin version.http://www.boonex.com/dolphin While I'm trying to include a class.php from a 3rd-part developer I work with <?php include_once ('modules/developer/configure/classes/class.php'); I get this error : Warning: include_once(modules/developer/configure/classes/ClassExample.php): failed to open stream: No such file or directory in /var/www/vhosts/mysite.com/httpdocs/dolphin/inc/classes/BxDolPageView.php(612) : eval()'d code on line 2 Warning: include_once(): Failed opening 'modules/developer/configure/classes/ClassExample.php' for inclusion (include_path='.:') in /var/www/vhosts/mysite.com/httpdocs/dolphin/inc/classes/BxDolPageView.php(612) : eval()'d code on line 2 Fatal error: Class 'ClassExample' not found in /var/www/vhosts/mysite.com/httpdocs/dolphin/inc/classes/BxDolPageView.php(612) : eval()'d code on line 6 I'm trying to figure out where is the problem... does it comes from Boonex? or is it linked to my server configuration? I really don't know where to begin to resolve... Thx in advance for your kind help if you get knowledge on it

    Read the article

  • Browser back button restores empty fields

    - by Pierre
    I have a web page x.php (in a password protected area of my web site) which has a form and a button which uses the POST method to send the form data and opens x.php#abc. This works pretty well. However, if the users decides to navigate back in Internet Explorer 7, all the fields in the original x.php get cleared and everything must be typed in again. I cannot save the posted information in a session and I am trying to understand how I can get IE7 to behave the way I want. I've searched the web and found answers which suggest that the HTTP header should contain explicit caching information. Currently, I've tried this : session_name("FOO"); session_start(); header("Pragma: public"); header("Expires: Fri, 7 Nov 2008 23:00:00 GMT"); header("Cache-Control: public, max-age=3600, must-revalidate"); header("Last-Modified: Thu, 30 Oct 2008 17:00:00 GMT"); and variations thereof. Without success. Looking at the returned headers with a tool such as WireShark shows me that Apache is indeed honouring my headers. So my question is: what am I doing wrong?

    Read the article

  • svnlook always returns an error and no output

    - by Pierre-Alain Vigeant
    I'm running this small C# test program launched from a pre-commit batch file private static int Test(string[] args) { var processStartInfo = new ProcessStartInfo { FileName = "svnlook.exe", UseShellExecute = false, ErrorDialog = false, CreateNoWindow = true, RedirectStandardOutput = true, RedirectStandardError = true, Arguments = "help" }; using (var svnlook = Process.Start(processStartInfo)) { string output = svnlook.StandardOutput.ReadToEnd(); svnlook.WaitForExit(); Console.Error.WriteLine("svnlook exited with error 0x{0}.", svnlook.ExitCode.ToString("X")); Console.Error.WriteLine("Current output is: {0}", string.IsNullOrEmpty(output) ? "empty" : output); return 1; } } I am deliberately calling svnlook help and forcing an error so I can see what is going on when committing. When this program run, SVN displays svnlook exited with error 0xC0000135. Current output is: empty I looked up the error 0xC0000135 and it mean App failed to initialize properly although it wasn't specific to svnhook. Why is svnlook help not returning anything? Does it fail when executed through another process?

    Read the article

  • LINQ and set difference

    - by Pierre
    I have two collections a and b. I would like to compute the set of items in either a or b, but not in both (a logical exclusive or). With LINQ, I can come up with this: IEnumerable<T> Delta<T>(IEnumerable<T> a, IEnumerable<T> b) { return a.Except (b).Union (b.Except (a)); } I wonder if there are other more efficient or more compact ways of producing the difference between the two collections.

    Read the article

  • Django-imagekit: how to reduce image quality with a preprocessor_spec ?

    - by pierre-guillaume-degans
    Hi, please excuse me for my ugly english :p I've created this simple model class, with a Preprocessor to reduce my photos'quality (the photos'extension is .JPG): from django.db import models from imagekit.models import ImageModel from imagekit.specs import ImageSpec from imagekit import processors class Preprocessor(ImageSpec): quality = 50 processors = [processors.Format] class Picture(ImageModel): image = models.ImageField(upload_to='pictures') class IKOptions: preprocessor_spec = Preprocessor The problem : pictures'quality are not reduced. :( Any idea to fix it ? Thank you very much ;)

    Read the article

  • MySQL query optimization JOIN

    - by Pierre
    Hi, I need your help to optimize those mysql query, both are in my slow query logs. SELECT a.nom, c.id_apps, c.id_commentaire, c.id_utilisateur, c.note_commentaire, u.nom_utilisateur FROM comments AS c LEFT JOIN apps AS a ON c.id_apps = a.id_apps LEFT JOIN users AS u ON c.id_utilisateur = u.id_utilisateur ORDER BY c.date_commentaire DESC LIMIT 5; There is a MySQL INDEX on c.id_apps, a.id_apps, c.id_utilisateur, u.id_utilisateur and c.date_commentaire. SELECT a.id_apps, a.id_itunes, a.nom, a.prix, a.resume, c.nom_fr_cat, e.nom_edit FROM apps AS a LEFT JOIN cat AS c ON a.categorie = c.id_cat LEFT JOIN edit AS e ON a.editeur = e.id_edit ORDER BY a.id_apps DESC LIMIT 20; There is a MySQL INDEX on a.categorie, c.id_cat, a.editeur, e.id_edit and a.id_apps Thanks

    Read the article

  • CSS: Making two transparent images overlapping

    - by Pierre
    Hi all, I'm trying to make two transparent images (having the same size/dimension ) overlapping into a div at their top left corner. I tried: <html xmlns="http://www.w3.org/1999/xhtml"> <body> <div style="margin:20px;"> <div id="main" style="overflow:hidden;background-color:red;width:400px;height:400px;border:3px solid blue;"> <img src="myimage1.png" style="position:relative;top:0px;left:0px;z-index:0;"/> <img src="myimage2.png" style="position:relative;top:0px;left:0px;z-index:10;"/> </div> </div> </body> </html> but it doesn't work, the two pictures are concatenated into the parent div. Thanks for your help !

    Read the article

  • Packing a file into an ELF executable

    - by Pierre Bourdon
    Hello, I'm currently looking for a way to add data to an already compiled ELF executable, i.e. embedding a file into the executable without recompiling it. I could easily do that by using cat myexe mydata > myexe_with_mydata, but I couldn't access the data from the executable because I don't know the size of the original executable. Does anyone have an idea of how I could implement this ? I thought of adding a section to the executable or using a special marker (0xBADBEEFC0FFEE for example) to detect the beginning of the data in the executable, but I do not know if there is a more beautiful way to do it. Thanks in advance.

    Read the article

  • Cassandra hot keyspace structure change

    - by Pierre
    Hello. I'm currently running a 12-node Cassandra cluster storing 4TB of data, with a replication factor set to 3. For the needs of an application update, we need to change the configuration of our keyspace, and we'd like to avoid any downtime if possible. I read on a mailing list that the best way to do it is to: Kill cassandra process on one server of the cluster Start it again, wait for the commit log to be written on the disk, and kill it again Make the modifications in the storage.xml file Rename or delete the files in the data directories according to the changes we made Start cassandra Goto 1 with next server on the list My questions would be: Did I understand the process well? Is there any risk of data corruption? During the process, there will be servers with different versions of the storage.xml file in the same cluser, same keyspace. Is it a problem? Same question as above if we not only add, rename and remove ColumnFamilies, but if we change the CompareWith parameter / transform an existing column family into a super one. Or do we need to change the name? Thank you for your answers. It's the first time I'll do this, and I'm a little bit scared.

    Read the article

< Previous Page | 4 5 6 7 8 9 10 11 12 13 14 15  | Next Page >