Sunday, May 20, 2012

The Exposed

I think it would be a negative sort of comment on the current technology rather on how well it is implemented.  We see that many of us are getting exposed by using social networking sites, they are only a part, but the major exposer is using the site that promise to provide excellent security but have a poor maintenance and tracking records are the culprit for the problem of Being Identified, sites like online sms, apps on phones that use contacts and online accounts, apps that use other site emails and password of the users have to be monitored on there activity by way of software's like firewall sort of a thing so that user can know of the activity of that code and what it is accessing.

Thursday, May 17, 2012

Xaml vs Docx–vb.net with Richtextbox and WPF

This week I was trying to create a small text editor, actually behind the scenes it is a notebook sort of a thing, but for this blog, it is a editor.  I tried with the WPF RichTextBox Editor, lets say that the control has to improve a great lot to make it easier and more flexible for programmer to work on but to the current extend for my program it is sufficient.  The TextRange class or object plays a major role in this, when saving the data, we need to use it this way:

Dim txtrange As New TextRange(mainRTB.Document.ContentStart, mainRTB.Document.ContentEnd)

Where MainRtb is my RichTextBox, the text range has the save function rather than the Rtb,  with this save feature there are many options like serialization, text, tiff etc and the one I choose is XamlPackage which is a merge of xaml format with zip compression, it is good.

I tested the file size by copy 162 pages of pure text from word to this format and the size is great difference, docx took 116KB were as xaml took only 19Kb, but even if there is a single image docx would have a upper hand.  I think looking into xaml compression for images would be a great improvement for future file handling.

Wednesday, May 16, 2012

AMD Revival

Finally, a revival to the fans of AMD like me, who is using AMD processors from childhood, AMD announced its TRINITY processor technology as a competitive and end of the success line of Intel Ivy Bridge processors.

For more details on trinity tech google it and 1st hand info can bee found at http://www.tgdaily.com/hardware-features/63378-amd-launches-second-gen-trinity-apus

Wednesday, May 9, 2012

Format Date Display throughout application

After a thorough searching and testing came to a way that helps in changing the display format of date or time to my wished format , in this case it is “dd/MM/yyyy” and the code is simple too.  It is as follows:

Dim c As System.Globalization.CultureInfo
c = System.Globalization.CultureInfo.CreateSpecificCulture(System.Globalization.CultureInfo.CurrentCulture.Name)
c.DateTimeFormat.ShortDatePattern = "dd/MM/yyyy"
Thread.CurrentThread.CurrentCulture = c

and not to forget to import System.Threading.

Thursday, May 3, 2012

INotifyPropertyChanged – VB.NET Simple Way

Binding, making the UI data get sync/updated with the data is the most time taking coding area.  This aspect got simplified with the Two Way Binding in WPF or any .Net program.

It is easy to implement a INotifyPropertyChanged in VB program by doing these 3 lines of code where 2 lines at at class level and 1 at object level and not to forget “Imports System.ComponentModel”

Code Lines are:

Public Class SampleClass
        Implements INotifyPropertyChanged

Public Event PropertyChanged As PropertyChangedEventHandler Implements INotifyPropertyChanged.PropertyChanged

RaiseEvent PropertyChanged(Me, New PropertyChangedEventArgs(“Propety Name”))

Example follows:

image

Clear image can be found at http://clip2net.com/s/1Sn4b

Edit:  The INotifyPropertyChanged is for a class or structure, in other terms, it is used to notify (raise event) to whom ever listening or using the property that the value is changed and do the needful as accordingly.

Monday, March 26, 2012

Fedora 16 Disk Parting error at Anaconda

I have been learning Linux from some time, I was on RHEL, i.e. Red hat, but not until recently, I started trying out other variants of Linux starting from Fedora which is also a same source from Red hat.

While installing in any mode like auto mode via VMware or with custom disk layout, I was getting the following error:

err

“You have not create a boot loader stage1 on target device, the target device being the VMware regular vhdd.  After few searching on net, found that the new upgraded Anaconda Installer will not create the GUID Boot Partition table (which is simply a space for storing info on disk partitions) by itself.

Solution:

Like the same way we create a / or /Home or /Boot, actually like how we allocate space for swap, we need to allocate the same way for BIOS Boot file system and the capacity must be restricted to 1-2 MB only, even more it does not accept, that’s all, the problem is solved.

fs

Sunday, March 18, 2012

For Each Loop is a reference type

A small clarity in the way we write code gives a lot of time to save while coding, for example:

Earlier I used to use for each loop to iterate through elements of a list and then modify them, copy them to a third variable and then copy them back to a  the original.  However, recently I came to know that For Each Loop is a reference type, hence now I can simply just modify loop elements without creating a new list and copy back the items.

