Friday, August 14, 2015


[UPDATE 3] Removed the unnecessary function ClearBits() and its calls to result in >3x performance increase on adding bits (benchmark times updated).

[UPDATE 2] Changed out arithmetic operators for bit-wise operators as well as omitting the use of Math.Floor for a result of ~20 percent speed increase in setting bits (benchmark times updated).

[UPDATE 1] Fixed a bug where the 8th bit added is always set to True(1).

I previously made a class called TBitArray with the purpose of storing individual bits. At the time I didn't know that .Net already had a BitArray class which I could use so I made mine. I then thought well if I have an array I might as well make a list version as well. At the time I never got around to it. Then time passed and I started work on my encoding schemes. I needed to store bits that would resize as needed but I was lazy and instead stored each bit as a byte (yeah waste of space I know). This time I am working on a potential image format for my game. For this format everything is encoded and decode by bits and so again I needed something that would resize as needed. This time though I actually got to working on it. I know that one can resize the BitArray that is built into .Net but I did some benchmarks and well its VERY slow. So with speed and dynamic size in mind I set out to create a BitList class to make my life easier for this and potentially future projects. And I am sharing it here for those who may want to use it. I will provide the benchmarks first to show the difference. If anyone has any suggestions please leave a comment :)

As you can see BitList is much faster at adding bits when size is unknown and where size needs to be changed dynamically.
If you know exactly the number of bits needed please use the built in BitArray instead as you can see it is much faster at setting bits.

This class was made for my purpose of adding bits and not the constant manipulation of bits in memory. So if you need to constantly add bits this might be for you. The bit manipulation implemented is only for light use as it is slower than bit manipulation with BitArray, though slow it is still reasonably fast. Just use it where appropriate is all I'm saying.

Note: This class only implements the functionality that I myself needed, it does not provide other functionality that a typical List(Of T) has. If you need them you may implement them yourself or I might add this when my needs apply. I guess this is much closer the a queue then a list but too lazy to rename it lol. I could have also used a BitArray to store the lookup table but anyone who wants to do that is free to.

Code (VB.Net):

Saturday, August 8, 2015 with keyboard support

So my little brother's friend found this 'mod' for but he didn't know how to use it. I took a look and it linked to some survey site shit which automatically if anyone knew anything about looking for these thing online and running into surveys etc... its all crap. So instead I decided to make an app that allows one to play with keyboard.


Info: made in .NET via VB. Uses E, S, D, F for movement, and R to enable/disable keyboard movement support (and shows/hides the mouse cursor).

Saturday, August 1, 2015

Cleaning up a Yamaha PSR-310 keyboard

So I recently got a used keyboard because I wanted to learn piano eventually. The one I got was very dirty and there were scratch marks, the keys were stiff as well as stuck, and the lowest C key didn't even work. I thought hey lets clean this up and thus started my overnight project (started at ~12:30AM).

First I had to disassemble the keyboard of course:

The thing was nasty inside:

Is that semen?

There was a bit of rust

So I got to sanding

The membrane was nasty as all hell, cleaned it with a dirty shirt, I think it has to go in the trash now

SOOOO much better :)

Rubber pads are nice and clean as well

Now to get to the keys

As you can see its pretty nasty on the outside too

Black keys are cleaned though still wet

Put the membrane back into the keypad frame

Placed the rubber pads on aswell

Now to address the original issue, Time for some lube

Lubed highest key and first key pair and assembled

Onto the second




Finally placed the key assembly back into the keyboard enclosure

Consequently the lowest C key now works AWESOME lol. Completed ~5:30 AM.

I used soap, bleach, and alcohol as cleaning solutions.
Cotton swabs for fine cleaning and lubricating.
Regret using toilet paper to clean, as well as using my dirty shirt.

Thursday, May 28, 2015

[Release] JSXviewer 0.5b source

I don't know if I will ever get back to this but I decided that the program should be open a while back. It didn't really get that much attention and no one looked into improving/changing/rewriting/finishing/etc it. So I will post here in case people didn't know. The src is in and isn't commented as much as it should but here it is, do with it what you will lol.
Please if you have any suggestions or other feedback let me know in the comments.

Tuesday, April 21, 2015

[Planned] XwitchBot3

    Welp I haven't worked on/updated XwitchBot2 in forever but I do want to get back to it but I don't think anyone is using the plugin system to the extent I wanted, I don't think anyone besides myself has made any plugins for it. I don't plan on removing the plugin system or anything like that, if anything I want to expand it even more. I will be planning on potentially a third version of XwitchBot, one that is hopefully more polished then XwitchBot2. Now this is planned, whether or not it will ever be completed is another matter completely as I will be working on this in private if/when I am. I just wanted to say that I have been thinking about how XwitchBot's development has been, or lack thereof and wanted to stop neglecting it lol.

    Of course every reversion of XwitchBot has had a GUI overhaul and I think XwitchBot3 will be no different in that it too will most likely get a GUI overhaul. I'm picturing something similar to steam's UI but its not concrete yet a concept. There are other features that I think will benefit XwitchBot like possibly implementing some form of scripting. I don't know if I will be using an already available language or Frankenstein my own if I do plan on implementing one, of course implementing an existing one sounds much more practical.

    While this will be a reversion many aspects will be reused from XwitchBot2 just like how many aspects of XwitchBot2 were from XwitchBot. Things like I said the plugin system are there to stay, and the TwitchAPI from XwitchBot2 will still play a big part. I don't know what this blog post will ultimately amount to if anything but it's just ideas that I have been thinking about and of course if this comes to fruition XwitchBot3 is free, and will always be free like its always been.

UPDATE 8: Just another screenshot after fixing some UI alignments with some actual channels

UPDATE 7: Worked on the UI for each channel, some things are working now, still need to move several things around and implement others. Added donate button and home button that will eventually link to XwitchBot3 page but here is what it looks like so far:

UPDATE 6: Redoing the UI. It will be similar to XwitchBot2 versions but with adjustments to accommodate the new features. It isn't complete but much has been done. Currently it can connect to Twitch, Login using OAuth, Join channels. It cannot display messages or send them yet.

UPDATE 5: Got multichannel fully implemented and working, it also keeps track of the users in each channel. Added several MessageTypes for ease of plugin creation. Added proper parsing of initial twitch userlist (irc 353) and also added a type to tell the bot when the userlist ends (irc 366). Bot can only see registered users in the chat so the number of people shown on the bot vs the number of people on the stream will differ. Added MessageType (irc 421) for unknown commands so the bot notifies the user of any mishaps. Added parsing for originating channel of a message because the bot now has to keep track of messages from multiple channels. I will be implementing the ACTION aka /me MessageType and also the Points system as well as the AccessLevel system (differently levels have permissions to do different things). I also plan on slightly modifying the UI but only slightly since V2 UI is good enough.

