• Breaking News

    Friday, August 7, 2020

    What do you dislike about windows File Explorer? Ask Programming

    What do you dislike about windows File Explorer? Ask Programming


    What do you dislike about windows File Explorer?

    Posted: 07 Aug 2020 07:26 PM PDT

    Been thinking of personal programming projects to work on, and have decided on making a replacement for the great but flawed windows File Explorer. I have my own set of issues that I'll be addressing. But I'm here asking for some suggestions as to what you'd like to see improved over the default. Thanks for any suggestions.

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

    After finishing a 4-year degree in software, now knowing how software works, I trust programs and software, in general, a lot less. Did this happen to anybody else?

    Posted: 07 Aug 2020 04:04 PM PDT

    What do you think about words of praise in code review comments?

    Posted: 07 Aug 2020 03:19 AM PDT

    I noticed that some programmers tens to focus on more than just errors/optimizations in the code, and on top of advice on what to improve, they also attach positive comments to the bits that they like, such as „Nicely done", or „I like the way you did it." etc.

    Do you think it is a good practice? Is it helpful or distracting?

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

    Trying to emulate what works in bash with /dev/stdin in Python to no avail

    Posted: 07 Aug 2020 07:54 PM PDT

    So I have taken this script (https://gist.github.com/arantius/2166343) I found on github to merge RRD data. It tells you how invoke the script via a bash run:

    "Run something like:

    $ python simple-merge-rrd.py filea.rrd fileb.rrd filec.rrd | rrdtool restore /dev/stdin merged.rrd"

    This works fine and I made a bash wrapper to process my files. That being said, I thought it would be better to take the creator's python script, do a bunch of the file processing for merge via dictionary, etc. , and then just call a function that does all of the regex matching , and ultimately just prints out the merged results to a new rrd file.

    I cannot, however, figure out a valid method to get the data to be handled inside of the script. Here are some things I have tried for reference (and have not worked):

    with open("xml_placeholder.txt","w+") as f:

    sys.stdout = f

    print(line.rstrip())

    sys.stdout = original_stdout

    write_handler = open(temp_xml_merged, "w+")

    write_handler.write(merged_data)

    write_handler.close()

    cmd = ["echo", merged_data]

    p2 = subprocess.Popen(cmd, stdout=subprocess.PIPE, stdin=subprocess.PIPE)

    p3 = subprocess.Popen(['/usr/bin/rrdtool','restore', '/dev/stdin', rrdname.split('.new')[0]],stdin=p2.stdout, stdout=subprocess.PIPE)

    os.system("/usr/bin/rrdtool restore " + line.rstrip() + " " + rrdname.split('.new')[0])

    For the most part, I keep getting XML/formatting issues. I am not understanding how this all works so perfectly when invoked via the bash involvement but not at all through Python. Please help! Thanks

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

    Need help setting up a Web API application with Entity Framework connected to a MS Azure SQL Database

    Posted: 07 Aug 2020 07:36 PM PDT

    First of all, I'm a noob when it comes to some of this so apologizes if I'm being dumb or obtuse. Anyway, I have a simple mobile application I need to build. I want the "back-end" for the mobile app to be a RESTful Web Api made with ASP.NET. I want the database for this project to be a Azure SQL database on Microsoft Azure.

    I think this architecture is logical and should be possible. I'm running into trouble setting it up however. I followed this tutorial: "Tutorial: Create a web API with ASP.NET Core" to create a web api that does everything I want except it uses an "in-memory" database, and doesn't connect to any SQL azure database. Separately, I followed this tutorial: "Create And Publish ASP.NET WEB API In Azure" which shows how to create a full web application with the website and views and everything, that also connects through Entity Framework to a MS Azure SQL Database.

    I thought that I could take the web api part of the first tutorial and combine it with the entity framework MS Azure SQL database part of the second tutorial to get what I want but I've been stuck on this all day and I can't seem to figure it out.

    The first tutorial uses the "ASP.Net Core Web Application" template in visual studio and the second tutorial uses the "ASP.Net Web Application" template in visual studio. I can only do the Entity framework stuff in the later not the former. I have imgur screenshots below to explain what I mean.

    I can only create the ADO.NET Entity Data Model in the Web Application. It's not an option in the Web API application:

    https://imgur.com/a/ejZokTH

    Last note, I had assumed there was a nuget package difference between the two templates, so I've added the nuget packages that seemed different between the projects and yet adding a Entity Framework data model to my Web API Application is still not an option.

    TLDR: How do I connect a MS Azure SQL database to a web api application, (preferably using database-first approach through Entity Framework)? I can get a web api application running but it doesn't connect to Azure SQL database through Entity. And I can get a full website application running that does connect to Azure SQL database through Entity but it isn't the simple Web API I want. How do I do both?

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

    CMD recognizes Python and Pip commands without even setting path to environment variables! What's this sorcery?

    Posted: 07 Aug 2020 03:28 PM PDT

    In python, how would you find the maximum or minimum value in a list, without using max or min commands?

    Posted: 07 Aug 2020 03:57 PM PDT

    To get subtitles from youtube videos that are not closed captions, can I use tesseract.js?

    Posted: 07 Aug 2020 08:55 PM PDT

    Also, would it be a good choice for this kind of thing. I am a total noob, so I don't have a clue.

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

    We have created an open source physics simulations project and your ideas and contributions are important!!!!

    Posted: 07 Aug 2020 03:19 AM PDT

    Hello fellow physics enthusiasts. Some time ago, I have created a post on Reddit to gather a team. With that team, we have created an open source project that aims to create physics simulations that are free and accessible for everyone. We are using p5.js for the simulations.

    This is just a prototype. We have just started coding the simulations.

    Please take your time to check out our website: https://physicshub.herokuapp.com/

    You can reach out to me through this Reddit account or through our organization email: [physhub@protonmail.com](mailto:physhub@protonmail.com) We are still looking for individuals that are interested about the project, so feel free to contact me if you want to join us!

    I hope you all like it and please share your thoughts in the comments!

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

    A Speech Synthesizer Project

    Posted: 07 Aug 2020 04:48 PM PDT

    Hi there, . I would like to make speech synthesizer in Arabic language. I have a voice talent with me to record everything that I need. I just don't where to start. Which libraries in python or any other language would be suitable for such a project. Just point me the right direction.

    I would like it be as natural sounding as possible ☺️ such as in this video https://youtu.be/qnGNfz7JiZ8

    Thank you so much 💞

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

    Autodesk Revit API: Common reasons why LoadFamily() and LoadFamilySymbol() fail?

    Posted: 07 Aug 2020 03:01 PM PDT

    Sorry if this is a noob question, I'm a beginner at the Revit API. I'm developing a plug-in for Revit for which I need to programmatically load and place a family into the project. It keeps throwing a "object reference not set to an instance of an object" error every time I call doc.LoadFamily() or doc.LoadFamilySymbol(). Anyone have experience with this or know someone who has used the API?

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

    How to write sensor data so separate text file (Raspberry Pi, Python)

    Posted: 07 Aug 2020 11:07 AM PDT

    I have a pm2.5 sensor attached to a raspberry pi. I got the code working for the sensor but I want to be able to store the values being outputted. I was wondering what I needed to change to be able to write the data to a text file. I'm not super knowledgeable in python, sorry.

    Heres my code:

    import time import board import busio from digitalio import DigitalInOut, Direction, Pull import adafruit_pm25 import serial uart = serial.Serial("/dev/ttyS0", baudrate=9600, timeout=0.25) print("Found PM2.5 sensor, reading data...") while True: time.sleep(1) try: aqdata = pm25.read() # print(aqdata) except RuntimeError: print("Unable to read from sensor, retrying...") continue print() print("Concentration Units (standard)") print("---------------------------------------") print( "PM 1.0: %d\tPM2.5: %d\tPM10: %d" % (aqdata["pm10 standard"], aqdata["pm25 standard"], aqdata["pm100 standard"]) ) print("Concentration Units (environmental)") print("---------------------------------------") print( "PM 1.0: %d\tPM2.5: %d\tPM10: %d" % (aqdata["pm10 env"], aqdata["pm25 env"], aqdata["pm100 env"]) ) print("---------------------------------------") print("Particles > 0.3um / 0.1L air:", aqdata["particles 03um"]) print("Particles > 0.5um / 0.1L air:", aqdata["particles 05um"]) print("Particles > 1.0um / 0.1L air:", aqdata["particles 10um"]) print("Particles > 2.5um / 0.1L air:", aqdata["particles 25um"]) print("Particles > 5.0um / 0.1L air:", aqdata["particles 50um"]) print("Particles > 10 um / 0.1L air:", aqdata["particles 100um"]) print("---------------------------------------") 
    submitted by /u/Papapizza7
    [link] [comments]

    What piece of code should you never store in version control?

    Posted: 07 Aug 2020 01:58 PM PDT

    NO SE QUE ESTA MAL EN MI CODIGO, HELP MY

    Posted: 07 Aug 2020 12:58 PM PDT

    #include <stdio.h> #include <cs50.h> #include <string.h> int main(int argc, char*argv[]) { if(argc < 4) { float x = atof(argv[1]); float y = atof(argv[3]); float resultado; int valido = 1; if (argv[2] == '+') { resultado = x + y; return(resultado); }else if (argv[2] == '-') { resultado = x - y; return(resultado); }else if (argv[2] == 'x') { resultado = x * y; return(resultado); }else if (argv[2] == '/') { resultado = x / y; return(resultado); }else{ valido = 0; return(valido); } if (valido) printf("El resultado es %f\n", resultado); else printf("Operacion invalida\n"); return 0; } } 
    submitted by /u/PaleontologistIll608
    [link] [comments]

    I work in a specialized field and want to turn my knowledge/experience into a web app that laypeople can easily use on their own (like turbotax). How do I find a programmer who can take my ideas and turn it into what I'm envisioning? What do I need to look for?

    Posted: 07 Aug 2020 11:33 AM PDT

    My field has very flow-charty decision making with rules that are very arcane. Usually clients hire me to perform this decision making but it is very labor-intensive. I want to turn this into passive income that can scale by creating a subscription-based online service that clients can use to do the work on their own.

    What steps do I need to take to do this? Is the following a normal approach for something like this?

    1. I map-out the inputs, logic, and outputs that I normally consider as part of my work. I come up with the requirements of what I want the app to do for clients. We perform testing on the finished product.
    2. A Programmer builds the server-side application that basically does what is outlined in #1.
    3. A designer helps me come up with a brand/look for the client side.
    4. A Programmer builds front-end/client-side interface/UX that feeds into the server-side app. We test some more.
    5. Programmer sets up security for the website, including protecting client login info, payment methods, and personal data.
    6. SEO person helps to market the website and promote it .
    7. I ensure the rules and logic are up-to-date. If changes need to be made I ask the programmer to update the respective front and back-end areas.
    submitted by /u/PrincetonMonkeyLab
    [link] [comments]

    [Linux][Python] Scrape output from a subprocess while it is still running?

    Posted: 07 Aug 2020 10:43 AM PDT

    TBC: I have been using the subprocess module, but am not married to it. Running a program that may be going for an hour or so (media player). Would like to be able to scrape its stdout data while it is running. Popen.communicate blocks untiil the process is complete, and I could use that as a fall-back, but a total victory would be to access the info while it is running. Any help would be appreciated. TIA

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

    Better solution than lookup table for r>2 combinations with repetition?

    Posted: 07 Aug 2020 10:25 AM PDT

    I have a list of strings. Some pf these strings can be combined, some can not, according to a set of rules I've made.

    I wish to find a way to set up the rules once, so I don't have to calculate whether a set of strings can be combined or not.

    If r=2, then I can just make a lookup table with all n strings as both rows and columns, and have a 1/true where two strings can be combined, and 0/false where they cannot. Then it's just a matter of looking a combination of two strings up in the table.

    But what if r>2, that is, 3 or more combinations of strings from that list. Then I'd have to make a 3D lookup table. And if r=4, then a 4D table, and so on. That would take a lot of memory.

    Or I could keep the 2D lookup table, and then look up the combinations A/B, A/C and B/C. But the bigger r is, the more pairs I'd have to look up.

    So my question is, is there a better solution/way of doing it so I don't have to calculate whether each combination, whether 2, 3, 4 or more, can be combined or not? And without taking up as much memory as an nD lookup table would?

    I've tried explaining my problem as well as I could, I hope I've made myself clear.

    submitted by /u/-SKBE-
    [link] [comments]

    What do you consider the best tools for web scapping?

    Posted: 07 Aug 2020 09:26 AM PDT

    Hello there I'm about to start a web scraping project. Where I need to try some words of the website and extract the info from the website to an excel or txt file.

    What do you thing are the best tools for this phyton? node? express? vanilla js?

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

    Advice from the community

    Posted: 07 Aug 2020 08:51 AM PDT

    I was wondering if anyone in the community knew what types of programming languages would be needed to create an idea that I had for a video game. https://www.reddit.com/r/videogames/comments/i4zkgn/video_game_concept/?utm_source=share&utm_medium=mweb

    This would be the first project I have worked on so any advice or suggestions would be greatly appreciated.

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

    Am I supposed to be able to check/uncheck this box?

    Posted: 07 Aug 2020 03:46 AM PDT

    Hi! As the title suggests I would like some insight if possible into whether this was built to be check/unchecked or whether it's an image simply made to look like a checkbox/a checkbox with only one allowed state.

    https://imgur.com/a/CkXx2Hg

    Thankful for any comments or help :)

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

    How do big companies verify their programs and scripts run correctly?

    Posted: 07 Aug 2020 07:09 AM PDT

    I'm talking like how does Amazon verify that all transactions were recorded correctly or coinbase verify that all the transactions that happen are recorded correctly even if the server processing loses power or errors out?

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

    Suggested Technologies for Project?

    Posted: 07 Aug 2020 06:37 AM PDT

    Hello!

    I am currently planning a project and am unsure of what Tech-Stack to use for it. The project is supposed a digital exhibition with the following features:

    • Moving & interactable 3D objects

    • A Text Chat

    • A room for a digital presentations, with the capabilites for a presentator to share his screen to a digital canvas in a 3D auditorium and also broadcast his voice.

    • It is supposed to run via a web-browser not only on Desktop-PC's, but at least tablets and as many features as possible for mobile phone

    Originally I was planning to use Unity3D and deploy to WebGL, but that does not work very well with mobile devices and has no capabilites for screen sharing.

    The other idea is to utilise Three.js and somehow work in WebRTC, which is probably the best way to go?

    I would be glad if anyone has any other ideas that could work in combining all these features! :)

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

    How to make WINDOWS FORM APP RUNNING ON SOMETHING LIKE GAME

    Posted: 07 Aug 2020 10:07 AM PDT

    Hi, I have question

    1. How to make Window App pop up using some hotkey
    2. How to make Window App seen in like game or something, like I hit for example "INSERT" and it will be in game
    submitted by /u/noskinfromapex
    [link] [comments]

    Why not just make all singleton public methods static?

    Posted: 07 Aug 2020 06:10 AM PDT

    I'm implementing the singleton pattern for a logger class and every example on the internet for singleton is using some sort of a getInstance() method. Why not just make rest of the methods static and access the instance directly? Calling methods on the singleton looks nicer too:

    public class GlobalLogger { private static GlobalLogger m_Instance = new GlobalLogger(); private string message; public static void Log() { m_Instance.message = "very important message"; } } 

    And then just call it like GlobalLogger.Log()

    The alternative looks like this

    public class GlobalLogger { private static GlobalLogger m_Instance = new GlobalLogger(); private string message; public void Log() // not static { this.message = "very important message"; } } 

    And needs a longer call GlobalLogger.GetInstance().Log()

    So my question is, why don't I ever see the first approach anywhere? Am I missing something?

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

    No comments:

    Post a Comment