Search Results

Search found 3221 results on 129 pages for 'inline styles'.

Page 82/129 | < Previous Page | 78 79 80 81 82 83 84 85 86 87 88 89  | Next Page >

  • Best practices for handling math calculations in a flash project?

    - by VideoDnd
    I'm building a Flash project where it needs to handle some math, like an acceleration formula. My director has recommended a design pattern where I include the calculations directly in the flash object, but that doesn't seem like it's very good OOP. What's the best practice for calculations in Flash? Should it be a separate object, so I can keep the "non-Flash" parts together and out of the way? What are people's experiences with including it inline vs. keeping it separate?

    Read the article

  • Making hovor state of hidden list visible when page is active

    - by Joel
    Hi guys, One day I hope to not be such a newbie on this stuff, but some of this feels so insurmountable sometimes! OK. I have a nav bar with hidden li items that are visible when hovered over. Here's the live site: http://www.rattletree.com Here's the code for the nav: <ul id="navbar"> <li id="iex"><a href="index.php">About Rattletree</a></li> <li id="upcomgshows"><a href="upcomingshows.php">Calendar</a></li> <li id="sods"><a href="#">Sights &amp; Sounds</a> <ul class="innerlist"> <li class="innerlist"><img class="arrowAdjust" src="images/curved_arrow.png" alt="" /></li> <li class="innerlist"><a href="/playlist.m3u" target="_blank" onclick="javascript:BatmoAudioPop('Rattletree Marimba',this.href,'1'); return false">Listen</a></li> <li class="innerlist"><a href="/new_pictures.php">Photos</a></li> <li class="innerlist"><a href="/video.php">Video</a></li> <li class="innerlist"><a href="/press.php">Press</a></li> </ul> </li> <li id="bookin"><a href="#">Contact</a> <ul class="innerlist"> <li class="innerlist"><img class="arrowAdjust" src="images/curved_arrow.png" alt="" /></li> <li class="innerlist"><a href="/booking.php">Booking Info</a></li> <li class="innerlist"><a href="/media.php">Media Inquiries</a></li> </ul> </li> <li id="ste"> <a href="/sounds.php">Store</a></li> <li id="instrumes"><a href="/instruments.php">The Instruments</a></li> <li id="classe"><a href="classes.php">Workshops</a></li> </ul> css: div#navbar2 { background-color:#546F8B; border-bottom:1px solid #546F8B; border-top:1px solid #000000; display:inline-block; position:relative; width:100%; } div#navbar2 ul#navbar { color:#FFFFFF; font-family:Arial,Helvetica,sans-serif; font-size:16px; letter-spacing:1px; margin:10px 0; padding:0; white-space:nowrap; } div#navbar2 ul#navbar li ul.innerlist { color:#000000; display:none; position:relative; z-index:20; } div#navbar2 ul#navbar li { display:inline; list-style-type:none; margin:0; padding:0; position:relative; } Now it's a bit tricky what I want to do: If a user navigates to one of the innerlist pages, I'd like that innerlist ul to remain visible (with the specific li displaying the hovered state). Now I think I could figure that out on my own, but you can see on the live page that if the user is on a page from the innerlist and that list was visible, then if they hovered over the other nav tab, then those innerlists would overlap. This is a problem. Hopefully that last sentence makes sense! In short: I need to keep the inner list of the active page displaying, BUT if the user hovers over another nav button WITH it's own inner list, then the live innerlist needs to disappear. Clear as mud?

    Read the article

  • Managing several hundred occurrences of NSLocalizedString

    - by Gordon Hughes
    My application has several hundred points of localisation, some of which can be reused many times. To prevent from hunting and pecking through code to find occurrences of a particular NSLocalizedString, I create a macro for each in a header file using the #define preprocessor directive. For example: #define kLocFirstString NSLocalizedString(@"Default Text", @"Comment") #define kLocSecondString NSLocalizedString(@"More Text", @"Another comment") ... When I want to refer to a particular string, I do so by its macro name. This method has been working nicely for me, but I'm concerned that such blatant abuse of #define is frowned upon. From the standpoint of "correctness", should I just inline each NSLocalizedString with the code, or is there another method (extern NSString *aString; perhaps?) that I can use to collect the declarations in one place?

    Read the article

  • Advantage of using a static member function instead of an equivalent non-static member function?

    - by jonathanasdf
    I was wondering whether there's any advantages to using a static member function when there is a non-static equivalent. Will it result in faster execution (because of not having to care about all of the member variables), or maybe less use of memory (because of not being included in all instances)? Basically, the function I'm looking at is an utility function to rotate an integer array representing pixel colours an arbitrary number of degrees around an arbitrary centre point. It is placed in my abstract Bullet base class, since only the bullets will be using it and I didn't want the overhead of calling it in some utility class. It's a bit too long and used in every single derived bullet class, making it probably not a good idea to inline. How would you suggest I define this function? As a static member function of Bullet, of a non-static member function of Bullet, or maybe not as a member of Bullet but defined outside of the class in Bullet.h? What are the advantages and disadvantages of each?

    Read the article

  • ImageCaptureCore documentation

    - by Marc Rochkind
    There are a few overviews in the OS X 10.6 docs that I access via XCode, and a bunch of examples, but the actual reference docs seem to be absent. I was able to figure things out by reading the inline comments in the header files (e.g., ICCameraDevice.h), which looks like the source for the XCode docs. Is there a way to install these docs? The biggest problem with the overview writeups and the examples is that they assume you have a GUI. The whole point of ImageCaptureCore, vs. ImageKit, as I understand it is that you don't have a GUI, or want to have your own (my case). Anyone else have a good time figuring out how these APIs work? Way too much work! --Marc

    Read the article

  • CSS centering text between two images

    - by David Lively
    I need to display two images and some text like so: ------------------------------------------ img1--------some centered text-------img2 ------------------------------------------ img1 and img2 are not the same dimensions, but their widths are very close The text is variable depending on the page in which it is displayed, and may include two lines instead of one. The text needs to centered horizontally between the two images, or between the outside of the container (either will be fine) the text AND the images need to be centered vertically within the container. I can do this VERY easily with a table, but I'd rather not retreat to that for layout. The position:inline-block and display:table-cell attributes work great in some browsers, but I need to support IE6+.

    Read the article

  • How do I flag only one of the formsets in django admin?

    - by azuer88
    I have these (simplified) models: class Question(models.Model): question = models.CharField(max_length=60) class Choices(models.Model): question = models.ForeignKey(Question) text = models.CharField(max_length=60) is_correct = models.BooleanField(default=False) I've made Choices as an inline of Question (in admin). Is there a way to make sure that only one Choice will have is_correct = True? Ideally, is_correct will be displayed as a radio button when it is displayed in the admin formset (TabularInline). my admin.py has: from django.contrib import admin class OptionInline(admin.TabularInline): model = Option extra = 5 max_num = 5 class QuestionAdmin(admin.ModelAdmin): inlines = [OptionInline, ] admin.site.register(QType) admin.site.register(Question, QuestionAdmin)

    Read the article

  • How do I flag only one of the formsets in django admin ?

    - by azuer88
    I have these (simplified) models: class Question(models.Model): question = models.CharField(max_length=60) class Choices(models.Model): question = models.ForeignKey(Question) text = models.CharField(max_length=60) is_correct = models.BooleanField(default=False) I've made Choices as an inline of Question (in admin). Is there a way to make sure that only one Choice will have is_correct = True? Ideally, is_correct will be displayed as a radio button when it is displayed in the admin formset (TabularInline). My first solution was to override the validation of the formset but did understand how to do this. (is_correct is displayed as checkbox, and I'd display an error that only one is_correct should be selected.)

    Read the article

  • insufficient buffer when call DocumentProperties, also, global unlock wouldn't unlock...

    - by Quincy
    please see comments inline bool res = false; DWORD dwNeeded = DocumentPropertiesW(NULL, m_currPrinterHandle, (LPWSTR) m_currPrinterName.c_str(), NULL, NULL, 0); if (m_devmode_buf) { GlobalFree(m_devmode_buf); } m_devmode_buf = GlobalAlloc(GPTR, dwNeeded); GetLastError(); // = 0; if (m_devmode_buf) { LPDEVMODEW devmode_buf = (LPDEVMODEW) GlobalLock(m_devmode_buf); GetLastError(); // = 0 if (devmode_buf) { if (devmode_buf) { lala = DocumentPropertiesW(NULL, m_currPrinterHandle, (LPWSTR) m_currPrinterName.c_str(), devmode_buf, NULL, DM_OUT_BUFFER); if (lala == IDOK) { res = true; } GetLastError(); // = 122. insufficient buffer here. why???? } UInt32 res1 = GlobalUnlock(m_devmode_buf); // res1 is 1. should be 0 res2 = GetLastError(); // = 0 if (!(res1 == 0 && (res2 == ERROR_NOT_LOCKED || res2 == NO_ERROR))) { //res = false; } } }

    Read the article

  • Aligning a formtable with button

    - by Hulk
    In the below code how to align the the print button next to the table and not below or above it. <div id="content"> <form action="Empform" method="post" name="emp"> <tr><th>Name</t></tr> <tr><td></td></tr> </table> <br> <br> <label>Comments: </label> <br> <textarea rows=10 cols=75></textarea> </form> <input type="button" value="Copy" id="print" onclick="javascript:copy();" style="display:inline;/> <br> </div> Thanks..

    Read the article

  • Lightweight jQuery ColorPicker bound to input and with popup selector

    - by Scott B
    I've found two jQuery colorpickers that I'm considering using in my app. I have a simple input field that I'm asking users to supply a hex color to. I'd like to use jPicker's "Binded" example, however, the overall size of the jPicker is a bit more than I'd like to add to my app. So that sent me searching and I found a very nifty little compact picker called "Farbtastic", which does exactly what I want with one major exception: It appears to be an inline only solution (meaning, I can't call it in the same manner as jPicker's binded example. Can someone tell me how I might convert Farbtastic to mimic jPicker's binded example? More specifically, I'm looking to place a colorpicker widget (the small color frame icon as in the jPicker example) next to my input field so that it displays the currently selected color, and when clicked, it opens up the color palette widget.

    Read the article

  • Underbraces in Word math zones and dealing with stretchy parentheses

    - by Johannes Rössel
    Parentheses in Word usually stretch with whatever they're containing. This might be un-noticeable for things like but for stuff like it's definitely nice, especially compared to the fact that naïve LaTeX users often produce uglinesses such as There is a problem, however, when using under-/overbraces in math and putting parentheses around the complete term it becomes ugly. For simple things like shown here this can be solved by not letting the parentheses stretch which looks almost right. However, for more complex things it's certainly not an option: Both variants look horrible. So is there a way of letting the parentheses only stretch around the actual term parts, not including the under-/overbraces? Those are frequently used for annotations of individual pieces, so simply not using them is a bad idea too. In LaTeX you can get away with guesswork and using explicit sizes for the parentheses instead of relying on \left and \right but I haven't found a comparable option in Word yet. Since the underbrace is (tree-wise) a sibling of the term in parentheses it probably simply has to stretch and there probably can't be an algorithm that determines when to stretch or when not, considering that \above and \below are used for annotations as well but also for other things where perentheses have to stretch. Also, since the parenthesized expression is opaque from the outside one has to put the underbrace inside. From a markup point of view, at least. One can probably draw the rest around but that falls apart when styles change and wouldn't be a good idea either.

    Read the article

  • http/html/ajax: show result before site is completely processed

    - by chris
    hi! I am looking for a way to show in a webapp in front of a task a wait-message and after it hide the message. The task is running a longer time. I dont know if it is possible at all. The problem is, so far I can see, that the site will be returned to the users browser AFTER the task is completed because the task is part of the site as a inline code replaces by the webserver interpreter (no matter if php, perl or whatever). The only solution I can imagine is to parallel the task with threads or processes and requery the state with ajax in the website. Any idea to do it less complex? Thanks for help! regards chris

    Read the article

  • setting min date in jquery datepicker

    - by user1184777
    Hi i want to set min date in my jquery datepicker to (1999-10-25) so i tried the below code its not working. $(function () { $('#datepicker').datepicker({ dateFormat: 'yy-mm-dd', showButtonPanel: true, changeMonth: true, changeYear: true, showOn: "button", buttonImage: "images/calendar.gif", buttonImageOnly: true, minDate: new Date(1999, 10 - 1, 25), maxDate: '+30Y', inline: true }); }); ** if i change the min year to above 2002 than it will work fine but if i specify min year less than 2002{like above eexample 1999} it will show only up to 2002.can someone help me. i am using jquery-1.7.1.min.js and jquery-ui-1.8.18.custom.min.js.

    Read the article

  • Image rendering on browser or temporary images?

    - by Muralha
    I'm trying to make a statistics page where it will show several data and charts. The charts need to be pictures so that the user can save it/drag-and-drop to his/her personal reports. I'm using Gruff Graphs for Ruby to produce the charts but I don't know the best way to display the results safe and protected. Some of my ideas/tries are: save the chart to a file (jpg, png)? problem: data is available to anyone (don't have access to cron, to delete data from time to time) render in the browser (has to work on IE)? Use javascript (Raphaël—JavaScript Library) or Google API and output a PDF report (need plugin or gem, right)? use send_data? i've tried to output other way than inline, because I needs to show other data, is it possible? Thanks for any help.

    Read the article

  • Magento frontend and backend page looks different

    - by itsandy
    Hi All, I am a newb in magento and recently started looking at it to create a store for my client. I am not sure but i tried installing firephp extension and soon after that I’m having my screen looks like the screenshot. ** please check the link provided! Do I have to make any installations to get everything working as normal or what am I suppose to do to go to the normal screen. I have also changed the inline translation option to NO if thats what it requires. Any help would be appreciated. Cheers I have also posted this question on the magento forum http://www.magentocommerce.com/boards/viewthread/193499/

    Read the article

  • Marshal a C++ class to C#

    - by Adam Haile
    I need to access code in a native C++ DLL in some C# code but am having issues figuring out the marshaling. I've done this before with code that was straight C, but seem to have found that it's not directly possible with C++ classes. Made even more complicated by the fact that many of the classes contain virtual or inline functions. I even tried passing the headers through the PInvoke Interop Assistant, but it would choke on just about everything and not really no what to do... I'm guessing because it's not really supported. So how, if at all possible, can you use a native C++ class DLL from .NET code. If I have to use some intermediary (CLR C++?) that's fine.

    Read the article

  • ASP.NET Call Another Element's DoPostBack Function

    - by blu
    I have an ASP.NET control that has an onclick event handler rendered inline on the element. I would like to call that function and have it raise the target control's server side event handler. <asp:CheckBox ID="Foo" runat="server" AutoPostBack="true" Text="Foo" /> <a href="#" onclick="javascript:setTimeout('__doPostBack(\'Foo\',\'\')', 0)">Test </a> I created the checkbox, looked at the rendered function on the field, and then copied that into the onclick on the anchor element. The anchor will raise a postback, but the event handler for the check box is not raised. protected override void OnLoad(EventArgs e) { // fires for checkbox // fires for anchor (the anchor does cause a postback) } void Foo_CheckedChanged(object sender, EventArgs e) { // fires for checkbox // does not fire for anchor } protected override void OnInit(EventArgs e) { this.Foo.CheckedChanged += new EventHandler(Foo_CheckedChanged); } Is it possible to do this?

    Read the article

  • Underbraces in Word math zones and dealing with parentheses

    - by Johannes Rössel
    Parentheses in Word usually stretch with whatever they're containing. This might be un-noticeable for things like but for stuff like it's definitely nice, especially compared to the fact that naïve LaTeX users often produce uglinesses such as There is a problem, however, when using under-/overbraces in math and putting parentheses around the complete term it becomes ugly. For simple things like shown here this can be solved by not letting the parentheses stretch which looks almost right. However, for more complex things it's certainly not an option: Both variants look horrible. So is there a way of letting the parentheses only stretch around the actual term parts, not including the under-/overbraces? Those are frequently used for annotations of individual pieces, so simply not using them is a bad idea too. In LaTeX you can get away with guesswork and using explicit sizes for the parentheses instead of relying on \left and \right but I haven't found a comparable option in Word yet. Since the underbrace is (tree-wise) a sibling of the term in parentheses it probably simply has to stretch and there probably can't be an algorithm that determines when to stretch or when not, considering that \above and \below are used for annotations as well but also for other things where perentheses have to stretch. Also, since the parenthesized expression is opaque from the outside one has to put the underbrace inside. From a markup point of view, at least. One can probably draw the rest around but that falls apart when styles change and wouldn't be a good idea either.

    Read the article

  • Concise SSE and MMX instruction reference with latencies and throughput

    - by Joe
    I am trying to optimize some arithmetic by using the MMX and SSE instruction sets with inline assembly. However, I have been unable to find good references for the timings and usages of these enhanced instruction sets. Could you please help me find references that contain information about the throughput, latency, operands, and perhaps short descriptions of the instructions? So far, I have found: Intel Instruction References http://www.intel.com/Assets/PDF/manual/253666.pdf http://www.intel.com/Assets/PDF/manual/253667.pdf Intel Optimization Guide http://www.intel.com/Assets/PDF/manual/248966.pdf Timings of Integer Operations http://gmplib.org/~tege/x86-timing.pdf

    Read the article

  • Download attachment issue with IE6-8 - non ssl

    - by Arun P Johny
    I'm facing an issue with file download with IE6-8 in non ssl environment. I've seen a lot of articles about the IE attachment download issue with ssl. As per the articles I tried to set the values of Pragma, Cache-Control headers, but still no luck with it. These are my response headers Cache-Control: private, max-age=5 Date: Tue, 25 May 2010 11:06:02 GMT Pragma: private Content-Length: 40492 Content-Type: application/pdf Content-Disposition: Attachment;Filename="file name.pdf" Server: Apache-Coyote/1.1 I've set the header values after going through some of these sites KB 812935 KB 316431 But these items are related to SSL. I've checked the response body and headers using fiddler, the response body is proper. I'm using window.open(url, "_blank") to download the file, if I change it to window.open(url, "_parent") or change the "Content-Disposition" to 'inline;Filename="file name.pdf"' it works fine. Please help me to solve this problem

    Read the article

  • Jquery Event onChange for Div

    - by David
    I have a page with the following two divs: <div id="searchResults"> </div> <div class="postSearchOptions" style="display: none;"> </div> Is there any way that I can make the "postSearchOptions" div appear when the "searchResults" div is updated by an AJAX call? I don't control the AJAX calls and I want to detect any change in the "searchResults" div. I tried writing the following JQuery code, but then realized that it requires Jquery 1.4 and I only have 1.3: $("#searchResults").live("change", function() { $(".postSearchOptions").css("display", "inline"); }); Is there any way to catch the event of the searchResults div changing using either standard JavaScript or Jquery 1.3? Thanks!

    Read the article

  • navbar hover issue in ie7

    - by Joel
    I'm having a problem with a child list not hovering correctly in IE7. Other browsers and IE7 seem to work fine. Here is the site: http://rattletree.com/index_1.php If you hover over the nav bars you'll see the sub-list come into view. You can see that the arrow image is not below the navbar in IE7 only. html: <div id="navbar2"> <ul id="navbar"> <li id="index"><a href="index.php">About Rattletree</a></li> <li id="upcomingshows"><a href="upcomingshows.php">Calendar</a></li> <li id="booking"><a href="booking.php">Contact</a> <ul class="innerlist"> <li class="innerlist"><img class="arrowAdjust" src="images/curved_arrow.png"</img><a href="#">Booking Information</a></li> <li class="innerlist"><a href="#">Press</a></li> </ul> </li> <li id="instruments"><a href="instruments.php">The Band</a> <ul class="innerlist"> <li class="innerlist"><img class="arrowAdjust" src="images/curved_arrow.png"</img><a href="#">The Instruments</a></li> <li class="innerlist"><a href="#">The Players</a></li> </ul> </li> <li id="classes"><a href="classes.php">Sights &amp; Sounds</a> <ul class="innerlist"> <li class="innerlist"><img class="arrowAdjust" src="images/curved_arrow.png"</img><a href="#">Listen</a></li> <li class="innerlist"><a href="#">Photos</a></li> <li class="innerlist"><a href="#">Video</a></li> </ul> </li> <li id"classes"><a href="classes.php">Workshops &amp; Classes</a></li> </ul> </div> and css: /* OUTER LIST STYLING */ div#navbar2 { position:relative; width: 100%; border-top: solid #000 1px; border-bottom: solid #546F8B 1px; background-color: #546F8B; } div#navbar2 ul#navbar { padding: 0px; margin: 10px 0; font-family: Arial, Helvetica, sans-serif; font-size: 16px; letter-spacing:1px; color: #FFF; white-space: nowrap; display:block; } div#navbar2 ul#navbar li { position:relative; margin: 0px; padding:0px; list-style-type: none; display:inline; } div#navbar2 li a { text-decoration: none; color: #fff; margin:0; padding: 11px 12px; } div#navbar2 li a:link { color: #FFF: } div#navbar2 li a:visited { color: #ffffff; } div#navbar2 li a:hover { color: #000; background-color: #FDFFC9; } /* INNER LIST STYLING */ div#navbar2 ul#navbar li ul.innerlist{ display: none; color:#000; } div#navbar2 ul#navbar li ul.innerlist li{ color:#000; } div#navbar2 ul#navbar li:hover ul.innerlist { position: absolute; display: inline; left: 0; width: 100%; margin: 30px 0 0px 0px; padding: 0; color:#000; } div#navbar2 ul#navbar li.innerlist a { text-decoration: none; font-weight:bold; color: #000; padding: 10px 15px 20px 15px; margin:0; } div#navbar2 li.innerlist a:link { color: #000: } div#navbar2 li.innerlist a:visited { color: #000; } div#navbar2 ul#navbar li.innerlist a:hover { color: #e62d31; background-color:transparent; } img.arrowAdjust{ padding:0px 0 0 20px; margin:0; }

    Read the article

  • navbar hover issue in ie8

    - by Joel
    I'm having a problem with a child list not hovering correctly in IE8. Other browsers and IE7 seem to work fine. Here is the site: http://rattletree.com/index_1.php If you hover over the nav bars you'll see the sub-list come into view. You can see that the arrow image is not below the navbar in IE8 only. html: <div id="navbar2"> <ul id="navbar"> <li id="index"><a href="index.php">About Rattletree</a></li> <li id="upcomingshows"><a href="upcomingshows.php">Calendar</a></li> <li id="booking"><a href="booking.php">Contact</a> <ul class="innerlist"> <li class="innerlist"><img class="arrowAdjust" src="images/curved_arrow.png"</img><a href="#">Booking Information</a></li> <li class="innerlist"><a href="#">Press</a></li> </ul> </li> <li id="instruments"><a href="instruments.php">The Band</a> <ul class="innerlist"> <li class="innerlist"><img class="arrowAdjust" src="images/curved_arrow.png"</img><a href="#">The Instruments</a></li> <li class="innerlist"><a href="#">The Players</a></li> </ul> </li> <li id="classes"><a href="classes.php">Sights &amp; Sounds</a> <ul class="innerlist"> <li class="innerlist"><img class="arrowAdjust" src="images/curved_arrow.png"</img><a href="#">Listen</a></li> <li class="innerlist"><a href="#">Photos</a></li> <li class="innerlist"><a href="#">Video</a></li> </ul> </li> <li id"classes"><a href="classes.php">Workshops &amp; Classes</a></li> </ul> </div> and css: /* OUTER LIST STYLING */ div#navbar2 { position:relative; width: 100%; border-top: solid #000 1px; border-bottom: solid #546F8B 1px; background-color: #546F8B; } div#navbar2 ul#navbar { padding: 0px; margin: 10px 0; font-family: Arial, Helvetica, sans-serif; font-size: 16px; letter-spacing:1px; color: #FFF; white-space: nowrap; display:block; } div#navbar2 ul#navbar li { position:relative; margin: 0px; padding:0px; list-style-type: none; display:inline; } div#navbar2 li a { text-decoration: none; color: #fff; margin:0; padding: 11px 12px; } div#navbar2 li a:link { color: #FFF: } div#navbar2 li a:visited { color: #ffffff; } div#navbar2 li a:hover { color: #000; background-color: #FDFFC9; } /* INNER LIST STYLING */ div#navbar2 ul#navbar li ul.innerlist{ display: none; color:#000; } div#navbar2 ul#navbar li ul.innerlist li{ color:#000; } div#navbar2 ul#navbar li:hover ul.innerlist { position: absolute; display: inline; left: 0; width: 100%; margin: 30px 0 0px 0px; padding: 0; color:#000; } div#navbar2 ul#navbar li.innerlist a { text-decoration: none; font-weight:bold; color: #000; padding: 10px 15px 20px 15px; margin:0; } div#navbar2 li.innerlist a:link { color: #000: } div#navbar2 li.innerlist a:visited { color: #000; } div#navbar2 ul#navbar li.innerlist a:hover { color: #e62d31; background-color:transparent; } img.arrowAdjust{ padding:0px 0 0 20px; margin:0; }

    Read the article

  • Virtual Function Implementation

    - by Gokul
    Hi, I have kept hearing this statement. Switch..Case is Evil for code maintenance, but it provides better performance(since compiler can inline stuffs etc..). Virtual functions are very good for code maintenance, but they incur a performance penalty of two pointer indirections. Say i have a base class with 2 subclasses(X and Y) and one virtual function, so there will be two virtual tables. The object has a pointer, based on which it will choose a virtual table. So for the compiler, it is more like switch( object's function ptr ) { case 0x....: X->call(); break; case 0x....: Y->call(); }; So why should virtual function cost more, if it can get implemented this way, as the compiler can do the same in-lining and other stuff here. Or explain me, why is it decided not to implement the virtual function execution in this way? Thanks, Gokul.

    Read the article

< Previous Page | 78 79 80 81 82 83 84 85 86 87 88 89  | Next Page >