Do you backup your game saves on windows? I spent months on some of the games, losing this progress would be troublesome.
Do you backup anything at all?
What's up with catalogue in /general/ not showing post count? Everywhere else you see the number of posts, but not here for some reason? I wanted to make a client for 4-ch to check for updates.
Or maybe I just didn't scroll all the way to the right or something.
I don't back up anything, I just trust in my computer.
Thesis: all programmers are faggots.
a few performance hints for c#
https://michaelscodingspot.com/avoid-gc-pressure/
https://www.sljfaq.org/afaq/encodings.html
Encodings of Japanese
http://www.rikai.com/library/kanjitables/kanji_codes.unicode.shtml
Japanese-style punctuation ( 3000 - 303f)
Hiragana ( 3040 - 309f)
Katakana ( 30a0 - 30ff)
Full-width roman characters and half-width katakana ( ff00 - ffef)
CJK unifed ideographs - Common and uncommon kanji ( 4e00 - 9faf)
CJK unified ideographs Extension A - Rare kanji ( 3400 - 4dbf)
0x20000-0x2A6DF CJK unified ideographs Extension B - Very rare kanji
So, I guess, most kanji can fit in 2 bytes of UTF16 codepage. Except some very very rare ones.
The unused 11th bit (0x0400) is used to increase the robustness of UTF-16 text. In the first 16-bit code, the 11th bit is always 0, and in the second 16-bit code, it is always 1. That way, if a file is truncated in the middle of a higher-plane character, a program can tell that it is reading the second half, and not corrupt the character after it.
shift-jis to utf16 C
https://gist.github.com/takamin/2752a45c5cb4d0f9d1ff
#include "stdafx.h"
#include <string>
//VC++ SJIS string を utf-8のstringに変換する
string sjis2utf8(const string& sjis) {
string utf8_string;
//一旦SJISからutf-16へ変換
LPCCH pSJIS = (LPCCH)sjis.c_str();
int utf16size = ::MultiByteToWideChar(CP_ACP, MB_ERR_INVALID_CHARS, pSJIS, -1, 0, 0);
if (utf16size != 0) {
LPWSTR pUTF16 = new WCHAR[utf16size];
if (::MultiByteToWideChar(CP_ACP, 0, (LPCCH)pSJIS, -1, pUTF16, utf16size) != 0) {
//次にutf-16からutf-8へ変換
int utf8size = ::WideCharToMultiByte(CP_UTF8, 0, pUTF16, -1, 0, 0, 0, 0);
if (utf8size != 0) {
LPTSTR pUTF8 = new TCHAR[utf8size + 16];
ZeroMemory(pUTF8, utf8size + 16);
if (::WideCharToMultiByte(CP_UTF8, 0, pUTF16, -1, pUTF8, utf8size, 0, 0) != 0) {
utf8_string = string(pUTF8);
}
delete pUTF8;
}
}
delete pUTF16;
}
return utf8_string;
}
I want to setup my own little text or imageboard, where can I get free hosting?
at kuz.com
>>12
Heliohost seems to be the standard choice, but if you're a little more serious about it you should really get a $5 vps, or just use an old computer for self-hosting.
I'm learning to use the Godot development platform. I do this by working through the 'Nature of Code' book.
Cool. I have no opinion on Godot, I know nothing about it. I'm learning winapi and gdi right now.
My hdd seems to have died, any way I can fix it? Should've made at least the list of all files on it.
Planes are tech too especially drones
https://www.youtube.com/watch?v=E_A_rEZoXSg
Do you know why windows that run with administrator privileges show up on top of other windows? This is annoying as hell, I can't alt-tab out of them anymore, I have to minimize them instead. This happens with cheat engine for example, or with vmware. This is probably a windows 10 thing, after some update.
This guy has the same problem, but damn it's hard to google something even remotely related. Of course no replies.
https://superuser.com/questions/1414298/switching-focus-away-from-windows-with-admin-rights
The other most annoying part of C, besides; semicolons; everywhere;, is not being able to goto over variable declarations.
>>25
Well, world war 2 is hopefully the last war to be fought with humans. Downside is that rich now have even less motivation to give a fuck about what people think.
char* from = (char*)from;
wow, compiler actually let me compile this.
Pseud0ch and Boon themes are so similar. Red nicknames with Boon sure look threatening.
Thinking of writing a greasemonkey/violentmonkey script for this site. Here is the hello world for it, hides the "Board look" selection.
===========================start===========================
// ==UserScript==
// @name New script - 4-ch.net
// @namespace Violentmonkey Scripts
// @match https://4-ch.net/*
// @grant none
// @version 1.0
// @author -
// @description Add description here
// ==/UserScript==
var k = document.getElementById("stylebox")
if (k) k.style.display="none"
============================end============================
I'm thinking about adding a board switcher under the header instead of using this sidebar, and some kind of notification mechanism when new posts show up. https://www.4chan-x.net could be a good reference.
In some styles catalogue looks horrible, in some it looks somewhat bearable. It feels like some styles were written for the older version of this site and just weren't ever updated.
Wasn't sure what would make a good separator for thread titles, but \n is perfect for it. There will never be newlines in thread titles.
Greasemonkey doesn't seem to be smart enough to let me store just any objects in it, only strings. So, I need to parse catalogue and store it as a string using https://wiki.greasespot.net/GM.setValue . I need that to be able to get notifications on which threads were updated.
Man, I'd really love a way of returning more than one value out of a function, there is no technical reason for them to not being able to. Math fucked with people's brains, because mathematical functions indeed result in one value, but real world not always works like math models, and "functions" are more like procedures anyway.
Golang actually allowed that, bless it, but it added garbage collection in its language too.
I know the standard workaround for it is either passing a pointer to a function, or just using global variables, but that's not quite the same.
I wrote this
for (var j = ii; j>0; j--) {
//something
}
But then rewrote it into this
{
var j = ii;
if (j > 0) do {
//something
} while (--j > 0)
}
I imagine "for" has one conditional jump at the start and one unconditional jump at the end, and "if do while" has two conditional jumps. I like the latter more, especially in cases where the first "if" isn't needed.
CSS question, how can I stop links from being wordwrapped? I have this thing:
/general//hobby//personal//req//tv//japan//games//music//literature//ascii//dqn//tech//iaa//language//nihongo//current/
And each is a link. They wrap like this:
/general//hobby//personal//req//tv//japan
//games//music//literature//ascii//dqn
//tech//iaa//language//nihongo//current/
But I want them to wrap like this:
/general//hobby//personal//req//tv//japan/
/games//music//literature//ascii//dqn/
/tech//iaa//language//nihongo//current/
If I'll do white-space:nowrap for each link, this entire thing stops wrapping.
There was a site, it worked just fine. But they just had to update it, now it takes about 2 minutes to load, shits ads everywhere, and has an audacity to say "Your browser is too old! Please update your browser so that it will (((work faster)))!". No update ever made things faster, it's always the opposite.
Interesting, so, to remove an element from a webpage in javascript you can either use element.remove(), which works since firefox 23, or element.parentNode.removeChild(element), which works since firefox 1. I guess I'll use the latter.
https://developer.mozilla.org/en-US/docs/Web/API/Element/remove
https://developer.mozilla.org/en-US/docs/Web/API/Node/removeChild
https://www.geeksforgeeks.org/how-to-remove-an-html-element-using-javascript/
In C/C++/C#, conditional breakpoints are very slow, I like to do this instead
if (something) {
do {} while(false); //set breakpoint here
}
It is only noticeable in loops that iterate a whole lot, like 100000 iterations.
>>40
Vote with your feet.
Use politics to encourage others to vote with you.
Almost done the "check which boards have new posts" greasemonkey script. 400 lines of code.
Damn, /nihongo/ threads like
(;;・m・) わたしわにほんごがわかりません。
save for me like
(;;�Em�E) �킽����ɂق��킩��܂���B
/nihongo/ board has Content-Type: text/html;charset=shift_jis , while almost every other board has it as text/html;charset=utf-8. And things break when I do AJAX like things from one board to another
xmlhttp.onreadystatechange = function() {
if (this.readyState == 4 && this.status == 200) {
var page = document.createElement('div')
page.innerHTML = xmlhttp.responseText.split(/<body[^>]*>((?:.|\n|\r)*)<\/body>/i)[1]
//alert(page.innerHTML)
page = document.evaluate('//*[@id="oldthreadlist"]', page, null, 9, null).singleNodeValue
katalog_parse(board, page)
}
}
>>45>>46
Solved. I can force XMLHttpRequest to give me binary data by using responseType = 'arraybuffer', which I then decode manually with TextDecoder
https://www.html5rocks.com/en/tutorials/file/xhr2/
Phew, was worried for a second. For a day.
Actually, still have some problems here. Most likely because of this thread
💘peri💘
probably emoji got TextDecoder confused
I'll just disable exception on failure.
In /dqn/ "all threads" page,
💘peri💘
is actually stored as
💘peri💘
in the html file. So, still not sure why TextDecoder fails there. It is in shift-jis, notepad++ confirms so.
Okay, this thingy works. It looks like this right now:
[st-][refresh][rf2][peek][merge] general(1) hobby personal req tv japan games music book ascii dqn(6) tech(1) iaa language nihongo current
/general/I miss the mid 00s
/dqn/[Inevitable] What will YOU do when the oil runs out? [Future Plans] (permasaged)
/dqn/DQN LINK SHARING FROM AROUND THE WORLD
/dqn/�y���{�̃L�`�K�C�p���z�G���r�X�y�����F�v�S�P�z
/dqn/CTRL+V THREAD! [part XVI]
/dqn/[Wikipedia] ITT DQN QUALITY Wikipedia Links [Part IV]
/dqn/ [Contentless] ITT you post right now [ASAP] your current thought [Brains][Thinking][Personal][#43]
/tech/is it possible to have fun programming
/dqn/ threads with unicode characters will look like this until I figure out how to unsuck TextDecoder. It is geniunly a shit api, the winapi MultiByteToWideChar had an option to ignore corrupted characters or to replace them with a character of your choice, but not TextDecoder, the only thing it knows how to do is to fall and throw an exception. To be fair it is marked as an experimental feature.
Next thing I need to do is youtube embedding, or rather youtube thumbnail and title grabbing and injecting it into the page. You know, you could've copypasted the video title if you weren't lazy.
>>54
words cannot express how disgusted i am with you
Can they express why you are disgusted at least? I don't want to actually embed, but showing thumbnail and title is pretty important. Rickrolling no more.
Nothing wrong with embedding titles and such 4chanX-style, it's more about the last sentence in your post. For lack of a better word, it seems grossly unbecoming of the place to pad out posts with metadata for links -- if the wording of the post doesn't already give an indication of what lies beyond on its own, it's probably better off without it. Part of the fun of the youtube thread (in particular) is not knowing what fellow DQNs have shared with you without first clicking on the link.
Ding!
(Actually, here's a better expression: "It looks gross." YMMV, others might don't mind as much as I do.)
I... can see the appeal of this randomness roulette. Sounds like a great way to waste your time though.
Interesting how notepad++ slightly changes the background color of the line you are on, while sakura editor (japanese text editor) and a few others instead add an underline. My guess is that winapi precashes every character you use, and same character but with different background/foreground colors are still independent characters from its perspective, so by changing background you will double the memory requirements.
I know that nothing stops you from using 3d hardware acceleration in your text editor, you will get free background transparency in that case. 3d accelerated text editor, this sounds so stupid.
oh, a 2ch browser, cool. I'm not going to use it because I can't read anything without rikaichan and such.
ttp://www8.plala.or.jp/uro/live2ch/
Uploading 4-ch.net Refresher.
https://files.catbox.moe/a1p3w9.txt
It parses katalog of every board on this site, and shows what threads were updated. Yes, even saged ones.
To use, install https://violentmonkey.github.io or greasemonkey or whatever people use nowadays, create new script, and copypaste it here
I'm bored. Hey, tell me about raspberry pi, the hell is it? Can you surf web/play videos with it? How expensive it is? What are some good alternatives? I see it as just a toy right now.
I want to learn how to play ogg files using directsound and howwasthatlibrarycalled.
api is good if you can remember how to use it without opening docs.
This board is unusable without something like that. Having a sidepanel for the list of boards that can fit on one line was annoying. Notifications is the basis of communication.
It would be better if it could hide threads too, or showed interesting threads above trashy ones. But this board is so dead I don't care, people barely bother to troll a board this slow.
Strange, I thought I bumped this thread, why it still shows up as thread #19.
Also I checked, and catalog is even a bit lighter than the main page of every board, so by refreshing the catalog you actually save traffic. The exception is the /dqn/ board, it has too many threads. Real japanese textboards store active threads and closed threads separately, this board is just a weeabooish copy. I wonder what software japanese textboards use.
I planned to have two buttons for different set of boards to refresh, but it was too annoying.
(comment to follow, please wait warmly etc)
Wait, permasaged? What? What?
Where is your fucking comment, faggot?
It's a neat tool and could definitely help revitalize the site; and not to rain on your parade or anything, but: Manually checking the boards for updates has been the stardard for almost two decades now, and I'm still deliberating whether or not to officially endorse it (and which form that would take)... Until then, I don't mind people stumbling across it on their own, but please use a little discretion! (read: I'll unpermasage the thread once these posts are out of the 10 most recent ones)
Also,
>[c/k]atalog
Thread list!! Or "subback.html" if you wish. ;)
Live2ch was the actual standard for the last 2 decades, if "Copyright (c) 2002-2020" is to be believed. Everywhere except for this shallow copy.
So, you're telling me to go ahead and schizopost in my solitude for another 10 posts. How nice. Sadly that's something I am too used to.
>Thread list!!
スレッド全一覧, could be both.
That fucking AHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH thread ruins the /general/thread catalogue for me, I can't see the right side of the table because of it. The date is pretty useless anyway, it's not even a creation date, but a last post date.
Fixed the katalog look, for Pseud0ch style. Install one of those.
https://github.com/openstyles/stylus
https://addons.mozilla.org/en-US/firefox/addon/styl-us/
/* ==UserStyle==
@name 4-ch.net better katalog
@description eh
@author eh
==/UserStyle== */
body.backlogpage {
background: #EFEFEF;
}
body.backlogpage #oldthreadlist {
background: #EFEFEF;
}
body.backlogpage #oldthreadlist tbody tr > td:nth-child(2) {
max-width: 512px;
word-wrap: break-word;
}
body.backlogpage #threads {
background: inherit;
}
So, is anyone here? Can we open a sekrit klub now, or this is merely an online notepad?
I really like the ability to only load a range of posts. This site doesn't really needs an api, it is simplistic enough by design, parsing html isn't that much harder than parsing json or whatever.
I need a livecd, what I should use? I'm thinking of downloading ubuntu livecd and put it on a usb stick, but I'm not sure if ubuntu can read windows hard drives well.
we get like 5 posts per day lol but it is still usable and i come here daily/bi-daily
>>88
linux mint. you can then personalise it later, but it is a good starting point
Megamari Replay Viewer
I'm talking about it here because it's rare for me to see an assembly program in the wild.
Guy who made it had to read Megamari assembly code, so he made replay viewer in assembly too just by inertia.
https://en.touhouwiki.net/wiki/MegaMari
https://www.mediafire.com/file/aqd6v8797vga8o6/Megamari_Replay_Viewer.zip/file
https://en.touhouwiki.net/wiki/Category:MegaMari_Replays
Code looks something like this:
ReplayFileProc:
mov ecx,iMegamariReplayCounter
cmp bRecordMode,TRUE
je WriteFileProc
add iMegamariReplayOffset,ecx
mov eax,iMegamariReplaySize
sub eax,iMegamariReplayOffset
cmp eax,REPLAY_FILE_BUFFER_SIZE
jbe @f
mov eax,REPLAY_FILE_BUFFER_SIZE
@@:
push eax
invoke SetFilePointer,hMegamariReplayFile,iMegamariReplayOffset,NULL,FILE_BEGIN
pop eax
invoke ReadFile,hMegamariReplayFile,lpMegamariReplayBuffer,eax,ADDR dwNumberOfBytesRead,NULL
test eax,eax
jz AccessDenied
retn
WriteFileProc:
push ecx
invoke SetFilePointer,hMegamariReplayFile,iMegamariReplayOffset,NULL,FILE_BEGIN
invoke WriteFile,hMegamariReplayFile,lpMegamariReplayBuffer,iMegamariReplayCounter,ADDR dwNumberOfBytesRead,NULL
pop ecx
add iMegamariReplayOffset,ecx
test eax,eax
jz AccessDenied
retn
>>62
This drops it's dlls into C:/Windows/System32, if we never meet again this is why
>>62
Tried this, it actually displays ads. How very japanese. Well, guess what I'm not going to use.
https://github.com/Open-Shell/Open-Shell-Menu
This thing is good
Made violentmonkey script that adds previews for /img/ links right into the page. Turning textboard into imageboard. I need to figure out how to turn imageboards into textboards next, I know that I can just disable images completely, but that also disables captcha.
// ==UserScript==
// @name 4-ch.net image previews
// @namespace Violentmonkey Scripts
// @match https://4-ch.net/*
// @grant none
// @version 1.0
// @author -
// @description Adds image previews for /img/ links.
// ==/UserScript==
function load_html(evt) {
var iterthis = document.getElementsByTagName("a")
if (!iterthis) return
for (var i = 0; i < iterthis.length; i++) {
var a = iterthis[i]
if (a.href.startsWith("https://4-ch.net/img/src/")) {
var filename = a.href.substring("https://4-ch.net/img/src/".length)
var index = filename.lastIndexOf(".")
filename = filename.substring(0, index)
//alert(filename)
var img = document.createElement("img")
img.src = "https://4-ch.net/img/thumb/" + filename + "s.jpg"
var br = document.createElement("br")
var nexta = document.createElement("a")
nexta.href = a.href
nexta.rel = "noreferrer noopener nofollow"
nexta.target = "_blank"
add_after(a, br)
add_after(a, nexta)
nexta.appendChild(img)
add_after(a, br)
i+=1 //skipping over "a" we just created
}
}
}
function add_after(referenceNode, newNode) {
referenceNode.parentNode.insertBefore(newNode, referenceNode.nextSibling)
}
window.addEventListener('DOMContentLoaded', load_html, false)
Made greasemonkey script to make browsing 5ch slightly less annoying. I suspect that the old style redirect exists mostly to show ads.
// ==UserScript==
// @name 5ch.net less annoying links
// @namespace Violentmonkey Scripts
// @match https://*.5ch.net/*
// @grant none
// @version 1.0
// @author -
// @description Make links slightly less annoying to open
// @run-at document-start
// ==/UserScript==
//https://developer.mozilla.org/en-US/docs/Web/HTML/Link_types/noreferrer
//https://www.reliablesoft.net/noreferrer-noopener/
//<a href="somelink" rel="noreferrer noopener" target="_blank">
function load_html(evt) {
var iterthis = document.getElementsByTagName("a")
if (!iterthis) return
for (var i = 0; i < iterthis.length; i++) {
var a = iterthis[i]
//alert(a.href)
if (a.href.startsWith("http://jump.5ch.net/?")) {
a.href = a.href.substring("http://jump.5ch.net/?".length)
} else if (a.href.startsWith("https://jump.5ch.net/?")) {
a.href = "http://" + a.href.substring("https://jump.5ch.net/?".length)
}
}
}
window.addEventListener('DOMContentLoaded', load_html, false)
Hm, to get a thumbnail for https://i.imgur.com/gTIU1UVh.jpg , you replace the last h with t
https://i.imgur.com/gTIU1UVt.jpg
imgur thumbnail
https://webapps.stackexchange.com/questions/16103/is-it-possible-to-find-the-thumbnail-of-an-existing-imgur-image
Guys, http or https? Imgur supports both. Https is encrypted, so it's harder for middleman to read what you are reading. But because it is encrypted, online caching doesn't work anymore. For mails and other such matters encryption is a must, but for funny images it probably isn't that necessary?
updated qbittorrent, now it lags horribly. Especially when you download around 200 files at once, I have to keep downloads to about 10 files at the time for it to be tolerable. The UI itself lags. Fuck I hate Qt.
Next I need a way to hide threads, and to give threads you like priority over others.
I know, right? Doesn't require an email, loads very fast, somebody actually reads it. The downside is that anyone can shit it up if he really wants to.
Blogging is the only thing dead boards are good for. And even that barely.
How do I link posts 97-100 without adding op? Something like >>n97-100?
Added ajax like [peak-] button. Now I don't have to open each thread individually.
https://4-ch.net/img/src/1646166409855.jpg
Will maybe upload it after I test it for a bit.
http://rufus.ie/en/
tool for creating bootable usb, both windows and linux
Thinking of making a way to hide threads. I just did a lazy thing and set height:3em and overflow:hidden.
height 3em https://4-ch.net/img/src/1647106923434.jpg
height 1.25em https://4-ch.net/img/src/1647107204253.jpg
Nobody reads threads that aren't on first page, pitiful.
Is kareha unable to close a thread rather than permasaging or deleting it?
really?
cuz ieed to ask about voxel modelling
I think I will move to /tech/ after all. Maybe I'll still use this thread occasionally.
I'll post everything javascript and violentmonkey script related into https://4-ch.net/tech/kareha.pl/1637254723/l50 Javascript and webdev thread, and general questions into https://4-ch.net/tech/kareha.pl/1125953617/l50 [HELP] Single questions & Help Thread [n00b].
https://www.youtube.com/watch?v=5n90WohCSIg
Ross's Game Dungeon: Follow-up Episode #3
11:35 has an interesting explanation of how Microsoft was intentionally killing PC gaming for 15 years in hopes that xbox will catch on.
I've looked a bit into godot, and it is an interesting game engine that seems at its best when making mobile 2d games with advanced 2d animation, and also allowing to play such mobile games natively. Of course making separate native application for every platform will produce a more high quality software, but I doubt your players even notice the difference.
I wonder how perl is compared to python. Python looks more comfortable to use, but maybe perl itself is less complicated than python under the hood? I haven't seen source code of either.
>>124
They both also have a half-baked OOP support (unlike Ruby!) Perl also has great regex support and the PerlMonks community. However, Python community is larger overall. All Python, Ruby and Perl are pretty easy to learn.
sagenoko works like sage, but still throws me at the board page.
How about nokosage?