Search Results

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

Page 33/86 | < Previous Page | 29 30 31 32 33 34 35 36 37 38 39 40  | Next Page >

  • Will NKDbgPrintfW be compiled to nop in release build?

    - by Johann Gerell
    I know about and have used the macros DEBUGMSG, RETAILMSG, ERRORMSG, that all take a condition parameter. For general formatted debug output, though, I want to use ::NKDbgPrintfW directly and wonder if someone knows if it compiles to a nop in optimised release builds or if my own macro wrapper around it with #ifdef DEBUG is still needed?

    Read the article

  • Google search ajax api is to restrictive. Any alternatives?

    - by boomhauer
    The google search ajax api is terrific, and the .net wrapper available on codeplex makes using it from a .net project very simple. However, the api itself is crippled so that it only returns 64 results per query. Not very useful for many applications. Ignoring the likely TOS problems, are there known .net libraries that can query the root google website and scrape the results into a resultset? I'm assuming this could result in much larger result counts than the ajax version enabled.

    Read the article

  • CSS/JS: Evenly spreading elements across multiple lines

    - by David Lawson
    How would you go about evenly spreading elements across multiple lines, for example: wrapper div: <div style="text-align: center"> elements inside: <div style="display: inline-block; padding-left: 10px; padding-right: 10px;">Element</div> Instead of only having one element on the next line (wrapped): Element 1 Element 2 Element 3 Element 4 Element 5 Element 6 It does this, spreading out the elements: Element 1 Element 2 Element 3 Element 4 Element 5 Element 6

    Read the article

  • how to get $form_state outside of FAPI's functions?

    - by logii
    I'm writing a custom module and I'd like to use $form_state of the current form in another non-form api function - custom_facet_view_build(). any help is appreciated :) <?php /** * Implementation of hook_perm(). */ function custom_facet_perm() { return array( 'access foo content', 'access baz content', ); } /** * Implementation of hook_menu(). */ function custom_facet_menu() { $items['faceted-search'] = array( 'title' => 'Faceted Search', 'page callback' => 'drupal_get_form', 'access arguments' => array(), ); $items['facet-search-test'] = array( 'page callback' => 'drupal_get_form', 'page arguments' => array('custom_facet_form'), 'access callback' => TRUE, 'type' => MENU_CALLBACK, ); return $items; } /** * Form definition; ahah_helper_demo form. */ function custom_facet_form($form_state) { $form = array(); ahah_helper_register($form, $form_state); if (isset($form_state['storage']['categories'])) { $categories_default_value = $form_state['storage']['categories']["#value"]; } $form['facet_search_form'] = array( '#type' => 'fieldset', '#title' => t('Faceted Search'), '#prefix' => '<div id="billing-info-wrapper">', // This is our wrapper div. '#suffix' => '</div>', '#tree' => TRUE, // Don't forget to set #tree! ); $form['facet_search_form']['categories'] = array( '#type' => 'select', '#title' => t('Category'), '#options' => _custom_facet_taxonomy_query(1), '#multiple' => TRUE, '#default_value' => $categories_default_value, ); $form['save'] = array( '#type' => 'submit', '#value' => t('Save'), ); return $form; } /** * Validate callback for the form. */ function custom_facet_form_validate($form, &$form_state) { } /** * Submit callback for the form. */ function custom_facet_form_submit($form, &$form_state) { drupal_set_message('nothing done'); $form_state['storage']['categories'] = $form['facet_search_form']['categories']; // dpm($form_state); // There's a value returned in form_state['storage] within this function } /** * Implementation of hook_views_api(). */ function custom_facet_views_api() { return array( 'api' => 2, ); } function custom_facet_view_build(&$view) { dpm($form_state); // form_state['storage] remains NULL even though there's a value on previous submission }

    Read the article

  • How are iterators and pointers related?

    - by sharptooth
    Code with iterators looks pretty much like code with pointers. Iterators are of some obscure type (like std::vector<int>::iterator for example). What I don't get is how iterators and pointer are related to each other - is an iterator a wrapper around a pointer with overloaded operations to advance to adjacent elements or is it something else?

    Read the article

  • Multi-tier applications using L2S, WCF and Base Class

    - by Gena Verdel
    Hi all. One day I decided to build this nice multi-tier application using L2S and WCF. The simplified model is : DataBase-L2S-Wrapper(DTO)-Client Application. The communication between Client and Database is achieved by using Data Transfer Objects which contain entity objects as their properties. abstract public class BaseObject { public virtual IccSystem.iccObjectTypes ObjectICC_Type { get { return IccSystem.iccObjectTypes.unknownType; } } [global::System.Data.Linq.Mapping.ColumnAttribute(Storage = "_ID", AutoSync = AutoSync.OnInsert, DbType = "BigInt NOT NULL IDENTITY", IsPrimaryKey = true, IsDbGenerated = true)] [global::System.Runtime.Serialization.DataMemberAttribute(Order = 1)] public virtual long ID { //get; //set; get { return _ID; } set { _ID = value; } } } [DataContract] public class BaseObjectWrapper<T> where T : BaseObject { #region Fields private T _DBObject; #endregion #region Properties [DataMember] public T Entity { get { return _DBObject; } set { _DBObject = value; } } #endregion } Pretty simple, isn't it?. Here's the catch. Each one of the mapped classes contains ID property itself so I decided to override it like this [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.Divisions")] [global::System.Runtime.Serialization.DataContractAttribute()] public partial class Division : INotifyPropertyChanging, INotifyPropertyChanged { [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ID", AutoSync=AutoSync.OnInsert, DbType="BigInt NOT NULL IDENTITY", IsPrimaryKey=true, IsDbGenerated=true)] [global::System.Runtime.Serialization.DataMemberAttribute(Order=1)] public override long ID { get { return this._ID; } set { if ((this._ID != value)) { this.OnIDChanging(value); this.SendPropertyChanging(); this._ID = value; this.SendPropertyChanged("ID"); this.OnIDChanged(); } } } } Wrapper for division is pretty straightforward as well: public class DivisionWrapper : BaseObjectWrapper<Division> { } It worked pretty well as long as I kept ID values at mapped class and its BaseObject class the same(that's not very good approach, I know, but still) but then this happened: private CentralDC _dc; public bool UpdateDivision(ref DivisionWrapper division) { DivisionWrapper tempWrapper = division; if (division.Entity == null) { return false; } try { Table<Division> table = _dc.Divisions; var q = table.Where(o => o.ID == tempWrapper.Entity.ID); if (q.Count() == 0) { division.Entity._errorMessage = "Unable to locate entity with id " + division.Entity.ID.ToString(); return false; } var realEntity = q.First(); realEntity = division.Entity; _dc.SubmitChanges(); return true; } catch (Exception ex) { division.Entity._errorMessage = ex.Message; return false; } } When trying to enumerate over the in-memory query the following exception occurred: Class member BaseObject.ID is unmapped. Although I'm stating the type and overriding the ID property L2S fails to work. Any suggestions?

    Read the article

  • Media Information Extractor for Java

    - by eyazici
    I need a media information extraction library (pure Java or JNI wrapper) that can handle common media formats. I primarily use it for video files and I need at least these information: Video length (Runtime) Video bitrate Video framerate Video format and codec Video size (width X height) Audio channels Audio format Audio bitrate and sampling rate There are several libraries and tools around but I couldn't find for Java.

    Read the article

  • How to replicate this button in CSS

    - by jasondavis
    I am trying to create a CSS theme switcher button like below. The top image shows what I have so far and the bottom image shows what I am trying to create. I am not the best at this stuff I am more of a back-end coder. I could really use some help. I have a live demo of the code here http://dabblet.com/gist/2230656 Just looking at what I have and the goal image, some differences. I need to add a gradient The border is not right on mine Radius is a little off Possibly some other stuff? Also here is the code...it can be changed anyway to improve this, the naming and stuff could be improved I am sure but I can use any help I can get. HTML <div class="switch-wrapper"> <div class="switcher left selected"> <span id="left">....</span> </div> <div class="switcher right"> <span id="right">....</span> </div> </div> CSS /* begin button styles */ .switch-wrapper{ width:400px; margin:220px; } .switcher { background:#507190; display: inline-block; max-width: 100%; box-shadow: 1px 1px 1px rgba(0,0,0,.3); position:relative; } #left, #right{ width:17px; height:11px; overflow:hidden; position:absolute; top:50%; left:50%; margin-top:-5px; margin-left:-8px; font: 0/0 a; } #left{ background-image: url(http://www.codedevelopr.com/assets/images/switcher.png); background-position: 0px px; } #right{ background-image: url(http://www.codedevelopr.com/assets/images/switcher.png); background-position: -0px -19px; } .left, .right{ width: 30px; height: 25px; border: 1px solid #3C5D7E; } .left{ border-radius: 6px 0px 0px 6px; } .right{ border-radius: 0 6px 6px 0; margin: 0 0 0 -6px } .switcher:hover, .selected { background: #27394b; box-shadow: -1px 1px 0px rgba(255,255,255,.4), inset 0 4px 5px rgba(0,0,0,.6), inset 0 1px 2px rgba(0,0,0,.6); }

    Read the article

  • Seeking jQuery-based transition library

    - by justSteve
    I'm looking for a library (or plugin) that help me create a slideshow where (besides the simple ordering of images) I'm able to define the beginning and ending positions (either X/Y, or Zooms) for a given image and the plugin animates the intervening steps between them. Flash has a number of tools/libs like this, i'm sure jQuery has seen similar. Ideally something that offers a range of easing effects as well. I understand these elements are native to jQuery...i'm looking for a time-tested wrapper. thx

    Read the article

  • Swapping two jQuery draggable list items not working properly (with jsFiddle example)

    - by Tony_Henrich
    The minimalist working example below swaps the two boxes when box 'one' is dragged and dropped on box 'two'. The problem is that when box 'one' is dropped, its style has 'top' & 'left' values causing it to be placed away from where it should drop. Its class includes 'ui-draggable-dragging'. It seems the top & left values are related to the amount the elements were dragged before the drop. And the dragging was 'interrupted' hence the residual 'ui-draggable-dragging' class? What am I missing to make the swap work seamlessly? full jsfiddle example here <html> <head> <script type="text/javascript" src="includes/jquery-1.4.2.min.js"></script> <script type="text/javascript" src="includes/jquery-ui-1.8.2.custom.min.js"></script> <script type="text/javascript"> jQuery.fn.swapWith = function(to) { return this.each(function() { var copy_to = $(to).clone(true); var copy_from = $(this).clone(true); $(to).replaceWith(copy_from); $(this).replaceWith(copy_to); }); }; $(document).ready(function() { options = {revert: true}; $("li").draggable(options) $('#wrapper').droppable({ drop: function(event, ui) { $(ui.draggable).swapWith($('#two')); } }); }); </script> </head> <body> <form> <ul id="wrapper"> <li id='one'> <div style="width: 100px; height: 100px; border: 1px solid green"> one<br /></div> </li> <li id='two'> <div style="width: 110px; height: 110px; border: 1px solid red"> two<br /></div> </li> </ul> <br /> </form> </body> </html>

    Read the article

  • PHP running as a FastCGI application (php-cgi) - how to issue concurrent requests?

    - by Sbm007
    Some background information: I'm writing my own webserver in Java and a couple of days ago I asked on SO how exactly Apache interfaces with PHP, so I can implement PHP support. I learnt that FastCGI is the best approach (since mod_php is not an option). So I have looked at the FastCGI protocol specification and have managed to write a working FastCGI wrapper for my server. I have tested phpinfo() and it works, in fact all PHP functions seem to work just fine (posting data, sessions, date/time, etc etc). My webserver is able to serve requests concurrently (ie user1 can retrieve file1.html at the same time as user2 requesting some_large_binary_file.zip), it does this by spawning a new Java thread for each user request (terminating when completed or user connection with client is cancelled). However, it cannot deal with 2 (or more) FastCGI requests at the same time. What it does is, it queues them up, so when request 1 is completed immediately thereafter it starts processing request 2. I tested this with 2 PHP pages, one contains sleep(10) and the other phpinfo(). How would I go about dealing with multiple requests as I know it can be done (PHP under IIS runs as FastCGI and it can deal with multiple requests just fine). Some more info: I am coding under windows and my batch file used to execute php-cgi.exe contains: set PHP_FCGI_CHILDREN=8 set PHP_FCGI_MAX_REQUESTS=500 php-cgi.exe -b 9000 But it does not spawn 8 children, the service simply terminates after 500 requests. I have done research and from Wikipedia: Processing of multiple requests simultaneously is achieved either by using a single connection with internal multiplexing (ie. multiple requests over a single connection) and/or by using multiple connections Now clearly the multiple connections isn't working for me, as everytime a client requests something that involves FastCGI it creates a new socket to the FastCGI application, but it does not work concurrently (it queues them up instead). I know that internal multiplexing of FastCGI requests under the same connection is accomplished by issuing each unique FastCGI request with a different request ID. (also see the last 3 paragraphs of 'The Communication Protocol' heading in this article). I have not tested this, but how would I go about implementing that? I take it I need some kind of FastCGI Java thread which contains a Map of some sort and a static function which I can use to add requests to. Then in the Thread's run() function it would have a while loop and for every cycle it would check whether the Map contains new requests, if so it would assign them a request ID and write them to the FastCGI stream. And then wait for input etc etc, As you can see this becomes too complicated. Does anyone know the correct way of doing this? Or any thoughts at all? Thanks very much. Note, if required I can supply the code for my FastCGI wrapper.

    Read the article

  • How to make System command calls in Java/Groovy?

    - by Zombies
    What I want to do is invoke maven from a groovy script. The groovy script in question is used as a maven wrapper to build J2EE projects by downloading a tag and invoking maven on what was downloaded. How should I accomplish invoking maven to build/package the EAR (the groovy script is already capable of downloading the tag from SCM).

    Read the article

  • Multipage forms for joomla (looking outside the box)

    - by John Snow
    I have created a number of forms using various Joomla components which have more or less worked successfully. Recently I have attempted to create mult-page forms - the forms work...but they are slow as molasses. Having spent a couple of weeks trying to resolve this and not seeing any signs of improvement ...... I wonder if anyone has experience of using hosted forms services in Joomla either using a wrapper or as a static page within a Joomla site. Any pointers or recommendations would be appreciated.

    Read the article

  • How to position DIV at bottom of page between two vertical navigation bars

    - by proficients
    I'm having trouble being able to do two things. I can always seem to accomplish one, but not the other. I'd like to have my footer always appear at the bottom of the page AND take up 100% width of the content container. HTML: <div id="wrapper"> <div id="nav_open"> nav_open </div> <div id="content"> <div id="content_header"> content_header </div> <div id="content_body"> content_body </div> <div id="content_footer"> Footer </div> </div> <div id="nav_closed"> nav_closed </div> </div> CSS html, body { margin: 0px; padding: 0px; height: 100%; width: 100%; border: none; } #wrapper { position: relative; width: 100%; min-width: 940px; min-height: 100%; height: 100%; border: 1px solid #ff0000; } #nav_open { position: absolute; top: 0px; left: 0px; width: 125px; height: 100%; border: 1px solid #ff0000; } #content { top: 0px; margin-left: 126px; margin-right: 201px; min-height: 100%; height: 100%; border: 1px solid #ff0000; } #nav_closed { position: absolute; top: 0px; right: 0px; width: 200px; height: 100%; border: 1px solid #ff0000; } #content_header { border: 1px solid #ff0000; } #content_body { border: 1px solid #ff0000; } #content_footer { height: 15px; background: #df781c; border: 1px solid #ff0000; }

    Read the article

  • Log4J in AS/400

    - by Sam
    Hi, I am looking for a logging mechanism in AS/400 similar to log4j. I am thinking of writing a wrapper to the log4j in AS/400. Can someone please let me know if there is such a tool present already? Thanks, Sam

    Read the article

  • JNA problem with char** (in dll)

    - by underline
    Hi, ok it is 'easy' to make jna wrapper solution for mapping exported functions within dll using jna: long f1(int x), just int long f2(char* y), just char[] but how to deal with long f3(char** z) ? I need f3's result(long) as well as z value on java side. Please don't say cpp code should be rewritten to avoid this:-)

    Read the article

  • How to attach Gtk::Menu to Gtk::Widget

    - by krokoziabla
    Gtk::Menu has void Gtk::Menu::attach_to_widget(Widget& attach_widget, GtkMenuDetachFunc detacher) void Gtk::Menu::attach_to_widget (Widget& attach_widget) wrapper methods for void gtk_menu_attach_to_widget(GtkMenu *menu, GtkWidget *attach_widget, GtkMenuDetachFunc detacher) But why are they protected? If I want to make a pop-up menu on a widget, how, then, can I get access to it from the menu's activate call-back if not via these methods?

    Read the article

  • Need to tab out of ActiveX control in browser

    - by John Donoghue
    When tabbing through controls in an ActiveX control hosted in IE, once I get to the last control the tab key no longer does anything. I would like it to move the focus outside the ActiveX control to the next html control. This works fine when the ActiveX control is hosted in a WinForms app, does anybody know how to make this work in the browser? It may also be relevant that the ActiveX control is a simple wrapper around a WPF control.

    Read the article

  • Seg Fault with malloc'd pointers

    - by anon
    I'm making a thread class to use as a wrapper for pthreads. I have a Queue class to use as a queue, but I'm having trouble with it. It seems to allocate and fill the queue struct fine, but when I try to get the data from it, it Seg. faults. http://pastebin.com/Bquqzxt0 (the printf's are for debugging, both throw seg faults) edit: the queue is stored in a dynamically allocated "struct queueset" array as a pointer to the data and an index for the data

    Read the article

  • Has anyone tried the "objectify" library for Google App Engine?

    - by Spines
    I was using JDO for my google app engine project but got fed up with the additional 5 seconds it adds to my cold start time. I was planning on just writing stuff directly to the database with the low level datastore api, but then I came accross the objectify project ( http://code.google.com/p/objectify-appengine/ ). Apparently its a super light wrapper above the low level api. Does anyone have experiences with this library that they could share?

    Read the article

< Previous Page | 29 30 31 32 33 34 35 36 37 38 39 40  | Next Page >