Generating Undeclared Methods

Eclipse has many features that make the job of a programmer easy. Here a simple project is created and will use few of those features to demonstrate how easy programming can be using Eclipse. Most of the new programmers, ignore these and prefer to code everything themselves which is time consuming.




  1. First creating a package: really simple. Right click the project name and click “ New ” – > “ Package” . Name it as “car” .


  2. Creating a class in it named “ Car ” and defined 2 private attributes namely “ doors ” , “ seats ” . Now generate getters/setters for that. Eclipse can generate those for us. In the Source menu, click “ Generate getters and setters ” .



  3. Now make another class in the same package named “ Honda ”. Create a “ main ” method in this class. Eclipse will generate “ main ” method once you check the “ generate main method ” checkbox while creating the class.

  4. Also to make Car class to be the superclass for “ Honda ” class. Click “ Browse ” button against superclass field of the class declaration window. As “ Car ” class is under package “ cars ”, parent class for Honda will be “ cars.Car ”.


Eclipse will generate the following code:



package cars;public class Honda extends Car {
 
/**
 
* @param args
 
*/

 
public static void main(String[] args) {
 
// TODO Auto-generated method stub
 
}
 
}

In class Honda, following lines of code are added.



	Car car1 = new Honda(); car1.setSeats(4);
 
car1.setDoors(2);
 
System.out.println(car1.calcNum());

“ car1.calcNum() ” shows error as this method is not declared in the class Car. One way is to go back to class Car and declare the method. Simple way is to click the red cross on the left of the problem line and Eclipse will give you the options for automatically generating the required method in the required class. After generating the required method, Write code according to the requirement in the generated method.



Review the code:



package cars;public class Car {private int doors;private int seats;
 
public int getDoors() {
 
return doors;
 
}
 
public void setDoors(int doors) {
 
this.doors = doors;
 
}
 
public int getSeats() {
 
return seats;
 
}
 
public void setSeats(int seats) {
 
this.seats = seats;
 
}
 
public Object calcNum() {
 
return this.getDoors() * this.getSeats();
 
}
 
}
 
package cars;
 
public class Honda extends Car {
 
public static void main(String[] args) {
 
Car car1 = new Honda();
 
car1.setSeats(4);
 
car1.setDoors(2);
 
System.out.println(car1.calcNum());
 
}
 
}

Name Obfuscation Using yGuard





Name Obfuscation Using yGuard



yGuard is a Java byte code obfuscator that can be used for effective name obfuscation of Java byte code. It is bundled with every yFiles distribution (see the yGuard README file), and is also freely available.


Since yGuard fulfills the obfuscation requirements of the yFiles license terms, it is a perfectly suited tool to protect the yFiles part of any yFiles-based application. (Of course, it is also the perfect tool to protect the entire application.)


yGuard is available as an Apache Ant task for easy integration into any Ant-based build process. Example A.2, “Using the yGuard Ant task” shows an Ant build file’s target that obfuscates the yFiles part of an application.



Note


The example uses yGuard 2.0 syntax.



Example A.2. Using the yGuard Ant task


<!– Obfuscates the yFiles part of an application (i.e., y.jar) and adjusts –>
<!– the non-yFiles part given by the application’s Jar file accordingly. –>
<target name=”obfuscate” depends=”jar”>
  <!– yGuard Ant task. –>
  <taskdef name=”yguard”
           classname=”com.yworks.yguard.YGuardTask”
           classpath=”${yGuardJar}”/>
  <!– Integrated obfuscation and name adjustment… –>
  <yguard>
    <!– Obfuscate the yFiles Jar. –>
    <inoutpair in=”${yJar}” out=”${yJarObf}”/>
    <!– While obfuscating, adjust the names of yFiles features in the –>
    <!– application’s Jar file. –>
    <inoutpair in=”${myAppJar}” out=”${myAppJarObf}”/>
   
    <!– …using the yGuard ‘rename’ task. –>
    <rename logfile=”${obfuscationLog}” replaceClassNameStrings=”true”>
   
      <property name=”obfuscation-prefix” value=”myprefix”/>
      <keep>
        <class classes=”private” methods=”private” fields=”private”>
          <patternset>
            <include name=”com.mycompany.myApp.**”/>
          </patternset>
        </class>
      </keep>
     
      <!– Adjust all occurences of now obfuscated names in plain-text –>
      <!– files, too. –>
      <!– For example, the names of property resource bundle files for –>
      <!– yFiles classes must be adjusted to reflect the yFiles class’s –>
      <!– obfuscated name. –>
      <adjust replaceName=”true”>
        <include name=”y/**/*.properties”/>
      </adjust>
     
    </rename>
  </yguard>
