Search Results

Search found 3592 results on 144 pages for 'pointer'.

Page 86/144 | < Previous Page | 82 83 84 85 86 87 88 89 90 91 92 93  | Next Page >

  • Is there a jquery List plugin that will auto-sort items and has robust add/remove methods?

    - by Breadtruck
    I have been googling for hours looking for something to handle my situation. I am not skilled enough to write my own jquery plugin ..YET!! The plugin should auto-sort the list, not as important as being able to add/remove items from the list easily. Themeroller capable would be a plus. I would basically use anything as long as I could add a item to the list (or any other container for that matter), item is coming from a modal popup that is using ajax to search for the item. Once the item is found I want to click that item and have it added to the list and it would put it into the correct order based on alphabetic sort. I think where I am losing sight is the complexity of the item and needing to have the item contain: The name of the item a hidden value, [the int id of the item], one or two checkboxes for turning on/off a feature for that item. I am really open to any ideas, suggestions on a better process, or a pointer to a plugin that might get me close.

    Read the article

  • How do i translate movement on the Canvas3D to movement in the virtual 3D world

    - by Coder
    My goal is to move a shape in the virtual world in such a way so that it ends up where the mouse pointer is on the canvas. What i have: -mouse position (x,y) on a Canvas3D object -Point3d object of where a pick ray starting from the Canvas3D viewport intersects with the first scene object. (point in 3D space of where i want to start the drag) What i want: -Some way to translate the Point3d's coordinates so that the initial point of intersection (the Point3d object) is always overlapping the the mouse position on the canvas (same as when i used the pick ray to determine what the user clicked on from the Canvas3D object). Thanks!

    Read the article

  • Prevent dragging in Joint JS

    - by user3607705
    I am working on JointJS API. However I want to prevent the elements from being movable from their original positions. Can you suggest me some feature of JointJS or any feature of CSS in general, which I could use to make my object immovable. I can't use interactive: false option on the paper or paper.$el.css('pointer-events', 'none'); because I need to have highlighting features when mouse hovers over the element. Please suggest a way that disables movement of elements while allowing other features.

    Read the article

  • Telling a UITextField to become first responder while embedded in a UITableViewCell

    - by Jasarien
    I have a UITextField that is a subview of a UITableViewCell. When my view loads, I want the text field to become first responder. I have a pointer to the text field in the table cell, so to do this I am trying: [myTextField becomeFirstResponder]; This returns NO all the time, regardless of when it's called, which according to the docs means the text field refused to become first responder... What am I doing wrong? Edit: The text field properly responds to being touched. It bring up the keyboard then. It's only when telling it to become first responder programmatically that the problem happens.

    Read the article

  • Implementing a pager for asp.net's DataList/Repeater

    - by emre
    I have a DataList showing the results, and a Repeater that is supposed to be the pager. I decided to use the page number by redirecting with a QueryString parameter, so it will also be bookmarkable ... My problem is mainly in the UI actually. If I put DIV's with their onclick calling a JS function that does window.location = url + pagenumber , then somehow I have to deal with QueryString operations via JS which is a bit messy. If I use LinkButton objects within the ItemTemplate, then the Redirecting happens only when the linkbutton is clicked while whole div has cursor: pointer , you what I mean. What would be the best approach to this? Thanks in advance. Note: I really want to spend the time and effort implementing my own server-side paging. I think its more fun than reading 3rd party manuals.

    Read the article

  • Man pages for libvlc

    - by mawia
    Hi! all. Though I am not sure wether this question belongs to here but pardon me if not so. Can you people guide me to the manual page of libvlc functions like(just give a kind of pointer where these functions are described in detail) void libvlc_playlist_pause( libvlc_instance *, libvlc_exception ) mtime_t libvlc_input_get_length( libvlc_input_t *, libvlc_exception ) mtime_t libvlc_input_get_time( libvlc_input_t *, libvlc_exception ) void libvlc_input_set_time( libvlc_input_t *, mtime_t , libvlc_exception ) float libvlc_input_get_position( libvlc_input_t *, libvlc_exception ) void libvlc_input_set_position( libvlc_input_t *, float , libvlc_exception ) void libvlc_set_rate( libvlc_input_t *, float rate, libvlc_exception ) float libvlc_get_rate( libvlc_input_t *, libvlc_exception ) libvlc_input_get_information( libvlc_input_t *, libvlc_exception ) In particular can you please describe the functioning of libvlc_playlist_pause.I am using this in my aplication to run a video stream.My video is running but since video file is coming over a network I need to pause the player for a particular amount till enough data is buffered. With regards Mawia

    Read the article

  • UITableView programatically create delegate object?

    - by fuzzygoat
    I have a question regarding setting up a custom delegate class for use with UITableView. What I have done is as follows: Setup a new class (in sperate *.h and *.m files for the class) Conformed that new class to the <UITableViewDelegate, UITableViewDataSource> protocols Added the required methods. Created a pointer to the new object using @property and IBOutlet. In InterfaceBuilder created and assigned an object template to my new class Assigned the dataSource and delegate connections. This all works fine. My question is if I don't want to use interfaceBuilder to setup and instantiate my new delegate class directly in Xcode how do I go about doing that? More specifically how would I: Instantiate the delegate class, would that be created / owned by the controller? Set the dataSource and delegate connections? What is the best way of doing this? any help / information is much appreciated. Gary

    Read the article

  • DoDragDrop disables MouseMove Events

    - by stefan.at.wpf
    After having started a Drag & Drop operation by DragDrop.DoDragDrop(...) no more MouseMove Events are fired. I even tried AddHandler(Window.MouseMoveEvent, new MouseEventHandler(myControl_MouseMove), true); where the last parameter means I even opt in for handled events. No chance, seems like the MouseMove Event is never fired at all! Any way to still get MouseMove Events while using Drag & Drop? I'd like to Drag & Drop a control, while dragging this control it shall follow the mouse pointer. Any idea how to do this in this case?

    Read the article

  • Address of function is not actual code address

    - by mrjoltcola
    Debugging some code in Visual Studio 2008 (C++), I noticed that the address in my function pointer variable is not the actual address of the function itself. This is an extern "C" function. int main() { void (*printaddr)(const char *) = &print; // debug shows printaddr == 0x013C1429 } Address: 0x013C4F10 void print() { ... } The disassembly of taking the function address is: void (*printaddr)(const char *) = &print; 013C7465 C7 45 BC 29 14 3C 01 mov dword ptr [printaddr],offset print (13C1429h) What am I missing?

    Read the article

  • How to test COM object integrity automatically?

    - by sharptooth
    Every COM object must have integrity. In simplified terms this means that if an object implements 3 interfaces - A, B and C and I have A* pointer to the object I must be able to successfully QueryInterface() both B and C and having B I must be able to retrieve A and C and having C I must be able to retrieve A and B. Now my object implements 5 interfaces and I want to test its integrity. Writing checks for all of the above myself will require a substantial effort. Is there a tool or some easily tweakable code or a code pattern that would do it?

    Read the article

  • Sharing memory among YACC, Lex, and C files

    - by sczizzo
    I have a YACC (Bison) grammar, a Lex (Flex) tokenizer, and a C program among which I need to share a struct (or really any variable). Currently, I declare the actual object in the grammar file and extern it wherever I need it (which is to say, my C source file), usually using a pointer to manipulate it. I have a shared header (and implementation) file between the C file and the grammar file with functions useful for manipulating my data structure. This works, but it feels a little uncomfortable. Is there a better way to share memory between the grammar and program?

    Read the article

  • How to add a URL and Buttons on top of an Existing Header Image

    - by tonsils
    Hi, 1) I have a header jpeg image that spans a width of 996px that has a square logo to the left of this header. My question is that I would like to use this square logo section only and place a ahref tag so that when the user hover's over this section only, the cursor changes to a hand pointer and the user will be redirected back to the landing page. Any assistance on this would be great. 2) On this same image, I would also like to place two buttons with rollover effects, so when the user hovers over the buttons, the rollover effect takes control and then would like these buttons to also point to a href url. Again, any help on this would be appreciated. Thanks.

    Read the article

  • Copy hashtable to another hashtable using c++

    - by zengr
    I am starting with c++ and need to know, what should be the approach to copy one hashtable to another hashtable in C++? We can easily do this in java using: HashMap copyOfOriginal=new HashMap(original); But what about C++? How should I go about it? UPDATE Well, I am doing it at a very basic level,perhaps the java example was a wrong one to give. This is what I am trying to implement using C++: I have this hash array and each element of the array point to the head of a linked list. Which has it's individual nodes (data and next pointer). And now, I need to copy the complete hash array and the linked list each node is pointing to.

    Read the article

  • Int or NSInteger as object for method argument. Objective-C

    - by sergiobuj
    Hi. I'm having some trouble passing a number as an argument for a method: -(void) meth2:(int)next_int; And to call that method i need this: int next_int = 1; [self performSelectorOnMainThread:@selector(meth2:) withObject:next_int waitUntilDone:NO]; //update next_int and call meth2 again at this point i get a "pointer from integer without a cast" error, and would happen the same with a NSInteger. A NSNumber is not useful because it's immutable and i need to change the value constantly. Any Idea how can i do this? Thanks.

    Read the article

  • Python objects as userdata in ctypes callback functions

    - by flight
    The C function myfunc operates on a larger chunk of data. The results are returned in chunks to a callback function: int myfunc(const char *data, int (*callback)(char *result, void *userdata), void *userdata); Using ctypes, it's no big deal to call myfunc from Python code, and to have the results being returned to a Python callback function. This callback work fine. myfunc = mylib.myfunc myfunc.restype = c_int myfuncFUNCTYPE = CFUNCTYPE(STRING, c_void_p) myfunc.argtypes = [POINTER(c_char), callbackFUNCTYPE, c_void_p] def mycb(result, userdata): print result return True input="A large chunk of data." myfunc(input, myfuncFUNCTYPE(mycb), 0) But, is there any way to give a Python object (say a list) as userdata to the callback function? In order to store away the result chunks, I'd like to do e.g.: def mycb(result, userdata): userdata.append(result) userdata=[] But I have no idea how to cast the Python list to a c_void_p, so that it can be used in the call to myfunc. My current workaround is to implement a linked list as a ctypes structure, which is quite cumbersome.

    Read the article

  • ASP.NET MVC unit test controller with HttpContext

    - by user299592
    I am trying to write a unit test for my one controller to verify if a view was returned properly, but this controller has a basecontroller that accesses the HttpContext.Current.Session. Everytime I create a new instance of my controller is calls the basecontroller constructor and the test fails with a null pointer exception on the HttpContext.Current.Session. Here is the code: public class BaseController : Controller { protected BaseController() { ViewData["UserID"] = HttpContext.Current.Session["UserID"]; } } public class IndexController : BaseController { public ActionResult Index() { return View("Index.aspx"); } } [TestMethod] public void Retrieve_IndexTest() { // Arrange const string expectedViewName = "Index"; IndexController controller = new IndexController(); // Act var result = controller.Index() as ViewResult; // Assert Assert.IsNotNull(result, "Should have returned a ViewResult"); Assert.AreEqual(expectedViewName, result.ViewName, "View name should have been {0}", expectedViewName); } Any ideas on how to mock the Session that is accessed in the base controller so the test in the descendant controller will run?

    Read the article

  • Memory management, and async operations: when does an object become nil?

    - by Kenny Winker
    I have a view that will be displaying downloaded images and text. I'd like to handle all the downloading asynchronously using ASIHTTPRequest, but I'm not sure how to go about notifying the view when downloads are finished... If I pass my view controller as the delegate of the ASIHTTPRequest, and then my view is destroyed (user navigates away) will it fail gracefully when it tries to message my view controller because the delegate is now nil? i.e. if i do this: UIViewController *myvc = [[UIViewController alloc] init]; request.delegate = myvc; [myvc release]; Do myvc, and request.delegate now == a pointer to nil? This is the problem with being self-taught... I'm kinda fuzzy on some basic concepts. Other ideas of how to handle this are welcome.

    Read the article

  • Why is thread local storage so slow?

    - by dsimcha
    I'm working on a custom mark-release style memory allocator for the D programming language that works by allocating from thread-local regions. It seems that the thread local storage bottleneck is causing a huge (~50%) slowdown in allocating memory from these regions compared to an otherwise identical single threaded version of the code, even after designing my code to have only one TLS lookup per allocation/deallocation. This is based on allocating/freeing memory a large number of times in a loop, and I'm trying to figure out if it's an artifact of my benchmarking method. My understanding is that thread local storage should basically just involve accessing something through an extra layer of indirection, similar to accessing a variable via a pointer. Is this incorrect? How much overhead does thread-local storage typically have? Note: Although I mention D, I'm also interested in general answers that aren't specific to D, since D's implementation of thread-local storage will likely improve if it is slower than the best implementations.

    Read the article

  • Boost interprocess cached pools

    - by porgarmingduod
    I'm trying to figure out if my reading of the docs for boost interprocess allocators is correct. When using cached_adaptive_pool to allocate memory: typedef cached_adaptive_pool<int, managed_shared_memory::segment_manager> pool_allocator_t; pool_allocator_t pool_allocator(segment.get_segment_manager()); // Allocate an integer in the shared memory segment pool_allocator_t::pointer pool_allocator.allocate_one(); My understanding is that with multiple processes one can allocate and deallocate freely: That is, if I have a cached pool allocator for integers in one process, then it can deallocate integers allocated by similar pools in other processes (provided, of course, that they are working on the same shared memory segment). It may be a stupid question, but working with multiple processes and shared memory is hard enough, so I'd like to know 100% whether I got the basics right.

    Read the article

  • C-array to NSData and back

    - by Thor Frølich
    I'm attempting to save a c-style array of Vertex3D structs to an NSData object and get them back when reloading the app: NSData *vert = [NSData dataWithBytes:&vertices length:(sizeof(Vertex3D) * NUM_OF_VERTICES)]; This data is then saved and attempted to be read back into my c-array thusly: vertices = malloc(sizeof(Vertex3D) * NUM_OF_VERTICES); [vert getBytes:&vertices length:(sizeof(Vertex3D) * NUM_OF_VERTICES)]; The above results in “EXC_BAD_ACCESS” followed by: malloc: * error for object 0x48423c0: pointer being freed was not allocated I'm very new to programming so there's probably some fundamental memory management principle I'm unaware of. I have verified that the loaded NSData is identical to the saved one, but it's clear that the transition from c-array to NSData (and back) is not as I intended.

    Read the article

  • 2 way synchronization of in-house gitosis repositories server with Github repositories

    - by Robert J Berger
    We use gitosis as our local in-house shared repository and also have a private Github account that mirrors our local repository. If one does a git push to the in-house repository the post-update hook updates the Github repository. How can I make this two way without causing "loops"? I.e. if someone pushes to the Github repository, I would like it to also update the in-house gitosis repository. A pointer to an example of how to do it would be greatly appreciated. Or if there are recommendations of alternatives to gitosis that would make this kind of thing easy, I would consider migrating to that.

    Read the article

  • What is the difference among NSString alloc:initWithCString versus stringWithUTF8String?

    - by mobibob
    I thought these two methods were (memory allocation-wise) equivalent, however, I was seeing "out of scope" and "NSCFString" in the debugger if I used what I thought was the convenient method (commented out below) and when I switched to the more explicit method my code stopped crashing! Notice that I am getting the string that is being stored in my container from sqlite3 query. p = (char*) sqlite3_column_text (queryStmt, 1); // GUID = (NSString*) [NSString stringWithUTF8String: (p!=NULL) ? p : ""]; GUID = [[NSString alloc] initWithCString:(p!=NULL) ? p : "" encoding:NSUTF8StringEncoding]; Also note, that if I looked at the values in the debugger and printed them with NSLog they looked correct, however, I don't think new memory was allocated and the value copied. Instead the memory pointer was stored - went out of scope - referenced later - crash!

    Read the article

  • Can I upgrade Xcode to support a newer version of GCC to learn C++0x?

    - by Shane
    I would like to jump in learn C++0x, which has matured to a level I'm happy with. Xcode on Snow Leopard 10.6 is currently at GCC 4.2.1, and the new features I'd like to try, like std::shared_ptr, lambdas, auto, null pointer constant, unicode string literals, and other bits and pieces, require at least 4.3 (I believe). Ideally I'd use Xcode but I'm not even sure if you can manually upgrade the compiler for Xcode. Is this possible? Otherwise, what is the best way to install a different version of GCC that doesn't interfere with the rest of the system? Regards, Shane

    Read the article

  • svn branch commit - experimental commit

    - by quano
    I've made some experimental code that I would like to save in the repository, but I don't want it on the main branch. How would you commit this to a branch? Maybe I got this wrong, but of what I've understood about branching, all you actually do is copying already checked in code to another directory in the repository. I suppose one could copy the main branch to another location, and then change the working copy repository location pointer to point at that location, and then commit the experimental code. But that seems a bit long-winded. Is this really how you do it?

    Read the article

  • jcaptcha integration with struts

    - by xain
    Hi, I'm trying to interate a struts 1.3.8 app with jcaptcha-1.0; I added the jcaptcha jar to the app lib and added <%@ taglib uri="jcaptcha" prefix="jcaptcha"%> to my form The app couldn't find the file, so I added the following to the web.xml file <taglib-uri>jcaptcha</taglib-uri> <taglib-location>/WEB-INF/lib/jcaptcha-1.0-all.jar</taglib-location> </taglib> And now I get the null pointer exception: org.apache.jasper.JasperException: Unable to read TLD "META-INF/taglib.tld" from JAR file Any clues ? Thanks

    Read the article

< Previous Page | 82 83 84 85 86 87 88 89 90 91 92 93  | Next Page >