Archive

Archive for the ‘Code and Stuff’ Category

Mega Man Online Trailer

August 26th, 2010
19 views No comments

Woohoo, a Mega Man mmo game! Can’t wait to get my hands on this game when it’s released.

Arkie Code and Stuff

EveFleet

August 7th, 2010
107 views No comments

EveFleet is an application to handle the creation and composition of the fleets. More info about EveFleet wll be posted later but in short, it’s an application to manage fleets in Eve Online.

Website: http://evefleet.com/

[update]
So in short, anything you can do in Eve Online (fleet wise) can be done with EveFleet.com and more , you can create multiple fleets, specify the shiptypes you want in your fleet, make your fleet public so that people can join it or hide it and make it an ‘invite only fleet’.

The application is entirely webbased, as for security reasons you will need to register and provide a valid apikey because we application is configured to only allow members within the alliance (Loony Toons) to use EveFleet. This way I hope to get feedback about it so that i can improve the application in the next release.

Screenshot(s)
http://retardedweblogger.com/blog/wp-content/uploads/2010/08/EveFleet.png

Arkie Code and Stuff

[Eve Online db] unpublished ships based on the Tyrannis 1.0.1 db

August 5th, 2010
160 views No comments
SELECT typeName, invtypes.description FROM invGroups
INNER JOIN invtypes ON invtypes.groupID = invGroups.groupID
WHERE categoryID = 6
AND invtypes.published = 0
ORDER BY typeName ASC

Read more…

Arkie Code and Stuff

[Eve Online db] query published skills with description, rank and baseprice

August 5th, 2010
61 views No comments
SELECT typeName, invTypes.description, valueFloat AS skillrank, baseprice
FROM invGroups
INNER JOIN invTypes ON invTypes.groupID = invGroups.groupID
INNER JOIN dgmTypeAttributes ON dgmTypeAttributes.typeID =  invTypes.typeID
INNER JOIN dgmAttributeTypes ON dgmAttributeTypes.attributeID = dgmTypeAttributes.attributeID
WHERE invGroups.categoryID = 16
AND dgmTypeAttributes.attributeID = 275
AND dgmAttributeTypes.published = 1
AND valueFloat IS NOT NULL
AND marketGroupID IS NOT NULL
ORDER BY groupName, typeName ASC

Arkie Code and Stuff

[Eve Online] BP Manager (aka BluePrint Manager)

August 1st, 2010
117 views No comments

So today someone from my alliance (Loony toons) contacted me and asked if I could write an application for him to store information about blueprints and who owns it etc. Although the exact requirements were pretty vaque at best, I managed to wrap something up that should be what he was asking for and added some other stuff while i was at it and reused some of my code that i wrote on other eve related projects (EveRoamer anyone?!).

So what works and what not? Well, everything you see on the image below works in the current build, i’ve already written the database design to store and retrieve the infomation about blueprints/owner etc but i couldn’t be bothered anymore today to write the data handling part so that will be the first thing what i’ll do.

So you might have already guessed what doesn’t work.. adding the “submit” and “search” functionally doesn’t work yet but will be done later when I have the time for it :o )

If you have any suggetions/comments or features that you would like to see in BPManager, leave a comment below :)

http://retardedweblogger.com/blog/wp-content/uploads/2010/08/BPManager_2010_08_02.png

[Update] WIP screenshots

http://retardedweblogger.com/blog/wp-content/uploads/2010/08/BPManager_2010_08_03.png

http://retardedweblogger.com/blog/wp-content/uploads/2010/08/BPManager_2010_08_04.png

Arkie Code and Stuff ,

JavaZone Trailer- Java 4-ever

July 1st, 2010
93 views No comments

Getting the database size in MSSQL

June 29th, 2010
136 views No comments

To get the current database size in MSSQL 2008 (untested on previous versions) , you can execute this command sp_spaceused using the MSSQL server management studio or any other MSSQL db management  tool(s) you prefer.

Arkie Code and Stuff ,