</target>


For detailed explanations of yGuard’s Ant syntax, please see the yGuard manual.






Adjusting Names



Any code that makes use of yFiles features, or more specifically uses names of yFiles features, needs to be adjusted to their new names. This adjustment is automatically performed for all Jar files given to the yGuard obfuscation machinery using the <inoutpair> element.


Using yGuard’s <adjust> element (inside the <obfuscate> element), any additional plain-text files that are not processed by the obfuscation itself, e.g., resource files, can be adjusted in several ways, too. For example, a file’s path, its name, and also its content are subject to possible modifications.






Checking Obfuscation Success



During the obfuscation process, yGuard optionally generates a log file that contains all original names, their new obfuscated names, and also additional statistical information in XML-based syntax. The log file is an important document, since it shows the mapping of original to obfuscated names. To display the information nicely, yGuard offers a convenient reverse name look-up feature.


Example A.3, “yGuard’s command line syntax” shows the command line syntax to invoke yGuard’s reverse name look-up. Given a generated log file (or its GZip compressed variant), both the original class, method, and field names and their obfuscated counterparts are conveniently presented in a tree view, as depicted in Figure A.1, “yGuard’s reverse name look-up view”.



Example A.3. yGuard’s command line syntax

java -jar yguard.jar [yGuard_obfuscation_log_file.xml[.gz]]


Figure A.1. yGuard’s reverse name look-up view










yGuard's reverse name look-up view.

To ensure that the yFiles API has been properly obfuscated, all public and protected class, method, and field names must be present in the tree view presented by yGuard’s reverse name look-up feature. In other words, all names of such features must have been replaced by new names that are distinctly different from their originals.






Tutorial Demo Code



For an example on how to obfuscate the yFiles part of a yFiles-based application using yGuard, see the obfuscation demo’s Ant build file (included with the yFiles Complete distribution). The build file also shows how to adjust the occurences of obfuscated names of any yFiles features in properties files.

YGuard build Sample

<?xml version=”1.0″ encoding=”UTF-8″?>
  <project name=”ESI” default=”yguard” basedir=”.”>
    <!– edit the following lines to your needs –>
    <target name=”init”>
      <property name=”project_name” value=”ESI”/>
      <property name=”srcDir” value=”src/main”/>
      <property name=”classDir” value=”classes”/>
      <property name=”jar” value=”${project_name}.jar”/>
      <property name=”obfjar” value=”${project_name}_obf.jar”/>
      <property name=”renamelog” value=”${project_name}_renamelog.xml”/>
      <property name=”shrinklog” value=”${project_name}_shrinklog.xml”/>    
      <mkdir dir=”${classDir}” />
      <property name=”lib” value=”E:/Projects/ESI/lib” />
      <path id=”myclasspath”>
     <fileset dir=”${lib}”>
       <include name=”*.jar”/>
     </fileset>
   </path>
    </target>

    <target depends=”jar” name=”yguard”>
      <taskdef name=”yguard” classname=”com.yworks.yguard.YGuardTask” classpath=”D:\yguard-2.2.0\lib\yguard.jar”/>
      <!– the following can be adjusted to your needs –>
      <yguard>
        <inoutpair in=”${jar}” out=”${obfjar}”/>
        <shrink logfile=”${shrinklog}”/>
        <rename logfile=”${renamelog}”>        
          <keep>
           <package>
             <patternset>
               <include name=”org.apache.*”/>
             </patternset>
           </package>
          </keep>
        </rename>
      </yguard>
    </target>
    <!– compile –>
    <target name=”compile” depends=”init”>
      <javac classpathref=”myclasspath” srcdir=”${srcDir}” destdir=”${classDir}”/>
    </target>
    <!– create .jar –>
    <target name=”jar” depends=”compile”>
      <jar jarfile=”${jar}” basedir=”${classDir}” includes=”**”>
        <fileset dir=”E:/Projects/ESI/resource/conf”>
          <include name=”*.xml”/>
        </fileset>
      </jar>
    </target>
    <!– removes all that has been built –>
    <target name=”clean” depends=”init”>
      <delete dir=”${classDir}” includeEmptyDirs=”true” />
    </target>
  </project>
  <!– end file build.xml –>

yGuard – Java™ Bytecode Obfuscator and Shrinker

yGuard is a free Java bytecode obfuscator and shrinker that improves your software deployment by prohibiting unwanted access to your source code and drastically shrinking the processed Jar files at the same time.


