Tuesday, March 31, 2009

Remove Query String Using Regular Expressions

You can use this code to remove query string from URL.

<?php
$url = "http://www.testDomain.com/testPage.php?q1=queryString1&q2=queryString2";

$search = '|(\.php)(.*)|i';
$replace = '${1}';

echo preg_replace( $search, $replace, $url );

?>

Convert Image Into Jpeg Using C sharp.

This example is useful to upload image of any format and Convert into JPEG or JPG Using C-Sharp.
using System.IO;
using System.Drawing;
using System.Drawing.Imaging;
using System.Reflection;
using System.Drawing.Drawing2D;

public class _Library
{
public string w;
public string h;
public _Library()
{

}

/* for uploading Image */
public String UploadFile(FileUpload Fileobject,String Path)
{
String FileName = "";
String[] getformat;
String imgformat1 = "", imgformat2 = "";
if (Fileobject.HasFile)
{
FileName = DateTime.Now.Day.ToString() + DateTime.Now.Month.ToString() + DateTime.Now.Year.ToString() + DateTime.Now.Hour.ToString() + DateTime.Now.Minute.ToString() + DateTime.Now.Second.ToString() + "_" + Fileobject.FileName.Replace(' ','-').ToLower();

Fileobject.SaveAs(@"" + Path + "" + FileName);
getformat =FileName.ToString().Split('.');
imgformat1 = getformat[0].ToString();
imgformat2 = getformat[1].ToString();

if (imgformat2.ToString().Equals("jpg"))
{
}
else
{
FileName = ConvertIntoJPEG(Path + "" + FileName);
}
}
return FileName;
}
public void UploadFile(FileUpload Fileobject, String NewFilePath, String NewFileName)
{
String FileName = "";
if (Fileobject.HasFile)
{
//FileName = DateTime.Now.Day.ToString() + DateTime.Now.Month.ToString() + DateTime.Now.Year.ToString() + DateTime.Now.Hour.ToString() + DateTime.Now.Minute.ToString() + DateTime.Now.Second.ToString() + "_" + Fileobject.FileName.Replace(' ', '-').ToLower();
Fileobject.SaveAs(@"" + NewFilePath + "" + NewFileName);
FileName = ConvertIntoJPEG(NewFilePath + "" + NewFileName);

}
}
public bool ThumbnailCallback()
{
return false;
}
public void ImageResizeHigherSide(String Source_Desti,int image_higher_size)
{
String source = Source_Desti;
String desti = Source_Desti + "._tmpfile";
String Del_abspath = source;
Bitmap myBitmap = new Bitmap(source);
int higher_size = image_higher_size;
int h_w_n_h = 0;
int n_w = 0;
int n_h = 0;
int o_w = myBitmap.Width;
int o_h = myBitmap.Height;
if (o_w > higher_size || o_h > higher_size)
{
if (o_w > o_h)
{
n_w = higher_size;
n_h = o_h * higher_size / o_w;
}
else
{
n_h = higher_size;
n_w = o_w * higher_size / o_h;
}
try
{
//getting higher size of image
if (o_w > o_h) h_w_n_h = o_w;
else h_w_n_h = o_h;
if (image_higher_size > h_w_n_h)
{
n_h = o_h;
n_w = o_w;
}
System.Drawing.Image.GetThumbnailImageAbort myCallback = new System.Drawing.Image.GetThumbnailImageAbort(this.ThumbnailCallback);
System.Drawing.Image myThumbnail = myBitmap.GetThumbnailImage(n_w, n_h, myCallback, IntPtr.Zero);
////myBitmap.SetResolution(100, 100);
Graphics myresizer;
myresizer = Graphics.FromImage(myThumbnail);
myresizer.InterpolationMode = System.Drawing.Drawing2D.InterpolationMode.HighQualityBicubic;
myresizer.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.HighQuality;
myresizer.PixelOffsetMode = System.Drawing.Drawing2D.PixelOffsetMode.HighQuality;
myresizer.CompositingQuality = System.Drawing.Drawing2D.CompositingQuality.HighQuality;

//////myresizer.DrawImage(myBitmap, new Rectangle(0, 0, n_w, n_h), 0, 0, n_w, n_h, GraphicsUnit.Pixel);
myresizer.DrawImage(myBitmap, 0, 0, n_w, n_h);
// myBitmap.Save(desti, ImageFormat.Jpeg);
myThumbnail.Save(desti, ImageFormat.Jpeg);
myresizer.Dispose();
myThumbnail.Dispose();
myBitmap.Dispose();
File.Delete(source);
File.Move(desti,desti.Replace("._tmpfile", ""));
File.Delete(desti);
}
catch (Exception ex){}
}
}


private String ConvertIntoJPEG(String Source_Desti)
{
String source = Source_Desti;
String ext = source.Substring(source.LastIndexOf('.'));
String desti = source;
desti = desti.Replace(ext, ".jpg");
desti = desti + "._tmpfile";
String nJpegFileName = "";
String Del_abspath = source;
Bitmap myBitmap = new Bitmap(source);

int o_w = myBitmap.Width;
int o_h = myBitmap.Height;
try
{
System.Drawing.Image.GetThumbnailImageAbort myCallback =
new System.Drawing.Image.GetThumbnailImageAbort(this.ThumbnailCallback);
System.Drawing.Image myThumbnail = myBitmap.GetThumbnailImage(o_w, o_h, myCallback, IntPtr.Zero);


Graphics myresizer;
myresizer = Graphics.FromImage(myThumbnail);
myresizer.InterpolationMode = System.Drawing.Drawing2D.InterpolationMode.HighQualityBicubic;
myresizer.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.HighQuality;
myresizer.PixelOffsetMode = System.Drawing.Drawing2D.PixelOffsetMode.HighQuality;
myresizer.CompositingQuality = System.Drawing.Drawing2D.CompositingQuality.HighQuality;

//////myresizer.DrawImage(myBitmap, new Rectangle(0, 0, n_w, n_h), 0, 0, n_w, n_h, GraphicsUnit.Pixel);
myresizer.DrawImage(myBitmap, 0, 0, o_w, o_h);

myThumbnail.Save(desti, ImageFormat.Jpeg);
myThumbnail.Dispose();
myBitmap.Dispose();
File.Delete(source);
File.Move(desti, desti.Replace("._tmpfile", ""));
File.Delete(desti);
}
catch (Exception ex)
{

}
desti = desti.Replace("._tmpfile", "");
nJpegFileName = desti.Substring(desti.LastIndexOf("\\") + 1);
return nJpegFileName;
}
/* For deleting Image from Folder*/
public void DeleteFile(String Del_abspath)
{
if (Del_abspath != null)
{
try
{
String delpath = Del_abspath.Replace('\\', '/');
File.Delete(delpath);
}
catch (Exception ex) { }

}
}
}

