Search Results

Search found 1821 results on 73 pages for 'inline formset'.

Page 16/73 | < Previous Page | 12 13 14 15 16 17 18 19 20 21 22 23  | Next Page >

  • does passing __m128i objects by reference to inline function cause these objects to be moved to stac

    - by ~buratinas
    Hello, I'm writing transpose function for 8x16bit vectors with SSE2 intrinsics. Since there are 8 arguments for that function (a matrix of 8x8x16bit size), I can't do anything but pass them by reference. Will that be optimized by the compiler (I mean, will these __m128i objects be passed in registers instead of stack)? Code snippet: inline void transpose (__m128i &a0, __m128i &a1, __m128i &a2, __m128i &a3, __m128i &a4, __m128i &a5, __m128i &a6, __m128i &a7) { .... }

    Read the article

  • How do I fix incorrect inline Javascript indentation in Vim?

    - by Charles Roper
    I can't seem to get inline Javascript indenting properly in Vim. Consider the following: $(document).ready(function() { // Closing brace correctly indented $("input").focus(function() { $(this).closest("li").addClass("cur-focus"); }); // <-- I had to manually unindent this // Closing brace incorrectly indented $("input").blur(function() { $(this).closest("li").removeClass("cur-focus"); }); // <-- This is what it does by default. Argh! }); Vim seems to insist on automatically indenting the closing brace shown in the second case there. It does the same if I re-indent the whole file. How do I get it to automatically indent using the more standard JS indenting style seen in the first case?

    Read the article

  • How do I allow inline images with data urls on .NET 4 without triggering request validation?

    - by Johan Driessen
    I'm using the jQuery jstree plugin (http://jstree.com) in a ASP.NET MVC 2 project on .NET 4 RC. It comes with some stylesheets with inline images with data urls, like this: .tree-checkbox ul { background-image:url(data:image/gif;base64,R0lGODlhAgACAIAAAB4dGf///yH5BAEAAAEALAAAAAACAAIAAAICRF4AOw==); } Now, the url for the background image contains a colon, which .NET 4 thinks is an unsafe character, so I get this error message: A potentially dangerous Request.Path value was detected from the client (:). According to the documentation, I am supposed to be able to prevent this by adding <pages validateRequest="false" /> to my Web.config, but that doesn't seem to help. I have tried adding it to the main Web.config for the application, as well as to a special Web.config in the /config folder, but to no avail. Is there any way to get .NET to allow this?

    Read the article

  • Looking for a lean WYSIWYG inline editor for CMS projects that includes an image upload feature?

    - by Roeland
    Hey guys, I am looking to find a lean WYSIWYG inline editor. The main required feature is image uploading. A simple way to upload an image to the server and use it in the content being editted. I have come across a whole bunch of editors but nothing I liked so far. I am looking for something open source and free. So far I have checked out TinyMCE which is free.. untill you need image uploading capabilities. Ckeditor looks great.. uses jquery.. but requires you to have your own server side script to upload images. They barely give any documentation on how to do this. There were a few others, but the bottom line was that I cant find anything that is simple with out of the box image uploading capabilities. Thanks for any advice you may give!

    Read the article

  • How to make inline png <img> transparent using css?

    - by metal-gear-solid
    How to make inline png transparent inside div? using css <div id="report'> <p> some text </p> <img src=transparent.png" /> </p> </div> this is image for example . Other than ball i want to make transparent other white area. Which is looking grey in IE6 I want to do in css like this div#report img {.....} is it possible? Edit: I don't want to make whole image transparent.

    Read the article

  • Sql inline query with parameters. Parameter is not read when the query is executed.

    - by fzshah76
    Hi All: I am having a problem with my sql query in c#, basically it's inline query with parameters, but when I run it it tells me that parameter 1 or parameter 2 is not there here is my query declared on top of the page as public: public const string InsertStmtUsersTable = "insert into Users (username, password, email, userTypeID, memberID, CM7Register) " + "Values(@username, @password, @email, @userTypeID, @memberID,@CM7Register ); select @@identity"; this is my code for assigning the parameters, I know I am having problem so I am assigning the params twice: Username =(cmd.Parameters["@username"].Value = row["username"].ToString()) as string; cmd.Parameters["@username"].Value = row["username"].ToString(); In 1 methopd it calls this query and tries to insert to table, here is the code: Result = Convert.ToInt32(SqlHelper.ExecuteScalar(con, CommandType.Text,InsertStmtUsersTable)); Exact error message is: Must declare the variable '@username'.

    Read the article

  • How do polymorphic inline caches work with mutable types?

    - by kingkilr
    A polymorphic inline cache works by caching the actual method by the type of the object, in order to avoid the expensive lookup procedures (usually a hashtable lookup). How does one handle the type comparison if the type objects are mutable (i.e. the method might be monkey patched into something different at run time). The one idea I've come up with would be a "class counter" that gets incremented each time a method is adjusted, however this seems like it would be exceptionally expensive in a heavily monkey patched environ since it would kill all the PICs for that class, even if the methods for them weren't altered. I'm sure there must be a good solution to this, as this issue is directly applicable to Javascript and AFAIK all 3 of the big JS VMs have PICs (wow acronym ahoy).

    Read the article

  • code-style: Is inline initialization of JS objects ok?

    - by michael
    I often find myself using inline initialization (see example below), especially in a switch statement when I don't know which case loop will hit. I find it easier to read than if statements. But is this good practice or will it incur side-effects or a performance hit? for (var i in array) { var o = o ? o : {}; // init object if it doesn't exist o[array[i]] = 1; // add key-values } Is there a good website to go to get coding style tips?

    Read the article

  • How do I use Declarations (type, inline, optimize) in Scheme?

    - by kunjaan
    How do I declare the types of the parameters in order to circumvent type checking? How do I optimize the speed to tell the compiler to run the function as fast as possible like (optimize speed (safety 0))? How do I make an inline function in Scheme? How do I use an unboxed representation of a data object? And finally are any of these important or necessary? Can I depend on my compiler to make these optimizations? thanks, kunjaan.

    Read the article

  • How do I avoid nesting forms when offering inline editing of lists with checkboxes for mass updates.

    - by adam
    A lot of sites offer the ability to edit lists of items inline as well as allowing multiple items to be selected via checkboxes and have an action performed all at once e.g. delete, mark as spam etc. But how do you implement this without violating html rules. I need one form for the checkboxes with individual submit_tags for the mass actions. But after a user clicks on an item in the list, another form via Ajax will be inserted within the checkbox form. How do I avoid doing this? I'm using rails and jQuery.

    Read the article

  • Visual Studio add-in to support images inline with source?

    - by Jesse Stimpson
    We use Visual Studio 2005 here, and in an attempt to improve the documentation of our source, we're looking for a Visual Studio add-in that will allow images to be viewed in line with source from within the IDE. For example, the use case I'd like to fit is the following: In the directory in which my source lives, I save my image file my_image.png. In the source file, I write a comment of the form /// @image my_image.png The add-in allows me to toggle between seeing the text /// @image my_image.png and viewing the actual image within the code editing window, inline with whatever source surrounds it. Does anyone know of an existing add-in for VS 2005? If not, does the VS add-in api allow for such functionality? Thanks!

    Read the article

  • IE6 forces Two clicks to trigger javascript style=display:inline; event

    - by JiminyCricket
    I have a web form that has 2 radio buttons, depending on which one is clicked it displays a hidden element This works fine in all browsers except for IE6, which, after I click on the radio button, I have to click again (anywhere on the window) and then the element is displayed...has anyone had behavior like this before? I tried to not use jQuery and do straight getElementById() but I get the same behavior... JSCRiPT function showHidden(divid) { $('#'+divid).css( {'display':'inline'} ); } HTML <input type=radio name=borp value=1 onChange='showHidden("brandchecks")' > Brand <input type=radio name=borp value=2 onChange='showHidden("productchecks")' > Product <div id='brandchecks' style='display:none;'> Blah </div> <div id='productchecks' style='display:none;'> Blah </div>

    Read the article

  • How does one view the "inline docs" of a .cpp file?

    - by Mala
    I have cpp files peppered with comments such as the following before every function: /** * @brief Set the normal and expansion handshake timeouts. * * @param wm Array of wiimote_t structures. * @param wiimotes Number of objects in the wm array. * @param normal_timeout The timeout in milliseconds for a normal read. * @param exp_timeout The timeout in millisecondsd to wait for an expansion handshake. */ I assume from the format that there has to be some way of exporting this into a "friendly" format, perhaps html, which can then be read in a manner similar to the Java API. How would I do this? (I'm on Windows 7, running MS Visual Studio 2010)

    Read the article

  • How can I work around SQL Server - Inline Table Value Function execution plan variation based on par

    - by Ovidiu Pacurar
    Here is the situation: I have a table value function with a datetime parameter ,lest's say tdf(p_date) , that filters about two million rows selecting those with column date smaller than p_date and computes some aggregate values on other columns. It works great but if p_date is a custom scalar value function (returning the end of day in my case) the execution plan is altered an the query goes from 1 sec to 1 minute execution time. A proof of concept table - 1K products, 2M rows: CREATE TABLE [dbo].[POC]( [Date] [datetime] NOT NULL, [idProduct] [int] NOT NULL, [Quantity] [int] NOT NULL ) ON [PRIMARY] The inline table value function: CREATE FUNCTION tdf (@p_date datetime) RETURNS TABLE AS RETURN ( SELECT idProduct, SUM(Quantity) AS TotalQuantity, max(Date) as LastDate FROM POC WHERE (Date < @p_date) GROUP BY idProduct ) The scalar value function: CREATE FUNCTION [dbo].[EndOfDay] (@date datetime) RETURNS datetime AS BEGIN DECLARE @res datetime SET @res=dateadd(second, -1, dateadd(day, 1, dateadd(ms, -datepart(ms, @date), dateadd(ss, -datepart(ss, @date), dateadd(mi,- datepart(mi,@date), dateadd(hh, -datepart(hh, @date), @date)))))) RETURN @res END Query 1 - Working great SELECT * FROM [dbo].[tdf] (getdate()) The end of execution plan: Stream Aggregate Cost 13% <--- Clustered Index Scan Cost 86% Query 2 - Not so great SELECT * FROM [dbo].[tdf] (dbo.EndOfDay(getdate())) The end of execution plan: Stream Aggregate Cost 4% <--- Filter Cost 12% <--- Clustered Index Scan Cost 86%

    Read the article

  • Why does cloning the django inline formsets result to forms with similar ids and names?

    - by user1289167
    In my project I use django inline formsets. I got the jquery to clone the formsets but unfortunately the cloned forms have the same names and ids and so data entered in the last one overwrites the data from the first form. What could I be doing wrong? Here is the script: <script type="text/javascript">> function cloneMore(selector, type) { var newElement = $(selector).clone(true); var total = $('#id_' + type + '-TOTAL_FORMS').val(); newElement.find(':input').each(function() { var name = $(this).attr('name').replace('-' + (total-1) + '-','-' + total + '-'); var id = 'id_' + name; $(this).attr({'name': name, 'id': id}).val('').removeAttr('checked'); }); newElement.find('label').each(function() { var newFor = $(this).attr('for').replace('-' + (total-1) + '-','-' + total + '-'); $(this).attr('for', newFor); }); total++; $('#id_' + type + '-TOTAL_FORMS').val(total); $(selector).after(newElement); } </script>

    Read the article

  • How to display inline several <li> with 100% width?

    - by Rui
    Hi, I have the following html: <div id="container"> <ul> <li>element 1</li> <li>element 2</li> </ul> </div> applied with a css as follows: #container { width:100%; overflow:auto; } #container ul { width: 100%; } #container li { width: 100%; } So now I would like to have an indeterminate number of elements (<li>) all with 100% width (so they can adjust accordingly to the browser's window size) but all side by side, displaying the horizontal scroll bar in the container. I have tried putting "display:inline" on ul's css, and "float:left" on li's css, but with no success. Any suggestions? Also, try to consider I'm trying to make this as "cross-browser compatible" as possible. Thanks in advanced;

    Read the article

  • Why is this UL and inline JS giving errors during HTML validation?

    - by thor
    I've just run the homepage of a site I'm working on through the w3c HTML validator and it's come back with 3 errors and 2 warnings. I've taken a look at them but can't see why they would be causing a problem. I've pasted them in below (I've removed URL's/strings etc as the site isn't quite ready to be made public yet). This is being validated against XHTML Transitional by the way. The UL comes back with the following error: end tag for "ul" which is not finished <ul id='tabs'></ul> <ul id='tabs'> <li> <a href="/en/folder/folder/search?categories[]=cat1" class="tab1" title="tab_title"> <img alt="img_alt" src="img_src" /> <span> tab1_text </span> </a> </li> <li> <a href="/en/folder/folder/search?categories[]=cat2" class="tab2" title="tab_title"> <img alt="img_alt" src="img_src" /> <span> tab2_text </span> </a> </li> <li> <a href="/en/folder/folder/search?categories[]=cat3" class="tab3" title="tab_title"> <img alt="img_alt" src="img_src" /> <span> tab3_text </span> </a> </li> <li> <a href="/en/folder/folder/search?categories[]=cat4" class="tab4" title="tab_title"> <img alt="img_alt" src="img_src" /> <span> tab4_text </span> </a> </li> <li> <a href="/en/folder/folder/search?categories[]=cat5" class="tab5" title="tab_title"> <img alt="img_alt" src="img_src" /> <span> tab5_text </span> </a> </li> <li> <a href="/en/folder/folder/search?categories[]=cat6" class="tab6" title="tab_title"> <img alt="img_alt" src="img_src" /> <span> tab6_text </span> </a> </li> <li> <a href="/en/folder/folder/search?categories[]=cat7" class="tab7" title="tab_title"> <img alt="img_alt" src="img_src" /> <span> tab7_text </span> </a> </li> <li> <a href="/en/folder/folder/search?categories[]=cat8" class="tab8" title="tab_title"> <img alt="img_alt" src="img_src" /> <span> tab8_text </span> </a> </li> </ul> For the inline javascript, I'm getting 2 errors and 2 warnings all for the same thing - I have a simple if statement with && and the validator appears to be seeing this as HTML rather than javascript: character "&amp;" is the first character of a delimiter but occurred as data and xmlParseEntityRef: no name <script type='text/javascript'> if (weather_data != null && weather_data['data'] != null){ display_weather(); } </script> The javascript is placed just before the body close tag at the end of the document. If you need to see the full source then let me know and I can send it over.

    Read the article

  • Methodology for Documenting Existing Code Base

    - by George Stocker
    I work as part of a team on an existing application that has no inline documentation, nor does it have technical documentation. As I've been working on various bug reports on the application, I've written a sort of breadcrumb trail for myself - bug numbers in various places so that the next developer can refer to that bug number to see what was going on. My question is thus: What is the most effecient method for documenting this code? Should I document as I touch the area (the virus method, if you will), or should I document from each section on its own, and not follow paths that branch out into other areas of the application? Should I insert inline comments where none previously existed (with the fear that I may end up incorrectly identifying what the code does)? What method would you use to accurately and quickly document a rather large application that has no existing inline documentation, nor inline references to external documentation?

    Read the article

  • ASP.NET MVC search box: use modal popup or inline div or redirect to another page?

    - by JK
    I have a view with a textbox and a search button, eg CustomerTextBox and CustomerSearchButton. The list of customers is too long to display in a dropdown, and there has to be advanced search functions anyway. What is the best practice in MVC to handle this case? When the user clicks on the search button, should it: A. Load another view into a modal popup (eg /customers/search)? How would you do this in MVC, just set popupWindow.location.href = '/customers/search'? How would you return the value to the main view? B. Have the search form in a hidden div that expands when the search button is clicked? How would be done? a partial view maybe? C. Redirect the user to a search page by means of RedirectTo("/customers/search")? How would you return the value to the main class? I've only been doing MVC for 3 days so thanks to those who answer my questions that might have quite obvious answers that I cant see yet. :)

    Read the article

< Previous Page | 12 13 14 15 16 17 18 19 20 21 22 23  | Next Page >