Search Results

Search found 6 results on 1 pages for 'ronan'.

Page 1/1 | 1 

  • 'module' object has no attribute 'element_make_factory'

    - by Ronan Dejhero
    i have this code : import pygst import st, pygtk player_name = gst.element_make_factory("playbin", "Multimedia Player") player_name.set_property("uri", "../media/alert.mp3") player_name.set_state(gst.PLAYING) it keeps throwing me the following error : player_name = gst.element_make_factory("playbin", "Multimedia Player") AttributeError: 'module' object has no attribute 'element_make_factory' nay way to solve this and why is this happening ? if i print gst i get the following : <module 'gst' from '/usr/lib/python2.7/dist-packages/gst-0.10/gst/__init__.pyc'> so it is a module !

    Read the article

  • Cannot insert a breakpoint in shared Library

    - by ronan
    Friends While debugging an application of of the function is defined in a shared library which is written by another vendor . and I get an error like warning: Cannot insert breakpoint 0: in /opt/trims/uat/lib/libTIPS_Oleca.sl warning: This is because your shared libraries are not mapped private. To attach to a process and debug its shared libraries you must prepare the program with "/opt/langtools/bin/pxdb -s on a.out or "chatr +dbg enable a.out ".** warning: Add this to your Makefile for debug builds warning: so that each rebuilt debuggable a.out would warning: have this feature turned on. Temporarily disabling shared library breakpoints:0 Now the problem is I cannot modify the shared library . How do I resolve this error ? Many Thanks

    Read the article

  • Singleton & Multi-threading

    - by ronan
    Friends I have the following class that class Singleton { private: static Singleton *p_inst; Singleton(); public: static Singleton * instance() { if (!p_inst) { p_inst = new Singleton(); } return p_inst; } }; Please do elaborate on precautions taken while implementing Singleton in multi-threaded environment .. Many thanks

    Read the article

  • How can I get the followers of a user on twitter, then get posts from those followers over a period

    - by Ronan
    I've been assigned a research project to enhance social networking based adaptive e-learning and to do so I need to be able to extract several (hundreds, maybe thousands) of status updates or tweets in order to perform factor analysis on key words. Apparently this can be done with javascript but I have never used javascript before so I'm a bit lost. I know I need a Twitter API but not sure even how to use one. Anybody have any idea how I can do this?

    Read the article

  • .NET Free memory usage (how to prevent overallocation / release memory to the OS)

    - by Ronan Thibaudau
    I'm currently working on a website that makes large use of cached data to avoid roundtrips. At startup we get a "large" graph (hundreds of thouthands of different kinds of objects). Those objects are retrieved over WCF and deserialized (we use protocol buffers for serialization) I'm using redgate's memory profiler to debug memory issues (the memory didn't seem to fit with how much memory we should need "after" we're done initializing and end up with this report Now what we can gather from this report is that: 1) Most of the memory .NET allocated is free (it may have been rightfully allocated during deserialisation, but now that it's free, i'd like for it to return to the OS) 2) Memory is fragmented (which is bad, as everytime i refresh the cash i need to redo the memory hungry deserialisation process and this, in turn creates large object that may throw an OutOfMemoryException due to fragmentation) 3) I have no clue why the space is fragmented, because when i look at the large object heap, there are only 30 instances, 15 object[] are directly attached to the GC and totally unrelated to me, 1 is a char array also attached directly to the GC Heap, the remaining 15 are mine but are not the cause of this as i get the same report if i comment them out in code. So my question is, what can i do to go further with this? I'm not really sure what to look for in debugging / tools as it seems my memory is fragmented, but not by me, and huge amounts of free spaces are allocated by .net , which i can't release. Also please make sure you understand the question well before answering, i'm not looking for a way to free memory within .net (GC.Collect), but to free memory that is already free in .net , to the system as well as to defragment said memory. Note that a slow solution is fine, if it's possible to manually defragment the large heap i'd be all for it as i can call it at the end of RefreshCache and it's ok if it takes 1 or 2 second to run. Thanks for your help! A few notes i forgot: 1) The project is a .net 2.0 website, i get the same results running it in a .net 4 pool, idem if i run it in a .net 4 pool and convert it to .net 4 and recompile. 2) These are results of a release build, so debug build can not be the issue. 3) And this is probably quite important, i do not get these issues at all in the webdev server, only in IIS, in the webdev i get memory consumption rather close to my actual consumption (well more, but not 5-10X more!)

    Read the article

  • Regular expression Not working properly n case of multiple trailing ]]]]

    - by ronan
    I have the requirement that in a textbox a user can jump to the next word enclosed in [] on a tab out for example Hi [this] is [an] example. Testing [this] So when my cursor is at Hi and I do a tab out , the characters enclosed in the [this] are highlighted and when I again do a tabl out th next characters enclosed in following [an] are highlighted. This works fine Now the requirement is whatever the text including the special chars between [] needs to be highlighted case 1: when I have trailing ]]], it only highlights leading [[[ and ignores ]]]] e.g case 2: In case of multiple trailing ] e.e [this]]]] is [test], ideally one a single tabl out from this , it should go to next text enclosed in [] but a user has to tab out 4 times one tab per training ] to go to next [text] strong text The code is $(document).ready(function() { $('textarea').highlightTextarea({ color : '#0475D1', words : [ "/(\[.*?\])/g" ], textColor : '#000000' }); $('textarea').live('keydown', function(e) { var keyCode = e.keyCode || e.which; if (keyCode == 9) { var currentIndex = getCaret($(this).get(0)) selectText($(this), currentIndex); return false; } }); }); function selectText(element, currentIndex) { var rSearchTerm = new RegExp(/(\[.*?\])/); var ind = element.val().substr(currentIndex).search(rSearchTerm) currentIndex = (ind == -1 ? 0 : currentIndex); ind = (ind == -1 ? element.val().search(rSearchTerm) : ind); currentIndex = (ind == -1 ? 0 : currentIndex); var lasInd = (element.val().substr(currentIndex).search(rSearchTerm) == -1 ? 0 : element.val().substr(currentIndex).indexOf(']')); var input = element.get(0); if (input.setSelectionRange) { input.focus(); input.setSelectionRange(ind + currentIndex, lasInd + 1 + currentIndex); } else if (input.createTextRange) { var range = input.createTextRange(); range.collapse(true); range.moveEnd('character', lasInd + 1 + currentIndex); range.moveStart('character', ind + currentIndex); range.select(); } } function getCaret(el) { if (el.selectionEnd) { return el.selectionEnd; } else if (document.selection) { el.focus(); var r = document.selection.createRange(); if (r == null) { return 0; } var re = el.createTextRange(), rc = re.duplicate(); re.moveToBookmark(r.getBookmark()); rc.setEndPoint('EndToStart', re); return rc.text.length; } return 0; } Please let me know to handle two above cases

    Read the article

1