Information Technology

On open-source developers/software. A thank you, some questions, and how to give back.

Learn Programming - 16 min 58 sec ago

What's good everyone.

So I'm just working on a little project I've finally started coding, rather than just thinking about starting it for like 2 years(I know I'm not the only one), and I've already employed the help of 3 or 4 different libraries.

You know... I read the documentation, I read the licences, clearly someone has put time, passion, blood(probably), sweat and tears(undoubtedly) in to creating these libraries from the ground up -- sometimes for pretty niche circumstances or purposes. For that I am endlessly thankful. But also a little wary...

Often times the licences to these open-source softwares grant every right to the user. Modify it, sell it, use it commercially, privately, redistribute it. Basically do whatever you want with it, like the MIT licence. Usually, the one and only stipulation being that you must include the software's original licence indicating its open-source-ness.

These are amazing contributions to the development world (big ups) and are often the unsung heroes in a lot of the websites/software we know and love, Bootstrap being the biggest example off the top of my head. Why reinvent the responsive wheel when someone is offering it to me for free?

But what happens when I incorporate some open-source piece in to my software and then the author decides to change the licence terms. Am I screwed at that point, I guess I just re-write their software myself. Is it even worth using open-source libraries in commercial products because of the possibility of this happening?

On giving back, I do what I can. Shouting out the @developer(s) on their social media platforms, even though I'm pretty sure that 99% of my friends on social media have no idea what I'm talking about lol. Donating a few bucks to the project when I'm able to always feels like a solid way to give back -- on that note, one day when I can afford it I will buy a Sublime Text Editor license lmao.

Just curious to see how open-source code works in to other peoples' work, and even to hear from some open-source devs on their motivations!

Thanks for reading, everyone.

TL;DR -- Open-source software is amazing, confusing, can be scary and definitely underappreciated. What kind of O-S software do you use?

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

[C] How does the memory address of a struct work?

Learn Programming - 18 min 57 sec ago

When dealing with a struct, does each individual element have its own memory address? or does the entire struct have a single memory address connecting to each of its elements? If I have a function that accepts a pointer and I want to pass the struct type to the function and use scanf to prompt the user to input the value, do I stilll need an ampersand? How will it look?

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

How can i re-create this with just html+css?

Learn Programming - 21 min 54 sec ago

The website is I tried to inspect element it and reverse engineer but i'm stumped...I just started learning html and css days ago and the way this site is set-up is the direction i wold like to go in for my first site. If someone could walk me step by step i would be grateful. When I inspect element, i'm seeing the transform: translate 3d y value changing, but i don't know how to automate it... Please write it out but also let me work for the answer if that's possible

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

Calculating web development costs using WEBMO

Learn Programming - 39 min 59 sec ago

I'm in a "big" project of my university (like a thesis, but not a thesis) where I have to define a more or less complex web application, build a prototipe and estimate the costs of developing the full web application.

The thing is that I found this paper that talks about the WEBMO model (based on COCOMO II) which presents a method to calculate the development costs, basically the method is:

  1. Count and classify web object predictors and multiply them by the corresponding weight according to the complexity (just like in table 4).
  2. Transform the number obtained in 1. into #KSLOC using table 7.
  3. Use the equations at the end of the 3rd page to get the estimation for the effort and time needed to develop the web application.

But I had a doubt about the example shown in the paper... what bothers me is that in the table 4 it says that 16 HTML lines represents 17.98 percent of the effort to finish this proyect (because 16 * 4 = 64, which is 17.98 percent of 356, the total size of the proyect), which then it's said it's a 5 month proyect in the 4rd page, WTF? 16 HTML lines? it's a typo? or they were referring to 16 HTML files?

Besides that I have tried to find the factors that multiply the number of XML, HTML, and query lines in low complexity, high complexity and number of scripts in high complexity in the web object calculation worksheet, but the problem is that what I've found has other multiplying factors, for example in this book it says that an average multimedia file has a weight of 2, but in the example of paper that I previously put the weight for the same item is 5, not 2.

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

Why when I fork something on Github, am I not getting the latest version?

Learn Programming - 50 min 14 sec ago

I am attempting to fork this repo:

And on it you can see the following directory:

src add samr21 5 months ago

But when I fork it, I don't get that version, I get a much older version:

src Added email contact and website to about dialog and help text 2 years ago

I checked that I am looking at the same branch as that tripped me up earlier when directories seemingly disappeared entirely, but that's not the issue.

I also see this notification on the fork: This branch is 3 commits behind mattairtech:arduino.

And that may be the source of my issue, but I can't seem to update the fork so it's not behind. I tried the "pull request" button, but the wording of what I get back sounds weird:

mattairtech:arduino is up to date with all commits from scswift:arduino. Try switching the base for your comparison.

That sounds like what I'd call a push, not a pull, but admittedly I'm unfamiliar with all this stuff. Shouldn't it say that scswift:arduino is up to date with all commits from mattairtech:arduino? (Which it appears not to be, but that's besides the point.)

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

