[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


Thread replies: 322
Thread images: 45

File: DPT.png (389KB, 934x1000px) Image search: [Google] [Yandex] [Bing]
DPT.png
389KB, 934x1000px
Old thread: >>54244786

What are you working on /g/?
>>
>>54253840
thank you for not using a fag image
>>
File: solution.png (14KB, 851x330px) Image search: [Google] [Yandex] [Bing]
solution.png
14KB, 851x330px
>>
second for php is objectively the best language ever
>>
What should I call an object to be drawn to the screen?

Also is there a resource to name things in game engines? I have no idea what to call things and its driving me crazy.
>>
>>54253891
True that
>>
>>54253907
wrong trip
>>
>>54253897
Off you go
>>>/v/
>
>
/
v
/
>>
>>54253923
Are you stupid?
>>
>>54253897
Sprite
>>
>>54253897
ObjectToBeDrawnToScreen

Just use lots of words. The more words the better.

t. Senior Java Engineer
>>
>>54253897
it depends on how your game engine is laid out

maybe you want a namespace like Draw::fag and Draw::cuck etc
>>
How many of you have actually read SCIP?
Would you recommend it to anyone?
>>
I'll just leave this here.
http://forum.dlang.org/post/[email protected]

>>54253969
Yes, to beginners. People who copy-paste Stackoverflow need not apply.
>>
File: 1231231231.jpg (2KB, 125x92px) Image search: [Google] [Yandex] [Bing]
1231231231.jpg
2KB, 125x92px
>>54253999
>garbage collection for video processing app
>>
Wich one is better language for low level programming to beginner who can only program in python. C or C++?
>>
Lets all program a Captcha Solver in C together. Lets collab guys
>>
>>54254041
Hands down, C.
>>
>>54254054
Which kind of captcha?
>>
>>54254038
>being incapable of reading comprehension
>>
File: ve2d-filters.jpg (206KB, 1304x768px) Image search: [Google] [Yandex] [Bing]
ve2d-filters.jpg
206KB, 1304x768px
>>54253999
Wow, this is some ugly-ass GUI, they managed to fuck up fonts on Windows app.
>>
>>54254071
The one that solves the picture ones or text ones I am okay with either one
>>
>>54254121
>fonts on a rescaled image look blurry
No fucking shit, Sherlock!
>>
>>54254138
>rescaled
how do you know?
>>
desu I feel like scope/pass by reference/pass by address/pass by value are seriously not focused on enough

I struggle with this shit all the time and I don't think we ever went over it in any of the classes I took
>>
>>54254121
>windows fonts
>ever looking good
lol
>>
File: ve2e-save.jpg (198KB, 1304x768px) Image search: [Google] [Yandex] [Bing]
ve2e-save.jpg
198KB, 1304x768px
>>54254138
The one in the title looks fine, and the images are not rescaled.
>>
>>54254138
Looks like an alt+prtscn, not a resize.
>>
>>54253832
>default value in an initialiser list
What do you mean by that? Are you trying to initialize a class member in a constructor or doing list initialization with braced init list?
>>
>>54254176
they literally look better than anything else
>>
>>54254332
lol
>>
>>54254332
>I have never seen any other font rendering
Jesus christ, you can't be serious.
>>
>>54254176
For the last 10 years I spend hours after each reinstall to make fonts in my linux look like Windows fonts.
>>
>>54254372
Do you use Arch?
>>
>>54254372
cuckOS
>>
>>54254372
>Install infinality
>Done
Wow, so hard.
>>
>>54254372
Hours? Infi takes like 2 minutes to install and the defaults blow Windows out of the water.
>>
>>54253897
>What should I call an object to be drawn to the screen?
Drawable

>Also is there a resource to name things in game engines?
Noe

>I have no idea what to call things and its driving me crazy
welcome to programming
>>
>>54254386
As a matter of fact I do.
>>54254390
>>54254393
Yeah, it easier now than it was 5 years ago, nowadays I don't have to recompile FreeType2 with AA. Still, I have to fix some xmls to get the look I like.
>>
>>54254353
i literally have, there have been threads on /g/ about it, you loonix and mac fags are fucking delusional
>>
Wow, I knew having a client & server communicate on localhost, but this is instantaneous. No delay at all!

Now to simulate packet loss so I don't get bitch slapped again...
>>
>>54254589
You need to get your fucking eyes checked.
>>
>>54254617
>huhuh muh vintage 80s pixelated font *sips frap*
kys
>>
>>54254589
>>54254637
Oh look, the guy who keeps "trolling" in the dpt is back in this thread again.
>>
>>54254673
show your gentoo masterrace font rendering pls
>>
>>54254102
you're saying that he can read
>>
I have a UDP server architecture that in C++ that is running pretty solid, except for when a client joins the server, it sometimes crashes.

This is obviously a thread double access problem, one thread tries to add a player to a vector, other tries to read it at the same time and poof.

To any C++ experts, is it a good idea to make an array of atomic object pointers with a fixed size like 32? So when I add a player, it checks for the next NULL in the array of atomics and assigns it a pointer to a new player and the reader reads until it reaches a NULL pointer or the last object?
>>
>>54255056
Just use a mutex.
>>
>>54255056
It'll work, but lockless data structures are error prone and hard to reason about, just use mutexes.
>>
>>54255086
this
>>
>>54255151
>lockless data structures
do they even work at all (on ARM as well)? like there was an example of a lockless ring buffer for native android audio but it was a shitter tutorial and it wasn't thread safe
>>
>>54255170
>Do they work at all
If designed properly, yes.
>>
>>54255086
Also make sure to use std::lock_guard so that you don't end up with a deadlock in case of an exception.

Something along these lines would work:
void Server::onClientConnected(Socket *socket)
{
std::lock_guard<decltype(this->mutex)> guard{this->mutex};

Client *client = new Client(socket);
this->clients.push_back(client);
}

Client *Server::getClient(u32 id) const
{
std::lock_guard<decltype(this->mutex)> guard{this->mutex};

auto it = std::find_if(std::begin(this->clients), std::end(this->clients), [&id](Client *client) {
return client->id == id;
});

if (it == this->clients.end()) {
// log failure
return nullptr;
}

return *it;
}
>>
>>54255056

This is a well known problem in concurrency and solutions already exist. Please consider the following literature:

https://en.wikipedia.org/wiki/Readers%E2%80%93writers_problem
>>
>>54255170
Yes they do, they just hard to design properly, see http://www.1024cores.net/ for lots of articles.
>>
File: ohYou.jpg (157KB, 735x881px) Image search: [Google] [Yandex] [Bing]
ohYou.jpg
157KB, 735x881px
I have a file named kek.db on my pc and another file kek.db on webserver, I tought that it is good idea to use
content-md5 header

to check md5 file on server and if it is different than md5sum of my file on pc then I assume that file on server is newer and I download it, it looks like content-md5 is deprecated.

My only solution is .txt file on webserver with current md5 or is there a more aesthetic way?
>>
>>54255205
but how the fuck, is there a construct in C++ that guarantees that threads see all the most recent writes to a data structure without using locks?
>>
>>54255236
>http://www.1024cores.net/home/lock-free-algorithms/introduction
>Lock-freedom means that a system as a whole moves forward regardless of anything. Forward progress for each individual thread is not guaranteed (that is, individual threads can starve). It's a weaker guarantee than wait-freedom. Lockfree algorithms usually use atomic_compare_exchange primitive (InterlockedCompareExchange, __sync_val_compare_and_swap).
that's still a lock, it's a spinlock
>>
>>54255254
Yes there are constructs, and they aren't specific to C++. And basically "lockless" is a misnomer. They rely upon locks, they just make locks on hold on constant time operations. If you think about it holding a lock over an O(n) operation is pretty stupid.

And atomic operations rely upon hardware locks so fuck off all you faggots who are going to try to contradict me.
>>
>>54255308
>As can be seen, a thread can "whirl" in the cycle theoretically infinitely. But every repeat of the cycle means that some other thread had made forward progress (that is, successfully pushed a node to the stack).
ok maybe it has some use in some situations
>>
>>54255086
>>54255151
>>54255208
Thanks. I've been trying to not use mutexes for a while but I guess it's better than some insecure hackery way.

Also
>>54255208
This seems pretty elegant, but I'll try to hold off from the id and std::find_if method.
Too bad std::mutex isn't portable so I'll have to resort to boost mutex.
>>
File: stack-graph-1.png (29KB, 652x404px) Image search: [Google] [Yandex] [Bing]
stack-graph-1.png
29KB, 652x404px
>>54255308
> that's still a lock, it's a spinlock
Locking on traditional mutex results in process being stopped by kernel and placed in a wait-queue of the mutex, just like IO blocking. Spinlocking is better in most cases perfomace-wise, but it wasteful resources-wise. "Lockless" actually means "without locking by kernel", not "without any kind of locks".
>>54255324
> ok maybe it has some use in some situations
No shit, Sherlock.
>>
>>54255324
Also mutexes in Linux actually try to spinlock for a while before they give up and block the process for real, all that to minimize context switches.
>>
>>54255422
>that graph
it's fucking nothing
>>
File: 1453034925764.png (377KB, 498x497px) Image search: [Google] [Yandex] [Bing]
1453034925764.png
377KB, 498x497px
>>54255402
Switching from std::thread to boost.
>include boost/thread.hpp header
>compile time increases like 3x
>>
>>54255402
>Too bad std::mutex isn't portable so I'll have to resort to boost mutex.
Why do you think that?
>>
>>54255487
shig

>>54255402
use pthread it's on every language version and platform and std::mutex is just a wrapper for pthread mutex
>>
File: 1453542938321.png (378KB, 1450x1080px) Image search: [Google] [Yandex] [Bing]
1453542938321.png
378KB, 1450x1080px
Came to roll.
>>
>>54255503
It isn't. Shit I might have misread something.

>>54255512
pthread is a pain in the ass. The wrappers have made it much more easier to program threads for me. Besides, pthread doesn't work on Windows, I want my code to be portable.
>>
>>54255484
Well, it depends on the task at hand and the number of threads you work with.
>>
>>54255548
there's cygwin and also this thing might work

https://technet.microsoft.com/en-us/library/bb463209.aspx

std::thread didn't compile for me regardless of the version so i just said fuck it and used pthread instead it's easy as fuck to use anyway
>>
>>54255566
a 2x speedup in the best case isn't much to cheer for
>>
>>54255589
>std::thread didn't compile for me
Uh, why wouldn't it compile? Did you remember to link to pass the -pthread option?
>>
>>54255609
>-pthread option
wtf that's retarded and no one in /dpt/ told me about it and it's not on cppreference either look

http://en.cppreference.com/w/cpp/thread/thread
>>
>>54255639
Yeah you have to pass that option because it uses pthread internally.

http://stackoverflow.com/questions/8649828/what-is-the-correct-link-options-to-use-stdthread-in-gcc-under-linux
>>
>>54255652
>pthread linker on windows
What?
>>
>>54255548
>pthread is a pain in the ass. The wrappers have made it much more easier to program threads for me. Besides, pthread doesn't work on Windows, I want my code to be portable.
MinGW comes with winlibpthread on Windows which is automatically linked when building a program that include <thread> or <mutex> headers.
>>
>>54255652
ok then that's good to know for future reference

also what is this lmao
http://programmers.stackexchange.com/questions/195639/is-gcc-dying-without-threads-support-on-windows
>I understood that GCC is falling out of favour because the people maintaining it have become somewhat arrogant, and now that LLVM is here (and is very good) people are voting with the feet.
"somewhat arrogant" is an understatement
>>
>>54255668
Well, if you're considering pthreads as an alternative I assumed you were on a Unix machine, or at least using Cygywin.
>>
>>54255521
Roll
>>
>>54255683
i don't use cygwin but i do use mingw and i haven't tried compiling to a windows target but it should be possible to get it to work one or another
>>
>>54255673
Also, for instance, this code:
#include <thread>
#include <mutex>
#include <iostream>
#include <vector>

static std::mutex g_mutex;
static constexpr unsigned int g_num = 100;

static void synced_print()
{
std::lock_guard<std::mutex> guard{g_mutex};
std::cout << "Hello world!" << std::endl;
}

int main(int, const char **)
{
std::vector<std::thread> threads{};
threads.reserve(g_num);

for (unsigned int i = 0; i < g_num; ++i)
threads.push_back(std::thread(&synced_print));

for (auto &thread: threads)
{
if (thread.joinable())
thread.join();
}

return 0;
}


Compiled with:
{lamb} g++ -std=c++14 -othreading threading.cpp


Results in:
{lamb} ldd threading.exe
(...)
libwinpthread-1.dll => /c/Program Files (x86)/mingw-w64/i686-4.9.2-posix-sjlj-rt_v4-rev2/mingw32/bin/libwinpthread-1.dll (0x64940000)
(...)


So you will only need the -pthread linker option on Linux, which shouldn't be an issue with any build system.
>>
>>54255521
>>54255686
stop this
https://dpt-roll.github.io/
https://better-dpt-roll.github.io/
>>
>>54255703
So std::mutex and std::thread are portable. Thank fuck.
>>
>>54255170
Easiest on x86 (and depending on CPU and/or system bad code can "just werk" by pure circumstance), harder on ARM and you may lose a good chunk of performance versus locks compared to x86, and basically impossible on Alpha.
>>
I‘m rewriting a python cli tool that searches for and torrents anime from when I was absolutely new to programming
>>
>>54255759
Not as portable as just using Java :^)
>>
Any db wizards on here? I'm making a link shortener using postgres and I'd like to count how many times each link gets accessed.

