• Breaking News

    Tuesday, August 13, 2019

    Does programming get easier? Ask Programming

    Does programming get easier? Ask Programming


    Does programming get easier?

    Posted: 13 Aug 2019 06:05 AM PDT

    Currently a freshman taking Computer Engineering (CpE in my uni is more focused on EE, bt dubs) and I'm pretty sure a few days ago i got a 2/5 in our first activity in intro to programming . We basically created a flowchart/algorithm for a few tasks (we were allowed to partner up but I didn't). Most of them went home early because they completed it on time. Me, I couldn't even answer the last three! The tasks were 1;expressing a^b algebraically, 2;switching the variables of x and y without using another variable, and 3; expressing modulo division. My question is: does it get easier? I've already dabbled in coding before (finished like half a week of CS50) but I seem to lack an "intuition" or something. Can this "intuition" be learned? Or should I just switch courses? (Keep in mind I really love working with computers but I don't think I have the "it" factor that programmers have)

    submitted by /u/1gaygaygaygay
    [link] [comments]

    Will I/can I use my own laptop?

    Posted: 13 Aug 2019 06:46 PM PDT

    I'm going to be a senior this coming semester and hopefully this time next year I'll be working as a programmer of some kind. The laptop I bought a couple years ago is kind of crapping out on me, not like it can't scrape by for one more year but I'm sorely tempted to get an upgrade; part of my justification is that I'll need one for my job so might as well get a nice one. I told my mom about this and she pretty boldly declared that you don't get to just use your own laptop for work. Is that actually true?

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

    Does such an open source project as a "presentation terminal" exist? If not, what's the easiest terminal to fork to make one?

    Posted: 13 Aug 2019 06:31 PM PDT

    I mean a terminal emulator adapted specifically giving live presentations, with large text, and a bottom margin so that new text appears towards the middle, and not the bottom. Also, I guess, a color scheme that's visible on projectors. I understand that most of this is possible to DIY on the settings of an existing terminal emulator (except maybe the margin), but having to switch settings during the middle of a presentation is a pain, and I want to fork one to add an additional feature anyway (automated text entry from a script; i.e. keylogging but in reverse).

    Does such a terminal emulator exist? If not, which one would be the best to start with to fork? I don't have much experience with front-end, so I'd be happiest with something simple. My favorite terminal emulator is xfce4-terminal, which does have a Github, but its relative complexity is intimidating. I'm not sure if terminals get much simpler, however.

    My target platform is Unixen.

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

    We have a research project and working over sensoring paper and material waste materials and segregating them.

    Posted: 13 Aug 2019 05:43 PM PDT

    I have a little bit knowledge on java, and a slightly good on using html and css.

    I would like to ask, how simply can we make the prototype.

    ~ thank you

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

    Google chrome Kiosk printing mode opens up a new tab

    Posted: 13 Aug 2019 04:32 PM PDT

    I am using javascript to do some printing using the code:

    function printLabel(){ w=window.open(); w.document.write(Data); w.print(); w.close(); } 

    In my google chrome I changed the setting to --kiosk-printing
    so that there is no dialog box that appears for a user to select a printer and hit print before printing. In my website the button to print label is supposed to pressed multiple time by users so this is going to save a lot of time. However, I realized that the print dialog box quickly opens for 1-2 seconds in a new tab and then closes by itself. And then prints the file. This process itself takes about 3-4 seconds in total. Is there a way to make the print go faster. Is there a way to not have the print tab open at all and just start printing?

    Also this script is working on my laptop on windows 10. I will eventually want it to work on Samsung tab google chrome browser as well. Is it possible to set --kiosk -printing
    on Samsung tab?

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

    Is Visual Scripting underrated?

    Posted: 13 Aug 2019 04:27 PM PDT

    I will admit instantly that I am a noob to coding. I have some basic understanding of python and certain visual script tools such as Unreal blueprints and Godot's VisualScript.

    So far I hear 2 common arguments against visual scripts:

    1. They don't scale well and turn into soup which only makes them useful for small things.
    2. It is easier to read plain code than visual scripts.

    Now perhaps this is just the noob in me talking, but even with just my limited experience coding I don't really feel the second point is true. I will reserve judgement about the former point since I haven't yet coded anything very large scale, but at least for the second point I can't help but feel this is more bias than actual fact.

    Yes visual code can become somewhat difficult to read once it becomes complex, but I fail to see how trying to vivisect complex OOP code with dozens of interconnected classes with possibly hundreds or even thousands of functions is suppose to be easier. This is even worse if no effort was made to make the code readable. I would argue that even just mediocre OOP code is 10x more difficult to understand than a mediocre visual script file.

    I can see the appeal in having more code on screen at the same time compared to visual script, but it's not like you can actually read all of it at the same time.

    Basically what I am asking is: Is visual scripting underrated and is the complaint about visual scripts actually being harder to understand vs OOP jungles actually valid?

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

    How robust is ASP NET Web API when building an API?

    Posted: 13 Aug 2019 03:56 AM PDT

    I work at a small company and I am trying to figure out the best way to build an API for our clients to communicate with us. We have an old project that uses ASP NET Web Forms but it feels outdated and tied too closely server-side. We are in the process of making a new web portal for clients to visit, and I've been building a small project using MVC and found it easy to build a simple API to communicate with our database for getting information. I want to extend this API to also be endpoints for client boarding or updating their settings and also be an easy starting point for triggering deeper functions for our system. Are there any pitfalls to using Web API that I should be aware of? Is this scalable enough for a small company to transition to a medium-sized company?

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

    Why is github rejecting this post request from this python script?

    Posted: 13 Aug 2019 03:45 PM PDT

    [SOLVED] Was hitting the wrong url

    I'm trying to upload a file using a python script the github release api, and I'm getting an error

    {"message":"missing url parameter or multipart form data","request_id":"CF84:29B2:41EF:4BB1:5D533C12"}

    Or

    {"message":"Bad Size: ","request_id":"E518:75B6:189F:21D5:5D533CB4"}

    when I omit the header

    Here is my script:

    def getSize(filename): st = os.stat(filename) return st.st_size addAssetEndpoint = "https://uploads.github.com/zetup-sh/zetup/releases" def add_assets_to_release(releaseId): asset = "mysmallfile.txt" fileLocation = "./build/" + asset url = addAssetEndpoint + "/" + str(releaseId) + "/assets?name=" + asset print("uploading " + asset) with open(fileLocation, 'rb') as f: size = getSize(fileLocation) headers = { 'Content-type': 'application/x-binary', 'Content-length': str(size), } request = requests.post( url, auth=(ghUsername, ghToken), headers=headers, files={asset: f} ) if not request: print(request.text) else: print(asset + " uploaded sucessfully") exit() 

    I'm fairly new to python, so there could be something simple here.

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

    How to calculate time complexity of each line in algorithms?

    Posted: 13 Aug 2019 06:09 AM PDT

    Can someone please share with me resources on calculate time complexity of each line in algorithms?

    I'm really confused by how books just assume each line is executed (n+1) times, or (n) times, (n2) times.

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

    Custom unlock method for Android

    Posted: 13 Aug 2019 02:53 PM PDT

    I'm pretty new to programming, but I am wondering if it's possible to create a personalized app that allows me to unlock my screen without a pattern/PIN/face/fingerprint/smart-unlock. It seems like a fairly simple app to create, but I have a few questions as someone who's never created a mobile app and also is pretty inexperienced with programming in general.

     

    1) Would implementing this require a rooted phone?

    2) Would it be a standalone app or just some file creation to add in settings somewhere?

    3)a The sequence I'm looking to create is just 6 taps in particular areas on the screen. 3)b Is this an idea that's far too over my head, given my current experience level? I only have a handful of experience from online schools like Khan Academy and practice in SoloLearn with Ruby.

    Any and all feedback is greatly appreciated.

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

    Good free public proxy servers

    Posted: 13 Aug 2019 02:25 PM PDT

    Hi Guys

    I've got a little app that's checking website connectivity from external networks/machines, to check this I want to use a proxy server to get the response of the website. I'm having trouble finding a good free proxy server to use that's safe and was wondering if you guys would know of any well known ones that can be trusted?

    Many thanks!

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

    Similarity metric for user ratings of tv shows

    Posted: 13 Aug 2019 02:22 PM PDT

    I have a database of user ratings of various television shows on a 1-10 scale. I've been trying to find a good way of determining how similar two user score-lists are two one another for shared shows. My ultimate goal is to recommend shows to users based on people who they have similar taste too (this is just a personal project for fun).

    It feels like the most obvious way to do this is just to take the absolute value of the difference. And then sum/average that for all shared shows. But I was reading this does not take into account how users will rate things on different scales. I saw some people saying cosine similarity is better for this sort of thing. Unfortunately, I've run into a lot of cases where that metric doesn't really make sense.

    Example:

    overall average of user1 = 8.1

    overall average of user2 = 5.8

    scores for shared shows only:

    S1 = [8,8,10,10,10,10,6,8,10,5,6,10]

    S2 = [5,6,7,8,9,9,4,5,9,1,2,8]

    Obviously, these two people rated the shows they watched pretty differently. When I use the average difference it says they are not very similar (2.3 where 0 is the same). When I use something like the cosine similarity it says they are extremely similar (0.97 where 1 is the same). Centering the data gave slightly better results but also didn't make it crazy good.

    Is there a metric that would be better suited for this kind of thing? Or is this whole project completely pointless

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

    Is this solution possible?! (RFID and QR)

    Posted: 13 Aug 2019 02:06 PM PDT

    Let me preface this by saying I have an undergrad in CS, but I'm having a hard time finding the right resources to help me build some architecture.

    Basic concept: 1. Customer scans QR code to capture account info. 2. Product with RFID is given to the customer. 3. RFID is associated with the customers account.

    Seems very basic when put like that, but just can't figure out how I would associate the RFID with the customers account. I am planning on using passive RFID if anyone is wondering.

    I am more than willing to answer any questions that may help me find a solution. Thank you.

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

    What is better?

    Posted: 13 Aug 2019 01:51 PM PDT

    What is the better IDE for C# . Is it Visual studio code or Visual Studio 2019 or Visual Studio 2017.

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

    Error: Too many characters in character constant

    Posted: 13 Aug 2019 12:31 PM PDT

    Hello everyone, I'm new to programming and am working on a book exercise from 'Programming Principles and Practice using C++' asking the user what currency he/she wants his/her money converted into. My code makes perfect sense to me, but my compiler for some reason gives me an error on line 19 and 21 stating: "too many characters in character constant" does anyone have any idea of what I'm doing wrong? I'm programming in C++ using Visual Studio. Thank you for your time.

    #include "std_lib_facilities.h"

    #include "pch.h"

    int main()

    {

    constexpr double yen\_to\_dollar = 106.67; constexpr double krone\_to\_dollar = 8.87; constexpr double pound\_to\_dollar = 0.83; 

    double dollar = 1; 

    char currency = ' '; 

    cout << "Please enter a dollar amount followed by a currency (yen, krone, or pound):\\n"; cin >> dollar >> currency; 

    if (currency == 'yen') cout << dollar << "dollar(s) == " << yen\_to\_dollar << " yen.\\n"; **else if (currency == 'krone')** cout << dollar << "dollar(s) == " << krone\_to\_dollar << " krone(s).\\n"; **else if (currency == 'pound')** cout << dollar << "dollar(s) == " << pound\_to\_dollar << " pound(s).\\n"; else cout << "Sorry, I don't know a currency called " << currency << ".\\n"; 

    }

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

    Is there a comprehensive taxonomy of software available?

    Posted: 13 Aug 2019 08:43 AM PDT

    I'm not sure if it should be for functionality, business usage, algorithm, or something else.

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

    can someone pls help me in finding where is problem in my code that it is giving floating point exception.

    Posted: 13 Aug 2019 06:01 AM PDT

    Q:to find nth number of the series: 1, 1, 2, 10, 65, 442......

    i have the logic: a(1)=1; a(n+1)=product of numerator and denominator of sum of (1/a(k)) where k goes from 0 to n.

    but it is giving floating point exception. help me out!!

    #include<bits/stdc++.h>
    using namespace std;
    int gcd(int a, int b)
    {
    if (b==0)
    return a;
    return gcd(b,a%b);
    }

    void add(int&num,int&den,int i)
    {
    int l=gcd(den,i);

    l=((den*i)/l);

    int r=num*(l/den)+(l/i);

    num=r;
    den=l;
    int g=gcd(num,den);
    num=num/g;
    den=den/g;
    }
    int main()
    {
    int t;
    cint;
    int arr[25];
    arr[0]=1;
    arr[1]=1;
    int num=1,den=1;
    for(int i=2;i<=24;i++)
    {
    add(num,den,arr[i-1]);
    arr[i]=(num*den)%1000000007;
    }
    cout<<endl;
    while(t--)
    {
    int n;
    cin
    n;
    cout<<arr[n-1]<<endl;
    }
    }

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

    YT: intentional or issue with the code?

    Posted: 13 Aug 2019 12:30 PM PDT

    (Mobile, apologies regarding formatting)
    We all know that there has been some unfair treatment of creators on YouTube, but before I go making any assumptions about this issue I wanted professional opinions. Twitter video of the issue is linked below.     The issue:   I know for a fact that I'm subbed to a specific controversial channel and have been for quite some time, and have the bell set to "always". After commenting on one of her community posts, I realized that the app seems to think I'm not subbed to her, so I resubbed. I tried to hit the bell and set it to "always" and the app returned an error. The home page of her channel still says I'm subbed, but returning to the community post it says I'm not subscribed again (after having resubbed and attempting to set the bell). This is all shown in the screencap video at the link. Any thoughts would be much appreciated.     Link:     https://twitter.com/rio_illustrates/status/1161350093867540480?s=21

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

    How is data mapped between Service/Domain Layers and DAL/Persistence Layers?

    Posted: 13 Aug 2019 03:29 AM PDT

    How to fix this in python?

    Posted: 13 Aug 2019 06:41 AM PDT

    AngularJS 1.? CORS problem

    Posted: 13 Aug 2019 12:02 AM PDT

    hi guys, for my work i have to learn angular 1, and im following this book ( it was given to me and they said good luck, let us know when ur finished ): https://www.amazon.com/Learning-AngularJS-Guide-Development/dp/1491916753 . now in chapter seven they ask that you use REST services to make http requests, but i keep getting CORS error:

    "XMLHttpRequest at *insert link* from index.html#!/:1 origin localhost has been blocked by CORS policy: No 'Acces-control-allow-origin' header is present on the request recource"

    the complete code for this project is found here: github.com/KenWilliamson/LearningAngularJS_chapter7

    can annyone please hepl? thanks in advance!

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

    Looking to be guided in the right direction on a project

    Posted: 12 Aug 2019 11:12 PM PDT

    I'll start by saying that I have a teeny tiny grasp on programming. I've very recently gone back to school for computer science and I've completed just one course of introductory computer problem solving using some C. Today I came up with an application idea that I think may be doable. It's for my job and I think if I brought the idea to corporate, they might consider paying me to develop it. The idea is that we use a tablet in our lobby for customers to request assistance. The customers choose from a few options and maybe add specific textual information, and the application sends that information (including any extra text) as an alert to an employee's phone. There might be something like this already out there, but I want to design it specifically for my employer. I'm not sure if this is within my capabilities at the moment, but I'd like to try. So I guess it would involve Android/iOS? What I want to know is what language I'll be using, where to begin, and really any guidance that can be offered.

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

    No comments:

    Post a Comment