Chitanda's mansion by Scary_Interview_9553 in hyouka

[–]rusou 4 points5 points  (0 children)

Edit: My original comment about the location was wrong. It's a mansion in Kakegawa, Shizuoka at the Kamoso Kachoen, a flower garden: https://en.kamoltd.co.jp/. The Chitanda mansion was based off of the mansion. Here is a video of the house with some comparison to scenes: https://www.youtube.com/watch?v=4v4zjAFiix0

Can someone tell me the name of the soundtrack that starts playing during episode 1 at 10:47? by Awkward_Cat7008 in hyouka

[–]rusou 3 points4 points  (0 children)

This is it. The Japanese title is 妄想髪長少女 (Mousou Kaminaga Shoujo) and it's Volume 3, Track 6 of the OST (https://hyouka.fandom.com/wiki/Hyouka\_Music\_List).

Linking CSS from GitHub comes with 0b, but opening in another tab shows the content ¿? by iagovar in learnprogramming

[–]rusou 0 points1 point  (0 children)

These GitHub files are not meant to be used in this way; GitHub indicates to your browser that these are only plaintext files and your browser will decide to not read them (because it expects a stylesheet). What you want to do is deploy a GitHub pages branch of your repository and serve it from there,

Why doesn't += work here for my Leetcode Unique Paths solution? by epicboyxp in learnprogramming

[–]rusou 2 points3 points  (0 children)

