Search Results

Search found 14593 results on 584 pages for 'pat inside'.

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

  • Does javascript event handling occur inside or outside the program flow?

    - by Carlo Roosen
    This question is related to Javascript event handling and flow control, but it is one step beyond. The question that remains unanswered is: when an event is fired and control is returned to the browser, could the browser decide to handle other events first (fired by other scripts or user action) (A), or will it always handle my event directly (B)? The question is important, because in case (B) you can rely on the fact that nothing has been changed between firing the event and the event handler, while (A) gives no guarantees whatsoever. My first guess is (B), how else could stopPropagation() and preventDefault() work? But giving it a second thought, it is no hard evidence.

    Read the article

  • Why do updates inside of a SQL transaction still need disk IO?

    - by usr
    In SQL Profiler you can see that very simple updates to a table by primary key take about 10-30ms each. On about every 10th update the write column shows 1, on all other updates it shows 0. This must mean that about every 10th update statement still requires disk IO. I wonder why that is. Would it not be more efficient queue up all IO until the transaction commits?

    Read the article

  • Java, JavaCC: How to check if a char (or char pair) is inside a given UTF32 range?

    - by java.is.for.desktop
    Hello, everyone! I am referring to the XML 1.1 spec. Look at the definition of NameStartChar: NameStartChar ::= ":" | [A-Z] | "_" | [a-z] | [#xC0-#xD6] | [#xD8-#xF6] | [#xF8-#x2FF] | [#x370-#x37D] | [#x37F-#x1FFF] | [#x200C-#x200D] | [#x2070-#x218F] | [#x2C00-#x2FEF] | [#x3001-#xD7FF] | [#xF900-#xFDCF] | [#xFDF0-#xFFFD] | [#x10000-#xEFFFF] If I interpret this correctly, the last range (#x10000-#xEFFFF) goes beyond the UTF16 range of Java's char type. So it must be UTF32, right? So, I need to check pairs of char against this range, instead of single chars, right? My questions are: How do I check for such character ranges using standard Java methods? How is it possible to define such ranges in JavaCC? JavaCC complains about \u10000 and \uEFFFF Thank you! NOTE: Don't worry, I am not trying to write an own XML-parser. I need those character ranges for other reasons.

    Read the article

  • How to position a span inside a headline tag?

    - by citronas
    I'm forced to find a solution for the following situation: I have a h1 tag, like this: <h1 style="text-align: left">FOO FOO FOO<span class="h1subSpan">FOO 1 Foo 2</span></h1> The result should be like the following: FOO FOO FOO this space is invisible and achived through floating Foo1 Foo 2 This solution works with FF, Opera and IE8. How can I adapt this, to work with IE 7 as well? .h1subSpan { font-size:small; float:right; padding-right:19px; padding-top:5px; }

    Read the article

  • How to read the value of selected checkbox inside a checkboxList?

    - by Starx
    I want to know the selected value of the markup below. So that I can disabled a textbox, if one of the checkbox is selected. <asp:CheckBoxList ID="ChkTest" runat="server" RepeatDirection="Horizontal" CssClass="toggleYesNo"> <asp:ListItem Value="1">Yes</asp:ListItem> <asp:ListItem Value="0">No</asp:ListItem> </asp:CheckBoxList> I tried using this function it doesnot seem to work $(document).ready(function() { $("#<%=ChkTest.ClientID %>").click(function() { value = $(this).val(); if(value=='1') { $('#atextbox').attr('disabled',''); } else { $('#atextbox').attr('disabled','disabled'); } }); }); I also track the output HTML but the id the CheckBoxList the assigned to a table instead.

    Read the article

  • Interpolating height for a point inside a grid based on a discrete height function.

    - by fastrack20
    Hi, I have been wracking my brain to come up with a solution to this problem. I have a lookup table that returns height values for various points (x,z) on the grid. For instance I can calculate the height at A, B, C and D in Figure 1. However, I am looking for a way to interpolate the height at P (which has a known (x,z)). The lookup table only has values at the grid intervals, and P lies between these intervals. I am trying to calculate values s and t such that: A'(s) = A + s(C-A) B'(t) = B + t(P-B) I would then use the these two equations to find the intersection point of B'(t) with A'(s) to find a point X on the line A-C. With this I can calculate the height at this point X and with that the height at point P. My issue lies in calculating the values for s and t. Any help would be greatly appreciated.

    Read the article

  • can I acces a struct inside of a struct without using the dot operator?

    - by yan bellavance
    I have 2 structures that have 90% of their fields the same. I want to group those fields in a structure but I do not want to use the dot operator to access them. The reason is I already coded with the first structure and have just created the second one. before: struct{ int a; int b; int c; object1 name; }str1; struct{ int a; int b; int c; object2 name; }str2; now I would create a third struct: struct{ int a; int b; int c; }str3; and would change the str1 and atr2 to this: struct{ str3 str; object1 name; }str1; struct { str3 str; object2 name; }str2; Finally I would like to be able to access a,b and c by doing: str1 myStruct; myStruct.a; myStruct.b; myStruct.c; and not: myStruct.str.a; myStruct.str.b; myStruct.str.c; Is there a way to do such a thing. The reason for doing this is I want keep the integrety of the data if chnges to the struct were to occur and to not repeat myself and not have to change my existing code and not have fields nested too deeply.

    Read the article

  • How to access 'private functions' in a singleton from another object inside it.

    - by Cedric Dugas
    I am currently trying to create a test suite for my javascript apps. My problem is that, it seems I cannot get access to init() from my utils object, as you can see below: I have my app that follow a singleton pattern: var appModal = function () { var utils = Object.create(moduleUtils); function init(caller, options ) { } }(); My test suite is in moduleUtils, this is a object literal converted to a prototype moduleUtils.debug = { addSlideTest : function(){ /* this function cannot fire init() from appModal */ }}

    Read the article

  • How to access view items inside a ListView android?

    - by Yasir Khan
    I have ListView. i am successfully able to populate that ListView but what is want now is when user long press on ListItem it should make a button visible which i made invisible when i am populating ListView. here is snippet i have tried. mItemListView.setOnItemLongClickListener(new OnItemLongClickListener() { @Override public boolean onItemLongClick(AdapterView<?> adapterview, View arg1, int arg2, long arg3) { LinearLayout view=(LinearLayout) mItemListView.getChildAt(arg2); view.getChildAt(0).setVisibility(View.VISIBLE); return false; } }); My adapter is extending BaseAdapter

    Read the article

  • how do i load an image from a DB inside a jsf using managed beans?

    - by RhigoHR
    Hi.. i have a database with some images...could anyone tell me or explain me how could i can load an image in a jsf? I alredy have a managed bean that converts an Image object into a streamcontent...and this streamcontent is called from the page in a tag , but when a i check the source code of the page, there's no src where the image could be loaded. Hope an answer, thx

    Read the article

  • How to have type hinting in PHP that specifies variable scope inside of a template? (specifically PhpStorm)

    - by Lance Rushing
    I'm looking for a doc comment that would define the scope/context of the current php template. (similar to @var) Example View Class: <?php class ExampleView { protected $pageTitle; public function __construct($title) { $this->pageTitle = $title; } public function render() { require_once 'template.php'; } } -- <?php // template.php /** @var $this ExampleView */ echo $this->pageTitle; PHPStorm gives an inspection error because the access on $pageTitle is protected. Is there a hint to give scope? Something like: <?php // template.php /** @scope ExampleView */ // <---???? /** @var $this ExampleView */ echo $this->pageTitle;

    Read the article

  • Variable inside of the markup for an asp:HyperLink NavigationUrl property?

    - by RichAmberale
    Hi, I'm new to ASP.NET and can't figure out how to accomplish this... My code (that needs fixing): <asp:HyperLink runat="server" NavigateUrl="~/EditReport.aspx?featureId=<%= featureId %>" ImageUrl="~/new.gif" /> featureId gets defined as an integer in the backing code. I want href's like... /EditReport.aspx?featureId=2224 ...but instead I am getting... /EditReport.aspx?featureId=<%= featureId %>

    Read the article

  • How do I force the download of a file which link is inside a GridView?

    - by murderdoll
    I have a Gridview that shows a list of files previously uploaded to the server with a HyperLink control to be able to download it, I need to force a download every time the user clicks on one of the provided links, so that the file does not open directly on the browser (they are usually images). Currently I have a side-server function that forces a download, but I do not know how to assign this function to each one of the links when the user clicks on it.

    Read the article

  • how to keep the height of the div equal to the union of the height of elements inside it

    - by Idlecool
    I have been making a wordpress template. i got stuck at some place... the problem is, how to maintain the size of a div = the size of p tags and img tags... i have seen that the div only able to contain the p tag but the img tag over flows... i have my code in this following order: <div> <p> some contents <img src="an_image"/> some morecontent</p> <div> what i basically want is: div height = <p> height U(union) <img> height but, what actually i am getting is: div height = <p> height; while <img> over flows i have already checked for similar questions on Stack Overflow but was not able to find one which solves a similar problem.. please give me some idea..

    Read the article

  • Should conditional expressions go inside or outside of classes?

    - by Rupert
    It seems that often I will want to execute some methods from a Class when I call it and choosing which function will depend on some condition. This leads me to write classes like in Case 1 because it allows me to rapidly include their functionality. The alternative would be Case 2 which can take a lot of time if there is a lot of code and also means more code being written twice when I drop the Class into different pages. Having said that, Case 1 feels very wrong for some reason that I can't quite put my finger on. I haven't really seen any classes written like this, I suppose. Is there anything wrong with writing classes like in Case 1 or is Case 2 superior? Or is there a better way? What the advantages and disadvantages of each? Case 1 class Foo { public function __construct($bar) { if($bar = 'action1') $this->method1(); else if($bar = 'action2') $this->method2(); else $this->method1(); } public function method1() { } public function method2() { } } $bar = 'action1' $foo = new Foo($bar); Case 2 class Foo { public function __construct() { } public function method1() { } public function method2() { } } $foo = new Foo; $bar = 'action1'; if($bar == 'action1') $foo->method1(); else if($bar == 'action2') $foo->method2(); else $foo->method1();

    Read the article

  • Why does this regular expression for sed break inside Makefile?

    - by jcrocholl
    I'm using GNU Make 3.81, and I have the following rule in my Makefile: jslint : java org.mozilla.javascript.tools.shell.Main jslint.js mango.js \ | sed 's/Lint at line \([0-9]\+\) character \([0-9]\+\)/mango.js:\1:\2/' This works fine if I enter it directly on the command line, but the regular expression does not match if I run it with "make jslint". However, it works if I replace \+ with \{1,\} in the Makefile: jslint : java org.mozilla.javascript.tools.shell.Main jslint.js mango.js \ | sed 's/Lint at line \([0-9]\{1,\}\) character \([0-9]\{1,\}\)/mango.js:\1:\2/' Is there some special meaning to \+ in Makefiles, or is this a bug?

    Read the article

  • How can I load a web page inside of a jQuery dialog box?

    - by kielie
    Hi, I am designing a wordpress template, and I would like to use jQuery ui to display each of the calendar links in a dialog box, when they are clicked. What I want, is when someone clicks on a link in the wordpress calendar, the content will load in the dialog box, and display over the calendar. I would appreciate any help on this, thanx in advance!

    Read the article

  • How to get all <img> tags inside a text selection?

    - by CyberShadow
    I've looked around for a while, but there doesn't seem to be a simple way to do this. jQuery doesn't help the in least, it seems to entirely lack any support for selection or DOM ranges. Something which I hoped would be as simple as $.selection.filter('img') seems to only be doable with dozens of lines of code dealing with manually enumerating elements in ranges and browser implementation inconsistencies (though ierange helps here). Any other shortcuts?

    Read the article

  • C Program Stalls or Infinite Loops inside and else statement?

    - by Bobby S
    I have this weird thing happening in my C program which has never happened to me before. I am calling a void function with a single parameter, the function is very similar to this so you can get the jist: ... printf("Before Call"); Dumb_Function(a); printf("After Call"); ... ... void Dumb_Function(int a){ if(a == null) { } else{ int i; for(i=0; i<a; i++) { do stuff } printf("test"); } } This will output Before Call test and NOT "After Call" How is this possible? Why does my function not return? Did my program counter get lost? I can not modify it to a non void function. When running the cursor will blink and I am able to type, I press CTRL+C to terminate. Any ideas?

    Read the article

  • Button inside of anchor link works in Firefox but not in Internet Explorer?

    - by Jason
    Everything else in my site seems to be compatible with all browsers except for my links. They appear on the page, but they do not work. My code for the links are as follows- <td bgcolor="#ffffff" height="370" valign="top" width="165"> <p><a href="sc3.html"><button style="width:120;height:25">Super Chem #3</button></a> <a href="91hollywood.html"><button style="width:120;height:25">91 Hollywood</button></a> <a href="sbubba.html"><button style="width:120;height:25">Super Bubba</button></a> <a href="afgoohash.html"><button style="width:120;height:25">Afgoo Hash</button></a> <a href="superjack.html"><button style="width:120;height:25">Super Jack</button></a> <a href="sog.html"><button style="width:120;height:25">Sugar OG</button></a> <a href="91pk91.html"><button style="width:120;height:25">91 x PK</button></a> <a href="jedi1.html"><button style="width:120;height:25">Jedi</button></a></p> <p>&nbsp;</p> <a href="http://indynile99.blogspot.com"><button style="width:120;height:25">Blog</button></a> <p>&nbsp;</p> </td> THANKS for the help!

    Read the article

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