Wednesday, March 18, 2009

Flex Banner Example

Simple Flex Fade in Fade out Banner Example

CODE:
1:  <?xml version="1.0" encoding="utf-8"?>
2: <mx:Application verticalScrollPolicy="off" verticalGap="0" horizontalGap="0" horizontalScrollPolicy="off" xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical" paddingTop="0" paddingLeft="0" paddingRight="0" paddingBottom="0" verticalAlign="middle" backgroundColor="white" creationComplete="{init();}">
3: <mx:Script>
4: <![CDATA[
5: import mx.effects.WipeLeft;
6: import mx.events.TweenEvent;
7: import mx.controls.Alert;
8: import mx.events.EffectEvent;
9: import mx.effects.Fade;
10: import mx.effects.Pause;
11: import mx.effects.Sequence;
12: import mx.effects.SetPropertyAction;
13: import mx.effects.WipeRight;
14: private var fader:Sequence;
15: private var wiper:Sequence;
16: public var wipeIn:WipeRight;
17: public var wipeOut:WipeLeft;
18: public var pause:Pause;
19: public var alphaOn:SetPropertyAction;
20: public var alphaOff:SetPropertyAction;
21: private var counter:int=1;
22: [Bindable]
23: private var imagesArr:Array =
24: [
25: "image1.jpg",
26: "image3.jpg",
27: "image4.jpg"
28: ];
29: public function init():void{
30: // for preloading image
31: var img:Image = new Image();
32: for(var i:int=0;i<imagesArr.length;i++){
33: img.source = "images/"+imagesArr[i];
34: }
35: start_wipe();
36: }
37: private function start_wipe():void {
38: wipeIn = new WipeRight();
39: wipeIn.showTarget = true;
40: wipeIn.duration = 3000;
41: wipeOut = new WipeLeft();
42: wipeOut.showTarget = false;
43: wipeOut.duration = 2000;
44: pause = new Pause();
45: pause.duration = 5000;
46: alphaOn = new SetPropertyAction();
47: alphaOn.name = "alpha";
48: alphaOn.value = 1.0;
49: alphaOff= new SetPropertyAction();
50: alphaOff.name = "alpha";
51: alphaOff.value = 0.0;
52: wiper = new Sequence();
53: wiper.addChild(alphaOn);
54: wiper.addChild(wipeIn);
55: wiper.addChild(pause);
56: wiper.addChild(wipeOut);
57: wiper.addChild(alphaOff);
58: wiper.stop();
59: wiper.play([imagePlaceHolder]);
60: wiper.addEventListener(EffectEvent.EFFECT_END,wiperEffectEnd);
61: }
62: public function wiperEffectEnd(evt:EffectEvent):void{
63: var len:int=imagesArr.length;
64: if(len==counter) counter=0;
65: img.source= "images/"+imagesArr[counter];
66: counter++;
67: this.start_wipe();
68: }
69: ]]>
70: </mx:Script>
71: <mx:HBox horizontalGap="0" verticalGap="0" id="imagePlaceHolder" width="100%" height="100%" verticalScrollPolicy="off" horizontalScrollPolicy="off" backgroundColor="#E6E6E6" alpha="0.0" paddingTop="0" paddingLeft="0" paddingRight="0" paddingBottom="0">
72: <mx:Image source="images/image1.jpg" id="img" />
73: </mx:HBox>
74: </mx:Application>

