Jump to content


  • Content Count

  • Joined

  • Last visited

  • Days Won


Everything posted by justsomeguy

  1. Look: $('body, html').animate({scrollTop: $('#your_tutor').offset().top},800); You are targeting 2 elements. The body element, and the html element. You are telling it to animate scroll both of them at the same time. I have no idea what the browser is going to do when jQuery tries to animate the window scrolling of 2 elements. That's what I'm talking about.
  2. There's probably a way to use CSS only to do a transition, but no, I wasn't suggesting not using Javascript. No. Maybe it reacts differently to trying to animate scroll two elements at the same time. I know. I see the fact that it doesn't do it if you wait as a symptom or clue to what the problem is, and my guess, again, is trying to scroll two elements at the same time.
  3. It seems like the animation doesn't finish for a while, maybe because you're trying to simultaneously scroll 2 elements. If you wait before scrolling it's fine. Are you unable to link directly to specific parts of your site because you're loading everything with Javascript?
  4. You have CSS targeting only the checked button. That's how radio buttons work, you can only select one of them.
  5. Get rid of the invalid JSON text, that shouldn't be there.
  6. You can save whatever you want in a database if the person is logged in to your site. I'm not sure exactly what you're trying to do though.
  7. If I use wget with that it gives me a 403 response, you want people to help you get around Apple's authentication? If you want to distribute Apple's software, then contact Apple and tell them you want to distribute their software.
  8. justsomeguy

    PHP question

    No, that's not what it means. It means that the variable persists its value even across different function executions. It means that each time that function runs, the variable has the value from the last time it ran. If you don't want a value to ever change then use a constant.
  9. I'm using source code as it's normally used by programmers. You write Javascript source code, and then use NPM to build the final package, just like you would use a compiler to compile C code into an executable. Here's the source for one of my components that's using react: import React from 'react' import StudentLayout from 'components/StudentLayout' export default class MainAppLayout extends React.Component { constructor(props) { super() this.state = { LMSuser: props.LMSuser } } render() { return ( (
  10. If it shows private members then I don't think there would be a way to hide those.
  11. It's just the same with localhost as a remote server, the only difference is the host when you tell mysql where to connect.
  12. Yes, you build the project from your source code and the build process produces a single file, usually, for your application that includes everything it needs plus its own code.
  13. justsomeguy


    I don't have an example of running a SQLite pragma, but if you do some research I'm sure you'll find examples. It should return a result set of columns that you can use to determine if the column you want is already part of the table.
  14. justsomeguy


    Just like I said. Get the list of columns and figure out if it's already there or not, and add it if it's not.
  15. justsomeguy


    SQLIte does not have if statements. It also does not have an information_schema database. It seems like you found something that works in MySQL and you're assuming that it's also going to work in any other database, and that's not true. It looks like you need to use the table_info pragma to get information about a table, which will return one record per column in the table. Look through those results to see if the column exists and then alter the table if not. https://www.sqlite.org/pragma.html#pragma_table_info
  16. When you build a project you tell it which modules to use, and it builds everything together. That's one of the things that Node Package Manager does.
  17. I'm not familiar with that, I feel like I used something similar to that at one point but that project is only 2 years old so it wouldn't have been that.
  18. In Javascript, all strings are internally treated as UTF-16 strings: http://ecma-international.org/ecma-262/5.1/#sec-8.4 http://speakingjs.com/es5/ch24.html
  19. You can get the length of a string, although you haven't said which database you're using so we don't know what's available to you. Regardless, it looks like you have a field where you're storing multiple pieces of data, and you're figuring out the reason why it's not a good idea to do that. If the different parts of that string are each significant then they should be in their own fields.
  20. I'm not sure why you're trying to filter out all apostrophes at all, because your problem is not apostrophes, but an obvious pattern would be an apostrophe that does not follow a letter.
  21. I doubt that someone is typing "&quot" into a search field somewhere, so that data is getting messed up somewhere along the way. Ideally you would find where and fix it there so that the data can be normalized to start with. Terms shouldn't be repeated just because they have extra punctuation. Otherwise, before the data gets added to the database try to clean it up by looking for those specific terms and removing them.
  22. How come, what's the difficulty? Is the problem that the escape sequences seem to be missing the terminating semicolon? Can you figure out why that is? If you're only seeing specific sequences then you could just look for those specifically and remove them.
  23. I'm not sure what your specific problem is. I would not store any version of a password in a cookie though, even if it's hashed. Just store a user ID and a token. Generate a new token for every request, so that each token is only used once. When you check the cookies to validate the user, compare the cookie token with the token in the database for that user, and if it's correct generate a new cookie, save it in the database, and update the cookie. Use single-use tokens instead of saving personal details in the cookie.
  24. It might not be possible to support very old browsers, it depends what they allow. I know that some sites used to use a Flash movie to do copying. Old IE that supports ActiveX may be able to use an ActiveX control to support copying. At some point you need to just draw the line though. My company doesn't even fix bugs on unsupported IE browsers for free any more, if a customer finds a bug that is only in an unsupported version of IE we bill them for the bug fix if they want us to do it. It was a good day when we could make that decision. We'll fix any bugs that show up in a current brows
  25. You could use a regex, you could also use str_replace to just replace specific characters. It depends if you want to save the original data or not. If you don't care about the data before it gets cleaned, then clean it before you save it.
  • Create New...