wrapping

How to wrap an untrusted application?

Imagine an untrusted application (plugin) that reads from the standard input and writes to the standard output. How to get the output returned for the specified input by this application preventing any side effects? For example, if application deletes file on a disk, it should be detected and this attempt should be canceled. It's some...

GDI+ Curve Wrapping

Hi, I'm creating a graphing application using ZedGraph, which uses GDI+. If a curve is overflowing past the chart, I wrap it around to the other side. I do this by clipping the chart and just redrawing the curve as many times as it needs to wrap. for(int i=startShift; i<=endShift; i++); { g.TranslateTransform(chartWidth,0); g.Dr...

Wrapping cf.net application to C++ project

Hi, I would like to wrap cf.net project (exe) to c++ project(exe) and communicate via internal calls (main exe to cf.net exe, communication to protection methods, written in c++). Idea is to make better protection against decompiling(+ protection). Any idea how to do that? any sample code of wrapping executable? ...

jquery wrap sibling elements

The following markup will have some extra elements injected into it (ie: a div containing some flash for example). How can i dynamically wrap all of the p tags in one div and add a button above it to toggle that newly made div? <div class="post"> <p>blquehrgéoqihrteoijth</p> </div> <div class="post"> <p>blquehrgéoqihrteoijth</p> ...

iphone: Text around an image

Is it possible to have text go around an image ? like in the picture? ...

Wrapping C++ class API for C consumption

Hi there, I have a set of related C++ classes which must be wrapped and exported from a DLL in such a way that it can be easily consumed by C / FFI libraries. I'm looking for some "best practices" for doing this. For example, how to create and free objects, how to handle base classes, alternative solutions, etc... Some basic guidelines...

Java: create new implementation of type at runtime?

So, I realize the answer to this is probably "it's hard", but: I've got a weird idea, and was wondering if it's possible in Java to create a method like: <T> T wrapInterface (Class<T> interfaceClass, T wrappedObject) { if (mClass.isInterface()) { //create a new implementation of interfaceClass that, in each method, //does so...

Critique my JAXB object wrapper.

Hello Ladies and Gents, I have a question on wrapping a jaxb created class and would really like to hear your inputs. My xsd looks a bit like: <ComplexService> <ComplexObject1> <Element1></Element1> <Parameter></Parameter> </ComplexObject1> <ComplexObject2> <Element2> </Element2> <Parameter> ...

How do I prevent other programmers from wrapping my assembly?

Can someone tell me what the best approach to protecting my component DLLs in .Net? I've written a few DLL components which will be publicly available. They will be licensed accordingly but I want to programmatically make sure that no one is using the components within their solutions illegally. Any ideas? ...

Why is text being truncated in this Silverlight TextBlock?

I have a TextBlock with wrapping enabled and while the text is wrapping, it is being wrapped in such a way that some text is truncated. The TextBlock is defined as <TextBlock x:Name="_txtLiveText" Style="{StaticResource TranslationInfoTextBlockStyle}" Text="Live text displays here" Width="Auto" TextWrapping="Wrap" Grid....

CSS: Do not wrap contents of div

I've got a fixed-width div with two buttons in it. If the labels of the buttons are too long, they wrap--one button stays on the first line, and the next button follows underneath it instead of adjacent to it. How can I force the div to expand so that both buttons are on one line? ...

Visually wrap/cycle items around in WPF container?

I have a WPF/C# situation where I have a horizontal list of items and the user can navigate forward and backward through the list. Assuming the list has 5 items, below are three mock-ups of the UI (initial, and after the user clicks the right arrow twice. < [1] [2] [3] [4] > < [2] [3] [4] [5] > < [3] [4] [5] [1] > So, basically, the ...

Jython 2.1 __getattr__

I am trying to implement a wrapper/proxy class for a java object (baseClient) in jython v2.1. Everything seems to be working ok except when the following statement is encountered: if __client != None # __client is an instance of the ClientProxy class raise AttributeError(attr) is called in __getattr__(), because self.__baseClient does...

C#: Wrapping one Enum inside another (ie. mirroring another enum/copying it...)

Here's my problem: I have an object that's referencing a DLL. I would like other objects to reference my object, without having to also include a reference to the DLL itself. This is fine for the most part except there is an enum in the DLL that I would like to replicate. I could write out the enum line by line, but I'm wondering if the...

Wrapper over a third-part framework in c#

I am doing a thin wrapper over a third-party framework, i am thinking following options: completely wrap the framework, so that the client of the wrapper will not notice the wrapped framework. if so, it means i have to wrap some classes from the framework. this way no dependency between the wrapper's client and the wrapped framework. ...

Extending numpy with cython

I am trying to wrap a header file which has lots of functions like this test.h void test(int N, int* data_in, int* data_out); so that I can use those from numpy. Right now I have the following cython code: test.pyx import numpy as np cimport numpy as np ctypedef np.int_t itype_t cdef extern from 'VolumeForm.h': void _test '...

Actionscript BlurFilter wrap around

I'm using the standard ActionScript blur filter to blur an image. The image will later be used as a texture map on a cylinder, i.e. it's left and right edges will meet in 3D. This looks bad because the blur filter has discontinuities at the image edges. I'd like to set it so it'll wrap around the image so that instead of truncating the f...

Howto prevent eclipse from line wrapping in XML and HTML files?

Hi, is it possible to completely stop eclipse from line wrapping XML and HTML files? It is easy to do this i.e. for java files, but I couldn't find similar settings for XML and HTML files. Thanks in advance. ...

Dynamically Expanding the width of a TD

Is there a way for expanding the width of a TD in the table based on the width of the next TD. The asp:Panel is going to be hidden or displayed based on some condition in the code behind. I'm thinking it's some CSS thing that would help me fix this, but unable to put a finger on it. Help!! Here's the HTML Markup: <tr> <td class=...

Using code generated by Py++ as a Python extension

I have a need to wrap an existing C++ library for use in Python. After reading through this answer on choosing an appropriate method to wrap C++ for use in Python, I decided to go with Py++. I walked through the tutorial for Py++, using the tutorial files, and I got the expected output in generated.cpp, but I haven't figured out what to...