Jump to content


Senior Members
  • Content Count

  • Joined

  • Last visited

  • Days Won


Everything posted by Sensei

  1. If we enter developer mode in web browser we can see reason for errors e.g. which resources are missing, improperly closed tags etc. Firefox showed me this: Do you understand? Browser MERGED these three tags together interpreting them as one.. .abc class should be BLUE, according to CSS, but on my 1st screen-shot it is BLACK. Web browser didn't find <p class="abc"> as tag due to improperly closed double-quotes in <img> tag.
  2. You should pack entire folder to zip and attach in reply. Not copy'n'paste code.. Anyway. Here is how it looks on my Firefox: After changing error mentioned by Strange in line 12 to: </h1><br><img src="ian.jpg" height="370" width="300"> and changing line in CSS file to: .top{color:yellow;} How it should looks like? How it looks like on your machine/browser? There is yet another error... It requires url( 'filename' ); See how to use this property properly: https://www.w3schools.com/cssref/pr_background-image.asp
  3. Did you mean declaration of data type of variable or constant by programmer? Declaration of data type informs compiler or interpreter what is data type, so there is no need to guess it at run-time, and there is no need to use generic data type. There are existing computer languages which don't require declaration of data type by programmer, but result is that they are much much more slower. For instance some such computer languages treat the all variables and constants as strings. You can store integer, float, double, boolean and string, just using string. If we add two strings they are concatenated. If you add two integers/floats/doubles which are strings internally, computer must convert string to integer/float/double first, add them together, then convert them back to string. Much much more slower code. The main reason: it is optimization. To have fast code.
  4. BTW, you can replace the <img> tag by <div> or <span> tags, with id and/or class attributes, and then control the image URI from inside of the CSS file (using background-image property), instead of encoding it permanently it in HTML. Then attach your the real code... We need to be able to see what you see on your browser's. Did you try float: none etc. ? https://www.w3schools.com/css/css_float.asp It controls whether the next section (in your case paragraph) after the image will be on the right, left, or below etc. Also worth trying, if you have not already, clear and overflow properties in CSS: https://www.w3schools.com/css/css_float_clear.asp https://www.w3schools.com/css/css_overflow.asp
  5. Lack of ending double-quotation mark. It should be: <img src="sth.jpg">
  6. Are you familiar with mathematical summation? https://en.wikipedia.org/wiki/Summation If t is array/list of elements/pointer to memory etc. j is index to element. And tj is value of element i.e. t[ j ] in computer language. So summation of array etc. is e.g: int *t; int sum = 0; for( int j = 0; j < length; j++ ) { sum += t[ j ]; } However, in the special cases, if tj is always constant it can be replaced by multiplication (addition of the same value multiple times).
  7. Sensei

    Crackpot Bingo

    "Registration of many sock puppet accounts to be able to upvote the main account posts to pretend somebody is agreeing with them"
  8. Executable file is opened in read-only exclusive mode which means no other process can modify it until it is running. Linker, which is invoked at the end of compilation process, will be unable to save new executable file with the same file name.
  9. Sensei

    Locusts for Lunch

    ..or simply don't ask "what am I eating?" Frogs taste like chickens with a bit of fishy taste..
  10. Yet another way is to dry banana (or other fruits and vegetables) peels couple weeks/months and mix in blender. Then add to soil. If you have your own garden, you should make your own composter. https://www.amazon.com/composter/s?k=composter
  11. The first which comes to mind is algae.. Yet another natural fertilizer, but not marine, is banana peel. Search net for "banana peel fertilizer".
  12. Sensei

    Locusts for Lunch

    ..you seem to not understand what off-topic is about: whether people eating locusts will or not be infected by zoonotic diseases... Pretty on-topic IMHO...
  13. The whole point of using pseudocode is to have it human readable and understandable and independent from the real computer language (which might be, and usually is, not self-explanatory). Read article: https://en.wikipedia.org/wiki/Pseudocode
  14. Tell this to Diamond Princess passengers.. One infected individual was on board between 20 to 25 January. Taken to hospital and identified as infected by COVID-19 6 days later. 4 February cruise ship has been quarantined and people locked in their rooms the most of time. Three weeks later over 712 people were infected (some more identified after disembarking the ship)..
  15. Helium-4 that we have on Earth is byproduct of decay of radioactive isotopes.
  16. The all elements and isotopes used to be Hydrogen-1 before it fused together billions years ago. Hydrogen-1 has the highest mass-energy per Baryon number ratio.
  17. Sensei

    Locusts for Lunch

    Insects have no lungs. https://en.m.wikipedia.org/wiki/Respiratory_system_of_insects
  18. ANSI-C is the closest. Just change to if(....) printf(....); (semicolon at the end of line of code is required) and add #include <stdio.h> at the beginning. and cast type to float (because %f is used)
  19. In other words, they are product of two prime numbers. They are called semiprimes or biprimes. https://en.m.wikipedia.org/wiki/Semiprime 6 is discrete semiprime.
  20. Sensei

    Locusts for Lunch

    I would find pheromones which attract locusts. And let them get in to hermetic container. Then freeze them and repeat. ps. Pigs will happily eat them after blending.
  21. Instruction is special data in computer memory. Program is sequence of instructions. CPU reads instruction from address specified by special register with name PC (Program Counter). (Read articles below) https://en.wikipedia.org/wiki/Program_counter After reading it, CPU starts executing assigned to instruction operation and PC is incremented by length of the all arguments taken by instruction (it is variable in the most of CPUs and depends on instruction). Different CPUs have different instruction sets. The same value might mean something else (different operation) depending on which CPU is used. Therefore program compiled to one processor is not working with different processor or with different architecture (see below). Even the most basic ANSI C complaint program, requires recompilation if intended to be used on different CPU. There is yet another special kind of register: CPU flags register. https://en.wikipedia.org/wiki/FLAGS_register The most important (and common to the all modern processors) are: Zero, Carry, Overflow and Negative flags. https://en.wikipedia.org/wiki/Zero_flag https://en.wikipedia.org/wiki/Carry_flag https://en.wikipedia.org/wiki/Overflow_flag https://en.wikipedia.org/wiki/Negative_flag These allow computation and comparison of data by instructions. For instance, to check whether one data is equal to another data there is used virtual subtraction of them. Result is lost, nowhere stored, but flag register is updated instead. if data are equal subtraction of them gives zero, therefore Zero flag is set, and BEQ or BNE instructions (or equivalent with different name) can be used to perform jump. B.. is shortcut of Branch, J... is shortcut of Jump. EQ = EQual. NE = Not Equal. Relative jump means addition or subtraction of PC register. Absolute jump means setting PC register to fixed value (address of the next instruction to execute). Read articles: https://en.wikipedia.org/wiki/Instruction_set_architecture
  22. Feature for good guys. Vulnerability for evil guys. Dynamic generation and/or modification of the code to execute is state-of-the-art way to accelerate execution of the code. e.g. JIT. https://en.wikipedia.org/wiki/Just-in-time_compilation With memory protection for code, JIT becomes much more complicated than it can be in the normal circumstances (without "evil guys"). They had code on paper tape, equivalent of non-volatile ROM.
  23. Computer store data in bits. Bit can be 0 or 1. Sequence of 8 bits is byte. It can have values from 0...255 (because 2^8=256). Byte is also used as ASCII character (modern equivalent is Unicode which is 16 bits wide character in computer memory, and encoded in 1-4 bytes in various standards e.g. UTF-8 when it is stored in file). In this article you will find ASCII conversion table i.e. what ASCII code corresponds to which glyph. https://en.wikipedia.org/wiki/ASCII e.g. word "ASCII" is sequence of bytes 65,83,67,73,73. Computer does not know the true meaning of human language words. More information about Unicode standard: https://en.wikipedia.org/wiki/Unicode https://en.wikipedia.org/wiki/Glyph
  24. The basic alcoholmeter is just measuring density of liquid. It costs less than 10 usd on e.g. ebay. https://en.m.wikipedia.org/wiki/Hydrometer You can easily convert saccharometer to alcoholmeter. Get reference 96% ethanol in the shop and add precisely measured amount of water. Record equivalent saccharometer readings. Repeat.
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.