UPDATE 4: Worked a bit on the YoutubeRequest class again. Added a bit more of the iframe API, I don't think ill add anymore of the API. Added a check for songs that don't start. Once a song is set to be played, and failed to start playing within 5 seconds the song will be skipped and the next song will be set to play. The duration to wait and see if the song starts can be changed (in milliseconds) in the constructor. There are 2 added events to the YoutubeRequest class. A polling event which presents the player's status such as song duration in seconds, the percentage of the song thats been buffered, the current position in seconds of the song, if the video is muted, and the current song's volume, as well as the current players state (is it playing, paused, etc), this polling is triggered every half second.

UPDATE 3: Well I will be changing some changes from UPDATE 2. In UPDATE 2 I planned on having the IRCclient be able to have multiple instances meaning each IRCclient establishes its own connection to the twitch server. I originally thought that because twitch's IRC is broken it couldn't join different channels through just one connection. From the website each tab I'd imagine creates a new connection and so I went to do it that way. Today though I remember a few of my friends who use HexChat to connect to twitch chat and I think I remembered them saying they can connect to different channels and so I went and tested. I can indeed connect to different and multiple channels. So I will be changing the bot in that respect. There will only be one instance of the IRC client again but It will be modified to handle multiple channels. I have also improved the message buffers and made the Message Structure simpler. The UserList is now moved inside of the IRCclient Class (it cant manage multiple channels yet, but will get to it). Because the PONG reply to PINGs is always the same (PONG I made it so that it replies only that and removed all parsing of the PING messages. When a PING is received a predefined byte array containing (PONG will be sent. Added more exception handling. Date/Time of messages in timestamps are set when the messages are received compared to previously where the Date/Time were set when the message was displayed in the chat. Sent message structure also has Date/Time now instead of setting the time when the message is displayed (this might be more accurate but timestamps might be out of order when displayed, I might change it back to how it was depending on how it turns out).

UPDATE 2: Reworking the core of the bot today. I made the IRCclient for the bot more robust. Put the message formatter (made because twitch's IRC protocol is broke as all hell) inside of the IRCclient class so that each instance of the IRCclient has its own formatter. Put the received message buffer and sending message buffers inside of the IRCclient class so that each IRCclient instance has its own buffers for the ability for multiple instances of an IRCclient (for multiple connections ex: connecting to multiple channels). Each IRCclient instance will have their own configuration (Server, Port, Channel, Nick, OAuth, etc). UserList parsing will also be available to each IRCclient instance so that it doesn't bunch users from all channels. Going to be moving the IRCclient class to Core class so plugins can access the IRCclient class (instead of making their own, which is a waste of time). Added PONG priority which will hold off on sending normal message so that PINGs are replied with PONGs sooner than later. Will be making a base class for the plugins interface so instead of implementing the XBPlgn interface, you inherit the XBextension class (you can still implement the interface if you want). Will be adding a database to the core of XwitchBot to keep records of things for the bot and for plugins as well (if needed). There will only be one instance of the database so that there is no conflicting records between plugins and the bot itself.

UPDATE 1: Worked on YouTubeRequest. Made a new class that implements more of the youtube player iframe API. It can play, pause, stop, seek, set volume, get duration and get the buffered percentage. I plan on reworking the plugin interface, and move the plugin system out of the bot and into the points system I will be implementing. The flow looks like this:
That way people can decide which plugins require points to use without programming each plugin to do so. I do plan on a UI overhaul but haven't yet thought of anything concrete.

Tuesday, March 10, 2015

Quick and Dirty .Net BigDecimal Implementation

[UPDATE 4] Providing the new source code below.

[UPDATE 3] I rewrote the entire thing and improved the speed by ~5x to 10x compared to the source provided below. Removed all string manipulation hacks for calculations and added several other things for ease of use in code. I compiled it to a dll for ease of use.
Reference the BigDecimal.Dll,
     "Import TizzyT"
     Optionally you can also "Import TizzyT.BigDecimal"
     Dim bigNumber as BigDecimal = "51316561513854163416165416163163165613.1473415424496255785965457458965348754854856"
     Dim bigNumber as New BigDecimal("51316561513854163416165416163163165613.1473415424496255785965457458965348754854856")
The constructors accepts these types as the parameter:
String, BigInteger, Decimal, Double, Integer, Long, Single, UInteger, ULong.
Supported Operators: /, *, -, +, ^, Mod, =, <, >, <=, >=, <>
There are no BitWise operators.

[TODO 1] Add e constant calculation function and Phi calculation function. Add pre-calculated values to the first 65535 digits for Pi and e (and other constants in the future) for fast lookup and only calculating when needed. Fix potential rounding issue in the divide function. Support parsing and simple calculations with imaginary numbers. Raising to decimal powers.

[UPDATE 2] Added Pi function which (calculates Pi to the specified decimal place).

[UPDATE 1] Added square root function (calculates the square root to a specified decimal place).

    Now many of us I'm sure have gone to Wolfram Alpha and have done some calculations and get very precise answers. I thought why cant I just make a calculator that runs on the computer instead of relying on a website. The problem here is that I typically write in .Net and as far as I know in .Net there isn't yet a BigDecimal implementation though I hear something called Rational Number will be in the future (correct me if I'm wrong). .Net as of 4.5 does include BigInteger though and I figured "hey I can surely manipulate that to do decimals". So by playing with powers of 10 and some string manipulation I threw together this quick and dirty BigDecimal implementation. It does most of the basic arithmetic operations (add, subtract, multiply, divide) and also includes modulus and a limited power operator (only decimals to integer powers allowed).
It also has most of the basic comparison operators (=,<>,>,<,>=,<=).

     I didn't implement a way to do powers (exponents) of decimal numbers to decimal numbers as I don't know of any way to do arithmetic that are to the power of a decimal number. This is one of many things Wolfram Alpha and other tools are still useful for. I did however add a power operator where you can raise a decimal number to an integer power. Again this was a quick and dirty implementation by use of an already existing BigInteger and some string manipulation so this is more of a workaround then a full and proper implementation. With all that said this works as it is intended and I just thought I'd share this for those who want to have such capabilities and/or not want to make their own or use one that others have made (for what ever reason). Below is the source in, feel free to critique it constructively or even suggest improvements/additions/corrections/other changes (they are always welcome) in the comments, even link to other/better implementations for others to learn from (including myself lol).

     Here is a brief and simplified explanation of how the operators work (take note of the number of digits after the decimal places, trailing zeros after the decimal are omitted).
How Addition is done:
     ex: 2.5 + 3.56
     250 + 356 = 606
     606 * 10^-2 = 6.06
How Subtraction is done:
     ex: 3.56 - 2.5
     356 - 250 = 106
     106 * 10^-2 = 1.06
How Mulitplication is done:
     ex: 1.23 * 2.34
     123 * 234 = 28782
     28782 * 10^-4 = 2.8782
How Division is done:
     ex: 2.75 / 1.23
     27500 / 123 = 223.5772...
     223.5772... * 10^-2 = 2.235772...
How Modulus is done:
     ex: 81.913 mod 1.89
     81913 mod 1890 = 643
     643 * 10^-3 = 0.643
How Powers is done:
     ex: 3.86 ^ 3
     386 ^ 3 = 57512456
     57512456 * 10^(-2 * 3) = 57.512456

New Source:

Old Source:

Free for non commercial use. All changes to source must be provide here.

Sunday, February 15, 2015


Here is a little app that will help rename files with the wrong or missing extension by getting its signature. You must know the signature before hand and the extension you wish to append to the file.


The program relies on a file called "sig.txt" to know what extensions and signatures to name and look for.
The format of the list is {extension}={signature}.
example for a .zip file: "zip=504B0304" without quotes.

 ExtensionBySignature.exe [Input Directory(s)]
 ExtensionBySignature.exe /n [Input Directory(s)]

 Every session is saved in a log upon completion.

 /n , /N = NonDestructive mode (files will not be renamed but the log file will stay the same)

Note: Multiple input directories can be used, just make sure to space them from one each other and use quotes where appropriate. If a file already has an extension and the program is going to rename it, the new extension is appended to the end (keeping the old extension in the file name) for future reference in case knowledge of what the previous extension used is needed.


Wednesday, February 11, 2015


Well here is something to kinda parse the syscon communication (not everything is parsed). It sorts out the packets and is able to output read and write operations to a file.
Apparently these dumps may contain the QA token and so be very careful with those files.


PS: Brought about by zecoxao's request for the parser.

Tuesday, January 20, 2015

XMB Wave

     Here is a XMB wave video that I edited from the original to look a bit better (imo) and also to higher the resolution (1080). It might be used for video backgrounds or something, I just thought I'd leave it here.


Here is the original to which I edited:

1) This is the Blue XMB only.
2) The blue is more subtle than the one from the original video.
3) Made the sparkles smaller.
4) Wave is sharper.
5) Banding is corrected.

