• Breaking News

    Sunday, September 30, 2018

    What is the name of the programming language used in this video? Ask Programming

    What is the name of the programming language used in this video? Ask Programming


    What is the name of the programming language used in this video?

    Posted: 30 Sep 2018 10:42 PM PDT

    How come when you log in to Windows (and presumably other OSs), there are a few extra seconds before any action you take is actually registered? I.e. starting a program, opening a start menu

    Posted: 30 Sep 2018 08:59 AM PDT

    I know I'm being greedy here but why not make the loading screen a bit longer so that everything is ready to go as soon as it's displayed?

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

    Best way to learn about programming

    Posted: 30 Sep 2018 09:44 PM PDT

    Can someone tell me best/reliable site I can learn about programming for free. Interested in how tf computers work and how they can be used in fields of science. Honestly I know next to nothing about it so that should tell u my current level lol. Any good books work too

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

    [Linux] How to debug an issue within a library called by a program without source?

    Posted: 30 Sep 2018 08:59 PM PDT

    Hello,

    I have a proprietary program, so without source, that calls a library and it all works fine. But when I add an intermediate library in between the two, the program sigsegv. I have the source code for both libraries, and I am hoping to find where the issue in the middle one is.

    I've tried running that through gdb, but then the stacktrace is only from the proprietary program. I've ran the whole thing through Kdevelop with sources for both libraries available, but I get no exception in them, only a segmentation fault in the program... I've tried running the program through Valgrind, it took like half a day but only gave me memory issues nothing related to the sigsegv, maybe I used a wrong flag.

    If I could see what the last few calls to the intermediate library were, I could first verify that all the functions exist, and that they behave similarly to the ones in the other library. Alas I don't know how to get that information. The library is too big and get I suppose way too many calls, for me to place breakpoint in all the functions.

    I tried using rr record, but it somehow affected the program's view of OpenGL on my system, and gdb record simply would crash, it seems because I'm using a recent glibc with AVX. I've tried latrace but it fails to run on my recent glibc (2.28). I'm out of ideas of what to try anymore...

    Thank you!

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

    How can I display information like this using C#?

    Posted: 30 Sep 2018 05:59 PM PDT

    Painting Calculation

     10 ft Red @ 10 = 100 10 ft Blue @ 50 = 500 Net price = 600 Tax = 30 Total = 630 
    submitted by /u/dober631
    [link] [comments]

    Need a bit of help with c++ programming tax calculator

    Posted: 30 Sep 2018 04:52 PM PDT

    ok well I have no idea what I'm doing I guess. I built tax calculator ,sometimes I'll get a run-time check failure #3, where after i run the program it pops up and states that the incHolder is not being initialized, which im thinking is because in one if (statement) where the income doesn't meet requirement, the variable doesn't get initialized. Also for some reason, sometimes the income meets all the requirements, when that shouldn't be possible and taxes it all the way through.

    this shit feels impossible to do, and it's my first homework assignment. I've made like 15 versions of this program and I just can't seem to finish it. I can't imagine what my final will be like.

    ​// tax calculator.cpp : This file contains the 'main' function. Program execution begins and ends there.

    //

    #include "pch.h"

    #include <iostream>

    #include <iomanip>

    using namespace std;

    //calculating each category of tax percents to income

    int main()

    {

    double income, // original income tax1 = 0, // the amount of tax from each category tax2, tax3, tax4, tax5, tax6, incHolder, // holds the income after reducing it from each category newInc, // income after subtracting taxes cat1 = 30000, //maximum amount each category taxes cat2 = 20000, cat3 = 50000, cat4 = 100000, cat5 = 50000, cat6 = 250000; 

    double taxRate30k = 0, taxRate30\_50k = .1, taxRate50\_100k = .2, taxRate100\_200 = .3, taxRate200\_250 = .35, taxRate250 = .4; 

    cout << "how much income do you make? : "; cin >> income; cout << "your starting income is " << income << endl; 

    if (income < 30000) { tax1 = cat1 \* taxRate30k; incHolder = income - cat1; cout << "your income is now: $" << fixed << setprecision(2) << income << " After 0% tax" << endl << endl; cout << "inholder: " << incHolder << endl; } 

    if ((income >= 30000) && (incHolder >= 30000)) { incHolder -= cat2; tax2 = cat2 \* taxRate30\_50k; newInc = income - tax1 - tax2; cout << "your income is now: $" << fixed << setprecision(2) << newInc << " After 10% tax" << endl << endl; cout << "inholder: " << incHolder << endl; } else if (incHolder < 20000) { tax2 = incHolder \* taxRate30\_50k; newInc = income - tax1 - tax2; cout << "your income is now: $" << fixed << setprecision(2) << newInc << " After 10% tax" << endl << endl; cout << "inholder: " << incHolder << endl; } 

    if ((income >= 50000) && (incHolder >= 50000)) { incHolder -= cat3; tax3 = cat3 \* taxRate50\_100k; newInc = income - tax1 - tax2 - tax3; cout << "your income is now: " << fixed << setprecision(2) << newInc << " After 20% tax" << endl << endl; cout << incHolder << endl; } else if (incHolder < 50000) { tax3 = incHolder \* taxRate50\_100k; newInc = income - tax1 - tax2 - tax3; cout << "your income is now: " << fixed << setprecision(2) << newInc << " After 20% tax" << endl << endl; cout << incHolder << endl; } if ((income >= 100000) && (incHolder >= 100000)) { incHolder -= cat4; tax4 = cat4 \* taxRate100\_200; newInc = income - tax1 - tax2 - tax3 - tax4; cout << "your income is now: " << fixed << setprecision(2) << newInc << " After 30% tax" << endl << endl; } else if (incHolder < 100000) { tax4 = incHolder \* taxRate100\_200; newInc = income - tax1 - tax2 - tax3 - tax4; cout << "your income is now: " << fixed << setprecision(2) << newInc << " After 30% tax" << endl << endl; } 

    if ((income >= 200000) && (incHolder > 200000)) { incHolder -= cat5; tax5 = cat5 \* taxRate200\_250; newInc = income - tax1 - tax2 - tax3 - tax4 - tax5; cout << "your income is now: " << fixed << setprecision(2) << newInc << " After 35% tax" << endl << endl; } else if (incHolder < 50000) { cout << incHolder << endl; tax5 = incHolder \* taxRate200\_250; newInc = income - tax1 - tax2 - tax3 - tax4 - tax5; cout << "your income is now: " << fixed << setprecision(2) << newInc << " After 35% tax" << endl << endl; } if (income >= 250000) { tax6 = incHolder \* taxRate250; newInc = income - tax1 - tax2 - tax3 - tax4 - tax5 - tax6; cout << "your income is now: " << fixed << setprecision(2) << newInc << " After 40% tax" << endl << endl; } return 0; 

    }

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

    latest windows update messed up visual studio 2017 community

    Posted: 30 Sep 2018 03:46 PM PDT

    anyone else having a problem with running visual studio?

    it runs really slowly for me, freezes, and I'm not sure I can even run the console because when i do it's just a blank window with the one blinking line.

    what sucks is that I have to turn in my homework by tonight, and I'm not sure I'll be able to. fucking awesome.

    edit: ok well after like 3 hours of trying to update it through the installer, it finally finished, and not I'm not having any of the problems

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

    Need help with robocopy

    Posted: 30 Sep 2018 03:32 PM PDT

    I recently started with my IT course at school and we have to work alot with virtual machines. I really like working on my desktop from home. However, I found it very annoying to keep on copying and pasting files from my PC to my External Hard Drive and then onto my laptop again. So I searched far and wide on the internet, and came upon an article that gave me a code that utilises the "Robocopy" feature ( I will post the code down below ). I've been fiddling around with the code for about a hour now and I really can't get it to work. So I came here to receive help from more experienced people. Also, do I just save the file as a .BAT or do I need to save it as something else?

    So this is the Original Code;

    Function Get-VMUsbRoot { Return (Get-WmiObject -Class Win32_logicaldisk | Where-Object VolumeName -eq 'PATRIOT').DeviceID } Function Move-SyncedVirtualMachine { Param([Parameter(Mandatory=$true)] [ValidateSet('USB','PC')] [string]$To) $usbRoot = Get-VMUsbRoot $usb = ($usbRoot+'\VMware') # VM's are kept in different places on each PC. $vmPaths = @{'Laptop'='C:\VMWare' 'Desktop'='V:\VMWare'} $syncedVMPathOnPC = $vmPaths[$env:COMPUTERNAME] switch($To){ 'USB'{robocopy $syncedVMPathOnPC $usb /MIR} 'PC'{robocopy $usb $syncedVMPathOnPC /MIR} } }

    And this is mine;

    Function Get-VMUsbRoot { Return (Get-WmiObject -Class Win32_logicaldisk | Where-Object VolumeName -eq 'PATRIOT').DeviceID } Function Move-SyncedVirtualMachine { Param([Parameter(Mandatory=$true)] [ValidateSet('USB','PC')] [string]$To) $usbRoot = Get-VMUsbRoot $usb = ($usbRoot+'\Virtual_Machines') # VM's are kept in different places on each PC. $vmPaths = @{'Laptop'='C:\Virtual_Machines' 'Desktop'='V:\Virtual_Machines'} $syncedVMPathOnPC = $vmPaths[$env:RH-Desktop] switch($To){ 'USB'{robocopy $syncedVMPathOnPC $usb /MIR} 'PC'{robocopy $usb $syncedVMPathOnPC /MIR} } }

    I'd love to hear some feedback from someone. It would really help me out.

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

    simple python BeautifulSoup4 help

    Posted: 30 Sep 2018 09:55 AM PDT

    I have a part of this assignment to parse https://finance.yahoo.com/commodities for the table data in BeautifulSoup but i'm unsure how to use the soup.findall() feature and such. We barely learnt this is in class. Here is the question. This is what I have so far, but it doesn't do much because I'm unsure what to do. https://pastebin.com/S94hkMBh

    This should be simple if I knew what to do. Thanks!

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

    Can someone please critique my attempt at creating a reusable/extensible object oriented design?

    Posted: 30 Sep 2018 01:35 PM PDT

    I am working on creating a reusable and easy to extend software for a software system. I will keep things vague as it is not allowed to discuss the technical details due to the NDA.

    The main thing is that the people working with me do not like deep inheritance hierarchies and would like a composition over inheritance approach. They would also like the design to be very easy to extend and be able to reuse the design for similar machines in the future.

    Context:

    1. I have a software system with multiple different types of "machine" classes. I am working on a newer machine which is slightly different from the older machines. The newer machine should be generic and easy to extend for the future.

    2. Each machine has x number of "Cabinets" and each of those cabinets have their own properties. What we had so far was that each cabinet was specific to the machine. I don't know how that will work in the future.

    3. Each machine does a certain number of "jobs" for the user and the jobs can be related but different. So the "machine" uses a certain number of "cabinets" in every "job" and returns a result to the user.

    4. Each machine has a "hardware device" e.g an fpga or something that will assist the machine in doing its job. Again it should be possible to create new combinations of machines and devices, cabinets in the future but currently I have a specific combination to follow.

    Given all that I already know the specific types of machine, cabinet and hardware device that I have to use in the new machine class. All I want is that it should be easy to extend and reuse for similar machines in the future.

    Here is the design I came up with.(C++)

    A generic "machine interface" and a machine class implementing that interface. A generic cabinet interface and a class implementing the cabinet. A generic job interface and a class for jobs. A generic hardware interface and a class implementing that interface.

    There is a factory method that constructs my machine. The machine class receives cabinet array, hardware device in it's constructor. It can receive any type of cabinet and hardware device because the constructor only includes c++ interfaces in the signature. This would make it theoretically possible to create different combinations of machines in the future (where I currently require only a single combination). I should mention that there are a LOT more entities in the system that will interact with my machine but currently I only want to focus on the entities that I mentioned.

    I am all for harsh criticism of it results in a much better design. Please give me your opinion and make my design much better.

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

    Where to start ??

    Posted: 30 Sep 2018 11:50 AM PDT

    There are so many websites for learning programming .. I'm currently working as a QA but I want to be a developer. I thought of starting with a boot camp in udemy but my team mate who is a developer told me not to start with boot camp .. He told that it will be too much for a beginner .. I am planning to start with front end programming but I don't know where to start . Is boot camp a good place to start or not ? If not then where should I start ?? please help me Reddit

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

    Resources for making CLI using Python click module. Is there some other beginner-friendly framework?

    Posted: 30 Sep 2018 10:49 AM PDT

    Bootcamp vs 4 Year Degree?

    Posted: 30 Sep 2018 09:55 AM PDT

    I'm not sure if this is the correct place for this, so I apologize if it isn't. I've been trying to switch careers into programming, and I'm trying to decide whether or not to pursue a 4 year career or go to a bootcamp. I'm already 25, and I have a rudimentary knowledge of coding I gained from doing some introductory classes earlier in life.

    Anyone here done a well rated bootcamp? Is it possible to find good work w/out the four year degree?

    Thanks so much in advance.

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

    My if-statement doesn't work (probably a mistake with arrays; I'm a beginner)

    Posted: 30 Sep 2018 04:10 AM PDT

    var correctCounter = 0; var incorrectCounter = 0; function startFunction() { var countries = ["Ludendorff", "Haig", "Foch"]; var randomCountry = countries[Math.floor(Math.random()*countries.length)]; document.getElementById("answer").innerHTML = randomCountry; } function answerA() { if (randomCountry == countries[0]) { correctCounter ++; document.getElementById("correctAnswers").innerHTML = "Correct answers: " + correctCounter; } else { incorrectCounter ++; document.getElementById("incorrectAnswers").innerHTML = "Incorrect answers: " + incorrectCounter; } } 

    Please ask if you need more context.

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

    [Time complexity] Why is it a rune time of O(2^n )?

    Posted: 29 Sep 2018 10:13 PM PDT

    void g(int n) {

    if (n == 1) return;

    g(n-1);

    g(n-1);

    }

    It's from page 19 of here.

    I don't get how g(n-2) is 4 calls?

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

    No comments:

    Post a Comment