• Breaking News

    Tuesday, March 17, 2020

    Please, please, please, I am begging you, if you write programming blog posts and have some sample code, please include the appropriate import/using statements for the functions you are calling in your code samples Ask Programming

    Please, please, please, I am begging you, if you write programming blog posts and have some sample code, please include the appropriate import/using statements for the functions you are calling in your code samples Ask Programming


    Please, please, please, I am begging you, if you write programming blog posts and have some sample code, please include the appropriate import/using statements for the functions you are calling in your code samples

    Posted: 17 Mar 2020 03:37 AM PDT

    I spent my work imposed isolation day yesterday using the very cool VSCode Remote-SSH feature to do some .Net Core programming on one of my Raspberry Pi's.

    Unfortunately the C# extension doesn't quite work as expected using Remote-SSH, so there is no Intellisense yet, so you will be programming blind.

    Given the fact that it was all very new to me I spent a lot of time googling for code samples on how to do some things. There were some very helpful posts with samples of the code I was looking for, but without exception, none of the samples included the appropriate using statements as part of the sample.

    This seems to be the norm when people write blog posts with sample code, they never, ever, ever include the import or using statements for the function they are calling. I am sorry, but there is no way I can be expected to memorise the entire .net framework API so that I immediately know which assembly the function you are using in your code sample comes from.

    Please, help us out. If you write blog posts with code samples, please include the names of the libraries or assemblies you are using

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

    How can I understand a friend's depression/medication in terms of a neural net?

    Posted: 17 Mar 2020 10:59 PM PDT

    The chemical composition of their brain is such that the accuracy of their outcome (mood) relative to the desired outcome is significantly impaired. They take medication, which changes the levels of certain neurotransmitters between neurons (nodes) in their brain (changing coefficients/weights of nodes to amplify/dampen input?) to make their outcome more accurate relative to the desired outcome.

    I definitely don't understand mental health or depression and I don't really know neural networks that well either, but it seems like if depression could be articulated in terms of a neural network, I'd be able to understand better. Like, why can't you just train yourself out of depression? What is the medication doing analogous to something done to a neural network?

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

    How To Make Random Character Art Generator

    Posted: 17 Mar 2020 09:22 PM PDT

    Hello!
    Due to my classes moving online and mt not having to return to school for six months due to coronavirus- I have decided to begin working on a game concept I've had for a while. I have been a director and sole artist on a few game jams- but I am no programmer. Because of this, I know my scope for this idea is large and likely will take several years to finish. I want to make a harvest moon/animal crossing inspired 2D MMO that has an emphasis on breeding better crops/livestock to sell to other players. The first mechanic I have begun to work on is dog breeding. Right now I have 12 gene loci (very roughly based on real dog genetics) that control coat color, pattern, and other physical traits. I had an easy time recruiting programmers for my past games (and may have an even easier time now due to many being off school/work) but I think this was mostly due to having created the majority of my art assets and having them all demonstrated in a gif. I want to create the art for all the different traits but would like to know if there is an easier way to compile them to show them off to potential programmers? I was thinking like a generator style program. Any advice is much appreciated, thank you.

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

    What sort of legal verbiage is needed when releasing an open source project related to, but not endorsed by, a third party?

    Posted: 17 Mar 2020 07:55 PM PDT

    I've created a package dedicated to reading data stored in files created by a third party software. I plan on open-sourcing the package, but there's really no way around using that software and company's name in the documentation. I've reached out to them to see if they had a preferred disclaimer but never heard anything back.

    With past projects a company will usually provide me with something like:

    This project is an independent entity and has not been authorized, sponsored, or otherwise affiliated with COMPANY, Inc. SOFTWARE is a trademark of COMPANY, Inc., registered in the U.S. and other countries.

    I always feel better knowing that, by using the disclaimer that they provided, I've done things right. Maybe I'm being way too cautious here. Should I just throw what I quoted up and change the name? Is there a go-to generic disclaimer that can be added so I don't step on any toes?

    (the rest of this post isn't important or related to the question, feel free to skip)

    For context, I'm not trying to read PSDs and create a photoshop clone here. These files store huge amounts of data collected by a network of dataloggers and sensors. The data is stored in a sort-of-csv format with a more complex header that defines the data in that csv, so it's not some kind of "secret herbs and spices" kind of file, it's just a weird file that they create. There are other formats that are similar but with slightly different header formats, and some of the loggers use those formats instead, and some of them store their data in binary, and some with no header at all. I need to read those files into a language that they don't support. With the data stored in so many different formats it's a huge pain in the ass, which is why I created this package - to assuage the ass. It feels good. I'd like to assuage more asses. That's why we open source things, right?

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

    Data access object, inspiration needed about file and disk access approach

    Posted: 17 Mar 2020 05:26 PM PDT

    So I have this neat file temp file uploader app that I'm performing spring cleaning on. Now part of that spring cleaning is adding data access objects (and inevitably testing). Now this app there are times where the database and disk is accessed at the same time, like here .

    Now I'm unsure of how to approach this. I could combine them so a delete method removes them both in the database and on disk at the same time, or I could have two objects where one accesses the disk and the other the database. Now the second one does seem a lot more ideal but I'm open to inspiration

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

    MongoDB connections

    Posted: 17 Mar 2020 04:55 PM PDT

    I have two connections to a mongoDB database, one for reading and one for writing. If I were to open both connections, and then write to the database, would I have to re open the reading connection to get the updated database information, or will the original connection for reading automatically handle the new data that was written? Thanks!

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

    How did you fall in love with programming.

    Posted: 17 Mar 2020 07:59 AM PDT

    I'm a student who's about to finish his CS degree, and for the last year or more I've been feeling this sense of I'm never going to get good at this. I used to love coding and it would always feel so magical. Now as I'm preparing for interviews, leaning algorithms and solving leetcode, learn this implementation or that. It's becoming to feel more like a chore and I'm not sure how to get back to having fun again.

    I'd be happy to try/do any advice on getting better.

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

    Python Text-Based Game with GUI Resources?

    Posted: 17 Mar 2020 03:38 PM PDT

    I and a friend are going to make a text-based RPG game for fun.

    We're looking to have it work in real-time like a MUD, with a GUI that includes a minimap, health, and buttons for directional movement and such. Honestly, the GUI is the one we're having the hardest time finding something for.

    Can you guys think of any good packages or engines that would lend themselves pretty well to this? We were considering working with Python since its what we're most familiar with.

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

    Electrical vs Electronic Engineering

    Posted: 17 Mar 2020 03:14 PM PDT

    I had no idea there was difference between electrical and electronic engineering, simply because I didn't know about electronic engineering until I've found it out thanks to IEEE. Will I learn about electronic engineering in Computer Science or in Electrical Engineering? Maybe even both? I think it's EE for... well quite obvious reasons, but I have to be sure, that's why I am asking.

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

    ecommerce platform?

    Posted: 17 Mar 2020 02:30 PM PDT

    I'm looking for something where after a customer makes a purchase sql tables are updated automatically. help?

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

    SQL Database

    Posted: 17 Mar 2020 04:46 PM PDT

    Write a query to identify the single track that has no composer and is on both the Grunge and the 90's music playlist

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

    Why is it that the first input returns 6 while the other input returns a float when using template in C++?

    Posted: 16 Mar 2020 10:38 PM PDT

    Source code #include<iostream> using namespace std;

    template <typename T, typename U> T getBigger(T input1, U input2); int main() { int a = 5; float b = 6.334; cout<<"Between "<<a<<" and "<<b<<" "<<getBigger(a, b)<<" is bigger.\n"; cout<<"Between "<<a<<" and "<<b<<" "<<getBigger(b,a)<<" is bigger.\n"; return 0; } template <typename T, typename U> T getBigger(T input1, U input2) { if(input1 > input2) return input1; return input2; } 

    Output

    Between 5 and 6.334 6 is bigger. Between 5 and 6.334 6.334 is bigger. 
    submitted by /u/PewPaw-Grams
    [link] [comments]

    Instagram Bulk Auto Posts

    Posted: 17 Mar 2020 12:54 PM PDT

    Hey guys,

    I'm sure you've come across many Instagram accounts with ridiculous amounts of posts, for example, niepsclub (38.8M) and I was wondering, how?

    I'm trying to recreate this and all the GitHub repositories I've found either have really slow intervals which break when I adjust or they're outdated. I'd highly appreciate if someone can guide me to a tool or an app or a Git repository or any way to do it. Any feedback is highly appreciated.

    Thank you!

    P.S. I have a good background in Python.

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

    Deciding on which integration method should be used

    Posted: 17 Mar 2020 12:54 PM PDT

    Currently, I'm learning about top-down, bottom-up and sandwich integration, I can't find anywhere online that tells you when to use which integration should be used, could someone explain or direct me to a website, it would be much appreciated

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

    Why doesn't an empty variable count as null in javascript?

    Posted: 17 Mar 2020 12:04 PM PDT

    I am trying to run this javascript function on my site.

    // Username variable/prompt
    var username = window.prompt('Choose a Username!');
    // checks if username has been entered
    if (username != null) {
    // if a username has been entered it alerts a welcome
    alert('Username is' + ' ' + username);
    // if no username is present it alerts an error
    else {
    alert('Enter A Username...');
    }

    So it shows a prompt saying, "Choose a username" there is a box that you write in. But the problem is that it also shows "Ok or Cancel" If you click cancel it counts it as null, which is good. But if you click OK, it counts it as an empty variable, but it still works, it does not consider it null. So I added this else if.

    else if (username == ' ') {
    alert('Enter A Username...');

    But it still does not work. Can anyone help me?

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

    Lost my way

    Posted: 17 Mar 2020 11:26 AM PDT

    I began my journey into the CS field after making a few static websites. I decided to follow up on this interest by joining a higher diploma course in software engineering. Little did I know that the course got totally messed up due to some school issues and also the political climate at the time which made me frustrated and lost. Despite after spending 18 months in that course i still cannot make anything other than static websites. I have tried many online programs and bootcamps but failed to better myself. I decided to start developing based on ideas that i had but i keep on losing my spirit because of the massive knowledge gaps i have. I believed that with practice i will be able to get a hand of it but its been almost 2 years now and i still google the same things again and again.

    I would like to know if anyone has any advice or tips that I can follow to find my way back. I believe this is my last strand of hope to prove that I am really not dumb

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

    Team sorting program?

    Posted: 17 Mar 2020 10:12 AM PDT

    I play with a group of people online who host events in a game. The way it works is that multiple groups all bring a certain amount of people, and we have to sort everyone into two more or less equal teams. Is there a program out there that will be able to handle this automatically, or am I going to have to attempt to make it myself? I just finished my first python class, so I'm a little worried it's out of my skill range. The other fly in the ointment is that certain groups have special roles each week, so two groups with the same role can't be on the same team.

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

    How many API calls in a web app is too many?

    Posted: 17 Mar 2020 07:20 AM PDT

    A web app I'm working on uses several microservices that were designed for maximum encapsulation. This has resulted in the web app needing to make many, many HTTP calls to get certain data. In fact sometimes it is so many that we've hit the browser limits, and even when we don't the app can become very slow and failure-prone, because some of the calls rely on results from another.

    I guess my question is, is it really normal to have 25+ HTTP calls in a web app in the microservice age? And if not, how do you overcome the hurdle of fragmented data that requires many calls to properly composite?

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

    Is Ruby/Rails Similar Enough to Elixir/Phoenix?

    Posted: 17 Mar 2020 06:54 AM PDT

    I've been mainly working on Elixir/Phoenix projects but recently my company acquired a rather large suite that is written in Ruby/Rails. How similar are the two? Will I be able to start working on it with some basic syntax knowledge or should I dive deep into the language/framework before I touch the codebase. Thanks.

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

    Request for tips and pitfalls in writing my first driver.

    Posted: 17 Mar 2020 06:16 AM PDT

    I was told by Samsung chat that there is no way for me to connect my computer to my Smart TV (Model: UN50NU7400F). I believe this to be true using their tools and services. Considering that my TV can receive a signal from the internet and display it on itself (stream Netflix and others) I know there is a way to do this with my computer. (Note: I don't mind high latency).

    I assume I'll have to write a driver or application for either my computer and or the TV. Could someone people who have done something similar give me some tips to follow and and pitfalls to avoid when I launch myself into this project.

    Reason: I'm now working from home with no space for a desk and monitors. I want to convert my TV into a second monitor and avoid buying a long hdmi cable with a vga to hdmi converter (when my dogs play they tend to trip over wires). Note: Work laptop has no hdmi port.

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

    Need help with a college assignment

    Posted: 17 Mar 2020 05:31 AM PDT

    The exercise gives me this: Create a 3-bit clocked sequential circuit with one input line X. When X=0, the circuit goes through the state transitions from 000 to 101 to 010 to 111 to 100 to 001 to 110 to 011 and then back to 000, and repeat. When X=1 the state of the flip flops does not change. I cant seem to know how to start the first question which says create the state diagram and table of the circuit. I have been for hours searching online how to do this and reading the theory and im getting even more confused. Anyone would care to help or explain.

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

    [PHP] Need to open a page only if certain data was filled into a login form

    Posted: 17 Mar 2020 04:58 AM PDT

    So I want to open a new page called adminpage.php only if the username filled into the main page's login form is "admin" and the password is "pietje".
    I thought about using an if statement, so here is what I currently have:

    <form action="adminpage.php" method="post"> Username:<br> <input type="text" name="username"><br> Password:<br> <input type="text" name="password"><br> <br> <input type="submit" name="submit"><br> </form> <?php if ($_POST["username"] == "admin" && $_POST["password"] == "pietje") { header(Location: adminpage.php); } ?> 

    For some reason, adminpage.php opens up regardless after hitting the submit button of the login form and it doesn't matter what I pick as a username and password. Does anyone know what I'm doing wrong?

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

    My school uses a computer program for tests which basically removes all basic functions like copy paste and forces fullscreen. How can i bypass this?

    Posted: 17 Mar 2020 08:34 AM PDT

    Virtual machines are blocked and you cant use VPN with it. Are there any programs which I can put the test program in? Or any other way to bypass it?

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

    What is creativity ??

    Posted: 17 Mar 2020 03:55 AM PDT

    People say that every programmer should be creative to write good codes , all i know about creativity is art and music and i was bad at these stuff at school and i wasn't even interested but I was good at math if not great, so what dose creativity mean when it's come to programming and how to improve creativity ???

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

    No comments:

    Post a Comment