ASP.NET Databind a repeater control

June 21st, 2010
125 views No comments
<asp:Repeater ID="rptGetData" runat="server">

<ItemTemplate>
<tr>
<td width="100px">Output:<%#Container.DataItem("tableData") %> </td>

<td width="100px">Output: <%# DataBinder.Eval(Container.DataItem, "someOtherData")%></td>
<td>Output: <%# DataBinder.Eval(Container.DataItem, "someMoreData")%> </td>
</tr>
</ItemTemplate>

</asp:Repeater>
ASP.NET DropDownList and RequiredFieldValidator

Arkie Code and Stuff

VB.NET retrieving multiple rows using DataSet()

April 22nd, 2010
2,652 views No comments

Not sure if this is the “fastest” way to retrieve multiple rows from a database but this is how i do it anyway. Let me know if there are better ways!

conn.Open()

Dim sql As String = "SELECT column1 FROM table1"
Dim da As New SqlDataAdapter(sql, conn)
Dim ds As New DataSet()
Dim result as String
da.Fill(ds)

conn.Close()

Dim i As Integer
For i = 0 To ds.Tables.Count - 1
result += "" &amp; ds.Tables(0).Rows(i)("column1").ToString() &amp; " "
Next

Update, ofcourse i ment this:

conn.Open()

Dim sql As String = "SELECT column1 FROM table1"
Dim da As New SqlDataAdapter(sql, conn)
Dim ds As New DataSet()
Dim result as String
da.Fill(ds)

conn.Close()

Dim i As Integer
For i = 0 To ds.Tables(0).Rows.Count - 1
result += "" &amp; ds.Tables(0).Rows(i)("column1").ToString() &amp; " "
Next

Arkie Code and Stuff, Everything else

ASP.NET DropDownList and RequiredFieldValidator

April 20th, 2010
177 views No comments

Adding a RequiredFieldValidator to a DropDownList can be done fairly easily like this:

Add the following code into your aspx page,

<asp:DropDownList ID="ddlExample" runat="server">
</asp:DropDownList>

<asp:RequiredFieldValidator ID="rfvExample" runat="server"
ControlToValidate="ddlExample" ErrorMessage="*" InitialValue="0"></asp:RequiredFieldValidator>

In your codebehind,

 ddlExample.Items.Insert(0, New ListItem("Make a selection", "0"))
 ddlExample.Items.Insert(0, New ListItem("retardedbloger.com", "1"))
 ddlExample.Items.Insert(0, New ListItem("retardedweblogger.com", "2"))

Arkie Code and Stuff, Everything else

VB.NET Check null value with IsDBNull

April 19th, 2010
273 views No comments

Conversion from type ‘DBNull’ to type ‘String’ is not valid.

Conversion from type ‘DBNull’ to type ‘String’ is not valid.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.InvalidCastException: Conversion from type ‘DBNull’ to type ‘String’ is not valid.

Solution

If IsDBNull(tabel.Rows(0).Item("columnData")) Then
ddlExample.SelectedValue = "0"

Else
ddlExample.SelectedValue = tabel.Rows(0).Item("columnData")

End If

Arkie Code and Stuff

<%@ Register Assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken="/>

March 8th, 2010
223 views No comments

<%@ Register Assembly=”System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=/>

if you get this error message you probably didn’t upload your web.config file.

Arkie Code and Stuff

EveOnlineRoamer

February 25th, 2010
312 views No comments

EveOnlineRoamer is a webbased application that i’m currently developing using the  .NET framework  (ASP.NET / C#).

The reason why i wrote EveOnlineRoamer is because I was docked in a station  for some time because of hostiles so I wanted to create an overview of the reported hostiles along with their shiptypes and where they roam the most so that i know what to expect when i meet them one day ship 2 ship ;)

This is especially handy when a hostile enters a system and no one knows their shiptype yet. By checking EveOnlineRoamer it is possible to see if the hostile has been reported before and if so, what they were flying, where and when at the time they were reported.

