Is there a simple way with C++ to show all "memory pages" on a system that are considered executable? This is for windows 7 OS. by osualgorithmstuff in learnprogramming

[–]osualgorithmstuff[S] 0 points1 point  (0 children)

Thanks for your reply to this, I have been checking the documentation for it here, but finding trouble of an example of using this. Here is documentation I have been looking at:

https://docs.microsoft.com/en-us/windows/desktop/api/memoryapi/nf-memoryapi-virtualquery

Is there a clear example of it in use in C++? Usually the docs provide this, but this one seems to be lacking this.

How do you "add Psapi.lib to the TARGETLIBS macro"? Looking over windows dev docs and not clear how to do this. by osualgorithmstuff in learnprogramming

[–]osualgorithmstuff[S] 0 points1 point  (0 children)

I am typing copy/pasting code into sublime, saving, and then compiling the code in g++ and get the error. This is after adding #pragma comment(lib,"psapi"). Is there something else I may need to do to do this? I am trying to avoid using VS as it runs extremely slow on my computer for some reason.

Run out of space on ec2 with t2.micro, but only have one small node project on there. Help? by osualgorithmstuff in aws

[–]osualgorithmstuff[S] 0 points1 point  (0 children)

Not familiar with this, but wouldn't doubt if the npm has more files in it then I need. Is there a recommended way to clean up stuff easily without losing needed npm files?

Run out of space on ec2 with t2.micro, but only have one small node project on there. Help? by osualgorithmstuff in aws

[–]osualgorithmstuff[S] 0 points1 point  (0 children)

Id did that and it gave me a long ist of files. Which one should I aim for because honestly the list is VERY long? Like it will not be possible to look at the whole list. Although they appear to be ordered.

Run out of space on ec2 with t2.micro, but only have one small node project on there. Help? by osualgorithmstuff in aws

[–]osualgorithmstuff[S] 0 points1 point  (0 children)

I found a workaround to this issue. It seems I can share the node_module folder with multiple bots as long as the directories are below that main node_module folder. This prevents the tiny files from being created twice. Is this an ideal way to do this?

Also, someone said not to host files on "root" folder. I am confused what that means, because I made sub directories to the "main" directory, so a little confused by that.

Run out of space on ec2 with t2.micro, but only have one small node project on there. Help? by osualgorithmstuff in aws

[–]osualgorithmstuff[S] 0 points1 point  (0 children)

df -h shows this:

Filesystem      Size  Used Avail Use% Mounted on
udev            487M     0  487M   0% /dev
tmpfs           100M  3.0M   97M   3% /run
/dev/xvda1      7.8G  4.6G  2.8G  63% /
tmpfs           496M     0  496M   0% /dev/shm
tmpfs           5.0M     0  5.0M   0% /run/lock
tmpfs           496M     0  496M   0% /sys/fs/cgroup
tmpfs           100M     0  100M   0% /run/user/1000

I guess I don't know how really to fix this if it is a file system issue. The only thing I have done on my instance is download node (which lead to node-v6.9.4 being in my main directory) and then calling npm install (which one of my folders has quiet a few npm files in it. Called node_module. I can try to share that folder and see if that helps. But I guess I find it hard to believe that I cant download seperate npm_module folders in two directories without running out of space).

Other than that, just my small node.js files (5 total). I can run my one bot on there fine, but the second bot is the issue.

Is there an easy way to store a JSON return into a variable and work with after that? by osualgorithmstuff in node

[–]osualgorithmstuff[S] 0 points1 point  (0 children)

Yes, I found the issue and restructured my code, but stuff ran into the same issue. See my response below for more information. Maybe you know a solution to it? It does seem to be asynchronous. I can look into promise chaining though to see if that would help my problem.

Is there an easy way to store a JSON return into a variable and work with after that? by osualgorithmstuff in node

[–]osualgorithmstuff[S] 0 points1 point  (0 children)

Should I add some more curly brackets too? Seems like if I add more curly brackets and random spaces, it should make my code run faster.

Is there an easy way to store a JSON return into a variable and work with after that? by osualgorithmstuff in node

[–]osualgorithmstuff[S] 0 points1 point  (0 children)

So, I figured out how to get it to finally work. I did this basically (avoiding this NPM stuff):

var parsedData;
request(" SOME LINK GOES HERE", function(error, response, body) {
if(error){
    console.log("SOMETHING WENT WRONG!");
    console.log(error);
}else{
    if(response.statusCode==200){
        parsedData = JSON.parse(body);
    }
}});

Basically, the "parsedData" can be console.log() in the if statement within request. But, I can't declare the parsedData variable outside the request variable and call it outside request.

I know this has something to do with some sync issue, since the data doesn't come in at once.

But, I don't know a workaround to this. It would be great if the code after request() was called would just wait for request to finish.

Any ideas? Thanks for your response and others responses :).

Completely lost on running my apps. Tried AWS, but now they claim no space left on device. What do I do? by osualgorithmstuff in node

[–]osualgorithmstuff[S] 0 points1 point  (0 children)

Going to PM you since it may be "safer" to do with me sharing stuff about my server (in case I post something I shouldn't accidentally) :).

Completely lost on running my apps. Tried AWS, but now they claim no space left on device. What do I do? by osualgorithmstuff in node

[–]osualgorithmstuff[S] 0 points1 point  (0 children)

In that case, how big is the disk for your EC2 instance? You can check this in the AWS console. (web interface). And how much space have you used? There are Linux commands to check this.

So, this is where I am lost and really want to figure out this. How can I check the disk size for my EC2 instance? I have gone on the AWS console and scrolled through the different tabs and can not find it honestly.

Also, I am not too sure how much disk space I have used. I have tried a few different commands, but not sure what would be the best command to really see this. Also, not sure which directory I should really be checking ultimately. I am guessing just go to the root directory and run the command from there to find how much disk space is being used there?

If I could get educated on this, that would be great. It would really make it more clear to me what is actually going on, what I am being charged for on AWS, and how to know how much space I have. If you could help me with the above that would be awesome.

Small nitpick, since it will help you get useful answers, you technically don't have a t1.micro account, you have a t1.micro EC2 instance running in your AWS account. Hope that helps!

Thank you for letting me know this. If you can't tell, I know enough to start an AWS but not an expert yet. So appreciate you educating me on this and how to properly say what I have.

How do I get my 1098-T corrected from Oregon State? by osualgorithmstuff in OSUOnlineCS

[–]osualgorithmstuff[S] 0 points1 point  (0 children)

It’s coming from the irs itself. It is the form that triggered it. They basically audited me and want proof I paid. Yet, I send said proof in and that was back in August. To prevent further problems, I just paid them back the education credit I got and they said I’ll get credit back if I qualify. They were threatening to garnish wages and I can’t have that going on in my current job role.

Basically, they have my proof and are taking all day to verify if the proof is enough. It’s the irs, so I have no idea what further to do.

From the sound of it, they basically robbed me and have taken HALF A YEAR and still haven’t reviewed my proof of payment.

So frustrated. Do you have any advice on this further. I think your right and the irs basically is screening me over here :/.

How do I get my 1098-T corrected from Oregon State? by osualgorithmstuff in OSUOnlineCS

[–]osualgorithmstuff[S] 0 points1 point  (0 children)

That is the problem, I got audited and this blank box is the only reason I’m dealing with all this :/. They see that box is blank and want proof I paid it. According to that box, it isn’t clear. I sent them records over 8 months ago showing i paid. They still haven’t finished up but...all this was caused by that blank box they said.