Search Results

Search found 11382 results on 456 pages for 'chrome sub'.

Page 89/456 | < Previous Page | 85 86 87 88 89 90 91 92 93 94 95 96  | Next Page >

  • Accessing parent class attribute from sub-class body

    - by warwaruk
    I have a class Klass with a class attribute my_list. I have a subclass of it SubKlass, in which i want to have a class attribute my_list which is a modified version of the same attribute from parent class: class Klass(): my_list = [1, 2, 3] class SubKlass(Klass): my_list = Klass.my_list + [4, 5] # this works, but i must specify parent class explicitly #my_list = super().my_list + [4, 5] # SystemError: super(): __class__ cell not found #my_list = my_list + [4, 5] # NameError: name 'my_list' is not defined print(Klass.my_list) print(SubKlass.my_list) So, is there a way to access parent class attribute without specifying its name?

    Read the article

  • Multiple/Sub quries with codeigniter

    - by user1011713
    I just started with Codeigniter and this is driving me nuts. I have a query that determines whether a user has bought any programs. I then have to use that program's type category to run and determine how many times he or she has recorded a query in another table. Sorry for the confusion but the code hopefully makes sense. I'm having problem returning the two arrays from my Model to my Controller to onto the view obviously. function specificPrograms() { $specific_sql = $this->db->query("SELECT program,created FROM `assessment` WHERE uid = $this->uid"); if($specific_sql->num_rows() > 0) { foreach ($specific_sql->result() as $specific) { $data[] = $specific; $this->type = $specific->program; } return $data; } $sub_sql = $this->db->query("SELECT id FROM othertable WHERE user_id_fk = $this->uid and type = '$this->type'"); if($sub_sql->num_rows() > 0) { foreach ($sub_sql->result() as $otherp) { $data[] = $otherp; } return $data; } } Then in my Controller I have, $data['specific'] = $this->user_model->specificPrograms(); $data['otherp'] = $this->user_model->specificPrograms(); Thanks for any help.

    Read the article

  • where clausule on field defined by sub-query

    - by stUrb
    I have this query which displays some properties and count the number of references to it from an other table: SELECT p.id,p.propName ( SELECT COUNT(*) FROM propLoc WHERE propLoc.propID = p.id ) AS number FROM property as p WHERE p.category != 'natural' This generates a good table with all the information I want to filter: id | propName | number 3 | Name 1 | 3 4 | Name 2 | 1 5 | Name 3 | 0 6 | Name 4 | 10 etc etc I now want to filter out the properties with number <= 0 So I tried to add an AND number > 0 But it reacts with Unknown column 'number' in 'where clause' apparently you can't filter on a name specified by a subquery? How can I achieve my goal?

    Read the article

  • Why is the page still caching even after the no-cache headers have been sent?

    - by Matthew Grasinger
    I've done a ton of research on this and have asked many people with help and still no success. Here are the details... I'm involved in developing a website that pulls data from various data files, combines them in a temp .csv file, and then is graphed using a popular graphing library: dygraphs. The bulk of the website is written in PHP. The parameters that determine the data that is graphed are stored in the users session, the .csv is named after the users session and available for download, and then the .csv file is written in a script that passes it to the dygraphs object. And we've found, even with the no-cache headers sent: header("Cache-Control: no-cache, must-revalidate"); header("Expires: Sat, 26 Jul 1997 05:00:00 GMT"); Many users experience in the middle of a session, (if enough different graphs are generated) the page displaying an older, static rendering of the page (data they had graphed earlier in the session) as if it were cached and loaded instead of getting a new request. It only gets weirder though: I've checked using developer tools in both Firefox and Chrome and both browsers are receiving the no-cache headers just fine; Even when the problem occurs if you view the page source, the source is the correct content (a table/legend is also dynamically created using php, the source shows the correct table, but what is rendered is older content); the page begins to render correctly until the graph is about to be display, and then shows the older content; the older content displays as if it were a completely static overlay--the cached graph does not have the same dynamic features (roll over data point display, zoom and pan, etc.) And it is as if the correct page were somewhere beneath it (the download button for the csv file moves depending on how large the table is. The older, static page does nothing if you click the download .csv button, but if you can manage to find the one in the page beneath it you can click and still download the .csv. The data in the .csv is correct) It is one of the strangest things I've seen in development thus far. Some other relevant facts are that all the problems I've personally experience occurred while I was using Chrome. Non of these symptoms have been reported by Firefox users. IE users have had the same problems (IE users are forced to use chrome frame). I'm at my wits end at this point. We've sent the php headers; we've tried setting the cache profile for php on IIS as "DisableCache" (or whatever); we've tried sending a random query string to the results page; we've tried all the appropriate meta tags--all with no success.

    Read the article

  • Nested/Sub data types in haskell

    - by Tom Carstens
    So what would be nice is if you could do something like the following (not necessarily with this format, just the general idea): data Minor = MinorA | MinorB data Major = Minor | MajorB isMinor :: Major -> Bool isMinor Minor = True isMinor _ = False So isMinor MinorA would report True (instead of an error.) At the moment you might do something like: data Major = MinorA | MinorB | MajorB isMinor :: Major -> Bool isMinor MinorA = True isMinor MinorB = True isMinor _ = False It's not terrible or anything, but it doesn't expand nicely (as in if Minor when up to MinorZ this would be terribly clunky). To avoid that problem you can wrap Minor: data Minor = MinorA | MinorB data Major = MajorA Minor | MajorB isMinor :: Major -> Bool isMinor (MajorA _) = True isMinor _ = False But now you have to make sure to wrap your Minors to use them as a Major... again not terrible; just doesn't really express the semantics I'd like very well (i.e. Major can be any Minor or MajorB). The first (legal) example is "Major can be MinorA..." but doesn't have any knowledge of Minor and the second is "Major can be MajorA that takes a Minor..." p.s. No, this isn't really about anything concrete.

    Read the article

  • jQuery - window focus, blur events not triggering - works in Firefox and Chrome

    - by brian newman
    In a nutshell; I wrote a simplistic chat application for a buddy and me to use. When the window running the application does not have the focus (minimized or behind other windows) and a message comes in, I want to change the windows title bar to serve as an alert. Exactly like Google's chat application does in GMail. Everything works flawlessly in Firefox and Chrome but not in IE7 (haven't tested 8). This is the code I am using to determine if the window has focus. Can this be written differently to also work in IE? Also, I'm open to any other approaches to accomplish the same thing. Many thanks in advance. $(window).bind("blur", function() { hasfocus = false; }); $(window).bind("focus", function() { hasfocus = true; });

    Read the article

  • Set caret position in contenteditable div layer in Chrome/webkit

    - by Alex
    Hello, I'm trying to set the caret position in a contenteditable div layer, and after a bit of searching the web and experimenting I got it to work in firefox using this: function set(element,position){ element.focus(); var range= window.getSelection().getRangeAt(0); range.setStart(element.firstChild,position); range.setEnd(element.firstChild,position); } [...] set(document.getElementById("test"),3); But in Chrome/webkit it selects all of the content in the div. Is this a bug with webkit or am I doing something wrong? Thank you in advance.

    Read the article

  • The width of items in select box is different in IE 8, Firefox and Google Chrome

    - by Purushotham
    I have a problem with the select box in my application. I specified some width to the select box. The width of some of the items in the select box is more than the actual width of the select box. Each browser is treating it differently. I can see a shrink of the select box items in IE 8. Whereas google chrome and firefox takes the maximum width of the items in the select box. I want to control the width of the select box. Is there any way to do this ?

    Read the article

  • ExternalInterface in flex calling javascript function works for mozilla/chrome but NOT IE

    - by Rees
    hello, i have a flex application that does a simple ExternalInterface.call("shareOptions"), which calls a shareOptions() javascript method and works absolutely fine with Mozilla and chrome, however when I test with IE i get the following error: Error: [object Error] at flash.external::ExternalInterface$/_toAS() at flash.external::ExternalInterface$/call() I looked at the adobe livedocs documentation but can't determine what the issue is with IE. is there something i'm missing?? if anyone knows, please let me know ASAP! thanks in advance. private function shareOptions(event:MouseEvent):void{ ExternalInterface.marshallExceptions = true; if (ExternalInterface.available){ ExternalInterface.call("shareOptions"); } } the javascript <script language="JavaScript" type="text/javascript"> function shareOptions() { myWin = window.open('http://www.mysite.shareOptions.php','yeee!','width=640,height=690,toolbar=no,location=0,directories=no,status=no,menubar=no,scrollbars=no,copyhistory=no,resizable=yes,x=500,y=500'); myWin.moveTo(300,300); } </script>

    Read the article

  • alternative to visibility:collapse not working on IE and Chrome

    - by tic
    The following page: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <STYLE type="text/css"> tr.cccc { visibility: collapse; } </STYLE> <BODY> <TABLE border="1"> <TR class="cccc"> <TD>one</TD> </TR> </TABLE> </BODY> </HTML> works only in Firefox. IE always displays the row, and Chrome hides the row but showing its vertical space. So, how can I hide completely a row using only CSS? Thanks.

    Read the article

  • Body Margin:0, Div Width:100% problem in FF and Chrome, fine in IE

    - by Albert
    Hey People, I'm starting to pull my hair out of my head... I have the following: <html> <head> <style> body { margin:0 auto; } </style> </head> <body> <div style="border: solid 1px red; width: 100%;">test</div> </body> </html> This works in IE producing a nice div, 100% width, no H scrollbar... Now in Chrome and FF, it is 1px wider than the window, causing an H scrollbar... Why is that? What SHOULD I be using instead? Thanks a lot! Albert

    Read the article

  • jQuery scrollTop not working in chrome but working in Firefox

    - by Maju
    I have used a scrollTop function in jquery for navigating to top. But strangely 'The smooth animated scroll' stopped working in safari and chrome(scrolling without smooth animation) after I made some changes. But it is working smoothly in Firefox. What could be wrong? Here is the jquery function i used, jQuery $('a#gotop').click(function() { $("html").animate({ scrollTop: 0 }, "slow"); //alert('Animation complete.'); //return false; }); HTML <a id="gotop" href="#">Go Top </a> CSS #gotop { Cursor: pointer; position: relative; float:right; right:20px; /*top:0px;*/ }

    Read the article

  • Cannot add margin to Legend element in Safari & Chrome

    - by Graham
    I have some pretty straightforward markup: <form action=""> <fieldset class="compact"> <legend>Member Tools</legend> <label for="username">Username</label> <input name="username" id="username" type="text"/> <label for="password">Password</label> <input name="password" id="password" type="password" /> </fieldset> </form> I am attempting to add a small margin to the bottom of the Legend element, this works just fine in Firefox 2 and 3 as well as IE 5-8, however in Safari and Chrome adding a margin does nothing. As far as I know legend is just another block level element and Webkit should have no issue adding a margin to it, or am I incorrect?

    Read the article

  • Open mailto after click in IE8/Chrome

    - by Rakward
    I'm currently trying to do the following: Trigger: click on a name in a select list. Action : open mailto-link in current window, thus opening an email client. $(document).ready(function(){ // Define click-event $('option').click(function(){ var mail = $(this).attr('value'); window.open('mailto:'+mail, '_self'); }); }); I've also tried using this instead of window.open: parent.location.href= 'mailto:'+mail; However, both work only in firefox, get no errors/results in IE8 or Chrome. Anybody know what the problem could be?

    Read the article

  • JQuery: Problem in getting element's width in Chrome

    - by Sarfraz
    Hello, Suppose I have this image: <img src="images/01.jpg" border="0" rel="shadow" /> Then with JQuery, I get its width using: $('[rel="shadow"]').width(); Firefox and IE report correct dimensions of the image eg 140px while Chrome reports 0. How to solve this problem? Note: I don't want to set explicit width for images eg: <img src="images/01.jpg" border="0" rel="shadow" width="140" /> So, how to get width in cross-browser way which is not defined in width attribute of elements? Thanks

    Read the article

  • asp:menu in safari and chrome

    - by Patto
    I have seen some posts of the asp:menu and the browsers Chrome and Safari here, but nevertheless, I think the problem that I have is different than other problems. I am using the following code in order to display the menu: protected void Page_Load(object sender, EventArgs e) { if (Request.UserAgent.IndexOf("AppleWebKit") > 0) { Request.Browser.Adapters.Clear(); } ... } However, the problem is still there if I start the browsers for the very first time, the menu is displayed vertically instead of horizontally. After a page refresh, the menu works fine... How is that possible? Or is the problem that simple,and I need to place the code in somewhere earlier (eg Page_PreInt). Thanks in advance, Patto

    Read the article

  • jParallax : rendering problem on Chrome/Safari

    - by Bastienald
    Hello, URL : http://jaimelesbeauxsites.com/labs/ Browser : Firefox 4 beta 11 OS : Mac 10.6.6 I'm using jParallax to create a new homepage for my folio. I've set the first elements and tested it on Firefox 4 beta 11, everything was working fine. ! But when I've opened the page on Chrome/Safari, none of the elements were where it was supposed to be. Is there something I've missed ? Maybe it's only due to the fact that I'm using a beta...

    Read the article

  • Equalize column javascript not working in Chrome

    - by alimango
    Hi, I'm using this mootools javascript snippet to equalize the height of my columns: window.addEvent('domready', function() { var columns = $$('.equalize'); var max_height = 0; columns.each(function(item) { max_height = Math.max(max_height, item.getSize().y); }); columns.setStyle('height', max_height); }); Problem is it's not working properly on Chrome. It's getting the minimum height of the 2 columns instead of getting the maximum. What seems to be the problem and how do I fix it? Thanks in advance!

    Read the article

  • jQuery hide/show div working in Opera and Chrome but not IE/Firefox

    - by injekt
    Hey guys, the following snippet of jQuery code seems to work fine in Google Chrome and Opera, but nothing happens when I try hiding/showing the related div in Internet Explorer or Firefox. Any ideas? $(function() { $(".paste-meta-small .right a.collapse").click(function(event) { $(this).parents(".paste-meta-small").next(".highlight").toggle(500); $(this).text($(this).text() == 'show' ? 'hide' : 'show'); event.preventDefault(); }) }) $(function() { $(".highlight-meta a.blog-collapse").click(function(event) { $(this).parents(".highlight-meta").next(".blog-highlight").toggle(500); $(this).text($(this).text() == 'show' ? 'hide' : 'show'); var margin = ($(this).text() == "show" ? "15px" : "0"); $(this).parents(".highlight-meta").css("margin-bottom", margin); event.preventDefault(); }) }) A working example can be found here Thanks in advance

    Read the article

  • jQuery Upload Progress Plugin Not working in Chrome and Safari

    - by Conceited Code
    I am using the jquery.uploadprogress plugin to get the upload progress of a file from the NginxHttpUploadProgressModule. This is inside an iframe for a facebook application. It works in firefox, but it fails in chrome/safari. When I open the console I get this. Uncaught ReferenceError: progressFrame is not defined jquery.uploadprogress.js:80 Any idea how I would fix that? I would like to also send the file using AJAX when it is completed. How would I implement that? EDIT: I need this soon and it is important so I am going to put a 100 point bounty on this question. The first person to answer it will receive the 100 points. EDIT 2: Jake33 helped me solve the first problem. First person to leave a response with how to send the file with ajax too will receive the 100 points.

    Read the article

< Previous Page | 85 86 87 88 89 90 91 92 93 94 95 96  | Next Page >