[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y ] [Home]
4chanarchives logo
/dpt/ - Daily Programming Thread
Images are sometimes not shown due to bandwidth/network limitations. Refreshing the page usually helps.

You are currently reading a thread in /g/ - Technology

Thread replies: 255
Thread images: 35
File: 1448690262398.png (1 MB, 958x598) Image search: [Google]
1448690262398.png
1 MB, 958x598
CAN'T STUMP THE TRUMP edition

https://www.youtube.com/watch?v=MioIksr8i00
https://www.youtube.com/watch?v=lYa-uHoW8T8

Previous thread at >>51921251

What are you working on, /g/?
>>
First for Java
>>
Master's degree in computer science.
>>
File: g.jpg (512 KB, 3360x2100) Image search: [Google]
g.jpg
512 KB, 3360x2100
Calculator now supports 7 background colors and 2 keyboard colors, I plan to put 10 different colors on both.

Then I will move to the landscape mode with more functions, shit will get real.
>>
File: 2015-12-18_13-30-38.png (62 KB, 932x694) Image search: [Google]
2015-12-18_13-30-38.png
62 KB, 932x694
>doing khan academy coding
>this happens
???
>>
>>51928179
lel
>>
In a maths lecture.

Ready to go home.
>>
File: 2015-12-18_13-37-20.png (55 KB, 932x652) Image search: [Google]
2015-12-18_13-37-20.png
55 KB, 932x652
>>51928179
I feel like they may not be teaching the best coding practices here.
>>
>>51928076
Shoulda done math instead desu senpai
>>
So are nano degrees worth it? I heard google will consider them when applying. I've self studied a lot of CS but lack a degree.
>>
>>51928236
>javascript
>meme academy
no shit
>>
>>51928260
You aren't going to get a job at Google unless you have a real degree or a really amazing portfolio (like you wrote your own complete OS/kernel from scratch that's actually somewhat useable on a daily basis).

For regular programming jobs just bullshit about your work history and you'll be fine.
>>
>>51928310
I've been "professional" for almost 4 years now. I'm out of a junior role and now a full developer. Switched companies, and I'm helping my current move to git version control from _nothing_.

Issue is I don't have a degree. Job hunting without one is a huge pain. Getting one is a bigger pain -_-'
>>
Neat. I haven't slept a wink and my shell script solution to one of those advent puzzles looks like it might be lisp to my tired eyes.
#!/usr/bin/fish

#this expects the input in a file called 'input'
echo "Part 1:"\
(math (wc -c input | sed "s/ .*\$//") -\
(sed "s/^\"//;\
s/\"\$//;\
s/\\\\\\\\/#/g;\
s/\\\\\"/#/g;\
s/\\\\\x[0-9a-f][0-9a-f]/#/g"\
input | wc -c))

echo "Part 2:"\
(math (sed "s/\"/##/g;\
s/\\\\/##/g;\
s/^/#/;
s/\$/#/"\
input | wc -c)\
- (wc -c input | sed "s/ .*\$//"))
>>
>>51928344
Really? If you have 4 years experience then most companies will at least look at your resume. Companies need programmers pretty badly still. Most don't care about degrees, except obviously places like Google/Facebook/etc.

A lot of start-ups don't care about formal education, too. If you moved to CA you'd have a dozen jobs lined up within a week.
>>
do ajax requests count towards adviews?
was thinking of adding a couple of hidden ones to the company website to make requests towards one of my ad riddled pages
>>
File: lel33.jpg (81 KB, 1280x720) Image search: [Google]
lel33.jpg
81 KB, 1280x720
>>51928359
> start-ups
>>
>>51928359
I've actually interviewed at a lot of startups. I just don't know ruby/javascript at all (which seems like the only languages they hire for). Most my work is embedded C or high speed Data Acquition applications. So I'd feel completely out of my element in an app/web roll.
>>
>>51928179
> dumb leaf poster
>>
>>51928362
Just embed some iframes. If you're committing fraud might as well go all the way.
>>
>>51928359
>Most don't care about degrees, except obviously places like Google/Facebook/etc.
if you have work experience then sure, but its really hard to get a job without either education or experience, even with plenty of projects in your portfolio
>>
To contiue from
>>51928399
This DESU
>>51928383
The most likely scenario is I'll get stranded in the Bay Area without a job attached to a failing company trying to pressure me into taking a lower salary.
>>
>>51928399
If you know C you can literally learn Javascript in a day. Most places don't write Ruby, they write Ruby on Rails which is a scripting language for children, and trivially learnable in a few hours. Memorize a list of 2015 tech buzzwords and you'll be fine.

Just make sure to emphasize that you're "back-end" so you don't get stuck with doing any design work.
>>
>>51928399
just do it m8, a job is a job and with decent workbuddies even a shitty job is fun as fuck
i got hired for backend web in aspnet without jackshit about anything besides basic html, css and a little django with python
>>
>>51928425
If I styled my facial hair and got a nice checkered shirt and some tight jeans and burst into the room doing a little piourette shouting "i am a full-stack webdev" would I get a job?
>>
>>51928463
wear a skirt and say you're a womyn
>>
File: neckbeardgame.webm (714 KB, 640x368) Image search: [Google]
neckbeardgame.webm
714 KB, 640x368
Ask your beloved programming literate anything.
>>
>>51928468
you're a genius
>>
Hello /dpt/