Should I just do an UPDATE or is there some way to automatically increment a value every time the row is accessed? Sorry if that's a dumb question, this is my first time doing anything with SQL.
>>
>>54255967
yes
>>
>>54256002
Very helpful, thanks :^)
>>
I am 65% through codeacademy python

First timer, only coded with pyramid a decade ago
>>
File: Frame2.png (44KB, 900x346px) Image search: [Google] [Yandex] [Bing]
Frame2.png
44KB, 900x346px
Anyone ever designed their own network frames in Java? My idea was to create a bytearray to contain all of those different specifications, & wrap it in a UDP packet & send it on its' way.

I'm just going to import the CRC-32 checksum. But can I really put all these different types into one bytearray?
>>
>>54256054
>pyramid
I meant pascal
>>
>>54256054
>python
>codeacademy
drake.jpg
>>
>>54256132
No bullying
>>
>>54256062
>no struct in Java
Oh, how I pity you. Enjoy coding your byte array<->network frame class conversion methods.
>>
>>54256155
i'm genuinely trying to help you when i say that python and also codecademy are fucking shit and especially shit for learning programming
>>
>>54256171
Really? Can you go into that? I'm almost done anyways, so I'd like to explore more. My friends with cs degrees tell me I should move up to a big boy language
>>
>>54256164
You're telling me there's a class specifically for frames? I've only seen classes for UDP/TCP packets.
>>
Evening, guys. Been having some issues with git. Do questions about git go here or in the Stupid Questions General?
>>
>>54256197
I can't speak for Codecademy, but Python is a perfectly fine language to learn. Don't listen to the trolls who tell you otherwise.
>>
>>54256212
No. You'd better design a class to represent your own frame format, with a byte array to hold the raw data and methods to switch from class representation to raw representation.
>>
>>54256231
Ah... is this gonna be one of those places where theres too many differing opinions on how to help the noob which lead to a shitposting
>>
Hmm guys?

