Wednesday, November 24, 2010
Thursday, August 19, 2010
Installing mts mblaze on ubantu lucid lynx and intrepid.
The setup on the intrepid was a breeze. I simply inserted the data card into the laptop and went to menu → Computer → ZTE usb drive. There was a file called CrossPlatformUI-V1.0.27-SSTL-i386-ubuntu.deb there. I double clicked on that file and then clicked on next, next etc. It installed a program called ZTEMT UI Common edition in the “Internet” menu. I clicked on that and the following window came up:

From that point on connecting to the Internet was easy as shown here.

Life was good until I decided to upgrade to Linux mint 9[ which is Ubuntu lucid lynx]. I needed to run monodevelop's latest edition and downloading and compiling it on Intrepid Ibex was too much of a pain.
So to cut a long story short, I downloaded the lucid lynx live CD and installed it on the machine.
There's where all my problems started. Due to changes in the usb modeswitch on the new linux kernel I would get a ZTE CD ROM icon on the computer every time I inserted the USB data card. I did the same thing as before, I double clicked on CrossPlatformUI-V1.0.27-SSTL-i386-ubuntu.deb file in the drive. The installation finishes with an error message. I ignored the error message closed the installation program. Then removed the USB card and reinserted it.
The ZTE CD rom Icon came back. The USB device would not switch to the “modem” mode from the “usb drive” mode. So much for mode switch huh?
So I looked on the internet and found some instructions on ZTE modems here : http://www.draisberghof.de/usb_modeswitch/#usage
Apparently simple right clicking and clicking on “eject” switches the mode!!
So I did that, right clicked on ZTE cd rom and clicked eject. Then I restarted the computer.
Then I clicked on menu->Internet-> ZTEMT UI. The same menu came up and I can browse the internet now.
Rather simple huh. It takes some time for the application to detect the usb modem. So wait a few seconds [like 30 seconds] after inserting the USB modem.
There are some sites on the internet which speak about doing this all via the command line, however its not possible to switch from hybrid to broadband using the command line mode. The speed in hybrid mode is much lower then broadband mode.
I have put the deb file on rapidshare in case I need it later: I put the deb file at http://rapidshare.com/files/413879966/CrossPlatformUI-V1.0.27-SSTL-i386-ubuntu.deb/
Wednesday, February 11, 2009
Joins
Saturday, January 24, 2009
Parryware flush valves.
how to create a home file server/
1. Connect the monitor, keyboard, mouse and power to the tower.
2. Download Linux mint.
3. Burn the iso file to a cd.
4. Put the cd in the tower,
5. Boot from cD.
6. Click next, put your time zone etc, click next finish the installation.
7. Mount the required drive from the /etc/fstab using ntfs -3g
8. Reboot
9. Share the drive.
10. Fix the IP address of IP4[Exactly the same way as in windows…click on the network icon, click properties of eth0 etc]
11. Set up the tower to forward
Add the following to the /etc/sysctl.conf
net.ipv4.ip_forward = 1
12. Setup IP forwarding and Masquerading (to act as router), you need to use NAT option of iptables as follows (add following rules to your iptables shell script) :# iptables --table nat --append POSTROUTING --out-interface eth0 -j MASQUERADE# iptables --append FORWARD --in-interface eth1 -j ACCEPT
[ If there are only two computers, then add only # iptables --append FORWARD --in-interface eth0 -j ACCEPT]
13. Connect the cable from one computer to other[lan to lan]
Saturday, July 12, 2008
Sunday Musings
When I look back at how my expense and income has been distributed over the last couple of years, a few things become evident:
- Spending on video games and other entertainment was more expensive then I imagined. Its always better to put that money into other investments.
- Its more fun to spend money when there is someone to spend it on. Being alone is more expensive then being a couple, there is someone to talk to and you can always share your emotions and thoughts.
- Its always a good idea to invest in a good music device when you are alone. However its a better idea to invest in a multi-function device. Once you are no longer alone, a standalone mp3 player does not make so much sense anymore.
- On the other hand a mp3 player is indispensable when on a long flight. The alternative is a good book that engages your mind. Flights are not the same as train journeys, wherein you can always look outside the window. In an airplane, there is nothing to look at outside.
Wednesday, July 02, 2008
Limited Accounts and windows.
A limited account is extremely useful to prevent most spyware from hooking on to the computer. Since my last spyware infection, I removed windows, reinstalled it, moved on to NTFS, updated my antivirus, did the windows update via the windows update feature. Took all night but then I use the computer for a lot of work and its useful to have it as up to date as possible.
And of course, moved to a limited windows account. No more admin accounts for me in windows.
Tuesday, July 01, 2008
windows problems
However decided to reinstall windows anyways so as to completely cure
the system.
Took a day to install after upgrading the file system to ntfs. Also
decided to stop using the admin account for anything other then well
"Administration".
Had to install everything again and also removed ability to execute exes
for the limited accounts from the data drives by using polsec.msc.
Hmm I guess it is almost as secure as linux. The limited accounts and
the new file system should prevent files from getting hit by viruses.
But still I have an updated antivirus and am also updating the windows
updates to prevent issues with the computer.
Saturday, June 28, 2008
Running Windows On a reduced account.
Sunday, June 22, 2008
Tuesday, June 03, 2008
Switched down cable service.
Thursday, May 29, 2008
Structures in C#
Structures:
Points:
1. Its a value type so if we assign a value to another struct then it is stored at two different point in the stack.
2. We cannot have a explicit empty constructor in a structure.
3. Structure cannot have constructors that do not completely initialize all the variables in it.
4. There is a 16 byte size limit to structure's instance. All value types are 16 bytes or shorter.
5. It is logically a single value.
6. It will not be cast to a reference type.
7. If a copy of a structure is passed to another procedure or function then the original will not change after the call. This is because a copy is passed to that procedure or function.
8. Value types are far more efficient then reference types however there is a instance size limit.
Strategy Pattern Part-2.
Intreastingly the go method that is implemented in each of the vehicle sub classes is not hard coded into the subclass itself.
That means that a car go method is not very different from a helicopter go method. And here is the kicker: The method is not implemented in the car and vehicle classes.
The go method is instead created in an interface.
So whats the big idea? We could as well create an interface and then implement it there.
ah but the interface is implemented in two classes GoDriving class and GoFlying class.
The abstract Vehicle class has a method that takes in an interface and decides what function to call. And then takes that interface and decides what go method to call.
Its easy to understand because an interface in the Vehicle class is replced by the actual class(goFlying or goDriving is used) that implements that interface in the car class. Then the go method of
And all that is there in the car class is a call to GoDriving class to intantiate a variable.
The helicopter class therefore has only a call to GoFlying. This ensures that the go method can be modified without modifying the Car and Helicopter classes.
The advantage becomes apparent when there is a huge number of classes and they may keep changing over time.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ConsoleApplication1
{
public interface goInterface
{
void goMethod();
}
class goDriving : goInterface
{
#region goInterface Members
void goInterface.goMethod()
{
System.Console.WriteLine("Go Driving");
}
#endregion
}
class goFlying : goInterface
{
#region goInterface Members
public void goMethod()
{
System.Console.WriteLine("Go Flying");
}
#endregion
}
public abstract class Vehicle : goInterface
{
public goInterface travelMode;
public void setTravelMode(goInterface x)
{
travelMode = x;
}
public void goMethod()
{
travelMode.goMethod();
}
}
public class Car : Vehicle
{
public Car()
{
goDriving drx = new goDriving();
setTravelMode(drx);
}
}
public class AeroPlane : Vehicle
{
}
class Program
{
static void Main(string[] args)
{
Car x = new Car();
x.goMethod();
System.Console.ReadLine();
}
}
}
Why use design patterns
2. There is no point in reinventing the wheel.
Have been reading some books to increase my awareness of the subject.
Design Pattern in C# by Steven John
and Design Patterns for dummies.
The dummies book is in java so that is fine.
Strategy Design Pattern
Have been reading Strategy design pattern from various books including Design Patterns in C# and Design Pattern for dummies.
Use when there is a section of code that will change frequently.
1. Instead of modelling is a relationship
like Class Vehicle
then Class car:Vehicle
Class plane:Vehicle,
We do class Vehicle:IDriving;
so car:Vehicle, IDriving
and plane:Vehicle, IDriving
which is not so good because if something changes then it has
to be changed in each class file.
so
1. Create a n interface that the subclasses will use
in this case
public Interface Igo{
public void go();
}
2 public class goDriving: Igo
{
go(){
System.Console.Writeline("Driving");
}
}
3.
public class goFlying: Igo
{
go(){
System.Console.Writeline("Flying");
}
}
4.
public abstract class Vehicle
{
private Igo goMethod;
}
Database Access in ADO.NET
Data providers: Set of classes that allows us to
access a particular database, execute commands and
retrieve/update data.
Data providers generally have the following classes
1. Connection : use to connect
2. Command : used to execute commands or stored procs
3. DataReader :Object that provides read only,forward
only access
4. DataAdapter :Object that is used to populate the
dataset(disconnected tables). Or used to apply changes
to a database.
There are four providers
1. SQL Server Provider : Access to sql server
2. OLE DB Provider :Access to data sources which
provide ole db drivers
3. Oracle provider : Optimized access to Oracle
database.
4. ODBC provider :access to an odbc data source.
Try Catch Throw
1. Try the block
2. Catch the exception.
3. Cleanup any remaining issues within the finally section.
Filtering Exceptions: We can use multiple catch for a single try section.
Only the first catch will be executed and then it will switch to finally.
The finally section cannot access variables declare in the try section.
If we want to create a variable declaration and make sure that it is cleaned
up even if an error occurs, then use the "using" keyword.
Tuesday, May 13, 2008
Asp.Net
handler? It enables sharing of the instance with other requests so
what? Whats the advantage in using that?
--
Sent from Gmail for mobile | mobile.google.com