Features




  • yGuard is absolutely free! Contrary to expensive commercial products of our competitors providing the same amount of features as yGuard or less, yGuard is free.

  • yGuard is an Ant task! Existing tools use proprietary mechanisms to invoke or configure the task of obfuscation. As an Ant task, yGuard can be seamlessly integrated into your deployment process using XML syntax.

  • yGuard provides highly configurable name obfuscation that will protect your intellectual property from reverse engineering.

  • yGuard provides elaborate code shrinking functionality through dependency analysis.

  • yGuard 2.0 offers a new powerful and easy to use XML syntax that allows the effortless definition of code entities e.g. based on pattern sets or inheritance.

  • yGuard will correctly obfuscate and shrink programs that depend on external libraries.

  • yGuard can automatically rename and adjust textual resource files according to the obfuscation scheme.

  • yGuard can scramble and unscramble or shrink line number table information. This means that debugging an obfuscated program is still achievable without weakening the obfuscation.

  • yGuard can create patches! During each obfuscation run, yGuard produces XML output that can be used to create subsequent patches of already deployed obfuscated applications.

  • yGuard supports JDK 1.5 features and correctly obfuscates classes compiled with its new features.

Why Use yGuard?



  • Name Obfuscation: protects your .class files from reverse engineering by replacing package, class, method, and field names with inexpressive characters. If afterwards the obfuscated .class files are decomplied, it will be extremely diffcult to derive the original purpose of the obfuscated code entities.
    As an additional side-effect, name obfuscation will significantly reduce the size of your application, depending on the chosen mapping scheme.

  • Code Shrinking: drastically reduces the size of the input Jar files if your application does not use all of the contained bytecode.
    The shrinking engine analyzes the bytecode of all input Jar files in order to determine which code entities can not be reached from a set of given code entry points. These obsolete code fragments (either entire classes or single methods and fields) will then be removed by yGuard. If you use any third party libraries, you will probably benefit a lot from the yGuard shrinking engine, since applications usually do not use all of the functionality provided by an external library and a large fraction of the contained bytecode and resources can be safely removed.

SecureCRT v5.5.2 crack key keygen

SecureCRT gives you an encrypted Secure Shell (SSH1 and SSH2) session with servers and devices. For SSH, Telnet, Telnet/SSL, and other protocols, SecureCRT’s tabbed sessions reduce desktop clutter and make it easy to switch between sessions and organize groups of connected sessions. Extensive session management and customization features include named sessions, and multiple-session windows. Choose from a wide range of emulations including VT100, VT102, VT220, ANSI, SCO ANSI, Wyse 50/60, Xterm, and Linux console. SecureCRT can help you save valuable time by automating routine configuration tasks with powerful scripting capabilities.


SecureCRT 5.5 offers new time-saving features, with a script recorder and the ability to open multiple sessions or folders on startup using auto session. Additional enhancements include custom logging options, support for generating and converting private keys in OpenSSH format, improved integration with SecureFX®, and support for Windows Vista.



 


New productivity enhancements:



  • Script recorder: Quickly create a script to automate routines using the new script recorder, which records keystrokes, including function keys, and then generates a VB script.

  • Improved auto session: With “Use auto session” enabled, you can now select a single session, multiple sessions, or folders of sessions to automatically connect on startup.

  • Cache passwords: SSH2 session passwords can be cached like passphrases. SecureCRT and SecureFX can share passwords while either application or the Activator utility is running.

Improved ANSI color with color schemes: When using ANSI color, you can now select a color scheme to replace the standard white foreground and black background.


Expanded logging options with custom log data: Custom log data gives you the ability to specify strings to be logged upon connect, disconnect, and on each line. Parameter substitutions for session and date information are supported.


Support for OpenSSH format keys: You can now generate keys in OpenSSH format or convert existing VanDyke Software format private keys to OpenSSH format, allowing you to use the same keys with other Secure Shell clients.


Support for [email protected] compression: When [email protected] compression is specified, compression starts after authentication, preventing unencrypted passwords from being cached by the zlib library.


Additional tab support: Display the list of tabs on the menu using the MENU_TAB_LIST1 custom menu item. A new script function, GetScriptTab, returns the tab from which the script was started.


Windows Vista support: SecureCRT has been tested under Windows Vista, so when you are ready to move to Vista, SecureCRT will be compatible.


Download HERE: SecureCRT v5.5.2 crack key keygen

SQL Hacks (CHM)


<<SQL Hacks >>



Book description


Whether you’re running Access, MySQL, SQL Server, Oracle, or PostgreSQL, this book will help you push the limits of traditional SQL to squeeze data effectively from your database. SQL Hacks offers 100 hacks — unique tips and tools — that bring you the knowledge of experts who apply what they know in the real world to help you take full advantage of the expressive power of SQL. You’ll find practical techniques to address complex data manipulation problems.


