Leave these fields empty (spam trap):
Name
You can leave this blank to post anonymously, or you can create a Tripcode by using the format Name#Password
Subject
Comment
[i]Italic Text[/i]
[b]Bold Text[/b]
[spoiler]Spoiler Text[/spoiler]
>Highlight/Quote Text
[pre]Preformatted & Monospace Text[/pre]
[super]Superset Text[/super]
[sub]Subset Text[/sub]
1. Numbered lists become ordered lists
* Bulleted lists become unordered lists
File

Sandwich


Discord Now Fully Linked With 420chan IRC

Makefile problem

View Thread Reply
- Wed, 28 Dec 2016 13:47:24 EST 677AANqx No.36419
File: 1482950844378.png -(5817B / 5.68KB, 225x225) Thumbnail displayed, click image for full size. Makefile problem
Hello,
I`ve been trying to make a project on unix, but yesterday I ran to a problem I just simply cannot solve.
I work on windows mostly and am Makefile noob.

I have everything installed up. But makefile yields: ".lib/arduino.a" no file or directory.
I figured out it must be some logical mistake in makefile; that it wants arduino.a before it is compiled.

Could anyone help me out?

Makefile: http://pastebin.com/QNGT1XNm
Readme: http://pastebin.com/ZtEA3SqW
Directory structure: http://pastebin.com/JLe8XNRB
7 posts omitted. Click View Thread to read.
>>
Molly Casslelock - Wed, 28 Dec 2016 16:52:35 EST kEUrK4GZ No.36428 Reply
>>36427
If you read through the makefile and did everything you were told to do, one likely possibility is that you're using the wrong version of something. The makefile is copyrighted 2013, so look into that.
>>
Thomas Greenhood - Wed, 28 Dec 2016 19:10:25 EST 9QSfnS0r No.36430 Reply
If you are tired of writing your Makefile by hand try out platformio.
It creates project files based on imported libraries via a few command line commands.
>>
Nathaniel Dradgework - Thu, 29 Dec 2016 14:21:32 EST sGFR0zid No.36431 Reply
1483039292221.jpg -(166021B / 162.13KB, 1332x1776) Thumbnail displayed, click image for full size.
>>36425

>I changed it to "lib/arduino" and it got further. I still get error, but different one.

tfw PROGRESS :)

c++

View Thread Reply
- Thu, 22 Dec 2016 14:24:32 EST Jf4pElwU No.36392
File: 1482434672770.jpg -(6913B / 6.75KB, 182x251) Thumbnail displayed, click image for full size. c++
Anyone that can explain how to return the value after the change?

#include<iostream>
#include<conio.h>
#include<algorithm>
using namespace std;
class Pyre
{
public:
float width;
float depth;
float height;

float change(float, float);
};

float Pyre::change(float side1, float side2)
{
cout<<side1<<side2<<endl<<endl;
std::swap(side1,side2);
cout<<side1<<side2<<endl<<endl;

}

int main()
{
Pyre pyr;
pyr.width = 50;
pyr.depth = 50;
pyr.height = 100;
Comment too long. Click here to view the full text.
9 posts omitted. Click View Thread to read.
>>
Hannah Soblingwater - Fri, 23 Dec 2016 10:47:44 EST 9QSfnS0r No.36402 Reply
>>36401
If you just use assignment instead of std::swap you'll override the left hand side but leave the right hand side as it is.
Be aware that using Pyramid Pyramid::change(float &side1, float &side2)
will just use the memory location of whatever you pass into that function, even it doesn't belong to the current instance of Pyramid.
This defeats the purpose of making it a method.

you could as well use
pyr.depth = pyr.height;
pyr.height = pyr.width;
pyr.width = pyr.depth;

for the same result.


>>36400
>what can i use instead of swap then if i need to change the base (50,50) with the height (100) with just calling one method. the base still needs to be a square after the switch and only one called method is allowed.

That's even easier, but what should happen if the base isn't already a square?

You could do this, in case of the area staying constant

float Pyramid::constantAreaSide() {
return (float)pow(2,0.5)*Pyramid().baseArea();
}
void Pyramid::change() {
float oldHeight = height;
height = constantAreaSide();
width = oldHeight;
depth = oldHeight;
}
Comment too long. Click here to view the full text.
>>
Hannah Soblingwater - Fri, 23 Dec 2016 10:54:35 EST 9QSfnS0r No.36403 Reply
it should be

float Pyramid::constantAreaSide() {
return (float)pow(Pyramid().baseArea(), 0.5);
}

Finding Code Behind Submit Button

View Thread Reply
- Sun, 18 Dec 2016 17:06:59 EST W/zS63TD No.36384
File: 1482098819204.jpg -(5336B / 5.21KB, 268x121) Thumbnail displayed, click image for full size. Finding Code Behind Submit Button
This is all I have:
<tr><td align="center">
<input type="submit" value="Find me a scale!"><br>
</td></tr>

I don't web dev, so where do I start to look? I'm assuming if it's JS then I can find it at least. Here's the page in question
http://www.scales-chords.com/scalefinder.php
3 posts and 2 images omitted. Click View Thread to read.
>>
John Gedgechatch - Mon, 19 Dec 2016 11:04:38 EST bjMQSk50 No.36389 Reply
1482163478712.jpg -(208301B / 203.42KB, 1117x765) Thumbnail displayed, click image for full size.
>>36387
Here you go, other posters were right. Doesn't appear to be JS, just a standard form and GET submit to the same PHP page/script.

In this case, you won't be able to get the code for the actual processing of the form, as the PHP is executed on the server before you see the results. It's not like JS where you can freely view the source in your dev tools.
>>
Thankful OP - Tue, 20 Dec 2016 05:09:02 EST F+scHBch No.36390 Reply
Blast! It's PHP! And I would've gotten away with it too if it weren't for you meddling web-devs and your server-side scripts.
*shakes first*
*induces cringe*
*too far? probably*
/me kills self
>>
Ebenezer Goodfield - Tue, 20 Dec 2016 07:13:51 EST eKgr8qwE No.36391 Reply
>>36390
If you wanted to be a real scrub you could enumerate all possible inputs, write a script to try them all then scrape the results. The info is probably out there somewhere else anyway.

Just saw they have an 'API' [ http://www.scales-chords.com/api/ ] so maybe they are open to sharing the data with you? Email the guy who runs the site and ask.


ES6 is fucking retarded

View Thread Reply
- Tue, 18 Oct 2016 01:48:29 EST IWfbDUK4 No.36246
File: 1476769709316.png -(72298B / 70.60KB, 893x933) Thumbnail displayed, click image for full size. ES6 is fucking retarded
Since I know you're all script-faggots, what's the best way to get a Javascript job? Have all the nerds already taken them? Should I kill myself now that I've devoted over a year of my life to this twisted language? Thanks /prog/, go fuck yourself.
11 posts and 1 images omitted. Click View Thread to read.
>>
Ernest Crunkinforth - Fri, 16 Dec 2016 12:04:45 EST KPocSsNJ No.36376 Reply
>>36369
Why no, I do not want to opt in to someone's advertising opportunity. Thanks for asking.
>>
Beatrice Bunspear - Sun, 18 Dec 2016 11:46:00 EST +Ue5tBQC No.36382 Reply
>>36376
It's free real estate tutorials. Just use a disposable mail.
>>
Cedric Dashstodge - Mon, 19 Dec 2016 10:56:47 EST 6AJt8tju No.36388 Reply
>>36382
Are they better than the thousands of other video tutorials and books on the topic I can get without giving an email?

I doubt it.

Moving an object along a line in java w/ slick2d

View Thread Reply
- Sat, 17 Dec 2016 19:22:56 EST SWJfiJ9j No.36378
File: 1482020576040.jpg -(100637B / 98.28KB, 439x249) Thumbnail displayed, click image for full size. Moving an object along a line in java w/ slick2d
I'm trying to make a missile commander game.
When you shoot your missile, it spawns at it's starting x/y and needs to move in a straight line towards the co-ordinate where the mouse was clicked.
How would I go about generating a list of the x/y coordinates between these two points in a straight line?
Thanks in advance.
>>
Hannah Dockletit - Sat, 17 Dec 2016 19:38:00 EST WLOo3E7i No.36379 Reply
>>36378
given your starting point (x0, y0) and you mouse click point (xM, yM), you just take x percent of the starting point and (1 - x) percent of the ending point.

so a point 45% between your starting point and your mouse click would be (x, y) where:
x = (x0 * (1 - 0.45)) + (xM * 0.45);
y = (y0 * (1 - 0.45)) + (yM * 0.45);

depending how many points you need, just generate them in a loop.
>>
Betsy Donkinkare - Sat, 17 Dec 2016 20:00:37 EST SWJfiJ9j No.36380 Reply
1482022837040.jpg -(52373B / 51.15KB, 640x475) Thumbnail displayed, click image for full size.
>>36379
this worked really well! thank you!
have an ancap meme as a reward.

New to C++

View Thread Reply
- Mon, 12 Dec 2016 00:11:42 EST bQwdXCse No.36361
File: 1481519502615.jpg -(37105B / 36.24KB, 433x455) Thumbnail displayed, click image for full size. New to C++
I recently bought a "C++ for dummies" book and although some of the aspects are confusing I am able to write pretty simplistic programs and arduino code.

Anyone else new to programming? Any suggestions on books?
9 posts and 3 images omitted. Click View Thread to read.
>>
Killian - Sat, 17 Dec 2016 15:01:40 EST bQwdXCse No.36377 Reply
>>36373
Sometimes what you + just isn't financially what I want... That's why our group has declined to accept any gifts from stargate +ing technology builders...

Your technology, your wholes in time space are too dangerious and if some of you had it your way you'd be pushing other peoples buttons all day wishing someone would find an innocence body their only to death it while 100% space +ing rapid growth mutants beg for the space of moment 1 + praying that moment one never sees all the innocence rapidgrowth mutants death.

So what ever.
>>
Martin Sesslebury - Sat, 17 Dec 2016 20:35:57 EST V5hbNNkO No.36381 Reply
>>36377
Get off the Internet, Terry Davis. You're drunk and crazy.

Are "soft" tech jobs useless?

View Thread Reply
- Sun, 06 Nov 2016 12:02:44 EST RzCYRoD4 No.36282
File: 1478451764629.jpg -(85962B / 83.95KB, 958x1313) Thumbnail displayed, click image for full size. Are "soft" tech jobs useless?
tech companies, are positions like:
-> Project/program Managers
-> "User Experience" Designers
-> Scrum masters

Just fucking useless and meaningless compared to developers and engineers who do the real work?
8 posts omitted. Click View Thread to read.
>>
Cedric Grandshaw - Tue, 13 Dec 2016 07:29:17 EST 2SsDO2ou No.36365 Reply
>>36339
>My work uses waterfall
I would place money on this not being the truth, unless you work in defence.
The name 'Waterfall' was conceived by someone writing a book/paper saying 'hey, look at this (mostly) hypothetical shit way of working, no one does this, we do other things'.

Pure waterfall means that if you find a bug after you shipped, then that bug will never be fixed. LOL2BAD SUX2BU.
Agile is a set of rules that almost no one 'working Agile™' follows to the letter, but the basic gist is, plan a short piece of the larger work, do it, review how it went, then repeat the next bit until you're done or run out of time/money.

SCRUM is a proscribed set of meetings that help you 'be Agile™'.
Both are management techniques that don't really need non-developers involved but junior project managers are now called scrum masters to make them feel better about their worthless existence.
>>
Cedric Grandshaw - Tue, 13 Dec 2016 07:32:18 EST 2SsDO2ou No.36366 Reply
>>36339
>>36365
So I completely missed the fact you say you work in the defence/murder sector.
Still not strictly pure waterfall I'll bet. I used to train rocket/radar/C2 guys how to write good software. Mostly intelligent and decent people, shame they use their brains thinking of better way to kill people...
>>
Clara Tillingshaw - Wed, 14 Dec 2016 10:10:32 EST gA3E5l0l No.36367 Reply
>>36366
Somehow we have all the resources in the world to kill people better but when it comes to keeping them alive it is impossible to get funding. Humanity is in the middle a protracted mass suicide.

Advice?

View Thread Reply
- Sun, 20 Nov 2016 09:57:41 EST sRAnM3Nm No.36308
File: 1479653861545.gif -(10060B / 9.82KB, 200x200) Thumbnail displayed, click image for full size. Advice?
I think I may have come to wrong board but I am looking for advice. I want to get into the sysadmin field I have experience with Hypervisors and setting up VMs and setting them up for automation. I am really confident in my skills in a enterprise and other mixed enviroment setting but I don't have any formal job experience and an my resume looks pretty dismal.

It seems like most employers want a degree in a crazy field to get a entry level position, I'll be going for an LPIC, Network+/CCNA/RS and CCNA DC cert in a few days. Any tips for a guy shooting for a sysadmin job or a data center tech?
1 posts omitted. Click View Thread to read.
>>
Samuel Bittinghidging - Wed, 23 Nov 2016 15:19:14 EST 9QSfnS0r No.36312 Reply
>>36309
Pretty much, and you don't need a degree for sysadmin tasks, and certs are only worth something if you ace them and get apply for a job over the institute where you're taking the test.
The public job offerings are from people who don't have anybody doing their IT inhouse who want to get away from a third party service contract. Avoid them.

Try to meet somebody who has the position you want and try to get them to ask around for you if they're hiring.
>>
Fucking Dadgebury - Sat, 10 Dec 2016 00:18:48 EST rOfvwfN5 No.36358 Reply
>>36312
Will do I was thinking of trying to hunt for bars where people with these kinds of positions might hang out and try to make some friends. Maybe I should join a tech based slack chat or something for my area.

How do you deploy your python flask/django/whatever apps?

View Thread Reply
- Tue, 06 Dec 2016 11:57:07 EST gEtE4wNA No.36353
File: 1481043427275.png -(19604B / 19.14KB, 570x360) Thumbnail displayed, click image for full size. How do you deploy your python flask/django/whatever apps?
Right now, I spin up an EC2 instance, create a new user, install pip and virtualenvwrapper on it, make a virtualenv for my app, put environment variables in postactive, make an ssh key for the user, git push the code, pip install dependencies, create supervisord config file to run gunicorn in virtualenv (and celery or whatever if needed), configure nginx to forward gunicorn, then pray that I didn't forget a step.
I've been playing around with scripts and git hooks to automate some of the process, but I'm also looking around for existing deployment solutions.

Ideally I would just like to spin up a server from a template and be able to push the code up and get it up and running.

Heroku does this beautifully, but too expensive if you need more than a single hobby dyno.

How do you do it?
1 posts omitted. Click View Thread to read.
>>
David Favingstone - Wed, 07 Dec 2016 10:55:38 EST gEtE4wNA No.36355 Reply
>>36354
Definitely lots of options out there. I'm reading up on Salt right now, also Fabric.
I found this tutorial which is very similar to my deployment method, and the author links to a fab script to automate the process. https://github.com/realpython/flask-deploy

Looks like it gives you a lot of control over the process, since you're just writing a python script rather than filling out a config file. I've started using cookiecutter-flask for my latest project, so I might be able to include template supervisor/nginx/etc config files and a fab file in my project template.

I've been working from the mindset that I'm gonna need ssh access to the application user, so I was wondering how I would automatically generate a key-pair for it and copy the private key to my machine, since I won't have ssh access to it until I have the key.
But maybe I don't even need it, I'll always have a key for the admin user so I might just keep the git repo under admin's home and use the post-receive to set the work tree to app user's folder.

eh
>>
Jenny Honeycocke - Wed, 07 Dec 2016 18:02:26 EST uXHlOpBk No.36356 Reply
>>36355
Configuration is one of those things where the short path to the best practice is finding the right thing to copy/paste from.
>>
Edward Fubberlock - Fri, 09 Dec 2016 13:24:32 EST 9QSfnS0r No.36357 Reply
learn to use docker-compose, there probably is a ready made yaml file for flask,nginx,mysql, etc..
Has the advantage of being able to use the same tools in production and development, no need for virtualenv.
The only issue are unattended updates/updates in general but you can migrate that if you choose base images which are regulary updated and write your dockerfiles in a way that you can rebuild you images in production.

How to approach DSP

View Thread Reply
- Sat, 26 Nov 2016 11:16:55 EST 9QSfnS0r No.36315
File: 1480177015438.jpg -(158197B / 154.49KB, 1024x684) Thumbnail displayed, click image for full size. How to approach DSP
Do any of you have any tips in regards of how to learn DSP programming.
By that I don't mean architecture dependent idiosyncrasies or optimizations but learning to apply the theoretical stuff.
Things like
  • Digital Filters, IIR & FIR
  • Oversampling & anti-aliasing
  • Impulse Frequency domain transforms, FFT & co
  • Wavelets
  • Real time scheduling

Most of the theory out there seems to be written for people who have a math or engineering degree, or at least are working on one.
I don't mind if an algorithm is expressed via a formula if it's necessary but I'd like to see something where the math behind it is explained by example as well.
7 posts and 1 images omitted. Click View Thread to read.
>>
Nathaniel Hoshcheck - Wed, 30 Nov 2016 20:43:16 EST gA3E5l0l No.36347 Reply
>>36346
You really do need a lot of advanced math to tackle most nontrivial differential equations. No one was trying to hide anything from you. It takes years to master the prerequisites and your teachers may not have even known enough about it themselves.
>>
John Dartstock - Wed, 30 Nov 2016 22:04:55 EST US9Lx3Qr No.36348 Reply
1480561495496.png -(25309B / 24.72KB, 1000x460) Thumbnail displayed, click image for full size.
>>36345
The counterfeit looking copies are international versions for markets where an $60-80 book cost is prohibitive. I paid $30 for one in school and was pretty happy considering I paid 80+ for about 4 books in a normal semester. It had cheaper paper and was not hard cover but that wasn't an issue for my use. Here's what I had
http://www.ebay.com/itm/New-Signals-and-Systems-by-Oppenheim-2ed-INTERNATIONAL-EDITION-/122196355379?hash=item1c73786933:g:hlkAAOSwT5tWIwk2

If you have an ebook version go with it. It's your decision whether or not a paper copy is worth the $20. The information is the same.

> 'Signals and Systems' seems to generally point to more interesting stuff than 'DSP'. ;)

It's a general book that is designed to give the reader an undergraduate level understanding of the subject in the title. It covers both continuous and discrete domains. It pays particular attention to linear time independent (LTI) systems because all kinds of neat things happen to make your life easier when you assume your system is LTI. All of the stuff in the OP is LTI. Not sure about wavelets but I think so. I haven't messed with them. If you understand that book you'll have a good foundation to build on in any application you want to get in to in signal processing. That's not to say you'll know everything you'll need to know but when you go to learn about a specific application you're going to need 90% of that book unless you're just copy and pasting stuff code or dropping in libraries.

>>36346
>I do, although probably a bit rusty.

That's okay. You can review as you go but largely what you need is things like an integral is an area under a curve and a derivative is a rate of change. Your signals aren't usually going to be well defined mathematically but if you amplify a signal by 2 and then integrate it you should know the result is going to be twice the integral of the original.

I'm not sure who you're referring to as they but usually things like
>You won't understand that, it's only for college.
mean I don't know or I don't have time to spend a couple hours with you every day for a few months to cover the prerequisites. While solving a differential equation is a useful skill in analysis there are many forms and methods. I've seen multivolume collections dedicated to methods of solving differential equations. I don't think there's one guy who knows them all. What happens is you run in to one and you research how to solve it. You can pick up an undergrad diff eq book and get the most common ones. You'll probably want Calc 1 and 2 down pretty well before that. I recommend a combined linear algebra diffy eq book for engineers so you knock out both at the same time.

However the implementing DSP solutions often doesn't involve a lot of symbolic manipulation. A FIR filter performs a convolution(integral of one signal with a time reversed version of another signal where the signals are shifted relative to each other in time as a function of time) between the impulse response of a filter with the desired response(found by performing an inverse fourier transform of the desired frequency response). Sounds complicated right? Well all you do is draw the desired response and do a fft on it and then truncate it to the number of samples you want. Basically this means call fft in octave on a matrix representing the response. This is a tradeoff between fidelity to the drawn response and computational complexity. Now reverse these, because convolution reverses one signal, and you have your coefficients. Now you do pic related. Z-1 is a delay of one sample. Triangles are multiplication and sigmas are addition. There's an art to choosing the response and coefficients and googling fir filter design will give you some methods. The tradeoffs will be apparent once you understand that book and the google results will make more sense too. For example if you want a steeper slope you'll need more coefficients which means more math for your processor to do or more transistors in your asic. If you want phase linearity you will need to arrange for the coefficients to be symmetric which means more coefficients for a given design goal. You'll learn the art by playing with stuff and you'll know what you're playing with by knowing what's i…
Comment too long. Click here to view the full text.

New to js

View Thread Reply
- Sun, 02 Oct 2016 16:36:03 EST OijTI/50 No.36220
File: 1475440563324.png -(23416B / 22.87KB, 909x505) Thumbnail displayed, click image for full size. New to js
Hey /prog/

Can you help me out? I don't understand why this global variable won't change.
I want the user to change it through a pop up window, but when calling it in the main window, it says undefined.
3 posts omitted. Click View Thread to read.
>>
BrU - Sun, 27 Nov 2016 15:08:43 EST OEFE9/xF No.36330 Reply
//Try declaring the variable like this.
var TEST=0;

Setup free online database and site?

View Thread Reply
- Wed, 31 Aug 2016 00:26:51 EST x5udGzon No.36083
File: 1472617611556.jpg -(75412B / 73.64KB, 544x298) Thumbnail displayed, click image for full size. Setup free online database and site?
So I'm working on a to do list app project with some friends. It's just going to be for pc, and it's just a personal project. We're thinking that it'll run from a web site.
I'm hoping you guys can point me towards the easiest way to do this for free. I figured we could just send stuff to something like dropbox or gmail, and then have the program retrieve the data from there? Is there any other online database that we could use for free, or would it be easier to just setup are own server? Also, is there any free service that would let us put up a page for the app, or would it just be easier to write a desktop program for the app?

Thanks for any help you guys can offer, we've never done anything like this before. Hope I've made what I'm asking about clear.
6 posts and 2 images omitted. Click View Thread to read.
>>
Edwin Hepperwater - Thu, 01 Sep 2016 12:14:52 EST oD19VABU No.36093 Reply
Use pythonanywhere.com, you get a free python web host+mysql database. Use flask and sqlalchemy to build your web backend and database stuff. There are tutorials on that stuff all around, enough to get you started. Flask comes with the jinja2 templating engine to make your html, add some javascript if you want things more interactive.
Ask questions for any specific problem you run into...
Happy hacking.
>>
Fucking Fiblingmod - Fri, 02 Sep 2016 14:20:48 EST aJAX07lc No.36098 Reply
>>36091
You can use a flatfile for a database, but you'd have to have a very good reason to.
https://en.wikipedia.org/wiki/Flat_file_database.

>So I'm working on a to do list app project with some friends.
OP, if you just need a todo list use Wunderlist. If you want to make a todo list AS the project look at cheap MySQL and PHP hosts for something quick and dirty.

Send SMS through Python?

View Thread Reply
- Sat, 14 Nov 2015 16:41:32 EST 7tlwV1lw No.34829
File: 1447537292602.jpg -(57138B / 55.80KB, 640x449) Thumbnail displayed, click image for full size. Send SMS through Python?
I have been trying to code a text messaging program, for when I don't have a phone. I have so far experimented with smtplib and such, but it just doesn't work..

I have used this example from this page
http://alextrle.blogspot.com/2011/05/how-to-send-sms-message-with-python.html

I have managed to send through my gmail account, but not with the program script? Am I missing something. My code looks just like the one there. Nothing happens though.
2 posts omitted. Click View Thread to read.
>>
Basil Pittspear - Sun, 15 Nov 2015 16:50:40 EST en0VEAtu No.34832 Reply
Python you can just put a wrapper around C functions, and the SS7 API only has a handful of functions to implement which is what you want, a Signaling System 7 stack. Beware these are wide open to abuse to secure it properly

Report Post
Reason
Note
Please be descriptive with report notes,
this helps staff resolve issues quicker.