Thoughts about original video:
1) The video is a lower resolution then I would have liked.
2) The banding was pretty bad.
3) The video is not truly seamless but instead it kind of looks seamless (actually an overlay where 2 wave states are similar).
4) Bit rate was too low hindering the overall quality of the video (to be expected due to it being used for Dreamscene so I guess it's understandable).

Wednesday, January 7, 2015

Project Euler Problems

     The same friend of a friend that got me motivated to make the SudokuGen also showed me this website with these challenge problems and since I have nothing to do these days and am bored anyways, I thought I'd start solving them.


     One of my friend's friend (I just met him recently) shared some code with me which turned out to be a Sudoku puzzle generator in Java. I don't really know or like Java but it gave me motivation to try my hand at making my own. My algorithm is different from his and I don't really know much about Sudoku generation but enough trial and error and my method works pretty well now. The one big difference from what his has and mine doesn't is backtracking, mine just retries from scratch if it hits a dead end. After improving my algorithm a bit I then went to tackle adding backtracking but that was giving me more of a headache then it should've so I just gave up lol. After this one I have learned a bit and I might plan on making another one using a slightly different algorithm but it should allow me to implement backtracking easier.

As always leave any feedback or suggestions in the comments

Got around to commenting my SudokuGen code (VB.Net) and modified a couple things as well:

Finally here is the source to my Sudoku puzzle generator (VB.Net/Java), on my computer it generates 1000 Puzzles in about 45 seconds, it is by no means fast but fast enough for practical purposes I imagine.

Here are 1000 Sudoku solution outputs :

Tuesday, November 18, 2014


   I looked around on the internet to see if there was any way for me to store individual bits in an array. The BitArray class exists but it states that it uses booleans to represent bits. I then went to look at how large booleans are. MSDN says it varies and on several threads the size ranges from 2-4 bytes. I haven't done any testing to see how much the actual size of booleans when used in the BitArray class but I went a head and threw together this TBitArray class anyways. Bits are stored in a byte array but each bit in the array is given an index instead of each byte given an index. 8bits = 1byte array, 9bits = 2byte array, 16bits = 2byte array, 17bits = 3byte array etc...

As always this might not be the best approach or implementation, if you have any issues or suggestions please leave a comment.

Sunday, October 12, 2014

XwitchBot2 [BETA] Release

This is the BETA release for XwitchBot2. It implements most if not all intended functionality (at least ones I remembered). Plugins will come slow and the Raffle plugin included is a dummy plugin to test plugin system. If any issues are found please comment.

Only the ZIP file is needed.

UPDATE - Oct 14, 2014:
Fixed a bug in Chat menu option not reverting to dark gray.
Fixed a bug in the plugins selection menu that causes crash.
Fixed a bug in several basic twitch IRC commands that causes crash.
Fixed a bug in plugins command processing that causes crash.
Fixed a bug preventing application from closing properly when expected.
Corrected message username to display "XwitchBot" instead of the current Nick when expect.
Added Restore option to system tray icon.
Added Command Line Argument to set bot's OAuth.
Added Command Line Argument to set owner's OAuth.
Added Command Line Argument to set server.
Added Command Line Argument to set server port.
Added Command Line Argument to auto connect.
Added Functional "Retarded" plugin, with dummy UI.
Changed Title name to state "Nick" and "Channel".

To make plugins use the Core.dll although this is only BETA the Core.dll might change before final version (though unlikely).
Here is a screenshot:

Here is a basic starting point for making a plugin:
Start a new project.
Select Class Library.
Create a new User Control in the project, call it UI.
Set the Size property to 842, 488.
Lock the control.
Add a Panel to the form.
Change the Panel's Dock property to Fill.
In the <YourPluginName>.vb file follow the below example

Sunday, August 10, 2014

McCollough Effect

Made a little program because I got bored. It induces the McCollough Effect.
While the wiki says you should look at each image several seconds at a time it didn't specify so I just used 5 seconds intervals.
You will first be shown a black and white image with horizontal and vertical grating for 10 seconds. You will then be shown a red with horizontal grating, then a green one with vertical grating each being shown for 5 seconds for a total of 3 minutes. The same black and white image from the beginning will be shown again at the end. If the Effect was successful the image should look slightly different now.
To exit the application at any time press escape.
PS: The application runs in full screen.


Thursday, August 7, 2014


Here is an application requested by Ada and maybe a few other on IRC. At first I didn't want to do it since I am lazy and didn't know anything about it. After they linked me to the page I thought I can do this though I cant test etc. I eventually started it and here is the completed app (though I personally never tested but Ada has tested and says its working). It generates a GVD file used for PlayView on the PlayStation3 and possibly other devices.

PS: Thanks Ada for explaining the GVD structure etc.

Download for those on XP :

Usage: Normally run the executable and follow onscreen
             Drag image into CMD when asked.

             Running the application and the image as argument also works

             Generated GVD will be created in the same directory as the source image.

             Images must be 3840x2160 for now, might make custom later.

As always if you have problems or suggesting please leave a comment.

Tuesday, June 3, 2014

XwitchBot2 Started

Update: Starting over. I goofed and messed up the bot lol but not all is lost I can bring over many of the things from this version. I will be working slowly to ensure no memory leaks and no UI hangups occur. I will also improve on the plugin system giving it more control etc.

For those still using XwitchBot, I am working on XwitchBot2 at the moment. I will post updates on its progress here. The idea is that XwitchBot while pretty functional in itself lacks some capabilities and making plugins is easy but not extremely easy. The UI could also use some work.
 Core = DONE
 Plugin interface = DONE
 Chat UI = DONE
 UserList = DONE
 Options UI = DONE
 Plugins UI = DONE
 Donation UI = DONE
 About UI = DONE
 TwitchAPI = DONE
 IRC component = DONE
 Plugin Manager = DONE
 MessageProcessor = DONE
 Greetings = Redone ~95%
 ProgrammableKeySupport = DONE
 InChat Basic Twitch Commands = DONE
 Timestamps = DONE
 OAuthGeneration Helper = DONE
 ....if more components are added I will update this list including their progress.
The percentages here indicate how close a component is to intended functionality and not an indication of completeness.

UPDATE 8/11/2014
Thought I would upload a video showing what the bot is like at the moment. Its not complete but its very close to it. So here is a video of it doing its thing:

Welp thats that, should be done soon, if me getting kicked out doesn't get in the way.

UPDATE 8/10/2014
Separated the bot and core for use with plugins and implemented the plugin manager.

UPDATE 8/9/2014
Removed the Staff and Admin lists in chat (find them unnecessary).
Fixed random disconnect (had the close events in the paint event handler :P, put it in the mouseclick event now)
Added a reconnect feature just in case of the connection is cut (will not work if internet connection itself is lost or unavailable)
Made the Setup page only show upon start up (no more disconnect feature)
Forgot to mention I implemented all basic IRC commands available to twitch (/timeout /ban etc)
Cleaned up some things.

UPDATE 7/23/2014 (much done today)
I got to DONE status for many of the components on the list and progressed further in some others as well.
Currently working on improving the IRC component though. It's still 100% functional so its DONE status will remain as it. I am making it more robust and processing received messages. I will also be removing the staff and admin areas in the chat as I find them unnecessary.

UPDATE 6/26/2014 (IRC component in place and tested):

UPDATED UI, It is far from complete but here is a sample of the working UI thus far:

[OLD]Well the bot is nearing completion and here is what it looks like for those curious:

Friday, May 30, 2014

Custom OAuth

If you are logged into Twitch/Justin an OAuth will be generated for that account. To ensure nothing goes wrong check
Twitch/Justin or simply go and logoff, you will be asked to login to the account you want to generate an OAuth for.

user_read: Read access to non-public user information, such as email address.
user_blocks_edit: Ability to ignore or unignore on behalf of a user.
user_blocks_read: Read access to a user's list of ignored users.
user_follows_edit: Access to manage a user's followed channels.
channel_read: Read access to non-public channel information, including email address and stream key.
channel_editor: Write access to channel metadata (game, status, etc).
channel_commercial: Access to trigger commercials on channel.
channel_stream: Ability to reset a channel's stream key.
channel_subscriptions: Read access to all subscribers to your channel.
user_subscriptions: Read access to subscriptions of a user.
channel_check_subscription: Read access to check if a user is subscribed to your channel.
Note: chat_login will be part of the scope.

While working with the Twitch API I noticed that scopes are like the creditials an access card has. At first I figured any generated OAuth key should have complete access to my own room (channel) but I was sadly mistaken. An OAuth key must be generated with the specified creditials and this is absolute. So comes the next task, how do I go about generating OAuths with the proper/needed scope? The most common and known OAuth generator only generates OAuths for IRC login for chat with only the scope "chat_login". I thought is there a way to modify this generator so that it will request a new key with the added scopes. I looked on the documented page and it states that you can specify the scope in the URL. I went back to the generator and load and behold at the end of that URL was "&scope=chat_login". The TwitchAPI documentation says I can add scopes seperating them with a plus sign "+" and so I tested it. I changed the end of the url to "&scope=chat_login+channel_subscriptions" because getting subscription info was my main goal at the time. I pressed enter and it gave me a new OAuth. I checked the new OAuth with the twitchAPI to see if it had indeed the scope I needed.

If you look at line 14, as you can see the needed scope is indeed there. Mission accomplished lol. The next thing I want to do now is make it easy for people to create their own custom OAuth key using the existing key generator. I do not know of an existing easy to use method of making OAuth keys and so I will present my own here.
Finally here is the code snippet of the OAuth generator used here (HTML + JavaScript):

Friday, March 14, 2014


   I was asked to make a bot for twitch and so I did. It is called Xwitchbot (pronounced switch bot). I wouldn't call it a very good bot personally but it works. It provides some message handling, and is plugin based. Included is a single plugin that I made called Raffle2. As the name implies its used to hold raffles on twitch chats. To make plugins for this bot simply implement the interface "Globals.dll".

XwitchBot Files:
XwitchBot Download:

Plugin Interface:

Keep in mind that this is the first ever plugin based application I have ever made so it might lack some common practices etc. I am also mostly self taught and the implementation might not be optimal. All in all it works and I just wanted to share.

The system is as follows. The main application loads the plugins in a pool of shared resources. That pool holds the IrcClient, message handler, and plugins as well as plugin resources. The IrcClient, MainUI, and PluginManager/Messagehandler are all on separate threads. Plugins can be on their own separate threads too if they are made so.

Here are some signatures and their description of the functions available in Globals.dll to make creating plugins easier.

Public Shared Function GetToSend() As String
Returns the first element in the list of messages to be sent to the server, and removes it from the list.

Public Shared Function GetRecvMsg(Optional ByVal RemoveOnGet As Boolean = True) As String
Returns the first element in the list of messages received by the server,
if RemoveOnGet is true remove the message from the list.

Public Shared Function GetConsoleMsg(Optional ByVal RemoveOnGet As Boolean = True) As String
Returns the first element in the list of messages to be shown as output,
If RemoveOnGet is true remove the message from list.

Public Shared Function ParseMessage(ByRef sourceInfo As Message, ByVal Input As String) As String
Returns a string replacing all fields with their respective information. sourceInfo is the Message where this function will get the required information from.

Public Shared Sub AddResource(ByVal newResource As Resource)
Adds a new Resource to the pool of resources.

Public Shared Sub AddResource(ByVal newResourceOrigin As String)
Adds a new Resource to the pool using a name.

Public Shared Sub RemoveResource(ByVal Origin As String)
Removes a Resource from the pool with the specified name (Origin)

Public Shared Sub RemoveResourceAt(ByVal index As Integer)
Removes a Resource from the pool at the specified index location

Public Shared Sub AddResourceElement(ByVal ResourceIndex As Integer, ByVal Type As String, ByVal Name As String, ByVal Value As Object)
Adds a resource element  to a resource in the pool at a given index location. Type, Name, and Value as specified.

Public Shared Sub AddResourceElement(ByVal ResourceOrigin As String, ByVal Type As String, ByVal Name As String, ByVal Value As Object)
Similar to the other but instead adds a resource element to a resource of a specified name (Origin)

Public Shared Sub RemoveResourceElementAt(ByVal ResourceIndex As Integer, ByVal ElementIndex As Integer)
Removes a resource element givent a resource index and the element index.

Public Shared Sub RemoveResourceElement(ByVal ResourceOrigin As String, ByVal Name As String)
Similar but removes a resource element with a specified name at the resource with the specified Origin

Public Shared Sub SetResourceElement(ByVal ResourceIndex As Integer, ByVal ElementIndex As Integer, ByVal Value As Object)
Given a resource index and a resource element index, change the value of the element.

Public Shared Function GetResourceElement(ByVal ResourceIndex As Integer, ByVal ElementIndex As Integer)
Returns the value at a specified resource element index at a resource index

Public Shared Sub AddToSend(ByVal msg As String)
Adds a message to the list of message to send to the server

Public Shared Sub AddToRecv(ByVal msg As String)
Adds a message to the list of messages that are received by the server

Public Shared Sub AddToConsole(ByVal msg As String)
Adds a message to the list of message that will be shown on the output

Public Shared Sub SetCurrentChan(ByVal newChan As String)
Sets the current channel the bot is in "Does NOT actually change the channel is in, used for message handling"

Public Shared Function GetCurrentChan() As String
Gets the current channel the bot is currently in "Does NOT actually get the channel the bot is currently in, used for message handling"

Public Shared Function GetResourceIndexOfOrigin(ByVal Origin As String) As Integer
Returns the index of a resource of a given name (Origin)

Public Shared Function GetElementIndexOfName(ByVal Name As String) As Integer()
Returns the resource index and element index for an element with a specific name

Public Shared Function GetElementIndexOfName(ByVal ResourceIndex As Integer, ByVal Name As String) As Integer
Returns the index of a resource element in the resource at the specified index

Public Shared Sub StopPluginManager()
Stops the plugin manager built into the bot and is used by default.

Public Shared Sub StartPluginManager(ByVal Owner As String, ByVal Server As String)
Starts the plugin manager built into the bot and is used by default.

Public Shared Sub StopConnectionClient()
Stops the IrcClients connection to the server

Public Shared Function StartConnectionClient(ByVal Server As String, ByVal Port As String, ByVal Nick As String, ByVal Channel As String, ByVal Pass As String, ByVal JoinMsg As String) As Boolean
Starts the IrcClients connection to a server, the return boolean indicates a successful or failed connection attempt.

The plugin must implement 3 things:
    ReadOnly Property Name() As String
    Function ProcessMessage(ByVal InputMessage As GlobalResources.Message) As Boolean
    Sub Config()

Messages are sorted into 2 types:
1) PRIVMSG (private message that is properly formatted in a way this bot can understand by default)
2) NS (non-sense/not-supported)

