Jake Martins

Greenhorn
+ Follow
since Feb 16, 2019
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
1
Received in last 30 days
0
Total given
8
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Jake Martins

Dave Tolls wrote:You can't.
Stuff hosted outside of here is quite often not visible to those of us behind corporate firewalls.

It's why we suggest copy pasting.



I understand.

Here's the page source:


It appears that the website is blocked selenium on that specific page, i think its Invisible Captcha..
The previous page had image captcha which i solved with this method:


Is there a way I could change in that method to solve the invisible captcha?

BTW, thank you so much for your replies
3 weeks ago

Dave Tolls wrote:I can't see any of that lot here, I'm afraid.



Why can't you ?

how can i send them to you to view?
3 weeks ago

Dave Tolls wrote:I don't expect you're able to see the request that goes out to get that page?
Are you able to duplicate the issue in the browser directly (preferably with the dev tools open so you can check the network traffic)?



Thank you for the reply,

I just tried to fill the form manually and checked the View Source of the form.. it returned something totally different than the form
Here's the page source produced by the form: https://pastebin.com/Kv15V2SK

Here's a screenshot of the inspect element of the page: http://prntscr.com/qvi6hc

Here's a screenshot of the form:
3 weeks ago

Dave Tolls wrote:What browser are you pretending to be?
Because that page seems to have a browser check.



I'm not pretending to be a browser, as Selenium uses real browsers and controls them. Tried Firefox and Chrome
3 weeks ago
I don't know how I'm going to explain this, but I'll give it my best

I'm trying to fill in multiple forms that come after eachother, all the forms get filled swiftly with no errors because I make sure to add

       

before doing anything on a new page, and I know I'm on the correct page.

On the last form, I encounter this error :



So I went to check on the browser by taking a screenshot and the browser is on the correct page with the correct form, I also checked the xpath values and even tried other attributes.. nothing seemed to work.

So I went ahead and printed out the PageSource which showed a totally different page (not the previous page), I also noticed the this page flashed for a second before the final form appeared..

I also tried but that didn't work.. I kept searching and looking but nothing appeared. I also changed browsers, that did nothing..

This is the method im trying to execute:


Edit:

More Information:

Here's the form screenshot: Form Screenshot

Here's the result of executing the following lines:

Code:


Result: The form but in text

Code:



Result: A different page


Code:

Result: Same as the previous one.. different page..

I've been stuck for 10 hours on this, I really need a solution
3 weeks ago
Hello,

I'm trying to solve a picture captcha using the 2Captcha API & Selenium.

2Captcha does its job and generates the responseToken, but when trying to solve the puzzle using the responseToken it doesn't do that and just clicks the "Verify" button..

I've been trying to solve this for 2 days, I'd really appreciate the help as this will raise a lot of pressure from my arm!

My code currently:


Thanks
3 weeks ago

Paul Clapham wrote:

Jake Martins wrote:I did not mean any insult or injury, Im sorry if my cold response did that.



No, no, it's fine, I didn't notice anything adverse.

If by anychance you could advise me to a solution or a show me the way, I would really appreciate that!  I'm having the worst headache because of this code, but its part of the learning process :/

thanks a bunch for your analysis!



So you're starting with a CSV file. It looks to me like each line in the file is a model? And an Entity is supposed to contain a single model? If that's the case then your ModelReader class needs to produce a list of Entity objects, one for each model.

And if that's the case then ModelReader doesn't need lists of x, y, and z (it shouldn't have them anyway but that's another story) and it doesn't need that map for model files. Here's my rough sketch of what it should do for each line in the CSV file:

1. Read and interpret the data from one line of the CSV (that's lines 98 to 107).

2. Build an Entity from that data (that's lines 121 to 124, modified to use the data directly).

3. Add that to the ModelReader's list of Entity objects.

On the other hand if I have misunderstood the architecture of models and entities, then that isn't the way to do it.



Thank you so much! I did that and it worked! Thank you thank you thank you!!!
1 year ago

I store the last one in the entity

I made a variable named entity and I made a getter and add the entity to my Entity arraylist that is found in my ExecuteMain.java class
   
In ModelReader.java          


In ExecuteMain.java:



so this one, i think is not a problem

but how can I read all the rows and colomns and run them to get every model I have in the csv file to be added into the entities arraylist and rendered?

thanks!
1 year ago

Paul Clapham wrote:

Jake Martins wrote:from lines 98 to 111 : here Im getting whats in the csv file then adding "what I need from them" to arrays OR hashmaps, then using these array & hashmap(s) in the a loop with the model code



No; from lines 98 to 111 you get one line of the CSV file and add one entry to a HashMap.

And then from lines 115 to 129 you iterate through the HashMap entries you have so far (not necessarily all of them which you will eventually create) -- and not only that, you do that iteration once for the first row and eight times for the second row. And not only that, but the end result of each of those iterations is an Entity object -- however you only store the last of those nine Entity objects in the variable named Entity. All of the earlier ones are overwritten.

As it happens, this is exactly the same result you'd get by only using the last line of the CSV file.



I did not mean any insult or injury, Im sorry if my cold response did that.

If by anychance you could advise me to a solution or a show me the way, I would really appreciate that!  I'm having the worst headache because of this code, but its part of the learning process :/

thanks a bunch for your analysis!
1 year ago

Carey Brown wrote:posx, y, and z, don't appear to be used anywhere. Why are they Lists?



oh sorry, I was testing something earlier, these aren't in use currently
1 year ago

Carey Brown wrote:I would suggest that you temporarily put the CSV stuff aside and hard code data for a single entity and see if you can get that to display.



I have done that, and I have several trees that were hard coded + a player that was hard coded.
I'm trying to do the csv stuff so I could make a world editor that can save versions of models.csv files
1 year ago

Carey Brown wrote:Is this an Android app?



No, this is a LWJGL 2 (OpenGL) Desktop 3D Game
1 year ago

Paul Clapham wrote:It looks to me like lines 98 to 111 are supposed to process one model, which I assume is one line of the models.csv file.

Then I think you ought to do those lines for all lines in models.csv before carrying on to line 115 and so on, because it looks to me like they are supposed to be applied to all your models. Right now it looks to me like you're doing them for each model. (Correct indentation of your code would help a lot, but there's no } after line 111 so I'm pretty sure of what I'm saying.)

I'm also dubious about your static members; in object-oriented code they are often a way to make something happen with only the last thing processed. But I haven't looked closely enough to know for sure.



Hello,

from lines 98 to 111 : here Im getting whats in the csv file then adding "what I need from them" to arrays OR hashmaps, then using these array & hashmap(s) in the a loop with the model code

1 year ago

Carey Brown wrote:

Jake Martins wrote:Uhm no I dont use the modelnumber to look up.. haven't got to that yet.
I'm gonna try what you wrote and get back to you asap!

Before getting to far along, perhaps you could tell us how these models are supposed to behave in your game. So, we'd need some requirements or use cases in order to keep you steered down the right track.



I'm really sorry, uhm I'm not sure how to explain how they behave but heres a try:

I load the models through Vector3f lwjgl obj loader & textures through Vector2f lwjgl tex loader & I manipulate my entities through the Entity class (I've pasted it down below)

then I load a model with its texture, coordinates, rotation, etc.. using this code: which I have explained within the code:




Entity.java:









1 year ago

Carey Brown wrote:This is a guess because I don't know how you intend on accessing it (e.g. HashMap?).

It looks like you need a "Model" class (or something more appropriately named). For each line of the CSV you create a new Model, fill in the fields, and add it to your Map.


I suggest that you do not use float/double for the key into a map, any floating point round off errors may prevent you from finding what you're looking for. Can you look things up by modelNumber?



Sorry to disturb you again!

I've done a version of what you said but in how my code is arranged and in a weird way you might say..
on System.out.println it shows me that everything is OK


but in the game it only shows the second model..

I've combined all the code into this class .. could you take a look and see if theres anything wrong?

ModelReader.java :


and this is the models.csv:


Thank you!




1 year ago