• Breaking News

    Wednesday, January 2, 2019

    Birthday gift for programmer?? Ask Programming

    Birthday gift for programmer?? Ask Programming


    Birthday gift for programmer??

    Posted: 02 Jan 2019 10:06 AM PST

    Hey everyone, sorry if this isn't the place for this question. I was wondering what would be an awesome birthday gift for my friend who is a software engineer and loves programming? I wanna get him something relevant to what he really likes. He also like to read programming books. So I don't know if there are any specific keyboards or programming books or anything that would be cool? Thanks.

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

    If digital media can be expressed as a single number, how long would that number be and how short could it be?

    Posted: 02 Jan 2019 01:51 PM PST

    I once heard somewhere that digital copyright was once a bit of a grey area, as any digital media can be expressed as a single number, and you can't copyright a number. This got me thinking:

    If you did break down a piece of digital media (let's say a 2kb JPEG) into a number, how many digits would the number contain?

    I don't know much about this, but I'm imagining that as a raw number it would just be 1s and 0s and the number of digits would be directly proportional to the file size; so, if this is so, how short could that number be expressed using all the numberals 0-9?

    This might be more of an r/askmath question but I figured you folks are smart enough.

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

    How does Selenium Work?

    Posted: 02 Jan 2019 02:17 PM PST

    Does anybody know how selenium works to remotely execute commands?

    It feels like magic to me and I would really like to know what's going on under the hood. If anybody could give me a brief description/link me to the most relevant source code that would greatly appreciated!

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

    C++ passing pointers and references

    Posted: 02 Jan 2019 07:58 PM PST

    I am writing a class that should capture certain matrix behavior, and I'm going to "store" the matrix data as a single vector and access/update them using pointer arithmetic. The data will actually exist outside these objects, the classes are really just an interface to facilitate manipulating this pre-existing external data source via () operator overloading, and I want it to use pointers (or potentially references) to avoid the cost of copyng the data into my objects. However, there are two kinds of matrices (I'm aware of): row major and column major. It's not too hard to modify the pointer arithmetic between row and column major, here's the code I have for my matrix objects:

    template<typename dataT> class RowMatrix { public: // constructors // construct with pointer RowMatrix(const size_t M, const size_t N, dataT& initInd) : num_rows_(M), num_cols_(N), storage_(initInd) {} // member functions // operator overloads dataT& operator()(size_t i, size_t j) { return *storage_[i * num_cols_ + j]; } const dataT& operator()(size_t i, size_t j) const { return *storage_[i * num_cols_ + j]; } // accessor functions - this will fail without notice if index is out of bounds because no error checking for GPU environment where it will run size_t num_rows() const { return num_rows_; } size_t num_cols() const { return num_cols_; } // view functions VectorView rowView(size_t& length, dataT& storage_){ return VectorView(size_t length, dataT initInd);} VectorView colView(size_t& length, dataT& storage_){ return VectorView(size_t length, dataT initInd, size_t this.num_cols() );} } // members private: size_t num_rows_, num_cols_; dataT* storage_; }; 

    template<typename dataT> class ColMatrix { public: // constructors // construct with pointer ColMatrix(const size_t M, const size_t N, dataT& initInd) : num_rows_(M), num_cols_(N),storage_(initInd) {} // member functions // accessors - this will fail without notice if index is out of bounds because no error checking for GPU environment where it will run dataT& operator()(size_t i, size_t j) { return *storage_[j * num_rows_ + i]; } const dataT& operator()(size_t i, size_t j) const { return *storage_[j * num_rows_ + i]; } // view functions VectorView rowView(size_t& length, dataT& storage_){ return VectorView(length, initInd, this.num_rows() );} VectorView colView(size_t& length, dataT& storage_){ return VectorView(length, initInd);} // members private: size_t num_rows_, num_cols_; dataT* storage_; }; 

    Questions 1,2,3,4: Am I using those accessor functions correctly in the () overload? Those should be able to retrieve the value at the indicated array point and also update the data at that point as well via the = operator e.g. A(1,1) = 3. Is it better to use a pointer here or a reference variable for storage_? And what will happen if the first value is e.g. 0? 0 is a valid value for a matrix, will that make the pointer null? I want to be able to do pointer arithmetic, is that possible with a reference?

    Because there's a lot of repetition between the two, I originally wanted to do a Matrix superclass with the members and have rowMatrix and colMatrix inherit from that and then have each implement their specific functions, but I didn't like that there would be a default constructor in Matrix that could just point at anything (I believe). Question 5 in regards to inheritance: would it be better to do this via inheritance or, because it's so simple and so many of the "same" behaviors are just nuanced enough about their differences that most would need to be overwritten, the only things they actually share are the members, does it make sense to bother with inheritance, esp. when that leaves a default constructor in the parent that potentially just points anywhere?

    Second, I need to be able to "view" subvectors of varying lengths of the original matrix and do manipulations on those subvectors, e.g. if I'm working with a 4x4 matrix, I want to be able to create an object that is the 4 columns of row 3 of the original matrix, or an object that is 3 rows of column 2, starting at row 2, etc. Functionally, each of those subvectors is a vector object, and I'm going to use them as such in a dot product function that consistently uses smaller and smaller vectors. My first thought was to have 2 classes, RowView and ColView, but I realized there was a way to have one class and capture the nuance of a column vector in a row-major orientation and row vector in column-major via member functions of those classes rather than 2 distinct View classes.

    Here is that code:

    template<typename dataT> class VectorView { public: // constructor VectorView(size_t& vecLength, dataT& initInd) : mMAS(1), length(vecLength), storage_(initInd) {} VectorView(size_t& vecLength, dataT& initInd, size_t& axisSize) : mMAS(axisSize), length(vecLength), storage_(initInd) {} // accessors dataT& operator()(size_t i) { return *storage_[i * mMAS]; } const dataT& operator()(size_t i) const { return *storage_[i * mMas]; } size_t length() const { return length; } size_t MALength() const { return mMAS; } // members private: size_t length, mMAS; // mMAS = Matrix Major Axis Size dataT* storage_; } 

    Question 6: am I using pointers correctly here? This is basically questions 1-4 from above but with this second class.

    Thank you, any and all help is appreciated!

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

    For those with experience out in the field: is an old mid 2012 Macbook Pro good enough to get work done?

    Posted: 02 Jan 2019 05:47 PM PST

    I'm going to be entering the field very soon through an opportunity I've found, but the only computer I have right now is an old mid 2012 Macbook Pro. Of course, I've modified it to have an SSD and 16GB of RAM. But I can't upgrade anything else.

    How big a hindrance will this be? Can I fully do my job with just this system for full-stack web development?

    Thanks!

    submitted by /u/k-hiroshi
    [link] [comments]

    Is there an alternate place to download an up-to-date MinGW other than Sourceforge?

    Posted: 02 Jan 2019 06:47 AM PST

    The Sourceforge page is broken on this network, and there's no way to download it (the installer), so any suggestions would be appreciated thank you.

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

    Where to look and who to ask for what I think is a simple automation script?

    Posted: 02 Jan 2019 02:12 PM PST

    Hey there. I am not a programmer, so I turn to you for advice.

    The process is this: on specific dates, I get access to a bunch of mobile QR codes that I screenshot and then upload to my inventory. This isn't that arduous of a task, but often, the website is pretty slow when it comes to sliding from one QR code to the next, so when the numbers get up there and I have other things to do, it does make me wonder if this is not something I can pay somebody to automate. The login accounts vary, so it'd be preferable if there were some tool that I could plugin the login info, set a range, and then click "go" and get a bunch of screenshots in return.

    The question is: where do I go to ask for this kind of work? What kind of rate is reasonable? And what kind of information should I have ready for whoever I hire?

    Thanks in advance.

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

    Opinions: Project Management - Relationship between user stories, issues, bugs

    Posted: 02 Jan 2019 01:05 PM PST

    So let's say that you are running your project out of a tool oriented towards epics, user stories, etc. You might have a user story about logging into the system.

    Then, later while you are testing, you have issues like "Forgot Password button is wrong color", "Error text is incorrect" etc.

    So how do you manage these two kinds of "todo" lists? Do you just have two different systems, one for "user stories" and one for "bugs/issues"? Do developers go back and forth between the two systems to find their "todo" items?

    Do you need to look in both systems to estimate the remaining work to be done on the sprint?

    A related question is how you handle the fact that User Stories go through a few different stages/states:

    • user interface design
    • core implementation (remove technical risk that it can't be implemented)
    • detailed implementation (every pixel in the right place)
    • quality assurance testing
    • bug fixing

    How do you track which User Stories are in which state using your favorite software or PM technique?

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

    Android PWA website that does something on wifi/network changes

    Posted: 02 Jan 2019 12:32 AM PST

    Hi,

    according to https://whatwebcando.today/network-type-speed.html we can add a network change listener.

    Is there a way to show a notification https://whatwebcando.today/local-notifications.html on network changes if the website/pwa app is in the background?

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

    Which technologies should I use for my project ?

    Posted: 02 Jan 2019 07:23 AM PST

    A year ago one of my schoolmate made a simple text analysis Golang Api and the idea was to build a kind of Document Management System that would interact with this API.

    Basically the Document Management System would have two main roles:

    - Importing text documents in order to analyse their contents

    - Visualising the results of the various analysis

    Even thought I did not know anything about web development I made a first version of the system with HTML, CSS, Javascript and PHP.

    Today the project is getting more serious as we want to make a SAAS and a desktop version of this app but I have no clue on what technologies and how to transform this amateurish project into a serious software and web application.

    So if you have any advices on what kind of technologies to use or any other advices related to my project please let me now.

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

    First web-dev internship interview tips - details below

    Posted: 02 Jan 2019 03:12 AM PST

    I have been learning web-dev since a year, this is my first interview, which would be online. Here is what is expected from the interview.

    It'll be a 45 minute - 1 hour long interview with some behavioral questions, questions related to your experience, basic HTML CSS JS questions and a algorithmic coding section. We're not looking for correctness of code but rather looking at the thought process and communication skills.

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

    Where to start with API Creation

    Posted: 02 Jan 2019 03:00 AM PST

    Hey everyone,

    I am a recent graduate in Computer Science and have been brought on by a company to create an API for our system to connect clients with ERP Systems. We are a small startup with only a few developers so it is challenging to create everything in house. I've been doing some research trying to figure out the best way to approach this project. Our new version is currently being developed with a lot of features from AWS, so naturally I looked towards using AWS API Gateway since everything would probably play nice. However, a coworker brought up using third party software to help with developing our API to reduce cost and prevent recreating the wheel. When looking up software that can help design and manage API creation, I am mostly seeing companies like Apigee and Mulesoft.

    I am still struggling on the direction we should take, and due to my experience in this field, I am lacking a foundation in which to understand how these different software come into play. In simple terms, can anyone explain the difference between using API Gateway and services like Apigee and Mulesoft? The more I think about it, the more beneficial it would be for us to use software for a foundation and tailoring that to our needs rather than creating something completely new.

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

    Problem with Google Scripts & Sheets date recording

    Posted: 02 Jan 2019 12:35 AM PST

    Extremely new to working with Google Scripts as well as JavaScript. I'm trying to record the date and time into separate cells, but for some reason it seems that the date is being recorded as what seems to be a 24h version of the current time, while the actual time cell records exactly how I want it to.

    Code is:

    var currentDate = new Date(); var currentTime = currentDate.toLocaleTimeString(); sheet1.getRange('E1').setValue(currentDate); sheet1.getRange('F1').setValue(currentTime); 

    Although, the result I'm getting is something along the lines of:

    E F
    0:30 12:30:27 AM PST

    Pretty confused. Is this not how I'm supposed to be grabbing the date/time, or am I just doing something wrong?

    If more information is needed, I'd be happy to include it.

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

    I need some motivation.

    Posted: 02 Jan 2019 05:10 AM PST

    I recently started to program because I want to make games, I love games so that is the reason. I really want to code my own games like nothing big, just simple 2D games.

    Right now I have no motivation to continue programming because it's been a month now and I can only make a cube move left, right and jump and a few more things. But not enough to make a cool game in unity.

    It feels like I don't make any big improvements at all, I still look up things on youtube, forums etc because I can't do the code on my own and I'm scared that I am wasting my time. I have bought books that will arrive soon, so maybe they will help me more.

    I'm just scared and my motivation is dropping everyday.

    Can anyone cheer me up? :(

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

    Can I get a code review?

    Posted: 02 Jan 2019 09:39 AM PST

    I have 300 lines of python. Please message me. Thanks.

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

    What is the best language to make console applications?

    Posted: 02 Jan 2019 03:00 AM PST

    Actually, does it matter what language to use? C and C-like languages (C++, Java, C# etc.) are very similar and I think it doesn't make a big difference which one is best for console applications(?)

    Python is relatively easy, as well as Ruby, but it's not easy to make a .exe file with these since they're scripting languages (if I'm not mistaken).

    Crystal seems promising. It has a very simple syntax and it's compiled, therefore you can make .exe files (right?). But this language is still young and lacks Windows support and other things for now.

    What language would you recommend is best for console apps (that means, well, without using GUI)?

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

    In a raytracer software, wouldn't it be faster to render only the keyframes of the video (H26x) we want to render ?

    Posted: 02 Jan 2019 02:48 AM PST

    Let's say i got a scene in any raytracer software like blender or cinema4d and the whole thing is animated.

    Unless i'm wrong, rendering a video out of it will generate each frames from the animation and then compress the video.

    Wouldn't it be much much faster to only render the key-frames of the -being-generated-video- and then, knowing the movements of the objects from the scene, generate the "movement data" of the keyframes (or however it's called) from it.

    That's just an idea i got right after i woke up this morning, i'm just curious if it's remotely a good idea or not.

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

    Drag n drop functionality using js not working for my own customized code.

    Posted: 01 Jan 2019 10:57 PM PST

    I am trying to add the drag n drop functionality in my web-page. But it doesn't seem to work after I made some changes. Also, is there a way to have only one `Choose file` button, I have two as of now and the 'click here' doesn't seem to work. I have my code here:

    https://jsfiddle.net/ZER_0_NE/7rL8ebkv/11/

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

    No comments:

    Post a Comment