[ home ] [ jp ] [ snow / tan ]

/jp/ - Mysterious Thoughtography Collection

Name
Email
Subject
Comment
File
YouTube
Password (For file deletion.)
- Please read the Rules and the FAQ.
- Supported file types: JPG, PNG, GIF, SVG, WebM, MP3, OGG, MID/MIDI
- Maximum file size: 20MB

[Return][Go to bottom]

File: 1468382079908.png (834.34 KB, 1200x1080, boys who program.png) [ IQDB | SauceNAO ]

 No.6550[View All]

Does /nen/ know how to program?
183 posts and 42 image replies omitted. Click reply to view.

 No.21855


 No.21858

>>21794
I think the most important is to just pick a book that seems cool and stick with it until you finish it. Many people seem to give up at the first difficulties or spend all time time trying to find the perfect book.

 No.21859

>>21858
i dont think its important to finish a whole book. usually they have chapters that teachers will skip anyways, like dynamic programming, or using that languages database API

 No.22886

https://news.ycombinator.com/item?id=16535886

saving this link here in case anyone wants to learn a cute cake language

 No.22887

>>21859
Why would you want to skip dynamic programming? (inb4 idk because I skipped it)

 No.22890

>>22887
It belongs in a book on algorithms, not a book about learning a language. Its more useful and easier to learn it in the context of pseudocode than an actual implementation in a language textbook. You also will probably almost never see a problem that has optimal substructure(and isn't premature optimization, AND isn't handled by your library) outside of "coding problem of the day" type questions.

 No.22908

File: 1520545361499.png (342.58 KB, 754x1297, katyusha.png) [ IQDB | SauceNAO ]

I want to write a compiler!

 No.22912

>>22908
You should start with something easier first

 No.22925

File: 1520585678672.jpg (148.28 KB, 1920x1080, [HorribleSubs] Slow Start ….jpg) [ IQDB | SauceNAO ]

I'm actually liking Unity why is Canonical killing it?????

 No.22932

File: 1520621725878.gif (985.99 KB, 400x225, c2e8197ddb3cb6ba7e76bf4018….gif) [ IQDB | SauceNAO ]

>>22912
I'm not a beginner anymore!

 No.22946

Okay, so I've been using qbittorrent for a couple weeks now and I've found it to be awful for archiving.

If you have mixed paused and active torrents and then click "pause all" everything is paused, but when you click "resume all" it resumes even the stuff you originally had paused.

Really wish qbittorrent had a separate stop status/stop button like utorrent. I saw it was requested multiple times on github and the dev just shrugs that he doesn't understando the desire for it, sigh.

I've seen this sort of deadlock before with open source projects, where the devs don't personally see any need for something but there's obviously some set of the userbase that wants it. Even if the feature is something that would be entirely optional (as in, it wouldn't affect anyone that wouldn't use it), it ends up on an ultra-low-priority feature request black hole… at best.

 No.22947

>>22946
I use tags to get around this

 No.22956

>>22947
Would be much better if it allowed boolean searches on tags though. There's no way to select everything without the archive tag except by creating a tag or category that has all that stuff in it.

 No.22959

>>22946
>I've seen this sort of deadlock before with open source projects, where the devs don't personally see any need for something but there's obviously some set of the userbase that wants it.
Well you can make your own fork! Just be sure to never fork GNU software, because it is harmful to the free software community by drawing attention and effort away from the GNU project.

 No.22960

File: 1520721184914.png (142.85 KB, 913x321, rms.png) [ IQDB | SauceNAO ]

>>22959
Woah, Stallman-sama posts on /nen/?!

 No.22961

>>22959
Remember to relicense your fork as GPL too!

 No.23212

I updated my greasemonkey and now i can't find my scripts where they go?!!!?????? AAAHH

 No.23214

Oh god it was terrifying, I roll back to older version and turn off automatic updates.

Why they always gotta break things? It make me sad…

 No.23245

how do i learn how to use git

 No.23247


 No.23257

>>23245
you really only need to learn "branch", "add", "commit", and "push" and what they do

 No.23262

>>23257
fetch, pull, and rebase too!

 No.23272

File: 1521712329066.png (775.54 KB, 1280x720, [HorribleSubs] ReLIFE - 15….png) [ IQDB | SauceNAO ]

>>23262
You only ever have to do that if you're coding with frens…

 No.23292

>>23272
Very cute post!

 No.25756

gonna uninstall that dumb android studio and install eclipse.

also gonna install vs2017 but is so big grr, the packages i selected make like 30 jiggas!!

 No.25757

No.

 No.25945


 No.25950

>>25945
The only thing that annoys me about this is that he acknowledges that it's shit, yet he'll still proudly charge 5 bux for it on steam. Does he have no shame?

 No.25960

>>25950
The art is pretty, but yeah I agree that it looks like a flash game quality so I'm surprised people would pay 5$ for it

 No.26273

>>21572
>>21583
>>21589
Because I've been having trouble with this the past few days:
Remember to use "-vf format=yuv420p" or "-pix_fmt yuv420p" because some media players(firefox and apple grr!!) are silly and can't do yuv444p yet(or maybe they can I'm not too sure but 420p works so I'm sticking with it from now on https://trac.ffmpeg.org/ticket/5276?cversion=0&cnum_hist=5)

yuv apple ffmpeg firefox corrupt file

 No.26336

how i write a sort method for a linked list?
can /nen/yone (sounds like anyone) help??

 No.26343

