No Matter how hard things are, if time comes we can achieve it.
Old systems are always a head ache for Information Technologies Technicians who working at consumerfed. Replacing the right part by knowing the actual configuration is a nightmare for them.
Some computers are aged more than the employees there.
So Consumerfed Information Technology Section finds a solution for such issues, We have created a bat file that runs and identifies the system configuration and check the basic needs are working finely...
The sample code is given below, Just copy & paste to a notepad, save it as bat extension. run it.
Contact us on 8281808029 ( consfedkozhikode(at)gmail.com)
Diagnosis tool developed by kozhikode region Information Technology
MKDIR D:\ITDiagnosis if not exist D:\ITDiagnosis\diagnosis.txt dir > D:\ITDiagnosis\diagnosis.txt echo cfed tool run on %date% >> D:\ITDiagnosis\diagnosis.txt wmic bios get serialnumber >> D:\ITDiagnosis\diagnosis.txt wmic computersystem get model >> D:\ITDiagnosis\diagnosis.txt echo checking units network issue >> D:\ITDiagnosis\diagnosis.txt echo ===================== >> D:\ITDiagnosis\diagnosis.txt net view >> D:\ITDiagnosis\diagnosis.txt echo checking your internet >> D:\ITDiagnosis\diagnosis.txt echo ================>> D:\ITDiagnosis\diagnosis.txt ping www.google.co.in >> D:\ITDiagnosis\diagnosis.txt echo checking ro ftp connection >> D:\ITDiagnosis\diagnosis.txt echo ===================>> D:\ITDiagnosis\diagnosis.txt ping 117.218.68.154 >> D:\ITDiagnosis\diagnosis.txt echo ip address details >> D:\ITDiagnosis\diagnosis.txt echo =============>> D:\ITDiagnosis\diagnosis.txt ipconfig /all >> D:\ITDiagnosis\diagnosis.txt getmac >> D:\ITDiagnosis\diagnosis.txt echo Routing table >> D:\ITDiagnosis\diagnosis.txt echo =========>> D:\ITDiagnosis\diagnosis.txt route print >> D:\ITDiagnosis\diagnosis.txt echo System Informations >> D:\ITDiagnosis\diagnosis.txt echo ===============>> D:\ITDiagnosis\diagnosis.txt systeminfo >> D:\ITDiagnosis\diagnosis.txt echo User details >> D:\ITDiagnosis\diagnosis.txt echo ===============>> D:\ITDiagnosis\diagnosis.txt net user >> D:\ITDiagnosis\diagnosis.txt wmic useraccount list brief >> D:\ITDiagnosis\diagnosis.txt if not exist D:\ITDiagnosis\swlist.txt dir > D:\ITDiagnosis\swlist.txt wmic product >> D:\ITDiagnosis\swlist.txt echo The code is written by bithesh Consumerfed Information Technology SECTION, Regional Office Kozhikode >> D:\ITDiagnosis\diagnosis.txt
Here we demonstrate how you can create a custom annotation. Creating a custom annotation is very easy. You can use custom annotation in places where you are developing your own services.
The complete code will be available in the following link
@Inherited @Retention(RetentionPolicy.RUNTIME) @Target({ ElementType.TYPE, ElementType.FIELD, ElementType.METHOD }) public @interface Tax { public String name(); public double amount(); public TaxMode mode() default TaxMode.PERCENTAGE; public TaxTypes type() default TaxTypes.INCLUSIVE;
}
What we did here?
we declared a public custom annotation named Tax using @inteface keyword
public @interface Tax
Next we added the scope and visibility using meta annotation
@Retention & @Target is used
ElementType.TYPE implies the annotation can be applied on a class
ElementType.FIELD implies the annotation can be applied on a field
ElementType.METHOD implies the annotation can be applied on a method
We then wrote a price Modification class which works on reflection in java ( Java Reflection API)
where in run time we check the whether the annotation is added on the fields or method of a class and corresponding computation is calculated.
Below is an Insurance class where we applied the custom annotation we created.
@author steffi thomas
public class Insurance { private String name; private double supplierPrice; private double maketPrice; private double basePrice; private double profit; private double commision;
/** * @return the name */ public String getName() { return name; }
/** * @param name * the name to set */ public void setName(String name) { this.name = name; }
/** * @return the supplierPrice */ public double getSupplierPrice() { return supplierPrice; }
/** * @param supplierPrice * the supplierPrice to set */
public void setSupplierPrice(double supplierPrice) { this.supplierPrice = supplierPrice; }
/** * @return the maketPrice */ @Tax(name = "VAT", amount = 5, mode = TaxMode.PERCENTAGE, type = TaxTypes.INCLUSIVE) public double getMaketPrice() { return maketPrice; }
/** * @param maketPrice * the maketPrice to set */ public void setMaketPrice(double maketPrice) { this.maketPrice = maketPrice; }
/** * @return the basePrice */ @Tax(name = "VAT", amount = 5, mode = TaxMode.PERCENTAGE, type = TaxTypes.INCLUSIVE) public double getBasePrice() { return basePrice; }
/** * @param basePrice * the basePrice to set */ public void setBasePrice(double basePrice) { this.basePrice = basePrice; }
/** * @return the profit */ @Tax(name = "VAT", amount = 100, mode = TaxMode.AMOUNT, type = TaxTypes.EXCLUSIVE) public double getProfit() { return profit; }
/** * @param profit * the profit to set */ public void setProfit(double profit) { this.profit = profit; }
/** * @return the commision */ @Tax(name = "VAT", amount = 1, mode = TaxMode.PERCENTAGE, type = TaxTypes.EXCLUSIVE) public double getCommision() { return commision; }
/** * @param commision * the commision to set */ public void setCommision(double commision) { this.commision = commision; }
}
While processing the annotation we used the reflection API as we mentioned above, please refer the PriceModification.Java class to know how it works
Gift Card Pre-book Offer valid till 31st May, 2019: applicable to customers who purchased Rs 1000 OnePlus 7 Pro gift card between 3rd to 7th of May, 2019
Up to ₹ 8,000.00 off on Exchange
The latest renders of the OnePlus 7 reveal identical design to the OnePlus 6T with a waterdrop notch. The phone has a dual rear camera setup. See More
The latest CAD renders for the OnePlus 7 reveal that the phone would have a waterdrop notch and miss out on the pop-up selfie camera design and triple camera setup on the rear.
OnePlus 6T another best phone in market with affordable rate
Lion is the king of the jungle without any of these qualities. Why?
In the jungle, which animal is the biggest?
It’s Elephant
In the jungle, which animal is the tallest?
It’s Giraffe
In the jungle, which animal is the wisest?
It’s Fox
In the jungle, which animal is the fastest?
It’s Cheetah
Among all these ‘wonderful qualities’ mentioned, where is the LION in the picture?
Yet you say that Lion is the king of the jungle without any of these qualities. Why?
Because..
* The Lion is Courageous
* The Lion is very Bold
* The Lion is always ready to face any challenges, any barrier that crosses his path, no matter how big, difficult or bad they are.
* He walks with confidence, dares anything & is NEVER afraid of anything.
* He believes that he is Unstoppable. He is a risk taker.
The Lion believes that any opportunity is worth giving it a try & never lets it slip from his hands. He has charisma. So..
What is that we get to learn from the Lion?
- You don’t need to be the fastest
- You don’t need to be the wisest
- You don’t need to be the most brilliant
- You don’t need to be generally accepted to achieve your dreams & to be great in life.
All you need is " Courage "
All you need is to " Believe in Yourself "