My quicksort returned a speeding ticket.
Am I in trouble?
>>
>>54256197
http://software-carpentry.org/blog/2012/02/why-not-use-python.html
http://blogs.bu.edu/md/2012/10/10/the-problems-with-python-as-a-teaching-language/
https://www.quora.com/What-are-the-main-weaknesses-of-Python-as-a-programming-language
https://wiki.theory.org/YourLanguageSucks#Python_sucks_because

i can't be bothered to explain it with my own words for the 363rd time but take your friend's advice and move on to java or C++
>>
>>54256300
Thanks senpai. I am gonna check these out... naked
>>
>>54256263
Alright, I'll try that.
>>
>>54256324
No. You'd better design a class to represent your own frame format, with a byte array to hold the raw data and methods to switch from class representation to raw representation.
>>
>>54255521
rawlin
>>
>>54255239
It's probably just deprecated because MD5 is deprecated, for a non-crypto application it's fine.
>>
Anyone have a list of all types in C typedef'd to be one token? i.e. 'unsigned char uchar'', for all of the multi-token types, etc? Thanks
>>
>>54256219
I wouldn't ask /sqt/ for much of anything.
>>
>>54256314
>>54256300
So these are interesting but I don't understand most of what the complaints are about. I'm sure this is reasonable, as I am a novice thru n thru.

But what about what you said about codeacademy being shit?
>>
>>54256426
>But what about what you said about codeacademy being shit?
Not him but too much handholding, doesn't force you to use your brain for problem solving.
>>
>>54256426
https://www.reddit.com/r/webdev/comments/1j485e/why_is_codecademy_so_heavily_criticized/
http://www.makeuseof.com/tag/4-reasons-shouldnt-learn-code-codeacademy/
http://www.attendly.com/why-codecademy-is-overrated-and-missing-its-target-audience/
https://www.quora.com/How-come-the-quality-of-Codecademy-is-so-bad
>>
>>54256426
Just pick up K&R or a Racket book. When I was a beginner I learned more from five pages of K&R than the entire codecademy course.
>>
>>54256389
Okay then. Simplified, the issue is that I seem to have entered a wrong password somehow and I can't find anywhere to enter it again.

Long version: I'm new to git (and compsci in general; this is my first year).
For a school project (in group), we were given a repository to access and store our shit in. It's compulsory to use this repository if we want to get graded, which I would like to be.

So I installed git and tried out the tutorial the official site gave. That worked fine, so I tried connecting to the repository the school gave me via
>git remote add test [url]
I entered the password I thought I was being asked for, the same password that works for the site that allows us to check on that same repository, but now all I get is "invalid username or password".

I tried installing a GUI (SourceTree, as one of my mates recommended) in the hopes it'd allow me to fix the issue, but so far it's run into the same problems. I'm fairly sure I've got the right URL, though.

Usually, I'd just try a different username or password and see what sticks, but I can't find anything in the help for git or git remote that allows me to do that.
>>
My final project for Java 1. Teacher is shit and I'm scared if I don't pass this class I might have to drop out of college. How do you position pictured within a gridpane???
>>
>>54256516
What git frontend does your school use?
>>
>>54256300
>http://software-carpentry.org/blog/2012/02/why-not-use-python.html
He has trouble installing Python and complains that some children have difficulty understanding range(). Really compelling arguments. He also doesn't seem to be aware that Python does in fact have what he calls a "cross-product operator" (wtf?): itertools.product()

>http://blogs.bu.edu/md/2012/10/10/the-problems-with-python-as-a-teaching-language/
His complaint against print is obsolete as of Python3; operator overloading is awesome, and if you dislike % for string formatting you can use .format; Python's error messages are perfectly fine, I'm not sure what he's talking about; IDLE does suck, yes, but that's an IDE, not the language; the only people who seem to dislike Python's whitespace are those that come from C-style languages. Programming new comers never complain; Python's assignment operator is absolutely standard, identical to that of Java and C++; I you don't like eval, don't use it; maybe Python's module system could be improved, but that's hardly a reason to use a different language.
>>
>>54256547
SCM, I think.
>>
I want to learn javascript, where can I start?
>>
>>54256574
Let it put another way, when you login through the website, what kinda authentication is it? Is it HTTP AUTH, a login form, or something else? Do you have a profile on the website? Does the website display either HTTP or SSH for cloning? If the website has a profile, does it have any menu for SSH Keys? Last but not least, are you sure that you're switched to "test" remote when you're attempting any of the commands?
>>
>>54256603
codecademy
>>
>>54256603
>>>/g/wdg
>>
con't from
>>54256549
>https://www.quora.com/What-are-the-main-weaknesses-of-Python-as-a-programming-language
He claims that Python has "scope-confusion" without giving examples of what he means, so I can't comment on it, except to say that I've never had any difficulty with Python scopes; Even the biggest defenders of OOP cannot seriously claim that information hiding is "the biggest advance in programming since FORTRAN 2", but anyway Python has a clear rationale for avoiding information hiding. I can understand why people disagree with it, but for a scripting language it makes sense IMO; He claims that Python is untyped, which is completely false. Python is strongly typed; Python can't support braces because of problems with set and dict. I also don't see why whitespace makes code generation more difficult; his point about "table-based" programming is utterly incomprehensible, list, tuple, named_tuple, etc are not table-based;
>>
>>54256607
>when you login through the website, what kinda authentication is it?
Well, the URL is https:// but it also has a login form.
>Do you have a profile on the website?
I have an account where I can see all the repositories I have access to. I assume that's what you mean by profile.
>Does the website display either HTTP or SSH for cloning?
How do I tell which one it uses?
> If the website has a profile, does it have any menu for SSH Keys?
Not as far as I can tell. The options it gives me are to look into the repositories I have access to, to change my password and to log out.
On clicking the repositories, the options I get are to open a page for the commits or the source. It shows a checkout link of the form
>(git clone) https://my.name@site:8181/scm/git/project-name
and I can open that page, but attempts to use it as an URL for pulling from have run into the password problem.
>Last but not least, are you sure that you're switched to "test" remote when you're attempting any of the commands?
I haven't touched GIT (Bash, GUI, or cmd) since creating that remote. How do I switch remotes? The commands on the git remote help page don't seem to do that.
>>
>>54256912
Okay so what happens when you try to use git clone with the checkout link that's present on the website? Does it clone the repository or does it show any error?
>>
>>54256999
I just tried it with git Bash. This is the result:
>git clone [URL]
>Cloning into [project name]...
>fatal: remote error: Invalid username or password.
>>
File: 1450205806912.jpg (10KB, 236x326px) Image search: [Google] [Yandex] [Bing]
1450205806912.jpg
10KB, 236x326px
Hey /doublepenetration/

