Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

Search results

  1. Ghost

    HTML Click handler for <embed> element

    What others have said is 100% true. A PDF (or most content in an embed) is going to need click/scroll/hover/etc events. This overrides the default site, because you are EMBEDDING a different "experience" (pdf, etc) into your site. The reason it doesn't work is because it's counterintuitive to...
  2. Ghost

    C++ Understanding the Difference Between C and C++

    I think the others here covered it fairly well, but one thing to call out is that a lot of times there are codebases that have a C and a C++ version but are otherwise near identical w/ usage and syntax. You may find yourself also creating wrappers of your own (hint: extern C) to use things in...
  3. Ghost

    How to deal with feeling of not wanting to learn anything?

    When I feel like this I usually try to come up with a real reason to learn something. For example, one of my first clients needed big data. He wanted web crawlers that could identify business information. We ended up with around 20 million business listings in 1 database. We then had to find a...
  4. Ghost

    found a probable scam site, want to know how it works

    Carrefour is a real company. This site is most likely being sent to people in bulk, so the creator would send to thousands and thousands of people. Out of all those recipients, a good sized group of them will visit the site, and some may think it's the official Carrefour website. Most likely...
  5. Ghost

    Python Feedback on a program I made.

    In the future you can also do things like this: import os path = "folder/path/here" folderexists = os.path.isdir(path) if not folderexists: os.mkdir(path) This checks if the folder exists, and if not will create the folder automatically. You could also add a file: f = open(path +...
  6. Ghost

    Help with Autoscoring Website?

    Well, step 1 should be HTML/CSS to create the initial designs. You can use PHP to hold questions/answers in arrays (or store in a database & retrieve with PHP), making the orders random. This would obviously have a corresponding data entry saved to a file or database so that scantrons can be...
  7. Ghost

    Help with Autoscoring Website?

    I can't answer in full right now, but can you tell us what technologies you would want to use primarily? For example, PHP or Python come to mind for me, with PHP obviously a go-to for websites. Due to the details of your project, I feel obliged to ask you if you'd rather pay to have it created...
  8. Ghost

    Python Python code to read in data file, write it to a file, order columns in ascending order

    It appears that each column value is separated by a tabbed space. I didn't check each one though. If this is the case, you can do a split() to separate by new lines. Then in a loop, use split to separate by tabbed space. If it's the first line, then these split values are the column names and...
  9. Ghost

    Python Confused in name binding in python

    x = 1 # we are binding the variable x to the value of 1 (== 1, === 1) x = 5 # Now x is no longer 1, it is 5 y = 2 # we are binding the variable y to the value of 2 (== 2, === 2) x = y # Now x is no longer 5, it is the value of y (== 2, === 2, == y, ===y) What is happening is this: x = integer...
  10. Ghost

    Python What does this code signifies in relation to boolean logic?

    A boolean is basically true/false. You are evaluating something. You can evaluate a variable, a statement, etc. So when you say my_age >= 100 you are saying "if my age is over or equal to 100 is TRUE" then... else if "my age is less than or equal to 3" is TRUE then... etc. So, the "boolean" is...
  11. Ghost

    Fun activity Say hello... in a coding language!

    yourname = input("What is your name? [ Type in & press ENTER KEY ]\n") if yourname and len(yourname) > 0: print("Hello " + yourname) else: print("Hey you!")
  12. Ghost

    Python How to scrape quicker

    Well, it depends on how you are saving to SQL. It's one thing to dump a lot of data into an SQL file or construct a new one. However, if you are actually inserting rows into a database one at a time (or even in batches) it can take longer than saving to a more local file. The main difference is...
  13. Ghost

    Fun activity Say hello... in a coding language!

    C Fortran PROGRAM HELLO WRITE (*,100) STOP 100 FORMAT (' Hello Malcolm! ' /) END ~ courtesy of: http://helloworldcollection.de/#Fortran The hello world collection is pretty cool. They currently have 603 versions of Hello World, all different programming languages...
  14. Ghost

    Python How to scrape quicker

    I recommend saving to a different format other than SQL to begin with. Saving each result (if it's different) forces you to check SQL and then insert / update SQL. That can add multiple seconds per result. Personally I save my Python scraping results to CSV and then import to SQL later so that...
  15. Ghost

    PHP Can you tell me what this code is missing?

    Agreed, we really need to know more information. There could be lots of things wrong with your code depending on what you are trying to do.
  16. Ghost

    Python How to scrape quicker

    If you have the money to spend then you could try running your script from more premium IPs or set yourself up with a bunch of VPNs. If you require that many proxies and you aren't able to scrape without them and you also don't have the money for option 1 then I would recommend just loading up...
  17. Ghost

    PHP Help with displaying search form when sub-category page appears

    in JavaScript you will want to get the full pathname of the URL: var path = window.location.pathname, pathparts = path.split("/"), id = parthparts[3], subcats = parthsparts[4]; // this will come to /videos/category/id/subcategoriesvalue, so [""...
  18. Ghost

    PHP OOP PHP Classes

    I would set it up like this... 1. System / Database class 2. User class, extends System/Database 3. Employee class, extends User (not needed for smaller project - just put all in User) - for drivers 4. Customer class, extends User (not needed for smaller project - just put all in User) 5...
  19. Ghost

    PHP Help with displaying search form when sub-category page appears

    I played around with it, but it's a little hard to understand where to put any new code because we can't see the full view that would be displayed on this page. If I had to guess it might have something to do with: $pt->show_sub = true; Maybe something in the page like this? if($pt->show_sub...
  20. Ghost

    PHP Can you help me confirm the purpose of this code?

    'W_AMOUNT' => number_format($withdrawal->amount / 2, 2), Pretty sure you can just do the / 2 part after $withdrawal->amount and it's good to go if you want to show half amounts!
Back
Top Bottom