NS messages are not discarded, they are passed to all plugins (unless a plugin stops the chain) just like every other message, the difference is their type will be NS and a plugin would have to manually process that message in its raw form.

Messages that have been processed have a structure of the following:
    Public Structure Message
        Dim Type As MessageType
        Dim Nick As String
        Dim User As String
        Dim Host As String
        Dim Target As String
        Dim Message As String
        Dim Owner As String
        Dim Server As String
        Dim Raw As String
    End Structure

Message is where the message itself (what the user specifically send) is stored.
Raw is the message exactly as it was received by the bot with all heading information intact.

ResourceElements have the following structure
    Public Structure ResourceElement
        Dim Type As String
        Dim Name As String
        Dim Value As Object
    End Structure

Resource has the following structure
    Public Structure Resource
        Dim Origin As String
        Dim Resources As List(Of ResourceElement)
    End Structure

Here is the starting source for making a plugin:

For a complete source of Globals.dll :

Here is the source to my Raffle2 Plugin:

Source for UserList plugin:

And finally my horrible source for the bot itself:

As always if anyone has any issues or improvements please leave a comment :)

Wednesday, February 26, 2014

Saving bandwidth while chatting using UTF8 (Fixed)

UPDATE: Decode function fixed and tested (issue was a 4 was used instead of 1, silly me lol). Next up is maybe porting to C#,C++ and maybe Java, but its pretty simple I think people can do it themselves.
UPDATE: Well this is embarrassing, my new and faster decoding function is flawed lol, for now use the old decoding function for accuracy while I look into fixing my faster code.
UPDATE: New Encoding/Decoding Function and changes are below. From testing Encoding is over 5X faster than the previous code and Decoding is over 15X faster. Major change would be I implemented a lookup table so not so much string manipulation is required. Minor changes are I swapped and reordered some things around in favor of faster alternatives like for ex using index of instead of contains.

