Jump to content

Ingolme

Moderator
  • Content Count

    14,114
  • Joined

  • Last visited

  • Days Won

    73

Everything posted by Ingolme

  1. You could just Ctrl+F the file when you open the saved page. There is no access to that because it's not part of the HTML, it is just something that the browser renders visually when searching for text on the page.
  2. I am not seeing any issue. I think what you're seeing is that the responsive test tool is bigger than your window and only the left side of the page is visible in your monitor. Try scrolling to the right to see the rest of the page. Try using the developer tools in Firefox or Chrome and use their responsive tools.
  3. Ingolme

    Student

    What questions do you have?
  4. Obfuscated (minified) code is shorter and takes less time to download. Usually they'll have two versions of the code: the minified version and the regular version. If you're doing debugging it's best to use the regular version of the code. Minified code usually has the extension .min.js. I checked FabricJS. Here's the unminified version of it: https://cdnjs.cloudflare.com/ajax/libs/fabric.js/3.6.2/fabric.js
  5. The code is obfuscated in order to make it hard to read. All of it is ordinary Javascript syntax but arranged in a deliberately confusing fashion. 1. That's how you declare a function as a property of an object. A simple example is below: var obj = { doSomething : function(a) { alert(a); } }; obj.doSomething(); 2. This line of code is doing a lot of operations at once, so I'll have to unpack it. // 1. Using || to choose a non-empty value. // The || operator returns the first value which evaluates to a boolean "true". // If "t" already exists, then assign "t" to itself. // Otherwise, assign an empty array. t = t || []; // 2. The return value of the assignment operator is the assigned value. // In this example, a takes the value that was assigned to b, so a = 5. a = (b = 5); // 3. Since "t" is an array it has a length property, which we assign to "r". r = (t = t || []).length; // Same as: t = t || []; r = t.length; 3. The "?" is the conditional operator https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Conditional_Operator It is like an if...else block but shorter. It has the format condition ? expression : expression where if the condition is true, the first expression is executed and if it is false then the second expression is executed. In the block of code that you are looking at, the code is equivalent to the following: if(r) { // FIRST EXPRESSION t.forEach(function(i, r) { i && i.type ? fabric.util.getKlass(i.type, n).fromObject(i, function(t, e) { e || (o[r] = t), s && s(i, t, e), a() }) : a() }) } else { // SECOND EXPRESSION e && e(o) } 4. The && operator evaluates items from left to right until it finds that one of them returns a false value. It will not evaluate any of the other expressions once a false value has been found. In this example, they're using it so that the expression "i.type ? ... : ..." only gets executed if the variable "i" exists. 5. The || operator behaves the opposite to the && operator. It evaluates expressions from left to right and stops at the first one that returns a true value. If "e" exists and evaluates to a true value then the || operator will stop there and not evaluate the (o[r] = t) expression, therefore preventing the assignment from happening. It is equivalent to the following code. if(!e) { o[r] = t; } It's good to know these things, but if you ask me, it's not usually worth trying to look into obfuscated code.
  6. I am not seeing an issue when I test this code. The image zooms in to the vertical center of the picture on large screens in order to make sure that the picture covers the entire surface of the element. That's what background-size: cover; is doing.
  7. From PHP's end, you would use the $_FILES array as in this tutorial: https://www.w3schools.com/php/php_file_upload.asp I'm not familiar with Python's libraries, but if you can't find a library to upload files you're going to have to manually build the body of a file upload HTTP request which is not that easy. An easier alternative is to send a POST request where one variable contains the file contents and another variable contains the name of the file. Whichever way you do it, you should do some validation on the PHP end to prevent people from using this as a gateway to hack into your server. If they manage to upload a PHP file or another kind of executable file then they can do anything.
  8. I'm not sure how Python is sending the data, but your PHP code will depend on the format of the data. Assuming that Python is sending a JSON string, you can read the string using file_get_contents('php://input') and transform it into an array or object using json_decode(). <?php $input = file_get_contents('php://input'); $data = json_decode($input, true); // Print out the structure for testing var_dump($data); ?>
  9. Making a personal copy of anything on the internet is permitted by copyright law as long as you don't plan to distribute it to anybody else.
  10. I suspect some margins may be escaping the container. The quick solution to that would be to add overflow: hidden to #container. Another possibility is that images are changing the height of the container. Since DOMContentLoaded usually fires before images have loaded, the images are not adding to the height of the container at the time that the event fired.
  11. It's not built into W3.CSS, but you can use position: sticky in your CSS to keep things attached to the top of the window.
  12. Yes, that code should work. You can set the width of anything on the page using CSS. The code above is just CSS inside an HTML attribute.
  13. It depends on how the login form was built.
  14. By default, the browser decides how much space to reserve for the columns based on how much content is in each one. I'm not sure if the W3C specifies an algorithm for this or if each browser just does its own thing. You can manually set the width of a column by setting the width of one of its cells, however a cell will always be forced to be wide enough to fit its content without overflowing.
  15. That should work, if .top-bar is the <ol> or <ul> that contains the list items.
  16. What does your HTML code look like? I have tested this and it allows searching. I believe inlinve SVG text can be read by search engine crawlers.
  17. Ingolme

    its

    What is your question?
  18. You're passing a single string into gregoriantojd() but it expects three integers.
  19. Please keep your question to one topic. There is already a topic here: I have little experience with Laravel, but I'm sure a Google search would find something you could use.
  20. If you have a Content Management System (CMS), you will have to find or create a plug-in for the CMS that does that. If you don't have a CMS and there's no system for dynamically creating pages on your site then the sitemap will have to be created manually. Without knowing more about your website's back end I can't give a clear answer.
  21. You can add overflow to the w3-dropdown-content class and give it a max-height in order to cause the scrolling. On mobile devices, arranging the links into columns would likely get outside of the screen horizontally.
  22. You can put a unique class name on the <body> element of each page and have one CSS rule for each one. The other alternative is to load a page-specific stylesheet on each page, each stylesheet having a different body{} rule.
×
×
  • Create New...