/dpt/ - Daily Programming Thread

What are you working on, Jow Forums?

Last thread:

Attached: 1552578634292.jpg (1280x720, 602K)

Other urls found in this thread:

tutorialspoint.com/cplusplus/cpp_polymorphism.htm
github.com/boyEstrogen/Anime-Girls-Holding-Programming-Books
stackoverflow.com/questions/23404403/need-to-convert-h264-stream-from-annex-b-format-to-avcc-format
bans.verniy.xyz
github.com/ECHibiki/Bans.Verniy.xyz-Modern/blob/master/CronJobs/ripper.php
github.com/ECHibiki/Bans.Verniy.xyz-Modern/blob/master/Scripts/TableFunctions.js
techcrunch.com/2019/05/07/kotlin-is-now-googles-preferred-language-for-android-app-development/
better-dpt-roll.github.io/
youtube.com/watch?v=9RgxPHis74g
twitter.com/NSFWRedditGif

First for Java

Get out

Attached: nail.jpg (1080x1105, 459K)

Second for fuck anime

Been writing JavaScript all day and I am loving it!

Attached: 3b9f4291794dd3c7f2d3e9fb257e3c1b.jpg (736x1104, 90K)

Show us the fruits of your work

alert("result: " + document.getElementById('test'));

>not using jquery
this fucking code sucks

>not using jquery
I want to fuck you now, user

Can I have a function return different class objects with polymorphism in c++?
Something like

objectOne testFunc (bool con) {
objectTwo o2;
objectThree o3;

if (con)
return o2;
else
return o3;
}

int main() {
objectOne o1;

o1 = testFunc(true);

return 0;
}


Objects 2 and 3 are derived from object one here. Is there a way to make this work? I've tried several different things but I'm too dumb to make it work.

God, I want to lick Chio's fingers

Meant to make it objectOne *o1;

You have to use pointers.

How do you call attention to your open source projects or contributions in a CV?
Should you just link your github? The quality of projects I've been associated with varies a lot (not least because I've learned since) and I would prefer they look at a few specific ones.
Is there's some common pattern people employ?

tutorialspoint.com/cplusplus/cpp_polymorphism.htm

Link your github/gitlab or whatever, but also specifically mention the contributions to what projects you've made as well. A recruiter isn't going to spend any amount of time actually digging through your profile to see what you've done, and a lot of people have some pretty throwaway crap in many forgotten repositories. Direct them to what you actually want to show off.

I hate this hobby!

I'm collecting browser information and putting it into a database. I'm kind of confused on if I should take the extra time to optimize it.