Interesting, so when can I use it or even host it myself?
At the moment, no release is being planned because i still need to work on splatting some  lesser bugs and to rewrite some functions that handles the eve online api data more efficiently.

I also need to work on the layout but thats not really high on my priority list at the moment. Mogandi provided me a nice “EveOnlineRoamer logo” which I’m going to use as can be seen on the top left on the screenshot below. I’ve added a small -7- logo to it though :P .

Want to help to develop EveOnlineRoamer?
EveOnlineRoamer will be released with all the sourcecode and files intact when it’s “stable” so we “programmers” will have a good version to start with. :) The reason i’m not going to release it now is  because some of the config files are hardcoded such as database access etc.

Also, if you have a comment or a suggestion, just let me know!

Current main features
- a simple account creation, login and permission system
- Submit hostile report (duh!)
- Sort reports by hostile name,ship, system, date, etc
- “realtime” update on new hostile report. Which means that anyone that has EveOnlineRoamer open, retrieves the latest reported hostile when someone else submits a new report automatically.
- admin config (allow/disallow guest submit etc)
- compatible with the official eve online API to extract data from to be used by EveOnlineRoamer.
- ingame browser support.
- statistics and overview of the most hostile system, ships used, most active hostile and more.
.. and some other stuff not worth mentioning yet.

A few random work in progress screenshots:
http://javaforums.nl/build_2010_02_24_prerelease_EORoamer_2.png

http://javaforums.nl/build_2010_02_24_prerelease_EORoamer_6.png

http://javaforums.nl/build_2010_02_24_prerelease_EORoamer_5.png

http://javaforums.nl/build_2010_02_24_prerelease_EORoamer_7.png

http://javaforums.nl/build_2010_02_24_prerelease_EORoamer_8.png

http://javaforums.nl/build_2010_02_27_prerelease_EORoamer_2.png

http://javaforums.nl/build_2010_02_27_prerelease_EORoamer_3.png

http://javaforums.nl/build_2010_02_27_prerelease_EORoamer_4.png

Arkie Code and Stuff ,

SQL Management Studio Express error code 29506

January 25th, 2010
1,618 views No comments

So I was at work today (like any other day except the weekends ;) ) and the first thing what I did was installing some software that I need to use for software development. One of these applications is SQL Management Studio Express. When I tried to install SQL management studio 2k5 however, I got an error code 29506 near the end of the installation process and there was no other choice than to canel the install because the SQL Management Studio Express didn’t gave me any other option than to rollback the installation so I rolled it back.

I had never encountered this issue before so i had no idea how to get around it. I even tried reinstalling a few times and even checked my user permissions a few times although I logged in as an admin. Lucky for me there’s a site called google.com so i searched for “SQL Management Studio Express error code 29506″, “SQLServer2005_SSMSEE error code 29506″ and more variations like that and found the solution here.

To make a long story short, it turned out i had to click the “unblock” button to be able to install SQL server 2005 because Windows 7 thought the file might be harmful.  *rant* Typically Microsoft, i don’t want you guys to decide what software I want to install, when I want to install an application I really DO want to INSTALL it Period. */rant*

Anyway, here’s the fix: “Simply right-click the file and select “Properties”. At the bottom of the “General” tab, you should see a security message with an “Unblock” button:”

Arkie Code and Stuff ,

Limit function in MSSQL 2000

November 28th, 2009
317 views No comments

Since there is no real limit functionality in MSSQL 2000 , getting a selection of records can be somewhat difficult. Well, here’s a solution to get a number of records that works like the “limit” function that can be found in MsSQL

SELECT col FROM (
   SELECT top 50 * FROM (
      SELECT top 200 * FROM tbl1
      WHERE col > 1 ) ORDER BY col
   ) AS newtbl1 ORDER BY coldesc
) AS newtbl2 ORDER BY col ASC

Note that there is a similiar limit function in MSSQL 2k5 called “rownumber” which makes returning the desired results a lot easier. ;/

Arkie Code and Stuff , , , , , ,