• Breaking News

    Sunday, April 12, 2020

    How long have you found it typically takes to get certain salaries and positions? Ask Programming

    How long have you found it typically takes to get certain salaries and positions? Ask Programming


    How long have you found it typically takes to get certain salaries and positions?

    Posted: 12 Apr 2020 01:32 PM PDT

    Unhandled Rejections

    Posted: 12 Apr 2020 08:36 PM PDT

    Let me begin by saying I am no way an expert. On a scale from 1-10 I'm like a 2 when it comes to this stuff.

    With that being said, I am running an open source twitter-to-discord bot using docker-compose. I have been having terrible connection problems with it lately. I am usually on a VPN so I think reconnection to a vpn server throws out the 'unhandled rejection' error. The error states: "to terminate the node process on unhandled promise rejection, use CLI flag – –unhandled-rejections=strict."

    When it throws out the unhandled rejection error, the tweets stop streaming to discord, but the bot stays live on Discord, and the container stays live.

    Finally, my question: if I change unhandled rejections to strict, will it terminate the container and cause 'docker-restart: on-failure' to kick in; if it does cause 'on-failure' restart, how exactly to I add the CLI flag to my project?

    Thanks in advance

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

    Is it possible to add pagination inside a bootstrap navigation tab pane using php & html?

    Posted: 12 Apr 2020 08:19 PM PDT

    Hey, I've been working on this one issue for over a week now and at this point I'm not even sure if what I'm trying to do is possible.

    I have an sql query that outputs the name and GPA of about 8000 students into a tab pane. I just wanted to add pages to this data for readability and so it actually loads all the data without timing out.

    I think the problems I've been having stem from the fact that I can't have the page refresh on a button click to get the rest of the data and still have the navigation tab stay open. Googling has lead me to believe that my best chance is to use jquery ajax but I don't know how to do that and I thought I'd at least ask before I invested time learning it to fix this problem.

    I hope I included enough detail. Here's my code if helps.

    <div class="tab-pane fade" id="list-student-gpa" role="tabpanel" aria-labelledby="list-gpa-list"> <?php $link = mysqli_connect(redacted); if (isset($_GET['pageno'])) { $pageno = $_GET['pageno']; } else { $pageno = 0; } $no_of_records_per_page = 25; $offset = ($pageno) * $no_of_records_per_page; $total_pages_sql = "SELECT COUNT(*) FROM users WHERE user_type = 'student';"; $result = mysqli_query($link,$total_pages_sql); $total_rows = mysqli_fetch_array($result)[0]; $total_pages = ceil($total_rows / $no_of_records_per_page); $query = 'SELECT sid, round(avg( point ), 2) AS avg FROM (SELECT * , if(grade="A", 4.0, if(grade="A-", 3.7, if(grade="B+", 3.3, if(grade="B", 3.0, if(grade="B-", 2.7, if(grade="C+", 2.3, if(grade="C", 2.0, if(grade="C-", 1.7, if(grade="D+", 1.3, if(grade="D", 1.0, if(grade="D-", 0.7, if(grade="F", 0.0, NULL)))))))))))) AS point FROM CourseHistory) t1 INNER JOIN users ON t1.sid = users.id_num GROUP BY sid ORDER BY users.lname LIMIT '.$offset .', '. $no_of_records_per_page. ';'; $result = mysqli_query($link, $query); echo "<table><tbody><tr><th>Name</th><th>GPA</th></tr>"; while($row = mysqli_fetch_assoc($result)){ $name; $nameurl; $query2 = "SELECT * FROM users WHERE id_num = ". $row['sid'] ." ;"; $result2 = mysqli_query($link, $query2); while($row2 = mysqli_fetch_assoc($result2)){ echo "<tr><td><a href='?page=student&userid=". $row2['email']."'>". $row2['fname']." ". $row2['lname']."</a>". "</td><td>".$row['avg'] ."</td></tr>"; } } echo "</tbody></table>"; ?> <?php echo"<div>Page ".($pageno+1)." of $total_pages</div>"; $links = ""; for($i = 1; $i<=$total_pages; $i++){ $args["page"] = "reports#list-student-gpa"; $args["pageno"] = $i; $target = http_build_query($args); $links .= mkLink($i, $_SERVER['SCRIPT_NAME']."?".$target, "style='margin-right: 8px;'"); } echo $links. divWrap($links, "class='row'"); ?> </div> 
    submitted by /u/florastiel
    [link] [comments]

    What are the things that I need to know today to get a job as a programmer?

    Posted: 12 Apr 2020 07:58 PM PDT

    Java library for evaluating algebra from String?

    Posted: 12 Apr 2020 07:00 PM PDT

    I was wondering if there is any of the shelve solution which solves from String to double. I have found one named Javaluator, but it does not support this:

    Use case: 91/2 OR sqrt(9)

    result: Pair of 3 and - 3 or something equivalent

    I need this to figure out if given set domain and codomain with a formula f(x) forms a function. Naturally, it does not if there are two answers. But for example, when f(x) = 91/2 * 0 + 1 * x, the answer will be one. So it once again can form a function.

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

    getTexture vs textureGet? That is, noun-verb or verb noun? what is better?

    Posted: 12 Apr 2020 12:31 AM PDT

    I'm working on a team and i'm in charge of creating a library that will be used by everyone else. I think textureGet makes a lot of sense to me because when you're using intellisense, and you want to know what you can do with all things textures, you just need to type in "texture" and get the rest from auto complete.

    on the otherhand, it's more common to see verb-noun, that is "getTexture", and seems to make more linguistic sense. What do you think?

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

    Best Programming Language to learn for a beginner?

    Posted: 12 Apr 2020 05:55 PM PDT

    I have always wanted to get into coding and programming but i have never actually gotten round to it, now my country is on lockdown due to COVID-19 i figured this would be a great time.

    I am looking for some advice/guidance as to what programming language i should learn and any useful links that may help me along the way - websites, youtube tutorials etc.

    Any advice is appreciated!

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

    Need help choosing programming language

    Posted: 12 Apr 2020 05:44 PM PDT

    I recently graduated from the coding bootcamp focused on Ruby on Rails. I started checking job openings in Austin TX, where I live currently and noticed that no one is looking for Ruby developers. Employers mostly want Java, Python, C (++, #), JS. Should I focus on practicing Ruby and making my projects with RoR or should I switch the programming language and teach myself something like Python (I studied it a bit before). How about solving algos? Should I practice solving them in Ruby, or Python would be better for that?

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

    Is this something companies would find useful?

    Posted: 12 Apr 2020 05:04 PM PDT

    So, I am nearly completing a final project in school that translates from Intel assembly to MIPS assembly. It's a very limited translator, and only does very formulaic translations. It's intended as a bit of a proof of concept.

    Anyway, I'm starting to notice that most of the actual code isn't going to change between different assembly languages. So if I were to write another translator from MIPS and Intel, most of the code would be kept almost exactly the same. Most of the actual translations and conversions can be defined using XML.

    Having given that background, this is my question. Would a translator like this be useful to companies (embedded software and anywhere assembly is actually used)?

    This would assume that the actual program could be written in such a way that the actual translating and converting is defined via XML. It also assumes that any instruction parsing can be generalized enough that you wouldnt need to rewrite it every time you wanted to translate from a new language. It also assumes that there would be an optimizer for each language that would run through and optimize the translation for the new architecture.

    I started this for fun, but I'm just wondering if I should try creating a generalized translator (mine is specifically designed to go from intel to MIPS) after I turn in my project. If it's not something that would be useful, I would find a new project instead since I've already got my proof of concept.

    I'm also hoping to hear from people who currently work jobs which require assembly programming.

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

    How to learn python

    Posted: 12 Apr 2020 03:57 PM PDT

    Please I'm trying to learn learn python programming language but don't know free site to start from and how to start . Need options..

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

    Most important features for text editors

    Posted: 12 Apr 2020 03:02 PM PDT

    Hi!

    I'm writing a new text editor from scratch using JavaFX for learning purposes. I'd love to hear what features you find most useful in the text editor of your choosing so I can (attempt) to create them as well!

    Some features that came to mind:

    Regex tester. Bash color code conversion. Delimiter parsing for easier reading.

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

    I'm a beginner and I need help with my python project

    Posted: 12 Apr 2020 10:19 AM PDT

    Guys, I need help. I'm a beginner and I'm making a fake love calculator. And I want to calculate the difference between number of characters between one name and another. and based on the difference It will give the "percentage of love". And I don't want the program to end just after it gives me the result. Here's the code:

    import random

    # calculator

    # intoduction

    print ('Welcome to Love Calculator')

    print ('You will have to insert your name and your lovers name')

    # name input

    name_u = input('What is YOUR name?: ')

    name_them = input ("What is your lover's name?: ")

    len(name_u)

    len(name_them)

    if len(name_them) - len(name_u) == 2:

    print random.randint(50, 100)

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

    New coder. Learned HTML and css. But I need help understanding what I need to do for my goal project.

    Posted: 12 Apr 2020 12:57 PM PDT

    A executable program, that can be run on Windows and Mac. Accessible through USB. Filled with GIFS, jpegs, articles, a radio, and videos. What language should I start learning to pull this off? Is this even possible? Please help :(

    EDIT: forgot to add I know JavaScript too

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

    (Help Needed) How can I create a linked list to store the structs I read from file?

    Posted: 12 Apr 2020 12:26 PM PDT

    Hello all, I need help re-creating a linked list from this code

    #include<stdio.h> #include<stdlib.h> #include"Cars.h" void write_to_file() { FILE* file = NULL; file = fopen("Cars.dat", "wb"); Car c = { "Toyota", "Civic", "black", 5, 50000 }; size_t ret = fwrite(&c, sizeof c, 1, file); Car d = { "Toyota1", "Civic1", "Red", 2, 55000 }; ret = fwrite(&d, sizeof d, 1, file); fclose(file); } void print_cars(Car *c, int count) { FILE* f = fopen("output.txt", "w"); for (int i = 0; i < count; i++) { fprintf(f, "%s %s %s %d %f\n", c[i].model, c[i].manufacturer, c[i].color, c[i].seatCapacity, c[i].price); } fclose(f); } void read_from_file() { Car c; size_t SIZE = sizeof c; size_t ret = 1; FILE* file = NULL; file = fopen("Cars.dat", "rb"); int count = 0; do{ ret = fread(&c, sizeof c, 1, file); if (ret != 1) break; count++; //printf("%s %s %s %d %f\n", c.model, c.manufacturer, c.color, c.seatCapacity, c.price); }while(!feof(file)); fclose(file); if (count == 0) { printf("No cars in the file provided\n"); return; } file = fopen("Cars.dat", "rb"); Car* cars_array = NULL; cars_array = (Car *)malloc(count * SIZE); ret = fread(cars_array, SIZE*count, 1, file); //printf("%d\n", ret); print_cars(cars_array, count); } int main() { //write_to_file(); read_from_file(); return 0; } 
    submitted by /u/jorge407
    [link] [comments]

    Review of Software project conclusion

    Posted: 12 Apr 2020 12:17 PM PDT

    This is a lot to ask but I was wondering if someone could review my conclusion chapters for my software project report and possibly give me other topics to write about. This is for my final year project. The lecturer assigned to me only said that it needs more work.

    I can't think of anything else I could write about. There are issues with grammar, I know that and I can fix that myself. My project is for game creation using Opengl and creating my own framework, no knowledge of this technology is needed to read the document, the experience of topics to talk about when a project concludes is more what I am looking for.

    the conclusion is 1700 words so I know this is a big ask and its ok if you cant, I honestly believe that nobody will bother, I just thought I have nothing to lose for asking

    The essay can be found here

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

    Stupid question...what's the point of a cloud CMS?

    Posted: 12 Apr 2020 05:47 AM PDT

    I don't get this.

    I get the benefits of a CMS generally, but I'm seeing many on the cloud. It seems like you just end up paying big sums for a CMS this way, especially as you grow? What would be the benefit to this and what's the point?

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

    I need help with an estimation of how hard this would be

    Posted: 12 Apr 2020 09:20 AM PDT

    I work for an European archive and i really want my archive to have an app with this function but in a another language ofc. But im a historian and so i have no idea as to the complications of such an protect, is there anyone here that can advise me on the the amount of work this would take?

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

    What text editor should I use

    Posted: 12 Apr 2020 09:10 AM PDT

    I want to get into programming so I looked up stuff about Linux text editors A lot of people talk about vim and how efficient it is but I just can't get my head around it. Vscode is also talked about alot but it is managed by the big people over at Microsoft so I don't want to use that either, what should I use?

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

    How would I store a large hash table?

    Posted: 12 Apr 2020 03:00 AM PDT

    So I'm making my own implementation of a hash table (I'm using python 3) and was wondering how I'd store it in long term? I would potentially be storing very large amounts of data and it would obviously be impractical to store it all in memory while the program is running and I need the hash table to be kept when the program stops running.

    I wondered about some sort of SQL database but was unsure whether this was the best way to do it, and if it is the best way how to go about implementing it.

    Any help or tips provided would be much appreciated.

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

    Best way to go about storing Key-Value data in database Java Spring

    Posted: 12 Apr 2020 08:26 AM PDT

    I have a map <String, Integer>. The integer is a counter and I need to be able to store and update this whenever something with the same key is added. How would you go about storing the values of a Map in a database and then incrementing the value using Spring Boot? I was considering a HashTable of sorts but I'm not sure what the best way to increment the value in the database would be

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

    What language do I use for my project? Or do I use multiple?

    Posted: 12 Apr 2020 12:30 AM PDT

    Hey there, I have a project that I am working on that deals with a butt load of csv files.

    I was thinking of passing the CSV files into C and organizing them as I please (Make profiles, calculations, etc)

    After organizing the data, I wanted to take the data and make it a phone application using flutter or react (Just to make the application once)

    Would flutter and react be able to constantly read the csv files once in a server? (Very noobie I know)

    Is this the right way to go about it? Or would I use flutter to organize the csv files directly?

    Thank You.

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

    Wiki/issue tracking platform recommentation?

    Posted: 12 Apr 2020 02:43 AM PDT

    Hey AskProgramming,

    Sorry if this is the wrong sub for this question.

    I'm part of a development team in a medium sized company, and our team creates software solutions to be used in-house. I am looking for a platform where we can distribute information about each software, and also let users log problems or questions they had when using it. Basically, a platform that combines the Wiki and the Issues functionality of GitHub, without the rest.

    Is there something like this out there that you can recommend?

    Thanks!

    submitted by /u/Abject-Astronaut
    [link] [comments]

    How much of this kind of data do mobile apps gather?

    Posted: 12 Apr 2020 02:26 AM PDT

    For years I've been wondering whether mobile apps like Instagram or YoutubeMusic or anything actually gather data about the specifics of our usage. For example

    • Does Instagram record the searches we do on the search bar and delete without clicking anything.
    • Does YtMusic track how we stopped listening to music (got a call, headphone disconnected, manually paused)
    • Does Twitter record how much time we spend on someone else's "likes" tab.

    I know that when we write something on the "what's on your mind" space on Facebook and delete it, they keep the data anyway. I'm especially curious if this is a commonplace thing in data extraction from the people that apps do

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

    3D Scene generation with pure coding and API access, any suggestions?

    Posted: 12 Apr 2020 05:19 AM PDT

    I'm looking for a way to generate 3D scenes (including objects, lights, textures) with pure coding. Something like https://threejs.org/ but with fewer bugs and less frequent backward-incompatible changes every few weeks.

    I need to be able to define a large set of rules using programming, such as the shape/size/texture of a sphere. I also need to have a way to mass-generate, or on-demand generate the scenes.

    An example would be a way to generate 10,000 images of spheres on top of cubes, where every image has a sphere and a cube with different dimensions or textures. The dimensions, textures, or locations will of course be programmed by me into various constraints. I don't expect any magic. The generated images should be automatically saved into a folder.

    Also, it should be able to run on a server with no user interface. Think "cloud". Sort of like an API. I should request "sphere-over-cube-v1.2" and it should execute the "sphere-over-cube-v1.2.code" file to generate an image, and save it somewhere where I can retrieve.

    What software solution (or combination) do I have access to?

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

    No comments:

    Post a Comment