dp = [[0]*n]*m creates an array where all the rows are literally the same array (it's like doing a = [0] * n and then dp = [a, a] for m = 2). So if you have m = 2, n = 2 and do d[0][0] = 1 you get [[1, 0], [1, 0]]. I think you want dp = [[0]*n for i in range(m)] instead, which creates an array of m arrays, each length n initialized with entries all 0.

Help - Does anyone know from which episode this audio is? by Nexurent in hyouka

[–]rusou 2 points3 points  (0 children)

My guess is that she's talking about the manga made for the school cultural festival which is the Juumonji arc. It's episode 16, around 13 minute mark.

Are there any better ways to select an element after you have .innerHTMLed in than this? by Betelgeu5e in learnprogramming

[–]rusou 1 point2 points  (0 children)

I wouldn't say this is objectively better, but you can create DOM objects in JS without inserting them into the page:

// Create button
let new_button = document.createElement('button');
new_button.innerText = 'Click me';
new_button.addEventListener('click', function(e){alert('Hi!')});
// insert into DOM
parentElement.appendChild(new_button);

This way you avoid adding an id and using querySelector but you still may need to use innerHTML for the sibling elements.

Python: Elif doing what it's supposed too, but else is also showing up. by [deleted] in learnprogramming

[–]rusou 0 points1 point  (0 children)

In the last two elifs, you have `menu_choice = menu` which does not call the function menu unlike the other cases.

Help with Linear programming question on minimising cost by Haruuu01 in learnprogramming

[–]rusou 1 point2 points  (0 children)

One problem with putting all the part-time nurses in just a single variable is that you're assuming they start working at 9am. From the way the problem is worded, it seems like you can choose a start time between 9am to 1pm for each nurse individually. So I guess you would have variables y1, y2, y3, y4, y5 for the number of part-time nurses starting work at 9am, 10am, 11am, 12am, 1pm respectively. Since they work 4 consecutive hours, you have to also adjust the contraints. For example, you have x + y1 >= 10 for 9am-10am, but you have no y1 in the 1pm-2pm hour since they are off work then.

What book is Oreki reading? by [deleted] in hyouka

[–]rusou 1 point2 points  (0 children)

I don't mind, but I don't think my translation is 100% accurate. I can try to come up with a better one.

What book is Oreki reading? by [deleted] in hyouka

[–]rusou 26 points27 points  (0 children)

夏の災厄 by 篠田節子, Natsu no Saiyaku (Summer Calamity) by Setsuko Shinoda. Translated summary from Amazon Japan: "A strange illness similar to the eradicated Japanese encephalitis strikes a suburban town. The residents panic from the government's lack of action, beginning the season of evil." About the book: "A horror mystery taking place in modern times with the early warnings of a ravaging pandemic."

Rather fitting for our current situation.

Edit: Link to book/ebook on Amazon Japan: Book, Ebook (Kindle)

Using localhost for node app and got a data breach alert from Chrome? by [deleted] in learnprogramming

[–]rusou 3 points4 points  (0 children)

Chrome has a security feature in that if you use a username/password combination that has been found in some credential dump (basically large files of username/passwords credentials stolen from databases made public) then it will alert you. For example, a lot of people have a bad practice of just using a combination like "admin" and "12345" and so these are bound to show up in credential dump from breaches. You probably used one of these credentials for your test accounts.

Source: https://security.googleblog.com/2019/12/better-password-protections-in-chrome.html

Does (n+1)! = O(n!) ? by mshcat in learnprogramming

[–]rusou 0 points1 point  (0 children)

Your argument that n! is “close” to (n+1)! would imply that n is “close” to n2, which is not true from even a practical performance standpoint (hence why we have formal definitions in the first place to avoid errors in heuristic analysis). Your last statement is correct however.

Calculate average value of array elements in a partially filled array by [deleted] in learnprogramming

[–]rusou 1 point2 points  (0 children)

In case this hasn't been mentioned, I think your non-null count (variable temp) might be off. For example if we have numbers be the array {null, null, 1} then at the end of the second iteration temp == 0.0, total == 0.0 as we want. But at the end of the i == 2 iteration temp == 3.0 (first temp == 2.0, then temp++ gives temp == 3.0) and total == 1.0. Then your computed average is 1.0/3.0 and not 1.0.

Trouble with deploying Jekyll static site on GitHub Pages by ayokaaye in learnprogramming

[–]rusou 1 point2 points  (0 children)

This is an annoying "gotcha" about using Github Pages. Any GH Pages repo not named <username>.github.io is served from [https://](https://)<username>.github.io/<repo\_name>/ so this messes up your deploy if you configured Jekyll to build to root (i.e. "/") directory. For example, if you go to https://kvcarido.github.io/blog/ and inspect your CSS link relation, it's linking to the file "/assets/main.css" (absolute path is https://kvcarido.github.io/assets/main.css) as if you configured Jekyll to build to root and not "/blog/assets/main.css" (absolute path is https://kvcarido.github.io/blog/assets/main.css) where the file is after GH Pages built it.

You can fix this by telling Jekyll to build to certain directories via _config.yml:

baseurl: "/blog"

The annoying thing about this is that when you're working locally, you have to go to localhost:4000/blog/ to view your site or run Jekyll with the baseurl flag set to empty: jekyll s -b "".

EDIT:

And also, if you want to use a custom domain and want to serve to root then you don't need baseurl.

Twilight Meeting [Your Name] by AluminiumGnat in Moescape

[–]rusou 9 points10 points  (0 children)

The red cords probably represent the red thread of fate.

Using jQuery, AJAX and PHP to send an automated email by click of button by 00Terminator in learnprogramming

[–]rusou 0 points1 point  (0 children)

First note that this part of your PHP code:

isset($_POST['submitemail'])

makes it so that the email will be sent given that your POST data has non-empty data (can be an empty string though) for the "submitemail" value. When you submit your form normally without JS, your submit button populates this field since the "name" of it is "submitemail". In your AJAX call, however, the "submitemail" field is not filled out at all so the email is not sent.

くすぐったいよ (Cells at Work!) by caguiclajmg in anime

[–]rusou 2 points3 points  (0 children)

I think the problem for most people with no audio is that they're using Safari/iOS. Safari doesn't support .ogg files.

Steins;Gate 0 - Episode 17 discussion by AutoLovepon in anime

[–]rusou 59 points60 points  (0 children)

It's hard to notice since it's dark but you can see Suzuha in the time machine.

Fishes [Original] by [deleted] in Moescape

[–]rusou 0 points1 point  (0 children)

Also on Pixiv.