Learning C here; can't help but think this is the wrong way to do it. Basically I want to make sure some text (i.e. "clear", "snow") matches an icon (i.e. \U0000F00D, etc).

Here's my painful code... what's the C way of thing?

    if (strcmp(conditions_buffer, "clear-day")) {
text_layer_set_text(s_condition_layer, "\U0000F00D");
}

if (! strcmp(conditions_buffer, "clear-night")) {
text_layer_set_text(s_condition_layer, "\U0000F02E");
}

if (! strcmp(conditions_buffer, "rain")) {
text_layer_set_text(s_condition_layer, "\U0000F019");
}
>>
>>54257030
Alright and did that prompt you for the password or straight up told you to fuck off?
>>
>>54257088
Straight up told me I was a scrub, yeah. I was prompted for the password before, though.
>>
>>54257147
What if you try any of these?

git clone https://site:8181/scm/git/project-name
git clone https://site:8181/git/project-name
git clone https://site:8181/project-name

git clone https://site:8181/scm/git/project-name.git/
git clone https://site:8181/git/project-name.git/
git clone https://site:8181/project-name.git/


Both don't contain username in hopes that it will prompt you for username & password, I also alternated between paths because the chances are the scm serves under different ones than the web server makes it accessible through and last but not least the latter 3 have .git appended to them, maybe that'll do the trick, it's hard to tell without knowing which interface & version & configuration it's running so it's a long shoot. It's even more suspicious that it gives you a checkout URL that doesn't work. If none of these work, then perhaps it's your git config that attempts to auth with wrong creds that have been stored in your prior attempts.
>>
File: 1449235632495.jpg (373KB, 1536x1908px) Image search: [Google] [Yandex] [Bing]
1449235632495.jpg
373KB, 1536x1908px
>>54257053
Same anon here.

In python I would write this:

input = "clear_night"

ICONS = [
("clear-day", "\U0000F00d"),
("clear-night", "\U0000F20E"),
("rain", "\U0000F019"),
]

for icon in ICONS:
if input == icon[0]:
print(element[0], element[1])



What's the C equivalent of this? Pls halp /dpt/
>>
>have to use external project that implements _t types

Why do people do this? Do people seriously not give a damn about POSIX?
>>
File: 1461634641592.jpg (120KB, 780x973px) Image search: [Google] [Yandex] [Bing]
1461634641592.jpg
120KB, 780x973px
>>54257308
Same girl? Why do you keep posting her?
>>
File: 1439512219026.jpg (164KB, 1536x1917px) Image search: [Google] [Yandex] [Bing]
1439512219026.jpg
164KB, 1536x1917px
>>54257380
I dunno, just going through my qt folders.

Also, don't post thumbnails.

Please help me C bros: >>54257053 >>54257308
>>
File: 180px-PennLeft.png (50KB, 180x191px) Image search: [Google] [Yandex] [Bing]
180px-PennLeft.png
50KB, 180x191px
>>54257408
>white girl
>in the qt folders
FUCKIN DROPPED
>>
>>54257408
Thanks but the jpg compression feels worse in this one.
>>
>>54257308
So what's the problem? You're already checking the input and setting appropriate label. You could also make it a table like that one though...

I don't really know C but something along these lines:
struct entry {
char name[32];
char icon[32];
};

struct entry entries[] = {
{"clear-day", "\U0000F00D"},
{"clear-night", "\U0000F02E"},
{"rain", "\U0000F019"},
{NULL, NULL}
};

for (entry *e = entries; e != NULL; ++e) {
if (strcmp(conditions_buffer, e->name) == 0) {
text_layer_set_text(s_condition_layer, &e->icon);
break;
}
}
>>
>>54257452
...

Beauty transcends colour, my friend.

Its the ${CURRENT_YEAR}
>>
>>54257053
Put elses before the second and third if so it doesn't run strcmp again if it already found one that works. Also there really isn't a better way. C is nowhere near as abstract as Python.
>>
>>54257053
you should compare the result of strcmp function call with 0 to check that the strings are equal.
>>
>>54257475
>He doesn't unroll his loops
>Wasting space on sentinel values instead of just using sizeof
>allocing arrays in structs
Roberto Ierusalimschy/10.
>>
File: 1193364813582.jpg (46KB, 600x591px) Image search: [Google] [Yandex] [Bing]
1193364813582.jpg
46KB, 600x591px
>>54257480
but not eyes.
>>
>>54257308

What you posted was the right way to do it in C, since string is not a fundamental type of the language, and is basically a char array, so you can't use ==. The manual way, if you would like, to compare string equality in C without strcmp is to check every single char in each string array to check equivalence. Using strcmp is already pretty short.

But to make it shorter, you can use enums to equate the weather conditions to some integer and then use a switch statement to get something shorter.

So like this:

    enum weather {
CLEAR_NIGHT,
CLEAR_DAY,
RAIN
} weather;

weather input = CLEAR_NIGHT;

switch(input)
{
case CLEAR_NIGHT:
text_layer_set_text(s_condition_layer, "\U0000F02E");
break;
case CLEAR_DAY:
text_layer_set_text(s_condition_layer, "\U0000F00D");
break;
case RAIN:
text_layer_set_text(s_condition_layer, "\U0000F019");
break;
}


People are not kidding when they say it's basically portable assembler.
>>
>>54257220
>>54257220
The first returns invalid username/password.
Second two return that the repository couldn't be found.
Pattern is the same for the second set of three.
>>
>>54257587
This assumes the input is controlled by the programmer. I figured it was user input.
>>
Is it good idea to learn python and C because of pythons C Extensions
>>
>>54257625

Yeah, I figured as much, looking at the more recent replies since that post.

strcmp is basically the only way this person can roll. I don't think it's bad.
>>
Is there any reason to learn assembly in the year of our lord 2016?