Mind helping me in some DB design today?

I'm designing Client models which holds personal information and all that good stuff

Im planning on sticking a one-to-one from Client to Personal info, the latter holding the clients personal information

Yay or Nay? Thoughts? SQL wizards welcome

Pic related, my tables in Python SQL alchemy
>>
>>51928468
So to summerize:
1) Become a transmale proud womyn
2) Learn Javascript
3) Build a webscale site with RoR&MongoDB
4) ???
5) $$$
>>
>>51928508
you're gonna be hosting TEDx about how "girls can do it too" before you know it
>>
Is Unity for gays? Will I get bullied if I make a game in Unity?
>>
>>51928507
I'd do something different, but your way is simpler and easier to read/query.

I'd make a table specifically for Client ID's, then use each as a foreign key in several other tables of data that were grouped based on relevance to each other. (So things like Residence, Name/title, Payment_Options, etc would share their own tables. Address, City, State would be in residence, etc.)
>>
How can I compile a C++ program that will execute on Windows 95? I need to compile a program for Win95/98 for reasons
>>
>>51928155
>>>/portugal/
>>
>>51928594
Thanks your input

Your way seems more complicated, but has the advantage of being more normalized and compartmentalized.

client_information = db.Table('client_information',
db.Column('client_id', db.Integer(), db.ForeignKey('client.id')),
db.Column('residence_id', db.Integer(), db.ForeignKey('residence.id')),
)

class Client(db.Model):
id = db.Column(db.String, primary_key=True, default=generate_short_id)


class Residence(db.Model):

id = db.Column(db.String, primary_key=True, default=generate_short_id)
address = db.Column(db.String)
city = db.Column(db.String)
state = db.Column(db.String)
>>
>>51928679
Are you doing this for a personal project or are you doing this for your work? If it's not a personal project ask your department head or somebody about what they'd like.
If this is your own app or whatever then obviously go nuts, format it however you want.
>>
>>51928592
Yes. Unity is literally drag 'n' drop for babies. No serious dev uses Unity. Write your own engine, in C or C++.
>>
>>51928735
Yes, serious game developers start an entire game engine from scratch and use no tools whatsoever.
>>
what happens if your function uses like 4 cache lines worth of variables? does it turn performance to shit?
>>
>>51928733
In my personal experience though, it's a lot better to compartmentalize. Having user, then all their data in one area seems odd to me, but if that's how you want to do it then do that. SQL database formatting is mostly a matter of taste, just usually you have to tailor it to other people's taste rather than your own.
>>
>>51928592
Yes

Use unreal engine.
>>
File: huezillian.jpg (90 KB, 480x640) Image search: [Google]
huezillian.jpg
90 KB, 480x640
>>51928669
Actually I'm huezillian.
>>
>>51928507
Shit, son.

Build your DB in something like SSMS or Workbench and manipulate with code.

one-to-one on personal info is fine, but you might as well just include the information within the client table.
>>
>>51928592
Unity is fantastic. Very easy to use, or you can go elbow deep.

Main pro is that is runs on fucking everything.
>>
>>51928592
yes. unity isn't even any good. you're literally better off making your own engine because unity really doesn't bring much to the table. the few examples that unity shills bring up as "good" still have a ton of custom code and may as well have been developed using another engine. at least use something less shitty or fuck off to >>>/vg/agdg
>>
>>51928759
Why do you care?

Are you calling it millions of times?
>>
>>51928766
And a weebshit. I'm so sorry.
>>
>>51928733

For work, but I'm the one and only developer so only I should be seeing the code. Management doesn't care as long as their business requirements are met.
>>
File: Screen8.png (153 KB, 800x600) Image search: [Google]
Screen8.png
153 KB, 800x600
>>51928735
>>51928756
I'm looking to make a graphical roguelike, something like IVAN (pic related). I've been looking at libgdx because I've got Java experience but saw that Unity has a pretty comprehensive roguelike specific tutorial. Would using Unity teach me about C# or is it too hand-holdy to learn anything useful?
>>
>>51928805
i'm calling it 3 times per frame and the function does 40+ iterations each time (or more if i can get away with it, but it's not really necessary to do more than that) on mobile devices (i may have to drop armv5 support because no FPU)
>>
File: nori.jpg (152 KB, 786x720) Image search: [Google]
nori.jpg
152 KB, 786x720
>>51928806
> he doesn't program before watching anime
> he doesn't code listening to anime music
you are literally missing the best part
>>
>>51928594
>>51928507

That is the proper way to do it relationally, and you should probably follow that.

It might seem like it's easier to query in the first place, but it will end up as a mess - and you will have a ton of redundant data that could lead to inaccuracies.
>>
>>51928829
I'm not a manchild.
>>
>>51928773

