Updated (11/18/2018 Yet Again: I planned to stop, but then I wanted something. So here we are again. I added -onyomi-to-hiragana and -kunyomi-to-katakana. Updated (11/18/2018) Again: I added -rename argument. I added single operation !tag match. Updated (11/18/2018) Again: I added -strip-rmgroup argument. I added “!” not operator for attributes. Updated (11/18/2018): I added -strip-meaningless argument.
This is some pretty awfully specific, incredibly, more-than-usual, niche software. This program is for stripping and cutting out information from the kanjidic2.xml file as well as various other operations with the data.
This is a command line tool, these are the arguments… Input File (kanjidic2.xml) -i inputFilePath Output File (if you don’t specify a file, kanjidic2.modified.xml is created in input folder) -o outputFilePath Strip out kanji that doesn’t have a defined meaning (11/18/2018 update) -strip-meaningless Strip out non-ranked kanji (overrides -strip-meaningless) -ranked-only Order by ranking (none = unranked) -rank-order <low-high-none, high-low-none, none-low-high, none-high-low> Rank Limit (2500 being the maximum limit) -rank-limit <1-2500> English only, strips out Spanish, Portuguese, Hangul, Vietnamese, and anything not English/Japanese -english-only Strip out nanori -strip-nanori Strips out dic_number group, or specific parts of it -strip-dic-number [tagAndAttrs*] Strip out codepoint info -strip-codepoint [tagAndAttrs*] Strip out radical info -strip-radical [tagAndAttrs*] Strip out query code info -strip-query-code [tagAndAttrs*] Strip out misc info -strip-misc [tagAndAttrs*] Strip reading meaning info (11/18/2018 Version B) -strip-rmgroup [tagAndAttrs*] Rename tags (11/18/2018 Version C) -rename [renameSpecifications*] Convert OnYomi to Hiragana (11/18/2018 Version D) -onyomi-to-hiragana Convert KunYomi to Katakana (11/18/2018 Version D) -kunyomi-to-katakana
I was doing some math recently when I realized something was odd about a particular equation.
ax^2 + bx = 0 a times x squared plus b times x equals zero. This equation would normally be solved by completing the square and yada-yada-yada. However, I couldn’t help but notice the strange answer I got from this.
x^2 + 36x = 0 x = 0 or x = -36
This got me thinking, and after playing around on my calculator for a bit, I came to the conclusion of this handy shortcut.
Given ax^2 + bx = 0, x = 0 or x = -b/a
Try it out for yourself, no squaring and other crap needed.
5x^2 – 35x = 0
From this we know, x = 0 or x = 7
If we had to do it by completing the square…
1. 5(x^2 – 7 + 49/4) = 254/4 2. (x – 7/2)^2 = + or – sqrt(49/4) 3. x – 7/2 = 7/2 or x – 7/2 = -7/2 4. x = 7 or x = 0
Or the quadratic formula
1. 35 + or – sqrt((-35)^2 – 4(5)(0)) / 2(5) 2. 35 + or – sqrt(1225) / 10 3. 35 + or – 35 / 10 4. 7 + or – 7 / 2 5. x = (7 + 7)/2 = 7 or x = (7 – 7)/2 = 0
This shortcut answer does seem to have a relationship with the quadratic formula and vertex formula of a parabola, but I assume that since we’re accounting for 2 values of change and not 3, that that’s why you only have to divide by a and not by 2a. Not sure really though. I looked up and down for this shortcut on the internet and couldn’t find anything, so I decided to write about it.
Over the last weekend I wrote two new software for studying Japanese. 1) JP Study Buddy, and 2) Kanji Study Buddy – These complement my other program KanjiKana (2015). One provides a way to study words like flashcards with audio that you either collect or get off Google Translate in Firefox with my software FF Media Cache Grabber. The latter provides a way of inserting kanji into blank spaces to fill in the kanji of the word.
Image of prototype shown here.
The first one was prototyped in roughly an hour and a half and the 2nd program was prototyped in roughly 3 hours. This means I haven’t refined them much at all. It was basically just throw the code together as quickly as possible to make it work.
That said, I’m considering releasing Kanji Study Buddy. I’d like to refine it more first, but it definitely offers a different way of studying than what I’ve seen when I look around. Sometimes thinking differently does make a difference in remembering. Chime in if this program sounds like something you’d want.
*Note: Data files for Kanji Study Buddy look like this (using version 1 parser, since version 0 parser sucks) @version 1 味方 みかた 厳しい きびしい 昼ご飯 ひるごはん
Websites primarily consist of 2 main things, web files (php, asp, html) and databases (MySQL, PostgreSQL, Oracle). This kind of attack involved the first of the 2. It was a code injection into a site file.
Every file can be “hashed”, this means that through mathematical calculations it can turn any bytes of data in a file into a kind of unique identifier for that file. Which means that if anyone so much as added the letter “t” to a page, it would change the hash completely. It wouldn’t be hard to generate hashes for all of your clean off-site files, then upload those to the server and run a periodic hourly check on all files to make sure the hash hasn’t changed for any files. If the hash did change, then you’d know the website was compromised.
Just a thought about the next time you develop a web application with payment systems. Security should always come first.
Edit: Newer version available here. Edit: More crash bugs were found, but are only achieved by using the tool incorrectly. I may or may not fix those bugs.
This release fixes a crash bug that could happen when editing CAB files and doing a very specific pattern of events. This release also brings with it an extractor, if you want that. Personally, I’ll just keep using Bandizip to unzip CAB files.
I looked for 2 hours for Unicode CAB compressors and found nothing. What I did find was someone who wrote a Unicode-supported library for CAB files on CodeProject. I got my hands on it and fixed some minor bugs and compilation issues. Made a GUI, and walla, a modern x64 CAB compressor.
boldr, the multi-paradigm scripting language along with a new scanner, now has a new advanced parser, and soon will have a new virtual machine.
It’s extremely likely that it won’t have a stack overflow like the old one, MCNE, had a high potential for doing if you had too much code. This is because statements are cascaded now instead of being binary branched to the maximum stack depth. Most non-expression nodes have their own special node types making them more efficient than a regular AST, like MCNE was, and allows me to do more advanced functionality with the code than ever before.
When I’m done with the C# version, it will be ported to Cerberus X and likely C++ as well. If you want to support this project more, use the Patreon button above to support me.