Search Results

Search found 2126 results on 86 pages for 'wrapper'.

Page 48/86 | < Previous Page | 44 45 46 47 48 49 50 51 52 53 54 55  | Next Page >

  • Allowing threads from python after calling a blocking i/o code in a python extension generated using

    - by SS
    I have written a python extension wrapping an existing C++ library live555 (wrapping RTSP client interface to be specific) in SWIG. The extension works when it is operated in a single thread, but as soon as I call the event loop function of the library, python interpreter never gets the control back. So if I create a scheduled task using threading.Timer right before calling the event loop, that task never gets executed once event loop starts. To fix this issue, I added Py_BEGIN_ALLOW_THREADS and Py_END_ALLOW_THREADS macros manually in the SWIG auto generated wrapper cxx file around every doEventLoop() function call. But now, I want to do the same (i.e. allow threads) when SWIG generates the code itself and not to change any code manually. Has anyone done something similar in SWIG? P.S. - I would also consider switching to any other framework (like SIP) to get this working. I selected SWIG over any other technology is because writing SWIG interface was really very easy and I just had to include the existing header files.

    Read the article

  • Web service reference location?

    - by Damien Dennehy
    I have a Visual Studio 2008 solution that's currently consisting of three projects: A DataFactory project for Business Logic/Data Access. A Web project consisting of the actual user interface, pages, controls, etc. A Web.Core project consisting of utility classes, etc. The application requires consuming a web service. Normally I'd add the service reference to the Web project, but I'm not sure if this is best practice or not. The following options are open to me: Add the reference to the Web project. Add the reference to the Web.Core project, and create a wrapper method that Web will call to consume the web service. Add a new project called Web.Services, and copy step 2. This project is expected to increase in size so I'm open to any suggestions.

    Read the article

  • Adobe Flex, loading a remote swf

    - by JonoB
    I have a flex app running on my server. I have had a request from some clients to have the swf loaded on their server, so that their customers dont have to be transferred to my server to login; i.e. from the user's point of view it looks like they are logging in from theirsite.com instead of mysite.com I tried something really simple, and that was to give them a html wrapper to host on their site. The only modification that I made was to change the "src" var to: "src", "https://www.mysite.com/app/myapp.swf" and embed src="https://www.mysite.com/app/myapp.swf" To my surprise, this worked perfectly. And best of all, the service calls still seem to come from mysite.com, so I dont have to bother with modifying the crossdomain.xml file. All good it seems. Are there any issues or downsides to the above that I should be aware of?

    Read the article

  • Toggle visibility of DIV based on Dropdown

    - by user1869787
    I have never used Javascript before, only HTML and CSS. I am attempting to have my information show only when selected from my drop down. I don't know any Javascript so any help would be overly appreciated. This is my html so far: <!DOCTYPE HTML> <html> <head> <meta charset="utf-8" /> <title>Gone Fishin'</title> <link href="finale.css" rel="stylesheet" type="text/css"> </head> <div id="wrapper"> <div id="nav"> <ul> <li><a href="Index.html">About Us</a></li> <li><a href="Species.html">List by Species</a></li> <li><a href="County.html">List by County</a></li> <li><a href="apply.html">Reservations</a></li> </ul> </div> <body> <div id="content"> <p>ontent</p> <fieldset> <legend>Choose your Target</legend> <select name="option" id="options"> <option value=""></option> <option value="1">American Shad</option> <option value="2">Black Crappie</option> <option value="3">Bluegill</option> <option value="4">Brook Trout</option> <option value="5">Brown Trout</option> <option value="6">Carp</option> <option value="7">Chain Pickerel</option> <option value="8">Channel Catfish</option> <option value="9">Flathead Catfish</option> <option value="10">Largemouth Bass</option> <option value="11">Muskellunge</option> <option value="12">Norhtern Pike</option> <option value="13">Pumkpinseed</option> <option value="14">Rainbow Trout</option> <option value="15">Readbreast Sunfish</option> <option value="16">Rock Bass</option> <option value="17">Sauger</option> <option value="18">Saugeye</option> <option value="19">Smallmouth Bass</option> <option value="20">Steelhead</option> <option value="21">Striped Bass</option> <option value="22">Walleye</option> <option value="23">White Bass</option> <option value="24">White Crappie</option> <option value="25">White Perch</option> <option value="26">Yellow Perch</option> </select> <div id="option"> <div id="1" style="display: block">Test 1</div> <div id="2">Test 2</div> <div id="3">Test 3</div> <div id="4">Test 4</div> <div id="5">Test 5</div> </div> </fieldset> </div> </body> </div> </html> And this is my CSS: @charset "utf-8"; /* CSS Document */ /*General Styles*/ * {font-family:Verdana, Geneva, sans-serif;} #wrapper {width:85%; margin:auto; background-color:#00CC00;} /*End of General Styles*/ /* nav div styles */ #nav {background-color:#FF0000; text-align:center;} #nav ul li {display:inline-block; background-color: #67e667; border:5px dashed; width: 90px text-align:center;} #nav ul li a:link {background-color:#a60000; width: 90px;} #nav ul li a:visited {background-color: #009999;} #nav ul li a:hover {background-color: #a64b00;} /* end nav styles */ /* content div styles*/ #content {padding: 5px;} #option {display:none;} /*end content styles*/ /*start form styles*/ fieldset {background-color:#ff7400; color:white} label {display:inline-block; width: 150px; float:left; margin-right: 3px;} #form li{margin-bottom:10px;} #dtg li{margin-bottom:5px;} Thank you for any help received

    Read the article

  • IntPtr in 32 Bit OS, UInt64 in 64 bit OS

    - by Ngu Soon Hui
    I'm trying to do an interop to a C++ structure from C#. The structure ( in C# wrapper) is something like this [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct SENSE4_CONTEXT { public System.IntPtr dwIndex; //or UInt64, depending on platform. } The underlying C++ structure is a bit abnormal. In 32 bit OS, dwIndex must be IntPtr in order for the interop to work, but in 64 bit OS, it must be UInt64 in order for the interop to work. Any idea how to modify the above structure to make it work on both 32 and 64 bit OS?

    Read the article

  • Wrapping with Dependency Properties

    - by Chris
    I've got a Windows Forms control that I'm wrapping with a WindowsFormsHost-derived class to access WPF's data binding functionality. The Forms control exposes properties that indicate its state, along with the standard property-changed event notifier. For example, a Zoom property on the Forms control is accompanied with a ZoomChanged event. In the WindowsFormsHost wrapper, I'm using a DependencyProperty to represent the underlying Windows Forms control property. Binding works as expected going to the control; however, I'm not sure how to correctly propogate property changes from the wrapped control back out to binding subscribers (i.e., the Windows Form control changes its Zoom property and raises the ZoomChanged event). Any ideas on how to accomplish this? Should I be using a different approach?

    Read the article

  • PerformanceCounterCategory.Exists is very slow if category doesn't exists

    - by Shrike
    I have kind of library which uses a bunch of its own perf counters. But I want my library works fine even if that perf counters weren't installed. So I've created wrappers aroung PerformanceCounter and on the first use check if PerfCounter exists or not. If they exists then I'm using native PerformanceCounter instead I'm using a wrapper which do nothing. So to check perf counter existence I use PerformanceCounterCategory.Exists The problem is that if there isn't such category then PerformanceCounterCategory.Exists call takes (on my machine) about 10 seconds! Needless to say it's too slow. What can I do? Code to try it by youself: using System; using System.Diagnostics; class Program { static void Main(string[] args) { var ts = Stopwatch.StartNew(); var res = PerformanceCounterCategory.Exists("XYZ"); Console.WriteLine(ts.ElapsedMilliseconds); Console.WriteLine("result:" + res); } }

    Read the article

  • C#: Access 32-bit/64-bit DLL depending on platform

    - by Thorsten Dittmar
    Hi, we use a self-written 32bit C++ DLL from our C# applications. Now we've noticed that when the C# applications are run on a 64bit system, the 64bit runtime is automatically used and of course the 32bit DLL can not be accessed from the 64bit runtime. My question is: is there a way of using the 32bit DLL? If not, if I created a 64bit version of the DLL, would it be easily possible to let the application choose which one to P/Invoke to? I'm thinking of creating two helper classes in C#: One that imports the functions from the 32bit DLL and one that imports from the 64bit DLL, then creating a wrapper class with one function for each imported function that calls either the 32bit importer or the 64bit importer depending on the "bittyness" of the OS. Would that work? Or is there another easy way to do things?

    Read the article

  • Is there a dictionary about common programming vocabulary?

    - by _simon_
    When I need a name for a new class that extends behaviour of an existing class, I usually have hard time to come up with a name for it. For example, if I have a class MyClass, then the new class could be named something like MyClassAdapter, MyClassCalculator, MyClassDispatcher, MyClassParser,... This new name should of course represent the behaviour of the class and would ideally be same as the design pattern in which it is used (Adapter, Decorator, Factory,...). But since we don't overuse design patterns, this is not always the solution :) So, do you know for a dictionary or a list of common words, that we can use to represent the behaviour of the class, containing a short description of the expected behaviour? Some examples: replicator, shadow, token, acceptor, worker, mapper, driver, bucket, socket, validator, wrapper, parser, verifier,... You could also look at this list as a cheat sheet for metaphors, with which you can better understand your problem domain.

    Read the article

  • How do I make a request using HTTP basic authentication with PHP curl?

    - by Bedwyr Humphreys
    I'm building a REST web service client in PHP and at the moment I'm using curl to make requests to the service. How do I use curl to make authenticated (http basic) requests? Do I have to add the headers myself? If so I've got some other questions - Is there a REST library for php? or is there a wrapper for curl that makes it a bit more rest friendly? or am I going to have to continue to roll my own? Thanks.

    Read the article

  • What frameworks to use to bootstrap my first production scala project ?

    - by Jacques René Mesrine
    I am making my first foray into scala for a production app. The app is currently packaged as a war file. My plan is to create a jar file of the scala compiled artifacts and add that into the lib folder for the war file. My enhancement is a mysql-backed app exposed via Jersey & will be integrated with a 3rd party site via HttpClient invocations. I know how to do this via plain java. But when doing it in scala, there are several decision points that I am pussyfooting on. scala 2.7.7 or 2.8 RC ? JDBC via querulous Is this API ready for production ? sbt vs maven. I am comfortable with maven. Is there a scala idiomatic wrapper for HttpClient (or should I use it just like in java) ? I'd love to hear your comments and experiences on starting out with scala. Thanks

    Read the article

  • On reference_wrapper and callable objects

    - by Nicola Bonelli
    Given the following callable object: struct callable : public std::unary_function &lt;void, void&gt; { void operator()() const { std::cout << "hello world" << std::endl; } }; a std::tr1::reference_wrapper< calls through it: callable obj; std::tr1::ref(obj)(); Instead, when the operator() accepts an argument: struct callable : public std::unary_function &lt;int, void&gt; { void operator()(int n) const { std::cout << n << std::endl; } }; std::tr1::bind accepts a reference_wrapper to it as a callable wrapper... callable obj; std::tr1::bind( std::tr1::ref(obj), 42 )(); but what's wrong with this? std::tr1::ref(obj)(42);

    Read the article

  • Is there anyway to enable MultiSelect in the StyledTextCtrl

    - by John Baker
    I've noticed that the StyledTextControl (Scintilla basically) in wxWidgets has a great feature that allows multi-selections of text, just like TextMate. However wxRuby doesn't seem to have the function calls to support that feature. I'm wonder if there is a way to enable it or if there might be a way I could rewrite that wrapper to include that function. It seems strange that they would purposely omit that since they are seemingly pretty exhaustive on most functions calls. Any insight on this would be greatly appreciated. I'm trying to write an open source TextMate clone in Ruby and it's gonna be pretty hard without MultiSelect, I could probably hack something together but it'd be ugly. Thanks ahead of time.

    Read the article

  • What's the difference between the 'DES' class and The 'DESCryptoServiceProvider' class?

    - by IbrarMumtaz
    All I can make out is that one of them is the BC for all 'DES' algorithms to be derived from and the later is a wrapper for the Cryptographic service provider implementation of the DES algorithm. The reason why I ask is that I am going over .Net Security and the MS official training book simply refers to the DES class but the another official MS book refers to the DESCrypto' class. What's the difference between these two? When would you use either of them? What do I need to know as far as the 70-536 exam is concerned. I am asking my question from an educational P.O.V as far as the 70-536 exam is concerned. Thanks In Advance. Ibrar

    Read the article

  • click li, go to next li

    - by steve
    Can't find a simple solution to this, I know it's easy and I've tried a few things but I can't quite get it to work. I'm currently working with a sidescrolling site and I want every time you click an image (contained in an li) it scrolls to the next li. I have jQuery plugin localscroll so it smoothly goes from one to the next, and that's working. I need to now write a code that triggers jQuery to utilize the localscroll function and go to the next li. Right now I have this, but I know it's not right: $(document).ready(function () { var gallery = $('.wrapper ul li') $(gallery).click(function() { $.localscroll().next(li); }); });

    Read the article

  • firefox displaying .swf with wrong dimensions

    - by John Leonard
    I can't figure this one out. I have a flex app with fixed dimensions (950 x 700). I'm compiling the swf and using the default wrapper that flex generates. in some instances of Firefox, the dimensions are wrong. On top of that, with different domains, I get the .swf rendered with different dimensions (both wrong). Firefox 3.6.3 on one computer works fine. On another, the dimensions are off. Swf example and if you don't see a clipped swf...here are the screenshots. Rendered incorrectly on one domain And rendered in another domain with different bad dimensions. I'm at a total loss. When I embed the .swf with swfobject, I get the same issue. In the example you see, there's nothing in the app except for a single label centered on the stage.

    Read the article

  • Debugging segfault on swig/python/c++

    - by Pradyot
    I am trying to figure out what the best way to debug a segault with swig/python/c++. A core file is being generated. I have a basic MessageFactory(defined in c++ that provides a simple interface to accept a few strings as input and return a string as output). This interface is then specified in a .i file. swig is used to generate Wrapper.cpp as well as a MessageFactory.py from the .i file. This along with supporting files is compiled into a dynamic lib. The point of failure , is when the MessageFactory is instantiated within python code. Any suggestions on how I can go about debugging this? I've tried running the script within pdb, what I know from that is import on the generated MessageFactory.py is whats causing the seg-fault.

    Read the article

  • Java Math.cos() Method Does Not Return 0 When Expected

    - by dimo414
    Using Java on a Windows 7 PC (not sure if that matters) and calling Math.cos() on values that should return 0 (like pi/2) instead returns small values, but small values that, unless I'm misunderstanding, are much greater than 1 ulp off from zero. Math.cos(Math.PI/2) = 6.123233995736766E-17 Math.ulp(Math.cos(Math.PI/2)) = 1.232595164407831E-32 Is this in fact within 1 ulp and I'm simply confused? And would this be an acceptable wrapper method to resolve this minor inaccuracy? public static double cos(double a){ double temp = Math.abs(a % Math.PI); if(temp == Math.PI/2) return 0; return Math.cos(a); }

    Read the article

  • Making element draggable with Android WebView (ideally, just with Javascript) ?

    - by GJTorikian
    I'm building an app with a build target of 1.5 . I have a variable, WebView browser, that is calling loadUrl to load a static HTML page from my assets folder. In that HTML page, the following JavaScript is defined: var supportsTouch = ('createTouch' in document); ... var w = $('wrapper'); w[supportsTouch ? 'touchmove' : 'onmousemove'] = move; w[supportsTouch ? 'touchend' : 'onmouseup'] = function(event){ dragging = false; }; where move is another function that handles the dragging. Unfortunately, this doesn't seem to work. I cannot figure out a concise list of which touch events are available to Android--is it ontouchmove, or touchmove? Am I supposed to set up an onTouchEvent call back in my Java code, which then launches the JavaScript function?

    Read the article

  • ldapsearch and vcard creation

    - by Aaron Hoffman
    I'm using openldap on Mac OS X Server 10.6 and need to generate a vcard for all the users in a given group. By using the ldapsearch I can list all the memberUid's for all users in that group. I found a perl script (Advanced LDAP Search or ALS) that was written by someone that will generate the vcard easily. ALS can be found here http://www.ldapman.org/tools/als.gz So what I need to do is create a wrapper script (in python or perl) that will effectively loop through the memberUid's and run the ALS command to create the vcard and append it to the file. This command provides the memberUid's: ldapsearch -x -b 'dc=ldap,dc=server,dc=com' '(cn=testgroup)' Then running ALS gives the vcard: als -b dc=ldap,dc=server,dc=com -V uid=aaronh > vcardlist.vcf If it's easier to do this using Perl since ALS is already using it that would be fine. I've done more work in python but I'm open to suggestions. Thanks in advance, Aaron

    Read the article

  • CSS - Could use some pointers on correct positioning

    - by Kenny Bones
    Hi, I'm in need for some pointers on positioning. I've got this square which should be centered on the page. And with a logo and a logo font image kinda wrapped around the square. Now, I want this as dynamic as possible, because I use both the square and images elsewhere as well. So I can't really use stiff static positioning. This is the site: www.matkalenderen.no How should I do this? I want to logo to appear on the left side of the square. And the font to appear above the square. And the square itself should be centered. You probably get the picture :) Right now I've got a wrapper around everything, which is also centered.

    Read the article

  • shell script passing arguments

    - by arav
    From the wrapper shell scripts i am calling the Java program. I want the Unix shell script to pass all the arguments to java program except the EMAIL argument. HOW Can i remove the EMAIL argument and pass the rest of the arguments to the java program. EMAIL argument can come at any position. valArgs() { until [ $# -eq 0 ]; do case $1 in -EMAIL) MAILFLAG=Y shift break ;; esac done } main() { valArgs "$@" $JAVA_HOME/bin/java -d64 -jar WEB-INF/lib/test.jar "$@"

    Read the article

  • How can I use my own connection class with a strongly typed dataset?

    - by Maslow
    I have designed a class with sqlClient.SqlCommand wrappers to implement such functionality as automatic retries on timeout, Async (thread safety), error logging, and some sql server functions like WhoAmI. I've used some strongly typed datasets mainly for display purposes only, but I'd like to have the same database functionality that I use with my class. Is there an interface I can implement or a way to hook my command/connection class into the dataset at design or runtime? Or would I need to somehow write a wrapper for the dataset to implement these types of functions? if this is the only option could it be made generic to wrap anything that inherits from dataset?

    Read the article

  • How to inject dependencies into a custom UserNamePasswordValidator in WCF?

    - by Dannerbo
    I'm using a UserNamePasswordValidator in WCF along with Unity for my dependency injection, but since WCF creates the instance of the UserNamePasswordValidator, I cannot inject my container into the class. So how would one go about this? The simplest solution I can think of is to create a static proxy/wrapper class around a static instance of a UnityContainer, which exposes all the same methods... This way, any class can access the container, and I don't need to inject it everywhere. So I could just do UnityContainerWrapper.Resolve() anywhere in code. So basically this solution solves 2 problems for me, I can use it in classes that I'm not creating an instance of, and I can use it anywhere without having to inject the container into a bunch of classes. The only downside I can think of is that I'm now potentially exposing my container to a bunch of classes that wouldn't of had access to the container before. Not really sure if this is even a problem though?

    Read the article

  • Skype Mac API - Use AppleScript or 5 year old API?

    - by Andrew
    I have a x86_64 app that I would like to have optionally read Skype status messages. However, the 5 year old skype mac framework is 32-bit, and if there is a way to have that compile within a 64-bit app, I haven't found it. My question is, basically, how should I go about doing this? I really only need to get and set the USERSTATUS AWAY/ONLINE string. Using AppleScript, a "Should Skype allow this" dialog pops up... every time. This is highly inefficient and downright irritating. Advice? I'm considering writing a 32-bit CLI wrapper, but that seems like overkill.

    Read the article

< Previous Page | 44 45 46 47 48 49 50 51 52 53 54 55  | Next Page >