I'm actually designing straight for Postgresql so I'll be using pgadminIII for testing and stuff.
>>
>>51928827
so about half a million times per minute on a 60 Hz device
>>
>>51928818
The main issue I had with learning C# through Unity is that Unity has very specific ways of doing things that don't at all apply to other stuff you'll code purely in C#. Like how you interact with other objects is a fucking mess I found in Unity because you always have to find them through some convoluted, and horribly slow, means, whereas in C# you can just access whatever you want very easily and directly.
Unity is great though.
>>
File: 1429852208959.jpg (682 KB, 600x3300) Image search: [Google]
1429852208959.jpg
682 KB, 600x3300
>>51928806
>>
>>51928850
>times
*iterations
>>
File: 1448321267007.png (86 KB, 630x622) Image search: [Google]
1448321267007.png
86 KB, 630x622
>>51928846
> he's not a little girl inside a male body
>>
>>51928856
In a programming thread. Grow up, kid.
>>
>>51928843
Okay, I will consider this,,

you mean to say >>51928594 is the "recommended" way?
>>
>>51928856
>buttblasted weebs
It's always the fucking weebs too. Fuck off. Literally MLP are more tolerable than your garbage.
>>
>>51928807
You should format it however you find it easiest to update and manage, as well as to prepare data sets from.
With no other programmers breathing down your neck bitching about style preferences you should be golden so long as you lay out your db schema well. If your only tables are client and their details then you're pretty much set already
>>
>>51928871
AND a faggot. Holy shit you're the trifecta of disappointment aren't you.
>>
>>51928679

I'm pretty sure that doesn't establish a proper relation.

Should be something like

clientid = db.Column(db.Integer(), db.ForeignKey("client.id")
client_id = db.relationship("Client", foreign_keys= "[Residence.clientid]")


And then you query from there. Or the other way around, but that's how you establish relations with SQLAlchemy
>>
File: oneslowgtp.jpg (102 KB, 500x1200) Image search: [Google]
oneslowgtp.jpg
102 KB, 500x1200
>>51928872
>In a programming thread.
yes but on on 4chan. dpt is made by and for programmers having an attachment to anime.
>>
>>51928852
I figured as much. I'm going to give it a shot and if I don't like it I'll fall back on libgdx or maybe look for some C++ libraries because I'm learning it on the side during the holidays.
>>
>>51928896
Yeah, I just quickly hashed up an example, still not fully memorized the relationship api
>>
>>51928907
Yeah, keep clinging to whatever makes you feel less of a failure, weebshit manchild.
>>
>>51928896
Yup that's the correct way

class Customer(Base):
__tablename__ = 'customer'
id = Column(Integer, primary_key=True)
name = Column(String)

billing_address_id = Column(Integer, ForeignKey("address.id"))
shipping_address_id = Column(Integer, ForeignKey("address.id"))

billing_address = relationship("Address", foreign_keys=[billing_address_id])
shipping_address = relationship("Address", foreign_keys=[shipping_address_id])
>>
>>51928907
>4chan
>3 stars
>tumblr
>4,5 stars
>>
>>51928924
animooooo
>>
I've got a set of nested classes in C#/WPF which function as data objects. How do I access properties beyond the first nested class? the "dot" operator doesn't seem to iterate through at all.

Please don't tell me I have to use MVVM, because I haven't got a fucking clue how that works.
>>
Is Trump our official candidate?
>>
>>51929432
Sure.
>>
>>51928875

Yes. It is the recommended and correct way.

If you do it like this now, you won't have headaches in the future.

It is best practice for a reason.

You should, however, look into non-relational databases like mongodb if you want to keep a structure like this.

https://github.com/cruor99/neogameserver/blob/develop/neogameserver/models.py
see this as an example

vs how it was before this commit.
>>
File: 1428353052866.jpg (282 KB, 1000x1000) Image search: [Google]
1428353052866.jpg
282 KB, 1000x1000
>>51929458
>unironically recommending MemeDB
>>
>>51929513

>Not liberating yourself from the shackles of the old "Enterprise" relational ways

I bet you also hate Freedom, don't you.
>>
>>51929565
nosql is fine (except maybe that hipsters want to use it for everything now).

mongodb is literally trash.
>>
>>51929605

But why?
Apart from the fact that everyone involved around it seems to be hardcore socjus.

Then again, sadly everything is these days.
>>
>>51929658
it's had data consistency issues for a long time. still hasn't been fixed.

there's also numerous security flaws. it's just bad software.
>>
File: fhhdgf.png (22 KB, 925x307) Image search: [Google]
fhhdgf.png
22 KB, 925x307
Wahey, I finally passed my driving test, /dpt/.
>>
>>51929933
did you learn to drive manual like a real programmer?
>>
>>51929949
Of course, nobody drives an automatic in the UK.

Seriously though, failing my test 3 times is embarrassing.
>>
>>51928399
>Most my work is embedded C or high speed Data Acquition applications.
why don't you work in IoT stuff?
>>
>>51928592
only by insecure no-devs. Plenty of great games made in Unity. KSP being one of them.
>>
>>51930000
>>
>>51930116
>caring about quads enough to link them
>>
>>51930128
not him but literally two thirds of /dpt/ fags use linux so they could defend themselves in that thread
>>
>>51929980
What got you? I fucked up once, apprently I nailed everything but didn't see a school zone sign (don't know if you have that in the UK) and I technically broke the speed limit by 20kph for a good minute or so. The assessor chewed me out like I had just killed someone.

