• Breaking News

    Tuesday, September 24, 2019

    "There is so much to learn that it feels impossible to get good at this craft." As a beginner, how do I get over this feeling? Ask Programming

    "There is so much to learn that it feels impossible to get good at this craft." As a beginner, how do I get over this feeling? Ask Programming


    "There is so much to learn that it feels impossible to get good at this craft." As a beginner, how do I get over this feeling?

    Posted: 24 Sep 2019 08:15 AM PDT

    Why is there no all in one rgb software that exists?

    Posted: 24 Sep 2019 09:45 PM PDT

    So I just built a new PC and have components manufactured by multiple different brands, each with there own rgb control software.

    I was just wondering why there is no "all in one" software that is able to control each components rgb lights regardless of the brand?

    submitted by /u/420pizzaboy
    [link] [comments]

    Is there a way to determine PC "bottleneck" for program I'm working on, as I aim to improve my system for better runtimes.

    Posted: 24 Sep 2019 08:33 PM PDT

    I am currently doing my PhD in Computational Mechanics. I come at it mostly from the structural engineering and math side of things. I am developing software that models very complex materials using finite element methods.

    I am working in Fortran 2003 in a Visual Studio 2017 environment. I inherited 95% of the code and I am working on specific modules, though I end up touching a lot of it. Some of my runtimes get into the order of days on my current computer, and I'd like to work on both the software and hardware side of getting these run times down. I have used some of Visual Studio's CPU usage tools to figure out what functions take the most time and have been working on reducing those, though honestly I'm not that great at programming as I've picked up what I've needed along the way and never had real training beyond a couple books and Code Academy for python.

    The software uses MKL for the big matrix functions that end up being a lot of the runtime. I know this is important as it runs differently on Intel/AMD. I have seen comparisons such as this one: https://discourse.julialang.org/t/openblas-is-faster-than-intel-mkl-on-amd-hardware-ryzen/8033 detailing the differences. I could probably convert the code to run on OpenBLAS if need be.

    The reason I'm coming here is that I'm putting together a new PC to help lower my run times. My problem is I don't know exactly how parallel my program runs, and where the hardware tradeoffs might be in terms of choosing a processor. Would I be better served with more cores? higher clocks? Intel? I don't know exactly!

    My question is if y'all know of where to start to try and figure this out. Are there tools that can help me determine where my program is being "bottlenecked" by hardware? What hardware might be best suited for it? Are there things I should look for in the code I didn't write to figure this kind of stuff out? Does Visual Studio have tools that could maybe give me some clues?

    In the end, I have basically three choices for my price range as I see it when I do my build in a month or two - 9900ks, 3950x, or whatever Cascade Lake X processor is around there. Choosing between those is the biggest choice I have to make and I'd like to be more informed about it. In addition, knowing where my program is slowing down would just be generally useful.

    I hope that makes sense.

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

    I'm having trouble where to start for my project.

    Posted: 24 Sep 2019 02:05 PM PDT

    I want to automate a part of my work life and don't know where to start or even know if it's possible. At work we have what's called voluntary time off (allows people to leave work early) and before they used to have a list of the people who can leave but now they made it first come first serve. We now have to constantly monitor this webpage to see when they offer it. Which means when you're away you can miss that opportunity . I would like to build something that will automatically monitor this page and notify me when available. Is something like this possible?

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

    Should I Learn Javascript or Typescript First?

    Posted: 24 Sep 2019 05:16 PM PDT

    I'm wondering what language would be more advantageous to learn first. I do have a history in programming languages, so I have programmed before.

    I'm basing my question off of: A) Job Opportunities B) Which language would make the other easier to learn C) Fun

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

    Which language is best to create a UI for a C++ Application I made and ?

    Posted: 24 Sep 2019 01:02 PM PDT

    I have used several teaching aids to learn C++ (online classes, books, online videos) , which I am getting close to finishing a personal project I created outside my job that I'd like to provide to potential employers. Basically, it is a variable configurator that our Sales staff could use to create quotes and order BOM's in an easier fashion than the archaic way it is now. I'd like to advance this further to include a more user friendly interface than the current terminal w/ wall of menu text.

    What are some options for another language that I can learn and implement with this? And is there a video or book that you'd suggest I use? I think that this is a great opportunity for me to learn this aspect of marrying two languages together producing a more polished product. Eventually I'd really want to learn to flush this out even more so that it can link to SAP in some fashion among other more advanced things.

    Tried to Edit to take out the rogue "and" in the title. Sorry.

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

    How to setup CMake to build code which contains path-includes like #include <libdir/lib>?

    Posted: 24 Sep 2019 03:46 AM PDT

    I asked this question on stackoverflow, but perhaps someone here can help me out too? Thanks in advance.

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

    How do you take notes in CS classes?

    Posted: 24 Sep 2019 12:27 PM PDT

    I've been using OneNote but it's getting pretty tedious having red lines appear every time I say "arg, var, etc" and formatting is tougher too.

    I saw this guy in my class use Atom and he just made .cpp files for each little subject we're on, could I do that with VSCode as well?

    OR would pen and paper be better?

    I usually wouldn't take notes but we don't have ANY notes online, and no textbook so everything on the chalkboard is all we have for this course.

    Thanks!

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

    Can't quite figure out why this basic java program won't work

    Posted: 24 Sep 2019 02:32 PM PDT

    I'm a freshman in college and i'm learning java as my first language and my professor assigned this programming project, it works up until the point where I press enter after entering the material name, it always outputs the 'else' statement saying invalid material despite entering a valid material.

    import java.util.Scanner; public class SpeedOfSound { public static void main(String[] args) { String material; double time, distance; Scanner stdin = new Scanner(System.in); System.out.print("How far is the sound traveling? (in feet) "); distance = stdin.nextDouble(); stdin.nextLine(); System.out.print("What material is it traveling through? "); material = stdin.nextLine(); if (material == "air") { time = distance/1100; System.out.print("It will take " + time + " second(s) for the soundwave to travel through air for " + distance + " feet"); } else if (material == "water") { time = distance/4900; System.out.print("It will take " + time + " second(s) for the soundwave to travel through water for " + distance + " feet"); } else if (material == "steel") { time = distance/16400; System.out.print("It will take " + time + " second(s) for the soundwave to travel through steel for " + distance + " feet"); } else System.out.print("You selected an invalid material."); } } 
    submitted by /u/Zivick_
    [link] [comments]

    Microsoft.Management.Infrastructure Strong name validation failed, c# .Net

    Posted: 24 Sep 2019 12:58 PM PDT

    I have a project using the Microsoft.Management.Infrastructure.dll. This .dll was not available on my development machine by default, so I downloaded it with Nuget, version 1.0.0.0 (https://www.nuget.org/packages/Microsoft.Management.Infrastructure/) and added the reference to my project. Its set to Copy Local, and is copied properly to the /bin/ directory when I build the project. Strong Name is set to True by default and not changable through the properties window.

    If I run the project on that machine, either debug or the compiled version, everything is fine. However, when I move the /bin/ folder contents to another machine and run it there, the program crashes with the following error:

     System.IO.FileLoadException: Could not load file or assembly 'Microsoft.Management.Infrastructure, Version=`1.0.0.0. Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. Strong name validation failed 

    So I assume its not signed properly, and sure enough sn.exe tells me that:

    .\Microsoft.Management.Infrastructure.dll is a delay-signed or test-signed assembly 

    I tried reinstalling the package through Nuget, and manually, but all of the versions I can find return the same result.

    Am I looking at the wrong problem, or is there a way to use this .dll without having to turn off Strong Name validation? Possibly another version of the .dll I havent found? A different .dll?

    I have looked at other people having the same problem with different dlls, mostly Microsoft.Web.Assembly, and the "solutions" to those problems, but they are not ideal in this case. This project will eventually be deployed to multiple servers, and I'd like to avoid having part of the installation be disabling signing verification for this .dll and adding it to the GAC if possible. I'd much rather have a properly signed version of the .dll available and included in the folder with the build, I'm just lost on how to accomplish that.

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

    How to remove string from right to left until the first occurrence of in bash

    Posted: 24 Sep 2019 12:30 PM PDT

    For example, I have these files

    There may be any number of underscores in the file name.

    $f1=ny_ledger_gloss_20190930.csv

    $f2=eur_trade_20190930.psv

    I did $temp=${f1%.*} and then it becomes ny_ledger_gloss_20190930

    Next I want to remove from right to left until the first occurrence of a character a-z, so I want the output to be

    ny_ledger_gloss and eur_trade

    Thanks

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

    Sending emails in VB w/ Access

    Posted: 24 Sep 2019 06:47 AM PDT

    Hi /r/programming

    I manage a small IT team which includes a developer. The developer is part-time, and self-taught in some older languages, so sometimes basic things can be a challenge. Most of my own coding knowledge is Python and Java, so I'm at a loss with VB and access.

    We have some in-house apps written in VB with Access as a front-end. They have some functionality where the user sends email reports with attachments (system-generated PDFs).

    Currently, this is done through a MAPI call which fires up Outlook. This works well enough, but the users of the app are all employees who don't (otherwise) need email. Since we use Office 365, Outlook+Email ends up being an E3 plan which costs like $20+ a month. Multiply by a hundred employees, and this is about $30K per year we're paying just so the access/VB app can send emails. Obviously there's simpler ways of doing this programatically.

    On the sysadmin side, I tend to use PowerShell for all my system emails, but PS isn't really a great fit here, given the code. The developer found the CDO dll's in the system (which can do this), but apparently don't support TLS, so using Office365 is out.

    Can anyone think of a fairly simplistic way we can get this app to be able to send emails and tie it into the code (using 365).

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

    how to do an Iteration over files and pickle dump them

    Posted: 24 Sep 2019 06:26 AM PDT

    Hi,

    i have a lot of files with the ending (".btfc") and im trying to pickle each file with their same name....

    so far i can only pickle them once a time

    import os import pickle import sys from datetime import datetime from NewFile import NewFile

    def newJack(): directory = os.fsencode(r"C:\Users\uidn6674\Desktop\Input Tool\source_code\source_code\Database") 

    for file in os.listdir(directory): filename = os.fsencode(file) if str(filename).endswith(".btfc"): with open(self.newFile.btfName + ".pickle", "wb") as outfile: pickle.dump(self.newFile.code, outfile, protocol=pickle.HIGHEST_PROTOCOL) print("pickle dumped successfully!") else: print("no valid or left over btfc files!")

    newJack() 

    my problem is that i doesnt know what self is at with open(self)
    and at pickle dump.

    and it always goes to the else part

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

    What the best way to code a tool to insert a file name into a text file and then merge several text files in a single folder?

    Posted: 24 Sep 2019 12:06 AM PDT

    I am trying to write a simple (?) little program that would:

    1. Take a numerical list of txt files labeled like:

    01 - FILENAME.TXT

    02 - FILENAME.TXT

    03 - FILENAME.TXT

    1. Strip the number and "-" and insert just FILENAME into the first line of each TXT files

    2. (Optional because this is easy in Notepad++) Capitalize the first letter of each line

    3. Merge all of the files into a single TXT file in numerical order

    Where would I start if I wanted to figure out how to code something like that in Windows 10?

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

    Should I use an Array instead of a Dictionary?

    Posted: 23 Sep 2019 11:54 PM PDT

    I wrote a tree search algorithm using my own Node class.

    The Node class uses variable: Dictionary<int, Node> children;

    Should I do this instead: Node[] children = new Node[81];

    The integer keys can take a value from 0 to 80 (edit: the value is important). Usually the dictionary would only use a few keys at a time.

    After the initial creation, the values don't change. The algorithm iterates over children.values very frequently.

    I am using C#. Would an array be faster than a dictionary?

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

    Anyone know of a video where they explain Booth's algorithm to a complete beginner

    Posted: 24 Sep 2019 01:18 AM PDT

    No comments:

    Post a Comment