• Breaking News

    Monday, August 26, 2019

    Starting a Coding Club at my High School Ask Programming

    Starting a Coding Club at my High School Ask Programming


    Starting a Coding Club at my High School

    Posted: 26 Aug 2019 04:19 PM PDT

    Hello, r/AskProgramming ! I am a senior at my high school and I've been talking to the administrators about starting up a coding club at my high school. They have given me the go-ahead as long as I can find an instructor to be in the room, because of the rules of a club. We have found a teacher that is willing to stay after with us so that's good so far! I was also informed that if we let the middle schoolers come over after school and be apart of the club we can earn a grant for our school to help our school as a whole. What I would like to know is what are some things I can use/do to teach my fellow club members and to keep them wanting to come back. Any feedback would be great because I do want this club to be successful at our school because anything dealing with tech at my school is almost non-existent so giving people who are interested in learning about coding; an outlet to come and practice and make new friends would make me very happy! Thank you for your time if you do respond and thank you for reading! :)

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

    Senior programmers of Reddit, what do you think when a junior programmer makes a mistake or can't solve the problem?

    Posted: 26 Aug 2019 12:35 PM PDT

    Ok so I'm a junior programmer (Java), I just started working for this very big company and I really love my job, but sometimes I can't get the right solution for some of the issues that I face, so naturally I ask for help from the more experienced, but every time I do this I feel dumb and like I'm dissapoiting my mentors. What do you think when this happens?

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

    How does allocating memory for your program work?

    Posted: 26 Aug 2019 11:34 AM PDT

    Screaming Frog, a website crawling tool, allows you to dedicate memory to it. The point is so the program doesn't need memory when none it is available. It reserves memory for itself to use.

    Can someone point me to the right direction in how I could do the same in, say, Python?

    I'm familiar with concepts like malloc in C for allocating memory to a single variable. Is allocating memory for your entire program basically the same concept?

    Screaming Frog is written in Java btw.

    submitted by /u/dougie-io
    [link] [comments]

    Recommendations for Coding Boot Camps in SD?

    Posted: 26 Aug 2019 09:07 PM PDT

    I graduated a couple of years ago with a degree in linguistics and am looking to change careers and enter the software industry. Since I don't feel like investing another 4 years in a degree, I want to do a coding boot camp to get started with my career change. I have a good chunk of change saved up to invest in a coding boot camp and need some help deciding which boot camp to attend.

    I have some programming knowledge already: I took a C/C++ class at the local community college and also did the java course on Code Academy.

    Do any of you all have recommendations on coding boot camps in San Diego? Are there any in San Diego that have a reputation for getting most of their graduates jobs in the industry?

    Any guidance is much appreciated! Thanks for your help!

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

    What is the relationship between nodeJS and npm?

    Posted: 26 Aug 2019 07:33 AM PDT

    How do I move projects from an old Visual Studio version to a new one?

    Posted: 26 Aug 2019 07:25 PM PDT

    My first IDE for C++ was Visual Studio 2015, so I decided to upgrade to Visual Studio 2019. I've been told that it's safe to uninstall VS 2015 now, but I'd rather not lose my old projects, in case I need to refer to them. Is it as simple as moving a folder, or is it more complicated than that?

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

    How do sites like InstaPage work with white labeling?

    Posted: 26 Aug 2019 05:54 PM PDT

    Hello,

    I'm thinking about allowing my customers to create a simple landing page and I'm wondering how I would allow them to white label their URL, so I can show their page via their URL.

    The process would go something like:

    1. My website would generate unique code
    2. User adds unique code to their DNS
    3. Now instead of their landing page being myweburl.com, it will read theirweburl.com

    I'm not entirely sure where to begin. Can anyone point me in the direction of where to start for this?

    Any help would be appreciated.

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

    At which level is ideal to check user input before sending it to the database?

    Posted: 26 Aug 2019 02:28 AM PDT

    I know, amateurish question; I suspect I'm going to receive a lot of "it depends".

    Say I have a data entry form in my app, nothing too fancy. At what level should I ideally validate the input? Closer to the view or closer to the DB/ORM? Right now I have a mess of several different validation checks and I definitely need to refactor so I decided to do it right and do it uniformly.

    I'm using C#/Xamarin/LiteDB (NoSQL database) and it's all going to run on a personal mobile device for now.

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

    Can any PHP gurus help me run this Magento class, please?

    Posted: 26 Aug 2019 03:54 PM PDT

    I'm doing a security challenge (CTF) and long story short, I have a Magento password to decrypt along with the key to do so. I found a bunch of examples on the internet and threw the code into this class: https://pastebin.com/3W149xdH. I've tried to go through the interactive PHP shell, include the class, and create a new instance of it so I can call the methods, but I end up getting "Argument 1 passed to Crypt::__construct() must be an instance of Magento\Framework\Encryption\EncryptorInterface". So, my question is really just how do I actually make use of the decryptPassword method?

    submitted by /u/----___----___----__
    [link] [comments]

    64 bit numbers in 32 bit executable

    Posted: 26 Aug 2019 03:12 PM PDT

    Let's say we have a 64 bit computer and a program compiled for a 64 bit OS.

    Math with 64 bit numbers would then be handled natively by the CPU.

    If we instead have a 32 bit machine with a program compiled for a 32 bit OS.

    Math with 64 bit numbers would now require some trickery to work properly, but as it is 2019, the compiler handles this for us and 64 bit numbers work as expected, though with some minor overhead.

    If we instead run the 32 bit program on the 64 bit machine with a 64 bit OS, is the program still using that trickery for the 32 bit computer. Or is it handled natively?

    Let's add some extra detail. We specify the OS as modern Windows and we compiled C code with Microsoft's MSVC compiler. Does this change anything? Is the trickery handled by the compiler directly or does it refer to a system library that handles it differently on the 32 and 64 bit machines.

    What if we're on Linux with GCC? Or the code was written in Rust (if it was handled by a system library).

    Java/C#? This seems to me more likely to be handled differently and reacted to by the JIT.

    Thanks in advance and sorry for the ramblyness of this question

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

    Pointer overflow when peeking at element of a fifo ?

    Posted: 26 Aug 2019 02:45 PM PDT

    I'm looking at the code for FFmpeg and I'm failing to understand one function in their implementation of a fifo.

    There is a function to peek at an element of the fifo given an offset (you can find it here):

    static inline uint8_t *av_fifo_peek2(const AVFifoBuffer *f, int offs) { uint8_t *ptr = f->rptr + offs; if (ptr >= f->end) ptr = f->buffer + (ptr - f->end); else if (ptr < f->buffer) ptr = f->end - (f->buffer - ptr); return ptr; } 

    While I understand the first if is intended to wrap around the buffer, I don't understand how in the second check ptr could be less than f->buffer.

    My guess is it's to deal with pointer overflow but I'm not really sure ?

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

    Altering variables outside function call, AngularJS/HTML

    Posted: 26 Aug 2019 07:35 AM PDT

    I have a page that contains data updated every 10 seconds or so. I am looking to alter that data if a button has been selected on the screen. The problem is that I can get the value to change, however , after 10 seconds when the page refreshes, the data resets. Now I cannot simply take the data OUT of the refresh because I WANT the data to refresh, but as long as that button has been selected I need the refresh value to be altered. Where as right now, it reverts back to the original data.

    I believe the following would be a solution, but it is not working. It seems as though changeHot cannot be referenced outside of the change() function. Is there a way to declare variables globally in Angular? Or does anyone see another way to accomplish this?

    AngularJS:

    var changeHot = false; function change(ID) { if (ID == 'hotButton'){ changeHot = true; } } $scope.getData = function(){ $http.get('http://localhost:5000').then(function(resp){ if (MorAftEve<11 && MorAftEve>=1) { $scope.realTimeCalculationMorning = data1 $scope.realTimeCalculationAfternoon = data2 $scope.realTimeCalculationEvening = data3 $scope.finalRealTimeCalculation = $scope.realTimeCalculationMorning; $scope.finalSolarCalculation = $scope.solarMorningCalculation; $scope.finalBatteryStatus = $scope.batteryStatusMorning; if(changeHot == true) { $scope.finalRealTimeCalculation =($scope.realTimeCalculationMorning *6) } } 

    HTML:

    type="button" class="btn btn-primary" id="hotButton" ng-click="change('hotButton');" 
    submitted by /u/TylerDTA
    [link] [comments]

    How do I run a SQL script on MacOS?

    Posted: 26 Aug 2019 12:27 PM PDT

    I am learning SQL (PostgreSQL, specifically), but I can't seem to run my script in Terminal or in Sublime Text. I tried every solution online and not a single one shows how to create a working Build System for SQL. I would greatly appreciate it if anyone can help me out with this.

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

    I want to be able to make a custom flag (Northern Ireland) emoji

    Posted: 26 Aug 2019 11:22 AM PDT

    There are four countries in the UK. England, Scotland, Wales and Northern Ireland. So far we have emojis supported in official fonts for England, Scotland and Wales, but even though an official definition for Northern Ireland exists in unicode (Regional indicators being GBNIR, Scotland appears when the regional indicators GBSCT appears, etc)

    I want to modify the notocolouremoji font to show a custom image of the Northern Ireland flag whenever GBNIR appears.

    Is there any way of going about this?

    Thanks.

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

    Front controller pattern c#

    Posted: 26 Aug 2019 11:16 AM PDT

    Has anyone use this pattern before ? Any pros and cons of using this pattern ?

    submitted by /u/l-bad_hombre-l
    [link] [comments]

    When to create a new branch in git.

    Posted: 26 Aug 2019 10:50 AM PDT

    I'm trying to familiarize more with git and while I can say I know why you should use git and what a branch is I'm not really sure when you should create a new branch. I tried looking up guides but all I can find are discording opinions and different workflows and it really seems almost anyone has a different as to how branches should be managed, at least to an extent. I realize maybe there isn't a one true answer to my question but still, at least I want to have a more clear idea about the use cases of branches.

    Right now I'm developing a personal project for my own business and I'm the sole developer on it. Should I create a new branch every time I want to add a new functionality to my own app? How much detailed should this process be? Say I'm adding a data entry aspect into my app: should it be on its own branch the whole time or should I use a new branch for every "minor" part of the whole functionality (one for every CRUD operation for example)?

    Bonus question: what should you do with your branch(es) after you're done with it? Do you "prune" it? Because in some cases I've seen people advocating about running all the developing process on a parallel branch, devoting it solely to the tinkering process in order to leave a more clean master branch; in those cases usually the workflow was to complete the task, merge with master and delete the developing branch only to create another one immediately after and start fresh adding more functionalities.

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

    Looking for a way to combine IDs for traceability

    Posted: 26 Aug 2019 05:02 AM PDT

    Hi everybody!

    I am not really looking for coding help, but rather some keywords to research. Unfortunately I'm quite the novice, so I don't really know where to start.

    I'm trying to find a way to combine UIDs in a way that makes their hierarchy traceable.

    Application: Each object has an ID attribute as unsigned 256 bit integer (or similar). When n objects are "joined", a new object is created with an ID of the same type. It should be possible to deduce the ID's of all n objects involved.

    In the best case scenario it would also be possible to do this across multiple levels. A query could be something like "the ID's of all objects two levels down from object nr. 23".

    Is there an algorithm for this kind of ID generation and decoding? Where can I find more info about issues like this?
    I hope my description of the problem is understandable.

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

    Alternatives to REST Interfaces

    Posted: 26 Aug 2019 08:24 AM PDT

    So I've been in the game for about a decade now, and one thing I've come to learn is that I despise REST. It seems to be overly complex, and completely unintuitive. Between the verbs, the headers, and trying to fit responses into a handful of response codes (some of which are only for jokes, ie 418 I'm a teapot) , as well as uri's being paths/endpoints/resources it still seems like a convoluted mess after years of building and interfacing with the protocol.

    I know there are alternatives like gRPC, but it is kind of heavy for an interface. As well I've also worked with various rpc calls via queues, but they add a lot of fat to the stack (specific clients, more services to maintain, no uniform standards).

    So what other alternatives are there to the REST protocol that aren't as convoluted, but also not as heavy as gRPC, or message based RPC?

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

    In the context of `.env.local`, should I commit my `.env`?

    Posted: 26 Aug 2019 02:22 AM PDT

    As per the twelve-factor app guidelines, dotenv states that.env files should never be committed. However, projects like Vue recommend splitting .env and .env.local -- then committing the former. What's going on?

    Here's what I know:

    • I want to manage my secret configs somewhere safe (not Git).
    • I also want the general deploy configurations--port numbers, paths, URLs, build parameters, etc--to be reproducible and version-controlled.
    • I don't want to manually teach every newcomer how to reproduce a 30-line .env file, line by line.
    • I don't want to invest my time in EnterPriseConfigManagerSolution that is effectively a poor replica of GitHub.

    So which side should I stick to?

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

    client-client file transfer in golang

    Posted: 26 Aug 2019 03:57 AM PDT

    Hello,

    I have two clients in different private networks. Those clients are connected to MQ server so I could send them messages from MQ server to make HTTP request(for example) to other servers in the internet. My goal is to send large file between those clients. Clients have no NAT so I can not set any direct connection between them. My first thoughts about this is to send a file from first client to the server, save it and then download it from the server by other client. But now I am wondering about possibility to make something like data stream between those clients through server but I have no idea what is the best way to do this(or maybe it is even not possible). Maybe is there other possibility to achieve my goal?

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

    What tools do you keep setting up before starting new projects?

    Posted: 26 Aug 2019 12:17 AM PDT

    Hey folks,
    I wonder what are your project setups and whether if it's annoying to configure it.

    For example, I often set up ESLint + Webpack for my web dev projects. On the other hand, it always feels like a pain in the ass to go through that configuration process. But in the end, I know it'll make my programming easier and more productive.

    Do you configure similar tools for your projects?

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

    No comments:

    Post a Comment