<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Recent changes to Code Sample</title><link>https://sourceforge.net/p/projectyui/wiki/Code%2520Sample/</link><description>Recent changes to Code Sample</description><atom:link href="https://sourceforge.net/p/projectyui/wiki/Code%20Sample/feed" rel="self"/><language>en</language><lastBuildDate>Tue, 06 May 2014 01:28:59 -0000</lastBuildDate><atom:link href="https://sourceforge.net/p/projectyui/wiki/Code%20Sample/feed" rel="self" type="application/rss+xml"/><item><title>Code Sample modified by geek96boolean10</title><link>https://sourceforge.net/p/projectyui/wiki/Code%2520Sample/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v5
+++ v6
@@ -1,6 +1,8 @@
 Here are some code samples that demonstrate working DLLs that Yui can run. Keep in mind these are extremely rough and may still undergo change.

-The programs I am providing are written in &lt;b&gt;Visual Basic .NET&lt;/b&gt; and provide simple memory functions for Yui. These include writing, recalling, and forgetting information.
+The programs I am providing are written in &lt;b&gt;Visual Basic .NET&lt;/b&gt; and provide simple memory functions for Yui. These include writing, recalling, and forgetting information, and demonstrate the PROCESS and FUNCTION types of programs. They are all Class projects, built to DLL.
+
+All three programs have been tested to work with the latest version of Yui. Example programs for Async programs are still to come.

 Imports System.Xml
 Imports System.IO
&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">geek96boolean10</dc:creator><pubDate>Tue, 06 May 2014 01:28:59 -0000</pubDate><guid>https://sourceforge.netb08e03b3f05eb6c770b396e9b71a3fdceb1e434b</guid></item><item><title>Code Sample modified by geek96boolean10</title><link>https://sourceforge.net/p/projectyui/wiki/Code%2520Sample/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v4
+++ v5
@@ -1,8 +1,7 @@
 Here are some code samples that demonstrate working DLLs that Yui can run. Keep in mind these are extremely rough and may still undergo change.

-The programs I am providing are written in Visual Basic .NET and provide simple memory functions for Yui. These include writing, recalling, and forgetting information.
-
-:::basic
+The programs I am providing are written in &lt;b&gt;Visual Basic .NET&lt;/b&gt; and provide simple memory functions for Yui. These include writing, recalling, and forgetting information.
+
 Imports System.Xml
 Imports System.IO
 Imports System.Collections.Specialized
&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">geek96boolean10</dc:creator><pubDate>Tue, 06 May 2014 01:22:14 -0000</pubDate><guid>https://sourceforge.net4601e5f88ae6627007baf9a42c8ec083c304ca69</guid></item><item><title>Code Sample modified by geek96boolean10</title><link>https://sourceforge.net/p/projectyui/wiki/Code%2520Sample/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v3
+++ v4
@@ -2,6 +2,7 @@

 The programs I am providing are written in Visual Basic .NET and provide simple memory functions for Yui. These include writing, recalling, and forgetting information.

+:::basic
 Imports System.Xml
 Imports System.IO
 Imports System.Collections.Specialized
&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">geek96boolean10</dc:creator><pubDate>Tue, 06 May 2014 01:21:21 -0000</pubDate><guid>https://sourceforge.net8a7ebb87702481cfbb67b3437635bd2bbd470ca1</guid></item><item><title>Code Sample modified by geek96boolean10</title><link>https://sourceforge.net/p/projectyui/wiki/Code%2520Sample/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v2
+++ v3
@@ -8,7 +8,9 @@
 Imports System.Runtime.Serialization.Formatters.Binary

 Public Class MEMORIZE
+
     Public Shared log As New Specialized.StringCollection
+
     Shared Function INSTRUCTIONS() As Specialized.OrderedDictionary
         Dim dictionary As New Specialized.OrderedDictionary
         dictionary.Add("NAME", "MEMORIZE")
@@ -20,10 +22,12 @@
         dictionary.Add("aliasUsed", "OPTIONALSTRING") 'MUST be the last entry in the arguments, as in MEMORIZE()
         Return dictionary
     End Function
+
     Shared Function ALIASES() As Array
         Dim alias1 As Array = {"REMEMBER"}
         Return alias1
     End Function
+
     Shared Function MEMORIZE(nickname As String, Optional phrase As String = "", Optional usedAlias As String = "") As Specialized.StringCollection
         'The StringCollection to return will include the following:
         '- Success/Failure as Boolean
@@ -70,6 +74,7 @@
         binformatter.Serialize(stream, file)
         stream.Close()
     End Sub
+
     Shared Function deserialize()
         Dim binformatter As New BinaryFormatter
         Dim mstream As New MemoryStream
@@ -97,7 +102,9 @@
 Imports System.Runtime.Serialization.Formatters.Binary

 Public Class RECALL 'meant to be paired with 'MEMORIZE'