>>51928852
>>51928914
So I am seeing what you mean with C# being purely for scripting but so far I am really liking Unity. Very nicely laid out and easy to get into.
>>
>>51929197
>the "dot" operator doesn't seem to iterate through at all.
uh... why not? post code?
>>
I am learning C++ and have a question that I cant seem to find the answer to.

Let say I want to pass a vector to a function or return one from a function.

int main (int a, int b) {
whatever
}

That is a simple function with int in and out. But now I am looking for the syntax for when a vector is either coming in parameters or coming back. I found a little youtube vid using arrays as an input.
int main (int my_Array[], int size_of_Array) {
shit
}

is what they used.

Anyone know the exact syntax of this in and out for vectors?
>>
>>51930153
>feeding the faggot's bait thread
>>
>>51928818
>using unity3d
>for a 2d gaym
>>>/vg/agdg
>>
>>51930187
custom functions wont be names main I know.
>>
>>51930187
Never wrote a line of CPP in my life, but shouldn't it be something like
int function (Vector<int>) { }
?
>>
>>51930162
First fail I caused someone to slow down at a round about.

Second fail I hit the curb doing a parallel park.

Third fail I apparently hesitated too many times, this is the only fail I find questionable as there was no way I could have went without causing someone to slow down.
>>
>>51930229

I was wondering about that but I watched someone bring an array in and they just used int my_array[].

I am hoping someone here actually does some c++ and knows what is up.
>>
>>51930229
no
>>
>>51930229
>
int function (Vector<int>) { }

Sorty, meant
int function (Vector<int> my_vector) { }
>>
>>51930212
But I'm having fun. I feel I get enough hardcores out of doing my embedded stuff for uni and side projects.
>>
>>51930167
Because the way XAML works it doesn't allow you to jump through data in that way, however modifying the way I accessed it seemed to work. Figured it out in the end.
>>
>>51930187
int function (vector<int>& my_vector) { 
// do stuff
}
>>
>>51930251
pretty sure it's gotta be a reference or a pointer boss
>>
>>51930251
http://stackoverflow.com/questions/5333113/how-to-pass-a-vector-to-a-function

here, probably better off doing a search next time because there's like a 99% less chance of you being called a faggot or something
>>
>>51930290
>>51930292

Thanks.
>>
>>51930321
faggot
>>
>>51930321
faggot.
>>
why is dpt so slow today
>>
>>51930861
/dpt/ is always insufferably slow. We need to fix it.

And to the guy that always says "quality != quantity", fuck you. There's a point where being too slow becomes uncomfy.
>>
anything fun to do with Assembly? It seems like an interesting language to work with.
>>
File: corner.jpg (18 KB, 385x415) Image search: [Google]
corner.jpg
18 KB, 385x415
Again I tried to read, process and write binary files in Python.

When, oh when, do I learn that Python simply isn't suitable for binary files? This is the fourth or fifth time (at least) I've done the same mistake over the years and *every* time it ends the same way: after wasting a few days worth of time, and trying to hack the thing left and right to just make it work around Python's binary gotchas, I get fed up and rewrite the whole thing from scratch in C++ and it only takes a few hours and the resulting program actually *works*. No hacks, no gotchas. It just works.

You have text? Python should do the job. You have binary? Run away from Python. No exceptions.

I don't know why I never learn.
>>
>>51930937
look tis-100 on steam.
>>
>>51930950
python is a meme
>>
>>51930980
why
>>
>>51930950
Are you using Python 2 or 3?
>>
I have just installed Win2K and want to code something for that system. What IDE?
>>
>>51930937
Make dos real-mode stuff. It's quite fun.
>>
>>51931031
VS for C/C++
>>
>>51930937
Assembly is fun until you learn how to do the same thing with C and then it becomes not so fun.
>>
>>51930861

It's better when it's slow. It means less shitposting is occurring.
>>
>>51931125
Less posts, less shitposting.
More posts, more shitposting.
What's your point, it's still constant. At least when it's moving fast I'm not bored at work.
>>
>>51930973
>>51931054
Thanks for the suggestions guys.