Test String (100,000 loop) = This is a test to try to make I can make my encoding and decoding for my scheme faster, it badly needs a speed boost lol!!!

Encoding: ~9,334 ms
Decoding: ~13,556 ms

Encoding: ~1,732 ms
Decoding: ~849 ms

    Previously I had a concept of a modified UTF8 encoding scheme with selected characters being optimized. I had code but the scheme was broken to some extent and code flawed. I left it alone for a couple months and then pbanj(from irc) posted a message in all hex lol. At first I didn't know what to do with it, so I told him "wanna decode that for me?" and he said why would he have to. At that moment it hit me, he was using an app I made awhile ago with the encoding scheme I made (still with bugs). I decoded the message and the message said "has this been updated" and that was when I got back to work on fixing this scheme. The concept was simple, most English messages are simply of Latin characters as in a-z and A-Z. I thought all that was needed to represent these were 6 bits. But with 6 bits I had extra room for more characters so I squeezed in the next possibly most used characters, digits 0-9. I then had room for 2 more spaces for characters, I used one to represent a space because come on... its used to separate words from one another. The last bit is reserved for something that isn't a character. It is used instead as an escape or wildcard. The last spot in the 6 bit encoding (111111) is used to represent a non optimized character (UTF8). Because most English messages will contain a ratio of greater Latin letters and numbers 0-9 plus some spaces compared to punctuation and other special characters this scheme will most likely save bandwidth. This scheme works because UTF8 has certain characteristics and rules that compliment the workings of this scheme. A character encoded in UTF8 cannot (in bits) start with 10XXXXXX. The first byte contains information on how many bytes ahead needs to be read for the current character, for example 111XXXXX has three 1 bits leading so the character has 3 bytes total to represent that character. So including itself it needs to also get the next 2 bytes to successfully decode the character.

    Now Lets see how we can optimize UTF8 a bit. Lets assume we want to encode only with 6 bits, those 6 bits representing the optimized characters mentioned above. And every time a special character needs to be encoded the bits (111111) is used. That Character is then encoded using UTF8 and its byte representation is put aside later for use (we will get back to it later). The encoding then continues onto the next character, again if the character is not an optimized character then the bits (111111) is added and its UTF8 bytes are added to the end of the UTF8 bytes from earlier.

    At the end of the encoding we put everything together. We should have 2 groups of data now, the bytes of the characters encoded in UTF8 and the bits for the characters encoded with 6 bits. We need to put them together but how will the decoder know where the UTF8 bytes end and where the 6 bit encoding start. Earlier we established that UTF8 cannot start with 10XXXXXX, well we will use this to signify the end of the UTF8 but instead of the whole byte we only use the first 2 bits (1 and 0) because there is no point in reading the whole byte if UTF8 wont be able to decode it anyways. So 1 and 0 are placed in between the bytes and the 6 bit encoding. The last thing to do to encoding the message is convert it to bytes. We do this because the final data needs to be in a byte array, we do this by simply adding 1s until the number of bits in the final data is a multiple of 8 (8 bits are in a byte). 1s are used so the decoder doesn't mistakenly decoded any other character if the padding was 6 bits long, for example if 0s were used for padding and the padding was 6 bits long the first optimized character would be decoded at the end when the original message didn't have it.

    To decode is fairly simple. We read the message byte per byte first for UTF8 decoding and only when a UTF8 starts with 10 does it stop, the UTF8 characters are put aside for later use. The bits per bit decoding now starts at the beginning of the byte which started with 10XXXXXX. First thing to do is because the 1 and 0 were just used as markers they are skipped or removed.The rest of the message is decoded 6 bits at a time until there are no more bits to read or there are less than 6 bits remaining. Each 6 bits corresponds with one of the optimized characters. Each time the 111111 comes up it grabs the corresponding index of the special characters. For example if this is the first occurance of 111111 then that character in the encoding is the first character in the special characters we decoded earlier.