I find it comfy to write small programs in, but what kind of employment opportunities are there?
>>
>>54257645
Learning C is always a good idea.
>>
File: 1437353198493.gif (2MB, 320x320px) Image search: [Google] [Yandex] [Bing]
1437353198493.gif
2MB, 320x320px
>>54257587
Gah... I think I will just do the elif ladder then.

What do you think of this anon's solution?

>>54257475
>>
>>54257655
Maybe I'm wrong. I seriously hope, new as he is, he isn't using strings for parametrization.

>>54257691
It works. It's slightly more involved and less optimal. I wouldn't do it, but that's how some C programmers would (why I mentioned Roberto, it reminded me of his style).
>>
How the fuck do I make this work?
/*
* If this error is set, we will need anything right after that BSD.
*/
static void action_new_function(struct s_stat_info *wb)
{
unsigned long flags;
int lel_idx_bit = e->edd, *sys & ~((unsigned long) *FIRST_COMPAT);
buf[0] = 0xFFFFFFFF & (bit << 4);
min(inc, slist->bytes);
printk(KERN_WARNING "Memory allocated %02x/%02x, "
"original MLL instead\n"),
min(min(multi_run - s->len, max) * num_data_in),
frame_pos, sz + first_seg);
div_u64_w(val, inb_p);
spin_unlock(&disk->queue_lock);
mutex_unlock(&s->sock->mutex);
mutex_unlock(&func->mutex);
return disassemble(info->pending_bh);
}

static void num_serial_settings(struct tty_struct *tty)
{
if (tty == tty)
disable_single_st_p(dev);
pci_disable_spool(port);
return 0;
}

static void do_command(struct seq_file *m, void *v)
{
int column = 32 << (cmd[2] & 0x80);
if (state)
cmd = (int)(int_state ^ (in_8(&ch->ch_flags) & Cmd) ? 2 : 1);
else
seq = 1;
for (i = 0; i < 16; i++) {
if (k & (1 << 1))
pipe = (in_use & UMXTHREAD_UNCCA) +
((count & 0x00000000fffffff8) & 0x000000f) << 8;
if (count == 0)
sub(pid, ppc_md.kexec_handle, 0x20000000);
pipe_set_bytes(i, 0);
}
/* Free our user pages pointer to place camera if all dash */
subsystem_info = &of_changes[PAGE_SIZE];
rek_controls(offset, idx, &soffset);
/* Now we want to deliberately put it to device */
control_check_polarity(&context, val, 0);
for (i = 0; i < COUNTER; i++)
seq_puts(s, "policy ");
}
>>
>>54257475
I'm sure that that code doesn't work.
>>
Daily reminder Java is a pretty good language
>>
trying to get autohotkey to minimize and restore windows
i'm kinda sick of writing in autohotkey, 1,5k lines and it's sorta unpredictable, sometimes it works sometimes it doesn't.
might go for the more robust version, not sure tho
>>
>>54257452
OSGTP when did you get a second tripcode
>>
>>54257732
As I mentioned in my post, I don't know C, it was a rough example based on what I've seen people do in C.
>>
>>54257820
nah, I like Asian girls
we just both agree that white chicks are ugly
>>
>>54253891
I wouldn't wish PHP on my worst enemy.
>>54253915
>paying enough attention to know that
>>
File: 1435020720705.jpg (68KB, 576x1024px) Image search: [Google] [Yandex] [Bing]
1435020720705.jpg
68KB, 576x1024px
>>54257837
Asians and White, they're both alright
>>
>>54257864
>fat
>>
is there a way to do CRUDshit with a mysql website without using php
>>
File: 1450872991388.jpg (113KB, 604x604px) Image search: [Google] [Yandex] [Bing]
1450872991388.jpg
113KB, 604x604px
>>54257878
With a waist like that? That's not fat.

You're just LOW TEST
>>
>>54257837
White chicks are one of, if not the, most attractive races
>>
File: shit eater.png (38KB, 578x712px) Image search: [Google] [Yandex] [Bing]
shit eater.png
38KB, 578x712px
>>54257895
>>
>>54257892
back to the loo, pajeet
>>
>>54257892
Yes, use python
>>
>>54257895
it's fat as hell the legs and waist are all lumpy and her knees are thick as trees
>>
>>54257898
Races are social constructs
>>
>>54257907
rolling your own backend because the startup you were gonna outsource it to got bought up and they SHUT IT DOWN doesn't make you a pajeet

>>54257909
how

i hate python but i'd even use it if it means i don't have to use php
>>
>>54257937
Here's something to read through

http://www.tutorialspoint.com/python/python_database_access.htm
>>
>>54257961
well that looks good

but i'm not 100% on how exactly it works

i haven't paid for the web hosting service which includes 2 mysql databases so i can't just experiment with it yet

if i'm reading it right, in the tutorial they manipulate the database "raw" and not through a server-side script? doesn't that introduce vulnerabilities? i'd like to run a server-side script with python (or anything not php)
>>
I want to make android games without breaking my brain

I tried AppGameKit but it feels outdated and forgotten by now.

What should I try?
>>
>>54258068
if you just want something up and running regardless of quality then try the unity engine
>>
>>54258032
usually if you want to do easy crud, look into django.

what i posted is barebones CRUD using the pymysql lib

>doesn't that introduce vulnerabilities?

They the pymysql lib to interact with the database. Ineracting with a databse inherently introduce vulnerabilities. The most you would worry here is escaping inserts and doing parameritized queries and such.
>>
>>54258032
wait it's actually 100 mysql and 2 mssql databases

>>54258084
does django need to be installed on the server? i'm worried that i won't be able to do this CRUD stuff with just the web hosting service. but most websites are dynamic so it has got to be possible, yeah?
>>
>>54258083
Unity is expensive, I was thinking of something free/affordable.
>>
>>54258140
i think it's free until you make a certain amount of money and then it's like a 5% royalty fee or something like that
>>
>>54258132
Usually if your host let you install phyton on the webserver, you can run it.

Django needs to be installed on server, correct.
>>
>>54258158
ah ok then maybe a cloud service would be required for that particular host for django. but if i understood correctly i should be able to do php with mysql on the web hosting service? like just set up the database and upload a muh_api.php script to the website?
>>
>>54258201
or is the php server-side script support also something i need to ask the host about? like maybe they have phpmyadmin only for the admin to set up the database himself such as on a blog website and not through a server-side script such as through the end user's mobile app?
>>
C wizards. I need some help with something very dumb and hacky.

I'd like to cast a stack array array[r*c] to array[r][c]. Pretty much just reinterpret a contiguous memory space as a 2D array. I've seen it done before on /dpt/ but I forget the particulars.
>>
>>54258281
ok it looks like they support server-side scripting with php at least
>>
>>54258391
you just map indexes
>>
File: 1461781849.png (79KB, 785x607px) Image search: [Google] [Yandex] [Bing]
1461781849.png
79KB, 785x607px
python question
why does the function check_user_version() knows the variables without them being set with global keyword?
>>
>>54258391
Well I guess I'll tell you what I'm doing.

