Home » Archive

Engineering, FEA, Featured »

[7 May 2008 | No Comment | ]
ANSYS Workbench 2D Contact Analysis

ANSYS Workbench contact analysis

Computing »

[1 May 2008 | No Comment | ]

Hardware
Before we look at the actual PC which will connect to the internet I will outline a few precautions which will be highly beneficial to network security.
1. Use a router, not a modem.
A modem simply directs all internet traffic straight to your PC, which is inherently unsafe for any Operating System.
A router acts as a gateway (or a letterbox if you will). The router is what is directly connected to the internet, not the PC. The router is specifically designed where your PC needs to rely on software to remain …

Engineering »

[1 May 2008 | No Comment | ]

This is a collection of Solid Works API Code which I have deciphered. No warranty is expressed as to the quality of the code, nor the accuracy.
<h2> Sketches</h2>
Inserts a Circle
‘Point 1 is circle centre, Point 2 is on the radius
‘ Part.CreateCircle p1x, p1y, unknown, p2x, p2y, unknown
Part.Insert3DSketch
Part.ClearSelection2 True
Part.CreateCircle 0, 0, 0, 0.01, 0#, 0#
‘Part.ClearSelection2 True
Part.InsertSketch2 True
Extrudes a Circle
‘Extrudes a circle
boolstatus = Part.Extension.SelectByID(”Sketch2?, “SKETCH”, 0.3, 0.3, 0.3, False, 0, Nothing)
‘Part.FeatureManager.FeatureExtrusion True, False, True, 0, 0, extrusion length, 0, False, False, False, False, 0.01745329251994, 0.01745329251994, False, False, False, False, 0,0,0
Part.FeatureManager.FeatureExtrusion True, …

Code »

[16 Apr 2008 | No Comment | ]

<?php
$to = “someone@example.com”; $subject = “Test mail”; $message = “Hello! This is a simple email message.”; $from = “someonelse@example.com”; $headers = “From: $from”; mail($to,$subject,$message,$headers); echo “Mail Sent.”;
?>

Code, Computing »

[15 Apr 2008 | No Comment | ]

RewriteEngine On RewriteCond %{HTTP_HOST} !^(.*)\.duivesteyn\.com\.au$ [NC] RewriteRule ^(.*)$ http://www.duivesteyn.com.au/$1 [R=301,L]

Code »

[12 Apr 2008 | No Comment | ]

redirect 301 /old/old.htm http://www.you.com/new.htm
 
It’s as easy as that. Save the file, upload it back into your web and test it out by typing in the old address to the page you’ve changed. You should be instantly and seamlessly transported to the new location.

Code »

[12 Apr 2008 | No Comment | ]

 
 

Sometimes, you might want to get the current page URL that is shown in the browser URL window. For example if you want to let your visitors submit a blog post to Digg you need to get that same exact URL. There are plenty of other reasons as well. Here is how you can do that.
Add the following code to a page:
<?php
function curPageURL() {
$pageURL = ‘http’;
if ($_SERVER["HTTPS"] == “on”) {$pageURL .= “s”;}
$pageURL .= “://”;
if ($_SERVER["SERVER_PORT"] != “80″) {
$pageURL .= $_SERVER["SERVER_NAME"].”:”.$_SERVER["SERVER_PORT"].$_SERVER["REQUEST_URI"];
} else {
$pageURL .= $_SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"];
}
return $pageURL;
}
?>

Code »

[3 Mar 2008 | No Comment | ]

wget http://curl.haxx.se/download/curl-7.16.0.tar.gz
tar -pxzf curl-7.16.0.tar.gz
cd curl-7.16.0
./configure –with-ssl
make
make install
ldconfig -v
Then use –with-curl in PHP’s configure