• Breaking News

    Monday, March 25, 2019

    What is a good introductory text on C++ compilers and linkers? Ask Programming

    What is a good introductory text on C++ compilers and linkers? Ask Programming


    What is a good introductory text on C++ compilers and linkers?

    Posted: 25 Mar 2019 02:37 PM PDT

    I'm writing a large hobby project at the moment. Some way into the project I started using templates to save myself from repetition. This puts more 'code' in the header files, requires lots of header files to all include from each other, and now the whole thing is extremely fragile to change. I feel if I understand how compilers and linkers work, the haphazardness will go away and some of the do's and don'ts will become clearer. What is a good introductory book for C++ compiling and linking, or at least a good book on designing larger scale projects spread across multiple files?

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

    What came first Switch Statements or If ... else statements?

    Posted: 25 Mar 2019 08:32 PM PDT

    How do I check if command line has arguments?

    Posted: 25 Mar 2019 05:18 PM PDT

    Im making a server/client peer connection in node js. I want to check if the command line has arguments like -s [server:port] and stuff. I'm trying to make it so that if(has a -s in the cmd line) do this part of code, else, do this part of code. Is there any way to check if commandline arguments exist?

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

    Stress testing a remote updater program on a device

    Posted: 25 Mar 2019 10:22 PM PDT

    I'm trying to come up with ideas on how to test a remote updater I wrote. So far I've got

    • Test downloading large files
    • Cut power during download
    • Cut internet access during download

    I know it's hard to come up with ideas without seeing the code but any ideas no matter how small would really help me out.

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

    No declaration matches error - C++

    Posted: 25 Mar 2019 08:59 PM PDT

    Hey guys, I'm doing an assignment for my Comp Sci 2 class, and I'm getting this error:

    crewmember.cpp:30:8: error: no declaration matches 'std::__cxx11::string CrewMember::toString()' string CrewMember::toString(){ crewmember.h:23:10: note: candidate is: 'void CrewMember::toString()' crewmember.h:5:7: note: 'class CrewMember' defined here class CrewMember{ ^~~~~~~~~~ 

    I've exhausted StackOverflow and can't find the answer. Here is some of my code:

    main.cpp

    CrewMember cm1("Johnny Appleseed", 1234, "Pilot"); cout << "CM1: " << cm1.toString() << endl; 

    crewmember.h

    #include <string> using namespace std; class CrewMember{ private: string name = ""; int IDNum = 0; string type = ""; public: CrewMember(string name, int IDNum, string type); string GetName(); void SetName(string name); int GetIDNum(); void SetIDNum(int IDNum); string GetType(); void SetType(string type); string toString(); }; 

    crewmember.cpp

    #include "crewmember.h" CrewMember::CrewMember(string name, int IDNum, string type){ this->name = name; this->IDNum = IDNum; this->type = type; } string CrewMember::GetName(){ return name; } void CrewMember::SetName(string name){ this->name = name; } int CrewMember::GetIDNum(){ return IDNum; } void CrewMember::SetIDNum(int IDNum){ this->IDNum = IDNum; } string CrewMember::GetType(){ return type; } void CrewMember::SetType(string type){ this->type = type; } string CrewMember::toString(){ return name + " ID:" + to_string(IDNum) + " " + type; } 

    I can't for the life of me figure out why I'm getting this error when I have the same setup for my Date class and that works. I would love some insight if anyone has come across this before... Thanks.

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

    Help with uni work

    Posted: 25 Mar 2019 07:40 PM PDT

    I'm really really struggling and I haven't found the professor much help with this so I'm coming to you... it's probably a bit simple but I'm struggling. Here goes; In coderunner;

    "Write code which checks validity of a 5-digit integer entered by the user. The number is considered valid if the first digit is less than or equal to the last digit. Otherwise it is invalid."

    Https://gyazo.com/f5aeb276cc78066fb22f76f5311250f3

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

    Suggest a tutorial for using Git with Eclipse for developers who have previously used Subversion.

    Posted: 25 Mar 2019 01:07 PM PDT

    We are migrating a development team from Subversion source control to Git source control. The team all use Eclipse.

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

    Passthrough html while reading pixel data

    Posted: 25 Mar 2019 01:40 PM PDT

    Basically I want to connect my nintendo switch to my pc/laptop, and have it display on the monitor connected to the pc/laptop display, but before it's sent off I want a program to be able to read the image data. Does such a thing exist?

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

    Help me remove bad links please!

    Posted: 25 Mar 2019 04:53 PM PDT

    Best way to package a Docker Container for remote deployment?

    Posted: 25 Mar 2019 07:33 AM PDT

    Hello everyone,

    I have recently started exploring docker. I want to package code for deploying Deep Learning models as an API to be deployed on client's servers. I want to make an executable that is hard to reverse engineer. What are the methods or practices I should follow? Please guide me to the appropriate links if possible.

    Thanks

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

    Script checking - which toolset to use?

    Posted: 25 Mar 2019 02:06 PM PDT

    I'm working on an interesting project at the moment and I'm stuck on the right tooling to use to achieve my goal

    In short I want to automate this process:

    1. Visits a website, or list of websites
    2. Check the sites' HTML body for keywords in embedded script tags
    3. Check the content of .js scripts served from the host domain for certain keywords
    4. Check the contents of scripts loaded on the website from remote locations for keywords
    5. Return a .csv or .txt with the website scanned, the script(s) with the keywords I was looking for and any remote domains it's connecting to for scripts.

    As far as solutions, I've been looking at:

    • Python + Selenium as I've built basic web request scripts before

    • Puppeteer built on Node.js, but have little-to-no JavaScript experience. From what I've read, puppeteers integration with Chrome DevTools could come in really useful

    However, I'd love to know if there's an easier way for this noob to automate this task.

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

    Loading comments and replies for a post

    Posted: 25 Mar 2019 02:00 PM PDT

    I am making a social media type website. I am unsure if I should make all the calls for a posts comments and the comments replies when the page is loaded, and when the comments button is clicked they go from hidden to unhidden. Or should the call be made only when the button or post to look at comments is clicked? I am unsure how twitter, reddit etc do this.

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

    Is there a text editor for programming languages?

    Posted: 25 Mar 2019 09:28 AM PDT

    I remember back in high school my teacher gave us this program to write our code in without compiling or running the code. It simply allowed us to write the code with the proper colour coding and syntax. That was 5 years ago but I feel like it could still be around.

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

    What's use case for RabbitMQ?

    Posted: 25 Mar 2019 01:03 PM PDT

    https://www.rabbitmq.com/features.html

    It sounded like I can do that with WCF/Web Api already. My background is in .Net. Why do I need something like RabbitMQ? What can it do that WCF (Windows Communication Foundation) can't or they are not the same?

    I'm learning Azure and Azure have ServiceBus which claim to be the same as RabbitMQ.

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

    where to find dataset for multiple linear regression

    Posted: 25 Mar 2019 04:32 AM PDT

    Python plus Terraform File

    Posted: 25 Mar 2019 12:00 PM PDT

    Hi,

    I am trying to write a Python code that uses a GUI to interface with the user to help them attain an API key. Then run a Terraform script after taking a API key, as we as pass an API key for the Terraform file to run it. I have the part up to the attaining the API key, but I am struggling with the calling into a Terraform file. I am using Linode and Packet.

    If you have any suggested or links would greatly appreciate it.

    Thanks

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

    I am not a programmer but need to hire one.

    Posted: 25 Mar 2019 08:26 AM PDT

    First in sorry if this is the wrong subreddit if this question is out of place I will leave and go somewhere else.

    I have a job I need a good programmer to do for me. The problem I face right now other than not knowing how to program what I want, is that I'm afraid a programmer would steal the end product instead of just do the job for me.

    Is there some sort of way I can hire a programmer and have a contract or something to where they'd program what I need and just get payment from me and not steal the end result or the idea?

    I am going to pay well for the job I just am afraid of the scenario above

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

    PRNG vs CSPRNG?

    Posted: 25 Mar 2019 01:32 AM PDT

    Hello,

    I've become aware that there's a difference between a 'regular' PRNG and a secure PRNG (CSPRNG, as on Wikipedia)

    Python implements these as random and secrets. Both seem to perform 'quickly', so my question is why do PRNGs that aren't CSPRNGs exist, and what are the implementation differences between the two?

    I just 'benchmarked' python's secrets module vs random for generating 20'000 random integers 0 to 1000 and got times of 0.041 seconds for secrets and 0.025 seconds for random.

    The difference is evident, but not really significant enough that it seems it should matter (how often do you need to generate millions of random numbers?)

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

    Advice on university choices to specialise in AI and Robotics

    Posted: 24 Mar 2019 10:58 PM PDT

    Hi all, I created this account because I feel like I need people with more professional advice now that universities' open house are over.

    I have decent programming background with some knowledge in java and python. I have interest in AI and Robotics so I hope to specialise in it.

    Currently, I am applying for Computer Science and Mathematics as a Double Degree or Double Major as I thought math would help me in those specialisations.

    However, I am quite confused as I read somewhere that mathematics can be impractical in modern AI instead. So I'm considering to obtain a double major in computer science and mechanical engineering instead. Does this make more sense?

    FYI: I am in Singapore waiting for University's application result

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

    Error updating record: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '['tuv'], name = ['Rajesh S'], email = ['tuv@gmail.com'], password=['202cb962ac59' at line 1

    Posted: 25 Mar 2019 04:54 AM PDT

    <?php

    session_start();

    require('connect.php');

    if(isset($_POST['submit'])){

    $id = $_POST['id'];

    $username = $_POST['username'];

    $name = $_POST['name'];

    $email = $_POST['email'];

    $password = md5($_POST['password']);

    $dob = $_POST['dob'];

    $gender = $_POST['gender'];

    $location = $_POST['location'];

    $course = $_POST['course'];

    $mobile = $_POST['mobile'];

    $sql = " UPDATE user SET username =['$username'], name = ['$name'], email = ['$email'], password=['$password'], dob = ['$dob'], gender =['$gender'],location =['$location'], course = ['$course'], mobile = ['$mobile'] WHERE id= $id ";

    if (mysqli_query($mysqli, $sql)) {

    $smsg = "Record updated successfully";

    } else {

    $fmsg = "Error updating record: " . mysqli_error($mysqli);

    }

    }

    ?>

    <html>

    <head>

    <title>User Registration PHP & MYSQL</title>

    <link rel="stylesheet" href="[https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css](https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css)" >

    <link rel="stylesheet" href="[https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap-theme.min.css](https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap-theme.min.css)" >

    <link rel="stylesheet" href="styles.css" >

    <script src="[https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js](https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js)"></script>

    </head>

    <body>

    <div class="container"> 

    <a class= "float-right" href = "logout.php"> LOGOUT </a>

     <?php if(isset($smsg)){ ?><div class="alert alert-success" role="alert"> <?php echo $smsg; ?> </div><?php } ?> 

    <?php if(isset($fmsg)){ ?><div class="alert alert-danger" role="alert"> <?php echo $fmsg; ?> </div><?php } ?>

    <form class="form-signin" method="POST">

    <h2 class="form-signin-heading">Edit Profile</h2>

    <div class="input-group">

    <input type="hidden" name="id" placeholder="ID">

    <input type="text" name="username" class="form-control" placeholder="username" required></div>

    <label for="inputname" class="sr-only">Full Name</label>

    <input type="text" name="name" id="inputname" class="form-control" placeholder="Full Name"required>

    <label for="inputEmail" class="sr-only">Email address</label>

    <input type="email" name="email" id="inputEmail" class="form-control" placeholder="Email address"required>

    <label for="inputPassword" class="sr-only">Password</label>

    <input type="password" name="password" id="inputPassword" class="form-control" placeholder="Password" required>

    <label for="inputDoB" class="sr-only">DOB</label>

    <input type="date" name="dob" id="inputDoB" class="form-control" placeholder="DOB"required>

    <td>Gender:</td>

    <input type="radio" name="gender" value="m">Male

    <input type="radio" name="gender" value="f">female

    </tr>

    <label for="inputlocation" class="sr-only">Location</label>

    <input type="text" name="location" id="inputlocation" class="form-control" placeholder="Location"required>

    <label for="inputcourse" class="sr-only">Course</label>

    <input type="text" name="course" id="inputcourse" class="form-control" placeholder="Course" required>

    <label for="inputmobile" class="sr-only">Mobile</label>

    <input type="text" name="mobile" id="inputmobile" class="form-control" placeholder="Mobile" required>

    <button class="btn btn-lg btn-primary btn-block" type="submit" name="submit">Update</button>

    </div>

    </body>

    </head>

    </html>

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

    If you compile C to binary, is it true that the resulting program size is linear in the size of the source file?

    Posted: 24 Mar 2019 10:45 PM PDT

    By compile, I mean to a .o file. Also, under the assumption of no preprocessing.

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

    What are some Google-able terms for this security problem?

    Posted: 24 Mar 2019 09:55 PM PDT

    (Example? Think peer-to-peer Battleship game cheat prevention)

    There are 2 peers that each have a private secret (one secret for each of them).

    (IMPORTANT) They promise to not change their private secrets while communicating.

    They must reveal partial information to each other, derived from their own private secret.

    As more partial information is revealed, the amount of information still secret is reduced.

    Eventually, all information in the private secrets becomes public.

    Problem 1: Each peer must prove that they did not modify their private secret while communicating.

    Problem 2: Each peer should not be able to deduce private information from just the public information.

    Constraint: The entropy of the private secret is tiny, and it is trivial to calculate all permutations.

    In plain English: When you play a game of Battleship with someone, and they keep moving their pieces, it's totally cheating, and that's just not cool.

    What are some keywords and terms related to this problem?

    I assume the solution is to add a ton of salt to the private secret, exchange hashes at the start of communication, then exchange the salt and secrets at the end of communication.

    The idea is that with enough salt, brute-force permutations are non-viable: Spoofer can't find hash collisions fast enough to make multiple secrets, Reverser can't calculate salt permutation fast enough to look for hash matches.

    This feels like this must be a thoroughly solved problem, but I'm not sure how to search for it.

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

    Need someone to crack code

    Posted: 25 Mar 2019 04:40 AM PDT

    Code is written in c++,its exe file with simple checking for auth key via ftp.

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

    No comments:

    Post a Comment