Jump to content

Ingolme

Moderator
  • Posts

    14,901
  • Joined

  • Last visited

  • Days Won

    177

Everything posted by Ingolme

  1. It looks like one of the pages has CSS setting the font family and size and the other page does not. If you included a CSS framework it most likely is setting its own default font.
  2. If you get a 301 or 302 response, check the Location header in the array and make another get_headers() call to that URL to see if it exists.
  3. That refers to a constant. It would be defined in the Feed class as const ATOM = 'Some value'
  4. This is unfamiliar to me, since other Javascript frameworks and libraries I've worked with did not actually alter Javascript syntax. If this really is a browser-side library, it seems pretty inefficient to parse all that code just to have a prettier syntax. It would have to be compiled into real Javascript, either using a server-side compiler or during runtime with a Javascript program.
  5. What does your HTML look like?
  6. Did you inspect your HTML element to see what styles are being applied to it?
  7. This does not appear to be browser Javascript, which does not support import statements or typed arrays. It seems like there would be an issue in your render() call because your string is not quoted. ReactDOM.render( '<META http-equiv="refresh" content="0;URL=Index.html">', // Added quotes to the string document.getElementById('app') );
  8. The inner list should be placed inside a list item. No element can be a direct child of <ul> or <ol> except an <li> element. <ol> <li>Inner list <ol> <li>Item 1</li> <li>Item 2</li> </ol> </li> <li>Item 2</li> <li>Item 3</li> <li><img src="" alt=""></li> </ol>
  9. I'm not seeing the issue in the example page. I tested in Firefox, Chrome and IE11. It works down to 320px wide, which is the width of the smallest phones today.
  10. I'm not sure what code you're using to get the mouse offset, but once you have it you can calculate the correct position by dividing the canvas real size by its visible size. // Assuming we already have a reference to canvas and the mouse's position // relative to it is in visibleX and visibleY var horizontalRatio = canvas.width / canvas.offsetWidth; var verticalRatio = canvas.height / canvas.offserHeight; var realX = horizontalRatio * visibleX; var realY = verticalRatio * visibleY; // Do something with realX and realY
  11. You'll have to link to a specific PHP file that's designed to display the source of a file. <a href="show-source.php?file=interface">Interface</a> <a href="show-source.php?file=class">Class</a> show-source.php <?php if(isset($_GET['file'])) { switch($_GET['file']) { case 'interface': highlight_file('./composer/php_rss_generator/RSSGenerator/ItemInterface.php'); break; case 'class': highlight_file('./composer/php_rss_generator/RSSGenerator/Item.php'); break; } } ?>
  12. A responsive page should not have any effect on the canvas. The width and height attributes of the canvas determine its real size, if it has been scaled down by CSS that will not actually reduce the number of pixels that are on the canvas.
  13. You can make the <a> element a block and set the background color on it instead of the div.
  14. The problem is that Drupal puts the active class right on the link instead of the div element.
  15. First describe clearly what result you want and what result you are actually getting. Then show us what code you currently have.
  16. Why are you asking us to do your research for you? The central directory and disks are described in detail right in the Wikipedia article under the Structure section https://en.wikipedia.org/wiki/Zip_(file_format)#Structure If you want information directly from the source, citation 23 points directly to the official specification document https://pkware.cachefly.net/webdocs/casestudies/APPNOTE.TXT In summary: Central directly describes the hierarchy of files in the archive, there's even a diagram here https://en.wikipedia.org/wiki/Zip_(file_format)#/media/File:ZIP-64_Internal_Layout.svg Disks refer to diskettes when the file spans across multiple floppy disks. Currently these fields can be used to send zip files in parts through email or other removable drives. Please make more of an effort, even after we linked you directly to the information you still did not try to read it for yourself.
  17. You can either put the hover selector on the div element, or you can make the link a block and set its background color.
  18. You have to replace "var" with "public," "private," or "protected", as far as I know, you can't do variable assignments directly inside a class definition.
  19. If the assignment is happening inside a function then the variable is only accessible from inside that function.
  20. I found a print rule in this file: https://www.finanzen100.de/build/css/app-433d327b78.css
  21. If the code is running slowly in a different environment then we're going to have to see the code operating in that environment. I can give suggestions to optimize your code, but the main issue is probably with something else on the page which we have no information about. Scroll events fire very frequently, so you have to reduce the amount of code that runs when the fire. You could make your code slightly more efficient by not searching the DOM for your elements every time, storing them in variables. Keeping height, color and opacity local to the function will make them quicker to access from within the function. jQuery in general is considerably slower than plain Javascript, but I can see that's not the problem since your JSFiddle example works smoothly. I've made some optimizations to your code, but probably nothing significant. // change header size on scroll $(document).ready(function(){ // variables var vh90 = $(window).height()*(9/10); // Reference to elements var header = $("#header"); var headerBack = $("#header-back"); // control height of header on scroll $(window).scroll(function(){ var height, color, opacity; height = vh90 - $(window).scrollTop(); opacity = 1 - ( (height-80) / vh90 ) * 0.2; color = "rgba(30,30,30," + opacity + ")"; header.css({"height": height, "background-color": color}); headerBack.css({"height": height}); }); });
  22. No, not all text, only paragraphs or sentences. Text should be contained by the HTML element that best describes it. The <p> tag does not allow block elements, such as <h1-6> or <li>, as children. If you try to do it, the browser will implicitly close your paragraph where the next tag starts. If you find yourself writing code like this: <div class="text">Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book.</div> <span>It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</span> Then you should change those to <p> tags.
  23. Ingolme

    Select and array

    MD5 and SHA-1 are both considered too weak to be secure these days. The PHP manual itself advises against using them for hashing: http://php.net/sha1 Let PHP use password_hash to handle passwords, it uses much stronger hashing algorithms.
  24. The table in the Wikipedia article states exactly what all the additional bytes are. I'll just copy what's in the article here for you and show your bytes next to them: https://en.wikipedia.org/wiki/Zip_(file_format)#File_headers 2 bytes: Number of this disk 0x0000 2 bytes: Disk where central directory starts 0x0000 2 bytes: Number of central directory records on the disk 0x0002 2 bytes: Total number of central directory records 0x0002 4 bytes: Size of central directory (bytes) 0x0000006F 4 bytes: Offset of start of central directory, relative to start of archive 0x00000984 2 bytes: Comment length (n) 0x0000 n bytes: Comment
  25. According to Wikipedia, 50 4B 05 06 marks the start of the End of central directory header which contains some information about the ZIP file.
×
×
  • Create New...