• Breaking News

    Tuesday, October 30, 2018

    How would you design a program to remove openings and endings from various TV Shows? Ask Programming

    How would you design a program to remove openings and endings from various TV Shows? Ask Programming


    How would you design a program to remove openings and endings from various TV Shows?

    Posted: 30 Oct 2018 08:40 PM PDT

    Would you use ML or AI?

    I asked my friend about how ML could be used for this and here's what they said:

    So basically, we would probably have an output of the time the OP starts and end in frames. It would probably be some sequential model, maybe an RNN and CNN combo. I think we would need to split the video into its frames and feed them in one by one with the audio and have the model learn which sequences of images relate to the OP.

    But I'm not sure if that would be generalization to any opening/ending, since there are so many different kinds.

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

    I've got banned from r/help for sharing my program which got detected for virus alert, and i dont know why.

    Posted: 30 Oct 2018 11:42 AM PDT

    so r/help removed my program and banned me because somone ran my exe on virustotal.com that check for viruses and it said it cotains viruses. i made this program for myself and shared it.

    links to tests: Detection 5/67 on Reddit Downloader.exe https://www.virustotal.com/#/file/95029bfee91bdf058c648078699f6ee0c42715591528999a01cd5608e91ed9ff/detection

    any one can help me understand and analyze why this site alerted my program?

    edit: added more info in a comment

    submitted by /u/ISR-Asaf
    [link] [comments]

    How do you plan/build your cross language APIs?

    Posted: 30 Oct 2018 11:12 PM PDT

    Specifically the concern of abstraction and authentication while being multiple language assuming web based and not import based.

    I'm still working on thinking in OOP/making everything a class.

    Currently I use PHP/JavaScript/Python for my scripts/back end.Personally I've got some of my own services that I setup/use like a Twilio thing that I email myself to remind myself of stuff that takes min/hrs and the body of the message. I also have automatic emailing with MailGun, which most of this I wrap my own function name/params around the actual SDK/API that these companies provide.

    But it would be cool to make them easily accessible to interface with across platforms. I'm working on learning React Native and I'd like to access these features in there and part of this is the auth part, whether I send it as a param string or something.

    Thoughts?

    edit: cross-language may be dumb, like of course it's not possible maybe for some cases just because it won't parse/work like that eg. JavaScript won't interpret python(directly)(think include/require/import) but I hope I got across what I mean.

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

    Project ideas to show programming capability (for a job)

    Posted: 30 Oct 2018 09:38 AM PDT

    I dropped out of my program at university but I wanna learn whatever I may need to know for a job or just prove that I have some experience.

    What are some good project ideas? What methods / interfaces are good ideas?

    I know it might depend on the kind of job but I'm looking for something that might hit well in general. I'm mostly familiar with Java, C# and python.

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

    How to handle OpenGL Black Screen after update to MacOs Mojave 10.14 ?

    Posted: 30 Oct 2018 10:53 PM PDT

    As you may have known, OpenGL is now deprecated in the latest MacOS Mojave (10.14). I'm using OpenGL + GLUT (I know this is old, but I just need a simple program) and run on terminal (not using Xcode). With the same program that has been working perfectly in Sierra, I got so many OpenGL deprecated warnings in Mojave and managed to suppress all the warning using -Wno-deprecated-declarations , but now I only got black screen.

    I read a lot of same issues with black screen on OpenGL after Mojave update in StackOverflow. But as of now, only few of them actually have accepted answer and the answers don't work on me. What I have tried :

    1. Change glFlush() into glutSwapBuffers() to flush without a call
    2. Change glClear(GL_COLOR_BUFFER_BIT) into glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); (this one causing even more warning)

    This is my main loop :

    static void mainLoop(void) { glClearColor(0,0,0,0); glClear(GL_COLOR_BUFFER_BIT); //glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); glEnable(GL_FRAMEBUFFER_SRGB); argDrawMode2D(vp); //draw to the screen if(p++ % 2 < 1) argDrawImage(image1); //change every frame. RGRGRGRGRG else argDrawImage(image2); //DRAW GAP INFORMATION char string[256]; glColor3f(1,1,1); sprintf(string, "Some strings", string1 ); argDrawStringsByIdealPos( string, 10.0, 25.0 ); argSwapBuffers(); //clear the buffer glFlush(); } 

    Any suggestion ?

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

    How Does Anything Get Done with Waterfall?

    Posted: 30 Oct 2018 06:54 AM PDT

    I'm going back to school for computer software design. In my System Analysis & Design course, all we are learning about is waterfall. It seems so slow and bureaucratic; how does anything get done? My dad has been programming for 20+ years, he says they don't use waterfall where he works. Does anyone still use it? If so, what advantage does it offer over agile, etc?

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

    What will line 1 and 2 print?

    Posted: 30 Oct 2018 09:42 PM PDT

    What will line 1 and 2 print? Any help is appreciated!

    https://imgur.com/a/DAqX8YE

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

    How to charge from custom built apps?

    Posted: 30 Oct 2018 09:30 AM PDT

    Hello,

    Not necessarily a code-related question but could use some input from experienced programmers.

    I work as an IT consultant for a major firm, and most of my work are at customer premises (big banks and financial institutes). Most of my work consists of configuring and consulting our customers in a financial software that we develop and I also act as a business consultant on a general basis.

    From time to time I write my own scripts and applications to help me troubleshoot or perform daily tasks related to my work. Things our own or our customers developers may not have thought of or does not have time to implement. Sometimes I get asked from colleagues or customers' employees about said software and if it's a possibility to implement it in their systems or if it could be delivered to them as it would ease their daily work.

    Now, what would be the best approach to actually get paid for this code? The problem I see is that the management is not very interested in this software so it's pointless for me to bring it up that way. The employees could make a request but I doubt it'd lead anywhere due to the decision making progresses in these major banks. Also, in my contract it's stated that "all work related inventions are owned by the company" or something like it, so I'm afraid to lose the rights to my applications if I bring it up myself. Also, my job has nothing to do with coding and I doubt my company would just pay me hourly for some code that I deliver for "free" to our customers.. Especially since I would have to charge hours that I've spent on my own free time.

    Any tips or ideas in this situation? I'm not even 100% sure what relevant questions to ask :)

    Thank you in advance!

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

    New programmer wanting to make a small personal project in Java

    Posted: 30 Oct 2018 04:54 PM PDT

    My friends and I play a home brew DnD, and I would like to make an item generator for his game. There are three rarity categories of common, uncommon, and artifacts which all have a name and description; which can be generated in quantities of one or two items from each rarity. Each item category has on average 115 entries and I have the names and descriptions stored on text files. I would also like to have the ability to add new items within the program. Any direction or help would be appreciated!

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

    Need Help with Basic C# .NET program for College

    Posted: 30 Oct 2018 07:26 AM PDT

    Hi there everyone! I am struggling pretty hard in programming and I figured I'd reach out for help on a forum. I need to make a program that shows results for a race when someone types in the racers name and run time. I have done a little bit but I can't figure out what I am doing wrong. The program starts and the close and clear buttons work. But when I type in the information about the racers and click calculate nothing happens. I have pasted my code down below. Any help would be extremely appreciated! Thanks for reading!

    https://pastebin.com/JgG4tWcj

    https://i.imgur.com/kFAovU0.png

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

    using methods to clean up a script?

    Posted: 30 Oct 2018 08:37 AM PDT

    Is it okay to create a:

    private void Jump()

    {

    (insert what to do here)

    }

    and then use it in

    void Update()

    {

    Jump();

    }

    to make the code easier to read?

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

    Java Programming Project

    Posted: 30 Oct 2018 03:49 PM PDT

    I have a project for school. Do you guys have any suggestions on what to make? This is the assignment. Thanks.

    "Your project for this course is to design a new software design will solve an organizational problem."

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

    Standard ml permutations

    Posted: 30 Oct 2018 03:18 PM PDT

    My professor gave me a piece of code that takes in a list of numbers and he wants us to modify the code so that you only have to input one number (n) and the code finds the permutation from 1,2,..,n. I cant seem to do this, and help/guidance?

    fun insEverywhere e nil = [[e]] | insEverywhere e (y::ys) = (e::y::ys) :: (map (fn u => y::u) (insEverywhere e ys)); fun appendAll nil = nil | appendAll (z::zs) = z @ (appendAll zs) fun perm nil = [ nil ] | perm (x::xs) = appendAll (map (insEverywhere x) (perm xs)); perm[1,2,3]; 

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

    Looking for a notificacions/alerts app for a dev team

    Posted: 30 Oct 2018 02:25 PM PDT

    Hello everyone,

    Im looking for an app that shows notificacions, alerts or short messages for a group of people. It doesnt need to be any more than that, kinda like the pagers/beepers of old for a PC/Smartphone.

    Our dev team works on a remote server where we upload and compile code and we interact with it through a proxy to use the webpage (where we also have admin tools that we use) and we often need to restart the server when we make significant changes.

    So, when you are on the website filling a pretty big form or making changes that require many steps and someone restarts the server at that moment you can lose everything if you try to refresh or commit anything (forms are empty again, some records get locked, and more annoying stuff). But, the only thing you need to do to avoid it, is to just stay there and dont click anything, wait for 10, 15 seconds and you can go back to work, you dont even have to login again or anything like that.

    So, right now we all have a Skype chat group where we announce when anyone is going to restart the server or some process so everyone knows to wait a couple seconds or try to stop them from doing it until they finish their work.

    The problem is, Skype doesnt really work for this kind of stuff. Notificacions are easy to miss (they dont last long and they get mixed with other groups and chats) and sometimes the app freezes or the messages get delayed or lost.

    I cant find anything on the internet but maybe I just dont know where to look.

    We all work on Win10 PCs. Anything for PC could work but also Android Apps or Browser Plugins can make do too.

    Do you know any app that does something like this?

    Thanks!

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

    Have you ever given your all to a personal project that no one ever used?

    Posted: 30 Oct 2018 02:20 PM PDT

    I mean, I find my project useful. So that's one person. But it feels weird hashing out user-centric details that, possibly, nobody will ever notice.

    Have you ever put out something you're real proud of, and then watched it garner 0 attention?

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

    Parsing tab delimited text from xml

    Posted: 30 Oct 2018 02:04 PM PDT

    I need to write a python script that parses fund holding from an xml form.

    ex: https://www.sec.gov/Archives/edgar/data/1428242/000142824218000004/0001428242-18-000004.txt

    how would I do this?

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

    Code working in fiddle and browser but not in sharepoint 2013

    Posted: 30 Oct 2018 10:08 AM PDT

    https://jsfiddle.net/rurounisena/zrab1u8q/74/

    The above fiddle looks and does exactly what I need it to do. The HTML is copied exactly from a table in sharepoint. However when I try to jslink this code to the actual sharepoint page the below happens.

    https://i.stack.imgur.com/Gf6R1.jpg

    logging the diffdate after 1st if statement in fiddle:

    -52 NaN -30 -38

    logging the diffdate after 1st if statement in sharepoint:

    -52 -43 NaN -42 -32 -31 NaN -32 -49 NaN -45 -49 -46 -35 -30 -38 -56 -49 -46 -44 -39 -38 -36 -32 -56 -46

    I'm not sure what the issue is because the html in the fiddle is identical to the sharepoint table. Does anyone have any suggestions?

    js

    var j = jQuery.noConflict();

    j(document).ready(function(){

    var status = j("td.ms-vb-lastCell");

    status.each(function(index) {

    if (j(this).text() == "Received") {

    j(this).css("text-decoration", "line-through");

    }

    });

    });

    function dateSearch(jQuery) {

    const orgDates = j('tbody tr td.ms-cellstyle span.ms-noWrap');

    var message = '';

    orgDates.each((i, elem) => {

    let parts = j(elem).text().split('/');

    let dt = new Date(parts[2] ,parts[0] - 1, parts[1]).getTime();

    let diffdate = Math.floor((dt- new Date().getTime()) / (86400 * 1000));

    if (isNaN(diffdate)) {

    return 0;

    }

    console.log(diffdate);

    if(dt > new Date().getTime() || j(elem).parents('tr').find('td.ms-vb-lastCell').text() == 'Received' ){

    var nogood = diffdate;

    if(nogood) {

    return 0;

    }

    }

    if((diffdate+2) < 1) {

    if((diffdate+2) == 0) {

    diffdate = (diffdate+1) + ' day ago';

    }

    else {

    diffdate = (diffdate+1) + ' days ago';

    }

    }

    diffdate = diffdate.toString().slice(1);

    message += j(elem).parents('tr').find("a.ms-listlink").text() + ' ' + j(elem).parents('tr').find("td:nth-child(4)").text() + ' was due ' + diffdate + '<br/>';

    });

    j.alert({

    theme: 'my-theme',

    title: 'The following bulk is past the expected received date:',

    content: message

    });

    }

    j(document).ready(dateSearch);

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

    Python Average of 2D List

    Posted: 30 Oct 2018 10:05 AM PDT

    I'm basically trying to get the average of a list in a list in a list. (in python 3)

    for example, the user inputs:

    [ 1, [ 2, 3 ], [ 4, [ 5, 6 ], 7 ] ]

    It should then do this calculation (floating point numbers are rounded down):

    1. [ 1, [ 2, 3 ], [ 4, [ 5, 6 ], 7 ] ]
    2. [ 1, [ 2, 3 ], [ 4, 5, 7 ] ]
    3. [ 1, 2, 5 ]
    4. [ 2 ]
    5. Output: 2

    It already works for inputs like [ [ 1, 2 ], [ 3, 4 ] ] with this code

    def average_of_list(list): return [int(sum(row) / len(row)) for row in list] 

    But as soon as there is no nested list it gives me a typeerror

    any suggestions?

    EDIT: solved!

    Posted solution as imgur link or i'll fail the plagiarism checker lol

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

    Basic question about big O notation as it relates to insertion/deletion

    Posted: 30 Oct 2018 10:04 AM PDT

    I'm new to learning about Big O notation. My understanding is that insertion and deletion in the kth position are performed in O(n). For example, deleting the first element in an array is performed in O(1) time and then shifting each of the remaining elements one space to the left to fill in the gap formed by the deletion takes O(n). (Please correct me if that's not right!) My question is: does insertion/deletion still take O(n) time if it's taking place at the end of the array? I was thinking it might be O(1) because the "shifting" step wouldn't need to happen. But, not sure if that's the right way of thinking about it.

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

    Help fixing "Failed to resolve: play-services-basement"

    Posted: 30 Oct 2018 01:42 PM PDT

    Im pulling the source of an app directly from the Github page but when I attempt opening it in Android Studio it continues to give the error "Failed to resolve: play-services-basement" and "Failed to resolve: play-services-vision".

    Im new to Android Studio and am just trying to get the app running. Thanks for any help!

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

    Rectangle in C

    Posted: 30 Oct 2018 01:28 PM PDT

    Hello,

    I recently started studying computer science and while I was practicing a little bit I got stuck at a task where I have to print a rectangle using nested loops. The code I have written only prints one line and checking the solution didn't help me either. What did I do wrong?

    This is how the rectangle is supposed to look like.

    #################### # # # # # # # # # # # # # # # # #################### 

    This is my code

    #include <stdio.h>

    #include <conio.h>

    int main()

    {int h = 0, w = 0, y = 0, x = 0;

    do { 

     printf("Enter the height of the rectangle"); scanf\_s("%d", &h); 

     printf("Enter the width of the rectangle"); scanf\_s("%d", &w); 

     for (y; y <= h; y++) { if ((y == 0) || (y = h - 1)) 

    for (x; x <= w; x++)

    {

    printf("#");

    }

     else 

    for (x; x < w; x++)

    {

    if ((x == 0) || (x = w - 1))

    printf("#");

    else

    printf(" ");

    }

     } } while ((h > 0) && (w > 0)); \_getch(); 

    }

    I'm not sure if this is the right subreddit to ask this question if not please tell me!

    Thank you.

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

    How would I implement this idea for a website?

    Posted: 30 Oct 2018 01:16 PM PDT

    Hey guys, I'm pretty new to web development, and want to get my feet wet with a project idea that would be somewhat useful to me. I want to create a portfolio balancing app that would retrieve live stock data and decide how to balance based on the performance of the data. Eg - user says they want a 60/40 Equity/Bond portfolio with $10000. If equities fall by a certain percentage, the application would say how much of the bond(s) to liquidate in order to maintain the 60/40 split.

    I want to build this using python, but I've never really built any real web applications, most of my experience is in OOP Java, but I'm willing to learn. What would be the best way to approach this, and if someone experienced could comment on how difficult this would be to implement. I'm not looking for any concrete answers, but maybe just some guidance/blueprint on how to approach this.

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

    C#, Visual Studio: Has anyone found a way to fix all naming violations at once, without Resharper?

    Posted: 30 Oct 2018 01:00 PM PDT

    So my situation is pretty straightforward. I have a pretty complex Json output that I need to turn into C# classes. I'd prefer to use the solution baked into Visual Studio, Edit -> Paste Special -> Paste Json as Classes, mainly because I would like to avoid pushing my json to some website.

    The problem I've run into is that the generated code, which consits of a bunch of classes with a few hundred total parameters, are all camelCase variable names. Every... single... one has a naming rule violation (which I agree with; public class wide parameters should be PascalCase).

    There are 360+ violations, and I'll likely be doing this again with other Json in the future. I'm not overly thrilled at the idea of using ctrl + . 360 times to fix them all, and so I started looking for a way to fix all the naming violations in a class at once. But unfortunately, I couldn't find one!

    Does anyone have any ideas on an easy way to solve this? Either a way to tell it to create these new parameters in Pascal, or a way to just apply a naming fix Quick Action to all offending parameters at once?

    Thanks!

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

    I'm making anime-downloader and I'm stuck

    Posted: 30 Oct 2018 12:19 PM PDT

    So, my hostel wifi bans using torrents so I've to use sites to watch and downoad anime. Usually I have to download them epiosde by episode. So, I want to make a script to download batch animes. I'm planning first coding CLI and then moving this to GUI so my friends can also use it. All is fine, but when I reach the download site( say this,) the 'Download' button's href is 'dynamically loaded' (I have to run javascript in the webpage?)

    So, I came to know that we can achieve by PyQt5 by mimicking a browser but it seems slow ( PyQt5.QtWebEngineWidgets ),also it somehoe dies after one iteration and closes program with error code : -1073740791 (0xC0000409) . Next, I came to know of zombie module but when i use Browser() class it throws error (Cannot find path specified). I also tried selenium but it opens a physical browser window which I want to avoid.

    What do I do? Next step? All the websites (that I know of) have same problem. Also, I'm using chia-anime as base website.

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

    Managing specific database tables, with business data that changes frequently?

    Posted: 30 Oct 2018 10:22 AM PDT

    Hi all,

    At the moment we have several microservices written in Java with MySQL tables containing values that are important for logic e.g.

    • Categories (displayed in select boxes)
    • Exchange rate data (hedged at specific rates by the business)
    • Compliance and Legal text

    This stuff maybe changes once every month (normally).

    At the moment the process is like so

    1. User creates / modifies CSV with current values
    2. User sends this file to a developer
    3. Developer script sanity checks (basic validation)
    4. Developer then points script to specific environment and runs it
    5. Script truncates the table and then adds the new values
    6. Finish

    This is a fairly new project, so this was done as a hack to get it working. I am not happy about this way and looking for suggestions.

    One I have seen is building a basic CMS for the specified tables, however I am not sure if that is safe or relevant to a system that is mainly for backend logic that is abstracted away from end-users.

    Ideally I am looking to achieve the following with the implementation:

    • Auditing and rollback of data, incase its incorrect or breaks something
    • Rolls out to multiple environments or as part of a automated build process
    • Held in a central repository, possibly a git repo (however that is not friendly to non-dev users)

    At the moment its 5 tables that need maintenance (2 in one microservice, 3 in another)

    Any ideas?

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

    No comments:

    Post a Comment