Monday, March 16, 2009

R Script Command Line Options

Usage: R [options] [<> outfile]
or: R CMD command [arguments]

Start R, a system for statistical computation and graphics, with the
specified options, or invoke an R tool via the 'R CMD' interface.

Options:

-h, --help : Print short help message and exit
--version : Print version info and exit
--encoding=ENC : Specify encoding to be used for stdin
RHOME : Print path to R home directory and exit
--save : Do save workspace at the end of the session
--no-save : Don't save it
--no-environ : Don't read the site and user environment files
--no-site-file : Don't read the site-wide Rprofile
--no-init-file : Don't read the .Rprofile or ~/.Rprofile files
--restore : Do restore previously saved objects at startup
--no-restore-data : Don't restore previously saved objects
--no-restore-history : Don't restore the R history file
--no-restore : Don't restore anything
--vanilla : Combine --no-save, --no-restore, --no-site-file, --no-init-file and --no-environ
--no-readline : Don't use readline for command-line editing
--min-vsize=N : Set vector heap min to N bytes; '4M' = 4 MegaB
--max-vsize=N : Set vector heap max to N bytes;
--min-nsize=N : Set min number of cons cells to N
--max-nsize=N : Set max number of cons cells to N
--max-ppsize=N : Set max size of protect stack to N
-q, --quiet : Don't print startup message
--silent : Same as --quiet
--slave
: Make R run as quietly as possible
--verbose
: Print more information about progress
-d, --debugger=NAME
: Run R through debugger NAME
--debugger-args=ARGS
: Pass ARGS as arguments to the debugger
-g, --gui=TYPE
: Use TYPE as GUI; possible values are 'X11'
(default), 'Tk' and (with package gnomeGUI) 'gnome'
--arch=NAME
: Specify a sub-architecture
--args
: Skip the rest of the command line
-f, --file=FILE
: Take input from 'FILE'Commands:

BATCH : Run R in batch mode
COMPILE : Compile files for use with R
SHLIB : Build shared library for dynamic loading
INSTALL : Install add-on packages
REMOVE : Remove add-on packages
build : Build add-on packages
check : Check add-on packages
LINK : Front-end for creating executable programs
Rprof : Post-process R profiling files
Rdconv : Convert Rd format to various other formats
Rd2dvi : Convert Rd format to DVI/PDF
Rd2txt : Convert Rd format to pretty text
Sd2Rd : Convert S documentation to Rd format
Stangle : Extract S/R code from Sweave documentation
Sweave : Process Sweave documentation
config : Obtain configuration information about R

Open Babel command line options

Open Babel command line options are as follows.

