Jump to content

boen_robot

Members
  • Posts

    8,493
  • Joined

  • Last visited

  • Days Won

    1

Posts posted by boen_robot

  1. Damaged page? You can see my html doc and you could see that the link to my css isn't good written!
    When I say "damaged page", I mean "the page that you're having a problem with" (do you really need me to be that verbose from now on?).The code
    <link rel="stylesheet" type="text/css" href="../ex4.css">

    is a perfectly valid HTML code.How am I supposed to know that you don't have a file called "ex4.css" located in the parent folder of wherever the HTML is? There isn't a rule stopping you from doing that. The only way I could've known is if you publish the page on your site.Next time we ask you to help us help you, would you actually let us help you by helping us, instead of resisting and delaying by asking unnecessary questions, and then wondering why we aren't helping?

  2. But the most important thing I miss: the link to my stylesheet (css) doesn´t work. So, all desperate attemps for more than 1 week didn´t make any sense
    And that's just one of the many problems that we could've easily solved in minutes if we only had access to the damaged page.
  3. Come to think of it, this might actually be a hinderance too, though in a different way than how a non-native speaker might have problems with.I mean, although my English was decent when I started learning, I still brushed off the technical terms as "English words I don't know due to my average English skills" rather than "technical terms", so that made it easier to sweep over the tutorials, and fix misconceptions as I practice (which is exactly what I'm proposing you do anyway), rather than trying to nail it all together from the start.

  4. If you think "line break" is a technical term, then you probably need to find something in whatever your native language is, or better yet - find a ("physical", not online) course you can go to.I mean, what other term would you suggest for "a thing that separates one line in a text from another line of that same text"? "line separator" is the only alternative one I can think of, but that sounds even more technical to me. Speaking of which, if you like "line separator", brace yourself for technical terms like "directory separator" and "path separator", which you'll end up with sooner or later :P .I mean, you're right in that there are some technical terms in there (like "string"; it took me a while to realize that's a technical term for "text"), but if you just try guessing, chances are you'll be in the ballpark. And if you fail even at that... that's what we're here for.

  5. All that matters is if you have anything before "<?php". Once you're inside "<?php", you're no longer sending output until you have an "echo", "print" or stuff like that. Any header(), cookie, session stuff must happen before any such stuff.Having stuff before "<?php" (including empty lines) is exactly what we were talking about.

  6. Yes. Surround the whole expression with substring-after(). e.g.

    substring-after(td[2]/a[starts-with(@onclick, "javascript:getURLWin('")]/@onclick)

    I assume you'll also want to get rid of the trailing ")". That's a little difficult to get with just XPath 1.0. The best you can do is just remove the last N characters, assuming that they're always that many. For performance, you might want to store the full result before you cut it. If you're using this XPath in XSLT, you can use xsl:variable for that, e.g.

    <xsl:variable name="url" select="substring-after(td[2]/a[starts-with(@onclick, "javascript:getURLWin('")]/@onclick)" /><xsl:value-of select="substring($url, 0, string-length($url)-2)" />

  7. The contents of the books are available on the site. If you want it in an ebook format, you can generate one yourself using some free tools (most notably HTML-to-PDF converters) OR buy W3Schools' books, which I believe include an ebook copy (though I'm not sure...).Sharing an ebook copy is considered piracy, which is not allowed here.

  8. Before we continue, please update the copy on your site , and paste a URL to the updated page here.And don't do such bait&switch again, OK? Both me and dsonesuk used "imga" because that's what you have published on your site. It's a lot easier diagnosing a "live" copy, because that way, we can be sure we're looking at the same things.

  9. You could say your site is ready even now. After all, you define the requirements for your own site, not other people. If your requirements to yourself end up with a contact form, then yes, you can say your site is done then. If you don't want a contact form, you can declare your site "ready" right now. If after the contact form, you expand the requirements towards yourself, you'll again redeclare your site "not ready" until you meet those new requirements.Seriously, what's "ready"?

  10. I see.... that's tricky...One way is to simply force only one image on each side. You can do that with a CSS like:

    #imga > img:nth-child(odd) {float:right;clear:left;}#imga > img:nth-child(even) {float:left;}

    This will make every odd numbered image (1st, 3rd, etc.) aligned with the right edge, while every even numbered image (2nd, 4th, etc.) will be aligned with the left edge. Thus the images will be evenly distributed between the left and the right, but there will be no images in between, even if there is enough space for a 3rd image to fill the gap.If you want to also fill in the middle, the formulas will be a lot trickier. In fact, I'm not sure if it's possible using currently implemented CSS properties. There's a "grids" proposal at W3C which addresses concerns like this, but it's not yet implemented in browsers.Note also the above solution only works in the latest browsers. It won't work, for example, in IE7.

  11. Just to be sure, we're talking about this page, right?I don't see overflow:hidden in #main.And just to make sure we're talking about the same effect - what's the intended result here? What are we after? Like I said, the images are already at equal distance from the edge of the screen.What overflow:hidden should do is make the top edge of the text in the middle be on the same line with the top edges of the images, and hide anything that goes beyond the dimensions of #main. Actually, that reminds me... you might want to remove the "height" of #main, as otherwise, you're cutting off the bottoms of the images... Plus, if you were to add more text, you'll be cutting off that text too.Is the above the intended effect, or are you after something else, which is why you're saying it doesn't work?

  12. No, but you'll start to quickly go out of memory (or at least have a lot of it consumed) unless you manually call unset() on every variable (including individual array members) that you're no longer using. This can be especially troublesome at loops in which you change the value of a non-numeric variable on every iteration. IF you end up exhausting the web server's memory, THEN you'll see an error message (which you'd see even with garbage collection enabled, if there's no garbage to be collected, but too much of an actual in-use memory).See this page of the manual (in fact, check out the whole section on GC) for details.It's important to note that with or without garbage collection enabled, any memory allocated during a request is cleaned after the request is over. This is something PHP doesn't let you alter in any way, for obvious reasons.

  13. Of course. PHP is not C (I mean, not from a PHP developer's perspective), where even strings are actually arrays of chars, and thus need to be taken care for.No. In PHP, and most languages with a garbage collector, whether you're using strings or objects, the garbage collector takes care of freeing the memory when not needed and keeping references correct, all in the background, and thus leaving you completely oblivious to the fact.

  14. Yes, but again, we're talking not just about PHP pages that are just "being" PHP pages... like most pages on the web. Those can be cached. The fact that people often don't do that is a developer problem, not a technology problem.No, we're talking about those that are applications. Which can't really be cached, since they change too often.One of the biggest problems for such dynamic applications is the maintenance of session information, which is actually why a lot of work that could otherwise be done by the client is done by the server, thus making caching non-feasable.Browser vendors are addressing that part with Google's SPDY protocol, which is an extension of HTTP, and will eventually be formalized into HTTP 2.0. Combined with web sockets and app manifests (which are implemented in the latest browsers today), you'd pretty much be able to cache the app itself on the client (which may slow down the initial load, but significantly improve overall performance) and only download the actual data over the wire (rather than the data, and the whole page, as you do currently).

    • Like 1
  15. Well, strictly speaking, other assets can be cached as well... unless we're talking about a PHP page that's displaying some up-to-the-moment information (like in a forum, or some sort of item list).And in that case, the time that you'd save over the wire will be spent encoding and decoding the content, so minifying the HTML (by eliminating the white space) and doing a GZip compression is pretty much more than enough.

    • Like 1
  16. At W3C*, there is already EXI, but no browser has native support for it yet.If you're enough of a C++ dev, consider either writing your own EXI parser for one or more Open Source browsers (the closed ones will follow if both Mozilla and Chrome have it) OR take an existing parser (e.g. EXIP) and hook it into browsers.HTML was originally designed to be a language based on the SGML markup language (similarly to how XHTML is an XML based language). SGML is designed to "save" typing, making the implementation figure the rest based on the language's DTD. This in turn means far less bytes being sent. Having mentioned EXI's problem above, can you guess what SGML's problem was?Yep, you guessed it. No browser supports the full features of SGML. This is because they never had an SGML parser to begin with, but made "HTML parsers" that aren't actually compatible with SGML.* In case you don't realize it, W3Schools is not affiliated with W3C.P.S. Damn... me, you and EXIP's developer are all Bulgarians... doesn't anyone else think about these things? :lol:

    • Like 1
  17. Oh. That page. Sorry, I thought we were talking about your home page (as we usually do). I hadn't followed the full conversation to see that we're talking about a different page. Anyway... that page seems to already have the images at equal distances from the edge. As for the images being larger than the div... I actually noticed Chrome has the inspect element option too... it looks like a magnifying glass, near the bottom left corner of the dev tools.Click that, and hover under the text that's between the two images, and you'll see an outline that's smaller than the two images. It is because of it that the text appears slightly above the images, and the copyright appears so close to the right image's bottom.The easiest fix is to add "overflow:hidden;" to #main.

  18. The forum is typically down when the owners forget to pay their fee to invisionzone OR (more often) when they exceed the bandwidth. W3Schools is, after all, popular, and besides - we all use the forum regularly, so we waste even more of that bandwidth.Add spammers on top of that, and it's almost a wonder why the forum goes down as rarely as it does.

  19. Thanks!, but not right! 2 different questions: you were able, the detective isn´t!
    1. It's just an analogy.2. Again, it depends - some detectives are able to prove their suspicions, with different methods for each case, which was the point of the analogy.
    How do you get to an iframe, because I didn´t use it there?
    Like I said, you choose the option to inspect an element by clicking on it....[[Opens Chrome]]Wait... Google Chrome doesn't have this option... crap... well... still, after opening its dev tool, you can hover overhtml > body > div#main > iframeat the displayed tree (source tree... not literally tree... more like with folders... please oh please don't make me explain what that term means), to see the same phenomenon.And BTW, you do have an iframe. Look at the source of your page, and the part with your video (you know, the one between the two images).
  20. That's a lot like a crime detective asking "How do I prove this person did it?". The way depends on the situation.In your case, I was able to simply hover over the two images and the iframe, and I can clearly see that the frame has an outline with a right edge that goes further right than the image's left edge. Because of that, the browser compensates by putting the image on a new row.Reduce the left and right margin of the iframe a little.

  21. Thanks! However, I don´t hope this is a reaction to my previous posts! My circumstances were never good and unfortunately they aren´t now (problems with the owner!). So I´ve to move again (11 times in 3 years and 9 months!).
    Errr... this was a reaction to other people's reaction to your posts.But anyway... stop bringing your circumstances into the conversation!
    I´ve now the developers tool! But how do I know that the images don´ t fit in their div?
    There should be an option to select/inspect an element with a click. When you click this option, and start moving within the page with the mouse, you'll see each element being outlined. The outline will sometimes look different from the boundaries you see on screen or which you'd expect. The extra space can be created in various ways, which can sometimes accumulate, leading to all sorts of weird stuff.
  22. Guys... I don't remember us telling Eduard about the dev tools. We never got that far. I mean, it is a sort of "advanced" thing (I mean... relative to what we've talked about), so give him some slack, OK? You may want to give a link if you remember such a case that I don't...@Eduard, see this post, and the part in "3.2" in particular. It tells you how to open the development tool of each browser.

×
×
  • Create New...