+
     Public Shared log As New Specialized.StringCollection
+
     Shared Function INSTRUCTIONS() As Specialized.OrderedDictionary
         Dim dictionary As New Specialized.OrderedDictionary
         dictionary.Add("NAME", "RECALL")
@@ -109,10 +116,12 @@
         dictionary.Add("aliasUsed", "OPTIONALSTRING") 'MUST be the last entry in the arguments, as in MEMORIZE()
         Return dictionary
     End Function
+
     Shared Function ALIASES() As Array
         Dim alias1 As Array = {"REMIND"}
         Return alias1
     End Function
+
     Shared Function RECALL(nickname As String, Optional usedAlias As String = "") As Specialized.StringCollection
         'The StringCollection to return will include the following:
         '- Success/Failure as Boolean
@@ -168,6 +177,7 @@
             Return New Specialized.StringDictionary
         End If
     End Function
+
     Shared Sub serialize(file As Object)
         Dim binformatter As New BinaryFormatter
         Dim mstream As New MemoryStream
@@ -185,7 +195,9 @@
 Imports System.Runtime.Serialization.Formatters.Binary

 Public Class FORGET
+
     Public Shared log As New Specialized.StringCollection
+
     Shared Function INSTRUCTIONS() As Specialized.OrderedDictionary
         Dim dictionary As New Specialized.OrderedDictionary
         dictionary.Add("NAME", "MEMORIZE")
@@ -197,10 +209,12 @@
         dictionary.Add("aliasUsed", "OPTIONALSTRING") 'MUST be the last entry in the arguments, as in MEMORIZE()
         Return dictionary
     End Function
+
     Shared Function ALIASES() As Array
         Dim alias1 As Array = {""}
         Return alias1
     End Function
+
     Shared Function FORGET(nickname As String, Optional usedAlias As String = "") As Specialized.StringCollection
         'The StringCollection to return will include the following:
         '- Success/Failure as Boolean
@@ -242,6 +256,7 @@
         binformatter.Serialize(stream, file)
         stream.Close()
     End Sub
+
     Shared Function deserialize()
         Dim binformatter As New BinaryFormatter
         Dim mstream As New MemoryStream
&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">geek96boolean10</dc:creator><pubDate>Tue, 06 May 2014 01:18:50 -0000</pubDate><guid>https://sourceforge.net7f9123ffc146274ee8a159ced4fd990467dad987</guid></item><item><title>Code Sample modified by geek96boolean10</title><link>https://sourceforge.net/p/projectyui/wiki/Code%2520Sample/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v1
+++ v2
@@ -2,3 +2,262 @@

 The programs I am providing are written in Visual Basic .NET and provide simple memory functions for Yui. These include writing, recalling, and forgetting information.

