• Breaking News

    Thursday, March 14, 2019

    Those of you that have had developer jobs, how often do your work places change the technology used Ask Programming

    Those of you that have had developer jobs, how often do your work places change the technology used Ask Programming


    Those of you that have had developer jobs, how often do your work places change the technology used

    Posted: 14 Mar 2019 04:50 PM PDT

    Hello everyone, I am currently a computer science undergrad and I have been forced to write a paper for an english class so I decided to talk about the pros and cons of attending college for a developer job.

    One of the points I wanted to touch on was on the job training vs the fundamentals you learn in college but I was just curious on if companies switch methods and packages used frequently or if they find something that works and stay with it. Any help or input would be great, thanks for reading this and happy coding!

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

    I recieved an automated email from a business along with a generated PDF invoice. What technologies do I need to recreate something like this?

    Posted: 14 Mar 2019 09:03 AM PDT

    Edit: What technologies do I need to learn.

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

    fstream error

    Posted: 14 Mar 2019 07:19 PM PDT

    /* Exam Statistics. NAME */ #include <iostream> #include <iomanip> #include <fstream> #include <string> using namespace std; // Function prototypes void welcome(); void farewell(); bool getData(ifstream inFile, double[], string[], int &count); bool pasteData(ofstream outFile, double[], string[], double avg, int count); double calcAvg(int total, int count); double getLowest(int &lowest, int count, double[], int &lowestLocn); double getHighest(int score, double[], int &highestLocn); void displayData(int highest, int lowest, double[], string[], int total, int avg, int count, int lowestLocn, int highestLocn); int main() { int score, lowest, highest, size, total, count, lowestLocn, highestLocn; string idNumber[count]; double testScores[count], avg; ifstream inFile; ofstream outFile; welcome(); if (!inFile){ cout << "Error opening the file" << endl; exit(0); } //end if else{ inFile.open("scores.txt"); while(inFile){ getData(inFile, testScores, idNumber, count); avg = calcAvg(total, count); lowest = getLowest(lowest, count, testScores, lowestLocn); highest = getHighest(score, testScores, highestLocn); displayData(highest, lowest, testScores, idNumber, total, avg, count, lowestLocn, highestLocn); pasteData(outFile, testScores, idNumber, avg, count); } inFile.close(); } farewell(); return 0; } /**~*~*~* /This welcomes the /user to the program *~*~*~**/ void welcome() { cout << "~~Welcome to the program!~~\n" << "==========================" << endl; } /**~*~*~* /This recieves the data from /scores.txt and writes to the /two arrays *~*~*~**/ bool getData(ifstream inFile, double array[],string id[], int &count) { int x = 0; count = 0; inFile >> array[x] >> id[x]; x++; count++; return 1; } //end func /**~*~*~* /This function asks for output file /name and pastes the data to the file *~*~*~**/ bool pasteData(ofstream outFile, double array[], string id[], double avg, int count) { string outFileName; cout << "What would you like to name the output file?" << endl; cin >> outFileName; outFile.open(outFileName + ".txt"); outFile << "The average is: " << setw(10) << avg << '\n' << "===========================" << endl; for (int index = 0; count >= index; index++) { outFile << "ID Number: " << setw(7) << id[index] << '\n' << "Test Score: " << setw(6) << array[index]; }//end for outFile.close(); return 1; } //end bool /**~*~*~* /This function calculates the /average and sends it back to main *~*~*~**/ double calcAvg(int total, int count, int avg) { avg = static_cast<double>(total)/count; return avg; } /**~*~*~* /This func finds the lowest score /in the array and returns it to main *~*~*~**/ double getLowest(int count, double array[], int &lowestLocn) { double lowest; lowest = array[0]; for(int counter = 0; counter < count; counter++) { if(array[counter] < lowest) { lowest = array[counter]; lowestLocn = counter; }// end if } //end for return lowest; } //end func /**~*~*~* /This func finds the highest score /in the array and sends it to main *~*~*~**/ double getHighest(int count, double array[], int &highestLocn) { double highest; highest = array[0]; for(int counter = 0; counter < count; counter++) { if(array[counter] > highest) { highest = array[counter]; highestLocn = counter; } }//end for return highest; }// end func /**~*~*~* /This program displays all the data /at the end of the program *~*~*~**/ void displayData(int highest, int lowest, double array[], string id[], int total, int avg, int count, int lowestLocn, int highestLocn) { cout << "RESULTS: " << '\n' << "=============================" << "Average: " << avg << '\n' << "Number of Students: " << count << "Lowest Score: " << lowest << '\n' << "ID of Lowest: " << array[lowestLocn] << '\n' << "Highest Score: " << highest << '\n' << "ID of Highest: " << array[highestLocn] << endl; } /**~*~*~* / / *~*~*~**/ void farewell() { cout << "Thanks for using my program!" << '\n' << "~~~~~~~~~~~~~~~~~~~~~~~~" << endl; } 

    I keep getting the error: "Call to implicitly-deleted copy constructor of 'std::__1::ifstream' (aka 'basic_ifstream<char>')" when running this program. Thanks!

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

    Why does Stockfish not use std::vector to push moves to the move list?

    Posted: 14 Mar 2019 02:34 AM PDT

    Stockfish is an open source chess engine. Its MoveList class in movegen.h looks a lot like a std::vector<ExtMove>. Why was std::vector not used? Can anyone think of a performance advantage or is this likely to be a legacy thing?

    My hunch is that pushing moves to a list is the most often performed task in a bitboard chess engine.

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

    How do I pick a CSS framework for my site?

    Posted: 14 Mar 2019 04:49 PM PDT

    I built a website with Django. It went pretty well, except for the fact that it looked like and felt like garbage, because I wrote all the CSS and HTML myself and I'm really bad at that stuff.

    I've decided to move to React with a Django backend. I'm comfortable with that decision. The part I'm struggling with is what CSS framework to pick. It seems every expert I talk to has a different recommendation. I've been recommended Bootstrap (obviously), Material (UI and design? I don't know if they're different), Bulma, Foundation and a few others that I don't think I can even remember.

    Our site will require components like sliders and collapsible sections to review data in multi-page forms. You can actually see a prototype of what I've been tasked with building here.

    I'm kinda lost. If anyone has any recommendations for where to go, they would be much appreciated.

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

    What sort of data structure would you use to check the whether a word is a valid English word?

    Posted: 14 Mar 2019 02:48 PM PDT

    Without using a database

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

    How do I connect Postgres to a web page? (HTML, CSS, JS)

    Posted: 14 Mar 2019 12:47 PM PDT

    Hey. I'm completely lost on how am I supposed to interact with Postgres in my web page. I'm using Visual Studio Code on Ubuntu and have my web page set. It currently only validates usernames and password with Javascript from a Javascript object and I want to replace that Javascript object with a real database.

    I looked for videos on Youtube but it seems that JS is rare and it's more common with PHP (I can't not use Javascript because I already registered the language in my class for my final project and now I'm stuck with it).

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

    Why does online identification always require a unique username?

    Posted: 14 Mar 2019 12:35 PM PDT

    Serious question, and I'd like a well thought out answer please.

    Assuming identity is determined by a unique tuple, why enforce an additional requirement for uniqueness on the first item of that tuple?

    Another way to look at it, why treat it internally as a tupple at all? Concat the two strings into a single large string, hash it cryptographically and enforce uniqueness on that alone

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

    Print grid of chess board in java?

    Posted: 14 Mar 2019 12:12 PM PDT

    I'm trying to print a chess board grid but it's only printing the A file, then just prints out 7 more blank lines.

    Here's my code:

    public class Board { public static void main(String[] args) { char rows = 'a'; int col = 0; String spot; int[][] grid = new int [8][8]; for(int i = 0; i <= grid.length; i++, rows++) { for(; col < grid.length; col++) { System.out.print(rows + "" + (col + 1) + " "); } System.out.println(); } } } 

    I'm sure it's something obvious, but I can't figure it out. What do I change to print a full chess board grid?

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

    Scanf and printf to cin and cout

    Posted: 14 Mar 2019 07:40 AM PDT

    Been looking online for examples to help me with my C++ labs. Some people are using scanf and printf in their code, which the material in my class hasn't covered yet. How do the following lines of code translate to cin and cout:

    Scanf("%d",&n);

    Printf("%dx%d = %d, " ,j,i,i*j);

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

    Free PHP login/sign-in library

    Posted: 14 Mar 2019 06:43 AM PDT

    As title says, can you recommend me a good, free PHP library that would handle login/sign-in for me? I've written multiple login/sign-in systems before, but I don't want to design all by myself, and I want to speed up the process.

    Also, sorry for my bad English.

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

    Why did $result->num_rows == true) suddenly stopped working after PHP7 upgrade?

    Posted: 14 Mar 2019 06:03 AM PDT

    I'm looking around for answers, been trying for days to figure this one out but I can't find any kind of documentation on this. See, I upgraded PHP 5.6 to 7.3 and Codeigniter 2.x to Codeigniter 3.x. First I updated codeigniter, tested it, and it worked fine. But when I updated PHP, all hell broke loose.

    The culprit? $result->num_rows == true.

    Every instance where this occurs, it says it doesn't work because I'm trying to get a bool from an array or something like that. Okay, I get what a bool is, and I know what an array is.

    I figured it wanted me to see if it is null due to the bool on array error so all == true became == null. Nothing! I even tried === null for the heck of it and still, nothing.

    I've seen answers that say you should do !empty($result) and $result->result_array() == true but those don't work either.

    The query is fine IF it's true, but if it's false it returns nothing, so it basically loops as if it's true no matter what.

    What does my model look like you ask? Here's a basic example:

    $this->db->select('*'); // Using wildcard for here only
    $this->db->from('users');
    $this->db->where('user_id', $userid);
    $this->db->order_by('user_id', 'desc');
    $this->db->limit(1);
    $query = $this->db->get();
    return $query;

    Then in the controller It USED to look like this.

    $getUserInformation = $this->getcontroller->functionName($userid);

    if($getUserInformation->num_rows == true) {

    // It found it, can do foreach now ie:

    foreach($getUserInformation->result() as $row){

    // Stuff happens

    }

    } else {

    // Did not find it, show something else

    }

    I really hope someone can explain this to me. Thank you for taking the time to read this!

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

    Your go-to high quality keyboard and mouse for coding every day

    Posted: 14 Mar 2019 04:02 AM PDT

    I have been writing on the cheapest shit keyboard+mouse combo for quite a while now but I have had enough!

    Key strokes not registering, mouse wheel scrolling jumping up and down. It's just not acceptable anymore.

    I was looking at blue tooth keyboard+mouse combos at amazon, but didn't really know what to look for.

    So I thought asking the community would be the way to go.

    What has worked for you?

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

    How to increase the Twitter API rate limit

    Posted: 14 Mar 2019 01:35 AM PDT

    I have been working on Twitter API and I write code in Python. I often get Rate Limit error because of too much request at a time. Is there any way around or programming trick to bypass this error. I don't want to pay Twitter to use it's premium API service.

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

    No comments:

    Post a Comment