Pages

Wednesday, July 27, 2011

Discover query for SSAS server

<Discover xmlns="urn:schemas-microsoft-com:xml-analysis">
  <
RequestType>MDSCHEMA_CUBESRequestType>
  <
Restrictions
/>
  <
Properties
>
    <
PropertyList
>
      <
Catalog>Adventure Works DWCatalog>
    PropertyList
>
  Properties
>
Discover>


<Discover xmlns="urn:schemas-microsoft-com:xml-analysis">
   <
RequestType>DBSCHEMA_CATALOGSRequestType>
   <
Restrictions
/>
   <
Properties
/>
Discover>


<Discover xmlns="urn:schemas-microsoft-com:xml-analysis">
  <
RequestType>MDSCHEMA_CUBESRequestType>
  <
Restrictions
/>
  <
Properties
/>Discover>



 
 

Monday, July 25, 2011

SharePoint tutorials

http://www.sharepointhosting.com/video_tutorials.html
contain this list of videos


Adding Documents to a SharePoint Site
Create a new SharePoint Site Collection Administrator
Add Links to a SharePoint List
Add SharePoint Site to your Trusted Sites in Internet Explorer
Add Users to a SharePoint Security Group
Approve another user's SharePoint Blog Post
Change SharePoint Navigation to a Site Tree View
Change the SharePoint Site Image
Change the SharePoint Site Title and Description
Change a SharePoint User's e-mail address
Change a SharePoint User's password
Create a SharePoint Calendar Appointment
Create a Document-specific SharePoint Alert
Create a New SharePoint User
Create a SharePoint Announcements List
Create a SharePoint Blog Posting
Create a SharePoint Calendar
Create a SharePoint Contacts List
Create a SharePoint Discussion Board
Create a SharePoint Document Library
Create a SharePoint Document Work Space
Create a SharePoint Gantt Project Management Chart
Create a SharePoint InfoPath form Library
Create a SharePoint Links List
Create a SharePoint Meeting Site
Create a SharePoint Picture Library
Create a new SharePoint Security Group
Create a new SharePoint Sub-site
Create a new Task in a SharePoint Tasks list and assign it to a user
Create a SharePoint Wiki Document
Create a SharePoint Wiki Library
Customize a SharePoint Meeting Site
Delete a SharePoint Meeting Site when you are finished with it
Edit SharePoint Blog Categories
E-mail a SharePoint Document Library
E-mail Enable a SharePoint Discussion Forum
Enable Multiple SharePoint Blog Categorizations
Edit the SharePoint Quick Launch Menu to Customize with your own navigation options
Enable SharePoint Document Versioning
Change SharePoint Top Link bar navigation options
Manage Access Requests to your Site
Move Documents between SharePoint Document Libraries
Remove Permission Inheritance from SharePoint Sub-sites
Remove the SharePoint Quick Launch Menu
Remove Top Link Bar Inheritance from a SharePoint Site
Restore Deleted Items As the Site Collection Administrator
Restore SharePoint Site Permission Inheritance (sub-sites)
Work with the SharePoint Recycle Bin
Create a SharePoint Sales CRM Application
Work with your SharePoint Themes
Add Tabbed SharePoint Navigation Options to your Site
Add SharePoint Web Parts
Sign in as a different SharePoint User
Work with a SharePoint Gantt Project Chart
Create a Custom Site Column

Sunday, July 17, 2011

JUnit

package examples.test;

import java.io.*;
import java.net.*;

import examples.rss.*;
import junit.framework.Assert;
import junit.framework.TestCase;


public class RSSReaderTest extends TestCase {

    public void testParsLocalfile() {
        String resourceLocation="/examples/documents/ABC_Catalyst.xml";
        URL result = getClass().getResource(resourceLocation);
        InputStream stream=null;
        try {
            stream = result.openStream();
        } catch (IOException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }
        RSSReader reader=RSSReader.getInstance(stream);
        Feed feed=    reader.readFeed();

        Assert.assertTrue("Invalid Feed Title", feed.getTitle().equals("Learning, reference repository Cli"));
        Assert.assertTrue("Invalid Feed Link", feed.getLink().equals("http://lrr.cli.det.nsw.edu.au/"));

        Assert.assertTrue("Invalid Feed Entries", feed.getEntries().toArray().length>0);

    }
}

Friday, July 15, 2011

Export and Running Java project

1- Export the project as Runnable JAR file via eclips
2- Use the command line  shell>java -jar  your_exported_jar.jar

Java Hibernate code

 Hibernate sample code using MySQL

public class FirstExample {
    public static void main(String[] args) {
        Session session = null;

        try{
       
            SessionFactory sessionFactory = new Configuration().configure().buildSessionFactory();

             Contact contact = new Contact();
            contact.setId(0);
            contact.setFirstName("Deepak");
            contact.setLastName("Kumar");
            contact.setEmail("deepak_38@yahoo.com");

            session =sessionFactory.openSession();
         Transaction tx=        session.beginTransaction();
        session.save(contact);
        tx.commit();

            session.flush();
            session.close();

        }catch(Exception e){
            System.out.println(e.getMessage());
        }finally{
            // Actual contact insertion will happen at this step
            session.flush();
            session.close();
        }
    }
}
----------------------------

MySQL scripts

shell> mysql -h host -u user -p
Enter password: ********
 mysql -u root -p
Enter password: ********


show databases;

shell> use [database];
use lportal

show tables;

shell> describe [tablename];
describe website
select DATABASE();     //current databse

mysql> SELECT USER(),VERSION(), CURRENT_DATE;