+Imports System.Xml
+Imports System.IO
+Imports System.Collections.Specialized
+Imports System.Runtime.Serialization.Formatters.Binary
+
+Public Class MEMORIZE
+    Public Shared log As New Specialized.StringCollection
+    Shared Function INSTRUCTIONS() As Specialized.OrderedDictionary
+        Dim dictionary As New Specialized.OrderedDictionary
+        dictionary.Add("NAME", "MEMORIZE")
+        dictionary.Add("TYPE", "PROCESS")
+        dictionary.Add("FOLDERNEEDED", "TRUE")
+        dictionary.Add("TOTALREQUIREMENTS", 3) 'Requirements as arguments for the main Sub - in this case, MEMORIZE() has 3 arguments.
+        dictionary.Add("the nickname for the phrase", "STRING")
+        dictionary.Add("the phrase to memorize", "LONGSTRING")
+        dictionary.Add("aliasUsed", "OPTIONALSTRING") 'MUST be the last entry in the arguments, as in MEMORIZE()
+        Return dictionary
+    End Function
+    Shared Function ALIASES() As Array
+        Dim alias1 As Array = {"REMEMBER"}
+        Return alias1
+    End Function
+    Shared Function MEMORIZE(nickname As String, Optional phrase As String = "", Optional usedAlias As String = "") As Specialized.StringCollection
+        'The StringCollection to return will include the following:
+        '- Success/Failure as Boolean
+        '- LOG information
+        log.Clear()
+        Dim success As Boolean
+        Select Case usedAlias.ToLower
+            Case ""
+                success = memorize1(phrase, nickname)
+            Case "remember"
+                success = memorize1(phrase, nickname)
+        End Select
+        log.Insert(0, success.ToString)
+        Return log
+    End Function
+
+    Shared Function memorize1(phrase As String, nickname As String) As Boolean
+        Try
+            log.Add("start working")
+            Dim file As Specialized.StringDictionary
+            log.Add("opening previous if any")
+            file = deserialize()
+            log.Add("memorizing")
+            Try
+                file.Add(nickname, phrase)
+            Catch ex As Exception
+                log.Add("previous entry exists!")
+                Return False
+            End Try
+            log.Add("committing to memory")
+            serialize(file)
+            log.Add("done")
+            Return True
+        Catch ex As Exception
+            log.Add("error:" &amp; ex.Message)
+            Return False
+        End Try
+    End Function
+    
+    Shared Sub serialize(file As Object)
+        Dim binformatter As New BinaryFormatter
+        Dim mstream As New MemoryStream
+        Dim stream As New FileStream((CurDir() + "\PROGRAMS\MEMORIZE\MemorizedTopics.yui"), FileMode.OpenOrCreate)
+        binformatter.Serialize(stream, file)
+        stream.Close()
+    End Sub
+    Shared Function deserialize()
+        Dim binformatter As New BinaryFormatter
+        Dim mstream As New MemoryStream
+        If IO.File.Exists(CurDir() + "\PROGRAMS\MEMORIZE\MemorizedTopics.yui") Then
+            Dim stream As New FileStream((CurDir() + "\PROGRAMS\MEMORIZE\MemorizedTopics.yui"), FileMode.OpenOrCreate)
+            Try
+                Dim obj = binformatter.Deserialize(stream)
+                stream.Close()
+                Return obj
+            Catch ex As Exception
+                stream.Close()
+                Return New Specialized.StringDictionary
+            End Try
+        Else
+            IO.File.Create(CurDir() + "\PROGRAMS\MEMORIZE\MemorizedTopics.yui")
+            Return New Specialized.StringDictionary
+        End If
+    End Function
+End Class
+
+
+Imports System.Xml
+Imports System.IO
+Imports System.Collections.Specialized
+Imports System.Runtime.Serialization.Formatters.Binary
+
+Public Class RECALL 'meant to be paired with 'MEMORIZE'
+    Public Shared log As New Specialized.StringCollection
+    Shared Function INSTRUCTIONS() As Specialized.OrderedDictionary
+        Dim dictionary As New Specialized.OrderedDictionary
+        dictionary.Add("NAME", "RECALL")
+        dictionary.Add("TYPE", "FUNCTION")
+        dictionary.Add("FOLDERNEEDED", "FALSE")
+        'dictionary.Add("DEPENDENCIES", {"MEMORIZE"})
+        dictionary.Add("TOTALREQUIREMENTS", 2) 'Requirements as arguments for the main Sub - in this case, RECALL() has 3 arguments.
+        dictionary.Add("the nickname you assigned", "STRING")
+        dictionary.Add("aliasUsed", "OPTIONALSTRING") 'MUST be the last entry in the arguments, as in MEMORIZE()
+        Return dictionary
+    End Function
+    Shared Function ALIASES() As Array
+        Dim alias1 As Array = {"REMIND"}
+        Return alias1
+    End Function
+    Shared Function RECALL(nickname As String, Optional usedAlias As String = "") As Specialized.StringCollection
+        'The StringCollection to return will include the following:
+        '- Success/Failure as Boolean
+        '- Function returned VALUE information
+        '- LOG data
+        log.Clear()
+        Dim value As String = recalling(nickname)
+        Dim success As Boolean
+        If value.StartsWith("true") Then
+            success = True
+        Else
+            success = False
+        End If
+        Dim val As String = value.Substring(7)
+        log.Insert(0, success.ToString)
+        log.Insert(1, val)
+        Return log
+    End Function
+
+    Shared Function recalling(nickname As String) As String
+        Try
+            log.Add("start working")
+            Dim file As Specialized.StringDictionary
+            log.Add("searching for obj")
+            file = deserialize()
+            If file.ContainsKey(nickname) Then
+                log.Add(nickname &amp; " found")
+                Return ("true[&amp;]" + file.Item(nickname))
+            Else
+                Return "fals[&amp;]"
+            End If
+        Catch ex As Exception
+            log.Add("error:" &amp; ex.Message)
+            Return "fals[&amp;]"
+        End Try
+    End Function
+
+    Shared Function deserialize()
+        Dim binformatter As New BinaryFormatter
+        Dim mstream As New MemoryStream
+        If IO.File.Exists(CurDir() + "\PROGRAMS\MEMORIZE\MemorizedTopics.yui") Then
+            Dim stream As New FileStream((CurDir() + "\PROGRAMS\MEMORIZE\MemorizedTopics.yui"), FileMode.OpenOrCreate)
+            Try
+                Dim obj = binformatter.Deserialize(stream)
+                stream.Close()
+                Return obj
+            Catch ex As Exception
+                stream.Close()
+                Return New Specialized.StringDictionary
+            End Try
+        Else
+            IO.File.Create(CurDir() + "\PROGRAMS\MEMORIZE\MemorizedTopics.yui")
+            Return New Specialized.StringDictionary
+        End If
+    End Function
+    Shared Sub serialize(file As Object)
+        Dim binformatter As New BinaryFormatter
+        Dim mstream As New MemoryStream
+        Dim stream As New FileStream((CurDir() + "\PROGRAMS\MEMORIZE\MemorizedTopics.yui"), FileMode.OpenOrCreate)
+        binformatter.Serialize(stream, file)
+        stream.Close()
+    End Sub
+End Class
+
+
+
+Imports System.Xml
+Imports System.IO
+Imports System.Collections.Specialized
+Imports System.Runtime.Serialization.Formatters.Binary
+
+Public Class FORGET
+    Public Shared log As New Specialized.StringCollection
+    Shared Function INSTRUCTIONS() As Specialized.OrderedDictionary
+        Dim dictionary As New Specialized.OrderedDictionary
+        dictionary.Add("NAME", "MEMORIZE")
+        dictionary.Add("TYPE", "PROCESS")
+        dictionary.Add("FOLDERNEEDED", "FALSE")
+        'dictionary.Add("DEPENDENCIES", {"MEMORIZE"})
+        dictionary.Add("TOTALREQUIREMENTS", 2) 'Requirements as arguments for the main Sub - in this case, MEMORIZE() has 3 arguments.
+        dictionary.Add("the nickname for the phrase", "STRING")
+        dictionary.Add("aliasUsed", "OPTIONALSTRING") 'MUST be the last entry in the arguments, as in MEMORIZE()
+        Return dictionary
+    End Function
+    Shared Function ALIASES() As Array
+        Dim alias1 As Array = {""}
+        Return alias1
+    End Function
+    Shared Function FORGET(nickname As String, Optional usedAlias As String = "") As Specialized.StringCollection
+        'The StringCollection to return will include the following:
+        '- Success/Failure as Boolean
+        '- LOG information
+        log.Clear()
+        Dim success As Boolean
+        success = forgetting(nickname)
+        log.Insert(0, success.ToString)
+        Return log
+    End Function
+
+    Shared Function forgetting(nickname As String) As Boolean
+        Try
+            log.Add("start working")
+            Dim file As Specialized.StringDictionary
+            log.Add("opening previous if any")
+            file = deserialize()
+            log.Add("forgetting")
+            Try
+                file.Remove(nickname)
+            Catch ex As Exception
+                log.Add("previous entry doesn't exist!")
+                Return False
+            End Try
+            log.Add("committing to memory")
+            serialize(file)
+            log.Add("done")
+            Return True
+        Catch ex As Exception
+            log.Add("error:" &amp; ex.Message)
+            Return False
+        End Try
+    End Function
+
+    Shared Sub serialize(file As Object)
+        Dim binformatter As New BinaryFormatter
+        Dim mstream As New MemoryStream
+        Dim stream As New FileStream((CurDir() + "\PROGRAMS\MEMORIZE\MemorizedTopics.yui"), FileMode.OpenOrCreate)
+        binformatter.Serialize(stream, file)
+        stream.Close()
+    End Sub
+    Shared Function deserialize()
+        Dim binformatter As New BinaryFormatter
+        Dim mstream As New MemoryStream
+        If IO.File.Exists(CurDir() + "\PROGRAMS\MEMORIZE\MemorizedTopics.yui") Then
+            Dim stream As New FileStream((CurDir() + "\PROGRAMS\MEMORIZE\MemorizedTopics.yui"), FileMode.OpenOrCreate)
+            Try
+                Dim obj = binformatter.Deserialize(stream)
+                stream.Close()
+                Return obj
+            Catch ex As Exception
+                stream.Close()
+                Return New Specialized.StringDictionary
+            End Try
+        Else
+            IO.File.Create(CurDir() + "\PROGRAMS\MEMORIZE\MemorizedTopics.yui")
+            Return New Specialized.StringDictionary
+        End If
+    End Function
+End Class
&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">geek96boolean10</dc:creator><pubDate>Mon, 05 May 2014 12:47:09 -0000</pubDate><guid>https://sourceforge.net0cbcdb8130c4b7f3689dadddba2773bb048d1f9c</guid></item><item><title>Code Sample modified by geek96boolean10</title><link>https://sourceforge.net/p/projectyui/wiki/Code%2520Sample/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;Here are some code samples that demonstrate working DLLs that Yui can run. Keep in mind these are extremely rough and may still undergo change.&lt;/p&gt;
&lt;p&gt;The programs I am providing are written in Visual Basic .NET and provide simple memory functions for Yui. These include writing, recalling, and forgetting information.&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">geek96boolean10</dc:creator><pubDate>Mon, 05 May 2014 12:44:15 -0000</pubDate><guid>https://sourceforge.netbbba0ccd1d1668985db1a850573fa02a5c8320fc</guid></item></channel></rss>