converting

oo javascript with properties from server, methods from cache, best practice?

I'm converting procedural JS to OO and would appreciate any help. In a nutshell, what I have is a html-page containing: <script type="text/javascript"> var serverTime='11:32:20'; //time generated by server (php) </script> <script scr="myProcFuncs.js" type="text/javascript"> /* which is containing procedural functions such as fun...

C# - Server-side password protection

Hi there, I am writing two console applications, a client and a server. I'm a little stuck at two things, which seemed rather easy at first.. #1: I want to write a function for the following piece of code, that converts bits to a string, but I cant just figure it out. The server always crashes when I use it. My function is a little bit...

Convert a SQL query to HQL

Hi my question is simple but may a little bit rude. Could please one of you convert two SQL Query to hql :> Select statistic.* FROM statistic INNER JOIN (SELECT MAX(st_id) AS id " + "FROM statistic WHERE status = 'N' GROUP BY bc_id) ids ON statistic.st_id = ids.id" + "ORDER BY bussinessprocessID; Select post_id, u_post_id FROM statist...

Converting List<Object> using a System.Type object

Let's say I have retrieved a System.Type object using reflection and want to use that type to convert a List<Object> into another List of that type. If I try: Type type = GetTypeUsingReflection(); var myNewList = listObject.ConvertAll(x => Convert.ChangeType(x, type)); I get an exception since the object does not implement the IConv...

Converting .xls file to xml for webservice with iOS

Hey, am writing an application and I need to convert a .xls file to xml to feed it into a web service. All my google searches involve converting it by hand. I've not been able to find any tutorials on how to do this automatically through iOS, does anyone know of a good tutorial or even a book that includes this? Thanks, William ...

Converting a number of bytes into a file size in C

Hello, I want to convert a single number of bytes, into a file size (that has .KB, .MB and .GB). If the number is 0, I don't want to have any unit. If the number is exactly divisible by a multiple of 1024 (not a floating point), then I will print: x . Otherwise, I want to print a floating point with one degree precision. I made some c...

What is the best way of converting a number to a alphabet string?

What is the best way of converting a multi-digit number to a alphabet string in C#. For example, if I have a number say, int digits = 1234567890 I want this to be converted to a string which would be string alpha = "ABCDEFGHIJ" This means 1 represents A, 2 represents B and so on. ...