Can you recommend a laptop or tablet that's good for Photoshop and gaming?

  • Total budget and country of purchase: $1000 tops, preferably under $800, USA

  • Do you prefer a 2 in 1 form factor, good battery life or best specifications for the money? Pick or include any that apply. My biggest concerns are the quality of the graphics card, amount of RAM, speed, and quality of the processor, and preferably a solid state drive. Also, the quality of the screen and the battery life. I'd like at least four hours on a charge if possible.

  • How important is weight and thinness to you? Fairly important since it will be on my lap all day. If it's hot and heavy it will be hard to use or take on trips.

  • Which OS do you require? Windows, Mac, Chrome OS, Linux. Windows

  • Do you have a preferred screen size? If indifferent, put N/A. minimum 15, preferably 17 or better

  • Are you doing any CAD/video editing/photo editing/gaming? List which programs/games you desire to run. All of the above. Heavy on the photoshop and big open-world games like Witcher 3 and MMORG's

  • If you're gaming, do you have certain games you want to play? At what settings and FPS do you want? Modern games like GTA 5, Sims 4, Skyrim, The Secret World etc and at the highest settings.

  • Any specific requirements such as a good keyboard, reliable build quality, touch-screen, finger-print reader, optical drive or good input devices (keyboard/touchpad)? I need to be able to draw on the screen directly as if it's a piece of paper so I can work on my art more comfortably without needing a separate tablet. But it also has to come with a keyboard or have the option of buying one for when I'm playing games.

  • Leave any finishing thoughts here that you may feel are necessary and beneficial to the discussion. Sorry if the specs are too high end for the price. Give me your best suggestions even if they exceed 1k. Thank you for your assistance.

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

c++: bit confused about dynamic_cast

