Jump to content


  • Content Count

  • Joined

  • Last visited

Everything posted by boen_robot

  1. They're browser specific, so any tutorials are found mostly at the browser developers' sites.But even those are very limited, because as someone who is actually working with JavaScript, you're expected to know what you need.The way you access the different built in developer tools can be seen at this post. You mean what? An animated GIF? There are many free and paid editors. Google "animated gif editor".
  2. boen_robot

    Pc cleaner?

    That's exactly what I mean whenever I say "data" in this topic, including the part So we're on the same page here : It's perfectly fine (in fact recommended) to keep the data at a non-system partition, since it isn't affected in any way by a Windows reinstall.[edit]Yeah... I forgot to clarify that, as I always do reinstallations that way when there are two or more partitions[/edit]
  3. boen_robot

    Pc cleaner?

    The data, yes.And as you say, the application needs to be reinstalled after the OS reinstalled.So what would be the point in installing an application at a partition other than the system one if you're going to be reinstalling the application anyway (while having its data safely onto a separate partition)?The only thing you're doing that way is to preserve any extra files from the application, which after the application reinstall would often well make them be ignored. Or in theory (rarely in practice, but still) - not ignored, and causing damage (as in "being unable to run" or "spitting cryptic error messages") to the newly installed program, due to those extra files assuming some registry settings that are not there yet or are different than what is expected.
  4. boen_robot

    Java Applets?

    It's more like Flash. The user installs JVM, and its browser plug in. Your applet code is downloaded, and executed by that plug in.You just compile a JAR with a main class that extends the java.applet.Applet class, and from that point on, it's like running a desktop application, except you have different I/O points (overriding events, and all).Advantages:- Full user access, or maybe OS access if the user agrees to run your app as administrator.- Everything JAVA can do on a desktop, you can do within a browser.- Everyone always has the latest versions of your app, assuming they know the URL where your applet is.Disadvantages:- Requires the user to install JVM.- Requires the user to enable the browser plug in.- Your code is only as compatible as the installed JVM. This isn't a problem most of the time, unless you do stuff that requires a separate JAVA binary plug in (ala MySQL connector), or use a feature specific to a certain JVM version.
  5. boen_robot


    You can simply set the session (and cookie) timeout to something longer, and some time within the session, use session_regenerate_id() to reset the timeout before the session has expired.Of course, upon login, and regeneration, you'll have to set the date and time into the session, and check them on each request to see if it's regeneration time.Of course, this approach means that if the user doesn't make any HTTP requests between the regeneration point and the expiration point, the session will "naturally" expire, and they'll have to login again. If your natural session timeout is something significantly longer than the frequency users use the application (like, if you have an app people are likely to use almost every day, and set the timeout to 2 weeks), chances of users' sessions naturally expiring become minimal.
  6. boen_robot

    Pc cleaner?

    That's exactly the kind of reinstall I'm talking about, and it's after that when the problems start. The more "deeply integrated" a program claims to be, the more likely you're to have problems with it at that point. My point exactly. We're talking about recommending such programs to users with Eduard's skill level or lower. 'nough said. Yeah, and the scariest part is when they do something without knowing how they did it, and I have no idea how to undo it either. Said anomalies were so peculiar I can't even recall one, because it's not as simple as saying "X doesn't work", but more like "X works with A, fails with B(, but it once worked with B(, and B is a must, because Y only generates/accepts/supports B now(, although Y used to support A as well)))".
  7. I don't know the specifics of eiter TEI or EPUB... but if your destination language is HTML, you need to specify the CSS for it just as you do in normal HTML - in the head, with a "link" element. You can then point to a custom CSS that does whatever it is you want.
  8. They don't have to be in the same folder, but they must be in the same domain.This isn't an XSLT restriction - it's a browser restriction, designed to mitigate XSS attacks.
  9. boen_robot


    You could also submit the whole word, plus a number indicating the letter to be replaced.Strings can be accessed as arrays, so you could just have something like <?php$replacementString = 'table';$word = isset($_GET['word']) ? $_GET['word'] : 'house';//Do the replacement, if we canif (isset($_GET['pos']) && isset($word[(int) $_GET['pos']]) && isset($replacementString[(int) $_GET['pos']])) { $word[(int) $_GET['pos']] = $replacementString[(int) $_GET['pos']];}//Print the word and the linksfor ($i=0, $l=strlen($word); $i<$l; ++$i) { echo '<a href="?word=', htmlspecialchars(rawurlencode($word)), '&pos=', $i, '">', htmlspecialchars($word[$i]), '</a>';}
  10. The "select" in apply-templates is relative to whatever node the template matched.The root node (the one matched by "/") is like an invisible node surrounding the whole document. The only element directly accessible from it is SVG's root element - the "svg:svg" element. Therefore, <xsl:apply-templates select="svg:rect"/> wouldn't match anything, since the rect is within the "svg:svg" element.When at the root node, you may as well shorten .//svg:rect to just //svg:rect since the result would be the same, but if you were applying the template on an element, the first form would only select all rect elements within that element, whereas the second would always select all rect elements across the whole document.
  11. SVG is in a namespace. You must specify that namespace URI in the XSLT document. The prefix is irrelevant, as long as the URIs match.In other words, another way to get what you want is: <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxsl="urn:schemas-microsoft-com:xslt" xmlns:svg="http://www.w3.org/2000/svg" exclude-result-prefixes="msxsl svg">... <xsl:apply-templates select=".//svg:rect"/> ... <xsl:template match="svg:rect">
  12. boen_robot

    Pc cleaner?

    No. I'd suggest you deinstall Avast and NOT install CCleaner.Wait... did you already install CCleaner and use it? Avast and Windows are still working? Good. Before deinstalling CCleaner, you may want to verify its logs, and restore any non-temporary files that it has decided to delete (assuming there are any). After that, you can deinstall both it and Avast.Of course, leaving your PC without an Anti-Virus is not a good idea, so you'd probably want to get another one. I haven't had any problems with Microsoft Security Essentials, but Avira AntiVir is well too, if you carefully judge what to do based on the "risk" it says (i.e. it occasionally gives false positives, but when it does, the rating is always something lower than "high", though some "low"s are real, so you need to think how much you trust the publisher of whatever it is you're about to run).I haven't studied the impacts of registry manipulations on either of those AntiVirus programs, nor have I yet had a client's PC where they were affected by registry cleans, but I wouldn't be surprised if they're vulnerable in a way I haven't noticed yet for one reason or another.
  13. boen_robot

    Pc cleaner?

    When you're at your current Windows installation, there's no problem in doing a split like that.If you reinstall Windows however, you'll lose your old registry. Many programs rely on it to keep various information, from file associations, right click menus, to license keys and default settings.Programs that don't use the registry, or let you recreate their former setup by some means are not affected, and as such may be installed on a non-system partition. Such include Apache and PHP for example. PHP doesn't use the registry at all, and Apache only uses it for its service, which you can always reinstall by starting "httpd -k install" (or something similar... I don't remember).The average user doesn't have the patience to verify whether an application uses the registry or not, so the rule of thumb is to keep all programs with the OS partition, so that an OS reinstall would also ensure the re-installation (and re-registration if necessary) of all programs. But do you inspect the stuff that it says it's going to delete/"fix"? Because most people don't, and end up deleting something they didn't know they shouldn't delete.Even assuming that you too don't inspect your list, the fact that you haven't had such problems only shows that the programs you're using were written with enough care (that, or you're simply not using any program/feature that is damaged).At the computer shop I work, I've had too many instances of problems that were implicitly, or directly caused by a registry cleaner. Anti-Virus and Firewall software are particularly vulnerable to such alterations, as they keep things very tight, without any checks, for the sake of performance.Cases that come to mind:- Often times after a registry clean, Avast Anti-virus leaves the OS hanging right after login, before the display of the desktop, rendering the Windows useless. Sometimes this can be fixed by simply entering Safe Mode and uninstalling avast, but with some combinations between avast versions and registry cleaners, uninstalling Avast becomes impossible, because they've affected the uninstaller as well.- Older versions of NIS (I haven't tried it with more recent ones), after a registry clean (with any registry cleaner at the time, though admittedly, that was before CCleaner) would display nothing as all of its text, including an empty error message that's probably about NIS being unable to find its language file (or probably some ID from which the language is found... I don't know how they've designed it).- I had one case where the user was unable to enter the menu with which he could edit his IP address. The account was administrative, and everything else (e.g. software installations) worked.- Sometimes, the opened Windows at the task bar would disappear. You could still switch between windows with Alt+Tab or the task manager, but wouldn't see them below. Since they're not considered a toolbar, they couldn't be restored from any GUI (and I had no idea where the registry setting is, so like most of these situations, this was fixed with a reinstall).
  14. boen_robot

    Mysql Space ?

    They ALL have that option.
  15. boen_robot


    It really depends on what the cookie is about.A session cookie should ideally expire with the session.A cookie that remembers some sort of preference not associated with a particular user (theme, language, some sort of filtering, etc.) may as well live for weeks and months, assuming you always let the user override it.A cookie that keeps a record of something that is applicable only within a certain time interval (e.g. IDs of "new" records; although for that particular scenario, you're probably better off doing this check at the server, and act accordingly) should expire after that interval is over (e.g. if you define "new" as being "from today", make the cookie expire in 24 hours).
  16. boen_robot

    Pc cleaner?

    Splitting your HDD in two is a good practice, as long as you make sure to always install applications at C: (or whatever the system partition letter is) and keep all data at D: (or whatever the non-system partition letter is). Doing otherwise is a recipe for disaster.Defragmentation improves HDD performance a bit at the price of wearing your HDD a bit. If you do it once per month or so, you might feel performance improvement and not prematurely wear out your HDD. If you do it too often (like once per day or so), there's a good chance that after a year or two, you'll wear out your HDD, and the performance gain you'd have wouldn't really be noticeable throughout the year.
  17. boen_robot

    Pc cleaner?

    Windows' built in cleaner, the one at "Programs > Accessories > System Tools > Clean Hard Disk".It looks only into places which are explicitly labelled as being "temporary". Applications are expected (and typically do) use these files only as helpers, so deleting them is not a problem - programs that rely on those files should be able to recreate them when they need them again.Also, from "Control Panel > Add/Remove programs", you should delete any programs you know you don't need. If there are remains in "C:\Program Files" from them, you should probably be able to delete those too, but make sure to only do that after you uninstall the application from the control panel. Programs often leave behind some files in case they're reinstalled, in which case they restore themselves to their former glory.And it should go without saying - avoid installing software you know you don't need. Read carefully the checkboxes that appear on programs you do use. Many include extra software you may not otherwise want.
  18. ... and to answer 1, the PHP manual itself. If you compare it the MySQL functions with their MySQLi equivalents, you'll see the stuff that exists in both is also called the same, expect the "mysql_" being replaced with "mysqli_".The only reason that sometimes it's not as simple as doing just that replacement is that some MySQLi functions have changed the order of arguments. A notable example is exactly mysqli_real_escape_string(), which if used in procedural style requires the connection as a first argument. mysql_real_escape_string() accepted the connection as an optional second argument instead.
  19. boen_robot

    Pc cleaner?

    There isn't a good one.They all work through heuristics (which is the technical term for "educated guesses"), as it's impossible to detect for certain if something is used or not (if it was, the OS would do it automatically).Every time you run a cleaner, you're running the risk of damaging your Windows installation. This goes double for "registry cleaner" programs (CCleaner has registry cleaning capabilities, although you could not use them). While most developers are cautious with files, the OS registry is often though of as "safe heaven", and thus, most of the time, any unexpected alterations to it can result in subtle, or not so subtle anomalies.
  20. By removing/disabling all mods, and reinstalling them one by one, until the problem appears again. Only then you can identify the mod, so that you can then begin to debug it (or find another one that doesn't have this bug).
  21. The only exception to the above is when you're making an application that is going to be used by clients that you know about. Clients which you can afford to ask to import your root certificate, so that they don't get the warning.Some banks do this to reduce their costs, and just give their customers the root certificate (along with their individual digital signature, but that's a different story) on a flash drive when they explicitly enable "online banking".So the real question to ask yourself is "Is the hassle of importing a root certificate worth it, from my users' point of view?".
  22. They all have equivalents, yes, though they're not all "duplicated", i.e. it's not always as simple as replacing "mysql_" with "mysqli_".
  23. boen_robot

    session path

    Yes, except that the only information the cookie has about the session is the session's ID - nothing more, and nothing less.
  24. :lol:Well, I've actually managed to hit the "retarted" buttons on Git as well... the only difference is that with it, you can delete the whole repository, and checkout a different copy of it that you then retry the whole thing with (decentralization FTW!).
  • Create New...