• Breaking News

    Wednesday, April 1, 2020

    I am currently studying CS in college, what are some good certifications to try and get during this quarantine? Ask Programming

    I am currently studying CS in college, what are some good certifications to try and get during this quarantine? Ask Programming


    I am currently studying CS in college, what are some good certifications to try and get during this quarantine?

    Posted: 01 Apr 2020 01:47 PM PDT

    What did you wish you did more of when learning/in college for CS/before getting a job or internship?

    Posted: 01 Apr 2020 09:00 AM PDT

    I want to use Google inspect option for a example of a loop that increases value

    Posted: 01 Apr 2020 10:13 PM PDT

    EX: 000 000 0000

    000 000 0001

    000 000 0002

    ETC

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

    Have started CS50 but unable to progress properly

    Posted: 01 Apr 2020 08:33 AM PDT

    I started following the CS50 course in edx as a beginner level coder and have found the problem sets to be really tough. I tried answering it after watching the lectures once but couldnt figure out especially the first set of questions. I then watched it another 2 times and in a much slower pace and understood what is being taught. However when it comes to applying the theories i am absolutely zero. I ended up looking through another answer and still tried to make my own based on what i understood from those answers but still couldnt figure it out and practically copied it after trying for more than a week.

    Is this how it is for beginners or am i really bad considering that i noticed people have finished it within hours and some within days of watching the lectures. I know different people have different speed but i am at a total loss here.

    Is there another way i should approach this problem? Or should i look to learn somewhere else or something else

    !!Update: should i consider learning a more easier language like python so i can understand the functions and mechanics and then move on to harder ones?

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

    Is there a distinction between Bitcoin (anybody can join) vs RAFT (every node is managed by the same entity) distributed systems?

    Posted: 01 Apr 2020 09:56 PM PDT

    Essentially, one in which you can assume nodes are "nice" (for the case of RAFT, implement a very specific leader election protocol), and one in which you can't?

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

    NO JOB after studying JavaScript for 5 years. Should I switch to Python?

    Posted: 01 Apr 2020 03:44 PM PDT

    Hello /r/cscareerquestions,

    I am on the fence with what my next steps should be in attaining a computer-science-related job. I never had a CS job, but I would like one, preferably remotely due to circumstances. An internship is fine too, as long as it makes me more worthy of a paid position.

    I am trying to decide if I should continue studying JavaScript (5+ years studying, website portfolio) along with all its frameworks and libraries OR if I should start fresh and study Python. I understand the syntax of JavaScript and am most familiar with it, but I am not sure if it's future-proof job wise. My reasoning is that there are more jobs in Python, and it seems a lot more interesting.

    Indeed Job Search Results

    Search Terms # of Search Results
    Python remote 4,375
    JavaScript remote 2,901
    Ruby remote 985

    About 5 years ago I hunkered down to learn as much JavaScript, CSS, and HTML as I could. I even went to a coding bootcamp that guaranteed a job and where I was used as an example of a 'great programmer'. After 300+ job applications (with only one interview that went nowhere and was for SQL) I took a break and thought I was not good enough. Now I am back at it again.

    I would be eternally grateful for any help or advice on what to do. My apologies for typing in caps but I was hoping it would catch your attention. Thank you for reading.

    TL;DR - Studied full-stack JS for 5 years. Went to a coding bootcamp. Applied to 300+ jobs. No job. Is JavaScript worth pursuing if I hope to get a CS Career? Or maybe I should start fresh with Python, which shows promising job growth.

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

    help, hangman code. almost fully working

    Posted: 01 Apr 2020 09:36 PM PDT

    hello, I am almost done programme that is basically a game of hangman in c sharp in Microsoft visual studio. here is an extract.

    -------------------------------------------------------------------------------------------------------------------------------------

    public partial class Form1 : Form{

    int count = 0; //Use this as a counter for the array – so we can keep track of each entry in the array.

    string hiddenWord = "";

    string wordToGuess = "";

    int lettersWrong = 0;

    int start = 0;

    int lettersGuessed = 0;

    string[] Word = new string[10];//Create an array of strings to hold the words.

    string[] Hint = new string[10];//Create an array of strings to hold the hints.

    int counter2 = 0;

    private void Start_Click(object sender, EventArgs e)

    { if (start < 0)

    {

    //this saves an image from the backround of the form which i will use later to save over the drawn hangman

    Bitmap _Background = new Bitmap(500, 500);

    Graphics.FromImage(_Background).CopyFromScreen(this.Right, this.Top, -50, -250, this.Size);

    Brush brsBackground = new TextureBrush(_Background);

    Graphics gr = this.CreateGraphics();

    gr.FillEllipse(brsBackground, 20, 20, 150, 150);

    gr.FillEllipse(brsBackground, 10, 10, 150, 150);

    gr.FillEllipse(brsBackground, 30, 30, 150, 150);

    gr.FillEllipse(brsBackground, 20, 20, 160, 160);

    gr.FillEllipse(brsBackground, 20, 20, 140, 140);

    //this gets rid of the prior word and hint by using the int start and incrementing it

    wordToGuess = "";

    hiddenWord = "";

    textBox1.Clear();

    textBox2.Clear();

    // this re-enables the buttons when the game is restarted

    btnA.Enabled = true;

    btnB.Enabled = true;

    btnC.Enabled = true;

    btnD.Enabled = true;

    btnE.Enabled = true;

    btnF.Enabled = true;

    btnG.Enabled = true;

    btnH.Enabled = true;

    btnI.Enabled = true;

    btnJ.Enabled = true;

    btnK.Enabled = true;

    btnL.Enabled = true;

    btnM.Enabled = true;

    btnN.Enabled = true;

    btnO.Enabled = true;

    btnP.Enabled = true;

    btnQ.Enabled = true;

    btnR.Enabled = true;

    btnS.Enabled = true;

    btnT.Enabled = true;

    btnU.Enabled = true;

    btnV.Enabled = true;

    btnW.Enabled = true;

    btnX.Enabled = true;

    btnY.Enabled = true;

    btnZ.Enabled = true;

    }

    //Create the hidden word in terms of *****

    for (int i = 0; i < Word[counter2].Length; i++)

    {

    hiddenWord = hiddenWord + "*";

    }

    //Display the hiddenword and the hint in the textbox.

    textBox1.Text = (hiddenWord);

    textBox2.Text = (Hint[counter2]);

    wordToGuess = Word[counter2];

    counter2++;

    start += 1;

    }

    private void btnA_Click(object sender, EventArgs e)

    {

    char gguessedLetter = 'a';

    int result = 0;

    int count1 = 0;

    int wordLength = wordToGuess.Length;

    int a = 0;

    int counter = 0;

    string newchar; //correct guessed letter

    for (count1 = 0; count1 <= wordLength; count1++)

    { //returns the position of occurrence of the letter in the word string

    result = wordToGuess.IndexOf(gguessedLetter, lettersGuessed, wordLength - lettersGuessed);

    // IndexOf uses three perameters: the letter being searched for, the position in the string where the search is to begin and the number of characters to check (the latter decreases as the search moves through the word and the position to begin the search changes once the letter being searched for is found.

    // if the letter is found in the word string

    if (result != -1)

    {

    //When letter is guessed correctly it advances the counter for the instances of that letter to check for more occurences of the letter

    lettersGuessed = result + 1;

    counter++;

    newchar = wordToGuess.Substring((result), 1);

    hiddenWord = hiddenWord.Remove(result, 1);

    hiddenWord = hiddenWord.Insert(result, newchar);

    MessageBox.Show(hiddenWord);

    a++;

    }

    textBox1.Text = hiddenWord;

    }

    if (a == 0)

    {

    lettersWrong++;

    MessageBox.Show("Wrong, letters wrong " + lettersWrong + ". Wrong guesses left " + (6 - lettersWrong));

    textBox3.Text = ("Guesses Wrong" + lettersWrong);

    }

    if (lettersWrong == 1)

    {

    //this loads in the drawing graphics which i will use to draw the man being hanged based on each letter wrong.

    System.Drawing.Graphics graphicsObj;

    graphicsObj = this.CreateGraphics();

    //this creates a pen of which to draw the character

    Pen myPen = new Pen(System.Drawing.Color.Black, 5);

    //this creates a circle(ya i know it says rectangle but look it works so im not gonna question it to be honest)

    Rectangle myRectangle = new Rectangle(20, 20, 150, 150);

    graphicsObj.DrawEllipse(myPen, myRectangle);

    }

    //this turns off the button if it was already used because the same letter cannot be used again in hangman

    btnA.Enabled = false;

    }

    ________________________________________________________________________________________________________

    its working almost perfect but I have a slight problem I cant seem to fix. lets say the word is anime. if I guess each letter in succession it works fine. but if I guess lets say A, it shows A****. then if I guess E it shows A***E. but then when I try to guess the remaining it doesn't find it and just goes to say its wrong.

    I guess it runs from the last letter guessed or something. I was wondering if anyone could spot something I did wrong in the code. I cant seem to figure it out. the rest is just repeated code for each button and also connecting a database to the program to read in the words and hints which works perfectly.

    Also if anyone knows a better to get rid of the drawn hangman when I restart the game, the bitmap screenshotting is alright but I want to change the background to add more color and then it wont work anymore.

    thank you.

    p.s sorry if this looks like spaghetti code. still need to make improvements and add in the graphics.

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

    How are queries so fast?

    Posted: 01 Apr 2020 09:05 PM PDT

    Let's say I have a database with thousands, even hundreds of thousands of different objects, each with more than a dozen key:value pairs. I am looking for one object that matches "name: John" & "age:34" & "last_order_id: a73847"

    To make things interesting, there is 50 other people named John who are 34.

    If I understand it right, the database has to scan each object one by one:

    • index0.name != John, next
    • index1.name != John, next
    • index2.name == John, index2.age != 34, next
    • ....
    • index354744 MATCH

    I don't know, this just seems insane that I can get a result in less than a second, while it literally has to search through each index up to the point that it finds a match.

    And on a slightly related point, google queries as well.

    I search something on google and it displays in text:

    "About 1,960,000,000 results (0.78 seconds)" HOW?!

    There must be some type of method that modern queries use that is insanely efficient and fast.

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

    Can you guys review my coding "style" for readability?

    Posted: 01 Apr 2020 09:08 AM PDT

    So I'm pretty close to finishing up college and I may be getting a job pretty soon, I spent a lot of time outside of classes trying to refine my skills. If you want you can take a peak at my github and just point out anything in my code that you think is problematic, but I'll try to post snippets here that I think are relevant. I have a few practices that may be problematic but I'm not sure whether they are.

    I try to write my code in a way that comments are unnecessary.

    here's a python example from a naive digit classifier(accidentally deleted from github)

    ``` def classify(self,data,labels): label=self.get_label(labels) self.classification_rate[label,1]+=1 estimate=self.map_estimation(data)

     if estimate==label: self.classification_rate[label,0]+=1 self.correct_count+=1 else: self.confusion_matrix[label,estimate]+=1 #check to see if this had the highest or lowest posterior probability if self.digits[estimate].check_prototypicals()==True: self.digits[estimate].set_prototypicals(label,self.image_buffer) 

    ```

    I did add a comment explaining what I was doing near the end, but only because I couldn't think of a variable name more self-explanatory than prototypicals. but the rest of the variable names were based off the domain terminology

    I occasionally do a lot in a single line, but I prefer to only do so when it's easy to follow via documentation, or when there's a major performance benefit.

    This is an example in java from my object oriented programming class, Wordmap is a hashmap of arraylist containing word counts per document.

    for reference ``` public void printInverseDocumentFrequencies() { long appearanceCount=0; IntPredicate notZero= (x) -> x > 0;

     System.out.println("Here are the inverse Document Frequencies so far"); for (String word : wordMap.keySet()){ appearanceCount=wordMap.get(word).stream().mapToInt(i -> i).filter(notZero).count(); System.out.println(word + " : "+ String.valueOf(Math.log(Double.valueOf(FileList.size())/Double.valueOf(appearanceCount)))); } } 

    ``` in the line where appearance count is assigned a value per word, all of those method calls are in the standard java library, thus the documentation for what each one does makes it pretty easy to find out. but I also understand reading through about 3 different pages of documentation is not most people's idea of a good time.

    on a related note I've been thinking about putting urls to relevant wikipedia pages(or other types of encyclopedic listings) when implementing something like inverse document frequency, and I'm not sure how other developers feel about links in code.

    I feel like it would help other developers get up to speed on what a function is doing or why a particular step is necessary.

    I sometimes have long winded comments about design decisions

    ``` public Polynomial add(Polynomial addend)

    { ArrayList<Polyterm> tempPolyterms = new ArrayList<Polyterm>(); Iterator<Polyterm> thisIter = Polyterms.iterator(); Iterator<Polyterm> thatIter = addend.getPolyterms().iterator(); boolean done=false;

     //NOTE: the only reason I went with this was because the contains method //uses o.equals(a), not o.compareto(a), and equality has to be for both //coefficient and expoenent. Polyterm thisTerm = (Polyterm)thisIter.next(); Polyterm thatTerm = (Polyterm)thatIter.next(); //I tried inverting the nested conditionals to make the code more condensed, //and I ran into an issue with certain values being skipped over do{//iterate through both list at once, using exponent as comparator 

    ... ``` on one hand, I feel like understanding the why of a decision helps understand the implementation, on the other it's not directly related to the functionality and may pose more of a distraction.

    my comments are sometimes rather informal

    // below can be used to test input private static String in_test = "^-?(?:(\\d+)|(\\d+\\.\\d*)|(\\d*\\.\\d+))?(x|(x\\^(?=\\d+)\\d+))?$"; //Note: this fat rail of regex took me over an hour I kinda feel like this one probably is a problem, but I don't know if it's a major problem. if it's only a minor point of contention, and other people appreciate the reference/humor then I don't see the point in correcting it. It's fairly rare

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

    Need help writing a script that pulls links and opens them in a new tab

    Posted: 01 Apr 2020 01:31 PM PDT

    Okay so I'm new to this whole programmming/coding thing, I've taken a java class, currently learning python, and I know the basics of HTML so sorry if I'm not using correct wording/meta blah blah. Okay so now for the problem. My dad runs a law firm and he uses the website clio to manage all his client's documents, case files, forms, messages, etc (if you have experience in law you know what I'm talking about). So my dad asks me to help him with this problem, he has all these messages that are marked unread in the secure messages tab on the website, these messages need to be opened (using the View Button to be marked as read in the system. I have about 5-6 thousand messages to go through so naturally I started looking for the easiest way, my first thought was just to right click the view and open them all in new tabs, but the option to open link in new tab doesn't work (tried chrome, firefox, and edge) with the view button. So i thought it must be one of those links that is essentially "in" the webpage (sorry i dont know the correct term) but it doesnt have it its own link, But that is not the case, each message has its own unique link and I copied one and opened it in another browser and it opened directly to the page. Additionally, the page refreshes every time you click the View Button and open a new message which also resets any filters you put on it. So pretty much what Im asking is, what would be the easiest solution to this problem. I need to mass open these links so that they get marked as read as fast as possible, by either writing a script to do it or by finding a way to get the "Open link in new tab" to display.

    Sorry if this is rambly and not formatted right, I can answer any specific questions.

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

    How does C# and Python go together?

    Posted: 01 Apr 2020 07:13 PM PDT

    I've been looking for jobs lately and have come across quite a few positions that are looking for candidates to be proficient in "both C# and Python". All of these companies seemed to offer cloud based (SaaS) products.

    I'm pretty good with C# but I'm a newbie at Python. In what cases might it make sense to use both these programming languages together, and why?

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

    Is this a good deal?

    Posted: 01 Apr 2020 07:11 PM PDT

    Coding for work vs coding as hobby

    Posted: 01 Apr 2020 07:03 PM PDT

    Hi,

    I don't know if this is the right sub, I hope if not I will take it down.

    So I work as Data Scientist/Software Engineer and obviously most of my day coding.

    I also wanna learn new stuff / work on side projects as a hobby but I find it really hard to find the motivation as I feel like I'd spend my entire day only coding and it also reminds me of work.

    I tried to separate my work environment from my personal environment, different machines/ different location (from home though) still didn't help.

    Any tips on how you guys manage both?

    Much appreciated!

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

    What API is this site using?

    Posted: 01 Apr 2020 12:32 PM PDT

    I'm trying to extract information about COVID-19 in the Riverside county. This website uses Tableau, and it's getting the amount of cases/deaths in each city in the county.

    However, I'm not sure where it's getting this information and what API call they're making, can anyone help?

    https://www.pe.com/2020/03/31/map-shows-coronavirus-cases-in-riverside-county-cities/

    This diagram to be exact: https://i.imgur.com/NOdsdjj.png

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

    Pre-Compressed HTTP Chunks

    Posted: 01 Apr 2020 03:46 PM PDT

    I'm pretty sure this isn't possible, but I thought I'd ask to see if anyone has any ideas.

    I have C++ webserver serving up a bunch of resources in JSON format in response to queries. Through optimizing things heavily, I've managed to get the time for any particular query down pretty low, and now I'm running into something I never thought I'd run into.

    We implemented DEFLATE compression on responses, because the responses are fairly regular, and this saves us 80-90% payload size (down from a megabyte to a hundred k or so). Fair enough. However, I recently noticed that the rest of the service is now performant enough that in a decent amount of cases the main bottleneck is the time it takes to gzip up the response, taking about 50% of any given query's runtime; in some cases up to 80% of the runtime (including times for disk read!)

    Now, an easy way to mitigate this is to simply turn down the compression level; I estimate I can probably get the gzip runtime down to about 15% or so if I do that; without actually losing much compression, but ideally I'd love to see if I can't pre-zip the chunks I need and just randomly-access them and concatenate them together when I need to spit out query results. This would also help me reduce the amount of disk reading I'd be doing as well.

    I tried this, and it worked pretty well; however, I hit a problem. When I create the DEFLATE stream, if I want to concatenate a chunk, AFAIK, it has to be a chunk that was emitted with Z_FULL_SYNC in order to reset the sliding window, which I get. However, this of course, tanks my compression ratio; going from about 90% savings to about 50%, or in some cases, no more than about 10% for certain types of chunks. Obviously this is incredibly quick, but we're going to lose on the other end with how long things take to transfer over the network. The issue is there's a lot of repetition amongst certain small chunks, but because I need to randomly access them and slice and dice them into a single response, they need to restart their sliding window, so I can't take advantage of that repetition. I also generally know what the chunk'll contain ahead of time. I looked into using a static dictionary in order to fix this; but as far as I can tell, there is no way to use a static dictionary when you're simply sending a Content-Encoding: gzip/deflate response to the browser.

    I looked into Brotli as a possibility for a DEFLATE replacement that might allow me to do something about this, as it seems to be supposed in most modern browsers, but as far as I can tell, it suffers from the same problems. There's a proposal to allow the sending of a dictionary, but it's not part of the standard yet.

    The other thing I can think of that would help with this, would be if there's any way for one of the encoded streams to have blocks that say "ignore me for computing the sliding window and just use what came before me". The small chunks are generally always associated to one larger chunk, so I thought maybe I could encode a dictionary in a useless field in the JSON that no one would ever look at, have it get into the algorithm, and then, if the later blocks were ignored for the sliding window, so long as I always emitted that block first in the stream, I could mix and match the remaining smaller blocks as necessary, but I don't see any capability to do that in DEFLATE or Brotli either.

    Anyone have any ideas about how to approach this?

    TL;DR: Anyone know how to compress things in pieces ahead of time, and send them over HTTP mixed-and-matched, preserving some general dictionary across all of them (or subsets of them)?

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

    Which college is the best for programming?

    Posted: 01 Apr 2020 03:42 PM PDT

    I want to know which college is the best for a good solid theory knowledge and a lot of pratical programming

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

    Calling all programmers!! I NEED YOUR HELP

    Posted: 01 Apr 2020 03:17 PM PDT

    Hello, I am a current college student! I have to interview someone in my desired field of study, to see what life would be like post-college. I am posting this here because due to the current circumstances regarding COVID-19 I am no longer able to meet with my intended interviewee. Please let me know if you would like to help me with this project and I would be more than happy to share the questions I would ask with you.

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

    Help with intro Python HW

    Posted: 01 Apr 2020 02:39 PM PDT

    My assignment is to create a list of numbers and filter out 2 and below and 8 and above. Im having trouble using the filter command. My teacher kind of just threw us this assignment with no knowledge of how to do it. Here is my code right now:

    def rangeFilterA( seq ):

    return seq

    seq = list( filter(> 2 && < 8 ) )

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

    Trouble with a Timeout/Tries routine (a J/K loop essentially)

    Posted: 01 Apr 2020 02:21 PM PDT

    My code is in Structured Text but it's similar enough most should be familiar with it.

    I need to control this trigger bit O_aiOutputMap[5].7 by holding it high for I_iDelay times and if it that time elapses I need to keep it LOW for the same number of times. That whole process needs to repeat I_iTries times before setting O_bTimeout.

    To make it more complex I need this routine to be fully self-contained. It is called many times with only mTrigger and mRW as inputs but also needs a way to reset the routine if it times out (which is my _latch(SET:= mTrigger, RESET1:= _latch_reset)).

    I can get the routine to run a full I_iDelay/I_iTries but SOMETIMES it just gets stuck in limbo and the routine just hangs. I have been banging my head on the wall here and I think I wrote so much code it's now way over complicated.

    METHOD mCmdTrigger : BOOL VAR_INPUT mTrigger: BOOL; mRW: UINT:= 0; // 0 = Read, 1 = Write END_VAR // Command trigger pulse routine _latch(SET:= mTrigger, RESET1:= _latch_reset); IF mRW = 1 THEN SUPER^.O_aiOutputMap[5].0:= FALSE; SUPER^.O_aiOutputMap[5].1:= TRUE; ELSE SUPER^.O_aiOutputMap[5].0:= TRUE; SUPER^.O_aiOutputMap[5].1:= FALSE; END_IF IF _latch.Q1 AND NOT O_bDeviceBusy THEN _Trigger:= TRUE; ELSIF (_iTries >= I_iTries) THEN _Trigger:= FALSE; _iTries:= 0; O_bDeviceBusy:= FALSE; O_bTimeout:= TRUE; ELSIF NOT O_bDeviceBusy THEN _iTries:= 0; END_IF IF _Trigger AND NOT O_bDeviceBusy THEN O_bDeviceBusy:= TRUE; O_aiOutputMap[5].7:= TRUE; ELSIF O_bDeviceBusy AND (_iDelay < I_iDelay) THEN _iDelay:= _iDelay + 1; ELSIF (_iDelay >= I_iDelay) THEN mTrigger:= FALSE; O_bDeviceBusy:= FALSE; O_aiOutputMap[5].7:= FALSE; _iDelay:= 0; _iTries:= _iTries + 1; ELSE mTrigger:= FALSE; _latch_reset:= TRUE; O_aiOutputMap[5].7:= FALSE; _iDelay:= 0; END_IF 

    Upon rethinking things after my drive home I built a light flasher with two latches. I got the functionality I wanted using FB's. I then reverse-engineered the FB's to be bare code as I am counting scan cycles and not time.

    Code Here

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

    Resources for keeping up with the latest web standards and browser news that will affect web development?

    Posted: 01 Apr 2020 02:12 PM PDT

    My employer wants me to keep up with the latest news in web standards and browser changes, and I am wondering if there are reliable resources anyone would recommend for staying up to date. I'm looking for something concise and focused on web standards/browser changes that will affect the industry, rather than a website or magazine on programming broadly. A mailing list would be nice. Anyone have a recommendation?

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

    Can the Gmail "tags" system be implemented on other software with success?

    Posted: 01 Apr 2020 08:02 AM PDT

    Google Mail has "tags" instead of folders, allowing for multiple tags per mail, and potentially easier categorizing of items. Why don't other programs have this feature, notably Windows Explorer, etc.? Is it a design decision or something else?

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

    TCP/IP socket does not work on some browsers

    Posted: 01 Apr 2020 11:27 AM PDT

    A TCP/IP web server for Linux written in C++ resides on an external board. The client - a browser on a PC connected to the board with the server via Ethernet cable, accessing it nicely from Firefox, but when trying to access from Chrome, IE, Edge, Opera on my work PC - all fail: looks like when the server "send" the files in response to the client's GET requests - only the client running on Firefox receives the files, and other browsers don't even receive these "sent" files. The "send" itself thinks it successfully sent the files, i.e. as I understand, passed the messages to the TCP (or to HTTP?) However, when I tried to access the server from my personal home laptop - IE and Edge do work, and only Chrome and Opera still don't work. So, it seems the issue is in some very specific browser settings. Maybe some combination of the browser + PC security/firewall settings. I am brand new to sockets. If anybody has any suggestions what to try on the IE, Edge, Chrome, Opera to have them working as the Firefox does - it will be fantastic!

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

    Problem with deletion of dynamically allocated memory

    Posted: 01 Apr 2020 10:47 AM PDT

    Hi,

    I am new to this sub as well as fairly new to C++. So, ignore the inaccurate terminologies coming ahead.

    To make it simple, I will use arbitrary names as the assignment question is bigger than this minor problem.

    I have two classes A and B. B has two functions B1 and B2. When B2 is called, it dynamically allocates an array of the object of class A. In the same function, some values are assigned to a couple other attributes in that array and some calculations are done but that happens flawlessly.

    When the second function B2 is called, it has to delete that array created in the first function. That does not happen. In fact, the program terminates without any error when it reaches the delete command for the first time.

    I am not sure why this is happening and I would really appreciate an extra set of eyes for helping me. I can answer more questions in the comments.

    Thanks.

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

    What API is this using?

    Posted: 01 Apr 2020 10:06 AM PDT

    I want to make my own kind of dashboard for COVID-19. However, I'm looking at Riverside county's cases and I see it's most likely making an API call somewhere to get the data. I was wondering if anyone can help me find it?

    https://rivcoph.org/coronavirus

    This chart to be exact: https://i.imgur.com/5G8Gdpl.png

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

    No comments:

    Post a Comment