Learn Programming - 1 hour 16 min ago
if (CheckingsAccount* cptr = dynamic_cast<CheckingsAccount*>(account[i])) { //if account[i] is in fact a checkings account: cptr->setTransactionFee(5); cptr->credit(0, secondAdjustment); }

I wrote this bit of code and I'm confused about the if (CheckingsAccount* cptr = dynamic_cast<CheckingsAccount*>(account[i])) statement.

So it automatically sets cptr to `account[i], and that also causes the if-statement to check to see if cptr is in fact an CheckingsAccount class?

If that's the case then does dynamic_cast return true if it's able to successfully convert a base class to a derived class?

If that's what happens and the first if-statement fails, then do both cptr and sptr point to the newly converted account object? And is this generally bad programming practice?

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

Since there is less documentation for Drupal8 I am writing blogs. I need some feedback.

Hey guys, I think there is always less to know proper documentation in Drupal so I've decided to write blogs on it by associating with a company that uses Drupal extensively I did two blogs already, I need some feedback from you guys, please let me know your thoughts thanks :) Here are the blogs:

  1. Implementing Open Graph Features Using Meta tag Open Graph Module

  2. Protecting Web Forms From Bots Using Captcha and Honeypot

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

Been learning for years, but i still feel like an idiot

Learn Programming - 1 hour 42 min ago

I have been learning programming for about 2 years. All different languages, but mainly C# and Python. The problem is, i feel like i can't really do anything. I can make a stupid windows forms app here and there, and maybe a bot in Python, but i feel like when i have an idea for something, i just can't do it. Am i just stupid and should i give up with programming and maybe find a new hobby?

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

Should I purchase a brand new laptop or a second hand laptop?

Hi! I’m looking for advice in purchasing a laptop.

I have a maximum budget of PHP50k and I plan or purchasing a laptop that I will be using for studying machine learning and some coding for a possible thesis topic for grad school.

So far,I have browsed through a collection in an online store and saw a couple of used laptops priced at around PHP 35k (a used lenovo thinkpad t460 Corei5 6300u 16GB 512 SSD sold for PHP35,500 and a slightly used dell latitude 7480 Core i5 7300u 8GB DDR4 256GB SSD priced at around PHP32,500) and brand new laptops priced at around PHP49.5K (lenovo thinkpad t470 core i7 7500u 4GB 1TB Nvidia GT940MX 2GB for PHP 49.5k and a lenovo thinkpadx270 core i7 7600u 8GB 500GB HDD)

What should I be looking for when purchasing second hand laptops? In the long run, do I save money (a difference of around PHP15k) by purchasing a second hand laptop compared to cashing out for a brand new laptop?

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

Google Builds A Synthesizer With Neural Nets And Raspberry Pis.

Hack a Day - 1 hour 44 min ago

AI is the new hotness! It’s 1965 or 1985 all over again! We’re in the AI Rennisance Mk. 2, and Google, in an attempt to showcase how AI can allow creators to be more… creative has released a synthesizer built around neural networks.

The NSynth Super is an experimental physical interface from Magenta, a research group within the Big G that explores how machine learning tools can create art and music in new ways. The NSynth Super does this by mashing together a Kaoss Pad, samples that sound like General MIDI patches, and a neural network.

Here’s how the NSynth works: The NSynth hardware accepts MIDI signals from a keyboard, DAW, or whatever. These MIDI commands are fed into an openFrameworks app that uses pre-compiled (with Machine Learning!) samples from various instruments. This openFrameworks app combines and mixes these samples in relation to whatever the user inputs via the NSynth controller. If you’ve ever wanted to hear what the combination of a snare drum and a bassoon sounds like, this does it. Basically, you’re looking at a Kaoss pad controlling rompler that takes four samples and combines them, with the power of Neural Networks. The project comes with a set of pre-compiled and neural networked samples, but you can use this interface to mix your own samples, provided you have a beefy computer with an expensive GPU.

Not to undermine the work that went into this project, but thousands of synth heads will be disappointed by this project. The creation of new audio samples requires training with a GPU; the hardest and most computationally expensive part of neural networks is the training, not the performance. Without a nice graphics card, you’re limited to whatever samples Google has provided here.

Since this is Open Source, all the files are available, and it’s a project that uses a Raspberry Pi with a laser-cut enclosure, there is a huge demand for this machine learning Kaoss pad. The good news is that there’s a group buy on, and there’s already a seller on Tindie should you want a bare PCB. You can, of course, roll your own, and the Digikey cart for all the SMD parts comes to about $40 USD. This doesn’t include the OLED ($2 from China), the Raspberry Pi, or the laser cut enclosure, but it’s a start. Of course, for those of you who haven’t passed the 0805 SMD solder test, it looks like a few people will be selling assembled versions (less Pi) for $50-$60.

Is it cool? Yes, but a basement-bound producer that wants to add this to a track will quickly learn that training machine learning algorithms cost far more than playing with machine algorithms. The hardware is neat, but brace yourself for disappointment. Just like AI suffered in the late 60s and the late 80s. We’re in the AI Renaissance Mk. 2, after all.

[C] Loop passing data between child and parent process hangs indefinitely.

Learn Programming - 1 hour 50 min ago

I posted a previous thread for the similar assignment and you guys were extremely helpful, but I ran into another snag.

The program will run, and will pass data now (thanks again for that), but when running large batches of data the program will hang after the loop has run and processed few hundred times. I'm specifically testing against /usr/share/man which is about 6800 files.

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

Canada/ Around $1000

  • Total budget and country of purchase: Canada, around $1000, maybe a little more

  • Do you prefer a 2 in 1 form factor, good battery life or best specifications for the money? Pick or include any that apply. I hate 2 in 1's. I would like a good battery life, nothing to crazy though. A full day battery life with moderated use is more than enough.

  • How important is weight and thinness to you? Very important. Something around 1kg

  • Which OS do you require? Windows, Mac, Chrome OS, Linux. Windows.

  • Do you have a preferred screen size? If indifferent, put N/A. N/A

  • Are you doing any CAD/video editing/photo editing/gaming? List which programs/games you desire to run. Some casual gaming and some very casual photo editing

  • If you're gaming, do you have certain games you want to play? At what settings and FPS do you want? I don't have any in mind.

  • Any specific requirements such as good keyboard, reliable build quality, touch-screen, finger-print reader, optical drive or good input devices (keyboard/touchpad)? Must have: Good keyboard and trackpad and great build quality Optional: Gpu, finger-print reader, touch screen

  • Leave any finishing thoughts here that you may feel are necessary and beneficial to the discussion. I'm Brazilian and currently I live in Canada. I'm gonna go back in July and I'm looking to buy a new laptop. Because I live in Brazil, I don't care much about warranty and support, since I'll have none anyway. I'm just looking for the best all around laptop that has a good build quality, its pretty and can play some games casually. Please help me :/ *Right now I'm divided between the razer blade stealth and lg gram 2018. I'm also completely open to suggestions

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

Which is better than the other? Ideapad 120s, 500e Chromebook, or Asus Vivobook e203NA

Planning on putting Linux on one and use it as a travel laptop. Which of the three is best in regards to pricing and specs?

Ideapad 120s

500e Chromebook

Asus Vivobook e203NA

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

[UK] 15.6" slim gaming laptop

  • Screen size: 15.6"
  • Country: UK
  • Budget: <1300, but looking for best value for money.
  • Screen resolution: 1080p (won't pay more for better)
  • Software/games: everything really - photoshop, premiere pro, the latest AAA open world games.
  • OS: not needed
  • Weight/thinness: slim
  • GPU: at least GTX 1060 (or AMD equivalent)
  • Build quality: must be reliable (so not a shady custom build brand)

I'm currently looking at the HP OMEN (, which I can get a 10% discount for.

Any better alternatives?

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

I need a simple explanation that explains hash functions

Learn Programming - 2 hours 40 min ago

What is the purpose/benefit of hash functions?

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

[Looking for a laptop for school]

Budget: Under 2 thousand CAD

Country: Canada

Screen size: No preference

Screen resolution: No preference

Touch screen: Would be nice but not required

Weight: Light enough for school (under 2kg ideally)

Main purpose of laptop: School and gaming

If you will be gaming, what are the most demanding games you will play and at what settings? Smite (MOBA) and Overwatch, not much else.

Is battery life an issue? Yes! Ideally, over 6 hours but over 8 hours would be a dream.

Other notes: Definitely hoping for a Intel i7 processor (my current one is an i3), and Windows 10. I was looking at the new dell XPS 15 however... the price is a bit of a turn-off so I was hoping to find an alternative (without sacrificing too many of my listed preferences). I'll be using this laptop for post-secondary. I've been told that the most taxing program being run would be Eclipse by Java...? Thank you for reading to the end of my post :)

Also, I took the info layout from /r/Laptop... will they mind?

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

WhatsApp 0.2.8505 - Desktop client for WhatsApp Messenger.

MacUpdate - Mac OS X - Fri, 03/16/2018 - 23:59

WhatsApp is the desktop client for WhatsApp Messenger, a cross-platform mobile messaging app which allows you to exchange messages without having to pay for SMS. WhatsApp Messenger is available for iPhone, BlackBerry, Android, Windows Phone, and Nokia and yes, those phones can all message each other! Because WhatsApp Messenger uses the same internet data plan that you use for email and web browsing, there is no cost to message and stay in touch with your friends. In addition to basic messaging WhatsApp users can create groups, send each other unlimited images, video and audio media messages.

Version 0.2.8505:
  • Bug fixes and performance improvements.

  • OS X 10.9 or later

Download Now

Findings 2.0.1 - Lab notebook app for scientists.

MacUpdate - Mac OS X - Fri, 03/16/2018 - 23:59

Findings is a notebook app for scientists. When running experiments in a lab, it is crucial to keep track of what one is doing, to be able to later reproduce the results, assemble and publish them. This is what lab notebooks are for. For as long as science has existed, lab notebooks have been made of paper. There is something great about paper, and the freedom and flexibility it affords. But in 2014, paper starts to show its limits in other areas where computers have taken over: storing results, analyzing data, searching, replicating, sharing, preserving, and more. Findings ambition is simple: make your computer a better tool than paper to run experiments and keep lab records.

Version 2.0.1:

Note: Now requires OS X 10.11 or later

  • Adds menu item for removing an entry or protocol from the currently selected collection, also enabling the use of the backspace key for that action.
  • Keyboard shortcut for 'Fixed Width' (alt-cmd-x)
  • Press alt key during startup to disable crash reporting.
  • The action 'Duplicate Protocol' now works as expected.
  • Setting a proper title when duplicating an entry, instead of just calling it 'Untitled Experiment'.
  • Spurious message about trial mode for Pro users.
  • Enables option to remove link to the Findings website in PDF output for Pro users.
  • Displaying the Findings application name in the Force-Quit dialog, instead of an empty string.
  • Fixes crash at startup, that could happen when UI was ready before the library data.
  • Crash when duplicating a sticky.
  • Fixes crash in early app startup.
  • Fixes crash triggered by rare malformed library configuration file.

  • OS X 10.11 or later

Download Now]]>