Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Sauron

Member
  • Content Count

    26,257
  • Joined

  • Last visited

Awards

About Sauron

  • Title
    Lord Of The Rigs

Profile Information

  • Location
    Mordor
  • Gender
    Male
  • Interests
    Rings. And elaborate, painful ways to kill hobbits.
  • Biography
    Read The Silmarillion (why haven't you read it yet????)
  • Occupation
    Lord of Barad-dûr, Gorvernor of Mordor until Morgoth returns

System

  • CPU
    Intel Core i7 2600 @ 4.2GHz
  • Motherboard
    Asus P8P67-M
  • RAM
    4x4gb DDR3 1600Mhz slim Kingston ram
  • GPU
    Sapphire R9 Fury
  • Case
    Corsair Obsidian 800D
  • Storage
    Samsung 850 EVO 500GiB for OS + WD black 1tb 7200rpm + random seagate 1tb 7200rpm
  • PSU
    EVGA Supernova G2 850 Watt
  • Display(s)
    Asus PB287Q + Philips 23IE + LaCie 324 (frankenstein surround)
  • Cooling
    Corsair H100
  • Keyboard
    CMstorm quickfire XT - MX brown switches
  • Mouse
    Logitech G400s
  • Sound
    Asus ROG Orion headset + cheap trust stereo speakers (hey, they work fine!)
  • Operating System
    Arch Linux, MSX Pro

Recent Profile Visitors

36,533 profile views
  1. You made a mistake here, you forgot the brackets. This way the two loops just cycle and increment x and y until they are equal to the length element, which is out of bound for indexing, and THEN you set m3[x][y] (which now means m3[2][3]) to 0. Remember, the loop breaks when the check is no longer true. Instead you want to nest that command inside the loops using brackets: for(x = 0; x < row1 ; x++){ //columns that is why y goes until 3 for(y = 0; y < column2; y++){ m3[x][y] = 0; } }
  2. surprise surprise, the new iphone looks nothing like the leaked renders and just looks like the usual iterative design update. this happens every time and yet people still treat unrealistic renders as news.

    1. Murasaki

      Murasaki

      It looked pretty cool... oh well..too bad!

    2. James Evens

      James Evens

      You can't imagine how surprised I was when a prototype PS5 showed up matching the early renders.

  3. Having a console with its own storage is kind of cheating in this sense and I do know quite a few people who play on PC despite not being huge tech enthusiasts. Streaming video may be more common, personally I'm not really willing to give up the far better quality you get from bluray for a lot of movies.
  4. Movies and games take up plenty of space - those aren't particularly exotic things to have on your computer. Sure, if you only store a bunch of pictures and office documents 1TB is plenty... but that's not me.
  5. oh, just remove the "\n" here, I shouldn't have added it because it's already in the line new_config += line #+ "\n" Try using netifaces pip install netifaces import netifaces as ni local_ip = ni.ifaddresses('eth0')[ni.AF_INET][0]['addr'] #... rest of the code as before https://stackoverflow.com/a/24196955
  6. Wouldn't it be better to assign a static IP address to your machine? If you really want to do it this way... import socket local_ip = socket.gethostbyname(socket.getfqdn()) new_config = "" with open("/etc/pihole/setupVars.config", "r") as config: for line in config: if line[:12] == "IPV4_ADDRESS": #find correct line new_config += "IPV4_ADDRESS=" + local_ip + "/24\n" #replace ip address with the correct value else: new_config += line + "\n" #all other lines are kept as they are with open("/etc/pihole/setupVars.config", "w") as config: config.write(new_
  7. The extension doesn't tell me much, I'd need to see how the information is listed inside the file. Can you paste the content here (or at least the first few lines)?
  8. Please never, ever do this. Your program should not rely on system tools like "sudo" that may or may not be available, not to mention this will just prompt the user for their password for no reason. Use a native python module like socket: import socket local_ip = socket.gethostbyname(socket.getfqdn()) https://stackoverflow.com/a/166520 Depends on the format of this configuration file.
  9. since your return statements are inside conditional statements, the compiler can't tell if the function always returns a boolean (which it must, since it's declared as a boolean function). Also that function will never work as you expect it to. It can only return true. Think about what you're writing.
  10. This person and I have a different idea of what a "tough" problem is not to mention common coding interview questions are likely something the AI was repeatedly exposed to in training. This also raises the question: how do you explain to the AI what you want the code to do? It's easy enough when it's a character substitution (though using something like python it might be faster to just write the one-liner that does that rather than try to explain the problem to this AI) but what about complex or novel problems that you don't quite know how to solve yet? Actually writing the code
  11. Nice, I fully support firefox becoming a virus if that's what it takes
  12. Depends on your local laws, usually being too specific isn't grounds for rejection but obviously if it's extremely specific then people could just change a small detail and ignore the patent.
  13. No. You can just pick any of the well known ones and you'll be fine. It's only an issue if you choose to make it one.
  14. Depends on what the "idea" is... you can try to get a patent if it's not something too vague. Other than that you can choose a restrictive license for your code but that will obviously have an impact on people's willingness to participate - if they are willing and able to make it then why would they make it for you?
×