>>51931084
Could you explain how one is able to do reverse engineering, develop for low-level old machines or even crack protected software with C? Oh wait you can't.
>>
>>51931084
>>51931190
REKT
>>
>>51928818
http://it-ebooks.info/book/1334/
http://it-ebooks.info/book/2885/
>>
File: mess.png (194 KB, 831x793) Image search: [Google]
mess.png
194 KB, 831x793
How come sane web developers don't unite themselves and create a proper alternative to javascript that doesn't look like shit?
>>
>>51931377
k tard
https://github.com/jashkenas/coffeescript/wiki/List-of-languages-that-compile-to-JS
>>
>>51929432
yes
>>
>>51931456
but they still have to deal with js, I'm suggesting removing js out of the browser, kill it, and make something better the standard
>>
>>51931190
I've only used Assembly with microcontrollers and in that situation I'd rather do my work in a third or so the amount of code. No need to have a cow my friend.
>>
>>51930861
i think it's mainly because of all the trap posting
>>
>>51931501
k tard
https://en.wikipedia.org/wiki/WebAssembly

>>51931501
>but they still have to deal with js,
irrelevant. for the user, there no js.
>>
>>51931356
I already made a small one in C# using a library called RogueSharp earlier this year (it was pretty cool but it seems unfinished). If I'm going to be doing a lot of it from scratch I'd rather work in C++. Thanks anyway.
>>
>>51931501
I imagine a future where "websites" no longer need a complete fucking OS to behave properly (like any of them actually do do anything close to behaving). I want to see a browser that is intended for browsing documents that are served up by servers with minimal server-side styling. Most of that should be up to the client and their prerferences with maybe light suggestions from the server if the client doesn't care because ultimately what matters is the content.
http://gonmf.github.io/fwd/ seems like a really neat idea but it needs a little more for handling videos and images and there needs to be a way to transition into something interactive (running in a different, seprarate, program designed for handling interactive stuff)
The internet needs shopping spaces and forums and extragavant pieces of design and those can be handled by a different application for each. Aren't most basically implementing their own application in the browser as it is?

I just don't see myself getting a chance to work on this sort of stuff any time soon because it's not going to make money for quite a long time and I have missed my chance to do a research project on it.
>>
/g/ I want to learn to make simple apps, then useful apps, then games with Java. Why is it that everyone points me to a "game builder" or some other pre-made shit? All the "games" that come out are just slight variations of one another, it looks like shit. I'm not looking to make something like a half life mod, I just want to make some simple enjoyable games for mobile that aren't full of micro-transactions, a game I can enjoy. So far I've gotten two useful pieces of advice, the rest was just pages worth of shitposting without saying why. I'm not entitled to an answer I know that, but I'd appreciate one. If I shit post about EA and someone asks why, I usually explain why EA is the videogame equivalent of Blackwater and Halliburton.
>>
>>51928020
Would a 12k back end programming course that guarantees a job be worth it?
>>
>>51931031
VS, ya dingus
>>
>>51931726
What job does it guarantee?
>>
>>51931719
Then use C#/Unity.

Very similar to Java with more things that make your life easier.
>>
>>51930950
No problems here.
b'This is a byte string'
>>
>>51931719
java + C++ with your own game engine
>>
>>51931726
12k as in it costs $12k? lel it's a total scam
>>
File: 15 - 1.png (303 KB, 405x692) Image search: [Google]
15 - 1.png
303 KB, 405x692
Friends,

Using python I want to filter down the source code of one of the 4chan frames webpages to extract and use a list of all of the boards on the website. People have recommended I use the 4chan api but I cannot get my head around the python wrapper for it on git.

Could anyone point me in the right direction for filtering, sorting and then printing the source from 4chan.org/frames_navigation? Even a nudge in the right direction would be great, I've only been learning python for a few days

Here's the source code
http://pastebin.com/raw/1AZBZVQW
>>
>>51931947
Use the APIs.

Create an object to store the data and then read the JSON elements into the objects.
>>
>>51931976
I've spent a little while trying to get anything to work with the python wrapper but it doesn't come with any documentation and between the examples and the source code I can't figure it out :(

If I'm to do this the slow ignorant way I assume it'll be a for loop containing readline commands and if statements to check if the read line contains the information I'm looking for? If it does than save it into a new variable until I have everything I need then another for loop with if statements to then readline the var I created to further filter it down?
>>
In C#, Whats a good way to display collections with multiple properties (columns) in a grid?
>>
How can I do a two-dimensional array in Scratch? Want to program some shit up and I want to have that fucking cat grinning at me while I do it.
>>
>>51932020
I've done this all in C# with C# libraries, so I'm not sure what Python is using, but parsing the HTML directly when APIs are available is just silly.

Good luck anon. Maybe you'll use a real language and people like me could help you :(
>>
File: 1337379080719.jpg (49 KB, 397x704) Image search: [Google]
1337379080719.jpg
49 KB, 397x704
>>51931947
>>51932020
https://docs.python.org/3.6/library/json.html
>>
>>51932054

You know what's fun? When a webpage is covered in garbage and there's no API.
>>
>>51929432
>>51929444
>>51931478

Jesus /dpt/ how far ye have fallen.
>>
>>51932179
>fallen
*risen
>>
>>51928818
libtcod
>>
>>51932128
Fun, if youre a perl man
>>
Who /typescript/ here?
>>
>>51932032
Be more specific, what framework are you using for your UI?
>>
File: 1400193731343.jpg (49 KB, 780x780) Image search: [Google]
1400193731343.jpg
49 KB, 780x780
>>51928020
This is now a pls cuck me donny thread.
>>
>>51932438
pls cuck me donny