Here's what I mean. I get a user agent string, I put it into a library that will parse it for me, and I get an object with something like
{ browser: { name: 'Chrome', version: 'REDACTED' },
os: { name: 'Linux' },
platform: { type: 'desktop' },

When I go to put it into a table, should I take the extra time to make a key value pair? What I mean is, if I have 10.000 visitors and I collect their info, should I create another table like

1: Linux
2: WIndows
3: Mac OS

and then record using the primary keys?

DATE --- OS
Today 1
Yesterday 2
Today 2
Tommorow 3

Certainly this would be more efficient. Am I prematurely optimizing this? Should I just store the information as varchars?

DATE --- OS
Today "Linux"
Yesterday "Windows"
Today "Windows"
Tomorrow "Mac OS"

If I were to store that in a database, it would be a single table. A user agent is a single thing, instead of splitting into 3 categories.

browser, browser_version, os, platform

Come over here and sit on my lap, so we can do something you'll love even more~

Trying to switch to Premiere, i always used Camtasia Studio 8. Tried Sony Vegas 10 and it doesn't convince me at all, Premiere seems pretty neat btw.
Any recomendations Jow Forums ?

none of that is programming
>Any recomendations Jow Forums ?
ask another thread or board.

>>not using jquery
based

>What are you working on, Jow Forums?
I am working on converting h264 avc to h264 annex b. I finally have some video output. I am getting closer!

Attached: moin.png (1296x994, 193K)

Just use the industry standard. So yes, use premiere.

>I finally have some video output.
good work user
Are you literally writing a "parser" for the h264 format in kotlin?
Sorry, probably not the right word, but don't now what else to use, not familiar with video formats/encoding beyond usage of ffmpeg

if( argc

b8

No, if argc is 1 then argv[1] is out of bounds.

but if argc is JLE, it will trip the condition and the second conditional won't execute, right?

also, forgot argv[1] should be *argv[1]

>||
Oh I see, I fell for it.

Is that part of the C++ standard? I know it's the case in Java, but not sure if in C++ it's compiler specific.

Yes, it parses h264 network abstraction layer units. Then it turns the byte stream from avcc format to annex b format

Attached: moin2.png (1108x856, 207K)

alright, that's actually really fucking cool, and it's far better than anything I could do
How are you going about doing this? Just looking at the h264 format/spec and trying to comply with it?

github.com/boyEstrogen/Anime-Girls-Holding-Programming-Books

Which one of you is this?

Attached: 1476152471818.jpg (599x440, 32K)

Short-circuit is in the standard.

I don't think it's anybody from here, if he is he's missing a lot of images.

>How are you going about doing this?
Googling any time I want clarification. h264 is really well documented. AVCC vs Annex-B is not that big of a difference. stackoverflow.com/questions/23404403/need-to-convert-h264-stream-from-annex-b-format-to-avcc-format

>llvm.moe
Nice

Attached: cover.jpg (600x765, 589K)

>tfw it is too nice outside to program

>github.com/boyEstrogen/Anime-Girls-Holding-Programming-Books
Discord tranny by the username.

take your laptop to your weird outdoor activities, or just close the blinds.

Attached: 1535872384040.jpg (417x500, 37K)

Cute

But I want to enjoy nature and bask in the beauty.

I suspect this is why Seattle software companies kick the shit out of California ones.
>dude, let's just ship it in JavaScript amd go surfing, brah
vs.
>oh Christ, another three weeks of rain, might as well finish optimizing this inner loop in assembly

Practicing monads. Is there any way I can write this in a nicer way?

verify :: Digit -> String -> Maybe String

verifyNumber :: String -> Maybe String
verifyNumber xs = do
x1

you can do both, rms is a good example of maximum NEET.

Attached: 1527441284353.jpg (2272x1704, 1.38M)

Is that Stallman's home?

What are some interesting beginner projects to do on Java

yep

if you want a challenge you can try uninstalling java

That man is a legend.

i lied tho

No, he lives the perfect NEET life. Shitpost all day while travaling and get praised by people who like free software.
He has a better life than Bill Gates, it's not money.

Attached: 1534753753605.jpg (3720x2800, 3.59M)

at least bill gates isnt a virgin

How could you?

Cancerous marketing material for the gambling industry that makes me want to cry (one-time use landing pages, interactive applications, games etc).

I don't even have the balls to code my own stuff any more. Someone help me.

>I stuck penis in vagina once
good job, but it doesn't compare to the comfort of maximum NEET life.

Attached: 1532294381227.png (800x1000, 128K)

Bill Gates is technically a NEET too, I doubt he's employed

please I'm trying to get good at this language

Ask for a contract negotiation and then ask for less hours instead of more pay. They will be relieved they don't have to shell out. Tell them software developers are more productive with less hours. It's a tough market for employers so you have leverage.

I was going to try re-implementing (a subset of) bans.verniy.xyz
like, I probably don't care about having a fancy website/interface, or SQL dumps
from what I can tell, most of the "heavy lifting"/actually important stuff happens in github.com/ECHibiki/Bans.Verniy.xyz-Modern/blob/master/CronJobs/ripper.php and github.com/ECHibiki/Bans.Verniy.xyz-Modern/blob/master/Scripts/TableFunctions.js right?
are there any other "important" files to look at?

even google is moving away from it
techcrunch.com/2019/05/07/kotlin-is-now-googles-preferred-language-for-android-app-development/
only purpose to learning java is if you want to be an enterprise codemonkey streetshitter
you're better than that, user

Technically is the word, he doesn't seem to enjoy the NEET life, it's closer to retirement.
His microsoft foundation is closer to NEET life, just a very rich NEET that has nothing to do with his money.

Kotlin is shit, I will have a list of arguments to support this soon.

I recently got a 4k pay rise and it still didn't do the trick.

I get you though, three people have done exactly what you said in the past 3 months so I think I missed the boat.

I didn't ask for your opinion, I asked for programming projects fit for a beginner

Not him but I also have an opinion about this

java sucks

my opinion is that you should write your project fit for a beginner in a different language
anyway, better-dpt-roll.github.io/
pic rel is probably not up to date, I found it on google
if you do use pic rel, do not reply to this post and shit up the thread - there are plenty of ways to get a random number

Attached: 1503204756939.png (1450x1080, 378K)

+1 / Like / Love / Heart / "This helped me"

>trying to get asm and then execute it in my own program
>for some reason opcodes i.e. 0x0 / 000000 are somehow used for multiple ops
Just doesn't fucking make sense, why on earth would you give a definition more than once? and how does a system even differentiate them reeeeeeee

Attached: ka4.jpg (1024x576, 70K)

Here's a more recent version

Attached: Challenges.png (3840x2160, 1.61M)

What are the recommended resources for learning Kotlin?

Acid

public toilets

Learn.kotlin.ru

sasuga /dpt/

Don't do this one, it's retarded and nothing good will come from it.

Jow Forums police

All decent advice. Android Studio will convert Java to Kotlin for you.

Attached: kotlin7.png (642x597, 183K)

I've done acid at least 20 times, it's garbage. Stop, drugs are bad,

Attached: 1549041031060.gif (269x270, 387K)

if its garbage why did you do it 20 times

because I'm a retard.

I did the Helsinki MOOC for Java and I started the Princeton Algorithms course on Coursera. What are some personal projects I could be working on at this time? And any recommendations for what to learn after a data structures/algorithms course?

Attached: Pieter-Bruegel-Netherlandish-Tales-Dutch-Proverbs-detail-47.png (750x746, 410K)

Not him, but I kept doing acid even though it was horrible for me because I kept believing "next time, I'll have a good trip". Bad idea.

not a dick measuring contest because i'd probably lose but

it's not that bad

for the love of god somebody give me a nonsense hobby project. Not "build a raytracer!" or whatever, make me write a statically typed python compiler or something.
I'm so fucking bored doing my thesis I need something that I can always go back to and just fiddle with

so you never had a good trip?

Was the same for me with weed. Now I only drink, I know it's not healthy but at least it actually feels good.

Browser, but written in COBOL

I'm 21, almost 22, and I've never, ever, EVER tried out weed or any kind of drug. And I've never had any problems. You should learn from me.

Implement a borrow checker for C

That defeats the performance of C

good static types > dynamic types > bad static types

what the fuck are "bad static types"

java

>What are you working on, Jow Forums?
Trying to decide how complex to make a self driving car and how to go about implementing it for an embedded systems class.

go

Not really, no. Shrooms were better.

It ruined weed for me, too, and just before it got legalized here unfortunately.

You can follow russia's model and make a line following bot. youtube.com/watch?v=9RgxPHis74g