• Breaking News

    Friday, March 19, 2021

    Would anything happen to any databases if I named my son Da\niel? Ask Programming

    Would anything happen to any databases if I named my son Da\niel? Ask Programming


    Would anything happen to any databases if I named my son Da\niel?

    Posted: 19 Mar 2021 07:42 PM PDT

    If theoretically speaking, I was allowed to. Just curious.

    Kid: what's your name? Other kid: I'm Dan but everyone calls me da

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

    Struggling to contribute to software I'm not familiar with

    Posted: 19 Mar 2021 10:01 AM PDT

    Learned a bunch of basic programming , in bunch of languages. With the overall plan being contributions to FOSS . Last hacktoberfest I found a couple minor places I could help out In tools I've used. I tried to look at a few things I've never heard of, new game engines ect. Found a few issues that seemed like things I could maybe help with... I really struggle to wrap my head around a large project that I haven't built myself or used extensively (which makes the list quite small)

    Is there a way to learn this skill? Or should I not be trying to understand the entire codebase ? Do I need to just start using more open source software? Any tips?

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

    How hard is it to learn python?

    Posted: 19 Mar 2021 05:49 PM PDT

    Hello, I've been learning python from a while,

    I just know about some basics:

    1 - The list, the tuples, the dictionnaires, the sets
    2 - Their methods ( append, extend, extra... )

    3 - Some text formatting

    4 - basics of if , for , while functions.

    5 - print and input for sure

    How hard is it going to learn python to master it? I feel like its still a very long python and i'll never maybe reach the master level.

    Thanks.

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

    How is it possible that a website could only show a page if it came from a redirect link?

    Posted: 19 Mar 2021 01:59 PM PDT

    Hi all,

    A little strange question here. I can't post the link for legal reasons. I was browsing a website, and I clicked on something which redirected me to an underground drug market website. However, upon copying and pasting this same URL into a new tab, it became a "safe" site that looked like a normal blog. How is this possible? It seems like the only way to access the underground stuff was to open it through the redirect link, because the urls in both tabs were exactly the same.

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

    Which language i should focus on ?

    Posted: 19 Mar 2021 03:19 PM PDT

    Im programming student and i've learned C# and a bit of HTML, CSS, JS i also made some basic bots with Pyhton. I need to learn ASP.NET for school project but other then that what should i be focusing on ? I don't like HTML, CSS or JS tbh so any advice ?

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

    Amazon EC2 noob question

    Posted: 19 Mar 2021 04:52 PM PDT

    Hello. So I am testing with EC2 with a node server with express. I am confused do I set up ssl in nodeJS or do I set it up via route53? I want a domain name for my api, unless that's bad practice. The domain doesn't serve any UI content, it just communicates with server and send json back and forth. Thanks

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

    Is it possible to use OpenGL for a Custom-Built Operating System's Interface?

    Posted: 19 Mar 2021 01:03 PM PDT

    This might sound like kind of a stupid question, but I've been aiming to eventually create my own custom operating system from near scratch, and was wondering if it would be possible to use a library such as OpenGL on a low level, to create Interfaces such as; Windows, Menus, Forms, Buttons, etc? Thanks to anyone who can help me out with figuring out if this is possible or not.

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

    How easy is it to make a beginner app to monitor the stock market?

    Posted: 19 Mar 2021 08:29 PM PDT

    Hi guys,

    I am a high school student and for my computer class I have decided to make an android app to monitor the stock market. It doesn't really matter if there is a price delay of like 7 hours, I am not going to actually use it, but I have to make a project on it.

    Is this going to be an extremely difficult thing to learn how to make? The only programming experience I have is basic html and css, but I am ready to learn and I have almost half a year.

    submitted by /u/No-Cartographer-6602
    [link] [comments]

    Are ternary search trees better than tries?

    Posted: 19 Mar 2021 12:09 PM PDT

    It takes up less space than R way trie. But is it used often?

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

    Non traditional APIs

    Posted: 19 Mar 2021 06:37 PM PDT

    Hello world! I have been searching for APIs of the next topics Gods, demonology, marihuana, medicinal plants, Church Saints with not much luck :( I have already check on the public APIs repository, the only one I had luck with was the strainapi.evanbusse one but it seems to be down since 3 days ago. Does anyone know APIs from the topics I'm talking about? I would really appreciate the help.

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

    Beginner looking for assistance on creating a Flask app

    Posted: 19 Mar 2021 10:40 AM PDT

    I've been learning Python/SQL for the last two years and am currently enrolled in a part-time boot camp due to being fully employed as an accountant. I picked up enough Python to write a program which automates some of my daily tasks which resulted in a massive amount of time saved. The program uses Selenium and calculates/fills in values into a browser based on the browsers elements.

    My company looked into my code and asked me to implement it as a flask app for deployment. The reason being that not everyone knows how to run code and I am transitioning to a different team. The company also doesn't want to install python on everyone's machines.

    I have created a Flask app before, but it was essentially a webpage that I could put different elements on. I'm confused on what implementing Flask into my program would even look like. Would another user go to my website and click a button to run my script? Tech also mentioned Django, although I have no experience with this.

    I feel like this is my one shot to impress the tech people at my company and I don't want to let them down..any input or advice would be more than appreciated. Please let me know if I should elaborate on what the code does. Thank you!

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

    Representing a list of large semiprimes with a list of integers below 2^16

    Posted: 19 Mar 2021 02:59 PM PDT

    Given a list of semiprimes (many of which are greater than 2^16), I need a method of representing each semiprime with a single integer below 2^16. Currently, I do the following to encode them (Python3):

    from math import ceil d = ceil(max(semiprimes) / (2**16)) semiprimes_small = [round(i/d) for i in semiprimes] data = (semiprimes_small, hash(semiprimes), d) 

    And to decode them:

    from itertools import product semiprimes_small, semiprimes_hash, d = data semiprimes_options = product(*[[j for j in range(round(i-d/2), round(i+d/2)) if is_semiprime(j)] for i in semiprimes_small]) semiprimes = [] for i in semiprimes_options: if hash(i) == semiprimes_hash: semiprimes = i break 

    However, this takes a long time to run, as semiprimes_options is so large, and increases in size with max(semiprimes). Furthermore, I am concerned about errors in hashing due to the pigeonhole principle.

    Can you think of either a way to make this faster or more robust, or a different method of encoding these semiprimes which does not increase the number of numbers stored by too much?

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

    Can you simplify my code?

    Posted: 19 Mar 2021 02:34 PM PDT

    #include <iostream>

    #include <climits>

    using namespace std;

    bool found = 1;

    const int V=10000;

    int GRAPH[V][V]{};

    int minDistance(int dist[], bool sptSet[])

    {

    int min = INT_MAX, min_index;

    for (int v = 0; v < V; v++)

    if (sptSet[v] == false &&

    dist[v] <= min)

    min = dist[v], min_index = v;

    return min_index;

    }

    void printPath(int parent[], int j,int src)

    {

    if (found)

    {

    if (parent[j] == -1)

    return;

    printPath(parent, parent[j],src);

    cout<< j << ' ';

    }

    else

    cout<<-1<<'\n';

    }

    void printSolution(int dist[], int n, int parent[],int A,int src)

    {

    if (found)

    {

    cout<<dist[A]<<'\n';

    cout<<src<<' ';

    }

    printPath(parent, A,src);

    }

    void dijkstra(int graph[][V], int src,int B)

    {

    int dist[V];

    bool sptSet[V];

    int parent[V];

    for (int i = 0; i < V; i++)

    {

    parent[0] = -1;

    dist[i] = INT_MAX;

    sptSet[i] = false;

    }

    dist[src] = 0;

    for (int count = 0; count < V - 1; count++)

    {

    int u = minDistance(dist, sptSet);

    sptSet[u] = true;

    for (int v = 0; v < V; v++)

    if (!sptSet[v] && graph[u][v] && dist[u] + graph[u][v] < dist[v])

    {

    parent[v] = u;

    dist[v] = dist[u] + graph[u][v];

    }

    }

    if (dist[B]==INT_MAX)

    found = 0;

    printSolution(dist, V, parent, B,src);

    }

    int main()

    {

    int A,B;

    cinAB;

    int W,E;

    cinWE;

    int a,b,w;

    for (int g=0;g<E;g++)

    {

    cin >> a >> b >> w;

    GRAPH[a][b] = w;

    }

    dijkstra(GRAPH, A, B);

    return 0;

    }

    // I KNOW I AM A NOOB

    //SORRY FOR USING USING NAMESPACE STD

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

    How do I serialize/deserialize a python object to avro with a schema?

    Posted: 19 Mar 2021 02:17 PM PDT

    I'm using json to send messages on a zeroMQ stack, but I'd like to switch to Avro, with a schema. I want to serialize a python object into Avro with a known schema, and use that for message passing in zeroMQ. I looked at the documentation, but it feels very very lacking:

    https://avro.apache.org/docs/current/gettingstartedpython.html

    Is there a more detailed document for avro?

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

    JAVA QUESTION

    Posted: 19 Mar 2021 12:29 PM PDT

    Is there a way to check if an object is not initialized in java? I am creating a doubly linked list class and for the node class, I want to check if the next / previous nodes are uninitialized before I return them in the getter method. Please help <3

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

    Quadratic vs exponential time complexity

    Posted: 19 Mar 2021 08:26 AM PDT

    How do you best describe the difference in the rate of growth between polynomial and exponential algorithm specifically n^2 versus 2^n? which one doubles its growth when n increases?

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

    Sharing my app

    Posted: 19 Mar 2021 12:10 PM PDT

    Hey there I've built a simple random quote generator for my friend using only js html and css, is there a way to put it in the web? I tried deploying it on heroku but I get some errors... Any help would be really appreciated.

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

    Need help building a basic login , signup and logout system using express , sessions and mysql.

    Posted: 19 Mar 2021 11:19 AM PDT

    CONTEXT - so I am new to web development and have been trying to build a login/signup system for my website using express , sessions, mysql and ejs for templates. I have a few questions :-

    1. My post route for signup is not redirecting to user dashboard page . It shows an error as "can not post /signup". Also the sql queries in the controller are not getting executed.
    2. After i press submit , my browser responds with "localhost refused to connect"

    3)how do i redirect user to dashboard view (get route) after signup or login.

    4) Any good articles or resources for accomplishing these tasks along with setting cookies and logout functionality would be helpful .

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

    Why doesn't web-server software have a GUI?

    Posted: 19 Mar 2021 10:35 AM PDT

    Why does web-server software such as NGIX, Apache etc seem to be lacking a user-friendly graphical interface which would make it a billion times easier to navigate? It's almost like everything has it's graphical shell except this specific kind of software

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

    Where is a good 3D game engine for non-programmers to build a complete standalone game?

    Posted: 19 Mar 2021 10:28 AM PDT

    [SERIOUS] I just completed the most successful salary negotiation in my life and wanted to share my experience with you. Are these conditions common in the US?

    Posted: 18 Mar 2021 11:34 PM PDT

    Europe, small company, 15 people and 1 owner. Things are different here: we get more protection from getting fired, but we also get paid relatively less. Also, in my country, IT seems to be a field that's severely underpaid and mismanaged.

    In addition, there's no such thing as "company equity" for employees nor scheduled yearly raises. In the end, you work "for the fun of it" and your salary is all you get.

    Well, I had it with my company:

    • I'm one of the few seniors.
    • I'm one of the only competent ones.
    • I was doing things that went from coding to project management to team leading to client interaction to middleware between our client and other agencies.
    • I was one THE ONLY ONE who speaks english AND has technical skills in the whole company, and we only deal with foreign clients so english is an essential skill.

    And all of this for a slightly higher salary than what I had a few years back.

    To make things worse, I also had to deal with the overall incompetence of the people I worked with. Not that I'm a genius or anything like that, but the company had this tendency to hire people based on what they said they can do and not on what they could actually do, and the owner would never, EVER fire employees.

    Of course, I decided to bail. I set up a few sources of income on the side while still being employed, and eventually things turn out great for me and was making the same amount of money outside the company. I could essentially stop working if I wanted to.

    The thing is, I still liked the job and wanted to remain occupied, especially now during the pandemic. For that reason, I called my boss and started a negotiation he was not expecting.

    Because I could not get equity, I asked for a 5% slice of every project I was working on and any future projects I would work on from that moment on, in addition to my base salary. Because I was being assigned projects like there was no tomorrow, this was an excellent chance to make more money. The company has one whale of a client that pays us tons of money, so I knew exactly what cards the owner held.

    My boss tried to push back, of course, but when I told him everything was fine and I could give my notice right there and now without any consequences to me, he folded. That's what happens when you assign 4 different critical projects to a single employee without asking questions and pretending he'll just do it for the fun of it.

    Bottom line, I'm staying, getting tons of extra money (I'm the only employee with this agreement), I remain occupied, and my other sources of income are still working.

    Have any of you ever managed to pull something like this?

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

    What languages should I learn?

    Posted: 19 Mar 2021 08:44 AM PDT

    The things that I really want to learn are, - Creating Mobile applications - Creating Desktop Applications (both for windows and Linux) - Creating Web Application - And also I want to learn more about Linux. So, Which languages should I learn for all these things? It would be helpful if you answer them addressing each topic.

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

    Could somebody take a look at my CV?

    Posted: 19 Mar 2021 08:21 AM PDT

    I finished college last May and still looking for work. I have only gotten 1 interviews since. I think my CV is in good shape and got it reviewed by other professionals, but still no results.

    Any help would be greatly appreciated.

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

    How would I code a webpage that takes an image, and overlays another image onto it.

    Posted: 19 Mar 2021 12:54 AM PDT

    Okay the my idea for the webpage works like this. The user will upload an image. This image will be cropped smaller to the same position and size and another prepared image will be overlayed on top of it. So it the process will look like this. If anyone can give me advice as to how to about this I will be forever thankful.

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

    No comments:

    Post a Comment