old thread: What are you working on, Sup Forums?
/dpt/ - Daily Programming Thread
Other urls found in this thread:
pastebin.com
lmgtfy.com
%s'
twitter.com
i'm writing a better FTP
NEP-chan is emerging!!
Se ya later, anons
working on a rogue-like game with [spoiler]pygame[/spoiler]
Why are programmers here such pedophiles?
I was just asking how I could run a function in a thread and get a return value on n objects, the algorithm itself isn't too important.
Writing some installation instructions since someone asked for my repo.
>mfw I don't know how to deploy
I made a simple z0r downloader in Python.
Loved some animations back then and flash is dying, sooner or later the site will go away too, so might as well make some backups...
Return a Task value, there's two chapters on the book Visual Studio 2013 Step by Step about Async methods that will help you.
I actually had problems saving an exception form a async method, might be careful with that (solved it by passing a wrapper of an exception and handled it locally).
Do you want all the results at the same (delayed) time, or all the results asynchronously? (delayed by different amounts)
Finished my brute force tool written in python
Began working on a twitchplays-esque game with bitcoin prizes
Thanks user!
I just want it to return a value whenever it's done- So the program waits until the object is done finding its path, and then it calls the initialization method without locking shit up while it's calculating
OP here, fixed up the font a little bit.
Keeping a windows VM just for photoshop is a pain tho.
What language are you using?
C#
I'm playing with delegate methods now, not sure how it'll go because the delegate method needs to be static
I like OP's more it looks more cute.
maybe you're right
>why do programmers on an anime website like anime?
How do i do this with my arch?
Not everyone who likes anime is a paedophile
Why would you want to?
Pedophilia *
Is it possible to delete cookies/cache from outside Firefox via a script while Firefox is running?
>Not everyone who likes anime is a paedophile
Yes they are, fucking disgusting loli pedofags. You should all be jailed before you act on your desires and rape some 5 year old.
All cache, cookies, localStorage, etc are stored in a folder on your computer.
You can simply delete the folder.
Wrong thread?
>download awesome wm / vicious
>rice
I've been debating on what kind of project I want to work on for the summer. I've got a list of a few things I'd like to work on, but... still not sure.
Could anyone give me a bit of C# help?
On line 14 I'm getting the error error CS0236: A field initializer cannot reference the nonstatic field, method, or property `Packet.PathfindingDelegateHandler(int[])'
even though I'm not using anything static so it should be functioning
pastebin.com
It should be a fairly easy fix, I'm just shit at delegates
What the fuck is a delegate?
Those people coming to Cleveland.
Is Idris ever going to reach non-meme status as a language
Maybe.
Could it be that the signature of the function doesn't match that of the delegate? (int[]/int)
Ah, yes, that was a problem, but not /the/ problem apparently
Now that I've loaded it into visual studio instead of MonoDevelop, I'm getting that same error on line 4 instead- It appears that I can only set the Delegate to a static function for some reason. Does anyone know why this might be?
Why have these threads been slow as fuck lately?
It's 4:30 AM
>programming an Excel macro for my dad
>forced to use Visual Basic for Applications
>trapped inside a 20 year old IDE
>spend 70% of my time Googling, 29% debugging, 1% writing code
>error messages are useless
>doesn't even tell me which line the error is on
Will Microsoft ever let me program macros in C#? Or VB.Net at the very least?
>why do programmers on an anime website disproportionately like shitty pedophile and/or closet homo bait anime when there is other anime?
nullpo
>nullpo
What did he mean by this?
What are some "acceptable" animes, according to you?
Nice girls
...
Fucking pedophile.
Nurupo
Nurupo ( Nurupo , NULLPO ), the programming language is Java in, processing abnormality (when that occurred exception is one of the messages to be displayed on the) java.lang. NullPointerException abbreviation of (or NullPointerAssignment). Anonymous bulletin board 2 channel of programmers plate is the birthplace [1] .
What subs are these?
just made a comfy python script to open my router's IP address in the browser
#! /usr/local/bin/python3
import re
import subprocess
import webbrowser
process = subprocess.run(['route', 'get', 'default'], stdout=subprocess.PIPE)
stdout = process.stdout.decode('utf8')
router_ip_regex = r'gateway:\W*(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})'
search_result = re.search(router_ip_regex, stdout)
if search_result is None:
print("gateway IP pattern not found in route output!")
router_ip = search_result.group(1)
webbrowser.open('%s' % router_ip)
How is this useful?
Yeah that's write, just import every single non-trivial aspect of your program and then pat yourself on the back because you think you "made" a python script.
There's so much wrong with this I can't even begin.
But that is how you make a python script
literally what
come back and teach me if you ever figure out where to begin
I really really like this picture
Do you mind if I save it?
Well for one, you can't call a method on a None data-type.
if search_result is None:
print("gateway IP pattern not found in route output!")
router_ip = search_result.group(1)
If search_result can be None, then you will call a method on a None type.
literally anything other than what i mentioned. i just find it weird that people on this board don't tend to have more discerning taste and/or blissfully and unashamedly consume degenerate boner bait and try to pretend like there's any real quality to it. of the ones i've seen, anime i've thought were genuinely good have been few and far between, but you can bet your ass none of them have been about sexy children or girly boys because, surprise surprise, a show that focuses on things like that don't have their priorities in order to do anything respectable or memorable
ah you're right, i forgot to exit because i originally was going to raise an exception there but decided against it
Feel free to save it
Honestly, you'd be pretty hard pressed to find any anime worth watching that doesn't feature cute anime girls in it.
Why are you so angry tho?
Also at the header of the file, most people typically use
#!/usr/bin/env python
but this is just preference to automate finding Python.
Where can I find a programming mentor?
you can also query the network manager daemon via dbus for this
A university.
Pretend you're a girl and give a skype, I'm sure anyone will go head over heels to try to mentor you in programming.
i'm not angry, just confused. and yeah, no shit. most films star attractive people, but the focus of those films is not upskirt shots and the like, because a film with a focus like that would be terrible. i'm just glad other countries haven't bred themselves into widespread autism and pedophilia like japan apparently has or i'd have nowhere to go for good media
>i don't like cute girl anime
>STOP LIKING WHAT I DONT LIKE
Have you ever stopped to consider you just have shit taste?
good or not, at least i have taste to speak of. anything that rides on sex-based fanservice has "quality" objectively equivalent to that of porn
So I'm going to do contract work, and I don't know how to price it. I don't want to bill hourly, just have a price for the project.
Multiply your desired hourly rate times the number of hours you expect to spend on the project.
>So I'm going to do contract work, and I don't know how to price it.
Break the task down into parts, and figure out how long each will roughly take. Double that. Multiply by a reasonable hourly rate.
You seem fixated on the idea that cute girl anime has no merit and can only exist as a series of sex-based fanservice scenes.
Maybe you're the pedophile here.
more like twice the number of hours you expect to spend, because that's probably closer to what it will end up being
thanks, i had seen that before but didn't understand what env was until i looked it up just now
is my method naming scheme and method chaining idiomatronicly pythonic and simply epic? downloads youtube videos
if video.is_not_in(path):
video.download_to(path)\
.then_encode(in_new_thread=True)\
.and_remove_unencoded_file()
It's okay, you'll pick up more as you see more. We all started somewhere.
fuck you cannuck.
me too, but using JavaScript instead
yeah, i think the reason i've got that idea in my head is because that's what it is. that or it's some high school slice-of-life bullshit where nothing happens, which is also without merit
oh lord
Okay, I was thinking of having some overhead, but double hours makes sense. I mean technically I can charge more since it's contract work and not employment. I'm mostly worried because wages for programmers are garbage here, despite being in the US.
Not the same without the audio desu
Blue board faggot.
Leave it to a fucking anti-anime poster to post something like this
Pygame's fine. It's got some flaws, but it's not terrible like some people seem to think it is.
Are you using the stable version or the latest?
>but double hours makes sense.
You double the hours because for every hour you actually spend programming, you'll spend another hour on pointless bullshit, like trying to explain what the client wants to the client (don't ask why).
>igh school slice-of-life bullshit where nothing happens
Nice try.
You should research things you know nothing about before you try to flame people on the internet.
Better than fucking a 5yo boy you filthy pedo
>playing jrpg's
Can you talk about programming instead, you dumb anti-anime autist?
type 'sudo rice'
when the 'faggot?' prompt appears just type 'Y'
stop posting your fucking anime then kid
How can I run something on the main thread once a background worker triggers a .RunWorkerCompletedEventHandler event in C#?
When I try to call a function directly in the event, it runs it in that worker's thread. I want the worker to return a value and then call a function in the main thread.
Please point to the posts in this thread, or any of the last several threads, where people talk about anime and it wasn't instigated by you.
nice try yourself. i know exactly what i'm talking about. i've seen far more anime than i ever thought i would and i have quite a few autistic friends who between them have literally seen it all, and i've picked up quite a bit from them because they're autistic and talk about that shit to people in real life. i get recommendations from one of the slightly less autistic ones because he knows i won't settle for filler-riddled fanservice bullshit and he really has to rack his brain
i.e. there isn't any.
The more you overestimate time the less competitive you are
You're on the wrong website faggot
This isn't reddit you fucking weaboo
>The more you overestimate time the less competitive you are
I don't follow. My point wasn't that you should overestimate how long the job takes, my point was that only half of the time spend on that kind of work is actually spent programming.
If you're not gonna fucking integrate then you've gotta go back, cunts. You're continuing to disrupt the thread by posting off topic rhetoric that is antithetical to the very nature of Sup Forums.
I mean if you say it'll take you twice as long as it actually does, that means you'll charge twice as much, making yourself less competitive. You can always practice completing programming contracts to get better at estimating the time.
>I mean if you say it'll take you twice as long as it actually does
That's not what I'm saying though.
I'm saying that estimating how long a job takes based only on how long the programming will take isn't realistic.
Yes, but 2x is quite a significant overestimate
I suppose the answer to all these issues is just experience
EAT SHIT YOU FILTHY WEABOO PEDOPHILE
I hope they castrate you when they find your kiddie porn
Tens of millions of people watch anime
Sup Forums will continue to be an anime website indefinitely, and you know it