I get data from an accelerometer as X1, Y1, Z1, X2, Y2, Z2, ... and I'd like to transform the data into a 2D array of [axes][index]. I can't pass a 2D array to a function without specifying the width of the last dimension, which isn't possible unless I make the axes the last dimension which is inefficient as fuck. I can't malloc in the function and pass it back, I'm on an embedded system with no malloc.

So I'd like to pass a 1D array as the destination to the function and then reinterpret the pointer as a pointer to a 2D array after the call. The compiler keeps fussing about it.
>>
>>54258595
switch to C++
>>
File: beforepostingondpt.webm (3MB, 1329x720px) Image search: [Google] [Yandex] [Bing]
beforepostingondpt.webm
3MB, 1329x720px
Ask your much beloved programming literate anything (IAMA).

>>54256369
https://neetco.de/CodeArtisan/cdptlib/src/master/source/base.h

>>54255458
>try to spinlock for a while before they give up and block the process for real,
Only if the current owner is being executed.

>>54255056
read/write are atomic on x86. if you have something like

consumer
while (NULL == array[i])
yield();

foo = array[i];
array[i] = NULL;


producer
while (NULL != array[i])
yield();

array[i] = ...;


you are safe.

>>54254041
c++
>>
>>54258620
No malloc. What use is C++? If anything it would fuss even more about what I'm trying to do.
>>
File: 1453656893900.png (1021KB, 870x717px) Image search: [Google] [Yandex] [Bing]
1453656893900.png
1021KB, 870x717px
>>54258656
>C++
>no malloc
>>
>>54258521
which variables?

user_version?
>>
>>54258672
If there is no malloc there is no new you idiot.
>>
>>54258694
Anon... C++ has stack too
>>
>>54258733
You can't allocate a vector's data on the stack.
>oops that push just overwrote a local variable

>>54258595
I'm just going to write it as a macro function. Kill me.
>>
>>54258811
int x[5]; // valid C++ code

magic
>>
>>54258835
You obviously don't understand my problem.
>>
Can someone who's smart review my technical paper?

https://www.scribd.com/doc/310661542/N-Gram-Markov-Chains
>>
File: goodness.webm (3MB, 1280x720px) Image search: [Google] [Yandex] [Bing]
goodness.webm
3MB, 1280x720px
>>54258694
One of the many advantages of C++ over C: You just have to overload the global new and delete operators to have your own type safe memory allocator.

http://en.cppreference.com/mwiki/index.php?title=cpp/memory/new/operator_new#Global_replacements
>>
>>54258903
Shit's due tomorrow. I don't have time to write my own allocator. Otherwise I might.

>>54258811
Macro function wasn't horrendous. But the fact I have to use them is. I remember specifically seeing someone doing pointer casting to solve this issue. Something like
u8 r = 10, c = 10;
u8 penis[r*c];
u8 (*doubledick)[r][c] = penis;

(*doubledick)[2][5] = 69;
>>
>>54258811
>You can't allocate a vector's data on the stack.
yes you can with custom allocator

https://chromium.googlesource.com/chromium/chromium/+/master/base/stack_container.h
>>
>>54257898
not objectively, on average males from e every race are most attracted to Asian girls
>>
Resharper is telling me to
>use capital first letter for methods,
>lowert 1st for local vars+a underscore in front if instance field,
>non-private/global vars with capital 1st

do you guys agree with this?
>>
>>54259121
>asian
>pakistani
>chinese
>indian

Nice try Pajeet
>>
Visual Studio Community 2015; how do you make an installer out of your C# file? Can't find the shit anywhere.
>>
>>54259198
think you need to download a wizard template
>>
>>54259143
always follow the common style of a language even if you do not agree with it
>>
Does anybody still use the windows registry?
>>
>>54259219
Well that's fucking retarded.
Thanks though.
>>
Why are medior job advertisements so uncommon? 99% of the software dev job postings are junior or senior positions.
>>
>>54259316
because coding is an oversaturated field
there's plenty of shit-tier API monkeys but not enough actual competents who can manage those monkeys.
>>
>>54259198
There's a publish or publish as a oneclick application somewhere, probably the build drop-down menu.
>>
>>54259316
>>54259342
one person to herd the pajeets
>>
File: capybara.jpg (212KB, 710x408px) Image search: [Google] [Yandex] [Bing]
capybara.jpg
212KB, 710x408px
>>54259342
wow
just wow
>>
>>54259372
That's a cute beaver.
>>
>>54259378
It's actually the world's smallest bear. They live in Brazil.
>>
File: eg4.png (57KB, 751x543px) Image search: [Google] [Yandex] [Bing]
eg4.png
57KB, 751x543px
>>
>>54259420
Bea(ve)r, and they live with me, in Canada.
Final answer.
>>
>>54258685
cur variable
>>
>>54259443
Canadian bearers have beards, you were so close, sorry :).
>>
>>54259487
>bearers
>>
>>54255521
Roll
>>
>>54259434
need to fix flattenN and try and overload so you don't need to specify
>>
>>54259347
think this is true, dunno tho, i only release my shit in a single exe
>>
>>54259487
Wild ones. Mine have self-respect and keep it trimmed. That is one of mine, clearly, and I want it back.
>>
File: Save.png (56KB, 467x289px) Image search: [Google] [Yandex] [Bing]
Save.png
56KB, 467x289px
>>54259526
Hi, can anyone identify what layer of security from the OSI model each Model is using? and a little explanation, why?
>>
>>54254038
pic for ants
>>
>>54255521
roll()
>>
just got this:
https://github.com/Nidre/VS2015-Dark-Npp
if anybody else is interested
>>
File: eg5.png (52KB, 729x540px) Image search: [Google] [Yandex] [Bing]
eg5.png
52KB, 729x540px
>>
>>54259769
text is covered, but it says that they copy which is not ideal (particularly for an embedded system)

I could avoid referencing std::array and then make it safe to cast
>>
>>54259769
change for loop in flattenOnce, should be