Download CHM

MySQL Stored Procedure Programming

<<MySQL Stored Procedure Programming>>



Book description


MySQL Stored Procedure Programming covers a lot of ground. The book starts with a thorough introduction to stored procedures programming and functions, covering the fundamentals of data types, operators, and using SQL in stored procedures. You’ll learn how to build and maintain stored programs — covering transactions, stored functions, and triggers — and how to call and use MySQL-based stored procedures in a variety of languages, including PHP, Perl, Python, .NET, and Java. This book, destined to be the bible of stored procedure development, is a resource that no real MySQL programmer can afford to do without.


 


MySQL Stored Procedure Programming CHM下载


书中配套代码的下载


书中样例数据库的下载

ImRe - 圖形轉換小精靈

ImRe - 圖形轉換小精靈

軟體:ImRe(版本:2.1)
類別:影像轉檔
性質:Freeware(461 K)

【編輯/王國淵】

數位相機越來越普及且體積也更加小巧,幾乎有電腦的人就有一部數位相機,所以一旦有機會出門踏青,數位相機的快門總是會被按個不停。拼命地按快門時著實有一種快感,但是當回家後看著上千張的戰利品,想到要整理時,可是讓人的興致完全冷到最低點阿。此時,你其實可以透過 ImRe 的協助來減輕你的工作量。

ImRe 是一款集合了圖片轉換、縮放功能的免費圖片編修工具,使用者可以利用它所提供的批次修改功能,來對圖片進行一次性的調整,加速你對圖片的處理。你只需要指定所要進行轉換的圖片目錄,ImRe 自然就會依照你的設定加目錄裡面所有的圖片都做好縮放以及轉檔的工作囉。

ImRe 目前支援 Jpeg 、Bmp 、Gif 、Tiff 、Png 、Emf 與 Wmf 等七種圖形檔案格式,使用者可以在這些格式間任意轉換圖檔,節省你許多處理照片時所需要的時間喔。

下載:

Copy Cat - 搶救你複製不了的檔案

Copy Cat - 搶救你複製不了的檔案

軟體:Copy Cat(版本:2.0)
類別:磁碟工具
性質:Freeware(806 K)

【編輯/王國淵】

你是否有這樣的經驗呢?想要重磁碟、光碟甚至是磁片中拷貝檔案,但是系統偏偏在檔案快拷貝完成時告訴你複製失敗,這樣的結果實在是叫人難以接受阿。即使磁碟損毀,好歹也有一部份資料複製得出來吧!這個時候你需要的就是 Copy Cat 。

Copy Cat 是一款免費的檔案複製工具,它的特殊之處不是在於複製,而是在於能夠替使用者盡可能複製出受損的儲存媒體中的資料。由於磁片或是光碟片一類的儲存媒體,常常可能因為攜帶或是存放的不小心,而導致刮傷,這使得要讀取其中的資料時往往會發生錯誤。在這樣的情況下,你就可以仰賴 Copy Cat 出手相助。

使用者只需要透過 Copy Cat 來複製檔案,那麼它就會將無法複製的地方以空資料來做補償,近一切可能複製出最完整的資料來,讓使用者的損失減到最小。且 Copy Cat 還提供了貼心的功能,讓使用者可以選擇略過的磁區大小,讓磁碟發生大面積損毀時,能夠不要花太多時間在填補無法挽回的資料上。

下載:http://www.vcsoftwares.com/cc.html

功能強大的免費燒錄軟體:Burnatonce

功能強大的免費燒錄軟體:Burnatonce

軟體:Burnatonce(版本:0.99.5)
類別:燒錄程式
性質:Freeware(3.81 M)

【編輯/高啟唐】

Burnatonce是一個免費的光碟燒錄軟體,不但支援CD-R/RW光碟燒錄機,就連最新的DVD+R/RW、DVD-R/RW燒錄機也都支援了,所用者完全不必擔心相容性上的問題。

所有常用的燒錄功能,Burnatonce可說是該有的都有了。像是資料光碟、音樂光碟、開機光碟、光碟複製與製作ISO、CUE光碟映像檔等等,Burnatonce都可以燒錄;比起其他付費的燒錄軟體一點也不遜色。

另外,Burnatonce還支援抹除可複寫式光碟與防燒壞保護等燒錄輔助功能。還在煩惱找不到合用的燒錄軟體嗎?推薦你來試試Burnatonce!

下載:http://www.burnatonce.net/downloads/