• Breaking News

    Wednesday, January 13, 2021

    Github student education pack Ask Programming

    Github student education pack Ask Programming


    Github student education pack

    Posted: 13 Jan 2021 11:25 AM PST

    Had any of you tried github student pack? I got A Question if i registered but didn't use any of the provided 1 year or (any number )of months Will the offer go like I can't apply to that offer ?

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

    I’m trying to build a simple turn based rpg game, using HTML and CSS. As a back-end code, to calculate dice rolls, would Javascript or python work better? Alternatively could I use both at the same time? I’m a novice to most back-end coding and programming languages.

    Posted: 13 Jan 2021 08:35 PM PST

    Array and Loop: Can someone help me create an algorithm for my code please? I'm so confused on how to write proper algorithm :( Thanks!

    Posted: 13 Jan 2021 08:32 PM PST

    Topic: Array and Loop

    Title: ARRANGING VALUES FROM INPUT IN DESCENDING ORDER

    Code:

    #include <iostream>

    using namespace std;

    int main() {

    int num[20];

    int a, b, descOrder;

    for (a = 0; a < 20; ++a)

    cin>>num[a];

    for (a = 0; a < 20; ++a)

    {

    for (b = a + 1; b < 20; ++b)

    {

    if (num[a] < num[b])

    {

    descOrder = num[a];

    num[a] = num[b];

    num[b] = descOrder;

    }

    }

    }

    cout<<"THE NUMBERS IN DESCENDING ORDER : "<<endl;

    for (a = 0; a < 20; ++a)

    {

    cout<<" "<<num[a]<<endl;

    }

    }

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

    Ultrawide VS multiple monitor set-up: Your thoughts?

    Posted: 13 Jan 2021 12:33 PM PST

    I'm currently using 17.3 laptop screen (MSI G70) and def planning to upgrade in the future. Based on DEV community set-up pics, I've seen a lot of variation, so I would love to ask you for help! 🤔

    Would you recommend single utrawide: ![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/sk0ochapmxaboywtb2bi.jpg)

    over three monitor set-up?

    ![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/oio0rilv2z44pfqohny2.jpg)

    And what would be the reason behind your recommendation, considering web development as a main purpose for it?

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

    Looking for a bare-bones IDE/C++ compiler for quick tests

    Posted: 13 Jan 2021 03:02 PM PST

    I use Visual Studio C++ for my big projects, but sometimes I just want to compile a tiny bit of code to test something out. At the moment I use whichever online C/C++ compiler comes up first in a search, but is there an installable IDE/compiler you'd recommend?

    I just want to edit a "file" - but NOT have to save it anywhere, or create a project folder, or anything like that - compile it, run it, and see the result in a console, preferably all in the same window.

    Edit: syntax highlighting would be nice, too.

    If there's a solution that will also do PHP, so much the better...

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

    Need help with html/javascript

    Posted: 13 Jan 2021 06:21 PM PST

    I'm very new to programming and am working on a project where I need to have a page visit counter which I got from here: https://countapi.xyz/

    I created a java script file and put the required code in and got it up and running, however I am running into an issue with the counter being updated on every page on my site as opposed to just the page where where the counter is on my HTML.

    I remembered how for python if you don't set __name__ == '__main__' you can ran into an issue with all the code will be called when imported, is that the problem here? If not please help me fix! Thank you

    Code:

    HTML(only the counter shown):

    <div class="counter" id="count">0</div> 

    JS(This is the whole page btw):

    const countEl = document.getElementById('count'); updateVisitCount(); function updateVisitCount() { fetch('https://api.countapi.xyz/update/mywebsite/page3/?amount=1') .then(res => res.json()) .then(res => { countEl.innerHTML = res.value; }) } 
    submitted by /u/VGAGabbo
    [link] [comments]

    If I were to create a Social Media website with an website or app ( like appypie), and it becomes popular, can they have rights over my company because I used there platform to create it?

    Posted: 13 Jan 2021 02:19 PM PST

    Anyone familiar with Pine Script? Is there a way to stack plotshapes?

    Posted: 13 Jan 2021 11:22 AM PST

    I want to show two triangles, one on top of another. What's the cleanest way to do this?

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

    SIP controlled relay

    Posted: 13 Jan 2021 04:16 PM PST

    Hi!

    I am currently in the middle of looking for a solution to trigger a relay when a VoIP call comes in, more specificly it has to be triggered by the SIP, I know there are many solutions out there but I cant pay the average price of 500€, that's why I am looking for an alternative and the PI was the first thing that came to my mind.

    If anyone has done something similar or knows a already existing solution that I can afford, please tell me, it's for a call-light for my grandma (she can't hear too well, so she needs a visual aid)

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

    Best barcode format for simple string of numbers with a separator?

    Posted: 13 Jan 2021 03:50 PM PST

    Wow I didn't realise how varied the world of barcodes was.

    I'm trying to encode a simple string of numbers (date, product, container type, yard, gross and tare weight - all represented as whole numbers) into a bar code I can scan into an excel sheet and then used data validation to turn the bar code back into that information.

    I've tried the most common types of barcodes (code 39, code 93, 128-a, UPC, codabar, and simple 1d barcode), but my bar code scanner won't recognise (beep) them. I've tried other known working bar codes like supermarket receipts, and they will scan.

    I've researched the start and finish codes but that doesn't seem to work, I don't really need checksum as this is all just internal stocktaking.

    Can anyone help me?

    Thanks :)

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

    SearchView to ListView with custom adapter

    Posted: 13 Jan 2021 03:19 PM PST

    I am just beginning with Java (Android development) and I have been trying for almost a week now to add a Searchview to a listview with custom adapter... How do I do it??

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

    Need help understanding the run sequences using classes in a single Python file

    Posted: 13 Jan 2021 03:18 PM PST

    I'm currently struggling at understanding why a class keeps being run before the main menu, I am required to build a music play list however, when I try to give the user the options menu, the inherited class is always run first, I haven't added anymore classes or such because I know the system will run through them all till it reaches the main menu. Anyone here able to please explain where I am going wrong? Please!

    import os
    import sys
    class MyMusicLibrary:
    def __init__(self, tuneName, tuneGroup, tuneYear, tuneGenre, tunePlayList):
    self.tuneName = tuneName
    self.__tuneGroup = tuneGroup
    self.__tuneYear = tuneYear
    self.__tuneGenre = tuneGenre
    self.__tunePlayList = tunePlayList
    self.add = "You added, Song Name: " + tuneName + ", Song Group: " + tuneGroup + ", Song Year: " + tuneYear + ", Song Genre: " + tuneGenre + ", Song PlayList: " + tunePlayList

    menu_check = True

    ##class here keeps getting priority over my menu below, I've tried putting the menu above but it does not detect the class if so.

    class addSong(MyMusicLibrary):
    pass
    tuneName = input("What is the name of the song? ")
    tuneGroup = input("Who sang the song? ")
    tuneYear = input("What year did the song come out? ")
    tuneGenre = input("What genre is the song? ")
    tunePlayList = input("What playlist would you like to add it to? ")
    song = addSong(tuneName, tuneGroup, tuneYear, tuneGenre, tunePlayList)
    print(song.add)

    def mainMenu():

    print("Welcome to My Music Library!")
    print("Please select from the options below (1-6)\n")
    print(40*"-")
    print("1. Add a new song to the library")
    print("2. Display all songs in your library")
    print("3. Search for and display a song")
    print("4. Search for and display all songs from a specific genre or playlist")
    print("5. Delete an song from your music library")
    print("6. exit")

    while menu_check:
    mainMenu()
    choice = input("\nEnter your choice [1-6]: ")

    if choice == '1':
    print(25*"-")
    print("You have chosen to add a new item to the library")
    addSong()
    elif choice == '6':
    print(25*"-")
    print("Have a nice day! :D ")
    exit()
    else:
    input("ERROR! Invalid input. Press any ket to conintue......\n")

    if __name__ == '__main__':
    mainMenu()

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

    New to html and css an could need your help

    Posted: 13 Jan 2021 11:17 AM PST

    So this is a school project were we are supposed to make our own CV in brackets, and I had this ide to add an vertical line to sepperate the text and a skill bar but after I added the line it just went downhill, bc at first my text that I wrote didn't want to be on the leftside of the line but when i finally got it to be there the picture, my name and other information just fell into a horizontal line at the top of the page, so I left it be and went on to make the skill bar because I'm a little bit short on time and when I finnaly got the skill bar finnished it didn't want to align vertically and now it just lays on top of eachother.

    PLEASE help, I have to hand in this stuff today.

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

    [iphone apps] Would most older/used Macs would do for developing apps for iPhone?

    Posted: 13 Jan 2021 02:41 PM PST

    Never had a Mac, building an Android app and need to make an iPhone counterpart. Would most older/used Macs would do for developing iphone apps?

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

    Who is the Guru in your office and how good is he?

    Posted: 13 Jan 2021 06:03 PM PST

    Pretty printing a Binary Search Tree in C

    Posted: 13 Jan 2021 08:57 AM PST

    I am currently learning C and as a challenge I want to implement a function that prints a BST in the style of the tree command found in Linux and Windows. The "correct" c++ code is simply

     void printTree(Node *node, std::string indent, bool isLeft ) { if (!node) {return;} std::cout << indent << "|___ " << node->value << "\n"; printTree(node->left, indent + (isLeft ? "| " : " "), true); printTree(node->right, indent + (isLeft ? "| " : " "), false); } void printTree() { printTree(root, "", false); } 

    but I am having trouble converting this to C. Since C does not have strings I am attempting to replicate it using a char buffer but the issue is that unlike std::strings, char arrays decay into pointers and so updating the char array in one function call updates it everywhere. Is there a way I can replicate this in C?

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

    How do you take screenshots?

    Posted: 13 Jan 2021 12:33 PM PST

    In the past I've tried different methods from PrintScreen key to Lightshot extension in the browser. Tho, in first way I ended up using image editor to crop, in second - I was limited to browser only.

    Since I'm on Win10, lately I use Win+Shift+S shortcut, select the area and image gets saved in Clipboard. If that's enough, I paste it and done. If not - I use PasteIntoFile to create a local image file without any image editor.

    Any other methods you would recommend to try, considering quickness, ease of use and image accessibility after the capture?

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

    Need to remove an array from an array by compare the text. But my remove method doesn't work. Any solutions why?

    Posted: 13 Jan 2021 04:23 AM PST

    var removedPerson = $(this).parents(".flexContact").text(); console.log(removedPerson); //Zu löschende Person in der Kontaktliste $(this).parents(".flexContact").hide("slow"); var arrayPersons = []; arrayPersons = JSON.parse(localStorage.getItem("persons")); //console.log(arrayPersons); //auf dem LocalStorage gespeicherte Kontakte for (var i = 0; arrayPersons[i]; i++) { console.log(arrayPersons[i].join('')); if (arrayPersons[i].join('') == removedPerson) { $(arrayPersons).remove(i); } }; console.log(arrayPersons); 
    submitted by /u/MaxOfCSh
    [link] [comments]

    A code newbie with no idea where to start

    Posted: 13 Jan 2021 08:09 AM PST

    Hi everyone! I'm trying to recreate this test (the harvard implicit bias test: https://implicit.harvard.edu/implicit/takeatouchtestv2.html) but with different pictures displayed for a research project. Where do I start coding tho? I have little coding experience in html, css and java (very little javascript), but am pretty good at editing frameworks and figuring stuff out based off sample code...does anyone have any tips? Is there a way I can access the code framework to this? If not, are there similar games out there I can tweak to make work? I'd also like to somehow store the data (mainly time it takes for the users key inputs) from the test to be used in research. Thank you!

    submitted by /u/purple-fish4
    [link] [comments]

    What are good programming languages for a beginner?

    Posted: 13 Jan 2021 02:02 AM PST

    I'm a complete beginner, and i'm confused on where to start, which language/s is/are the ones suited for beginners?

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

    [Help] - How can I easily make a web app including a p5.js maze generator within the website ?

    Posted: 13 Jan 2021 04:34 AM PST

    I am making a p5.js maze generator - I would eventually like to maze generator be embedded into a flask web app so It can be accessed online.

    How can I do this ? Are there any tutorials you would recommend ?

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

    How do you know if you are ready to take real jobs?

    Posted: 13 Jan 2021 12:16 AM PST

    I'm wondering if my skills are good enough to apply for a programming related job in companies since I don't know if my skills are good enough for it. I have basic knowledge in C#, Java, and SQL plus I can code but my skills in designing programs currently suck. The jobs I have experienced so far are just helping other IT students in making their project work.

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

    Best Programming Language for a somewhat complex Social Media Network?

    Posted: 13 Jan 2021 07:31 AM PST

    Hi Guys!

    So last night I came up with a really good Social Media network idea which I think can gain popularity very quickly. It is like a combination of Quora + Reddit + Instagram + Twitter. The problem is is that I do not have any coding experience. I am looking for a programming language that is somewhat easy and English-like ( I know, what I am trying to do is not easy, but I am looking for a program language that doesn't look like Russian language) but is still complex and can handle a lot of activity. Is there a programming language that is like that and has frameworks that I can use for the backend and frontend??

    Thanks in advance!!

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

    No comments:

    Post a Comment