/g/ - Programming & Technology


Anonymous
I've got a working upload page for Hydron now. I need to learn how to use git before commiting, though, instead of changing all of the files on github like I did last time.
Just thought I'd give you an update
>>5012989 #
Anonymous
>>5012417 #
If you're on windows just download the Github client. Easiest way.
Anonymous
Meguca seems to have a bug where the board's default theme replaces ashita until you change it back and forth. Or maybe that's by design?
>>5014896 #
Anonymous
>>5014896 #
Alright. Good to know. I stopped using Ashita for a while until I realized I could just change back and forth for it to come back.

/g/

「C/C++ for Bwakas」

AnonymousExpandLast 100
Fundamental programming lessons for cute anons.
990 posts and 94 images omitted See all
Anonymous
Let's learn to draw then
Anonymous
>>4967949 #
I might be interested. I'd be looking to create modules for VCV rack.
I feel I'd need to brush up on my mathematics first though.
>>5029643 #
Anonymous
>>5018652 #
>I feel I'd need to brush up on my mathematics first though.
I doubt it. Most mathematical transformations you would ever need is probably done by some library you'll be using.

Anonymous
505 Bcaptchouli.txt
Some more tags for the list, mostly just idolshit girls with some 2hus that weren't in the list above.

Anonymous
>>4811241 #
you can do it just like any other css tbh
no problem bro

/g/

「Database Database Just Living in the Database」

AnonymousExpandLast 100
GIqSnWaDsEx40 KB680x383787.jpg
Learning about databases. Talking about databases. Helping other gucas with their databases.
NoSQL allowed!
68 posts and 1 image omitted See all
Anonymous
What's the point of creating a many-to-many relationship? Wouldn't a one-to-many work in the same way? For example, let's say we have 2 tables:

------------
Shape
------------
+ shape_id INT PK
+ name TEXT

------------
Colour
------------
+ colour_id INT PK
+ name
+ shape_id INT REFERENCES Shape (shape_id)

and this is in our db:
Shape(shape_id : 1, name : "square")
Shape(shape_id : 2, name : "triangle")
Shape(shape_id : 3, name : "circle",)

Colour(colour_id : 1, name : "red", shape_id : 1)
Colour(colour_id : 2, name : "blue", shape_id : 1)
Colour(colour_id : 3, name : "red", shape_id : 2)

This is a one-to-many relationship because I can have multiple colours on one shape.
Let's say I want to find all of a square's colours. I'd do SELECT name FROM Colours WHERE shape_id=1;
Let's say I want to find all shapes that are red. I'd do SELECT shape_id FROM Colours WHERE name="red";and then just
>>4756771 #>>4756782 #
Anonymous
>>4756712 #
reference the shape_ids found and search for the name in the Shape table.

What benefits do I have to create a many-to-many relationship by creating a shape_colour bridge between the two tables instead?
>>4756782 #>>4758750 #
Anonymous
>>4756712 #
>>4756771 #
This is one post, by the way, I ran out of time writing the first one. Don't want to confuse anyone with the second post
Anonymous
>>4756771 #
Your Colour table isn't a table of colours, it's a table of coloured shapes. If you look at what you wrote, colour_id 1 and colour_id 3 are the same colour, which is unintuitive naming. Let's say you want to change the colour red for some reason. You want to remove it as an option and replace it with green. Right now you'd have to check every item in the Colour table to see if they're red. If you have Colour and Shape tables actually separate you can just alter the entry for red in the Colour table.
>>4789867 #

Anonymous
Something seems wrong?

Anonymous
>>4624122 #
You can chain your pipes like so
>std::cout << "1: add to backlog\n" << "2: remove from backlog\n";
Also, use string commands instead of numeral ones.

Reserve space in your incrementally grown strings to reduce reallocation.