Here is a demo of the encoding:
Optimized characters: "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 " no quotes.
Message = Hello my name is TizzyT.
Hex = 2E:A1:10:B2:CE:F8:C6:3E:34:03:04:F8:84:BE:B4:86:59:62:DF:FF
Octets =
00101110 10100001 00010000 10110010
11001110 11111000 11000110 00111110
00110100 00000011 00000100 11111000
10000100 10111110 10110100 10000110
01011001 01100010 11011111 11111111

First we look at the first byte (first octet): 00101110
We see that it starts with a 0 meaning that this character only needs the byte to decode the character. This character in turns decodes to be the period at the end of the original message. We add that to a list of special characters for later use.

We move onto the next byte (second octet): 10100001
It starts with a 1 and 0 so from this we know to stop decoding in UTF8.
Note if it doesn't start with 10  continue decoding in UTF8.

We skip (or remove) the 1 and 0 because they are markers and look at the next 6 bits: 100001
That is the number 33, so we know the character here is the 33rd character in  our optimize characters list (count started from 0) which is "H". And we repeat this throughout the rest of the message.
000100 = "e"
001011 = "l"
001011 = "l"
001110 = "o"
111110 = " "
001100 = "m"
011000 = "y"
111110 = " "
001101 = "n"
000000 = "a"
001100 = "m"
000100 = "e"
111110 = " "
001000 = "i"
010010 = "s"
111110 = " "
101101 = "T"
001000 = "i"
011001 = "z"
011001 = "z"
011000 = "y"
101101 = "T"
111111 = Special Character
111111 = Special Character

Here we come across 111111 which is to signify that the current character is a special character and it is the first occurrence so we look to the first decoded special character we have (which is the period).
Now we still have 6 more bits to read so we read those, if there were less then 6 bits left you stop because it is the end of the encoding and the remaining bits are there as padding. If the last six bits are 111111 the encoding ends because in such a case the bits are used as padding otherwise decode as usual.

Using this scheme we effectively saved 4 bytes with this message.
            UTF8 = 48:65:6C:6C:6F:20:6D:79:20:6E:61:6D:65:20:69:73:20:54:69:7A:7A:79:54:2E
This Scheme = 2E:A1:10:B2:CE:F8:C6:3E:34:03:04:F8:84:BE:B4:86:59:62:DF:FF

In the best case scenario (using only optimized characters and no padding) messages are 0.75 the size of  the same message encoded in standard UTF8. In the worst case this scheme can be any number of bytes larger, in which case the message should be sent using the standard UTF8 encoding. Because this scheme is based off UTF8 and the fact that this scheme decodes using UTF8 first there is no conflict with using this scheme to decode a standard UTF8 message.

Download Demo App:
Note: The Demo App doesn't fall back to standard UTF8 encoding to show worst case scenario of a given message.