>>26336
Phew lets see its been a while since algorithms class but this seems to mostly work:
public class MyLinkedList {
Node head;
int length;

public MyLinkedList() { }

public void add(int data) {
if (head == null) {
head = new Node(data);
length = 1;
} else {
Node temp = head;
while (temp.next != null) {
temp = temp.next;
}

temp.next = new Node(data);
length += 1;
}
}

// Sort ascending
public void sort() {
Node last = null;
Node curr = head;
boolean performedSwap = true;
while (performedSwap) {
performedSwap = false;
curr = head;
while (curr.next != last) {
if (curr.data > curr.next.data) {
// Swithc curr and next positions
swap(curr, curr.next);
performedSwap = true;
}

curr = curr.next;
}
last = curr;
}
}

@Override
public String toString() {
StringBuilder out = new StringBuilder();
out.append("[");
Node curr = head;
while (curr != null) {
out.append(curr.data);
curr =curr.next;
}
out.append("]");
return out.toString();
}

private void swap(Node first, Node second) {
int tempData = first.data;
first.data = second.data;
second.data = tempData;
}

public class Node {
int data;
Node next;

public Node(int data) {
this.data = data;
}
}
}


@SpringBootApplication
public class DemoApplication {
public static void main(String[] args) {
MyLinkedList list = new MyLinkedList();
list.add(3);
list.add(4);
list.add(5);
list.add(2);
list.add(1);

System.out.println(list.toString());
list.sort();
System.out.println(list.toString());
}
}

 No.26345

If you need to do quicksort, mergesort or anything else nlgn then hopefully you have the CLRS algorithm book which has a nice chapter on sorting if I remember right

Also holy heck thank goodness for the Stream API and comparators and every other nice thing you get to use in real programming!

 No.26346

>>26343
Thank you so much nenfren I really appreciate it, I'm cry now, this is so nice. I adapted it to my programmio and the language i'm using and it works really perfectly for my purposes. Thank you so much, I'm just too retarded at this. I'm sorry, thanks.

Sorry.

 No.26390

Let's brainstorm some ways in which nenmin can implement an option for japanese/western post name ordering!

 No.26391

>>26390
A checkbox in the options menu, stored in a cookie. Wherever its generating the thread or whatever check for the flag and either use western or japanese order for the name.

Actually maybe not, because it probably picks the name whenever you insert a new row into whatever Post or Thread database table it uses.

I guess it could still work but you might accidentally swap the name order of someone who manually uses a characters name in Western order, but that's probably not too big of a deal.

Something like
<name>
<?php
$japOrderCookie && $NAMES->get(post->name) ? echo $JAPORDER_NAMES->get(post->name) : echo $WESTORDER_NAMES->get(post->name) ?>
</name>

I'm not actually sure if thats valid php but something like that could work.

 No.26392

>>26391
How about each post has an ID that queries the SQL teeburu and prints givenName and familyName in order according to client preferences?
Cons include a lot of queries per page load and it might be very intensive for nenmin's server-chan.

Perhaps you could have an implementation with php $_GET but it would have to be updated everytime someone posts and isn't much better.

Perhaps the best solution would be if the server had a default naming order and then the swap was processed client-side through JS or something!

I'm sorry, I'm still learning so I don't really know much about it. Sorry for my bad ideas.

 No.26393

>>26392
One thing to keep in mind is how vichan is already built, and trying to make your version not too forked so you can still update to new versions without having to deal with merge conflict.

Thats why I think the cookie approach is probably fine. You don't end up change too much of the php code thats creating post/thread html, and you don't mess with the database by adding new tables or changing columns around.

While it would be ideal to do it in javascript(so you wouldn't have to refresh after updating the cookie), keeping logic centralized in the php that builds the html is nice.

 No.27758

I'm making HUEG spaghetti android app with java!

Wish me luck!!

 No.27759

>>27758
dont forget the pesto!

 No.27935

Does anyone know a library or other way to get groovy and java compiler output in a machine readable form?

Right now I'm just dumping the Stream into a temp file and running javac/groovyc and reading exit codes and redirecting stderr.

 No.28975

can /nen/ do K&R exercises?
In C, write a function that reverses a string in place recursively.
I'll post my solution and my favorite one from the solutions wiki if anyone else thinks of something.

 No.28977

>>28975
I gave up after the first segmentation fault

 No.28979

>>28977
I bet your code tried to read before the start or after the end of the string in consideration. だめです!

 No.28981

>>28979
I was getting segfaults on mine because I forgot about the difference between char var[] and char* var.

 No.28982

File: 1546108765977.png (170.13 KB, 354x402, ganbaru-beemu-flip.png) [ IQDB | SauceNAO ]


 No.28984

File: 1546110677775.jpg (265.45 KB, 850x1043, 1335564482672.jpg) [ IQDB | SauceNAO ]

>>28982
That looks like a lot more code than one needs.
I'll post my solution and my favorite someone else did.
Don't look if you want to write your own, though.
https://pastebin.com/aqFq5FF8
explanation:
One passes it two pointers to the beginning of the string. as it climbs up the stack, it collects each character of the string into a local variable to each call of the function. then as it cascades back down the stack, it assigns into the string. when f is at 5 in 12345, l+strlen(f)-1 will be 0, at 4, 2, and so on.

 No.28986

>>28984
at 4, 1, I meant to say, oops. it will always be however far along l needs to be.

 No.28987

>>28975
I couldn't think of anything really recursive, so I just transformed the iteration...
http://sprunge.us/0WckGE?c

 No.28988

>>28987
Thats not bad at all! Its similar to the favorite solution on the wiki I posted.



Delete Post [ ]
[Return] [Go to top]
[ home ] [ jp ] [ snow / tan ]