>void add_backlog(std::string input){
Pretty sure you want to pass by const reference here. What you wrote is pass by copy - expensive. Applies to all over functions passing objects with heap-allocations.

>std::ofstream createfile("watched.txt");
>std::string buffer;
Reuse the variables, when branching logic. DRY.

>createfile.close();
Not needed. The file is automatically closed by the stream destructor. RTFM http://www.cplusplus.com/reference/fstream/ofstream/close/

>buffer = buffer + line + "\n";
That's 3 allocations you could have avoided. Uses streams.

>"\n"
Unportable. Use std::endl.

>std::string args[2];
Possible out of bounds reads.

There is probably more. Feel free to ask about anything unclear.
>>4645886 #
Anonymous
>>4624122 #
An awful lot of repetition.
Most of these function do roughly the same but with small different parameters.

Add auto-complete next.
>>4645886 #
Anonymous
4 KBlists.txt
I rewrote it.
>>4627526 #
>Also, use string commands instead of numeral ones.
I'm not sure what you mean. Like this?
add backlog "series name" or
count manga ?

>Not needed. The file is automatically closed by the stream destructor. RTFM http://www.cplusplus.com/reference/fstream/ofstream/close/
I knew about this, but when reading around for examples, a post on stack overflow seemed to suggest it's good practice to close explicitly. I guess that's wrong, then.

>Unportable. Use std::endl.
std::endl doesn't seem to be any more portable. It is the same as appending "\n" to the string and then flushing the stream.

>Possible out of bounds reads.
Yeah, it segfaults when there's more than one | in the input. I wasn't terribly concerned since I'm the only one who will be using this and I couldn't quickly come up with a nice solution.

>>4632471 #
>Add auto-complete next.
That sounds like a pain in the ass. I'll pass

Everything else were useful suggestions. Thanks for reviewing for me
>>4657937 #
Anonymous
>>4645886 #
>add backlog "series name" or
>count manga ?
Yes.

>but when reading around for examples, a post on stack overflow seemed to suggest it's good practice to close explicitly. I guess that's wrong, then.
So is mostly full of retards. You need to learn to filter the good advice from the bad and outdated. To do that you need to learn the language though.

>I couldn't quickly come up with a nice solution
Print error an exit program, if you detect that in the input.


/g/

「Decentralized Imageboard Network Design」

AnonymousExpandLast 100
As we all know, imageboards have been under an aggressive environment that is full of evil users who are always trying to take down boards in all kinds of ways including posting illegal contents and DDoS.

I've been wondering if it's possible to build a "public" decentralized imageboard network that is free from censorship and DDoS.

Some initial thoughts:
- File storage: IPFS
- CDN: IPFS public gateways
- Database: TBD
- https://github.com/orbitdb/orbit-db
- Cross-site federation protocol: TBD (https://en.wikipedia.org/wiki/Comparison_of_software_and_protocols_for_distributed_social_networking)
18 posts and 1 image omitted See all
Anonymous
>>4609764 #
>Requires accounts
Bullshit. It requires certificates which can be self-signed depending on the zite's configuration.

>not anonymous
And? If you think any imageboard is truly anonymous then you're being naïve.
You can Tor or a VPN to be as "anonymous" as any other "anonymous" imageboard.
>>4628525 #
Anonymous
>>4627907 #
>You can Tor
Zeronet has built-in Tor functionality, so you'll have no IP at all inside it as long as it's on.
Anonymous
>>3779320 #
Actually really like this idea. Solves a hell of a lot of issues.

Anonymous
>>4377681 #
>some good web frameworks
Ones you write yourself. If you don't, you are part of the cancer.

/g/

「help」

AnonymousExpandLast 100
GIqSnWaDsEx202 KB1680x1050Screenshot (13).png
i need some help bypassing the wifi controls

Profile information
-------------------
Version : 1
Type : Wireless LAN
Name : BparkKo
Control options :
Connection mode : Connect manually
Network broadcast : Connect only if this network is broadcasting
AutoSwitch : Do not switch to other networks
MAC Randomization : Disabled
Anonymous
sent ;)
Anonymous
What?