Open Babel converts chemical structures from one file format to another

Usage: babel <input> <output> [Options]

Each spec can be a file whose extension decides the format.
Optionally the format can be specified by preceding the file by
-i<format-type>&e.g. -icml, for input and -o<format-type> for output

See below for available format-types, which are the same as the
file extensions and are case independent.
If no input or output file is given stdin or stdout are used instead.

More than one input file can be specified and their names can contain
wildcard chars (* and ?).The molecules are aggregated in the output file.

Conversion options

-f <#> Start import at molecule # specified
-l <#> End import at molecule # specified
-e Continue with next object after error, if possible
-z Compress the output with gzip
-k Attempt to translate keywords
-H Outputs this help text
-Hxxx (xxx is file format ID e.g. -Hcml) gives format info
-Hall Outputs details of all formats
-V Outputs version number
-L <basetype> Lists plugin classes of this type
e.g. <fingerprints>, or <plugins> for a list of BaseTypes
-m Produces multiple output files, to allow:
Splitting: e.g. babel infile.mol new.smi -m
puts each molecule into new1.smi new2.smi etc
Batch conversion: e.g. babel *.mol -osmi -m
converts each input file to a .smi file

For conversions of molecules

Additional options :

-d Delete hydrogens (make implicit)
-h Add hydrogens (make explicit)
-p Add Hydrogens appropriate for pH model
-b Convert dative bonds e.g.[N+]([O-])=O to N(=O)=O
-c Center Coordinates
-C Combine mols in first file with others having same name
--filter <filterstring> Filter: convert only when tests are true:
--add <list> Add properties from descriptors:
--delete <list> Delete properties in list:
--append <list> Appends properties or descriptors in list to title:
-s"smarts" Convert only molecules matching SMARTS:
-v"smarts" Convert only molecules NOT matching SMARTS:
--join Join all input molecules into a single output molecule
--separate Output disconnected fragments separately
--property <attrib> <value> add or replace a property (SDF)
--title <title> Add or replace molecule title
--addtotitle <text> Append to title
--addformula Append formula to title
--AddPolarH Adds hydrogen to polar atoms only
--center Centers coordinates around (0,0,0)
--gen3D Generate 3D coordinates
--nodative Replace [N+]([O-])=O by N(=O)=O

Interface to OBAPI internals
API options, e.g. ---errorlevel 2
errorlevel # min warning level displayed

The following file formats are recognized:

acr -- ACR format [Read-only]
adf -- ADF cartesian input format [Write-only]
adfout -- ADF output format [Read-only]
alc -- Alchemy format
arc -- Accelrys/MSI Biosym/Insight II CAR format [Read-only]
bgf -- MSI BGF format
box -- Dock 3.5 Box format
bs -- Ball and Stick format
c3d1 -- Chem3D Cartesian 1 format
c3d2 -- Chem3D Cartesian 2 format
cac -- CAChe MolStruct format [Write-only]
caccrt -- Cacao Cartesian format
cache -- CAChe MolStruct format [Write-only]
cacint -- Cacao Internal format [Write-only]
can -- Canonical SMILES format.
car -- Accelrys/MSI Biosym/Insight II CAR format [Read-only]
ccc -- CCC format [Read-only]
cdx -- ChemDraw binary format [Read-only]
cdxml -- ChemDraw CDXML format
cht -- Chemtool format [Write-only]
cif -- Crystallographic Information File
ck -- ChemKin format
cml -- Chemical Markup Language
cmlr -- CML Reaction format
com -- Gaussian 98/03 Input [Write-only]
copy -- Copies raw text [Write-only]
crk2d -- Chemical Resource Kit diagram(2D)
crk3d -- Chemical Resource Kit 3D format
csr -- Accelrys/MSI Quanta CSR format [Write-only]
cssr -- CSD CSSR format [Write-only]
ct -- ChemDraw Connection Table format
cub -- OpenDX cube format for APBS
cube -- OpenDX cube format for APBS
dmol -- DMol3 coordinates format
dx -- OpenDX cube format for APBS
ent -- Protein Data Bank format
fa -- FASTA format [Write-only]
fasta -- FASTA format [Write-only]
fch -- Gaussian formatted checkpoint file format [Read-only]
fchk -- Gaussian formatted checkpoint file format [Read-only]
fck -- Gaussian formatted checkpoint file format [Read-only]
feat -- Feature format
fh -- Fenske-Hall Z-Matrix format [Write-only]
fix -- SMILES FIX format [Write-only]
fpt -- Fingerprint format [Write-only]
fract -- Free Form Fractional format
fs -- FastSearching
fsa -- FASTA format [Write-only]
g03 -- Gaussian98/03 Output [Read-only]
g92 -- Gaussian98/03 Output [Read-only]
g94 -- Gaussian98/03 Output [Read-only]
g98 -- Gaussian98/03 Output [Read-only]
gal -- Gaussian98/03 Output [Read-only]
gam -- GAMESS Output [Read-only]
gamin -- GAMESS Input
gamout -- GAMESS Output [Read-only]
gau -- Gaussian 98/03 Input [Write-only]
gjc -- Gaussian 98/03 Input [Write-only]
gjf -- Gaussian 98/03 Input [Write-only]
gpr -- Ghemical format
gr96 -- GROMOS96 format [Write-only]
gukin -- GAMESS-UK Input
gukout -- GAMESS-UK Output
gzmat -- Gaussian Z-Matrix Input
hin -- HyperChem HIN format
inchi -- InChI format
inp -- GAMESS Input
ins -- ShelX format [Read-only]
jin -- Jaguar input format [Write-only]
jout -- Jaguar output format [Read-only]
k -- Compare molecules using InChI [Write-only]
mcdl -- MCDL format
mcif -- Macromolecular Crystallographic Information
mdl -- MDL MOL format
ml2 -- Sybyl Mol2 format
mmcif -- Macromolecular Crystallographic Information
mmd -- MacroModel format
mmod -- MacroModel format
mol -- MDL MOL format
mol2 -- Sybyl Mol2 format
molden -- Molden input format [Read-only]
molreport -- Open Babel molecule report [Write-only]
moo -- MOPAC Output format [Read-only]
mop -- MOPAC Cartesian format
mopcrt -- MOPAC Cartesian format
mopin -- MOPAC Internal
mopout -- MOPAC Output format [Read-only]
mpc -- MOPAC Cartesian format
mpd -- Sybyl descriptor format [Write-only]
mpqc -- MPQC output format [Read-only]
mpqcin -- MPQC simplified input format [Write-only]
msi -- Accelrys/MSI Cerius II MSI format [Read-only]
msms -- M.F. Sanner's MSMS input format [Write-only]
nw -- NWChem input format [Write-only]
nwo -- NWChem output format [Read-only]
outmol -- DMol3 coordinates format
pc -- PubChem format [Read-only]
pcm -- PCModel Format
pdb -- Protein Data Bank format
png -- PNG files with embedded data
pov -- POV-Ray input format [Write-only]
pqr -- PQR format
pqs -- Parallel Quantum Solutions format
prep -- Amber Prep format [Read-only]
qcin -- Q-Chem input format [Write-only]
qcout -- Q-Chem output format [Read-only]
report -- Open Babel report format [Write-only]
res -- ShelX format [Read-only]
rsmi -- Reaction SMILES format
rxn -- MDL RXN format
sd -- MDL MOL format
sdf -- MDL MOL format
smi -- SMILES format
smiles -- SMILES format
sy2 -- Sybyl Mol2 format
t41 -- ADF TAPE41 format [Read-only]
tdd -- Thermo format
test -- Test format [Write-only]
therm -- Thermo format
tmol -- TurboMole Coordinate format
txt -- Title format
txyz -- Tinker MM2 format [Write-only]
unixyz -- UniChem XYZ format
vmol -- ViewMol format
xed -- XED format [Write-only]
xml -- General XML format [Read-only]
xtc -- XTC format [Read-only]
xyz -- XYZ cartesian coordinates format
yob -- YASARA.org YOB format
zin -- ZINDO input format [Write-only]

cml Chemical Markup Language
XML format. This implementation uses libxml2.
Write options for CML: -x[flags] (e.g. -x1ac)
1 output CML1 (rather than CML2)
a output array format for atoms and bonds
A write aromatic bonds as such, not Kekule form
h use hydrogenCount for all hydrogens
m output metadata
x omit XML and namespace declarations
c continuous output: no formatting
p output properties
N add namespace prefix to elements

Input options, e.g. -a2

