• Breaking News

    Friday, April 5, 2019

    Why is it so hard to stop cheating in online games? Ask Programming

    Why is it so hard to stop cheating in online games? Ask Programming


    Why is it so hard to stop cheating in online games?

    Posted: 05 Apr 2019 03:46 PM PDT

    I'm specifically thinking about PUBG, Battlefield and Apex type games, but also in general. It seems like if you can solve this problem you'd be rich.

    submitted by /u/mamahuhu4u
    [link] [comments]

    Management not allowing development tools, what should I do?

    Posted: 05 Apr 2019 03:46 AM PDT

    I've been working at a huge financial conglomorate for six months. My job is writing new software to assist a data science team. I'm supposed to write this software in Python, however, the problem I have is that I'm not allowed or otherwise unable to have the following software on my work laptop:

    • Python
    • Git/any other version control
    • Code editor

    However, I have managed to produce results. What I've done is I made friends with IT people in another operating company in the group and they set me up with a development environment. My manager hates this because that development environment is technically provided by another operating company and so it's outside of our IT policy. But I don't feel like I have a choice because there is no way to get stuff done on the machine my actual employer has given me. I figure that we're all in the same company so they should chill out and let me keep it, but there's a constant discussion about how it's bad and I should not have it.

    I've tried talking to my manager about it but he is against me being allowed to install any of this stuff on my laptop. Either that or he swears that I must already have something (python) but unfortunately the IT team still hasn't got around to installing it for me, so I don't have it.

    This whole thing is causing me stress and to lose sleep. I'm thinking of changing job. I wanted to ask if anyone has been in this same position, and what they did to resolve it.

    Update: Thanks everyone, you cheered me up. The consensus is that I should quit, so I'm happy to leave this discussion there.

    Update 2: thank you for all the comments. You have motivated me to make a change. I have an interview on Monday!

    submitted by /u/HairyBondoo
    [link] [comments]

    Need help! Will pay for time and services!

    Posted: 05 Apr 2019 10:13 PM PDT

    I need to convert a lua script for a game from one api to another, the newer api is very odd and is giving me a headache thats causing a mental block. So i'm close to giving up but this needs to be done. Someone please help, will pay nicely!

    submitted by /u/okkamiii
    [link] [comments]

    Does anyone else find it difficult to find another job?

    Posted: 05 Apr 2019 06:04 PM PDT

    I was hired at my current company in the Bay Area after interning during college, and I've been here for almost 4 years at this point. I've tried to find another job over the last couple of years, mostly to find a higher salary, since I believe I can get more elsewhere. I don't even remember how many companies I've interviewed at, but they included all the big names, and some smaller ones—I'd say probably a dozen or more in all. Out of all of them, I've only made it to the onsite for 4 companies, and only got an offer from one. The latter company was one of the first I interviewed at during this time, and I ended up not taking the offer for various reasons. But most companies, I don't even manage to make it past the phone screen.

    I know it's hard to judge oneself fairly and objectively, but I'm pretty confident in my technical ability, communication skills, and personability. This is also hard because companies rarely give detailed feedback, but I think I can tell when I don't do that well in a coding challenge, and when I did at least passably, if not well. But even when I think I do well, I don't get an offer. I might do better if I had time to practice coding challenges, but it's hard when I have a kid to take care of.

    And then I read about people that decide to switch jobs and get multiple offers at the same time with seeming ease, and I'm like who are these people? How is it so easy for them?

    I guess I'm just wondering if anyone else finds the interview process in the tech industry in Silicon Valley as difficult as I do. It's hard not to feel bitter, like there's a pervasive attitude that companies only want geniuses, and the cream of the crop. I don't know if there's some truth to that, or if I'm just not as competent as I think I am.

    submitted by /u/racec0nditi0n
    [link] [comments]

    When I return sum, why does it return the value I initially set it to?

    Posted: 05 Apr 2019 09:09 PM PDT

    Full Code but main focus is on function rllsum.

    This is a function I'm working on. I'm trying to find the sum of all the numbers in a linked list, recursively with no looping.

    My output finds the value of b of the node I am on, and attempts to add it to the total sum.

    There should be a 20 on the bottom right instead of a 0(the other 20 is irrelevant).

    2 questions:

    • Why is sum sending the value I initially set it as? I initially set it to 500 at one point and it stilll sends 500.

    • Why is the "else" part of my function blatantly ignoring what ever happens in my "if?" I mean, the last current sum even says 2 and it still returns whatever it was initially set as.

    submitted by /u/TheRogueTemplar
    [link] [comments]

    Necessity for NodeJS server

    Posted: 05 Apr 2019 02:42 PM PDT

    Hello everybody,
    I'm trying to learn NodeJS with a small/medium project: A discord bot. For that I'm using the discord.js library. But I also want to store some persistent data in some database and do some web scraping to get some info for in-game stats for the users.

    My question is if I should create NodeJS server for all the "backend" (communicating with db, web scraping, etc.) and a second one for the bot? And then let them communicate over an API.

    Is this a good plan if I want to learn Node or should I change something in the structure of the project? I'm also thinking about creating a dashboard for the server (displaying statistics, admin commands, settings, ...). As by now I could learn about Node, databases with node, API creation, data management.

    Thanks for your help!

    submitted by /u/D4rkSentinel
    [link] [comments]

    Whats a devious kind of captcha, such as eval("if(Math.random()<.01) while(true); return true;"), or whatever it takes to give Humans majority influence on a server?

    Posted: 05 Apr 2019 05:32 PM PDT

    [C++] Need to prototype a template function

    Posted: 05 Apr 2019 05:04 PM PDT

    the function is

    template <size_t rows, size_t cols> void readCSV(double(&array)[rows][cols], char* filename) { // Code Block } 

    and i need to declare it before hand. Is there a way?

    submitted by /u/imgtht
    [link] [comments]

    Best data structure for dynamic content?

    Posted: 05 Apr 2019 04:33 PM PDT

    help with spigot algorithm in ada

    Posted: 05 Apr 2019 03:04 PM PDT

    so my code is

    with ada.integer_text_io; use ada.integer_text_io; with Ada.Text_IO; use Ada.Text_IO; procedure Spigot is n : constant Integer := 1000; length : constant Integer := 10*n/3+1; x,q,nines,predigit :Integer :=0; a: array (0..length) of Integer; begin nines:=0; predigit:=0; for j in 0..length loop a(j):=2; end loop; for j in 1..n loop q:=0; for i in reverse 1..length loop x:=10*a(i) + q*i; a(i):= x mod (2*i-1); q:= x/(2*i-1); end loop; a(1):= q mod 10; q:=q/10; if q = 9 then nines:=nines+1; elsif q = 10 then put(predigit+1); for k in 0..nines loop put("0"); end loop; predigit:=0; nines:=0; else put(predigit); predigit:=q; if nines/=0 then for k in 0..nines loop put("9"); end loop; nines:=0; end if; end if; end loop; put(predigit); 

    end Spigot;

    it should be outputting the digits of pi, 1 digit at a time but it's messing up and going 0 3 1 4 1 599 and then just messes up from there, and I can't figure out why

    submitted by /u/analthrasher696969
    [link] [comments]

    No admin rights, what is the fastest way to execute a python program?

    Posted: 05 Apr 2019 09:05 AM PDT

    Currently my set up is-

    Autohotkey for the hotkey

    Autohotkey runs cmd, runs anaconda, runs the python environment, changes to the folder my python program is in, then runs.

    Python does python things

    The problem I have with this method, it takes ~3-5 seconds to do the auto-hotkey script, and that is approx how long it takes to do some of these actions without programming. (I use these hotkeys a few times an hour)

    Any suggestions on a more efficient way to run a python script without admin rights?

    submitted by /u/canIbeMichael
    [link] [comments]

    Can someone explain why this gives me an Address boundary error?

    Posted: 05 Apr 2019 02:55 PM PDT

    I am trying to write a function for a program that reads in from an input fscanf but only reads the words and ignores the special characters. I am using this code as a test code because I decided to try to remove the unwanted characters from each string but this gives me an address boundary error. Is there invalid logic in my code? or is there just a better way to do this in general? I've tried fscanf(inputfile, %[a-zA-Z], input[i]) in a loop but that stops reading in after the first non-letter is found, so i changed my idea to this, but I am not sure if it will work right with pointer arrays.

    int main() {

    char **input;

    int i = 0; int j;

    input = (char **)malloc(16*sizeof(char*));

    input[0] = (char *)malloc(16*sizeof(char));

    input[0] = "Mi.ch.!e,.a;:l'";

    for (i = 0; (input[0][i]) != '\0'; ++i)

    {

    while (!((input[0][i] >= 'a' && input[0][i] <= 'z') || (input[0][i] >= 'A' && (input[0][i]) <= 'Z') || (input[0][i]) == '\0'))

    {

    for (j = i; (input[0][j])!='\0'; ++j)

    {

    (input[0][j]) = (input[0][j+1]);

    }

    (input[0][j]) = '\0';

    }

    }

    printf("%s", input[0]);

    return 0;

    submitted by /u/byoung3497
    [link] [comments]

    Python - Error at equals sign for no reason?

    Posted: 05 Apr 2019 02:39 PM PDT

    I'm using eval and pybrain to make neural networks. Here's it stripped down. Using python 3.6

    from pybrain import *

    numnn = 100

    eval("neuralNetwork" + chr(numnn) + " = buildNetwork(2, 3, 1, bias=True)")

    submitted by /u/MatthyPlayz3
    [link] [comments]

    Where do I post to give out or work with someone on an idea?

    Posted: 05 Apr 2019 01:12 PM PDT

    I trying to get data from WEAMS database and use that to make a site that's not a piece of shit to filter and search through Veteran's Administration approved overseas schools. I'm fine with totally giving the project to someone as long as they don't charge for access, or working with someone to develop it. I know up to recursion for Python and a little beyond that in Java.

    submitted by /u/boydo579
    [link] [comments]

    [C#] what are some important string manipulations I should know?

    Posted: 05 Apr 2019 12:16 PM PDT

    Issue with 404 using XAMPP and NetBeans IDE

    Posted: 05 Apr 2019 12:05 PM PDT

    I am working with NetBeans IDE and XAMPP for projects involving PHP for school.

    Everytime I start a new lab, however, I get a problem with the following error.

    "Object not found! The requested URL was not found on this server. If you entered the URL manually please check your spelling and try again." Follower by a "Error 404".

    I checked, and the lab is in the right spot. the URL is correct.

    I have moved the code into a new project, tried changing the names of the variables, restarting, nothing helps.

    We are starting on our final course projects next week, but I can't get this error solved.

    Is this a common error, and how could I possibly fix it?

    Thanks, and sorry if I'm breaking any guidelines

    submitted by /u/LordOmega333
    [link] [comments]

    Noob question on installing and using a package manager

    Posted: 05 Apr 2019 11:49 AM PDT

    Hi everyone. I am trying to download and use pre-commit on my project. I was able to successfully run "pip install pre-commit". Afterwards, when I try to run"pre-commit install", I get the following message:

    "pre-commit installed at .git/hooks/pre-commit" 

    Does anyone know how I might be able to fix this? Thank you!

    ~ Shoot for the Stars ~

    submitted by /u/stupidsoftwareperson
    [link] [comments]

    Easy fix on my algorithm [TIME SENSITIVE]

    Posted: 05 Apr 2019 10:58 AM PDT

    I have to write code that counts the number of swaps (inversions) necessary to get an array to be sorted. There are a lot of restrictions on my assignment so I know this isn't optimal. I needed to do it with a merge sort. Here's the thing, I got it working. I plugged in the initial array values and it worked. But we're supposed to read it from a file, but the file we were given had a bunch of inconsistencies that needed sorted. When i got the file read implemented, suddenly the numbers I was getting were off and i see no reason they should be. I didn't change the algorithm at all, and i checked, the array being read in from the file is identical to the one i plugged in manually. Can someone please look at this and see why its not working?

    The input arrays are {2,4,1,3,5}, {1,2,4,8,9,3,5,6}, and {1,20,6,4,5}. The results are SUPPOSED to be 3, 7, and 5 respectively. I am now getting 3, 10, and 15.

    Here's the code.

    include <iostream>

    include <string>

    include <fstream>

    include <vector>

    include <sstream>

    using namespace std;

    int inversions = 0;

    void merger(int myarray[], int left, int mid, int right);

    void mergealgorithm(int myarray[], int left, int right) {

    if (left < right) { int mid = left + (right - left) / 2; mergealgorithm(myarray, left, mid); mergealgorithm(myarray, mid + 1, right); merger(myarray, left, mid, right); } 

    }

    void merger(int myarray[], int left, int mid, int right) {

    int temp[100]; for (int i = left; i <= right; i++) { temp[i] = myarray[i]; } int i = left; int j = mid + 1; int k = left; while (i <= mid && j <= right) { if (temp[i] < temp[j]) { myarray[k] = temp[i]; i++; } else { myarray[k] = temp[j]; inversions += (j - k); j++; } k++; } while (i <= mid) { myarray[k] = temp[i]; k++; i++; } 

    }

    int main()

    {

    ifstream myfile("input.txt"); string line; if (myfile.is_open()) { getline(myfile, line); int numcases = stoi(line) 

    ; while (getline(myfile, line))

     { int myarray[8]; int arraysize = 0; int i = 0; stringstream stream(line); while (1) { stream >> myarray[i]; if (!stream) break; i++; arraysize++; } int mynum = arraysize - 1; mergealgorithm(myarray, 0, mynum); cout << "The sequence has " << inversions << " inversions." << endl; } } 

    }

    submitted by /u/derek1st
    [link] [comments]

    Is there a modern, (preferably) free equivalent to visual basic?

    Posted: 05 Apr 2019 10:54 AM PDT

    I'm looking to make a fairly simple GUI for a couple windows command-line applications I use regularly. Back in the day I used vbasic for stuff like this, but that's long-since discontinued and probably doesn't even work on win10. Is there something similarly simple from a programming perspective that offers WYSIWYG UI creation?

    Thanks.

    submitted by /u/candre23
    [link] [comments]

    [C# MVC] Reading files to bytes not working properly in project

    Posted: 05 Apr 2019 02:46 AM PDT

    Hey everyone!

    I have a weird problem. I am making a C# MVC application which generates PDF's and offers them for download with a download button.

     public ActionResult Download() { string url = (string)TempData["url"]; byte[] thePdf = System.IO.File.ReadAllBytes(url); return File(thePdf, "application/pdf"); } 

    All of a sudden I can't properly convert a PDF file to byte[], either with File.ReadAllBytes() or with a Memorystream (or any other stream).

    When I used a Memorystream I got an InvalidOperationException on both the ReadTimeOut and WriteTimeOut.

    I implemented the code mentioned above in a new C# MVC Project and there everything worked fine. So the issue must be with the project that i'm working in.

    EDIT:

    When I read out the bytes, it does return a full byte array but when it is downloaded and converted back to a PDF, the PDF is empty (all pages do exist) and the name is some collection of weird characters.

    In the new project, it is just the normal PDF as it should be.

    Does anyone have any clue what this might be and how i could fix it?

    submitted by /u/sbxn14
    [link] [comments]

    Help with simple game in C

    Posted: 05 Apr 2019 06:11 AM PDT

    Hello friends. I decided to give up programming but I need to complete one last assignment to get through the course atleast. I'm almost finished but since its been a while since I last worked on the project I don't really know how to proceed.

    The game is called Game of life and what I need help with is creating two functions. One which is supposed to load a game configuration from a file and the other to save ongoing game to a file. These are the function descriptions:

    /* Description: Load a configuration to the field array from a file.

    * Input: The field array, its size and a file pointer to the

    * file with the initial configuration.

    * Output: Returns 0 on success, the field array is updated with

    * the configuration from the file.

    * Returns a non-zero value on failure.

    */

    /* Description: Saves the current configuration of the field array to

    * a specified file.

    * Input: The field array, its size and a file pointer to the

    * file where the final configuration should be saved.

    * Output: Returns 0 on success, the current configuration in the

    * field array is written to the file.

    * Returns a non-zero value on failure

    */

    Would greatly appreciate any help. If there's any more information I can provide please tell me. Thank you.

    submitted by /u/sweetpineapplejuice
    [link] [comments]

    Can I use my own diff tool in crucible?

    Posted: 05 Apr 2019 06:07 AM PDT

    Hi, we're using crucible in our company to review code.

    I would much prefer to use my own diff tool to look at what changed, is there a way to do this?

    submitted by /u/hotpotato70
    [link] [comments]

    Help in Debugging

    Posted: 05 Apr 2019 01:01 AM PDT

    https://imgur.com/a/sXx4hW2

    How can I debug this fault?

    submitted by /u/umbaman
    [link] [comments]

    No comments:

    Post a Comment