Creating SOAP client with PHP, simple version
Using SOAP with PHP is very straight forward and easy. Using the SoapClient class and the servers WSDL file as reference, you’re good to go.
Instansiate a SOAP client towards a specified url;
define('WSDL', 'http://www.example.com/service.asmx?wsdl');
$client = new SoapClient(WSDL, array($options)); //options are... optional
Since we are using WSDL, we can use the servers SOAP functions just as local methods! Lets say there’s a function called GetUserById($id); that returns a GetUserByIdResponse. Here’s how we call it print the response.
$response = $client->GetUserById(array('id' => $id));
print_r($response->GetUserByIdRespons);
Really simple.
For more advanced usage of SOAP + PHP, building your own classes for input control etc, check out the post coming later this week.
Windows 7 Sticky Notes keyboard shortcuts
The new Sticky Notes in Windows 7 can be useful, but might seem a bit plain. However there are features behind the scenes!
Sticky Notes has some very keyboard shortcuts and this little article will tell you, e.g. how to..
- Change font size in Sticky Notes
- Make a bulleted or numbered list in Sticky Notes
- Add text style in Sticky Notes
Basically Sticky Note texts are managed just like any other text tool. Just mark the piece of text you with to change, and apply the change.
As mentioned, Sticky Notes use keyboard shortcuts. Some commands change depending on your keyboard language and button setup.
Sticky Notes Keyboard shortcuts
| Shortcut | Action |
|---|---|
| CTRL + SHIFT + ; (or <) |
Smaller font |
| CTRL + SHIFT + : (or >) |
Bigger font |
| CTRL + mouse scroll | Change font size of whole note |
| CTRL + SHIFT + L | List (repeat to change type) |
| CTRL + SHIFT + A | Capitalize |
| CTRL + 1 | Single line space |
| CTRL + 2 | Double line space |
| CTRL + 5 | 1.5 line space |
| CTRL + B | Bold |
| CTRL + I | Italic |
| CTRL + U | Underline |
| CTRL + T | Strikethrough |
| CTRL + L | Left align |
| CTRL + E | Center align |
| CTRL + R | Right align |
| CTRL + N | New note |
| CTRL + D | Delete note |
| CTRL + A | Select All |
| CTRL + C | Copy |
| CTRL + X | Cut |
| CTRL + V | Paste |
| CTRL + Z | Undo |
| CTRL + Y | Redo |
Now if we could only change the font…
Installing Windows 7 from USB stick
So I got hold of the new Windows 7,but the DVD drive in my laptop has lost some functionality over the years, and no longer reads DVDs. It does however support booting over USB.
Solution? - install from USB of course!
Requirements:
- A working Windows(Vista or 7) installation
- USB drive with enough space (about 2.5 GiB)
- Windows 7 installation files
What you need to do:
- Make the USB drive bootable
- Put Windows 7 install files on USB drive
- Reboot computer and select USB drive as primary boot device
- Install Windows 7 at your leisure
So lets go.
STEP 1. Making the USB drive bootable
NOTE: This procedure will require you to remove all current content of the USB drive.
BACKUP your content to a safe place before continuing!
Again. BACKUP the content of your USB drive. All content WILL be erased i later steps.
Now start a command prompt with administration rights, by expanding the start menu and typing cmd in the search box. Now press ctrl + shift + enter to start cmd in admin rights mode.
Using cmd, start DISKPART from the Windows System32 directory;
- cd c:\windows\system32
- DISKPART
Now in DISKPART we need to locate the USB drive. Enter LIST DISK.
Looking at the size column i can locate my disk as number 1. I will use number 1, but you of course will use whatever number your disk has.
Now I select my disk by entering SELECT DISK 1
Disk is selected so I will clean (erase) it by entering CLEAN
Now create a new primary NTFS partition and set it to active by entering;
- CREATE PARTITION PRIMARY
- SELECT PARTITION 1
- FORMAT FS=NTFS (this might take a couple of minutes)
Now assign a drive letter to the drive and mount it by entering ASSIGN. Note that you can also specify a drive letter by entering ASSIGN LETTER=X where x is a letter of your choice. Using assign without specifying a letter will assign the next available letter for you.
Now exit DISKPART by entering EXIT.
Here’s how your procedure should look like:
OK. So the USB Drive is partitioned and formatted, now let’s apply a boot sector to it. I will do this using the Windows 7 BOOT directory located on the install dvd (which i happen to have mounted as drive E). In the boot directory there’s an application called bootsect.exe which is used to update master boot code on partitions and restore boot sectors. You can read more about bootsect.exe here.
Keep in mind that my Windows 7 dvd i mounted as drive letter E and my USB drive is assigned the drive letter G. You should use whatever drive letters are assigned your drives.
So. Still in cmd, locate and enter your Win7 boot directory, in my case
- E:
- cd boot
Now start bootsect.exe using this command to update the USB drive with a BOOTMGR compatible boot code for Vista/Win7
bootsect.exe /nt60 G: (NOTE! G: is the drive letter to my USB drive. Change to whatever letter corresponds to yours)
It should look something like this:
Now that’s that! The USB drive is ready to be booted from, nicely done
STEP 2. Putting Windows 7 install files on USB drive
So all we need to do in this step is to copy all files from the Windows 7 DVD to our USB drive.
If you still have the command prompt open, just go back to the Win7 install root directory (enter CD .. ) and run XCOPY* G:\ /E to copy all files and directories to the USB drive at G:. Of course change G: to your drive’s letter. /E makes xcopy copy files and directories recursively.
Make sure all files where copied by checking the number of files and folders. For me, 874 files and 200 folders.
Well. We are done!
I leave Step 3 and 4 to you. All you really need to do is reboot, set change your boot settings (e.g. in BIOS settings) to boot from USB, and you should be OK.
Hello world!
Welcome to WordPress.com. This is your first post. Edit or delete it and start blogging!




Recent Comments