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


  • Content Count

  • Joined

  • Last visited


This user doesn't have any awards

About espurritado

  • Title
  • Birthday 1994-06-09

Profile Information

  • Gender
  • Location
  • Interests
    computers in general, software in particular. TV series, some fantasy books, science fiction movies.
  • Occupation
    Software Engineer / Validation Engineer


  • CPU
    Ryzen 7 2700X
  • Motherboard
    MSI B450
  • RAM
    Corsair Vengeance LPX DDR4 3000 16GB 2x8GB
  • GPU
    MSI GeForce RTX 2070
  • Case
    NOX Hummer ZN
  • Storage
    512GB NVMe M.2 PCI Express 3.0
  • PSU
    Corsair RM750X V2
  • Display(s)
    21.5" LED x 2
  • Keyboard
    Asus cerberus reds
  • Mouse
    Razer deathadder elite
  • Operating System
    Windows 10

Recent Profile Visitors

911 profile views
  1. I'm not sure I understand exactly the problem you are having. If your problem is that there might come more than one type of exception from within a try statement, just add several catch clauses try{ <whatever comes in> } catch (ExceptionTypeOne e){ <handle exception> } catch (ExceptionTypeTwo e){ <handle exception> } If your problem is that you want to differenciate according to the content of the exception, you should look into the 'e' object so you can try and find whatever you are looking for
  2. scrapy will most likely be the solution you need.
  3. python has datetime. wit it you can create an object representing a time, a date or a date and time. you can make it so it parses an input string in whichever format you want to give it to it
  4. you could consider connecting to the remote pc via ssh using paramiko
  5. you could go with Sikuli It's basically a tool to script movements and actions on the computer. It also recognizes images so instead of using coordinates like you would have to do in AHK you can just use an image of what you want to act on. The code you would have to write is basically a python code with a nice IDE so you can see what you are clicking on instead of just adding file images. also, I'm just going to get you out of your error here: Part of your learning process has to be to look at a piece of code and think "How can this be applied to what I want to do", more often than not, you will find that something completely unrelated can help you solve part of a problem and you will learn a lot that way. Also if you want to get into coding don't go and look online for a piece of code that will solve your problem (which I know you didn't do) but don't refuse a tool when you have the opportunity. If no one used any tool developed by others we would never have gotten even to punch cards.
  6. oh crap, I'm really sorry, I've been reading the slides from that class and the exercise I had to do and I'm not completely sure I even understand them, let alone explain it to someone else. Good luck with it
  7. I took a class in which the professor gave about a week (two lessons) about CORBA. In his words "This thing is ancient and I would be surprised if even one of you ever used it". Imagine my surprise when I heard the other day a coworker asking about how to do something with CORBA. I don't really remember much but post the assignment and what you already got and I might be able to somewhat guide you in the right direction, I'm pretty sure I still have the class slides around somewhere.
  8. if you want to do something with the image, you might want to actually open it as an image instead of as text. Talking from experience, you are more than likely to have a corrupt image as a result since most image formats have redundancies and checks to make sure it's ok. If you are still set on reading as a text file, there's a way to read the file as a stream of bytes, so you wont have the problem you are currently having (which is the charset)
  9. I'm a bit rusty in haskell, but as I see it you would need the first two elements as variables not just the first. from your code would be something like this func (x:xs) | x>0 = x-1 | x>0 head(xs)=head(xs)+length(xs) | (x:func xs) As I said, it's been a while so I don't remember if this is the way to do it or if the parenthesis are necessary. As I'm writing this, it occurs to me that you would need to create the case that there are not enough elements in xs
  10. I think the best thing you can do is go for the python API https://docs.python.org/3.6/c-api/ And do a favor to the world and use the latest version, no one is doing any good keeping python 2 going when there's python 3
  11. you've got no listener, you throw the event but there's no one to take care of it. The fast way to do this is to add this code to main: KeyListener keyListener=new KeyListener(){ @Override public void keyTyped(KeyEvent ke) { } @Override public void keyPressed(KeyEvent ke) { } @Override public void keyReleased(KeyEvent ke) { } }; frame.add(keyListener) and get rid of the key events you've got below. This I can't remember for sure, but you might need to add the keyListener to the game object instead of the frame. Try one of them and if it does not work try the other one
  12. alright, let's do it so it's quite simple to reason from the basics: I assume this images would change every time you open the page so the function you want to use must be defined as the onload attribute of the html body <body onload="myOnLoadFunction()"> now, on the html create 9 img tags with the id attribute image1 through image9 and place them on a 3x3 grid Let's go to the javascript part: You need to store the name of every image so you are able to reference it. The easiest way is to name them img0 through imgN with N being the number for the last image and just make a loop assigning the names var i=0 for(i=0;i<numImages;i++){ listImages.push("img"+i); } now you want a function to generate 9 random numbers without repetition. There was a thread in the forum about it a few days ago. Check it out here. Finally you want to set those images in the img tags you defined earlier. To change the image in a img tag you need to do document.getElementById("img tag id").setAttribute("src","new image name"); This should be everything you need to reason the logic into your program
  13. I took a class that taught it. It was quite interesting the way you set up the parameters and the results of the function. I really liked the way it makes you think about recursive functions. However, I must say, since I took the class I haven't really used the language for anything. I would recommend to study it since it actually helps with understanding concepts and algorithms
  14. your problem is with the charset, try making it open with a different charset until you find the one that matches.
  15. it's been a while since I've done anything with an arduino, but let's try this: create a global variable on which you keep track of the state of the button (other than reading the value of the button) create a global variable on which you keep track of the operation you have to perform (extend or retract) at the beginning of the loop, store in a variable the current value of the button if the current value is low update the global variable with the current value go to the next iteration of the loop if the current value is high if the value on the global button value variable is low change the operation you have to do (change extend to retract or retract to extend) update the global button value with the current value of the button perform the operation the global operation variable tells you to do go to the next iteration of the loop this logic should make it work