take my free internet away like that big, strong man that you are
>>
>>51932425
I'm using winforms. I have a class like this:
class Thing
{
string Name { get { ... } }
string Description { get { ... } }
}


Now I have a List<Thing> that I want to display as a table, like this:
|Name    |Description  |
|--------|-------------|
|Name1 |Desc1 |
|Name2 |Desc2 |


preferable with databinding. The DataGridView looks more like its made for databases rather than plain collections, so I'm wondering what to use.
>>
>>51932575
Sorry I won't be much use then, only used WPF and asp.
>>
>>51932597
Isn't WPF basically just WinForms described through xaml?
>>
>>51932179
clinton/bush shill detected
>>
>>51932609
No.
>>
>>51932640
yeah na they're both cunts as well.
>>
>>51932662
feel the bern

xd
>>
>>51932654
What's the big difference then?
>>
>>51932672

cand sdump da trump :D :D :D
>>
>>51932575
How about a gazillion textboxes with fixed width?
>>
>>51932672
You have to be 18 to post here
>>
would it be stupid to write a compiler in python and a vm in C++
>>
>>51932754
>would it be stupid to write * in python
yes
>>
>>51932696
no thanks
>>
>>51932679
Data binding practices.
XAML-based description of GUI elements is extremely different from WinForms.
Properties of GUI objects act differently and may or may not exist in both.
There's more, but I can't be fucked.
>>
>>51932771
write me a program that emails me the number of posts in the current /dpt/ in your favorite language
>>
How's my sorting algorithm /g/?

from random import shuffle as mix

def randomsort(unsorted):
sortLoop = 1
while sortLoop == 1:
print(unsorted)
mix(unsorted)
sortFinished = 1
for i in range(len(unsorted)):
if i != 0: # Otherwise index out of range, trying to check -1th string
if unsorted[i-1] > unsorted[i]:
sortFinished = 0
if sortFinished == 1:
sortLoop = 0
for item in unsorted:
sortFinished = 0 # Or else it is returned multiple times
return unsorted

inputList = input("Sort:\n").split(" ")
sortedList = randomsort(inputList)

print("\nList has been sorted\n")
for item in sortedList:
print(item)
print("")
>>
>>51933151
Kek
>>
>>51933086
uhhh, okay..

http://hastebin.com/ubogirumib.java
then
java -jar dpt.jar | tail -n1 | mail
and add the corresponding parameters to the mail command
>>
File: pDoK2dt.png (70 KB, 413x235) Image search: [Google]
pDoK2dt.png
70 KB, 413x235
ENTERPRISE
>>
>>51928257
Then he could.only become a math teacher. Why spend an extra 30k for that?
>>
>>51933226

Top lel
>>
>>51933226
jesus
>>
>>51928076
Thinking of doing a MSc in machine learning and statistics. Worth the $40,000 debt?
>>
File: error.png (254 KB, 1440x900) Image search: [Google]
error.png
254 KB, 1440x900
FUCKING ECLIPSE

THE PREFERENCE WINDOWS DONT HAVE AN ANDROID TAB

FUCKING REEEEEEEEEEEEEEEEEEEEE
REEEEEEEEEEEEEEEEEE
REEEEEEEEEEEEEEEEE
>>
Is this GNU C? What is this [0 ... (NR_LOCKS - 1)] syntax?
static union {
raw_spinlock_t lock;
char pad[L1_CACHE_BYTES];
} atomic64_lock[NR_LOCKS] __cacheline_aligned_in_smp = {
[0 ... (NR_LOCKS - 1)] = {
.lock = __RAW_SPIN_LOCK_UNLOCKED(atomic64_lock.lock),
},
};
>>
>>51933274
>using Eclipse for developing Android apps
USE ANDROID STUDIO GRANDPA REEEEEEEEEEEEEEEEEEEEEEEEEEE
>>
>>51933296
I'm not making an android app faggot.

It still ask me for a shitty eclipse android because of libgdx.
>>
>>51933282
Thanks for sharing that code, didn't know about this syntax either.

>Is this GNU C?
yes: https://www.gnu.org/software/gnu-c-manual/gnu-c-manual.html#Initializing-Arrays

>What is this [0 ... (NR_LOCKS - 1)] syntax?
When using GNU extensions, you can initialize a range of elements to the same value, by specifying the first and last indices, in the form [first] ... [last] . Here is an example:

int new_array[100] = { [0 ... 9] = 1, [10 ... 98] = 2, 3 };
That initializes elements 0 through 9 to 1, elements 10 through 98 to 2, and element 99 to 3. (You also could explicitly write [99] = 3.) Also, notice that you must have spaces on both sides of the ‘...’.
>>
>>51933318
>It still ask me for a shitty eclipse android because of libgdx.
No idea what that's supposed to mean.
Eclipse is shit. Stop using it.
>>
>>51933282
From 0 to NR_LOCKS - 1, pretty much like list slices. Yes, this is a GNU C extension.
>>
File: sewU5x9.jpg (43 KB, 602x526) Image search: [Google]
sewU5x9.jpg
43 KB, 602x526
Anything good to read? I'm reading Turings "On computable numbers". Interested in the history of computer science.
>>
File: DZE8fQG-1.jpg (63 KB, 242x321) Image search: [Google]
DZE8fQG-1.jpg
63 KB, 242x321
>>51933345
What do you recommend. I typically just compile everything commandline.
>>
>>51933345
libgdx make a full project setup that needs android.

I need to set up my eclipse with the android path but can't find where to setup android path inside eclipse.
>>
File: 9axqGvk.png (586 KB, 720x720) Image search: [Google]
9axqGvk.png
586 KB, 720x720
>>51933423
Android is deprecated for eclipse. Use android studio
>>
>>51933396
>>51933423
Use IntelliJ. It has better Gradle support and is slightly less shitty.
>>
>>51933258
>Worth the $40,000 debt?
No. But then again, i don't know.
Feels good to live in a country with free education.
>>
>>51933214
that prints it
I want it to email me
>>
>>51933214
nice
>>
>>51933470
lmao I missed the second part
I guess you're good then, I would say it's sorta cheating to use mail but i mean in Python it's just import email then connecting to the server and sending it lol
>>
>>51933470
$ man mail
>>
>>51933436
eclipse still works fine
>>
>>51933423
get the eclipse with ADT bundle it's all pre-configured
>>
>>51933226
Is this a PunctuationProvider?
>>
>>51933493
I guess I did use 2 languages instead of one, I also understand python would be a much better tool for this sort of job
>>
>>51933258
>machine learning
nice meme
>>
>>51933326
>>51933350
Why does Linus use GNU C? Isn't Linux supposed to be portable? I really wouldn't expect him to use compiler-specific features.
>>
File: Capture.png (12 KB, 368x462) Image search: [Google]
Capture.png
12 KB, 368x462
>>51933151
Changed it a bit.
>>
>>51933596
Where specifically did you find this code?
this? https://github.com/Seagate/ZDM-Device-Mapper/blob/master/kernel/lib/atomic64.c
>>
Anyone here ever done a course in Data Science or is it just a meme?
>>
>>51933282
>spinlock
Why would one use a spinlock?
>>
>>51933596
Linux was never designed to be portable between compilers, though recently there's been some efforts to get the kernel to compile with Clang (which implements many GNU extensions itself).
>>
>>51933621
https://github.com/torvalds/linux/blob/master/lib/atomic64.c
>>
>>51933622
>Data Science
What do you think this is anon?
>>
File: 1442901121500.jpg (102 KB, 861x644) Image search: [Google]
1442901121500.jpg
102 KB, 861x644
>>51933651
For processors that don't have atomic instructions.
>>
File: scmus.webm (204 KB, 484x292) Image search: [Google]
scmus.webm
204 KB, 484x292
Implemented a shitty describe function for the Scheme interface to my mpd client.
>>
>>51933702
Makes sense.
>>
File: ddpZue0.gif (2 MB, 532x295) Image search: [Google]
ddpZue0.gif
2 MB, 532x295
I don't know the first thing about designing GUIs in any language except html. Every single project I do is totally CLI, not even using ncurses. Is this a problem?
>>
>>51933682

I'm not quite sure that's why I'm asking
>>
>>51933226
>string
>not char
>>
>>51933988
static typing not even once
>>
>>51929605
>>51929458
recommended document storage (noSQL)?
Im free to use any database apparently
>>
I made an optimizing brainfuck compiler for my virtual architecture.
http://pastebin.com/VGMS6Bgg
>>
Stupid programming question that doesn't deserve it's own thread:

How are databases formatted in files?
I mean how does the data actually look like in the database file?

Is it just basically something like:
*header / metadata*
*table row1*
*table row2*
*table row3*

Or? Help a retard understand please.
>>
>>51933768
The point I'm making is that it means different things to different people.

If the course is primarily database stuff and learning how to retrieve and modify data, then go for it.

If it's actual high-level data science math stuffs, it may not be in your wheelhouse, but also valuable to learn if you can.
>>
>>51934077
It will almost certainly be encrypted, for one thing.
>>
Program that loads up a list of .PST files and moves emails from certain users to a separate mailbox where they are kept indefinitely.

Uses multi-threading and pretty much every trick I can think of to make it fast.

Can't believe I get paid to dick about making stuff like that.
>>
>>51933258
>Thinking of doing a MSc in machine learning and statistics. Worth the $40,000 debt?
Easily worth it, even if it did cost that much. But it shouldn't cost that much. What university are you looking at?

>>51933566
Go back to bed until you actually feel like trying.
>>
>>51934077
Try it out.
>>
>>51934077
Depends on the system.