for (size_t i = 0; i < M; i++)
for (size_t j = 0; j < N; j++)
result[i*N + j] = arr[i][j];
>>
This is just a quick project I made this evening for fun.
I made a script in Octave that visualizes how an analog signal (some ramps) are turned into a PCM signal which is then modulated using FSK. I couldn't program a decent non-perfect low pass filter so this will have to suffice. Run this through octave and it'll open a bunch of windows with plots the different stages of the signal and create a wav file of the final FSK signal, assuming that it was sampled at 4410 Hz (that's 1/10th CD sampling rate).
I can post the source code if you want.
>>
I know it sounds retarded but i am not able to find how to write a single 0 into the terminal using c's printf. I am doing printf("0") at the moment, nothing shows up.
>>
>>54260329
add flush (stdout);
>>
lads how the fuck do i get the string value of a selected listbox item in c#

this seems like it should be easy but it bloody isn't.

string g2 = dialog.addg2.SelectedItem.ToString();

how dae ah get it to work?
>>
>>54260341
Yeah you are right, tried to print more shit and found a starting zero so i guessed i needed to flush, thanks.
>>
>>54260344
>string g2 = dialog.addg2.SelectedItem.ToString();
No.

(string) dialog.addg2.SelectedItem

If you put string in items in of the listbox you can cast them directly.
>>
if a float type has a magnitude range of (2^-62, 2^62) and can accurately represent all integers between -2^16 and 2^16, then can it represent e.g. (14.125 + 1.0/(2^10)) with full accuracy? and a float type with a magnitude range of (2^-14,2^14) and an integer range of (-2^10,2^10) can not?
>>
Why do so many people know python?
>>
>>54260417
Simple to learn, good-looking code, cross-platform availability, extendable through modules.
>>
>>54260431
>good-looking code
oy vey
>>
>>54259155
I mean East Asian (CJK)
>>54260431
that describes many more languages than you think it does
>>
>>54253840
I posted a block of shit-tier code yesterday, spent the day combing over it and now I think I have something presentable
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import turtle
import random
#setup the display, configures background color
wn = turtle.Screen()
wn.bgcolor("black")

#creates all the turtles and crams them into a list
artists = [turtle.Turtle() for x in range(10)]
#generates rotational angles and movements
move = [random.randrange(40,60) for x in range(10)]
rotate = [random.randrange(0,360) for x in range(10)]

#Configures turtle color
colors = (
"Red","Blue","Purple","Brown","Gold",
"DarkKhaki","OrangeRed","DarkSlateGray",
"MediumSpringGreen","ForestGreen"
)
for artist, color in zip(artists, colors):
artist.color(color)

#set up the turtles to draw the shapes
for a in artists:
a.speed(0)
a.ht()
a.penup()
a.right(random.randrange(0,360))
a.forward(125)
a.pendown()
for i in range(120):
for x in range(0,9):
artists[x].left(rotate[x])
artists[x].forward(move[x])
wn.exitonclick()


be gentle...
>>
>>54260417
Libraries that do everything for you (meaning you can pretend to be capable of anything while being incapable of everything), a hipster culture and being designed with retards in mind
>>
>>54260542
>Libraries that do everything for you
So not wanting to duplicate work that's already been done makes you a worse programmer

Ever used a loop anon?
>>
like in notepad++:
https://visualstudiogallery.msdn.microsoft.com/830a6482-3b8f-41a8-97b5-b9c581e5ad8b
>>
File: proving my point.png (36KB, 1288x374px) Image search: [Google] [Yandex] [Bing]
proving my point.png
36KB, 1288x374px
>>54260572

Another thing is the complete lack of self awareness of python programmers. Python programmers are so incapable of recognising faults, that they might even suggest that a for loop is comparable to being able to import a graphics context and turtle
>>
File: mascottt.png (1MB, 532x546px) Image search: [Google] [Yandex] [Bing]
mascottt.png
1MB, 532x546px
Finally finished everything to do with analysing anime from usenet for my indexer. (Also made that shit logo)
80,000 releases analysed, and have a threaded program to analyse new ones every minute. It only took a few hours and 600GB as well which was surprising.

Now just have to clean everything up before I make a repo and throw this dumb shit on github.
>>
>>54253878
brb making a csgrad.jpg out of this
>>
>>54260664
employers will love your anime analytics

>>54260681
newfag
>>
>>54260664
did you embed something in that picture?
>>
I have some beginner's questions:

- Should all my methods be "stand-alone" and easily unit-tested? Like, should I avoid using variables defined in the class and not locally in the method and stuff like that?

- Should I put everything in variables instead of getting it directly, even if I use it only once? I'm not sure if it's good practice to do stuff like DoSomething(GetValue(SomeOtherClass.GetParameters().ToString()))
>>
>>54260725
no, I think I just didn't compress it when saving in photoshop
>>
>>54260732
>Should I put everything in variables instead of getting it directly
depends on readability i'd say
>>
>>54255521
>>
>>54255521
ROLL
>>
>>54260530
good job anon, now make it do fireworks
>>
>>54255521
>twf
>the really hard stuff isn't on dubs
>>
>>54260802
It already does...
>>
File: ocaml-4.03.png (57KB, 665x599px) Image search: [Google] [Yandex] [Bing]
ocaml-4.03.png
57KB, 665x599px
OCaml 4.03.0 is out. I hope you have upgrade anon.
>>
File: cmd_monitor_il.png (6KB, 401x179px) Image search: [Google] [Yandex] [Bing]
cmd_monitor_il.png
6KB, 401x179px
Here is my first little IL function block for on/off control with feedback and alarm with a time-out period. I skipped the variable declarations for clarity.

    (*---------------Initializations---------------*)
(* Load preset time to timer *)
LD T_CMD_MAX
ST CMD_TMR.PT


(*---------------Automatic/manual command---------------*)
(*Automatic command is active if
- auto mode is active and
- cmd is active*)
LD AUTO_CMD
AND AUTO_MODE
ST auto_cmd_on

(*Manual command is active if
- manual cmd is active and
- auto mode is not active
- manual cmd debounce input is not active*)
LD MAN_CMD
ANDN AUTO_MODE
ANDN MAN_CMD_CHK
ST manu_cmd_on

(*Drive command output bit*)
LD auto_cmd_on
OR manu_cmd_on
ST CMD



(*---------------Alarm handling---------------*)
(*activate alarm if
- auto/man. cmd is active and
- feedback is not activated during time-out period
*)
(*Start timer if cmd is active*)
LD auto_cmd_on
OR manu_cmd_on
ST timer_start
CAL CMD_TMR(IN := timer_start)

(*Get timer elapsed time*)
LD CMD_TMR.ET
ST tim


(*Check timer output bit and feedback*)
(*Set alarm SR to active if
- timer output bit is active and
- feedback is not active
*)

(*Set alarm SR when timer is elapsed*)
LD CMD_TMR.Q
ANDN FDBK
ST time_elapsed
CAL ALRM_FF(SET1 := time_elapsed)

(*Reset alarm SR to inactive if acknowledge is active*)
LD ACK
ST ack_on
CAL ALRM_FF(RESET := ack_on)


(*Drive alarm output bit*)
LD ALRM_FF.Q1
ST ALRM

END_FUNCTION_BLOCK
>>
File: Untitled458024.png (59KB, 1920x996px) Image search: [Google] [Yandex] [Bing]
Untitled458024.png
59KB, 1920x996px
Working on an LDAP DNS front-end
>>
>>54255170
Can RCU be considered as lockless? It's so wonderful.
>>
File: xVNu4rv.jpg (147KB, 512x640px) Image search: [Google] [Yandex] [Bing]
xVNu4rv.jpg
147KB, 512x640px
Does anyone know how to avoid having a call to system(command) print shit in terminal? I want to be silent, writing in c.
Nice grill to apologize for shitting up the thread with babby tier stuff.
>>
Nobody asked, I'm posting it anyway.
TL;DR:
> input signal consists of some ramps (sampled internally with 4000 samples)
> turn this into a PCM signal by sampling at 1/200 the actual sampling rate, then quantizing with 8 steps (expressed as 4 bits)
> create a bipolar representation of the PCM signal where True -> 0, False -> +/-1 alternating
> use this to FSK-modulate a cosine carrier
> show FSK signal and make it audible
Opens a bunch of plots of the different steps of this and creates a WAV file.

To run: install Octave, save pastebin, open file using octave command.

http://pastebin.com/8ZPyZTJ5
>>
>>54260936
What is this made with ?
Pure HTML/CSS?
>>
>>54261048
Flask, SQLAlchemy for IPAM and support/portal, and a self built LDAP ORM.
It's mostly CRUD, but against LDAP instead of SQL.
The only really interesting parts are building the ORM from scratch and letting it interface with other applications (FreeRADIUS and BIND at the moment, ISC dhcpd in progress).
>>
>>54260373

this doesn't work lad

just gives me an error when it tries to write it to the db.

cheers anyway
>>
Trying tleaormulnithreading
>>
>>54261106
I was talking about the page, but I noticed it was a paid theme called "lab management system" or something.
>>
>>54261132
Oh, that's just a bootstrap template called AdminLTE.
https://almsaeedstudio.com/
The MIT license is pretty nice.
>>
File: 1432244387857.jpg (762KB, 1024x768px) Image search: [Google] [Yandex] [Bing]
1432244387857.jpg
762KB, 1024x768px
>>54261365
>Australia
>>
>>54261365
>generic white tshirt
>i am AHO
what
>>
I'm a 2nd year Computer Engineer who's shit at programming. I currently work with Java and C relatively competently, but only from school work, outside of the last 2 years I have never programmed before. I'm hoping to create a program that is used to catalog and view information about personal collections (i.e. souvenirs, sports memorabilia etc.) and will probably try and implement some sort of simple GUI, in order to gain some more competency.

My question is, can anyone suggest anywhere to start learning from so that I could get going on this project? Also, what language would you suggest using for this project? (I was suggested python with TKinter, as I want to expand my language base as well but I'm open to other suggestions)

Thank you
>>
>>54260751
>photoshop
So you embedded a lack of Freedom.
>>
File: 1457062403306.gif (3MB, 355x201px) Image search: [Google] [Yandex] [Bing]
1457062403306.gif
3MB, 355x201px
>>54261469
>Computer Engineer
What do they even teach there?
>>
>>54254121
Fonts are fucked up by default on Windows.
>>
>>54255521
rolling
>>
>>54261469
I'm a computer engineer in my second year and you haven't programmed before? jesus christ man. Good luck never getting an internship.
>>
>>54261621
led circuit board toys i guess
>>
>>54255521
Rolling
>>
>>54261657
>>54254895
>>
File: 1455132848913.png (218KB, 1920x1060px) Image search: [Google] [Yandex] [Bing]
1455132848913.png
218KB, 1920x1060px
>>54261680
Arch Linux.
>>
>>54261669
>>54261668
That's a good point. Do you have an internship?
>>
>>54261469
Depends if you want it to work on a client-server basis or just a client.

For client-server you want:
1) A database backend (PGSQL or MariaDB)
2) An API backend (server) you will build that manages the data between the database and the client (Python or Go will do)
3) The client itself (C++ with Qt will do)

