• Breaking News

    Friday, August 21, 2020

    I will be doing iPhone Programming this coming Fall. Will the following MacBook Pro specs be sufficient for running XCode? Ask Programming

    I will be doing iPhone Programming this coming Fall. Will the following MacBook Pro specs be sufficient for running XCode? Ask Programming


    I will be doing iPhone Programming this coming Fall. Will the following MacBook Pro specs be sufficient for running XCode?

    Posted: 21 Aug 2020 08:29 PM PDT

    1.4GHz quad-core 8th-generation Intel Core i5 processor

    Turbo Boost up to 3.9GHz

    Intel Iris Plus Graphics 645

    8GB 2133MHz LPDDR3 memory

    256GB SSD storage¹

    13-inch Retina display with True Tone

    Magic Keyboard

    Touch Bar and Touch ID

    Two Thunderbolt 3 ports

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

    Question about the 'this' keyword when creating a thread in Java?

    Posted: 21 Aug 2020 06:22 PM PDT

    If I implement Runnable and include:

    Thread myThread = new Thread (this);

    within the start() method, then do myThread.run(), are we saying to throw the current class on that thread, or an object of the current class on that thread?

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

    Books for self teaching?

    Posted: 21 Aug 2020 06:47 AM PDT

    Hello there. I'm a beginner in programming and computer engineering, and I'd like some book recommendations for self teaching myself about:

    • How to browse the internet safely and protecting my IP address.

    • How bots are created through programming (basically programming/coding)

    • How websites are built.

    • How to repair my own computer. Like changing graphic cards, learning how to format, knowing how to spot which part of the computer has an issue etc.

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

    Creating a grammar checker program

    Posted: 21 Aug 2020 11:22 AM PDT

    How would one, go about creating a program that checks errors in a text, what tools should one use, because I want to create one, but don't know where or how to start?

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

    How do I go about creating a self contained program where the frontend (Angular 8+) backend (Flask or nodejs) and database (mongodb) are setup all at once; for example, radarr, sonarr, etc?

    Posted: 21 Aug 2020 05:12 PM PDT

    I have deployed flask restful API backend, angular for frontend, and mongodb for my personal and work projects and usually dockerized.

    I want to learn how to "bundle" them together not using docker so that I can either share it with family and friends where all they have to do is "install" with minimal setup on their end?

    I don't want them to worry about installing python, or node or mongodb...

    Can anyone suggest any articles, guides, suggestions.

    Thanks for your help.

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

    Anxious Programming

    Posted: 21 Aug 2020 05:09 PM PDT

    Hey guys I am starting a project today and I am feeling quite anxious. I mean sometimes I feel so good about how I will go through all the logic and stuff and other time I feel too depressed that nobody will use my project. Do u guys sometimes feel like this too?

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

    Do these Mac install instructions work?

    Posted: 21 Aug 2020 01:10 PM PDT

    pip3 install redditcleaner curl https://raw.githubusercontent.com/Fitzy1293/redditsfinder/master/redditsfinder.py > redditsfinder.py mv redditsfinder.py ~/bin/redditsfinder && chmod +x ~/bin/redditsfinder Mac doesn't include wget, so redirect curl to redditsfinder.py. Might work, haven't tested it though so who knows. 

    I learned that that wget isn't installed on Mac os. I just want to know if this works. I don't have a mac so I can't test it.

    Edit: https://github.com/Fitzy1293/redditsfinder

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

    How do I search for an element that belongs to a listo inside another list?

    Posted: 21 Aug 2020 04:39 PM PDT

    So I'm doing something like this (Python):

    ListA=["a","b","c","d"] B="e" ListB=[ ]

    For i in range(2): Item=input( ) ListB.append(item)

    So I want to look for any item inside ListA that was written for the input. I have:

    If ListA in ListB and B in ListB: Print("ok") Else: Print("bad")

    So if for the input I write "b" and also "e" it should print "ok" but it's just printing "bad".

    So I know my if function is written incorrectly but how would I write it if I want to search for 2 elements belonging to 2 lists inside another?

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

    How difficult is it to create a Linux version for large software projects like Adobe Lightroom/Photoshop?

    Posted: 21 Aug 2020 10:25 AM PDT

    Adobe has famously refused to support Linux for their Creative Suite applications, like Photoshop and Lightroom. This has been a point of frustration for many creative professionals who prefer Linux. For a working pro photographer, it is annoying to run a dual boot with windows solely for those pro tools.

    Anyway, I read that these apps are primarily written in C++. Purely out of curiosity, what all is involved with taking a large app like Lightroom coded in c++ and creating a Linux version? Is it something so incredibly complex that Adobe doesn't think is viable? Or would it be more of a decision not to spend resources to support an OS with a comparitively small market share?

    Would the programming language even matter in a situation like this?

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

    A time complexity question.

    Posted: 21 Aug 2020 04:01 PM PDT

    Not homework, an old engineer with a question, wanting to refresh myself with time complexity.

    Why is fast_fib so much faster than fib?

    https://pastebin.com/z5kSkp5k

    I suspect it's because dictionary lookup is O(1) and once fast_fib(n-2) is calculated, fast_fib(n-1) is just one recursion and a lookup away instead of going all the way down the stack a second time.

    What are the actual complexities of these two?

    Is it fib = O(n), every time

    And fast_fib = O(n) in the worst case, and O(1) in the best?

    But since it only does the stack once, the slope of the line for fast_fib complexity is half that of fib?

    Like O(1/2n) ?

    Or...more verbosely

    fib() = O(n)+O(n)

    fast_fib()= O(n) + O(1)

    ?

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

    Insertion sort time and space complexity?

    Posted: 21 Aug 2020 09:47 AM PDT

    This is a question is recent exams I have taken. Happened to waste a lot of time. can someone help?

    Which claims about the iterative implementation of Insertion Sort are true?

    a) it is in-place

    b) it uses only constant space

    c) for some input it runs in constant time

    d ) for some input it may run in time proportional to the size of the input

    r) it uses space proportional to the size of the input array

    f) it always runs in time proportional to the square of the size of the input

    g) for some input it may run in time proportional to the square of the size of the input

    h ) running it causes the stack to grow

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

    How can I best send commands to IoT devices from my application?

    Posted: 21 Aug 2020 11:51 AM PDT

    I'm currently making a desktop application using Electron and React to allow Twitch streamers to assign actions to channel reward redemptions.

    The problem is, part of those actions may include local IoT devices, such as room lighting. I initially started this project as a desktop application because as far as I know, an application such as my own can't issue commands to something like Alexa.

    However, I found something about Google's Smart Home api, and was wondering if this is the road I should take, since by my initial look of it, it seems like you can issue commands through it to smarthome devices registered with Google, however it likely comes with some drawbacks.

    I believe to use IoT devices in this way, it would require a Google Home on behalf of any user if I wished to host this application locally instead of in the cloud. Not to mention, I'm sure there are costs associated with both locally hosted and cloud-based, which to start with, I'm not necessarily looking to do.

    The alternative would be to implement apis from a small subset of the IoT world (such as Phillips Hue, Kasa, and Wemo) and implement any other apis down the road whenever/if they are needed. And since this is an open-source project, it's possible to design it in such a way to make these interactions "plugins" and people can write their own plugins to support whatever devices they want.

    In the end, my ideal solution would be to support as many relevant devices as possible (don't need to include smart refrigerators and things of the like), make it as accessible as possible (moving from desktop application to web application could be ideal), and to make it as cost-affordable as possible (at least to start, since I won't be monetizing this project aside from maybe a patreon page later down the line)

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

    What's the best way to perform OAuth 2 authentication with a CLI app in an environment with no GUI?

    Posted: 21 Aug 2020 03:19 PM PDT

    I'm working on a side project which is a CLI application that interacts with third party services after authenticating via OAuth2.

    if the user uses my application in an environment where they have a browser, it's pretty straight-foward. They'll need to authorize me via the browser, and I can listen to the redirect callback via a custom URL scheme.

    However, let's say that the user installs my application hypothetically in a server where they don't have access to GUI at all. How should I handle this scenario?

    The only idea I can come up with is that I have my own web server which handles the redirect callback from the third party service, and my CLI can poll my web server for the token. But I'm really trying to avoid spinning up my own web server since I want my CLI application to be stand-alone.

    Is there any other way? Any architectural advice or suggestions would be appreciated.

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

    Want to get back strong in Programming but I don't know where to even start! Need some pointers

    Posted: 21 Aug 2020 10:29 AM PDT

    Hi All!

    I'm sort of confused on the many platforms, language programming and other computer related stuff so I'll try to give you some ideia of where my interest reside so maybe you could assist me on where I might start or what I should learn (from course to language, book, anything really). I'm not going to tackle all of this of course (that would take a lifetime or two) but maybe just knowing what resources are needed to enter said topics is enough to take a little bit out of the mystery of programming and see where knowledge, resources and interests might overlap.

    My foundation/where I'm at:

    I had 1 year of introduction to programming in engineering school that was in the C language (that was almost ten years ago). First semester was functions, call, vectors, matrices and syntax and second semester was programming focused on Numeral Calculus (Crazy math through programming with the only basic functions, can't use wolfram!) I also know some (very basic, no pun intended) VBA excel if that helps. I'm guessing those are fairly basic so might as well consider me a total noob.

    If I were to strongly get into the topics below, what language/resources I should look into?

    1. If I where to better understand (modern) internet and how it currently works, what should I learn? where should I start?
    2. If I where to build a web based business, what should I study so I don't only depend on service such as squarespace? (example: in my country there is a SaaS video course host that takes more than 10% of the creators revenue just by hosting the damn course, and its far from a good service. If I was to start programming, what language would that be?)
    3. If I desired to learn how to do mobile apps, what language are those and whats the best way to start? (I know that apple is iOS, samsung is android but not much more than that...)
    4. If I wanted to know more of ethical hacking (or general hacking), cracking and interesting stuff like that, where should I start? Somebody told me like almost 20 years ago that it having a solid C/C## knowledge would be enough but I find that very hard to believe lol
    5. I love reading about AI algorithms, neural networks and machine learning theory but know nothing about the tools used on a practical side. What is the cutting edge tools on this topic and where can I get in to it on a practical matter? I enter some free github pages and I get totally lost on whats going on.
    6. Is there a comprehensive guide explained usage, difference and nuances (like a "programming for dummies?) of the main different languages? like Java, Pearl, C##, PHP, etc... (just by visiting Rosetta Code, I can see more than +100 languages... lol)
    7. If I where to start develop games for Mobile, what are the software/language industry standard
    8. If I where to start develop games for PC/console what are the software/language industry standard? Is it basically Unity/unreal or an inhouse software? Does the employee of Rockstar, for instance, have to have a solid knowledge in other language?
    9. I think internet banking and security is very interesting also, what can I read to understand more about?
    10. Regarding cloud computing, what are the main tools and language? Is there an industry standard?
    11. Regarding Cutting edge research on AI, math, space, physics, Biology etc, is there even such a thing as industry standard for software or language? or is this a case by case thing?

    Sorry for my large (and probably dumb request), its just so many stuff computer related that I'm at a point where I don't even know what to google. Any direction would be appreciated!

    Thanks in advance!

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

    Automating Upload of Music Library

    Posted: 21 Aug 2020 10:00 AM PDT

    I'm building a music streaming service (just for fun) but was hoping for suggestions on how I could automate the process of uploading the songs onto the platform, hoping not to do it manually as it would be tens of thousands of songs just to build an MVP.

    Any suggestions on how best to do this?

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

    Makefile struggles, I don't know what commands to use for many files in many sub-directories?

    Posted: 21 Aug 2020 08:36 AM PDT

    Hello all,

    I am trying to get a makefile to compile many source files and I am struggling a bit. This is the layout of my directories:

    cppGame /entities -Entity.cpp -Entity.h /items -Item.cpp -Item.h -InventoryList.cpp -InventoryList.h /derivedItems -Healing.cpp -Healing.h basefile.cpp basefile.h Makefile 

    I have listed the dependencies correctly, but I believe the issue is with the actual commands I have typed in (using -c and -o with multiple files?). I'll put my makefile below.

    The error I am getting is that that there is no "Item.o" or "InventoryList.o" in the directory, which I think is because I am not using these commands correctly and having it compile those before running other commands.

    FOLDER=items SECONDFOLDER=entities THIRDFOLDER=derivedItems build: game game: Entity.o Item.o InventoryList.o Healing.o basefile.o g++ -o game basefile.o Item.o Entity.o InventoryList.o Healing.o basefile.o: basefile.cpp $(FOLDER)/Item.cpp $(SECONDFOLDER)/Entity.cpp $(FOLDER)/InventoryList.cpp $(FOLDER)/$(derivedItems)/Healing.cpp g++ -c $(FOLDER)/Item.cpp $(SECONDFOLDER)/Entity.cpp $(FOLDER)/InventoryList.cpp $(FOLDER)/$(derivedItems)/Healing.cpp -o basefile.o Item.o Entity.o InventoryList.o Healing.o Entity.o: $(SECONDFOLDER)/Entity.cpp $(FOLDER)/Item.cpp $(FOLDER)/InventoryList.cpp g++ -c $(SECONDFOLDER)/Entity.cpp $(FOLDER)/Item.cpp $(FOLDER)/InventoryList.cpp -o Entity.o Item.o InventoryList.o Item.o: $(FOLDER)/Item.cpp $(SECONDFOLDER)/Entity.cpp g++ -c $(FOLDER)/Item.cpp $(SECONDFOLDER)/Entity.cpp -o Item.o Entity.o InventoryList.o: $(SECONDFOLDER)/Entity.cpp $(FOLDER)/Item.cpp $(FOLDER)/InventoryList.cpp g++ -c $(SECONDFOLDER)/Entity.cpp $(FOLDER)/Item.cpp $(FOLDER)/InventoryList.cpp -o Entity.o Item.o InventoryList.o Healing.o: $(FOLDER)/$(THIRDFOLDER)/Healing.cpp $(FOLDER)/Item.cpp g++ -c $(FOLDER)/$(THIRDFOLDER)/Healing.cpp $(FOLDER)/Item.cpp -o Item.o Healing.o 

    Thanks!

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

    Can you help me with this C++ programming challenge?

    Posted: 21 Aug 2020 05:07 PM PDT

    Programming challenge description:

    Given positive integers A, B, and N, write a program that prints integers from 1 to N. But for integers that are multiples of A, print 'F', and for multiples of B, print 'B'. For integers which are multiples of both A and B, print 'FB'.

    Input: Your program should read lines of text from standard input. Each line will contain A, B, and N as space-delimited positive integers.

    Output: For each line of input, print to standard output a line of space-delimited integers 1 through N, replacing integers as described above.

    Test Input: 3 5 10

    Test Output: 1 2 F 4 B F 7 8 F B

    Test Input: 2 7 15

    Test Output: 1 F 3 F 5 F B F 9 F 11 F 13 FB 15

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

    What construct from a certain programming language do you miss most when coding in another one?

    Posted: 21 Aug 2020 01:24 AM PDT

    Lack of support/help in a new job

    Posted: 21 Aug 2020 08:15 AM PDT

    So I started this job a few weeks ago. We're a very small team (just 2-3 developers). I find it hard to complete the tasks I'm given on time even when working more than 8 hours a day or on weekends. I believe they're expecting me to complete work as if I was a senior developer, I was very clear of my experience from the beginning (I didn't have real work experience, just side projects and coding bootcamp experience). I don't receive much support when I ask for it (either they take to long to respond or don't respond with relevant advice). I have stopped asking since I wasn't getting any help. I guess I'm just looking for some advice. Is this normal?

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

    What's your favorite and/or recommendations for git aliases or scripts?

    Posted: 21 Aug 2020 07:53 AM PDT

    Modifying the code for a project

    Posted: 21 Aug 2020 01:48 AM PDT

    Hi everyone,

    First of all, to be honest with all of you I'm still newbie to these stuff (Python, Raspberry pi), so my project requires these stuff. I have found a similar project to mine and I have followed the steps but I faced a small problem which is in the project they are using digital camera such as (Canon etc..) but I'm using Camera pi v2 so there are using a library called gphoto2 which is not supporting camera pi and when I run the code it's not working it says:

    [Imgur](https://imgur.com/JaxJNfU)

    and here is the file of taking pictures:

    [Imgur](https://imgur.com/wdSR5N8)

    How can I make my camera pi works instead of the digital camera?

    here is the similar project it has a tutorial inside it could help you understand it more.

    https://github.com/FSavoy/DIY-sky-imager

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

    Secure WebSocket with Apache2 ReverseProxy using SSL

    Posted: 21 Aug 2020 06:36 AM PDT

    I would like to use NodeJs's Secure Websocket to connect to my ssl secure apache2 webserver which then does a reverse proxy to my node application

    new WebSocket('wss://sub.domaim.com');

    with my vhost of

    <VirtualHost *:80> ServerName sub.domian.com ServerAlias sub.domian.com Redirect permanent / https://sub.domian.com/ </VirtualHost> <VirtualHost *:443> ServerName sub.domian.com ServerAlias sub.domian.com SSLEngine on SSLUseStapling off SSLCertificateFile /etc/apache2/ssl/sub.domian.com/sub.domian.com.crt SSLCertificateKeyFile /etc/apache2/ssl/sub.domian.com/sub.domian.com.key SSLCACertificateFile /etc/apache2/ssl/sub.domian.com/ca-bundle.crt ErrorLog /var/www/logs/sub.domian.com.error.log CustomLog /var/www/logs/sub.domian.com.requests.log combined ProxyPreserveHost On ProxyRequests Off RewriteEngine on #redirect WebSocket RewriteCond %{REQUEST_URI} ^/socket.io [NC] RewriteCond %{QUERY_STRING} transport=websocket [NC] RewriteRule /(.*) ws://localhost:8080/$1 [P,L] ProxyPass / http://localhost:8080/ ProxyPassReverse / http://localhost:8080/> <Location /> Require all granted ProxyPassReverse ws://127.0.0.1:8080 ProxyPassReverseCookieDomain 127.0.0.1 sub.domian.io </Location> </VirtualHost> 

    I have my node app listening on port 8080

    Error of:

    - 465 Upgrade

    - Websocket connection closing or closed (the first message sent goes through after the first send the socket closes, donno)

    # Update

    sub.domain.io (or all variations are temporary replacements for the actual sub domain)

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

    Need help finding a problem that i came across a few months ago.

    Posted: 21 Aug 2020 02:21 AM PDT

    For those of you who enjoy solving problems on coding sites, i'm trying to find a particular problem that i discovered on codingame.com where, if i remeber corectly, there was something like a robot, in an "antivirus system", placed in a matrix, and you had to find the fastest way (or the number of possible ways - i don't remember) to reach the virus placed on a particular cell. Along the way, there were some obstacles (cells you couldn't reach), and the robot could only move up, down, left, right, up-left, down-left, up-right, down-right.

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

    No comments:

    Post a Comment