By getting clarity on what we are doing is good, and having good grip of what is going on under is excellent to shorten the code.  I see coders writing code with all the wildcards, I still can’t understand that, a lot more distance to go.

Friday, March 9, 2012

Dictionary or Observable Collection

I got used to use the Dictionary(of key, value) type for all objects that of list type but has some unique values like in roll numbers or IDs etc.

Later, I changed from default form apps to wpf apps, now the functionality of dictionary is same but with System.Collections.ObjectModel.ObservableCollection(of type) is very helpful due to WPF binding feature and mainly due to the INotify character of this type.

But Dictionary is lot more convenient to code in background, but, I am forced to use list, the only reason to change from Dictionary to Observable Collection is to reduce the amount of time on code for handing the GUI sync (two way binding)

Saturday, March 3, 2012

Preview Could be Better

We know that Windows 8 Consumer preview is a stunt for advertising and for creating a hype of the product before its release, however, if few more features like the Metro (Copenhagen) concept should had been included to make it better.

From my view, giving the same start menu for all devices like tablets, mobiles and desktop may not be a good one, below is a image of it:

Startmenu

I hope a option would be provided to disable such menu.  The major dis-satisfaction is the consumer preview does not come with the new desktop interface that got the hype on net.

Wednesday, February 22, 2012

Option I find Interesting

In MS Office One Note, we can paste the content from net,and we can also insert or save files to it, like copy file from explorer and paste the file in one note, so all our files can be in one spot like a single zip many be not with compression.

The option that caught my eye is “Insert the file as printout so I can add notes to it”

copyoptions

By this we can not only drop the file, but we can drop and read the file at the same time without any need to open the file from one note and also the search can now yield results from the dropped file. Open-mouthed smile

Sunday, February 19, 2012

jobs–Linux Bash

jobs is a command that shows what all tasks are pending or working in background.  For example: you open a man page say ‘man lvcreate’ and close it by ‘ctrl+z’ key combo, then the actual man is not closed, but is running in background.

When we use ‘jobs’ we can see the running background tasks like this:

jobs

To bring the task foreground we need to use the command this way:

‘fg 1’ where 1 is the jobs number.

Then we can close the task with the application specific method like ‘q’, ‘esc’, ‘exit’ or ‘alt+f4’.  ‘q’ key is used to quit man pages.

To send the application or job back to background we need to use the ‘bg 1’ where 1 is the job number listed in ‘jobs’ output.

Saturday, February 18, 2012

Add New HDD to Red Hat Linux

You can add new HDD to Linux when it is off and it gets detected after it is ON.  However, configuring a new HDD is a bit different on Linux then in Windows, however, if we compare the GUI, the options are are simple, like Disk Management in Windows, we use Disk Utility for this purpose. Below process is on how to do it with CLI:

Firstly, check if the new HDD is detected, example by running Fdisk, you will see sdb, (sdx where x is a,b,c etc stating the number of HDD).  We can also see for a device name in ‘/dev/’ folder.  Example like in below:

New HDD in CLI

or

New HDD in dev

To first make the disk usable, we need to convert it to a MSDOS HDD type and this can be achieved by:

mktable

i.e:

parted /dev/sdb

mktable

Now, your HDD is ready for use, just use mkpart or mkpartfs for creating partitions.

Sunday, February 12, 2012

Linux Root Password Changing

Recently I loaded Red Hat Linux Enterprise on my PC for the purpose of learning it and due to my old compromising keyboard I mistyped my password for the two times and then I was in a state of NO PC as I used the same password for the User and ROOT.

But just a click on net, I found the process of modifying the root password, and it is very simple.

Process:

1. At the GRUB loader press ‘a’ for editing the one time boot instance, replace ‘quite’ default value with ‘1’ meaning single user mode.

2.  The system loads directly into ROOT user mode with out asking for password.

3.  Then you know what to do, run ‘passwd root’ in the terminal/bash then it asks for new password.  Reboot normally.

Well, now you are the administrator again Open-mouthed smile.

Saturday, January 28, 2012

DHCP Statistics

DHCP statistics is a basic option that is available to DHCP admins to take a rough look at the stats of DHCP role working.  Following is a sample look from a test lab environment:

stats

It gives the info about the start time, up time, total discovers and offers (we can take it as unique mac addresses or PCs in simple), number of requests and acknowledges from start time, declines, releases, number of scopes and total possible address and how many are in use and how many are free.

One can see this window by going to the Display Statistics option on scope.

stats option

Monday, January 16, 2012

Many or all Browsers Crash

In the race to win the software market, some vendors are going too fast that they are forgetting to do some quality checks on there products, this article is speaking of no small firm, it is about the Adobe and the product is the most used one “Flash Player”.