After thoughts:
1) Why didn't I use compression instead of this encoding scheme?
    I have thought of that and did several test and concluded that while compression with large messages with hundreds or thousands of characters would work nicely, in many or most cases much nicer than this scheme. In a instant messaging environment people don't hold their messages until there is a huge bulk..I mean come on its called instant messaging for a reason, people send whats on their minds as soon as they finish typing it and for such short messages most if not all compression actually makes the message larger in size.

2) Why did you make this?
    I was first intending to make a new chat program just for the heck of it and while doing so I needed to decided what encoding scheme I would use to send text messages. I had 2 factors that I wanted to keep optimal. The first was to be able to use a large range of characters and the second being it had to use as little bandwidth as possible. The first obvious choice was to use ASCII but that later turned out to be very limited in what I wanted users to be able to type. The next was UTF8. While looking into how UTF8 worked and how it came to be I was amazed as to how flexible it was. It only uses the required amount of bytes needed to represent a given character and thus my knowledge on variable byte encoding grew and of course the scheme I came up with is essentially taking that concept a bit further. So back to the original question, this scheme satisfies both factors and saves enough bandwidth in my opinion for me to opt for its use, and in the worst case scenario in a completed application (if made to) would be the size of a standard UTF8 encoded message.

3) Have you tried to optimize it even more?
    I have thought about it but besides rearranging some declarations around etc I haven't really changed the fundamentals of my code. There are probably optimization here and there but I haven't gotten into doing that, like maybe making use of bit shift operators or creating a look up table instead of constantly calculating things. Those things I will maybe get around to later for now I am satisfied with the basic concept and workings of the scheme and I'll leave the optimizing and/or porting for others who want to use it.

4) You say this saves bandwidth but how when some messages aren't smaller in size?
    When I say save bandwidth I am talking about traffic used within a given duration. For many people that duration is at the start of a billing cycle to the end of one. Here in America and probably most other countries a billing cycle is usually on a per month basis. So within a month this scheme would save you bandwidth. For a single message sure it might not be that much saved but over hundreds or even thousands of messages throughout the month you would have saved a noticeable amount in my opinion.

5) Why 6 bits? Why not lower?
    I will be honest I wanted to use 5 bits at first and being a complete scatter brain I completely forgot about capital letters so it took me a good half hour or so before my brain fart subsided and increased it by 1 bit. There are 26 letters in the Latin alphabet but there are also capitalization so already there are 52 characters that need to be represented and that exceeds the 31 possible with 5 bits. And I would argue that with 6 bits it works out nicely with the whole alphabet with capitalization and digits 0-9, the inclusion of a space and the required escape/wildcard.

Here is the updated code I have for this scheme which encodes 5X faster than the old one and decodes about 15X faster than the old one.
(100,000 loop stopwatch as benchmark with string of 123 characters):

While this scheme can save bandwidth and is perceived fast, it is much slower than standard UTF8 encoding and requires more steps. The encoding for practical uses though is more than fast enough.

As always if anyone has any issues or improvements please comment.
Open to non commercial use.

Saturday, February 15, 2014

Large Prime Number Generator

   I was using a combination of code from my previous posts etc and while looking at the code, I realized something, why do I need to repeat so much of it? I thought I could possibly optimize this a bit (Method still slow as crap). The first thing I did was make it so that each new random number generated will all have the same length in bits. Because they are all the same length in bits I don't have to generate new random numbers each time for the potential witnesses. Another thing was I can just set the length of bits instead of using the not so accurate tobytearray.length or using my own function to get bit length, I can just set it. I also added a multiple of 5 check before the iterations so that it doesn't try checking a number that ends in 5 (because primes larger than 2 only end in 1,3,7,9) instead it makes the number end in 3 by subtracting 2. For ease iterations can be set manually, if not the number of iterations is the square root of the length.

Code Note: Line 27 can be changed to:
"PrimeGen -= X" *X can be any even number
Depends on what you want the function to do when the current number isn't a prime.

Note: As always any errors or improvements please post in comments.

Miller Rabin

   Here is an implementation of Miller Rabin Primality Test. It was originally in C# and was converted to with some modifications and additions.

Note: If there is anything wrong or can be improved please comment. I am also not 100 percent sure this is Miller Rabin it is what I found as I was searching for Miller Rabin, but this is still a Primality Test (more accurately this is a composites test).

BigInteger Bit Length

   I was looking for Miller Rabin implementation in .Net (vb or c#) and found one. I went through the code and apparently I needed to generate a random BigInteger hence why I made THIS. Another thing I noticed was the algorithm needed that random number to be the same length as the number to be checked. Now I don't know how precise this length had to be whether it was just bytes or bits. But I saw something I didn't like and I sought out to 'change' it (might not be broken to say 'fix').

Number = 8739
In Hex = 2223
Actual = 15
Report = 16 (using BigInteger.ToByteArray.Length * 8)

That lack of precision kinda bugged me lol and so:
Note: If there is a better way (which I'm sure there is) please let me know in the comments.

Random BigInteger Generator

While I was working with primes I needed to generate large pseudo random numbers. I looked and I was envious that Java had one and from what I saw .Net didn't have one built yet? I decided to make my own and to share.

Random BigInteger Generator (

PS: If there is an error please let me know also if there is a faster or better way please comment :)

Prime Sieve

Found a Prime Sieve function online and tested it, took ~3570ms to generate primes up to 10,000,000. Was pretty fast compared to the one I made awhile back so I decided to make a new one tailored to be faster than the one I just found. My final version takes ~2790ms to generate primes up to 10,000,000. Code I found was originally in C# but I converted it to
Note: Speeds may vary per machine.

Sieve I made with use of multiplication instead of modulus (even faster than stated above):

Sieve I made:

Sieve I found:
Note: Any errors or improvements please post in comments.

Friday, January 31, 2014

MangaHere Downloader

Here is a tool which is a standalone of what my final program is going to be. This downloads mangas (completely or upto latest) from All downloaded Mangas are organized in their own folder and in their own chapters in the same location as this program. I think it is faster than MangaRipper but not sure.

Usage: Run the program, type or paste the main url of a manga from and let it do its thing.

1) Invalid Characters for file/folder names which caused program to throw an exception.
2) Added Capitalization algorithm to correct the all caps anime names from previous version.
3) Tried multiple ways of multi-threading and found one that seems to work best.
4) Added folder name ordering for mangas that have duplicate chapter names.
5) Fixed an issue where program completes before all scans are downloaded.
6) Fixed issue where if the number of chapters is less than number of threads, the other threads are
    left idling.
7) Some other things I can't remember at the moment.....


Monday, January 13, 2014

