• Breaking News

    Thursday, May 28, 2020

    Defending my M.S. in Applied Stats Ask Programming

    Defending my M.S. in Applied Stats Ask Programming


    Defending my M.S. in Applied Stats

    Posted: 28 May 2020 09:11 PM PDT

    Hi all,

    Long story short, I am a software engineer for the military. Recruitment said they would pay for my Master's, which is why I joined. I applied and got accepted into my top choice for an online M.S. in Applied Statistics because I want to move into data science in the future.

    When I started a bit ago, it seems like I have to also convince my boss that any education they fund will help evolve my career.

    How do I tell them that I plan on pursuing data science after I finish my degree, if I even tell them? How do I defend this in a reasonable investment in my career? (There is a heavy computational aspect to the statistics classes) (I am not asking if this is the correct path, mind you)

    Edit: I develop physics simulations.

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

    OpenCV and Python Edge Smoothing Error

    Posted: 28 May 2020 08:35 PM PDT

    import cv2 as cv

    import numpy

    cvMat (vesselImage) = cv.imread('raw_mask1.png');

    cv.threshold(vesselImage, vesselImage, 125, 255, THRESH_BINARY);

    cvMat (blurredImage);

    cv.pyrUp(vesselImage, blurredImage);

    for i in range(15):

    cv.medianBlur(blurredImage, blurredImage, 7);

    cv.pyrDown(blurredImage, blurredImage);

    cv.threshold(blurredImage, blurredImage, 200, 255, THRESH_BINARY);

    -------------------------------------------------------------------------------------------------------
    -------------------------------------------------------------------------------------------------------

    I am getting the following error. Please help.
    File "C:\Users\Hello Pranav\Desktop\pranav mask2.py", line 5

    cvMat (vesselImage) = cv.imread('raw_mask1.png');

    ^

    SyntaxError: can't assign to function call

    submitted by /u/iampranav-ai
    [link] [comments]

    With the latest recommendations, why is it a bad idea to use OAuth2 for authentication? Why is OIDC a good idea instead?

    Posted: 28 May 2020 04:48 AM PDT

    I've recently been setting up an authorisation server for a startup I'm launching. Now, we could have just used something like Auth0 and been done with it (temporarily) in an authentication sense, but knowing that we have some complex needs surrounding both authentication and authorisation we opted for creating our own "IAM" service.

    The obvious first step here seems to be making an OAuth2 server. We have several client applications, including a dashboard application that's a single-page application. We wanted to delegate authorisation to protected resources via that client on behalf of a user, and that is of course exactly what OAuth2 is intended to be used for.

    However, another requirement of that dashboard application is that it shows the current user information somewhere (i.e. their name at least) so they're aware of who they're "logged in" as, etc. Now that on its own isn't authentication - I get that, it's more like pseudo-authentication; it's just showing the entity interacting with a client application which user originally consented to that access token being used.

    I'm currently struggling to understand:

    • Why using OIDC to "authenticate" provides any more "authentication" than OAuth2?
    • Why using OAuth2 would be any less secure as a mechanism for authentication?

    My current view on the first of those questions so far is that OIDC seems to be for the benefit of a client application. As in, the client can say if it received an ID token that the user has authenticated with it because the only way it would get one is either from something like an authorization code flow initiated by a user, or a refresh token flow (which should only be possible to be initiated by the client that made that initial authorization code flow request).

    But what difference does that make to a client in that case when compared with receiving an access token alongside a refresh token (either via the refresh token grant, or the authorization code grant)? All of the above also applies to the that flow, i.e. the only way you get a new access token alongside a refresh token is by something like an authorization code or refresh token flow, and you can only do this if the user themselves consented to that initial authorisation code flow. The authorisation code and refresh token will still be bound to that specific client. The access token itself being a JWT is fine too, they're all unique, their authenticity can be easily verified, and depending on how you implement them they're still trivial to revoke (e.g. by storing the "jti" claim, and still verifying an access token with every request to a protected resource). What difference is there then between being able to use the token endpoint at all, and what OIDC does in terms of authenticating the user?

    The only argument I can think of is that OIDC standardises this approach, meaning it's easier for third-party clients to consume identities from your OIDC server, and it allows you to use off-the-shelf client libraries, etc. This point is actually one that resonates with me, because it would make developing clients a lot easier and probably more secure because those libraries will be better battle-tested. This is to say, OIDC makes it easier to consume identities from an identity provider in a standard way (e.g. for identity federation).

    The second of these questions, I cannot wrap my head around. Quite a few places have said that it's less secure, and gone on to give some reasons why it's insecure (and then explained how to avoid those issues with OAuth2 itself), but most of the content I've found on this topic seems to be quite old (i.e. before implicit flow was deprecated in favour of using the authorisation code flow with PKCE - which is the way I'm currently tackling it). I understand the potential loopholes in OAuth, but the spec does cover how to avoid many of these (one in particular that people seem to keep talking about is how according to the OAuth2 spec, authorization codes can be re-used in different clients as long as they're valid - but actually the spec does say "The authorization code is bound to the client identifier and redirection URI.").

    What is OIDC doing to make any of this more secure anyway? An access token is still an access token right? If you have an insecure OAuth2 implementation, it doesn't seem like layering on OIDC is going to help with that.

    I'm completely content with the argument that OIDC just standardises this authentication approach, but I can't tell if I'm just missing something that actually makes OAuth2 insecure, or a bad choice for authentication in some way other than the standardisation argument I've mentioned above. It is certainly entirely possible there's some kind of situation I'm not thinking of where the distinction and addition of the ID token seems more useful from a security standpoint, and would really appreciate some input from people that are more knowledgeable on the subject than I am after spending a week building an OAuth2 server...

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

    Specialization

    Posted: 28 May 2020 08:12 PM PDT

    Hey! I am 16 years old and really like coding, but I have doubts about what I want to integrate with. I love dealing with internal issues while hate designing interfaces, et (for example, I can do well writing the source code of a game but hate designing assets, UI)

    So, how can I know what to do and what language is popular for specializing on that? Should I think of databases? Game development? Web pages? Security?

    Thanks for answering!

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

    How does a load balancer ACTUALLY work?

    Posted: 28 May 2020 05:33 PM PDT

    Hello, unsure if this is the correct sub.

    I'm aware of what a load balancer is, but how does it ACTUALLY function?

    If you're development a network application with a server, eventually having a single server doesn't scale, so you split the load over multiple servers 'horizontally'.

    When a client makes a request, that request will hit your load balancer, which will forward the request to one of the servers.

    However, if all the requests are still going through a single load balancer... don't you still have scaling issues? Surely you'll get to a point where that single load balancer can't balance the incoming data fast enough?

    Is there extra load balancing on the DNS level, or the IP level?

    How can you truly scale 'infinitely', even with an embarrassingly parallel problem, if you're always running all your requests through a bottleneck?

    Thanks.

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

    Project Help

    Posted: 28 May 2020 08:37 PM PDT

    Hey guys accidentally pencilled my due date in a week late and am looking for someone to help me with my fairly basic java project that is due at midnight. Would have been able to complete myself but just no longer have the time? Anyone willing to help will pay $$

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

    Edge smoothing error in Python

    Posted: 28 May 2020 07:49 PM PDT

    import cv2 as cv

    import numpy

    cvMat (vesselImage) = cv.imread('raw_mask1.png');

    cv.threshold(vesselImage, vesselImage, 125, 255, THRESH_BINARY);

    cvMat (blurredImage);

    cv.pyrUp(vesselImage, blurredImage);

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

    cv.medianBlur(blurredImage, blurredImage, 7);

    cv.pyrDown(blurredImage, blurredImage);

    cv.threshold(blurredImage, blurredImage, 200, 255, THRESH_BINARY);

    -------------------------------------------------------------------------------------------------------------
    -------------------------------------------------------------------------------------------------------------

    This is python code for edge smoothing of binary images.

    But I am getting an error. Please help.

    File "C:\Users\Hello Pranav\Desktop\pranav mask2.py", line 10

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

    ^

    SyntaxError: invalid syntax

    submitted by /u/iampranav-ai
    [link] [comments]

    Cannot install HAXM on Android Studio

    Posted: 28 May 2020 06:52 PM PDT

    I have CPU virtualization on, and nothing is working, it just keeps telling me to go to a GitHub repository for help. Can anyone help? I cannot run android virtual devices without this, so I can't test my apps.

    submitted by /u/8blackears
    [link] [comments]

    Why covariance/contravariance?

    Posted: 28 May 2020 02:47 PM PDT

    I understand basically rhat these have to do with going from a "less derived" to a "more derived" type or vice-versa, but why were these terms chosen, specifically? What do they mean? So far all I've been able to come up with is that they come from category theory and their definitions and context in programming were not immediately intuitive to me. Should I go read introductory category theory books? Should I just memorize it and leave it at that?

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

    Intermediate C# Developer wanting to learn C++. What is the same, what is different?

    Posted: 28 May 2020 04:12 PM PDT

    I've been programming for roughly 5 years in C# and web applications. I'd like to learn C++ and OpenGL to make games down the road. What aspects are similar and what new concepts are important for me to learn? I know there is Traditional and Modern C++, but what does that mean? what should I be looking at as a newcommer? Thanks for any feedback.

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

    API to verify if Health/Auto insurance is active?

    Posted: 28 May 2020 03:21 PM PDT

    I work at a billing company and the software we use lets us put a patients member ID in a field and it will return whether or not the inusrance is active or not. I thought this was cool and had a nifty idea for an app, but I cannot figure out how they did it.

    Is there an API that handles this? basically they put the required info and it returns whether that insurance is currently covering them?

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

    B-trees and auto incrementing

    Posted: 28 May 2020 02:33 PM PDT

    How are B-Trees not wasteful when the key is an auto incrementing number? Say I have a 5th order B-tree (4 values and 5 children) and I have one node: (1,2,3,4) with no children. Now I want to add 5. My understanding is that it would split that into: (1,2,-,-) and (4,5,-,-) and then have a new parent with (3,-,-,-). Then as more is appended, it will eventually grow the 2nd child to (4,5,6,7). When it comes time to add 8, it will split that one into (4,5,-,-) and (7,8,-,-) and add 6 to the parent (3,6,-,-). And so on.

    It seems to me that every node, other than the node it's currently appending to will be half empty. Wouldn't that be wasteful? Or am I missing something with how B-trees work or are used?

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

    Instead of adding a word it changes the word in Codeblocks.

    Posted: 28 May 2020 12:59 AM PDT

    I'm learning C language but I don't know if I messed up, the thing is that when editing a command or word in my code it changes the word letter under I click. Example: if the word written is "orage" when the correct word is "orange", and i try to correct it by writing the letter 'n' in that word, it changes the letter in that word instead of adding a letter and would write like "orane" or "ornge", because of this, I have to re-write the whole line of code in front of it. you get what I mean right? Please help.

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

    What's with all of the programmer YouTuber's having mental breakdowns

    Posted: 28 May 2020 08:12 PM PDT

    Does this reflect your experience? Are they doing it for the street cred? For instance, Joshua Fluke and Tech Lead. As an ex-Microsoft, ex-Google consultant / can I too achieve YouTube fame to this audience? I'd be like a more soulless, um.. have you seen the show House of Lies? I rub shoulders with people who have JavaScript influence. I have worked alongside many multi-millionaires, blah blah blah. Is the status entertaining or is the fall the entertainment? Is there any real value from the content?

    (Obfuscated for safety, don't doxx)

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

    How do set operations work internally?

    Posted: 28 May 2020 01:45 PM PDT

    I'm told set operations are more efficient than arrays for operations like union, intersection, insertion, etc. but I have a hard time imagining set operations being done without some sort of iteration which could still be kind of inefficient. Are they some sort of linked list with a hash function for O(1) or O(n) searching? How does that work?

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

    Should i pursue 6502 programming, X64, ARM, Z80 or 8086?

    Posted: 28 May 2020 01:39 PM PDT

    I mainly use codeblocks, so are there plugins for these languages? if not, what are some other IDE's i can use?

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

    Design desktop app in visual studio.

    Posted: 28 May 2020 01:38 PM PDT

    Hi. I am making a desktop app in Visual Studio using c++. How do I design the app (e.g add text, buttons, etc)? Thanks in advance.

    submitted by /u/8blackears
    [link] [comments]

    What platform to use for writing help articles?

    Posted: 28 May 2020 01:27 PM PDT

    I have made an e-commerce website and now want to write help articles for buyers, sellers etc, something like https://help.shopify.com/ . Is there a theme or plugin in wordpress for this? Are there any other cms systems/frameworks designed specifically for this? Thanks

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

    Question about MVC pattern violation

    Posted: 28 May 2020 01:27 PM PDT

    So one of my computer science teachers in university insists there must be no imports from model in the view layer as such I must have String converters for lists in the controller and cant use lists with objects in view.

    My question is, doesnt this approach cause the Code to have higher maintenance and requirements just so the MVC isnt violated in the slightest?

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

    Leetcode or Projects

    Posted: 28 May 2020 01:01 PM PDT

    I just graduated and have a few technical projects under my belt, but my technical work terms have been in a different field. I did a minor in CS, not a major. I was wondering whats better to help me get employed, Leetcode problems, or personal projects that I work on? I see the upsides to both, but with doing applications most of the day, I have to chose between Leetcode and projects. Thanks

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

    Best way to make a small, simple, backwards compatible windows program/script?

    Posted: 28 May 2020 12:52 PM PDT

    Some background.

    I'm relatively new to the world of programming and I started learning python first. Incidentally, I needed to create a simple script that handles some csv data and files. So I wrote that in python, did some tests, and it all worked fine. I had to distribute it to several older computers running windows, so I compiled it using pyinstaller. The binary came out to be around 9mb.

    Besides its size that seemed a bit excessive (I know it's a result of it packing in some files needed to make it run, but still, smaller file size is something I tend to like), I found that it generated errors on those computers. One of the errors had to do with 32bit systems not being able to run it (which is understandable, since I probably have python 64bit installed). Another had to do with c++ vc redist libraries missing. So I installed that, and got a 3rd error, which upon looking up I learned is a result of pyinstaller dropping support for windows 7.

    So in short, my question is, what do you suggest I can use to create a simple script that handles simple data and file operations and works on most versions of windows? I'm open to all suggestions, as I'd like to learn about all my available options. Thanks!

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

    Remote Desktop Application

    Posted: 28 May 2020 09:06 AM PDT

    What are the technologies behind RDP? Why does it lag so much? What technologies would be required to build an alternative to RDP that has little or no lag and has a higher Bit rate in terms of audio quality?

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

    How much of your testing is unit testing?

    Posted: 28 May 2020 08:51 AM PDT

    Assuming for the purposes of this discussion that "unit testing" means:

    testing the smallest piece of code reasonable, with minimal, or no integrations with other services.

    Just ballpark, how much of your automated test coverage would be considered unit testing by that definition?

    Would you like it to be more? Or do you prefer to focus some kind of integration or end-to-end testing?

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

    Hey there, could I try to solve your problems as coding instructor?

    Posted: 28 May 2020 12:16 PM PDT

    Hey guys,

    I'm curious what are your biggest problems as programmers.

    Fill out my survey below, I would love to share the results with you and let's brainstorm some solutions to them.

    https://forms.gle/RqDXdta98E4JcYvA7

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

    Wondering about viability of a project for college.

    Posted: 28 May 2020 11:56 AM PDT

    I'm soon going into my final year of college and I'm trying to think of ideas for a final year project. The idea I have is a mobile application that would allow you to control the mouse cursor and keyboard on windows. So essentially your phone would act as a mouse/touchpad and you would be able to pull up an on-screen keyboard and type stuff.

    The idea came about from my own laziness. Sometimes I like to chill on my bed watching netflix or youtube but hate having to get up to change the video. I'm aware that these apps already exist on the app store and I do use them, but the one I use at least has some questionable TOS that you have to agree to before installing, and uses your computers idle resources to do undisclosed things . The app would consist of a client and server. You run the server on your pc and the client on your phone. When you move your finger on the touchpad on your phone, this information is sent to the server through a socket connection (I guess?) and interacts with the windows API to move the cursor, click, right click, type etc.

    I'm just wondering if you think this is a reasonable project to take on. Is it too much to handle? Too little? Too boring? Too difficult? Too easy? I really don't know. Thanks for your input.

    submitted by /u/5degreestotheleft
    [link] [comments]

    No comments:

    Post a Comment