• Breaking News

    Saturday, March 13, 2021

    Any advice on understanding device drivers for windows and how to write my own? Ask Programming

    AskProgramming

    Any advice on understanding device drivers for windows and how to write my own? Ask Programming


    Any advice on understanding device drivers for windows and how to write my own?

    Posted: 13 Mar 2021 06:26 PM PST

    So far, I have found that a good understanding of C is a good place to start, what comes next? I want to be able to write a filter driver that displays disk speeds and then does something when it reaches a certain speed. Thank you!

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

    What will be the next “software engineering”?

    Posted: 13 Mar 2021 06:19 PM PST

    When I was in high school (2012) Many of my teachers would say to study software because their friends were getting paid 100k+.

    Now I've heard by many tech social media influencers that the days of getting a career for building website and applications for 100k are dying (as I've experienced it myself since I just graduated and average is about 80k in AZ).

    Obviously there's exceptions to that. But my question Is where are the 100k jobs? What tech sub field is getting these?

    I'm guessing machine learning, big data, data science, robotics, cloud etc

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

    How many have you actually got a good career from learning programming?

    Posted: 13 Mar 2021 06:49 AM PST

    To be honest i've met so many coders ( and many video game hackers and botters who created their own bot ) and stuff like that. So far i haven't heard none of them actually getting a career with their skills despite the fact i know a guy who studies everyday and is very good at it too.

    So far i only know few guys who actually made it. But both of them finished computer science in university ( one is studying there at the moment though ). But how many of you have got a job from self taught from courses?

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

    College vs day to day job workload

    Posted: 13 Mar 2021 11:47 AM PST

    Hi everyone, just have a short question for programmers that did CS in college or even bootcamps, would you say the workload of a day day job is higher than when you when taking CS classes(Data structure and algorithms for example)in college(assuming you were taking more than 10 credits at once)?

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

    Object Oriented Programming courses through example projects

    Posted: 13 Mar 2021 11:19 AM PST

    Which OOP course teaches through projects (e.g. build games) i.e. the teacher would build complete programs step by step

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

    Need a little help with project

    Posted: 13 Mar 2021 08:35 PM PST

    public class ShoppingCenter{

    /**This is the instance variable we will use to store the user's balance. It is

    the only instance variable we will need. **/

    private double userBalance;

    /**This is the constructor. We will need to give the initial balance to the user.

    We're running a special promotion where new users start with $100 of store credit.**/

    public ShoppingCenter ( double initialBalance )

    if ( initialBalance > 0.0 )

    userBalance = initialBalance;

    /**In this method we will return the balance of the user. This method takes no parameters

    and returns a double representing the balance of the user.**/

    public double getUserBalance(){

    return userBalance;

    /**In this method we handle the case where the user wants to deposit money into their account.

    We take in the value they want to add as the double amountToAdd and return a boolean value

    signifying if the deposit was successful or not. We want to make sure that amountToAdd is

    greater than zero. If it is, we want to add the value to the account and return true. However

    if it is not, we don't want to do anything and instead return false.

    **/

    public boolean addToUserBalance (double amountToAdd)

    {

    userBalance = userBalance + amountToAdd;

    {

    return false;

    }

    }

    /**This method allows the user to purchase T-Shirts. It takes two parameters: amount, which represents

    the number of T-shirts being purchased; and size, which represents the size of the shirts being purchased.

    The prices for T-Shirts are as follows:

    smalls (represented by the character 's' or 'S'): $10 each

    medium (represented by the character 'm' or 'M'): $20 each

    larges (represented by the character 'l' or 'L'): $24 each

    Before allowing the purchase to go through, make sure it is a valid purchase first. Purchases can be invalid

    for a number of reasons. If the user does not have enough money, it is invalid. If the size character is invalid,

    the purchase is invalid. If they try to buy zero or a negative number of shirts, it is invalid.

    If a purchase is invalid, we will return false so that the error message can be shown by the main method. Otherwise

    we will subtract the cost from the user's balance and return true to signify that it is a valid purchase.

    **/

    submitted by /u/Sorry-Environment958
    [link] [comments]

    Youtube erases all changes made by my javascript to a site if I've watched a video on that page. It was all fine before the progress bar showed up. How to fix this issue?

    Posted: 13 Mar 2021 07:57 PM PST

    I want my change to stay.

    https://www.youtube.com/results?search_query=Justin+Bieber+-+Hold+On

    the URL didn't change, btw.

    my script:

    window.addEventListener('load', (event) => { document.title = "No"; }); 

    and I used this chrome extension to insert scripts

    https://chrome.google.com/webstore/detail/user-javascript-and-css/nbhcbdghjpllgmfilhnhkllmkecfmpld?hl=en

    setting:

    https://ibb.co/J7B6TfQ

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

    Question about outputting a whole paragraph in C++?

    Posted: 13 Mar 2021 07:41 PM PST

    Still learning C ++

    I would like to just have the program print a paragraph?

    The problem is when I copy and paste my paragraph in the quotions it won't print

    int main() {

    std::cout << "My paragraph here";

    return 0;

    }

    Can you not do a whole Paragraph like that in C++

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

    Not sure what to use here

    Posted: 13 Mar 2021 06:38 PM PST

    I am working on trying to grab just the hyperlinks from a txt file for an assignment. I can get my code to grab just the hyperlink, but it still shows all the white space and gives me the incorrect amount of lines I need. I've been trying a couple of different things but I am not sure where to go from here. Any help would be greatly appreciated. Here is my code so far:

    file = open('mbox-short.txt') count = 0 for line in file: if line.find("http"): location1 = line.find("http") location2 = line.find(" ",location1) line = line.replace(")","") count = count + 1 print(line[location1:location2]) print(count) 

    and here is the output up until the first text comes in:

    http://source.sakaiproject.org/viewsvn/?view=rev&rev=39772 

    Edit: The code box won't show it, but there are about 25 blank lines before this shows up.

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

    Help using DivMod or bit shifting in Python to decode hex values to ASCII

    Posted: 13 Mar 2021 06:07 PM PST

    I am trying to write a function that takes a list of Hex values that looks like this " [0x4974, 0x2077,0x6173,0x2074,0x6865,0x2062, 0x6573,0x7420,0x6f66,0x2074,

    0x696D, 0x6573,0x2c20,0x6974,0x2077,0x6173,0x2074,0x6865,0x2077,0x6f72,0x7374,0x206f,

    0x6620,0x7469,0x6d65,0x732e] " And decodes it to ASCII then prints back the message in ASCII. The hard part (for me) is my teacher gave specific diameters for how we must write the function. 1.) we must use a for loop 2.) Conversions can only be done using the divmod function or bit shifting. I have created a program that works already but it does not use divmod or bit shifting to decode, it uses built in libraries. If anyone has any examples using divmod or bit shifting that would be super helpful. Even if its just a link to a resource online i havent been able to find any examples, or at least the ones i find on divmod dont make sense to me. Any help is appreciated Thanks!

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

    Online interface for DnD World

    Posted: 13 Mar 2021 04:50 PM PST

    Without sounding stupid as I can be a slow learner at times:

    I want to create an online interface where players can hover over different icons and be given a text box, with links if they click them.
    I know this is easy enough to do in all likelihood I was just wondering if someone could point me the right way on what this would be called or where I could learn it?

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

    What is the extent of modding capabilities in among us?

    Posted: 13 Mar 2021 04:20 PM PST

    I'm not sure this is the right place to ask, but I don't think the right people will see this in r/amongus

    About half a year ago I assumed modding was nigh impossible in among us. However, we have ottomated (a non affiliated mod creator) make some role and gameplay mods which are amazing to say the least.

    A bit of context about the game, I'm thinking the only reason why among us mods can go so in depth is because so much of the game is handled on the client. It coincides with their hacker problem but that's an entirely different issue.

    Anyways, if among us can handle mods like this, then ...

    • What can or can't be modded? Just to list some examples, can we add more alignments, new game mechanics, new tasks, new victory conditions, a new UI, and new maps?
    • Why aren't more people doing this? Among us has (or had) a pretty large playerbase so I imagine "know how" isn't a large contributing factor. Plus it's a coding project that's been very unexplored, with a large audience
    submitted by /u/AskingRandomQs
    [link] [comments]

    What job can you get if you are good in python 3 language?

    Posted: 13 Mar 2021 04:19 PM PST

    _M_construct null not valid core dumped? Data Structures problem

    Posted: 13 Mar 2021 02:20 PM PST

    Hey guys, so I have a question. So I'm trying to implement the Bag ADT in C++ using a linked data structure with an array of cells. I've edited the ArrayLinkedBag.cpp and the header file however I keep running into this weird error where the whole thing aborts whenever I try to make test and I was wondering if anyone can help me figure out where I went wrong. I've tried everything to pinpoint the error including rewriting everything and testing the lines one by one but it just isn't working. Any help would be appreciated. I've attached my code for the two files as well as the error message I keep getting.

    ArrayLinkedBag.cpp

    /** Implementation file for the class ArrayLinkedBag. @file ArrayLinkedBag.cpp */ #include "ArrayLinkedBag.h" #include <cstddef> template<class ItemType> ArrayLinkedBag<ItemType>::ArrayLinkedBag(): head(-1), free(0), itemCount(0) { //create free list for (int i = 0; i < DEFAULT_CAPACITY; i++) { cells[i] = (Cell<ItemType>){"a",i+1}; } } // end default constructor template<class ItemType> int ArrayLinkedBag<ItemType>::getCurrentSize() const { return itemCount; } // end getCurrentSize template<class ItemType> bool ArrayLinkedBag<ItemType>::isEmpty() const { return itemCount == 0; } // end isEmpty template<class ItemType> bool ArrayLinkedBag<ItemType>::add(const ItemType& newEntry) { bool hasRoomToAdd = (itemCount < DEFAULT_CAPACITY); if (hasRoomToAdd) { int newFree=cells[free].next; cells[free]=(Cell<ItemType>){newEntry,head}; head=free; itemCount++; free=newFree; } // end if return hasRoomToAdd; } // end add template<class ItemType> bool ArrayLinkedBag<ItemType>::remove(const ItemType& anEntry) { int locatedIndex = getIndexOf(anEntry); bool canRemoveItem = !isEmpty() && (locatedIndex > -1); if (canRemoveItem) { itemCount--; cells[locatedIndex] = (Cell<ItemType>){NULL, free}; free=locatedIndex; } // end if return canRemoveItem; } // end remove template<class ItemType> void ArrayLinkedBag<ItemType>::clear() { //reset free list for (int i = 0; i < DEFAULT_CAPACITY; i++) { cells[i] = (Cell<ItemType>){"a",i+1}; } head=-1; free=0; itemCount = 0; } // end clear template<class ItemType> bool ArrayLinkedBag<ItemType>::contains(const ItemType& anEntry) const { return getIndexOf(anEntry) > -1; } // end contains template<class ItemType> int ArrayLinkedBag<ItemType>::getFrequencyOf(const ItemType& anEntry) const { int frequency = 0; int curIndex = 0; // Current array index while (curIndex < itemCount) { if (cells[curIndex].item == anEntry) { frequency++; } // end if curIndex++; // Increment to next entry } // end while return frequency; } // end getFrequencyOf template<class ItemType> std::vector<ItemType> ArrayLinkedBag<ItemType>::toVector() const { std::vector<ItemType> bagContents; for (int i = 0; i < itemCount; i++) bagContents.push_back(cells[i].item); return bagContents; } // end toVector // private template<class ItemType> int ArrayLinkedBag<ItemType>::getIndexOf(const ItemType& target) const { bool found = false; int result = -1; int searchIndex = 0; // If the bag is empty, itemCount is zero, so loop is skipped while (!found && (searchIndex < itemCount)) { if (cells[searchIndex].item == target) { found = true; result = searchIndex; } else { searchIndex++; } // end if } // end while return result; } // end getIndexOf 

    ArrayLinkedBag.h

    /** Header file for an array-based linked list implementation of the ADT bag. @file ArrayLinkedBag.h */ #ifndef ARRAY_LINKED_BAG_ #define ARRAY_LINKED_BAG_ #include "BagInterface.h" template<class ItemType> class ArrayLinkedBag : public BagInterface<ItemType> { private: static const int DEFAULT_CAPACITY = 6; template<class T> struct Cell { T item; int next; }; Cell<ItemType> cells[DEFAULT_CAPACITY]; int head; int itemCount; // Current count of bag items int free; // Returns either the index of the element in the array items that // contains the given target or -1, if the array does not contain // the target. int getIndexOf(const ItemType& target) const; public: ArrayLinkedBag(); int getCurrentSize() const; bool isEmpty() const; bool add(const ItemType& newEntry); bool remove(const ItemType& anEntry); void clear(); bool contains(const ItemType& anEntry) const; int getFrequencyOf(const ItemType& anEntry) const; std::vector<ItemType> toVector() const; }; #include "ArrayLinkedBag.cpp" 
    

    No comments:

    Post a Comment