• Breaking News

    Saturday, June 12, 2021

    Is there any browser extension which identifies and shows which programming languages have been used to create a site? Ask Programming

    AskProgramming

    Is there any browser extension which identifies and shows which programming languages have been used to create a site? Ask Programming


    Is there any browser extension which identifies and shows which programming languages have been used to create a site?

    Posted: 12 Jun 2021 06:10 AM PDT

    I know we can see the code by going to page source or inspect but I'm asking from a begginers perspective who struggles to identify languages.

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

    How do I append a pandas series row-wise to a pandas dataframe? Coming from a Matlab env. to Python env.

    Posted: 12 Jun 2021 01:53 AM PDT

    During most of uni, I did almost all of my analysis tasks in Matlab and like most people entering the industry I'm faced with the high costs of the different Matlab packages. So now I want to transition into python due to it being free but have some trouble doing basic tasks in python with pandas.

    I have a dataframe with a timeseries date column next to the index column, then I have some other columns with different names. I load the data with this code:

    import numpy as np import matplotlib.pyplot as plt import pandas as pd df = pd.read_excel('filename.xlsx', index_col=None) df.rename(columns = {df.columns[0]: "Time"}, inplace = True) 

    Then I extract one column as it is used as the reference data in my analysis and create a dataframe which is going to contain my output data.

    df_ref = df['header2'] series_output = pd.Series([]) 

    I then run a nested for loop calculating the error between the reference data and the rest of the data for a set time interval, saving the column with the lowest error with the code:

    for t in range(24,len(df),24): temp_df_ref = df_ref[t-24:t] last_error = 10**10 for col_idx in range(5,31): temp_df = df.iloc[t-24:t,col_idx] error = 0 # calculate the error for the past day. for hours in range(t-24,t): norm_col = temp_df[hours] error = abs(temp_df_ref[hours] - norm_col) + error # check if this error have the smallest error if error<last_error: last_error = error best_col_idx = col_idx # save column series_output.append(df.iloc[t-24:t,best_col_idx]) 

    But when I run this code series_output is empty. Shouldn't the data be appened row-wise to series_output?

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

    Time and Computational Complexity Question

    Posted: 12 Jun 2021 05:37 AM PDT

    Hello, I have a question about computing the complexity of this nested loop.

    function print (int n, string s) { for(int i = 1; i <= n; i++) { for(int j = 1; j <= i; j *= 2) { print(s); } } } 

    What I have so far: Complexity Function

    I'm not sure how to further simply the expression into a function that I can use to determine the time complexity with Big-O notation.

    I have tried using some logarithmic properties to simplify further but to no avail.

    For example:

    f(n) = log_2(n!) + n, since log(A) + log(B) = log(AB) f(n) = floor(log_2(n!)) + n 

    The issue is the output is inaccurate. Any ideas on how to derive the computational complexity and time complexity functions?

    Any help is appreciated. Thanks.

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

    Understanding the role of "react" in a javascript application

    Posted: 12 Jun 2021 09:57 AM PDT

    Questions bolded in case you don't want the context

    I'm in the middle of some javascript/node.js/react self education in anticipation of an upcoming junior developer job I landed. I know they use python/flask and they also use react/javascript/node.js

    For me, maybe its the OCD, but I have trouble understanding a topic when I know I'm only learning a small sliver of it. Which of course is a problem in computer science where no single person can hope to master (or even really learn) every technology out there.

    But whenever I'm dealing with multiple technologies, it makes it easier for me if i can really dumb down the role that the different technologies play with each other, and its easiest for me to do that if I relate it to other technologies I already know.

    So from what I understand, react is just a series of libraries used for creating javascript applications that make it easier to develop web applications, especially ones that update part of the page at a time.

    In my time in university, the closest I came to something like this was when we used Java, and we used spring/spring-boot in our IDE that made it easier for us to create web applications without having to do all the net-code stuff on our own.

    I know spring is a framework and react is a series of libraries, but would you say they accomplish a similar role? If not, how are they different?

    Similarly, the video series I'm watching to teach myself react is created react applications with NPM create-react-app. It seems like that is like a step further. If react is a library that makes it easier to create javascript applications, npm create-react-app automates it even further. I think.

    However, so far, npm create-react-app seems almost like a mini-frame-work in of itself. I may not properly understand the difference between a framework and a library, but it seems like npm create-react-application acts similarly to a framework where it builds the application for you and creates a lot of the necessary code. Am i incorrect in thinking of it somewhat like a framework? Or is it simply a command line tool that makes starting a react program easier.

    Or, alternatively, maybe is it that for normal use of javascript inside the browser doesn't require npm create-react-application, however if you use it outside of the browser with something like node.js, thats when npm create-react-application becomes necessary?

    I understand this is a series of somewhat messy questions, but the more I can draw parallels between different kinds of software to stuff I'm used to, the better I can understand it.

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

    Hey guys, did I make this UML Use Case Diagram correctly?

    Posted: 12 Jun 2021 01:16 AM PDT

    Here is the scenario which I am meant to put into a UML Use Case Diagram.

    https://imgur.com/TIP7lCd

    Here is how I broke it down:

    https://imgur.com/O2PHEpe

    and here is my diagram:

    https://imgur.com/1uVSya3

    Did I do correct notation, lines, etc? I wasn't sure about connecting an include use case to the reactive user as I never saw this in tutorial videos. Appreciate any pointers!

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

    How do you program an OS

    Posted: 12 Jun 2021 07:43 AM PDT

    I have basic knowledge of kernel,os and application but I can't seem to find a tutorial. I have made simple application like social media and note app etc so I wanted to take it to the next level or maybe even create something like jarvis where the whole computer is like smart instead of just an app that can do overlay and etc.

    Let's say I want to make an OS similar to android using the linux kernel, where do I start?

    I just search "programming an OS for linux kernel" but didn't really get the result that I want.

    Can someone tell me what am I missing or where I can start learning about this?

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

    Question about running create-react-app using NPM

    Posted: 12 Jun 2021 06:52 AM PDT

    I'm a brand new junior programmer and my employer is having me use react for the first time. I'm "somewhat" new to linux. I've used it in a university setting, but only for brief moments for specific tasks. I've never had my own version of linux and had to download all my own packages etc.

    I'm doing some tutorials on using react, and it seems its pretty standard to use the command line tool "create-react-app". Or at least the impression I've gotten is that this is in fact the standard way most people make react applications.

    I kinda get the concept of package managers in linux. I have so far installed a ton of stuff using apt-get.

    I'm aware that there are additional package managers besides your default one, so you sometimes need to install additional package mangers because they use different repositories.

    Apparently NPM is one such package manager that you would use to get create-react-app. Apparently there exists others like Yarn.

    Here's my question. Apparently you don't just use NPM (or yarn) to install create-react-app, but you actually run it THROUGH npm. I'm not really understanding that part. Like, the command to create a new react app is: "npx create-react-app new-app/cd new-app/npm start". Why do I continue using npm after i've installed create-react-app. is the package manager not simply used to install the apps/packages/dependencies? Why do i use that to actually "run" the software. Can anybody try to explain this to me?

    Thank you

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

    Questions about setting up server

    Posted: 12 Jun 2021 06:44 AM PDT

    I have been working on a personal project, a website that has an express js backend. I currently run it on a AWS EC2 instance, I use Apache webserver to serve the front end and run an express app on the same machine and use ProxyPass to direct requests to node. I now want to implement a feature that uses web sockets in node. After some googling it seems like it's not easy to make that work with Apache. I guess my question is what alternatives are there to apache or should I use it? currently, all I need apache for is to host my frontend html/js/css files. I don't really know much about making this all work, so any advice is useful.

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

    How to really create a playlist and add tracks using Spotify API in javascript?

    Posted: 11 Jun 2021 09:52 PM PDT

    No comments:

    Post a Comment