Thursday, March 5, 2009

Random Layer using javascript

Display random layer/div in javascript

<HTML>
<Head>
<Script Language="javascript">

//global var
var last_index=0;
box_len=5;

function ret_index()
{
var ran;
do{
ran=Math.floor(Math.random()*box_len);
if(ran==0)ran=box_len;
}while(ran==last_index);

last_index=ran;
return ran;
}

function show_one(){
vBox=ret_index();
for(var i=1;i<=box_len;i++){
if(vBox!=i){
obj=document.getElementById("box_0"+i);
obj.style.display="none";
}else{
obj=document.getElementById("box_0"+i);
obj.style.display="inline";
}
}
}

</Script>
<Body>
<a href="javascript:show_one();">show One</a>
<div id='box_01' style="position:absolute;left:120;width:100;height:100;border:1px solid red;text-align:center">
<br>Box1
</div>
<div id='box_02' style="position:absolute;left:240;width:100;height:100;border:1px solid red;text-align:center">
<br>Box2
</div>
<div id='box_03' style="position:absolute;left:360;width:100;height:100;border:1px solid red;text-align:center">
<br>Box3
</div>
<div id='box_04' style="position:absolute;left:480;width:100;height:100;border:1px solid red;text-align:center">
<br>Box4
</div>
<div id='box_05' style="position:absolute;left:600;width:100;height:100;border:1px solid red;text-align:center">
<br>Box5
</div>
</body>
</Html>

Dynamic ArrayCollection Using Flex

Creating Dynamic Array Collection Using Flex.

 var ob:Object;
var n:String = "Name";
var a:String = "Address";
var ar:ArrayCollection = "";

ob = new Object();

ob[n] = "Ar";
ob[a] = "xyz, UK";

ar = new ArrayCollection();
ar.addItem(ob);


ArrayCollection filterfunction

HTML Meta Tags

The Meta tags are not compulsory tags for HTML or web pages. Meta tags provide information of web page to the search engines. If you put Meta tags in your web page it should be more briefly, these meta tags is used by search engines to index your web pages into their server. If you put brief & more specific meta tags then search engines put your web pages into accurate indexes.

Basic Meta tags are Keywords & Description that content length should be less than & equal to near about 255 characters.

Keywords Meta tag is used to define keywords of web page.

<meta name="Keywords" content="HTML,PHP,ASP">


Description Meta tag is to used define description of web page.

<meta name="Description" content="IT Help Desk">


Revised Meta tag is used to define last update of web page

<meta name="revised" content="01/11/08" />


Refresh Meta tag used to update web page every 10 seconds.

<meta http-equiv="refresh" content="10" />

Microsoft SharePoint

Microsoft SharePoint is product of Microsoft. It's browser based document Management System. You can handle many task in SharePoint such as task list or Discussion pane, Web Parts, Meetings Alert etc. SharedPoint allow users to access SharePoint workspace using web Services.

Web Service for Administrative methods such as creating and deleting sites
http://server:5966/_vti_adm/Admin.asmx

Web Service for working with alerts
http://server/_vti_bin/Alerts.asmx

Web Service for retrieving schemas and data
http://server/_vti_bin/DspSts.asmx

Web Service for working with Document Workspaces
http://server/_vti_bin/DWS.asmx

Web Service for working with user interface forms
http://server/_vti_bin/Forms.asmx

Web Service for working with picture libraries
http://server/_vti_bin/Imaging.asmx

Web Service for working with lists.
http://server/_vti_bin/Lists.asmx

Web Service for working with Meeting Workspaces
http://server/_vti_bin/Meetings.asmx

Web Service for working with SharePoint Services security
http://server/_vti_bin/Permissions.asmx

Web Service for Windows SharePoint Portal Server
http://server/_vti_bin/SiteData.asmx

Web Service for Contains a single method to retrieve site templates
http://server/_vti_bin/Sites.asmx

Web Service for working with users and groups
http://server/_vti_bin/UserGroup.asmx

Web Service for working with file versions
http://server/_vti_bin/versions.asmx

Web Service for working with views of lists
http://server/_vti_bin/Views.asmx

Web Service for working with Web Parts
http://server/_vti_bin/WebPartPages.asmx

Web Service for working with sites and subsites
http://server/_vti_bin/Webs.asmx