MangaHere Search Tool

   This isn't really the initial goal of the program I was working on but I decided that I should make a separate standalone tool for searching MangeHere. This was originally supposed to be a plugin for my manga reader I'm working on but I decided to put out a smaller app just for the heck of it.

Download :

Usage: Run the program, enter what you are looking for and it will do its thing.
Double click to open the site associated with the manga. Press Esc to search for a new manga.

Info: Compatible with MangaHere, displays name and link.
Improvements: I plan to implement a multi-threaded and more optimized version in the final reader for performance as this standalone one is slow for searches that contain a lot of results, will also include more info like rating and summary etc.

1) Single Threaded, kind of slow if search contains many results.

Monday, October 28, 2013

Remove Windows 8.1 watermark

I know there are others out there and people can do this too but I will put this here for convenience sake.

Update : Removed Test Mode Watermark
Download :

-Run Add_Take_Ownership
-Take ownership of C:\Windows\Branding\Basebrd\en-US\basebrd.dll.mui and replace with edited basebrd.dll.mui
-Take ownership of C:\Windows\System32\en-US\shell32.dll.mui replace with edited shell32.dll.mui
-Logout and back in

Friday, October 25, 2013

DRIICE Project

   This is meant to be an alternative to the recent "ice" project for steam made by scottrice. There are certain things that I saw about his project that I would like to change. One of which is a nice GUI to use (I know there is work being done already). I have been working on it for the past week or so (on and off) although following a language I don't know makes things sluggish and cumbersome. The actual program itself is quite simple, and so finishing my alternative should be fairly easy.

Progress (99 = done but might make changes):
GUI : 0% "Will work on this last, I usually get functionality working before esthetics."

Names and Categories : 99% "Am able to generate properly formatted screenshot.vdf files for name of app, location, category, etc."

AppID generation : 60% "Currently working on this, This is the key to generating another properly formatted screenshot.vdf file (dif location/dif format) that handles id to game association also used for grid images. I got have the generation and formatting done, just the correct appid is left"

App/image association : 80% "Am able to pick images and move them to the correct location and with correct demensions, but giving them their correct file name (same as appid) is pending on me getting AppID generation working."

== LOG ==

May 13, 2014: Officially dropped.
Oct 25, 2013: Until now I haven't been seriously working on it but today I will sit down with paper and pencil (yes I code with scrap paper - it helps me, don't laugh) and really work on it through the day. Although sometime today my little brother's computer case is to come and I will have to put his computer together which is currently housed in the motherboard box, fully functional lol.

Thursday, October 17, 2013

+DeSmuME for ICE , ugly fix for NDS support

Here is a little thing that I worked up, its similar/same method as the previous fix for ICE. This one add NDS emulator (DeSmuME).

Instructions: Rename your original Gameboy advance emulator to "gbaemu.exe", ex: "VisualBoyAdvance.exe" to "gbaemu.exe" and extract the NDS folder into the same directory. Add NDS games by placing them into the GBA roms directory.

Download :


Made to batch re-size and convert images for Steam grid.
Latest Update : Version 2.0c:
Changed a couple things here and there and added some options.
Changes :
There is now a mode displayed in the console so people know what options are being used.
There are now two quality options (highspeed/highquality) highspeed is used by defualt.
There is now a way to specify the number of threads to use. Specifying 0 will behave the same way as not specifying one at all.
A usage message is added for people who run the application normally.
Download :
Usage: Drag images or folders containing images on the executable.
If you would like to benchmark add "-bench" without quotes to the file name.
If you would like to use high quality mode add "-q" without quotes to the file name.
If you would like to specify number of threads to use add "-thread=" followed by the number of threads you want to use (no spaces, without quotes) to the end of the file name.
You can use multiple modes at the same time.

Because most of this was from an old application and uses most of .Net built in stuff I will provide the source:

== OLD == Benchmark done by Pbanj:
2.0b HighSpeed CPU utilization

2.0b HighSpeed

2.0b HighQuality

Download : Update : Its fucked up, here is a fixed version: Download : Reason : I was using an old project to make this one, and I decided to change the output format to Jpeg from Png, but I forgot to change the extensions from .png to .jpeg. I am sorry for any inconveniences. Update : Here is another update I was told that the images were pixelated and I knew what was causing it. Microsoft's built in Jpeg compressor in .NET is shitty, and so to remedy that I simply made it output PNG. Another thing that is changed is I removed the ending popup message because apparently Pbanj thought it was annoying. Download : Requested : Pbanj requested that I implement multi-threading to this. And so I might do just that, just to speed up batch processing. For single image processing there will be no speed improvements. Updates : Here is SteamGridImager1.0c and the first version of SteamGridImager2.0. Download 1.0c : Changes : Added folder support, if you have too many images to process put them into a folder and drag the folder onto SteamGridImager1.0c.exe, all images in the folder and sub-folders will be processed. Also added a benchmark feature for people who want to see stats, simply add "-benchmark" (without quotes) to the end of the executable file name.  Download 2.0 : Info : This is 2.0 because it was more or less a rewrite of the first version. This version is an attempt to implement multi-threading. Minimal testing was done so performance increases may vary. Also to note I do not know best practices of multi-threading to make optimized multi-threaded apps yet, the only thing I'm certain of is there is a performance gain and that it works lol. Further optimization of the app will probably not come as unless you are processing thousands of files its not going to make that big of a difference. Supports everything 1.0c supports feature wise. Benchmarks : Here are the two version processing 100 images = Version 1.0c
Version 2.0
Here are the two versions processing 2000 images = Version 1.0c
Version 2.0
As you can see the multi-threading does provide some performance gain (at least on my system) but quite little (probably due to my lack of knowledge on multi-threading). Welp take it or leave it lol. On second thought : I will try later to implement multi-threading another way and see if that yields better performance. Welp here is the other way I've implemented Multi-threading, its better I guess but again not by much lol. Features and usage is the same. Download 2.0a : Difference explained : 2.0 has a list of all the images and each thread can grab a new one as soon as its finished with the current one its working with. Each time a thread grabs an entry, that entry is removed from the list so other threads don't process that image a second time. 2.0a gives each thread its own list of images to work with. It works non-stop until it finishes. There is no waiting like 2.0 does. In 2.0 all the threads are grabbing from one source so there needed to be some form of management. If multiple threads try to access the list at the same time, all but one thread is put on hold until that one thread is finished with the list, basically the other threads need to wait in line until they get the information needed to work on the next image. Another factory that might be making my tests seem like multi-threading isn't gaining much might be a HDD bottleneck. 2.0a benchmark with the same test from earlier. 100 images:
2000 images:
CPU Utilization:
Testing done by Pbanj: 1.0c