The issue is that, some sites, my case, youtube requested an upgrade of flash player from my current version 10 to new one 11 as a requirement to view videos and I have upgraded, after upgrading when ever a video is being played on IE, Firefox, chrome, in all three browsers get hang due to flash player alone only.  After through browsing figured it out that the new version is not working properly when Hardware Acceleration is enabled and the software by default is configured to use it, it would had at least been if it is disabled, also, on the adobe official forums the support is very very little from them, the solution is taken from a remote forum.

The solution is to disable the Hardware Acceleration from setting, settings option can be fond on right click menu on any flash player event like video on youtube, just right click on video to get the settings option:

Settings Option

Then Uncheck the hardware acceleration:

Hardware Acceleration

To check your installed flash version details click here.

Hope it helps.

Friday, January 13, 2012

Remote System Performance Monitoring

Following is the procedure for collecting or monitoring the reports from a remote system, in the below example following is the setup:

Serv1 – DC and DNS, domain is test.com

Serv2 – DHCP and this is the PC where we are running Performance and Reliability Monitoring Console/Software.

Following is the process:

Firstly:  Add the domain user or Administrator, whom ever is given right to monitor performance to the Reports to the system where you want to view report, in this case it is Serv2 process is a below:

Administrative Tools>Computer Management>

computermgt

In Computer Management>Local Users & Groups>Groups> Open for Performance Monitor Users

groups

Click on Add for adding the respective user

console

Provide the username and perform Check User Button to make sure the name resolves and then click on ok.

adduser

Then you would see the complete box as follows:

console after adding

We completed providing the required rights for using the performance and reliability management rights.  Now a data collector must be created for collecting data.  Steps are as follows:

Open Reliability and Performance Monitor from Administrative Tools

performance and re

Under Data Collector Sets in Console Tree, right click on User Defined and for New Data Collector Set

newdataset

Provide a Name and Select Manually or Template based on requirement, I prefer manually for most customized

1

Click on Add

3

Then click on browse to add a remote system name, type in the name in the box and click on check name to make sure the name resolves, then click on ok.

4

In the below list, select the required counter, for instance I select the entire DNS, then click Add to add then

5

Then change the interval to 1 sec, treat this as to when the report collects data from the remote pc.

6

Then you you can see that the data collector set is added.

7

If we start the report right always, we get the following error when viewing the data “At east one of the input binary log files contain fewer than two data samples.” meaning no data is collected.

error

To start collecting data, a small change is required.  For a remote PC to access another PC, there must be some authorization required, hence we need to provide user name and pw, by default it runs with SYSTEM rights. 

To do this, right click on the report and go to properties

8

Then select change in Run as section as shown below

9

Type in the user name, in my case it is administrator

10

Click ok and close that section.  Hence now you can start the report by right clicking it and click start.

11

Friday, January 6, 2012

Indian IT Future

Is India's IT future promising?

If it is to me, I would surely say not, why?

The rate which the new technologies are growing and is humongous, mainly the shift towards the cloud computing is one major reason to mention.

We we go down the streets in the country we can see all sort of banner ads etc. that display "We teach C, DS, .net" etc., where we should be taught about com integrations and WCF,WPF, WFF technologies etc.

Indian Education as it is praised is only something like a Humans Defense Mechanism to keep itself cool.  For example, attending the IIHT institutes which has promising brand name in IT infra education is still teaching the server 2008 with incompetent faculty India wide, where they must teach with excellent staff for new technologies like System Center Suite, Windows Azure etc.

I am not criticizing the nation, but just pointing the issues, I am too an INDIAN and proud of my Nation.

Monday, January 2, 2012

DHCP Administrator only for Domain :(

For testing the DHCP, I tried to take a n approach to use a none Domain Admin account, I created a user by name “dhcppavan@test.com” where test.com is the forest/domain.  Serv1 is the DC and Serv2 is the DHCP Server and is under the same domain “test.com”.

dhcppavan is the member of Domain DHCP administrators and Domain Users groups as shown below:

Member of

After testing I found that being a DHCP Administrator account I cannot create/modify/delete/authorize/unauthorized any DHCP scope, to do so only a domain admin account can do.  So I have installed and create a scope on Sev2 using the Domain Administrator Account.

I logged in with DHCP administrator on serv2 and opened the DHCP Console or role and I found it looking this way:

DHCP No access

After thorough research I found out that a Domain DHCP Administrator can only work on DHCP that is installed for that specific DC server.

Solution:

Solution was to add the user to the serv2 pc local users and groups DHCP Administrators group as follows:

DHCP Local Administrator

Further reference at: http://technet.microsoft.com/en-us/library/dd183659(WS.10).aspx

and http://social.technet.microsoft.com/Forums/en-US/winserverNIS/thread/c2af800b-1b8b-4d48-a30b-11df740d99af?prof=required