• Breaking News

    Thursday, August 2, 2018

    Know little to nothing about programming and not sure where else to ask this, any help appreciated. Ask Programming

    Know little to nothing about programming and not sure where else to ask this, any help appreciated. Ask Programming


    Know little to nothing about programming and not sure where else to ask this, any help appreciated.

    Posted: 02 Aug 2018 03:52 PM PDT

    Hello all,

    So I have a college football computer poll that ranks college football teams. Basically, I created a formula that takes wins and losses, point differential, and strength of schedule of each team into account and gives each team a score. I have an excel spreadsheet with the name of each team in one column, the number of wins that team has in the second column, and the number of losses in the third. So for example if Alabama had 9 wins and 1 loss and Air Force had 5 wins and 5 losses it would look like this:

    Alabama 9 1
    Air Force 5 5

    The remaining columns would have a game score for each game that team played calculated by my formula, and the average of those game scores would be taken at the end to rank the teams.

    So here is my dilemma. Every week I have to update the wins and losses of all 128 teams in my spreadsheet, which takes time. I was just wondering if anybody knew if it was possible to get my spreadsheet to automatically update the win and loss columns? If I could somehow link it with a website that regularly updated the college football standings so that I don't have to manually do it every time? I really have no clue if this is even possible, but if it is I would be willing to go outside of Excel for it. I took a python class in high school so I have a tiny bit of experience with that if that means anything.

    Furthermore, if somebody is really up for a challenge, my formula also relies on knowing how many points a team won or lost a game by. If someone knew how I could possibly get those to automatically update as well... or at least get the point values of the winning and losing team in some column... I would be forever grateful.

    I've been doing this manually for years, but I'm not going to have much time this year to manually input all of this stuff into my spreadsheet. Also, it has always bothered me that I must be doing this very inefficiently and that there must be an easier way.

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

    Design Push Notification for custom times for each device/user

    Posted: 02 Aug 2018 09:27 PM PDT

    • Aim : Push Notification through mobile browser. Each one of them is either a basic link to a site / youtube link.
    • What's done so far : A small collection of URLs + Title has been saved in Firebase. A simple react UI homepage where a user can submit their local time for the push notification. e.g. : I want the push notifications to come at 5 AM, some one else wants them at 7 AM or when they wake up. Basically a simple time component and submit.

    I've looked into :

    Firebase Cloud Messaging

    One Signal Notification.

    The problem here is it's a common time for every push message ? I wanted to customize it per user/device.

    Now :

    • Is user login necessary for custom push notification, I was thinking rather than storing user credentials if it's feasible to use a device ID of sorts?
    • Should a Firebase cron job be used or a Node Script to run all the time. If so can any one of you guide me to an article or a video where they how this is done.

    How do you implement this, a high level design of it ? I've no clue since I'm doing this type of problem for the first time.This is something I wanted to learn on my own, but I wasted couple days trying to come up with the design

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

    Any interesting/cool math functions that can randomize delay for a light show?

    Posted: 02 Aug 2018 02:12 PM PDT

    Made a stupid 3x3 board, I love it.

    I have a few different shows, including a rand()%2 which is random on/off.

    I liked doing loops where I divided by a fraction or used sin() to change the speed every loop.

    Curious if anyone has a favorite math function that produces an interesting progression of speeds

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

    Is a coding boot camp worth it?

    Posted: 02 Aug 2018 05:52 PM PDT

    I'm trying to figure out if going through a coding boot camp is worth the money. The boot camp costs $10,000 and it lasts 3 months. Is it a good idea to do this program? Or is it a terrible idea. I already talked to 2 friends that recommended code academy as an alternative, that is much cheaper. Any thoughts on this would be very much helpful in this.

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

    It is legal to resell free themes ?

    Posted: 02 Aug 2018 10:20 AM PDT

    We have our own themes in our themes catalog but we want add more variety in order to give more examples to costumers. THere are some themes on https://justfreethemes.com/ that we like to join to our collection. We would modify some images and some code but the reference to justfreethemes in the footer can stay there (in code too) because we dont intend to act like "we did this themes". So can we download some themes, remix some code and put them on our server in order to appear with our themes in our catalog? (those themes would serve for base template for works for clients)

    I've searched a lot and couldn't find a conclusive answer. Some say is legal, others ilegal.

    Terms of Use - Just free Themes

    While i admit that all themes listed in this site are released under GPL, which gives you permission to almost any kind of use. But as a Muslim, it's my humble request that please do not use themes (especially those i have built) for any kind of Haram purposes. Such as for pornography, nudity, alcohol, music, movies, banks, etc.
    Thanks for understanding.

    submitted by /u/Don-g9
    [link] [comments]

    Utoprian

    Posted: 02 Aug 2018 03:53 PM PDT

    Hello everybody. Would love to introduce to you an I open source community that rewards anyone with an open project. Joined the utopian community and enjoy while working on your project.

    For more information in link below

    https://www.issuewire.com/utopianio-and-funditionio-announce-partnership-to-empower-the-development-of-open-source-projects-16074047y26825086

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

    Appearance discrimination in IT?

    Posted: 02 Aug 2018 07:25 AM PDT

    For you devs, managers etc.. Have you ever been neglected in your work for having a beard/long hair? In the company I work for they praise "looks" as being important to the image of the industry. I find this ridiculous, I wonder if anyone ever experienced something like this or if it's common in technology fields.

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

    Algorithm to search if a number exists in a heap (C++)

    Posted: 02 Aug 2018 02:50 PM PDT

    Hi, I've been struggling to find an efficient solution to this problem. I have two heaps and I need to find the highest number in the first heap, which isn't in the second heap.

    Heres my algorithm which doesn't always work:

    I have a bool which tracks if the highest number in heap 1 exists in heap 2. It starts out as true. And while its true:

    if heap1's max is equal to heap2's max, pop both.

    else if heap1's max is greater than heap2's max, make the bool false, and return heap1's max.

    else if heap1's max is less than heap2's max, pop heap2's max.

    This while will stop when the bool is false, or either of the heaps size is 0.

    Like I said this only works with some of my tests, and Im finding it difficult to trace through. Anyone know where I made an error or which cases it doesn't work for?

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

    Are a lot of programming jobs stay at home? Or what? What’s the general environment of programming jobs?

    Posted: 02 Aug 2018 10:05 AM PDT

    Sorry if this is a stupid and/or vague question. I'm starting working towards my CS degree this fall and have some grandiose dream of a stay at home, well paying job that I'll be able to get, but I want to get more of a realistic perspective on this

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

    Struggling With College Question (Python)

    Posted: 02 Aug 2018 12:38 PM PDT

    Consider a dictionary in which each key isba student ID, and the corresponding value is the list of elective modules for which that student is registered. Both student IDs and modules are stored as strings. Write the following Python functions:

    A) Take dictionary d as above and return a list of the student IDs who are taking less than 2 modules.

    B) Take dictionary d above and the ID of two students S1 and S2, and return a list of the elective modules which they take in common.

    Its not the most complicated stuff but im struggling to revise for an exam tomorrow and could use any help i get. Greatly appreciated

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

    How can I have a canvas in eclipse to draw and animate things with Java?

    Posted: 02 Aug 2018 04:56 AM PDT

    I'm sorry if that's a stupid question. I'm a beginner at programming. I learned Javascript in CodeHS and they had a nice canvas where I could draw things. Is there are way to have something like that in eclipse?

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

    How would an economic instrument (such as blockchain or a legal trust) be technically built that decays all money with a halflife of a few days, decaying toward every Human with an account (no duplicate Humans), and can at gaming low lag stream any changing account balance to anyone or everyone?

    Posted: 02 Aug 2018 05:50 PM PDT

    The purpose is to allocate groups of peoples attention similar to kickstarter, not to be a normal kind of money since it will be gone in some days. But without the provability and reliability, people wont take it seriously. I imagine such numbers might, like the Brave browser kind of, move between people, website names, and a variety of other things each attached to a Human.

    Such bandwidth may be in exchange for some small percent of fee to the provider of such reliable math services at a free market rate.

    If legally there must be certain amounts of delay to prevent mob behavior, then preallocate (like a gas station creates a hold before pumping) conditional on a gaming low lag digital signature to finalize the transaction (competing with ethereum raiden).

    Also, exact math is not required as long as it statistically converges to not create or destroy much of it.

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

    Question about python modules

    Posted: 02 Aug 2018 10:16 AM PDT

    I'm pretty new to python and I was wondering how to look into module functions to try and replicate them myself.

    I'm mostly using the language to program a Raspberry pi, but testing scripts on it is tedious (main reason: I am so far completely unable to install modules on the included Thonny IDE, which, because it's running a different version of Python than the terminal, doesn't recognize the modules I install that way, so the only way to test scripts is run the entire script through the terminal, which prevents me from running and checking chunks of code, and even if that did work, it would require hooking my pi up to one of my monitors, which it usually isn't since I mostly access it through SSH), so I was hoping to be able to test scripts on my desktop running windows, before deploying them on the pi. However, several modules that I want to use are only built for a linux environment. What I was hoping to do was dig down into the modules and recreate those functions for myself. But to do so I need to know a few things:

    Are most python module functions written in Python or in a different language (I started programming in R and a lot of R functions are written in C, for example)?

    If they are written in python, is there a simple function to display their definition?

    Thanks

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

    Dynamic websites

    Posted: 02 Aug 2018 01:29 AM PDT

    So i learned how to make static sites and Im comfortable with it though i was wonder where do i start when building a dynamic sites with AWS?

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

    How do you handle this generic situation of saving data. Do you have a model and pass a db connection to the model? Or do you have a db repository and then mass the model to the db repo?

    Posted: 02 Aug 2018 09:21 AM PDT

    I think that's clear. I've done both and I'm curious to see what people think. Would you rather have:

    $model = new Model($conn);

    or

    $dbRepository->save($model)

    Pros and cons of either solution? What do you do and why?

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

    Can someone help me get a better time complexity for this problem?

    Posted: 02 Aug 2018 03:21 AM PDT

    I have a question for which the solution I have (something like a brute force approach), is of time complexity O(n2)

    Can someone help me with an approach to solution with a better time complexity than this?

    You are give a rectangular grid of size n x m ( n is number of rows and m is number of columns ) that is divided into cells of size 1x1.

    Your task is to calculate number of sub rectangles of size p x q (p is number of rows and q is number of columns ), that contain a cell (x,y) in them.

    Note that you only have to calculate sub-rectangles of size p x q ( not q x p ).

    EDIT: For example when n=3, m=3, p=2,q=2 , x=2 and y=2, the output should be 4.

    https://imgur.com/GAJzoGr

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

    Please help me about how to create this flowchart

    Posted: 02 Aug 2018 09:03 AM PDT

    I tried so many possible outcomes and solution, I really did my best but it's so confusing.

    This is looping

    Create a flowchart that ask the user to enter A number ( n ) and display the first n even num. EX. N=6 2 4 6 8 10 12

    Just a basic programming guys like yes/no,circle,input/output, circle as start/end

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

    How does Entity Framework compare in the ORM market?

    Posted: 02 Aug 2018 08:19 AM PDT

    I've been using Entity Framework for a couple of years now, but man it's getting frustrating.

    Like, why can't I just give EF a data model object and say "Ok, go! Make the database look like this!"

    So, say I have an invoice with line items. If I want to add, modify and delete line items, I have to go through each line item and determine if it needs to be added, updated or deleted instead of letting EF do that for me.

    Do other ORM's have this same problem? Is there a better solution?

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

    SCI Understand C

    Posted: 02 Aug 2018 07:28 AM PDT

    Is there a cheaper program that does what understand does? I have an older version that has begun to not work under windows 10. So i went to look for a new version and these people want 1k a year for understand. Holy shit. It doesnt write the code for me.

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

    Part time programmers ?

    Posted: 01 Aug 2018 11:11 PM PDT

    Is there anyone who is working part time as programmer? If yes, what is it that you do, and how did you find that job ? Also, how hard is to find part time job as programmer and keep it for longer time, do firms actually hire part time developers ?

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

    1 vs 12 columns on CSS grids

    Posted: 02 Aug 2018 04:13 AM PDT

    Hello smart people,

    Pretty silly question to ask which has been haunting me recently. I'm building a website using CSS grids and for mobile version using just grid-template-columns: 1fr; which stretch and works correctly. However, I noticed that some people use 12 column system even for mobile versions (example https://learnjavascript.today/ ).

    Just trying to understand what's the idea behind it? Feeling there is a fundamental concept I missing.

    Many thanks,

    Fendn

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

    HTML Javascript

    Posted: 02 Aug 2018 03:59 AM PDT

    I am creating a website and I am trying to make my two background videos switch from background video 1 to background video 2. What am I doing wrong because it is not executing!

    THIS IS MY HTML CODE:

    <!DOCTYPE html>

    <html>

    <head>

    <title>The Programmer</title>

    <link rel="stylesheet" type="text/css" href="The Resume.css" />

    </head>

    <body>

    <h1 id="navbar">

    <ul>

    <li class="changeBackground"><a href="Story.html">My Story</a></li>

    <li class="changeBackground"><a href="Work.html">The Portfolio</a></li>

    <li class="changeBackground"><a href="Lets">Let's Chat!</a></li>

    </ul>

    </h1>

    <div class="Central">

    <video autoplay loop muted class="Jupiter">

    <source class="tito" src="videoone.mp4" type="video/mp4">

    <source class="peter" src="videodos.mp4" type="video/mp4">

    </video>

    </div>

    THIS IS MY JAVASCRIPT CODE:

    function Theview() {

    var Thefirst=document.getElementsByClassName("tito");

    var Second=document.getElementsByClassName("peter");

    while(Thefirst >= Second) {

    setInterval(Theview(),2000);

    }

    }

    Theview();

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

    Modern web app question

    Posted: 02 Aug 2018 03:00 AM PDT

    Background: I'm a sysadmin NOT a developer and have done some bits of app programming years ago. I'd like a little advice on how its done now in terms of keeping the running costs down but making it easy to scale.

    About the app:

    DB: *SQL and no-sql (i have use cases for both)

    API Layer (I want to completely seperate the backend from the front end so I can have a mobile app at a later date (GO or Python Flask)

    Fontend: Debating between GO and Python (mainly as i am most comfortable in them)

    Now in my traditional thinking head this is easy, 3 servers (or docker containers) and use postgres / mariadb for backend.

    My confusion is now hosting that and making it consumable, I would have normally just used linode and its a flat rate of say $15pm.. But I want to keep the costs as low as possible until I see if the app gets much attention.

    However if i were to code and use say elesticbean and RDS would that be cheaper or dearer? what other alternatives are there? I know I could use aws api gateway but I am a tad worried about lockin as I know AWS isnt always as cheap as it first appears depending on your usecase.

    (I say aws above but happy to look at redshift/googlecloud/azure as well if anyone does recommend)

    If I code to say postgres or sqlite is it difficult to migrate to RDS (or vice versa)?

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

    How to create TTL index with MongoDb and C# Driver

    Posted: 02 Aug 2018 02:39 AM PDT

    var dbClient = new MongoClient("");

    var database = dbClient.GetDatabase("TestDB");

    var testCollection= database.GetCollection<BsonDocument>("test");

    await testCollection.Indexes.CreateOneAsync(new CreateIndexModel<BsonDocument>(new BsonDocument("lastModifiedDate", 1), new CreateIndexOptions { ExpireAfter = new TimeSpan(0, 0, 5) }));

    Above works. But is this correct way to do this? I've tried to use MongoDB documentation but there is pretty much nothing regarding indexing with c#

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

    No comments:

    Post a Comment