For just a client:
1) Local file storage (SQLite).
2) The client itself (C++ with Qt will do)
>>
>>54261668
In class assignments and projects I have, I just don't have any personal shit. So basically everything I know was learned in class. I'm not saying it's a good thing, that's why I'm trying to work on personal projects now.

>>54261703
In the process of getting one right now. Our Co-op program at our school is at like a 50% success rate right now so I'm still applying every day.

>>54261713
Just a client, no central server for a database or anything. Thanks for the suggestions
>>
>>54261699
looks very noticeably worse than windows ffs
>>
>>54261768
>I like my fonts looking like shit
>>
>>54261799
most of the pic looks like shit, just look at the F's, and the kerning is fucked, you can take any word and it looks more or less shit, and especially the numbers look vertically challenged
>>
>>54261799
It's fun watching non-mac fags fight about font when I'm sitting over here chillin
>>
>>54261822
I have no idea what you're talking about.
I think you're just used to terrible font rendering.
>>
>>54261853
OSX font rendering is fucking garbage on non-retina display.
>inb4 just buy retina lol
>Relying on the screen DPI to have good font rendering.
>Assuming the screen has high DPI.
I'd argue that even Windows font rendering looks better than pig disgusting OSX fonts.
I'd rather look at aliased text than Apples blurry mess of vomit.

Linux (using freetype) has undeniably the best font rendering out of all the OS's.
>>
>>54260955
freopen("/dev/null/", "w", stderr);
freopen("/dev/null/", "w", stdout);


>>54260941
Don't think so. RCU updates require locks, you can only do one at a time if you don't want updates to get thrown away. It is lovely. I'm in the process of implementing a language runtime so all data structures are RCU. Good for concurrency and for implementing immutability transparently.
>>
>>54261918
KEK ok here's a literal side by side of the two on a retina display
>>
>>54261853
literally gay as fuck fucking fag
>>
>>54262077
Are you ok?
>>
>>54262065
k tard
>>
>>54262116
That looks blurry as shit in comparison kek
>>
>>54262065
the one on the left is painful to look at
>>
>>54262065
You upscaled the right using no filter.
Also, left still looks like blurry shit lol.

>>54262137
Fix your eyes.
>>
>>54262137
kill yourself RETARD FAG

and you have no idea about subpixel rendering fucking retarded mac fag, i bet you didn't even know that there are monitors that can do portrait mode
>>
>using font smoothing of any kind

AWFUL
>>
NEW THREAD!

>>54262176
>>
>>54262168
get a better monitor fag and read some sampling theory
>>
New thread: >>54262219
>>
>>54262224
stop spamming the board kthx
>>
>>54262256
same goes for you FAG
>>
>>54262162
You're getting mad over fonts

Get a fucking life
>>
>>54262264
Don't spam the board pls.
>>
>>54262298
you're the one that's mads, you're fucking delusional if you think your mac fag font doesn't look like ass, it looks all bolded and high contrast, it's offensive to the eyes, meanwhile >>54262116 is aesthetically pleasing and is perfectly readable
>>
created after bump limit >>54262333
>>
>>54262298
And? what did you expect from a technology board you fucking retard?
Fuck off if you don't like it.
>>
>>54262337
and the mac fag shit looks like it has fringing artifacts, maybe from incorrect sampling or because of a disgusting sharpening filter, either way it's just completely disgusting
>>
>>54262340
>>54262224
both of you are late

real thread
>>54262182
>>
>>54262340
>>54262224
For fucks sake.
FUCKING KILL YOURSELVES, PLEASE.
>>
>>54262364
kill yourself literal fag
>>
>>54262435
Kill yourselves. All of you.
>>
New thread: >>54262333
>>
how do i get the textbox values from a parent window to a popup window in c#?
Thread replies: 322
Thread images: 45
[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.
If a post contains illegal content, please click on its [Report] button and follow the instructions.
This is a 4chan archive - all of the content originated from them. If you need information for a Poster - you need to contact them.
This website shows only archived content and is not affiliated with 4chan in any way.
If you like this website please support us by donating with Bitcoin at 1XVgDnu36zCj97gLdeSwHMdiJaBkqhtMK