<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Burak Ozdemir 's Blog &#187; Programming</title>
	<atom:link href="http://www.buraak.com/category/programming/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.buraak.com</link>
	<description>Computer Science &#038; Softwares - Latest Technology</description>
	<lastBuildDate>Tue, 06 Oct 2009 07:32:53 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Do jobs in open source programming suck?</title>
		<link>http://www.buraak.com/2008/09/18/do-jobs-in-open-source-programming-suck/</link>
		<comments>http://www.buraak.com/2008/09/18/do-jobs-in-open-source-programming-suck/#comments</comments>
		<pubDate>Thu, 18 Sep 2008 21:05:01 +0000</pubDate>
		<dc:creator>Burak Ozdemir</dc:creator>
				<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.buraak.com/2008/09/18/do-jobs-in-open-source-programming-suck/</guid>
		<description><![CDATA[Recent CNN Money survey pointed out interesting results that while expert users of .NET get higher initial salaries and hefty annual increments that can go up to 15%, open source programmers get only modest hike of just two percent. A debate has been raging in the IT community as to why do .NET programmers get [...]]]></description>
			<content:encoded><![CDATA[<p><span class="first">R</span>ecent CNN Money survey pointed out interesting results that while expert users of .NET get higher initial salaries and hefty annual increments that can go up to 15%, open source programmers get only modest hike of just two percent. A debate has been raging in the IT community as to why do .NET programmers get better salary than the open source programmers.</p>
<blockquote><p><em><strong>The debate, intentionally or unintentionally, seems to be working in favor of Microsoft, who obviously has vested interest in promoting ASP.NET. RedHat, Zope, and IBM are known as excellent paymasters to open source programmers and scout for talented programmers from open source community.</strong></em></p></blockquote>
<p> <a href="http://www.buraak.com/2008/09/18/do-jobs-in-open-source-programming-suck/#more-303" class="more-link">Read the rest of this entry &raquo;</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.buraak.com/2008/09/18/do-jobs-in-open-source-programming-suck/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Simple Text Editor with Java Swing</title>
		<link>http://www.buraak.com/2008/03/19/simple-text-editor-with-java-swing/</link>
		<comments>http://www.buraak.com/2008/03/19/simple-text-editor-with-java-swing/#comments</comments>
		<pubDate>Wed, 19 Mar 2008 22:12:11 +0000</pubDate>
		<dc:creator>Burak Ozdemir</dc:creator>
				<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.buraak.com/2008/03/19/simple-text-editor-with-java-swing/</guid>
		<description><![CDATA[Hi again, for this post I decided to demonstrate JAVA&#8217;s Swing library.With this library it is easy to create applications with GUI.Anyway I never prefer to write Windows applications in JAVA, however if you need cross-platform stuff, Swing may be a choice.Unlike awt, Swing looks like same in the all platforms. This simple Editor program, [...]]]></description>
			<content:encoded><![CDATA[<p>Hi again, for this post I decided to demonstrate JAVA&#8217;s Swing library.With this library it is easy to create applications with GUI.Anyway I never prefer to write Windows applications in JAVA, however if you need cross-platform stuff, Swing may be a choice.Unlike awt, Swing looks like same in the all platforms. This simple Editor program, uses JMenuBar (Standard Menubar)  , JToolBar (Standard Toolbar)  ,  JDesktop (MDI)  , Images for buttons , also Editor is capable of inserting images to the text. (StyledDocument).</p>
<p>Here is the source code:<br />
<span id="more-280"></span></p>
<p><samp></p>
<p>//Simple Editor / Styled Document Editor<br />
//coded by Burak Ozdemir</p>
<p>import java.awt.*;<br />
import java.awt.event.*;<br />
import java.io.*;<br />
import java.util.*;<br />
import javax.swing.*;<br />
import javax.swing.text.*;<br />
import javax.swing.text.rtf.RTFEditorKit;</p>
<p>public class Editor extends JFrame {<br />
ArrayList<jtextpane>      Editors;<br />
ArrayList<jinternalframe> Frames;<br />
JDesktopPane              desktop;</jinternalframe></jtextpane></p>
<p>// Some required variables to make multiple file handling easy<br />
File selectedfile;</p>
<p>Editor() {</p>
<p>// Initializing variables and creating gui<br />
Editors = new ArrayList<jtextpane>();<br />
Frames  = new ArrayList<jinternalframe>();</jinternalframe></jtextpane></p>
<p>JFrame frame = new JFrame();</p>
<p>frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);</p>
<p>// Mdi documenting<br />
desktop = new JDesktopPane();</p>
<p>// Create Menu<br />
JMenuBar menuBar = drawMenu();</p>
<p>frame.setJMenuBar(menuBar);</p>
<p>// Create Toolbar<br />
JToolBar toolBar = drawToolBar();</p>
<p>frame.add(toolBar, BorderLayout.PAGE_START);</p>
<p>// Some styling<br />
frame.add(desktop, BorderLayout.CENTER);<br />
frame.setSize(800, 600);<br />
frame.setVisible(true);<br />
frame.setTitle(&#8220;Simple Text Editor&#8221;);<br />
}</p>
<p>public static void main(String[] args) {</p>
<p>// Running main program<br />
new Editor();<br />
}</p>
<p>// this function is used to save documents<br />
private void saveDocument() {<br />
try {</p>
<p>// Determine the currently active pane<br />
JInternalFrame ifrm   = desktop.getSelectedFrame();<br />
int            _index = -1;</p>
<p>for (int i = 0; i &lt; Frames.size(); ++i) {<br />
if (Frames.get(i) == ifrm) {<br />
_index = i;<br />
}<br />
}</p>
<p>JTextPane jedp = Editors.get(_index);</p>
<p>// Save file<br />
File myFile = new File(ifrm.getTitle());</p>
<p>System.out.println(ifrm.getTitle());</p>
<p>FileOutputStream   fo  = new FileOutputStream(myFile);<br />
ObjectOutputStream oos = new ObjectOutputStream(fo);</p>
<p>oos.writeObject(jedp.getStyledDocument());<br />
oos.flush();<br />
oos.close();<br />
} catch (FileNotFoundException e) {<br />
System.out.println(&#8220;File not found&#8221;);<br />
} catch (IOException e) {<br />
System.out.println(&#8220;I/O error&#8221;);<br />
}<br />
}</p>
<p>// this function is used to load documents<br />
private void loadDocument() {<br />
JFileChooser fileChooser = new JFileChooser();</p>
<p>fileChooser.setDialogTitle(&#8220;Open an existing file&#8221;);</p>
<p>int result = fileChooser.showOpenDialog(Editor.this);</p>
<p>if (result == JFileChooser.APPROVE_OPTION) {<br />
selectedfile = fileChooser.getSelectedFile();</p>
<p>try {<br />
JInternalFrame internalFrame = new JInternalFrame(selectedfile.getCanonicalPath(), true, true, true,<br />
true);</p>
<p>desktop.add(internalFrame);<br />
internalFrame.setBounds(desktop.getAllFrames().length * 20 + 5, desktop.getAllFrames().length * 20 + 5,<br />
640, 480);<br />
internalFrame.setVisible(true);</p>
<p>RTFEditorKit rtfEditor   = new RTFEditorKit();<br />
JTextPane    _resultArea = new JTextPane();</p>
<p>// _resultArea.setText(&#8220;Enter more text to see scrollbars&#8221;);<br />
JScrollPane scrollingArea = new JScrollPane(_resultArea);</p>
<p>// JScrollPane scrollingArea = new JScrollPane(rtfEditor);</p>
<p>_resultArea.setEditorKit(rtfEditor);<br />
internalFrame.add(scrollingArea);</p>
<p>FileInputStream   fi  = new FileInputStream(selectedfile);<br />
ObjectInputStream ois = new ObjectInputStream(fi);</p>
<p>_resultArea.setStyledDocument((StyledDocument) ois.readObject());<br />
validate();<br />
ois.close();<br />
Editors.add(_resultArea);<br />
Frames.add(internalFrame);<br />
fi.close();<br />
} catch (FileNotFoundException e) {<br />
System.out.println(&#8220;File not found&#8221;);<br />
} catch (IOException e) {<br />
System.out.println(&#8220;I/O error&#8221;);<br />
} catch (Exception e) {<br />
e.printStackTrace();<br />
}<br />
}<br />
}    // this function is used to create new/empty document</p>
<p>private void newDocument() {<br />
JFileChooser fileChooser = new JFileChooser();</p>
<p>fileChooser.setDialogTitle(&#8220;Create a new file&#8221;);</p>
<p>int result = fileChooser.showOpenDialog(Editor.this);</p>
<p>if (result == JFileChooser.APPROVE_OPTION) {<br />
selectedfile = fileChooser.getSelectedFile();</p>
<p>try {<br />
selectedfile.createNewFile();<br />
} catch (IOException e) {<br />
System.out.println(&#8220;I/O error&#8221;);<br />
}</p>
<p>try {<br />
JInternalFrame internalFrame = new JInternalFrame(selectedfile.getCanonicalPath(), true, true, true,<br />
true);</p>
<p>desktop.add(internalFrame);<br />
internalFrame.setBounds(desktop.getAllFrames().length * 20 + 5, desktop.getAllFrames().length * 20 + 5,<br />
640, 480);<br />
internalFrame.setVisible(true);</p>
<p>RTFEditorKit rtfEditor   = new RTFEditorKit();<br />
JTextPane    _resultArea = new JTextPane();</p>
<p>// _resultArea.setText(&#8220;Enter more text to see scrollbars&#8221;);<br />
JScrollPane scrollingArea = new JScrollPane(_resultArea);</p>
<p>// JScrollPane scrollingArea = new JScrollPane(rtfEditor);</p>
<p>_resultArea.setEditorKit(rtfEditor);<br />
internalFrame.add(scrollingArea);</p>
<p>FileInputStream fi = new FileInputStream(selectedfile);</p>
<p>rtfEditor.read(fi, _resultArea.getDocument(), 0);<br />
Editors.add(_resultArea);<br />
Frames.add(internalFrame);<br />
fi.close();<br />
} catch (FileNotFoundException e) {<br />
System.out.println(&#8220;File not found&#8221;);<br />
} catch (IOException e) {<br />
System.out.println(&#8220;I/O error&#8221;);<br />
} catch (BadLocationException e) {}<br />
}<br />
}</p>
<p>//  Create our toolbar<br />
private JToolBar drawToolBar() {<br />
JToolBar myBar = new JToolBar(&#8220;Tool Bar&#8221;);</p>
<p>// Our buttons<br />
JButton new_button = new JButton(&#8220;New&#8221;);</p>
<p>new_button.addActionListener(new ActionListener() {<br />
public void actionPerformed(ActionEvent event) {<br />
newDocument();<br />
}<br />
});<br />
myBar.add(new_button);</p>
<p>JButton open_button = new JButton(&#8220;Open&#8221;);</p>
<p>open_button.addActionListener(new ActionListener() {<br />
public void actionPerformed(ActionEvent event) {<br />
loadDocument();<br />
}<br />
});<br />
myBar.add(open_button);</p>
<p>JButton save_button = new JButton(&#8220;Save&#8221;);</p>
<p>save_button.addActionListener(new ActionListener() {<br />
public void actionPerformed(ActionEvent event) {<br />
saveDocument();<br />
}<br />
});<br />
myBar.add(save_button);</p>
<p>JButton copy_button = new JButton(&#8220;Copy&#8221;);</p>
<p>copy_button.addActionListener(new ActionListener() {<br />
public void actionPerformed(ActionEvent event) {<br />
JInternalFrame ifrm   = desktop.getSelectedFrame();<br />
int            _index = -1;</p>
<p>for (int i = 0; i &lt; Frames.size(); ++i) {<br />
if (Frames.get(i) == ifrm) {<br />
_index = i;<br />
}<br />
}</p>
<p>JTextPane jedp = Editors.get(_index);</p>
<p>jedp.copy();<br />
}<br />
});<br />
myBar.add(copy_button);</p>
<p>JButton paste_button = new JButton(&#8220;Paste&#8221;);</p>
<p>paste_button.addActionListener(new ActionListener() {<br />
public void actionPerformed(ActionEvent event) {<br />
JInternalFrame ifrm   = desktop.getSelectedFrame();<br />
int            _index = -1;</p>
<p>for (int i = 0; i &lt; Frames.size(); ++i) {<br />
if (Frames.get(i) == ifrm) {<br />
_index = i;<br />
}<br />
}</p>
<p>JTextPane jedp = Editors.get(_index);</p>
<p>jedp.paste();<br />
}<br />
});<br />
myBar.add(paste_button);</p>
<p>JButton fontitalic_button = new JButton(&#8220;Italic&#8221;);</p>
<p>fontitalic_button.addActionListener(new StyledEditorKit.ItalicAction());<br />
myBar.add(fontitalic_button);</p>
<p>JButton fontbold_button = new JButton(&#8220;Bold&#8221;);</p>
<p>fontbold_button.addActionListener(new StyledEditorKit.BoldAction());<br />
myBar.add(fontbold_button);</p>
<p>JButton color_button = new JButton(&#8220;Color&#8221;);</p>
<p>color_button.addActionListener(new ActionListener() {<br />
public void actionPerformed(ActionEvent e) {<br />
Color color = JColorChooser.showDialog(Editor.this, &#8220;Color Chooser&#8221;, Color.cyan);</p>
<p>if (color != null) {<br />
MutableAttributeSet attr = new SimpleAttributeSet();</p>
<p>StyleConstants.setForeground(attr, color);</p>
<p>JInternalFrame ifrm   = desktop.getSelectedFrame();<br />
int            _index = -1;</p>
<p>for (int i = 0; i &lt; Frames.size(); ++i) {<br />
if (Frames.get(i) == ifrm) {<br />
_index = i;<br />
}<br />
}</p>
<p>JTextPane jedp = Editors.get(_index);</p>
<p>jedp.setCharacterAttributes(attr, false);<br />
}<br />
}<br />
});<br />
myBar.add(color_button);</p>
<p>return myBar;<br />
}<br />
// Our menu bar<br />
private JMenuBar drawMenu() {</p>
<p>// Create the menu bar<br />
JMenuBar menuBar = new JMenuBar();</p>
<p>// Create a menu<br />
JMenu file      = new JMenu(&#8220;File&#8221;);<br />
JMenu edit      = new JMenu(&#8220;Edit&#8221;);<br />
JMenu insert    = new JMenu(&#8220;Insert&#8221;);<br />
JMenu format    = new JMenu(&#8220;Format&#8221;);<br />
JMenu view      = new JMenu(&#8220;View&#8221;);<br />
JMenu fontsize  = new JMenu(&#8220;Size&#8221;);<br />
JMenu fontface  = new JMenu(&#8220;Font Face&#8221;);<br />
JMenu fontstyle = new JMenu(&#8220;Font Style&#8221;);</p>
<p>menuBar.add(file);<br />
menuBar.add(edit);<br />
menuBar.add(insert);<br />
menuBar.add(format);<br />
menuBar.add(view);</p>
<p>JMenuItem _new = new JMenuItem(&#8220;New&#8230;&#8221;);</p>
<p>_new.addActionListener(new ActionListener() {<br />
public void actionPerformed(ActionEvent event) {<br />
newDocument();<br />
}<br />
});</p>
<p>JMenuItem _open = new JMenuItem(&#8220;Open&#8230;&#8221;);</p>
<p>_open.addActionListener(new ActionListener() {<br />
public void actionPerformed(ActionEvent event) {<br />
loadDocument();<br />
}<br />
});</p>
<p>JMenuItem _save = new JMenuItem(&#8220;Save&#8230;&#8221;);</p>
<p>_save.addActionListener(new ActionListener() {<br />
public void actionPerformed(ActionEvent event) {<br />
saveDocument();<br />
}<br />
});</p>
<p>JMenuItem _exit = new JMenuItem(&#8220;Exit&#8221;);</p>
<p>_exit.addActionListener(new ActionListener() {<br />
public void actionPerformed(ActionEvent event) {<br />
System.exit(0);<br />
}<br />
});<br />
file.add(_new);<br />
file.add(_open);<br />
file.add(_save);<br />
file.add(_exit);</p>
<p>JMenuItem _copy = new JMenuItem(&#8220;Copy&#8221;);</p>
<p>_copy.addActionListener(new ActionListener() {<br />
public void actionPerformed(ActionEvent event) {<br />
JInternalFrame ifrm   = desktop.getSelectedFrame();<br />
int            _index = -1;</p>
<p>for (int i = 0; i &lt; Frames.size(); ++i) {<br />
if (Frames.get(i) == ifrm) {<br />
_index = i;<br />
}<br />
}</p>
<p>JTextPane jedp = Editors.get(_index);</p>
<p>jedp.copy();<br />
}<br />
});</p>
<p>JMenuItem _paste = new JMenuItem(&#8220;Paste&#8221;);</p>
<p>_paste.addActionListener(new ActionListener() {<br />
public void actionPerformed(ActionEvent event) {<br />
JInternalFrame ifrm   = desktop.getSelectedFrame();<br />
int            _index = -1;</p>
<p>for (int i = 0; i &lt; Frames.size(); ++i) {<br />
if (Frames.get(i) == ifrm) {<br />
_index = i;<br />
}<br />
}</p>
<p>JTextPane jedp = Editors.get(_index);</p>
<p>jedp.paste();<br />
}<br />
});<br />
edit.add(_copy);<br />
edit.add(_paste);</p>
<p>JMenuItem _picture = new JMenuItem(&#8220;Picture&#8221;);</p>
<p>_picture.addActionListener(new ActionListener() {<br />
public void actionPerformed(ActionEvent event) {<br />
JFileChooser fileChooser = new JFileChooser();</p>
<p>fileChooser.setDialogTitle(&#8220;Select an image file&#8221;);</p>
<p>int result = fileChooser.showOpenDialog(Editor.this);</p>
<p>if (result == JFileChooser.APPROVE_OPTION) {<br />
selectedfile = fileChooser.getSelectedFile();</p>
<p>ImageIcon      _img   = new ImageIcon(selectedfile.getAbsolutePath());<br />
JInternalFrame ifrm   = desktop.getSelectedFrame();<br />
int            _index = -1;</p>
<p>for (int i = 0; i &lt; Frames.size(); ++i) {<br />
if (Frames.get(i) == ifrm) {<br />
_index = i;<br />
}<br />
}</p>
<p>JTextPane jedp = Editors.get(_index);</p>
<p>jedp.insertIcon(_img);<br />
}<br />
}<br />
});<br />
insert.add(_picture);</p>
<p>// Font Sizes<br />
JMenuItem _size_12 = new JMenuItem(&#8220;12&#8243;);</p>
<p>_size_12.addActionListener(new StyledEditorKit.FontSizeAction(&#8220;font-size-12&#8243;, 12));</p>
<p>JMenuItem _size_14 = new JMenuItem(&#8220;14&#8243;);</p>
<p>_size_14.addActionListener(new StyledEditorKit.FontSizeAction(&#8220;font-size-14&#8243;, 14));<br />
fontsize.add(_size_12);<br />
fontsize.add(_size_14);<br />
format.add(fontsize);</p>
<p>// Font Families<br />
JMenuItem _sans = new JMenuItem(&#8220;SansSerif&#8221;);</p>
<p>_sans.addActionListener(new StyledEditorKit.FontFamilyAction(&#8220;font-family-Serif&#8221;, &#8220;Serif&#8221;));</p>
<p>JMenuItem _mono = new JMenuItem(&#8220;Monospaced&#8221;);</p>
<p>_mono.addActionListener(new StyledEditorKit.FontFamilyAction(&#8220;font-family-Monospaced&#8221;, &#8220;Monospaced&#8221;));<br />
fontface.add(_sans);<br />
fontface.add(_mono);<br />
format.add(new JSeparator());<br />
format.add(fontface);</p>
<p>// Font Styles<br />
JMenuItem _bold = new JMenuItem(&#8220;Bold&#8221;);</p>
<p>_bold.addActionListener(new StyledEditorKit.BoldAction());</p>
<p>JMenuItem _italic = new JMenuItem(&#8220;Italic&#8221;);</p>
<p>_italic.addActionListener(new StyledEditorKit.ItalicAction());</p>
<p>JMenuItem _underlined = new JMenuItem(&#8220;Underlined&#8221;);</p>
<p>_underlined.addActionListener(new StyledEditorKit.UnderlineAction());<br />
fontstyle.add(_bold);<br />
fontstyle.add(_italic);<br />
fontstyle.add(_underlined);<br />
format.add(new JSeparator());<br />
format.add(fontstyle);</p>
<p>// Font Color<br />
JMenuItem _color = new JMenuItem(&#8220;Color&#8221;);</p>
<p>_color.addActionListener(new ActionListener() {<br />
public void actionPerformed(ActionEvent e) {<br />
Color color = JColorChooser.showDialog(Editor.this, &#8220;Color Chooser&#8221;, Color.cyan);</p>
<p>if (color != null) {<br />
MutableAttributeSet attr = new SimpleAttributeSet();</p>
<p>StyleConstants.setForeground(attr, color);</p>
<p>JInternalFrame ifrm   = desktop.getSelectedFrame();<br />
int            _index = -1;</p>
<p>for (int i = 0; i &lt; Frames.size(); ++i) {<br />
if (Frames.get(i) == ifrm) {<br />
_index = i;<br />
}<br />
}</p>
<p>JTextPane jedp = Editors.get(_index);</p>
<p>jedp.setCharacterAttributes(attr, false);<br />
}<br />
}<br />
});<br />
format.add(new JSeparator());<br />
format.add(_color);</p>
<p>// Change window style to Motif<br />
JMenuItem _windows = new JMenuItem(&#8220;Windows&#8221;);</p>
<p>_windows.addActionListener(new ActionListener() {<br />
public void actionPerformed(ActionEvent e) {<br />
try {<br />
UIManager.setLookAndFeel(&#8220;com.sun.java.swing.plaf.motif.MotifLookAndFeel&#8221;);<br />
} catch (Exception ex) {<br />
System.out.println(&#8220;Error changing style to Motif: &#8221; + ex);<br />
}<br />
}<br />
});<br />
view.add(_windows);</p>
<p>return menuBar;<br />
}<br />
}<br />
</samp><br /><p>Technorati Tags: <a href="http://technorati.com/tag/Java" rel="tag">Java</a>, <a href="http://technorati.com/tag/Swing" rel="tag">Swing</a>, <a href="http://technorati.com/tag/Editor" rel="tag">Editor</a>, <a href="http://technorati.com/tag/Programming" rel="tag">Programming</a>, <a href="http://technorati.com/tag/JMenuBar" rel="tag">JMenuBar</a>, <a href="http://technorati.com/tag/JToolBar" rel="tag">JToolBar</a>, <a href="http://technorati.com/tag/JDesktop" rel="tag">JDesktop</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.buraak.com/2008/03/19/simple-text-editor-with-java-swing/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Perl and Regular Expressions</title>
		<link>http://www.buraak.com/2008/02/26/perl-and-regular-expressions/</link>
		<comments>http://www.buraak.com/2008/02/26/perl-and-regular-expressions/#comments</comments>
		<pubDate>Tue, 26 Feb 2008 07:17:25 +0000</pubDate>
		<dc:creator>Burak Ozdemir</dc:creator>
				<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.buraak.com/2008/02/26/perl-and-regular-expressions/</guid>
		<description><![CDATA[
Perl is one of the most rooted scripting languages, and has wide range of libraries for any purpose.Nowadays I&#8217;m studying it, and exploring its great usage and ease of use.Perl has powerful string processing ability, and also when you have confidence in using regular expressions, you may achieve anything on parsing.Here I want to demonstrate [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: center"><img alt="perl-at-work-sign.png" src="http://www.buraak.com/wp-content/uploads/2008/02/perl-at-work-sign.png" /></p>
<p>Perl is one of the most rooted scripting languages, and has wide range of libraries for any purpose.Nowadays I&#8217;m studying it, and exploring its great usage and ease of use.Perl has powerful string processing ability, and also when you have confidence in using regular expressions, you may achieve anything on parsing.Here I want to demonstrate its simple syntax.</p>
<p>\t : Tab Character<br />
\n : New Line<br />
\r : Carriage Return<br />
\f : Form Feed Character<br />
\cX : Control Character CTRL-X.  : Match any one character<br />
| : Alternation<br />
( ) : Group  / Also returns the values for $1 , $2 , $3 after proper matches.<br />
[ ] : Define Character class^ : Match the beginning       $ : Match the end<br />
\b : Match at a &#8221;word&#8221; boundary  \B : Match at not a &#8216;word&#8217; boundary</p>
<p>* : Match 0 or more times<br />
+ : Match at least 1 or more times<br />
? : Match 0 or 1 times</p>
<p>\d : [0-9] A digit            \D : A non-digit<br />
\s : Whitespace char       \S : A non-whitespace char.</p>
<p>/i : ignore case    /g : Match globally (all matches)      /s : Substitute, Replace</p>
<p>=~ True If the regex matches        !~ True If the regex doesn&#8217;t match</p>
<p>The above information will be helpful if you have just started to learn Regular Expressions.</p>
<p>Technorati Tags: <a href="http://technorati.com/tag/Perl" rel="tag">Perl</a>, <a href="http://technorati.com/tag/Regex" rel="tag">Regex</a>, <a href="http://technorati.com/tag/Regular%C2%A0Expressions" rel="tag">Regular Expressions</a>, <a href="http://technorati.com/tag/Scripting" rel="tag">Scripting</a>, <a href="http://technorati.com/tag/Programming" rel="tag">Programming</a>, <a href="http://technorati.com/tag/Perl+Programming" rel="tag">Perl Programming</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.buraak.com/2008/02/26/perl-and-regular-expressions/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>C# and Inline Assembly</title>
		<link>http://www.buraak.com/2008/01/19/c-and-inline-assembly/</link>
		<comments>http://www.buraak.com/2008/01/19/c-and-inline-assembly/#comments</comments>
		<pubDate>Sat, 19 Jan 2008 22:18:26 +0000</pubDate>
		<dc:creator>Burak Ozdemir</dc:creator>
				<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.buraak.com/2008/01/19/c-and-inline-assembly/</guid>
		<description><![CDATA[Inline assembly was a technique to use I386 assembly language directives in a C++ code. Programmers often use this technique to gain speed at intense calculations. However C# is far away from this concept, being lack of such a need, C# stands as a limited programming language against C++. According to some gossip, they are [...]]]></description>
			<content:encoded><![CDATA[<p>Inline assembly was a technique to use I386 assembly language directives in a C++ code. Programmers often use this technique to gain speed at intense calculations. However C# is far away from this concept, being lack of such a need, C# stands as a limited programming language against C++. According to some gossip, they are considering to add this in Whidbey.</p>
<p>However you may not want to wait for Whidbey, yes it is said to be there exist some solutions, (I heard this from one my programmer friend). Surprisingly the idea seems very interesting to me. The point is that you call assembly functions from a DLL, so the only thing that differs is coding, you just call some functions to make your calculations in machine language, and as a result. you acquire the indispensable augmentation in performance.</p>
<p>Never tried this method, but I will definitely try, in the following posts I may expose it with some code samples. Another important point that you may use this method in VB.NET also, as you can use the DLL in a same manner. Goodbye until to next post!</p>
<p>Technorati Tags: <a href="http://technorati.com/tag/Assembly" rel="tag">Assembly</a>, <a href="http://technorati.com/tag/C%23" rel="tag">C#</a>, <a href="http://technorati.com/tag/VB" rel="tag">VB</a>, <a href="http://technorati.com/tag/NET" rel="tag">NET</a>, <a href="http://technorati.com/tag/Inline" rel="tag">Inline</a>, <a href="http://technorati.com/tag/Inline+Assembly" rel="tag">Inline Assembly</a>, <a href="http://technorati.com/tag/C%23.NET" rel="tag">C#.NET</a>, <a href="http://technorati.com/tag/VB.NET" rel="tag">VB.NET</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.buraak.com/2008/01/19/c-and-inline-assembly/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>.NET &amp; MySQL &#8211; F(r)iends?</title>
		<link>http://www.buraak.com/2008/01/16/net-mysql-friends/</link>
		<comments>http://www.buraak.com/2008/01/16/net-mysql-friends/#comments</comments>
		<pubDate>Thu, 17 Jan 2008 00:04:48 +0000</pubDate>
		<dc:creator>Burak Ozdemir</dc:creator>
				<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.buraak.com/2008/01/16/net-mysql-friends/</guid>
		<description><![CDATA[Hi, in my previous post I discussed and compared IIS and ASP against PHP and Apache. In this post I&#8217;ll be discussing diffuculties about communicating with a MySQL database in ASP.NET on a shared hosting. As you know if you have a direct access to your web server, nothing is impossible but in most cases [...]]]></description>
			<content:encoded><![CDATA[<p>Hi, in my previous post I discussed and compared IIS and ASP against PHP and Apache. In this post I&#8217;ll be discussing diffuculties about communicating with a MySQL database in ASP.NET on a shared hosting. As you know if you have a direct access to your web server, nothing is impossible but in most cases you can not.</p>
<p>For example, I am using GoDaddy&#8217;s shared hosting plans and I&#8217;m really happy with.However I am discovering the limits lately, and I am understanding what are you capable of to do with shared hosting using ASP.NET.Chances are that if you are using PHP, you have greater freedom and everything becomes possible.</p>
<p>Yesterday I was trying to connect to a MySQL database with .NET, I accomplished this on Windows very smoothly without having any problems.(I used ByteFX .NET library to connect MySQL).On the other hand, on Web, this is nearly impossible, you can not use external dlls on many of the shared hostings (security issue).I tried to use ODBC to connect MySQL, I didn&#8217;t use any DLLs and again I couldn&#8217;t connect to MySQL database (By the way this MySQL database is not on my shared hosting, on a completely different host), because thanks to GoDaddy, they have blocked outgoing connections to other database hosts.So I was only able to connect an inner MySQL database.You may ask why MySQL? Because you may not find free database hosts that give MSSql (there are lots of hosts that provides free MySQL databases), and also you may not have any other options other than MySQL, so in such a case your all hands are tied.</p>
<p>Briefly I am really considering to use PHP rather ASP.NET, day by day I discover something that is possible in all the way with PHP and not possible with ASP.NET.<br />
This is really driving me nuts.As you see PHP gains another +1 against ASP.NET.See you next time&#8230;</p>
<p>Technorati Tags: <a href="http://technorati.com/tag/PHP" rel="tag">PHP</a>, <a href="http://technorati.com/tag/MySQL" rel="tag">MySQL</a>, <a href="http://technorati.com/tag/MsSQL" rel="tag">MsSQL</a>, <a href="http://technorati.com/tag/ASP.NET" rel="tag">ASP.NET</a>, <a href="http://technorati.com/tag/shared+hosting" rel="tag">shared hosting</a>, <a href="http://technorati.com/tag/GoDaddy" rel="tag">GoDaddy</a>, <a href="http://technorati.com/tag/ODBC" rel="tag">ODBC</a>, <a href="http://technorati.com/tag/ByteFX" rel="tag">ByteFX</a>, <a href="http://technorati.com/tag/DLL" rel="tag">DLL</a>, <a href="http://technorati.com/tag/database" rel="tag">database</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.buraak.com/2008/01/16/net-mysql-friends/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ASP.NET Url Rewrite &#8211; ASP.NET/IIS VS PHP/Apache</title>
		<link>http://www.buraak.com/2008/01/11/aspnet-url-rewrite-aspnetiis-vs-phpapache/</link>
		<comments>http://www.buraak.com/2008/01/11/aspnet-url-rewrite-aspnetiis-vs-phpapache/#comments</comments>
		<pubDate>Sat, 12 Jan 2008 03:32:37 +0000</pubDate>
		<dc:creator>Burak Ozdemir</dc:creator>
				<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.buraak.com/2008/01/11/aspnet-url-rewrite-aspnetiis-vs-phpapache/</guid>
		<description><![CDATA[Have you ever realized how difficult url rewrite can be in ASP.NET which is hosted in IIS?
If you are coding php and hosting it on an apache server, your job is pretty easy. You may just write appropriate
matchings for your urls ( this is typically done by regular expressions ) in htaccess file. However this [...]]]></description>
			<content:encoded><![CDATA[<p>Have you ever realized how difficult url rewrite can be in ASP.NET which is hosted in IIS?<br />
If you are coding php and hosting it on an apache server, your job is pretty easy. You may just write appropriate<br />
matchings for your urls ( this is typically done by regular expressions ) in htaccess file. However this is not just that easy on IIS. You may ask, why the subject contains &#8220;ASP.NET&#8221;, this is because IIS is just used to host ASP.NET in usual. You may host ASP.NET on your apache, but the hosting firms in the market do not use apache servers for ASP.NET. They use IIS.</p>
<p>Url rewriting can be made in few ways, with ISAPI modules, or you may configure IIS to direct .html or anyother extensions to ASP.NET dll. However you need to access your IIS server.If you are using a shared hosting like me <img src='http://www.buraak.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  , you may be disappointed but you should accept that you can only do url rewrites which ends in .aspx extension, because IIS directs .aspx extensions to asp.net dll, and your custom rewrites in your global.asax will run before IIS gives an &#8220;404 Not Found Error&#8221;.</p>
<p>Yes I hate .aspx/.php or any other extensions different than .html. Not only me prefer .html , but also Google prefers .html extensions, and most likely to index that pages.Briefly the same situation can happen if you host php on IIS (which is pretty a dumb action to do), as a result this is not related but .NET, but again If we consider php/apache bros. they gain +1 against asp.net/IIS .</p>
<p>Technorati Tags: <a href="http://technorati.com/tag/ASP.NET" rel="tag">ASP.NET</a>, <a href="http://technorati.com/tag/URL+Rewrite" rel="tag">URL Rewrite</a>, <a href="http://technorati.com/tag/IIS" rel="tag">IIS</a>, <a href="http://technorati.com/tag/PHP" rel="tag">PHP</a>, <a href="http://technorati.com/tag/Apache" rel="tag">Apache</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.buraak.com/2008/01/11/aspnet-url-rewrite-aspnetiis-vs-phpapache/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Win32 API Introduction</title>
		<link>http://www.buraak.com/2007/08/23/win32-api-introduction/</link>
		<comments>http://www.buraak.com/2007/08/23/win32-api-introduction/#comments</comments>
		<pubDate>Fri, 24 Aug 2007 00:07:11 +0000</pubDate>
		<dc:creator>Burak Ozdemir</dc:creator>
				<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.buraak.com/2007/08/23/win32-api-introduction/</guid>
		<description><![CDATA[A small win32 application code that was taken from http://www.winprog.org/tutorial/ . Great win32 tutorial for beginners, nowadays I am interested in win32 api programming and found this site from google, here the code piece:
#include &#60;windows.h&#62;
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
LPSTR lpCmdLine, int nCmdShow)
{
MessageBox(NULL, &#8220;Goodbye, cruel world!&#8221;, &#8220;Note&#8221;, MB_OK);
return 0;
}
Yes, this is a way of saying [...]]]></description>
			<content:encoded><![CDATA[<p>A small win32 application code that was taken from <a href="http://www.winprog.org/tutorial/">http://www.winprog.org/tutorial/</a> . Great win32 tutorial for beginners, nowadays I am interested in win32 api programming and found this site from google, here the code piece:</p>
<p>#include &lt;windows.h&gt;</p>
<p>int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,<br />
LPSTR lpCmdLine, int nCmdShow)<br />
{<br />
MessageBox(NULL, &#8220;Goodbye, cruel world!&#8221;, &#8220;Note&#8221;, MB_OK);<br />
return 0;<br />
}</p>
<p>Yes, this is a way of saying &#8220;Hello World&#8221; in win32 api <img src='http://www.buraak.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /><br />
Maybe I&#8217;ll add some small tools in the future if I can learn, it is pretty hard and complicated.</p>
<p>Tags: <a href="http://technorati.com/tag/Api" rel="tag">Api</a>, <a href="http://technorati.com/tag/Win32" rel="tag">Win32</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.buraak.com/2007/08/23/win32-api-introduction/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MPI &#8211; Parallel Bubble Sort</title>
		<link>http://www.buraak.com/2007/06/11/mpi-parallel-bubble-sort/</link>
		<comments>http://www.buraak.com/2007/06/11/mpi-parallel-bubble-sort/#comments</comments>
		<pubDate>Mon, 11 Jun 2007 22:31:21 +0000</pubDate>
		<dc:creator>Burak Ozdemir</dc:creator>
				<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.buraak.com/2007/06/11/mpi-parallel-bubble-sort/</guid>
		<description><![CDATA[Below I am giving VC++ project file (utilizing MPI) of a parallelized  bubble sort algorithm, you may find it useful, there are message passings between master and slave tasks, also there are some functions like merge, bubblesort and swap.
Download 9 KB
]]></description>
			<content:encoded><![CDATA[<p>Below I am giving VC++ project file (utilizing MPI) of a parallelized  bubble sort algorithm, you may find it useful, there are message passings between master and slave tasks, also there are some functions like merge, bubblesort and swap.</p>
<p><a href="http://www.buraak.com/programs/Parallel%20Bubble%20Sort.rar">Download 9 KB</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.buraak.com/2007/06/11/mpi-parallel-bubble-sort/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>First Order Logic Parser</title>
		<link>http://www.buraak.com/2007/06/02/first-order-logic-parser/</link>
		<comments>http://www.buraak.com/2007/06/02/first-order-logic-parser/#comments</comments>
		<pubDate>Sat, 02 Jun 2007 19:25:36 +0000</pubDate>
		<dc:creator>Burak Ozdemir</dc:creator>
				<category><![CDATA[Computer Science]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.buraak.com/2007/06/02/first-order-logic-parser/</guid>
		<description><![CDATA[Finally after a week or so, I am ready to put the parser for download. I want to clarify some points, actually I used the word &#8220;parser&#8221; to intend syntax checking, it is not a complete parser, it just checks first order logic syntax, so not a big deal !  Be aware that code [...]]]></description>
			<content:encoded><![CDATA[<p>Finally after a week or so, I am ready to put the parser for download. I want to clarify some points, actually I used the word &#8220;parser&#8221; to intend syntax checking, it is not a complete parser, it just checks first order logic syntax, so not a big deal !  Be aware that code may contains error(s), I am not saying it is perfect, it is just a piece of code that I wrote for my Automata Lecture project. So the code gives just a simple idea about how syntax checking done iteratively. The rar archive contains a fol.txt besides main.cpp (single source file) , all predicates, functions, variables, constants, simply all our language defined in this text file.You may change some values while some must remain as it is. After compiling the source file, put fol.txt in the same directory with compiled .exe.</p>
<p><a href="http://www.buraak.com/programs/fol_parser.rar">Download Source File(2.80 KB)</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.buraak.com/2007/06/02/first-order-logic-parser/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Sorting Algorithms</title>
		<link>http://www.buraak.com/2007/05/30/sorting-algorithms/</link>
		<comments>http://www.buraak.com/2007/05/30/sorting-algorithms/#comments</comments>
		<pubDate>Wed, 30 May 2007 21:32:03 +0000</pubDate>
		<dc:creator>Burak Ozdemir</dc:creator>
				<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.buraak.com/2007/05/30/sorting-algorithms/</guid>
		<description><![CDATA[In this post, I am here to give you pseudo codes of basic sorting algorithms, I gathered all of them in one place, there are 8 different sorting algorithms, some of them may perform than the others, if you are interested in sorting algorithms, you should search for complexity analysis of each one to understand [...]]]></description>
			<content:encoded><![CDATA[<p>In this post, I am here to give you pseudo codes of basic sorting algorithms, I gathered all of them in one place, there are 8 different sorting algorithms, some of them may perform than the others, if you are interested in sorting algorithms, you should search for complexity analysis of each one to understand the differences between them.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.buraak.com/2007/05/30/sorting-algorithms/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Threading in C#</title>
		<link>http://www.buraak.com/2007/04/30/threading-in-c/</link>
		<comments>http://www.buraak.com/2007/04/30/threading-in-c/#comments</comments>
		<pubDate>Mon, 30 Apr 2007 17:46:43 +0000</pubDate>
		<dc:creator>Burak Ozdemir</dc:creator>
				<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.buraak.com/2007/04/30/threading-in-c/</guid>
		<description><![CDATA[What is Threading?
-Parallel execution of code pieces on CPU, commonly compiled codes started in a single thread but it is possible to create multi-threads within a program.
Why Threading?
-Because threading is really useful, and it is used in nearly all kind of serious softwares, threads enables us to do independent jobs simultaneously, and it is sometimes [...]]]></description>
			<content:encoded><![CDATA[<p>What is Threading?<br />
-Parallel execution of code pieces on CPU, commonly compiled codes started in a single thread but it is possible to create multi-threads within a program.</p>
<p>Why Threading?<br />
-Because threading is really useful, and it is used in nearly all kind of serious softwares, threads enables us to do independent jobs simultaneously, and it is sometimes hard to handle, if it is done with experienced hands, it enhances the software greatly. I want to give a simple example, consider you want your program to check for available updates and install them without interrupting the user&#8217;s work. This is only done with threads, while user working with your software, another thread connects to Internet and checks available updates without blocking the current execution of the software.</p>
<p>A simple threading example with C# :</p>
<p>Thread test_thread;</p>
<p>public void Thread_Task()<br />
{<br />
for(int i=0;i&lt;100:++i)<br />
TextBox1.Text=Convert.ToString(i);<br />
}<br />
private void button1_Click(object sender, EventArgs e)<br />
{<br />
test_thread=new Thread(new ThreadStart(this.Thread_Task));<br />
test_thread.IsBackground = true;<br />
test_thread.Start();<br />
}</p>
<p>In the above simple code piece, we created a thread object and a thread task function, then we assigned task function to thread object in a button_click function, then we started the thread, as you notice, if user clicks the button a new thread starts and show the value of i in the TextBox1 without blocking the program, user may continue working and at the same time values of i are showed in the TextBox1. This was a sample example to demonstrate threads created and used, besides there is a vast usage and restrictions for threads, for example there will be a problem what if two threads wants to access the same resource and wants to edit, there are lots of synchronization problems and techniques.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.buraak.com/2007/04/30/threading-in-c/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>A* Search Algorithm / C# Implementation</title>
		<link>http://www.buraak.com/2007/04/20/a-search-algorithm-c-implementation/</link>
		<comments>http://www.buraak.com/2007/04/20/a-search-algorithm-c-implementation/#comments</comments>
		<pubDate>Sat, 21 Apr 2007 00:41:11 +0000</pubDate>
		<dc:creator>Burak Ozdemir</dc:creator>
				<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.buraak.com/2007/04/20/a-search-algorithm-c-implementation/</guid>
		<description><![CDATA[What is A* Search?
-A kind of informed search algorithm used in agent based systems.
I am here to put a C# implementation of it, I do not care if someone is interested in or not, I feel I could give this away, do what you want with it&#8230;   Comments are welcome as always.
Download
]]></description>
			<content:encoded><![CDATA[<p>What is A* Search?<br />
-A kind of informed search algorithm used in agent based systems.</p>
<p>I am here to put a C# implementation of it, I do not care if someone is interested in or not, I feel I could give this away, do what you want with it&#8230; <img src='http://www.buraak.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' />  Comments are welcome as always.</p>
<p><a href="http://www.buraak.com/programs/Asearch.cs" title="A* Search" target="_blank">Download</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.buraak.com/2007/04/20/a-search-algorithm-c-implementation/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Getting MX record from DNS</title>
		<link>http://www.buraak.com/2007/04/18/getting-mx-record-from-dns/</link>
		<comments>http://www.buraak.com/2007/04/18/getting-mx-record-from-dns/#comments</comments>
		<pubDate>Wed, 18 Apr 2007 10:19:48 +0000</pubDate>
		<dc:creator>Burak Ozdemir</dc:creator>
				<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.buraak.com/2007/04/17/getting-mx-record-from-dns/</guid>
		<description><![CDATA[First of all, if you downloaded and tried the Tiny Mailer (Download link is below), you should be realized that program making a direct connection to Mail Exchange servers and sending your mail. But how to obtain the ip address of the mail exchange server from the given receiver&#8217;s mail address.The trick is there, if [...]]]></description>
			<content:encoded><![CDATA[<p>First of all, if you downloaded and tried the Tiny Mailer (Download link is below), you should be realized that program making a direct connection to Mail Exchange servers and sending your mail. But how to obtain the ip address of the mail exchange server from the given receiver&#8217;s mail address.The trick is there, if you know the ip address of the mx server then you can make a direct connection as a normal SMTP Client and send your mail. Below there is a small code piece that shows how you can do this process in C# .Net. This little piece of code takes advantage of using &#8220;nslookup&#8221; tool. It opens the &#8220;nslookup&#8221; in the background make a query for a given host then returns the output to a string, then the first mx record is parsed and returned from the function.</p>
<p>public string getmxserver(string hostname)<br />
{<br />
System.Diagnostics.Process proc = new System.Diagnostics.Process();<br />
proc.StartInfo.UseShellExecute = false;<br />
proc.EnableRaisingEvents = false;<br />
proc.StartInfo.FileName = &#8220;nslookup&#8221;;<br />
proc.StartInfo.Arguments = &#8220;-type=mx &#8221; + hostname;<br />
proc.StartInfo.RedirectStandardOutput = true;<br />
proc.StartInfo.WindowStyle = System.Diagnostics.ProcessWindowStyle.Hidden;<br />
proc.StartInfo.CreateNoWindow = true;<br />
proc.Start();<br />
StreamReader pout = proc.StandardOutput;<br />
string s = pout.ReadToEnd();<br />
string[] snew = s.Split(&#8216;,&#8217;);<br />
string[] snew2 = snew[1].Split(&#8216;=&#8217;);<br />
string[] snew3 = snew2[1].Split(&#8216; &#8216;);<br />
string[] snew4 = snew[1].Split();<br />
string mxserver = snew4[4];<br />
return mxserver;<br />
}</p>
<p>As you can see it is the simplest way of Getting MX record. I hope this would be helpful to those who are intended in coding SMTP client.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.buraak.com/2007/04/18/getting-mx-record-from-dns/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>C# Mail Client &amp; Sending Mail With C# .NET</title>
		<link>http://www.buraak.com/2007/04/17/c-mail-client-sending-mail-with-c-net/</link>
		<comments>http://www.buraak.com/2007/04/17/c-mail-client-sending-mail-with-c-net/#comments</comments>
		<pubDate>Tue, 17 Apr 2007 16:32:23 +0000</pubDate>
		<dc:creator>Burak Ozdemir</dc:creator>
				<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.buraak.com/2007/04/17/c-mail-client-sending-mail-with-c-net/</guid>
		<description><![CDATA[As I mentioned below, the first small tutorial will be about writing a small mail client (smtp client). Before starting to tutorial, you have to design a simple GUI (graphical user interface) like below screen shot, a simple interface is enough. In this mail client we will use System.Net.Mail library to create mail and smtp [...]]]></description>
			<content:encoded><![CDATA[<p>As I mentioned below, the first small tutorial will be about writing a small mail client (smtp client). Before starting to tutorial, you have to design a simple GUI (graphical user interface) like below screen shot, a simple interface is enough. In this mail client we will use System.Net.Mail library to create mail and smtp client objects. Our code will be similar to below code piece,</p>
<p>MailMessage mymes = new MailMessage();<br />
mymes.To.Add(new MailAddress(toTextBox.text);<br />
mymes.From=new MailAddress(fromTextBox.text);<br />
mymes.Subject=subjectTextBox.text;<br />
mymes.Body=bodyTextBox.text;<br />
SmtpClient myclient = new SmtpClient(&#8220;smtp server host address  as string&#8221;);<br />
myclient.Send(mymes);</p>
<p>It is easy as it is. It is extremely short and easy to understand (8 lines as you see), the complexity may emerge, if the smtp server needs authorization and maybe it need a ssl connection to authorize username &amp; password (credentials). I leave those to ones who are interested in more than a simple stmp client, if you have any question or help please leave a comment.</p>
<p>An example GUI:<br />
<img src="http://www.buraak.com/wp-content/uploads/2007/04/gui.png" alt="gui.png" /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.buraak.com/2007/04/17/c-mail-client-sending-mail-with-c-net/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>New Category</title>
		<link>http://www.buraak.com/2007/04/17/new-category/</link>
		<comments>http://www.buraak.com/2007/04/17/new-category/#comments</comments>
		<pubDate>Tue, 17 Apr 2007 16:06:53 +0000</pubDate>
		<dc:creator>Burak Ozdemir</dc:creator>
				<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.buraak.com/2007/04/17/new-category/</guid>
		<description><![CDATA[I have decided to open a new category in my blog to improve the content and try to share something useful, the new category will be about programming, I will giving small tutorials about various kinds of programming languages, but mainly based on c# and c++. The first small tutorial will be about writing a [...]]]></description>
			<content:encoded><![CDATA[<p>I have decided to open a new category in my blog to improve the content and try to share something useful, the new category will be about programming, I will giving small tutorials about various kinds of programming languages, but mainly based on c# and c++. The first small tutorial will be about writing a small smtp mail client with c# using .NET.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.buraak.com/2007/04/17/new-category/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