In SQL Server, the data is stored in related 8KB page files. Depending on your fragmentation, the page files are usually not full, and are waiting for more data to be written in the right spot if there is a clustered index.

Here's an okay write up on SQL Server. Feel free to research each individual DBMS.

http://www.brentozar.com/archive/2013/02/how-does-sql-server-store-data/
>>
Anyone making something with websockets?
>>
>>51934139
I made a file host.
>>
>>51934139
I was under the impression that websockets were basically raw TCP sockets. That impression was smashed pretty quickly.
>>
>>51934139
>>51934150
Oh don't worry, i thought you meant normal TCP or even UNIX sockets.
It seems WebSockets are a whole different thing.
>>
I need an idea for a project idea that uses the web somehow.
I was thinking of a desktop google image search client but that feels pointless and autistic
Any ideas?
>>
>>51934077
>How are databases formatted in files?
>I mean how does the data actually look like in the database file?
It depends on the format.

You can make any interface you want, local remote, sql (think BDB, CouchDB, SQL), and store it in flat text files if you feel like it. There are so very many ways to do it, but each has pros and cons.

If you really want to get into the nitty gritty of file formats, you need to go do a little basic C refresher on file input and output (not much, two hours will do probably), then start digging into file formats. Start small, and not with databases. Write your own code to read from and modify some early graphics formats like PPM/PBM. They're dead simple and probably good to start with. Then move to a few memory mapped file tutorials, and THEN start reading into how DB files are structured.
>>
>>51934130
UCL in the UK
>>
Alright boys, bit of theory here and now.

>Explain the difference between entities and attributes in XML, and give one example
of when an entity must be used over an attribute.

First part doesn't really matter but second does.
When would you use entity over an attribute?
>>
>>51934257
>homework
>>>/wiki/
>>
>>51934206
UCL Poly? Hahaha what's the matter, couldn't get into Imperial?

(Joke's on me, I just graduated from Kingston).
>>
>>51934206
>UCL
Ahh. I'm not familiar with UK university rates at all ('muhrican). But It's definitely worth it. You can have a TON of fun with the programming projects in graduate machine learning courses.

Also, the coursera and other online courses are nowhere near as comprehensive as the grad courses... BUT blast through those a week or three before your grad course starts. That way when they bring up a new subject, it won't be new, and you'll be able to absorb it better. A little familiarity really does help not get overwhelmed by grad school. Or any school for that matter.
>>
>>51934369
Will have, I'll out of uni for a few years now and I've never officially studied programming, although I do a lot in my spare time. It's the cost of living in London that jacks the price so much

>>51934296
Imperial doesn't have syllabus I wanted desu. UCL might not let me in yet anyway, have to do GREs first
>>
>>51928020


what i'am i doing wrong here?


print ("{0} {1}has {2}eyes"format(hello_dict["first_name"],
^
SyntaxError: invalid syntax
>>
>>51933756
there's nothing wrong with making CLI programs. It really depends on your targeted users (even if these users are hypothetical).
>>
>>51934602
print("{0} {1} has {2} eyes".format(hello_dict["first_name"]))
>>
>>51928875
Look up normalization of data (1NF, 2NF, 3NF, BCNF, etc.)
>>
>>51934625
aw thanks mate :^)
>>
>>51934602
Choice of language first off.

Also the '.' i sused to call member functions. (hint look between the string and format).
>>
>>51934257
attribute describes the data, entity is the data

please learn to google
>>
>>51934677
Hah alright, everyone told me i should go for python? did i fall for a meme?
>>
>>51934809
It's horrible for a first language.
>>
>>51934809
/dpt/ will hang me for saying this, but node.js is the new python

npm has more modules than pip, and javascript is much more well thought out than python
>>
>working from home
>sipping hot chocolate under covers
>waiting for my map reduce job to go through 3 pb of data on our hadoop clustr
comfy day
>>
>>51934809
>Hah alright, everyone told me i should go for python? did i fall for a meme?
Nah, it's fine. I just don't like it stylistically, but it's a taste thing. I've used C and ruby for too long.
>>
>>51934848
>node.js is the new python
Fuck off.

He probably wants to learn to program, not build web sites.
>>
File: rmw5J.jpg (16 KB, 300x544) Image search: [Google]
rmw5J.jpg
16 KB, 300x544
>>51934848
>node.js is the new python
>javascript is much more well thought out than python

Now go to the corner and think about what you've just said. I'm going to finish this bottle, then go get the belt.....
>>
>>51934848
this
The very few things that python was even useful for in the first place can be done better and easier in node.js. JS is infinitely more useful in the real world than python too, knowing JS makes you highly employable - who the fuck is looking for python programmers?
Thread replies: 255
Thread images: 35

banner
banner
[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y] [Home]

All trademarks and copyrights on this page are owned by their respective parties. Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
If a post contains personal/copyrighted/illegal content you can contact me at [email protected] with that post and thread number and it will be removed as soon as possible.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com, send takedown notices to them.
This is a 4chan archive - all of the content originated from them. If you need IP information for a Poster - you need to contact them. This website shows only archived content.