Search Results

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

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

  • Python 2.4 inline if statements

    - by Marcus Whybrow
    I am setting up an existing django project on a dreamhost web server, so far I have got everything to work correctly. However I developed under python 2.5 and dreamhost by default uses python 2.4. The following line seems gives a syntax error because of the if keyword: 'parent': c.parent.pk if c.parent is not None else None ^ Is it the case that this form of if statement was introduced in Python 2.5, if so is there an easy change that would make it compatible with Python 2.4? Or, should I just change to Python 2.5. I have already installed python 2.5 to a directory under my home directory, and have succeeded in running the python interpreter under 2.5. If I wish to use Python 2.5 for everything, where can I set this?

    Read the article

  • Multi-statement Table Valued Function vs Inline Table Valued Function

    - by AndyC
    ie: CREATE FUNCTION MyNS.GetUnshippedOrders() RETURNS TABLE AS RETURN SELECT a.SaleId, a.CustomerID, b.Qty FROM Sales.Sales a INNER JOIN Sales.SaleDetail b ON a.SaleId = b.SaleId INNER JOIN Production.Product c ON b.ProductID = c.ProductID WHERE a.ShipDate IS NULL GO versus: CREATE FUNCTION MyNS.GetLastShipped(@CustomerID INT) RETURNS @CustomerOrder TABLE (SaleOrderID INT NOT NULL, CustomerID INT NOT NULL, OrderDate DATETIME NOT NULL, OrderQty INT NOT NULL) AS BEGIN DECLARE @MaxDate DATETIME SELECT @MaxDate = MAX(OrderDate) FROM Sales.SalesOrderHeader WHERE CustomerID = @CustomerID INSERT @CustomerOrder SELECT a.SalesOrderID, a.CustomerID, a.OrderDate, b.OrderQty FROM Sales.SalesOrderHeader a INNER JOIN Sales.SalesOrderHeader b ON a.SalesOrderID = b.SalesOrderID INNER JOIN Production.Product c ON b.ProductID = c.ProductID WHERE a.OrderDate = @MaxDate AND a.CustomerID = @CustomerID RETURN END GO Is there an advantage to using one over the other? Is there certain scenarios when one is better than the other or are the differences purely syntactical? I realise the 2 example queries are doing different things but is there a reason I would write them in that way? Reading about them and the advantages/differences haven't really been explained. Thanks

    Read the article

  • JQGRID inline dropdown binding via AJAX

    - by Frank
    jQuery(document).ready(function () { var grid = $("#list"); var AllCategory={"1":"Computing","2":"Cooking","10":"Fiction","3":"Finance","6":"Language","4":"Medical","11":"News","8":"Philosophy","9":"Religion","7":"Sport","5":"Travel"}; grid.jqGrid({ url: '/SupplierOrder/Select_SupplierOrderDetailByX/', editurl: "clientArray", datatype: 'json', mtype: 'GET', colNames: ['Category', 'Qty'], colModel: [ { name: 'Category', index: 'CategoryID', align: 'left', editable: true, edittype: "select", formatter: 'select', editoptions: { value: AllCategory }, editrules: { required: true } }, { name: 'Qty', index: 'Qty', width: 40, align: 'left', editable: true, edittype: "text", editoptions: { size: "35", maxlength: "50"} } ], pager: jQuery('#pager'), rowNum: 10, rowList: [5, 10, 20, 50], sortname: '', sortorder: '', viewrecords: true, autowidth: true, autoheight: true, imgpath: '/scripts/themes/black-tie/images', caption: 'Supplier Order Detail' }) grid.jqGrid('navGrid', '#pager', { edit: false, add: false, del: true, refresh: false, search: false }, {}, {}, {}, {}); grid.jqGrid('inlineNav', '#pager', { addtext: "Add", edittext: "Edit", savetext: "Save", canceltext: "Cancel" }); }); It is my JQGrid. Then, I remove below code ... var AllCategory={"1":"Computing","2":"Cooking","10":"Fiction","3":"Finance","6":"Language","4":"Medical","11":"News","8":"Philosophy","9":"Religion","7":"Sport","5":"Travel"}; Replace with below code so that i can get dynamic data ... var AllCategory = (function () { var list = null; $.ajax({ async: false, global: false, type: "POST", url: 'Category_Lookup', dataType: 'json', data: {}, success: function (response, textStatus, jqXHR) { list = response; }, error: function (jqXHR, textStatus, errorThrown) { alert("jqXHR.responseText --> " + jqXHR.responseText + "\njqXHR --> " + jqXHR + "\ntextStatus --> " + textStatus + " \nerrorThrown --> " + errorThrown); } }); alert(list); return list; })(); Firstly, I get below message box ... Then I get Error Could anyone please tell me how to make it correct ? Every suggestion will be appreciated.

    Read the article

  • MVC2 Inline XHTML Validator?

    - by GedByrne
    I am attempting to setup http://www.thejoyofcode.com/Validator_Module.aspx on a local MVC2 project. I have followed all of the steps listed in the setup guide but I cannot get the validator to kick in. If I create a bog standard .htm file or a webform with .aspx extension, I can get it to work. Anyone had any joy with this?

    Read the article

  • Inline base64 encoded link not working in Firefox

    - by Sjoerd
    I have this link: <a href="data:application/pdf;base64,JVBERi0x...KJSVFT0YK">PDF</a> In Safari on MacOsX, clicking the link instantly opens the PDF. In Firefox 3.6.2, it doesn't. When I choose Download, it saves it as "u7WYuJME.pdf(2).part", which is a valid PDF file. When I choose "Open with Preview", it downloads it but does not open it. Can I change something so that Firefox opens it correctly?

    Read the article

  • Creating an inline function in a jsp?

    - by user246114
    Hi, I'm coming from (some limited) PHP experience, in which you can just declare functions in-line. I'm trying to the same thing with a JSP but not working. Trying something like: <%! private void generateSomething() { %> <p> Hello there! </p> <% } %> <% generateSomething(); %> is something like that possible? Basically I have a jsp that can generate a 3 different pages, and I wanted to put these each in a separate method. I have seen a few posts saying this is not a good idea, and to separate the presentation stuff, which is fine, I just want to see this in action, if possible, now I'm just curious, Thanks

    Read the article

  • CSS IE6 float right

    - by David
    How come when I have a div style at display: block; float: right, in IE6 the div still goes under the text, and not in the middle of it just floated to the right. It works in all other browsers, including IE7+. I need to have display block because if i do display inline, then the menu inside the div is all messed up. .content { display: block; } .float { width: 150px; display: block; float: right; } .nothing { display: inline; } the float class is not to the right of nothing class, its under it in IE6, know a fix?

    Read the article

  • 301 versus inline rewrites

    - by Kristoffer S Hansen
    I'm in the process of adding 'pretty' URLs to an existing CMS, the menu is auto generated and the new 'pretty' URLs are to be handled independently as a seperate module. The auto-generated menu allways has URLs that look like this index.php?menu_id=n which ofcourse we would like to see as eg. /news or /products I'm currently at the point where I have to decide if I'm going to rewrite all output of the current system or simply put in a hook where I redirect to the 'pretty' URL. To put it differently, should i connect to the database, fetch all 'pretty' URLs, run through the existing output from WYSIWYG's, news modules, forums etc. and do some str_replace or other string manipulation (which I think would be a rather tedious and boring process), or should I simply hook in and throw a 301 redirecting index.php?menu_id=3 to /news will Google (or other search engines) penalize me for having 301's in the menus?

    Read the article

  • Inline widget-like templates in MODx

    - by Christoffer
    Hi, I'm developing my first ever MODx site and I need to have three blocks on the frontpage that contain headline, picture, image caption, long text and a short text. For these I would like to create a custom template that allows me to create sub-resources of "Home" with only these five fields (of which one will allow me to upload images). How can I set this up? Thanks!

    Read the article

  • Beginner LINQ to XML inline XML error

    - by Kyle B.
    Imports System.Xml.Linq Imports System.Linq Partial Class test2 Inherits System.Web.UI.Page Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load Dim xml As XElement = <book> <title>My Title</title> <author>Kyle</author> <publisher>WROX</publisher> </book> End Sub End Class The above code is producing the following error: Compiler Error Message: BC30201: Expression expected. Source Error: Line 8: Line 9: Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load Line 10: Dim xml As XElement = <book> Line 11: <title>My Title</title> Line 12: <author>Kyle</author> Source File: C:\Inetpub\wwwroot\myproject\web\test2.aspx.vb Line: 10 Why? edit: Dim xml As XElement = New XElement("book", _ New XElement("title", "My Title"), _ New XElement("author", "Kyle"), _ New XElement("publisher", "WROX") _ ) The above code works, but obviously is not as elegant as the original and I would still appreciate an explanation of why my original syntax is wrong.

    Read the article

  • create parent child array from inline data in php

    - by abhie
    actually i have simple problem but i forget how to solve it.. :D i have data on table with following format 01 Johson 01 Craig 01 Johson 02 Daniel 01 Johson 03 Abbey 02 Dawson 01 Brown 02 Dawson 02 Agust 03 Brick 01 Chev 03 Brick 01 Flinch so i want it to become an array like this 01 Johson => 01 Craig ``````````````02 Daniel ```````````````03 Abey ` etc... how to iterate trough the data and make it array like that... i'm newby in PHP :))

    Read the article

  • JavaScript inline events syntax

    - by Mic
    Is there any reason to use one of the following more than the others: <input type="button" value="b1" onclick="manageClick(this)" /> <input type="button" value="b2" onclick="manageClick(this);" /> <input type="button" value="b2" onclick="manageClick(this);return false;" /> <input type="button" value="b3" onclick="return manageClick(this);" /> <input type="button" value="b4" onclick="javascript:return manageClick(this);" /> And please do not spend your valuable time to tell me to use jQuery or attachEvent/addEventListener. It's not really the objective of my question.

    Read the article

  • detachEvent not working with named inline functions

    - by Polshgiant
    I ran into a problem in IE8 today (Note that I only need to support IE) that I can't seem to explain: detachEvent wouldn't work when using a named anonymous function handler. document.getElementById('iframeid').attachEvent("onreadystatechange", function onIframeReadyStateChange() { if (event.srcElement.readyState != "complete") { return; } event.srcElement.detachEvent("onreadystatechange", onIframeReadyStateChange); // code here was running every time my iframe's readyState // changed to "complete" instead of only the first time }); I eventually figured out that changing onIframeReadyStateChange to use arguments.callee (which I normally avoid) instead solved the issue: document.getElementById('iframeid').attachEvent("onreadystatechange", function () { if (event.srcElement.readyState != "complete") { return; } event.srcElement.detachEvent("onreadystatechange", arguments.callee); // code here now runs only once no matter how many times the // iframe's readyState changes to "complete" }); What gives?! Shouldn't the first snippet work fine?

    Read the article

  • ASP.NET/MVC: Inline code

    - by JamesBrownIsDead
    What am I doing wrong? How come <%: this %> isn't being interpreted as C#? Here's the code (ignore the left side): And here is what it renders (notice the Firebug display): What do you think is going on? MVC newb here. :(

    Read the article

  • Android change context for findViewById to super from inline class

    - by wuntee
    I am trying to get the value of a EditText in a dialog box. A the "*"'ed line in the following code, the safeNameEditText is null; i am assuming because the 'findVeiwById' is searching on the context of the 'AlertDialog.OnClickListener'; How can I get/change the context of that 'findViewById' call? protected Dialog onCreateDialog(int id) { AlertDialog.Builder builder = new AlertDialog.Builder(this); switch(id){ case DIALOG_NEW_SAFE: builder.setTitle(R.string.news_safe); builder.setIcon(android.R.drawable.ic_menu_add); LayoutInflater factory = LayoutInflater.from(this); View newSafeView = factory.inflate(R.layout.newsafe, null); builder.setView(newSafeView); builder.setPositiveButton(R.string.ok, new AlertDialog.OnClickListener(){ public void onClick(DialogInterface dialog, int which) { * EditText safeNameEditText = (EditText) findViewById(R.id.new_safe_name); String safeName = safeNameEditText.getText().toString(); Log.i(LOG, safeName); setSafeDao(safeName); } }); builder.setNegativeButton(R.string.cancel, new AlertDialog.OnClickListener(){ public void onClick(DialogInterface dialog, int which) { dialog.dismiss(); } }); return(builder.create()); default: return(null); } }

    Read the article

  • Inline comments for bash?

    - by Lajos Nagy
    I'd like to be able to comment out a single flag in a one-line command. Bash only seems to have `from # till end-of-line' comments. I'm looking at tricks like: ls -l $([ ] && -F is turned off) -a /etc It's ugly, but better than nothing. Anybody has any better suggestions?

    Read the article

  • Django-ckeditor inline error

    - by ad3w
    I'm using FeinCMS (https://github.com/feincms/feincms/) and django-ckeditor with file upload support (https://github.com/shaunsephton/django-ckeditor). I create a FeinCMS content type for RichTextField: class RichContent(models.Model): text = RichTextField(_('text')) class Meta: abstract = True verbose_name = _('Rich Text') verbose_name_plural =_('Rich Text') def render(self, **kwargs): context_instance = kwargs.get('context_instance') return render_to_string('content/page/rich_content.html', { 'page': self, }, context_instance=context_instance) But in Django admin, when i select 'Rich Text' and press 'Go', get this error in firebug console: uncaught exception: [CKEDITOR.editor] The instance "id_richcontent_set-__prefix__-text" already exists. And textarea in ckeditor do not editable.

    Read the article

  • Inline instantiation of a constant List

    - by Roflcoptr
    I try to do something like this: public const List<String> METRICS = new List<String>() { SourceFile.LOC, SourceFile.MCCABE, SourceFile.NOM, SourceFile.NOA, SourceFile.FANOUT, SourceFile.FANIN, SourceFile.NOPAR, SourceFile.NDC, SourceFile.CALLS }; But unfortunately this doesn't work: FileStorer.METRICS' is of type 'System.Collections.Generic.List<string>'. A const field of a reference type other than string can only be initialized with null. How can I solve this problem?

    Read the article

  • help with inline images/mail with cron - php?

    - by David Verhulst
    I've got mailings that need to be sended using cron. When I load the script manualy all works fine. With cron i get broken images. to change the src of my img i used: $body = eregi_replace("managersrc_logo","images/managers/acertainlogo.jpg",$body); Because i thaught that it is importent to use absolute paths i also tried: $body = eregi_replace("managersrc_logo","http://www.site.com/images/managers/acertainlogo.jpg",$body); In that case i even do not see the images when i run the cronscript manualy. Nor the automated cron will display me the images. When i check the source of the mail that is received i always see "cid:encryptedstuff" even if i use absolute paths? Why is that? I just want my absolute paths being printed in the src attribute of the img tag. Who changes my absolute path to cid: ? is it php, phpmailer or outlook itself? Any help someone?.... David

    Read the article

  • Good way to handle inline-edit form using Rails and jQuery

    - by Tim Sullivan
    I have a list of items, being displayed in a series of DIVs. When someone clicks on an "edit" link, I want to replace the div with a form that will let them edit the contents of that item in a nice way. I'm trying to think of the ideal way to handle this. Do I create a hidden edit form for every item in the list, and hook the edit link to reveal it, like this: <div> <a href="#">edit</a> Item One <div id="edit_1202" class="editform">Edit form goes here</div> </div> <div> <a href="#">edit</a> Item Two <div id="edit_2318" class="editform">Edit form goes here</div> </div> Or is there a better way to fetch the data and insert the form's HTML into the right spot? Remember, I'm using jQuery, so I can't use the prototype helpers. Thanks!

    Read the article

  • webkit multiple inline shadows

    - by meo
    I have trouble setting multiple shadows on one element in webkit: -moz-box-shadow: inset 0 0 3px #999, 0 0 5px #fff; -webkit-box-shadow: inset 0 0 3px #999, 0 0 5px #fff; box-shadow: inset 0 0 3px #999, 0 0 5px #fff; it works fine in firefox but safari displays only the inset shadow. i tried to set both values separately. But safari takes just count of the last value: -webkit-box-shadow: inset 0 0 3px #999; -webkit-box-shadow: 0 5px #fff; is it possible to set more then one shadow on a single element in safari/webkit?

    Read the article

  • Javascript new object (function ) vs inline invocation

    - by Sheldon Ross
    Is there any considerations to determine which is better practice for creating an object with private members? var object = new function () { var private = "private variable"; return { method : function () { ..dosomething with private; } } } VS var object = function () { ... }(); Basically what is the difference between using NEW here, and just invoking the function immediately after we define it?

    Read the article

  • Throwing a C++ exception after an inline-asm jump

    - by SoapBox
    I have some odd self modifying code, but at the root of it is a pretty simple problem: I want to be able to execute a jmp (or a call) and then from that arbitrary point throw an exception and have it caught by the try/catch block that contained the jmp/call. But when I do this (in gcc 4.4.1 x86_64) the exception results in a terminate() as it would if the exception was thrown from outside of a try/catch. I don't really see how this is different than throwing an exception from inside of some far-flung library, yet it obviously is because it just doesn't work. How can I execute a jmp or call but still throw an exception back to the original try/catch? Why doesn't this try/catch continue to handle these exceptions as it would if the function was called normally? The code: #include <iostream> #include <stdexcept> using namespace std; void thrower() { cout << "Inside thrower" << endl; throw runtime_error("some exception"); } int main() { cout << "Top of main" << endl; try { asm volatile ( "jmp *%0" // same thing happens with a call instead of a jmp : : "r"((long)thrower) : ); } catch (exception &e) { cout << "Caught : " << e.what() << endl; } cout << "Bottom of main" << endl << endl; } The expected output: Top of main Inside thrower Caught : some exception Bottom of main The actual output: Top of main Inside thrower terminate called after throwing an instance of 'std::runtime_error' what(): some exception Aborted

    Read the article

  • Is this call to a function object inlined?

    - by dehmann
    In the following code, Foo::add calls a function via a function object: struct Plus { inline int operator()(int x, int y) const { return x + y; } }; template<class Fct> struct Foo { Fct fct; Foo(Fct f) : fct(f) {} inline int add(int x, int y) { return fct(x,y); // same efficiency adding directly? } }; Is this the same efficiency as calling x+y directly in Foo::add? In other words, does the compiler typically directly replace fct(x,y) with the actual call, inlining the code, when compiling with optimizations enabled?

    Read the article

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