• Breaking News

    Saturday, August 15, 2020

    Can somebody explain version control to me, the difference between push and commit and the other things about it, I'm having trouble picturing how it works? Ask Programming

    Can somebody explain version control to me, the difference between push and commit and the other things about it, I'm having trouble picturing how it works? Ask Programming


    Can somebody explain version control to me, the difference between push and commit and the other things about it, I'm having trouble picturing how it works?

    Posted: 15 Aug 2020 07:38 AM PDT

    Any ideas regarding this interview question?

    Posted: 15 Aug 2020 02:26 PM PDT

    I received this interview question recently which was more of a design question.

    Basically, you are given a massive n by n matrix, representing a world map, which is too extremely large to fit in memory. You have a function which can take in as a parameter coordinates and return the name of the country at that coordinate.

    The question is, given a random x and y, what is the quickest way to find which country the point belongs to? What is the best way to run preprocessing, compression, or some kind of search so as to accomplish the objective most efficiently?

    Wasn't really sure how to approach the problem. Any insight would be appreciated. Thanks!

    submitted by /u/lord-please-help-me
    [link] [comments]

    Where are default data structures like int, uint, char actually defined?

    Posted: 15 Aug 2020 08:49 PM PDT

    I've tried looking this up myself and have some ideas but perhaps someone here actually knows. Are basic C/C++ etc data structures and how they're handled such as int, uint_32, arrays etc. actually defined within the compiler, header files or somewhere else? Do Processors have built in operations for these data types? My guess is that since they don't need to be included within a program they must be defined within the compiler but I'm not 100% certain. If anyone could shed some light on this or direct me to where I could learn more it would be much appreciated.

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

    In LCS problem, Why can’t (len[i][j]=len[i-1][j-1]+1;) just be len[i][j]=len[i-1][j]+1; ?[Dynamic programming]

    Posted: 15 Aug 2020 10:07 PM PDT

    for (int i=1; i<=n1; i++) for (int j=1; j<=n2; j++) if (s1[i] == s2[j]) length[i][j] = length[i-1][j-1] + 1; else length[i][j] = max(length[i-1][j], length[i][j-1]); 
    submitted by /u/JacksonSteel
    [link] [comments]

    How can I a beginner learn to code on a chrome book?

    Posted: 15 Aug 2020 09:42 PM PDT

    I have a Lenovo c340-11 chromebook and was wondering if I could learn to code with it. I was also wondering since I can download chromes beta Linux on it from the setting should I? and what apps should I put on it and if you could recommend books on amazon to read and websites to learn programming language that would be helpful

    My goal is to start out with basics and possibly make a small android game before I graduate high school in 2 years.

    submitted by /u/aN4-r3W
    [link] [comments]

    Can someone help with USACO Broken Necklace?

    Posted: 15 Aug 2020 08:45 PM PDT

    I've been stuck on this problem for 2 days, and I still have no idea where to start. Could someone take me through it one step at a time without dynamic programming? Any help would be greatly appreciated :)

    submitted by /u/Hello-Coder555
    [link] [comments]

    Proper commit conventions

    Posted: 15 Aug 2020 07:57 PM PDT

    Hi all - I'm working on creating a blog for myself and to the share knowledge I learn along the way. I chose a Gatsby minimalist starter and bootstrapped it to begin editing it as my own. My question is - is it in proper convention to commit the initial bootstrap without changing anything? I plan on sharing my code on github. I assume it would make the most sense to immediately commit the intitial codebase before making any changes. I want to make sure what I am doing is in proper convention as my code will be publicly facing and potentially viewed by employers. Thanks!

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

    Why doesn't anyone develop for the Windows 10 Store?

    Posted: 15 Aug 2020 07:35 PM PDT

    I just find it odd, Windows 10 is installed on more than 1 billion devices worldwide, but the Microsoft Store is in kind of a bad state. There aren't that many apps, it's slow and clunky, and not at all enjoyable to use vs. ios or android. Microsoft even advertises their new Surface Products using the touchscreen and apps like photoshop express. Why is it such an unappealing platform for developers?

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

    Anyone has a simple, clear example of Dependency Injection?

    Posted: 15 Aug 2020 10:32 AM PDT

    (1) One piece of code without DI and (2) then the same code with DI. Just the code, explanation is optional. Preferably in C# but Java, Javascript and other similar languages would do too.

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

    Why does youtube take 2 seconds to frame-step forward one frame while it can play 4k 60fps with no issue?

    Posted: 15 Aug 2020 03:33 AM PDT

    that's 120 times slower. Why does this happen? I can understand why it happens if i framestep back (it needs to seek to the latest keyframe and decode all frames up until the one i requested) but the next frame? It doesn't make sense

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

    Can anyone extract the floats from this?

    Posted: 15 Aug 2020 04:13 PM PDT

    I'm trying to work out how to get all the float numbers from this:

    https://gist.github.com/little-eagle/55f1ac13b4034880d45bfb00e0dad919

    The context is javascript. Can anyone help? There should be a few hundred floats in there and I'm not sure how it's structured.

    submitted by /u/little-eagle
    [link] [comments]

    Can anyone help me understand this PHP diff function?

    Posted: 15 Aug 2020 04:02 PM PDT

    I'm trying to learn how diffs are calculated between two versions of a file, and I came across this implementation which works great in practice but I'm having trouble understanding the internal functionality.

    // Usage $old = "The original text"; $new = "The edited text"; $diff = diff(preg_split("/[\s]+/", $old), preg_split("/[\s]+/", $new)); // Implementation function diff($old, $new){ $matrix = array(); $maxlen = 0; foreach($old as $oindex => $ovalue){ $nkeys = array_keys($new, $ovalue); foreach($nkeys as $nindex){ $matrix[$oindex][$nindex] = isset($matrix[$oindex - 1][$nindex - 1]) ? $matrix[$oindex - 1][$nindex - 1] + 1 : 1; if($matrix[$oindex][$nindex] > $maxlen){ $maxlen = $matrix[$oindex][$nindex]; $omax = $oindex + 1 - $maxlen; $nmax = $nindex + 1 - $maxlen; } } } if($maxlen == 0) return array(array('d'=>$old, 'i'=>$new)); return array_merge( diff(array_slice($old, 0, $omax), array_slice($new, 0, $nmax)), array_slice($new, $nmax, $maxlen), diff(array_slice($old, $omax + $maxlen), array_slice($new, $nmax + $maxlen))); } 

    It takes two arrays of strings split up by whitespace, and then recursively calls itself to... do something? I'm having a hard time comprehending what is happening inside those foreach loops, with that $matrix variable and $maxlen and such.

    Can anyone help me step through this function and figure out how it actually finds the differences between the two strings?

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

    Can't seem to access Jquery commands on Pycharm.

    Posted: 15 Aug 2020 03:45 PM PDT

    I am trying to a web project that involved downloading Jquery. I downloaded the files directly from the main website but had to do it as a save as link. Anyway I noticed the commands I was entering weren't changing colors or providing drop down lists as I was entering and it appears that I'm not accessing the commands from the download. I don't really know what could have gone wrong but it doesn't seem to be functioning at least from what I'm seeing. The instructor for this course doesn't really answer questions and I don't really have access to anyone who knows coding that can help me with this issue. The code is divided on two different files one is a HTML file the other is a Javascript file. They are part of a larger python based project I am working on. The first section of code where I call for the Jquery looks like this:

    $def with (page) $var css: Static/css/bootstrap.min.css Static/css /scss/bootstrap-material-design.min.scss $var js: Static/js/jquery-3.5.1.min.js Static/js/bootstrap.min.js Static/js/ripples.js static/js/scripty.js <html lang="en"> <head> <meta charset="UTF-8"> <title>CodeMage</title> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script> <script src="bower_components/jquery/jquery.js"></script> $if self.css: $for style in self.css.split(): <link rel="stylesheet" href="$style"/> </head> <body> <div id ="app"> <div class="navbar navbar-expand-lg navbar-light navbar-fixed-top" style="background-color:#e3f2fd;"> <div class="navbar-header"> <a class="navbar-brand">CodeMage</a> </div> <ul class="nav navbar-nav"> <li><a class="waves-effect" href="/">Home Feed<div class="ripple container"></div></a></li> <li><a href="discover">Discover<div class="ripple container"></div></a></li> <li><a href="profile">Profile<div class="ripple container"></div></a></li> <li><a href="settings">Settings<div class="ripple container"></div></a></li> </ul>&nbsp; <div class="pull-right"> <a href="/Login" class="btn btn-link waves-effect">Login</a>&nbsp; <a href="/register" class="btn btn-raised btn-default waves-effect">Register</a>&nbsp; </div> </div> <br /><br /> $:page </div> $if self.js: $for script in self.js.split(): <script scr="$script"></script> </body> </html> 

    The other section that I noticed wasn't seemingly reacting correctly was:

    $(document).ready(function(){ console.log("loaded"); $.material.init(); $(document).on("submit", "register-form", function(e){ e.preventDefault(); var form = $('register-form').serialize(); $.ajax({ url: '/postregistration', data: form, success: function(response){ console.log(response) } }): }); }): 

    The second file is called scripty and is called in the first. If anyone knows what the issue might be please let me know. Sorry if there are any formatting errors on here.

    submitted by /u/Wiseman-no
    [link] [comments]

    Why don’t all people experience the same bugs?

    Posted: 15 Aug 2020 03:19 PM PDT

    It's very common for developers to release beta softwares so people find test them out and find possible bugs, or even just release normal updates and people still find bugs.

    However, why don't all users always experience the same bugs? I've noticed on many and even most occasions that only some people experience certain bugs, while others don't encounter them at all.

    But why is that? Isn't it the same program that runs on every computer? Why would one person encounter a bug, while another doesn't?

    Thanks in advance!

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

    How could I turn hundreds of audio recordings into a text-to-speech program?

    Posted: 15 Aug 2020 02:35 PM PDT

    I have hundreds of recordings of my voice, talking about random stuff.

    I'm interested in somehow converting these into a text-to-speech program (even if it means having to transcribe the clips) but I can't actually code and never looked into anything like this.

    Any guidance / direction hugely appreciated!! <3

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

    I'm a web application owner, I've worked out all the details on my app and I'm about to hire coders to build it. What's your preferred way to have me fully define and communicate the app's features, logic, and requirements? Flowcharts? Hierarchical document? Document with flowcharts?

    Posted: 15 Aug 2020 01:36 PM PDT

    I'm happy to learn best practices or helpful applications that make it as seemless as possible for the devs.

    Or if there are any "how to fully define an application for developers" tutorials you suggest that would be great too.

    Thanks!

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

    Stand-alone JS Console for Linux

    Posted: 15 Aug 2020 12:18 PM PDT

    I use firefox's default console and even I know this website exists. I also have node installed on my Linux. I need to mess with fetch() method, but it's not available in node. And honestly, I don't want to open my browser to test my idea. Is there any standalone JS console?

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

    Need Advice ( Java or JavaScript)

    Posted: 15 Aug 2020 12:13 PM PDT

    Hello , I am an UnderGraduate student and I want to make a career out of programming.

    I already know Python pretty well, did couple of projects and a little bit of C.

    I want to learn another programming language but not too many as I feel learning too many languages while not being perfect in any is bit of an overkill.

    I would love some advice whether should I choose Java or JavaScript. If you wanna suggest me some other language that'd be cool too.

    Thank you.

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

    Have you learn't Rust and C++, if so what are the likes and dislikes about Rust over C++?

    Posted: 15 Aug 2020 08:23 AM PDT

    If you have learn't Rust and C++, if so what are the likes and dislikes about Rust over C++ and which one would you recommend?

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

    Easiest way to sort dropdown menu options when no ID is available, only name?

    Posted: 15 Aug 2020 11:54 AM PDT

    Nothing seems to work for me, when ID is missing. Goal is to sort manual order 'All Levels, Beginner, Intermediate, Advanced, Pro Secrets'. Here's the source: https://codepen.io/lioron23/pen/bGppLdY

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

    Best way to manage data in a small management application?

    Posted: 15 Aug 2020 11:24 AM PDT

    Good afternoon, everybody

    The other day I was speaking with my father and he asked me if I could create an application for him to manage his students (he gives English classes) so he could see who paid and who did not, and also to be able to send the bills via e-mail since he's now giving classes online due to covid-19.

    My problem is regarding the data... He's got around 60 students during the semester, and I was wondering which can be some ways of managing that data... Every beggining of the month the program should do some managing of the data to keep track of the past months and to start a new month and send the receipts to the clients... But I don't know which is the most efficient way to get away with it.

    I thought of using csv files but I don't know how I could update information every month. At the same time, I also thought of some SQL database but I don't know if I can schedule monthly operations or something like that locally.

    What is the best option?

    Any help is appreciated! Thanks in advance

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

    Should I learn C thoroughly before I learn C++?

    Posted: 15 Aug 2020 06:33 AM PDT

    I already have basic programming experience with a lot of languages such as Java, C, C++ etc. I want to learn C++ in depth though. Should I learn C before I learn C++?

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

    Help me automate simple, repetitive tasks in browser

    Posted: 15 Aug 2020 04:50 AM PDT

    Here is ideally what I want:

    1. I input a keyword. Output will be the page title, main-body wordcount, and list of headings from each of the top 10 Google results.
    2. I'd also like to automate affiliate link generation. Input a batch of regular URLS and output the affiliate links, which are usually generated one by one from a form on an affiliate program member webpage.

    Thanks for any help

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

    How do i start a web project?

    Posted: 15 Aug 2020 08:26 AM PDT

    After getting into programming with gamemaker, i decided to step outside of that comfy box to try abd get into web development, i currently have a project in mind, an react.js SPA (from what friends say since i don't have to learn much new syntax) for online multiplayer with a database and community aspect (i know, i kight be too ambitious but i might do it alongside someone else and i'm doing this for fun), possibly using my old phones as servers but that is less important

    Point is, i somewhat get the syntax to html css and javascript, thanks to codecademy, but i now do not know how to start, i find the project setup project to be extremely confusing

    Any good resources on project setups? Also, should i use node.js for such a project?

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

    No comments:

    Post a Comment