{"size":1611,"ext":"vb","lang":"Visual Basic","max_stars_count":null,"content":"\ufeff'------------------------------------------------------------------------------\n' \n' Dieser Code wurde von einem Tool generiert.\n' Laufzeitversion:4.0.30319.18408\n'\n' \u00c4nderungen an dieser Datei k\u00f6nnen falsches Verhalten verursachen und gehen verloren, wenn\n' der Code erneut generiert wird.\n' <\/auto-generated>\n'------------------------------------------------------------------------------\n\nOption Strict On\nOption Explicit On\n\n\nNamespace My\n \n 'HINWEIS: Diese Datei wird automatisch generiert. \u00c4ndern Sie sie nicht direkt. Zum \u00c4ndern\n ' oder bei in dieser Datei auftretenden Buildfehlern wechseln Sie zum Projekt-Designer.\n ' (Wechseln Sie dazu zu den Projekteigenschaften, oder doppelklicken Sie auf den Knoten \"Mein Projekt\" im\n ' Projektmappen-Explorer). Nehmen Sie auf der Registerkarte \"Anwendung\" entsprechende \u00c4nderungen vor.\n '\n Partial Friend Class MyApplication\n \n _\n Public Sub New()\n MyBase.New(Global.Microsoft.VisualBasic.ApplicationServices.AuthenticationMode.Windows)\n Me.IsSingleInstance = false\n Me.EnableVisualStyles = true\n Me.SaveMySettingsOnExit = true\n Me.ShutDownStyle = Global.Microsoft.VisualBasic.ApplicationServices.ShutdownMode.AfterMainFormCloses\n End Sub\n \n _\n Protected Overrides Sub OnCreateMainForm()\n Me.MainForm = Global.PlanetSim.MainForm\n End Sub\n End Class\nEnd Namespace\n","avg_line_length":41.3076923077,"max_line_length":112,"alphanum_fraction":0.6455617629} {"size":8183,"ext":"frm","lang":"Visual Basic","max_stars_count":null,"content":"TYPE=VIEW\nquery=select `pps`.`THREAD_ID` AS `thd_id`,`pps`.`PROCESSLIST_ID` AS `conn_id`,if((`pps`.`NAME` = \\'thread\/sql\/one_connection\\'),concat(`pps`.`PROCESSLIST_USER`,\\'@\\',`pps`.`PROCESSLIST_HOST`),replace(`pps`.`NAME`,\\'thread\/\\',\\'\\')) AS `user`,`pps`.`PROCESSLIST_DB` AS `db`,`pps`.`PROCESSLIST_COMMAND` AS `command`,`pps`.`PROCESSLIST_STATE` AS `state`,`pps`.`PROCESSLIST_TIME` AS `time`,`sys`.`format_statement`(`pps`.`PROCESSLIST_INFO`) AS `current_statement`,if(isnull(`esc`.`END_EVENT_ID`),`sys`.`format_time`(`esc`.`TIMER_WAIT`),NULL) AS `statement_latency`,if(isnull(`esc`.`END_EVENT_ID`),round((100 * (`estc`.`WORK_COMPLETED` \/ `estc`.`WORK_ESTIMATED`)),2),NULL) AS `progress`,`sys`.`format_time`(`esc`.`LOCK_TIME`) AS `lock_latency`,`esc`.`ROWS_EXAMINED` AS `rows_examined`,`esc`.`ROWS_SENT` AS `rows_sent`,`esc`.`ROWS_AFFECTED` AS `rows_affected`,`esc`.`CREATED_TMP_TABLES` AS `tmp_tables`,`esc`.`CREATED_TMP_DISK_TABLES` AS `tmp_disk_tables`,if(((`esc`.`NO_GOOD_INDEX_USED` > 0) or (`esc`.`NO_INDEX_USED` > 0)),\\'YES\\',\\'NO\\') AS `full_scan`,if((`esc`.`END_EVENT_ID` is not null),`sys`.`format_statement`(`esc`.`SQL_TEXT`),NULL) AS `last_statement`,if((`esc`.`END_EVENT_ID` is not null),`sys`.`format_time`(`esc`.`TIMER_WAIT`),NULL) AS `last_statement_latency`,`sys`.`format_bytes`(`mem`.`current_allocated`) AS `current_memory`,`ewc`.`EVENT_NAME` AS `last_wait`,if((isnull(`ewc`.`END_EVENT_ID`) and (`ewc`.`EVENT_NAME` is not null)),\\'Still Waiting\\',`sys`.`format_time`(`ewc`.`TIMER_WAIT`)) AS `last_wait_latency`,`ewc`.`SOURCE` AS `source`,`sys`.`format_time`(`etc`.`TIMER_WAIT`) AS `trx_latency`,`etc`.`STATE` AS `trx_state`,`etc`.`AUTOCOMMIT` AS `trx_autocommit`,`conattr_pid`.`ATTR_VALUE` AS `pid`,`conattr_progname`.`ATTR_VALUE` AS `program_name` from (((((((`performance_schema`.`threads` `pps` left join `performance_schema`.`events_waits_current` `ewc` on((`pps`.`THREAD_ID` = `ewc`.`THREAD_ID`))) left join `performance_schema`.`events_stages_current` `estc` on((`pps`.`THREAD_ID` = `estc`.`THREAD_ID`))) left join `performance_schema`.`events_statements_current` `esc` on((`pps`.`THREAD_ID` = `esc`.`THREAD_ID`))) left join `performance_schema`.`events_transactions_current` `etc` on((`pps`.`THREAD_ID` = `etc`.`THREAD_ID`))) left join `sys`.`x$memory_by_thread_by_current_bytes` `mem` on((`pps`.`THREAD_ID` = `mem`.`thread_id`))) left join `performance_schema`.`session_connect_attrs` `conattr_pid` on(((`conattr_pid`.`PROCESSLIST_ID` = `pps`.`PROCESSLIST_ID`) and (`conattr_pid`.`ATTR_NAME` = \\'_pid\\')))) left join `performance_schema`.`session_connect_attrs` `conattr_progname` on(((`conattr_progname`.`PROCESSLIST_ID` = `pps`.`PROCESSLIST_ID`) and (`conattr_progname`.`ATTR_NAME` = \\'program_name\\')))) order by `pps`.`PROCESSLIST_TIME` desc,`last_wait_latency` desc\nmd5=bbf8d6b8e8b6e9a163ec3db9d73042b1\nupdatable=0\nalgorithm=1\ndefiner_user=mysql.sys\ndefiner_host=localhost\nsuid=0\nwith_check_option=0\ntimestamp=2021-11-22 07:01:46\ncreate-version=1\nsource=SELECT pps.thread_id AS thd_id, pps.processlist_id AS conn_id, IF(pps.name = \\'thread\/sql\/one_connection\\', CONCAT(pps.processlist_user, \\'@\\', pps.processlist_host), REPLACE(pps.name, \\'thread\/\\', \\'\\')) user, pps.processlist_db AS db, pps.processlist_command AS command, pps.processlist_state AS state, pps.processlist_time AS time, sys.format_statement(pps.processlist_info) AS current_statement, IF(esc.end_event_id IS NULL, sys.format_time(esc.timer_wait), NULL) AS statement_latency, IF(esc.end_event_id IS NULL, ROUND(100 * (estc.work_completed \/ estc.work_estimated), 2), NULL) AS progress, sys.format_time(esc.lock_time) AS lock_latency, esc.rows_examined AS rows_examined, esc.rows_sent AS rows_sent, esc.rows_affected AS rows_affected, esc.created_tmp_tables AS tmp_tables, esc.created_tmp_disk_tables AS tmp_disk_tables, IF(esc.no_good_index_used > 0 OR esc.no_index_used > 0, \\'YES\\', \\'NO\\') AS full_scan, IF(esc.end_event_id IS NOT NULL, sys.format_statement(esc.sql_text), NULL) AS last_statement, IF(esc.end_event_id IS NOT NULL, sys.format_time(esc.timer_wait), NULL) AS last_statement_latency, sys.format_bytes(mem.current_allocated) AS current_memory, ewc.event_name AS last_wait, IF(ewc.end_event_id IS NULL AND ewc.event_name IS NOT NULL, \\'Still Waiting\\', sys.format_time(ewc.timer_wait)) last_wait_latency, ewc.source, sys.format_time(etc.timer_wait) AS trx_latency, etc.state AS trx_state, etc.autocommit AS trx_autocommit, conattr_pid.attr_value as pid, conattr_progname.attr_value as program_name FROM performance_schema.threads AS pps LEFT JOIN performance_schema.events_waits_current AS ewc USING (thread_id) LEFT JOIN performance_schema.events_stages_current AS estc USING (thread_id) LEFT JOIN performance_schema.events_statements_current AS esc USING (thread_id) LEFT JOIN performance_schema.events_transactions_current AS etc USING (thread_id) LEFT JOIN sys.x$memory_by_thread_by_current_bytes AS mem USING (thread_id) LEFT JOIN performance_schema.session_connect_attrs AS conattr_pid ON conattr_pid.processlist_id=pps.processlist_id and conattr_pid.attr_name=\\'_pid\\' LEFT JOIN performance_schema.session_connect_attrs AS conattr_progname ON conattr_progname.processlist_id=pps.processlist_id and conattr_progname.attr_name=\\'program_name\\' ORDER BY pps.processlist_time DESC, last_wait_latency DESC\nclient_cs_name=utf8\nconnection_cl_name=utf8_general_ci\nview_body_utf8=select `pps`.`THREAD_ID` AS `thd_id`,`pps`.`PROCESSLIST_ID` AS `conn_id`,if((`pps`.`NAME` = \\'thread\/sql\/one_connection\\'),concat(`pps`.`PROCESSLIST_USER`,\\'@\\',`pps`.`PROCESSLIST_HOST`),replace(`pps`.`NAME`,\\'thread\/\\',\\'\\')) AS `user`,`pps`.`PROCESSLIST_DB` AS `db`,`pps`.`PROCESSLIST_COMMAND` AS `command`,`pps`.`PROCESSLIST_STATE` AS `state`,`pps`.`PROCESSLIST_TIME` AS `time`,`sys`.`format_statement`(`pps`.`PROCESSLIST_INFO`) AS `current_statement`,if(isnull(`esc`.`END_EVENT_ID`),`sys`.`format_time`(`esc`.`TIMER_WAIT`),NULL) AS `statement_latency`,if(isnull(`esc`.`END_EVENT_ID`),round((100 * (`estc`.`WORK_COMPLETED` \/ `estc`.`WORK_ESTIMATED`)),2),NULL) AS `progress`,`sys`.`format_time`(`esc`.`LOCK_TIME`) AS `lock_latency`,`esc`.`ROWS_EXAMINED` AS `rows_examined`,`esc`.`ROWS_SENT` AS `rows_sent`,`esc`.`ROWS_AFFECTED` AS `rows_affected`,`esc`.`CREATED_TMP_TABLES` AS `tmp_tables`,`esc`.`CREATED_TMP_DISK_TABLES` AS `tmp_disk_tables`,if(((`esc`.`NO_GOOD_INDEX_USED` > 0) or (`esc`.`NO_INDEX_USED` > 0)),\\'YES\\',\\'NO\\') AS `full_scan`,if((`esc`.`END_EVENT_ID` is not null),`sys`.`format_statement`(`esc`.`SQL_TEXT`),NULL) AS `last_statement`,if((`esc`.`END_EVENT_ID` is not null),`sys`.`format_time`(`esc`.`TIMER_WAIT`),NULL) AS `last_statement_latency`,`sys`.`format_bytes`(`mem`.`current_allocated`) AS `current_memory`,`ewc`.`EVENT_NAME` AS `last_wait`,if((isnull(`ewc`.`END_EVENT_ID`) and (`ewc`.`EVENT_NAME` is not null)),\\'Still Waiting\\',`sys`.`format_time`(`ewc`.`TIMER_WAIT`)) AS `last_wait_latency`,`ewc`.`SOURCE` AS `source`,`sys`.`format_time`(`etc`.`TIMER_WAIT`) AS `trx_latency`,`etc`.`STATE` AS `trx_state`,`etc`.`AUTOCOMMIT` AS `trx_autocommit`,`conattr_pid`.`ATTR_VALUE` AS `pid`,`conattr_progname`.`ATTR_VALUE` AS `program_name` from (((((((`performance_schema`.`threads` `pps` left join `performance_schema`.`events_waits_current` `ewc` on((`pps`.`THREAD_ID` = `ewc`.`THREAD_ID`))) left join `performance_schema`.`events_stages_current` `estc` on((`pps`.`THREAD_ID` = `estc`.`THREAD_ID`))) left join `performance_schema`.`events_statements_current` `esc` on((`pps`.`THREAD_ID` = `esc`.`THREAD_ID`))) left join `performance_schema`.`events_transactions_current` `etc` on((`pps`.`THREAD_ID` = `etc`.`THREAD_ID`))) left join `sys`.`x$memory_by_thread_by_current_bytes` `mem` on((`pps`.`THREAD_ID` = `mem`.`thread_id`))) left join `performance_schema`.`session_connect_attrs` `conattr_pid` on(((`conattr_pid`.`PROCESSLIST_ID` = `pps`.`PROCESSLIST_ID`) and (`conattr_pid`.`ATTR_NAME` = \\'_pid\\')))) left join `performance_schema`.`session_connect_attrs` `conattr_progname` on(((`conattr_progname`.`PROCESSLIST_ID` = `pps`.`PROCESSLIST_ID`) and (`conattr_progname`.`ATTR_NAME` = \\'program_name\\')))) order by `pps`.`PROCESSLIST_TIME` desc,`last_wait_latency` desc\n","avg_line_length":511.4375,"max_line_length":2801,"alphanum_fraction":0.7526579494} {"size":1929,"ext":"vb","lang":"Visual Basic","max_stars_count":null,"content":"\ufeff' \nImports System.EnterpriseServices\nImports System.Reflection\n\n\n' References:\n' System.EnterpriseServices\n\n' \n _\nPublic Class ObjectPoolingAttribute_Ctor_Bool\n Inherits ServicedComponent\nEnd Class 'ObjectPoolingAttribute_Ctor_Bool\n' <\/snippet1>\n\n' \n _\nPublic Class ObjectPoolingAttribute_Ctor_Bool_Int_Int\n Inherits ServicedComponent\nEnd Class 'ObjectPoolingAttribute_Ctor_Bool_Int_Int\n' <\/snippet2>\n\n' \n _\nPublic Class ObjectPoolingAttribute_Ctor_Int_Int\n Inherits ServicedComponent\nEnd Class 'ObjectPoolingAttribute_Ctor_Int_Int\n' <\/snippet3>\n\n' \n _\nPublic Class ObjectPoolingAttribute_Enabled\n Inherits ServicedComponent\n \n Public Sub EnabledExample() \n ' Get the ObjectPoolingAttribute applied to the class.\n Dim attribute As ObjectPoolingAttribute = CType(Attribute.GetCustomAttribute(Me.GetType(), GetType(ObjectPoolingAttribute), False), ObjectPoolingAttribute)\n \n ' Display the current value of the attribute's Enabled property.\n MsgBox(\"ObjectPoolingAttribute.Enabled: \" & attribute.Enabled)\n \n ' Set the Enabled property value of the attribute.\n attribute.Enabled = True\n \n ' Display the new value of the attribute's Enabled property.\n MsgBox(\"ObjectPoolingAttribute.Enabled: \" & attribute.Enabled)\n \n End Sub 'EnabledExample\nEnd Class 'ObjectPoolingAttribute_Enabled\n' <\/snippet4>\n\n' <\/snippet0>\n\n' Test client.\nPublic Class ObjectPoolingAttribute_Example\n\n Public Shared Sub Main()\n ' Create a new instance of each example class.\n Dim enabledExample As New ObjectPoolingAttribute_Enabled\n\n ' Demonstrate the ObjectPoolingAttribute properties.\n enabledExample.EnabledExample()\n\n End Sub 'Main\nEnd Class 'ObjectPoolingAttribute_Example","avg_line_length":29.6769230769,"max_line_length":163,"alphanum_fraction":0.7547952307} {"size":20400,"ext":"vb","lang":"Visual Basic","max_stars_count":1.0,"content":"\ufeff' Licensed to the .NET Foundation under one or more agreements.\n' The .NET Foundation licenses this file to you under the MIT license.\n' See the LICENSE file in the project root for more information.\n\nImports System.Collections.Immutable\nImports System.Threading\nImports Microsoft.CodeAnalysis\nImports Microsoft.CodeAnalysis.Common\nImports Microsoft.CodeAnalysis.Editor\nImports Microsoft.CodeAnalysis.Editor.UnitTests.Workspaces\nImports Microsoft.CodeAnalysis.Test.Utilities\nImports Microsoft.VisualStudio.LanguageServices.Implementation.TableDataSource\nImports Microsoft.VisualStudio.Shell.TableManager\nImports Roslyn.Test.Utilities\nImports Roslyn.Utilities\n\nNamespace Microsoft.VisualStudio.LanguageServices.UnitTests.Diagnostics\n <[UseExportProvider]>\n Public Class TodoListTableDataSourceTests\n \n Public Sub TestCreation()\n Using workspace = TestWorkspace.CreateCSharp(String.Empty)\n Dim provider = New TestTodoListProvider()\n Dim tableManagerProvider = New TestTableManagerProvider()\n\n Dim table = New VisualStudioTodoListTableWorkspaceEventListener.VisualStudioTodoListTable(workspace, provider, tableManagerProvider)\n Dim manager = DirectCast(table.TableManager, TestTableManagerProvider.TestTableManager)\n\n Assert.Equal(manager.Identifier, StandardTables.TasksTable)\n Assert.Equal(1, manager.Sources.Count())\n\n Dim source = DirectCast(manager.Sources.First(), AbstractRoslynTableDataSource(Of TodoTableItem))\n AssertEx.SetEqual(table.Columns, manager.GetColumnsForSources(SpecializedCollections.SingletonEnumerable(source)))\n\n Assert.Equal(ServicesVSResources.CSharp_VB_Todo_List_Table_Data_Source, source.DisplayName)\n Assert.Equal(StandardTableDataSources.CommentTableDataSource, source.SourceTypeIdentifier)\n\n Assert.Equal(1, manager.Sinks_TestOnly.Count())\n\n Dim sinkAndSubscription = manager.Sinks_TestOnly.First()\n Dim sink = DirectCast(sinkAndSubscription.Key, TestTableManagerProvider.TestTableManager.TestSink)\n Dim subscription = sinkAndSubscription.Value\n\n Assert.Equal(0, sink.Entries.Count())\n Assert.Equal(1, source.NumberOfSubscription_TestOnly)\n\n subscription.Dispose()\n Assert.Equal(0, source.NumberOfSubscription_TestOnly)\n End Using\n End Sub\n\n \n Public Sub TestInitialEntries()\n Using workspace = TestWorkspace.CreateCSharp(String.Empty)\n Dim documentId = workspace.CurrentSolution.Projects.First().DocumentIds.First()\n Dim provider = New TestTodoListProvider(CreateItem(documentId))\n Dim tableManagerProvider = New TestTableManagerProvider()\n\n Dim table = New VisualStudioTodoListTableWorkspaceEventListener.VisualStudioTodoListTable(workspace, provider, tableManagerProvider)\n provider.RaiseTodoListUpdated(workspace)\n\n Dim manager = DirectCast(table.TableManager, TestTableManagerProvider.TestTableManager)\n Dim source = DirectCast(manager.Sources.First(), AbstractRoslynTableDataSource(Of TodoTableItem))\n Dim sinkAndSubscription = manager.Sinks_TestOnly.First()\n\n Dim sink = DirectCast(sinkAndSubscription.Key, TestTableManagerProvider.TestTableManager.TestSink)\n Assert.Equal(1, sink.Entries.Count)\n End Using\n End Sub\n\n \n Public Sub TestEntryChanged()\n Using workspace = TestWorkspace.CreateCSharp(String.Empty)\n Dim documentId = workspace.CurrentSolution.Projects.First().DocumentIds.First()\n Dim provider = New TestTodoListProvider()\n Dim tableManagerProvider = New TestTableManagerProvider()\n\n Dim table = New VisualStudioTodoListTableWorkspaceEventListener.VisualStudioTodoListTable(workspace, provider, tableManagerProvider)\n Dim manager = DirectCast(table.TableManager, TestTableManagerProvider.TestTableManager)\n\n Dim source = DirectCast(manager.Sources.First(), AbstractRoslynTableDataSource(Of TodoTableItem))\n Dim sinkAndSubscription = manager.Sinks_TestOnly.First()\n\n Dim sink = DirectCast(sinkAndSubscription.Key, TestTableManagerProvider.TestTableManager.TestSink)\n\n provider.Items = New TodoItem() {CreateItem(documentId)}\n provider.RaiseTodoListUpdated(workspace)\n Assert.Equal(1, sink.Entries.Count)\n\n provider.Items = Array.Empty(Of TodoItem)()\n provider.RaiseClearTodoListUpdated(workspace, documentId)\n Assert.Equal(0, sink.Entries.Count)\n End Using\n End Sub\n\n \n Public Sub TestEntry()\n Using workspace = TestWorkspace.CreateCSharp(String.Empty)\n Dim documentId = workspace.CurrentSolution.Projects.First().DocumentIds.First()\n\n Dim item = CreateItem(documentId)\n Dim provider = New TestTodoListProvider(item)\n Dim tableManagerProvider = New TestTableManagerProvider()\n\n Dim table = New VisualStudioTodoListTableWorkspaceEventListener.VisualStudioTodoListTable(workspace, provider, tableManagerProvider)\n provider.RaiseTodoListUpdated(workspace)\n\n Dim manager = DirectCast(table.TableManager, TestTableManagerProvider.TestTableManager)\n Dim source = DirectCast(manager.Sources.First(), AbstractRoslynTableDataSource(Of TodoTableItem))\n Dim sinkAndSubscription = manager.Sinks_TestOnly.First()\n\n Dim sink = DirectCast(sinkAndSubscription.Key, TestTableManagerProvider.TestTableManager.TestSink)\n Dim subscription = sinkAndSubscription.Value\n\n Dim snapshot = sink.Entries.First().GetCurrentSnapshot()\n\n Assert.Equal(1, snapshot.Count)\n\n Dim filename = Nothing\n Assert.True(snapshot.TryGetValue(0, StandardTableKeyNames.DocumentName, filename))\n Assert.Equal(item.OriginalFilePath, filename)\n\n Dim text = Nothing\n Assert.True(snapshot.TryGetValue(0, StandardTableKeyNames.Text, text))\n Assert.Equal(item.Message, text)\n\n Dim line = Nothing\n Assert.True(snapshot.TryGetValue(0, StandardTableKeyNames.Line, line))\n Assert.Equal(item.MappedLine, line)\n\n Dim column = Nothing\n Assert.True(snapshot.TryGetValue(0, StandardTableKeyNames.Column, column))\n Assert.Equal(item.MappedColumn, column)\n End Using\n End Sub\n\n \n Public Sub TestSnapshotEntry()\n Using workspace = TestWorkspace.CreateCSharp(String.Empty)\n Dim documentId = workspace.CurrentSolution.Projects.First().DocumentIds.First()\n\n Dim item = CreateItem(documentId)\n Dim provider = New TestTodoListProvider(item)\n Dim tableManagerProvider = New TestTableManagerProvider()\n\n Dim table = New VisualStudioTodoListTableWorkspaceEventListener.VisualStudioTodoListTable(workspace, provider, tableManagerProvider)\n provider.RaiseTodoListUpdated(workspace)\n\n Dim manager = DirectCast(table.TableManager, TestTableManagerProvider.TestTableManager)\n Dim source = DirectCast(manager.Sources.First(), AbstractRoslynTableDataSource(Of TodoTableItem))\n Dim sinkAndSubscription = manager.Sinks_TestOnly.First()\n\n Dim sink = DirectCast(sinkAndSubscription.Key, TestTableManagerProvider.TestTableManager.TestSink)\n Dim subscription = sinkAndSubscription.Value\n\n Dim factory = TryCast(sink.Entries.First(), TableEntriesFactory(Of TodoTableItem))\n Dim snapshot1 = factory.GetCurrentSnapshot()\n\n factory.OnRefreshed()\n\n Dim snapshot2 = factory.GetCurrentSnapshot()\n\n Assert.Equal(snapshot1.VersionNumber + 1, snapshot2.VersionNumber)\n\n Assert.Equal(1, snapshot1.Count)\n\n Dim filename = Nothing\n Assert.True(snapshot1.TryGetValue(0, StandardTableKeyNames.DocumentName, filename))\n Assert.Equal(item.OriginalFilePath, filename)\n\n Dim text = Nothing\n Assert.True(snapshot1.TryGetValue(0, StandardTableKeyNames.Text, text))\n Assert.Equal(item.Message, text)\n\n Dim line = Nothing\n Assert.True(snapshot1.TryGetValue(0, StandardTableKeyNames.Line, line))\n Assert.Equal(item.MappedLine, line)\n\n Dim column = Nothing\n Assert.True(snapshot1.TryGetValue(0, StandardTableKeyNames.Column, column))\n Assert.Equal(item.MappedColumn, column)\n End Using\n End Sub\n\n \n Public Sub TestSnapshotTranslateTo()\n Using workspace = TestWorkspace.CreateCSharp(String.Empty)\n Dim documentId = workspace.CurrentSolution.Projects.First().DocumentIds.First()\n\n Dim item = CreateItem(documentId)\n Dim provider = New TestTodoListProvider(item)\n Dim tableManagerProvider = New TestTableManagerProvider()\n\n Dim table = New VisualStudioTodoListTableWorkspaceEventListener.VisualStudioTodoListTable(workspace, provider, tableManagerProvider)\n provider.RaiseTodoListUpdated(workspace)\n\n Dim manager = DirectCast(table.TableManager, TestTableManagerProvider.TestTableManager)\n Dim source = DirectCast(manager.Sources.First(), AbstractRoslynTableDataSource(Of TodoTableItem))\n Dim sinkAndSubscription = manager.Sinks_TestOnly.First()\n\n Dim sink = DirectCast(sinkAndSubscription.Key, TestTableManagerProvider.TestTableManager.TestSink)\n Dim subscription = sinkAndSubscription.Value\n\n Dim factory = TryCast(sink.Entries.First(), TableEntriesFactory(Of TodoTableItem))\n Dim snapshot1 = factory.GetCurrentSnapshot()\n\n factory.OnRefreshed()\n\n Dim snapshot2 = factory.GetCurrentSnapshot()\n\n Assert.Equal(0, snapshot1.IndexOf(0, snapshot2))\n End Using\n End Sub\n\n \n Public Sub TestSnapshotTranslateTo2()\n Using workspace = TestWorkspace.CreateCSharp(String.Empty)\n Dim documentId = workspace.CurrentSolution.Projects.First().DocumentIds.First()\n\n Dim item = CreateItem(documentId)\n Dim provider = New TestTodoListProvider(item)\n Dim tableManagerProvider = New TestTableManagerProvider()\n\n Dim table = New VisualStudioTodoListTableWorkspaceEventListener.VisualStudioTodoListTable(workspace, provider, tableManagerProvider)\n provider.RaiseTodoListUpdated(workspace)\n\n Dim manager = DirectCast(table.TableManager, TestTableManagerProvider.TestTableManager)\n Dim source = DirectCast(manager.Sources.First(), AbstractRoslynTableDataSource(Of TodoTableItem))\n Dim sinkAndSubscription = manager.Sinks_TestOnly.First()\n\n Dim sink = DirectCast(sinkAndSubscription.Key, TestTableManagerProvider.TestTableManager.TestSink)\n Dim subscription = sinkAndSubscription.Value\n\n Dim factory = TryCast(sink.Entries.First(), TableEntriesFactory(Of TodoTableItem))\n Dim snapshot1 = factory.GetCurrentSnapshot()\n\n provider.Items = New TodoItem() {\n New TodoItem(1, \"test2\", documentId, 11, 11, 21, 21, Nothing, \"test2\"),\n New TodoItem(0, \"test\", documentId, 11, 11, 21, 21, Nothing, \"test1\")}\n\n provider.RaiseTodoListUpdated(workspace)\n\n Dim snapshot2 = factory.GetCurrentSnapshot()\n Assert.Equal(1, snapshot1.IndexOf(0, snapshot2))\n End Using\n End Sub\n\n \n Public Sub TestSnapshotTranslateTo3()\n Using workspace = TestWorkspace.CreateCSharp(String.Empty)\n Dim documentId = workspace.CurrentSolution.Projects.First().DocumentIds.First()\n\n Dim item = CreateItem(documentId)\n Dim provider = New TestTodoListProvider(item)\n Dim tableManagerProvider = New TestTableManagerProvider()\n\n Dim table = New VisualStudioTodoListTableWorkspaceEventListener.VisualStudioTodoListTable(workspace, provider, tableManagerProvider)\n provider.RaiseTodoListUpdated(workspace)\n\n Dim manager = DirectCast(table.TableManager, TestTableManagerProvider.TestTableManager)\n Dim source = DirectCast(manager.Sources.First(), AbstractRoslynTableDataSource(Of TodoTableItem))\n Dim sinkAndSubscription = manager.Sinks_TestOnly.First()\n\n Dim sink = DirectCast(sinkAndSubscription.Key, TestTableManagerProvider.TestTableManager.TestSink)\n Dim subscription = sinkAndSubscription.Value\n\n Dim factory = TryCast(sink.Entries.First(), TableEntriesFactory(Of TodoTableItem))\n Dim snapshot1 = factory.GetCurrentSnapshot()\n\n provider.Items = New TodoItem() {\n New TodoItem(1, \"test2\", documentId, 11, 11, 21, 21, Nothing, \"test2\"),\n New TodoItem(0, \"test3\", documentId, 11, 11, 21, 21, Nothing, \"test3\")}\n\n provider.RaiseTodoListUpdated(workspace)\n\n Dim snapshot2 = factory.GetCurrentSnapshot()\n Assert.Equal(-1, snapshot1.IndexOf(0, snapshot2))\n End Using\n End Sub\n\n \n Public Sub TestInvalidEntry()\n Using workspace = TestWorkspace.CreateCSharp(String.Empty)\n Dim documentId = workspace.CurrentSolution.Projects.First().DocumentIds.First()\n\n Dim item = CreateItem(documentId)\n Dim provider = New TestTodoListProvider(item)\n Dim tableManagerProvider = New TestTableManagerProvider()\n\n Dim table = New VisualStudioTodoListTableWorkspaceEventListener.VisualStudioTodoListTable(workspace, provider, tableManagerProvider)\n provider.RaiseTodoListUpdated(workspace)\n\n Dim manager = DirectCast(table.TableManager, TestTableManagerProvider.TestTableManager)\n Dim source = DirectCast(manager.Sources.First(), AbstractRoslynTableDataSource(Of TodoTableItem))\n Dim sinkAndSubscription = manager.Sinks_TestOnly.First()\n\n Dim sink = DirectCast(sinkAndSubscription.Key, TestTableManagerProvider.TestTableManager.TestSink)\n Dim snapshot = sink.Entries.First().GetCurrentSnapshot()\n\n Assert.Equal(1, snapshot.Count)\n\n Dim temp = Nothing\n Assert.False(snapshot.TryGetValue(-1, StandardTableKeyNames.DocumentName, temp))\n Assert.False(snapshot.TryGetValue(1, StandardTableKeyNames.DocumentName, temp))\n Assert.False(snapshot.TryGetValue(0, \"Test\", temp))\n End Using\n End Sub\n\n \n Public Sub TestAggregatedEntries()\n Dim markup = \n \n <\/Document>\n <\/Project>\n \n \n <\/Project>\n <\/Workspace>\n\n Using workspace = TestWorkspace.Create(markup)\n Dim projects = workspace.CurrentSolution.Projects.ToArray()\n\n Dim item1 = CreateItem(projects(0).DocumentIds.First())\n Dim item2 = CreateItem(projects(1).DocumentIds.First())\n\n Dim provider = New TestTodoListProvider()\n Dim tableManagerProvider = New TestTableManagerProvider()\n\n Dim table = New VisualStudioTodoListTableWorkspaceEventListener.VisualStudioTodoListTable(workspace, provider, tableManagerProvider)\n\n provider.Items = New TodoItem() {item1, item2}\n provider.RaiseTodoListUpdated(workspace)\n\n Dim manager = DirectCast(table.TableManager, TestTableManagerProvider.TestTableManager)\n Dim source = DirectCast(manager.Sources.First(), AbstractRoslynTableDataSource(Of TodoTableItem))\n Dim sinkAndSubscription = manager.Sinks_TestOnly.First()\n\n Dim sink = DirectCast(sinkAndSubscription.Key, TestTableManagerProvider.TestTableManager.TestSink)\n Dim snapshot = sink.Entries.First().GetCurrentSnapshot()\n Assert.Equal(1, snapshot.Count)\n\n Dim filename As Object = Nothing\n Assert.True(snapshot.TryGetValue(0, StandardTableKeyNames.DocumentName, filename))\n Assert.Equal(\"test1\", filename)\n\n Dim projectname As Object = Nothing\n Assert.True(snapshot.TryGetValue(0, StandardTableKeyNames.ProjectName, projectname))\n Assert.Equal(\"Proj1, Proj2\", projectname)\n\n Dim projectnames As Object = Nothing\n Assert.True(snapshot.TryGetValue(0, StandardTableKeyNames.ProjectName + \"s\", projectnames))\n Assert.Equal(2, DirectCast(projectnames, String()).Length)\n\n Dim projectguid As Object = Nothing\n Assert.False(snapshot.TryGetValue(0, StandardTableKeyNames.ProjectGuid, projectguid))\n End Using\n End Sub\n\n Private Function CreateItem(documentId As DocumentId) As TodoItem\n Return New TodoItem(0, \"test\", documentId, 10, 10, 20, 20, Nothing, \"test1\")\n End Function\n\n Private Class TestTodoListProvider\n Implements ITodoListProvider\n\n Public Items As TodoItem()\n\n Public Sub New(ParamArray items As TodoItem())\n Me.Items = items\n End Sub\n\n Public Event TodoListUpdated As EventHandler(Of TodoItemsUpdatedArgs) Implements ITodoListProvider.TodoListUpdated\n\n Public Function GetTodoItems(workspace As Workspace, documentId As DocumentId, cancellationToken As CancellationToken) As ImmutableArray(Of TodoItem) Implements ITodoListProvider.GetTodoItems\n Assert.NotNull(workspace)\n Assert.NotNull(documentId)\n\n Return Items.Where(Function(t) t.DocumentId Is documentId).ToImmutableArrayOrEmpty()\n End Function\n\n Public Function GetTodoItemsUpdatedEventArgs(workspace As Workspace, cancellationToken As CancellationToken) As IEnumerable(Of UpdatedEventArgs) Implements ITodoListProvider.GetTodoItemsUpdatedEventArgs\n Return Items.Select(Function(t) New UpdatedEventArgs(Tuple.Create(Me, t.DocumentId), workspace, t.DocumentId.ProjectId, t.DocumentId)).ToImmutableArray()\n End Function\n\n Public Sub RaiseTodoListUpdated(workspace As Workspace)\n Dim map = Items.ToLookup(Function(t) t.DocumentId)\n\n For Each group In map\n RaiseEvent TodoListUpdated(Me, New TodoItemsUpdatedArgs(\n Tuple.Create(Me, group.Key), workspace, workspace.CurrentSolution, group.Key.ProjectId, group.Key, group.ToImmutableArrayOrEmpty()))\n Next\n End Sub\n\n Public Sub RaiseClearTodoListUpdated(workspace As Microsoft.CodeAnalysis.Workspace, documentId As DocumentId)\n RaiseEvent TodoListUpdated(Me, New TodoItemsUpdatedArgs(\n Tuple.Create(Me, documentId), workspace, workspace.CurrentSolution, documentId.ProjectId, documentId, ImmutableArray(Of TodoItem).Empty))\n End Sub\n End Class\n End Class\nEnd Namespace\n","avg_line_length":50.8728179551,"max_line_length":214,"alphanum_fraction":0.6624509804} {"size":158,"ext":"frm","lang":"Visual Basic","max_stars_count":null,"content":"VERSION 5.00\r\nObject = \"{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0\"; \"Comdlg32.ocx\"\r\nObject = \"{3B7C8863-D78F-101B-B9B5-04021C009402}#1.2#0\"; \"RICHTX32.OCX\"","avg_line_length":52.6666666667,"max_line_length":72,"alphanum_fraction":0.7215189873} {"size":2858,"ext":"frm","lang":"Visual Basic","max_stars_count":1.0,"content":"TYPE=VIEW\nquery=select if(isnull(`performance_schema`.`events_waits_summary_by_host_by_event_name`.`HOST`),\\'background\\',`performance_schema`.`events_waits_summary_by_host_by_event_name`.`HOST`) AS `host`,`performance_schema`.`events_waits_summary_by_host_by_event_name`.`EVENT_NAME` AS `event_name`,`performance_schema`.`events_waits_summary_by_host_by_event_name`.`COUNT_STAR` AS `total`,`performance_schema`.`events_waits_summary_by_host_by_event_name`.`SUM_TIMER_WAIT` AS `total_latency`,`performance_schema`.`events_waits_summary_by_host_by_event_name`.`MAX_TIMER_WAIT` AS `max_latency` from `performance_schema`.`events_waits_summary_by_host_by_event_name` where ((`performance_schema`.`events_waits_summary_by_host_by_event_name`.`EVENT_NAME` like \\'wait\/io\/file%\\') and (`performance_schema`.`events_waits_summary_by_host_by_event_name`.`COUNT_STAR` > 0)) order by if(isnull(`performance_schema`.`events_waits_summary_by_host_by_event_name`.`HOST`),\\'background\\',`performance_schema`.`events_waits_summary_by_host_by_event_name`.`HOST`),`performance_schema`.`events_waits_summary_by_host_by_event_name`.`SUM_TIMER_WAIT` desc\nmd5=10769ef5bc6d3c8906e4935b0c87aed6\nupdatable=1\nalgorithm=2\ndefiner_user=mysql.sys\ndefiner_host=localhost\nsuid=0\nwith_check_option=0\ntimestamp=2018-11-06 09:08:56\ncreate-version=1\nsource=SELECT IF(host IS NULL, \\'background\\', host) AS host, event_name, count_star AS total, sum_timer_wait AS total_latency, max_timer_wait AS max_latency FROM performance_schema.events_waits_summary_by_host_by_event_name WHERE event_name LIKE \\'wait\/io\/file%\\' AND count_star > 0 ORDER BY IF(host IS NULL, \\'background\\', host), sum_timer_wait DESC\nclient_cs_name=utf8\nconnection_cl_name=utf8_general_ci\nview_body_utf8=select if(isnull(`performance_schema`.`events_waits_summary_by_host_by_event_name`.`HOST`),\\'background\\',`performance_schema`.`events_waits_summary_by_host_by_event_name`.`HOST`) AS `host`,`performance_schema`.`events_waits_summary_by_host_by_event_name`.`EVENT_NAME` AS `event_name`,`performance_schema`.`events_waits_summary_by_host_by_event_name`.`COUNT_STAR` AS `total`,`performance_schema`.`events_waits_summary_by_host_by_event_name`.`SUM_TIMER_WAIT` AS `total_latency`,`performance_schema`.`events_waits_summary_by_host_by_event_name`.`MAX_TIMER_WAIT` AS `max_latency` from `performance_schema`.`events_waits_summary_by_host_by_event_name` where ((`performance_schema`.`events_waits_summary_by_host_by_event_name`.`EVENT_NAME` like \\'wait\/io\/file%\\') and (`performance_schema`.`events_waits_summary_by_host_by_event_name`.`COUNT_STAR` > 0)) order by if(isnull(`performance_schema`.`events_waits_summary_by_host_by_event_name`.`HOST`),\\'background\\',`performance_schema`.`events_waits_summary_by_host_by_event_name`.`HOST`),`performance_schema`.`events_waits_summary_by_host_by_event_name`.`SUM_TIMER_WAIT` desc\n","avg_line_length":178.625,"max_line_length":1133,"alphanum_fraction":0.8470958712} {"size":10979,"ext":"bas","lang":"Visual Basic","max_stars_count":2.0,"content":"' Copyright (c) 2021 Thomas Hugo Williams\n' License MIT \n' For Colour Maximite 2, MMBasic 5.07\n\nOption Explicit On\nOption Default None\nOption Base InStr(Mm.CmdLine$, \"--base=1\") > 0\n\n#Include \"..\/system.inc\"\n#Include \"..\/array.inc\"\n#Include \"..\/list.inc\"\n#Include \"..\/string.inc\"\n#Include \"..\/file.inc\"\n#Include \"..\/vt100.inc\"\n#Include \"..\/..\/sptest\/unittest.inc\"\n#Include \"..\/crypt.inc\"\n\nConst BASE% = Mm.Info(Option Base)\n\nadd_test(\"test_md5_fmt\")\nadd_test(\"test_md5_given_string\")\nadd_test(\"test_md5_given_long_string\")\nadd_test(\"test_md5_file\")\nadd_test(\"test_xxtea_block_encrypt\")\nadd_test(\"test_xxtea_block_decrypt\")\nadd_test(\"test_xxtea_file\")\nadd_test(\"test_xxtea_file_iv_dependent\")\nadd_test(\"test_xxtea_file_key_dependent\")\n\nrun_tests(Choice(InStr(Mm.CmdLine$, \"--base\"), \"\", \"--base=1\"))\n\nEnd\n\nSub setup_test()\nEnd Sub\n\nSub teardown_test()\nEnd Sub\n\nSub test_md5_fmt()\n Local md5%(array.new%(2))\n Const md5_addr% = Peek(VarAddr md5%())\n Restore data_test_md5_fmt\n Local i%, x%\n For i% = 0 To 15\n Read x%\n Poke Byte md5_addr% + i%, x%\n Next\n\n assert_string_equals(\"0162ab891d5fff001a2fbc93d7f0f2ef\", crypt.md5_fmt$(md5%()))\nEnd Sub\n\ndata_test_md5_fmt:\nData &h01, &h62, &hAB, &h89, &h1D, &h5F, &hFF, &h00\nData &h1A, &h2F, &hBC, &h93, &hD7, &hF0, &hF2, &hEF\n\nSub test_md5_given_string()\n Local filename$, size%, md5_decrypted$, md5_encrypted$\n Local md5%(array.new%(2)), s$\n\n ' Without full-stop\n s$ = \"The quick brown fox jumps over the lazy dog\"\n assert_true(crypt.md5%(Peek(VarAddr s$) + 1, Len(s$), md5%()))\n assert_string_equals(\"9e107d9d372bb6826bd81d3542a419d6\", crypt.md5_fmt$(md5%()))\n\n ' With full-stop\n s$ = \"The quick brown fox jumps over the lazy dog.\"\n assert_true(crypt.md5%(Peek(VarAddr s$) + 1, Len(s$), md5%()))\n assert_string_equals(\"e4d909c290d0fb1ca068ffaddf22cbd0\", crypt.md5_fmt$(md5%()))\n\n Restore data_test_md5\n Do\n Read filename$, size%, md5_decrypted$, md5_encrypted$\n If filename$ = \"END\" Then Exit Do\n If size% > 255 Then Continue Do\n Open file.PROG_DIR$ + \"\/resources\/tst_crypt\/\" + filename$ For Input As #1\n s$ = Input$(255, #1)\n Close #1\n assert_int_equals(size%, Len(s$))\n assert_true(crypt.md5%(Peek(VarAddr s$) + 1, Len(s$), md5%()))\n assert_string_equals(md5_decrypted$, crypt.md5_fmt$(md5%()))\n Loop\nEnd Sub\n\nSub test_md5_given_long_string()\n Local filename$, size%, md5_decrypted$, md5_encrypted$\n Local i%, ls%(100), md5%(array.new%(2)), s$\n\n Restore data_test_md5\n Do\n Read filename$, size%, md5_decrypted$, md5_encrypted$\n If filename$ = \"END\" Then Exit Do\n LongString Clear ls%()\n Open file.PROG_DIR$ + \"\/resources\/tst_crypt\/\" + filename$ For Input As #1\n Do\n s$ = Input$(255, #1)\n LongString Append ls%(), s$\n Loop Until s$ = \"\"\n Close #1\n assert_int_equals(size%, LLen(ls%()))\n assert_true(crypt.md5%(Peek(VarAddr ls%()) + 8, LLen(ls%()), md5%()))\n assert_string_equals(md5_decrypted$, crypt.md5_fmt$(md5%()))\n Loop\nEnd Sub\n\nSub test_md5_file()\n Local i%, filename$, size%, md5_decrypted$, md5_encrypted$, md5%(array.new%(2))\n\n Restore data_test_md5\n Do\n Read filename$, size%, md5_decrypted$, md5_encrypted$\n If filename$ = \"END\" Then Exit Do\n Open file.PROG_DIR$ + \"\/resources\/tst_crypt\/\" + filename$ For Input As #1\n assert_true(crypt.md5_file%(1, md5%()))\n Close #1\n assert_string_equals(md5_decrypted$, crypt.md5_fmt$(md5%()))\n Loop\nEnd Sub\n\ndata_test_md5:\n' Filename, file size, expected unencrypted MD5, expected encrypted MD5\n' Note that the encrypted MD5 is initialisation vector specific.\nData \"empty.txt\", 0,\"d41d8cd98f00b204e9800998ecf8427e\",\"232eeef90183d7ddfeb22aa80c6efa5e\"\nData \"lorem_ipsum_54.txt\", 54,\"e51638c24dbb103f460b70df14939bc5\",\"4d03aaeafd08fb71a8a8a0f8cbaeded2\"\nData \"lorem_ipsum_55.txt\", 55,\"fc10a08df7fafa3871166646609e1c95\",\"38d360aa333133aa39f032416f270a4f\"\nData \"lorem_ipsum_56.txt\", 56,\"572be236390dc0bca92bb5c5999d2290\",\"7a738c8a534947512156a566bac3ecf1\"\nData \"lorem_ipsum_63.txt\", 63,\"5213818ec87e04c44d75b00f79b23110\",\"b9af130d16deb6fbc8d0abdd0807c8e1\"\nData \"lorem_ipsum_64.txt\", 64,\"5819ecacdd8551d108e4fe83be10200e\",\"ad924354452e9d78e1fa487360bbe80f\"\nData \"lorem_ipsum_65.txt\", 65,\"d66eea968b0c65fbb800bc5abb35cb4e\",\"14956694aa4432aed9c07f3c3b774bae\"\nData \"lorem_ipsum_255.txt\",255,\"123b001fc08115b683545c1c4140cc82\",\"fc3e7b587986efc2f83079802e56716d\"\nData \"lorem_ipsum.txt\", 446,\"f90b84824e80384c67922ce9c932ac55\",\"0ffd2be13672cd59da9c06c50d2231a2\"\nData \"END\", 0, \"\"\n\nSub test_xxtea_block_encrypt()\n Local v%(array.new%(10)) ' 80 bytes\n Local v_addr% = Peek(VarAddr v%())\n Local k%(array.new%(2)) ' 16 bytes = 128 bits\n Local expected%, i%\n\n Restore decrypted_values\n read_values(v%(), 20)\n\n assert_true(crypt.xxtea_block%(\"encrypt\", v%(), k%()))\n\n Restore encrypted_values\n For i% = 0 To 19\n Read expected%\n assert_int_equals(expected%, Peek(Word v_addr% + 4 * i%))\n Next\nEnd Sub\n\nSub read_values(v%(), n%)\n Local v_addr% = Peek(VarAddr v%())\n Local i%, x%\n For i% = 0 To n% - 1\n Read x%\n Poke Word v_addr% + 4 * i%, x%\n Next\nEnd Sub\n\nSub dump_values(v%(), n%)\n Local v_addr% = Peek(VarAddr v%())\n Local i%\n For i% = 0 To n% - 1\n If i% Mod 8 = 0 Then Print\n Print Hex$(Peek(Word v_addr% + 4 * i%), 8) \" \";\n Next\nEnd Sub\n\ndecrypted_values:\nData &h00000001, &h00000002, &h00000003, &h00000004, &h00000005, &h00000006, &h00000007, &h00000008\nData &h00000009, &h0000000A, &h0000000B, &h0000000C, &h0000000D, &h0000000E, &h0000000F, &h00000010\nData &h00000011, &h00000012, &h00000013, &h00000014\n\nencrypted_values:\nData &hca16bebe, &hcdc347cb, &h82d7e1c8, &h41ee03b7, &hd749f024, &h96f1570c, &h49f804fa, &h7c0b7b66\nData &h870e0d11, &he5f70f70, &h993e801f, &h520da815, &h7f9f98b2, &h71e3c3c9, &h3cc28a6a, &h6e90cea6\nData &hc605cb14, &he797460a, &h52da71da, &h0b831cd3\n\nSub test_xxtea_block_decrypt()\n Local v%(array.new%(10)) ' 80 bytes\n Local v_addr% = Peek(VarAddr v%())\n Local k%(array.new%(2)) ' 16 bytes = 128 bits\n Local expected%, i%\n\n Restore encrypted_values\n read_values(v%(), 20)\n\n assert_true(crypt.xxtea_block%(\"decrypt\", v%(), k%()))\n\n Restore decrypted_values\n For i% = 0 To 19\n Read expected%\n assert_int_equals(expected%, Peek(Word v_addr% + 4 * i%))\n Next\nEnd Sub\n\nSub test_xxtea_file()\n Local filename$, size%, md5_decrypted$, md5_encrypted$\n Local original_file$, encrypted_file$, decrypted_file$\n Local k%(array.new%(2)) = (17470987, -89397865243)\n Local iv%(array.new%(2)) = (-478912, 123456789)\n Local md5%(array.new%(2))\n\n Restore data_test_md5\n Do\n Read filename$, size%, md5_decrypted$, md5_encrypted$\n If filename$ = \"END\" Then Exit Do\n original_file$ = file.PROG_DIR$ + \"\/resources\/tst_crypt\/\" + filename$\n encrypted_file$ = file.PROG_DIR$ + \"\/tmp\/\" + filename$ + \".encrypted\"\n decrypted_file$ = file.PROG_DIR$ + \"\/tmp\/\" + filename$ + \".decrypted\"\n\n ' Encrypt file.\n Open original_file$ For Input As #1\n Open encrypted_file$ For Output As #2\n assert_true(crypt.xxtea_file%(\"encrypt\", 1, 2, k%(), iv%()))\n Close #1\n Close #2\n\n ' Check MD5 hash of encrypted file.\n Open encrypted_file$ For Input As #1\n assert_true(crypt.md5_file%(1, md5%()))\n Close #1\n assert_string_equals(md5_encrypted$, crypt.md5_fmt$(md5%()))\n\n ' Decrypt file.\n Open encrypted_file$ For Input As #1\n Open decrypted_file$ For Output As #2\n assert_true(crypt.xxtea_file%(\"decrypt\", 1, 2, k%(), iv%()))\n Close #1\n Close #2\n\n ' Check MD5 hash of decrypted file.\n Open decrypted_file$ For Input As #1\n assert_true(crypt.md5_file%(1, md5%()))\n Close #1\n assert_string_equals(md5_decrypted$, crypt.md5_fmt$(md5%()))\n Loop\n\n ' Test that k%() and iv%() haven't changed, they should be constants.\n assert_int_equals(17470987, k%(BASE%))\n assert_int_equals(-89397865243, k%(BASE% + 1))\n assert_int_equals(-478912, iv%(BASE%))\n assert_int_equals(123456789, iv%(BASE% + 1))\nEnd Sub\n\nSub test_xxtea_file_iv_dependent()\n Const filename$ = \"lorem_ipsum.txt\"\n Const original_file$ = file.PROG_DIR$ + \"\/resources\/tst_crypt\/\" + filename$\n Const encrypted_file$ = file.PROG_DIR$ + \"\/tmp\/\" + filename$ + \".iv.encrypted\"\n Const decrypted_file$ = file.PROG_DIR$ + \"\/tmp\/\" + filename$ + \".iv.decrypted\"\n Local k%(array.new%(2)) = (17470987, -89397865243)\n Local md5%(array.new%(2))\n\n ' Different initialisation vector to 'test_xxtea_file'.\n Local iv%(array.new%(2)) = (36, -29)\n Local iv_addr% = Peek(VarAddr iv%())\n\n ' Encrypt file.\n Open original_file$ For Input As #1\n Open encrypted_file$ For Output As #2\n assert_true(crypt.xxtea_file%(\"encrypt\", 1, 2, k%(), iv%()))\n Close #1\n Close #2\n\n ' Check encrypted file begins with initialisation vector.\n Open encrypted_file$ For Input As #1\n Local s$ = Input$(16, #1)\n Close #1\n Local s_addr% = Peek(VarAddr s$)\n Local i%\n For i% = 0 To 15\n assert_hex_equals(Peek(Byte iv_addr% + i%), Peek(Byte s_addr% + i% + 1))\n Next\n\n ' Check MD5 hash of encrypted file - different to value in 'test_xxtea_file'.\n Open encrypted_file$ For Input As #1\n assert_true(crypt.md5_file%(1, md5%()))\n Close #1\n assert_string_equals(\"ffd561e01b16d72c3a927bb653a4c5a6\", crypt.md5_fmt$(md5%()))\n\n ' Decrypt file.\n Open encrypted_file$ For Input As #1\n Open decrypted_file$ For Output As #2\n assert_true(crypt.xxtea_file%(\"decrypt\", 1, 2, k%(), iv%()))\n Close #1\n Close #2\n\n ' Check MD5 hash of decrypted file.\n Open decrypted_file$ For Input As #1\n assert_true(crypt.md5_file%(1, md5%()))\n Close #1\n assert_string_equals(\"f90b84824e80384c67922ce9c932ac55\", crypt.md5_fmt$(md5%()))\nEnd Sub\n\nSub test_xxtea_file_key_dependent()\n Const filename$ = \"lorem_ipsum.txt\"\n Const original_file$ = file.PROG_DIR$ + \"\/resources\/tst_crypt\/\" + filename$\n Const encrypted_file$ = file.PROG_DIR$ + \"\/tmp\/\" + filename$ + \".key.encrypted\"\n Const decrypted_file$ = file.PROG_DIR$ + \"\/tmp\/\" + filename$ + \".key.decrypted\"\n Local iv%(array.new%(2)) = (-478912, 123456789)\n Local md5%(array.new%(2))\n\n ' Different 128-bit key to 'test_xxtea_file'.\n Local k%(array.new%(2)) = (123, 456)\n\n ' Encrypt file.\n Open original_file$ For Input As #1\n Open encrypted_file$ For Output As #2\n assert_true(crypt.xxtea_file%(\"encrypt\", 1, 2, k%(), iv%()))\n Close #1\n Close #2\n\n ' Check MD5 hash of encrypted file - different to value in 'test_xxtea_file'.\n Open encrypted_file$ For Input As #1\n assert_true(crypt.md5_file%(1, md5%()))\n Close #1\n assert_string_equals(\"0e0ff51ca83d22f51f30ada8e81d46bb\", crypt.md5_fmt$(md5%()))\n\n ' Decrypt file.\n Open encrypted_file$ For Input As #1\n Open decrypted_file$ For Output As #2\n assert_true(crypt.xxtea_file%(\"decrypt\", 1, 2, k%(), iv%()))\n Close #1\n Close #2\n\n ' Check MD5 hash of decrypted file.\n Open decrypted_file$ For Input As #1\n assert_true(crypt.md5_file%(1, md5%()))\n Close #1\n assert_string_equals(\"f90b84824e80384c67922ce9c932ac55\", crypt.md5_fmt$(md5%()))\nEnd Sub\n","avg_line_length":32.96996997,"max_line_length":100,"alphanum_fraction":0.6943255306} {"size":5367,"ext":"frx","lang":"Visual Basic","max_stars_count":1828.0,"content":"\ufeff\n\n \n \n \n \n \n <\/ReportTitleBand>\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n <\/DataBand>\n \n \n <\/PageFooterBand>\n <\/ReportPage>\n<\/Report>\n","avg_line_length":137.6153846154,"max_line_length":276,"alphanum_fraction":0.702627166} {"size":3044,"ext":"frm","lang":"Visual Basic","max_stars_count":null,"content":"TYPE=VIEW\nquery=select `processlist`.`thd_id` AS `thd_id`,`processlist`.`conn_id` AS `conn_id`,`processlist`.`user` AS `user`,`processlist`.`db` AS `db`,`processlist`.`command` AS `command`,`processlist`.`state` AS `state`,`processlist`.`time` AS `time`,`processlist`.`current_statement` AS `current_statement`,`processlist`.`statement_latency` AS `statement_latency`,`processlist`.`progress` AS `progress`,`processlist`.`lock_latency` AS `lock_latency`,`processlist`.`rows_examined` AS `rows_examined`,`processlist`.`rows_sent` AS `rows_sent`,`processlist`.`rows_affected` AS `rows_affected`,`processlist`.`tmp_tables` AS `tmp_tables`,`processlist`.`tmp_disk_tables` AS `tmp_disk_tables`,`processlist`.`full_scan` AS `full_scan`,`processlist`.`last_statement` AS `last_statement`,`processlist`.`last_statement_latency` AS `last_statement_latency`,`processlist`.`current_memory` AS `current_memory`,`processlist`.`last_wait` AS `last_wait`,`processlist`.`last_wait_latency` AS `last_wait_latency`,`processlist`.`source` AS `source`,`processlist`.`trx_latency` AS `trx_latency`,`processlist`.`trx_state` AS `trx_state`,`processlist`.`trx_autocommit` AS `trx_autocommit`,`processlist`.`pid` AS `pid`,`processlist`.`program_name` AS `program_name` from `sys`.`processlist` where ((`processlist`.`conn_id` is not null) and (`processlist`.`command` <> \\'Daemon\\'))\nmd5=97370a9a592ae223cb955b6a4424f702\nupdatable=0\nalgorithm=0\ndefiner_user=mysql.sys\ndefiner_host=localhost\nsuid=0\nwith_check_option=0\ntimestamp=2020-11-16 11:01:10\ncreate-version=1\nsource=SELECT * FROM sys.processlist WHERE conn_id IS NOT NULL AND command != \\'Daemon\\'\nclient_cs_name=utf8\nconnection_cl_name=utf8_general_ci\nview_body_utf8=select `processlist`.`thd_id` AS `thd_id`,`processlist`.`conn_id` AS `conn_id`,`processlist`.`user` AS `user`,`processlist`.`db` AS `db`,`processlist`.`command` AS `command`,`processlist`.`state` AS `state`,`processlist`.`time` AS `time`,`processlist`.`current_statement` AS `current_statement`,`processlist`.`statement_latency` AS `statement_latency`,`processlist`.`progress` AS `progress`,`processlist`.`lock_latency` AS `lock_latency`,`processlist`.`rows_examined` AS `rows_examined`,`processlist`.`rows_sent` AS `rows_sent`,`processlist`.`rows_affected` AS `rows_affected`,`processlist`.`tmp_tables` AS `tmp_tables`,`processlist`.`tmp_disk_tables` AS `tmp_disk_tables`,`processlist`.`full_scan` AS `full_scan`,`processlist`.`last_statement` AS `last_statement`,`processlist`.`last_statement_latency` AS `last_statement_latency`,`processlist`.`current_memory` AS `current_memory`,`processlist`.`last_wait` AS `last_wait`,`processlist`.`last_wait_latency` AS `last_wait_latency`,`processlist`.`source` AS `source`,`processlist`.`trx_latency` AS `trx_latency`,`processlist`.`trx_state` AS `trx_state`,`processlist`.`trx_autocommit` AS `trx_autocommit`,`processlist`.`pid` AS `pid`,`processlist`.`program_name` AS `program_name` from `sys`.`processlist` where ((`processlist`.`conn_id` is not null) and (`processlist`.`command` <> \\'Daemon\\'))\n","avg_line_length":190.25,"max_line_length":1358,"alphanum_fraction":0.7723390276} {"size":3006,"ext":"vb","lang":"Visual Basic","max_stars_count":24.0,"content":"'*******************************************************************************************'\n' '\n' Download Free Evaluation Version From: https:\/\/bytescout.com\/download\/web-installer '\n' '\n' Also available as Web API! Get free API Key https:\/\/app.pdf.co\/signup '\n' '\n' Copyright \u00a9 2017-2020 ByteScout, Inc. All rights reserved. '\n' https:\/\/www.bytescout.com '\n' https:\/\/www.pdf.co '\n'*******************************************************************************************'\n\n\r\nImports Bytescout.PDF\r\n\r\n''' \r\n''' This example demonstrates how to submit or reset form.\r\n''' <\/summary>\r\nClass Program\r\n\r\n Shared Sub Main()\r\n\r\n ' Create new document\r\n Dim pdfDocument = New Document()\r\n pdfDocument.RegistrationName = \"demo\"\r\n\t\tpdfDocument.RegistrationKey = \"demo\"\r\n ' Add page\r\n Dim page = New Page(PaperFormat.A4)\r\n pdfDocument.Pages.Add(page)\r\n\r\n ' Create sample form\r\n Dim font = New Font(StandardFonts.Times, 14)\r\n Dim brush = New SolidBrush()\r\n ' EditBox\r\n Dim editBox = New EditBox(20, 20, 100, 25, \"editBox1\")\r\n editBox.Text = \"editBox1\"\r\n page.Annotations.Add(editBox)\r\n ' CheckBox\r\n Dim checkBox = New CheckBox(20, 60, 15, 15, \"checkBox1\")\r\n page.Annotations.Add(checkBox)\r\n page.Canvas.DrawString(\"CheckBox\", font, brush, 45, 60)\r\n\r\n ' Add Submit button\r\n Dim submitButton = New PushButton(20, 120, 80, 25, \"buttonSubmit\")\r\n submitButton.Caption = \"Submit\"\r\n page.Annotations.Add(submitButton)\r\n ' Add action\r\n Dim submitAction = New SubmitFormAction(New Uri(\"http:\/\/login.live.com\"))\r\n submitAction.SubmitFormat = SubmitDataFormat.HTML\r\n submitAction.SubmitMethod = SubmitMethod.Get\r\n submitAction.Fields.Add(editBox)\r\n submitAction.Fields.Add(checkBox)\r\n submitButton.OnActivated = submitAction\r\n\r\n ' Add Reset button\r\n Dim resetButton = New PushButton(120, 120, 80, 25, \"butonReset\")\r\n resetButton.Caption = \"Reset\"\r\n page.Annotations.Add(resetButton)\r\n ' Add action\r\n Dim resetAction = New ResetFormAction()\r\n resetAction.Fields.Add(editBox)\r\n resetAction.Fields.Add(checkBox)\r\n resetButton.OnActivated = resetAction\r\n\r\n ' Save document to file\r\n pdfDocument.Save(\"result.pdf\")\r\n\r\n ' Cleanup \r\n\t\tpdfDocument.Dispose()\r\n\r\n ' Open document in default PDF viewer app\r\n Process.Start(\"result.pdf\")\r\n\r\n End Sub\r\n\r\nEnd Class\r\n","avg_line_length":39.5526315789,"max_line_length":93,"alphanum_fraction":0.4903526281} {"size":125459,"ext":"vb","lang":"Visual Basic","max_stars_count":6.0,"content":"\ufeff' Copyright (c) Microsoft Open Technologies, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.\n\nImports System.IO\nImports Microsoft.CodeAnalysis\nImports Microsoft.CodeAnalysis.SpecialType\nImports Microsoft.CodeAnalysis.Test.Utilities\nImports Microsoft.CodeAnalysis.Text\nImports Microsoft.CodeAnalysis.VisualBasic\nImports Microsoft.CodeAnalysis.VisualBasic.OverloadResolution\nImports Microsoft.CodeAnalysis.VisualBasic.Symbols\nImports Microsoft.CodeAnalysis.VisualBasic.Syntax\nImports Microsoft.CodeAnalysis.VisualBasic.UnitTests.Emit\n\nImports Roslyn.Test.Utilities\n\nNamespace Microsoft.CodeAnalysis.VisualBasic.UnitTests.Semantics\n\n Public Class UserDefinedConversions\n Inherits BasicTestBase\n\n \n Public Sub SimpleTest1()\n Dim compilationDef =\n\n \nOption Strict Off\n\nImports System\n\nModule Module1\n\n Class B2\n Public f As Integer\n\n Public Sub New(x As Integer)\n f = x\n End Sub\n\n Shared Widening Operator CType(x As Integer) As B2\n Return New B2(x)\n End Operator\n End Class\n\n Sub Main()\n Dim x as Integer = 11\n Dim b2 As B2 = x 'BIND1:\"x\"\n System.Console.WriteLine(b2.f)\n System.Console.WriteLine(CType(x,B2).f) 'BIND2:\"CType(x,B2)\"\n End Sub\nEnd Module\n <\/file>\n<\/compilation>\n\n Dim verifier = CompileAndVerify(compilationDef,\n expectedOutput:=\n )\n\n Dim model = GetSemanticModel(verifier.Compilation, \"a.vb\")\n\n Dim x_node As IdentifierNameSyntax = CompilationUtils.FindBindingText(Of IdentifierNameSyntax)(verifier.Compilation, \"a.vb\", 1)\n Dim typeInfo = model.GetTypeInfo(x_node)\n\n Assert.Equal(\"System.Int32\", typeInfo.Type.ToTestDisplayString())\n Assert.Equal(\"Module1.B2\", typeInfo.ConvertedType.ToTestDisplayString())\n\n Dim conv = model.GetConversion(x_node)\n Assert.True(conv.IsUserDefined)\n Assert.True(conv.IsWidening)\n Assert.Equal(\"Function Module1.B2.op_Implicit(x As System.Int32) As Module1.B2\", conv.Method.ToTestDisplayString())\n\n Dim ctype_node As ExpressionSyntax = CompilationUtils.FindBindingText(Of ExpressionSyntax)(verifier.Compilation, \"a.vb\", 2)\n Dim symbolInfo = model.GetSymbolInfo(ctype_node)\n Assert.Equal(\"Function Module1.B2.op_Implicit(x As System.Int32) As Module1.B2\", symbolInfo.Symbol.ToTestDisplayString())\n End Sub\n\n \n Public Sub SimpleTest2()\n Dim compilationDef =\n\n \nOption Strict Off\n\nImports System\n\nModule Module1\n\n Class B2\n Public f As Integer\n\n Public Sub New(x As Integer)\n f = x\n End Sub\n\n Shared Widening Operator CType(x As Integer) As B2\n Return New B2(x)\n End Operator\n End Class\n\n Sub Main()\n Dim x as Byte = 11\n Dim b2 As B2 = x 'BIND1:\"x\"\n System.Console.WriteLine(b2.f)\n End Sub\nEnd Module\n <\/file>\n<\/compilation>\n\n Dim verifier = CompileAndVerify(compilationDef,\n expectedOutput:=\n )\n\n Dim model = GetSemanticModel(verifier.Compilation, \"a.vb\")\n\n Dim x_node As IdentifierNameSyntax = CompilationUtils.FindBindingText(Of IdentifierNameSyntax)(verifier.Compilation, \"a.vb\", 1)\n Dim typeInfo = model.GetTypeInfo(x_node)\n\n Assert.Equal(\"System.Byte\", typeInfo.Type.ToTestDisplayString())\n Assert.Equal(\"Module1.B2\", typeInfo.ConvertedType.ToTestDisplayString())\n\n Dim conv = model.GetConversion(x_node)\n Assert.True(conv.IsUserDefined)\n Assert.True(conv.IsWidening)\n Assert.Equal(\"Function Module1.B2.op_Implicit(x As System.Int32) As Module1.B2\", conv.Method.ToTestDisplayString())\n End Sub\n\n \n Public Sub SimpleTest3()\n Dim compilationDef =\n\n \nImports System\n\nModule Module1\n\n Class B2\n Shared Widening Operator CType(x As Integer) As B2\n Return New B3(x)\n End Operator\n End Class\n\n Class B3\n Inherits B2\n\n Public f As Integer\n\n Public Sub New(x As Integer)\n f = x\n End Sub\n End Class\n\n Sub Main()\n Dim x as Integer = 11\n Dim b2 As B3 = x 'BIND1:\"x\"\n System.Console.WriteLine(b2.f)\n End Sub\nEnd Module\n <\/file>\n<\/compilation>\n\n Dim verifier = CompileAndVerify(compilationDef, options:=TestOptions.ReleaseExe.WithOptionStrict(OptionStrict.Custom),\n expectedOutput:=\n )\n\n Dim model = GetSemanticModel(verifier.Compilation, \"a.vb\")\n\n Dim x_node As IdentifierNameSyntax = CompilationUtils.FindBindingText(Of IdentifierNameSyntax)(verifier.Compilation, \"a.vb\", 1)\n Dim typeInfo = model.GetTypeInfo(x_node)\n\n Assert.Equal(\"System.Int32\", typeInfo.Type.ToTestDisplayString())\n Assert.Equal(\"Module1.B3\", typeInfo.ConvertedType.ToTestDisplayString())\n\n Dim conv = model.GetConversion(x_node)\n Assert.True(conv.IsUserDefined)\n Assert.True(conv.IsNarrowing)\n Assert.Equal(\"Function Module1.B2.op_Implicit(x As System.Int32) As Module1.B2\", conv.Method.ToTestDisplayString())\n\n CompilationUtils.AssertTheseDiagnostics(verifier.Compilation,\n\nBC42016: Implicit conversion from 'Integer' to 'Module1.B3'.\n Dim b2 As B3 = x 'BIND1:\"x\"\n ~\n<\/expected>)\n\n End Sub\n\n \n Public Sub SimpleTest4()\n Dim compilationDef =\n\n \nImports System\n\nModule Module1\n\n Class B2\n Shared Widening Operator CType(x As Integer) As B2\n Return New B3(x)\n End Operator\n End Class\n\n Class B3\n Inherits B2\n\n Public f As Integer\n\n Public Sub New(x As Integer)\n f = x\n End Sub\n End Class\n\n Sub Main()\n Dim x as Byte = 11\n Dim b2 As B3 = x 'BIND1:\"x\"\n System.Console.WriteLine(b2.f)\n End Sub\nEnd Module\n <\/file>\n<\/compilation>\n\n Dim verifier = CompileAndVerify(compilationDef, options:=TestOptions.ReleaseExe.WithOptionStrict(OptionStrict.Custom),\n expectedOutput:=\n )\n\n Dim model = GetSemanticModel(verifier.Compilation, \"a.vb\")\n\n Dim x_node As IdentifierNameSyntax = CompilationUtils.FindBindingText(Of IdentifierNameSyntax)(verifier.Compilation, \"a.vb\", 1)\n Dim typeInfo = model.GetTypeInfo(x_node)\n\n Assert.Equal(\"System.Byte\", typeInfo.Type.ToTestDisplayString())\n Assert.Equal(\"Module1.B3\", typeInfo.ConvertedType.ToTestDisplayString())\n\n Dim conv = model.GetConversion(x_node)\n Assert.True(conv.IsUserDefined)\n Assert.True(conv.IsNarrowing)\n Assert.Equal(\"Function Module1.B2.op_Implicit(x As System.Int32) As Module1.B2\", conv.Method.ToTestDisplayString())\n\n CompilationUtils.AssertTheseDiagnostics(verifier.Compilation,\n\nBC42016: Implicit conversion from 'Byte' to 'Module1.B3'.\n Dim b2 As B3 = x 'BIND1:\"x\"\n ~\n<\/expected>)\n\n End Sub\n\n \n Public Sub Genericity1()\n Dim compilationDef =\n\n \nImports System\n\nModule Module1\n\n Class C1(Of T)\n End Class\n\n Class C2(Of T, S)\n Inherits C1(Of S)\n\n Shared Shadows Widening Operator CType(x As C1(Of T)) As C2(Of T, S)\n System.Console.WriteLine(\"{0}.CType(x As {1}) As {2}\", GetType(C2(Of T, S)), GetType(C1(Of T)), GetType(C2(Of T, S)))\n Return Nothing\n End Operator\n End Class\n\n Sub Main()\n Dim x As New C1(Of Byte)\n Dim y As C2(Of Byte, Integer) = x\n End Sub\nEnd Module\n <\/file>\n<\/compilation>\n\n Dim verifier = CompileAndVerify(compilationDef, options:=TestOptions.ReleaseExe.WithOptionStrict(OptionStrict.Custom),\n expectedOutput:=\n )\n End Sub\n\n \n Public Sub Genericity2()\n Dim compilationDef =\n\n \nImports System\n\nModule Module1\n\n Class C1(Of T)\n Overloads Shared Widening Operator CType(x As C1(Of T)) As C2(Of Byte, Integer)\n System.Console.WriteLine(\"{0}.CType(x As {1}) As {2}\", GetType(C1(Of T)), GetType(C1(Of T)), GetType(C2(Of Byte, Integer)))\n Return Nothing\n End Operator\n End Class\n\n Class C2(Of T, S)\n Inherits C1(Of S)\n\n Shared Shadows Widening Operator CType(x As C1(Of T)) As C2(Of T, S)\n System.Console.WriteLine(\"{0}.CType(x As {1}) As {2}\", GetType(C2(Of T, S)), GetType(C1(Of T)), GetType(C2(Of T, S)))\n Return Nothing\n End Operator\n End Class\n\n Sub Main()\n Dim x As New C1(Of Byte)\n Dim y As C2(Of Byte, Integer) = x\n End Sub\nEnd Module\n <\/file>\n<\/compilation>\n\n Dim verifier = CompileAndVerify(compilationDef, options:=TestOptions.ReleaseExe.WithOptionStrict(OptionStrict.Custom),\n expectedOutput:=\n )\n End Sub\n\n \n Public Sub Genericity3()\n Dim compilationDef =\n\n \nImports System\n\nModule Module1\n\n Class C1(Of T)\n End Class\n\n Class C2(Of T, S)\n Inherits C1(Of S)\n\n Shared Shadows Widening Operator CType(x As C2(Of T, S)) As C1(Of T)\n System.Console.WriteLine(\"{0}.CType(x As {2}) As {1}\", GetType(C2(Of T, S)), GetType(C1(Of T)), GetType(C2(Of T, S)))\n Return Nothing\n End Operator\n End Class\n\n Sub Main()\n Dim x As New C2(Of Byte, Integer)\n Dim y As C1(Of Byte) = x\n End Sub\nEnd Module\n <\/file>\n<\/compilation>\n\n Dim verifier = CompileAndVerify(compilationDef, options:=TestOptions.ReleaseExe.WithOptionStrict(OptionStrict.Custom),\n expectedOutput:=\n )\n End Sub\n\n \n Public Sub Genericity4()\n Dim compilationDef =\n\n \nImports System\n\nModule Module1\n\n Class C1(Of T)\n Overloads Shared Widening Operator CType(x As C2(Of Byte, Integer)) As C1(Of T)\n System.Console.WriteLine(\"{0}.CType(x As {2}) As {1}\", GetType(C1(Of T)), GetType(C1(Of T)), GetType(C2(Of Byte, Integer)))\n Return Nothing\n End Operator\n End Class\n\n Class C2(Of T, S)\n Inherits C1(Of S)\n\n Shared Shadows Widening Operator CType(x As C2(Of T, S)) As C1(Of T)\n System.Console.WriteLine(\"{0}.CType(x As {2}) As {1}\", GetType(C2(Of T, S)), GetType(C1(Of T)), GetType(C2(Of T, S)))\n Return Nothing\n End Operator\n End Class\n\n Sub Main()\n Dim x As New C2(Of Byte, Integer)\n Dim y As C1(Of Byte) = x\n End Sub\nEnd Module\n <\/file>\n<\/compilation>\n\n Dim verifier = CompileAndVerify(compilationDef, options:=TestOptions.ReleaseExe.WithOptionStrict(OptionStrict.Custom),\n expectedOutput:=\n )\n End Sub\n\n \n Public Sub Genericity5()\n Dim compilationDef =\n\n \nImports System\n\nModule Module1\n\n Class C1(Of T)\n End Class\n\n Class C2(Of T, S)\n\n Shared Shadows Widening Operator CType(x As C2(Of T, S)) As C1(Of T)\n System.Console.WriteLine(\"{0}.CType(x As C2(Of T, S)) As C1(Of T)\", GetType(C2(Of T, S)))\n Return Nothing\n End Operator\n\n Shared Shadows Widening Operator CType(x As C2(Of T, S)) As C1(Of S)\n System.Console.WriteLine(\"{0}.CType(x As C2(Of T, S)) As C1(Of S)\", GetType(C2(Of T, S)))\n Return Nothing\n End Operator\n\n End Class\n\n Sub Main()\n Dim x As C1(Of Byte) = New C2(Of Byte, Byte)\n Dim y As C1(Of Byte) = New C2(Of Byte, Integer)\n Dim z As C1(Of Byte) = New C2(Of Integer, Byte)\n Dim u As C1(Of Integer) = New C2(Of Byte, Integer)\n Dim v As C1(Of Integer) = New C2(Of Integer, Byte)\n End Sub\nEnd Module\n <\/file>\n<\/compilation>\n\n Dim compilation = CreateCompilationWithMscorlibAndVBRuntime(compilationDef)\n\n CompilationUtils.AssertTheseDiagnostics(compilation,\n\nBC30311: Value of type 'Module1.C2(Of Byte, Byte)' cannot be converted to 'Module1.C1(Of Byte)'.\n Dim x As C1(Of Byte) = New C2(Of Byte, Byte)\n ~~~~~~~~~~~~~~~~~~~~~\n<\/expected>)\n End Sub\n\n \n Public Sub Genericity5_1()\n Dim compilationDef =\n\n \nImports System\n\nModule Module1\n\n Class C1(Of T)\n End Class\n\n Class C2(Of T, S)\n\n Shared Shadows Widening Operator CType(x As C2(Of T, S)) As C1(Of T)\n System.Console.WriteLine(\"{0}.CType(x As C2(Of T, S)) As C1(Of T)\", GetType(C2(Of T, S)))\n Return Nothing\n End Operator\n\n Shared Shadows Widening Operator CType(x As C2(Of T, S)) As C1(Of S)\n System.Console.WriteLine(\"{0}.CType(x As C2(Of T, S)) As C1(Of S)\", GetType(C2(Of T, S)))\n Return Nothing\n End Operator\n\n End Class\n\n Sub Main()\n Dim y As C1(Of Byte) = New C2(Of Byte, Integer)\n Dim z As C1(Of Byte) = New C2(Of Integer, Byte)\n Dim u As C1(Of Integer) = New C2(Of Byte, Integer)\n Dim v As C1(Of Integer) = New C2(Of Integer, Byte)\n End Sub\nEnd Module\n <\/file>\n<\/compilation>\n\n Dim verifier = CompileAndVerify(compilationDef, options:=TestOptions.ReleaseExe.WithOptionStrict(OptionStrict.Custom),\n expectedOutput:=\n )\n End Sub\n\n \n Public Sub Genericity6()\n Dim compilationDef =\n\n \nImports System\n\nModule Module1\n\n Class C1(Of T)\n End Class\n\n Class C2(Of T, S)\n\n Shared Shadows Widening Operator CType(x As C2(Of T, S)) As C1(Of Byte)\n System.Console.WriteLine(\"{0}.CType(x As C2(Of T, S)) As C1(Of Byte)\", GetType(C2(Of T, S)))\n Return Nothing\n End Operator\n\n Shared Shadows Widening Operator CType(x As C2(Of T, S)) As C1(Of T)\n System.Console.WriteLine(\"{0}.CType(x As C2(Of T, S)) As C1(Of T)\", GetType(C2(Of T, S)))\n Return Nothing\n End Operator\n\n Shared Shadows Widening Operator CType(x As C2(Of T, S)) As C1(Of S)\n System.Console.WriteLine(\"{0}.CType(x As C2(Of T, S)) As C1(Of S)\", GetType(C2(Of T, S)))\n Return Nothing\n End Operator\n\n End Class\n\n Sub Main()\n Dim x As C1(Of Byte) = New C2(Of Byte, Byte)\n Dim y As C1(Of Byte) = New C2(Of Byte, Integer)\n Dim z As C1(Of Byte) = New C2(Of Integer, Byte)\n Dim u As C1(Of Integer) = New C2(Of Byte, Integer)\n Dim v As C1(Of Integer) = New C2(Of Integer, Byte)\n End Sub\nEnd Module\n <\/file>\n<\/compilation>\n\n Dim verifier = CompileAndVerify(compilationDef, options:=TestOptions.ReleaseExe.WithOptionStrict(OptionStrict.Custom),\n expectedOutput:=\n )\n End Sub\n\n \n Public Sub Genericity7()\n Dim compilationDef =\n\n \nImports System\n\nModule Module1\n\n Class C1(Of T)\n End Class\n\n Class C2(Of T, S)\n\n Shared Shadows Widening Operator CType(x As C2(Of T, S)) As C1(Of T)\n System.Console.WriteLine(\"{0}.CType(x As C2(Of T, S)) As C1(Of T)\", GetType(C2(Of T, S)))\n Return Nothing\n End Operator\n\n Shared Shadows Widening Operator CType(x As C2(Of T, S)) As C1(Of Byte)\n System.Console.WriteLine(\"{0}.CType(x As C2(Of T, S)) As C1(Of Byte)\", GetType(C2(Of T, S)))\n Return Nothing\n End Operator\n\n Shared Shadows Widening Operator CType(x As C2(Of T, S)) As C1(Of S)\n System.Console.WriteLine(\"{0}.CType(x As C2(Of T, S)) As C1(Of S)\", GetType(C2(Of T, S)))\n Return Nothing\n End Operator\n\n End Class\n\n Sub Main()\n Dim x As C1(Of Byte) = New C2(Of Byte, Byte)\n Dim y As C1(Of Byte) = New C2(Of Byte, Integer)\n Dim z As C1(Of Byte) = New C2(Of Integer, Byte)\n Dim u As C1(Of Integer) = New C2(Of Byte, Integer)\n Dim v As C1(Of Integer) = New C2(Of Integer, Byte)\n End Sub\nEnd Module\n <\/file>\n<\/compilation>\n\n Dim verifier = CompileAndVerify(compilationDef, options:=TestOptions.ReleaseExe.WithOptionStrict(OptionStrict.Custom),\n expectedOutput:=\n )\n End Sub\n\n \n Public Sub Genericity8()\n Dim compilationDef =\n\n \nImports System\n\nModule Module1\n\n Class C1(Of T)\n End Class\n\n Class C2(Of T, S)\n\n Shared Shadows Widening Operator CType(x As C2(Of T, S)) As C1(Of T)\n System.Console.WriteLine(\"{0}.CType(x As C2(Of T, S)) As C1(Of T)\", GetType(C2(Of T, S)))\n Return Nothing\n End Operator\n\n Shared Shadows Widening Operator CType(x As C2(Of T, S)) As C1(Of S)\n System.Console.WriteLine(\"{0}.CType(x As C2(Of T, S)) As C1(Of S)\", GetType(C2(Of T, S)))\n Return Nothing\n End Operator\n\n Shared Shadows Widening Operator CType(x As C2(Of T, S)) As C1(Of Byte)\n System.Console.WriteLine(\"{0}.CType(x As C2(Of T, S)) As C1(Of Byte)\", GetType(C2(Of T, S)))\n Return Nothing\n End Operator\n\n End Class\n\n Sub Main()\n Dim x As C1(Of Byte) = New C2(Of Byte, Byte)\n Dim y As C1(Of Byte) = New C2(Of Byte, Integer)\n Dim z As C1(Of Byte) = New C2(Of Integer, Byte)\n Dim u As C1(Of Integer) = New C2(Of Byte, Integer)\n Dim v As C1(Of Integer) = New C2(Of Integer, Byte)\n End Sub\nEnd Module\n <\/file>\n<\/compilation>\n\n Dim verifier = CompileAndVerify(compilationDef, options:=TestOptions.ReleaseExe.WithOptionStrict(OptionStrict.Custom),\n expectedOutput:=\n )\n End Sub\n\n \n Public Sub Genericity9()\n Dim compilationDef =\n\n \nImports System\n\nModule Module1\n\n Class C1(Of T)\n End Class\n\n Class C2(Of T, S)\n\n Shared Shadows Widening Operator CType(x As C1(Of Byte)) As C2(Of T, S)\n System.Console.WriteLine(\"{0}.CType(x As C1(Of Byte)) As C2(Of T, S)\", GetType(C2(Of T, S)))\n Return Nothing\n End Operator\n\n Shared Shadows Widening Operator CType(x As C1(Of T)) As C2(Of T, S)\n System.Console.WriteLine(\"{0}.CType(x As C1(Of T)) As C2(Of T, S)\", GetType(C2(Of T, S)))\n Return Nothing\n End Operator\n\n Shared Shadows Widening Operator CType(x As C1(Of S)) As C2(Of T, S)\n System.Console.WriteLine(\"{0}.CType(x As C1(Of S)) As C2(Of T, S)\", GetType(C2(Of T, S)))\n Return Nothing\n End Operator\n\n End Class\n\n Sub Main()\n Dim x As C2(Of Byte, Byte) = New C1(Of Byte)\n Dim y As C2(Of Byte, Integer) = New C1(Of Byte)\n Dim z As C2(Of Integer, Byte) = New C1(Of Byte)\n Dim u As C2(Of Byte, Integer) = New C1(Of Integer)\n Dim v As C2(Of Integer, Byte) = New C1(Of Integer)\n End Sub\nEnd Module\n <\/file>\n<\/compilation>\n\n Dim verifier = CompileAndVerify(compilationDef, options:=TestOptions.ReleaseExe.WithOptionStrict(OptionStrict.Custom),\n expectedOutput:=\n )\n End Sub\n\n \n Public Sub Genericity10()\n Dim compilationDef =\n\n \nImports System\n\nModule Module1\n\n Class C2(Of T, S)\n\n Shared Shadows Widening Operator CType(x As C2(Of S, T)) As C2(Of T, S)\n Return Nothing\n End Operator\n\n Shared Shadows Widening Operator CType(x As C2(Of Integer, Byte)) As C2(Of T, S)\n Return Nothing\n End Operator\n\n Shared Shadows Widening Operator CType(x As C2(Of T, S)) As C2(Of S, T)\n Return Nothing\n End Operator\n\n Shared Shadows Widening Operator CType(x As C2(Of T, S)) As C2(Of Byte, Integer)\n Return Nothing\n End Operator\n\n End Class\n\n Sub Main()\n Dim x As C2(Of Byte, Integer) = New C2(Of Integer, Byte)\n End Sub\nEnd Module\n <\/file>\n<\/compilation>\n\n Dim compilation = CreateCompilationWithMscorlibAndVBRuntime(compilationDef)\n\n CompilationUtils.AssertTheseDiagnostics(compilation,\n\nBC30311: Value of type 'Module1.C2(Of Integer, Byte)' cannot be converted to 'Module1.C2(Of Byte, Integer)'.\n Dim x As C2(Of Byte, Integer) = New C2(Of Integer, Byte)\n ~~~~~~~~~~~~~~~~~~~~~~~~\n<\/expected>)\n End Sub\n\n \n Public Sub Genericity11()\n Dim compilationDef =\n\n \nImports System\n\nModule Module1\n\n Class C1\n End Class\n\n Class C2(Of T, S)\n\n Shared Shadows Widening Operator CType(x As C2(Of T, S)) As C1\n System.Console.WriteLine(\"CType(x As C2(Of T, S)) As C1\")\n Return Nothing\n End Operator\n\n Shared Shadows Widening Operator CType(x As C1) As C2(Of T, S)\n System.Console.WriteLine(\"CType(x As C1) As C2(Of T, S)\")\n Return Nothing\n End Operator\n End Class\n\n Sub Main()\n Dim x As C1 = New C2(Of Integer, Integer)\n Dim y As C2(Of Integer, Integer) = New C1\n End Sub\nEnd Module\n <\/file>\n<\/compilation>\n\n Dim verifier = CompileAndVerify(compilationDef, options:=TestOptions.ReleaseExe.WithOptionStrict(OptionStrict.Custom),\n expectedOutput:=\n )\n End Sub\n\n \n Public Sub Genericity12()\n Dim compilationDef =\n\n \nImports System\n\nModule Module1\n\n Class C1\n Shared Shadows Widening Operator CType(x As C2(Of Integer, Integer)) As C1\n System.Console.WriteLine(\"CType(x As C2(Of Integer, Integer)) As C1\")\n Return Nothing\n End Operator\n\n Shared Shadows Widening Operator CType(x As C1) As C2(Of Integer, Integer)\n System.Console.WriteLine(\"CType(x As C1) As C2(Of Integer, Integer)\")\n Return Nothing\n End Operator\n End Class\n\n Class C2(Of T, S)\n\n Shared Shadows Widening Operator CType(x As C2(Of T, S)) As C1\n System.Console.WriteLine(\"CType(x As C2(Of T, S)) As C1\")\n Return Nothing\n End Operator\n\n Shared Shadows Widening Operator CType(x As C1) As C2(Of T, S)\n System.Console.WriteLine(\"CType(x As C1) As C2(Of T, S)\")\n Return Nothing\n End Operator\n End Class\n\n Sub Main()\n Dim x As C1 = New C2(Of Integer, Integer)\n Dim y As C2(Of Integer, Integer) = New C1\n End Sub\nEnd Module\n <\/file>\n<\/compilation>\n\n Dim verifier = CompileAndVerify(compilationDef, options:=TestOptions.ReleaseExe.WithOptionStrict(OptionStrict.Custom),\n expectedOutput:=\n )\n End Sub\n\n \n Public Sub Genericity13()\n Dim compilationDef =\n\n \nImports System\n\nModule Module1\n\n Class C1\n Shared Shadows Widening Operator CType(x As C2) As C1\n Return Nothing\n End Operator\n End Class\n\n Class C2\n Shared Shadows Widening Operator CType(x As C2) As C1\n Return Nothing\n End Operator\n End Class\n\n Sub Main()\n Dim x As C1 = New C2\n End Sub\nEnd Module\n <\/file>\n<\/compilation>\n\n Dim compilation = CreateCompilationWithMscorlibAndVBRuntime(compilationDef)\n\n CompilationUtils.AssertTheseDiagnostics(compilation,\n\nBC30311: Value of type 'Module1.C2' cannot be converted to 'Module1.C1'.\n Dim x As C1 = New C2\n ~~~~~~\n<\/expected>)\n End Sub\n\n \n Public Sub Genericity14()\n Dim compilationDef =\n\n \nImports System\n\nModule Module1\n\n Class C1\n Shared Shadows Narrowing Operator CType(x As C2) As C1\n Return Nothing\n End Operator\n End Class\n\n Class C2\n Shared Shadows Narrowing Operator CType(x As C2) As C1\n Return Nothing\n End Operator\n End Class\n\n Sub Main()\n Dim x As C1 = New C2\n End Sub\nEnd Module\n <\/file>\n<\/compilation>\n\n Dim compilation = CreateCompilationWithMscorlibAndVBRuntime(compilationDef)\n\n CompilationUtils.AssertTheseDiagnostics(compilation,\n\nBC30311: Value of type 'Module1.C2' cannot be converted to 'Module1.C1'.\n Dim x As C1 = New C2\n ~~~~~~\n<\/expected>)\n End Sub\n\n \n Public Sub Genericity15()\n Dim compilationDef =\n\n \nImports System\n\nModule Module1\n\n Class C2(Of T, S)\n\n Shared Shadows Narrowing Operator CType(x As C2(Of S, T)) As C2(Of T, S)\n Return Nothing\n End Operator\n\n Shared Shadows Narrowing Operator CType(x As C2(Of Integer, Byte)) As C2(Of T, S)\n Return Nothing\n End Operator\n\n Shared Shadows Narrowing Operator CType(x As C2(Of T, S)) As C2(Of S, T)\n Return Nothing\n End Operator\n\n Shared Shadows Narrowing Operator CType(x As C2(Of T, S)) As C2(Of Byte, Integer)\n Return Nothing\n End Operator\n\n End Class\n\n Sub Main()\n Dim x As C2(Of Byte, Integer) = New C2(Of Integer, Byte)\n End Sub\nEnd Module\n <\/file>\n<\/compilation>\n\n Dim compilation = CreateCompilationWithMscorlibAndVBRuntime(compilationDef)\n\n CompilationUtils.AssertTheseDiagnostics(compilation,\n\nBC30311: Value of type 'Module1.C2(Of Integer, Byte)' cannot be converted to 'Module1.C2(Of Byte, Integer)'.\n Dim x As C2(Of Byte, Integer) = New C2(Of Integer, Byte)\n ~~~~~~~~~~~~~~~~~~~~~~~~\n<\/expected>)\n End Sub\n\n \n Public Sub Shadowing1()\n Dim compilationDef =\n\n \nImports System\n\nModule Module1\n\n Class C1\n Shared Shadows Widening Operator CType(x As C1) As C3\n System.Console.WriteLine(\"CType(x As C1) As C3\")\n Return Nothing\n End Operator\n End Class\n\n Class C2\n Inherits C1\n\n Shared Shadows Narrowing Operator CType(x As C2) As C3\n System.Console.WriteLine(\"CType(x As C2) As C3\")\n Return Nothing\n End Operator\n End Class\n\n Class C3\n End Class\n\n Sub Main()\n Dim x As C3 = New C2\n End Sub\nEnd Module\n <\/file>\n<\/compilation>\n\n Dim verifier = CompileAndVerify(compilationDef, options:=TestOptions.ReleaseExe.WithOptionStrict(OptionStrict.Custom),\n expectedOutput:=\n )\n End Sub\n\n \n Public Sub Shadowing2()\n Dim compilationDef =\n\n \nImports System\n\nModule Module1\n\n Class C1\n Shared Shadows Widening Operator CType(x As C1) As C3\n System.Console.WriteLine(\"CType(x As C1) As C3\")\n Return Nothing\n End Operator\n End Class\n\n Class C2\n Inherits C1\n\n Overloads Shared Narrowing Operator CType(x As C2) As C3\n System.Console.WriteLine(\"CType(x As C2) As C3\")\n Return Nothing\n End Operator\n End Class\n\n Class C3\n End Class\n\n Sub Main()\n Dim x As C3 = New C2\n End Sub\nEnd Module\n <\/file>\n<\/compilation>\n\n Dim verifier = CompileAndVerify(compilationDef, options:=TestOptions.ReleaseExe.WithOptionStrict(OptionStrict.Custom),\n expectedOutput:=\n )\n End Sub\n\n \n Public Sub Shadowing3()\n Dim compilationDef =\n\n \nImports System\n\nModule Module1\n\n Class C1\n Overloads Shared Widening Operator CType(x As C4) As C1\n System.Console.WriteLine(\"CType(x As C4) As C1\")\n Return Nothing\n End Operator\n End Class\n\n Class C2\n Inherits C1\n\n Shared Shadows Narrowing Operator CType(x As C3) As C2\n System.Console.WriteLine(\"CType(x As C3) As C2\")\n Return Nothing\n End Operator\n End Class\n\n Class C3\n End Class\n\n Class C4\n Inherits C3\n End Class\n\n Class C5\n Inherits C4\n End Class\n\n Sub Main()\n Dim c4 As New C5()\n Dim x As C2 = c4\n End Sub\nEnd Module\n <\/file>\n<\/compilation>\n\n Dim verifier = CompileAndVerify(compilationDef, options:=TestOptions.ReleaseExe.WithOptionStrict(OptionStrict.Custom),\n expectedOutput:=\n )\n End Sub\n\n \n Public Sub Shadowing4()\n Dim compilationDef =\n\n \nImports System\n\nModule Module1\n\n Class C1\n Overloads Shared Widening Operator CType(x As C4) As C1\n System.Console.WriteLine(\"CType(x As C4) As C1\")\n Return Nothing\n End Operator\n End Class\n\n Class C2\n Inherits C1\n\n Overloads Shared Narrowing Operator CType(x As C3) As C2\n System.Console.WriteLine(\"CType(x As C3) As C2\")\n Return Nothing\n End Operator\n End Class\n\n Class C3\n End Class\n\n Class C4\n Inherits C3\n End Class\n\n Class C5\n Inherits C4\n End Class\n\n Sub Main()\n Dim c4 As New C5()\n Dim x As C2 = c4\n End Sub\nEnd Module\n <\/file>\n<\/compilation>\n\n Dim compilation = CreateCompilationWithMscorlibAndVBRuntime(compilationDef)\n\n CompilationUtils.AssertTheseDiagnostics(compilation,\n\nBC30311: Value of type 'Module1.C5' cannot be converted to 'Module1.C2'.\n Dim x As C2 = c4\n ~~\n<\/expected>)\n End Sub\n\n \n Public Sub Shadowing5()\n Dim compilationDef =\n\n \nImports System\n\nModule Module1\n\n Class C0\n Overloads Shared Widening Operator CType(x As C4) As C0\n System.Console.WriteLine(\"CType(x As C4) As C1\")\n Return Nothing\n End Operator\n End Class\n\n\n Class C1\n Inherits C0\n\n Public op_Implicit As Integer\n Public op_Explicit As Integer\n End Class\n\n Class C2\n Inherits C1\n\n Overloads Shared Narrowing Operator CType(x As C3) As C2\n System.Console.WriteLine(\"CType(x As C3) As C2\")\n Return Nothing\n End Operator\n End Class\n\n Class C3\n End Class\n\n Class C4\n Inherits C3\n End Class\n\n Class C5\n Inherits C4\n End Class\n\n Sub Main()\n Dim c4 As New C5()\n Dim x As C2 = c4\n End Sub\nEnd Module\n <\/file>\n<\/compilation>\n\n Dim compilation = CreateCompilationWithMscorlibAndVBRuntime(compilationDef)\n\n CompilationUtils.AssertTheseDiagnostics(compilation,\n\nBC40014: variable 'op_Implicit' conflicts with a member implicitly declared for operator 'CType' in the base class 'C0' and should be declared 'Shadows'.\n Public op_Implicit As Integer\n ~~~~~~~~~~~\nBC40012: operator 'CType' implicitly declares 'op_Explicit', which conflicts with a member in the base class 'C1', and so the operator should be declared 'Shadows'.\n Overloads Shared Narrowing Operator CType(x As C3) As C2\n ~~~~~\nBC30311: Value of type 'Module1.C5' cannot be converted to 'Module1.C2'.\n Dim x As C2 = c4\n ~~\n<\/expected>)\n End Sub\n\n \n Public Sub Shadowing6()\n Dim compilationDef =\n\n \nImports System\n\nModule Module1\n\n Class C0\n Overloads Shared Widening Operator CType(x As C4) As C0\n System.Console.WriteLine(\"CType(x As C4) As C1\")\n Return Nothing\n End Operator\n End Class\n\n\n Class C1\n Inherits C0\n\n Public Sub op_Implicit()\n End Sub\n\n Public Sub op_Explicit()\n End Sub\n End Class\n\n Class C2\n Inherits C1\n\n Overloads Shared Narrowing Operator CType(x As C3) As C2\n System.Console.WriteLine(\"CType(x As C3) As C2\")\n Return Nothing\n End Operator\n End Class\n\n Class C3\n End Class\n\n Class C4\n Inherits C3\n End Class\n\n Class C5\n Inherits C4\n End Class\n\n Sub Main()\n Dim c4 As New C5()\n Dim x As C2 = c4\n End Sub\nEnd Module\n <\/file>\n<\/compilation>\n\n Dim compilation = CreateCompilationWithMscorlibAndVBRuntime(compilationDef)\n\n CompilationUtils.AssertTheseDiagnostics(compilation,\n\nBC40014: sub 'op_Implicit' conflicts with a member implicitly declared for operator 'CType' in the base class 'C0' and should be declared 'Shadows'.\n Public Sub op_Implicit()\n ~~~~~~~~~~~\nBC40012: operator 'CType' implicitly declares 'op_Explicit', which conflicts with a member in the base class 'C1', and so the operator should be declared 'Shadows'.\n Overloads Shared Narrowing Operator CType(x As C3) As C2\n ~~~~~\nBC30311: Value of type 'Module1.C5' cannot be converted to 'Module1.C2'.\n Dim x As C2 = c4\n ~~\n<\/expected>)\n End Sub\n\n \n Public Sub Widening1()\n Dim compilationDef =\n\n \nImports System\n\nModule Module1\n\n Class C1\n\n Overloads Shared Widening Operator CType(x As C3) As C1\n Return Nothing\n End Operator\n\n End Class\n\n Class C2\n Inherits C1\n\n End Class\n\n Class C3\n End Class\n\n Class C4\n Inherits C3\n\n Overloads Shared Widening Operator CType(x As C4) As C2\n Return Nothing\n End Operator\n End Class\n\n Sub Main()\n Dim x As C1 = New C4()\n End Sub\nEnd Module\n <\/file>\n<\/compilation>\n\n Dim compilation = CreateCompilationWithMscorlibAndVBRuntime(compilationDef)\n\n CompilationUtils.AssertTheseDiagnostics(compilation,\n\nBC30311: Value of type 'Module1.C4' cannot be converted to 'Module1.C1'.\n Dim x As C1 = New C4()\n ~~~~~~~~\n<\/expected>)\n End Sub\n\n \n Public Sub Narrowing1()\n Dim compilationDef =\n\n \nImports System\n\nModule Module1\n\n Class C1\n\n Overloads Shared Narrowing Operator CType(x As C3) As C1\n Return Nothing\n End Operator\n\n End Class\n\n Class C2\n Inherits C1\n\n End Class\n\n Class C3\n End Class\n\n Class C4\n Inherits C3\n\n Overloads Shared Narrowing Operator CType(x As C4) As C2\n Return Nothing\n End Operator\n End Class\n\n Sub Main()\n Dim x As C1 = New C4()\n End Sub\nEnd Module\n <\/file>\n<\/compilation>\n\n Dim compilation = CreateCompilationWithMscorlibAndVBRuntime(compilationDef)\n\n CompilationUtils.AssertTheseDiagnostics(compilation,\n\nBC30311: Value of type 'Module1.C4' cannot be converted to 'Module1.C1'.\n Dim x As C1 = New C4()\n ~~~~~~~~\n<\/expected>)\n End Sub\n\n \n Public Sub Widening2()\n Dim compilationDef =\n\n \nImports System\n\nModule Module1\n\n Class C1\n End Class\n\n Class C2\n Overloads Shared Widening Operator CType(x As C2) As C1\n Return Nothing\n End Operator\n End Class\n\n Class C3\n Inherits C2\n Overloads Shared Widening Operator CType(x As C3) As C1\n Return Nothing\n End Operator\n End Class\n\n Class C4\n Inherits C3\n\n Overloads Shared Widening Operator CType(x As C4) As C1\n System.Console.WriteLine(\"CType(x As C4) As C1\")\n Return Nothing\n End Operator\n End Class\n\n Class C5\n Inherits C4\n End Class\n\n Sub Main()\n Dim x As C1 = New C5()\n End Sub\nEnd Module\n <\/file>\n<\/compilation>\n\n Dim verifier = CompileAndVerify(compilationDef, options:=TestOptions.ReleaseExe.WithOptionStrict(OptionStrict.Custom),\n expectedOutput:=\n )\n\n CompilationUtils.AssertTheseDiagnostics(verifier.Compilation,\n\n<\/expected>)\n End Sub\n\n \n Public Sub Narrowing2()\n Dim compilationDef =\n\n \nImports System\n\nModule Module1\n\n Class C1\n End Class\n\n Class C2\n Overloads Shared Narrowing Operator CType(x As C2) As C1\n Return Nothing\n End Operator\n End Class\n\n Class C3\n Inherits C2\n Overloads Shared Narrowing Operator CType(x As C3) As C1\n Return Nothing\n End Operator\n End Class\n\n Class C4\n Inherits C3\n\n Overloads Shared Narrowing Operator CType(x As C4) As C1\n System.Console.WriteLine(\"CType(x As C4) As C1\")\n Return Nothing\n End Operator\n End Class\n\n Class C5\n Inherits C4\n End Class\n\n Sub Main()\n Dim x As C1 = New C5()\n End Sub\nEnd Module\n <\/file>\n<\/compilation>\n\n Dim verifier = CompileAndVerify(compilationDef, options:=TestOptions.ReleaseExe.WithOptionStrict(OptionStrict.Custom),\n expectedOutput:=\n )\n\n CompilationUtils.AssertTheseDiagnostics(verifier.Compilation,\n\nBC42016: Implicit conversion from 'Module1.C5' to 'Module1.C1'.\n Dim x As C1 = New C5()\n ~~~~~~~~\n<\/expected>)\n End Sub\n\n \n Public Sub Widening3()\n Dim compilationDef =\n\n \nImports System\n\nModule Module1\n\n Class C0\n Overloads Shared Widening Operator CType(x As C0) As C2\n System.Console.WriteLine(\"CType(x As C0) As C2\")\n Return Nothing\n End Operator\n Overloads Shared Widening Operator CType(x As C0) As C3\n Return Nothing\n End Operator\n Overloads Shared Widening Operator CType(x As C0) As C4\n Return Nothing\n End Operator\n End Class\n\n Class C1\n End Class\n\n Class C2\n Inherits C1\n End Class\n\n Class C3\n Inherits C2\n End Class\n\n Class C4\n Inherits C3\n End Class\n\n\n Sub Main()\n Dim x As C1 = New C0()\n End Sub\nEnd Module\n <\/file>\n<\/compilation>\n\n Dim verifier = CompileAndVerify(compilationDef, options:=TestOptions.ReleaseExe.WithOptionStrict(OptionStrict.Custom),\n expectedOutput:=\n )\n\n CompilationUtils.AssertTheseDiagnostics(verifier.Compilation,\n\n<\/expected>)\n End Sub\n\n \n Public Sub Narrowing3()\n Dim compilationDef =\n\n \nImports System\n\nModule Module1\n\n Class C0\n Overloads Shared Narrowing Operator CType(x As C0) As C2\n System.Console.WriteLine(\"CType(x As C0) As C2\")\n Return Nothing\n End Operator\n Overloads Shared Narrowing Operator CType(x As C0) As C3\n Return Nothing\n End Operator\n Overloads Shared Narrowing Operator CType(x As C0) As C4\n Return Nothing\n End Operator\n End Class\n\n Class C1\n End Class\n\n Class C2\n Inherits C1\n End Class\n\n Class C3\n Inherits C2\n End Class\n\n Class C4\n Inherits C3\n End Class\n\n\n Sub Main()\n Dim x As C1 = New C0()\n End Sub\nEnd Module\n <\/file>\n<\/compilation>\n\n Dim verifier = CompileAndVerify(compilationDef, options:=TestOptions.ReleaseExe.WithOptionStrict(OptionStrict.Custom),\n expectedOutput:=\n )\n\n CompilationUtils.AssertTheseDiagnostics(verifier.Compilation,\n\nBC42016: Implicit conversion from 'Module1.C0' to 'Module1.C1'.\n Dim x As C1 = New C0()\n ~~~~~~~~\n<\/expected>)\n End Sub\n\n \n Public Sub Widening4()\n Dim compilationDef =\n\n \nImports System\n\nModule Module1\n\n Class C0\n Overloads Shared Widening Operator CType(x As Long) As C0\n Return Nothing\n End Operator\n Overloads Shared Widening Operator CType(x As Integer) As C0\n Return Nothing\n End Operator\n Overloads Shared Widening Operator CType(x As UInteger) As C0\n Return Nothing\n End Operator\n End Class\n\n\n Sub Main()\n Dim y As Byte = 1\n Dim x As C0 = y\n End Sub\nEnd Module\n <\/file>\n<\/compilation>\n\n Dim compilation = CreateCompilationWithMscorlibAndVBRuntime(compilationDef)\n\n CompilationUtils.AssertTheseDiagnostics(compilation,\n\nBC30311: Value of type 'Byte' cannot be converted to 'Module1.C0'.\n Dim x As C0 = y\n ~\n<\/expected>)\n End Sub\n\n \n Public Sub Narrowing4()\n Dim compilationDef =\n\n \nImports System\n\nModule Module1\n\n Class C0\n Overloads Shared Narrowing Operator CType(x As Long) As C0\n Return Nothing\n End Operator\n Overloads Shared Narrowing Operator CType(x As Integer) As C0\n Return Nothing\n End Operator\n Overloads Shared Narrowing Operator CType(x As UInteger) As C0\n Return Nothing\n End Operator\n End Class\n\n\n Sub Main()\n Dim y As Byte = 1\n Dim x As C0 = y\n End Sub\nEnd Module\n <\/file>\n<\/compilation>\n\n Dim compilation = CreateCompilationWithMscorlibAndVBRuntime(compilationDef)\n\n CompilationUtils.AssertTheseDiagnostics(compilation,\n\nBC30311: Value of type 'Byte' cannot be converted to 'Module1.C0'.\n Dim x As C0 = y\n ~\n<\/expected>)\n End Sub\n\n \n Public Sub Widening5()\n Dim compilationDef =\n\n \nImports System\n\nModule Module1\n\n Class C0\n Overloads Shared Widening Operator CType(x As C0) As Short\n Return Nothing\n End Operator\n Overloads Shared Widening Operator CType(x As C0) As Integer\n Return Nothing\n End Operator\n Overloads Shared Widening Operator CType(x As C0) As UInteger\n Return Nothing\n End Operator\n End Class\n\n Sub Main()\n Dim y As Long = New C0()\n End Sub\nEnd Module\n <\/file>\n<\/compilation>\n\n Dim compilation = CreateCompilationWithMscorlibAndVBRuntime(compilationDef)\n\n CompilationUtils.AssertTheseDiagnostics(compilation,\n\nBC30311: Value of type 'Module1.C0' cannot be converted to 'Long'.\n Dim y As Long = New C0()\n ~~~~~~~~\n<\/expected>)\n End Sub\n\n \n Public Sub Narrowing5()\n Dim compilationDef =\n\n \nImports System\n\nModule Module1\n\n Class C0\n Overloads Shared Narrowing Operator CType(x As C0) As Short\n Return Nothing\n End Operator\n Overloads Shared Narrowing Operator CType(x As C0) As Integer\n Return Nothing\n End Operator\n Overloads Shared Narrowing Operator CType(x As C0) As UInteger\n Return Nothing\n End Operator\n End Class\n\n Sub Main()\n Dim y As Long = New C0()\n End Sub\nEnd Module\n <\/file>\n<\/compilation>\n\n Dim compilation = CreateCompilationWithMscorlibAndVBRuntime(compilationDef)\n\n CompilationUtils.AssertTheseDiagnostics(compilation,\n\nBC30311: Value of type 'Module1.C0' cannot be converted to 'Long'.\n Dim y As Long = New C0()\n ~~~~~~~~\n<\/expected>)\n End Sub\n\n \n Public Sub Widening6()\n Dim compilationDef =\n\n \nImports System\n\nModule Module1\n\n Class C0(Of T, S)\n Overloads Shared Widening Operator CType(x As C0(Of T, S)) As T\n Return Nothing\n End Operator\n Overloads Shared Widening Operator CType(x As C0(Of T, S)) As S\n Return Nothing\n End Operator\n End Class\n\n Sub Main()\n Dim x As Long = New C0(Of Integer, Integer)\n End Sub\nEnd Module\n <\/file>\n<\/compilation>\n\n Dim compilation = CreateCompilationWithMscorlibAndVBRuntime(compilationDef)\n\n CompilationUtils.AssertTheseDiagnostics(compilation,\n\nBC30311: Value of type 'Module1.C0(Of Integer, Integer)' cannot be converted to 'Long'.\n Dim x As Long = New C0(Of Integer, Integer)\n ~~~~~~~~~~~~~~~~~~~~~~~~~~~\n<\/expected>)\n End Sub\n\n \n Public Sub Widening6_2()\n Dim compilationDef =\n\n \nImports System\n\nModule Module1\n\n Class C0(Of T, S)\n Overloads Shared Widening Operator CType(x As C0(Of T, S)) As T\n Return Nothing\n End Operator\n Overloads Shared Widening Operator CType(x As C0(Of T, S)) As S\n Return Nothing\n End Operator\n Overloads Shared Widening Operator CType(x As C0(Of T, S)) As Integer\n System.Console.WriteLine(\"CType(x As C0(Of T, S)) As Integer\")\n Return Nothing\n End Operator\n End Class\n\n Sub Main()\n Dim x As Long = New C0(Of Integer, Integer)\n End Sub\nEnd Module\n <\/file>\n<\/compilation>\n\n Dim verifier = CompileAndVerify(compilationDef, options:=TestOptions.ReleaseExe.WithOptionStrict(OptionStrict.Custom),\n expectedOutput:=\n )\n End Sub\n\n \n Public Sub Narrowing6()\n Dim compilationDef =\n\n \nImports System\n\nModule Module1\n\n Class C0(Of T, S)\n Overloads Shared Narrowing Operator CType(x As C0(Of T, S)) As T\n Return Nothing\n End Operator\n Overloads Shared Narrowing Operator CType(x As C0(Of T, S)) As S\n Return Nothing\n End Operator\n End Class\n\n Sub Main()\n Dim x As Long = New C0(Of Integer, Integer)\n End Sub\nEnd Module\n <\/file>\n<\/compilation>\n\n Dim compilation = CreateCompilationWithMscorlibAndVBRuntime(compilationDef)\n\n CompilationUtils.AssertTheseDiagnostics(compilation,\n\nBC30311: Value of type 'Module1.C0(Of Integer, Integer)' cannot be converted to 'Long'.\n Dim x As Long = New C0(Of Integer, Integer)\n ~~~~~~~~~~~~~~~~~~~~~~~~~~~\n<\/expected>)\n End Sub\n\n \n Public Sub Narrowing6_2()\n Dim compilationDef =\n\n \nImports System\n\nModule Module1\n\n Class C0(Of T, S)\n Overloads Shared Narrowing Operator CType(x As C0(Of T, S)) As T\n Return Nothing\n End Operator\n Overloads Shared Narrowing Operator CType(x As C0(Of T, S)) As S\n Return Nothing\n End Operator\n Overloads Shared Narrowing Operator CType(x As C0(Of T, S)) As Integer\n System.Console.WriteLine(\"CType(x As C0(Of T, S)) As Integer\")\n Return Nothing\n End Operator\n End Class\n\n Sub Main()\n Dim x As Byte = New C0(Of Integer, Integer)\n End Sub\nEnd Module\n <\/file>\n<\/compilation>\n\n Dim verifier = CompileAndVerify(compilationDef, options:=TestOptions.ReleaseExe.WithOptionStrict(OptionStrict.Custom),\n expectedOutput:=\n )\n End Sub\n\n \n Public Sub Widening7()\n Dim compilationDef =\n\n \nImports System\n\nModule Module1\n\n Class C1\n Overloads Shared Narrowing Operator CType(x As C1) As Long\n Return Nothing\n End Operator\n End Class\n\n Class C2\n Inherits C1\n Overloads Shared Widening Operator CType(x As C2) As UInteger\n Return Nothing\n End Operator\n End Class\n\n Class C3\n Inherits C2\n Overloads Shared Widening Operator CType(x As C3) As Integer\n Return Nothing\n End Operator\n End Class\n\n Class C4\n Inherits C3\n End Class\n\n Sub Main()\n Dim x As Long = New C4()\n End Sub\nEnd Module\n <\/file>\n<\/compilation>\n\n Dim compilation = CreateCompilationWithMscorlibAndVBRuntime(compilationDef)\n\n CompilationUtils.AssertTheseDiagnostics(compilation,\n\nBC30311: Value of type 'Module1.C4' cannot be converted to 'Long'.\n Dim x As Long = New C4()\n ~~~~~~~~\n<\/expected>)\n End Sub\n\n \n Public Sub Narrowing7()\n Dim compilationDef =\n\n \nImports System\n\nModule Module1\n\n Class C1\n Overloads Shared Narrowing Operator CType(x As C1) As Long\n Return Nothing\n End Operator\n End Class\n\n Class C2\n Inherits C1\n Overloads Shared Narrowing Operator CType(x As C2) As UInteger\n Return Nothing\n End Operator\n End Class\n\n Class C3\n Inherits C2\n Overloads Shared Narrowing Operator CType(x As C3) As Integer\n Return Nothing\n End Operator\n End Class\n\n Class C4\n Inherits C3\n End Class\n\n Sub Main()\n Dim x As Long = New C4()\n End Sub\nEnd Module\n <\/file>\n<\/compilation>\n\n Dim compilation = CreateCompilationWithMscorlibAndVBRuntime(compilationDef)\n\n CompilationUtils.AssertTheseDiagnostics(compilation,\n\nBC30311: Value of type 'Module1.C4' cannot be converted to 'Long'.\n Dim x As Long = New C4()\n ~~~~~~~~\n<\/expected>)\n End Sub\n\n \n Public Sub Widening8()\n Dim customIL =\n \n\n Dim compilation = CompilationUtils.CreateCompilationWithCustomILSource(\n\n \nModule Program\n Sub Main\n Dim x12 As Object\n\n x12 = CInt(New A4())\n x12 = CByte(New A4())\n x12 = CShort(New A4())\n End Sub\nEnd Module\n <\/file>\n<\/compilation>, customIL.Value, includeVbRuntime:=True, options:=TestOptions.ReleaseExe)\n\n Dim verifier = CompileAndVerify(compilation,\n expectedOutput:=\n )\n End Sub\n\n \n Public Sub Narrowing8_1()\n Dim customIL =\n \n\n Dim compilation = CompilationUtils.CreateCompilationWithCustomILSource(\n\n \nModule Program\n Sub Main\n Dim x12 As Object\n\n x12 = CInt(New A8())\n x12 = CByte(New A8())\n x12 = CShort(New A8())\n\n x12 = CInt(New A9())\n End Sub\nEnd Module\n <\/file>\n<\/compilation>, customIL.Value, includeVbRuntime:=True, options:=TestOptions.ReleaseExe)\n\n Dim verifier = CompileAndVerify(compilation,\n expectedOutput:=\n )\n End Sub\n\n \n Public Sub Narrowing8_2()\n Dim customIL =\n \n\n Dim compilation = CompilationUtils.CreateCompilationWithCustomILSource(\n\n \nModule Program\n Sub Main\n Dim x12 As Object\n\n x12 = CByte(New A9())\n x12 = CShort(New A9())\n End Sub\nEnd Module\n <\/file>\n<\/compilation>, customIL.Value, includeVbRuntime:=True, options:=TestOptions.ReleaseExe)\n\n CompilationUtils.AssertTheseDiagnostics(compilation,\n\nBC30311: Value of type 'A9' cannot be converted to 'Byte'.\n x12 = CByte(New A9())\n ~~~~~~~~\nBC30311: Value of type 'A9' cannot be converted to 'Short'.\n x12 = CShort(New A9())\n ~~~~~~~~\n<\/expected>)\n End Sub\n\n \n Public Sub Widening9()\n Dim customIL =\n \n\n Dim compilation = CompilationUtils.CreateCompilationWithCustomILSource(\n\n \nModule Program\n Sub Main\n Dim x As Byte = New A6()\n End Sub\nEnd Module\n <\/file>\n<\/compilation>, customIL.Value, includeVbRuntime:=True, options:=TestOptions.ReleaseExe)\n\n CompilationUtils.AssertTheseDiagnostics(compilation,\n\nBC30311: Value of type 'A6' cannot be converted to 'Byte'.\n Dim x As Byte = New A6()\n ~~~~~~~~\n<\/expected>)\n End Sub\n\n \n Public Sub Narrowing9()\n Dim customIL =\n \n\n Dim compilation = CompilationUtils.CreateCompilationWithCustomILSource(\n\n \nModule Program\n Sub Main\n Dim x As Byte = New A10()\n End Sub\nEnd Module\n <\/file>\n<\/compilation>, customIL.Value, includeVbRuntime:=True, options:=TestOptions.ReleaseExe)\n\n CompilationUtils.AssertTheseDiagnostics(compilation,\n\nBC30311: Value of type 'A10' cannot be converted to 'Byte'.\n Dim x As Byte = New A10()\n ~~~~~~~~~\n<\/expected>)\n End Sub\n\n \n Public Sub Narrowing10()\n Dim compilationDef =\n\n \nImports System\n\nModule Module1\n\n Class C2\n\n Shared Shadows Narrowing Operator CType(x As Short) As C2\n System.Console.WriteLine(\"CType(x As Short) As C2\")\n Return Nothing\n End Operator\n\n Shared Shadows Narrowing Operator CType(x As Byte) As C2\n System.Console.WriteLine(\"CType(x As Byte) As C2\")\n Return Nothing\n End Operator\n End Class\n\n Sub Main()\n Dim x As Integer = 11\n Dim y As C2 = x\n End Sub\nEnd Module\n <\/file>\n<\/compilation>\n\n Dim verifier = CompileAndVerify(compilationDef, options:=TestOptions.ReleaseExe.WithOptionStrict(OptionStrict.Custom),\n expectedOutput:=\n )\n\n CompilationUtils.AssertTheseDiagnostics(verifier.Compilation,\n\nBC42016: Implicit conversion from 'Integer' to 'Module1.C2'.\n Dim y As C2 = x\n ~\n<\/expected>)\n End Sub\n\n \n Public Sub Narrowing11()\n Dim compilationDef =\n\n \nImports System\n\nModule Module1\n\n Class C2\n\n Shared Shadows Narrowing Operator CType(x As C2) As UInteger\n System.Console.WriteLine(\"CType(x As C2) As UInteger\")\n Return Nothing\n End Operator\n\n Shared Shadows Narrowing Operator CType(x As C2) As Long\n System.Console.WriteLine(\"CType(x As C2) As Long\")\n Return Nothing\n End Operator\n End Class\n\n Sub Main()\n Dim y As Short = New C2()\n End Sub\nEnd Module\n <\/file>\n<\/compilation>\n\n Dim verifier = CompileAndVerify(compilationDef, options:=TestOptions.ReleaseExe.WithOptionStrict(OptionStrict.Custom),\n expectedOutput:=\n )\n\n CompilationUtils.AssertTheseDiagnostics(verifier.Compilation,\n\nBC42016: Implicit conversion from 'Module1.C2' to 'Short'.\n Dim y As Short = New C2()\n ~~~~~~~~\n<\/expected>)\n End Sub\n\n \n Public Sub Narrowing12()\n Dim compilationDef =\n\n \nImports System\n\nModule Module1\n\n Class C1\n Overloads Shared Narrowing Operator CType(x As Integer) As C1\n System.Console.WriteLine(\"CType(x As Integer) As C1\")\n Return Nothing\n End Operator\n\n Overloads Shared Narrowing Operator CType(x As C1) As Short\n Return Nothing\n End Operator\n End Class\n\n Class C2\n Inherits C1\n Overloads Shared Narrowing Operator CType(x As Short) As C2\n System.Console.WriteLine(\"CType(x As Short) As C2\")\n Return Nothing\n End Operator\n\n Overloads Shared Narrowing Operator CType(x As C2) As Byte\n Return Nothing\n End Operator\n End Class\n\n Class C3\n Inherits C2\n End Class\n\n Sub Main()\n Dim x As Byte = 11\n Dim y As C3 = x\n End Sub\nEnd Module\n <\/file>\n<\/compilation>\n\n Dim verifier = CompileAndVerify(compilationDef, options:=TestOptions.ReleaseExe.WithOptionStrict(OptionStrict.Custom),\n expectedOutput:=\n )\n\n CompilationUtils.AssertTheseDiagnostics(verifier.Compilation,\n\nBC42016: Implicit conversion from 'Byte' to 'Module1.C3'.\n Dim y As C3 = x\n ~\n<\/expected>)\n End Sub\n\n \n Public Sub Narrowing13()\n Dim compilationDef =\n\n \nImports System\n\nModule Module1\n\n Class C1\n Overloads Shared Narrowing Operator CType(x As Short) As C1\n System.Console.WriteLine(\"CType(x As Short) As C1\")\n Return Nothing\n End Operator\n\n Overloads Shared Narrowing Operator CType(x As Long) As C1\n System.Console.WriteLine(\"CType(x As Long) As C1\")\n Return Nothing\n End Operator\n End Class\n\n\n Sub Main()\n Dim x As Integer = 11\n Dim y As C1 = x\n End Sub\nEnd Module\n <\/file>\n<\/compilation>\n\n Dim verifier = CompileAndVerify(compilationDef, options:=TestOptions.ReleaseExe.WithOptionStrict(OptionStrict.Custom),\n expectedOutput:=\n )\n End Sub\n\n \n Public Sub Lifting1()\n Dim compilationDef =\n\n \nImports System\n\nModule Module1\n\n Structure D1\n Shared Widening Operator CType(x As D1) As Integer\n System.Console.WriteLine(\"CType(x As D1) As Integer\")\n Return Nothing\n End Operator\n End Structure\n\n\n Sub Main()\n Dim y As D1? = New D1()\n Dim x As Integer? = y 'BIND1:\"y\"\n System.Console.WriteLine(\"-----\")\n y = Nothing\n x = y\n End Sub\nEnd Module\n <\/file>\n<\/compilation>\n\n Dim compilation = CreateCompilationWithMscorlibAndVBRuntime(compilationDef, options:=TestOptions.ReleaseExe)\n\n Dim model = GetSemanticModel(compilation, \"a.vb\")\n\n Dim x_node As IdentifierNameSyntax = CompilationUtils.FindBindingText(Of IdentifierNameSyntax)(compilation, \"a.vb\", 1)\n Dim typeInfo = model.GetTypeInfo(x_node)\n\n Assert.Equal(\"System.Nullable(Of Module1.D1)\", typeInfo.Type.ToTestDisplayString())\n Assert.Equal(\"System.Nullable(Of System.Int32)\", typeInfo.ConvertedType.ToTestDisplayString())\n\n Dim conv = model.GetConversion(x_node)\n Assert.True(conv.IsUserDefined)\n Assert.True(conv.IsWidening)\n Assert.True(conv.IsNullableValueType)\n Assert.Equal(\"Function Module1.D1.op_Implicit(x As Module1.D1) As System.Int32\", conv.Method.ToTestDisplayString())\n\n Dim verifier = CompileAndVerify(compilation,\n expectedOutput:=\n )\n End Sub\n\n \n Public Sub Lifting2()\n Dim compilationDef =\n\n \nImports System\n\nModule Module1\n\n Structure D1\n Shared Widening Operator CType(x As D1) As Integer\n Return Nothing\n End Operator\n Shared Widening Operator CType(x As D1) As UInteger\n Return Nothing\n End Operator\n Shared Narrowing Operator CType(x As D1) As Long\n Return Nothing\n End Operator\n End Structure\n\n\n Sub Main()\n Dim y As D1? = New D1()\n Dim x As Long? = y\n End Sub\nEnd Module\n <\/file>\n<\/compilation>\n\n Dim compilation = CreateCompilationWithMscorlibAndVBRuntime(compilationDef, options:=TestOptions.ReleaseExe)\n\n CompilationUtils.AssertTheseDiagnostics(compilation,\n\nBC30311: Value of type 'Module1.D1?' cannot be converted to 'Long?'.\n Dim x As Long? = y\n ~\n<\/expected>)\n End Sub\n\n \n Public Sub Lifting3()\n Dim compilationDef =\n\n \nImports System\n\nModule Module1\n\n Structure D1\n Shared Narrowing Operator CType(x As D1) As Integer\n System.Console.WriteLine(\"CType(x As D1) As Integer\")\n Return Nothing\n End Operator\n End Structure\n\n\n Sub Main()\n Dim y As D1? = New D1()\n Dim x As Integer? = y 'BIND1:\"y\"\n System.Console.WriteLine(\"-----\")\n y = Nothing\n x = y\n End Sub\nEnd Module\n <\/file>\n<\/compilation>\n\n Dim compilation = CreateCompilationWithMscorlibAndVBRuntime(compilationDef, options:=TestOptions.ReleaseExe.WithOptionStrict(OptionStrict.Custom))\n\n Dim model = GetSemanticModel(compilation, \"a.vb\")\n\n Dim x_node As IdentifierNameSyntax = CompilationUtils.FindBindingText(Of IdentifierNameSyntax)(compilation, \"a.vb\", 1)\n Dim typeInfo = model.GetTypeInfo(x_node)\n\n Assert.Equal(\"System.Nullable(Of Module1.D1)\", typeInfo.Type.ToTestDisplayString())\n Assert.Equal(\"System.Nullable(Of System.Int32)\", typeInfo.ConvertedType.ToTestDisplayString())\n\n Dim conv = model.GetConversion(x_node)\n Assert.True(conv.IsUserDefined)\n Assert.True(conv.IsNarrowing)\n Assert.True(conv.IsNullableValueType)\n Assert.Equal(\"Function Module1.D1.op_Explicit(x As Module1.D1) As System.Int32\", conv.Method.ToTestDisplayString())\n\n Dim verifier = CompileAndVerify(compilation,\n expectedOutput:=\n )\n\n CompilationUtils.AssertTheseDiagnostics(compilation,\n\nBC42016: Implicit conversion from 'Module1.D1?' to 'Integer?'.\n Dim x As Integer? = y 'BIND1:\"y\"\n ~\nBC42016: Implicit conversion from 'Module1.D1?' to 'Integer?'.\n x = y\n ~\n<\/expected>)\n End Sub\n\n \n Public Sub Lifting4()\n Dim compilationDef =\n\n \nImports System\n\nModule Module1\n\n Structure D1\n Shared Widening Operator CType(x As D1?) As Integer\n Return Nothing\n End Operator\n Shared Widening Operator CType(x As D1?) As UInteger\n Return Nothing\n End Operator\n\n Shared Widening Operator CType(x As D1) As Byte?\n Return Nothing\n End Operator\n End Structure\n\n Sub Main()\n Dim y As D1? = New D1()\n Dim x As Byte? = y 'BIND1:\"y\"\n End Sub\nEnd Module\n <\/file>\n<\/compilation>\n\n Dim compilation = CreateCompilationWithMscorlibAndVBRuntime(compilationDef, options:=TestOptions.ReleaseExe)\n\n CompilationUtils.AssertTheseDiagnostics(compilation,\n\nBC30311: Value of type 'Module1.D1?' cannot be converted to 'Byte?'.\n Dim x As Byte? = y 'BIND1:\"y\"\n ~\n<\/expected>)\n End Sub\n\n \n Public Sub Lifting5()\n Dim compilationDef =\n\n \nImports System\n\nModule Module1\n\n Structure D1\n Shared Widening Operator CType(x As D1) As Byte?\n System.Console.WriteLine(\"CType(x As D1) As Byte?\")\n Return Nothing\n End Operator\n End Structure\n\n\n Sub Main()\n Dim y As D1? = New D1()\n Dim x As Byte? = y 'BIND1:\"y\"\n End Sub\nEnd Module\n <\/file>\n<\/compilation>\n\n Dim compilation = CreateCompilationWithMscorlibAndVBRuntime(compilationDef, options:=TestOptions.ReleaseExe.WithOptionStrict(OptionStrict.Custom))\n\n Dim model = GetSemanticModel(compilation, \"a.vb\")\n\n Dim x_node As IdentifierNameSyntax = CompilationUtils.FindBindingText(Of IdentifierNameSyntax)(compilation, \"a.vb\", 1)\n Dim typeInfo = model.GetTypeInfo(x_node)\n\n Assert.Equal(\"System.Nullable(Of Module1.D1)\", typeInfo.Type.ToTestDisplayString())\n Assert.Equal(\"System.Nullable(Of System.Byte)\", typeInfo.ConvertedType.ToTestDisplayString())\n\n Dim conv = model.GetConversion(x_node)\n Assert.True(conv.IsUserDefined)\n Assert.True(conv.IsNarrowing)\n Assert.False(conv.IsNullableValueType)\n Assert.Equal(\"Function Module1.D1.op_Implicit(x As Module1.D1) As System.Nullable(Of System.Byte)\", conv.Method.ToTestDisplayString())\n\n Dim verifier = CompileAndVerify(compilation,\n expectedOutput:=\n )\n\n CompilationUtils.AssertTheseDiagnostics(compilation,\n\nBC42016: Implicit conversion from 'Module1.D1?' to 'Byte?'.\n Dim x As Byte? = y 'BIND1:\"y\"\n ~\n<\/expected>)\n End Sub\n\n \n Public Sub GenericParam()\n Dim compilationDef =\n\n \nImports System\n\nModule Module1\n\n Class C0\n Overloads Shared Narrowing Operator CType(x As C0) As Integer\n System.Console.WriteLine(\"CType(x As C0) As Integer\")\n Return Nothing\n End Operator\n End Class\n\n Class C1(Of T As C0)\n Public Shared Sub Test(x As T)\n Dim y As Integer = x\n End Sub\n End Class\n\n Sub Main()\n C1(Of C0).Test(New C0())\n End Sub\nEnd Module\n <\/file>\n<\/compilation>\n\n Dim verifier = CompileAndVerify(compilationDef, options:=TestOptions.ReleaseExe.WithOptionStrict(OptionStrict.Custom),\n expectedOutput:=\n )\n End Sub\n\n \n Public Sub IntegerOverflow1()\n Dim compilationDef =\n\n <\/file>\n<\/compilation>\n\n Dim compilation = CreateCompilationWithMscorlibAndVBRuntime(compilationDef, options:=TestOptions.ReleaseExe.WithOptionStrict(OptionStrict.Custom).WithOverflowChecks(True))\n\n CompilationUtils.AssertTheseDiagnostics(compilation,\n<\/expected>)\n End Sub\n\n \n Public Sub IntegerOverflow2()\n Dim compilationDef =\n\n <\/file>\n<\/compilation>\n\n Dim verifier = CompileAndVerify(compilationDef, options:=TestOptions.ReleaseExe.WithOptionStrict(OptionStrict.Custom).WithOverflowChecks(True),\n expectedOutput:=\n )\n End Sub\n\n \n Public Sub IntegerOverflow3()\n Dim compilationDef =\n\n <\/file>\n<\/compilation>\n\n Dim compilation = CreateCompilationWithMscorlibAndVBRuntime(compilationDef,\n options:=TestOptions.ReleaseExe.WithOptionStrict(OptionStrict.Custom).WithOverflowChecks(False))\n\n CompilationUtils.AssertTheseDiagnostics(compilation,\n<\/expected>)\n End Sub\n\n \n Public Sub IntegerOverflow4()\n Dim compilationDef =\n\n <\/file>\n<\/compilation>\n\n Dim compilation = CreateCompilationWithMscorlibAndVBRuntime(compilationDef,\n options:=TestOptions.ReleaseExe.WithOptionStrict(OptionStrict.Custom).WithOverflowChecks(False))\n\n CompilationUtils.AssertTheseDiagnostics(compilation,\n<\/expected>)\n End Sub\n\n \n Public Sub IntegerOverflow5()\n Dim compilationDef =\n\n <\/file>\n<\/compilation>\n\n Dim compilation = CreateCompilationWithMscorlibAndVBRuntime(compilationDef,\n options:=TestOptions.ReleaseExe.WithOptionStrict(OptionStrict.Custom).WithOverflowChecks(False))\n\n CompilationUtils.AssertTheseDiagnostics(compilation,\n<\/expected>)\n End Sub\n\n \n Public Sub IntegerOverflow6()\n Dim compilationDef =\n\n <\/file>\n<\/compilation>\n\n Dim verifier = CompileAndVerify(compilationDef, options:=TestOptions.ReleaseExe.WithOptionStrict(OptionStrict.Custom).WithOverflowChecks(False),\n expectedOutput:=\n )\n End Sub\n\n \n Public Sub IntegerOverflow7()\n Dim compilationDef =\n\n <\/file>\n<\/compilation>\n\n Dim compilation = CreateCompilationWithMscorlibAndVBRuntime(compilationDef,\n options:=TestOptions.ReleaseExe.WithOptionStrict(OptionStrict.Custom).WithOverflowChecks(False))\n\n CompilationUtils.AssertTheseDiagnostics(compilation,\n<\/expected>)\n End Sub\n\n \n Public Sub BooleanExpressions0()\n Dim compilationDef =\n\n <\/file>\n<\/compilation>\n\n Dim verifier = CompileAndVerify(compilationDef, options:=TestOptions.ReleaseExe,\n expectedOutput:=\n )\n End Sub\n\n \n Public Sub BooleanExpressions1()\n Dim compilationDef =\n\n <\/file>\n<\/compilation>\n\n Dim verifier = CompileAndVerify(compilationDef, options:=TestOptions.ReleaseExe,\n expectedOutput:=\n )\n End Sub\n\n \n Public Sub BooleanExpressions2()\n Dim compilationDef =\n\n <\/file>\n<\/compilation>\n\n Dim verifier = CompileAndVerify(compilationDef, options:=TestOptions.ReleaseExe.WithOptionStrict(OptionStrict.Custom),\n expectedOutput:=\n )\n\n CompilationUtils.AssertTheseDiagnostics(verifier.Compilation,\n\n<\/expected>)\n\n Dim model = GetSemanticModel(verifier.Compilation, \"a.vb\")\n\n Dim node As ExpressionSyntax = CompilationUtils.FindBindingText(Of ExpressionSyntax)(verifier.Compilation, \"a.vb\", 1)\n Dim typeInfo = model.GetTypeInfo(node)\n\n Assert.Equal(\"Module1.S8\", typeInfo.Type.ToTestDisplayString())\n Assert.Equal(\"System.Nullable(Of System.Boolean)\", typeInfo.ConvertedType.ToTestDisplayString())\n\n Dim conv = model.GetConversion(node)\n Assert.True(conv.IsUserDefined)\n Assert.Equal(\"Function Module1.S8.op_Implicit(x As Module1.S8) As System.Nullable(Of System.Boolean)\", conv.Method.ToTestDisplayString())\n\n Dim symbolInfo = model.GetSymbolInfo(node)\n Assert.Equal(\"x As Module1.S8\", symbolInfo.Symbol.ToTestDisplayString())\n\n End Sub\n\n \n Public Sub BooleanExpressions3()\n Dim compilationDef =\n\n <\/file>\n<\/compilation>\n\n Dim verifier = CompileAndVerify(compilationDef, options:=TestOptions.ReleaseExe.WithOptionStrict(OptionStrict.Custom),\n expectedOutput:=\n )\n\n CompilationUtils.AssertTheseDiagnostics(verifier.Compilation,\n\n<\/expected>)\n\n Dim model = GetSemanticModel(verifier.Compilation, \"a.vb\")\n\n Dim node As ExpressionSyntax = CompilationUtils.FindBindingText(Of ExpressionSyntax)(verifier.Compilation, \"a.vb\", 1)\n Dim typeInfo = model.GetTypeInfo(node)\n\n Assert.Equal(\"Module1.S8\", typeInfo.Type.ToTestDisplayString())\n Assert.Equal(\"Module1.S8\", typeInfo.ConvertedType.ToTestDisplayString())\n Dim conv = model.GetConversion(node)\n Assert.True(conv.IsIdentity)\n Assert.Null(conv.Method)\n\n Dim symbolInfo = model.GetSymbolInfo(node)\n Assert.Equal(\"x As Module1.S8\", symbolInfo.Symbol.ToTestDisplayString())\n End Sub\n\n \n Public Sub BooleanExpressions4()\n Dim compilationDef =\n\n <\/file>\n<\/compilation>\n\n Dim verifier = CompileAndVerify(compilationDef, options:=TestOptions.ReleaseExe.WithOptionStrict(OptionStrict.Custom),\n expectedOutput:=\n )\n\n CompilationUtils.AssertTheseDiagnostics(verifier.Compilation,\n\nBC42016: Implicit conversion from 'Module1.S8' to 'Boolean'.\n If x Then\n ~\n<\/expected>)\n End Sub\n\n \n Public Sub BooleanExpressions5()\n Dim compilationDef =\n\n <\/file>\n<\/compilation>\n\n Dim verifier = CompileAndVerify(compilationDef, options:=TestOptions.ReleaseExe.WithOptionStrict(OptionStrict.Custom),\n expectedOutput:=\n )\n\n CompilationUtils.AssertTheseDiagnostics(verifier.Compilation,\n\n<\/expected>)\n End Sub\n\n \n Public Sub BooleanExpressions6()\n Dim compilationDef =\n\n <\/file>\n<\/compilation>\n\n Dim verifier = CompileAndVerify(compilationDef, options:=TestOptions.ReleaseExe.WithOptionStrict(OptionStrict.Custom),\n expectedOutput:=\n )\n\n CompilationUtils.AssertTheseDiagnostics(verifier.Compilation,\n\nBC42016: Implicit conversion from 'Module1.S8' to 'Boolean?'.\n If x Then\n ~\n<\/expected>)\n End Sub\n\n \n Public Sub BooleanExpressions7()\n Dim compilationDef =\n\n <\/file>\n<\/compilation>\n\n Dim compilation = CreateCompilationWithMscorlibAndVBRuntime(compilationDef, options:=TestOptions.ReleaseExe.WithOptionStrict(OptionStrict.Custom))\n\n Dim verifier = CompileAndVerify(compilation,\n expectedOutput:=\n )\n\n CompilationUtils.AssertTheseDiagnostics(compilation,\n\n<\/expected>)\n\n End Sub\n\n \n Public Sub BooleanExpressions8()\n Dim compilationDef =\n\n <\/file>\n<\/compilation>\n\n Dim compilation = CreateCompilationWithMscorlibAndVBRuntime(compilationDef, options:=TestOptions.ReleaseExe.WithOptionStrict(OptionStrict.Custom))\n\n Dim model = GetSemanticModel(compilation, \"a.vb\")\n Dim x_node As IdentifierNameSyntax = CompilationUtils.FindBindingText(Of IdentifierNameSyntax)(compilation, \"a.vb\", 1)\n Dim typeInfo = model.GetTypeInfo(x_node)\n\n Assert.Equal(\"System.Nullable(Of Module1.S8)\", typeInfo.Type.ToTestDisplayString())\n Assert.Equal(\"System.Nullable(Of System.Boolean)\", typeInfo.ConvertedType.ToTestDisplayString())\n\n Dim conv = model.GetConversion(x_node)\n Assert.True(conv.IsUserDefined)\n Assert.True(conv.IsNarrowing)\n Assert.False(conv.IsNullableValueType)\n Assert.Equal(\"Function Module1.S8.op_Implicit(x As Module1.S8) As System.Nullable(Of System.Boolean)\", conv.Method.ToTestDisplayString())\n\n Dim verifier = CompileAndVerify(compilation,\n expectedOutput:=\n )\n\n CompilationUtils.AssertTheseDiagnostics(compilation,\n\nBC42016: Implicit conversion from 'Module1.S8?' to 'Boolean?'.\n If x Then 'BIND1:\"x\"\n ~\n<\/expected>)\n\n End Sub\n\n \n Public Sub BooleanExpressions9()\n Dim compilationDef =\n\n <\/file>\n<\/compilation>\n\n Dim compilation = CreateCompilationWithMscorlibAndVBRuntime(compilationDef, options:=TestOptions.ReleaseExe.WithOptionStrict(OptionStrict.Custom))\n\n Dim model = GetSemanticModel(compilation, \"a.vb\")\n Dim x_node As IdentifierNameSyntax = CompilationUtils.FindBindingText(Of IdentifierNameSyntax)(compilation, \"a.vb\", 1)\n Dim typeInfo = model.GetTypeInfo(x_node)\n\n Assert.Equal(\"System.Nullable(Of Module1.S8)\", typeInfo.Type.ToTestDisplayString())\n Assert.Equal(\"System.Nullable(Of System.Boolean)\", typeInfo.ConvertedType.ToTestDisplayString())\n\n Dim conv = model.GetConversion(x_node)\n Assert.True(conv.IsUserDefined)\n Assert.True(conv.IsNarrowing)\n Assert.True(conv.IsNullableValueType)\n Assert.Equal(\"Function Module1.S8.op_Explicit(x As Module1.S8) As System.Boolean\", conv.Method.ToTestDisplayString())\n\n Dim verifier = CompileAndVerify(compilation,\n expectedOutput:=\n )\n\n CompilationUtils.AssertTheseDiagnostics(compilation,\n\nBC42016: Implicit conversion from 'Module1.S8?' to 'Boolean?'.\n If x Then 'BIND1:\"x\"\n ~\nBC42016: Implicit conversion from 'Module1.S8?' to 'Boolean?'.\n If x Then \n ~\n<\/expected>)\n\n End Sub\n\n \n Public Sub BooleanExpressions10()\n Dim compilationDef =\n\n <\/file>\n<\/compilation>\n\n Dim compilation = CreateCompilationWithMscorlibAndVBRuntime(compilationDef, options:=TestOptions.ReleaseExe.WithOptionStrict(OptionStrict.Custom))\n\n Dim verifier = CompileAndVerify(compilation,\n expectedOutput:=\n )\n\n CompilationUtils.AssertTheseDiagnostics(compilation,\n\n<\/expected>)\n\n End Sub\n\n \n Public Sub BooleanExpressions11()\n Dim compilationDef =\n\n <\/file>\n<\/compilation>\n\n Dim compilation = CreateCompilationWithMscorlibAndVBRuntime(compilationDef, options:=TestOptions.ReleaseExe.WithOptionStrict(OptionStrict.Custom))\n\n Dim verifier = CompileAndVerify(compilation,\n expectedOutput:=\n )\n End Sub\n\n \n Public Sub BooleanExpressions12()\n Dim compilationDef =\n\n <\/file>\n<\/compilation>\n\n Dim compilation = CreateCompilationWithMscorlibAndVBRuntime(compilationDef, options:=TestOptions.ReleaseExe.WithOptionStrict(OptionStrict.Custom))\n\n Dim verifier = CompileAndVerify(compilation,\n expectedOutput:=\n )\n\n CompilationUtils.AssertTheseDiagnostics(compilation,\n\n<\/expected>)\n\n End Sub\n\n \n Public Sub BooleanExpressions13()\n Dim compilationDef =\n\n <\/file>\n<\/compilation>\n\n Dim compilation = CreateCompilationWithMscorlibAndVBRuntime(compilationDef, options:=TestOptions.ReleaseExe.WithOptionStrict(OptionStrict.Custom))\n\n Dim verifier = CompileAndVerify(compilation,\n expectedOutput:=\n )\n End Sub\n\n \n Public Sub BooleanExpressions14()\n Dim compilationDef =\n\n <\/file>\n<\/compilation>\n\n Dim compilation = CreateCompilationWithMscorlibAndVBRuntime(compilationDef, options:=TestOptions.ReleaseExe.WithOptionStrict(OptionStrict.Custom))\n\n CompilationUtils.AssertTheseDiagnostics(compilation,\n\nBC30311: Value of type 'Module1.S8?' cannot be converted to 'Boolean'.\n If x Then 'BIND1:\"x\"\n ~\n<\/expected>)\n End Sub\n\n \n Public Sub ParamArrayConversion()\n Dim compilationDef =\n\n <\/file>\n<\/compilation>\n\n Dim verifier = CompileAndVerify(compilationDef, options:=TestOptions.ReleaseExe.WithOptionStrict(OptionStrict.Custom),\n expectedOutput:=\n )\n\n verifier.VerifyIL(\"Module1.Main\",\n )\n\n CompilationUtils.AssertTheseDiagnostics(verifier.Compilation,\n\n<\/expected>)\n End Sub\n\n \n Public Sub Bug13172()\n Dim compilationDef =\n\n <\/file>\n<\/compilation>\n\n Dim verifier = CompileAndVerify(compilationDef, options:=TestOptions.ReleaseExe.WithOptionStrict(OptionStrict.Custom),\n expectedOutput:=\n )\n\n End Sub\n\n#Region \"Regressions\"\n\n \n Public Sub NoReturnInOperatorBody()\n Dim compilationDef =\n\n \nImports System\n\nFriend Module GenOLConv04mod\n Class A\n Public Shared result As String\n Public Shared Narrowing Operator CType(ByVal x As A) As Integer\n result = x.ToString.Length\n End Operator\n\n Public Shared Operator -(x As A) As Integer\n End Operator ' A2\n End Class\n\n Class B\n Public Shared Narrowing Operator CType(ByVal x As A) As B\n End Operator ' B\n\n Public Shared Operator -(x As B) As B\n End Operator ' B2\n End Class\n\n Class C(Of T)\n Public Shared Narrowing Operator CType(ByVal x As C(Of T)) As T\n End Operator ' C\n Public Shared Operator -(x As C(Of T)) As T\n End Operator ' C2\n End Class\n\n Class D\n Public Shared Narrowing Operator CType(ByVal x As D) As System.Guid\n End Operator ' D\n Public Shared Operator -(x As D) As System.Guid\n End Operator ' D2\n End Class\n\n Sub Main()\n Dim x1 As New A()\n Dim str = CType(x1, Integer)\n Console.WriteLine(str)\n End Sub\nEnd Module\n\nNamespace Program\n Class C6\n Public Shared Narrowing Operator CType(ByVal arg As C6) As Exception\n End Operator ' C6\n End Class\nEnd Namespace\n\n <\/file>\n<\/compilation>\n\n Dim compilation = CreateCompilationWithMscorlibAndVBRuntime(compilationDef, options:=TestOptions.ReleaseExe)\n\n CompileAndVerify(compilation, expectedOutput:=\"0\")\n\n AssertTheseDiagnostics(compilation,\n\nBC42354: Operator 'CType' doesn't return a value on all code paths. Are you missing a 'Return' statement?\n End Operator\n ~~~~~~~~~~~~\nBC42354: Operator '-' doesn't return a value on all code paths. Are you missing a 'Return' statement?\n End Operator ' A2\n ~~~~~~~~~~~~\nBC42106: Operator 'CType' doesn't return a value on all code paths. A null reference exception could occur at run time when the result is used.\n End Operator ' B\n ~~~~~~~~~~~~\nBC42106: Operator '-' doesn't return a value on all code paths. A null reference exception could occur at run time when the result is used.\n End Operator ' B2\n ~~~~~~~~~~~~\nBC42106: Operator 'CType' doesn't return a value on all code paths. A null reference exception could occur at run time when the result is used.\n End Operator ' C6\n ~~~~~~~~~~~~\n<\/expected>)\n End Sub\n\n#End Region\n End Class\n\nEnd Namespace\n","avg_line_length":27.603740374,"max_line_length":183,"alphanum_fraction":0.6084696993} {"size":1134,"ext":"vb","lang":"Visual Basic","max_stars_count":null,"content":"\ufeffImports System\nImports System.Reflection\nImports System.Runtime.InteropServices\n\n' General Information about an assembly is controlled through the following \n' set of attributes. Change these attribute values to modify the information\n' associated with an assembly.\n\n' Review the values of the assembly attributes\n\n\n\n\n\n\n\n\n\n\n'The following GUID is for the ID of the typelib if this project is exposed to COM\n\n\n' Version information for an assembly consists of the following four values:\n'\n' Major Version\n' Minor Version \n' Build Number\n' Revision\n'\n' You can specify all the values or you can default the Build and Revision Numbers \n' by using the '*' as shown below:\n' \n\n\n\n","avg_line_length":31.5,"max_line_length":83,"alphanum_fraction":0.7530864198} {"size":2725,"ext":"frm","lang":"Visual Basic","max_stars_count":2.0,"content":"TYPE=VIEW\nquery=select if(isnull(`performance_schema`.`events_stages_summary_by_user_by_event_name`.`USER`),\\'background\\',`performance_schema`.`events_stages_summary_by_user_by_event_name`.`USER`) AS `user`,`performance_schema`.`events_stages_summary_by_user_by_event_name`.`EVENT_NAME` AS `event_name`,`performance_schema`.`events_stages_summary_by_user_by_event_name`.`COUNT_STAR` AS `total`,`sys`.`format_time`(`performance_schema`.`events_stages_summary_by_user_by_event_name`.`SUM_TIMER_WAIT`) AS `total_latency`,`sys`.`format_time`(`performance_schema`.`events_stages_summary_by_user_by_event_name`.`AVG_TIMER_WAIT`) AS `avg_latency` from `performance_schema`.`events_stages_summary_by_user_by_event_name` where (`performance_schema`.`events_stages_summary_by_user_by_event_name`.`SUM_TIMER_WAIT` <> 0) order by if(isnull(`performance_schema`.`events_stages_summary_by_user_by_event_name`.`USER`),\\'background\\',`performance_schema`.`events_stages_summary_by_user_by_event_name`.`USER`),`performance_schema`.`events_stages_summary_by_user_by_event_name`.`SUM_TIMER_WAIT` desc\nmd5=921d12c21bf3cde11e6224b3719e1c57\nupdatable=1\nalgorithm=2\ndefiner_user=mysql.sys\ndefiner_host=localhost\nsuid=0\nwith_check_option=0\ntimestamp=2021-08-03 09:41:45\ncreate-version=1\nsource=SELECT IF(user IS NULL, \\'background\\', user) AS user, event_name, count_star AS total, sys.format_time(sum_timer_wait) AS total_latency, sys.format_time(avg_timer_wait) AS avg_latency FROM performance_schema.events_stages_summary_by_user_by_event_name WHERE sum_timer_wait != 0 ORDER BY user, sum_timer_wait DESC\nclient_cs_name=utf8\nconnection_cl_name=utf8_general_ci\nview_body_utf8=select if(isnull(`performance_schema`.`events_stages_summary_by_user_by_event_name`.`USER`),\\'background\\',`performance_schema`.`events_stages_summary_by_user_by_event_name`.`USER`) AS `user`,`performance_schema`.`events_stages_summary_by_user_by_event_name`.`EVENT_NAME` AS `event_name`,`performance_schema`.`events_stages_summary_by_user_by_event_name`.`COUNT_STAR` AS `total`,`sys`.`format_time`(`performance_schema`.`events_stages_summary_by_user_by_event_name`.`SUM_TIMER_WAIT`) AS `total_latency`,`sys`.`format_time`(`performance_schema`.`events_stages_summary_by_user_by_event_name`.`AVG_TIMER_WAIT`) AS `avg_latency` from `performance_schema`.`events_stages_summary_by_user_by_event_name` where (`performance_schema`.`events_stages_summary_by_user_by_event_name`.`SUM_TIMER_WAIT` <> 0) order by if(isnull(`performance_schema`.`events_stages_summary_by_user_by_event_name`.`USER`),\\'background\\',`performance_schema`.`events_stages_summary_by_user_by_event_name`.`USER`),`performance_schema`.`events_stages_summary_by_user_by_event_name`.`SUM_TIMER_WAIT` desc\n","avg_line_length":170.3125,"max_line_length":1081,"alphanum_fraction":0.8502752294} {"size":7808,"ext":"vb","lang":"Visual Basic","max_stars_count":2.0,"content":"\ufeffImports System.Data.OleDb\r\nPublic Class EditProfiles\r\n Private Sub EditProfiles_Load(sender As Object, e As EventArgs) Handles Me.Load\r\n FillData()\r\n End Sub\r\n Private Sub btnCancel_Click(sender As Object, e As EventArgs) Handles btnCancel.Click\r\n ProfilesView.ButtonFix()\r\n Me.Close()\r\n End Sub\r\n Private Sub btnSave_Click(sender As Object, e As EventArgs) Handles btnSave.Click\r\n Dim SideSeatValid As Boolean = False\r\n Dim TimeValid As Boolean = False\r\n Select Case cmbSide.SelectedIndex\r\n Case 0\r\n If cmbSeat.SelectedIndex Mod 2 <> 0 Then\r\n Select Case MsgBox(\"Preferred side and preferred seat do not match. Are you sure you want to continue?\", MsgBoxStyle.YesNo)\r\n Case MsgBoxResult.Yes\r\n SideSeatValid = True\r\n Case Else\r\n SideSeatValid = False\r\n End Select\r\n Else\r\n SideSeatValid = True\r\n End If\r\n Case 1\r\n If cmbSeat.SelectedIndex Mod 2 = 0 Then\r\n Select Case MsgBox(\"Preferred side and preferred seat do not match. Are you sure you want to continue?\", MsgBoxStyle.YesNo)\r\n Case MsgBoxResult.Yes\r\n SideSeatValid = True\r\n Case Else\r\n SideSeatValid = False\r\n End Select\r\n Else\r\n SideSeatValid = True\r\n End If\r\n Case Else\r\n SideSeatValid = True\r\n End Select\r\n Try\r\n Val(txt2k.Text(0))\r\n Val(txt2k.Text(1))\r\n Val(txt2k.Text(3))\r\n Val(txt2k.Text(4))\r\n TimeValid = True\r\n Catch ex As Exception\r\n MsgBox(\"2k time must be in MM:SS format. You must fix this before you can save.\")\r\n End Try\r\n If TimeValid = True Then\r\n If SideSeatValid = True Then\r\n CheckChanges()\r\n SaveData()\r\n End If\r\n End If\r\n End Sub\r\n Private Sub EditProfiles_Closed(sender As Object, e As EventArgs) Handles Me.Closed\r\n Dim tempStr = SelectedRower\r\n ProfilesView.Button1.BackColor = schoolBlue\r\n ProfilesView.ReadDatabase()\r\n ProfilesView.SortBox.SelectedIndex = 0\r\n ProfilesView.FilterBox.SelectedIndex = 0\r\n ProfilesView.FillPanels()\r\n ProfilesView.RowerPanelClicked(ProfilesView.RowerBox.Controls.Item(ProfilesView.Sorted.IndexOf(ProfilesView.IDStr.IndexOf(tempStr))), EventArgs.Empty)\r\n End Sub\r\n Private Sub SaveData()\r\n Try\r\n Dim DBConn As OleDbConnection\r\n Dim dbCommand As New OleDbCommand()\r\n Dim strWeight, str2k, strBeep, strDiv, strSeat As String\r\n Dim strSide, strPath As String\r\n strWeight = numWeight.Value.ToString\r\n str2k = txt2k.Text\r\n strBeep = numBeep.Value.ToString\r\n Select Case cmbDivision.SelectedIndex\r\n Case 0\r\n strDiv = 8.ToString\r\n Case 1\r\n strDiv = 9.ToString\r\n Case 2\r\n strDiv = 10.ToString\r\n Case Else\r\n strDiv = 1.ToString\r\n End Select\r\n strSeat = cmbSeat.SelectedIndex.ToString\r\n strSide = cmbSide.SelectedIndex.ToString\r\n strPath = \"|DataDirectory|\\rowingDatabase (1).accdb\"\r\n DBConn = New OleDbConnection(\"Provider=Microsoft.ACE.OLEDB.12.0;\" _\r\n & \"DATA SOURCE=\" _\r\n & strPath)\r\n dbCommand.CommandText = \"Update [tbProfiles] Set \" _\r\n & \"[Weight]='\" & strWeight & \"', \" _\r\n & \"[2k]='\" & str2k & \"', \" _\r\n & \"[Beep]='\" & strBeep & \"', \" _\r\n & \"[Group]='\" & strDiv & \"', \" _\r\n & \"[Seat]='\" & strSeat & \"', \" _\r\n & \"[Side]='\" & strSide & \"' \" _\r\n & \"WHERE [ID]=\" & SelectedRower\r\n dbCommand.Connection = DBConn\r\n dbCommand.Connection.Open()\r\n dbCommand.ExecuteNonQuery()\r\n DBConn.Close()\r\n Me.Close()\r\n Catch err As System.Exception\r\n MsgBox(err.Message)\r\n End Try\r\n ProfilesView.ButtonFix()\r\n Me.Close()\r\n End Sub\r\n Dim oWeight As Integer\r\n Dim o2k As String\r\n Dim oBeep As Integer\r\n Dim oSeat As Integer\r\n Dim oSide As Integer\r\n Dim oGroup As Integer\r\n Public Sub FillData()\r\n Try\r\n Dim dbConn As OleDbConnection\r\n Dim dbCommand As New OleDbCommand()\r\n Dim strPath As String\r\n strPath = \"|DataDirectory|\\rowingDatabase (1).accdb\"\r\n dbConn = New OleDbConnection(\"Provider=Microsoft.ACE.OLEDB.12.0;\" _\r\n & \"DATA SOURCE=\" _\r\n & strPath)\r\n dbCommand.CommandText = \"SELECT * FROM tbProfiles WHERE ID=\" &\r\n SelectedRower\r\n dbCommand.Connection = dbConn\r\n dbConn.Open()\r\n Dim dbDR As OleDb.OleDbDataReader = dbCommand.ExecuteReader\r\n While dbDR.Read\r\n lblName.Text = dbDR(\"gName\".ToString).ToUpper + \", \" + dbDR(\"sName\".ToString)\r\n numWeight.Value = dbDR(\"Weight\")\r\n txt2k.Text = dbDR(\"2k\".ToString)\r\n numBeep.Value = dbDR(\"Beep\")\r\n Select Case dbDR(\"Group\")\r\n Case 1\r\n cmbDivision.SelectedIndex = 3\r\n oGroup = 3\r\n Case 8\r\n cmbDivision.SelectedIndex = 0\r\n oGroup = 0\r\n Case 9\r\n cmbDivision.SelectedIndex = 1\r\n oGroup = 1\r\n Case 10\r\n cmbDivision.SelectedIndex = 2\r\n oGroup = 2\r\n End Select\r\n cmbSeat.SelectedIndex = dbDR(\"Seat\")\r\n cmbSide.SelectedIndex = dbDR(\"Side\")\r\n End While\r\n dbConn.Close()\r\n Catch err As System.Exception\r\n MsgBox(err.Message)\r\n End Try\r\n oWeight = numWeight.Value\r\n o2k = txt2k.Text\r\n oBeep = numBeep.Value\r\n oSeat = cmbSeat.SelectedIndex\r\n oSide = cmbSide.SelectedIndex\r\n End Sub\r\n Private Sub CheckChanges()\r\n If numWeight.Value <> oWeight Then\r\n LogChanges(\"W(\" + oWeight.ToString + \">\" + numWeight.Value.ToString + \")\")\r\n End If\r\n If txt2k.Text <> o2k Then\r\n LogChanges(\"2(\" + o2k + \">\" + txt2k.Text + \")\")\r\n End If\r\n If numBeep.Value <> oBeep Then\r\n LogChanges(\"B(\" + oBeep.ToString + \">\" + numBeep.Value.ToString + \")\")\r\n End If\r\n If cmbSeat.SelectedIndex <> oSeat Then\r\n LogChanges(\"P(\" + oSeat.ToString + \">\" + cmbSeat.SelectedIndex.ToString + \")\")\r\n End If\r\n If cmbSide.SelectedIndex <> oSide Then\r\n LogChanges(\"S(\" + oSide.ToString + \">\" + cmbSide.SelectedIndex.ToString + \")\")\r\n End If\r\n If cmbDivision.SelectedIndex <> oGroup Then\r\n LogChanges(\"D(\" + oGroup.ToString + \">\" + cmbDivision.SelectedIndex.ToString + \")\")\r\n End If\r\n End Sub\r\n Private Sub LogChanges(Change As String)\r\n Dim strPath As String = My.Application.Info.DirectoryPath + \"\\Log.txt\"\r\n My.Computer.FileSystem.WriteAllText(strPath, SelectedRower & \"@\" & String.Format(\"{0:dd\/MM\/yyyy}\", DateTime.Now) & \"=\" & Change & \",\", True)\r\n End Sub\r\nEnd Class","avg_line_length":42.4347826087,"max_line_length":159,"alphanum_fraction":0.5131915984} {"size":235,"ext":"vb","lang":"Visual Basic","max_stars_count":421.0,"content":"\ufeff' \r\nPublic Class SampleClass\r\n Public Function RetrievePassedUrl() As String\r\n Return HttpContext.Current.Server.UrlDecode(HttpContext.Current.Request.QueryString(\"url\"))\r\n End Function\r\nEnd Class\r\n' <\/snippet2>","avg_line_length":33.5714285714,"max_line_length":100,"alphanum_fraction":0.7404255319} {"size":8106,"ext":"vb","lang":"Visual Basic","max_stars_count":27.0,"content":"\ufeffImports Autodesk.Revit.Attributes\nImports Autodesk.Revit.DB\nImports Autodesk.Revit.UI\nImports [Case].Subs.ViewSync.Data\n\nNamespace Entry\n\n ''' \n ''' Sync\n ''' <\/summary>\n ''' <\/remarks>\n \n Public Class D9B42C3FEA6F4F9E8E1B62E993AA2513\n\n Implements IExternalCommand\n\n ''' \n ''' Command Entry Point\n ''' <\/summary>\n ''' <\/param>\n ''' <\/param>\n ''' <\/param>\n ''' <\/returns>\n ''' <\/remarks>\n Public Function Execute(ByVal commandData As ExternalCommandData,\n ByRef message As String,\n ByVal elements As ElementSet) As Result Implements IExternalCommand.Execute\n\n Try\n\n ' Version\n If Not commandData.Application.Application.VersionName.Contains(\"2018\") Then\n\n Using td As New TaskDialog(\"Cannot Continue\")\n With td\n .TitleAutoPrefix = False\n .MainInstruction = \"Incompatible Revit Version\"\n .MainContent = \"\"\n .Show()\n End With\n End Using\n Return Result.Cancelled\n\n End If\n\n ' Settings\n Dim m_s As New clsSettings(commandData, elements)\n\n ' Named Model\n If String.IsNullOrEmpty(m_s.DocName) Then\n message = \"This tool requires that the model first be saved prior to use...\"\n Return Result.Failed\n End If\n\n ' Missing Parameters?\n Select Case m_s.ConfigData.ConfigDataState\n\n Case EnumCfgState.IsOk\n\n ' INI File Success\n If Not m_s.ConfigData Is Nothing Then\n m_s.ConfigData.ReadFile()\n m_s.ConfigData.ViewData = New clsViews(m_s.ConfigData.ViewSyncPath)\n\n ' Test for Master\n Dim m_tesPath As String = Mid(m_s.DocName, 3)\n If m_s.ConfigData.DocumentationModelPath.ToLower.Contains(m_tesPath.ToLower) Then\n\n Try\n ' Log\n m_s.ConfigData.WriteLogLine(\"Tag Sync Started (Master Model)\", m_s.DocName, EnumLogKind.IsSync)\n Catch\n End Try\n\n Try\n\n ' This is the Master\n m_s.GetViewports()\n\n ' Write the Updated INI File\n m_s.ConfigData.UpdateConfigFile()\n m_s.ConfigData.ViewData.UpdateViewsFile()\n\n Try\n ' Log \n m_s.ConfigData.WriteLogLine(\"Tag Sync Completed (Master Model)\", m_s.DocName, EnumLogKind.IsSync)\n Catch\n End Try\n\n Using td As New TaskDialog(\"Success!\")\n With td\n .TitleAutoPrefix = False\n .MainInstruction = m_s.ConfigData.ViewData.ViewPorts.Values.Count.ToString & \" Viewports Records Update\"\n .MainContent = \"Your view reference records have been updated...\"\n .Show()\n End With\n End Using\n\n Catch\n\n ' Error?\n Using td As New TaskDialog(\"Failed!\")\n With td\n .TitleAutoPrefix = False\n .MainInstruction = \"Unidentified Failure! #Ex00102\"\n .MainContent = \"Your view reference records failed to update...\"\n .Show()\n End With\n End Using\n\n End Try\n\n Else\n\n Try\n ' Log \n m_s.ConfigData.WriteLogLine(\"Tag Sync Started (General Model)\", m_s.DocName, EnumLogKind.IsSync)\n Catch\n End Try\n\n ' Sync Placed Tags\n If m_s.ConfigData.Families.Count > 0 Then\n\n ' Find them and Sync\n m_s.UpdateAll()\n\n Try\n ' Log \n m_s.ConfigData.WriteLogLine(\"Tag Sync Completed (General Model)\", m_s.DocName, EnumLogKind.IsSync)\n Catch\n End Try\n\n ' Any Orphans?\n If m_s.FamTagHelpers(EnumTagState.IsOrphan).Count +\n m_s.FamTagHelpers(EnumTagState.IsNull).Count > 0 Then\n\n ' Inform User\n Using td As New TaskDialog(\"Orphaned and\/or NULL Tags Detected!\")\n With td\n .TitleAutoPrefix = False\n\n Dim m_title As String = \"\"\n If m_s.FamTagHelpers(EnumTagState.IsOrphan).Count > 0 Then\n m_title += m_s.FamTagHelpers(EnumTagState.IsOrphan).Count.ToString & \" Orphaned View References Detected\"\n End If\n If m_s.FamTagHelpers(EnumTagState.IsNull).Count > 0 Then\n If Not String.IsNullOrEmpty(m_title) Then\n m_title += vbCr\n End If\n m_title += m_s.FamTagHelpers(EnumTagState.IsNull).Count.ToString & \" NULL View References Detected\"\n End If\n\n .MainInstruction = m_title\n .MainContent = \"A dialog will display where you can view and correct these issues.\"\n\n .Show()\n End With\n\n\n\n Try\n ' Log\n m_s.ConfigData.WriteLogLine(m_s.FamTagHelpers(EnumTagState.IsOrphan).Count.ToString &\n \" Orphaned Tags and \" &\n m_s.FamTagHelpers(EnumTagState.IsNull).Count.ToString &\n \" NULL Tags Detected, Showing Find Form\",\n m_s.DocName,\n EnumLogKind.IsSync)\n Catch\n End Try\n\n End Using\n\n ' Show the Orphans\n Using d As New form_Find(m_s)\n d.ShowDialog()\n End Using\n\n End If\n\n Else\n\n Dim m_logMsg As String = \"The INI configuration file contains 0 listings of family tags to sync with\"\n\n Try\n ' Log\n m_s.ConfigData.WriteLogLine(m_logMsg, m_s.DocName, EnumLogKind.IsSync)\n Catch\n End Try\n\n ' No Families Set to Sync\n message = m_logMsg\n Return Result.Failed\n\n End If\n\n End If\n\n End If\n\n Case Else\n Try\n ' Log\n m_s.ConfigData.WriteLogLine(\"Please run Config prior to any other commands, setup not complete for current model\", m_s.DocName, EnumLogKind.IsTag)\n Catch\n End Try\n\n ' Inform User\n Using td As New TaskDialog(\"Incomplete Setup\")\n With td\n .TitleAutoPrefix = False\n .MainInstruction = \"Current Model Needs Configuration\"\n .MainContent = \"Please run Config prior to any other commands, setup not complete for current model\"\n .Show()\n End With\n End Using\n\n ' Close\n Return Result.Cancelled\n\n End Select\n\n ' Success\n Return Result.Succeeded\n\n Catch ex As Exception\n\n ' Failure\n message = ex.Message\n Return Result.Failed\n\n End Try\n\n End Function\n\n End Class\nEnd Namespace","avg_line_length":34.2025316456,"max_line_length":162,"alphanum_fraction":0.476437207} {"size":2427,"ext":"frm","lang":"Visual Basic","max_stars_count":null,"content":"TYPE=VIEW\nquery=select `performance_schema`.`events_waits_summary_global_by_event_name`.`EVENT_NAME` AS `events`,`performance_schema`.`events_waits_summary_global_by_event_name`.`COUNT_STAR` AS `total`,`sys`.`format_time`(`performance_schema`.`events_waits_summary_global_by_event_name`.`SUM_TIMER_WAIT`) AS `total_latency`,`sys`.`format_time`(`performance_schema`.`events_waits_summary_global_by_event_name`.`AVG_TIMER_WAIT`) AS `avg_latency`,`sys`.`format_time`(`performance_schema`.`events_waits_summary_global_by_event_name`.`MAX_TIMER_WAIT`) AS `max_latency` from `performance_schema`.`events_waits_summary_global_by_event_name` where ((`performance_schema`.`events_waits_summary_global_by_event_name`.`EVENT_NAME` <> \\'idle\\') and (`performance_schema`.`events_waits_summary_global_by_event_name`.`SUM_TIMER_WAIT` > 0)) order by `performance_schema`.`events_waits_summary_global_by_event_name`.`SUM_TIMER_WAIT` desc\nmd5=1829bdc0b005dd5de530fa44c0430f42\nupdatable=1\nalgorithm=2\ndefiner_user=mysql.sys\ndefiner_host=localhost\nsuid=0\nwith_check_option=0\ntimestamp=2018-01-17 21:39:49\ncreate-version=1\nsource=SELECT event_name AS event, count_star AS total, sys.format_time(sum_timer_wait) AS total_latency, sys.format_time(avg_timer_wait) AS avg_latency, sys.format_time(max_timer_wait) AS max_latency FROM performance_schema.events_waits_summary_global_by_event_name WHERE event_name != \\'idle\\' AND sum_timer_wait > 0 ORDER BY sum_timer_wait DESC\nclient_cs_name=utf8\nconnection_cl_name=utf8_general_ci\nview_body_utf8=select `performance_schema`.`events_waits_summary_global_by_event_name`.`EVENT_NAME` AS `events`,`performance_schema`.`events_waits_summary_global_by_event_name`.`COUNT_STAR` AS `total`,`sys`.`format_time`(`performance_schema`.`events_waits_summary_global_by_event_name`.`SUM_TIMER_WAIT`) AS `total_latency`,`sys`.`format_time`(`performance_schema`.`events_waits_summary_global_by_event_name`.`AVG_TIMER_WAIT`) AS `avg_latency`,`sys`.`format_time`(`performance_schema`.`events_waits_summary_global_by_event_name`.`MAX_TIMER_WAIT`) AS `max_latency` from `performance_schema`.`events_waits_summary_global_by_event_name` where ((`performance_schema`.`events_waits_summary_global_by_event_name`.`EVENT_NAME` <> \\'idle\\') and (`performance_schema`.`events_waits_summary_global_by_event_name`.`SUM_TIMER_WAIT` > 0)) order by `performance_schema`.`events_waits_summary_global_by_event_name`.`SUM_TIMER_WAIT` desc\n","avg_line_length":151.6875,"max_line_length":920,"alphanum_fraction":0.8471363824} {"size":498,"ext":"vb","lang":"Visual Basic","max_stars_count":18.0,"content":"'Author:\r\n' V. Sudharsan (vsudharsan@novell.com)\r\n'\r\n' (C) 2005 Novell, Inc.\r\n\r\nModule ExpConversionShorttoIntA\r\n\tFunction _Main() As Integer\r\n Dim a As Short = 123\r\n Dim b As Integer\r\n b = CInt(a)\r\n If b <> 123 Then\r\n System.Console.WriteLine(\"Short to Int Conversion is not working properly. Expected 123 but got \" & b) : Return 1\r\n End If\r\n End Function\r\n\r\n\tSub Main()\r\n\t\t_Main()\r\n\t\tSystem.Console.WriteLine(\"<%END%>\")\r\n\tEnd Sub\r\n\r\nEnd Module\r\n","avg_line_length":22.6363636364,"max_line_length":126,"alphanum_fraction":0.6004016064} {"size":2901,"ext":"vb","lang":"Visual Basic","max_stars_count":null,"content":"\ufeff'------------------------------------------------------------------------------\n' \n' This code was generated by a tool.\n' Runtime Version:4.0.30319.18033\n'\n' Changes to this file may cause incorrect behavior and will be lost if\n' the code is regenerated.\n' <\/auto-generated>\n'------------------------------------------------------------------------------\n\nOption Strict On\nOption Explicit On\n\n\nNamespace My\n\n _\n Partial Friend NotInheritable Class MySettings\n Inherits Global.System.Configuration.ApplicationSettingsBase\n\n Private Shared defaultInstance As MySettings = CType(Global.System.Configuration.ApplicationSettingsBase.Synchronized(New MySettings), MySettings)\n\n#Region \"My.Settings Auto-Save Functionality\"\n#If _MyType = \"WindowsForms\" Then\n Private Shared addedHandler As Boolean\n\n Private Shared addedHandlerLockObject As New Object\n\n _\n Private Shared Sub AutoSaveSettings(ByVal sender As Global.System.Object, ByVal e As Global.System.EventArgs)\n If My.Application.SaveMySettingsOnExit Then\n My.Settings.Save()\n End If\n End Sub\n#End If\n#End Region\n\n Public Shared ReadOnly Property [Default]() As MySettings\n Get\n\n#If _MyType = \"WindowsForms\" Then\n If Not addedHandler Then\n SyncLock addedHandlerLockObject\n If Not addedHandler Then\n AddHandler My.Application.Shutdown, AddressOf AutoSaveSettings\n addedHandler = True\n End If\n End SyncLock\n End If\n#End If\n Return defaultInstance\n End Get\n End Property\n End Class\nEnd Namespace\n\nNamespace My\n\n _\n Friend Module MySettingsProperty\n\n _\n Friend ReadOnly Property Settings() As Global.lab_asp.My.MySettings\n Get\n Return Global.lab_asp.My.MySettings.Default\n End Get\n End Property\n End Module\nEnd Namespace\n","avg_line_length":39.2027027027,"max_line_length":183,"alphanum_fraction":0.6514994829} {"size":2856,"ext":"vb","lang":"Visual Basic","max_stars_count":2.0,"content":"\ufeffImports System\nImports Data = lombok.Data\nImports NoArgsConstructor = lombok.NoArgsConstructor\nImports FrameConverter = org.bytedeco.javacv.FrameConverter\nImports ImageWritable = org.datavec.image.data.ImageWritable\nImports JsonIgnoreProperties = org.nd4j.shade.jackson.annotation.JsonIgnoreProperties\n\n'\n' * ******************************************************************************\n' * *\n' * *\n' * * This program and the accompanying materials are made available under the\n' * * terms of the Apache License, Version 2.0 which is available at\n' * * https:\/\/www.apache.org\/licenses\/LICENSE-2.0.\n' * *\n' * * See the NOTICE file distributed with this work for additional\n' * * information regarding copyright ownership.\n' * * Unless required by applicable law or agreed to in writing, software\n' * * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n' * * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\n' * * License for the specific language governing permissions and limitations\n' * * under the License.\n' * *\n' * * SPDX-License-Identifier: Apache-2.0\n' * *****************************************************************************\n' \n\nNamespace org.datavec.image.transform\n\n\n'JAVA TO VB CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:\n'ORIGINAL LINE: @NoArgsConstructor @JsonIgnoreProperties({\"converter\", \"currentImage\"}) @Data public abstract class BaseImageTransform implements ImageTransform\n\tPublic MustInherit Class BaseImageTransform(Of F)\n\t\tImplements ImageTransform\n\n\t\tProtected Friend random As Random\n\t\tProtected Friend converter As FrameConverter(Of F)\n'JAVA TO VB CONVERTER NOTE: The field currentImage was renamed since Visual Basic does not allow fields to have the same name as other class members:\n\t\tProtected Friend currentImage_Conflict As ImageWritable\n\n\t\tProtected Friend Sub New(ByVal random As Random)\n\t\t\tMe.random = random\n\t\tEnd Sub\n\n\t\tPublic Function transform(ByVal image As ImageWritable) As ImageWritable\n\t\t\tReturn transform(image, random)\n\t\tEnd Function\n\n\t\tPublic Function transform(ByVal image As ImageWritable, ByVal random As Random) As ImageWritable Implements ImageTransform.transform\n\t\t\t\tcurrentImage_Conflict = doTransform(image, random)\n\t\t\t\tReturn currentImage_Conflict\n\t\tEnd Function\n\n\t\tProtected Friend MustOverride Function doTransform(ByVal image As ImageWritable, ByVal random As Random) As ImageWritable\n\n\t\tPublic Overridable Function query(ParamArray ByVal coordinates() As Single) As Single() Implements ImageTransform.query\n\t\t\tThrow New System.NotSupportedException()\n\t\tEnd Function\n\n\t\tPublic Overridable ReadOnly Property CurrentImage As ImageWritable Implements ImageTransform.getCurrentImage\n\t\t\tGet\n\t\t\t\tReturn currentImage_Conflict\n\t\t\tEnd Get\n\t\tEnd Property\n\tEnd Class\n\nEnd Namespace","avg_line_length":42.6268656716,"max_line_length":163,"alphanum_fraction":0.7408963585} {"size":1478,"ext":"vb","lang":"Visual Basic","max_stars_count":4.0,"content":"\ufeff'------------------------------------------------------------------------------\n' \n' This code was generated by a tool.\n' Runtime Version:4.0.30319.42000\n'\n' Changes to this file may cause incorrect behavior and will be lost if\n' the code is regenerated.\n' <\/auto-generated>\n'------------------------------------------------------------------------------\n\nOption Strict On\nOption Explicit On\n\n\nNamespace My\n \n 'NOTE: This file is auto-generated; do not modify it directly. To make changes,\n ' or if you encounter build errors in this file, go to the Project Designer\n ' (go to Project Properties or double-click the My Project node in\n ' Solution Explorer), and make changes on the Application tab.\n '\n Partial Friend Class MyApplication\n \n _\n Public Sub New()\n MyBase.New(Global.Microsoft.VisualBasic.ApplicationServices.AuthenticationMode.Windows)\n Me.IsSingleInstance = false\n Me.EnableVisualStyles = true\n Me.SaveMySettingsOnExit = true\n Me.ShutDownStyle = Global.Microsoft.VisualBasic.ApplicationServices.ShutdownMode.AfterMainFormCloses\n End Sub\n \n _\n Protected Overrides Sub OnCreateMainForm()\n Me.MainForm = Global.karyawan161018.Form1\n End Sub\n End Class\nEnd Namespace\n","avg_line_length":37.8974358974,"max_line_length":112,"alphanum_fraction":0.6170500677} {"size":8953,"ext":"vb","lang":"Visual Basic","max_stars_count":17923.0,"content":"\ufeff' Licensed to the .NET Foundation under one or more agreements.\n' The .NET Foundation licenses this file to you under the MIT license.\n' See the LICENSE file in the project root for more information.\n\nImports System.Runtime.CompilerServices\nImports System.Text\nImports Microsoft.CodeAnalysis.Completion.Providers\nImports Microsoft.CodeAnalysis.VisualBasic\nImports Microsoft.CodeAnalysis.VisualBasic.Syntax\nImports Microsoft.CodeAnalysis.VisualBasic.Utilities.IntrinsicOperators\n\nNamespace Microsoft.CodeAnalysis.VisualBasic.Completion.KeywordRecommenders\n Friend Module RecommendationHelpers\n Friend Function IsOnErrorStatement(node As SyntaxNode) As Boolean\n Return TypeOf node Is OnErrorGoToStatementSyntax OrElse TypeOf node Is OnErrorResumeNextStatementSyntax\n End Function\n\n ''' \n ''' Returns the parent of the node given. node may be null, which will cause this function to return null.\n ''' <\/summary>\n \n Friend Function GetParentOrNull(node As SyntaxNode) As SyntaxNode\n Return If(node Is Nothing, Nothing, node.Parent)\n End Function\n\n \n Friend Function IsFollowingCompleteAsNewClause(token As SyntaxToken) As Boolean\n Dim asNewClause = token.GetAncestor(Of AsNewClauseSyntax)()\n If asNewClause Is Nothing Then\n Return False\n End If\n\n Dim lastToken As SyntaxToken\n Select Case asNewClause.NewExpression.Kind\n Case SyntaxKind.ObjectCreationExpression\n Dim objectCreation = DirectCast(asNewClause.NewExpression, ObjectCreationExpressionSyntax)\n lastToken = If(objectCreation.ArgumentList IsNot Nothing,\n objectCreation.ArgumentList.CloseParenToken,\n asNewClause.Type.GetLastToken(includeZeroWidth:=True))\n Case SyntaxKind.AnonymousObjectCreationExpression\n Dim anonymousObjectCreation = DirectCast(asNewClause.NewExpression, AnonymousObjectCreationExpressionSyntax)\n lastToken = If(anonymousObjectCreation.Initializer IsNot Nothing,\n anonymousObjectCreation.Initializer.CloseBraceToken,\n asNewClause.Type.GetLastToken(includeZeroWidth:=True))\n Case SyntaxKind.ArrayCreationExpression\n Dim arrayCreation = DirectCast(asNewClause.NewExpression, ArrayCreationExpressionSyntax)\n lastToken = If(arrayCreation.Initializer IsNot Nothing,\n arrayCreation.Initializer.CloseBraceToken,\n asNewClause.Type.GetLastToken(includeZeroWidth:=True))\n Case Else\n Throw ExceptionUtilities.UnexpectedValue(asNewClause.NewExpression.Kind)\n End Select\n\n Return token = lastToken\n End Function\n\n \n Private Function IsLastTokenOfObjectCreation(token As SyntaxToken, objectCreation As ObjectCreationExpressionSyntax) As Boolean\n If objectCreation Is Nothing Then\n Return False\n End If\n\n Dim lastToken = If(objectCreation.ArgumentList IsNot Nothing,\n objectCreation.ArgumentList.CloseParenToken,\n objectCreation.Type.GetLastToken(includeZeroWidth:=True))\n\n Return token = lastToken\n End Function\n\n \n Friend Function IsFollowingCompleteObjectCreationInitializer(token As SyntaxToken) As Boolean\n Dim variableDeclarator = token.GetAncestor(Of VariableDeclaratorSyntax)()\n If variableDeclarator Is Nothing Then\n Return False\n End If\n\n Dim objectCreation = token.GetAncestors(Of ObjectCreationExpressionSyntax)() _\n .Where(Function(oc) oc.Parent IsNot Nothing AndAlso\n oc.Parent.Kind <> SyntaxKind.AsNewClause AndAlso\n variableDeclarator.Initializer IsNot Nothing AndAlso\n variableDeclarator.Initializer.Value Is oc) _\n .FirstOrDefault()\n\n Return token.IsLastTokenOfObjectCreation(objectCreation)\n End Function\n\n \n Friend Function IsFollowingCompleteObjectCreation(token As SyntaxToken) As Boolean\n Dim objectCreation = token.GetAncestor(Of ObjectCreationExpressionSyntax)()\n\n Return token.IsLastTokenOfObjectCreation(objectCreation)\n End Function\n\n \n Friend Function LastJoinKey(collection As SeparatedSyntaxList(Of JoinConditionSyntax)) As ExpressionSyntax\n Dim lastJoinCondition = collection.LastOrDefault()\n\n If lastJoinCondition IsNot Nothing Then\n Return lastJoinCondition.Right\n Else\n Return Nothing\n End If\n End Function\n\n \n Friend Function IsFromIdentifierNode(token As SyntaxToken, identifierSyntax As IdentifierNameSyntax) As Boolean\n Return _\n identifierSyntax IsNot Nothing AndAlso\n token = identifierSyntax.Identifier AndAlso\n identifierSyntax.Identifier.GetTypeCharacter() = TypeCharacter.None\n End Function\n\n \n Friend Function IsFromIdentifierNode(token As SyntaxToken, identifierSyntax As ModifiedIdentifierSyntax) As Boolean\n Return _\n identifierSyntax IsNot Nothing AndAlso\n token = identifierSyntax.Identifier AndAlso\n identifierSyntax.Identifier.GetTypeCharacter() = TypeCharacter.None\n End Function\n\n \n Friend Function IsFromIdentifierNode(token As SyntaxToken, node As SyntaxNode) As Boolean\n If node Is Nothing Then\n Return False\n End If\n\n Dim identifierName = TryCast(node, IdentifierNameSyntax)\n If token.IsFromIdentifierNode(identifierName) Then\n Return True\n End If\n\n Dim modifiedIdentifierName = TryCast(node, ModifiedIdentifierSyntax)\n If token.IsFromIdentifierNode(modifiedIdentifierName) Then\n Return True\n End If\n\n Return False\n End Function\n\n \n Friend Function IsFromIdentifierNode(Of TParent As SyntaxNode)(token As SyntaxToken, identifierNodeSelector As Func(Of TParent, SyntaxNode)) As Boolean\n Dim ancestor = token.GetAncestor(Of TParent)()\n If ancestor Is Nothing Then\n Return False\n End If\n\n Return token.IsFromIdentifierNode(identifierNodeSelector(ancestor))\n End Function\n\n Friend Function CreateRecommendedKeywordForIntrinsicOperator(kind As SyntaxKind,\n firstLine As String,\n glyph As Glyph,\n intrinsicOperator As AbstractIntrinsicOperatorDocumentation,\n Optional semanticModel As SemanticModel = Nothing,\n Optional position As Integer = -1) As RecommendedKeyword\n\n Return New RecommendedKeyword(SyntaxFacts.GetText(kind), glyph,\n Function(c)\n Dim stringBuilder As New StringBuilder\n stringBuilder.AppendLine(firstLine)\n stringBuilder.AppendLine(intrinsicOperator.DocumentationText)\n\n Dim appendParts = Sub(parts As IEnumerable(Of SymbolDisplayPart))\n For Each part In parts\n stringBuilder.Append(part.ToString())\n Next\n End Sub\n\n appendParts(intrinsicOperator.PrefixParts)\n\n For i = 0 To intrinsicOperator.ParameterCount - 1\n If i <> 0 Then\n stringBuilder.Append(\", \")\n End If\n\n appendParts(intrinsicOperator.GetParameterDisplayParts(i))\n Next\n\n appendParts(intrinsicOperator.GetSuffix(semanticModel, position, Nothing, c))\n\n Return stringBuilder.ToString().ToSymbolDisplayParts()\n End Function,\n isIntrinsic:=True)\n End Function\n End Module\nEnd Namespace\n","avg_line_length":47.8770053476,"max_line_length":159,"alphanum_fraction":0.6052719759} {"size":2643,"ext":"frm","lang":"Visual Basic","max_stars_count":null,"content":"TYPE=VIEW\nquery=select if(locate(\\'.\\',`ibp`.`TABLE_NAME`) = 0,\\'InnoDB System\\',replace(substring_index(`ibp`.`TABLE_NAME`,\\'.\\',1),\\'`\\',\\'\\')) AS `object_schema`,sum(if(`ibp`.`COMPRESSED_SIZE` = 0,16384,`ibp`.`COMPRESSED_SIZE`)) AS `allocated`,sum(`ibp`.`DATA_SIZE`) AS `data`,count(`ibp`.`PAGE_NUMBER`) AS `pages`,count(if(`ibp`.`IS_HASHED`,1,NULL)) AS `pages_hashed`,count(if(`ibp`.`IS_OLD`,1,NULL)) AS `pages_old`,round(ifnull(sum(`ibp`.`NUMBER_RECORDS`) \/ nullif(count(distinct `ibp`.`INDEX_NAME`),0),0),0) AS `rows_cached` from `information_schema`.`innodb_buffer_page` `ibp` where `ibp`.`TABLE_NAME` is not null group by if(locate(\\'.\\',`ibp`.`TABLE_NAME`) = 0,\\'InnoDB System\\',replace(substring_index(`ibp`.`TABLE_NAME`,\\'.\\',1),\\'`\\',\\'\\')) order by sum(if(`ibp`.`COMPRESSED_SIZE` = 0,16384,`ibp`.`COMPRESSED_SIZE`)) desc\nmd5=5520d476400f773f5e963f96dc10e46a\nupdatable=0\nalgorithm=2\ndefiner_user=mariadb.sys\ndefiner_host=localhost\nsuid=0\nwith_check_option=0\ntimestamp=2022-02-11 19:53:47\ncreate-version=2\nsource=SELECT IF(LOCATE(\\'.\\', ibp.table_name) = 0, \\'InnoDB System\\', REPLACE(SUBSTRING_INDEX(ibp.table_name, \\'.\\', 1), \\'`\\', \\'\\')) AS object_schema,\\n SUM(IF(ibp.compressed_size = 0, 16384, compressed_size)) AS allocated,\\n SUM(ibp.data_size) AS data,\\n COUNT(ibp.page_number) AS pages,\\n COUNT(IF(ibp.is_hashed, 1, NULL)) AS pages_hashed,\\n COUNT(IF(ibp.is_old, 1, NULL)) AS pages_old,\\n ROUND(IFNULL(SUM(ibp.number_records)\/NULLIF(COUNT(DISTINCT ibp.index_name), 0), 0)) AS rows_cached\\n FROM information_schema.innodb_buffer_page ibp\\n WHERE table_name IS NOT NULL\\n GROUP BY object_schema\\n ORDER BY SUM(IF(ibp.compressed_size = 0, 16384, compressed_size)) DESC;\nclient_cs_name=utf8mb3\nconnection_cl_name=utf8mb3_general_ci\nview_body_utf8=select if(locate(\\'.\\',`ibp`.`TABLE_NAME`) = 0,\\'InnoDB System\\',replace(substring_index(`ibp`.`TABLE_NAME`,\\'.\\',1),\\'`\\',\\'\\')) AS `object_schema`,sum(if(`ibp`.`COMPRESSED_SIZE` = 0,16384,`ibp`.`COMPRESSED_SIZE`)) AS `allocated`,sum(`ibp`.`DATA_SIZE`) AS `data`,count(`ibp`.`PAGE_NUMBER`) AS `pages`,count(if(`ibp`.`IS_HASHED`,1,NULL)) AS `pages_hashed`,count(if(`ibp`.`IS_OLD`,1,NULL)) AS `pages_old`,round(ifnull(sum(`ibp`.`NUMBER_RECORDS`) \/ nullif(count(distinct `ibp`.`INDEX_NAME`),0),0),0) AS `rows_cached` from `information_schema`.`innodb_buffer_page` `ibp` where `ibp`.`TABLE_NAME` is not null group by if(locate(\\'.\\',`ibp`.`TABLE_NAME`) = 0,\\'InnoDB System\\',replace(substring_index(`ibp`.`TABLE_NAME`,\\'.\\',1),\\'`\\',\\'\\')) order by sum(if(`ibp`.`COMPRESSED_SIZE` = 0,16384,`ibp`.`COMPRESSED_SIZE`)) desc\nmariadb-version=100701\n","avg_line_length":155.4705882353,"max_line_length":832,"alphanum_fraction":0.7041241014} {"size":1152,"ext":"vb","lang":"Visual Basic","max_stars_count":421.0,"content":"\ufeffOption Explicit On\r\nOption Strict On\r\n\r\nImports System.Data\r\nImports System.Data.Common\r\nModule Module1\r\n ' \r\n Sub Main()\r\n Dim builder As New DbConnectionStringBuilder\r\n builder.ConnectionString = _\r\n \"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\\Demo.mdb;\" & _\r\n \"Jet OLEDB:System Database=system.mdw;\"\r\n\r\n ' Try to remove an existing item.\r\n TryRemove(builder, \"Provider\")\r\n\r\n ' Try to remove a nonexistent item.\r\n TryRemove(builder, \"User ID\")\r\n\r\n ' Try to remove an existing item, \r\n ' demonstrating that the search isn't \r\n ' case sensitive.\r\n TryRemove(builder, \"DATA SOURCE\")\r\n Console.ReadLine()\r\n End Sub\r\n\r\n Sub TryRemove(ByVal builder As DbConnectionStringBuilder, _\r\n ByVal itemToRemove As String)\r\n\r\n If builder.Remove(itemToRemove) Then\r\n Console.WriteLine(\"Removed '{0}'\", itemToRemove)\r\n Else\r\n Console.WriteLine(\"Unable to remove '{0}'\", itemToRemove)\r\n End If\r\n Console.WriteLine(builder.ConnectionString)\r\n End Sub\r\n ' <\/Snippet1>\r\nEnd Module\r\n","avg_line_length":29.5384615385,"max_line_length":76,"alphanum_fraction":0.6163194444} {"size":18168,"ext":"frm","lang":"Visual Basic","max_stars_count":492.0,"content":"VERSION 5.00\r\nBegin VB.Form dialog_ExportGIF \r\n Appearance = 0 'Flat\r\n BackColor = &H80000005&\r\n BorderStyle = 4 'Fixed ToolWindow\r\n ClientHeight = 7230\r\n ClientLeft = 45\r\n ClientTop = 390\r\n ClientWidth = 13095\r\n DrawStyle = 5 'Transparent\r\n BeginProperty Font \r\n Name = \"Tahoma\"\r\n Size = 8.25\r\n Charset = 0\r\n Weight = 400\r\n Underline = 0 'False\r\n Italic = 0 'False\r\n Strikethrough = 0 'False\r\n EndProperty\r\n HasDC = 0 'False\r\n LinkTopic = \"Form1\"\r\n MaxButton = 0 'False\r\n MinButton = 0 'False\r\n ScaleHeight = 482\r\n ScaleMode = 3 'Pixel\r\n ScaleWidth = 873\r\n ShowInTaskbar = 0 'False\r\n Begin PhotoDemon.pdCommandBar cmdBar \r\n Align = 2 'Align Bottom\r\n Height = 750\r\n Left = 0\r\n TabIndex = 0\r\n Top = 6480\r\n Width = 13095\r\n _ExtentX = 23098\r\n _ExtentY = 1323\r\n End\r\n Begin PhotoDemon.pdFxPreviewCtl pdFxPreview \r\n Height = 6225\r\n Left = 120\r\n TabIndex = 1\r\n Top = 120\r\n Width = 5625\r\n _ExtentX = 9922\r\n _ExtentY = 10980\r\n ColorSelection = -1 'True\r\n End\r\n Begin PhotoDemon.pdButtonStrip btsCategory \r\n Height = 615\r\n Left = 5880\r\n TabIndex = 10\r\n Top = 120\r\n Width = 7095\r\n _ExtentX = 12515\r\n _ExtentY = 1085\r\n FontSize = 11\r\n End\r\n Begin PhotoDemon.pdContainer picContainer \r\n Height = 5535\r\n Index = 0\r\n Left = 5880\r\n Top = 840\r\n Width = 7095\r\n _ExtentX = 0\r\n _ExtentY = 0\r\n Begin PhotoDemon.pdSlider sldAlphaCutoff \r\n Height = 855\r\n Left = 0\r\n TabIndex = 3\r\n Top = 4440\r\n Width = 7095\r\n _ExtentX = 12515\r\n _ExtentY = 1508\r\n Caption = \"alpha cut-off\"\r\n Max = 254\r\n SliderTrackStyle= 1\r\n Value = 64\r\n GradientColorRight= 1703935\r\n NotchPosition = 2\r\n NotchValueCustom= 64\r\n End\r\n Begin PhotoDemon.pdCheckBox chkColorCount \r\n Height = 375\r\n Left = 120\r\n TabIndex = 4\r\n Top = 1200\r\n Width = 6975\r\n _ExtentX = 7858\r\n _ExtentY = 661\r\n Caption = \"restrict palette size\"\r\n Value = 0 'False\r\n End\r\n Begin PhotoDemon.pdColorSelector clsBackground \r\n Height = 975\r\n Left = 0\r\n TabIndex = 5\r\n Top = 2160\r\n Width = 7095\r\n _ExtentX = 15690\r\n _ExtentY = 1720\r\n Caption = \"background color\"\r\n End\r\n Begin PhotoDemon.pdLabel lblTitle \r\n Height = 375\r\n Index = 0\r\n Left = 3480\r\n Top = 1740\r\n Width = 3615\r\n _ExtentX = 9340\r\n _ExtentY = 661\r\n Caption = \"unique colors\"\r\n End\r\n Begin PhotoDemon.pdSlider sldColorCount \r\n Height = 375\r\n Left = 360\r\n TabIndex = 6\r\n Top = 1680\r\n Width = 3015\r\n _ExtentX = 5318\r\n _ExtentY = 661\r\n Min = 2\r\n Max = 256\r\n Value = 256\r\n NotchPosition = 2\r\n NotchValueCustom= 256\r\n End\r\n Begin PhotoDemon.pdButtonStrip btsAlpha \r\n Height = 1095\r\n Left = 0\r\n TabIndex = 7\r\n Top = 3240\r\n Width = 7095\r\n _ExtentX = 15690\r\n _ExtentY = 1931\r\n Caption = \"transparency\"\r\n End\r\n Begin PhotoDemon.pdButtonStrip btsColorModel \r\n Height = 1095\r\n Left = 0\r\n TabIndex = 8\r\n Top = 0\r\n Width = 7095\r\n _ExtentX = 15690\r\n _ExtentY = 1931\r\n Caption = \"color model\"\r\n End\r\n Begin PhotoDemon.pdColorSelector clsAlphaColor \r\n Height = 975\r\n Left = 0\r\n TabIndex = 9\r\n Top = 4440\r\n Width = 7095\r\n _ExtentX = 15690\r\n _ExtentY = 1720\r\n Caption = \"transparent color (right-click image to select)\"\r\n curColor = 16711935\r\n End\r\n End\r\n Begin PhotoDemon.pdContainer picContainer \r\n Height = 5535\r\n Index = 1\r\n Left = 5880\r\n Top = 840\r\n Width = 7095\r\n _ExtentX = 0\r\n _ExtentY = 0\r\n Begin PhotoDemon.pdMetadataExport mtdManager \r\n Height = 4935\r\n Left = 120\r\n TabIndex = 2\r\n Top = 120\r\n Width = 6975\r\n _ExtentX = 12303\r\n _ExtentY = 8705\r\n End\r\n End\r\nEnd\r\nAttribute VB_Name = \"dialog_ExportGIF\"\r\nAttribute VB_GlobalNameSpace = False\r\nAttribute VB_Creatable = False\r\nAttribute VB_PredeclaredId = True\r\nAttribute VB_Exposed = False\r\n'***************************************************************************\r\n'GIF export dialog\r\n'Copyright 2012-2021 by Tanner Helland\r\n'Created: 11\/December\/12\r\n'Last updated: 11\/April\/16\r\n'Last update: repurpose old color-depth dialog into a GIF-specific one\r\n'\r\n'Unless otherwise noted, all source code in this file is shared under a simplified BSD license.\r\n' Full license details are available in the LICENSE.md file, or at https:\/\/photodemon.org\/license\/\r\n'\r\n'***************************************************************************\r\n\r\nOption Explicit\r\n\r\n'This form can (and should!) be notified of the image being exported. The only exception to this rule is invoking\r\n' the dialog from the batch process dialog, as no image is associated with that preview.\r\nPrivate m_SrcImage As pdImage\r\n\r\n'A composite of the current image, 32-bpp, fully composited. This is only regenerated if the source image changes.\r\nPrivate m_CompositedImage As pdDIB\r\n\r\n'FreeImage-specific copy of the preview window corresponding to m_CompositedImage, above. We cache this to save time,\r\n' but note that it must be regenerated whenever the preview source is regenerated.\r\nPrivate m_FIHandle As Long\r\n\r\n'OK or CANCEL result\r\nPrivate m_UserDialogAnswer As VbMsgBoxResult\r\n\r\n'Final format-specific XML packet, with all format-specific settings defined as tag+value pairs\r\nPrivate m_FormatParamString As String\r\n\r\n'Final metadata XML packet, with all metadata settings defined as tag+value pairs. Currently unused as ExifTool\r\n' cannot write any BMP-specific data.\r\nPrivate m_MetadataParamString As String\r\n\r\n'The user's answer is returned via this property\r\nPublic Function GetDialogResult() As VbMsgBoxResult\r\n GetDialogResult = m_UserDialogAnswer\r\nEnd Function\r\n\r\nPublic Function GetFormatParams() As String\r\n GetFormatParams = m_FormatParamString\r\nEnd Function\r\n\r\nPublic Function GetMetadataParams() As String\r\n GetMetadataParams = m_MetadataParamString\r\nEnd Function\r\n\r\n'The ShowDialog routine presents the user with this form.\r\nPublic Sub ShowDialog(Optional ByRef srcImage As pdImage = Nothing)\r\n\r\n 'Provide a default answer of \"cancel\" (in the event that the user clicks the \"x\" button in the top-right)\r\n m_UserDialogAnswer = vbCancel\r\n \r\n Message \"Waiting for user to specify export options... \"\r\n \r\n 'Populate the category button strip\r\n btsCategory.AddItem \"basic\", 0\r\n btsCategory.AddItem \"metadata\", 1\r\n btsCategory.ListIndex = 0\r\n \r\n btsColorModel.AddItem \"auto\", 0\r\n btsColorModel.AddItem \"color\", 1\r\n btsColorModel.AddItem \"grayscale\", 2\r\n \r\n btsAlpha.AddItem \"auto\", 0\r\n btsAlpha.AddItem \"none\", 1\r\n btsAlpha.AddItem \"by cut-off\", 2\r\n btsAlpha.AddItem \"by color\", 3\r\n \r\n sldAlphaCutoff.NotchValueCustom = PD_DEFAULT_ALPHA_CUTOFF\r\n \r\n 'Prep a preview (if any)\r\n Set m_SrcImage = srcImage\r\n If Not (m_SrcImage Is Nothing) Then\r\n m_SrcImage.GetCompositedImage m_CompositedImage, True\r\n pdFxPreview.NotifyNonStandardSource m_CompositedImage.GetDIBWidth, m_CompositedImage.GetDIBHeight\r\n End If\r\n If (m_SrcImage Is Nothing) Then Interface.ShowDisabledPreviewImage pdFxPreview\r\n \r\n 'Next, prepare various controls on the metadata panel\r\n mtdManager.SetParentImage m_SrcImage, PDIF_GIF\r\n \r\n 'Update the preview\r\n UpdatePanelVisibility\r\n UpdateAllVisibility\r\n UpdateTransparencyOptions\r\n UpdatePreviewSource\r\n UpdatePreview\r\n \r\n 'Apply translations and visual themes\r\n ApplyThemeAndTranslations Me\r\n Strings.SetFormCaptionW Me, g_Language.TranslateMessage(\"%1 options\", \"GIF\")\r\n \r\n 'Display the dialog\r\n ShowPDDialog vbModal, Me, True\r\n\r\nEnd Sub\r\n\r\nPrivate Sub btsAlpha_Click(ByVal buttonIndex As Long)\r\n UpdateTransparencyOptions\r\n UpdatePreviewSource\r\n UpdatePreview\r\nEnd Sub\r\n\r\nPrivate Sub UpdateTransparencyOptions()\r\n \r\n Select Case btsAlpha.ListIndex\r\n \r\n 'auto\r\n Case 0\r\n sldAlphaCutoff.Visible = False\r\n clsAlphaColor.Visible = False\r\n pdFxPreview.AllowColorSelection = False\r\n \r\n 'no alpha\r\n Case 1\r\n sldAlphaCutoff.Visible = False\r\n clsAlphaColor.Visible = False\r\n pdFxPreview.AllowColorSelection = False\r\n \r\n 'alpha by cut-off\r\n Case 2\r\n sldAlphaCutoff.Visible = True\r\n clsAlphaColor.Visible = False\r\n pdFxPreview.AllowColorSelection = False\r\n \r\n 'alpha by color\r\n Case 3\r\n sldAlphaCutoff.Visible = False\r\n clsAlphaColor.Visible = True\r\n pdFxPreview.AllowColorSelection = True\r\n \r\n End Select\r\n \r\nEnd Sub\r\n\r\nPrivate Sub btsCategory_Click(ByVal buttonIndex As Long)\r\n UpdatePanelVisibility\r\nEnd Sub\r\n\r\nPrivate Sub UpdatePanelVisibility()\r\n Dim i As Long\r\n For i = 0 To btsCategory.ListCount - 1\r\n picContainer(i).Visible = (i = btsCategory.ListIndex)\r\n Next i\r\nEnd Sub\r\n\r\nPrivate Sub btsColorModel_Click(ByVal buttonIndex As Long)\r\n UpdateAllVisibility\r\n UpdatePreviewSource\r\n UpdatePreview\r\nEnd Sub\r\n\r\nPrivate Sub UpdateAllVisibility()\r\n\r\n Select Case btsColorModel.ListIndex\r\n \r\n 'Auto\r\n Case 0\r\n UpdateColorCountVisibility False\r\n \r\n 'Color\r\n Case 1\r\n UpdateColorCountVisibility True\r\n \r\n 'Grayscale\r\n Case 2\r\n UpdateColorCountVisibility True\r\n \r\n End Select\r\n \r\nEnd Sub\r\n\r\nPrivate Sub UpdateColorCountVisibility(ByVal newValue As Boolean)\r\n chkColorCount.Visible = newValue\r\n sldColorCount.Visible = newValue\r\n lblTitle(0).Visible = newValue\r\nEnd Sub\r\n\r\nPrivate Sub chkColorCount_Click()\r\n UpdatePreviewSource\r\n UpdatePreview\r\nEnd Sub\r\n\r\nPrivate Sub clsAlphaColor_ColorChanged()\r\n UpdatePreviewSource\r\n UpdatePreview\r\nEnd Sub\r\n\r\nPrivate Sub clsBackground_ColorChanged()\r\n UpdatePreviewSource\r\n UpdatePreview\r\nEnd Sub\r\n\r\nPrivate Sub cmdBar_CancelClick()\r\n m_UserDialogAnswer = vbCancel\r\n Me.Visible = False\r\nEnd Sub\r\n\r\nPrivate Sub cmdBar_OKClick()\r\n m_FormatParamString = GetExportParamString\r\n m_MetadataParamString = mtdManager.GetMetadataSettings\r\n m_UserDialogAnswer = vbOK\r\n Me.Visible = False\r\nEnd Sub\r\n\r\nPrivate Sub cmdBar_ReadCustomPresetData()\r\n UpdateAllVisibility\r\nEnd Sub\r\n\r\nPrivate Sub cmdBar_RequestPreviewUpdate()\r\n UpdatePreview\r\nEnd Sub\r\n\r\nPrivate Sub cmdBar_ResetClick()\r\n btsColorModel.ListIndex = 0\r\n chkColorCount.Value = False\r\n sldColorCount.Value = 256\r\n clsBackground.Color = vbWhite\r\n btsAlpha.ListIndex = 0\r\n sldAlphaCutoff.Value = PD_DEFAULT_ALPHA_CUTOFF\r\n clsAlphaColor.Color = RGB(255, 0, 255)\r\nEnd Sub\r\n\r\nPrivate Sub Form_Unload(Cancel As Integer)\r\n ReleaseFormTheming Me\r\n Plugin_FreeImage.ReleasePreviewCache m_FIHandle\r\nEnd Sub\r\n\r\nPrivate Function GetExportParamString() As String\r\n\r\n Dim cParams As pdSerialize\r\n Set cParams = New pdSerialize\r\n \r\n 'Convert the color depth option buttons into a usable numeric value\r\n Dim outputColorMode As String\r\n \r\n Select Case btsColorModel.ListIndex\r\n Case 0\r\n outputColorMode = \"auto\"\r\n Case 1\r\n outputColorMode = \"color\"\r\n Case 2\r\n outputColorMode = \"gray\"\r\n End Select\r\n \r\n cParams.AddParam \"gif-color-mode\", outputColorMode\r\n \r\n Dim outputAlphaMode As String\r\n Select Case btsAlpha.ListIndex\r\n Case 0\r\n outputAlphaMode = \"auto\"\r\n Case 1\r\n outputAlphaMode = \"none\"\r\n Case 2\r\n outputAlphaMode = \"by-cutoff\"\r\n Case 3\r\n outputAlphaMode = \"by-color\"\r\n End Select\r\n \r\n cParams.AddParam \"gif-alpha-mode\", outputAlphaMode\r\n \r\n 'If \"auto\" mode is selected, we currently enforce a hard-coded cut-off value. There may be a better way to do this,\r\n ' but I'm not currently aware of it!\r\n Dim outputAlphaCutoff As Long\r\n If (btsAlpha.ListIndex = 0) Or (Not sldAlphaCutoff.IsValid) Then outputAlphaCutoff = PD_DEFAULT_ALPHA_CUTOFF Else outputAlphaCutoff = sldAlphaCutoff.Value\r\n cParams.AddParam \"gif-alpha-cutoff\", outputAlphaCutoff\r\n \r\n Dim colorCount As Long\r\n If (btsColorModel.ListIndex <> 0) Then\r\n If chkColorCount.Value And sldColorCount.IsValid Then colorCount = sldColorCount.Value Else colorCount = 256\r\n Else\r\n colorCount = 256\r\n End If\r\n cParams.AddParam \"gif-color-count\", colorCount\r\n cParams.AddParam \"gif-backcolor\", clsBackground.Color\r\n cParams.AddParam \"gif-alpha-color\", clsAlphaColor.Color\r\n \r\n GetExportParamString = cParams.GetParamString\r\n \r\nEnd Function\r\n\r\nPrivate Sub pdFxPreview_ColorSelected()\r\n clsAlphaColor.Color = pdFxPreview.SelectedColor\r\nEnd Sub\r\n\r\nPrivate Sub pdFxPreview_ViewportChanged()\r\n UpdatePreviewSource\r\n UpdatePreview\r\nEnd Sub\r\n\r\n'When a parameter changes that requires a new source DIB for the preview (e.g. changing the background composite color),\r\n' call this function to generate a new preview DIB. Note that you *do not* need to call this function for format-specific\r\n' changes (like quality, subsampling, etc).\r\nPrivate Sub UpdatePreviewSource()\r\n\r\n If (Not m_CompositedImage Is Nothing) Then\r\n \r\n 'Because the user can change the preview viewport, we can't guarantee that the preview region hasn't changed\r\n ' since the last preview. Prep a new preview now.\r\n Dim tmpSafeArray As SafeArray2D\r\n EffectPrep.PreviewNonStandardImage tmpSafeArray, m_CompositedImage, pdFxPreview, True\r\n \r\n 'Convert the DIB to a FreeImage-compatible handle, at a color-depth that matches the current settings.\r\n ' (Note that one way or another, we'll always be converting the image to an 8-bpp mode.)\r\n Dim forceGrayscale As Boolean\r\n forceGrayscale = (btsColorModel.ListIndex = 2)\r\n \r\n Dim paletteCount As Long\r\n If (btsColorModel.ListIndex = 0) Then\r\n paletteCount = 256\r\n Else\r\n If chkColorCount.Value And sldColorCount.IsValid Then paletteCount = sldColorCount.Value Else paletteCount = 256\r\n End If\r\n \r\n Dim desiredAlphaMode As PD_ALPHA_STATUS, desiredAlphaCutoff As Long\r\n If btsAlpha.ListIndex = 0 Then\r\n desiredAlphaMode = PDAS_BinaryAlpha 'Auto\r\n desiredAlphaCutoff = PD_DEFAULT_ALPHA_CUTOFF\r\n ElseIf btsAlpha.ListIndex = 1 Then\r\n desiredAlphaMode = PDAS_NoAlpha 'None\r\n desiredAlphaCutoff = 0\r\n ElseIf btsAlpha.ListIndex = 2 Then\r\n desiredAlphaMode = PDAS_BinaryAlpha 'By cut-off\r\n If sldAlphaCutoff.IsValid Then desiredAlphaCutoff = sldAlphaCutoff.Value Else desiredAlphaCutoff = 96\r\n Else\r\n desiredAlphaMode = PDAS_NewAlphaFromColor 'By color\r\n desiredAlphaCutoff = clsAlphaColor.Color\r\n End If\r\n \r\n If (m_FIHandle <> 0) Then Plugin_FreeImage.ReleaseFreeImageObject m_FIHandle\r\n m_FIHandle = Plugin_FreeImage.GetFIDib_SpecificColorMode(workingDIB, 8, desiredAlphaMode, PDAS_ComplicatedAlpha, desiredAlphaCutoff, clsBackground.Color, forceGrayscale, paletteCount)\r\n \r\n End If\r\n \r\nEnd Sub\r\n\r\nPrivate Sub UpdatePreview()\r\n\r\n If (cmdBar.PreviewsAllowed And ImageFormats.IsFreeImageEnabled() And sldColorCount.IsValid And (Not m_SrcImage Is Nothing)) Then\r\n \r\n 'Make sure the preview source is up-to-date\r\n If (m_FIHandle = 0) Then UpdatePreviewSource\r\n \r\n 'Retrieve a BMP-saved version of the current preview image\r\n workingDIB.ResetDIB\r\n If Plugin_FreeImage.GetExportPreview(m_FIHandle, workingDIB, PDIF_GIF) Then\r\n FinalizeNonstandardPreview pdFxPreview, True\r\n End If\r\n \r\n End If\r\n \r\nEnd Sub\r\n\r\nPrivate Sub sldAlphaCutoff_Change()\r\n UpdatePreviewSource\r\n UpdatePreview\r\nEnd Sub\r\n\r\nPrivate Sub sldColorCount_Change()\r\n If (Not chkColorCount.Value) Then chkColorCount.Value = True\r\n UpdatePreviewSource\r\n UpdatePreview\r\nEnd Sub\r\n","avg_line_length":33.1532846715,"max_line_length":192,"alphanum_fraction":0.5887824747} {"size":2947,"ext":"vb","lang":"Visual Basic","max_stars_count":null,"content":"\ufeffImports System.IO\nImports PPC_Manager\n\nPublic Class ReportFactory\n Implements IReportFactory\n Private ReadOnly _DateiPfad As String\n Private ReadOnly _Altersgruppe As String\n Private ReadOnly _Spieler As IEnumerable(Of SpielerInfo)\n Private ReadOnly _SpielRunden As IEnumerable(Of SpielRunde)\n Private ReadOnly _HoleDokument As Func(Of String, ITurnierReport)\n Private ReadOnly _Vergleicher As IComparer(Of SpielerInfo)\n\n Public Sub New(dateipfad As String,\n altersgruppe As String,\n spieler As IEnumerable(Of SpielerInfo),\n vergleicher As IComparer(Of SpielerInfo),\n SpielRunden As IEnumerable(Of SpielRunde),\n holeDokument As Func(Of String, ITurnierReport))\n _DateiPfad = dateipfad\n _Altersgruppe = altersgruppe\n _Spieler = spieler\n _Vergleicher = vergleicher\n _SpielRunden = SpielRunden\n _HoleDokument = holeDokument\n End Sub\n\n Public Sub AutoSave() Implements IReportFactory.AutoSave\n SchreibeReport(ExcelPfad)\n End Sub\n\n Public Sub SchreibeReport(ByVal filePath As String) Implements IReportFactory.SchreibeReport\n Dim exportSpieler = _Spieler.ToList\n exportSpieler.Sort(_Vergleicher)\n exportSpieler.Reverse()\n Try\n\n Using ex = _HoleDokument(filePath)\n With ex\n Dim RundeNr = _SpielRunden.Count - 1\n .SchreibeRangliste(exportSpieler, RundeNr)\n\n Dim current = 1\n For Each runde In _SpielRunden.Reverse.Skip(1)\n .SchreibeNeuePartien(runde, current)\n current += 1\n Next\n End With\n End Using\n\n Catch ex As IOException\n Throw New Exception(\"Excel Datei konnte nicht geschrieben werden.\", ex)\n End Try\n End Sub\n\n Public Sub ExcelBeschreibbar() Implements IReportFactory.IstBereit\n Try\n If File.Exists(ExcelPfad) Then\n Using file = IO.File.OpenRead(ExcelPfad)\n\n End Using\n End If\n Catch ex As IOException\n Throw New ExcelNichtBeschreibbarException\n End Try\n End Sub\n\n\n Public ReadOnly Property ExcelPfad As String Implements IReportFactory.ExcelPfad\n Get\n Dim DateiName = IO.Path.GetFileNameWithoutExtension(_DateiPfad)\n DateiName &= \"_\" & _Altersgruppe\n For Each c In IO.Path.GetInvalidFileNameChars\n DateiName = DateiName.Replace(c, \"_\"c)\n Next\n DateiName = DateiName.Replace(\" \"c, \"_\"c)\n DateiName &= \".xlsx\"\n Dim Unterpfad = IO.Path.Combine(IO.Path.GetDirectoryName(_DateiPfad), \"Protokolle\")\n DateiName = IO.Path.Combine(Unterpfad, DateiName)\n Return DateiName\n End Get\n End Property\nEnd Class\n","avg_line_length":35.5060240964,"max_line_length":96,"alphanum_fraction":0.6240244316} {"size":2339,"ext":"vb","lang":"Visual Basic","max_stars_count":null,"content":"\ufeffImports Microsoft.Extensions.DependencyInjection\r\nImports Microsoft.Extensions.Logging 'NuGet Package\r\nImports Microsoft.Extensions.Logging.Console 'NuGet Package\r\n\r\nImports SharpDL 'NuGet Package\r\nImports SharpDL.Shared 'NuGet Package\r\n\r\nModule Main\r\n\r\n Function Main(ByVal cmdArgs() As String) As Integer\r\n 'MsgBox(\"The Main procedure is starting the application.\")\r\n Dim returnValue As Integer = 0\r\n ' See if there are any arguments.\r\n If cmdArgs.Length > 0 Then\r\n For argNum As Integer = 0 To UBound(cmdArgs, 1)\r\n ' Insert code to examine cmdArgs(argNum) and take\r\n ' appropriate action based on its value.\r\n Next\r\n End If\r\n ' Insert call to appropriate starting place in your code.\r\n\r\n Dim servProvider As ServiceProvider = GetServiceProvider()\r\n Dim mGame As IGame = servProvider.GetService(Of IGame)()\r\n mGame.Run()\r\n\r\n ' On return, assign appropriate value to returnValue.\r\n ' 0 usually means successful completion.\r\n MsgBox(\"The application is terminating with error level \" &\r\n CStr(returnValue) & \".\")\r\n Return returnValue\r\n End Function\r\n\r\n Private Function GetServiceProvider() As ServiceProvider\r\n Dim varServices As ServiceCollection = New ServiceCollection()\r\n ConfigureServices(varServices)\r\n Dim varServProvider As ServiceProvider = varServices.BuildServiceProvider()\r\n Return varServProvider\r\n End Function\r\n\r\n Private Sub ConfigureServices(ByVal vServices As ServiceCollection)\r\n vServices.AddSharpGame(Of EX_BlankWindow.MainGame)().AddLogging(Sub(config)\r\n config.AddConsole()\r\n End Sub).Configure(Of LoggerFilterOptions)(Sub(options)\r\n options.AddFilter(Of ConsoleLoggerProvider)(Nothing, LogLevel.Trace)\r\n End Sub)\r\n End Sub\r\n\r\nEnd Module\r\n\r\n","avg_line_length":46.78,"max_line_length":188,"alphanum_fraction":0.5515177426} {"size":747,"ext":"vb","lang":"Visual Basic","max_stars_count":3.0,"content":"\ufeffImports System\nImports System.Reflection\nImports System.Runtime.InteropServices\n\n' \u6709\u5173\u7a0b\u5e8f\u96c6\u7684\u4e00\u822c\u4fe1\u606f\u7531\u4ee5\u4e0b\n' \u63a7\u5236\u3002\u66f4\u6539\u8fd9\u4e9b\u7279\u6027\u503c\u53ef\u4fee\u6539\n' \u4e0e\u7a0b\u5e8f\u96c6\u5173\u8054\u7684\u4fe1\u606f\u3002\n\n'\u67e5\u770b\u7a0b\u5e8f\u96c6\u7279\u6027\u7684\u503c\n\n\n\n\n\n\n\n\n\n\n'\u5982\u679c\u6b64\u9879\u76ee\u5411 COM \u516c\u5f00\uff0c\u5219\u4e0b\u5217 GUID \u7528\u4e8e\u7c7b\u578b\u5e93\u7684 ID\n\n\n' \u7a0b\u5e8f\u96c6\u7684\u7248\u672c\u4fe1\u606f\u7531\u4e0b\u5217\u56db\u4e2a\u503c\u7ec4\u6210: \n'\n' \u4e3b\u7248\u672c\n' \u6b21\u7248\u672c\n' \u751f\u6210\u53f7\n' \u4fee\u8ba2\u53f7\n'\n'\u53ef\u4ee5\u6307\u5b9a\u6240\u6709\u8fd9\u4e9b\u503c\uff0c\u4e5f\u53ef\u4ee5\u4f7f\u7528\u201c\u751f\u6210\u53f7\u201d\u548c\u201c\u4fee\u8ba2\u53f7\u201d\u7684\u9ed8\u8ba4\u503c\uff0c\n' \u65b9\u6cd5\u662f\u6309\u5982\u4e0b\u6240\u793a\u4f7f\u7528\u201c*\u201d: :\n' \n\n\n\n","avg_line_length":20.75,"max_line_length":56,"alphanum_fraction":0.7121820616} {"size":2469,"ext":"frm","lang":"Visual Basic","max_stars_count":null,"content":"TYPE=VIEW\nquery=select `information_schema`.`statistics`.`TABLE_SCHEMA` AS `table_schema`,`information_schema`.`statistics`.`TABLE_NAME` AS `table_name`,`information_schema`.`statistics`.`INDEX_NAME` AS `index_name`,max(`information_schema`.`statistics`.`NON_UNIQUE`) AS `non_unique`,max(if(isnull(`information_schema`.`statistics`.`SUB_PART`),0,1)) AS `subpart_exists`,group_concat(`information_schema`.`statistics`.`COLUMN_NAME` order by `information_schema`.`statistics`.`SEQ_IN_INDEX` ASC separator \\',\\') AS `index_columns` from `information_schema`.`statistics` where ((`information_schema`.`statistics`.`INDEX_TYPE` = \\'BTREE\\') and (`information_schema`.`statistics`.`TABLE_SCHEMA` not in (\\'mysql\\',\\'sys\\',\\'INFORMATION_SCHEMA\\',\\'PERFORMANCE_SCHEMA\\'))) group by `information_schema`.`statistics`.`TABLE_SCHEMA`,`information_schema`.`statistics`.`TABLE_NAME`,`information_schema`.`statistics`.`INDEX_NAME`\nmd5=bed792c8dc165e42400b577587cf0beb\nupdatable=0\nalgorithm=1\ndefiner_user=mysql.sys\ndefiner_host=localhost\nsuid=0\nwith_check_option=0\ntimestamp=2021-09-25 08:11:39\ncreate-version=1\nsource=SELECT TABLE_SCHEMA, TABLE_NAME, INDEX_NAME, MAX(NON_UNIQUE) AS non_unique, MAX(IF(SUB_PART IS NULL, 0, 1)) AS subpart_exists, GROUP_CONCAT(COLUMN_NAME ORDER BY SEQ_IN_INDEX) AS index_columns FROM INFORMATION_SCHEMA.STATISTICS WHERE INDEX_TYPE=\\'BTREE\\' AND TABLE_SCHEMA NOT IN (\\'mysql\\', \\'sys\\', \\'INFORMATION_SCHEMA\\', \\'PERFORMANCE_SCHEMA\\') GROUP BY TABLE_SCHEMA, TABLE_NAME, INDEX_NAME\nclient_cs_name=utf8\nconnection_cl_name=utf8_general_ci\nview_body_utf8=select `information_schema`.`statistics`.`TABLE_SCHEMA` AS `table_schema`,`information_schema`.`statistics`.`TABLE_NAME` AS `table_name`,`information_schema`.`statistics`.`INDEX_NAME` AS `index_name`,max(`information_schema`.`statistics`.`NON_UNIQUE`) AS `non_unique`,max(if(isnull(`information_schema`.`statistics`.`SUB_PART`),0,1)) AS `subpart_exists`,group_concat(`information_schema`.`statistics`.`COLUMN_NAME` order by `information_schema`.`statistics`.`SEQ_IN_INDEX` ASC separator \\',\\') AS `index_columns` from `information_schema`.`statistics` where ((`information_schema`.`statistics`.`INDEX_TYPE` = \\'BTREE\\') and (`information_schema`.`statistics`.`TABLE_SCHEMA` not in (\\'mysql\\',\\'sys\\',\\'INFORMATION_SCHEMA\\',\\'PERFORMANCE_SCHEMA\\'))) group by `information_schema`.`statistics`.`TABLE_SCHEMA`,`information_schema`.`statistics`.`TABLE_NAME`,`information_schema`.`statistics`.`INDEX_NAME`\n","avg_line_length":154.3125,"max_line_length":915,"alphanum_fraction":0.7889833941} {"size":3187,"ext":"frm","lang":"Visual Basic","max_stars_count":null,"content":"TYPE=VIEW\nquery=select substring_index(`performance_schema`.`events_waits_summary_global_by_event_name`.`EVENT_NAME`,\\'\/\\',3) AS `event_class`,sum(`performance_schema`.`events_waits_summary_global_by_event_name`.`COUNT_STAR`) AS `total`,sum(`performance_schema`.`events_waits_summary_global_by_event_name`.`SUM_TIMER_WAIT`) AS `total_latency`,min(`performance_schema`.`events_waits_summary_global_by_event_name`.`MIN_TIMER_WAIT`) AS `min_latency`,ifnull((sum(`performance_schema`.`events_waits_summary_global_by_event_name`.`SUM_TIMER_WAIT`) \/ nullif(sum(`performance_schema`.`events_waits_summary_global_by_event_name`.`COUNT_STAR`),0)),0) AS `avg_latency`,max(`performance_schema`.`events_waits_summary_global_by_event_name`.`MAX_TIMER_WAIT`) AS `max_latency` from `performance_schema`.`events_waits_summary_global_by_event_name` where ((`performance_schema`.`events_waits_summary_global_by_event_name`.`SUM_TIMER_WAIT` > 0) and (`performance_schema`.`events_waits_summary_global_by_event_name`.`EVENT_NAME` <> \\'idle\\')) group by substring_index(`performance_schema`.`events_waits_summary_global_by_event_name`.`EVENT_NAME`,\\'\/\\',3) order by sum(`performance_schema`.`events_waits_summary_global_by_event_name`.`SUM_TIMER_WAIT`) desc\nmd5=9d840339684bda6a9e812ee3a26b89de\nupdatable=0\nalgorithm=1\ndefiner_user=mysql.sys\ndefiner_host=localhost\nsuid=0\nwith_check_option=0\ntimestamp=2022-05-28 20:55:48\ncreate-version=1\nsource=SELECT SUBSTRING_INDEX(event_name,\\'\/\\', 3) AS event_class, SUM(COUNT_STAR) AS total, SUM(sum_timer_wait) AS total_latency, MIN(min_timer_wait) AS min_latency, IFNULL(SUM(sum_timer_wait) \/ NULLIF(SUM(COUNT_STAR), 0), 0) AS avg_latency, MAX(max_timer_wait) AS max_latency FROM performance_schema.events_waits_summary_global_by_event_name WHERE sum_timer_wait > 0 AND event_name != \\'idle\\' GROUP BY SUBSTRING_INDEX(event_name,\\'\/\\', 3) ORDER BY SUM(sum_timer_wait) DESC\nclient_cs_name=utf8\nconnection_cl_name=utf8_general_ci\nview_body_utf8=select substring_index(`performance_schema`.`events_waits_summary_global_by_event_name`.`EVENT_NAME`,\\'\/\\',3) AS `event_class`,sum(`performance_schema`.`events_waits_summary_global_by_event_name`.`COUNT_STAR`) AS `total`,sum(`performance_schema`.`events_waits_summary_global_by_event_name`.`SUM_TIMER_WAIT`) AS `total_latency`,min(`performance_schema`.`events_waits_summary_global_by_event_name`.`MIN_TIMER_WAIT`) AS `min_latency`,ifnull((sum(`performance_schema`.`events_waits_summary_global_by_event_name`.`SUM_TIMER_WAIT`) \/ nullif(sum(`performance_schema`.`events_waits_summary_global_by_event_name`.`COUNT_STAR`),0)),0) AS `avg_latency`,max(`performance_schema`.`events_waits_summary_global_by_event_name`.`MAX_TIMER_WAIT`) AS `max_latency` from `performance_schema`.`events_waits_summary_global_by_event_name` where ((`performance_schema`.`events_waits_summary_global_by_event_name`.`SUM_TIMER_WAIT` > 0) and (`performance_schema`.`events_waits_summary_global_by_event_name`.`EVENT_NAME` <> \\'idle\\')) group by substring_index(`performance_schema`.`events_waits_summary_global_by_event_name`.`EVENT_NAME`,\\'\/\\',3) order by sum(`performance_schema`.`events_waits_summary_global_by_event_name`.`SUM_TIMER_WAIT`) desc\n","avg_line_length":199.1875,"max_line_length":1235,"alphanum_fraction":0.8355820521} {"size":3214,"ext":"frm","lang":"Visual Basic","max_stars_count":null,"content":"TYPE=VIEW\nquery=select `mt`.`THREAD_ID` AS `thread_id`,if((`t`.`NAME` = \\'thread\/sql\/one_connection\\'),concat(`t`.`PROCESSLIST_USER`,\\'@\\',`t`.`PROCESSLIST_HOST`),replace(`t`.`NAME`,\\'thread\/\\',\\'\\')) AS `user`,sum(`mt`.`CURRENT_COUNT_USED`) AS `current_count_used`,`sys`.`format_bytes`(sum(`mt`.`CURRENT_NUMBER_OF_BYTES_USED`)) AS `current_allocated`,`sys`.`format_bytes`(ifnull((sum(`mt`.`CURRENT_NUMBER_OF_BYTES_USED`) \/ nullif(sum(`mt`.`CURRENT_COUNT_USED`),0)),0)) AS `current_avg_alloc`,`sys`.`format_bytes`(max(`mt`.`CURRENT_NUMBER_OF_BYTES_USED`)) AS `current_max_alloc`,`sys`.`format_bytes`(sum(`mt`.`SUM_NUMBER_OF_BYTES_ALLOC`)) AS `total_allocated` from (`performance_schema`.`memory_summary_by_thread_by_event_name` `mt` join `performance_schema`.`threads` `t` on((`mt`.`THREAD_ID` = `t`.`THREAD_ID`))) group by `mt`.`THREAD_ID`,if((`t`.`NAME` = \\'thread\/sql\/one_connection\\'),concat(`t`.`PROCESSLIST_USER`,\\'@\\',`t`.`PROCESSLIST_HOST`),replace(`t`.`NAME`,\\'thread\/\\',\\'\\')) order by sum(`mt`.`CURRENT_NUMBER_OF_BYTES_USED`) desc\nmd5=f52d32948adcd2fc220877ecb408580f\nupdatable=0\nalgorithm=1\ndefiner_user=mysql.sys\ndefiner_host=localhost\nsuid=0\nwith_check_option=0\ntimestamp=2021-05-10 08:13:16\ncreate-version=1\nsource=SELECT thread_id, IF(t.name = \\'thread\/sql\/one_connection\\', CONCAT(t.processlist_user, \\'@\\', t.processlist_host), REPLACE(t.name, \\'thread\/\\', \\'\\')) user, SUM(mt.current_count_used) AS current_count_used, sys.format_bytes(SUM(mt.current_number_of_bytes_used)) AS current_allocated, sys.format_bytes(IFNULL(SUM(mt.current_number_of_bytes_used) \/ NULLIF(SUM(current_count_used), 0), 0)) AS current_avg_alloc, sys.format_bytes(MAX(mt.current_number_of_bytes_used)) AS current_max_alloc, sys.format_bytes(SUM(mt.sum_number_of_bytes_alloc)) AS total_allocated FROM performance_schema.memory_summary_by_thread_by_event_name AS mt JOIN performance_schema.threads AS t USING (thread_id) GROUP BY thread_id, IF(t.name = \\'thread\/sql\/one_connection\\', CONCAT(t.processlist_user, \\'@\\', t.processlist_host), REPLACE(t.name, \\'thread\/\\', \\'\\')) ORDER BY SUM(current_number_of_bytes_used) DESC\nclient_cs_name=utf8\nconnection_cl_name=utf8_general_ci\nview_body_utf8=select `mt`.`THREAD_ID` AS `thread_id`,if((`t`.`NAME` = \\'thread\/sql\/one_connection\\'),concat(`t`.`PROCESSLIST_USER`,\\'@\\',`t`.`PROCESSLIST_HOST`),replace(`t`.`NAME`,\\'thread\/\\',\\'\\')) AS `user`,sum(`mt`.`CURRENT_COUNT_USED`) AS `current_count_used`,`sys`.`format_bytes`(sum(`mt`.`CURRENT_NUMBER_OF_BYTES_USED`)) AS `current_allocated`,`sys`.`format_bytes`(ifnull((sum(`mt`.`CURRENT_NUMBER_OF_BYTES_USED`) \/ nullif(sum(`mt`.`CURRENT_COUNT_USED`),0)),0)) AS `current_avg_alloc`,`sys`.`format_bytes`(max(`mt`.`CURRENT_NUMBER_OF_BYTES_USED`)) AS `current_max_alloc`,`sys`.`format_bytes`(sum(`mt`.`SUM_NUMBER_OF_BYTES_ALLOC`)) AS `total_allocated` from (`performance_schema`.`memory_summary_by_thread_by_event_name` `mt` join `performance_schema`.`threads` `t` on((`mt`.`THREAD_ID` = `t`.`THREAD_ID`))) group by `mt`.`THREAD_ID`,if((`t`.`NAME` = \\'thread\/sql\/one_connection\\'),concat(`t`.`PROCESSLIST_USER`,\\'@\\',`t`.`PROCESSLIST_HOST`),replace(`t`.`NAME`,\\'thread\/\\',\\'\\')) order by sum(`mt`.`CURRENT_NUMBER_OF_BYTES_USED`) desc\n","avg_line_length":200.875,"max_line_length":1040,"alphanum_fraction":0.747977598} {"size":889,"ext":"vb","lang":"Visual Basic","max_stars_count":11.0,"content":"'===============================================================================\n' EntitySpaces 2009 by EntitySpaces, LLC\n' Persistence Layer and Business Objects for Microsoft .NET\n' EntitySpaces(TM) is a legal trademark of EntitySpaces, LLC\n' http:\/\/www.entityspaces.net\n'===============================================================================\n' EntitySpaces Version : 2010.1.0601.0\n' EntitySpaces Driver : SQL\n' Date Generated : 5\/30\/2010 10:55:12 AM\n'===============================================================================\n\nImports System\n\nImports EntitySpaces.Core\nImports EntitySpaces.Interfaces\nImports EntitySpaces.DynamicQuery\n\nNamespace BusinessObjects\n\n\tPartial Public Class TerritoryEx \n\t\tInherits esTerritoryEx\n\n Public Sub New()\n\t\t\t\n End Sub\t\t\t\n\t\t\n\tEnd Class\n\nEnd Namespace\n","avg_line_length":29.6333333333,"max_line_length":80,"alphanum_fraction":0.4926884139} {"size":1813,"ext":"vb","lang":"Visual Basic","max_stars_count":1.0,"content":"\ufeffImports Bowling.Bowling\nImports Bowling.Specflow.Drivers\nImports Microsoft.VisualStudio.TestTools.UnitTesting\nImports TechTalk.SpecFlow\n\nNamespace StepDefinitions\n \n Public Class BowlingSteps\n Private ReadOnly _driver As BowlingDriver\n\n Public Sub New(driver As BowlingDriver)\n _driver = driver\n End Sub\n\n \n Public Sub GivenANewBowlingGame()\n _driver.NewGame()\n End Sub\n\n <[When](\"all of my balls are landing in the gutter\")>\n Public Sub WhenAllOfMyBallsAreLandingInTheGutter()\n _driver.Roll(0, 20)\n End Sub\n\n <[When](\"all of my rolls are strikes\")>\n Public Sub WhenAllOfMyRollsAreStrikes()\n _driver.Roll(10, 12)\n End Sub\n\n <[Then](\"my total score should be (\\d+)\")>\n Public Sub ThenMyTotalScoreShouldBe(score As Integer)\n _driver.CheckScore(score)\n End Sub\n\n <[When](\"I roll (\\d+)\")>\n Public Sub WhenIRoll(pins As Integer)\n _driver.Roll(pins, 1)\n End Sub\n\n <[When](\"I roll (\\d+) and (\\d+)\")>\n Public Sub WhenIRoll(pins1 As Integer, pins2 As Integer)\n _driver.Roll(pins1, pins2, 1)\n End Sub\n\n <[When](\"I roll (\\d+) times (\\d+) and (\\d+)\")>\n Public Sub WhenIRollSeveralTimes2(rollCount As Integer, pins1 As Integer, pins2 As Integer)\n _driver.Roll(pins1, pins2, rollCount)\n End Sub\n\n <[When](\"I roll the following series:(.*)\")>\n Public Sub WhenIRollTheFollowingSeries(series As String)\n _driver.RollSeries(series)\n End Sub\n\n <[When](\"I roll\")>\n Public Sub WhenIRoll(rolls As Table)\n _driver.RollSeries(rolls)\n End Sub\n End Class\nEnd Namespace\n\n\n","avg_line_length":28.7777777778,"max_line_length":99,"alphanum_fraction":0.6039713183} {"size":100793,"ext":"vb","lang":"Visual Basic","max_stars_count":null,"content":"\ufeff' ______________________________________________________________________________\r\n'\r\n' Copyright \u00a92008 Gary Guo All Rights Reserved \r\n' ______________________________________________________________________________\r\n\r\n' Product: Breakout Video game\r\n' Release: Beta \r\n' Platform: Windows XP , Windows Vista\r\n' Date: Jan 18, 2009\r\n\r\n' TERMS OF USE:\r\n' This program is free software. Redistribution in the form of source code or compiled application, \r\n' strictly for non-profit purposes, with or without modification is permitted. \r\n' The author accepts no liability for anything that may result from the usage of \r\n' this product. This notice must not be removed or altered in any way whatsoever. \r\n'\r\n'*******************************************************************************\r\n'IMPORTANT: THE USE OF SMALLEND IS COPYRIGHTED AND YES SMALLEND IS A WORD!!!!!!\r\n'*******************************************************************************\r\n' ______________________________________________________________________________\r\n\r\nImports System.IO\r\nPublic Class frmGame\r\n\r\n Private Declare Function GetAsyncKeyState Lib \"user32\" (ByVal vKey As Integer) As Short\r\n Private Declare Function ShowCursor Lib \"user32\" (ByVal bShow As Long) As Long\r\n Private Declare Function EnumDisplaySettings Lib \"user32\" Alias \"EnumDisplaySettingsA\" (ByVal lpszDeviceName As Integer, ByVal iModeNum As Integer, ByRef lpDevMode As DEVMODE) As Boolean\r\n Private Declare Function ChangeDisplaySettings Lib \"user32\" Alias \"ChangeDisplaySettingsA\" (ByRef lpDevMode As DEVMODE, ByVal dwflags As Integer) As Integer\r\n Private Const ENUM_CURRENT_SETTINGS As Integer = -1&\r\n Private Const CCDEVICENAME As Short = 32\r\n Private Const CCFORMNAME As Short = 32\r\n Private Const DM_BITSPERPEL = &H60000\r\n Private Const DM_PELSWIDTH As Integer = &H80000\r\n Private Const DM_PELSHEIGHT As Integer = &H100000\r\n Private Const DM_DISPLAYFREQUENCY As Integer = &H400000\r\n\r\n Dim aiPad As PictureBox\r\n Dim copy, numOfBalls, primeBall, ballz, he, blocksDestroyed, winnumreq, startnum As Integer\r\n Dim x(9), y(9) As Double\r\n Dim block(100) As Button\r\n Dim powerupPic(9, 40) As PictureBox\r\n Dim picCannon As PictureBox\r\n Dim powerup(9) As Integer\r\n Dim ball(9) As PictureBox\r\n Dim CannonActivate As Integer\r\n Dim fps As Integer\r\n Dim numNorm, numS, numM, numSlow, numFast, numExpand, numShrink, numC, numFire, numL, numSticky, numShield As Integer\r\n Dim cannonshot As PictureBox\r\n Dim shotnum As Integer\r\n Dim life As Integer\r\n Dim powerups As Integer\r\n Dim fireBall As Integer\r\n Dim stickyP As PictureBox\r\n Dim stickyPadEnabled As Integer\r\n Dim ballStickCount As Integer\r\n Dim ballstuck As Integer\r\n Dim ballstuckposition As Single\r\n Dim score As Integer\r\n Dim fullscreenalt As Integer\r\n Dim padsections As Integer\r\n Dim ballpos As Integer\r\n Dim highScore As Integer\r\n Dim blockbreak(9) As Integer\r\n Dim slope As Single\r\n Dim ballSpeed As Single\r\n Dim blockdestroyed As Integer = 0\r\n Dim hitsideR, hitsideL As Integer\r\n Dim degree, randomAngle As Single\r\n Dim ScrnRes As System.Drawing.Size = System.Windows.Forms.SystemInformation.PrimaryMonitorSize\r\n Dim picBreakout As PictureBox\r\n Dim picNewgame As PictureBox\r\n Dim picHowTo As PictureBox\r\n Dim picOptions As PictureBox\r\n Dim picAbout As PictureBox\r\n Dim picExit As PictureBox\r\n Dim fileDate As DateTime\r\n Dim fileName As String\r\n Dim shieldThickness As Integer\r\n Dim shield As PictureBox\r\n Dim hitTop As Integer\r\n Dim hitBottom As Integer\r\n Dim aiBotEnabled As Boolean\r\n Dim objFSO As Object\r\n\r\n Public locked As Boolean = True\r\n Public level As Integer\r\n Public maxSpeed As Integer = 12\r\n Public ballStartSpeed As Integer = 5\r\n Public startLives As Integer = 5\r\n Public gameDifficulty As Integer\r\n Public pause As Integer\r\n Private Structure DEVMODE\r\n\r\n Public dmDeviceName As String\r\n Dim dmSpecVersion As Short\r\n Dim dmDriverVersion As Short\r\n Dim dmSize As Short\r\n Dim dmDriverExtra As Short\r\n Dim dmFields As Integer\r\n Dim dmOrientation As Short\r\n Dim dmPaperSize As Short\r\n Dim dmPaperLength As Short\r\n Dim dmPaperWidth As Short\r\n Dim dmScale As Short\r\n Dim dmCopies As Short\r\n Dim dmDefaultSource As Short\r\n Dim dmPrintQuality As Short\r\n Dim dmColor As Short\r\n Dim dmDuplex As Short\r\n Dim dmYResolution As Short\r\n Dim dmTTOption As Short\r\n Dim dmCollate As Short\r\n Public dmFormName As String\r\n Dim dmUnusedPadding As Short\r\n Dim dmBitsPerPel As Integer\r\n Dim dmPelsWidth As Integer\r\n Dim dmPelsHeight As Integer\r\n Dim dmDisplayFlags As Integer\r\n Dim dmDisplayFrequency As Integer\r\n\r\n End Structure\r\n Public Sub powerupInteract()\r\n 'Powerup movement\r\n Dim x, y As Integer\r\n For x = 0 To 9\r\n For y = 0 To (powerup(x) - 1)\r\n powerupPic(x, y).Top += 4 'Move powerups\r\n If Pad.Right >= powerupPic(x, y).Left And Pad.Bottom >= powerupPic(x, y).Top And Pad.Left <= powerupPic(x, y).Right And Pad.Top < powerupPic(x, y).Bottom Then\r\n txtAnnouncement.BackColor = Color.Red\r\n 'If pad touches a powerup\r\n Select Case x 'Select powerup type\r\n Case 0\r\n multiball() 'Add another ball into play\r\n txtAnnouncement.Text = \"Multiball Powerup Acquired!\"\r\n Case 1\r\n If Pad.Width < 85 Then 'Check pad's length \r\n Pad.Width = Pad.Width + 10 'Increase pad length\r\n txtAnnouncement.Text = \"Your pad has been lengthened!\"\r\n End If\r\n Case 2\r\n If Pad.Width > 30 Then 'Check pad's length\r\n Pad.Width = Pad.Width - 10 'Decrease pad length\r\n txtAnnouncement.Text = \"Your pad has been smallend\"\r\n End If\r\n Case 3\r\n If CannonActivate <> 1 Then 'Check if powerup is already enabled\r\n cannon() 'Enables cannon powerup\r\n End If\r\n txtAnnouncement.Text = \"Cannon activated! Click to shoot lasers\"\r\n Case 4\r\n slowdown() 'Slow down ball\r\n txtAnnouncement.Text = \"Ball speed decreased!\"\r\n Case 5\r\n speedup() 'Speed up ball\r\n txtAnnouncement.Text = \"Ball speed increased!\"\r\n Case 6\r\n life += 1 'Add a life\r\n txtAnnouncement.Text = \"Lives Increased!\"\r\n Case 7\r\n fireBall = 1 'Enable fireball powerup\r\n For xx = 0 To numOfBalls\r\n ball(xx).Image = My.Resources.FireBall 'Redraw all balls\r\n Next\r\n txtAnnouncement.Text = \"Fireball powerup activated! Ball is now able to go through blocks!\"\r\n Case 8\r\n If stickyPadEnabled <> 1 Then 'Check if powerup is already enabled\r\n stickypad() 'Enabled stick pad powerup\r\n End If\r\n txtAnnouncement.Text = \"Sticky Pad Activated! Balls with now stick to pad!\"\r\n Case 9\r\n shield.Visible = True\r\n\r\n If shieldThickness < 3 Then\r\n shieldThickness += 1\r\n End If\r\n shieldhit()\r\n txtAnnouncement.Text = \"Shield Activated!\"\r\n End Select\r\n powerupPic(x, y).Top = 600\r\n powerups -= 1\r\n ElseIf powerupPic(x, y).Top > PlayField.Bottom And powerupPic(x, y).Top < 500 Then\r\n powerupPic(x, y).Top = 600 'Makes the power up disappear when it reaches the bottom of the field\r\n powerups -= 1 'Subtract from the number of power ups dropping on the screen\r\n End If\r\n Next\r\n Next\r\n End Sub\r\n Private Sub shieldhit()\r\n Select Case shieldThickness\r\n Case 0\r\n shield.Visible = False\r\n Case 1\r\n shield.BackColor = Color.Yellow\r\n Case 2\r\n shield.BackColor = Color.Orange\r\n Case 3\r\n shield.BackColor = Color.Red\r\n End Select\r\n End Sub\r\n Public Sub drawShield()\r\n shield = New PictureBox\r\n With shield\r\n .Location = New System.Drawing.Point(PlayField.Left, recStatus.Top - 5)\r\n .Size = New System.Drawing.Size(PlayField.Width, 3)\r\n .SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom\r\n shield.BackColor = Color.Yellow\r\n .Visible = False\r\n Me.Controls.Add(shield)\r\n End With\r\n shield.BringToFront()\r\n End Sub\r\n Public Sub stickypad()\r\n 'Draws the new pad\r\n Pad.Image = My.Resources.stickyPad\r\n Pad.Size = New System.Drawing.Size(Pad.Width, 20)\r\n Pad.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage\r\n Me.Controls.Add(Pad)\r\n stickyPadEnabled = 1 'Enable sticky pad powerup\r\n ballStickCount = 0 'Resets the # of balls stuck to the pad\r\n End Sub\r\n Public Sub slowdown()\r\n For xx = 0 To numOfBalls 'Slows down all balls\r\n x(xx) \/= 1.3\r\n y(xx) \/= 1.3\r\n Next\r\n End Sub\r\n Public Sub speedup()\r\n For xx = 0 To numOfBalls 'Speeds up all balls\r\n x(xx) *= 1.3\r\n y(xx) *= 1.3\r\n Next\r\n End Sub\r\n Public Sub cannon()\r\n 'Draws the cannon\r\n picCannon = New System.Windows.Forms.PictureBox\r\n picCannon.Image = My.Resources.Cannon\r\n picCannon.Location = New System.Drawing.Point(300, Pad.Top - 20)\r\n picCannon.Size = New System.Drawing.Size(13, 25)\r\n picCannon.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom\r\n picCannon.Visible = True\r\n picCannon.BackColor = Color.Transparent\r\n Me.Controls.Add(picCannon)\r\n CannonActivate = 1 'Enabale cannon powerup\r\n shotnum = 0 'Reset the number of cannonshots\r\n End Sub\r\n Public Sub ballinter()\r\n For xx = 0 To numOfBalls\r\n If y(xx) < 0.5 And y(xx) > -0.5 And ball(xx).Visible = True Then 'Stops the ball from going at a too steep angle\r\n y(xx) = 1\r\n End If\r\n\r\n If ballStickCount <> 1 Or stickyPadEnabled <> 1 Or xx <> ballstuck Then\r\n 'If ball is not stuck to paddle then move the ball\r\n ball(xx).Left = ball(xx).Left + x(xx)\r\n ball(xx).Top = ball(xx).Top + y(xx)\r\n End If\r\n\r\n If ball(xx).Top <= PlayField.Top Then\r\n If aiBotEnabled = False Then\r\n 'If the ball goes out of the form then\r\n score += 10 'Add 10 points to the score\r\n ball(xx).Top = PlayField.Top + 1 'Relocate the ball to somewhere inside the form\r\n y(xx) = y(xx) * -1 'Reverse ball's y movement\r\n Else\r\n If life <> 0 Then\r\n ballInteract.Enabled = False\r\n saveHighScore()\r\n MsgBox(\"You WIN. The password to unlocking game is smallend! SMALLEND IS A WORD!\")\r\n reloadMenu()\r\n End If\r\n End If\r\n End If\r\n If ball(xx).Left < PlayField.Left Then\r\n 'If the ball's left is below 0\r\n If xx <> ballstuck Then 'Check if the ball is stuck to the pad\r\n score += 20 'Add 20 points to score\r\n End If\r\n ball(xx).Left = PlayField.Left + 1\r\n x(xx) = x(xx) * -1\r\n End If\r\n If ball(xx).Right > PlayField.Right Then\r\n 'If the ball's right is below 0\r\n If xx <> ballstuck Then 'Check if the ball is stuck to the pad\r\n score += 20 'Add 20 points to score\r\n End If\r\n ball(xx).Left = PlayField.Right - ball(xx).Width - 1\r\n x(xx) = x(xx) * -1\r\n End If\r\n If ball(xx).Top >= PlayField.Bottom Then\r\n 'If the ball hit the bottom\r\n ballz -= 1 'Decrease the balls count\r\n If ballz = 0 Then 'If there are no more balls in play then\r\n If life = 1 Then 'If there is only one life left then...\r\n life -= 1\r\n Me.Text = \"Game Over\" 'Set the forms caption to read 'Game Over'\r\n cmdReset.Visible = True 'Make the reset buttone visible\r\n resetpad() 'Resets the pad to the normal size and disables sticky pad\r\n saveHighScore()\r\n Else\r\n cannonshot.Visible = False\r\n lblLives.Text = \"Lives: \" & life\r\n cmdTryAgain.Visible = True\r\n ballInteract.Enabled = False\r\n timerStart.Enabled = False\r\n If CannonActivate = 1 Then 'If the cannon power up is active\r\n picCannon.Visible = False 'Hide the cannon\r\n CannonActivate = 0 'Disable the cannon powerup\r\n End If\r\n ball(xx).Visible = False\r\n fireBall = 0\r\n life -= 1\r\n End If\r\n Else 'If there are still more balls in play then\r\n x(xx) = 0 'Stop ball's movement\r\n y(xx) = 0\r\n ball(xx).Visible() = False 'Make ball invisible\r\n ball(xx).Top = -50 'Move ball out of the form\r\n ball(xx).Left = -50\r\n\r\n If xx = primeBall Then 'If the ball removed was the primary ball\r\n Try\r\n Do While ball(copy).Visible = False\r\n 'Make another ball that is still in play the primary ball\r\n copy += 1\r\n primeBall = copy\r\n Loop\r\n Catch\r\n primeBall = 0\r\n End Try\r\n End If\r\n End If\r\n End If\r\n\r\n If shield.Visible = True And ball(xx).Bottom > shield.Top Then\r\n shieldThickness -= 1\r\n shieldhit()\r\n y(xx) = y(xx) * -1 'Reverse ball's y movement\r\n End If\r\n\r\n blockbreak(xx) = 1\r\n\r\n ballpos = ball(xx).Left + ball(xx).Width \/ 2 'Gets the x cordinate of the ball\r\n\r\n If ball(xx).Top + ball(xx).Height >= Pad.Top And ball(xx).Top < Pad.Bottom - 7 And ball(xx).Left + ball(xx).Width >= Pad.Left And ball(xx).Left <= Pad.Left + Pad.Width Then\r\n 'If ball(xx)(xx) hits front of pad\r\n\r\n If Math.Abs(x(xx)) + Math.Abs(y(xx)) > maxSpeed Then 'If the ball's speed is too great then...\r\n If Math.Abs(x(xx)) > maxSpeed \/ 2 Then 'Checks the x axis speed\r\n x(xx) = x(xx) \/ 2 'And modifies it to a slower speed\r\n ElseIf Math.Abs(y(xx)) > maxSpeed > maxSpeed \/ 2 Then 'Checks the y axis speed\r\n y(xx) = y(xx) \/ 2 'And modifies it to a slower speed\r\n End If\r\n End If\r\n\r\n ballSpeed = Math.Abs(x(xx)) + Math.Abs(y(xx))\r\n\r\n If ballStickCount = 0 And stickyPadEnabled = 1 Then 'if no balls are stuck to the pad and stickypad power up is enabled then...\r\n\r\n ballStickCount = 1 'Records that 1 ball is stuck to the pad\r\n ballstuck = xx 'records which ball is stuck\r\n ballstuckposition = ball(ballstuck).Left - Pad.Left 'records where the ball was stuck at\r\n\r\n ballstick()\r\n\r\n End If\r\n score += 30\r\n\r\n ballSpeed += 0.2\r\n\r\n If Math.Abs(Val(x(xx))) <= 0.8 Then 'Prevents repeated ball movement patterns\r\n x(xx) = 2\r\n ElseIf (ball(xx).Left + ball(xx).Width \/ 2) < (Pad.Left + Pad.Width \/ 2) Then\r\n 'if the ball(xx)(xx) is to the left\r\n 'of the pads centre then\r\n slope = ((ball(xx).Left + ball(xx).Width \/ 2) - Pad.Left) \/ (Pad.Width \/ 2) ' Collision Left half of Bar\r\n If slope < 0.3 Then slope = 0.3 'If the ball lands too close to left border of the pad, use 0.2\r\n y(xx) = -1 * (slope * ballSpeed) 'Get new y Speed\r\n x(xx) = ballSpeed + y(xx) 'Get new x Speed\r\n If x(xx) > 0 Then 'if ball is going right\r\n x(xx) = x(xx) * -1.05 'make it go left\r\n End If\r\n Else 'the ball(xx)(xx) must be on the right of the pad\r\n slope = (Pad.Right - (ball(xx).Left + ball(xx).Width \/ 2)) \/ (Pad.Width \/ 2) ' Collision Left half of Bar\r\n If slope < 0.3 Then slope = 0.3 'If the ball lands too close to right border of the pad, use 0.2\r\n y(xx) = -1 * (slope * ballSpeed) 'Get new y Speed\r\n x(xx) = ballSpeed + y(xx) 'Get new x Speed\r\n If x(xx) < 0 Then 'if ball is going left\r\n x(xx) = x(xx) * -1.05 'make it go right\r\n End If\r\n End If\r\n\r\n ball(xx).Top = Pad.Top - ball(xx).Height - 1\r\n\r\n\r\n End If\r\n\r\n If stickyPadEnabled = 1 And ballStickCount = 1 And xx = ballstuck Then\r\n 'If sticky pad is enabled and a ball hits the pad\r\n ballstick() 'Make the ball stuck to the pad\r\n End If\r\n\r\n If aiBotEnabled = True Then\r\n ballSpeed = Math.Abs(x(xx)) + Math.Abs(y(xx))\r\n If ball(xx).Top <= aiPad.Bottom And ball(xx).Bottom >= aiPad.Top And ball(xx).Right >= aiPad.Left And ball(xx).Left <= aiPad.Right Then\r\n ball(xx).Top = aiPad.Bottom + 1\r\n If Math.Abs(x(xx)) + Math.Abs(y(xx)) > maxSpeed Then 'If the ball's speed is too great then...\r\n If x(xx) > maxSpeed \/ 2 Then 'Checks the x axis speed\r\n x(xx) = maxSpeed \/ 2 'And modifies it to a slower speed\r\n ElseIf y(xx) > maxSpeed \/ 2 Then 'Checks the y axis speed\r\n y(xx) = maxSpeed \/ 2 'And modifies it to a slower speed\r\n End If\r\n End If\r\n If (ball(xx).Left + ball(xx).Width \/ 2) < (aiPad.Left + aiPad.Width \/ 2) Then\r\n 'if the ball(xx)(xx) is to the left\r\n 'of the pads centre then\r\n slope = ((ball(xx).Left + ball(xx).Width \/ 2) - aiPad.Left) \/ (aiPad.Width \/ 2) ' Collision Left half of Bar\r\n If slope < 0.3 Then slope = 0.3 'If the ball lands too close to left border of the pad, use 0.2\r\n y(xx) = (slope * ballSpeed) 'Get new y Speed\r\n x(xx) = ballSpeed + y(xx) 'Get new x Speed\r\n If x(xx) > 0 Then 'if ball is going right\r\n x(xx) = x(xx) * -1.05 'make it go left\r\n End If\r\n Else 'the ball(xx)(xx) must be on the right of the pad\r\n slope = (aiPad.Right - (ball(xx).Left + ball(xx).Width \/ 2)) \/ (aiPad.Width \/ 2) ' Collision Left half of Bar\r\n If slope < 0.3 Then slope = 0.3 'If the ball lands too close to right border of the pad, use 0.2\r\n y(xx) = (slope * ballSpeed) 'Get new y Speed\r\n x(xx) = ballSpeed + y(xx) 'Get new x Speed\r\n If x(xx) < 0 Then 'if ball is going left\r\n x(xx) = x(xx) * -1.05 'make it go right\r\n End If\r\n End If\r\n End If\r\n Call aiMove()\r\n End If\r\n\r\n For b = 0 To (winnumreq - 1)\r\n If Not ((ball(xx).Left + x(xx) > block(b).Right) Or _\r\n (ball(xx).Top + y(xx) > block(b).Bottom) Or _\r\n (ball(xx).Bottom + y(xx) < block(b).Top) Or _\r\n (ball(xx).Right + x(xx) < block(b).Left)) Then\r\n 'Detect if the ball will go inside\/hit a block\r\n If ball(xx).Left >= block(b).Right Then\r\n\r\n ball(xx).Left = block(b).Right + 1\r\n hitsideL = block(b).Right\r\n\r\n ElseIf ball(xx).Right <= block(b).Left Then\r\n\r\n ball(xx).Left = block(b).Left - ball(xx).Width - 1\r\n hitsideR = block(b).Left - ball(xx).Width\r\n\r\n ElseIf ball(xx).Top >= block(b).Bottom Then\r\n\r\n ball(xx).Top = block(b).Bottom\r\n hitBottom = block(b).Bottom\r\n\r\n ElseIf ball(xx).Bottom <= block(b).Top Then\r\n\r\n ball(xx).Top = block(b).Top - ball(xx).Height\r\n hitTop = block(b).Top\r\n\r\n End If\r\n End If\r\n If ((hitsideR = block(b).Left - ball(xx).Width And hitsideL = block(b).Right) Or _\r\n (ball(xx).Left <= block(b).Right And ball(xx).Right >= block(b).Left) And _\r\n ball(xx).Bottom >= block(b).Top And ball(xx).Top <= block(b).Bottom) Or _\r\n (cannonshot.Right > block(b).Left And cannonshot.Left < block(b).Right And _\r\n cannonshot.Top <= block(b).Bottom) Then\r\n 'If the ball\/cannonshot hits a block then...\r\n\r\n If (cannonshot.Right > block(b).Left And cannonshot.Left < block(b).Right And _\r\n cannonshot.Top <= block(b).Bottom) Then\r\n shotnum = 0\r\n cannonshot.Visible = False\r\n End If\r\n\r\n Dim it As Integer ' Function of block and destroyed block count\r\n\r\n For it = 0 To numNorm 'Function of normal block\r\n If aiBotEnabled = False Then\r\n blocksDestroyed += blocknorm(block(it))\r\n End If\r\n Next\r\n\r\n For it = (numNorm + 1) To (numS + numNorm) 'Function of multiball block\r\n blocksDestroyed += blockS(block(it))\r\n Next\r\n\r\n For it = (numNorm + numS + 1) To (numNorm + numS + numExpand) 'Function of expand pad block\r\n blocksDestroyed += blockExpand(block(it))\r\n Next\r\n\r\n For it = (numNorm + numS + numExpand + 1) To (numNorm + numS + numExpand + numShrink) 'Function of shorten block\r\n blocksDestroyed += blockShrink(block(it))\r\n Next\r\n\r\n For it = (numNorm + numS + numExpand + 1 + numShrink) To (numNorm + numS + numExpand + numShrink + numC) 'Function of cannon block\r\n blocksDestroyed += blockC(block(it))\r\n Next\r\n\r\n For it = (numNorm + numS + numExpand + 1 + numShrink + numC) To (numNorm + numS + numExpand + numShrink + numC + numFast) 'Function of fastball block\r\n blocksDestroyed += BlockFast(block(it))\r\n Next\r\n\r\n For it = (numNorm + numS + numExpand + 1 + numShrink + numC + numFast) To (numNorm + numS + numExpand + numShrink + numC + numFast + numSlow) 'Function of slow ball block\r\n blocksDestroyed += BlockSlow(block(it))\r\n Next\r\n\r\n For it = (numNorm + numS + numExpand + 1 + numShrink + numC + numFast + numSlow) To (numNorm + numS + numExpand + numShrink + numC + numFast + numSlow + numFire) 'Function of fireball block\r\n blocksDestroyed += blockFire(block(it))\r\n Next\r\n\r\n For it = (numNorm + numS + numExpand + 1 + numShrink + numC + numFast + numSlow + numFire) To (numNorm + numS + numExpand + numShrink + numC + numFast + numSlow + numFire + numL) 'Function of life block\r\n blocksDestroyed += blockL(block(it))\r\n Next\r\n\r\n For it = (numNorm + numS + numExpand + 1 + numShrink + numC + numFast + numSlow + numFire + numL) To (numNorm + numS + numExpand + numShrink + numC + numFast + numSlow + numFire + numL + numSticky) 'Function of sticky pad block\r\n blocksDestroyed += blockSticky(block(it))\r\n Next\r\n\r\n For it = (numNorm + numS + numExpand + 1 + numShrink + numC + numFast + numSlow + numFire + numL + numSticky) To (numNorm + numS + numExpand + numShrink + numC + numFast + numSlow + numFire + numL + numSticky + numShield) 'Function of metal block\r\n blocksDestroyed += blockShield(block(it))\r\n Next\r\n\r\n For it = (numNorm + numS + numExpand + 1 + numShrink + numC + numFast + numSlow + numFire + numL + numSticky + numShield) To (numShield + numNorm + numS + numExpand + numShrink + numC + numFast + numSlow + numFire + numL + numSticky + numM) 'Function of metal block\r\n blocksDestroyed += blockm(block(it))\r\n Next\r\n End If\r\n Next\r\n Next\r\n End Sub\r\n Private Sub aiMove()\r\n For xx = 0 To numOfBalls\r\n If ball(xx).Top < Me.Height \/ 2 Then\r\n If ball(xx).Left > aiPad.Right Then\r\n aiPad.Left += 15\r\n ElseIf ball(xx).Right < aiPad.Left Then\r\n aiPad.Left -= 15\r\n End If\r\n Else\r\n If aiPad.Left < 280 Then\r\n aiPad.Left += 10\r\n ElseIf aiPad.Right > 350 Then\r\n aiPad.Left -= 10\r\n End If\r\n End If\r\n Next\r\n End Sub\r\n Private Sub ballstick()\r\n 'Force ball to stick to pad\r\n ball(ballstuck).Left = Pad.Left + ballstuckposition\r\n ball(ballstuck).Top = Pad.Top - ball(ballstuck).Height - 1\r\n End Sub\r\n\r\n Public Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load\r\n loadmenu() 'Load game menu\r\n LoadConfigurations() 'Load game configurations\r\n If locked = True Then\r\n menuDifficulty.Enabled = False\r\n End If\r\n\t\tme.text = \"Breakout\"\r\n End Sub\r\n Public Sub Createball()\r\n 'Creates a ball\r\n ball(0) = New PictureBox\r\n ball(0).Image = My.Resources.ball\r\n ball(0).SizeMode = PictureBoxSizeMode.Zoom\r\n ball(0).BackColor = Color.Transparent\r\n ball(0).Location = New System.Drawing.Point(312, Pad.Top - 22)\r\n ball(0).Name = \"ball(0)\"\r\n ball(0).Size = New System.Drawing.Size(15, 15)\r\n ball(0).Enabled = False\r\n Me.Controls.Add(ball(0))\r\n End Sub\r\n Private Sub PaintBlocks()\r\n Dim X As Integer ' Paints all the block on a level\r\n\r\n For X = 0 To numNorm 'Draw normal block\r\n With block(X)\r\n .Size = New System.Drawing.Size(70, 15)\r\n If .FlatStyle = FlatStyle.Standard Then\r\n .FlatStyle = FlatStyle.Flat\r\n Else\r\n .FlatStyle = FlatStyle.Standard\r\n .Enabled = False\r\n End If\r\n .FlatAppearance.BorderSize = 0\r\n .Image = My.Resources.BlockNorm\r\n Me.Controls.Add(block(X))\r\n End With\r\n Next\r\n For X = (numNorm + 1) To (numNorm + numS + numExpand + numShrink + numC + numFast + numSlow + numFire + numL + numSticky + numM + numShield)\r\n 'Draw special blocks\r\n With block(X)\r\n .Size = New System.Drawing.Size(70, 15)\r\n .Visible = True\r\n .FlatStyle = FlatStyle.Flat\r\n .FlatAppearance.BorderSize = 0\r\n .Image = My.Resources.BlockS\r\n Me.Controls.Add(block(X))\r\n End With\r\n Next\r\n For X = (numNorm + numS + numExpand + 1 + numShrink + numC + numFast + numSlow + numFire + numL + numSticky + numShield) To (numNorm + numS + numExpand + numShrink + numC + numFast + numSlow + numFire + numL + numSticky + numM + numShield)\r\n 'Draw metal block\r\n With block(X)\r\n .Size = New System.Drawing.Size(70, 15)\r\n .Visible = True\r\n .FlatStyle = FlatStyle.Flat\r\n .FlatAppearance.BorderSize = 0\r\n .Image = My.Resources.metalBlock\r\n Me.Controls.Add(block(X))\r\n End With\r\n Next\r\n End Sub\r\n Private Sub blockDes()\r\n 'All block destoryed\r\n\r\n If powerups = 0 Then 'Check if any power ups are still dropping\r\n x(0) = 0 'Sets x speed of the primary ball as 0 and stops ball\r\n y(0) = 0 'Sets y speed of the primary ball as 0 and stops ball\r\n lvlclear()\r\n For xx = 1 To numOfBalls 'Stops all other balls\r\n x(xx) = 0\r\n y(xx) = 0\r\n Next\r\n If CannonActivate = 1 Then 'CHeck if cannon powerup is enabled\r\n 'Disable cannon powerup\r\n CannonActivate = 0\r\n picCannon.Visible = False 'Make cannon invisible\r\n cannonshot.Left = -20 'Move cannon out of the form\r\n End If\r\n cmdNext.Visible = True 'Make the \"next level\" button visible\r\n startnum = 0 'Glues ball onto the pad\r\n\r\n timerStart.Enabled = True 'Start start timer\r\n End If\r\n\r\n End Sub\r\n Public Sub resetAll()\r\n 'Resets values for most of the active variables\r\n Dim x As Integer\r\n blocksDestroyed = 0\r\n numOfBalls = 0\r\n numOfBalls = 0\r\n For x = 0 To 9\r\n powerup(x) = 0\r\n Next\r\n If CannonActivate = 1 Then\r\n CannonActivate = 0\r\n picCannon.Visible = False\r\n End If\r\n fireBall = 0\r\n numNorm = 0\r\n numS = 0\r\n numSlow = 0\r\n numFast = 0\r\n numFire = 0\r\n numL = 0\r\n numSticky = 0\r\n numM = 0\r\n numExpand = 0\r\n numShrink = 0\r\n numC = 0\r\n numShield = 0\r\n shieldThickness = 0\r\n shield.Visible = False\r\n End Sub\r\n Private Sub resetpad() '\r\n ' Resets pad\r\n stickyPadEnabled = 0 'Disable stick pad power up\r\n Pad.Image = My.Resources.Pad 'Resets image of the pad\r\n Pad.Size = New System.Drawing.Size(60, 20) 'Resets size of the pad\r\n End Sub\r\n Public Sub lvl()\r\n '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''\r\n '''''''''''''''''''''''LEVELS''''''''''''''''''''''''''''''''''''\r\n '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''\r\n 'generates breakout levels based on the value of variable \"level\"\r\n Dim z As Integer\r\n Select Case level\r\n\r\n Case 1\r\n Me.BackgroundImage = My.Resources.blueBG\r\n winnumreq = 14\r\n numNorm = 13\r\n z = 0\r\n For xx = 0 To numNorm\r\n he = 100\r\n\r\n If xx > 6 Then\r\n he = 130\r\n z = 7\r\n End If\r\n block(xx) = New Button()\r\n block(xx).Location = New System.Drawing.Point(PlayField.Left + 60 + (xx - z) * 70, he + PlayField.Top)\r\n Next\r\n\r\n Case 2\r\n winnumreq = 22 'states how many block must b destroyed before the next stage button pops up\r\n z = 0\r\n numNorm = 20\r\n numS = 1\r\n\r\n For xx = 0 To numNorm\r\n he = 100\r\n\r\n If xx > 6 Then\r\n he = 130\r\n z = 7\r\n End If\r\n If xx > 13 Then\r\n he = 160\r\n z = 14\r\n End If\r\n block(xx) = New Button()\r\n block(xx).Location = New System.Drawing.Point(PlayField.Left + 60 + (xx - z) * 70, he + PlayField.Top)\r\n Next\r\n\r\n For s = numNorm + 1 To numS + numNorm\r\n block(s) = New Button()\r\n block(s).Location = New System.Drawing.Point(PlayField.Left + 300, 10 + PlayField.Top)\r\n Next\r\n\r\n Case 3\r\n Dim he2 As Integer\r\n winnumreq = 27 'states how many block must b destroyed before the next stage button pops up\r\n numNorm = 21\r\n he = 15\r\n numFast = 4\r\n numFire = 1\r\n For xx = 0 To numNorm\r\n\r\n he2 = xx \\ 2 + 1\r\n block(xx) = New Button()\r\n If xx Mod 2 = 0 Then\r\n block(xx).Location = New System.Drawing.Point(PlayField.Left + 50, 20 + he * he2 + PlayField.Top)\r\n Else\r\n block(xx).Location = New System.Drawing.Point(PlayField.Left + PlayField.Width - 70 - 50, 20 + he * he2 + PlayField.Top)\r\n End If\r\n Next\r\n\r\n For s = numNorm + 1 To numFast + numNorm\r\n he = 70\r\n z = s\r\n If s > 23 Then\r\n he = 140\r\n z -= 2\r\n End If\r\n block(s) = New Button()\r\n block(s).Location = New System.Drawing.Point(PlayField.Left + PlayField.Width \/ 2 - 140 + 70 * (z - 21), he + PlayField.Top)\r\n Next\r\n For s = numNorm + numFast + 1 To numFast + numNorm + numFire\r\n block(s) = New Button()\r\n block(s).Location = New System.Drawing.Point(PlayField.Left + PlayField.Width \/ 2 - 35, 100 + PlayField.Top)\r\n Next\r\n\r\n Case 4\r\n Dim he2, he3 As Integer\r\n winnumreq = 24 'states how many block must b destroyed before the next stage button pops up\r\n numShrink = 23\r\n he = 15\r\n For xx = 0 To numShrink\r\n he3 = xx\r\n If xx > 7 Then\r\n he3 = xx - 8\r\n End If\r\n If xx > 15 Then\r\n he3 = xx - 16\r\n End If\r\n\r\n he2 = xx \\ 2 + 1\r\n block(xx) = New Button()\r\n block(xx).Location = New System.Drawing.Point(PlayField.Left + 50 + he3 * 70, 20 + he * he2 + PlayField.Top)\r\n Next\r\n\r\n Case 5\r\n Dim he2, he3 As Integer\r\n winnumreq = 24 'states how many block must b destroyed before the next stage button pops up\r\n numNorm = 23\r\n he = 15\r\n For xx = 0 To numNorm\r\n he3 = xx\r\n If xx > 7 Then\r\n he3 = xx - 8\r\n End If\r\n If xx > 15 Then\r\n he3 = xx - 16\r\n End If\r\n\r\n he2 = xx \\ 2 + 1\r\n block(xx) = New Button()\r\n block(xx).Location = New System.Drawing.Point(PlayField.Left + 50 + he3 * 70, 20 + he * he2 + PlayField.Top)\r\n block(xx).Enabled = False\r\n Next\r\n Case 6\r\n Dim he2, he3 As Integer\r\n winnumreq = 38 'states how many block must b destroyed before the next stage button pops up\r\n numNorm = 33\r\n numSticky = 2\r\n he = 15\r\n numExpand = 1\r\n numL = 1\r\n For xx = 0 To 4\r\n he3 = xx\r\n he2 = xx\r\n\r\n block(xx) = New Button()\r\n block(xx).Location = New System.Drawing.Point(PlayField.Left + he3 * 70, 20 + he2 * 15 + PlayField.Top + 150)\r\n block(xx).Enabled = False\r\n block(xx).Enabled = False\r\n Next\r\n\r\n For xx = 5 To 8\r\n he3 = xx\r\n he2 = xx\r\n\r\n block(xx) = New Button()\r\n block(xx).Location = New System.Drawing.Point(PlayField.Left + he3 * 70, 20 + 4 * 15 - 15 * (he2 - 4) + PlayField.Top + 150)\r\n block(xx).Enabled = False\r\n Next\r\n\r\n he = 15\r\n For xx = 9 To 13\r\n he3 = xx\r\n he2 = xx\r\n\r\n block(xx) = New Button()\r\n block(xx).Location = New System.Drawing.Point(PlayField.Left + (he3 - 9) * 70, 20 + (he2 - 10) * 15 + PlayField.Top + 120)\r\n block(xx).Enabled = False\r\n Next\r\n\r\n For xx = 14 To 17\r\n he3 = xx\r\n he2 = xx\r\n\r\n block(xx) = New Button()\r\n block(xx).Location = New System.Drawing.Point(PlayField.Left + (he3 - 9) * 70, 20 + 4 * 15 - 15 * (he2 - 12) + PlayField.Top + 120)\r\n block(xx).Enabled = False\r\n Next\r\n\r\n z = 18\r\n For xx = 18 To numNorm\r\n he = 25\r\n\r\n If xx > 25 Then\r\n he = 100\r\n z = 26\r\n End If\r\n block(xx) = New Button()\r\n block(xx).Location = New System.Drawing.Point(PlayField.Left + 40 + (xx - z) * 70, he + PlayField.Top)\r\n block(xx).Enabled = False\r\n Next\r\n\r\n For xx = numNorm + 1 To numNorm + numExpand\r\n\r\n block(xx) = New Button()\r\n block(xx).Location = New System.Drawing.Point(PlayField.Left + PlayField.Width \/ 2 - 35, PlayField.Top + 120)\r\n\r\n\r\n Next\r\n\r\n For xx = numNorm + 1 + numExpand To numNorm + numL + numExpand\r\n\r\n block(xx) = New Button()\r\n block(xx).Location = New System.Drawing.Point(PlayField.Left + PlayField.Width \/ 2 - 35, PlayField.Top + 50)\r\n\r\n\r\n Next\r\n\r\n\r\n For xx = numNorm + 1 + numL + numExpand To numNorm + numSticky + numL + numExpand\r\n\r\n If xx = 37 Then\r\n he2 = 524\r\n End If\r\n\r\n block(xx) = New Button()\r\n block(xx).Location = New System.Drawing.Point(PlayField.Left + he2, PlayField.Top + 220)\r\n\r\n\r\n Next\r\n Case 7\r\n Dim he2, he3 As Integer\r\n winnumreq = 24 'states how many block must b destroyed before the next stage button pops up\r\n numM = 23\r\n he = 15\r\n For xx = 0 To numM\r\n he3 = xx\r\n If xx > 7 Then\r\n he3 = xx - 8\r\n End If\r\n If xx > 15 Then\r\n he3 = xx - 16\r\n End If\r\n\r\n he2 = xx \\ 2 + 1\r\n block(xx) = New Button()\r\n block(xx).Location = New System.Drawing.Point(PlayField.Left + 50 + he3 * 70, 20 + he * he2 + PlayField.Top)\r\n Next\r\n block(0) = New Button()\r\n block(0).Location = New System.Drawing.Point(PlayField.Left + 50, 20 + PlayField.Top)\r\n block(0).FlatStyle = FlatStyle.System\r\n Case 8\r\n Dim x, y As Integer\r\n winnumreq = 38\r\n numNorm = 35\r\n numC = 2\r\n For xx = 0 To numNorm\r\n x = (xx \\ 9 + 1) * 40\r\n y = xx\r\n If xx > 8 Then\r\n y = xx - 9\r\n End If\r\n If xx > 17 Then\r\n y = xx - 18\r\n End If\r\n If xx > 26 Then\r\n y = xx - 27\r\n End If\r\n block(xx) = New Button()\r\n block(xx).Location = New System.Drawing.Point(PlayField.Left + y * 70, x + PlayField.Top)\r\n block(xx).Enabled = False\r\n Next\r\n For xx = numNorm + 1 To numNorm + numC\r\n If xx = 37 Then\r\n y = 7\r\n Else\r\n y = 1\r\n End If\r\n block(xx) = New Button()\r\n block(xx).Location = New System.Drawing.Point(PlayField.Left + y * 70, 200 + PlayField.Top)\r\n Next\r\n Case 9\r\n Dim x, y As Integer\r\n winnumreq = 61\r\n numNorm = 53\r\n numL = 1\r\n numShield = 4\r\n numSlow = 2\r\n For xx = 0 To numNorm\r\n x = (xx \\ 9 + 1) * 15\r\n y = xx\r\n If xx > 8 Then\r\n y = xx - 9\r\n End If\r\n If xx > 17 Then\r\n y = xx - 18\r\n End If\r\n If xx > 26 Then\r\n y = xx - 27\r\n End If\r\n If xx > 35 Then\r\n y = xx - 36\r\n End If\r\n If xx > 44 Then\r\n y = xx - 45\r\n End If\r\n block(xx) = New Button()\r\n block(xx).Location = New System.Drawing.Point(PlayField.Left + y * 70, x + PlayField.Top)\r\n block(xx).Enabled = False\r\n block(xx).FlatStyle = FlatStyle.System\r\n Next\r\n block(56) = New Button()\r\n block(56).Location = New System.Drawing.Point(PlayField.Left + PlayField.Width \/ 2 - 45, 150 + PlayField.Top)\r\n For xx = 57 To 60\r\n block(xx) = New Button()\r\n block(xx).Location = New System.Drawing.Point(PlayField.Left + (xx - 57) * 70 + PlayField.Width \/ 2 - 140, 170 + PlayField.Top)\r\n Next\r\n\r\n block(54) = New Button()\r\n block(54).Location = New System.Drawing.Point(PlayField.Left + PlayField.Width \/ 2 - 210, 170 + PlayField.Top)\r\n block(55) = New Button()\r\n block(55).Location = New System.Drawing.Point(PlayField.Left + PlayField.Width \/ 2 + 140, 170 + PlayField.Top)\r\n Case 10\r\n aiBot()\r\n End Select\r\n PaintBlocks() 'Draw blocks and fill in other missing controls\r\n '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''\r\n '''''''''''''''''''''''END LEVELS''''''''''''''''''''''''''''''''\r\n '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''\r\n End Sub\r\n Private Sub aibot()\r\n aiPad = New System.Windows.Forms.PictureBox\r\n aiPad.Image = My.Resources.Pad2 'Resets image of the pad\r\n aiPad.Size = New System.Drawing.Size(60, 20) 'Resets size of the pad\r\n aiPad.Location = New System.Drawing.Point(Me.Width \/ 2 - 30, MenuStrip1.Top + 40)\r\n aiPad.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage\r\n aiPad.BackColor = System.Drawing.Color.Transparent\r\n Me.Controls.Add(aiPad) 'Display new pad\r\n aiBotEnabled = True\r\n End Sub\r\n Private Sub multiball()\r\n 'Creates another ball\r\n\r\n ball(numOfBalls + 1) = New PictureBox\r\n ball(numOfBalls + 1).Image = My.Resources.ball\r\n ball(numOfBalls + 1).SizeMode = PictureBoxSizeMode.Zoom\r\n ball(numOfBalls + 1).BackColor = Color.Transparent\r\n ball(numOfBalls + 1).Location = New System.Drawing.Point(ball(primeBall).Location.X, ball(primeBall).Location.Y)\r\n ball(numOfBalls + 1).Size = New System.Drawing.Size(15, 15)\r\n ball(numOfBalls + 1).Enabled = False\r\n\r\n 'assigns speed of multiballs\r\n x(numOfBalls + 1) = ballStartSpeed \/ 2\r\n y(numOfBalls + 1) = ballStartSpeed \/ 2\r\n\r\n ball(numOfBalls + 1).Visible = True\r\n Me.Controls.Add(ball(numOfBalls + 1)) 'Displays new ball\r\n numOfBalls += 1\r\n If fireBall <> 0 Then ' If the power up \"Fire ball\" is already put into effect then...\r\n For xx = 0 To numOfBalls\r\n ball(xx).Image = My.Resources.FireBall 'Changes the image of the new ball\r\n Next\r\n End If\r\n ballz += 1 'Adds 1 to the number of balls in play\r\n\r\n End Sub\r\n Private Sub timerFPS_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles timerFPS.Tick\r\n lblFPS.Text = fps & \" \" & slope\r\n fps = 0\r\n lblBallProperties.Text = Math.Round(x(primeBall), 2) & \", \" & Math.Round(y(primeBall), 2) & \", \" & Math.Round(y(primeBall) \/ x(primeBall), 1) & \", \" & Math.Abs(y(primeBall)) + Math.Abs(x(primeBall))\r\n lblBlocksDestoryed.Text = blocksDestroyed\r\n End Sub\r\n Public Sub paused()\r\n If pause = 0 Then 'Check if its already paused\r\n ballInteract.Enabled = False 'If not then disable the main timer\r\n menuPause.Text = \"Resume\" 'Change text of the pause item to resume\r\n pause = 1 'Confirms that it is paused\r\n cmdResume.Visible = True 'Make the resume button visible\r\n Else\r\n 'If its already paused then\r\n menuPause.Text = \"Pause\" 'change text of menu item to resume\r\n pause = 0 'Confirms that it is not paused\r\n ballInteract.Enabled = True 'Starts main timer\r\n cmdResume.Visible = False 'Removes the resume button\r\n End If\r\n End Sub\r\n Function blocknorm(ByVal b As Object) As Object 'Normal block\r\n For xx = 0 To numOfBalls 'For multiple balls\r\n If ((hitsideR = b.Left - ball(xx).Width And hitsideL = b.Right) Or _\r\n (ball(xx).Left <= b.Right And ball(xx).Right >= b.Left) And _\r\n ball(xx).Bottom >= b.Top And ball(xx).Top <= b.Bottom And blockbreak(xx) <> 0) Or _\r\n (cannonshot.Right > b.Left And cannonshot.Left < b.Right And _\r\n cannonshot.Top <= b.Bottom) Then\r\n 'If the ball\/laser hits the block\r\n blockbreak(xx) = 0\r\n If Not (fireBall = 1 Or (cannonshot.Right > b.Left And cannonshot.Left < b.Right And _\r\n cannonshot.Top <= b.Bottom)) Then\r\n 'Check whether the ball hit the block or the laser\r\n If (hitsideR = b.Left - ball(xx).Width) Or (b.right = hitsideL) Then\r\n 'Check which side the ball hit the block\r\n x(xx) *= -1 'Reverse ball's x movement\r\n Else\r\n y(xx) = y(xx) * -1 'Reverse ball's y movement\r\n End If\r\n hitsideL = 0 'Resets the ball collision detection\r\n hitsideR = 0\r\n If b.flatstyle = FlatStyle.Standard Then\r\n b.flatstyle = FlatStyle.Flat 'Make block flat\r\n score += 200 'Add 200 points\r\n ElseIf b.enabled = False Then 'Check if the block is enabled or not\r\n b.enabled = True 'If not, make it enabled\r\n score += 100 'Add 100 points\r\n Else\r\n b.top = -200 'If block enabled, destroy the block\r\n score += 100 'Add 100 points\r\n\r\n Return 1 'Return value that 1 block has been destroyed\r\n End If\r\n Else\r\n 'If the block was destroyed by a laser\r\n score += 100 'Add 100 points\r\n b.top = -200 'Destory the block\r\n\r\n hitsideL = 0 'Resets the ball collision detection\r\n hitsideR = 0\r\n\r\n Return 1 'Return value that 1 block has been destroyed\r\n End If\r\n End If\r\n Next\r\n Return 0\r\n End Function\r\n Function blockS(ByVal b As Object) As Object 'block containing multiball power up\r\n For xx = 0 To numOfBalls\r\n If ((hitsideR = b.Left - ball(xx).Width And hitsideL = b.Right) Or _\r\n (ball(xx).Left <= b.Right And ball(xx).Right >= b.Left) And _\r\n ball(xx).Bottom >= b.Top And ball(xx).Top <= b.Bottom And blockbreak(xx) <> 0) Or _\r\n (cannonshot.Right > b.Left And cannonshot.Left < b.Right And _\r\n cannonshot.Top <= b.Bottom) Then\r\n 'If the ball\/laser hits the block\r\n blockbreak(xx) = 0\r\n score += 100 'Add 100 points\r\n\r\n If Not (fireBall = 1 Or (cannonshot.Right > b.Left And cannonshot.Left < b.Right And _\r\n cannonshot.Top <= b.Bottom)) Then\r\n If (hitsideR = b.Left - ball(xx).Width) Or (b.right = hitsideL) Then\r\n 'Check which side the ball hit the block\r\n x(xx) = x(xx) * -1 'Reverse ball's x movement\r\n Else\r\n y(xx) = y(xx) * -1 'Reverse ball's y movement\r\n End If\r\n End If\r\n\r\n createPowerup(b, 0) 'Creates a specific powerup\r\n\r\n hitsideL = 0 'Resets the ball collision detection\r\n hitsideR = 0\r\n\r\n b.top = -200 'Destroys the block\r\n\r\n Return 1 'Return value that 1 block has been destroyed\r\n\r\n End If\r\n Next\r\n Return 0\r\n End Function\r\n Function blockExpand(ByVal b As Object) As Object 'block containing pad up power up\r\n For xx = 0 To numOfBalls\r\n If ((hitsideR = b.Left - ball(xx).Width And hitsideL = b.Right) Or _\r\n (ball(xx).Left <= b.Right And ball(xx).Right >= b.Left) And _\r\n ball(xx).Bottom >= b.Top And ball(xx).Top <= b.Bottom And blockbreak(xx) <> 0) Or _\r\n (cannonshot.Right > b.Left And cannonshot.Left < b.Right And _\r\n cannonshot.Top <= b.Bottom) Then\r\n\r\n blockbreak(xx) = 0\r\n score += 100\r\n\r\n If Not (fireBall = 1 Or (cannonshot.Right > b.Left And cannonshot.Left < b.Right And _\r\n cannonshot.Top <= b.Bottom)) Then\r\n If (hitsideR = b.Left - ball(xx).Width) Or (b.right = hitsideL) Then\r\n x(xx) = x(xx) * -1\r\n Else\r\n y(xx) = y(xx) * -1\r\n End If\r\n End If\r\n\r\n createPowerup(b, 1)\r\n\r\n hitsideL = 0\r\n hitsideR = 0\r\n\r\n b.top = -200\r\n\r\n Return 1\r\n End If\r\n Next\r\n Return 0\r\n End Function\r\n Function blockShrink(ByVal b As Object) As Object 'block containing shortened pad power up\r\n For xx = 0 To numOfBalls\r\n If ((hitsideR = b.Left - ball(xx).Width And hitsideL = b.Right) Or _\r\n (ball(xx).Left <= b.Right And ball(xx).Right >= b.Left) And _\r\n ball(xx).Bottom >= b.Top And ball(xx).Top <= b.Bottom And blockbreak(xx) <> 0) Or _\r\n (cannonshot.Right > b.Left And cannonshot.Left < b.Right And _\r\n cannonshot.Top <= b.Bottom) Then\r\n\r\n blockbreak(xx) = 0\r\n score += 100\r\n\r\n If Not (fireBall = 1 Or (cannonshot.Right > b.Left And cannonshot.Left < b.Right And _\r\n cannonshot.Top <= b.Bottom)) Then\r\n If (hitsideR = b.Left - ball(xx).Width) Or (b.right = hitsideL) Then\r\n x(xx) = x(xx) * -1\r\n Else\r\n y(xx) = y(xx) * -1\r\n End If\r\n End If\r\n\r\n createPowerup(b, 2)\r\n\r\n hitsideL = 0\r\n hitsideR = 0\r\n\r\n b.top = -200\r\n\r\n Return 1\r\n End If\r\n Next\r\n Return 0\r\n End Function\r\n Function blockm(ByVal b As Object) As Object 'metal block (undestructable under normal circumstances)\r\n For xx = 0 To numOfBalls\r\n If ((hitsideR = b.Left - ball(xx).Width And hitsideL = b.Right) Or _\r\n (ball(xx).Left <= b.Right And ball(xx).Right >= b.Left) And _\r\n ball(xx).Bottom >= b.Top And ball(xx).Top <= b.Bottom And blockbreak(xx) <> 0) Or _\r\n (cannonshot.Right > b.Left And cannonshot.Left < b.Right And _\r\n cannonshot.Top <= b.Bottom) Then\r\n\r\n blockbreak(xx) = 0\r\n\r\n If (hitsideR = b.Left - ball(xx).Width) Or (b.right = hitsideL) Then\r\n x(xx) = x(xx) * -1\r\n Else\r\n y(xx) = y(xx) * -1\r\n End If\r\n\r\n If Not (fireBall = 1 Or (cannonshot.Right > b.Left And cannonshot.Left < b.Right And _\r\n cannonshot.Top <= b.Bottom)) Then\r\n score += 100\r\n Else\r\n b.top = -200\r\n score += 500\r\n End If\r\n If hitBottom = b.Bottom Then\r\n ball(xx).Top = b.Bottom + 1\r\n\r\n ElseIf hitTop = b.Top Then\r\n ball(xx).Top = b.Top - ball(xx).Height - 1\r\n ElseIf hitsideR = b.Left - ball(xx).Width Then\r\n ball(xx).Left = b.Left - ball(xx).Width - 1\r\n ElseIf hitsideL = b.right Then\r\n ball(xx).Left = b.right + 1\r\n End If\r\n\r\n hitBottom = 0\r\n hitTop = 0\r\n hitsideL = 0\r\n hitsideR = 0\r\n\r\n ElseIf cannonshot.Right > b.left And cannonshot.Left < b.right And cannonshot.Top <= b.bottom Then\r\n score = score + 100\r\n\r\n shotnum = 0\r\n cannonshot.Visible = False\r\n\r\n Return 1\r\n End If\r\n Next\r\n Return 0\r\n End Function\r\n Function blockC(ByVal b As Object) As Object 'Block containing cannon power up\r\n For xx = 0 To numOfBalls\r\n If ((hitsideR = b.Left - ball(xx).Width And hitsideL = b.Right) Or _\r\n (ball(xx).Left <= b.Right And ball(xx).Right >= b.Left) And _\r\n ball(xx).Bottom >= b.Top And ball(xx).Top <= b.Bottom And blockbreak(xx) <> 0) Or _\r\n (cannonshot.Right > b.Left And cannonshot.Left < b.Right And _\r\n cannonshot.Top <= b.Bottom) Then\r\n blockbreak(xx) = 0\r\n score += 100\r\n\r\n If Not (fireBall = 1 Or (cannonshot.Right > b.Left And cannonshot.Left < b.Right And _\r\n cannonshot.Top <= b.Bottom)) Then\r\n If (hitsideR = b.Left - ball(xx).Width) Or (b.right = hitsideL) Then\r\n x(xx) = x(xx) * -1\r\n Else\r\n y(xx) = y(xx) * -1\r\n End If\r\n End If\r\n\r\n createPowerup(b, 3)\r\n\r\n hitsideL = 0\r\n hitsideR = 0\r\n\r\n b.top = -200\r\n Return 1\r\n\r\n End If\r\n Next\r\n Return 0\r\n End Function\r\n Function BlockSlow(ByVal b As Object) As Object 'block containing slow-ball power up\r\n For xx = 0 To numOfBalls\r\n If ((hitsideR = b.Left - ball(xx).Width And hitsideL = b.Right) Or _\r\n (ball(xx).Left <= b.Right And ball(xx).Right >= b.Left) And _\r\n ball(xx).Bottom >= b.Top And ball(xx).Top <= b.Bottom And blockbreak(xx) <> 0) Or _\r\n (cannonshot.Right > b.Left And cannonshot.Left < b.Right And _\r\n cannonshot.Top <= b.Bottom) Then\r\n\r\n blockbreak(xx) = 0\r\n score += 100\r\n\r\n If Not (fireBall = 1 Or (cannonshot.Right > b.Left And cannonshot.Left < b.Right And _\r\n cannonshot.Top <= b.Bottom)) Then\r\n If (hitsideR = b.Left - ball(xx).Width) Or (b.right = hitsideL) Then\r\n x(xx) = x(xx) * -1\r\n Else\r\n y(xx) = y(xx) * -1\r\n End If\r\n End If\r\n createPowerup(b, 4)\r\n\r\n b.top = -200\r\n\r\n hitsideL = 0\r\n hitsideR = 0\r\n\r\n Return 1\r\n\r\n End If\r\n Next\r\n Return 0\r\n End Function\r\n Function BlockFast(ByVal b As Object) As Object 'block containing fast-ball power up\r\n For xx = 0 To numOfBalls\r\n If ((hitsideR = b.Left - ball(xx).Width And hitsideL = b.Right) Or _\r\n (ball(xx).Left <= b.Right And ball(xx).Right >= b.Left) And _\r\n ball(xx).Bottom >= b.Top And ball(xx).Top <= b.Bottom And blockbreak(xx) <> 0) Or _\r\n (cannonshot.Right > b.Left And cannonshot.Left < b.Right And _\r\n cannonshot.Top <= b.Bottom) Then\r\n\r\n blockbreak(xx) = 0\r\n score += 100\r\n\r\n If Not (fireBall = 1 Or (cannonshot.Right > b.Left And cannonshot.Left < b.Right And _\r\n cannonshot.Top <= b.Bottom)) Then\r\n If (hitsideR = b.Left - ball(xx).Width) Or (b.right = hitsideL) Then\r\n x(xx) = x(xx) * -1\r\n Else\r\n y(xx) = y(xx) * -1\r\n End If\r\n End If\r\n createPowerup(b, 5)\r\n\r\n b.top = -200\r\n\r\n hitsideL = 0\r\n hitsideR = 0\r\n\r\n Return 1\r\n\r\n End If\r\n Next\r\n Return 0\r\n End Function\r\n Function blockL(ByVal b As Object) As Object 'block containing life up power up\r\n For xx = 0 To numOfBalls\r\n If ((hitsideR = b.Left - ball(xx).Width And hitsideL = b.Right) Or _\r\n (ball(xx).Left <= b.Right And ball(xx).Right >= b.Left) And _\r\n ball(xx).Bottom >= b.Top And ball(xx).Top <= b.Bottom And blockbreak(xx) <> 0) Or _\r\n (cannonshot.Right > b.Left And cannonshot.Left < b.Right And _\r\n cannonshot.Top <= b.Bottom) Then\r\n\r\n blockbreak(xx) = 0\r\n score += 100\r\n\r\n If Not (fireBall = 1 Or (cannonshot.Right > b.Left And cannonshot.Left < b.Right And _\r\n cannonshot.Top <= b.Bottom)) Then\r\n If (hitsideR = b.Left - ball(xx).Width) Or (b.right = hitsideL) Then\r\n x(xx) = x(xx) * -1\r\n Else\r\n y(xx) = y(xx) * -1\r\n End If\r\n End If\r\n createPowerup(b, 6)\r\n b.top = -200\r\n\r\n hitsideL = 0\r\n hitsideR = 0\r\n\r\n Return 1\r\n\r\n End If\r\n Next\r\n Return 0\r\n End Function\r\n Function blockFire(ByVal b As Object) As Object 'block containing fireball power up\r\n For xx = 0 To numOfBalls\r\n If ((hitsideR = b.Left - ball(xx).Width And hitsideL = b.Right) Or _\r\n (ball(xx).Left <= b.Right And ball(xx).Right >= b.Left) And _\r\n ball(xx).Bottom >= b.Top And ball(xx).Top <= b.Bottom And blockbreak(xx) <> 0) Or _\r\n (cannonshot.Right > b.Left And cannonshot.Left < b.Right And _\r\n cannonshot.Top <= b.Bottom) Then\r\n\r\n blockbreak(xx) = 0\r\n score += 100\r\n\r\n If Not (fireBall = 1 Or (cannonshot.Right > b.Left And cannonshot.Left < b.Right And _\r\n cannonshot.Top <= b.Bottom)) Then\r\n If (hitsideR = b.Left - ball(xx).Width) Or (b.right = hitsideL) Then\r\n x(xx) = x(xx) * -1\r\n Else\r\n y(xx) = y(xx) * -1\r\n End If\r\n End If\r\n createPowerup(b, 7)\r\n\r\n b.top = -200\r\n\r\n hitsideL = 0\r\n hitsideR = 0\r\n\r\n Return 1\r\n End If\r\n Next\r\n Return 0\r\n End Function\r\n Function blockSticky(ByVal b As Object) As Object 'block containing stickypad power up\r\n For xx = 0 To numOfBalls\r\n If ((hitsideR = b.Left - ball(xx).Width And hitsideL = b.Right) Or _\r\n (ball(xx).Left <= b.Right And ball(xx).Right >= b.Left) And _\r\n ball(xx).Bottom >= b.Top And ball(xx).Top <= b.Bottom And blockbreak(xx) <> 0) Or _\r\n (cannonshot.Right > b.Left And cannonshot.Left < b.Right And _\r\n cannonshot.Top <= b.Bottom) Then\r\n\r\n blockbreak(xx) = 0\r\n score += 100\r\n\r\n If Not (fireBall = 1 Or (cannonshot.Right > b.Left And cannonshot.Left < b.Right And _\r\n cannonshot.Top <= b.Bottom)) Then\r\n If (hitsideR = b.Left - ball(xx).Width) Or (b.right = hitsideL) Then\r\n x(xx) = x(xx) * -1\r\n Else\r\n y(xx) = y(xx) * -1\r\n End If\r\n End If\r\n createPowerup(b, 8)\r\n b.top = -200\r\n\r\n hitsideL = 0\r\n hitsideR = 0\r\n\r\n Return 1\r\n End If\r\n Next\r\n Return 0\r\n End Function\r\n Function blockShield(ByVal b As Object) As Object 'block containing stickypad power up\r\n For xx = 0 To numOfBalls\r\n If ((hitsideR = b.Left - ball(xx).Width And hitsideL = b.Right) Or _\r\n (ball(xx).Left <= b.Right And ball(xx).Right >= b.Left) And _\r\n ball(xx).Bottom >= b.Top And ball(xx).Top <= b.Bottom And blockbreak(xx) <> 0) Or _\r\n (cannonshot.Right > b.Left And cannonshot.Left < b.Right And _\r\n cannonshot.Top <= b.Bottom) Then\r\n\r\n blockbreak(xx) = 0\r\n score += 100\r\n\r\n If Not (fireBall = 1 Or (cannonshot.Right > b.Left And cannonshot.Left < b.Right And _\r\n cannonshot.Top <= b.Bottom)) Then\r\n If (hitsideR = b.Left - ball(xx).Width) Or (b.right = hitsideL) Then\r\n x(xx) = x(xx) * -1\r\n Else\r\n y(xx) = y(xx) * -1\r\n End If\r\n End If\r\n createPowerup(b, 9)\r\n b.top = -200\r\n\r\n hitsideL = 0\r\n hitsideR = 0\r\n\r\n Return 1\r\n End If\r\n Next\r\n Return 0\r\n End Function\r\n Public Sub ChangeScrnRes(ByVal Width As Integer, ByVal Height As Integer)\r\n 'Change display mode\r\n Dim DevM As New DEVMODE\r\n Dim i As Integer\r\n\r\n i = EnumDisplaySettings(0, 0, DevM) 'Retreives current monitor settings\r\n\r\n With DevM\r\n .dmFields = DM_PELSWIDTH Or DM_PELSHEIGHT\r\n .dmPelsWidth = Width\r\n .dmPelsHeight = Height\r\n .dmBitsPerPel = 24\r\n End With\r\n\r\n i = ChangeDisplaySettings(DevM, 0)\r\n i = EnumDisplaySettings(0, 0, DevM)\r\n\r\n End Sub\r\n Private Sub windowredesign()\r\n 'Redesigns window to suit Full Screen Mode or Windowed Mode\r\n\r\n ball(0).Top = Pad.Top 'Temperaraly removes the ball from block collision while the level redesigns\r\n\r\n 'Rearrange next button\r\n cmdNext.Top = Me.Height \/ 2 - cmdNext.Height \/ 2\r\n cmdNext.Left = Me.Width \/ 2 - cmdNext.Width \/ 2\r\n\r\n 'Rearrange start button\r\n cmdStart.Top = Me.Height \/ 2 - cmdStart.Height \/ 2\r\n cmdStart.Left = Me.Width \/ 2 - cmdStart.Width \/ 2\r\n\r\n 'Rearrange reset button\r\n cmdReset.Top = Me.Height \/ 2 - cmdReset.Height \/ 2\r\n cmdReset.Left = Me.Width \/ 2 - cmdReset.Width \/ 2\r\n\r\n 'Rearrange try again button\r\n cmdTryAgain.Top = Me.Height \/ 2 - cmdTryAgain.Height \/ 2\r\n cmdTryAgain.Left = Me.Width \/ 2 - cmdTryAgain.Width \/ 2\r\n\r\n txtAnnouncement.Top = 1\r\n txtAnnouncement.Left = Me.Width \/ 2 - txtAnnouncement.Width \/ 2\r\n\r\n lblClick.Top = PlayField.Top + 80\r\n lblClick.Left = Me.Width \/ 2 - lblClick.Width \/ 2\r\n\r\n recStatus.Width = Me.Width\r\n recStatus.Left = 0\r\n If fullscreenalt = 0 Then\r\n recStatus.Top = 355\r\n Else\r\n recStatus.Top = Me.Height - recStatus.Height\r\n End If\r\n lblScore.Top = recStatus.Top + 3\r\n lblLives.Top = recStatus.Top + 3\r\n lblHighscore.Top = recStatus.Top + 3\r\n lvlclear()\r\n 'Redraws the level\r\n lvl()\r\n End Sub\r\n Public Sub lvlclear()\r\n For xx = 0 To winnumreq - 1\r\n block(xx).Dispose()\r\n Next\r\n If aiBotEnabled = True Then\r\n aiPad.Visible = False\r\n End If\r\n End Sub\r\n Private Sub changedisplay()\r\n Me.WindowState = FormWindowState.Normal\r\n\r\n ' Hide border and maximize the screen\r\n Me.FormBorderStyle = Windows.Forms.FormBorderStyle.FixedSingle\r\n\r\n ' Restore screen resolution\r\n Call ChangeScrnRes(ScrnRes.Width, ScrnRes.Height)\r\n End Sub\r\n Private Sub frmBreakout_FormClosed(ByVal sender As System.Object, ByVal e As System.Windows.Forms.FormClosedEventArgs) Handles MyBase.FormClosed\r\n Call changedisplay()\r\n saveHighScore()\r\n End Sub\r\n\r\n Private Sub cmdNext_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdNext.Click\r\n For xx = 1 To numOfBalls\r\n ball(xx).Enabled = False\r\n ball(xx).Visible = False\r\n x(xx) = 0\r\n y(xx) = 0\r\n Next\r\n resetAll()\r\n If stickyPadEnabled = 1 Then\r\n resetpad()\r\n End If\r\n numOfBalls = 0\r\n cmdNext.Visible = False\r\n cmdStart.Visible = True\r\n ball(0).Top = Pad.Top - 20\r\n ball(0).Visible = True\r\n ball(0).Image = My.Resources.ball\r\n level += 1\r\n lvl()\r\n ballz = 1\r\n\r\n Pad.Width = 60\r\n End Sub\r\n\r\n Private Sub cmdStart_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdStart.Click\r\n primeBall = 0\r\n cmdStart.Visible = False\r\n timerStart.Enabled = True\r\n startnum = 0\r\n powerup(0) = 0\r\n numOfBalls = 0\r\n numOfBalls = 0\r\n If CannonActivate = 1 Then\r\n CannonActivate = 0\r\n picCannon.Visible = False\r\n End If\r\n Randomize(randomAngle)\r\n lblClick.Visible = True\r\n End Sub\r\n Private Sub cmdTryAgain_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdTryAgain.Click\r\n Createball()\r\n ball(0).Left = 312 'reset the balls position\r\n ball(0).Top = Pad.Top - 20\r\n x(0) = 0\r\n y(0) = 0\r\n startnum = 0\r\n timerStart.Enabled = True\r\n cmdTryAgain.Visible = False\r\n\r\n ballz = 1\r\n numOfBalls = 0\r\n ball(0).Visible() = True\r\n resetpad()\r\n End Sub\r\n Private Sub cmdReset_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdReset.Click\r\n score = 0\r\n lblScore.Text = \"Score: \" & score 'Refresh score\r\n life = startLives\r\n lblLives.Text = \"Lives: \" & life 'Refresh lives\r\n cmdReset.Visible = False\r\n resetAll()\r\n lvlclear()\r\n lvl()\r\n\r\n Createball()\r\n ball(0).Left = 312 'reset the balls position\r\n ball(0).Top = Pad.Top - 20\r\n x(0) = 0\r\n y(0) = 0\r\n startnum = 0\r\n timerStart.Enabled = True\r\n ballz = 1\r\n numOfBalls = 0\r\n ball(0).Visible() = True\r\n resetpad()\r\n End Sub\r\n Private Sub menuExit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles menuExit.Click\r\n If menuFullScreenMode.Text <> \"Full Screen Mode\" Then\r\n Call changedisplay()\r\n End If\r\n Me.Dispose()\r\n End Sub\r\n Private Sub menuPause_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles menuPause.Click\r\n paused()\r\n End Sub\r\n Private Sub BallInteract_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ballInteract.Tick\r\n fps += 1 'Add 1 to fps counter\r\n\r\n PlayField.SendToBack()\r\n\r\n ballinter()\r\n\r\n If CannonActivate = 1 Then\r\n picCannon.Left = Pad.Left + Pad.Width \\ 2 - picCannon.Width \\ 2 'make cannon pic follow pad\r\n If shotnum = 1 Then\r\n cannonshot.Top -= 10\r\n If cannonshot.Top < 0 Then\r\n shotnum = 0\r\n cannonshot.Visible = False\r\n End If\r\n End If\r\n End If\r\n If powerups > 0 Then\r\n powerupInteract()\r\n End If\r\n\r\n If blocksDestroyed = winnumreq - numM Then\r\n blockDes()\r\n End If\r\n\r\n lblScore.Text = \"Score: \" & score 'show the score on label\r\n Me.Text = \"Score: \" & score 'show the score as our forms caption\r\n If score > highScore Then\r\n highScore = score\r\n lblHighscore.Text = \"High Score: \" & highScore\r\n End If\r\n\r\n lblLives.Text = \"Lives: \" & life\r\n\r\n If Pad.Left <> MousePosition.X - Me.Left - Pad.Width \/ 2 Then 'If the paddle is not aligned with the mouse then...\r\n Pad.Left = MousePosition.X - Me.Left - Pad.Width \/ 2\r\n If Pad.Left <= PlayField.Left - Pad.Width \/ 2 Then 'pad goes out of bounds then pad left = 0\r\n Pad.Left = PlayField.Left - Pad.Width \/ 2\r\n End If\r\n If Pad.Right >= PlayField.Right + Pad.Width \/ 2 Then 'same as above\r\n Pad.Left = PlayField.Right - Pad.Width + Pad.Width \/ 2\r\n End If\r\n End If\r\n End Sub\r\n Private Sub timerResume_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles timerPause.Tick\r\n If GetAsyncKeyState(System.Windows.Forms.Keys.P) < 0 and ActiveForm Is Me And picNewgame.Visible = False Then\r\n paused()\r\n End If\r\n End Sub\r\n\r\n Private Sub timerStart_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles timerStart.Tick\r\n ballInteract.Enabled = False\r\n If GetAsyncKeyState(System.Windows.Forms.Keys.LButton) < 0 and ActiveForm Is Me Then\r\n If cmdStart.Visible = False And cmdNext.Visible = False Then\r\n txtAnnouncement.Text = \"\"\r\n txtAnnouncement.BackColor = Color.White\r\n 'Random Primary Ball speed and angle\r\n Randomize()\r\n If Int(Rnd() * 1.5) = 0 Then\r\n degree = -1\r\n Else\r\n degree = 1\r\n End If\r\n Randomize()\r\n x(0) = (ballStartSpeed * Rnd() + 1)\r\n If x(0) < ballStartSpeed * 0.2 Or x(0) > ballStartSpeed * 0.8 Then\r\n x(0) = ballStartSpeed \/ 2\r\n End If\r\n x(0) *= degree\r\n y(0) = -1 * (ballStartSpeed - (Math.Abs(x(0))))\r\n\r\n startnum = 1\r\n\r\n cmdReset.Visible = False\r\n ballInteract.Enabled = True\r\n timerStart.Enabled = False\r\n lblClick.Visible = False\r\n End If\r\n End If\r\n ball(0).Left = Pad.Left + Pad.Width \/ 2 - ball(0).Width \/ 2 'ball is set to the center of the pad\r\n ball(0).Top = Pad.Top - ball(0).Height 'ball is set right above the pad\r\n If Pad.Left <> MousePosition.X - Me.Left - Pad.Width \/ 2 Then 'If the paddle is not aligned with the mouse then...\r\n Pad.Left = MousePosition.X - Me.Left - Pad.Width \/ 2\r\n If Pad.Left <= PlayField.Left - Pad.Width \/ 2 Then 'pad goes out of bounds then pad left = 0\r\n Pad.Left = PlayField.Left - Pad.Width \/ 2\r\n End If\r\n If Pad.Right >= PlayField.Right + Pad.Width \/ 2 Then 'same as above\r\n Pad.Left = PlayField.Right - Pad.Width + Pad.Width \/ 2\r\n End If\r\n End If\r\n End Sub\r\n Private Sub menuFullScreenMode_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles menuFullScreenMode.Click\r\n If menuFullScreenMode.Text = \"Full Screen Mode\" Then\r\n If startnum <> 0 Then\r\n pause = 0\r\n paused()\r\n MsgBox(\"Please wait till after level completion to enter full screen mode\")\r\n paused()\r\n Else\r\n Try\r\n pause = 0\r\n paused()\r\n ' Set screen res to 800 x 600\r\n Call ChangeScrnRes(800, 600)\r\n\r\n ' Hide form border & maximize\r\n Me.FormBorderStyle = Windows.Forms.FormBorderStyle.None\r\n Me.WindowState = FormWindowState.Maximized\r\n\r\n PlayField.Left = (Me.Width \/ 2) - (PlayField.Width \/ 2) 'Center playfield horizontally\r\n PlayField.Top = (Me.Height \/ 2) - (PlayField.Height \/ 2) 'Center playfield vertically\r\n\r\n ' Set menu caption\r\n menuFullScreenMode.Text = \"Window Mode\"\r\n ' relocate block, ball and paddle\r\n fullscreenalt = 1\r\n windowredesign()\r\n paused()\r\n Catch\r\n Call changedisplay()\r\n MsgBox(\"Error occured when trying to change to full screen mode\")\r\n menuFullScreenMode.Text = \"Full Screen Mode\"\r\n End Try\r\n End If\r\n\r\n Else '- Switch to windowed mode ...\r\n If startnum <> 0 Then\r\n MsgBox(\"Please wait till after level completion to enter full screen mode\")\r\n Else\r\n\r\n Call changedisplay()\r\n\r\n ' Set menu caption ...\r\n menuFullScreenMode.Text = \"Full Screen Mode\"\r\n\r\n PlayField.Left = -1\r\n PlayField.Top = 24\r\n fullscreenalt = 0\r\n windowredesign()\r\n End If\r\n End If\r\n Pad.Top = PlayField.Top + 309\r\n End Sub\r\n\r\n Private Sub menuInstructions_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles menuInstructions.Click\r\n frmInstructions.Show()\r\n End Sub\r\n\r\n Private Sub menuAbout_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles menuAbout.Click\r\n frmAbout.Show()\r\n End Sub\r\n\r\n Private Sub menuLevel_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles menuLevel.Click\r\n frmLevel.Show()\r\n End Sub\r\n Private Sub NewGameToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles menuNewGame.Click\r\n newGame()\r\n End Sub\r\n Function createPowerup(ByVal b As Object, ByVal x As Integer)\r\n powerupPic(x, powerup(x)) = New PictureBox\r\n With powerupPic(x, powerup(x))\r\n powerups += 1\r\n Select Case x\r\n Case 0\r\n .Image = My.Resources.ballmulti\r\n .Size = New System.Drawing.Size(37, 37)\r\n Case 1\r\n .Image = My.Resources.Wide\r\n .Size = New System.Drawing.Size(40, 15)\r\n Case 2\r\n .Image = My.Resources.Narrow\r\n .Size = New System.Drawing.Size(40, 15)\r\n Case 3\r\n .Image = My.Resources.C\r\n .Size = New System.Drawing.Size(40, 20)\r\n Case 4\r\n .Image = My.Resources.Slow\r\n .Size = New System.Drawing.Size(30, 30)\r\n Case 5\r\n .Image = My.Resources.fast\r\n .Size = New System.Drawing.Size(30, 30)\r\n Case 6\r\n .Image = My.Resources.Heart\r\n .Size = New System.Drawing.Size(27, 23)\r\n Case 7\r\n .Image = My.Resources.Fireball1\r\n .Size = New System.Drawing.Size(20, 40)\r\n Case 8\r\n .Image = My.Resources.slime\r\n .Size = New System.Drawing.Size(25, 25)\r\n Case 9\r\n .Image = My.Resources.shield\r\n .Size = New System.Drawing.Size(25, 25)\r\n End Select\r\n .Location = New System.Drawing.Point(b.left + b.width \/ 2 - 27 \/ 2, b.top)\r\n .SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom\r\n .Visible = True\r\n .BackColor = Color.Transparent\r\n Me.Controls.Add(powerupPic(x, powerup(x)))\r\n powerup(x) += 1\r\n End With\r\n Return 0\r\n End Function\r\n\r\n Private Sub timerOther_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles timerOther.Tick\r\n If ActiveForm Is Me Then\r\n If GetAsyncKeyState(System.Windows.Forms.Keys.F) < 0 Then\r\n If locked = False Then\r\n timerFPS.Enabled = True\r\n lblFPS.Visible = True\r\n lblBallProperties.Visible = True\r\n lblBlocksDestoryed.Visible = True\r\n End If\r\n End If\r\n If GetAsyncKeyState(System.Windows.Forms.Keys.Escape) < 0 Then\r\n If menuFullScreenMode.Text <> \"Full Screen Mode\" Then\r\n Call changedisplay()\r\n End If\r\n Me.Dispose()\r\n End If\r\n\r\n If GetAsyncKeyState(System.Windows.Forms.Keys.LButton) <> 0 Then\r\n If shotnum <> 1 And CannonActivate = 1 Then\r\n\r\n cannonshot = New System.Windows.Forms.PictureBox\r\n cannonshot.Image = My.Resources.cannonShots\r\n cannonshot.Location = New System.Drawing.Point(picCannon.Left + picCannon.Width \/ 2, picCannon.Top)\r\n cannonshot.Size = New System.Drawing.Size(6, 30)\r\n cannonshot.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom\r\n cannonshot.Visible = True\r\n cannonshot.BackColor = Color.Transparent\r\n Me.Controls.Add(cannonshot)\r\n shotnum = 1\r\n\r\n End If\r\n If stickyPadEnabled = 1 And ballStickCount = 1 Then\r\n ballStickCount = 0\r\n ball(ballstuck).Top = Pad.Top - 5 - ball(ballstuck).Height\r\n ballstuck = 100\r\n End If\r\n End If\r\n End If\r\n End Sub\r\n Private Sub loadmenu()\r\n 'Draws menu\r\n Me.BackgroundImage = My.Resources.Waves 'Set background\r\n\r\n 'Draws Breakout title\r\n picBreakout = New System.Windows.Forms.PictureBox\r\n picBreakout.Image = My.Resources.Breakout\r\n picBreakout.Location = New System.Drawing.Point(31, 40)\r\n picBreakout.Size = New System.Drawing.Size(567, 63)\r\n picBreakout.SizeMode = System.Windows.Forms.ImageLayout.Stretch\r\n picBreakout.BackColor = Color.Transparent\r\n Me.Controls.Add(picBreakout)\r\n\r\n 'Draws New Game button\r\n picNewgame = New System.Windows.Forms.PictureBox\r\n picNewgame.Image = My.Resources.newgamePic\r\n picNewgame.Location = New System.Drawing.Point(230, 100)\r\n picNewgame.Size = New System.Drawing.Size(150, 32)\r\n picNewgame.SizeMode = System.Windows.Forms.ImageLayout.Zoom\r\n Me.Controls.Add(picNewgame)\r\n\r\n 'Draws How to Play button\r\n picHowTo = New System.Windows.Forms.PictureBox\r\n picHowTo.Image = My.Resources.howto\r\n picHowTo.Location = New System.Drawing.Point(230, 140)\r\n picHowTo.Size = New System.Drawing.Size(150, 32)\r\n picHowTo.SizeMode = System.Windows.Forms.ImageLayout.Zoom\r\n Me.Controls.Add(picHowTo)\r\n\r\n 'Draws Options button\r\n picOptions = New System.Windows.Forms.PictureBox\r\n picOptions.Image = My.Resources.Options\r\n picOptions.Location = New System.Drawing.Point(230, 180)\r\n picOptions.Size = New System.Drawing.Size(150, 32)\r\n picOptions.SizeMode = System.Windows.Forms.ImageLayout.Zoom\r\n Me.Controls.Add(picOptions)\r\n\r\n 'Draws About button\r\n picabout = New System.Windows.Forms.PictureBox\r\n picabout.Image = My.Resources.About\r\n picabout.Location = New System.Drawing.Point(230, 220)\r\n picabout.Size = New System.Drawing.Size(150, 32)\r\n picabout.SizeMode = System.Windows.Forms.ImageLayout.Zoom\r\n Me.Controls.Add(picAbout)\r\n\r\n 'Draws Exit button\r\n picExit = New System.Windows.Forms.PictureBox\r\n picExit.Image = My.Resources._Exit\r\n picExit.Location = New System.Drawing.Point(230, 280)\r\n picExit.Size = New System.Drawing.Size(150, 32)\r\n picExit.SizeMode = System.Windows.Forms.ImageLayout.Zoom\r\n Me.Controls.Add(picExit)\r\n\r\n 'Bring all buttons and graphics in front of playfield\r\n PlayField.SendToBack()\r\n\r\n 'Add handlers\r\n AddHandler picNewgame.MouseEnter, AddressOf picNewgame_MouseEnter 'Add mouseEnter handler\r\n AddHandler picNewgame.Click, AddressOf picNewgame_Click 'Add click handler\r\n AddHandler picNewgame.MouseLeave, AddressOf picNewgame_MouseLeave 'Add mouseLeave handler\r\n AddHandler picHowTo.MouseEnter, AddressOf picHowTo_MouseEnter\r\n AddHandler picHowTo.Click, AddressOf picHowTo_Click\r\n AddHandler picHowTo.MouseLeave, AddressOf picHowTo_MouseLeave\r\n AddHandler picOptions.MouseEnter, AddressOf picOptions_MouseEnter\r\n AddHandler picOptions.Click, AddressOf picOptions_Click\r\n AddHandler picOptions.MouseLeave, AddressOf picOptions_MouseLeave\r\n AddHandler picabout.MouseEnter, AddressOf picAbout_MouseEnter\r\n AddHandler picabout.Click, AddressOf picAbout_Click\r\n AddHandler picabout.MouseLeave, AddressOf picAbout_MouseLeave\r\n AddHandler picExit.MouseEnter, AddressOf picExit_MouseEnter\r\n AddHandler picExit.Click, AddressOf picExit_Click\r\n AddHandler picExit.MouseLeave, AddressOf picExit_MouseLeave\r\n End Sub\r\n Private Sub picNewgame_Click(ByVal sender As Object, ByVal e As EventArgs)\r\n newGame()\r\n End Sub\r\n Private Sub picNewgame_MouseEnter(ByVal sender As Object, ByVal e As EventArgs)\r\n picNewgame.Image = My.Resources.newgamePic2\r\n End Sub\r\n Private Sub picNewgame_MouseLeave(ByVal sender As Object, ByVal e As EventArgs)\r\n picNewgame.Image = My.Resources.newgamePic\r\n End Sub\r\n Private Sub picHowTo_Click(ByVal sender As Object, ByVal e As EventArgs)\r\n frmInstructions.Show()\r\n End Sub\r\n Private Sub picHowTo_MouseEnter(ByVal sender As Object, ByVal e As EventArgs)\r\n picHowTo.Image = My.Resources.howto2\r\n End Sub\r\n Private Sub picHowTo_MouseLeave(ByVal sender As Object, ByVal e As EventArgs)\r\n picHowTo.Image = My.Resources.howto\r\n End Sub\r\n Private Sub picAbout_Click(ByVal sender As Object, ByVal e As EventArgs)\r\n frmAbout.Show()\r\n End Sub\r\n Private Sub picAbout_MouseEnter(ByVal sender As Object, ByVal e As EventArgs)\r\n picabout.Image = My.Resources.About2\r\n End Sub\r\n Private Sub picAbout_MouseLeave(ByVal sender As Object, ByVal e As EventArgs)\r\n picabout.Image = My.Resources.About\r\n End Sub\r\n Private Sub picOptions_Click(ByVal sender As Object, ByVal e As EventArgs)\r\n frmOptions.Show()\r\n End Sub\r\n Private Sub picOptions_MouseEnter(ByVal sender As Object, ByVal e As EventArgs)\r\n picOptions.Image = My.Resources.options2\r\n End Sub\r\n Private Sub picOptions_MouseLeave(ByVal sender As Object, ByVal e As EventArgs)\r\n picOptions.Image = My.Resources.options\r\n End Sub\r\n Private Sub picExit_Click(ByVal sender As Object, ByVal e As EventArgs)\r\n Me.Close()\r\n End Sub\r\n Private Sub picExit_MouseEnter(ByVal sender As Object, ByVal e As EventArgs)\r\n picExit.Image = My.Resources.Exit2\r\n End Sub\r\n Private Sub picExit_MouseLeave(ByVal sender As Object, ByVal e As EventArgs)\r\n picExit.Image = My.Resources._Exit\r\n End Sub\r\n Private Sub newGame()\r\n 'Reset everything and loads sprite\r\n drawShield() 'draws shield\r\n SaveConfigurations() 'save config\r\n\r\n 'Hide menu and disable certain options\r\n menuDifficulty.Enabled = False\r\n picBreakout.Visible = False\r\n picHowTo.Visible = False\r\n picNewgame.Visible = False\r\n picOptions.Visible = False\r\n picAbout.Visible = False\r\n picExit.Visible = False\r\n menuFullScreenMode.Enabled = True\r\n\r\n If locked = False Then 'Check if game is locked\r\n menuLevel.Enabled = True 'If game isn't locked enable level selector\r\n End If\r\n\r\n menuPause.Enabled = True\r\n menuNewGame.Enabled = False\r\n Me.BackgroundImage = My.Resources.blueBG\r\n Pad.Visible = True\r\n cmdStart.Visible = True\r\n\r\n For xx = 0 To 9\r\n blockbreak(xx) = 1\r\n Next\r\n\r\n Pad.Top = PlayField.Top + 309\r\n powerups = 0\r\n readHighScore()\r\n\r\n gameDiff()\r\n\r\n txtAnnouncement.Text = \"Welcome!\"\r\n\r\n life = startLives\r\n pause = 0\r\n fireBall = 0\r\n blocksDestroyed = 0\r\n level = 1\r\n ballstuck = 100\r\n lblLives.Text = (\"Lives: \" & life)\r\n lblHighscore.Text = (\"High Score: \" & highScore)\r\n SetStyle(ControlStyles.UserPaint, True)\r\n SetStyle(ControlStyles.AllPaintingInWmPaint, True)\r\n SetStyle(ControlStyles.DoubleBuffer, True)\r\n timerStart.Enabled = True\r\n\r\n Createball() 'Creates a ball\r\n\r\n cannonshot = New System.Windows.Forms.PictureBox\r\n cannonshot.Image = My.Resources.cannonShots\r\n cannonshot.Location = New System.Drawing.Point(-10, -10)\r\n cannonshot.Name = \"image\"\r\n cannonshot.Size = New System.Drawing.Size(6, 30)\r\n cannonshot.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom\r\n cannonshot.Visible = True\r\n cannonshot.BackColor = Color.Transparent\r\n Me.Controls.Add(powerupPic(1, powerup(1)))\r\n\r\n Me.Controls.Add(cannonshot)\r\n\r\n ballz = 1\r\n lvl() 'Creats the level\r\n End Sub\r\n Private Sub cmdResume_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdResume.Click\r\n paused()\r\n End Sub\r\n Private Sub saveHighScore()\r\n Try\r\n Dim FILENAME As String = (CurDir() & \"\\high scores.game\")\r\n Try\r\n objFSO = CreateObject(\"Scripting.FileSystemObject\")\r\n Dim file2 As Object\r\n file2 = objFSO.GetFile(FILENAME)\r\n file2.delete()\r\n Catch\r\n End Try\r\n\r\n ' Get a StreamReader class that can be used to read the file \r\n Dim objFileStream As FileStream\r\n objFileStream = File.Create(FILENAME)\r\n fileDate = FileDateTime(FILENAME)\r\n\r\n Dim encoder As New System.Text.ASCIIEncoding()\r\n Dim Str As String\r\n Dim encodedHighscore As String\r\n Dim buffer() As Byte\r\n\r\n ' Write high scores to file\r\n Str = fileDate\r\n Str += vbNewLine\r\n encodedHighscore = highScore + 10 - (highScore * 299 + 21) 'Encodes highscore\r\n\r\n ReDim buffer(Str.Length - 1)\r\n encoder.GetBytes(Str, 0, Str.Length, buffer, 0)\r\n objFileStream.Write(buffer, 0, buffer.Length)\r\n\r\n ReDim buffer(encodedHighscore.Length - 1)\r\n encoder.GetBytes(encodedHighscore, 0, encodedHighscore.Length, buffer, 0)\r\n objFileStream.Write(buffer, 0, buffer.Length)\r\n\r\n ' Close the stream \r\n objFileStream.Close()\r\n Catch\r\n MsgBox(\"Error! Unable to save preferences. Please check that save file is not read only or in use\")\r\n Exit Sub\r\n End Try\r\n End Sub\r\n Private Sub readHighScore()\r\n Try\r\n Dim fileName As String = (CurDir() & \"\\high scores.game\")\r\n\r\n ' Get a StreamReader class that can be used to read the file \r\n Dim objStreamReader As StreamReader\r\n\r\n Dim currentFileDate As String = FileDateTime(fileName)\r\n\r\n objStreamReader = File.OpenText(fileName) 'Open file\r\n\r\n fileDate = objStreamReader.ReadLine()\r\n\r\n If fileDate = currentFileDate Then 'Checks if file has been altered or not\r\n\r\n 'Read player names & scores from file\r\n highScore = objStreamReader.ReadLine()\r\n highScore = 30 + ((highScore + 11) \/ -298)\r\n\r\n 'Close the stream \r\n objStreamReader.Close()\r\n Else\r\n clearHighScore() 'Clear file\r\n End If\r\n Catch\r\n highScore = 0\r\n\r\n End Try\r\n End Sub\r\n Public Sub clearHighScore()\r\n highScore = 0 'Reset highscore\r\n 'set file Dir\r\n Dim FILENAME As String = (CurDir() & \"\\high scores.game\")\r\n\r\n Dim objFileStream As FileStream\r\n objFileStream = File.Create(FILENAME) 'Create file\r\n\r\n Dim encoder As New System.Text.ASCIIEncoding() 'Set encoder\r\n Dim Str As String\r\n Dim buffer() As Byte\r\n\r\n Str = (highScore + 10 - (highScore * 298 + highScore + 21)) - 30 'Encode Highscore\r\n Str += vbNewLine\r\n\r\n 'Write highscore\r\n ReDim buffer(Str.Length - 1)\r\n encoder.GetBytes(Str, 0, Str.Length, buffer, 0)\r\n objFileStream.Write(buffer, 0, buffer.Length)\r\n\r\n objFileStream.Close()\r\n End Sub\r\n Private Sub gameDiff()\r\n 'Sets the game difficulty\r\n If gameDifficulty = 1 Then\r\n maxSpeed = 10 'Set max speed of ball\r\n startLives = 8 'Set starting amount of lives\r\n ballStartSpeed = 4 'Set starting speed of ball\r\n ElseIf gameDifficulty = 2 Then\r\n maxSpeed = 12\r\n startLives = 5\r\n ballStartSpeed = 5\r\n ElseIf gameDifficulty = 3 Then\r\n maxSpeed = 14\r\n startLives = 3\r\n ballStartSpeed = 6\r\n ElseIf gameDifficulty = 4 Then\r\n maxSpeed = 16\r\n startLives = 2\r\n ballStartSpeed = 8\r\n End If\r\n End Sub\r\n\r\n Private Sub menuEasy_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles menuEasy.Click\r\n gameDifficulty = 1\r\n End Sub\r\n\r\n Private Sub menuNormal_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles menuNormal.Click\r\n gameDifficulty = 2\r\n End Sub\r\n\r\n Private Sub menuHard_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles menuHard.Click\r\n gameDifficulty = 3\r\n End Sub\r\n\r\n Private Sub menuCrazy_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles menuCrazy.Click\r\n gameDifficulty = 4\r\n End Sub\r\n Public Sub SaveConfigurations()\r\n Try\r\n Dim FILENAME As String = (CurDir() & \"\\config.game\")\r\n Try\r\n objFSO = CreateObject(\"Scripting.FileSystemObject\")\r\n Dim file2 As Object\r\n file2 = objFSO.GetFile(FILENAME)\r\n file2.delete()\r\n Catch\r\n End Try\r\n\r\n Dim objFileStream As FileStream\r\n objFileStream = File.Create(FILENAME)\r\n Dim Str As String = 0\r\n Dim buffer() As Byte\r\n Dim encoder As New System.Text.ASCIIEncoding()\r\n fileDate = FileDateTime(FILENAME)\r\n\r\n Str = fileDate\r\n Str += vbNewLine\r\n ReDim buffer(Str.Length - 1)\r\n encoder.GetBytes(Str, 0, Str.Length, buffer, 0)\r\n objFileStream.Write(buffer, 0, buffer.Length)\r\n\r\n Select Case gameDifficulty\r\n Case 0\r\n 'If game settings is set to custom then save custom settings\r\n Str = \"0\"\r\n Str += vbNewLine\r\n ReDim buffer(Str.Length - 1)\r\n encoder.GetBytes(Str, 0, Str.Length, buffer, 0)\r\n objFileStream.Write(buffer, 0, buffer.Length)\r\n Str = maxSpeed\r\n Str += vbNewLine\r\n ReDim buffer(Str.Length - 1)\r\n encoder.GetBytes(Str, 0, Str.Length, buffer, 0)\r\n objFileStream.Write(buffer, 0, buffer.Length)\r\n Str = startLives\r\n Str += vbNewLine\r\n ReDim buffer(Str.Length - 1)\r\n encoder.GetBytes(Str, 0, Str.Length, buffer, 0)\r\n objFileStream.Write(buffer, 0, buffer.Length)\r\n Str = ballStartSpeed\r\n Case 1\r\n 'Game set to easy \r\n Str = \"1\"\r\n Case 2\r\n 'Game set to normal \r\n Str = \"2\"\r\n Case 3\r\n 'Game set to hard\r\n Str = \"3\"\r\n Case 4\r\n 'Game set to Crazy\r\n Str = \"4\"\r\n End Select\r\n\r\n Str += vbNewLine\r\n\r\n ' Write diff level to file\r\n ReDim buffer(Str.Length - 1)\r\n encoder.GetBytes(Str, 0, Str.Length, buffer, 0)\r\n objFileStream.Write(buffer, 0, buffer.Length)\r\n\r\n Str = locked\r\n\r\n ' Write diff level to file\r\n ReDim buffer(Str.Length - 1)\r\n encoder.GetBytes(Str, 0, Str.Length, buffer, 0)\r\n objFileStream.Write(buffer, 0, buffer.Length)\r\n\r\n ' Close the stream \r\n objFileStream.Close()\r\n Catch\r\n MsgBox(\"Error! Unable to save preferences. Please check that save file is not read only or in use\")\r\n Exit Sub\r\n End Try\r\n End Sub\r\n Public Sub LoadConfigurations()\r\n fileName = (CurDir() & \"\\config.game\")\r\n Dim Str As String\r\n\r\n ' Get a StreamReader class that can be used to read the file \r\n Dim objStreamReader As StreamReader\r\n\r\n Try\r\n ' Open file\r\n objStreamReader = File.OpenText(fileName)\r\n\r\n 'Difficulty setting\r\n\r\n ' Read line in file\r\n Dim currentFileDate As String = FileDateTime(fileName)\r\n fileDate = objStreamReader.ReadLine()\r\n If fileDate = currentFileDate Then\r\n Str = objStreamReader.ReadLine()\r\n If Str = 0 Then\r\n gameDifficulty = Str\r\n maxSpeed = objStreamReader.ReadLine()\r\n startLives = objStreamReader.ReadLine()\r\n ballStartSpeed = objStreamReader.ReadLine()\r\n ElseIf gameDifficulty <= 4 Then\r\n gameDifficulty = Str\r\n End If\r\n locked = objStreamReader.ReadLine()\r\n If locked = True Then\r\n gameDifficulty = 2\r\n End If\r\n objStreamReader.Close()\r\n Else\r\n gameDifficulty = 2\r\n locked = True\r\n End If\r\n Catch\r\n gameDifficulty = 2\r\n Exit Sub\r\n End Try\r\n End Sub\r\n\r\n Private Sub ReturnToMenuToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ReturnToMenuToolStripMenuItem.Click\r\n Dim sure As Integer\r\n pause = 0\r\n paused()\r\n sure = MsgBox(\"Are you sure you want to exit to menu?\", MsgBoxStyle.OkCancel)\r\n If sure <> 1 Then\r\n paused()\r\n Else\r\n reloadMenu()\r\n End If\r\n End Sub\r\n Private Sub reloadMenu()\r\n Dim x, y As Integer\r\n For x = 0 To numOfBalls\r\n ball(x).Visible = False\r\n Next\r\n saveHighScore()\r\n level = 0\r\n score = 0\r\n life = 0\r\n If aiBotEnabled = True Then\r\n aiBotEnabled = False\r\n aiPad.Visible = False\r\n End If\r\n For x = 0 To 9\r\n For y = 0 To (powerup(x) - 1)\r\n powerupPic(x, y).Top = 600\r\n Next\r\n Next\r\n resetAll()\r\n lvlclear()\r\n If locked = False Then\r\n menuDifficulty.Enabled = True\r\n End If\r\n picBreakout.Visible = True\r\n picExit.Visible = True\r\n picHowTo.Visible = True\r\n picNewgame.Visible = True\r\n picOptions.Visible = True\r\n picAbout.Visible = True\r\n menuFullScreenMode.Enabled = False\r\n menuLevel.Enabled = False\r\n menuPause.Enabled = False\r\n menuNewGame.Enabled = True\r\n Me.BackgroundImage = My.Resources.Waves\r\n Pad.Visible = False\r\n cmdStart.Visible = False\r\n cmdNext.Visible = False\r\n cmdTryAgain.Visible = False\r\n cmdResume.Visible = False\r\n cmdReset.Visible = False\r\n timerStart.Enabled = False\r\n ballInteract.Enabled = False\r\n End Sub\r\nEnd Class\r\n","avg_line_length":42.9271720613,"max_line_length":290,"alphanum_fraction":0.5012153622} {"size":3684,"ext":"frm","lang":"Visual Basic","max_stars_count":null,"content":"TYPE=VIEW\nquery=select `performance_schema`.`events_statements_summary_by_digest`.`DIGEST_TEXT` AS `query`,`performance_schema`.`events_statements_summary_by_digest`.`SCHEMA_NAME` AS `db`,`performance_schema`.`events_statements_summary_by_digest`.`COUNT_STAR` AS `exec_count`,`performance_schema`.`events_statements_summary_by_digest`.`SUM_ERRORS` AS `errors`,(ifnull((`performance_schema`.`events_statements_summary_by_digest`.`SUM_ERRORS` \/ nullif(`performance_schema`.`events_statements_summary_by_digest`.`COUNT_STAR`,0)),0) * 100) AS `error_pct`,`performance_schema`.`events_statements_summary_by_digest`.`SUM_WARNINGS` AS `warnings`,(ifnull((`performance_schema`.`events_statements_summary_by_digest`.`SUM_WARNINGS` \/ nullif(`performance_schema`.`events_statements_summary_by_digest`.`COUNT_STAR`,0)),0) * 100) AS `warning_pct`,`performance_schema`.`events_statements_summary_by_digest`.`FIRST_SEEN` AS `first_seen`,`performance_schema`.`events_statements_summary_by_digest`.`LAST_SEEN` AS `last_seen`,`performance_schema`.`events_statements_summary_by_digest`.`DIGEST` AS `digest` from `performance_schema`.`events_statements_summary_by_digest` where ((`performance_schema`.`events_statements_summary_by_digest`.`SUM_ERRORS` > 0) or (`performance_schema`.`events_statements_summary_by_digest`.`SUM_WARNINGS` > 0)) order by `performance_schema`.`events_statements_summary_by_digest`.`SUM_ERRORS` desc,`performance_schema`.`events_statements_summary_by_digest`.`SUM_WARNINGS` desc\nmd5=0cc4a3464fb9fc3c6d1c4e45d15bc1a1\nupdatable=1\nalgorithm=2\ndefiner_user=mysql.sys\ndefiner_host=localhost\nsuid=0\nwith_check_option=0\ntimestamp=2019-06-22 06:30:20\ncreate-version=1\nsource=SELECT DIGEST_TEXT AS query, SCHEMA_NAME as db, COUNT_STAR AS exec_count, SUM_ERRORS AS errors, IFNULL(SUM_ERRORS \/ NULLIF(COUNT_STAR, 0), 0) * 100 as error_pct, SUM_WARNINGS AS warnings, IFNULL(SUM_WARNINGS \/ NULLIF(COUNT_STAR, 0), 0) * 100 as warning_pct, FIRST_SEEN as first_seen, LAST_SEEN as last_seen, DIGEST AS digest FROM performance_schema.events_statements_summary_by_digest WHERE SUM_ERRORS > 0 OR SUM_WARNINGS > 0 ORDER BY SUM_ERRORS DESC, SUM_WARNINGS DESC\nclient_cs_name=utf8\nconnection_cl_name=utf8_general_ci\nview_body_utf8=select `performance_schema`.`events_statements_summary_by_digest`.`DIGEST_TEXT` AS `query`,`performance_schema`.`events_statements_summary_by_digest`.`SCHEMA_NAME` AS `db`,`performance_schema`.`events_statements_summary_by_digest`.`COUNT_STAR` AS `exec_count`,`performance_schema`.`events_statements_summary_by_digest`.`SUM_ERRORS` AS `errors`,(ifnull((`performance_schema`.`events_statements_summary_by_digest`.`SUM_ERRORS` \/ nullif(`performance_schema`.`events_statements_summary_by_digest`.`COUNT_STAR`,0)),0) * 100) AS `error_pct`,`performance_schema`.`events_statements_summary_by_digest`.`SUM_WARNINGS` AS `warnings`,(ifnull((`performance_schema`.`events_statements_summary_by_digest`.`SUM_WARNINGS` \/ nullif(`performance_schema`.`events_statements_summary_by_digest`.`COUNT_STAR`,0)),0) * 100) AS `warning_pct`,`performance_schema`.`events_statements_summary_by_digest`.`FIRST_SEEN` AS `first_seen`,`performance_schema`.`events_statements_summary_by_digest`.`LAST_SEEN` AS `last_seen`,`performance_schema`.`events_statements_summary_by_digest`.`DIGEST` AS `digest` from `performance_schema`.`events_statements_summary_by_digest` where ((`performance_schema`.`events_statements_summary_by_digest`.`SUM_ERRORS` > 0) or (`performance_schema`.`events_statements_summary_by_digest`.`SUM_WARNINGS` > 0)) order by `performance_schema`.`events_statements_summary_by_digest`.`SUM_ERRORS` desc,`performance_schema`.`events_statements_summary_by_digest`.`SUM_WARNINGS` desc\n","avg_line_length":230.25,"max_line_length":1484,"alphanum_fraction":0.8365906623} {"size":36702,"ext":"vb","lang":"Visual Basic","max_stars_count":null,"content":"\ufeff'------------------------------------------------------------------------------\n' \n' This code was generated by a tool.\n' Runtime Version:2.0.50727.4927\n'\n' Changes to this file may cause incorrect behavior and will be lost if\n' the code is regenerated.\n' <\/auto-generated>\n'------------------------------------------------------------------------------\n\nOption Strict Off\nOption Explicit On\n\n\n\n'''\n'''Represents a strongly typed in-memory cache of data.\n'''<\/summary>\n _\nPartial Public Class DataSetRemarksDaily\n Inherits Global.System.Data.DataSet\n \n Private tableDataTable1 As DataTable1DataTable\n \n Private _schemaSerializationMode As Global.System.Data.SchemaSerializationMode = Global.System.Data.SchemaSerializationMode.IncludeSchema\n \n _\n Public Sub New()\n MyBase.New\n Me.BeginInit\n Me.InitClass\n Dim schemaChangedHandler As Global.System.ComponentModel.CollectionChangeEventHandler = AddressOf Me.SchemaChanged\n AddHandler MyBase.Tables.CollectionChanged, schemaChangedHandler\n AddHandler MyBase.Relations.CollectionChanged, schemaChangedHandler\n Me.EndInit\n End Sub\n \n _\n Protected Sub New(ByVal info As Global.System.Runtime.Serialization.SerializationInfo, ByVal context As Global.System.Runtime.Serialization.StreamingContext)\n MyBase.New(info, context, false)\n If (Me.IsBinarySerialized(info, context) = true) Then\n Me.InitVars(false)\n Dim schemaChangedHandler1 As Global.System.ComponentModel.CollectionChangeEventHandler = AddressOf Me.SchemaChanged\n AddHandler Me.Tables.CollectionChanged, schemaChangedHandler1\n AddHandler Me.Relations.CollectionChanged, schemaChangedHandler1\n Return\n End If\n Dim strSchema As String = CType(info.GetValue(\"XmlSchema\", GetType(String)),String)\n If (Me.DetermineSchemaSerializationMode(info, context) = Global.System.Data.SchemaSerializationMode.IncludeSchema) Then\n Dim ds As Global.System.Data.DataSet = New Global.System.Data.DataSet\n ds.ReadXmlSchema(New Global.System.Xml.XmlTextReader(New Global.System.IO.StringReader(strSchema)))\n If (Not (ds.Tables(\"DataTable1\")) Is Nothing) Then\n MyBase.Tables.Add(New DataTable1DataTable(ds.Tables(\"DataTable1\")))\n End If\n Me.DataSetName = ds.DataSetName\n Me.Prefix = ds.Prefix\n Me.Namespace = ds.Namespace\n Me.Locale = ds.Locale\n Me.CaseSensitive = ds.CaseSensitive\n Me.EnforceConstraints = ds.EnforceConstraints\n Me.Merge(ds, false, Global.System.Data.MissingSchemaAction.Add)\n Me.InitVars\n Else\n Me.ReadXmlSchema(New Global.System.Xml.XmlTextReader(New Global.System.IO.StringReader(strSchema)))\n End If\n Me.GetSerializationData(info, context)\n Dim schemaChangedHandler As Global.System.ComponentModel.CollectionChangeEventHandler = AddressOf Me.SchemaChanged\n AddHandler MyBase.Tables.CollectionChanged, schemaChangedHandler\n AddHandler Me.Relations.CollectionChanged, schemaChangedHandler\n End Sub\n \n _\n Public ReadOnly Property DataTable1() As DataTable1DataTable\n Get\n Return Me.tableDataTable1\n End Get\n End Property\n \n _\n Public Overrides Property SchemaSerializationMode() As Global.System.Data.SchemaSerializationMode\n Get\n Return Me._schemaSerializationMode\n End Get\n Set\n Me._schemaSerializationMode = value\n End Set\n End Property\n \n _\n Public Shadows ReadOnly Property Tables() As Global.System.Data.DataTableCollection\n Get\n Return MyBase.Tables\n End Get\n End Property\n \n _\n Public Shadows ReadOnly Property Relations() As Global.System.Data.DataRelationCollection\n Get\n Return MyBase.Relations\n End Get\n End Property\n \n _\n Protected Overrides Sub InitializeDerivedDataSet()\n Me.BeginInit\n Me.InitClass\n Me.EndInit\n End Sub\n \n _\n Public Overrides Function Clone() As Global.System.Data.DataSet\n Dim cln As DataSetRemarksDaily = CType(MyBase.Clone,DataSetRemarksDaily)\n cln.InitVars\n cln.SchemaSerializationMode = Me.SchemaSerializationMode\n Return cln\n End Function\n \n _\n Protected Overrides Function ShouldSerializeTables() As Boolean\n Return false\n End Function\n \n _\n Protected Overrides Function ShouldSerializeRelations() As Boolean\n Return false\n End Function\n \n _\n Protected Overrides Sub ReadXmlSerializable(ByVal reader As Global.System.Xml.XmlReader)\n If (Me.DetermineSchemaSerializationMode(reader) = Global.System.Data.SchemaSerializationMode.IncludeSchema) Then\n Me.Reset\n Dim ds As Global.System.Data.DataSet = New Global.System.Data.DataSet\n ds.ReadXml(reader)\n If (Not (ds.Tables(\"DataTable1\")) Is Nothing) Then\n MyBase.Tables.Add(New DataTable1DataTable(ds.Tables(\"DataTable1\")))\n End If\n Me.DataSetName = ds.DataSetName\n Me.Prefix = ds.Prefix\n Me.Namespace = ds.Namespace\n Me.Locale = ds.Locale\n Me.CaseSensitive = ds.CaseSensitive\n Me.EnforceConstraints = ds.EnforceConstraints\n Me.Merge(ds, false, Global.System.Data.MissingSchemaAction.Add)\n Me.InitVars\n Else\n Me.ReadXml(reader)\n Me.InitVars\n End If\n End Sub\n \n _\n Protected Overrides Function GetSchemaSerializable() As Global.System.Xml.Schema.XmlSchema\n Dim stream As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream\n Me.WriteXmlSchema(New Global.System.Xml.XmlTextWriter(stream, Nothing))\n stream.Position = 0\n Return Global.System.Xml.Schema.XmlSchema.Read(New Global.System.Xml.XmlTextReader(stream), Nothing)\n End Function\n \n _\n Friend Overloads Sub InitVars()\n Me.InitVars(true)\n End Sub\n \n _\n Friend Overloads Sub InitVars(ByVal initTable As Boolean)\n Me.tableDataTable1 = CType(MyBase.Tables(\"DataTable1\"),DataTable1DataTable)\n If (initTable = true) Then\n If (Not (Me.tableDataTable1) Is Nothing) Then\n Me.tableDataTable1.InitVars\n End If\n End If\n End Sub\n \n _\n Private Sub InitClass()\n Me.DataSetName = \"DataSetRemarksDaily\"\n Me.Prefix = \"\"\n Me.Namespace = \"http:\/\/tempuri.org\/DataSetRemarksDaily.xsd\"\n Me.EnforceConstraints = true\n Me.SchemaSerializationMode = Global.System.Data.SchemaSerializationMode.IncludeSchema\n Me.tableDataTable1 = New DataTable1DataTable\n MyBase.Tables.Add(Me.tableDataTable1)\n End Sub\n \n _\n Private Function ShouldSerializeDataTable1() As Boolean\n Return false\n End Function\n \n _\n Private Sub SchemaChanged(ByVal sender As Object, ByVal e As Global.System.ComponentModel.CollectionChangeEventArgs)\n If (e.Action = Global.System.ComponentModel.CollectionChangeAction.Remove) Then\n Me.InitVars\n End If\n End Sub\n \n _\n Public Shared Function GetTypedDataSetSchema(ByVal xs As Global.System.Xml.Schema.XmlSchemaSet) As Global.System.Xml.Schema.XmlSchemaComplexType\n Dim ds As DataSetRemarksDaily = New DataSetRemarksDaily\n Dim type As Global.System.Xml.Schema.XmlSchemaComplexType = New Global.System.Xml.Schema.XmlSchemaComplexType\n Dim sequence As Global.System.Xml.Schema.XmlSchemaSequence = New Global.System.Xml.Schema.XmlSchemaSequence\n Dim any As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny\n any.Namespace = ds.Namespace\n sequence.Items.Add(any)\n type.Particle = sequence\n Dim dsSchema As Global.System.Xml.Schema.XmlSchema = ds.GetSchemaSerializable\n If xs.Contains(dsSchema.TargetNamespace) Then\n Dim s1 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream\n Dim s2 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream\n Try \n Dim schema As Global.System.Xml.Schema.XmlSchema = Nothing\n dsSchema.Write(s1)\n Dim schemas As Global.System.Collections.IEnumerator = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator\n Do While schemas.MoveNext\n schema = CType(schemas.Current,Global.System.Xml.Schema.XmlSchema)\n s2.SetLength(0)\n schema.Write(s2)\n If (s1.Length = s2.Length) Then\n s1.Position = 0\n s2.Position = 0\n \n Do While ((s1.Position <> s1.Length) _\n AndAlso (s1.ReadByte = s2.ReadByte))\n \n \n Loop\n If (s1.Position = s1.Length) Then\n Return type\n End If\n End If\n \n Loop\n Finally\n If (Not (s1) Is Nothing) Then\n s1.Close\n End If\n If (Not (s2) Is Nothing) Then\n s2.Close\n End If\n End Try\n End If\n xs.Add(dsSchema)\n Return type\n End Function\n \n Public Delegate Sub DataTable1RowChangeEventHandler(ByVal sender As Object, ByVal e As DataTable1RowChangeEvent)\n \n '''\n '''Represents the strongly named DataTable class.\n '''<\/summary>\n _\n Partial Public Class DataTable1DataTable\n Inherits Global.System.Data.TypedTableBase(Of DataTable1Row)\n \n Private columnAccountName As Global.System.Data.DataColumn\n \n Private columnAmountUSD As Global.System.Data.DataColumn\n \n Private columnAmountRiel As Global.System.Data.DataColumn\n \n _\n Public Sub New()\n MyBase.New\n Me.TableName = \"DataTable1\"\n Me.BeginInit\n Me.InitClass\n Me.EndInit\n End Sub\n \n _\n Friend Sub New(ByVal table As Global.System.Data.DataTable)\n MyBase.New\n Me.TableName = table.TableName\n If (table.CaseSensitive <> table.DataSet.CaseSensitive) Then\n Me.CaseSensitive = table.CaseSensitive\n End If\n If (table.Locale.ToString <> table.DataSet.Locale.ToString) Then\n Me.Locale = table.Locale\n End If\n If (table.Namespace <> table.DataSet.Namespace) Then\n Me.Namespace = table.Namespace\n End If\n Me.Prefix = table.Prefix\n Me.MinimumCapacity = table.MinimumCapacity\n End Sub\n \n _\n Protected Sub New(ByVal info As Global.System.Runtime.Serialization.SerializationInfo, ByVal context As Global.System.Runtime.Serialization.StreamingContext)\n MyBase.New(info, context)\n Me.InitVars\n End Sub\n \n _\n Public ReadOnly Property AccountNameColumn() As Global.System.Data.DataColumn\n Get\n Return Me.columnAccountName\n End Get\n End Property\n \n _\n Public ReadOnly Property AmountUSDColumn() As Global.System.Data.DataColumn\n Get\n Return Me.columnAmountUSD\n End Get\n End Property\n \n _\n Public ReadOnly Property AmountRielColumn() As Global.System.Data.DataColumn\n Get\n Return Me.columnAmountRiel\n End Get\n End Property\n \n _\n Public ReadOnly Property Count() As Integer\n Get\n Return Me.Rows.Count\n End Get\n End Property\n \n _\n Public Default ReadOnly Property Item(ByVal index As Integer) As DataTable1Row\n Get\n Return CType(Me.Rows(index),DataTable1Row)\n End Get\n End Property\n \n Public Event DataTable1RowChanging As DataTable1RowChangeEventHandler\n \n Public Event DataTable1RowChanged As DataTable1RowChangeEventHandler\n \n Public Event DataTable1RowDeleting As DataTable1RowChangeEventHandler\n \n Public Event DataTable1RowDeleted As DataTable1RowChangeEventHandler\n \n _\n Public Overloads Sub AddDataTable1Row(ByVal row As DataTable1Row)\n Me.Rows.Add(row)\n End Sub\n \n _\n Public Overloads Function AddDataTable1Row(ByVal AccountName As String, ByVal AmountUSD As Double, ByVal AmountRiel As Double) As DataTable1Row\n Dim rowDataTable1Row As DataTable1Row = CType(Me.NewRow,DataTable1Row)\n Dim columnValuesArray() As Object = New Object() {AccountName, AmountUSD, AmountRiel}\n rowDataTable1Row.ItemArray = columnValuesArray\n Me.Rows.Add(rowDataTable1Row)\n Return rowDataTable1Row\n End Function\n \n _\n Public Overrides Function Clone() As Global.System.Data.DataTable\n Dim cln As DataTable1DataTable = CType(MyBase.Clone,DataTable1DataTable)\n cln.InitVars\n Return cln\n End Function\n \n _\n Protected Overrides Function CreateInstance() As Global.System.Data.DataTable\n Return New DataTable1DataTable\n End Function\n \n _\n Friend Sub InitVars()\n Me.columnAccountName = MyBase.Columns(\"AccountName\")\n Me.columnAmountUSD = MyBase.Columns(\"AmountUSD\")\n Me.columnAmountRiel = MyBase.Columns(\"AmountRiel\")\n End Sub\n \n _\n Private Sub InitClass()\n Me.columnAccountName = New Global.System.Data.DataColumn(\"AccountName\", GetType(String), Nothing, Global.System.Data.MappingType.Element)\n MyBase.Columns.Add(Me.columnAccountName)\n Me.columnAmountUSD = New Global.System.Data.DataColumn(\"AmountUSD\", GetType(Double), Nothing, Global.System.Data.MappingType.Element)\n MyBase.Columns.Add(Me.columnAmountUSD)\n Me.columnAmountRiel = New Global.System.Data.DataColumn(\"AmountRiel\", GetType(Double), Nothing, Global.System.Data.MappingType.Element)\n MyBase.Columns.Add(Me.columnAmountRiel)\n Me.columnAccountName.MaxLength = 500\n End Sub\n \n _\n Public Function NewDataTable1Row() As DataTable1Row\n Return CType(Me.NewRow,DataTable1Row)\n End Function\n \n _\n Protected Overrides Function NewRowFromBuilder(ByVal builder As Global.System.Data.DataRowBuilder) As Global.System.Data.DataRow\n Return New DataTable1Row(builder)\n End Function\n \n _\n Protected Overrides Function GetRowType() As Global.System.Type\n Return GetType(DataTable1Row)\n End Function\n \n _\n Protected Overrides Sub OnRowChanged(ByVal e As Global.System.Data.DataRowChangeEventArgs)\n MyBase.OnRowChanged(e)\n If (Not (Me.DataTable1RowChangedEvent) Is Nothing) Then\n RaiseEvent DataTable1RowChanged(Me, New DataTable1RowChangeEvent(CType(e.Row,DataTable1Row), e.Action))\n End If\n End Sub\n \n _\n Protected Overrides Sub OnRowChanging(ByVal e As Global.System.Data.DataRowChangeEventArgs)\n MyBase.OnRowChanging(e)\n If (Not (Me.DataTable1RowChangingEvent) Is Nothing) Then\n RaiseEvent DataTable1RowChanging(Me, New DataTable1RowChangeEvent(CType(e.Row,DataTable1Row), e.Action))\n End If\n End Sub\n \n _\n Protected Overrides Sub OnRowDeleted(ByVal e As Global.System.Data.DataRowChangeEventArgs)\n MyBase.OnRowDeleted(e)\n If (Not (Me.DataTable1RowDeletedEvent) Is Nothing) Then\n RaiseEvent DataTable1RowDeleted(Me, New DataTable1RowChangeEvent(CType(e.Row,DataTable1Row), e.Action))\n End If\n End Sub\n \n _\n Protected Overrides Sub OnRowDeleting(ByVal e As Global.System.Data.DataRowChangeEventArgs)\n MyBase.OnRowDeleting(e)\n If (Not (Me.DataTable1RowDeletingEvent) Is Nothing) Then\n RaiseEvent DataTable1RowDeleting(Me, New DataTable1RowChangeEvent(CType(e.Row,DataTable1Row), e.Action))\n End If\n End Sub\n \n _\n Public Sub RemoveDataTable1Row(ByVal row As DataTable1Row)\n Me.Rows.Remove(row)\n End Sub\n \n _\n Public Shared Function GetTypedTableSchema(ByVal xs As Global.System.Xml.Schema.XmlSchemaSet) As Global.System.Xml.Schema.XmlSchemaComplexType\n Dim type As Global.System.Xml.Schema.XmlSchemaComplexType = New Global.System.Xml.Schema.XmlSchemaComplexType\n Dim sequence As Global.System.Xml.Schema.XmlSchemaSequence = New Global.System.Xml.Schema.XmlSchemaSequence\n Dim ds As DataSetRemarksDaily = New DataSetRemarksDaily\n Dim any1 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny\n any1.Namespace = \"http:\/\/www.w3.org\/2001\/XMLSchema\"\n any1.MinOccurs = New Decimal(0)\n any1.MaxOccurs = Decimal.MaxValue\n any1.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax\n sequence.Items.Add(any1)\n Dim any2 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny\n any2.Namespace = \"urn:schemas-microsoft-com:xml-diffgram-v1\"\n any2.MinOccurs = New Decimal(1)\n any2.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax\n sequence.Items.Add(any2)\n Dim attribute1 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute\n attribute1.Name = \"namespace\"\n attribute1.FixedValue = ds.Namespace\n type.Attributes.Add(attribute1)\n Dim attribute2 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute\n attribute2.Name = \"tableTypeName\"\n attribute2.FixedValue = \"DataTable1DataTable\"\n type.Attributes.Add(attribute2)\n type.Particle = sequence\n Dim dsSchema As Global.System.Xml.Schema.XmlSchema = ds.GetSchemaSerializable\n If xs.Contains(dsSchema.TargetNamespace) Then\n Dim s1 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream\n Dim s2 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream\n Try \n Dim schema As Global.System.Xml.Schema.XmlSchema = Nothing\n dsSchema.Write(s1)\n Dim schemas As Global.System.Collections.IEnumerator = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator\n Do While schemas.MoveNext\n schema = CType(schemas.Current,Global.System.Xml.Schema.XmlSchema)\n s2.SetLength(0)\n schema.Write(s2)\n If (s1.Length = s2.Length) Then\n s1.Position = 0\n s2.Position = 0\n \n Do While ((s1.Position <> s1.Length) _\n AndAlso (s1.ReadByte = s2.ReadByte))\n \n \n Loop\n If (s1.Position = s1.Length) Then\n Return type\n End If\n End If\n \n Loop\n Finally\n If (Not (s1) Is Nothing) Then\n s1.Close\n End If\n If (Not (s2) Is Nothing) Then\n s2.Close\n End If\n End Try\n End If\n xs.Add(dsSchema)\n Return type\n End Function\n End Class\n \n '''\n '''Represents strongly named DataRow class.\n '''<\/summary>\n _\n Partial Public Class DataTable1Row\n Inherits Global.System.Data.DataRow\n \n Private tableDataTable1 As DataTable1DataTable\n \n _\n Friend Sub New(ByVal rb As Global.System.Data.DataRowBuilder)\n MyBase.New(rb)\n Me.tableDataTable1 = CType(Me.Table,DataTable1DataTable)\n End Sub\n \n _\n Public Property AccountName() As String\n Get\n Try \n Return CType(Me(Me.tableDataTable1.AccountNameColumn),String)\n Catch e As Global.System.InvalidCastException\n Throw New Global.System.Data.StrongTypingException(\"The value for column 'AccountName' in table 'DataTable1' is DBNull.\", e)\n End Try\n End Get\n Set\n Me(Me.tableDataTable1.AccountNameColumn) = value\n End Set\n End Property\n \n _\n Public Property AmountUSD() As Double\n Get\n Try \n Return CType(Me(Me.tableDataTable1.AmountUSDColumn),Double)\n Catch e As Global.System.InvalidCastException\n Throw New Global.System.Data.StrongTypingException(\"The value for column 'AmountUSD' in table 'DataTable1' is DBNull.\", e)\n End Try\n End Get\n Set\n Me(Me.tableDataTable1.AmountUSDColumn) = value\n End Set\n End Property\n \n _\n Public Property AmountRiel() As Double\n Get\n Try \n Return CType(Me(Me.tableDataTable1.AmountRielColumn),Double)\n Catch e As Global.System.InvalidCastException\n Throw New Global.System.Data.StrongTypingException(\"The value for column 'AmountRiel' in table 'DataTable1' is DBNull.\", e)\n End Try\n End Get\n Set\n Me(Me.tableDataTable1.AmountRielColumn) = value\n End Set\n End Property\n \n _\n Public Function IsAccountNameNull() As Boolean\n Return Me.IsNull(Me.tableDataTable1.AccountNameColumn)\n End Function\n \n _\n Public Sub SetAccountNameNull()\n Me(Me.tableDataTable1.AccountNameColumn) = Global.System.Convert.DBNull\n End Sub\n \n _\n Public Function IsAmountUSDNull() As Boolean\n Return Me.IsNull(Me.tableDataTable1.AmountUSDColumn)\n End Function\n \n _\n Public Sub SetAmountUSDNull()\n Me(Me.tableDataTable1.AmountUSDColumn) = Global.System.Convert.DBNull\n End Sub\n \n _\n Public Function IsAmountRielNull() As Boolean\n Return Me.IsNull(Me.tableDataTable1.AmountRielColumn)\n End Function\n \n _\n Public Sub SetAmountRielNull()\n Me(Me.tableDataTable1.AmountRielColumn) = Global.System.Convert.DBNull\n End Sub\n End Class\n \n '''\n '''Row event argument class\n '''<\/summary>\n _\n Public Class DataTable1RowChangeEvent\n Inherits Global.System.EventArgs\n \n Private eventRow As DataTable1Row\n \n Private eventAction As Global.System.Data.DataRowAction\n \n _\n Public Sub New(ByVal row As DataTable1Row, ByVal action As Global.System.Data.DataRowAction)\n MyBase.New\n Me.eventRow = row\n Me.eventAction = action\n End Sub\n \n _\n Public ReadOnly Property Row() As DataTable1Row\n Get\n Return Me.eventRow\n End Get\n End Property\n \n _\n Public ReadOnly Property Action() As Global.System.Data.DataRowAction\n Get\n Return Me.eventAction\n End Get\n End Property\n End Class\nEnd Class\n\nNamespace DataSetRemarksDailyTableAdapters\n \n '''\n '''Represents the connection and commands used to retrieve and save data.\n '''<\/summary>\n _\n Partial Public Class DataTable1TableAdapter\n Inherits Global.System.ComponentModel.Component\n \n Private WithEvents _adapter As Global.System.Data.SqlClient.SqlDataAdapter\n \n Private _connection As Global.System.Data.SqlClient.SqlConnection\n \n Private _commandCollection() As Global.System.Data.SqlClient.SqlCommand\n \n Private _clearBeforeFill As Boolean\n \n _\n Public Sub New()\n MyBase.New\n Me.ClearBeforeFill = true\n End Sub\n \n _\n Private ReadOnly Property Adapter() As Global.System.Data.SqlClient.SqlDataAdapter\n Get\n If (Me._adapter Is Nothing) Then\n Me.InitAdapter\n End If\n Return Me._adapter\n End Get\n End Property\n \n _\n Friend Property Connection() As Global.System.Data.SqlClient.SqlConnection\n Get\n If (Me._connection Is Nothing) Then\n Me.InitConnection\n End If\n Return Me._connection\n End Get\n Set\n Me._connection = value\n If (Not (Me.Adapter.InsertCommand) Is Nothing) Then\n Me.Adapter.InsertCommand.Connection = value\n End If\n If (Not (Me.Adapter.DeleteCommand) Is Nothing) Then\n Me.Adapter.DeleteCommand.Connection = value\n End If\n If (Not (Me.Adapter.UpdateCommand) Is Nothing) Then\n Me.Adapter.UpdateCommand.Connection = value\n End If\n Dim i As Integer = 0\n Do While (i < Me.CommandCollection.Length)\n If (Not (Me.CommandCollection(i)) Is Nothing) Then\n CType(Me.CommandCollection(i),Global.System.Data.SqlClient.SqlCommand).Connection = value\n End If\n i = (i + 1)\n Loop\n End Set\n End Property\n \n _\n Protected ReadOnly Property CommandCollection() As Global.System.Data.SqlClient.SqlCommand()\n Get\n If (Me._commandCollection Is Nothing) Then\n Me.InitCommandCollection\n End If\n Return Me._commandCollection\n End Get\n End Property\n \n _\n Public Property ClearBeforeFill() As Boolean\n Get\n Return Me._clearBeforeFill\n End Get\n Set\n Me._clearBeforeFill = value\n End Set\n End Property\n \n _\n Private Sub InitAdapter()\n Me._adapter = New Global.System.Data.SqlClient.SqlDataAdapter\n Dim tableMapping As Global.System.Data.Common.DataTableMapping = New Global.System.Data.Common.DataTableMapping\n tableMapping.SourceTable = \"Table\"\n tableMapping.DataSetTable = \"DataTable1\"\n tableMapping.ColumnMappings.Add(\"AccountName\", \"AccountName\")\n tableMapping.ColumnMappings.Add(\"AmountUSD\", \"AmountUSD\")\n tableMapping.ColumnMappings.Add(\"AmountRiel\", \"AmountRiel\")\n Me._adapter.TableMappings.Add(tableMapping)\n End Sub\n \n _\n Private Sub InitConnection()\n Me._connection = New Global.System.Data.SqlClient.SqlConnection\n Me._connection.ConnectionString = Global.TakeoHospitalInventory.My.MySettings.Default.TakeoDBConnectionString\n End Sub\n \n _\n Private Sub InitCommandCollection()\n Me._commandCollection = New Global.System.Data.SqlClient.SqlCommand(0) {}\n Me._commandCollection(0) = New Global.System.Data.SqlClient.SqlCommand\n Me._commandCollection(0).Connection = Me.Connection\n Me._commandCollection(0).CommandText = \"SELECT tblAccountName.AccountName, tblAccountAmount.AmountUSD AS AmountUSD, \"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)& _ \n \" tblAccountAmount.AmountRiel AS AmountRiel\"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&\"FROM tb\"& _ \n \"lAccountAmount INNER JOIN\"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&\" tblAccountName ON tblAccountAmo\"& _ \n \"unt.AID = tblAccountName.AID\"\n Me._commandCollection(0).CommandType = Global.System.Data.CommandType.Text\n End Sub\n \n _\n Public Overloads Overridable Function Fill(ByVal dataTable As DataSetRemarksDaily.DataTable1DataTable) As Integer\n Me.Adapter.SelectCommand = Me.CommandCollection(0)\n If (Me.ClearBeforeFill = true) Then\n dataTable.Clear\n End If\n Dim returnValue As Integer = Me.Adapter.Fill(dataTable)\n Return returnValue\n End Function\n \n _\n Public Overloads Overridable Function GetData() As DataSetRemarksDaily.DataTable1DataTable\n Me.Adapter.SelectCommand = Me.CommandCollection(0)\n Dim dataTable As DataSetRemarksDaily.DataTable1DataTable = New DataSetRemarksDaily.DataTable1DataTable\n Me.Adapter.Fill(dataTable)\n Return dataTable\n End Function\n End Class\nEnd Namespace\n","avg_line_length":47.2963917526,"max_line_length":212,"alphanum_fraction":0.6475396436} {"size":1240,"ext":"vb","lang":"Visual Basic","max_stars_count":2.0,"content":"\ufeffImports System.Data\nImports System.ComponentModel\nImports System.Windows.Forms\nImports System.Globalization\n\nPublic Class Class1\n Private myCultureInfo As CultureInfo\n ' \n _\n Public Property GetLanguage() As CultureInfo\n Get\n ' Insert code here.\n Return myCultureInfo\n End Get\n Set\n ' Insert code here.\n End Set\n End Property\n ' <\/Snippet1>\n \n Private ReadOnly Property Property1() As Integer\n Get\n ' \n ' Gets the attributes for the property.\n Dim attributes As AttributeCollection = _\n TypeDescriptor.GetProperties(Me)(\"GetLanguage\").Attributes\n \n ' Prints whether the property is marked as DesignOnly \n ' by retrieving the DesignOnlyAttribute from the AttributeCollection.\n Dim myAttribute As DesignOnlyAttribute = _\n CType(attributes(GetType(DesignOnlyAttribute)), DesignOnlyAttribute)\n Console.WriteLine((\"This property is design only :\" & _\n myAttribute.IsDesignOnly.ToString()))\n ' <\/Snippet2>\n Return 1\n End Get\n End Property\nEnd Class\n","avg_line_length":31.7948717949,"max_line_length":84,"alphanum_fraction":0.6209677419} {"size":5954,"ext":"vb","lang":"Visual Basic","max_stars_count":3.0,"content":"\ufeff\nImports Cito.Tester.Common\nImports Questify.Builder.Model.ContentModel.EntityClasses\nImports Cito.Tester.ContentModel\nImports Questify.Builder.Logic.PluginExtensibility.Html.Converters\n\nNamespace PluginExtensibility.Html.EditBehavior\n\n Public MustInherit Class XhtmlParameterBehaviorBase\n Inherits BaseHtmlEditorBehavior\n\n Private ReadOnly _param As XHtmlParameter\n Private _toParam As IHtmlConverter 'How to convert the html to value to be stored\n Private _toEditor As IHtmlConverter 'how to convert the stored value to html\n Private _inlineRetriever As IInlineRetriever\n Private _prevPrmValue As String\n Private _prevHtml As String\n Private _canInsertAudio As Boolean?\n Private _canInsertMovies As Boolean?\n\n Public Sub New(resourceEntity As ResourceEntity,\n resourceManager As ResourceManagerBase,\n contextIdentifier As Integer?,\n iltAdapter As ItemLayoutAdapter,\n stylesheets As Dictionary(Of String, String),\n headerStyleElementContent As String,\n param As XHtmlParameter)\n MyBase.New(resourceEntity, resourceManager, contextIdentifier, iltAdapter, stylesheets, headerStyleElementContent)\n\n _param = param\n Debug.Assert(param IsNot Nothing, \"XHtmlParameter Is nothing??!!\")\n End Sub\n\n Public Sub New(resourceEntity As ResourceEntity,\n resourceManager As ResourceManagerBase,\n contextIdentifier As Integer?,\n param As XHtmlParameter)\n Me.New(resourceEntity, resourceManager, contextIdentifier, Nothing, Nothing, String.Empty, param)\n End Sub\n\n Protected ReadOnly Property Param As XHtmlParameter\n Get\n Return _param\n End Get\n End Property\n\n Public Overrides ReadOnly Property CanCreateReferences As Boolean\n Get\n Return False 'We can not create references (but can insert!)\n End Get\n End Property\n\n Public Overrides ReadOnly Property CanInsertControls As Boolean\n Get\n Return False\n End Get\n End Property\n\n Public Overrides ReadOnly Property CanInsertAudio As Boolean\n Get\n If _canInsertAudio Is Nothing Then\n _canInsertAudio = MyBase.CanInsertAudio\n If _canInsertAudio Then\n _canInsertAudio = CheckCanInsertAudio()\n End If\n End If\n Return CBool(_canInsertAudio)\n End Get\n End Property\n\n Public Overrides ReadOnly Property CanInsertMovies As Boolean\n Get\n If _canInsertMovies Is Nothing Then\n _canInsertMovies = MyBase.CanInsertMovies\n If _canInsertMovies Then\n _canInsertMovies = CheckCanInsertMovies()\n End If\n End If\n Return CBool(_canInsertMovies)\n End Get\n End Property\n\n Public Overrides ReadOnly Property ShouldSwitchToPreviewModeOnLostFocus As Boolean\n Get\n Return True\n End Get\n End Property\n\n Public Overrides Function GetHtml() As String\n If (_toEditor Is Nothing) Then InitConverter()\n If Not Param.Value.Equals(_prevPrmValue, StringComparison.InvariantCultureIgnoreCase) Then\n Dim converted = _toEditor.ConvertHtml(Param.Value)\n MyBase.SetInlineElements(_inlineRetriever.InlineElements)\n _prevPrmValue = Param.Value\n _prevHtml = converted\n Return converted\n End If\n Return _prevHtml\n End Function\n\n Public Overrides Sub SetHtml(html As String)\n If (_toParam Is Nothing) Then InitConverter()\n If Not html.Equals(_prevHtml, StringComparison.InvariantCultureIgnoreCase) OrElse InlineElementPlaceholdersDirty Then\n _param.Value = _toParam.ConvertHtml(html)\n _prevHtml = html\n InlineElementPlaceholdersDirty = False\n Else\n _param.Value = _prevPrmValue\n End If\n End Sub\n\n Private Sub InitConverter()\n _toEditor = ConstructChain_FromParam2Editor()\n _toEditor.LastConverter.NextConverter = New HtmlConverter_PartialToFull(GetStyle(), HeaderStyleElementCont, ContextIdentifier, DefaultNamespaceManager, Me)\n _toParam = ConstructChain_FromEditor2Param()\n _inlineRetriever = GetInlineRetriever()\n End Sub\n\n Private Function CheckCanInsertAudio() As Boolean\n Return Not String.IsNullOrEmpty(GetInlineAudioTemplate())\n End Function\n\n Private Function CheckCanInsertMovies() As Boolean\n Return Not String.IsNullOrEmpty(GetInlineVideoTemplate())\n End Function\n\n Protected MustOverride Function ConstructChain_FromParam2Editor() As IHtmlConverter\n Protected MustOverride Function ConstructChain_FromEditor2Param() As IHtmlConverter\n Protected MustOverride Function GetInlineRetriever() As IInlineRetriever\n\n Protected Overrides Sub Dispose(ByVal disposing As Boolean)\n If (disposing) Then\n DisposeConverterChainRecursively(_inlineRetriever)\n _inlineRetriever.Dispose()\n End If\n\n MyBase.Dispose(disposing)\n End Sub\n\n Private Sub DisposeConverterChainRecursively(converter As IHtmlConverter)\n If converter.NextConverter IsNot Nothing Then\n DisposeConverterChainRecursively(converter.NextConverter)\n End If\n\n converter.Dispose()\n End Sub\n\n End Class\nEnd Namespace\n","avg_line_length":39.6933333333,"max_line_length":167,"alphanum_fraction":0.6383943567} {"size":12706,"ext":"vb","lang":"Visual Basic","max_stars_count":2.0,"content":"\ufeffImports EIDSS.model.Core\r\nImports EIDSS.model.Resources\r\nImports EIDSS.model.Enums\r\nImports bv.common.Enums\r\nImports System.Collections.Generic\r\n\r\nPublic Class SampleDestructionDetail\r\n Inherits bv.common.win.BaseDetailForm\r\n\r\n Friend WithEvents colSampleType As DevExpress.XtraGrid.Columns.GridColumn\r\n Friend WithEvents cbPerson As DevExpress.XtraEditors.LookUpEdit\r\n Friend WithEvents Label12 As System.Windows.Forms.Label\r\n Friend WithEvents btnAdd As DevExpress.XtraEditors.SimpleButton\r\n Friend WithEvents btnDelete As DevExpress.XtraEditors.SimpleButton\r\n Friend WithEvents colSampleID As DevExpress.XtraGrid.Columns.GridColumn\r\n Friend WithEvents GridView1 As DevExpress.XtraGrid.Views.Grid.GridView\r\n Friend WithEvents cbDepartment As DevExpress.XtraEditors.Repository.RepositoryItemLookUpEdit\r\n Friend WithEvents GridControl1 As DevExpress.XtraGrid.GridControl\r\n Friend WithEvents cbStatus As DevExpress.XtraEditors.Repository.RepositoryItemLookUpEdit\r\n Friend WithEvents colDestructionMethod As DevExpress.XtraGrid.Columns.GridColumn\r\n Friend WithEvents cbDestructionMethod As DevExpress.XtraEditors.Repository.RepositoryItemLookUpEdit\r\n Friend WithEvents cmReports As System.Windows.Forms.ContextMenu\r\n Friend WithEvents MenuItem1 As System.Windows.Forms.MenuItem\r\n Friend WithEvents btnReport As bv.common.win.PopUpButton\r\n\r\n Private DestroyMode As Boolean = False\r\n Public Sub New(mode As Boolean)\r\n Init(mode)\r\n End Sub\r\n Public Sub New()\r\n Init(True)\r\n End Sub\r\n\r\n Public Sub SetDestroyMode(ByVal mode As Boolean)\r\n DestroyMode = mode\r\n CType(DbService, SampleDestruction_DB).DestroyMode = mode\r\n If DestroyMode = False Then\r\n Dim shift As Integer = Me.GridControl1.Top - Me.cbPerson.Top\r\n Me.GridControl1.Top -= shift\r\n Me.GridControl1.Height += shift\r\n Me.cbPerson.Visible = False\r\n Me.Label12.Visible = False\r\n Me.ShowSaveButton = True\r\n End If\r\n\r\n End Sub\r\n Private Sub Init(mode As Boolean)\r\n InitializeComponent()\r\n Me.AuditObject = New AuditObject(EIDSSAuditObject.daoSampleDestruction, AuditTable.tlbMaterial)\r\n 'Me.PermissionObject = eidss.model.Enums.EIDSSPermissionObject.VialDestruction\r\n Dim perm As String = PermissionHelper.DeletePermission(EIDSSPermissionObject.Sample)\r\n Me.Permissions = New StandardAccessPermissions(perm, perm, perm, perm, perm)\r\n Me.DbService = New SampleDestruction_DB()\r\n Me.m_RelatedLists = New String() {\"LabSampleDispositionListItem\", \"LabSampleListItem\"}\r\n SetDestroyMode(mode)\r\n End Sub\r\n\r\n\r\n Private Sub InitializeComponent()\r\n Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(SampleDestructionDetail))\r\n Me.GridControl1 = New DevExpress.XtraGrid.GridControl()\r\n Me.GridView1 = New DevExpress.XtraGrid.Views.Grid.GridView()\r\n Me.colSampleID = New DevExpress.XtraGrid.Columns.GridColumn()\r\n Me.colSampleType = New DevExpress.XtraGrid.Columns.GridColumn()\r\n Me.colDestructionMethod = New DevExpress.XtraGrid.Columns.GridColumn()\r\n Me.cbDestructionMethod = New DevExpress.XtraEditors.Repository.RepositoryItemLookUpEdit()\r\n Me.cbDepartment = New DevExpress.XtraEditors.Repository.RepositoryItemLookUpEdit()\r\n Me.cbStatus = New DevExpress.XtraEditors.Repository.RepositoryItemLookUpEdit()\r\n Me.cbPerson = New DevExpress.XtraEditors.LookUpEdit()\r\n Me.Label12 = New System.Windows.Forms.Label()\r\n Me.btnAdd = New DevExpress.XtraEditors.SimpleButton()\r\n Me.btnDelete = New DevExpress.XtraEditors.SimpleButton()\r\n Me.cmReports = New System.Windows.Forms.ContextMenu()\r\n Me.MenuItem1 = New System.Windows.Forms.MenuItem()\r\n Me.btnReport = New bv.common.win.PopUpButton()\r\n CType(Me.GridControl1, System.ComponentModel.ISupportInitialize).BeginInit()\r\n CType(Me.GridView1, System.ComponentModel.ISupportInitialize).BeginInit()\r\n CType(Me.cbDestructionMethod, System.ComponentModel.ISupportInitialize).BeginInit()\r\n CType(Me.cbDepartment, System.ComponentModel.ISupportInitialize).BeginInit()\r\n CType(Me.cbStatus, System.ComponentModel.ISupportInitialize).BeginInit()\r\n CType(Me.cbPerson.Properties, System.ComponentModel.ISupportInitialize).BeginInit()\r\n Me.SuspendLayout()\r\n bv.common.Resources.BvResourceManagerChanger.GetResourceManager(GetType(SampleDestructionDetail), resources)\r\n 'Form Is Localizable: True\r\n '\r\n 'GridControl1\r\n '\r\n resources.ApplyResources(Me.GridControl1, \"GridControl1\")\r\n Me.GridControl1.MainView = Me.GridView1\r\n Me.GridControl1.Name = \"GridControl1\"\r\n Me.GridControl1.RepositoryItems.AddRange(New DevExpress.XtraEditors.Repository.RepositoryItem() {Me.cbDepartment, Me.cbStatus, Me.cbDestructionMethod})\r\n Me.GridControl1.ViewCollection.AddRange(New DevExpress.XtraGrid.Views.Base.BaseView() {Me.GridView1})\r\n '\r\n 'GridView1\r\n '\r\n Me.GridView1.Columns.AddRange(New DevExpress.XtraGrid.Columns.GridColumn() {Me.colSampleID, Me.colSampleType, Me.colDestructionMethod})\r\n Me.GridView1.GridControl = Me.GridControl1\r\n Me.GridView1.Name = \"GridView1\"\r\n Me.GridView1.OptionsNavigation.EnterMoveNextColumn = True\r\n Me.GridView1.OptionsView.ShowGroupPanel = False\r\n '\r\n 'colSampleID\r\n '\r\n resources.ApplyResources(Me.colSampleID, \"colSampleID\")\r\n Me.colSampleID.FieldName = \"strBarcode\"\r\n Me.colSampleID.Name = \"colSampleID\"\r\n Me.colSampleID.OptionsColumn.AllowEdit = False\r\n '\r\n 'colSampleType\r\n '\r\n resources.ApplyResources(Me.colSampleType, \"colSampleType\")\r\n Me.colSampleType.FieldName = \"strSampleName\"\r\n Me.colSampleType.Name = \"colSampleType\"\r\n Me.colSampleType.OptionsColumn.AllowEdit = False\r\n '\r\n 'colDestructionMethod\r\n '\r\n resources.ApplyResources(Me.colDestructionMethod, \"colDestructionMethod\")\r\n Me.colDestructionMethod.ColumnEdit = Me.cbDestructionMethod\r\n Me.colDestructionMethod.FieldName = \"idfsDestructionMethod\"\r\n Me.colDestructionMethod.Name = \"colDestructionMethod\"\r\n '\r\n 'cbDestructionMethod\r\n '\r\n resources.ApplyResources(Me.cbDestructionMethod, \"cbDestructionMethod\")\r\n Me.cbDestructionMethod.Buttons.AddRange(New DevExpress.XtraEditors.Controls.EditorButton() {New DevExpress.XtraEditors.Controls.EditorButton(CType(resources.GetObject(\"cbDestructionMethod.Buttons\"), DevExpress.XtraEditors.Controls.ButtonPredefines))})\r\n Me.cbDestructionMethod.Name = \"cbDestructionMethod\"\r\n '\r\n 'cbDepartment\r\n '\r\n resources.ApplyResources(Me.cbDepartment, \"cbDepartment\")\r\n Me.cbDepartment.Buttons.AddRange(New DevExpress.XtraEditors.Controls.EditorButton() {New DevExpress.XtraEditors.Controls.EditorButton(CType(resources.GetObject(\"cbDepartment.Buttons\"), DevExpress.XtraEditors.Controls.ButtonPredefines))})\r\n Me.cbDepartment.DisplayMember = \"Name\"\r\n Me.cbDepartment.Name = \"cbDepartment\"\r\n Me.cbDepartment.ValueMember = \"idfDepartment\"\r\n '\r\n 'cbStatus\r\n '\r\n resources.ApplyResources(Me.cbStatus, \"cbStatus\")\r\n Me.cbStatus.Buttons.AddRange(New DevExpress.XtraEditors.Controls.EditorButton() {New DevExpress.XtraEditors.Controls.EditorButton(CType(resources.GetObject(\"cbStatus.Buttons\"), DevExpress.XtraEditors.Controls.ButtonPredefines))})\r\n Me.cbStatus.DisplayMember = \"Name\"\r\n Me.cbStatus.Name = \"cbStatus\"\r\n Me.cbStatus.ShowHeader = False\r\n Me.cbStatus.ValueMember = \"idfsReference\"\r\n '\r\n 'cbPerson\r\n '\r\n resources.ApplyResources(Me.cbPerson, \"cbPerson\")\r\n Me.cbPerson.Name = \"cbPerson\"\r\n Me.cbPerson.Properties.AutoHeight = CType(resources.GetObject(\"cbPerson.Properties.AutoHeight\"), Boolean)\r\n Me.cbPerson.Properties.Buttons.AddRange(New DevExpress.XtraEditors.Controls.EditorButton() {New DevExpress.XtraEditors.Controls.EditorButton(CType(resources.GetObject(\"cbPerson.Properties.Buttons\"), DevExpress.XtraEditors.Controls.ButtonPredefines))})\r\n Me.cbPerson.Properties.NullText = resources.GetString(\"cbPerson.Properties.NullText\")\r\n Me.cbPerson.Tag = \"\"\r\n '\r\n 'Label12\r\n '\r\n resources.ApplyResources(Me.Label12, \"Label12\")\r\n Me.Label12.Name = \"Label12\"\r\n '\r\n 'btnAdd\r\n '\r\n resources.ApplyResources(Me.btnAdd, \"btnAdd\")\r\n Me.btnAdd.Image = Global.EIDSS.My.Resources.Resources.add\r\n Me.btnAdd.Name = \"btnAdd\"\r\n '\r\n 'btnDelete\r\n '\r\n resources.ApplyResources(Me.btnDelete, \"btnDelete\")\r\n Me.btnDelete.Image = Global.EIDSS.My.Resources.Resources.Delete_Remove\r\n Me.btnDelete.Name = \"btnDelete\"\r\n '\r\n 'cmReports\r\n '\r\n Me.cmReports.MenuItems.AddRange(New System.Windows.Forms.MenuItem() {Me.MenuItem1})\r\n '\r\n 'MenuItem1\r\n '\r\n Me.MenuItem1.Index = 0\r\n resources.ApplyResources(Me.MenuItem1, \"MenuItem1\")\r\n '\r\n 'btnReport\r\n '\r\n resources.ApplyResources(Me.btnReport, \"btnReport\")\r\n Me.btnReport.ButtonType = bv.common.win.PopUpButton.PopUpButtonStyles.Reports\r\n Me.btnReport.Name = \"btnReport\"\r\n Me.btnReport.PopUpMenu = Me.cmReports\r\n Me.btnReport.Tag = \"{Immovable}{AlwaysEditable}\"\r\n '\r\n 'SampleDestructionDetail\r\n '\r\n resources.ApplyResources(Me, \"$this\")\r\n Me.Controls.Add(Me.btnReport)\r\n Me.Controls.Add(Me.btnDelete)\r\n Me.Controls.Add(Me.btnAdd)\r\n Me.Controls.Add(Me.cbPerson)\r\n Me.Controls.Add(Me.GridControl1)\r\n Me.Controls.Add(Me.Label12)\r\n Me.DefaultFormState = System.Windows.Forms.FormWindowState.Normal\r\n Me.FormID = \"L08\"\r\n Me.HelpTopicID = \"lab_l08\"\r\n Me.KeyFieldName = \"idfMaterial\"\r\n Me.LeftIcon = CType(resources.GetObject(\"$this.LeftIcon\"), System.Drawing.Image)\r\n Me.Name = \"SampleDestructionDetail\"\r\n Me.ObjectName = \"Samples\"\r\n Me.ShowDeleteButton = False\r\n Me.Sizable = True\r\n Me.Status = bv.common.win.FormStatus.Draft\r\n Me.Controls.SetChildIndex(Me.Label12, 0)\r\n Me.Controls.SetChildIndex(Me.GridControl1, 0)\r\n Me.Controls.SetChildIndex(Me.cbPerson, 0)\r\n Me.Controls.SetChildIndex(Me.btnAdd, 0)\r\n Me.Controls.SetChildIndex(Me.btnDelete, 0)\r\n Me.Controls.SetChildIndex(Me.btnReport, 0)\r\n CType(Me.GridControl1, System.ComponentModel.ISupportInitialize).EndInit()\r\n CType(Me.GridView1, System.ComponentModel.ISupportInitialize).EndInit()\r\n CType(Me.cbDestructionMethod, System.ComponentModel.ISupportInitialize).EndInit()\r\n CType(Me.cbDepartment, System.ComponentModel.ISupportInitialize).EndInit()\r\n CType(Me.cbStatus, System.ComponentModel.ISupportInitialize).EndInit()\r\n CType(Me.cbPerson.Properties, System.ComponentModel.ISupportInitialize).EndInit()\r\n Me.ResumeLayout(False)\r\n\r\n End Sub\r\n\r\n Protected Overrides Sub DefineBinding()\r\n Me.GridControl1.DataSource = Me.baseDataSet.Tables(\"Samples\")\r\n Core.LookupBinder.BindPersonLookup(cbPerson, baseDataSet, \"User.idfDestroyedByPerson\")\r\n Core.LookupBinder.SetPersonFilter(cbPerson)\r\n Core.LookupBinder.BindBaseRepositoryLookup(cbDestructionMethod, db.BaseReferenceType.rftDestructionMethod)\r\n\r\n End Sub\r\n\r\n Public Overrides Function HasChanges() As Boolean\r\n Return True\r\n End Function\r\n\r\n Private Sub Delete_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnDelete.Click\r\n Me.GridView1.DeleteSelectedRows()\r\n End Sub\r\n\r\n\r\n \r\n\r\n Private Sub MenuItem1_Click(sender As Object, e As EventArgs) Handles MenuItem1.Click\r\n If baseDataSet Is Nothing OrElse baseDataSet.Tables.Count = 0 OrElse (Not baseDataSet.Tables.Contains(\"Samples\")) Then\r\n Return\r\n End If\r\n If Post(PostType.FinalPosting) Then\r\n Dim idList As List(Of Long) = New List(Of Long)()\r\n Dim table As DataTable = baseDataSet.Tables(\"Samples\")\r\n For Each row As DataRow In table.Rows\r\n idList.Add(CLng(row(\"idfMaterial\")))\r\n Next\r\n EidssSiteContext.ReportFactory.LimSampleDestruction(idList)\r\n End If\r\n\r\n\r\n End Sub\r\nEnd Class\r\n","avg_line_length":49.0579150579,"max_line_length":260,"alphanum_fraction":0.6974657642} {"size":1581,"ext":"bas","lang":"Visual Basic","max_stars_count":10.0,"content":"REM @english\r\nREM FLOW CONTROL BY LOOPS (4)\r\nREM\r\nREM This small example will use the ''DO...LOOP'' keywords to implement\r\nREM an endless loop, and the ''WHILE...WEND'' keywords to implement a\r\nREM limited loop. The inner loop will run for 10 times, while ''x'' is\r\nREM greater than zero. For each inner loop, the number will be printed.\r\nREM So we expect to obtain the an endless flow of numbers from 10 to 1.\r\nREM This example also shows how automatic scrolling works, when the end \r\nREM of the screen is reached with the use of the ''PRINT'' command.\r\nREM Finally, the initial value will be represented by a single byte,\r\nREM by using a syntax called \"explicit cast\" (''(8BIT)'').\r\nREM \r\nREM @italian\r\nREM CONTROLLO DI FLUSSO CON LOOP (4)\r\nREM\r\nREM Questo piccolo esempio utilizzer\u00e0 le parole chiave ''DO...LOOP'' per \r\nREM implementare un ciclo infinito e le parole chiave ''WHILE...WEND'' per \r\nREM implementare un ciclo. Il ciclo interno verr\u00e0 eseguito per 10 volte, \r\nREM mentre ''x'' \u00e8 maggiore di zero. Per ogni ciclo interno, verr\u00e0 stampato \r\nREM il numero. Quindi ci aspettiamo di ottenere un flusso infinito di numeri \r\nREM da 10 a 1. Questo esempio mostra anche come funziona lo scorrimento \r\nREM automatico, quando si raggiunge la fine della schermata con l'uso del \r\nREM comando ''STAMPA''. Infine, il valore iniziale sar\u00e0 rappresentato da \r\nREM un singolo byte, utilizzando una sintassi chiamata \"cast esplicito\"\r\nREM (''(8BIT)'').\r\nREM\r\n\r\n DO\r\n x = (8BIT) 10\r\n WHILE x > 0\r\n PRINT x;\" \";\r\n x = x - 1\r\n WEND\r\n LOOP\r\n","avg_line_length":43.9166666667,"max_line_length":78,"alphanum_fraction":0.7071473751} {"size":6043,"ext":"bas","lang":"Visual Basic","max_stars_count":1.0,"content":"10\t ! &\n\t ! Program name: conpsm\t\tCompiled with SCALE 0 on V07.0 &\n\t ! Decompiled on 28-Nov-16 at 04:11 PM\n50\t DIM P1$(30%), P$(9%), P%(17%), P(5%)\n60\t DIM R$(9%,20%), R%(15%,20%), R(5%,20%)\n100\t !\n110\t OPEN \"KB:\" AS FILE 1%, RECORDSIZE 64%\n230\t FIELD #1%, 6% AS P1$(1%),6% AS P1$(2%),1% AS P1$(3%),1% AS P1$(4%),2% AS P1$(5%),2% AS P1$(6%),2% AS P1$(7%),7% AS P1$(8%),2% AS P1$(9%) &\n\t\\ FIELD #1%, 19%+I% AS E$,1% AS P1$(I%) FOR I%=10% TO 24% &\n\t\\ FIELD #1%, 44% AS E$,8% AS P1$(25%),3% AS P1$(26%),3% AS P1$(27%),3% AS P1$(28%),3% AS P1$(29%)\n250\t FIELD #1%, 64% AS T2$\n300\t !\n305\t GOTO 3200 IF F0%=-1%\n310\t INPUT \"BASE FILE (MM.DD.YY)\";K$ &\n\t\\ GOTO 10000 IF K$=\"\" &\n\t\\ GOSUB 2600 &\n\t\\ B$=K$ &\n\t\\ Z1$=\"PR\"+LEFT(B$,2%)+RIGHT(B$,4%)+\"T\" &\n\t\\ IF FNO%(2%,Z1$,\"U\",\"R\")=0% THEN &\n\t\t PRINT \"FILE EXISTS . . . \"; &\n\t\t\\ INPUT \"CONFIRM COMBINING NEW FILES (Y OR N)\";K$ &\n\t\t\\ GOTO 10000 UNLESS LEFT(K$,1%)=\"Y\" &\n\t\t\\ GOTO 330\n320\t INPUT \"VERIFY OPENING NEW FILE \";K$ &\n\t\\ GOTO 10000 UNLESS LEFT(K$,1%)=\"Y\" &\n\t\\ OPEN Z1$ FOR OUTPUT AS FILE 4% &\n\t\\ PRINT #4%, CVT%$(0%)+CVT%$(14%)+\"S\"+CHR$(128%) &\n\t\\ CLOSE 4% &\n\t\\ OPEN LEFT(Z1$,LEN(Z1$)-1%)+\"1\" FOR OUTPUT AS FILE 4% &\n\t\\ PRINT #4%, CVT%$(0%)+CVT%$(64%)+\"S\"+CHR$(128%) &\n\t\\ CLOSE 4%\n325\t STOP IF FNO%(2%,Z1$,\"\/RW\",\"\")\n330\t !\n1000\t !\n1010\t INPUT \"FILE TO COMBINE (MM.DD.YY) \";K$ &\n\t\\ GOTO 3100 IF K$=\"\" &\n\t\\ GOSUB 2600 &\n\t\\ C$=K$ &\n\t\\ Z$=\"PR\"+LEFT(K$,2%)+RIGHT(K$,4%)+\"T\" &\n\t\\ IF FNO%(4%,Z$,\"\/RO\",\"\") THEN &\n\t\t PRINT \"FILE DOES NOT EXIST . . .\" &\n\t\t\\ GOTO 1010\n1020\t PRINT \"VERIFY COMBINING \";C$;\" TO \";B$;\" \"; &\n\t\\ INPUT K$ &\n\t\\ IF LEFT(K$,1%)<>\"Y\" THEN &\n\t\t STOP IF FNC%(4%) &\n\t\t\\ PRINT \"NOT ADDED TO BASE FILE . . .\" &\n\t\t\\ GOTO 1010\n1030\t GOSUB 3000 &\n\t\\ GOTO 1010\n2200\t !\n2210\t LSET P1$(I%)=P$(I%) FOR I%=1% TO 8% &\n\t\\ LSET P1$(9%)=CVT%$(FND9%(P$(9%))) &\n\t\\ LSET P1$(I%+9%)=CHR$(P%(I%)) FOR I%=1% TO 15% &\n\t\\ LSET P1$(25%)=CVTF$(P(1%)) &\n\t\\ LSET P1$(I%+24%)=FNN3$(P(I%)) FOR I%=2% TO 5% &\n\t\\ RETURN\n2400\t !\n2410\t LSET T2$=FNL$ &\n\t\\ P$(I%)=P1$(I%)+\"\" FOR I%=1% TO 8% &\n\t\\ P%(I%)=ASCII(P1$(I%+9%)) FOR I%=1% TO 15% &\n\t\\ P(1%)=CVT$F(P1$(25%)) &\n\t\\ P(I%)=FNN3(P1$(I%+24%)) FOR I%=2% TO 5% &\n\t\\ P%(0%)=CVT$%(P1$(9%)) &\n\t\\ P$(9%)=FND9$(P%(0%)) &\n\t\\ P%(16%),P%(17%)=0% &\n\t\\ P%(16%)=P%(16%)+P%(I%) FOR I%=1% TO 7% &\n\t\\ P%(17%)=P%(17%)+P%(I%) FOR I%=8% TO 14% &\n\t\\ RETURN\n2600\t !\n2610\t K$=\"0\"+K$ IF INSTR(1%,K$,\".\")=2% &\n\t\\ K$=LEFT(K$,3%)+\"0\"+RIGHT(K$,4%) IF INSTR(4%,K$,\".\")=5% &\n\t\\ RETURN\n3000\t !\n3010\t IF FNG%(4%,\"\") THEN &\n\t\t GOTO 3090\n3020\t X1%=X1%+1% &\n\t\\ PRINT \"!\"; IF X1%\/10%*10%=X1% &\n\t\\ PRINT X1% IF POS(0%)>49% &\n\t\\ STOP IF FNA%(2%,FNL$) &\n\t\\ GOTO 3020 UNLESS FNN%(4%) &\n\t\\ GOTO 3090\n3090\t STOP IF FNC%(4%) &\n\t\\ RETURN\n3100\t !\n3110\t STOP IF FNX%(\"[1,8]CONPSM.BAC\",3120%,Z1$) &\n\t\\ STOP\n3120\t Z1$=FNX$ &\n\t\\ F0%=-1% &\n\t\\ GOTO 10\n3200\t !\n3210\t IF FNO%(2%,Z1$,\"\",\"\") THEN &\n\t\t PRINT \"PAYROLL FILE NAME NOT RETURNED THROUGH SORT!!!\" &\n\t\t\\ PRINT \"PLEASE HANG UP THE PHONE AND CALL CMC !!!!!!!!\" &\n\t\t\\ STOP\n3220\t STOP IF FNG%(2%,\"\") &\n\t\\ N%=0% &\n\t\\ J$=\"\"\n3300\t GOSUB 2400 &\n\t\\ IF P$(1%)+P$(2%)<>J$ THEN &\n\t\t J$=P$(1%)+P$(2%) &\n\t\t\\ N%=0%\n3301\t X1%=X1%+1% &\n\t\\ PRINT \"*\"; IF X1%\/10%*10%=X1% &\n\t\\ PRINT X1% IF POS(0%)>49%\n3310\t R$(J%,N%+1%)=P$(J%) FOR J%=1% TO 9% &\n\t\\ R(J%,N%+1%)=P(J%) FOR J%=1% TO 5% &\n\t\\ R%(J%,N%+1%)=P%(J%) FOR J%=1% TO 15% &\n\t\\ GOTO 3330 IF P$(8%)<>\"\"\n3315\t FOR I1%=1% TO N% &\n\t\t\\ GOTO 3320 IF R%(0%,I1%) OR P$(4%)<>R$(4%,I1%) OR P(1%)<>R(1%,I1%) &\n\t\t\\ GOTO 3320 IF P(J%)<>0. AND R(J%,I1%)<>0. FOR J%=2% TO 5% &\n\t\t\\ GOTO 3320 IF P%(J%)+R%(J%,I1%)>255% FOR J%=1% TO 14% &\n\t\t\\ GOTO 3400\n3320\t\t\t NEXT I1%\n3330\t N%=N%+1% &\n\t\\ R%(0%,N%)=0% &\n\t\\ R%(0%,N%)=-1% IF R$(8%,N%)<>\"\"\n3340\t GOTO 3300 UNLESS FNN%(2%) &\n\t\\ PRINT \"COMBINE COMPLETE . . .\" &\n\t\\ GOTO 10000\n3400\t !\n3410\t STOP IF FND%(2%,\"\") &\n\t\\ STOP IF FNN%(-2%) FOR J%=I1% TO N% &\n\t\\ GOSUB 2400\n3415\t STOP IF P$(J%)<>R$(J%,I1%) FOR J%=1% TO 9% &\n\t\\ STOP IF P%(J%)<>R%(J%,I1%) FOR J%=1% TO 15% &\n\t\\ STOP IF P(J%)<>R(J%,I1%) FOR J%=1% TO 5%\n3420\t N0%=N%+1% &\n\t\\ P$(3%)=R$(3%,N0%) IF P(2%)=0. &\n\t\\ P$(J%)=R$(J%,N0%) IF P(J%-2%)<>0. FOR J%=3% TO 5% &\n\t\\ P(J%)=R(J%,N0%) IF P(J%)=0. FOR J%=2% TO 5% &\n\t\\ P%(J%)=P%(J%)+R%(J%,N0%) FOR J%=1% TO 14% &\n\t\\ GOSUB 2200 &\n\t\\ STOP IF FNU%(2%,T2$)\n3430\t R$(J%,I1%)=P$(J%) FOR J%=1% TO 8% &\n\t\\ R%(J%,I1%)=P%(J%) FOR J%=1% TO 15% &\n\t\\ R(J%,I1%)=P(J%) FOR J%=1% TO 5%\n3440\t STOP IF FNN%(2%) FOR J%=I1% TO N%-1% &\n\t\\ GOTO 3340\n10000\t !\n10010\t STOP IF FNX%(\"\",0%,\"\") &\n\t\\ STOP\n14000\t !\n14010\t DEF FND9%(D9$) &\n\t\\ D9$=\"0\"+D9$ IF INSTR(1%,D9$,\".\")=2% &\n\t\\ D9$=LEFT(D9$,3%)+\"0\"+RIGHT(D9$,4%) IF INSTR(4%,D9$,\".\")=5% &\n\t\\ FND9%=VAL(LEFT(D9$,2%))+VAL(MID(D9$,4%,2%))*16%+FND8%(VAL(RIGHT(D9$,7%)))*512% &\n\t\\ FNEND\n14020\t DEF FND9$(D9%) &\n\t\\ FND9$=RIGHT(NUM1$((D9% AND 15%)+100%),2%)+\".\"+RIGHT(NUM1$((D9% AND 31%*16%)\/16%+100%),2%)+\".\"+RIGHT(NUM1$((SWAP%(D9%) AND 254%)\/2%+100%),2%) &\n\t\\ FNEND\n14030\t DEF FND8%(D8) &\n\t\\ FND8%=D8 &\n\t\\ FNEND\n14100\t !\n14110\t DEF FNA8$(X$) &\n\t\\ FNA8$=CVT%$(VAL(LEFT(X$,3%)))+CHR$(VAL(RIGHT(X$,5%))) &\n\t\\ FNEND\n14120\t DEF FNA7$(X$) &\n\t\\ FNA7$=RIGHT(NUM1$(1000%+CVT$%(X$)),2%)+\".\"+RIGHT(NUM1$(100%+ASCII(RIGHT(X$,3%))),2%) &\n\t\\ FNEND\n14200\t !\n14210\t DEF FND7%(D7$) &\n\t\\ ON ERROR GOTO 14220 &\n\t\\ GOTO 14220 IF INSTR(1%,D7$,\".\")<>3% OR INSTR(4%,D7$,\".\")<>6% OR INSTR(7%,D7$,\".\")<>0% OR LEN(D7$)<>8% &\n\t\\ D7%=VAL(LEFT(D7$,2%)) &\n\t\\ GOTO 14220 IF D7%<1% OR D7%>12% &\n\t\\ D7%=VAL(MID(D7$,4%,2%)) &\n\t\\ GOTO 14220 IF D7%<1% OR D7%>31% &\n\t\\ D7%=VAL(RIGHT(D7$,7%)) &\n\t\\ GOTO 14220 IF D7%<0% &\n\t\\ FND7%=0% &\n\t\\ GOTO 14230\n14220\t FND7%=-1% &\n\t\\ RESUME 14230\n14230\t ON ERROR GOTO 0 &\n\t\\ FNEND\n14250\t !\n14260\t DEF FND7$(D7$) &\n\t\\ D7$=D7$+\".\"+RIGHT(DATE$(0%),8%) IF LEN(D7$)<6% &\n\t\\ D7$=\"0\"+D7$ IF INSTR(1%,D7$,\".\")=2% &\n\t\\ D7$=LEFT(D7$,3%)+\"0\"+RIGHT(D7$,4%) IF INSTR(4%,D7$,\".\")=5% &\n\t\\ FND7$=D7$ &\n\t\\ FNEND\n14300\t !\n14310\t DEF FNN3$(N3) &\n\t\\ FNN3$=CVT%$(INT(N3))+CHR$((N3-INT(N3))*100.+6.8213185310482798e-15) &\n\t\\ FNEND\n14350\t DEF FNN3(N3$) &\n\t\\ FNN3=CVT$%(LEFT(N3$,2%))+ASCII(MID(N3$,3%,1%))\/100. &\n\t\\ FNEND\n32767\t END\n","avg_line_length":31.1494845361,"max_line_length":145,"alphanum_fraction":0.4793976502} {"size":312,"ext":"vb","lang":"Visual Basic","max_stars_count":1.0,"content":"\ufeffImports System.Console\n\nModule Module1\n\n Sub Main()\n Dim inp As Integer\n\n Write(\" Enter the Number : \")\n inp = Convert.ToInt32(ReadLine())\n\n Dim binVal = Convert.ToString(inp, 2)\n\n Write(vbCrLf & \" The Binary Value = \" & binVal)\n\n ReadLine()\n End Sub\n\nEnd Module\n","avg_line_length":16.4210526316,"max_line_length":55,"alphanum_fraction":0.5801282051} {"size":6743,"ext":"vb","lang":"Visual Basic","max_stars_count":1.0,"content":"\ufeff''' \n''' Superclass of all game units.\n''' <\/summary>\n Public Class Troop\n\n ' #################################################################################################\n ' ATTRIBUTES\n ' #################################################################################################\n\n Public Property X As Integer ' Coordinate - Column\n Public Property Y As Integer ' Coordinate - Row\n Public Property BaseMoves As Integer\n Private Property Moves As List(Of Boolean)\n 'Private Property Moves As Integer\n\n Public Property IsSelected As Boolean\n Public Property IsLocked As Boolean ' The character can not move.\n Public Property IsArmored As Boolean ' Archers need not move before attacking to kill him.\n Public Property CanRotate As Boolean ' The unit can be repositioned to lock enemies.\n Public Property CanBuild As Boolean\n Public Property CanDemolish As Boolean\n Public Property CanShoot As Boolean\n\n Public Property Captain As String ' His name.\n Public Property Role As String ' Lancer, knight, archer, engineer...\n Public Property Colour As String\n Public Property Graphic As String ' The name of your image (.PNG, etc...).\n Public Property Position As String ' The character can look up, down, right or left to lock enemies.\n\n\n ' #################################################################################################\n ' CONSTRUCTOR\n ' #################################################################################################\n\n ''' Constructor <\/summary>\n ''' Lancer, knight, archer, engineer...<\/param>\n ''' Colour<\/param>\n ''' Location (column)<\/param>\n ''' Location (row)<\/param>\n Public Sub New(ByVal role As String,\n ByVal colour As String,\n ByVal X As Integer,\n ByVal Y As Integer)\n\n Me.Captain = NameGenerator.CaptainName()\n Me.Role = role\n Me.Colour = colour\n\n Me.X = X\n Me.Y = Y\n\n Me.IsSelected = False\n Me.IsLocked = False\n Me.CanRotate = True\n Me.CanShoot = False\n\n ' A engineer can build!\n\n End Sub\n\n ' #################################################################################################\n ' SETTERS AND GETTERS\n ' #################################################################################################\n\n Public Function GetMoves() As Integer\n Return Me.Moves.Count\n End Function\n\n Public Sub SetMoves(ByVal Moves As Integer)\n\n Me.Moves = New List(Of Boolean)\n\n For i As Integer = 1 To Moves\n Me.Moves.Add(True)\n Next\n\n End Sub\n\n ' #################################################################################################\n ' METHODS\n ' #################################################################################################\n\n ''' \n ''' Procedure executed at the end of the turn. Moves = 0, NO rotation, NO build, NO demolish, NO shoot.\n ''' <\/summary>\n Public Sub FinishTurn()\n\n Me.SetMoves(0)\n\n Me.CanRotate = False\n Me.CanBuild = False\n Me.CanDemolish = False\n Me.CanShoot = False\n\n End Sub\n\n ''' \n ''' The unit starts with all the base attributes prepared for the new turn.\n ''' <\/summary>\n Public Sub StartTurn() ' This method will be overwritten.\n\n If Role = \"Archer\" Then ' This code is duplicated, but I put it for clarity.\n Me.CanShoot = True\n ElseIf Role = \"Engineer\" Then\n Me.CanBuild = True\n Me.CanDemolish = True\n ElseIf Role = \"Lancer\" Then\n Me.CanDemolish = True\n End If\n\n Me.CanRotate = True\n Me.SetMoves(Me.BaseMoves)\n\n End Sub\n\n ''' \n ''' Change the positioning and formation of the unit to be able to lock enemies.\n ''' The rotation is according to the clockwise direction.\n ''' There are units (archers, engineers...) that do not rotate.\n ''' <\/summary>\n Public Sub Rotate()\n\n Select Case Me.Position\n Case \"Left\"\n Me.Position = \"Up\"\n Me.Graphic = Me.Graphic.Replace(\"Left\", \"Up\")\n Case \"Up\"\n Me.Position = \"Right\"\n Me.Graphic = Me.Graphic.Replace(\"Up\", \"Right\")\n Case \"Right\"\n Me.Position = \"Down\"\n Me.Graphic = Me.Graphic.Replace(\"Right\", \"Down\")\n Case \"Down\"\n Me.Position = \"Left\"\n Me.Graphic = Me.Graphic.Replace(\"Down\", \"Left\")\n End Select\n\n End Sub\n\n ''' \n ''' Function that controls if the unit has an adjacent enemy.\n ''' If so, the allied unit is locked in combat and can not move!!\n ''' <\/summary>\n ''' All units in battle.<\/param>\n Public Sub AdjacentEnemies(ByVal Character_list)\n\n For Each Enemy As Troop In Character_list\n\n If Enemy.Colour = Me.Colour Then\n Continue For ' We ignore the allies.\n End If\n\n ' Unit locked?\n\n If Me.X = Enemy.X And Me.Y = Enemy.Y - 1 And Enemy.Position = \"Up\" Then\n Me.IsLocked = True\n ElseIf Me.X = Enemy.X And Me.Y = Enemy.Y + 1 And Enemy.Position = \"Down\" Then\n Me.IsLocked = True\n ElseIf Me.X = Enemy.X + 1 And Me.Y = Enemy.Y And Enemy.Position = \"Right\" Then\n Me.IsLocked = True\n ElseIf Me.X = Enemy.X - 1 And Me.Y = Enemy.Y And Enemy.Position = \"Left\" Then\n Me.IsLocked = True\n End If\n\n Next\n End Sub\n\n ''' \n ''' Function with which the name of the structure on which the character is obtained.\n ''' <\/summary>\n ''' All the cells of the battlefield.<\/param>\n ''' The name of the structure on which the character<\/returns>\n Public Function GetStructure(ByRef Cells As Grid) As String\n\n Dim currentCell As Image\n\n Try\n currentCell = (\n From i As Image In Cells.Children\n Where Grid.GetColumn(i) = Me.X And Grid.GetRow(i) = Me.Y _\n And Not i.IsEnabled ' Cells that are not enabled are those that are in the background.\n ).Single\n Catch ex As Exception\n Return \"\"\n End Try\n\n Return currentCell.Source.ToString.Replace(\"pack:\/\/siteoforigin:,,,\/Resources\/\", \"\").Replace(\".png\", \"\")\n\n End Function\n\nEnd Class","avg_line_length":35.3036649215,"max_line_length":114,"alphanum_fraction":0.510306985} {"size":1174,"ext":"vb","lang":"Visual Basic","max_stars_count":1.0,"content":"\ufeffImports System\r\nImports System.Reflection\r\nImports System.Runtime.InteropServices\r\n\r\n' General Information about an assembly is controlled through the following \r\n' set of attributes. Change these attribute values to modify the information\r\n' associated with an assembly.\r\n\r\n' Review the values of the assembly attributes\r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n\r\n\r\n'The following GUID is for the ID of the typelib if this project is exposed to COM\r\n \r\n\r\n' Version information for an assembly consists of the following four values:\r\n'\r\n' Major Version\r\n' Minor Version \r\n' Build Number\r\n' Revision\r\n'\r\n' You can specify all the values or you can default the Build and Revision Numbers \r\n' by using the '*' as shown below:\r\n' \r\n\r\n \r\n \r\n","avg_line_length":32.6111111111,"max_line_length":84,"alphanum_fraction":0.7223168654} {"size":34479,"ext":"vbs","lang":"Visual Basic","max_stars_count":null,"content":"Option Explicit\n\nDim objws\nDim objfs\nSet objws = WScript.CreateObject(\"WScript.Shell\")\nSet objfs = CreateObject(\"Scripting.FileSystemObject\")\n\nDim strCurrent\nDim strRbenvHome\nDim strDirCache\nDim strDirVers\nDim strDirLibs\nDim strVerFile\nstrCurrent = objfs.GetAbsolutePathName(\".\")\nstrRbenvHome = objfs.getParentFolderName(objfs.getParentFolderName(WScript.ScriptFullName))\nstrDirCache = strRbenvHome & \"\\install_cache\"\nstrDirVers = strRbenvHome & \"\\versions\"\nstrDirLibs = strRbenvHome & \"\\libexec\"\nstrVerFile = \"\\.ruby_version\"\n\n\nDim tool7z\nDim strDirDevKit\ntool7z = \"\"\"\" & strRbenvHome & \"\\tools\\7z\\7zdec.exe\"\" x \"\nstrDirDevKit = strRbenvHome & \"\\tools\\DevKit\"\n\n\nSub ShowHelp()\n Wscript.echo \"Usage: rbenv install [-f|-s] \"\n Wscript.echo \" rbenv install [-f|-s] \"\n Wscript.echo \" rbenv install -l|--list\"\n Wscript.echo \"\"\n Wscript.echo \" -l\/--list List all available versions\"\n Wscript.echo \" -f\/--force Install even if the version appears to be installed already\"\n Wscript.echo \" -s\/--skip-existing Skip if the version appears to be installed already\"\n Wscript.echo \"\"\n Wscript.Quit\nEnd Sub\n\nDim listDevKit\nlistDevKit = Array( _\n Array(\"i386\",\"http:\/\/dl.bintray.com\/oneclick\/rubyinstaller\/\",\"DevKit-mingw64-32-4.7.2-20130224-1151-sfx.exe\" ),_\n Array(\"x64\" ,\"http:\/\/dl.bintray.com\/oneclick\/rubyinstaller\/\",\"DevKit-mingw64-64-4.7.2-20130224-1432-sfx.exe\" ),_\n Array(\"tdm\" ,\"http:\/\/dl.bintray.com\/oneclick\/rubyinstaller\/\",\"DevKit-tdm-32-4.5.2-20111229-1559-sfx.exe\" ) _\n)\n\nDim listEnv\nDim listEnv_i386\nlistEnv = Array(_\n Array(\"2.7.1-i386\" ,\"https:\/\/github.com\/oneclick\/rubyinstaller2\/releases\/download\/RubyInstaller-2.7.1-1\/\",\"rubyinstaller-2.7.1-1-x86.7z\" ,\"bundled\"),_\n Array(\"2.7.1-x64\" ,\"https:\/\/github.com\/oneclick\/rubyinstaller2\/releases\/download\/RubyInstaller-2.7.1-1\/\",\"rubyinstaller-2.7.1-1-x86.7z\" ,\"bundled\"),_\n Array(\"2.7.0-i386\" ,\"https:\/\/github.com\/oneclick\/rubyinstaller2\/releases\/download\/RubyInstaller-2.7.0-1\/\",\"rubyinstaller-2.7.0-1-x86.7z\" ,\"bundled\"),_\n Array(\"2.7.0-x64\" ,\"https:\/\/github.com\/oneclick\/rubyinstaller2\/releases\/download\/RubyInstaller-2.7.0-1\/\",\"rubyinstaller-2.7.0-1-x86.7z\" ,\"bundled\"),_\n Array(\"2.6.6-i386\" ,\"https:\/\/github.com\/oneclick\/rubyinstaller2\/releases\/download\/RubyInstaller-2.6.6-1\/\",\"rubyinstaller-2.6.6-1-x86.7z\" ,\"bundled\"),_\n Array(\"2.6.6-x64\" ,\"https:\/\/github.com\/oneclick\/rubyinstaller2\/releases\/download\/RubyInstaller-2.6.6-1\/\",\"rubyinstaller-2.6.6-1-x64.7z\" ,\"bundled\"),_\n Array(\"2.6.4-i386\" ,\"https:\/\/github.com\/oneclick\/rubyinstaller2\/releases\/download\/RubyInstaller-2.6.4-1\/\",\"rubyinstaller-2.6.4-1-x86.7z\" ,\"bundled\"),_\n Array(\"2.6.4-x64\" ,\"https:\/\/github.com\/oneclick\/rubyinstaller2\/releases\/download\/RubyInstaller-2.6.4-1\/\",\"rubyinstaller-2.6.4-1-x64.7z\" ,\"bundled\"),_\n Array(\"2.6.0-i386\" ,\"https:\/\/github.com\/oneclick\/rubyinstaller2\/releases\/download\/RubyInstaller-2.6.0-1\/\",\"rubyinstaller-devkit-2.6.0-1-x86.7z\" ,\"bundled\"),_\n Array(\"2.6.0-x64\" ,\"https:\/\/github.com\/oneclick\/rubyinstaller2\/releases\/download\/RubyInstaller-2.6.0-1\/\",\"rubyinstaller-devkit-2.6.0-1-x64.7z\" ,\"bundled\"),_\n Array(\"2.5.8-i386\" ,\"https:\/\/github.com\/oneclick\/rubyinstaller2\/releases\/download\/RubyInstaller-2.5.8-1\/\",\"rubyinstaller-2.5.8-1-x86.7z\" ,\"bundled\"),_\n Array(\"2.5.8-x64\" ,\"https:\/\/github.com\/oneclick\/rubyinstaller2\/releases\/download\/RubyInstaller-2.5.8-1\/\",\"rubyinstaller-2.5.8-1-x64.7z\" ,\"bundled\"),_\n Array(\"2.5.3-i386\" ,\"https:\/\/github.com\/oneclick\/rubyinstaller2\/releases\/download\/rubyinstaller-2.5.3-1\/\",\"rubyinstaller-devkit-2.5.3-1-x86.7z\" ,\"bundled\"),_\n Array(\"2.5.3-x64\" ,\"https:\/\/github.com\/oneclick\/rubyinstaller2\/releases\/download\/rubyinstaller-2.5.3-1\/\",\"rubyinstaller-devkit-2.5.3-1-x64.7z\" ,\"bundled\"),_\n Array(\"2.4.5-i386\" ,\"https:\/\/github.com\/oneclick\/rubyinstaller2\/releases\/download\/rubyinstaller-2.4.5-1\/\",\"rubyinstaller-devkit-2.4.5-1-x86.7z\" ,\"bundled\"),_\n Array(\"2.4.5-x64\" ,\"https:\/\/github.com\/oneclick\/rubyinstaller2\/releases\/download\/rubyinstaller-2.4.5-1\/\",\"rubyinstaller-devkit-2.4.5-1-x64.7z\" ,\"bundled\"),_\n Array(\"2.3.3-i386\" ,\"http:\/\/dl.bintray.com\/oneclick\/rubyinstaller\/\",\"ruby-2.3.3-i386-mingw32.7z\" ,\"i386\"),_\n Array(\"2.3.3-x64\" ,\"http:\/\/dl.bintray.com\/oneclick\/rubyinstaller\/\",\"ruby-2.3.3-x64-mingw32.7z\" ,\"x64\" ),_\n Array(\"2.3.1-i386\" ,\"http:\/\/dl.bintray.com\/oneclick\/rubyinstaller\/\",\"ruby-2.3.1-i386-mingw32.7z\" ,\"i386\"),_\n Array(\"2.3.1-x64\" ,\"http:\/\/dl.bintray.com\/oneclick\/rubyinstaller\/\",\"ruby-2.3.1-x64-mingw32.7z\" ,\"x64\" ),_\n Array(\"2.3.0-i386\" ,\"http:\/\/dl.bintray.com\/oneclick\/rubyinstaller\/\",\"ruby-2.3.0-i386-mingw32.7z\" ,\"i386\"),_\n Array(\"2.3.0-x64\" ,\"http:\/\/dl.bintray.com\/oneclick\/rubyinstaller\/\",\"ruby-2.3.0-x64-mingw32.7z\" ,\"x64\" ),_\n Array(\"2.2.6-i386\" ,\"http:\/\/dl.bintray.com\/oneclick\/rubyinstaller\/\",\"ruby-2.2.6-i386-mingw32.7z\" ,\"i386\"),_\n Array(\"2.2.6-x64\" ,\"http:\/\/dl.bintray.com\/oneclick\/rubyinstaller\/\",\"ruby-2.2.6-x64-mingw32.7z\" ,\"x64\" ),_\n Array(\"2.2.5-i386\" ,\"http:\/\/dl.bintray.com\/oneclick\/rubyinstaller\/\",\"ruby-2.2.5-i386-mingw32.7z\" ,\"i386\"),_\n Array(\"2.2.5-x64\" ,\"http:\/\/dl.bintray.com\/oneclick\/rubyinstaller\/\",\"ruby-2.2.5-x64-mingw32.7z\" ,\"x64\" ),_\n Array(\"2.2.4-i386\" ,\"http:\/\/dl.bintray.com\/oneclick\/rubyinstaller\/\",\"ruby-2.2.4-i386-mingw32.7z\" ,\"i386\"),_\n Array(\"2.2.4-x64\" ,\"http:\/\/dl.bintray.com\/oneclick\/rubyinstaller\/\",\"ruby-2.2.4-x64-mingw32.7z\" ,\"x64\" ),_\n Array(\"2.2.3-i386\" ,\"http:\/\/dl.bintray.com\/oneclick\/rubyinstaller\/\",\"ruby-2.2.3-i386-mingw32.7z\" ,\"i386\"),_\n Array(\"2.2.3-x64\" ,\"http:\/\/dl.bintray.com\/oneclick\/rubyinstaller\/\",\"ruby-2.2.3-x64-mingw32.7z\" ,\"x64\" ),_\n Array(\"2.2.2-i386\" ,\"http:\/\/dl.bintray.com\/oneclick\/rubyinstaller\/\",\"ruby-2.2.2-i386-mingw32.7z\" ,\"i386\"),_\n Array(\"2.2.2-x64\" ,\"http:\/\/dl.bintray.com\/oneclick\/rubyinstaller\/\",\"ruby-2.2.2-x64-mingw32.7z\" ,\"x64\" ),_\n Array(\"2.2.1-i386\" ,\"http:\/\/dl.bintray.com\/oneclick\/rubyinstaller\/\",\"ruby-2.2.1-i386-mingw32.7z\" ,\"i386\"),_\n Array(\"2.2.1-x64\" ,\"http:\/\/dl.bintray.com\/oneclick\/rubyinstaller\/\",\"ruby-2.2.1-x64-mingw32.7z\" ,\"x64\" ),_\n Array(\"2.1.9-i386\" ,\"http:\/\/dl.bintray.com\/oneclick\/rubyinstaller\/\",\"ruby-2.1.9-i386-mingw32.7z\" ,\"i386\"),_\n Array(\"2.1.9-x64\" ,\"http:\/\/dl.bintray.com\/oneclick\/rubyinstaller\/\",\"ruby-2.1.9-x64-mingw32.7z\" ,\"x64\" ),_\n Array(\"2.1.8-i386\" ,\"http:\/\/dl.bintray.com\/oneclick\/rubyinstaller\/\",\"ruby-2.1.8-i386-mingw32.7z\" ,\"i386\"),_\n Array(\"2.1.8-x64\" ,\"http:\/\/dl.bintray.com\/oneclick\/rubyinstaller\/\",\"ruby-2.1.8-x64-mingw32.7z\" ,\"x64\" ),_\n Array(\"2.1.7-i386\" ,\"http:\/\/dl.bintray.com\/oneclick\/rubyinstaller\/\",\"ruby-2.1.7-i386-mingw32.7z\" ,\"i386\"),_\n Array(\"2.1.7-x64\" ,\"http:\/\/dl.bintray.com\/oneclick\/rubyinstaller\/\",\"ruby-2.1.7-x64-mingw32.7z\" ,\"x64\" ),_\n Array(\"2.1.6-i386\" ,\"http:\/\/dl.bintray.com\/oneclick\/rubyinstaller\/\",\"ruby-2.1.6-i386-mingw32.7z\" ,\"i386\"),_\n Array(\"2.1.6-x64\" ,\"http:\/\/dl.bintray.com\/oneclick\/rubyinstaller\/\",\"ruby-2.1.6-x64-mingw32.7z\" ,\"x64\" ),_\n Array(\"2.1.5-i386\" ,\"http:\/\/dl.bintray.com\/oneclick\/rubyinstaller\/\",\"ruby-2.1.5-i386-mingw32.7z\" ,\"i386\"),_\n Array(\"2.1.5-x64\" ,\"http:\/\/dl.bintray.com\/oneclick\/rubyinstaller\/\",\"ruby-2.1.5-x64-mingw32.7z\" ,\"x64\" ),_\n Array(\"2.1.4-i386\" ,\"http:\/\/dl.bintray.com\/oneclick\/rubyinstaller\/\",\"ruby-2.1.4-i386-mingw32.7z\" ,\"i386\"),_\n Array(\"2.1.4-x64\" ,\"http:\/\/dl.bintray.com\/oneclick\/rubyinstaller\/\",\"ruby-2.1.4-x64-mingw32.7z\" ,\"x64\" ),_\n Array(\"2.1.3-i386\" ,\"http:\/\/dl.bintray.com\/oneclick\/rubyinstaller\/\",\"ruby-2.1.3-i386-mingw32.7z\" ,\"i386\"),_\n Array(\"2.1.3-x64\" ,\"http:\/\/dl.bintray.com\/oneclick\/rubyinstaller\/\",\"ruby-2.1.3-x64-mingw32.7z\" ,\"x64\" ),_\n Array(\"2.0.0-p648-i386\" ,\"http:\/\/dl.bintray.com\/oneclick\/rubyinstaller\/\",\"ruby-2.0.0-p648-i386-mingw32.7z\" ,\"i386\"),_\n Array(\"2.0.0-p648-x64\" ,\"http:\/\/dl.bintray.com\/oneclick\/rubyinstaller\/\",\"ruby-2.0.0-p648-x64-mingw32.7z\" ,\"x64\" ),_\n Array(\"2.0.0-p647-i386\" ,\"http:\/\/dl.bintray.com\/oneclick\/rubyinstaller\/\",\"ruby-2.0.0-p647-i386-mingw32.7z\" ,\"i386\"),_\n Array(\"2.0.0-p647-x64\" ,\"http:\/\/dl.bintray.com\/oneclick\/rubyinstaller\/\",\"ruby-2.0.0-p647-x64-mingw32.7z\" ,\"x64\" ),_\n Array(\"2.0.0-p645-i386\" ,\"http:\/\/dl.bintray.com\/oneclick\/rubyinstaller\/\",\"ruby-2.0.0-p645-i386-mingw32.7z\" ,\"i386\"),_\n Array(\"2.0.0-p645-x64\" ,\"http:\/\/dl.bintray.com\/oneclick\/rubyinstaller\/\",\"ruby-2.0.0-p645-x64-mingw32.7z\" ,\"x64\" ),_\n Array(\"2.0.0-p643-i386\" ,\"http:\/\/dl.bintray.com\/oneclick\/rubyinstaller\/\",\"ruby-2.0.0-p643-i386-mingw32.7z\" ,\"i386\"),_\n Array(\"2.0.0-p643-x64\" ,\"http:\/\/dl.bintray.com\/oneclick\/rubyinstaller\/\",\"ruby-2.0.0-p643-x64-mingw32.7z\" ,\"x64\" ),_\n Array(\"2.0.0-p598-i386\" ,\"http:\/\/dl.bintray.com\/oneclick\/rubyinstaller\/\",\"ruby-2.0.0-p598-i386-mingw32.7z\" ,\"i386\"),_\n Array(\"2.0.0-p598-x64\" ,\"http:\/\/dl.bintray.com\/oneclick\/rubyinstaller\/\",\"ruby-2.0.0-p598-x64-mingw32.7z\" ,\"x64\" ),_\n Array(\"2.0.0-p594-i386\" ,\"http:\/\/dl.bintray.com\/oneclick\/rubyinstaller\/\",\"ruby-2.0.0-p594-i386-mingw32.7z\" ,\"i386\"),_\n Array(\"2.0.0-p594-x64\" ,\"http:\/\/dl.bintray.com\/oneclick\/rubyinstaller\/\",\"ruby-2.0.0-p594-x64-mingw32.7z\" ,\"x64\" ),_\n Array(\"2.0.0-p576-i386\" ,\"http:\/\/dl.bintray.com\/oneclick\/rubyinstaller\/\",\"ruby-2.0.0-p576-i386-mingw32.7z\" ,\"i386\"),_\n Array(\"2.0.0-p576-x64\" ,\"http:\/\/dl.bintray.com\/oneclick\/rubyinstaller\/\",\"ruby-2.0.0-p576-x64-mingw32.7z\" ,\"x64\" ),_\n Array(\"2.0.0-p481-i386\" ,\"http:\/\/dl.bintray.com\/oneclick\/rubyinstaller\/\",\"ruby-2.0.0-p481-i386-mingw32.7z\" ,\"i386\"),_\n Array(\"2.0.0-p481-x64\" ,\"http:\/\/dl.bintray.com\/oneclick\/rubyinstaller\/\",\"ruby-2.0.0-p481-x64-mingw32.7z\" ,\"x64\" ),_\n Array(\"2.0.0-p451-i386\" ,\"http:\/\/dl.bintray.com\/oneclick\/rubyinstaller\/\",\"ruby-2.0.0-p451-i386-mingw32.7z\" ,\"i386\"),_\n Array(\"2.0.0-p451-x64\" ,\"http:\/\/dl.bintray.com\/oneclick\/rubyinstaller\/\",\"ruby-2.0.0-p451-x64-mingw32.7z\" ,\"x64\" ),_\n Array(\"2.0.0-p353-i386\" ,\"http:\/\/dl.bintray.com\/oneclick\/rubyinstaller\/\",\"ruby-2.0.0-p353-i386-mingw32.7z\" ,\"i386\"),_\n Array(\"2.0.0-p353-x64\" ,\"http:\/\/dl.bintray.com\/oneclick\/rubyinstaller\/\",\"ruby-2.0.0-p353-x64-mingw32.7z\" ,\"x64\" ),_\n Array(\"2.0.0-p247-i386\" ,\"http:\/\/dl.bintray.com\/oneclick\/rubyinstaller\/\",\"ruby-2.0.0-p247-i386-mingw32.7z\" ,\"i386\"),_\n Array(\"2.0.0-p247-x64\" ,\"http:\/\/dl.bintray.com\/oneclick\/rubyinstaller\/\",\"ruby-2.0.0-p247-x64-mingw32.7z\" ,\"x64\" ),_\n Array(\"2.0.0-p195-i386\" ,\"http:\/\/dl.bintray.com\/oneclick\/rubyinstaller\/\",\"ruby-2.0.0-p195-i386-mingw32.7z\" ,\"i386\"),_\n Array(\"2.0.0-p195-x64\" ,\"http:\/\/dl.bintray.com\/oneclick\/rubyinstaller\/\",\"ruby-2.0.0-p195-x64-mingw32.7z\" ,\"x64\" ),_\n Array(\"2.0.0-p0-i386\" ,\"http:\/\/dl.bintray.com\/oneclick\/rubyinstaller\/\",\"ruby-2.0.0-p0-i386-mingw32.7z\" ,\"i386\"),_\n Array(\"2.0.0-p0-x64\" ,\"http:\/\/dl.bintray.com\/oneclick\/rubyinstaller\/\",\"ruby-2.0.0-p0-x64-mingw32.7z\" ,\"x64\" ),_\n Array(\"1.9.3-p551-i386\" ,\"http:\/\/dl.bintray.com\/oneclick\/rubyinstaller\/\",\"ruby-1.9.3-p551-i386-mingw32.7z\" ,\"tdm\" ),_\n Array(\"1.9.3-p550-i386\" ,\"http:\/\/dl.bintray.com\/oneclick\/rubyinstaller\/\",\"ruby-1.9.3-p550-i386-mingw32.7z\" ,\"tdm\" ),_\n Array(\"1.9.3-p545-i386\" ,\"http:\/\/dl.bintray.com\/oneclick\/rubyinstaller\/\",\"ruby-1.9.3-p545-i386-mingw32.7z\" ,\"tdm\" ),_\n Array(\"1.9.3-p484-i386\" ,\"http:\/\/dl.bintray.com\/oneclick\/rubyinstaller\/\",\"ruby-1.9.3-p484-i386-mingw32.7z\" ,\"tdm\" ),_\n Array(\"1.9.3-p448-i386\" ,\"http:\/\/dl.bintray.com\/oneclick\/rubyinstaller\/\",\"ruby-1.9.3-p448-i386-mingw32.7z\" ,\"tdm\" ),_\n Array(\"1.9.3-p429-i386\" ,\"http:\/\/dl.bintray.com\/oneclick\/rubyinstaller\/\",\"ruby-1.9.3-p429-i386-mingw32.7z\" ,\"tdm\" ),_\n Array(\"1.9.3-p392-i386\" ,\"http:\/\/dl.bintray.com\/oneclick\/rubyinstaller\/\",\"ruby-1.9.3-p392-i386-mingw32.7z\" ,\"tdm\" ),_\n Array(\"1.9.3-p385-i386\" ,\"http:\/\/dl.bintray.com\/oneclick\/rubyinstaller\/\",\"ruby-1.9.3-p385-i386-mingw32.7z\" ,\"tdm\" ),_\n Array(\"1.9.3-p374-i386\" ,\"http:\/\/dl.bintray.com\/oneclick\/rubyinstaller\/\",\"ruby-1.9.3-p374-i386-mingw32.7z\" ,\"tdm\" ),_\n Array(\"1.9.3-p362-i386\" ,\"http:\/\/dl.bintray.com\/oneclick\/rubyinstaller\/\",\"ruby-1.9.3-p362-i386-mingw32.7z\" ,\"tdm\" ),_\n Array(\"1.9.3-p327-i386\" ,\"http:\/\/dl.bintray.com\/oneclick\/rubyinstaller\/\",\"ruby-1.9.3-p327-i386-mingw32.7z\" ,\"tdm\" ),_\n Array(\"1.9.3-p286-i386\" ,\"http:\/\/dl.bintray.com\/oneclick\/rubyinstaller\/\",\"ruby-1.9.3-p286-i386-mingw32.7z\" ,\"tdm\" ),_\n Array(\"1.9.3-p194-i386\" ,\"http:\/\/dl.bintray.com\/oneclick\/rubyinstaller\/\",\"ruby-1.9.3-p194-i386-mingw32.7z\" ,\"tdm\" ),_\n Array(\"1.9.3-p125-i386\" ,\"http:\/\/dl.bintray.com\/oneclick\/rubyinstaller\/\",\"ruby-1.9.3-p125-i386-mingw32.7z\" ,\"tdm\" ),_\n Array(\"1.9.3-p0-i386\" ,\"http:\/\/dl.bintray.com\/oneclick\/rubyinstaller\/\",\"ruby-1.9.3-p0-i386-mingw32.7z\" ,\"tdm\" ),_\n Array(\"1.9.2-p290-i386\" ,\"http:\/\/dl.bintray.com\/oneclick\/rubyinstaller\/\",\"ruby-1.9.2-p290-i386-mingw32.7z\" ,\"tdm\" ),_\n Array(\"1.9.2-p180-i386\" ,\"http:\/\/dl.bintray.com\/oneclick\/rubyinstaller\/\",\"ruby-1.9.2-p180-i386-mingw32.7z\" ,\"tdm\" ),_\n Array(\"1.9.2-p136-i386\" ,\"http:\/\/dl.bintray.com\/oneclick\/rubyinstaller\/\",\"ruby-1.9.2-p136-i386-mingw32.7z\" ,\"tdm\" ),_\n Array(\"1.9.2-p0-i386\" ,\"http:\/\/dl.bintray.com\/oneclick\/rubyinstaller\/\",\"ruby-1.9.2-p0-i386-mingw32.7z\" ,\"tdm\" ),_\n Array(\"1.8.7-p374-i386\" ,\"http:\/\/dl.bintray.com\/oneclick\/rubyinstaller\/\",\"ruby-1.8.7-p374-i386-mingw32.7z\" ,\"tdm\" ),_\n Array(\"1.8.7-p371-i386\" ,\"http:\/\/dl.bintray.com\/oneclick\/rubyinstaller\/\",\"ruby-1.8.7-p371-i386-mingw32.7z\" ,\"tdm\" ),_\n Array(\"1.8.7-p370-i386\" ,\"http:\/\/dl.bintray.com\/oneclick\/rubyinstaller\/\",\"ruby-1.8.7-p370-i386-mingw32.7z\" ,\"tdm\" ),_\n Array(\"1.8.7-p358-i386\" ,\"http:\/\/dl.bintray.com\/oneclick\/rubyinstaller\/\",\"ruby-1.8.7-p358-i386-mingw32.7z\" ,\"tdm\" ),_\n Array(\"1.8.7-p357-i386\" ,\"http:\/\/dl.bintray.com\/oneclick\/rubyinstaller\/\",\"ruby-1.8.7-p357-i386-mingw32.7z\" ,\"tdm\" ),_\n Array(\"1.8.7-p352-i386\" ,\"http:\/\/dl.bintray.com\/oneclick\/rubyinstaller\/\",\"ruby-1.8.7-p352-i386-mingw32.7z\" ,\"tdm\" ),_\n Array(\"1.8.7-p334-i386\" ,\"http:\/\/dl.bintray.com\/oneclick\/rubyinstaller\/\",\"ruby-1.8.7-p334-i386-mingw32.7z\" ,\"tdm\" ),_\n Array(\"1.8.7-p330-i386\" ,\"http:\/\/dl.bintray.com\/oneclick\/rubyinstaller\/\",\"ruby-1.8.7-p330-i386-mingw32.7z\" ,\"tdm\" ),_\n Array(\"1.8.7-p302-i386\" ,\"http:\/\/dl.bintray.com\/oneclick\/rubyinstaller\/\",\"ruby-1.8.7-p302-i386-mingw32.7z\" ,\"tdm\" ) _\n)\n\nlistEnv_i386 = Array( _\n Array(\"2.7.1\" ,\"https:\/\/github.com\/oneclick\/rubyinstaller2\/releases\/download\/RubyInstaller-2.7.1-1\/\",\"rubyinstaller-2.7.1-1-x86.7z\" ,\"bundled\"),_\n Array(\"2.7.1-x64\" ,\"https:\/\/github.com\/oneclick\/rubyinstaller2\/releases\/download\/RubyInstaller-2.7.1-1\/\",\"rubyinstaller-2.7.1-1-x64.7z\" ,\"bundled\"),_\n Array(\"2.7.0\" ,\"https:\/\/github.com\/oneclick\/rubyinstaller2\/releases\/download\/RubyInstaller-2.7.0-1\/\",\"rubyinstaller-2.7.0-1-x86.7z\" ,\"bundled\"),_\n Array(\"2.7.0-x64\" ,\"https:\/\/github.com\/oneclick\/rubyinstaller2\/releases\/download\/RubyInstaller-2.7.0-1\/\",\"rubyinstaller-2.7.0-1-x64.7z\" ,\"bundled\"),_\n Array(\"2.6.6\" ,\"https:\/\/github.com\/oneclick\/rubyinstaller2\/releases\/download\/RubyInstaller-2.6.6-1\/\",\"rubyinstaller-2.6.6-1-x86.7z\" ,\"bundled\"),_\n Array(\"2.6.6-x64\" ,\"https:\/\/github.com\/oneclick\/rubyinstaller2\/releases\/download\/RubyInstaller-2.6.6-1\/\",\"rubyinstaller-2.6.6-1-x64.7z\" ,\"bundled\"),_\n Array(\"2.6.4\" ,\"https:\/\/github.com\/oneclick\/rubyinstaller2\/releases\/download\/RubyInstaller-2.6.4-1\/\",\"rubyinstaller-2.6.4-1-x86.7z\" ,\"bundled\"),_\n Array(\"2.6.4-x64\" ,\"https:\/\/github.com\/oneclick\/rubyinstaller2\/releases\/download\/RubyInstaller-2.6.4-1\/\",\"rubyinstaller-2.6.4-1-x64.7z\" ,\"bundled\"),_\n Array(\"2.6.0\" ,\"https:\/\/github.com\/oneclick\/rubyinstaller2\/releases\/download\/RubyInstaller-2.6.0-1\/\",\"rubyinstaller-2.6.0-1-x86.7z\" ,\"bundled\"),_\n Array(\"2.6.0-x64\" ,\"https:\/\/github.com\/oneclick\/rubyinstaller2\/releases\/download\/RubyInstaller-2.6.0-1\/\",\"rubyinstaller-2.6.0-1-x64.7z\" ,\"bundled\"),_\n Array(\"2.5.8\" ,\"https:\/\/github.com\/oneclick\/rubyinstaller2\/releases\/download\/RubyInstaller-2.5.8-1\/\",\"rubyinstaller-2.5.8-1-x86.7z\" ,\"bundled\"),_\n Array(\"2.5.8-x64\" ,\"https:\/\/github.com\/oneclick\/rubyinstaller2\/releases\/download\/RubyInstaller-2.5.8-1\/\",\"rubyinstaller-2.5.8-1-x64.7z\" ,\"bundled\"),_\n Array(\"2.5.3\" ,\"https:\/\/github.com\/oneclick\/rubyinstaller2\/releases\/download\/rubyinstaller-2.5.3-1\/\",\"rubyinstaller-2.5.3-1-x86.7z\" ,\"bundled\"),_\n Array(\"2.5.3-x64\" ,\"https:\/\/github.com\/oneclick\/rubyinstaller2\/releases\/download\/rubyinstaller-2.5.3-1\/\",\"rubyinstaller-2.5.3-1-x64.7z\" ,\"bundled\"),_\n Array(\"2.4.5\" ,\"https:\/\/github.com\/oneclick\/rubyinstaller2\/releases\/download\/rubyinstaller-2.4.5-1\/\",\"rubyinstaller-2.4.5-1-x86.7z\" ,\"bundled\"),_\n Array(\"2.4.5-x64\" ,\"https:\/\/github.com\/oneclick\/rubyinstaller2\/releases\/download\/rubyinstaller-2.4.5-1\/\",\"rubyinstaller-2.4.5-1-x64.7z\" ,\"bundled\"),_\n Array(\"2.3.3\" ,\"http:\/\/dl.bintray.com\/oneclick\/rubyinstaller\/\",\"ruby-2.3.3-i386-mingw32.7z\" ,\"i386\"),_\n Array(\"2.3.3-x64\" ,\"http:\/\/dl.bintray.com\/oneclick\/rubyinstaller\/\",\"ruby-2.3.3-x64-mingw32.7z\" ,\"x64\" ),_\n Array(\"2.3.1\" ,\"http:\/\/dl.bintray.com\/oneclick\/rubyinstaller\/\",\"ruby-2.3.1-i386-mingw32.7z\" ,\"i386\"),_\n Array(\"2.3.1-x64\" ,\"http:\/\/dl.bintray.com\/oneclick\/rubyinstaller\/\",\"ruby-2.3.1-x64-mingw32.7z\" ,\"x64\" ),_\n Array(\"2.3.0\" ,\"http:\/\/dl.bintray.com\/oneclick\/rubyinstaller\/\",\"ruby-2.3.0-i386-mingw32.7z\" ,\"i386\"),_\n Array(\"2.3.0-x64\" ,\"http:\/\/dl.bintray.com\/oneclick\/rubyinstaller\/\",\"ruby-2.3.0-x64-mingw32.7z\" ,\"x64\" ),_\n Array(\"2.2.6\" ,\"http:\/\/dl.bintray.com\/oneclick\/rubyinstaller\/\",\"ruby-2.2.6-i386-mingw32.7z\" ,\"i386\"),_\n Array(\"2.2.6-x64\" ,\"http:\/\/dl.bintray.com\/oneclick\/rubyinstaller\/\",\"ruby-2.2.6-x64-mingw32.7z\" ,\"x64\" ),_\n Array(\"2.2.5\" ,\"http:\/\/dl.bintray.com\/oneclick\/rubyinstaller\/\",\"ruby-2.2.5-i386-mingw32.7z\" ,\"i386\"),_\n Array(\"2.2.5-x64\" ,\"http:\/\/dl.bintray.com\/oneclick\/rubyinstaller\/\",\"ruby-2.2.5-x64-mingw32.7z\" ,\"x64\" ),_\n Array(\"2.2.4\" ,\"http:\/\/dl.bintray.com\/oneclick\/rubyinstaller\/\",\"ruby-2.2.4-i386-mingw32.7z\" ,\"i386\"),_\n Array(\"2.2.4-x64\" ,\"http:\/\/dl.bintray.com\/oneclick\/rubyinstaller\/\",\"ruby-2.2.4-x64-mingw32.7z\" ,\"x64\" ),_\n Array(\"2.2.3\" ,\"http:\/\/dl.bintray.com\/oneclick\/rubyinstaller\/\",\"ruby-2.2.3-i386-mingw32.7z\" ,\"i386\"),_\n Array(\"2.2.3-x64\" ,\"http:\/\/dl.bintray.com\/oneclick\/rubyinstaller\/\",\"ruby-2.2.3-x64-mingw32.7z\" ,\"x64\" ),_\n Array(\"2.2.2\" ,\"http:\/\/dl.bintray.com\/oneclick\/rubyinstaller\/\",\"ruby-2.2.2-i386-mingw32.7z\" ,\"i386\"),_\n Array(\"2.2.2-x64\" ,\"http:\/\/dl.bintray.com\/oneclick\/rubyinstaller\/\",\"ruby-2.2.2-x64-mingw32.7z\" ,\"x64\" ),_\n Array(\"2.2.1\" ,\"http:\/\/dl.bintray.com\/oneclick\/rubyinstaller\/\",\"ruby-2.2.1-i386-mingw32.7z\" ,\"i386\"),_\n Array(\"2.2.1-x64\" ,\"http:\/\/dl.bintray.com\/oneclick\/rubyinstaller\/\",\"ruby-2.2.1-x64-mingw32.7z\" ,\"x64\" ),_\n Array(\"2.1.9\" ,\"http:\/\/dl.bintray.com\/oneclick\/rubyinstaller\/\",\"ruby-2.1.9-i386-mingw32.7z\" ,\"i386\"),_\n Array(\"2.1.9-x64\" ,\"http:\/\/dl.bintray.com\/oneclick\/rubyinstaller\/\",\"ruby-2.1.9-x64-mingw32.7z\" ,\"x64\" ),_\n Array(\"2.1.8\" ,\"http:\/\/dl.bintray.com\/oneclick\/rubyinstaller\/\",\"ruby-2.1.8-i386-mingw32.7z\" ,\"i386\"),_\n Array(\"2.1.8-x64\" ,\"http:\/\/dl.bintray.com\/oneclick\/rubyinstaller\/\",\"ruby-2.1.8-x64-mingw32.7z\" ,\"x64\" ),_\n Array(\"2.1.7\" ,\"http:\/\/dl.bintray.com\/oneclick\/rubyinstaller\/\",\"ruby-2.1.7-i386-mingw32.7z\" ,\"i386\"),_\n Array(\"2.1.7-x64\" ,\"http:\/\/dl.bintray.com\/oneclick\/rubyinstaller\/\",\"ruby-2.1.7-x64-mingw32.7z\" ,\"x64\" ),_\n Array(\"2.1.6\" ,\"http:\/\/dl.bintray.com\/oneclick\/rubyinstaller\/\",\"ruby-2.1.6-i386-mingw32.7z\" ,\"i386\"),_\n Array(\"2.1.6-x64\" ,\"http:\/\/dl.bintray.com\/oneclick\/rubyinstaller\/\",\"ruby-2.1.6-x64-mingw32.7z\" ,\"x64\" ),_\n Array(\"2.1.5\" ,\"http:\/\/dl.bintray.com\/oneclick\/rubyinstaller\/\",\"ruby-2.1.5-i386-mingw32.7z\" ,\"i386\"),_\n Array(\"2.1.5-x64\" ,\"http:\/\/dl.bintray.com\/oneclick\/rubyinstaller\/\",\"ruby-2.1.5-x64-mingw32.7z\" ,\"x64\" ),_\n Array(\"2.1.4\" ,\"http:\/\/dl.bintray.com\/oneclick\/rubyinstaller\/\",\"ruby-2.1.4-i386-mingw32.7z\" ,\"i386\"),_\n Array(\"2.1.4-x64\" ,\"http:\/\/dl.bintray.com\/oneclick\/rubyinstaller\/\",\"ruby-2.1.4-x64-mingw32.7z\" ,\"x64\" ),_\n Array(\"2.1.3\" ,\"http:\/\/dl.bintray.com\/oneclick\/rubyinstaller\/\",\"ruby-2.1.3-i386-mingw32.7z\" ,\"i386\"),_\n Array(\"2.1.3-x64\" ,\"http:\/\/dl.bintray.com\/oneclick\/rubyinstaller\/\",\"ruby-2.1.3-x64-mingw32.7z\" ,\"x64\" ),_\n Array(\"2.0.0-p648\" ,\"http:\/\/dl.bintray.com\/oneclick\/rubyinstaller\/\",\"ruby-2.0.0-p648-i386-mingw32.7z\" ,\"i386\"),_\n Array(\"2.0.0-p648-x64\" ,\"http:\/\/dl.bintray.com\/oneclick\/rubyinstaller\/\",\"ruby-2.0.0-p648-x64-mingw32.7z\" ,\"x64\" ),_\n Array(\"2.0.0-p647\" ,\"http:\/\/dl.bintray.com\/oneclick\/rubyinstaller\/\",\"ruby-2.0.0-p647-i386-mingw32.7z\" ,\"i386\"),_\n Array(\"2.0.0-p647-x64\" ,\"http:\/\/dl.bintray.com\/oneclick\/rubyinstaller\/\",\"ruby-2.0.0-p647-x64-mingw32.7z\" ,\"x64\" ),_\n Array(\"2.0.0-p645\" ,\"http:\/\/dl.bintray.com\/oneclick\/rubyinstaller\/\",\"ruby-2.0.0-p645-i386-mingw32.7z\" ,\"i386\"),_\n Array(\"2.0.0-p645-x64\" ,\"http:\/\/dl.bintray.com\/oneclick\/rubyinstaller\/\",\"ruby-2.0.0-p645-x64-mingw32.7z\" ,\"x64\" ),_\n Array(\"2.0.0-p643\" ,\"http:\/\/dl.bintray.com\/oneclick\/rubyinstaller\/\",\"ruby-2.0.0-p643-i386-mingw32.7z\" ,\"i386\"),_\n Array(\"2.0.0-p643-x64\" ,\"http:\/\/dl.bintray.com\/oneclick\/rubyinstaller\/\",\"ruby-2.0.0-p643-x64-mingw32.7z\" ,\"x64\" ),_\n Array(\"2.0.0-p598\" ,\"http:\/\/dl.bintray.com\/oneclick\/rubyinstaller\/\",\"ruby-2.0.0-p598-i386-mingw32.7z\" ,\"i386\"),_\n Array(\"2.0.0-p598-x64\" ,\"http:\/\/dl.bintray.com\/oneclick\/rubyinstaller\/\",\"ruby-2.0.0-p598-x64-mingw32.7z\" ,\"x64\" ),_\n Array(\"2.0.0-p594\" ,\"http:\/\/dl.bintray.com\/oneclick\/rubyinstaller\/\",\"ruby-2.0.0-p594-i386-mingw32.7z\" ,\"i386\"),_\n Array(\"2.0.0-p594-x64\" ,\"http:\/\/dl.bintray.com\/oneclick\/rubyinstaller\/\",\"ruby-2.0.0-p594-x64-mingw32.7z\" ,\"x64\" ),_\n Array(\"2.0.0-p576\" ,\"http:\/\/dl.bintray.com\/oneclick\/rubyinstaller\/\",\"ruby-2.0.0-p576-i386-mingw32.7z\" ,\"i386\"),_\n Array(\"2.0.0-p576-x64\" ,\"http:\/\/dl.bintray.com\/oneclick\/rubyinstaller\/\",\"ruby-2.0.0-p576-x64-mingw32.7z\" ,\"x64\" ),_\n Array(\"2.0.0-p481\" ,\"http:\/\/dl.bintray.com\/oneclick\/rubyinstaller\/\",\"ruby-2.0.0-p481-i386-mingw32.7z\" ,\"i386\"),_\n Array(\"2.0.0-p481-x64\" ,\"http:\/\/dl.bintray.com\/oneclick\/rubyinstaller\/\",\"ruby-2.0.0-p481-x64-mingw32.7z\" ,\"x64\" ),_\n Array(\"2.0.0-p451\" ,\"http:\/\/dl.bintray.com\/oneclick\/rubyinstaller\/\",\"ruby-2.0.0-p451-i386-mingw32.7z\" ,\"i386\"),_\n Array(\"2.0.0-p451-x64\" ,\"http:\/\/dl.bintray.com\/oneclick\/rubyinstaller\/\",\"ruby-2.0.0-p451-x64-mingw32.7z\" ,\"x64\" ),_\n Array(\"2.0.0-p353\" ,\"http:\/\/dl.bintray.com\/oneclick\/rubyinstaller\/\",\"ruby-2.0.0-p353-i386-mingw32.7z\" ,\"i386\"),_\n Array(\"2.0.0-p353-x64\" ,\"http:\/\/dl.bintray.com\/oneclick\/rubyinstaller\/\",\"ruby-2.0.0-p353-x64-mingw32.7z\" ,\"x64\" ),_\n Array(\"2.0.0-p247\" ,\"http:\/\/dl.bintray.com\/oneclick\/rubyinstaller\/\",\"ruby-2.0.0-p247-i386-mingw32.7z\" ,\"i386\"),_\n Array(\"2.0.0-p247-x64\" ,\"http:\/\/dl.bintray.com\/oneclick\/rubyinstaller\/\",\"ruby-2.0.0-p247-x64-mingw32.7z\" ,\"x64\" ),_\n Array(\"2.0.0-p195\" ,\"http:\/\/dl.bintray.com\/oneclick\/rubyinstaller\/\",\"ruby-2.0.0-p195-i386-mingw32.7z\" ,\"i386\"),_\n Array(\"2.0.0-p195-x64\" ,\"http:\/\/dl.bintray.com\/oneclick\/rubyinstaller\/\",\"ruby-2.0.0-p195-x64-mingw32.7z\" ,\"x64\" ),_\n Array(\"2.0.0-p0\" ,\"http:\/\/dl.bintray.com\/oneclick\/rubyinstaller\/\",\"ruby-2.0.0-p0-i386-mingw32.7z\" ,\"i386\"),_\n Array(\"2.0.0-p0-x64\" ,\"http:\/\/dl.bintray.com\/oneclick\/rubyinstaller\/\",\"ruby-2.0.0-p0-x64-mingw32.7z\" ,\"x64\" ),_\n Array(\"1.9.3-p551\" ,\"http:\/\/dl.bintray.com\/oneclick\/rubyinstaller\/\",\"ruby-1.9.3-p551-i386-mingw32.7z\" ,\"tdm\" ),_\n Array(\"1.9.3-p550\" ,\"http:\/\/dl.bintray.com\/oneclick\/rubyinstaller\/\",\"ruby-1.9.3-p550-i386-mingw32.7z\" ,\"tdm\" ),_\n Array(\"1.9.3-p545\" ,\"http:\/\/dl.bintray.com\/oneclick\/rubyinstaller\/\",\"ruby-1.9.3-p545-i386-mingw32.7z\" ,\"tdm\" ),_\n Array(\"1.9.3-p484\" ,\"http:\/\/dl.bintray.com\/oneclick\/rubyinstaller\/\",\"ruby-1.9.3-p484-i386-mingw32.7z\" ,\"tdm\" ),_\n Array(\"1.9.3-p448\" ,\"http:\/\/dl.bintray.com\/oneclick\/rubyinstaller\/\",\"ruby-1.9.3-p448-i386-mingw32.7z\" ,\"tdm\" ),_\n Array(\"1.9.3-p429\" ,\"http:\/\/dl.bintray.com\/oneclick\/rubyinstaller\/\",\"ruby-1.9.3-p429-i386-mingw32.7z\" ,\"tdm\" ),_\n Array(\"1.9.3-p392\" ,\"http:\/\/dl.bintray.com\/oneclick\/rubyinstaller\/\",\"ruby-1.9.3-p392-i386-mingw32.7z\" ,\"tdm\" ),_\n Array(\"1.9.3-p385\" ,\"http:\/\/dl.bintray.com\/oneclick\/rubyinstaller\/\",\"ruby-1.9.3-p385-i386-mingw32.7z\" ,\"tdm\" ),_\n Array(\"1.9.3-p374\" ,\"http:\/\/dl.bintray.com\/oneclick\/rubyinstaller\/\",\"ruby-1.9.3-p374-i386-mingw32.7z\" ,\"tdm\" ),_\n Array(\"1.9.3-p362\" ,\"http:\/\/dl.bintray.com\/oneclick\/rubyinstaller\/\",\"ruby-1.9.3-p362-i386-mingw32.7z\" ,\"tdm\" ),_\n Array(\"1.9.3-p327\" ,\"http:\/\/dl.bintray.com\/oneclick\/rubyinstaller\/\",\"ruby-1.9.3-p327-i386-mingw32.7z\" ,\"tdm\" ),_\n Array(\"1.9.3-p286\" ,\"http:\/\/dl.bintray.com\/oneclick\/rubyinstaller\/\",\"ruby-1.9.3-p286-i386-mingw32.7z\" ,\"tdm\" ),_\n Array(\"1.9.3-p194\" ,\"http:\/\/dl.bintray.com\/oneclick\/rubyinstaller\/\",\"ruby-1.9.3-p194-i386-mingw32.7z\" ,\"tdm\" ),_\n Array(\"1.9.3-p125\" ,\"http:\/\/dl.bintray.com\/oneclick\/rubyinstaller\/\",\"ruby-1.9.3-p125-i386-mingw32.7z\" ,\"tdm\" ),_\n Array(\"1.9.3-p0\" ,\"http:\/\/dl.bintray.com\/oneclick\/rubyinstaller\/\",\"ruby-1.9.3-p0-i386-mingw32.7z\" ,\"tdm\" ),_\n Array(\"1.9.2-p290\" ,\"http:\/\/dl.bintray.com\/oneclick\/rubyinstaller\/\",\"ruby-1.9.2-p290-i386-mingw32.7z\" ,\"tdm\" ),_\n Array(\"1.9.2-p180\" ,\"http:\/\/dl.bintray.com\/oneclick\/rubyinstaller\/\",\"ruby-1.9.2-p180-i386-mingw32.7z\" ,\"tdm\" ),_\n Array(\"1.9.2-p136\" ,\"http:\/\/dl.bintray.com\/oneclick\/rubyinstaller\/\",\"ruby-1.9.2-p136-i386-mingw32.7z\" ,\"tdm\" ),_\n Array(\"1.9.2-p0\" ,\"http:\/\/dl.bintray.com\/oneclick\/rubyinstaller\/\",\"ruby-1.9.2-p0-i386-mingw32.7z\" ,\"tdm\" ),_\n Array(\"1.8.7-p374\" ,\"http:\/\/dl.bintray.com\/oneclick\/rubyinstaller\/\",\"ruby-1.8.7-p374-i386-mingw32.7z\" ,\"tdm\" ),_\n Array(\"1.8.7-p371\" ,\"http:\/\/dl.bintray.com\/oneclick\/rubyinstaller\/\",\"ruby-1.8.7-p371-i386-mingw32.7z\" ,\"tdm\" ),_\n Array(\"1.8.7-p370\" ,\"http:\/\/dl.bintray.com\/oneclick\/rubyinstaller\/\",\"ruby-1.8.7-p370-i386-mingw32.7z\" ,\"tdm\" ),_\n Array(\"1.8.7-p358\" ,\"http:\/\/dl.bintray.com\/oneclick\/rubyinstaller\/\",\"ruby-1.8.7-p358-i386-mingw32.7z\" ,\"tdm\" ),_\n Array(\"1.8.7-p357\" ,\"http:\/\/dl.bintray.com\/oneclick\/rubyinstaller\/\",\"ruby-1.8.7-p357-i386-mingw32.7z\" ,\"tdm\" ),_\n Array(\"1.8.7-p352\" ,\"http:\/\/dl.bintray.com\/oneclick\/rubyinstaller\/\",\"ruby-1.8.7-p352-i386-mingw32.7z\" ,\"tdm\" ),_\n Array(\"1.8.7-p334\" ,\"http:\/\/dl.bintray.com\/oneclick\/rubyinstaller\/\",\"ruby-1.8.7-p334-i386-mingw32.7z\" ,\"tdm\" ),_\n Array(\"1.8.7-p330\" ,\"http:\/\/dl.bintray.com\/oneclick\/rubyinstaller\/\",\"ruby-1.8.7-p330-i386-mingw32.7z\" ,\"tdm\" ),_\n Array(\"1.8.7-p302\" ,\"http:\/\/dl.bintray.com\/oneclick\/rubyinstaller\/\",\"ruby-1.8.7-p302-i386-mingw32.7z\" ,\"tdm\" ) _\n)\n\nFunction DownloadFile(strUrl,strFile)\n Dim objHttp\n Dim httpProxy\n Set objHttp = Wscript.CreateObject(\"Msxml2.ServerXMLHTTP\")\n on error resume next\n Call objHttp.Open(\"GET\", strUrl, False )\n if Err.Number <> 0 then\n Wscript.Echo Err.Description\n Wscript.Quit\n end if\n httpProxy = objws.ExpandEnvironmentStrings(\"%http_proxy%\")\n if httpProxy <> \"\" AND httpProxy <> \"%http_proxy%\" Then\n \tobjHttp.setProxy 2, httpProxy\n end if\n objHttp.Send\n\n if Err.Number <> 0 then\n Wscript.Echo Err.Description\n Wscript.Quit\n end if\n on error goto 0\n if objHttp.status = 404 then\n Wscript.Echo \"404:file not found\"\n Wscript.Quit\n end if\n\n Dim Stream\n Set Stream = Wscript.CreateObject(\"ADODB.Stream\")\n Stream.Open\n Stream.Type = 1\n Stream.Write objHttp.responseBody\n Stream.SaveToFile strFile, 2\n Stream.Close\nEnd Function\n\nSub extractDevKit(cur)\n If Not objfs.FolderExists( strDirDevKit ) Then objfs.CreateFolder(strDirDevKit)\n If Not objfs.FolderExists( cur(1) ) Then objfs.CreateFolder(cur(1))\n\n If Not objfs.FileExists(cur(2)) Then\n objws.Run \"%comspec% \/c rmdir \/s \/q \" & cur(1), 0 , true\n objfs.CreateFolder(cur(1))\n If objfs.FileExists(cur(4)) Then\n objfs.CopyFile cur(4), cur(1)&\"\\\", True\n Else\n download(cur)\n End If\n End If\n\n If Not objfs.FileExists(cur(1) & \"\\dk.rb\") Then\n Wscript.echo \"extract\" & cur(0) & \" ...\"\n objws.Run \"\"\"\" & cur(2) & \"\"\"\", 1 , true\n End If\nEnd Sub\n\nSub writeConfigYML(dev,cur)\n Dim ofile\n Set ofile = objfs.CreateTextFile(dev(1) & \"\\config.yml\" , True )\n ofile.WriteLine(\"- \" & cur(1))\n ofile.Close()\nEnd Sub\n\nSub patchDevKit(dev,cur)\n Wscript.echo \"patch \" & dev(0) & \" to \" & cur(0)\n writeConfigYML dev,cur\n objws.CurrentDirectory = dev(1)\n objws.Run \"\"\"\" & cur(1) & \"\\bin\\ruby.exe\"\" dk.rb install\", 1 , true\n objws.CurrentDirectory =strCurrent\nEnd Sub\n\nSub installDevKit(cur)\n Dim list\n Dim dev\n Dim idx\n If cur(4) = \"bundled\" Then\n objws.Run \"\"\"\" & cur(1) & \"\\bin\\ridk.cmd\"\" install\", 1 , true\n Else\n For Each list In listDevKit\n If list(0) = cur(4) Then\n dev=Array(\"DevKit_\" & list(0), strDirDevKit&\"\\\"&list(0), strDirDevKit&\"\\\"&list(0)&\"\\\"&list(2), list(1)&list(2), strDirCache&\"\\\"&list(2))\n extractDevKit dev\n patchDevKit dev,cur\n Exit Sub\n End If\n Next\n End If\nEnd Sub\n\nSub clear(cur)\n If objfs.FolderExists(cur(1)) Then objfs.DeleteFolder cur(1),True\n If objfs.FileExists( cur(2)) Then objfs.DeleteFile cur(2),True\nEnd Sub\n\nSub download(cur)\n Wscript.echo \"download \" & cur(0) & \" ...\"\n DownloadFile cur(3) , cur(2)\nEnd Sub\n\nSub extract(cur)\n If Not objfs.FolderExists( strDirCache ) Then objfs.CreateFolder(strDirCache)\n If Not objfs.FolderExists( strDirVers ) Then objfs.CreateFolder(strDirVers )\n\n If objfs.FolderExists(cur(1)) Then Exit Sub\n\n If Not objfs.FileExists(cur(2)) Then download(cur)\n\n Wscript.echo \"install \" & cur(0) & \" ...\"\n\n objws.CurrentDirectory = strDirCache\n objws.Run tool7z & \" \"\"\" & cur(2) & \"\"\"\" , 0 , true\n objfs.MoveFolder strDirCache&\"\\\"&objfs.GetBaseName(cur(2)) , cur(1)\n\n installDevKit(cur)\n objws.Run \"rbenv rehash \" & cur(0), 0, true\n Wscript.echo \"comlete! \" & cur(0)\n\nEnd Sub\n\nFunction GetCurrentVersionGlobal()\n GetCurrentVersionGlobal = Null\n\n Dim fname\n Dim objFile\n fname = strRbenvHome & \"\\version\"\n If objfs.FileExists( fname ) Then\n Set objFile = objfs.OpenTextFile(fname)\n If objFile.AtEndOfStream <> True Then\n GetCurrentVersionGlobal = Array(objFile.ReadLine,fname)\n End If\n objFile.Close\n End If\nEnd Function\n\nFunction GetCurrentVersionLocal(path)\n GetCurrentVersionLocal = Null\n\n Dim fname\n Dim objFile\n Do While path <> \"\"\n fname = path & strVerFile\n If objfs.FileExists( fname ) Then\n Set objFile = objfs.OpenTextFile(fname)\n If objFile.AtEndOfStream <> True Then\n GetCurrentVersionLocal = Array(objFile.ReadLine,fname)\n End If\n objFile.Close\n Exit Function\n End If\n path = objfs.getParentFolderName(path)\n Loop\nEnd Function\n\nFunction GetCurrentVersionShell()\n GetCurrentVersionShell = Null\n\n Dim str\n str=objws.ExpandEnvironmentStrings(\"%RBENV_VERSION%\")\n If str <> \"%RBENV_VERSION%\" Then\n GetCurrentVersionShell = Array(str,\"%RBENV_VERSION%\")\n End If\nEnd Function\n\nFunction GetCurrentVersionNoError()\n Dim str\n str=GetCurrentVersionShell\n If IsNull(str) Then str = GetCurrentVersionLocal(strCurrent)\n If IsNull(str) Then str = GetCurrentVersionGlobal\n GetCurrentVersionNoError = str\nEnd Function\n\nSub main(arg)\n If arg.Count = 0 Then ShowHelp\n\n Dim idx\n Dim optForce\n Dim optSkip\n Dim optList\n Dim version\n\n optForce=False\n optSkip=False\n optList=False\n version=\"\"\n\n For idx = 0 To arg.Count - 1\n Select Case arg(idx)\n Case \"--help\" ShowHelp\n Case \"-l\" optList=True\n Case \"--list\" optList=True\n Case \"-f\" optForce=True\n Case \"--force\" optForce=True\n Case \"-s\" optSkip=True\n Case \"--skip-existing\" optSkip=True\n Case Else\n version = arg(idx)\n Exit For\n End Select\n Next\n\n If version = \"\" Then\n Dim ary\n ary=GetCurrentVersionNoError()\n If Not IsNull(ary) Then version=ary(0)\n End If\n\n Dim list\n Dim cur\n If optList Then\n For Each list In listEnv_i386\n Wscript.echo list(0)\n Next\n Exit Sub\n ElseIf version <> \"\" Then\n For Each list In listEnv_i386\n If list(0) = version Then\n cur=Array(list(0),strDirVers&\"\\\"&list(0),strDirCache&\"\\\"&list(2),list(1)&list(2),list(3))\n If optForce Then clear(cur)\n extract(cur)\n Exit Sub\n End If\n Next\n Wscript.echo \"rbenv-install: definition not found: \" & version\n Wscript.echo \"\"\n Wscript.echo \"See all available versions with `rbenv install --list'.\"\n Else\n ShowHelp\n End If\nEnd Sub\n\nmain(WScript.Arguments)\n","avg_line_length":70.509202454,"max_line_length":167,"alphanum_fraction":0.6302967023} {"size":1662,"ext":"vb","lang":"Visual Basic","max_stars_count":1.0,"content":"\ufeff'------------------------------------------------------------------------------\r\n' \r\n' Este c\u00f3digo fue generado por una herramienta.\r\n' Versi\u00f3n de runtime:4.0.30319.42000\r\n'\r\n' Los cambios en este archivo podr\u00edan causar un comportamiento incorrecto y se perder\u00e1n si\r\n' se vuelve a generar el c\u00f3digo.\r\n' <\/auto-generated>\r\n'------------------------------------------------------------------------------\r\n\r\nOption Strict Off\r\nOption Explicit On\r\n\r\n \r\n\r\n","avg_line_length":63.9230769231,"max_line_length":112,"alphanum_fraction":0.7322503008} {"size":1126,"ext":"vb","lang":"Visual Basic","max_stars_count":null,"content":"\ufeffImports System\nImports System.Reflection\nImports System.Runtime.InteropServices\n\n' General Information about an assembly is controlled through the following\n' set of attributes. Change these attribute values to modify the information\n' associated with an assembly.\n\n' Review the values of the assembly attributes\n\n\n\n\n\n\n\n\n\n' The following GUID is for the ID of the typelib if this project is exposed to COM\n\n\n' Version information for an assembly consists of the following four values:\n'\n' Major Version\n' Minor Version\n' Build Number\n' Revision\n'\n' You can specify all the values or you can default the Build and Revision Numbers\n' by using the '*' as shown below:\n' \n\n\n\n","avg_line_length":32.1714285714,"max_line_length":83,"alphanum_fraction":0.7548845471} {"size":32,"ext":"vbs","lang":"Visual Basic","max_stars_count":4.0,"content":"Import(\"\/..\/..\/tacklelib.vbs\")\r\n","avg_line_length":16.0,"max_line_length":31,"alphanum_fraction":0.5625} {"size":6791,"ext":"vb","lang":"Visual Basic","max_stars_count":57.0,"content":"\ufeffImports Windows.Devices.Input\n\nPublic NotInheritable Class MainPage\n Inherits Page\n\n Dim Pointers As New Dictionary(Of UInteger, Point)\n Dim CurrentReleaseStarted As DateTime?\n Dim CurrentPlayStarted As DateTime?\n Dim TickWatch As New Stopwatch\n Dim isPageOpen As Boolean = False\n\n WithEvents App As App = App.Current\n Public ReadOnly Property Dat As GameData\n Get\n Return App.Dat\n End Get\n End Property\n\n Protected Overrides Async Sub OnNavigatedTo(e As NavigationEventArgs)\n Try\n isPageOpen = True\n UpdateDashboard()\n TickWatch.Start()\n While isPageOpen\n Try\n Dim t = Task.Delay(15)\n If CurrentPlayStarted IsNot Nothing Then App.Tick(TickWatch.Elapsed) : TickWatch.Reset() : TickWatch.Start()\n If CurrentPlayStarted IsNot Nothing AndAlso CurrentReleaseStarted IsNot Nothing AndAlso (DateTime.Now - CurrentReleaseStarted.Value).TotalMilliseconds > 50 Then StopPlay()\n Await t.Log(\"Task.Delay\", 15)\n Catch ex As Exception\n App.ReportErrorAsync(\"Loop\", ex).FireAndForget\n End Try\n End While\n Catch ex As Exception\n App.ReportErrorAsync(\"OnNavigatedTo\", ex).FireAndForget()\n End Try\n End Sub\n\n Protected Overrides Sub OnNavigatedFrom(e As NavigationEventArgs)\n Try\n isPageOpen = False\n Catch ex As Exception\n App.ReportErrorAsync(\"OnNavigatedFrom\", ex).FireAndForget()\n End Try\n End Sub\n\n Sub OnDatChanged() Handles App.DatChanged\n Try\n playArea1.Content = Nothing\n If Dat IsNot Nothing Then playArea1.Content = Dat.Canvas\n OnResize(Nothing, Nothing)\n UpdateDashboard()\n Catch ex As Exception\n App.ReportErrorAsync(\"OnDatChanged\", ex).FireAndForget()\n End Try\n End Sub\n\n Sub OnResize(sender As Object, e As SizeChangedEventArgs) Handles Me.SizeChanged\n Try\n Dim w = CInt(ActualWidth), h = CInt(ActualHeight)\n If h > w * 5 \\ 3 Then h = w * 5 \\ 3 Else w = h * 3 \\ 5\n If Dat IsNot Nothing Then GameLogic.Resize(Dat, w, h)\n grid1.Width = w : grid1.Height = h\n paused2.Width = w\n Catch ex As Exception\n App.ReportErrorAsync(\"OnResize\", ex).FireAndForget()\n End Try\n End Sub\n\n Sub StartPlay()\n If CurrentPlayStarted Is Nothing Then CurrentPlayStarted = DateTime.Now\n CurrentReleaseStarted = Nothing\n UpdateDashboard()\n TickWatch.Start()\n End Sub\n\n Sub StopPlay()\n TickWatch.Stop()\n If CurrentPlayStarted IsNot Nothing Then App.HighScores.TimePlayed += DateTime.Now - CurrentPlayStarted.Value\n CurrentPlayStarted = Nothing\n UpdateDashboard()\n End Sub\n\n Protected Overrides Sub OnPointerPressed(e As PointerRoutedEventArgs)\n Try\n e.Handled = True\n CurrentReleaseStarted = Nothing\n Pointers(e.Pointer.PointerId) = PointerToPoint(e)\n If CurrentPlayStarted Is Nothing Then StartPlay()\n Catch ex As Exception\n App.ReportErrorAsync(\"OnPointerPressed\", ex).FireAndForget()\n End Try\n End Sub\n\n Function PointerToPoint(e As PointerRoutedEventArgs) As Point\n Dim pt = e.GetCurrentPoint(grid1).Position\n Dim finger = 40.0\n Dim info = DisplayInformation.GetForCurrentView()\n If info.RawDpiX > 0 Then finger = 0.3 * info.RawDpiX \/ info.RawPixelsPerViewPixel\n pt.Y -= finger\n Return pt\n End Function\n\n Protected Overrides Sub OnPointerMoved(e As PointerRoutedEventArgs)\n Try\n e.Handled = True\n If Pointers.ContainsKey(e.Pointer.PointerId) Then Pointers(e.Pointer.PointerId) = PointerToPoint(e)\n If Dat IsNot Nothing Then GameLogic.HandlePointers(Dat, Pointers)\n Catch ex As Exception\n App.ReportErrorAsync(\"OnPointerMoved\", ex).FireAndForget()\n End Try\n End Sub\n\n Protected Overrides Sub OnPointerReleased(e As PointerRoutedEventArgs)\n Try\n e.Handled = True\n If Pointers.ContainsKey(e.Pointer.PointerId) Then Pointers.Remove(e.Pointer.PointerId)\n If Pointers.Count = 0 Then CurrentReleaseStarted = DateTime.Now\n If Dat IsNot Nothing Then GameLogic.HandlePointers(Dat, Pointers)\n Catch ex As Exception\n App.ReportErrorAsync(\"OnPointerReleased\", ex).FireAndForget()\n End Try\n End Sub\n\n Sub UpdateDashboard()\n buyGuidanceSystem.Visibility = If(App.HasGuidanceSystem, Visibility.Collapsed, Visibility.Visible)\n buyApp.Visibility = If(App.IsTrial, Visibility.Visible, Visibility.Collapsed)\n '\n Dim bricks = If(App.HighScores.BricksDestroyed < 10000, CStr(App.HighScores.BricksDestroyed), App.HighScores.BricksDestroyed.ToString(\"#,##0\").Replace(\",\", \" \"))\n scoreBricks.Text = bricks & \" bricks\"\n scoreGames.Text = CStr(App.HighScores.GamesWon) & \" games\"\n Dim hours = App.HighScores.TimePlayed.Days * 24 + App.HighScores.TimePlayed.Hours\n Dim time = If(hours > 0, hours & \"h\", \"\") & App.HighScores.TimePlayed.Minutes & \"m\" & App.HighScores.TimePlayed.Seconds & \"s\"\n scoreTime.Text = time & \" played\"\n '\n paused1.Visibility = If(CurrentPlayStarted Is Nothing, Visibility.Visible, Visibility.Collapsed)\n paused2.Visibility = paused1.Visibility\n If paused1.Visibility = Visibility.Visible Then\n StatusBar.GetForCurrentView.HideAsync().FireAndForget()\n Else\n StatusBar.GetForCurrentView.ShowAsync().FireAndForget()\n End If\n loading1.Visibility = If(Dat Is Nothing AndAlso App.isStartingLevel, Visibility.Visible, Visibility.Collapsed)\n End Sub\n\n Private Async Sub buyGuidanceSystem_Click(sender As Object, e As RoutedEventArgs) Handles buyGuidanceSystem.Click\n Try\n Await App.PurchaseGuidanceSystemAsync().Log(\"PurchaseGuidanceSystemAsync\")\n UpdateDashboard()\n Catch ex As Exception\n App.ReportErrorAsync(\"buyGuidanceSystem_Click\", ex).FireAndForget()\n End Try\n End Sub\n\n Private Async Sub buyApp_Click(sender As Object, e As RoutedEventArgs) Handles buyApp.Click\n Try\n Await App.PurchaseAppAsync().Log(\"PurchaseAppAsync\")\n UpdateDashboard()\n Catch ex As Exception\n App.ReportErrorAsync(\"buyApp_Click\", ex).FireAndForget()\n End Try\n End Sub\n\n Private Sub paused1_PointerMoved(sender As Object, e As PointerRoutedEventArgs) Handles paused1.PointerMoved\n e.Handled = True\n End Sub\nEnd Class\n","avg_line_length":40.4226190476,"max_line_length":191,"alphanum_fraction":0.6538065086} {"size":16740,"ext":"vb","lang":"Visual Basic","max_stars_count":6.0,"content":"\ufeff' Copyright (c) Microsoft Open Technologies, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.\n\nImports System.Collections.Immutable\nImports Microsoft.CodeAnalysis.Text\nImports Microsoft.CodeAnalysis.VisualBasic.Symbols\nImports Microsoft.CodeAnalysis.VisualBasic.Syntax\n\nNamespace Microsoft.CodeAnalysis.VisualBasic.Symbols\n\n ''' \n ''' Base (simplified) class for synthesized parameter symbols of methods that have been synthesized. E.g. the parameters of delegate methods\n ''' <\/summary>\n Friend Class SynthesizedParameterSimpleSymbol\n Inherits ParameterSymbol\n\n Protected ReadOnly _container As MethodSymbol\n Protected ReadOnly _type As TypeSymbol\n Protected ReadOnly _ordinal As Integer\n Protected ReadOnly _name As String\n\n ''' \n ''' Initializes a new instance of the class.\n ''' <\/summary>\n ''' The containing symbol<\/param>\n ''' The type of this parameter<\/param>\n ''' The ordinal number of this parameter<\/param>\n ''' The name of this parameter<\/param>\n Public Sub New(container As MethodSymbol, type As TypeSymbol, ordinal As Integer, name As String)\n Me._container = container\n Me._type = type\n Me._ordinal = ordinal\n Me._name = name\n End Sub\n\n ''' \n ''' Gets the containing symbol.\n ''' <\/summary>\n Public NotOverridable Overrides ReadOnly Property ContainingSymbol As Symbol\n Get\n Return Me._container\n End Get\n End Property\n\n ''' \n ''' The list of custom modifiers, if any, associated with the parameter. Evaluate this property only if IsModified is true.\n ''' <\/summary>\n Public Overrides ReadOnly Property CustomModifiers As ImmutableArray(Of CustomModifier)\n Get\n Return ImmutableArray(Of CustomModifier).Empty\n End Get\n End Property\n\n ''' \n ''' A compile time constant value that should be supplied as the corresponding argument value by callers that do not explicitly specify an argument value for this parameter.\n ''' <\/summary>\n Friend Overrides ReadOnly Property ExplicitDefaultConstantValue(inProgress As SymbolsInProgress(Of ParameterSymbol)) As ConstantValue\n Get\n Return Nothing\n End Get\n End Property\n\n ''' \n ''' True if the parameter has a default value that should be supplied as the argument value by a caller for which the argument value has not been explicitly specified.\n ''' <\/summary>\n Public Overrides ReadOnly Property HasExplicitDefaultValue As Boolean\n Get\n Return False\n End Get\n End Property\n\n ''' \n ''' Gets a value indicating whether this instance is by ref.\n ''' <\/summary>\n ''' \n ''' true<\/c> if this instance is by ref; otherwise, false<\/c>.\n ''' <\/value>\n Public Overrides ReadOnly Property IsByRef As Boolean\n Get\n Return False\n End Get\n End Property\n\n Friend Overrides ReadOnly Property IsMetadataIn As Boolean\n Get\n Return False\n End Get\n End Property\n\n Friend Overrides ReadOnly Property IsMetadataOut As Boolean\n Get\n Return False\n End Get\n End Property\n\n Friend Shared Function IsMarshalAsAttributeApplicable(propertySetter As MethodSymbol) As Boolean\n Debug.Assert(propertySetter.MethodKind = MethodKind.PropertySet)\n\n Return propertySetter.ContainingType.IsInterface\n End Function\n\n Friend Overrides ReadOnly Property MarshallingInformation As MarshalPseudoCustomAttributeData\n Get\n ' Dev11 uses marshalling data of a return type of the containing method for the Value parameter \n ' of an interface property setter.\n Dim method = DirectCast(Me.ContainingSymbol, MethodSymbol)\n If method.MethodKind = MethodKind.PropertySet AndAlso\n IsMarshalAsAttributeApplicable(method) Then\n\n Return DirectCast(method.AssociatedSymbol, SourcePropertySymbol).ReturnTypeMarshallingInformation\n End If\n\n Return Nothing\n End Get\n End Property\n\n Friend Overrides ReadOnly Property IsExplicitByRef As Boolean\n Get\n Return IsByRef\n End Get\n End Property\n\n Friend Overrides ReadOnly Property HasOptionCompare As Boolean\n Get\n Return False\n End Get\n End Property\n\n Friend Overrides ReadOnly Property IsIDispatchConstant As Boolean\n Get\n Return False\n End Get\n End Property\n\n Friend Overrides ReadOnly Property IsIUnknownConstant As Boolean\n Get\n Return False\n End Get\n End Property\n\n Friend Overrides ReadOnly Property IsCallerLineNumber As Boolean\n Get\n Return False\n End Get\n End Property\n\n Friend Overrides ReadOnly Property IsCallerMemberName As Boolean\n Get\n Return False\n End Get\n End Property\n\n Friend Overrides ReadOnly Property IsCallerFilePath As Boolean\n Get\n Return False\n End Get\n End Property\n\n ''' \n ''' True if the argument value must be included in the marshalled arguments passed to a remote callee only if it is different from the default value (if there is one).\n ''' <\/summary>\n Public Overrides ReadOnly Property IsOptional As Boolean\n Get\n Return False\n End Get\n End Property\n\n ''' \n ''' Gets a value indicating whether this instance is param array.\n ''' <\/summary>\n ''' \n ''' true<\/c> if this instance is param array; otherwise, false<\/c>.\n ''' <\/value>\n Public Overrides ReadOnly Property IsParamArray As Boolean\n Get\n Return False\n End Get\n End Property\n\n ''' \n ''' Gets a value indicating whether the symbol was generated by the compiler\n ''' rather than declared explicitly.\n ''' <\/summary>\n Public Overrides ReadOnly Property IsImplicitlyDeclared As Boolean\n Get\n Return True\n End Get\n End Property\n\n ''' \n ''' A potentially empty collection of locations that correspond to this instance.\n ''' <\/summary>\n Public Overrides ReadOnly Property Locations As ImmutableArray(Of Location)\n Get\n Return ImmutableArray(Of Location).Empty\n End Get\n End Property\n\n Public Overrides ReadOnly Property DeclaringSyntaxReferences As ImmutableArray(Of SyntaxReference)\n Get\n Return ImmutableArray(Of SyntaxReference).Empty\n End Get\n End Property\n\n ''' \n ''' Gets the ordinal.\n ''' <\/summary>\n Public NotOverridable Overrides ReadOnly Property Ordinal As Integer\n Get\n Return _ordinal\n End Get\n End Property\n\n ''' \n ''' Gets the type.\n ''' <\/summary>\n Public NotOverridable Overrides ReadOnly Property Type As TypeSymbol\n Get\n Return _type\n End Get\n End Property\n\n ''' \n ''' Gets the name.\n ''' <\/summary>\n Public NotOverridable Overrides ReadOnly Property Name As String\n Get\n Return _name\n End Get\n End Property\n\n Friend Overrides ReadOnly Property HasByRefBeforeCustomModifiers As Boolean\n Get\n Return False\n End Get\n End Property\n End Class\n\n ''' \n ''' Base class for synthesized parameter symbols of methods that have been synthesized. E.g. the parameters of delegate methods\n ''' <\/summary>\n Friend Class SynthesizedParameterSymbol\n Inherits SynthesizedParameterSimpleSymbol\n\n Private ReadOnly _isByRef As Boolean\n Private ReadOnly _isOptional As Boolean\n Private ReadOnly _defaultValue As ConstantValue\n\n ''' \n ''' Initializes a new instance of the class.\n ''' <\/summary>\n ''' The containing symbol<\/param>\n ''' The type of this parameter<\/param>\n ''' The ordinal number of this parameter<\/param>\n ''' Whether the parameter is ByRef or not<\/param>\n ''' The name of this parameter<\/param>\n Public Sub New(container As MethodSymbol, type As TypeSymbol, ordinal As Integer, isByRef As Boolean, Optional name As String = \"\")\n Me.New(container, type, ordinal, isByRef, name, False, Nothing)\n End Sub\n\n ''' \n ''' Initializes a new instance of the class.\n ''' <\/summary>\n ''' The containing symbol<\/param>\n ''' The type of this parameter<\/param>\n ''' The ordinal number of this parameter<\/param>\n ''' Whether the parameter is ByRef or not<\/param>\n ''' The name of this parameter<\/param>\n Public Sub New(container As MethodSymbol, type As TypeSymbol, ordinal As Integer, isByRef As Boolean, name As String, isOptional As Boolean, defaultValue As ConstantValue)\n MyBase.New(container, type, ordinal, name)\n\n Me._isByRef = isByRef\n Me._isOptional = isOptional\n Me._defaultValue = defaultValue\n End Sub\n\n Friend Shared Function CreateSetAccessorValueParameter(setter As MethodSymbol, propertySymbol As PropertySymbol, parameterName As String) As ParameterSymbol\n Dim valueParameterType As TypeSymbol = propertySymbol.Type\n Dim valueParemeterCustomModifiers = propertySymbol.TypeCustomModifiers\n\n Dim overriddenMethod = setter.OverriddenMethod\n If overriddenMethod IsNot Nothing Then\n Dim overriddenParameter = overriddenMethod.Parameters(propertySymbol.ParameterCount)\n\n If overriddenParameter.Type.IsSameTypeIgnoringCustomModifiers(valueParameterType) Then\n valueParameterType = overriddenParameter.Type\n valueParemeterCustomModifiers = overriddenParameter.CustomModifiers\n End If\n End If\n\n If valueParemeterCustomModifiers.IsDefaultOrEmpty Then\n Return New SynthesizedParameterSimpleSymbol(setter,\n valueParameterType,\n propertySymbol.ParameterCount,\n parameterName)\n End If\n\n Return New SynthesizedParameterSymbolWithCustomModifiers(setter,\n valueParameterType,\n propertySymbol.ParameterCount,\n False,\n parameterName,\n valueParemeterCustomModifiers,\n False)\n End Function\n\n ''' \n ''' Gets a value indicating whether this instance is by ref.\n ''' <\/summary>\n ''' \n ''' true<\/c> if this instance is by ref; otherwise, false<\/c>.\n ''' <\/value>\n Public NotOverridable Overrides ReadOnly Property IsByRef As Boolean\n Get\n Return _isByRef\n End Get\n End Property\n\n ''' \n ''' True if the argument value must be included in the marshalled arguments passed to a remote callee only if it is different from the default value (if there is one).\n ''' <\/summary>\n Public NotOverridable Overrides ReadOnly Property IsOptional As Boolean\n Get\n Return _isOptional\n End Get\n End Property\n\n ''' \n ''' A compile time constant value that should be supplied as the corresponding argument value by callers that do not explicitly specify an argument value for this parameter.\n ''' <\/summary>\n Friend NotOverridable Overrides ReadOnly Property ExplicitDefaultConstantValue(inProgress As SymbolsInProgress(Of ParameterSymbol)) As ConstantValue\n Get\n Return _defaultValue\n End Get\n End Property\n\n ''' \n ''' True if the parameter has a default value that should be supplied as the argument value by a caller for which the argument value has not been explicitly specified.\n ''' <\/summary>\n Public NotOverridable Overrides ReadOnly Property HasExplicitDefaultValue As Boolean\n Get\n Return _defaultValue IsNot Nothing\n End Get\n End Property\n\n End Class\n\n Friend Class SynthesizedParameterSymbolWithCustomModifiers\n Inherits SynthesizedParameterSymbol\n\n Private ReadOnly _customModifiers As ImmutableArray(Of CustomModifier)\n Private ReadOnly _hasByRefBeforeCustomModifiers As Boolean\n\n ''' \n ''' Initializes a new instance of the class.\n ''' <\/summary>\n ''' The containing symbol<\/param>\n ''' The type of this parameter<\/param>\n ''' The ordinal number of this parameter<\/param>\n ''' Whether the parameter is ByRef or not<\/param>\n ''' The name of this parameter<\/param>\n ''' The custom modifiers of this parameter<\/param>\n Public Sub New(container As MethodSymbol, type As TypeSymbol, ordinal As Integer, isByRef As Boolean, name As String,\n customModifiers As ImmutableArray(Of CustomModifier), hasByRefBeforeCustomModifiers As Boolean)\n MyBase.New(container, type, ordinal, isByRef, name, isOptional:=False, defaultValue:=Nothing)\n\n Me._customModifiers = customModifiers.NullToEmpty()\n Me._hasByRefBeforeCustomModifiers = hasByRefBeforeCustomModifiers\n End Sub\n\n ''' \n ''' The list of custom modifiers, if any, associated with the parameter. Evaluate this property only if IsModified is true.\n ''' <\/summary>\n Public NotOverridable Overrides ReadOnly Property CustomModifiers As ImmutableArray(Of CustomModifier)\n Get\n Return Me._customModifiers\n End Get\n End Property\n\n Friend Overrides ReadOnly Property HasByRefBeforeCustomModifiers As Boolean\n Get\n Return Me._hasByRefBeforeCustomModifiers\n End Get\n End Property\n End Class\n\n ''' \n ''' Extends SynthesizedParameterSymbol to also accept a location\n ''' <\/summary>\n Friend NotInheritable Class SynthesizedParameterWithLocationSymbol\n Inherits SynthesizedParameterSymbol\n\n Private ReadOnly _locations As ImmutableArray(Of Location)\n\n Public Sub New(container As MethodSymbol, type As TypeSymbol, ordinal As Integer, isByRef As Boolean, name As String, location As Location)\n MyBase.New(container, type, ordinal, isByRef, name)\n Me._locations = ImmutableArray.Create(Of location)(location)\n End Sub\n\n Public Overrides ReadOnly Property Locations As ImmutableArray(Of Location)\n Get\n Return Me._locations\n End Get\n End Property\n\n End Class\n\nEnd Namespace\n","avg_line_length":41.0294117647,"max_line_length":183,"alphanum_fraction":0.6152927121} {"size":1648,"ext":"vb","lang":"Visual Basic","max_stars_count":421.0,"content":"\ufeffOption Explicit On\r\nOption Strict On\r\nImports System.Data.OleDb\r\nImports System.Data\r\n\r\nModule Module1\r\n\r\n Sub Main()\r\n Dim connectionString As String = GetConnectionString()\r\n Dim queryString As String = _\r\n \"SELECT CompanyName FROM dbo.Shippers;\"\r\n Dim dataSet As DataSet = CreateCommandAndUpdate( _\r\n connectionString, queryString)\r\n Console.ReadLine()\r\n End Sub\r\n\r\n ' \r\n Public Function CreateCommandAndUpdate( _\r\n ByVal connectionString As String, _\r\n ByVal queryString As String) As DataSet\r\n\r\n Dim dataSet As New DataSet()\r\n\r\n Using connection As New OleDbConnection(connectionString)\r\n connection.Open()\r\n Dim adapter As New OleDbDataAdapter()\r\n\r\n adapter.SelectCommand = New OleDbCommand( _\r\n queryString, connection)\r\n\r\n Dim builder As OleDbCommandBuilder = _\r\n New OleDbCommandBuilder(adapter)\r\n\r\n adapter.Fill(dataSet)\r\n\r\n ' Code to modify the data in the DataSet here. \r\n\r\n ' Without the OleDbCommandBuilder this line would fail.\r\n builder.GetUpdateCommand()\r\n adapter.Update(dataSet)\r\n End Using\r\n Return dataSet\r\n End Function\r\n ' <\/Snippet1>\r\n\r\n Private Function GetConnectionString() As String\r\n ' To avoid storing the connection string in your code, \r\n ' you can retrieve it from a configuration file.\r\n Return \"Provider=sqloledb;Data Source=(local);Initial Catalog=Northwind;\" _\r\n & \"Integrated Security=SSPI;\"\r\n End Function\r\n\r\nEnd Module\r\n","avg_line_length":30.5185185185,"max_line_length":84,"alphanum_fraction":0.6262135922} {"size":67,"ext":"bas","lang":"Visual Basic","max_stars_count":null,"content":"gettimea$:a=val(mid$(a$,4,2)+right$(a$,2)):fori=0toa:a=rnd(1):nexti","avg_line_length":67.0,"max_line_length":67,"alphanum_fraction":0.6417910448} {"size":9828,"ext":"vb","lang":"Visual Basic","max_stars_count":null,"content":"\ufeff' Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.\n\nImports Microsoft.CodeAnalysis.CodeStyle\nImports Microsoft.CodeAnalysis.Options\nImports Microsoft.CodeAnalysis.VisualBasic.CodeStyle\n\nNamespace Microsoft.CodeAnalysis.Editor.VisualBasic.UnitTests.RemoveUnusedParametersAndValues\n Partial Public Class RemoveUnusedValueAssignmentTests\n Inherits RemoveUnusedValuesTestsBase\n\n Protected Overrides ReadOnly Property PreferNone As IDictionary(Of OptionKey, Object)\n Get\n Return [Option](VisualBasicCodeStyleOptions.UnusedValueAssignment,\n New CodeStyleOption(Of UnusedValuePreference)(UnusedValuePreference.UnusedLocalVariable, NotificationOption.None))\n End Get\n End Property\n\n Protected Overrides ReadOnly Property PreferDiscard As IDictionary(Of OptionKey, Object)\n Get\n Return [Option](VisualBasicCodeStyleOptions.UnusedValueAssignment,\n New CodeStyleOption(Of UnusedValuePreference)(UnusedValuePreference.DiscardVariable, NotificationOption.Suggestion))\n End Get\n End Property\n\n Protected Overrides ReadOnly Property PreferUnusedLocal As IDictionary(Of OptionKey, Object)\n Get\n Return [Option](VisualBasicCodeStyleOptions.UnusedValueAssignment,\n New CodeStyleOption(Of UnusedValuePreference)(UnusedValuePreference.UnusedLocalVariable, NotificationOption.Suggestion))\n End Get\n End Property\n\n \n Public Async Function TestPreferNone() As Task\n Await TestMissingInRegularAndScriptAsync(\n$\"Class C\n Private Function M() As Integer\n Dim [|x|] = 1\n x = 2\n Return x\n End Function\nEnd Class\", options:=PreferNone)\n End Function\n\n \n Public Async Function TestPreferDiscard() As Task\n Await TestInRegularAndScriptAsync(\n$\"Class C\n Private Function M() As Integer\n Dim [|x|] = 1\n x = 2\n Return x\n End Function\nEnd Class\",\n$\"Class C\n Private Function M() As Integer\n Dim x As Integer = 2\n Return x\n End Function\nEnd Class\", options:=PreferDiscard)\n End Function\n\n \n Public Async Function TestPreferUnusedLocal() As Task\n Await TestInRegularAndScriptAsync(\n$\"Class C\n Private Function M() As Integer\n Dim [|x|] = 1\n x = 2\n Return x\n End Function\nEnd Class\",\n$\"Class C\n Private Function M() As Integer\n Dim x As Integer = 2\n Return x\n End Function\nEnd Class\", options:=PreferUnusedLocal)\n End Function\n\n \n Public Async Function Initialization_ConstantValue() As Task\n Await TestInRegularAndScriptAsync(\n$\"Class C\n Private Function M() As Integer\n Dim [|x|] As Integer = 1\n x = 2\n Return x\n End Function\nEnd Class\",\n$\"Class C\n Private Function M() As Integer\n Dim x As Integer = 2\n Return x\n End Function\nEnd Class\")\n End Function\n\n \n Public Async Function Initialization_ConstantValue_UnusedLocal() As Task\n Await TestInRegularAndScriptAsync(\n$\"Class C\n Private Function M() As Integer\n Dim [|x|] As Integer = 1\n x = 2\n Return 0\n End Function\nEnd Class\",\n$\"Class C\n Private Function M() As Integer\n Dim x As Integer = 2\n Return 0\n End Function\nEnd Class\")\n End Function\n\n \n Public Async Function Assignment_ConstantValue() As Task\n Await TestInRegularAndScriptAsync(\n$\"Class C\n Private Function M() As Integer\n Dim x As Integer\n [|x|] = 1\n x = 2\n Return x\n End Function\nEnd Class\",\n$\"Class C\n Private Function M() As Integer\n Dim x As Integer\n x = 2\n Return x\n End Function\nEnd Class\")\n End Function\n\n \n Public Async Function Initialization_NonConstantValue() As Task\n Await TestInRegularAndScriptAsync(\n$\"Class C\n Private Function M() As Integer\n Dim [|x|] = M2()\n x = 2\n Return x\n End Function\n\n Private Function M2() As Integer\n Return 0\n End Function\nEnd Class\",\n$\"Class C\n Private Function M() As Integer\n Dim unused = M2()\n Dim x As Integer = 2\n Return x\n End Function\n\n Private Function M2() As Integer\n Return 0\n End Function\nEnd Class\")\n End Function\n\n \n Public Async Function Initialization_NonConstantValue_UnusedLocal() As Task\n Await TestMissingInRegularAndScriptAsync(\n$\"Class C\n Private Function M() As Integer\n Dim [|x|] As Integer = M2()\n x = 2\n Return 0\n End Function\n\n Private Function M2() As Integer\n Return 0\n End Function\nEnd Class\")\n End Function\n\n \n Public Async Function Assignment_NonConstantValue() As Task\n Await TestInRegularAndScriptAsync(\n$\"Class C\n Private Function M() As Integer\n Dim x As Integer\n [|x|] = M2()\n x = 2\n Return x\n End Function\n\n Private Function M2() As Integer\n Return 0\n End Function\nEnd Class\",\n$\"Class C\n Private Function M() As Integer\n Dim x As Integer\n Dim unused As Integer = M2()\n x = 2\n Return x\n End Function\n\n Private Function M2() As Integer\n Return 0\n End Function\nEnd Class\")\n End Function\n\n \n Public Async Function Assignment_NonConstantValue_UnusedLocal() As Task\n Await TestMissingInRegularAndScriptAsync(\n$\"Class C\n Private Function M() As Integer\n Dim x As Integer\n [|x|] = M2()\n x = 2\n Return 0\n End Function\n\n Private Function M2() As Integer\n Return 0\n End Function\nEnd Class\")\n End Function\n\n \n Public Async Function UseInLambda() As Task\n Await TestMissingInRegularAndScriptAsync(\n$\"Imports System\n\nClass C\n Private Sub M(p As Object)\n Dim lambda As Action = Sub()\n Dim x = p\n End Sub\n\n [|p|] = Nothing\n lambda()\n End Sub\nEnd Class\")\n End Function\n\n \n Public Async Function CatchClause_ExceptionVariable_01() As Task\n Await TestMissingInRegularAndScriptAsync(\n$\"Imports System\n\nClass C\n Private Sub M(p As Object)\n Try\n Catch [|ex|] As Exception\n End Try\n End Sub\nEnd Class\")\n End Function\n\n \n Public Async Function CatchClause_ExceptionVariable_02() As Task\n Await TestMissingInRegularAndScriptAsync(\n$\"Imports System\n\nClass C\n Public ReadOnly Property P As Boolean\n Get\n Try\n Return True\n Catch [|ex|] As Exception\n Return False\n End Try\n Return 0\n End Get\n End Property\nEnd Class\")\n End Function\n\n \n Public Async Function CatchClause_ExceptionVariable_03() As Task\n Await TestInRegularAndScriptAsync(\n$\"Imports System\n\nClass C\n Private Sub M(p As Object)\n Try\n Catch [|ex|] As Exception\n ex = Nothing\n Dim x = ex\n End Try\n End Sub\nEnd Class\",\n$\"Imports System\n\nClass C\n Private Sub M(p As Object)\n Try\n Catch unused As Exception\n Dim ex As Exception = Nothing\n\n Dim x = ex\n End Try\n End Sub\nEnd Class\")\n End Function\n\n \n Public Async Function ForToLoopStatement_01() As Task\n Await TestMissingInRegularAndScriptAsync(\n$\"Imports System\n\nClass C\n Private Sub M()\n For [|i|] As Integer = 0 To 10\n Dim x = i\n Next\n End Sub\nEnd Class\")\n End Function\n\n \n Public Async Function ForToLoopStatement_02() As Task\n Await TestMissingInRegularAndScriptAsync(\n$\"Imports System\n\nClass C\n Private Sub M()\n For [|i|] As Integer = 0 To 10\n i = 1\n Next\n End Sub\nEnd Class\")\n End Function\n\n \n Public Async Function ForToLoopStatement_03() As Task\n Await TestMissingInRegularAndScriptAsync(\n$\"Imports System\n\nClass C\n Private Sub M()\n For i As Integer = 0 To 10\n [|i|] = 1\n Next\n End Sub\nEnd Class\")\n End Function\n End Class\nEnd Namespace\n","avg_line_length":28.4046242775,"max_line_length":160,"alphanum_fraction":0.6396011396} {"size":3826,"ext":"vb","lang":"Visual Basic","max_stars_count":2.0,"content":"\ufeff'*********************************************************\n'\n' Copyright (c) Microsoft. All rights reserved.\n' THIS CODE IS PROVIDED *AS IS* WITHOUT WARRANTY OF\n' ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY\n' IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR\n' PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.\n'\n'*********************************************************\n\nImports SDKTemplate\n\nImports System\nImports System.IO\nImports Windows.Storage\nImports Windows.Storage.Streams\nImports Windows.UI.Xaml\nImports Windows.UI.Xaml.Controls\nImports Windows.UI.Xaml.Navigation\n\n''' \n''' An empty page that can be used on its own or navigated to within a Frame.\n''' <\/summary>\nPartial Public NotInheritable Class Scenario4\n Inherits SDKTemplate.Common.LayoutAwarePage\n Private rootPage As MainPage = MainPage.Current\n\n Public Sub New()\n Me.InitializeComponent()\n AddHandler WriteToStreamButton.Click, AddressOf WriteToStreamButton_Click\n AddHandler ReadFromStreamButton.Click, AddressOf ReadFromStreamButton_Click\n End Sub\n\n Private Async Sub WriteToStreamButton_Click(sender As Object, e As RoutedEventArgs)\n Try\n rootPage.ResetScenarioOutput(OutputTextBlock)\n Dim file As StorageFile = rootPage.sampleFile\n If file IsNot Nothing Then\n Dim userContent As String = InputTextBox.Text\n If Not String.IsNullOrEmpty(userContent) Then\n Using transaction = CType(Await file.OpenTransactedWriteAsync, StorageStreamTransaction)\n Using dataWriter As New DataWriter(transaction.Stream)\n dataWriter.WriteString(userContent)\n transaction.Stream.Size = Await dataWriter.StoreAsync() ' reset stream size to override the file\n Await transaction.CommitAsync()\n OutputTextBlock.Text = \"The following text was written to '\" & file.Name & \"' using a stream:\" & Environment.NewLine & Environment.NewLine & userContent\n End Using\n End Using\n Else\n OutputTextBlock.Text = \"The text box is empty, please write something and then click 'Write' again.\"\n End If\n End If\n Catch ex As FileNotFoundException\n rootPage.NotifyUserFileNotExist()\n End Try\n End Sub\n\n Private Async Sub ReadFromStreamButton_Click(sender As Object, e As RoutedEventArgs)\n Try\n rootPage.ResetScenarioOutput(OutputTextBlock)\n Dim file As StorageFile = rootPage.sampleFile\n If file IsNot Nothing Then\n Using readStream As IRandomAccessStream = Await file.OpenAsync(FileAccessMode.Read)\n Using dataReader As New DataReader(readStream)\n Dim size As UInt64 = readStream.Size\n If size <= UInt32.MaxValue Then\n Dim numBytesLoaded As UInt32 = Await dataReader.LoadAsync(CType(size, UInt32))\n Dim fileContent As String = dataReader.ReadString(numBytesLoaded)\n OutputTextBlock.Text = \"The following text was read from '\" & file.Name & \"' using a stream:\" & Environment.NewLine & Environment.NewLine & fileContent\n Else\n OutputTextBlock.Text = \"File \" & file.Name & \" is too big for LoadAsync to load in a single chunk. Files larger than 4GB need to be broken into multiple chunks to be loaded by LoadAsync.\"\n End If\n End Using\n End Using\n End If\n Catch ex As FileNotFoundException\n rootPage.NotifyUserFileNotExist()\n End Try\n End Sub\n\nEnd Class\n","avg_line_length":46.6585365854,"max_line_length":215,"alphanum_fraction":0.6207527444} {"size":2034,"ext":"frm","lang":"Visual Basic","max_stars_count":null,"content":"TYPE=VIEW\nquery=select `sslver`.`THREAD_ID` AS `thread_id`,`sslver`.`VARIABLE_VALUE` AS `ssl_version`,`sslcip`.`VARIABLE_VALUE` AS `ssl_cipher`,`sslreuse`.`VARIABLE_VALUE` AS `ssl_sessions_reused` from ((`performance_schema`.`status_by_thread` `sslver` left join `performance_schema`.`status_by_thread` `sslcip` on(((`sslcip`.`THREAD_ID` = `sslver`.`THREAD_ID`) and (`sslcip`.`VARIABLE_NAME` = \\'Ssl_cipher\\')))) left join `performance_schema`.`status_by_thread` `sslreuse` on(((`sslreuse`.`THREAD_ID` = `sslver`.`THREAD_ID`) and (`sslreuse`.`VARIABLE_NAME` = \\'Ssl_sessions_reused\\')))) where (`sslver`.`VARIABLE_NAME` = \\'Ssl_version\\')\nmd5=85a4a938aeb0d850e448a6821ca91f12\nupdatable=0\nalgorithm=2\ndefiner_user=mysql.sys\ndefiner_host=localhost\nsuid=0\nwith_check_option=0\ntimestamp=2022-02-24 08:43:18\ncreate-version=1\nsource=SELECT sslver.thread_id, sslver.variable_value ssl_version, sslcip.variable_value ssl_cipher, sslreuse.variable_value ssl_sessions_reused FROM performance_schema.status_by_thread sslver LEFT JOIN performance_schema.status_by_thread sslcip ON (sslcip.thread_id=sslver.thread_id and sslcip.variable_name=\\'Ssl_cipher\\') LEFT JOIN performance_schema.status_by_thread sslreuse ON (sslreuse.thread_id=sslver.thread_id and sslreuse.variable_name=\\'Ssl_sessions_reused\\') WHERE sslver.variable_name=\\'Ssl_version\\'\nclient_cs_name=utf8\nconnection_cl_name=utf8_general_ci\nview_body_utf8=select `sslver`.`THREAD_ID` AS `thread_id`,`sslver`.`VARIABLE_VALUE` AS `ssl_version`,`sslcip`.`VARIABLE_VALUE` AS `ssl_cipher`,`sslreuse`.`VARIABLE_VALUE` AS `ssl_sessions_reused` from ((`performance_schema`.`status_by_thread` `sslver` left join `performance_schema`.`status_by_thread` `sslcip` on(((`sslcip`.`THREAD_ID` = `sslver`.`THREAD_ID`) and (`sslcip`.`VARIABLE_NAME` = \\'Ssl_cipher\\')))) left join `performance_schema`.`status_by_thread` `sslreuse` on(((`sslreuse`.`THREAD_ID` = `sslver`.`THREAD_ID`) and (`sslreuse`.`VARIABLE_NAME` = \\'Ssl_sessions_reused\\')))) where (`sslver`.`VARIABLE_NAME` = \\'Ssl_version\\')\n","avg_line_length":127.125,"max_line_length":637,"alphanum_fraction":0.785152409} {"size":2211,"ext":"vb","lang":"Visual Basic","max_stars_count":2.0,"content":"\ufeff' System.Diagnostics.ProcessModule.BaseAddress\n\n' The following program demonstrates the use of 'BaseAddress' property of \n' 'ProcessModule' class. It creates a notepad, gets the 'MainModule' and \n' all other modules of the process 'notepad.exe', displays 'BaseAddress'\n' for all the modules and the main module.\n\nImports System.Diagnostics\n\nClass MyProcessModuleClass\n Public Shared Sub Main()\n Try\n ' \n Using myProcess As New Process()\n ' Get the process start information of notepad.\n Dim myProcessStartInfo As New ProcessStartInfo(\"notepad.exe\")\n ' Assign 'StartInfo' of notepad to 'StartInfo' of 'myProcess' object.\n myProcess.StartInfo = myProcessStartInfo\n ' Create a notepad.\n myProcess.Start()\n System.Threading.Thread.Sleep(1000)\n Dim myProcessModule As ProcessModule\n ' Get all the modules associated with 'myProcess'.\n Dim myProcessModuleCollection As ProcessModuleCollection = myProcess.Modules\n Console.WriteLine(\"Base addresses of the modules associated \" +\n \"with 'notepad' are:\")\n ' Display the 'BaseAddress' of each of the modules.\n Dim i As Integer\n For i = 0 To myProcessModuleCollection.Count - 1\n myProcessModule = myProcessModuleCollection(i)\n Console.WriteLine(myProcessModule.ModuleName + \" : \" +\n myProcessModule.BaseAddress.ToString())\n Next i\n ' Get the main module associated with 'myProcess'.\n myProcessModule = myProcess.MainModule\n ' Display the 'BaseAddress' of the main module.\n Console.WriteLine(\"The process's main module's base address is: \" +\n myProcessModule.BaseAddress.ToString())\n myProcess.CloseMainWindow()\n End Using\n ' <\/Snippet1>\n Catch e As Exception\n Console.WriteLine($\"Exception : {e.Message}\")\n End Try\n End Sub\nEnd Class\n","avg_line_length":47.0425531915,"max_line_length":92,"alphanum_fraction":0.5906829489} {"size":1992,"ext":"vb","lang":"Visual Basic","max_stars_count":null,"content":"\ufeffPublic Class Form1\n\n Private Sub TextBox10_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs)\n\n End Sub\n\n Private Sub TextBox8_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox8.TextChanged\n\n End Sub\n\n Private Sub TextBox9_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs)\n End Sub\n\n Private Sub Label8_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Label8.Click\n\n End Sub\n\n Private Sub Label16_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Label16.Click, Label26.Click\n\n End Sub\n\n Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click\n Dim name As String\n name = CStr(TextBox1.Text)\n Label16.Text = name\n\n Dim addr As String\n addr = CStr(TextBox2.Text)\n Label17.Text = addr\n Dim ID As Integer\n ID = CInt(TextBox3.Text)\n Label18.Text = ID\n Dim bmnth As String\n bmnth = CStr(TextBox4.Text)\n Label19.Text = bmnth\n Dim duedt As String\n duedt = CStr(TextBox5.Text)\n Label20.Text = duedt\n Dim bdt As String\n bdt = CStr(TextBox6.Text)\n Label21.Text = bdt\n Dim punit, cunit, unit As Integer\n punit = CInt(TextBox7.Text)\n cunit = CInt(TextBox8.Text)\n unit = cunit - punit\n Label22.Text = punit\n Label23.Text = cunit\n Label27.Text = unit\n Dim amt As Integer\n If (unit < 100) Then\n amt = amt + unit * 1.2\n ElseIf (unit > 100 & unit < 300) Then\n amt = amt + 120 + (unit - 100) * 2.4\n ElseIf (unit > 300 & unit < 600) Then\n amt = amt + 500 + (amt * 0.35)\n\n\n End If\n If (amt < 600) Then\n MsgBox(\"The Ammount must be more than 600 Rupees\")\n Else\n Label26.Text = amt\n End If\n End Sub\nEnd Class\n","avg_line_length":30.1818181818,"max_line_length":126,"alphanum_fraction":0.6164658635} {"size":3509,"ext":"vb","lang":"Visual Basic","max_stars_count":2.0,"content":"\ufeff _\nPartial Class ShapeAnchor\n Inherits System.Windows.Forms.Form\n\n 'Form overrides dispose to clean up the component list.\n _\n Protected Overrides Sub Dispose(ByVal disposing As Boolean)\n Try\n If disposing AndAlso components IsNot Nothing Then\n components.Dispose()\n End If\n Finally\n MyBase.Dispose(disposing)\n End Try\n End Sub\n\n 'Required by the Windows Form Designer\n Private components As System.ComponentModel.IContainer\n\n 'NOTE: The following procedure is required by the Windows Form Designer\n 'It can be modified using the Windows Form Designer. \n 'Do not modify it using the code editor.\n _\n Private Sub InitializeComponent()\n Me.ShapeContainer1 = New Microsoft.VisualBasic.PowerPacks.ShapeContainer\n Me.RectangleShape1 = New Microsoft.VisualBasic.PowerPacks.RectangleShape\n Me.OvalShape1 = New Microsoft.VisualBasic.PowerPacks.OvalShape\n Me.OvalShape2 = New Microsoft.VisualBasic.PowerPacks.OvalShape\n Me.LineShape1 = New Microsoft.VisualBasic.PowerPacks.LineShape\n Me.SuspendLayout()\n '\n 'ShapeContainer1\n '\n Me.ShapeContainer1.Location = New System.Drawing.Point(0, 0)\n Me.ShapeContainer1.Margin = New System.Windows.Forms.Padding(0)\n Me.ShapeContainer1.Name = \"ShapeContainer1\"\n Me.ShapeContainer1.Shapes.AddRange(New Microsoft.VisualBasic.PowerPacks.Shape() {Me.LineShape1, Me.OvalShape2, Me.OvalShape1, Me.RectangleShape1})\n Me.ShapeContainer1.Size = New System.Drawing.Size(292, 266)\n Me.ShapeContainer1.TabIndex = 0\n Me.ShapeContainer1.TabStop = False\n '\n 'RectangleShape1\n '\n Me.RectangleShape1.Location = New System.Drawing.Point(27, 80)\n Me.RectangleShape1.Name = \"RectangleShape1\"\n Me.RectangleShape1.Size = New System.Drawing.Size(113, 56)\n '\n 'OvalShape1\n '\n Me.OvalShape1.Location = New System.Drawing.Point(65, 174)\n Me.OvalShape1.Name = \"OvalShape1\"\n Me.OvalShape1.Size = New System.Drawing.Size(194, 69)\n '\n 'OvalShape2\n '\n Me.OvalShape2.Location = New System.Drawing.Point(175, 34)\n Me.OvalShape2.Name = \"OvalShape2\"\n Me.OvalShape2.Size = New System.Drawing.Size(67, 55)\n '\n 'LineShape1\n '\n Me.LineShape1.Name = \"LineShape1\"\n Me.LineShape1.X1 = 54\n Me.LineShape1.X2 = 259\n Me.LineShape1.Y1 = 18\n Me.LineShape1.Y2 = 265\n '\n 'ShapeAnchor\n '\n Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)\n Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font\n Me.ClientSize = New System.Drawing.Size(292, 266)\n Me.Controls.Add(Me.ShapeContainer1)\n Me.Name = \"ShapeAnchor\"\n Me.Text = \"Form1\"\n Me.ResumeLayout(False)\n\n End Sub\n Friend WithEvents ShapeContainer1 As Microsoft.VisualBasic.PowerPacks.ShapeContainer\n Friend WithEvents RectangleShape1 As Microsoft.VisualBasic.PowerPacks.RectangleShape\n Friend WithEvents LineShape1 As Microsoft.VisualBasic.PowerPacks.LineShape\n Friend WithEvents OvalShape2 As Microsoft.VisualBasic.PowerPacks.OvalShape\n Friend WithEvents OvalShape1 As Microsoft.VisualBasic.PowerPacks.OvalShape\n\nEnd Class\n","avg_line_length":40.8023255814,"max_line_length":154,"alphanum_fraction":0.6842405244} {"size":189,"ext":"vb","lang":"Visual Basic","max_stars_count":10.0,"content":"\ufeffPublic Class TriggerPlayerSelectDialog\n Private Sub TriggerPlayerSelectDialog_Load(sender As Object, e As EventArgs) Handles MyBase.Load\n Lan.SetLangage(Me)\n End Sub\nEnd Class","avg_line_length":37.8,"max_line_length":100,"alphanum_fraction":0.7830687831} {"size":932,"ext":"vb","lang":"Visual Basic","max_stars_count":111.0,"content":"'Copyright 2019 Esri\n\n'Licensed under the Apache License, Version 2.0 (the \"License\");\n'you may not use this file except in compliance with the License.\n'You may obtain a copy of the License at\n\n' http:\/\/www.apache.org\/licenses\/LICENSE-2.0\n\n'Unless required by applicable law or agreed to in writing, software\n'distributed under the License is distributed on an \"AS IS\" BASIS,\n'WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n\n'See the License for the specific language governing permissions and\n'limitations under the License.\nOption Explicit On \n\n'IZoomExtension interface\nPublic Interface IZoomExtension\n Property ZoomFactor() As Double\nEnd Interface\n\nPublic Class myIZoomExtension\n Implements IZoomExtension\n\n Public Property ZoomFactor() As Double Implements IZoomExtension.ZoomFactor\n Get\n End Get\n Set(ByVal Value As Double)\n End Set\n End Property\nEnd Class","avg_line_length":30.064516129,"max_line_length":79,"alphanum_fraction":0.7628755365} {"size":3541,"ext":"vb","lang":"Visual Basic","max_stars_count":null,"content":"\ufeff' System.Web.Services.Description.HttpBinding.HttpBinding()\n' System.Web.Services.Description.HttpBinding.Namespace\n' System.Web.Services.Description.HttpAddressBinding.HttpAddressBinding()\n\n' The following program demonstrates the constructor, field 'Namespace' of\n' class 'HttpBinding' and constructor of class 'HttpAddressBinding'. This program writes all 'HttpPost' binding related information to the input wsdl file and genrates an output file which is later on compiled using wsdl tool.\n\nImports System.Web.Services.Description\nImports System.Collections\nImports System.Xml\n\nClass MyHttpBindingClass\n \n Public Shared Sub Main()\n Dim myDescription As ServiceDescription = _\n ServiceDescription.Read(\"HttpBinding_ctor_Input_VB.wsdl\")\n' \n' \n ' Create 'Binding' object.\n Dim myBinding As New Binding()\n myBinding.Name = \"MyHttpBindingServiceHttpPost\"\n Dim qualifiedName As New XmlQualifiedName(\"s0:MyHttpBindingServiceHttpPost\")\n myBinding.Type = qualifiedName\n ' Create 'HttpBinding' object.\n Dim myHttpBinding As New HttpBinding()\n myHttpBinding.Verb = \"POST\"\n Console.WriteLine(\"HttpBinding Namespace : \" + HttpBinding.Namespace)\n' <\/Snippet2> \n ' Add 'HttpBinding' to 'Binding'.\n myBinding.Extensions.Add(myHttpBinding)\n' <\/Snippet1>\n ' Create 'OperationBinding' object.\n Dim myOperationBinding As New OperationBinding()\n myOperationBinding.Name = \"AddNumbers\"\n Dim myOperation As New HttpOperationBinding()\n myOperation.Location = \"\/AddNumbers\"\n ' Add 'HttpOperationBinding' to 'OperationBinding'.\n myOperationBinding.Extensions.Add(myOperation)\n ' Create 'InputBinding' object.\n Dim myInput As New InputBinding()\n Dim postMimeContentbinding As New MimeContentBinding()\n postMimeContentbinding.Type = \"application\/x-www-form-urlencoded\"\n myInput.Extensions.Add(postMimeContentbinding)\n ' Add 'InputBinding' to 'OperationBinding'.\n myOperationBinding.Input = myInput\n ' Create 'OutputBinding' object.\n Dim myOutput As New OutputBinding()\n Dim postMimeXmlbinding As New MimeXmlBinding()\n postMimeXmlbinding.Part = \"Body\"\n myOutput.Extensions.Add(postMimeXmlbinding)\n ' Add 'OutPutBinding' to 'OperationBinding'.\n myOperationBinding.Output = myOutput\n ' Add 'OperationBinding' to 'Binding'.\n myBinding.Operations.Add(myOperationBinding)\n ' Add 'Binding' to 'BindingCollection' of 'ServiceDescription'.\n myDescription.Bindings.Add(myBinding)\n' \n ' Create a 'Port' object.\n Dim postPort As New Port()\n postPort.Name = \"MyHttpBindingServiceHttpPost\"\n postPort.Binding = New XmlQualifiedName(\"s0:MyHttpBindingServiceHttpPost\")\n ' Create 'HttpAddressBinding' object.\n Dim postAddressBinding As New HttpAddressBinding()\n postAddressBinding.Location = _\n \"http:\/\/localhost\/HttpBinding_ctor\/HttpBinding_ctor_Service.vb.asmx\"\n ' Add 'HttpAddressBinding' to 'Port'.\n postPort.Extensions.Add(postAddressBinding)\n' <\/Snippet3>\n ' Add 'Port' to 'PortCollection' of 'ServiceDescription'.\n myDescription.Services(0).Ports.Add(postPort)\n ' Write 'ServiceDescription' as a WSDL file.\n myDescription.Write(\"HttpBinding_ctor_Output_VB.wsdl\")\n Console.WriteLine _\n (\"WSDL file with name 'HttpBinding_ctor_Output_VB.wsdl' file created Successfully\")\n End Sub 'Main\nEnd Class 'MyHttpBindingClass","avg_line_length":46.5921052632,"max_line_length":238,"alphanum_fraction":0.7246540525} {"size":3300,"ext":"vb","lang":"Visual Basic","max_stars_count":null,"content":"Imports System.Collections.Generic\r\nImports StarTrek.Untouchables\r\n\r\nPublic Class Game\r\n\r\n Private e As Integer = 10000\r\n Private t As Integer = 8\r\n\r\n Public Function EnergyRemaining() As Integer\r\n Return e\r\n End Function\r\n\r\n Public Property Torpedoes() As Integer\r\n Get\r\n Return t\r\n End Get\r\n Set\r\n t = value\r\n End Set\r\n End Property\r\n\r\n Public Sub FireWeapon(wg As WebGadget)\r\n FireWeapon(New Galaxy(wg))\r\n End Sub\r\n\r\n Public Sub FireWeapon(wg As Galaxy)\r\n If wg.Parameter(\"command\").Equals(\"phaser\") Then\r\n Dim amount As Integer = Integer.Parse(wg.Parameter(\"amount\"))\r\n Dim enemy As Klingon = DirectCast(wg.Variable(\"target\"), Klingon)\r\n If e >= amount Then\r\n Dim distance As Integer = enemy.Distance()\r\n If distance > 4000 Then\r\n wg.WriteLine(\"Klingon out of range of phasers at \" & distance & \" sectors...\")\r\n Else\r\n Dim damage As Integer = amount - (((amount \\ 20) * distance \\ 200) + Rnd(200))\r\n If damage < 1 Then\r\n damage = 1\r\n End If\r\n wg.WriteLine(\"Phasers hit Klingon at \" & distance & \" sectors with \" & damage & \" units\")\r\n If damage < enemy.GetEnergy() Then\r\n enemy.SetEnergy(enemy.GetEnergy() - damage)\r\n wg.WriteLine(\"Klingon has \" & enemy.GetEnergy() & \" remaining\")\r\n Else\r\n wg.WriteLine(\"Klingon destroyed!\")\r\n enemy.Delete()\r\n End If\r\n End If\r\n\r\n e -= amount\r\n Else\r\n wg.WriteLine(\"Insufficient energy to fire phasers!\")\r\n\r\n End If\r\n ElseIf wg.Parameter(\"command\").Equals(\"photon\") Then\r\n Dim enemy As Klingon = DirectCast(wg.Variable(\"target\"), Klingon)\r\n If t > 0 Then\r\n Dim distance As Integer = enemy.Distance()\r\n If (Rnd(4) + ((distance \\ 500) + 1) > 7) Then\r\n wg.WriteLine(\"Torpedo missed Klingon at \" & distance & \" sectors...\")\r\n Else\r\n Dim damage As Integer = 800 + Rnd(50)\r\n wg.WriteLine(\"Photons hit Klingon at \" & distance & \" sectors with \" & damage & \" units\")\r\n If damage < enemy.GetEnergy() Then\r\n enemy.SetEnergy(enemy.GetEnergy() - damage)\r\n wg.WriteLine(\"Klingon has \" & enemy.GetEnergy() & \" remaining\")\r\n Else\r\n wg.WriteLine(\"Klingon destroyed!\")\r\n enemy.Delete()\r\n End If\r\n End If\r\n\r\n t -= 1\r\n Else\r\n wg.WriteLine(\"No more photon torpedoes!\")\r\n End If\r\n End If\r\n End Sub\r\n\r\n\r\n ' note we made generator public in order to mock it\r\n ' it's ugly, but it's telling us something about our *design!* ;-)\r\n Public Shared generator As New Random()\r\n Private Shared Function Rnd(maximum As Integer) As Integer\r\n Return generator.[Next](maximum)\r\n End Function\r\n\r\n\r\nEnd Class\r\n","avg_line_length":37.0786516854,"max_line_length":110,"alphanum_fraction":0.4990909091} {"size":3119,"ext":"vb","lang":"Visual Basic","max_stars_count":2.0,"content":"\ufeffImports System.Collections.Generic\nImports SDVariable = org.nd4j.autodiff.samediff.SDVariable\nImports SameDiff = org.nd4j.autodiff.samediff.SameDiff\nImports NoOpNameFoundException = org.nd4j.imports.NoOpNameFoundException\nImports DataType = org.nd4j.linalg.api.buffer.DataType\nImports INDArray = org.nd4j.linalg.api.ndarray.INDArray\nImports DynamicCustomOp = org.nd4j.linalg.api.ops.DynamicCustomOp\nImports Nd4j = org.nd4j.linalg.factory.Nd4j\n\n'\n' * ******************************************************************************\n' * *\n' * *\n' * * This program and the accompanying materials are made available under the\n' * * terms of the Apache License, Version 2.0 which is available at\n' * * https:\/\/www.apache.org\/licenses\/LICENSE-2.0.\n' * *\n' * * See the NOTICE file distributed with this work for additional\n' * * information regarding copyright ownership.\n' * * Unless required by applicable law or agreed to in writing, software\n' * * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n' * * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\n' * * License for the specific language governing permissions and limitations\n' * * under the License.\n' * *\n' * * SPDX-License-Identifier: Apache-2.0\n' * *****************************************************************************\n' \n\nNamespace org.nd4j.linalg.api.ops.impl.transforms.any\n\n\n\t''' \n\t''' [1, 2, 3, 1] -> [0, 0, 1, 0]\n\t''' @author Adam Gibson\n\t''' <\/summary>\n\tPublic Class IsMax\n\t\tInherits DynamicCustomOp\n\n\t\tPublic Sub New(ByVal sameDiff As SameDiff, ByVal i_v As SDVariable)\n\t\t\tMyBase.New(sameDiff, i_v)\n\t\tEnd Sub\n\n\n\t\tPublic Sub New(ByVal x As INDArray, ByVal z As INDArray)\n\t\t\tMyBase.New(New INDArray(){x}, New INDArray(){z})\n\t\tEnd Sub\n\n\t\tPublic Sub New()\n\t\tEnd Sub\n\n\t\tPublic Sub New(ByVal x As INDArray)\n\t\t\tMe.New(x, Nd4j.createUninitialized(DataType.BOOL, x.shape(), x.ordering()))\n\t\tEnd Sub\n\n\t\tPublic Sub New(ByVal x As INDArray, ByVal z As INDArray, ParamArray ByVal dimensions() As Integer)\n\t\t\tMe.New(x, z)\n\t\t\tMe.addIArgument(dimensions)\n\t\tEnd Sub\n\n\t\tPublic Sub New(ByVal x As INDArray, ParamArray ByVal dimensions() As Integer)\n\t\t\tMe.New(x, Nd4j.createUninitialized(DataType.BOOL, x.shape(), x.ordering()), dimensions)\n\t\tEnd Sub\n\n\t\tPublic Overrides Function opName() As String\n\t\t\tReturn \"ismax\"\n\t\tEnd Function\n\n\t\tPublic Overrides Function onnxName() As String\n\t\t\tThrow New NoOpNameFoundException(\"No onnx op opName found for \" & opName())\n\t\tEnd Function\n\n\t\tPublic Overrides Function tensorflowName() As String\n\t\t\tThrow New NoOpNameFoundException(\"No tensorflow op opName found for \" & opName())\n\t\tEnd Function\n\n\t\tPublic Overrides Function doDiff(ByVal f1 As IList(Of SDVariable)) As IList(Of SDVariable)\n\t\t\tReturn Collections.singletonList(sameDiff.zerosLike(arg()))\n\t\tEnd Function\n\n\t\tPublic Overrides Function calculateOutputDataTypes(ByVal inputDataTypes As IList(Of DataType)) As IList(Of DataType)\n\t\t\t'Also supports other types if say float array is provided as output array\n\t\t\tReturn Collections.singletonList(DataType.BOOL)\n\t\tEnd Function\n\tEnd Class\n\nEnd Namespace","avg_line_length":35.8505747126,"max_line_length":118,"alphanum_fraction":0.7018275088} {"size":1772,"ext":"vba","lang":"Visual Basic","max_stars_count":1.0,"content":"'Option Base 1\nPrivate Function gauss_eliminate(a As Variant, b As Variant) As Variant\n Dim n As Integer: n = UBound(b)\n Dim tmp As Variant, m As Integer, mx As Variant\n For col = 1 To n\n m = col\n mx = a(m, m)\n For i = col + 1 To n\n tmp = Abs(a(i, col))\n If tmp > mx Then\n m = i\n mx = tmp\n End If\n Next i\n If col <> m Then\n For j = 1 To UBound(a, 2)\n tmp = a(col, j)\n a(col, j) = a(m, j)\n a(m, j) = tmp\n Next j\n tmp = b(col)\n b(col) = b(m)\n b(m) = tmp\n End If\n For i = col + 1 To n\n tmp = a(i, col) \/ a(col, col)\n For j = col + 1 To n\n a(i, j) = a(i, j) - tmp * a(col, j)\n Next j\n a(i, col) = 0\n b(i) = b(i) - tmp * b(col)\n Next i\n Next col\n Dim x() As Variant\n ReDim x(n)\n For col = n To 1 Step -1\n tmp = b(col)\n For j = n To col + 1 Step -1\n tmp = tmp - x(j) * a(col, j)\n Next j\n x(col) = tmp \/ a(col, col)\n Next col\n gauss_eliminate = x\nEnd Function\nPublic Sub main()\n a = [{1.00, 0.00, 0.00, 0.00, 0.00, 0.00; 1.00, 0.63, 0.39, 0.25, 0.16, 0.10; 1.00, 1.26, 1.58, 1.98, 2.49, 3.13; 1.00, 1.88, 3.55, 6.70, 12.62, 23.80; 1.00, 2.51, 6.32, 15.88, 39.90, 100.28; 1.00, 3.14, 9.87, 31.01, 97.41, 306.02}]\n b = [{-0.01, 0.61, 0.91, 0.99, 0.60, 0.02}]\n Dim s() As String, x() As Variant\n ReDim s(UBound(b)), x(UBound(b))\n Debug.Print \"(\";\n x = gauss_eliminate(a, b)\n For i = 1 To UBound(x)\n s(i) = CStr(x(i))\n Next i\n t = Join(s, \", \")\n Debug.Print t; \")\"\nEnd Sub\n","avg_line_length":30.5517241379,"max_line_length":250,"alphanum_fraction":0.4243792325} {"size":7654,"ext":"frm","lang":"Visual Basic","max_stars_count":null,"content":"VERSION 5.00\r\nBegin VB.Form fRijndael \r\n Caption = \"Form1\"\r\n ClientHeight = 1965\r\n ClientLeft = 60\r\n ClientTop = 345\r\n ClientWidth = 6180\r\n LinkTopic = \"Form1\"\r\n ScaleHeight = 1965\r\n ScaleWidth = 6180\r\n StartUpPosition = 3 'Windows Default\r\n Begin VB.CommandButton cmdFileDecrypt \r\n Caption = \"Decrypt File\"\r\n Height = 495\r\n Left = 2160\r\n TabIndex = 6\r\n Top = 1080\r\n Width = 1095\r\n End\r\n Begin VB.ComboBox cboKeySize \r\n Height = 315\r\n Left = 2160\r\n Style = 2 'Dropdown List\r\n TabIndex = 2\r\n Top = 2280\r\n Visible = 0 'False\r\n Width = 1695\r\n End\r\n Begin VB.ComboBox cboBlockSize \r\n Height = 315\r\n Left = 2160\r\n Style = 2 'Dropdown List\r\n TabIndex = 1\r\n Top = 1920\r\n Visible = 0 'False\r\n Width = 1695\r\n End\r\n Begin VB.TextBox txtPassword \r\n Height = 285\r\n IMEMode = 3 'DISABLE\r\n Left = 2160\r\n MaxLength = 16\r\n PasswordChar = \"*\"\r\n TabIndex = 0\r\n Text = \"Password\"\r\n Top = 600\r\n Width = 3495\r\n End\r\n Begin VB.Label Label3 \r\n Caption = \"Key Size:\"\r\n Height = 255\r\n Left = 720\r\n TabIndex = 5\r\n Top = 2280\r\n Visible = 0 'False\r\n Width = 1455\r\n End\r\n Begin VB.Label Label2 \r\n Caption = \"Block Size:\"\r\n Height = 255\r\n Left = 720\r\n TabIndex = 4\r\n Top = 1920\r\n Visible = 0 'False\r\n Width = 1455\r\n End\r\n Begin VB.Label Label1 \r\n Caption = \"Enter Key (16 Bytes)\"\r\n Height = 255\r\n Left = 480\r\n TabIndex = 3\r\n Top = 600\r\n Width = 1455\r\n End\r\nEnd\r\nAttribute VB_Name = \"fRijndael\"\r\nAttribute VB_GlobalNameSpace = False\r\nAttribute VB_Creatable = False\r\nAttribute VB_PredeclaredId = True\r\nAttribute VB_Exposed = False\r\nOption Explicit\r\n\r\nPrivate m_Rijndael As New cRijndael\r\n\r\n'Used to display what the program is doing in the Form's caption\r\nPublic Property Let Status(TheStatus As String)\r\n If Len(TheStatus) = 0 Then\r\n Me.Caption = App.Title\r\n Else\r\n Me.Caption = App.Title & \" - \" & TheStatus\r\n End If\r\n Me.Refresh\r\nEnd Property\r\n\r\n'Reverse of HexDisplay. Given a String containing Hex values, convert to byte array data()\r\n'Returns number of bytes n in data(0 ... n-1)\r\nPrivate Function HexDisplayRev(TheString As String, Data() As Byte) As Long\r\n Dim i As Long\r\n Dim j As Long\r\n Dim c As Long\r\n Dim d As Long\r\n Dim n As Long\r\n Dim data2() As Byte\r\n\r\n n = 2 * Len(TheString)\r\n data2 = TheString\r\n\r\n ReDim Data(n \\ 4 - 1)\r\n\r\n d = 0\r\n i = 0\r\n j = 0\r\n Do While j < n\r\n c = data2(j)\r\n Select Case c\r\n Case 48 To 57 '\"0\" ... \"9\"\r\n If d = 0 Then 'high\r\n d = c\r\n Else 'low\r\n Data(i) = (c - 48) Or ((d - 48) * 16&)\r\n i = i + 1\r\n d = 0\r\n End If\r\n Case 65 To 70 '\"A\" ... \"F\"\r\n If d = 0 Then 'high\r\n d = c - 7\r\n Else 'low\r\n Data(i) = (c - 55) Or ((d - 48) * 16&)\r\n i = i + 1\r\n d = 0\r\n End If\r\n Case 97 To 102 '\"a\" ... \"f\"\r\n If d = 0 Then 'high\r\n d = c - 39\r\n Else 'low\r\n Data(i) = (c - 87) Or ((d - 48) * 16&)\r\n i = i + 1\r\n d = 0\r\n End If\r\n End Select\r\n j = j + 2\r\n Loop\r\n n = i\r\n If n = 0 Then\r\n Erase Data\r\n Else\r\n ReDim Preserve Data(n - 1)\r\n End If\r\n HexDisplayRev = n\r\nEnd Function\r\n\r\n\r\n'Returns a byte array containing the password in the txtPassword TextBox control.\r\n'If \"Plaintext is hex\" is checked, and the TextBox contains a Hex value the correct\r\n'length for the current KeySize, the Hex value is used. Otherwise, ASCII values\r\n'of the txtPassword characters are used.\r\nPrivate Function GetPassword() As Byte()\r\n Dim Data() As Byte\r\n\r\n If HexDisplayRev(txtPassword.Text, Data) <> (cboKeySize.ItemData(cboKeySize.NewIndex) \\ 8) Then\r\n Data = StrConv(txtPassword.Text, vbFromUnicode)\r\n ReDim Preserve Data(31)\r\n End If\r\n GetPassword = Data\r\nEnd Function\r\n\r\nPrivate Sub cmdFileDecrypt_Click()\r\n Dim FileName As String\r\n Dim FileName2 As String\r\n Dim FileName4 As String\r\n Dim pass() As Byte\r\n Dim KeyBits As Long\r\n Dim BlockBits As Long\r\n Dim a, b, ext, fingerprintdata As String\r\n Dim filename2data As String\r\n \r\n\r\n If Len(txtPassword.Text) = 0 Then\r\n MsgBox \"No Password\"\r\n Else\r\n 'FileName = FileDialog(Me, False, \"File to Decrypt\", \"*.aes|*.aes|*.*|*.*\")\r\n FileName = frmWsk.Text1\r\n a = frmWsk.Text1\r\n b = InStr(1, a, \".aes\") - InStr(1, a, \".\")\r\n ext = Mid(a, InStr(1, a, \".\") + 1, b - 1)\r\n If Len(FileName) <> 0 Then\r\n If InStrRev(FileName, \".aes\") = Len(FileName) - 3 Then FileName2 = Left$(FileName, Len(FileName) - 4)\r\n FileName2 = FileDialog(Me, True, \"Save Decrypted Data As ...\", \"*.ext|*.ext\", FileName2)\r\n If Len(FileName2) <> 0 Then\r\n RidFile FileName2\r\n KeyBits = cboKeySize.ItemData(cboKeySize.NewIndex)\r\n BlockBits = cboBlockSize.ItemData(cboBlockSize.NewIndex)\r\n pass = GetPassword\r\n\r\n Status = \"Decrypting File\"\r\n m_Rijndael.SetCipherKey pass, KeyBits\r\n m_Rijndael.FileDecrypt FileName2, FileName\r\n Kill FileName\r\n \r\n Open FileName2 For Binary As #1\r\n filename2data = Input(LOF(1), 1)\r\n Close #1\r\n \r\n fingerprintdata = Mid(filename2data, InStr(1, filename2data, \"Biokey\") + 6)\r\n filename2data = CStr(Left(filename2data, InStr(1, filename2data, \"Biokey\") - 1))\r\n Open FileName2 For Output As 2\r\n Print #2, filename2data\r\n Close #2\r\n \r\n \r\n FileName4 = FileDialog(Me, True, \"Save Decrypted Data As ...\", \"*.ext|*.ext\", FileName4)\r\n RidFile FileName4\r\n KeyBits = cboKeySize.ItemData(cboKeySize.NewIndex)\r\n BlockBits = cboBlockSize.ItemData(cboBlockSize.NewIndex)\r\n pass = GetPassword\r\n\r\n Status = \"Decrypting File\"\r\n m_Rijndael.SetCipherKey pass, KeyBits\r\n m_Rijndael.FileDecrypt FileName4, FileName2\r\n\r\n\r\n\r\n Status = \"\"\r\n End If\r\n End If\r\n End If\r\nEnd Sub\r\nPrivate Sub Form_Initialize()\r\n\r\n cboBlockSize.AddItem \"128 Bit\"\r\n cboBlockSize.ItemData(cboBlockSize.NewIndex) = 128\r\n cboBlockSize.Enabled = False\r\n \r\n cboKeySize.AddItem \"128 Bit\"\r\n cboKeySize.ItemData(cboKeySize.NewIndex) = 128\r\n cboKeySize.Enabled = False\r\n \r\n txtPassword = \"1234567891234567\"\r\n Status = \"\"\r\nEnd Sub\r\n\r\nPrivate Sub Form_Load()\r\nLoad frmClient\r\nEnd Sub\r\n","avg_line_length":31.2408163265,"max_line_length":114,"alphanum_fraction":0.4913770577} {"size":3479,"ext":"frm","lang":"Visual Basic","max_stars_count":null,"content":"TYPE=VIEW\nquery=select `sys`.`format_statement`(`stmts`.`DIGEST_TEXT`) AS `query`,`stmts`.`SCHEMA_NAME` AS `db`,if(((`stmts`.`SUM_NO_GOOD_INDEX_USED` > 0) or (`stmts`.`SUM_NO_INDEX_USED` > 0)),\\'*\\',\\'\\') AS `full_scan`,`stmts`.`COUNT_STAR` AS `exec_count`,`stmts`.`SUM_ERRORS` AS `err_count`,`stmts`.`SUM_WARNINGS` AS `warn_count`,`sys`.`format_time`(`stmts`.`SUM_TIMER_WAIT`) AS `total_latency`,`sys`.`format_time`(`stmts`.`MAX_TIMER_WAIT`) AS `max_latency`,`sys`.`format_time`(`stmts`.`AVG_TIMER_WAIT`) AS `avg_latency`,`stmts`.`SUM_ROWS_SENT` AS `rows_sent`,round(ifnull((`stmts`.`SUM_ROWS_SENT` \/ nullif(`stmts`.`COUNT_STAR`,0)),0),0) AS `rows_sent_avg`,`stmts`.`SUM_ROWS_EXAMINED` AS `rows_examined`,round(ifnull((`stmts`.`SUM_ROWS_EXAMINED` \/ nullif(`stmts`.`COUNT_STAR`,0)),0),0) AS `rows_examined_avg`,`stmts`.`FIRST_SEEN` AS `first_seen`,`stmts`.`LAST_SEEN` AS `last_seen`,`stmts`.`DIGEST` AS `digest` from (`performance_schema`.`events_statements_summary_by_digest` `stmts` join `sys`.`x$ps_digest_95th_percentile_by_avg_us` `top_percentile` on((round((`stmts`.`AVG_TIMER_WAIT` \/ 1000000),0) >= `top_percentile`.`avg_us`))) order by `stmts`.`AVG_TIMER_WAIT` desc\nmd5=a8f6593f95ffd3877ab190a6e89b45fa\nupdatable=1\nalgorithm=2\ndefiner_user=mysql.sys\ndefiner_host=localhost\nsuid=0\nwith_check_option=0\ntimestamp=2020-07-18 20:27:47\ncreate-version=1\nsource=SELECT sys.format_statement(DIGEST_TEXT) AS query, SCHEMA_NAME as db, IF(SUM_NO_GOOD_INDEX_USED > 0 OR SUM_NO_INDEX_USED > 0, \\'*\\', \\'\\') AS full_scan, COUNT_STAR AS exec_count, SUM_ERRORS AS err_count, SUM_WARNINGS AS warn_count, sys.format_time(SUM_TIMER_WAIT) AS total_latency, sys.format_time(MAX_TIMER_WAIT) AS max_latency, sys.format_time(AVG_TIMER_WAIT) AS avg_latency, SUM_ROWS_SENT AS rows_sent, ROUND(IFNULL(SUM_ROWS_SENT \/ NULLIF(COUNT_STAR, 0), 0)) AS rows_sent_avg, SUM_ROWS_EXAMINED AS rows_examined, ROUND(IFNULL(SUM_ROWS_EXAMINED \/ NULLIF(COUNT_STAR, 0), 0)) AS rows_examined_avg, FIRST_SEEN AS first_seen, LAST_SEEN AS last_seen, DIGEST AS digest FROM performance_schema.events_statements_summary_by_digest stmts JOIN sys.x$ps_digest_95th_percentile_by_avg_us AS top_percentile ON ROUND(stmts.avg_timer_wait\/1000000) >= top_percentile.avg_us ORDER BY AVG_TIMER_WAIT DESC\nclient_cs_name=utf8\nconnection_cl_name=utf8_general_ci\nview_body_utf8=select `sys`.`format_statement`(`stmts`.`DIGEST_TEXT`) AS `query`,`stmts`.`SCHEMA_NAME` AS `db`,if(((`stmts`.`SUM_NO_GOOD_INDEX_USED` > 0) or (`stmts`.`SUM_NO_INDEX_USED` > 0)),\\'*\\',\\'\\') AS `full_scan`,`stmts`.`COUNT_STAR` AS `exec_count`,`stmts`.`SUM_ERRORS` AS `err_count`,`stmts`.`SUM_WARNINGS` AS `warn_count`,`sys`.`format_time`(`stmts`.`SUM_TIMER_WAIT`) AS `total_latency`,`sys`.`format_time`(`stmts`.`MAX_TIMER_WAIT`) AS `max_latency`,`sys`.`format_time`(`stmts`.`AVG_TIMER_WAIT`) AS `avg_latency`,`stmts`.`SUM_ROWS_SENT` AS `rows_sent`,round(ifnull((`stmts`.`SUM_ROWS_SENT` \/ nullif(`stmts`.`COUNT_STAR`,0)),0),0) AS `rows_sent_avg`,`stmts`.`SUM_ROWS_EXAMINED` AS `rows_examined`,round(ifnull((`stmts`.`SUM_ROWS_EXAMINED` \/ nullif(`stmts`.`COUNT_STAR`,0)),0),0) AS `rows_examined_avg`,`stmts`.`FIRST_SEEN` AS `first_seen`,`stmts`.`LAST_SEEN` AS `last_seen`,`stmts`.`DIGEST` AS `digest` from (`performance_schema`.`events_statements_summary_by_digest` `stmts` join `sys`.`x$ps_digest_95th_percentile_by_avg_us` `top_percentile` on((round((`stmts`.`AVG_TIMER_WAIT` \/ 1000000),0) >= `top_percentile`.`avg_us`))) order by `stmts`.`AVG_TIMER_WAIT` desc\n","avg_line_length":217.4375,"max_line_length":1172,"alphanum_fraction":0.7643000862} {"size":53736,"ext":"vb","lang":"Visual Basic","max_stars_count":1.0,"content":"\ufeff' Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.\n\nImports System.Collections.Generic\nImports System.Collections.Immutable\nImports System.Collections.ObjectModel\nImports System.Globalization\nImports System.Threading\nImports System.Reflection\nImports System.Reflection.Metadata\nImports Microsoft.CodeAnalysis.PooledObjects\nImports Microsoft.CodeAnalysis.Text\nImports Microsoft.CodeAnalysis.VisualBasic.Symbols\nImports Microsoft.CodeAnalysis.VisualBasic.Syntax\nImports System.Runtime.InteropServices\n\nNamespace Microsoft.CodeAnalysis.VisualBasic.Symbols.Metadata.PE\n\n ''' \n ''' The class to represent all methods imported from a PE\/module.\n ''' <\/summary>\n Friend NotInheritable Class PEMethodSymbol\n Inherits MethodSymbol\n\n Private ReadOnly _handle As MethodDefinitionHandle\n Private ReadOnly _name As String\n Private ReadOnly _implFlags As UShort\n Private ReadOnly _flags As UShort\n Private ReadOnly _containingType As PENamedTypeSymbol\n\n Private _associatedPropertyOrEventOpt As Symbol\n\n Private _packedFlags As PackedFlags\n\n Private _lazyTypeParameters As ImmutableArray(Of TypeParameterSymbol)\n\n Private _lazyExplicitMethodImplementations As ImmutableArray(Of MethodSymbol)\n\n ''' \n ''' A single field to hold optional auxiliary data.\n ''' In many scenarios it is possible to avoid allocating this, thus saving total space in .\n ''' Even for lazily-computed values, it may be possible to avoid allocating if\n ''' the computed value is a well-known \"empty\" value. In this case, bits in are used\n ''' to indicate that the lazy values have been computed and, if is null, then\n ''' the \"empty\" value should be inferred.\n ''' <\/summary>\n Private _uncommonFields As UncommonFields\n\n Private Structure PackedFlags\n ' Flags are packed into a 32-bit int with the following layout:\n ' | h|g|f|e|d|c|b|aaaaa|\n '\n ' a = method kind. 5 bits\n ' b = method kind populated. 1 bit\n ' c = isExtensionMethod. 1 bit.\n ' d = isExtensionMethod populated. 1 bit.\n ' e = obsolete attribute populated. 1 bit\n ' f = custom attributes populated. 1 bit\n ' g = use site diagnostic populated. 1 bit\n ' h = conditional attributes populated. 1 bit\n\n Private _bits As Integer\n\n Private Const s_methodKindOffset As Integer = 0\n Private Const s_methodKindMask As Integer = &H1F\n Private Const s_methodKindIsPopulatedBit As Integer = 1 << 5\n Private Const s_isExtensionMethodBit As Integer = 1 << 6\n Private Const s_isExtensionMethodIsPopulatedBit As Integer = 1 << 7\n Private Const s_isObsoleteAttributePopulatedBit As Integer = 1 << 8\n Private Const s_isCustomAttributesPopulatedBit As Integer = 1 << 9\n Private Const s_isUseSiteDiagnosticPopulatedBit As Integer = 1 << 10\n Private Const s_isConditionalAttributePopulatedBit As Integer = 1 << 11\n\n Public Property MethodKind As MethodKind\n Get\n Return CType((_bits >> s_methodKindOffset) And s_methodKindMask, MethodKind)\n End Get\n Set(value As MethodKind)\n Debug.Assert(value = (value And s_methodKindMask))\n _bits = (_bits And Not (s_methodKindMask << s_methodKindOffset)) Or (value << s_methodKindOffset) Or s_methodKindIsPopulatedBit\n End Set\n End Property\n\n Public ReadOnly Property MethodKindIsPopulated As Boolean\n Get\n Return (_bits And s_methodKindIsPopulatedBit) <> 0\n End Get\n End Property\n\n Public ReadOnly Property IsExtensionMethod As Boolean\n Get\n Return (_bits And s_isExtensionMethodBit) <> 0\n End Get\n End Property\n\n Public ReadOnly Property IsExtensionMethodPopulated As Boolean\n Get\n Return (_bits And s_isExtensionMethodIsPopulatedBit) <> 0\n End Get\n End Property\n\n Public ReadOnly Property IsObsoleteAttributePopulated As Boolean\n Get\n Return (_bits And s_isObsoleteAttributePopulatedBit) <> 0\n End Get\n End Property\n\n Public ReadOnly Property IsCustomAttributesPopulated As Boolean\n Get\n Return (_bits And s_isCustomAttributesPopulatedBit) <> 0\n End Get\n End Property\n\n Public ReadOnly Property IsUseSiteDiagnosticPopulated As Boolean\n Get\n Return (_bits And s_isUseSiteDiagnosticPopulatedBit) <> 0\n End Get\n End Property\n\n Public ReadOnly Property IsConditionalPopulated As Boolean\n Get\n Return (_bits And s_isConditionalAttributePopulatedBit) <> 0\n End Get\n End Property\n\n Private Shared Function BitsAreUnsetOrSame(bits As Integer, mask As Integer) As Boolean\n Return (bits And mask) = 0 OrElse (bits And mask) = mask\n End Function\n\n Public Sub InitializeMethodKind(methodKind As MethodKind)\n Debug.Assert(methodKind = (methodKind And s_methodKindMask))\n Dim bitsToSet = ((methodKind And s_methodKindMask) << s_methodKindOffset) Or s_methodKindIsPopulatedBit\n Debug.Assert(BitsAreUnsetOrSame(_bits, bitsToSet))\n ThreadSafeFlagOperations.Set(_bits, bitsToSet)\n End Sub\n\n Public Sub InitializeIsExtensionMethod(isExtensionMethod As Boolean)\n Dim bitsToSet = If(isExtensionMethod, s_isExtensionMethodBit, 0) Or s_isExtensionMethodIsPopulatedBit\n Debug.Assert(BitsAreUnsetOrSame(_bits, bitsToSet))\n ThreadSafeFlagOperations.Set(_bits, bitsToSet)\n End Sub\n\n Public Sub SetIsObsoleteAttributePopulated()\n ThreadSafeFlagOperations.Set(_bits, s_isObsoleteAttributePopulatedBit)\n End Sub\n\n Public Sub SetIsCustomAttributesPopulated()\n ThreadSafeFlagOperations.Set(_bits, s_isCustomAttributesPopulatedBit)\n End Sub\n\n Public Sub SetIsUseSiteDiagnosticPopulated()\n ThreadSafeFlagOperations.Set(_bits, s_isUseSiteDiagnosticPopulatedBit)\n End Sub\n\n Public Sub SetIsConditionalAttributePopulated()\n ThreadSafeFlagOperations.Set(_bits, s_isConditionalAttributePopulatedBit)\n End Sub\n End Structure\n\n ''' \n ''' Holds infrequently accessed fields. See for an explanation.\n ''' <\/summary>\n Private NotInheritable Class UncommonFields\n Public _lazyMeParameter As ParameterSymbol\n Public _lazyDocComment As Tuple(Of CultureInfo, String)\n Public _lazyCustomAttributes As ImmutableArray(Of VisualBasicAttributeData)\n Public _lazyConditionalAttributeSymbols As ImmutableArray(Of String)\n Public _lazyObsoleteAttributeData As ObsoleteAttributeData\n Public _lazyUseSiteErrorInfo As DiagnosticInfo\n End Class\n\n Private Function CreateUncommonFields() As UncommonFields\n Dim retVal = New UncommonFields\n\n If Not _packedFlags.IsObsoleteAttributePopulated Then\n retVal._lazyObsoleteAttributeData = ObsoleteAttributeData.Uninitialized\n End If\n\n '\n ' Do not set _lazyUseSiteErrorInfo !!!!\n '\n ' \"null\" Indicates \"no errors\" or \"unknown state\",\n ' and we know which one of the states we have from IsUseSiteDiagnosticPopulated\n '\n ' Setting _lazyUseSiteErrorInfo to a sentinel value here would introduce\n ' a number of extra states for various permutations of IsUseSiteDiagnosticPopulated, UncommonFields and _lazyUseSiteDiagnostic\n ' Some of them, in tight races, may lead to returning the sentinel as the diagnostics.\n '\n If _packedFlags.IsCustomAttributesPopulated Then\n retVal._lazyCustomAttributes = ImmutableArray(Of VisualBasicAttributeData).Empty\n End If\n\n If _packedFlags.IsConditionalPopulated Then\n retVal._lazyConditionalAttributeSymbols = ImmutableArray(Of String).Empty\n End If\n Return retVal\n End Function\n\n Private Function AccessUncommonFields() As UncommonFields\n Dim retVal = _uncommonFields\n Return If(retVal, InterlockedOperations.Initialize(_uncommonFields, CreateUncommonFields()))\n End Function\n\n\n#Region \"Signature data\"\n Private _lazySignature As SignatureData\n\n Private Class SignatureData\n Public ReadOnly Header As SignatureHeader\n Public ReadOnly Parameters As ImmutableArray(Of ParameterSymbol)\n Public ReadOnly ReturnParam As PEParameterSymbol\n\n Public Sub New(signatureHeader As SignatureHeader, parameters As ImmutableArray(Of ParameterSymbol), returnParam As PEParameterSymbol)\n Me.Header = signatureHeader\n Me.Parameters = parameters\n Me.ReturnParam = returnParam\n End Sub\n End Class\n#End Region\n\n Friend Sub New(\n moduleSymbol As PEModuleSymbol,\n containingType As PENamedTypeSymbol,\n handle As MethodDefinitionHandle\n )\n Debug.Assert(moduleSymbol IsNot Nothing)\n Debug.Assert(containingType IsNot Nothing)\n Debug.Assert(Not handle.IsNil)\n\n _handle = handle\n _containingType = containingType\n\n Try\n Dim implFlags As MethodImplAttributes\n Dim flags As MethodAttributes\n Dim rva As Integer\n moduleSymbol.Module.GetMethodDefPropsOrThrow(handle, _name, implFlags, flags, rva)\n _implFlags = CType(implFlags, UShort)\n _flags = CType(flags, UShort)\n Catch mrEx As BadImageFormatException\n If _name Is Nothing Then\n _name = String.Empty\n End If\n\n InitializeUseSiteErrorInfo(ErrorFactory.ErrorInfo(ERRID.ERR_UnsupportedMethod1, CustomSymbolDisplayFormatter.ShortErrorName(Me)))\n End Try\n End Sub\n\n Public Overrides ReadOnly Property ContainingSymbol As Symbol\n Get\n Return _containingType\n End Get\n End Property\n\n Public Overrides ReadOnly Property ContainingType As NamedTypeSymbol\n Get\n Return _containingType\n End Get\n End Property\n\n Public Overrides ReadOnly Property Name As String\n Get\n Return _name\n End Get\n End Property\n\n Friend Overrides ReadOnly Property HasSpecialName As Boolean\n Get\n Return (_flags And MethodAttributes.SpecialName) <> 0\n End Get\n End Property\n\n Friend Overrides ReadOnly Property HasRuntimeSpecialName As Boolean\n Get\n Return (_flags And MethodAttributes.RTSpecialName) <> 0\n End Get\n End Property\n\n Friend Overrides ReadOnly Property IsMetadataFinal As Boolean\n Get\n Return (_flags And MethodAttributes.Final) <> 0\n End Get\n End Property\n\n Friend ReadOnly Property MethodImplFlags As MethodImplAttributes\n Get\n Return CType(_implFlags, MethodImplAttributes)\n End Get\n End Property\n\n Friend ReadOnly Property MethodFlags As MethodAttributes\n Get\n Return CType(_flags, MethodAttributes)\n End Get\n End Property\n\n Public Overrides ReadOnly Property MethodKind As MethodKind\n Get\n If Not _packedFlags.MethodKindIsPopulated Then\n _packedFlags.InitializeMethodKind(ComputeMethodKind())\n End If\n\n Return _packedFlags.MethodKind\n End Get\n\n End Property\n\n Friend Overrides ReadOnly Property IsMethodKindBasedOnSyntax As Boolean\n Get\n Return False\n End Get\n End Property\n\n Private Function ComputeMethodKind() As MethodKind\n Dim name As String = Me.Name\n\n If HasSpecialName Then\n If name.StartsWith(\".\"c, StringComparison.Ordinal) Then\n\n ' 10.5.1 Instance constructor\n ' An instance constructor shall be an instance (not static or virtual) method,\n ' it shall be named .ctor, and marked instance, rtspecialname, and specialname (\u00a715.4.2.6).\n ' An instance constructor can have parameters, but shall not return a value.\n ' An instance constructor cannot take generic type parameters.\n\n ' 10.5.3 Type initializer\n ' This method shall be static, take no parameters, return no value,\n ' be marked with rtspecialname and specialname (\u00a715.4.2.6), and be named .cctor.\n\n If (_flags And (MethodAttributes.RTSpecialName Or MethodAttributes.Virtual)) = MethodAttributes.RTSpecialName AndAlso\n String.Equals(name, If(IsShared, WellKnownMemberNames.StaticConstructorName, WellKnownMemberNames.InstanceConstructorName), StringComparison.Ordinal) AndAlso\n IsSub AndAlso Arity = 0 Then\n\n If IsShared Then\n If Parameters.Length = 0 Then\n Return MethodKind.SharedConstructor\n End If\n Else\n Return MethodKind.Constructor\n End If\n End If\n\n Return MethodKind.Ordinary\n\n ElseIf IsShared AndAlso DeclaredAccessibility = Accessibility.Public AndAlso Not IsSub AndAlso Arity = 0 Then\n Dim opInfo As OverloadResolution.OperatorInfo = OverloadResolution.GetOperatorInfo(name)\n\n If opInfo.ParamCount <> 0 Then\n ' Combination of all conditions that should be met to get here must match implementation of \n ' IsPotentialOperatorOrConversion (with exception of ParameterCount matching).\n\n If OverloadResolution.ValidateOverloadedOperator(Me, opInfo) Then\n Return ComputeMethodKindForPotentialOperatorOrConversion(opInfo)\n End If\n End If\n\n Return MethodKind.Ordinary\n End If\n End If\n\n If Not IsShared AndAlso String.Equals(name, WellKnownMemberNames.DelegateInvokeName, StringComparison.Ordinal) AndAlso _containingType.TypeKind = TypeKind.Delegate Then\n Return MethodKind.DelegateInvoke\n End If\n\n Return MethodKind.Ordinary\n End Function\n\n Friend Overrides Function IsParameterlessConstructor() As Boolean\n If _packedFlags.MethodKindIsPopulated Then\n Return _packedFlags.MethodKind = MethodKind.Constructor AndAlso ParameterCount = 0\n End If\n\n ' 10.5.1 Instance constructor\n ' An instance constructor shall be an instance (not static or virtual) method,\n ' it shall be named .ctor, and marked instance, rtspecialname, and specialname (\u00a715.4.2.6).\n ' An instance constructor can have parameters, but shall not return a value.\n ' An instance constructor cannot take generic type parameters.\n\n If (_flags And (MethodAttributes.SpecialName Or MethodAttributes.RTSpecialName Or MethodAttributes.Static Or MethodAttributes.Virtual)) =\n (MethodAttributes.SpecialName Or MethodAttributes.RTSpecialName) AndAlso\n String.Equals(Me.Name, WellKnownMemberNames.InstanceConstructorName, StringComparison.Ordinal) AndAlso\n ParameterCount = 0 AndAlso\n IsSub AndAlso Arity = 0 Then\n\n _packedFlags.MethodKind = MethodKind.Constructor\n Return True\n End If\n\n Return False\n End Function\n\n Private Function ComputeMethodKindForPotentialOperatorOrConversion(opInfo As OverloadResolution.OperatorInfo) As MethodKind\n ' Don't mark methods involved in unsupported overloading as operators.\n\n If opInfo.IsUnary Then\n Select Case opInfo.UnaryOperatorKind\n Case UnaryOperatorKind.Implicit\n Return ComputeMethodKindForPotentialOperatorOrConversion(opInfo, MethodKind.Conversion, WellKnownMemberNames.ExplicitConversionName, True)\n Case UnaryOperatorKind.Explicit\n Return ComputeMethodKindForPotentialOperatorOrConversion(opInfo, MethodKind.Conversion, WellKnownMemberNames.ImplicitConversionName, True)\n Case UnaryOperatorKind.IsFalse, UnaryOperatorKind.IsTrue, UnaryOperatorKind.Minus, UnaryOperatorKind.Plus\n Return ComputeMethodKindForPotentialOperatorOrConversion(opInfo, MethodKind.UserDefinedOperator, Nothing, False)\n Case UnaryOperatorKind.Not\n If IdentifierComparison.Equals(Me.Name, WellKnownMemberNames.OnesComplementOperatorName) Then\n Return ComputeMethodKindForPotentialOperatorOrConversion(opInfo, MethodKind.UserDefinedOperator, Nothing, False)\n Else\n Return ComputeMethodKindForPotentialOperatorOrConversion(opInfo, MethodKind.UserDefinedOperator, WellKnownMemberNames.OnesComplementOperatorName, False)\n End If\n Case Else\n Throw ExceptionUtilities.UnexpectedValue(opInfo.UnaryOperatorKind)\n End Select\n Else\n Debug.Assert(opInfo.IsBinary)\n Select Case opInfo.BinaryOperatorKind\n Case BinaryOperatorKind.Add,\n BinaryOperatorKind.Subtract,\n BinaryOperatorKind.Multiply,\n BinaryOperatorKind.Divide,\n BinaryOperatorKind.IntegerDivide,\n BinaryOperatorKind.Modulo,\n BinaryOperatorKind.Power,\n BinaryOperatorKind.Equals,\n BinaryOperatorKind.NotEquals,\n BinaryOperatorKind.LessThan,\n BinaryOperatorKind.GreaterThan,\n BinaryOperatorKind.LessThanOrEqual,\n BinaryOperatorKind.GreaterThanOrEqual,\n BinaryOperatorKind.Like,\n BinaryOperatorKind.Concatenate,\n BinaryOperatorKind.Xor\n Return ComputeMethodKindForPotentialOperatorOrConversion(opInfo, MethodKind.UserDefinedOperator, Nothing, False)\n\n Case BinaryOperatorKind.And\n If IdentifierComparison.Equals(Me.Name, WellKnownMemberNames.BitwiseAndOperatorName) Then\n Return ComputeMethodKindForPotentialOperatorOrConversion(opInfo, MethodKind.UserDefinedOperator, Nothing, False)\n Else\n Return ComputeMethodKindForPotentialOperatorOrConversion(opInfo, MethodKind.UserDefinedOperator, WellKnownMemberNames.BitwiseAndOperatorName, False)\n End If\n Case BinaryOperatorKind.Or\n If IdentifierComparison.Equals(Me.Name, WellKnownMemberNames.BitwiseOrOperatorName) Then\n Return ComputeMethodKindForPotentialOperatorOrConversion(opInfo, MethodKind.UserDefinedOperator, Nothing, False)\n Else\n Return ComputeMethodKindForPotentialOperatorOrConversion(opInfo, MethodKind.UserDefinedOperator, WellKnownMemberNames.BitwiseOrOperatorName, False)\n End If\n Case BinaryOperatorKind.LeftShift\n If IdentifierComparison.Equals(Me.Name, WellKnownMemberNames.LeftShiftOperatorName) Then\n Return ComputeMethodKindForPotentialOperatorOrConversion(opInfo, MethodKind.UserDefinedOperator, Nothing, False)\n Else\n Return ComputeMethodKindForPotentialOperatorOrConversion(opInfo, MethodKind.UserDefinedOperator, WellKnownMemberNames.LeftShiftOperatorName, False)\n End If\n Case BinaryOperatorKind.RightShift\n If IdentifierComparison.Equals(Me.Name, WellKnownMemberNames.RightShiftOperatorName) Then\n Return ComputeMethodKindForPotentialOperatorOrConversion(opInfo, MethodKind.UserDefinedOperator, Nothing, False)\n Else\n Return ComputeMethodKindForPotentialOperatorOrConversion(opInfo, MethodKind.UserDefinedOperator, WellKnownMemberNames.RightShiftOperatorName, False)\n End If\n Case Else\n Throw ExceptionUtilities.UnexpectedValue(opInfo.BinaryOperatorKind)\n End Select\n End If\n End Function\n\n Private Function IsPotentialOperatorOrConversion(opInfo As OverloadResolution.OperatorInfo) As Boolean\n Return HasSpecialName AndAlso\n IsShared AndAlso DeclaredAccessibility = Accessibility.Public AndAlso\n Not IsSub AndAlso Arity = 0 AndAlso\n ParameterCount = opInfo.ParamCount\n End Function\n\n Private Function ComputeMethodKindForPotentialOperatorOrConversion(\n opInfo As OverloadResolution.OperatorInfo,\n potentialMethodKind As MethodKind,\n additionalNameOpt As String,\n adjustContendersOfAdditionalName As Boolean\n ) As MethodKind\n Debug.Assert(potentialMethodKind = MethodKind.Conversion OrElse potentialMethodKind = MethodKind.UserDefinedOperator)\n\n Dim result As MethodKind = potentialMethodKind\n Dim inputParams As ImmutableArray(Of ParameterSymbol) = Parameters\n Dim outputType As TypeSymbol = ReturnType\n\n For i As Integer = 0 To If(additionalNameOpt Is Nothing, 0, 1)\n For Each m In _containingType.GetMembers(If(i = 0, Me.Name, additionalNameOpt))\n If m Is Me Then\n Continue For\n End If\n\n If m.Kind <> SymbolKind.Method Then\n Continue For\n End If\n\n Dim contender = TryCast(m, PEMethodSymbol)\n\n If contender Is Nothing OrElse Not contender.IsPotentialOperatorOrConversion(opInfo) Then\n Continue For\n End If\n\n If contender._packedFlags.MethodKindIsPopulated Then\n Select Case contender._packedFlags.MethodKind\n Case MethodKind.Ordinary\n ' Need to check against our method\n Case potentialMethodKind\n If i = 0 OrElse adjustContendersOfAdditionalName Then\n ' Contender was already cleared, so it cannot conflict with this operator.\n Continue For\n End If\n Case Else\n ' Cannot be an operator of the target kind.\n Continue For\n End Select\n End If\n\n If potentialMethodKind = MethodKind.Conversion AndAlso Not outputType.IsSameTypeIgnoringAll(contender.ReturnType) Then\n Continue For\n End If\n\n Dim j As Integer\n For j = 0 To inputParams.Length - 1\n If Not inputParams(j).Type.IsSameTypeIgnoringAll(contender.Parameters(j).Type) Then\n Exit For\n End If\n Next\n\n If j < inputParams.Length Then\n Continue For\n End If\n\n ' Unsupported overloading\n result = MethodKind.Ordinary\n\n ' Mark the contender too.\n If i = 0 OrElse adjustContendersOfAdditionalName Then\n contender._packedFlags.InitializeMethodKind(MethodKind.Ordinary)\n End If\n Next\n Next\n\n Return result\n End Function\n\n Public Overrides ReadOnly Property AssociatedSymbol As Symbol\n Get\n Return _associatedPropertyOrEventOpt\n End Get\n End Property\n\n Public Overrides ReadOnly Property DeclaredAccessibility As Accessibility\n Get\n Dim access As Accessibility = Accessibility.Private\n\n Select Case _flags And MethodAttributes.MemberAccessMask\n Case MethodAttributes.Assembly\n access = Accessibility.Friend\n\n Case MethodAttributes.FamORAssem\n access = Accessibility.ProtectedOrFriend\n\n Case MethodAttributes.FamANDAssem\n access = Accessibility.ProtectedAndFriend\n\n Case MethodAttributes.Private,\n MethodAttributes.PrivateScope\n access = Accessibility.Private\n\n Case MethodAttributes.Public\n access = Accessibility.Public\n\n Case MethodAttributes.Family\n access = Accessibility.Protected\n\n Case Else\n access = Accessibility.Private\n End Select\n\n Return access\n\n End Get\n End Property\n\n Public Overloads Overrides Function GetAttributes() As ImmutableArray(Of VisualBasicAttributeData)\n If Not _packedFlags.IsCustomAttributesPopulated Then\n Dim attributeData As ImmutableArray(Of VisualBasicAttributeData) = Nothing\n Dim containingPEModuleSymbol = DirectCast(ContainingModule(), PEModuleSymbol)\n containingPEModuleSymbol.LoadCustomAttributes(Me.Handle, attributeData)\n Debug.Assert(Not attributeData.IsDefault)\n If Not attributeData.IsEmpty Then\n attributeData = InterlockedOperations.Initialize(AccessUncommonFields()._lazyCustomAttributes, attributeData)\n End If\n\n _packedFlags.SetIsCustomAttributesPopulated()\n Return attributeData\n End If\n\n Dim uncommonFields = _uncommonFields\n If uncommonFields Is Nothing Then\n Return ImmutableArray(Of VisualBasicAttributeData).Empty\n Else\n Dim attributeData = uncommonFields._lazyCustomAttributes\n Return If(attributeData.IsDefault,\n InterlockedOperations.Initialize(uncommonFields._lazyCustomAttributes, ImmutableArray(Of VisualBasicAttributeData).Empty),\n attributeData)\n End If\n End Function\n\n Friend Overrides Function GetCustomAttributesToEmit(compilationState As ModuleCompilationState) As IEnumerable(Of VisualBasicAttributeData)\n Return GetAttributes()\n End Function\n\n Public Overrides ReadOnly Property IsExtensionMethod As Boolean\n Get\n If Not _packedFlags.IsExtensionMethodPopulated Then\n\n Dim result As Boolean = False\n\n If Me.IsShared AndAlso\n Me.ParameterCount > 0 AndAlso\n Me.MethodKind = MethodKind.Ordinary AndAlso\n _containingType.MightContainExtensionMethods AndAlso\n _containingType.ContainingPEModule.Module.HasExtensionAttribute(Me.Handle, ignoreCase:=True) AndAlso\n ValidateGenericConstraintsOnExtensionMethodDefinition() Then\n\n Dim firstParam As ParameterSymbol = Me.Parameters(0)\n\n result = Not (firstParam.IsOptional OrElse firstParam.IsParamArray)\n End If\n\n _packedFlags.InitializeIsExtensionMethod(result)\n End If\n\n Return _packedFlags.IsExtensionMethod\n End Get\n End Property\n\n Public Overrides ReadOnly Property IsExternalMethod As Boolean\n Get\n Return (_flags And MethodAttributes.PinvokeImpl) <> 0 OrElse\n (_implFlags And (MethodImplAttributes.InternalCall Or MethodImplAttributes.Runtime)) <> 0\n End Get\n End Property\n\n Public Overrides Function GetDllImportData() As DllImportData\n If (_flags And MethodAttributes.PinvokeImpl) = 0 Then\n Return Nothing\n End If\n\n ' do not cache the result, the compiler doesn't use this (it's only exposed through public API):\n Return _containingType.ContainingPEModule.Module.GetDllImportData(Me._handle)\n End Function\n\n Friend Overrides Function IsMetadataNewSlot(Optional ignoreInterfaceImplementationChanges As Boolean = False) As Boolean\n Return (_flags And MethodAttributes.NewSlot) <> 0\n End Function\n\n Friend Overrides ReadOnly Property IsExternal As Boolean\n Get\n Return IsExternalMethod OrElse\n (_implFlags And MethodImplAttributes.Runtime) <> 0\n End Get\n End Property\n\n Friend Overrides ReadOnly Property IsAccessCheckedOnOverride As Boolean\n Get\n Return (_flags And MethodAttributes.CheckAccessOnOverride) <> 0\n End Get\n End Property\n\n Friend Overrides ReadOnly Property ReturnValueIsMarshalledExplicitly As Boolean\n Get\n Return _lazySignature.ReturnParam.IsMarshalledExplicitly\n End Get\n End Property\n\n Friend Overrides ReadOnly Property ReturnTypeMarshallingInformation As MarshalPseudoCustomAttributeData\n Get\n Return _lazySignature.ReturnParam.MarshallingInformation\n End Get\n End Property\n\n Friend Overrides ReadOnly Property ReturnValueMarshallingDescriptor As ImmutableArray(Of Byte)\n Get\n Return _lazySignature.ReturnParam.MarshallingDescriptor\n End Get\n End Property\n\n Friend Overrides ReadOnly Property ImplementationAttributes As Reflection.MethodImplAttributes\n Get\n Return CType(_implFlags, Reflection.MethodImplAttributes)\n End Get\n End Property\n\n Friend Overrides ReadOnly Property HasDeclarativeSecurity As Boolean\n Get\n Throw ExceptionUtilities.Unreachable\n End Get\n End Property\n\n Friend Overrides Function GetSecurityInformation() As IEnumerable(Of Microsoft.Cci.SecurityAttribute)\n Throw ExceptionUtilities.Unreachable\n End Function\n\n Private ReadOnly Property Signature As SignatureData\n Get\n Return If(_lazySignature, LoadSignature())\n End Get\n End Property\n\n Public Overrides ReadOnly Property IsVararg As Boolean\n Get\n Return Signature.Header.CallingConvention = SignatureCallingConvention.VarArgs\n End Get\n End Property\n\n Public Overrides ReadOnly Property IsGenericMethod As Boolean\n Get\n Return Me.Arity > 0\n End Get\n End Property\n\n Public Overrides ReadOnly Property Arity As Integer\n Get\n If Me._lazyTypeParameters.IsDefault Then\n Try\n Dim paramCount As Integer = 0\n Dim typeParamCount As Integer = 0\n MetadataDecoder.GetSignatureCountsOrThrow(Me._containingType.ContainingPEModule.Module, Me._handle, paramCount, typeParamCount)\n Return typeParamCount\n Catch mrEx As BadImageFormatException\n Return TypeParameters.Length\n End Try\n Else\n Return Me._lazyTypeParameters.Length\n End If\n End Get\n End Property\n\n Friend ReadOnly Property Handle As MethodDefinitionHandle\n Get\n Return _handle\n End Get\n End Property\n\n Public Overrides ReadOnly Property IsMustOverride As Boolean\n Get\n Return (_flags And MethodAttributes.Virtual) <> 0 AndAlso\n (_flags And MethodAttributes.Abstract) <> 0\n End Get\n End Property\n\n Public Overrides ReadOnly Property IsNotOverridable As Boolean\n Get\n Return (_flags And\n (MethodAttributes.Virtual Or\n MethodAttributes.Final Or\n MethodAttributes.Abstract Or\n MethodAttributes.NewSlot)) =\n (MethodAttributes.Virtual Or MethodAttributes.Final)\n End Get\n End Property\n\n Public Overrides ReadOnly Property IsOverloads As Boolean\n Get\n Return (_flags And MethodAttributes.HideBySig) <> 0 OrElse\n IsOverrides ' If overrides is present, then Overloads is implicit\n\n ' The check for IsOverrides is needed because of bug Dev10 #850631,\n ' VB compiler doesn't emit HideBySig flag for overriding methods that \n ' aren't marked explicitly with Overrides modifier.\n End Get\n End Property\n\n Friend Overrides ReadOnly Property IsHiddenBySignature As Boolean\n Get\n Return (_flags And MethodAttributes.HideBySig) <> 0\n End Get\n End Property\n\n Public Overrides ReadOnly Property IsOverridable As Boolean\n Get\n Dim flagsToCheck = (_flags And\n (MethodAttributes.Virtual Or\n MethodAttributes.Final Or\n MethodAttributes.Abstract Or\n MethodAttributes.NewSlot))\n\n Return flagsToCheck = (MethodAttributes.Virtual Or MethodAttributes.NewSlot) OrElse\n (flagsToCheck = MethodAttributes.Virtual AndAlso _containingType.BaseTypeNoUseSiteDiagnostics Is Nothing)\n End Get\n End Property\n\n Public Overrides ReadOnly Property IsOverrides As Boolean\n Get\n ' ECMA-335 \n ' 10.3.1 Introducing a virtual method\n ' If the definition is not marked newslot, the definition creates a new virtual method only \n ' if there is not virtual method of the same name and signature inherited from a base class.\n '\n ' This means that a virtual method without NewSlot flag in a type that doesn't have a base\n ' is a new virtual method and doesn't override anything.\n Return (_flags And MethodAttributes.Virtual) <> 0 AndAlso\n (_flags And MethodAttributes.NewSlot) = 0 AndAlso\n _containingType.BaseTypeNoUseSiteDiagnostics IsNot Nothing\n End Get\n End Property\n\n Public Overrides ReadOnly Property IsShared As Boolean\n Get\n Return (_flags And MethodAttributes.Static) <> 0\n End Get\n End Property\n\n Public Overrides ReadOnly Property IsSub As Boolean\n Get\n Return Me.ReturnType.SpecialType = SpecialType.System_Void\n End Get\n End Property\n\n Public Overrides ReadOnly Property IsAsync As Boolean\n Get\n Return False\n End Get\n End Property\n\n Public Overrides ReadOnly Property IsIterator As Boolean\n Get\n Return False\n End Get\n End Property\n\n Public Overrides ReadOnly Property Locations As ImmutableArray(Of Location)\n Get\n Return StaticCast(Of Location).From(_containingType.ContainingPEModule.MetadataLocation)\n End Get\n End Property\n\n Public Overrides ReadOnly Property DeclaringSyntaxReferences As ImmutableArray(Of SyntaxReference)\n Get\n Return ImmutableArray(Of SyntaxReference).Empty\n End Get\n End Property\n\n Friend Overrides ReadOnly Property ParameterCount As Integer\n Get\n If Me._lazySignature Is Nothing Then\n Try\n Dim paramCount As Integer = 0\n Dim typeParamCount As Integer = 0\n MetadataDecoder.GetSignatureCountsOrThrow(Me._containingType.ContainingPEModule.Module, Me._handle, paramCount, typeParamCount)\n Return paramCount\n Catch mrEx As BadImageFormatException\n Return Parameters.Length\n End Try\n Else\n Return Me._lazySignature.Parameters.Length\n End If\n End Get\n End Property\n\n Public Overrides ReadOnly Property Parameters As ImmutableArray(Of ParameterSymbol)\n Get\n Return Signature.Parameters\n End Get\n End Property\n\n Public Overrides ReadOnly Property ReturnsByRef As Boolean\n Get\n Return Signature.ReturnParam.IsByRef\n End Get\n End Property\n\n Public Overrides ReadOnly Property ReturnType As TypeSymbol\n Get\n Return Signature.ReturnParam.Type\n End Get\n End Property\n\n Public Overrides ReadOnly Property ReturnTypeCustomModifiers As ImmutableArray(Of CustomModifier)\n Get\n Return Signature.ReturnParam.CustomModifiers\n End Get\n End Property\n\n Public Overrides ReadOnly Property RefCustomModifiers As ImmutableArray(Of CustomModifier)\n Get\n Return Signature.ReturnParam.RefCustomModifiers\n End Get\n End Property\n\n Public Overrides Function GetReturnTypeAttributes() As ImmutableArray(Of VisualBasicAttributeData)\n Return Signature.ReturnParam.GetAttributes()\n End Function\n\n Friend ReadOnly Property ReturnParam As PEParameterSymbol\n Get\n Return Signature.ReturnParam\n End Get\n End Property\n\n ''' \n ''' Associate the method with a particular property. Returns\n ''' false if the method is already associated with a property or event.\n ''' <\/summary>\n Friend Function SetAssociatedProperty(propertySymbol As PEPropertySymbol, methodKind As MethodKind) As Boolean\n Debug.Assert((methodKind = MethodKind.PropertyGet) OrElse (methodKind = MethodKind.PropertySet))\n Return Me.SetAssociatedPropertyOrEvent(propertySymbol, methodKind)\n End Function\n\n ''' \n ''' Associate the method with a particular event. Returns\n ''' false if the method is already associated with a property or event.\n ''' <\/summary>\n Friend Function SetAssociatedEvent(eventSymbol As PEEventSymbol, methodKind As MethodKind) As Boolean\n Debug.Assert((methodKind = MethodKind.EventAdd) OrElse (methodKind = MethodKind.EventRemove) OrElse (methodKind = MethodKind.EventRaise))\n Return Me.SetAssociatedPropertyOrEvent(eventSymbol, methodKind)\n End Function\n\n Private Function SetAssociatedPropertyOrEvent(propertyOrEventSymbol As Symbol, methodKind As MethodKind) As Boolean\n If Me._associatedPropertyOrEventOpt Is Nothing Then\n Debug.Assert(propertyOrEventSymbol.ContainingType = Me.ContainingType)\n Me._associatedPropertyOrEventOpt = propertyOrEventSymbol\n _packedFlags.MethodKind = methodKind\n Return True\n End If\n\n Return False\n End Function\n\n Private Function LoadSignature() As SignatureData\n\n Dim moduleSymbol = _containingType.ContainingPEModule\n\n Dim signatureHeader As SignatureHeader\n Dim mrEx As BadImageFormatException = Nothing\n Dim paramInfo() As ParamInfo(Of TypeSymbol) =\n (New MetadataDecoder(moduleSymbol, Me)).GetSignatureForMethod(_handle, signatureHeader, mrEx)\n\n ' If method is not generic, let's assign empty list for type parameters\n If Not signatureHeader.IsGeneric() AndAlso\n _lazyTypeParameters.IsDefault Then\n ImmutableInterlocked.InterlockedInitialize(_lazyTypeParameters,\n ImmutableArray(Of TypeParameterSymbol).Empty)\n End If\n\n Dim count As Integer = paramInfo.Length - 1\n Dim params As ImmutableArray(Of ParameterSymbol)\n Dim isBad As Boolean\n Dim hasBadParameter As Boolean = False\n\n If count > 0 Then\n Dim builder = ImmutableArray.CreateBuilder(Of ParameterSymbol)(count)\n For i As Integer = 0 To count - 1 Step 1\n builder.Add(PEParameterSymbol.Create(moduleSymbol, Me, i, paramInfo(i + 1), isBad))\n\n If isBad Then\n hasBadParameter = True\n End If\n Next\n\n params = builder.ToImmutable()\n Else\n params = ImmutableArray(Of ParameterSymbol).Empty\n End If\n\n ' paramInfo(0) contains information about return \"parameter\"\n Dim returnParam = PEParameterSymbol.Create(moduleSymbol, Me, 0, paramInfo(0), isBad)\n\n If mrEx IsNot Nothing OrElse hasBadParameter OrElse isBad Then\n InitializeUseSiteErrorInfo(ErrorFactory.ErrorInfo(ERRID.ERR_UnsupportedMethod1, CustomSymbolDisplayFormatter.ShortErrorName(Me)))\n End If\n\n Dim signature As New SignatureData(signatureHeader, params, returnParam)\n\n Return InterlockedOperations.Initialize(_lazySignature, signature)\n End Function\n\n Public Overrides ReadOnly Property TypeParameters As ImmutableArray(Of TypeParameterSymbol)\n Get\n Dim errorInfo As DiagnosticInfo = Nothing\n EnsureTypeParametersAreLoaded(errorInfo)\n Dim typeParams = EnsureTypeParametersAreLoaded(errorInfo)\n If errorInfo IsNot Nothing Then\n InitializeUseSiteErrorInfo(errorInfo)\n End If\n Return typeParams\n End Get\n End Property\n\n Public Overrides ReadOnly Property TypeArguments As ImmutableArray(Of TypeSymbol)\n Get\n If IsGenericMethod Then\n Return StaticCast(Of TypeSymbol).From(Me.TypeParameters)\n Else\n Return ImmutableArray(Of TypeSymbol).Empty\n End If\n End Get\n End Property\n\n Private Function EnsureTypeParametersAreLoaded(ByRef errorInfo As DiagnosticInfo) As ImmutableArray(Of TypeParameterSymbol)\n Dim typeParams = _lazyTypeParameters\n If Not typeParams.IsDefault Then\n Return typeParams\n End If\n\n Return InterlockedOperations.Initialize(_lazyTypeParameters, LoadTypeParameters(errorInfo))\n End Function\n\n Private Function LoadTypeParameters(ByRef errorInfo As DiagnosticInfo) As ImmutableArray(Of TypeParameterSymbol)\n\n Try\n Dim moduleSymbol = _containingType.ContainingPEModule\n Dim gpHandles = moduleSymbol.Module.GetGenericParametersForMethodOrThrow(_handle)\n\n\n If gpHandles.Count = 0 Then\n Return ImmutableArray(Of TypeParameterSymbol).Empty\n Else\n Dim ownedParams = ImmutableArray.CreateBuilder(Of TypeParameterSymbol)(gpHandles.Count)\n For i = 0 To gpHandles.Count - 1\n ownedParams.Add(New PETypeParameterSymbol(moduleSymbol, Me, CUShort(i), gpHandles(i)))\n Next\n\n Return ownedParams.ToImmutable()\n End If\n Catch mrEx As BadImageFormatException\n errorInfo = ErrorFactory.ErrorInfo(ERRID.ERR_UnsupportedMethod1, CustomSymbolDisplayFormatter.ShortErrorName(Me))\n Return ImmutableArray(Of TypeParameterSymbol).Empty\n End Try\n\n End Function\n\n Friend Overrides ReadOnly Property CallingConvention As Cci.CallingConvention\n Get\n Return CType(Signature.Header.RawValue, Cci.CallingConvention)\n End Get\n End Property\n\n Public Overrides ReadOnly Property ExplicitInterfaceImplementations As ImmutableArray(Of MethodSymbol)\n Get\n If Not _lazyExplicitMethodImplementations.IsDefault Then\n Return _lazyExplicitMethodImplementations\n End If\n\n Dim moduleSymbol = _containingType.ContainingPEModule\n\n ' Context: we need the containing type of this method as context so that we can substitute appropriately into\n ' any generic interfaces that we might be explicitly implementing. There is no reason to pass in the method\n ' context, however, because any method type parameters will belong to the implemented (i.e. interface) method,\n ' which we do not yet know.\n Dim explicitlyOverriddenMethods = New MetadataDecoder(\n moduleSymbol,\n _containingType).GetExplicitlyOverriddenMethods(_containingType.Handle, Me._handle, Me.ContainingType)\n\n 'avoid allocating a builder in the common case\n Dim anyToRemove = False\n For Each method In explicitlyOverriddenMethods\n If Not method.ContainingType.IsInterface Then\n anyToRemove = True\n Exit For\n End If\n\n Next\n\n Dim explicitImplementations = explicitlyOverriddenMethods\n If anyToRemove Then\n Dim explicitInterfaceImplementationsBuilder = ArrayBuilder(Of MethodSymbol).GetInstance()\n For Each method In explicitlyOverriddenMethods\n If method.ContainingType.IsInterface Then\n explicitInterfaceImplementationsBuilder.Add(method)\n End If\n\n Next\n\n explicitImplementations = explicitInterfaceImplementationsBuilder.ToImmutableAndFree()\n End If\n\n Return InterlockedOperations.Initialize(_lazyExplicitMethodImplementations, explicitImplementations)\n End Get\n\n End Property\n\n\n Public Overrides Function GetDocumentationCommentXml(Optional preferredCulture As CultureInfo = Nothing, Optional expandIncludes As Boolean = False, Optional cancellationToken As CancellationToken = Nothing) As String\n ' Note: m_lazyDocComment is passed ByRef\n Return PEDocumentationCommentUtils.GetDocumentationComment(\n Me, _containingType.ContainingPEModule, preferredCulture, cancellationToken, AccessUncommonFields()._lazyDocComment)\n End Function\n\n Friend Overrides ReadOnly Property Syntax As SyntaxNode\n Get\n Return Nothing\n End Get\n End Property\n\n Friend Overrides Function GetUseSiteErrorInfo() As DiagnosticInfo\n If Not _packedFlags.IsUseSiteDiagnosticPopulated Then\n Dim errorInfo As DiagnosticInfo = CalculateUseSiteErrorInfo()\n EnsureTypeParametersAreLoaded(errorInfo)\n Return InitializeUseSiteErrorInfo(errorInfo)\n End If\n\n Return _uncommonFields?._lazyUseSiteErrorInfo\n End Function\n\n Private Function InitializeUseSiteErrorInfo(errorInfo As DiagnosticInfo) As DiagnosticInfo\n If _packedFlags.IsUseSiteDiagnosticPopulated Then\n Return _uncommonFields?._lazyUseSiteErrorInfo\n End If\n\n If errorInfo IsNot Nothing Then\n Debug.Assert(errorInfo IsNot ErrorFactory.EmptyErrorInfo)\n errorInfo = InterlockedOperations.Initialize(AccessUncommonFields()._lazyUseSiteErrorInfo, errorInfo)\n End If\n\n _packedFlags.SetIsUseSiteDiagnosticPopulated()\n Return errorInfo\n End Function\n\n Friend Overrides ReadOnly Property ObsoleteAttributeData As ObsoleteAttributeData\n Get\n If Not _packedFlags.IsObsoleteAttributePopulated Then\n Dim result = ObsoleteAttributeHelpers.GetObsoleteDataFromMetadata(_handle, DirectCast(ContainingModule, PEModuleSymbol))\n If result IsNot Nothing Then\n result = InterlockedOperations.Initialize(AccessUncommonFields()._lazyObsoleteAttributeData, result, ObsoleteAttributeData.Uninitialized)\n End If\n\n _packedFlags.SetIsObsoleteAttributePopulated()\n Return result\n End If\n\n Dim uncommonFields = _uncommonFields\n If uncommonFields Is Nothing Then\n Return Nothing\n Else\n Dim result = uncommonFields._lazyObsoleteAttributeData\n Return If(result Is ObsoleteAttributeData.Uninitialized,\n InterlockedOperations.Initialize(uncommonFields._lazyObsoleteAttributeData, Nothing, ObsoleteAttributeData.Uninitialized),\n result)\n End If\n End Get\n End Property\n\n Friend Overrides Function GetAppliedConditionalSymbols() As ImmutableArray(Of String)\n If Not _packedFlags.IsConditionalPopulated Then\n Dim moduleSymbol As PEModuleSymbol = _containingType.ContainingPEModule\n Dim conditionalSymbols As ImmutableArray(Of String) = moduleSymbol.Module.GetConditionalAttributeValues(_handle)\n Debug.Assert(Not conditionalSymbols.IsDefault)\n If Not conditionalSymbols.IsEmpty Then\n conditionalSymbols = InterlockedOperations.Initialize(AccessUncommonFields()._lazyConditionalAttributeSymbols, conditionalSymbols)\n End If\n\n _packedFlags.SetIsConditionalAttributePopulated()\n Return conditionalSymbols\n End If\n\n Dim uncommonFields = _uncommonFields\n If uncommonFields Is Nothing Then\n Return ImmutableArray(Of String).Empty\n Else\n Dim result = uncommonFields._lazyConditionalAttributeSymbols\n Return If(result.IsDefault,\n InterlockedOperations.Initialize(uncommonFields._lazyConditionalAttributeSymbols, ImmutableArray(Of String).Empty),\n result)\n End If\n End Function\n\n ''' \n ''' This is for perf, not for correctness.\n ''' <\/remarks>\n Friend Overrides ReadOnly Property DeclaringCompilation As VisualBasicCompilation\n Get\n Return Nothing\n End Get\n End Property\n\n Friend Overrides Function TryGetMeParameter( ByRef meParameter As ParameterSymbol) As Boolean\n If IsShared Then\n meParameter = Nothing\n Else\n meParameter = If(_uncommonFields?._lazyMeParameter, InterlockedOperations.Initialize(AccessUncommonFields()._lazyMeParameter, New MeParameterSymbol(Me)))\n End If\n Return True\n End Function\n\n Friend Overrides ReadOnly Property GenerateDebugInfoImpl As Boolean\n Get\n Return False\n End Get\n End Property\n\n Friend Overrides Function CalculateLocalSyntaxOffset(localPosition As Integer, localTree As SyntaxTree) As Integer\n Throw ExceptionUtilities.Unreachable\n End Function\n End Class\n\nEnd Namespace\n","avg_line_length":45.0050251256,"max_line_length":225,"alphanum_fraction":0.6208128629} {"size":3651,"ext":"frm","lang":"Visual Basic","max_stars_count":null,"content":"TYPE=VIEW\nquery=select if(isnull(`performance_schema`.`accounts`.`HOST`),\\'background\\',`performance_schema`.`accounts`.`HOST`) AS `host`,sum(`stmt`.`total`) AS `statements`,sum(`stmt`.`total_latency`) AS `statement_latency`,(sum(`stmt`.`total_latency`) \/ sum(`stmt`.`total`)) AS `statement_avg_latency`,sum(`stmt`.`full_scans`) AS `table_scans`,sum(`io`.`ios`) AS `file_ios`,sum(`io`.`io_latency`) AS `file_io_latency`,sum(`performance_schema`.`accounts`.`CURRENT_CONNECTIONS`) AS `current_connections`,sum(`performance_schema`.`accounts`.`TOTAL_CONNECTIONS`) AS `total_connections`,count(distinct `performance_schema`.`accounts`.`USER`) AS `unique_users`,sum(`mem`.`current_allocated`) AS `current_memory`,sum(`mem`.`total_allocated`) AS `total_memory_allocated` from (((`performance_schema`.`accounts` join `sys`.`x$host_summary_by_statement_latency` `stmt` on((`performance_schema`.`accounts`.`HOST` = `stmt`.`host`))) join `sys`.`x$host_summary_by_file_io` `io` on((`performance_schema`.`accounts`.`HOST` = `io`.`host`))) join `sys`.`x$memory_by_host_by_current_bytes` `mem` on((`performance_schema`.`accounts`.`HOST` = `mem`.`host`))) group by if(isnull(`performance_schema`.`accounts`.`HOST`),\\'background\\',`performance_schema`.`accounts`.`HOST`)\nmd5=f66f55631884ccf08c40d226be32f1b0\nupdatable=0\nalgorithm=1\ndefiner_user=mysql.sys\ndefiner_host=localhost\nsuid=0\nwith_check_option=0\ntimestamp=2020-03-17 06:09:35\ncreate-version=1\nsource=SELECT IF(accounts.host IS NULL, \\'background\\', accounts.host) AS host, SUM(stmt.total) AS statements, SUM(stmt.total_latency) AS statement_latency, SUM(stmt.total_latency) \/ SUM(stmt.total) AS statement_avg_latency, SUM(stmt.full_scans) AS table_scans, SUM(io.ios) AS file_ios, SUM(io.io_latency) AS file_io_latency, SUM(accounts.current_connections) AS current_connections, SUM(accounts.total_connections) AS total_connections, COUNT(DISTINCT accounts.user) AS unique_users, SUM(mem.current_allocated) AS current_memory, SUM(mem.total_allocated) AS total_memory_allocated FROM performance_schema.accounts JOIN sys.x$host_summary_by_statement_latency AS stmt ON accounts.host = stmt.host JOIN sys.x$host_summary_by_file_io AS io ON accounts.host = io.host JOIN sys.x$memory_by_host_by_current_bytes mem ON accounts.host = mem.host GROUP BY IF(accounts.host IS NULL, \\'background\\', accounts.host)\nclient_cs_name=utf8\nconnection_cl_name=utf8_general_ci\nview_body_utf8=select if(isnull(`performance_schema`.`accounts`.`HOST`),\\'background\\',`performance_schema`.`accounts`.`HOST`) AS `host`,sum(`stmt`.`total`) AS `statements`,sum(`stmt`.`total_latency`) AS `statement_latency`,(sum(`stmt`.`total_latency`) \/ sum(`stmt`.`total`)) AS `statement_avg_latency`,sum(`stmt`.`full_scans`) AS `table_scans`,sum(`io`.`ios`) AS `file_ios`,sum(`io`.`io_latency`) AS `file_io_latency`,sum(`performance_schema`.`accounts`.`CURRENT_CONNECTIONS`) AS `current_connections`,sum(`performance_schema`.`accounts`.`TOTAL_CONNECTIONS`) AS `total_connections`,count(distinct `performance_schema`.`accounts`.`USER`) AS `unique_users`,sum(`mem`.`current_allocated`) AS `current_memory`,sum(`mem`.`total_allocated`) AS `total_memory_allocated` from (((`performance_schema`.`accounts` join `sys`.`x$host_summary_by_statement_latency` `stmt` on((`performance_schema`.`accounts`.`HOST` = `stmt`.`host`))) join `sys`.`x$host_summary_by_file_io` `io` on((`performance_schema`.`accounts`.`HOST` = `io`.`host`))) join `sys`.`x$memory_by_host_by_current_bytes` `mem` on((`performance_schema`.`accounts`.`HOST` = `mem`.`host`))) group by if(isnull(`performance_schema`.`accounts`.`HOST`),\\'background\\',`performance_schema`.`accounts`.`HOST`)\n","avg_line_length":228.1875,"max_line_length":1253,"alphanum_fraction":0.7693782525} {"size":2815,"ext":"vb","lang":"Visual Basic","max_stars_count":null,"content":"\ufeffPublic Class frmAnalytics\r\n Dim ticketClass(886) As Integer, gender(886) As String, fullName(886) As String, age(886) As Integer, farePaid(886) As String, survivalStatus(886) As Boolean\r\n Dim numberOfPassengers As Integer\r\n\r\n Private Sub btnLoadData_Click(sender As Object, e As EventArgs) Handles btnLoadData.Click\r\n FileOpen(1, \"Titanic.csv\", OpenMode.Input)\r\n\r\n numberOfPassengers = 0\r\n Do While Not EOF(1)\r\n Input(1, ticketClass(numberOfPassengers))\r\n Input(1, gender(numberOfPassengers))\r\n Input(1, fullName(numberOfPassengers))\r\n Input(1, age(numberOfPassengers))\r\n Input(1, farePaid(numberOfPassengers))\r\n Input(1, survivalStatus(numberOfPassengers))\r\n\r\n outResults.AppendText(ticketClass(numberOfPassengers) & \" \" & gender(numberOfPassengers) & \" \" & fullName(numberOfPassengers) & \" \" & _\r\n age(numberOfPassengers) & \" \" & farePaid(numberOfPassengers) & \" \" & survivalStatus(numberOfPassengers) & vbNewLine)\r\n\r\n numberOfPassengers = numberOfPassengers + 1\r\n Loop\r\n\r\n FileClose(1)\r\n\r\n outResults.AppendText(\"-----\" & vbNewLine)\r\n outResults.AppendText(\"Total passengers in file: \" & numberOfPassengers)\r\n End Sub\r\n\r\n Private Sub btnSearchByName_Click(sender As Object, e As EventArgs) Handles btnSearchByName.Click\r\n Dim i As Integer, searchName As String, survivedString As String, found As Boolean, foundIndex As Integer\r\n\r\n searchName = InputBox(\"Enter the name of a passenger to search for:\")\r\n\r\n i = 0\r\n found = False\r\n Do While i < numberOfPassengers And Not found\r\n If fullName(i) = searchName Then\r\n found = True\r\n foundIndex = i\r\n End If\r\n i = i + 1\r\n Loop\r\n\r\n If found Then\r\n If survivalStatus(foundIndex) Then\r\n survivedString = \"SURVIVED\"\r\n Else\r\n survivedString = \"DIED\"\r\n End If\r\n\r\n outResults.Text = fullName(foundIndex) & \" \" & ticketClass(foundIndex) & \" \" & age(foundIndex) & \" \" & farePaid(foundIndex) & \" \" & survivedString\r\n Else\r\n outResults.Text = searchName & \" PRODUCED NO MATCHES\"\r\n End If\r\n End Sub\r\n\r\n Private Sub btnPlotByGender_Click(sender As Object, e As EventArgs) Handles btnPlotByGender.Click\r\n\r\n End Sub\r\n\r\n Private Sub btnPlotByClass_Click(sender As Object, e As EventArgs) Handles btnPlotByClass.Click\r\n\r\n End Sub\r\n\r\n Private Sub btnPlotByBoth_Click(sender As Object, e As EventArgs) Handles btnPlotByBoth.Click\r\n\r\n End Sub\r\n\r\n Private Sub btnQuit_Click(sender As Object, e As EventArgs) Handles btnQuit.Click\r\n End\r\n End Sub\r\nEnd Class\r\n","avg_line_length":38.5616438356,"max_line_length":162,"alphanum_fraction":0.6269982238} {"size":7526,"ext":"vb","lang":"Visual Basic","max_stars_count":null,"content":"\ufeff'\r\n' Created by SharpDevelop.\r\n' User: Media\r\n' Date: 8\/14\/2013\r\n' Time: 9:28 AM\r\n' \r\n' To change this template use Tools | Options | Coding | Edit Standard Headers.\r\n'\r\nPublic Partial Class frmSources\r\n\t\r\n\tPrivate tblSources As Data.DataTable\r\n\tPrivate ds As DataSet\r\n\t\r\n\tPublic Sub New()\r\n\r\n\t\tMe.InitializeComponent()\r\n\t\tMe.CboDBTypeSelectedValueChanged(Me, Nothing)\r\n\t\tds = New DataSet\r\n\t\tTry\r\n\t\t\tds.ReadXmlSchema(AppDomain.CurrentDomain.BaseDirectory & \"SavedConnections.xsd\")\r\n\t\t\ttblSources = ds.Tables(\"Connections\")\r\n\t\t\ttblSources.ReadXml(AppDomain.CurrentDomain.BaseDirectory & \"SavedConnections.xml\")\r\n\t\tCatch ex As Exception\r\n\t\t\t'if we can't load, no biggie\r\n\t\tEnd Try\r\n\t\t\r\n\t\t'setup binding\r\n\t\tMe.lstConnections.DataSource = tblSources\r\n\t\tMe.lstConnections.DisplayMember = \"ConnectionName\"\r\n\t\tMe.lstConnections.ValueMember = \"ConnectionName\"\r\n\t\t\r\n\t\t'load our settings for active database\r\n\t \tMe.txtDatabase.Text = My.Settings.Database\r\n Me.txtPW.Text = My.Settings.Password\r\n Me.txtServer.Text = My.Settings.Server\r\n Me.txtUser.Text = My.Settings.User\r\n Me.txtTimeout.Value = My.Settings.Timeout\r\n Me.txtSDF.Text = My.Settings.SDFFile\r\n Me.cboDBType.Text = My.Settings.DBType\r\n Me.txtSDFPW.Text = My.Settings.SDFPW\r\n Me.txtConnectionName.Text = My.Settings.CurrentDatabase\r\n \r\n If My.Settings.EMailAddr = \"\" Then\r\n \tMe.txtEMail.Text = \"EMail goes here\"\r\n \tElse\r\n \t \tMe.txtEMail.Text = My.Settings.EMailAddr\r\n \tend if\r\n\t\t\r\n\t\t'if there's no currently saved database and we've imported one, let's save it.\r\n\t\tButton2Click(Me, Nothing, False)\r\n\t\t\r\n\t\t'try to set the currently active database\r\n\t\tMe.lstConnections.Text = My.Settings.CurrentDatabase\r\n\t\t\r\n\r\n\tEnd Sub\r\n\t\r\n\tSub CboDBTypeSelectedValueChanged(sender As Object, e As EventArgs)\r\n\t\t\r\n\t\t\r\n If Me.cboDBType.Text = \"SQL Server\" Then\r\n Me.grpSQL.Enabled = True\r\n Me.txtSDF.Enabled = False\r\n Me.btnFileChoose.Enabled = False\r\n Me.txtSDFPW.Enabled = False\r\n Else\r\n Me.grpSQL.Enabled = False\r\n Me.txtSDF.Enabled = True\r\n Me.btnFileChoose.Enabled = True\r\n Me.txtSDFPW.Enabled = True\r\n End If\r\n \r\n\tEnd Sub\r\n\t\r\n\tSub Button2Click(sender As Object, e As EventArgs, Optional showErrors As Boolean = True)\r\n\t\t\r\n Dim fieldEmpty As Boolean\r\n fieldEmpty = False\r\n\r\n\t\tIf Me.cboDBType.Text = \"SQL Server\" Then\r\n\t\t\tIf Me.txtConnectionName.Text = Nothing Then fieldEmpty = true\r\n If Me.txtDatabase.Text = Nothing Then fieldEmpty = True\r\n If Me.txtPW.Text = Nothing Then fieldEmpty = True\r\n If Me.txtServer.Text = Nothing Then fieldEmpty = True\r\n If Me.txtUser.Text = Nothing Then fieldEmpty = True\r\n If Me.txtTimeout.Value = Nothing Then fieldEmpty = True\r\n Else\r\n If Me.txtSDF.Text = Nothing Then fieldEmpty = True\r\n End If\r\n\r\n If fieldEmpty Then\r\n If showErrors Then MsgBox(\"Please fill in all fields\")\r\n Exit Sub\r\n End If\r\n \r\n Dim rowFound As Boolean = false\r\n\t Dim foundRows() As DataRow \r\n\t Try\r\n \tfoundRows = tblSources.Select(\"ConnectionName = '\" & Me.txtConnectionName.Text & \"'\") \t\r\n \trowFound = true\r\n Catch ex As Exception\r\n End Try\r\n \r\n If foundRows.Length > 0 Then\r\n \tfoundRows(0).BeginEdit\r\n foundRows(0).Item(\"DBType\") = Me.cboDBType.Text\r\n foundRows(0).Item(\"Server\") = Me.txtServer.Text\r\n foundRows(0).Item(\"User\") = Me.txtUser.text\r\n foundRows(0).Item(\"Password\") = Me.txtPW.Text\r\n foundRows(0).Item(\"Timeout\") = Me.txtTimeout.Text\r\n foundRows(0).Item(\"Path\") = Me.txtSDF.Text\r\n foundRows(0).Item(\"FilePassword\") = Me.txtSDFPW.Text\r\n foundRows(0).Item(\"Database\") = Me.txtDatabase.Text\r\n foundRows(0).Item(\"ConnectionName\") = Me.txtConnectionName.Text\r\n foundRows(0).EndEdit \t\r\n Else\r\n \tDim newConnRow As DataRow = tblSources.NewRow()\r\n\r\n\t\t\tnewConnRow(\"DBType\") = Me.cboDBType.Text\r\n\t\t\tnewConnRow(\"Server\") = Me.txtServer.Text\r\n\t\t\tnewConnRow(\"User\") = Me.txtUser.Text\r\n\t\t\tnewConnRow(\"Password\") = Me.txtPW.Text\r\n\t\t\tnewConnRow(\"Timeout\") = Me.txtTimeout.Text\r\n\t\t\tnewConnRow(\"Path\") = Me.txtSDF.Text\r\n\t\t\tnewConnRow(\"FilePassword\") = Me.txtSDFPW.Text\r\n\t\t\tnewConnRow(\"Database\") = Me.txtDatabase.Text\r\n\t\t\tnewConnRow(\"ConnectionName\") = Me.txtConnectionName.Text\r\n\r\n\t\t\ttblSources.Rows.Add(newConnRow)\r\n \t\r\n End If\r\n \r\n Me.lstConnections.Refresh\r\n Me.lstConnections.SelectedValue = Me.txtConnectionName.text\r\n My.Settings.EMailAddr = Me.txtEMail.Text\r\n\t\tMy.Settings.Save()\r\n \r\n ds.WriteXml(AppDomain.CurrentDomain.BaseDirectory & \"SavedConnections.xml\")\r\n\t\r\n\tEnd Sub\r\n\t\r\n\tSub BtnDeleteClick(sender As Object, e As EventArgs)\r\n\t\t\r\n\t\tTry\r\n\t\t\t\r\n\t\t\ttblSources.Rows.Remove(tblSources.Select(\"ConnectionName = '\" & Me.lstConnections.Text & \"'\")(0))\r\n\t\t\tMe.lstConnections.SelectedIndex = 0\r\n\t\tCatch ex As exception\r\n\t\tEnd Try\r\n\t\t\r\n\t\tMe.lstConnections.Refresh\r\n\t\tds.WriteXml(AppDomain.CurrentDomain.BaseDirectory & \"SavedConnections.xml\")\r\n\t\t\r\n\tEnd Sub\r\n\t\r\n\t\r\n\t\r\n\tSub BtnFileChooseClick(sender As Object, e As EventArgs)\r\n\t\t\r\n\t\t\r\n Dim fd As New OpenFileDialog\r\n\r\n With fd\r\n .Multiselect = False\r\n End With\r\n\r\n fd.ShowDialog()\r\n\r\n\t\tMe.txtSDF.Text = fd.FileName\r\n\r\n\tEnd Sub\r\n\t\r\n\t\r\n\tSub LstConnectionsSelectedValueChanged(sender As Object, e As EventArgs)\r\n\t\t\r\n\t\ttry\r\n\t\t\tDim dr As DataRow() = tblSources.Select(\"ConnectionName = '\" & Me.lstConnections.Text & \"'\")\r\n\t\t\t\r\n\t\t\tMe.txtConnectionName.Text = dr(0).Item(\"ConnectionName\")\r\n\t\t\tMe.txtDatabase.Text = dr(0).Item(\"Database\")\r\n\t\t\tMe.txtPW.Text = dr(0).Item(\"Password\")\r\n\t\t\tMe.txtSDF.Text = dr(0).Item(\"Path\")\r\n\t\t\tMe.txtSDFPW.Text = dr(0).Item(\"FilePassword\")\r\n\t\t\tMe.txtServer.Text = dr(0).Item(\"Server\")\r\n\t\t\tMe.txtTimeout.Text = dr(0).Item(\"Timeout\")\r\n\t\t\tMe.txtUser.Text = dr(0).Item(\"User\")\r\n\t\t\tMe.cboDBType.Text = dr(0).Item(\"DBType\")\r\n\t\tCatch ex As Exception\r\n\t\t\t'fail quietly please\r\n\t\tEnd Try\r\n\t\t\r\n\tEnd Sub\r\n\t\r\n\tSub BtnNewClick(sender As Object, e As EventArgs)\r\n\t\t\r\n\t\t\tMe.txtConnectionName.Text = Nothing\r\n\t\t\tMe.txtDatabase.Text = Nothing\r\n\t\t\tMe.txtPW.Text = Nothing\r\n\t\t\tMe.txtSDF.Text = Nothing\r\n\t\t\tMe.txtSDFPW.Text = Nothing\r\n\t\t\tMe.txtServer.Text = Nothing\r\n\t\t\tMe.txtTimeout.Text = 500\r\n\t\t\tMe.txtUser.Text = Nothing\r\n\r\n\t\t\r\n\tEnd Sub\r\n\t\r\n\tSub BtnSaveUseClick(sender As Object, e As EventArgs)\r\n\t\t\r\n\t\tButton2Click(Me, Nothing)\r\n\t\t\r\n My.Settings.Database = Me.txtDatabase.Text\r\n My.Settings.Password = Me.txtPW.Text\r\n My.Settings.Server = Me.txtServer.Text\r\n My.Settings.User = Me.txtUser.Text\r\n My.Settings.Timeout = Me.txtTimeout.Value\r\n My.Settings.SDFFile = Me.txtSDF.Text\r\n My.Settings.DBType = Me.cboDBType.Text\r\n My.Settings.SDFPW = Me.txtSDFPW.Text\r\n My.Settings.CurrentDatabase = Me.txtConnectionName.Text\r\n My.Settings.EMailAddr = Me.txtEMail.Text\r\n\r\n My.Settings.Save()\r\n\r\n If frmMain.testConnection() = False Then\r\n MsgBox(\"Could not connect to database\")\r\n End If\r\n \r\n\r\n Me.Close()\r\n\t\t\r\n\tEnd Sub\r\n\r\n\t\r\n\tSub LstConnectionsDoubleClick(sender As Object, e As EventArgs)\r\n\t\t\r\n\t\tBtnSaveUseClick(Me, Nothing)\r\n\t\t\r\n\tEnd Sub\r\n\t\r\nEnd Class\r\n","avg_line_length":31.0991735537,"max_line_length":104,"alphanum_fraction":0.6307467446} {"size":2722,"ext":"vb","lang":"Visual Basic","max_stars_count":null,"content":"\ufeff'------------------------------------------------------------------------------\n' \n' This code was generated by a tool.\n' Runtime Version:4.0.30319.0\n'\n' Changes to this file may cause incorrect behavior and will be lost if\n' the code is regenerated.\n' <\/auto-generated>\n'------------------------------------------------------------------------------\n\nOption Strict On\nOption Explicit On\n\nImports System\n\nNamespace My.Resources\n \n 'This class was auto-generated by the StronglyTypedResourceBuilder\n 'class via a tool like ResGen or Visual Studio.\n 'To add or remove a member, edit your .ResX file then rerun ResGen\n 'with the \/str option, or rebuild your VS project.\n '''\n ''' A strongly-typed resource class, for looking up localized strings, etc.\n '''<\/summary>\n _\n Friend Module Resources\n \n Private resourceMan As Global.System.Resources.ResourceManager\n \n Private resourceCulture As Global.System.Globalization.CultureInfo\n \n '''\n ''' Returns the cached ResourceManager instance used by this class.\n '''<\/summary>\n _\n Friend ReadOnly Property ResourceManager() As Global.System.Resources.ResourceManager\n Get\n If Object.ReferenceEquals(resourceMan, Nothing) Then\n Dim temp As Global.System.Resources.ResourceManager = New Global.System.Resources.ResourceManager(\"PersonalFileLocker2013.Resources\", GetType(Resources).Assembly)\n resourceMan = temp\n End If\n Return resourceMan\n End Get\n End Property\n \n '''\n ''' Overrides the current thread's CurrentUICulture property for all\n ''' resource lookups using this strongly typed resource class.\n '''<\/summary>\n _\n Friend Property Culture() As Global.System.Globalization.CultureInfo\n Get\n Return resourceCulture\n End Get\n Set\n resourceCulture = value\n End Set\n End Property\n End Module\nEnd Namespace\n","avg_line_length":42.53125,"max_line_length":182,"alphanum_fraction":0.6385011021} {"size":860,"ext":"vb","lang":"Visual Basic","max_stars_count":94.0,"content":"\ufeffImports System.Windows.Forms\nImports System.Drawing\n\nPartial Public Class Form2\n\n Public Sub New()\n InitializeComponent()\n\n AddHandler Button1.Click, AddressOf Button1_Click\n\n End Sub\n\n '\n \n Public Shared Function FindWindow(lpClassName As String, lpWindowName As String) As IntPtr : End Function\n\n \n Public Shared Function SetForegroundWindow(hWnd As IntPtr) As Boolean : End Function\n\n Private Sub Button1_Click(sender As Object, e As EventArgs)\n Dim hCalcWindow As IntPtr = FindWindow(Nothing, \"Calculator\")\n\n If SetForegroundWindow(hCalcWindow) Then\n SendKeys.Send(\"10{+}10=\")\n End If\n End Sub\n '<\/Calculator>\nEnd Class","avg_line_length":30.7142857143,"max_line_length":109,"alphanum_fraction":0.7209302326} {"size":2720,"ext":"frm","lang":"Visual Basic","max_stars_count":null,"content":"TYPE=VIEW\nquery=select if((locate(\\'.\\',`ibp`.`TABLE_NAME`) = 0),\\'InnoDB System\\',replace(substring_index(`ibp`.`TABLE_NAME`,\\'.\\',1),\\'`\\',\\'\\')) AS `object_schema`,replace(substring_index(`ibp`.`TABLE_NAME`,\\'.\\',-(1)),\\'`\\',\\'\\') AS `object_name`,sum(if((`ibp`.`COMPRESSED_SIZE` = 0),16384,`ibp`.`COMPRESSED_SIZE`)) AS `allocated`,sum(`ibp`.`DATA_SIZE`) AS `data`,count(`ibp`.`PAGE_NUMBER`) AS `pages`,count(if((`ibp`.`IS_HASHED` = \\'YES\\'),1,NULL)) AS `pages_hashed`,count(if((`ibp`.`IS_OLD` = \\'YES\\'),1,NULL)) AS `pages_old`,round(ifnull((sum(`ibp`.`NUMBER_RECORDS`) \/ nullif(count(distinct `ibp`.`INDEX_NAME`),0)),0),0) AS `rows_cached` from `information_schema`.`innodb_buffer_page` `ibp` where (`ibp`.`TABLE_NAME` is not null) group by `object_schema`,`object_name` order by sum(if((`ibp`.`COMPRESSED_SIZE` = 0),16384,`ibp`.`COMPRESSED_SIZE`)) desc\nmd5=462e703a83dce7346c5ad0733c3c8d54\nupdatable=0\nalgorithm=1\ndefiner_user=mysql.sys\ndefiner_host=localhost\nsuid=0\nwith_check_option=0\ntimestamp=2021-06-27 22:21:49\ncreate-version=1\nsource=SELECT IF(LOCATE(\\'.\\', ibp.table_name) = 0, \\'InnoDB System\\', REPLACE(SUBSTRING_INDEX(ibp.table_name, \\'.\\', 1), \\'`\\', \\'\\')) AS object_schema, REPLACE(SUBSTRING_INDEX(ibp.table_name, \\'.\\', -1), \\'`\\', \\'\\') AS object_name, SUM(IF(ibp.compressed_size = 0, 16384, compressed_size)) AS allocated, SUM(ibp.data_size) AS data, COUNT(ibp.page_number) AS pages, COUNT(IF(ibp.is_hashed = \\'YES\\', 1, NULL)) AS pages_hashed, COUNT(IF(ibp.is_old = \\'YES\\', 1, NULL)) AS pages_old, ROUND(IFNULL(SUM(ibp.number_records)\/NULLIF(COUNT(DISTINCT ibp.index_name), 0), 0)) AS rows_cached FROM information_schema.innodb_buffer_page ibp WHERE table_name IS NOT NULL GROUP BY object_schema, object_name ORDER BY SUM(IF(ibp.compressed_size = 0, 16384, compressed_size)) DESC\nclient_cs_name=utf8\nconnection_cl_name=utf8_general_ci\nview_body_utf8=select if((locate(\\'.\\',`ibp`.`TABLE_NAME`) = 0),\\'InnoDB System\\',replace(substring_index(`ibp`.`TABLE_NAME`,\\'.\\',1),\\'`\\',\\'\\')) AS `object_schema`,replace(substring_index(`ibp`.`TABLE_NAME`,\\'.\\',-(1)),\\'`\\',\\'\\') AS `object_name`,sum(if((`ibp`.`COMPRESSED_SIZE` = 0),16384,`ibp`.`COMPRESSED_SIZE`)) AS `allocated`,sum(`ibp`.`DATA_SIZE`) AS `data`,count(`ibp`.`PAGE_NUMBER`) AS `pages`,count(if((`ibp`.`IS_HASHED` = \\'YES\\'),1,NULL)) AS `pages_hashed`,count(if((`ibp`.`IS_OLD` = \\'YES\\'),1,NULL)) AS `pages_old`,round(ifnull((sum(`ibp`.`NUMBER_RECORDS`) \/ nullif(count(distinct `ibp`.`INDEX_NAME`),0)),0),0) AS `rows_cached` from `information_schema`.`innodb_buffer_page` `ibp` where (`ibp`.`TABLE_NAME` is not null) group by `object_schema`,`object_name` order by sum(if((`ibp`.`COMPRESSED_SIZE` = 0),16384,`ibp`.`COMPRESSED_SIZE`)) desc\n","avg_line_length":170.0,"max_line_length":857,"alphanum_fraction":0.7011029412} {"size":192,"ext":"vb","lang":"Visual Basic","max_stars_count":1.0,"content":"Imports System 'System is a Namespace \nModule Hello_Program \n \n Sub Main() \n \n Console.WriteLine(\"Hello World \ud83d\udc4b\") \n Console.ReadKey() \n \n End Sub \n \nEnd Module \n","avg_line_length":16.0,"max_line_length":44,"alphanum_fraction":0.5833333333} {"size":5594,"ext":"vb","lang":"Visual Basic","max_stars_count":2.0,"content":"\nImports System\nImports System.Collections\nImports System.Collections.Specialized\nImports System.IO\nImports System.Text\nImports System.Text.RegularExpressions\nImports System.Configuration\nImports System.Web.Configuration\n\n\n\n\nClass UsingFormsAuthenticationCredentials\n \n \n Public Shared Sub Main()\n \n ' \n ' Get the Web application configuration.\n Dim configuration As System.Configuration.Configuration = _\n WebConfigurationManager.OpenWebConfiguration( _\n \"\/aspnetTest\")\n \n ' Get the authentication section.\n Dim authenticationSection _\n As AuthenticationSection = _\n CType(configuration.GetSection( _\n \"system.web\/authentication\"), AuthenticationSection)\n \n ' Get the forms credentials collection .\n Dim formsAuthenticationCredentials _\n As FormsAuthenticationCredentials = _\n authenticationSection.Forms.Credentials\n \n ' <\/Snippet1>\n\n ' \n ' Create a new FormsAuthenticationCredentials object.\n Dim newformsAuthenticationCredentials _\n As New FormsAuthenticationCredentials()\n \n ' <\/Snippet2>\n \n \n ' \n ' Get the current PasswordFormat property value.\n Dim currentPasswordFormat _\n As FormsAuthPasswordFormat = _\n formsAuthenticationCredentials.PasswordFormat\n \n \n ' Set the PasswordFormat property value.\n formsAuthenticationCredentials.PasswordFormat = _\n FormsAuthPasswordFormat.SHA1\n \n ' <\/Snippet3>\n ' \n ' Create a new FormsAuthenticationUserCollection object.\n Dim newformsAuthenticationUser _\n As New FormsAuthenticationUserCollection()\n \n ' <\/Snippet4>\n ' \n ' Display all credentials collection elements.\n Dim credentials As New StringBuilder()\n Dim i As System.Int32\n For i = 0 To formsAuthenticationCredentials.Users.Count - 1\n credentials.Append((\"User: \" _\n + formsAuthenticationCredentials.Users(i).Name))\n credentials.Append((\"Password: \" _\n + formsAuthenticationCredentials.Users(i).Password))\n credentials.Append(Environment.NewLine)\n Next i\n ' <\/Snippet5>\n \n ' \n ' Using method Add.\n ' Define the SHA1 encrypted password.\n Dim password As String = _\n \"5BAA61E4C9B93F3F0682250B6CF8331B7EE68FD8\"\n ' Define the user name.\n Dim userName As String = \"newUser\"\n \n ' Create the new user.\n Dim currentUser _\n As New FormsAuthenticationUser(userName, password)\n \n ' Execute the Add method.\n formsAuthenticationCredentials.Users.Add(currentUser)\n \n ' Update if not locked\n If Not authenticationSection.SectionInformation.IsLocked Then\n configuration.Save()\n End If\n \n ' <\/Snippet6>\n \n ' \n ' Using method Clear.\n formsAuthenticationCredentials.Users.Clear()\n ' Update if not locked\n If Not authenticationSection.SectionInformation.IsLocked Then\n configuration.Save()\n End If\n ' <\/Snippet7>\n \n ' \n ' Using method Remove.\n ' Execute the Remove method.\n formsAuthenticationCredentials.Users.Remove(\"userName\")\n \n ' Update if not locked\n If Not authenticationSection.SectionInformation.IsLocked Then\n configuration.Save()\n End If\n ' <\/Snippet9>\n ' \n ' Using method RemoveAt.\n formsAuthenticationCredentials.Users.RemoveAt(0)\n \n If Not authenticationSection.SectionInformation.IsLocked Then\n configuration.Save()\n End If\n ' <\/Snippet10>\n \n ' \n ' Using method Set.\n ' Define the SHA1 encrypted password.\n Dim newPassword As String = _\n \"5BAA61E4C9B93F3F0682250B6CF8331B7EE68FD8\"\n ' Define the user name.\n Dim currentUserName As String = \"userName\"\n \n ' Create the new user.\n Dim theUser _\n As New FormsAuthenticationUser(currentUserName, newPassword)\n \n formsAuthenticationCredentials.Users.Set(theUser)\n \n If Not authenticationSection.SectionInformation.IsLocked Then\n configuration.Save()\n End If\n ' <\/Snippet11>\n ' \n ' Get the user with the specified name.\n Dim storedUser As FormsAuthenticationUser = _\n formsAuthenticationCredentials.Users.Get(\"userName\")\n \n ' <\/Snippet12>\n ' \n ' Get the user at the specified index.\n Dim storedUser2 As FormsAuthenticationUser = _\n formsAuthenticationCredentials.Users.Get(0)\n \n ' <\/Snippet13>\n ' \n ' Get the key at the specified index.\n Dim thisKey As String = _\n formsAuthenticationCredentials.Users.GetKey(0)\n \n ' <\/Snippet14>\n ' \n ' Get the user element at the specified index.\n Dim storedUser3 As FormsAuthenticationUser = _\n formsAuthenticationCredentials.Users(0)\n \n ' <\/Snippet15>\n ' \n ' Get the user element with the specified name.\n Dim storedUser4 As FormsAuthenticationUser = _\n formsAuthenticationCredentials.Users(\"userName\")\n \n ' <\/Snippet16>\n ' \n ' Get the collection keys.\n Dim keys As String() = _\n formsAuthenticationCredentials.Users.AllKeys\n ' <\/Snippet17>\n\n End Sub 'Main\n\nEnd Class 'UsingFormsAuthenticationCredentials \n\n\n\n\n\n","avg_line_length":29.5978835979,"max_line_length":68,"alphanum_fraction":0.64855202} {"size":6992,"ext":"vb","lang":"Visual Basic","max_stars_count":null,"content":"\ufeffOption Explicit On\nOption Strict On\n\nImports System.Collections.ObjectModel\nImports System.ComponentModel\n\nImports MPT.Reporting\n\n''' \n''' Class which stores a collection of one Excel result object. It also has special methods for creating and removing entries.\n''' <\/summary>\n''' <\/remarks>\nPublic Class cMCResultsExcel\n Inherits System.Collections.CollectionBase\n\n Implements ICloneable\n Implements INotifyPropertyChanged\n Implements ILoggerEvent\n Public Event Log(exception As LoggerEventArgs) Implements ILoggerEvent.Log\n Public Event PropertyChanged As PropertyChangedEventHandler Implements INotifyPropertyChanged.PropertyChanged\n#Region \"Variables\"\n Protected _mcModel As cMCModel\n#End Region\n\n#Region \"Properties\"\n ''' \n ''' Gets the element.\n ''' <\/summary>\n ''' <\/value>\n ''' <\/returns>\n ''' <\/remarks>\n Friend ReadOnly Property file() As cFileExcelResult\n Get\n Return GetItem()\n End Get\n End Property\n\n ''' \n ''' Returns the file path to the element.\n ''' <\/summary>\n ''' <\/value>\n ''' <\/returns>\n ''' <\/remarks>\n Friend ReadOnly Property filePath() As String\n Get\n Return GetItem().pathDestination.path\n End Get\n End Property\n#End Region\n\n#Region \"Initialization\"\n Friend Sub New()\n\n End Sub\n ''' \n ''' Initializes a new collection that is set to reference the provided model control object.\n ''' <\/summary>\n ''' Model control object to reference.<\/param>\n ''' <\/remarks>\n Friend Sub New(ByVal p_mcModel As cMCModel)\n Bind(p_mcModel)\n End Sub\n\n#End Region\n\n#Region \"Methods: Friend - Collection\"\n ''' \n ''' Adds a new Excel result object to the list if one does not currently exist.\n ''' <\/summary>\n ''' <\/param>\n ''' <\/remarks>\n Friend Overloads Function Add(ByVal p_item As cFileExcelResult) As Boolean\n Try\n If p_item Is Nothing Then Return False\n\n If InnerList.Count = 0 Then\n InnerList.Add(p_item)\n RaiseEvent PropertyChanged(Me, New PropertyChangedEventArgs(\"item\"))\n\n 'Set binding to added item (not before adding, as that will change the object outside!)\n Dim newItem As cFileExcelResult = CType(InnerList.Item(InnerList.Count - 1), cFileExcelResult)\n newItem.Bind(_mcModel)\n\n Return True\n End If\n Catch argExc As ArgumentException\n RaiseEvent Log(New LoggerEventArgs(argExc))\n End Try\n\n Return False\n End Function\n\n\n ''' \n ''' Removes the Excel result.\n ''' <\/summary>\n ''' <\/remarks>\n Friend Overloads Sub Remove()\n Try\n InnerList.RemoveAt(0)\n RaiseEvent PropertyChanged(Me, New PropertyChangedEventArgs(\"item\"))\n Catch argExc As ArgumentException\n RaiseEvent Log(New LoggerEventArgs(argExc))\n End Try\n End Sub\n\n ''' \n ''' Replaces the current Excel result object.\n ''' <\/summary>\n ''' <\/param>\n ''' <\/remarks>\n Friend Overloads Sub Replace(ByVal p_item As cFileExcelResult)\n Try\n If p_item Is Nothing Then Exit Sub\n\n If InnerList.Count = 0 Then\n InnerList.Add(p_item)\n Else\n InnerList(0) = p_item\n End If\n\n RaiseEvent PropertyChanged(Me, New PropertyChangedEventArgs(\"item\"))\n Catch argExc As ArgumentException\n RaiseEvent Log(New LoggerEventArgs(argExc))\n End Try\n End Sub\n\n ''' \n ''' Returns the collection object as an observable collection.\n ''' <\/summary>\n ''' <\/returns>\n ''' <\/remarks>\n Friend Function ToObservableCollection() As ObservableCollection(Of cFileExcelResult)\n Dim templist As New ObservableCollection(Of cFileExcelResult)\n\n For Each item As cFileExcelResult In InnerList\n templist.Add(item)\n Next\n\n Return templist\n End Function\n\n ''' \n ''' Returns the collection object as a list.\n ''' <\/summary>\n ''' <\/returns>\n ''' <\/remarks>\n Friend Function ToList() As List(Of cFileExcelResult)\n Dim templist As New List(Of cFileExcelResult)\n\n For Each item As cFileExcelResult In InnerList\n templist.Add(item)\n Next\n\n Return templist\n End Function\n\n Friend Function Clone() As Object Implements System.ICloneable.Clone\n Dim myClone As New cMCResultsExcel\n\n With myClone\n For Each item As cFileExcelResult In InnerList\n .Add(item)\n Next\n End With\n\n Return myClone\n End Function\n\n ''' \n ''' Returns 'True' if the object provided perfectly matches the existing object.\n ''' <\/summary>\n ''' External object to check for equality.<\/param>\n ''' <\/returns>\n ''' <\/remarks>\n Public Overrides Function Equals(ByVal p_object As Object) As Boolean\n If Not (TypeOf p_object Is cMCResultsExcel) Then Return False\n Dim isMatch As Boolean = False\n Dim comparedObject As cMCResultsExcel = TryCast(p_object, cMCResultsExcel)\n\n 'Check for any differences\n If comparedObject Is Nothing Then Return False\n For Each excelResultOuter As cFileExcelResult In comparedObject\n isMatch = False\n For Each excelResultInner As cFileExcelResult In InnerList\n If excelResultOuter.Equals(excelResultInner) Then\n isMatch = True\n Exit For\n End If\n Next\n If Not isMatch Then Return False\n Next\n\n Return True\n End Function\n#End Region\n\n#Region \"Methods: Friend\"\n ''' \n ''' Associates the entire list with a particular model control file.\n ''' <\/summary>\n ''' Model control file object to bind to the item.<\/param>\n ''' <\/remarks>\n Friend Sub Bind(ByVal p_bindTo As cMCModel)\n _mcModel = p_bindTo\n For Each excelResult As cFileExcelResult In InnerList\n excelResult.Bind(p_bindTo)\n Next\n End Sub\n#End Region\n\n#Region \"Methods: Private\"\n ''' \n ''' Returns the item specified by index.\n ''' <\/summary>\n ''' <\/returns>\n ''' <\/remarks>\n Private Overloads Function GetItem() As cFileExcelResult\n 'If Not _resultExcel.Count > 0 Then \n ' _resultExcel.Add(New cMCResultExcel)\n 'End If\n If InnerList.Count > 0 Then\n Return CType(InnerList(0), cFileExcelResult)\n Else\n Return Nothing\n End If\n End Function\n#End Region\n\nEnd Class\n","avg_line_length":30.2683982684,"max_line_length":126,"alphanum_fraction":0.6312929062} {"size":1780,"ext":"vb","lang":"Visual Basic","max_stars_count":20.0,"content":"\r\nPublic Class frmMainscreen3\r\n Implements IAutohide\r\n\r\n Private myBusiness As modBusiness\r\n\r\n Public Function getAutohideEdges() As IAutohide.AutohideEdges Implements IAutohide.getAutohideEdges\r\n Return IAutohide.AutohideEdges.Top Or IAutohide.AutohideEdges.Bottom\r\n End Function\r\n\r\n Public Sub New(ByVal b As modBusiness)\r\n InitializeComponent()\r\n Me.myBusiness = b\r\n End Sub\r\n\r\n Private Sub myStartMenu_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles myStartMenu.Click\r\n pnlStart.Visible = Not pnlStart.Visible\r\n If pnlStart.Visible Then\r\n pnlMain.Left += pnlStart.Width + 6\r\n pnlMain.Width -= pnlStart.Width + 6\r\n Else\r\n pnlMain.Left -= pnlStart.Width + 6\r\n pnlMain.Width += pnlStart.Width + 6\r\n End If\r\n End Sub\r\n\r\n Private Sub startMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles myDeactivate.Click, myDestruct.Click, myAlert.Click, myModeSelect.Click, myEngineering.Click, MyComp.Click, mySettings.Click, myPhoto.Click, fbWebBrowser.Click, myRun.Click, myVideos.Click, myMusic.Click, myDocuments.Click, myPictures.Click\r\n If myStartMenu.Visible Then myStartMenu.doClick(sender, e)\r\n End Sub\r\n\r\n Public Shared ReadOnly Property ScreenImage() As Image\r\n Get\r\n Return My.Resources.frmmainscreen3\r\n End Get\r\n End Property\r\n\r\n Private Sub myUserButtons_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles myUserButtons.Click\r\n If gridUserButtons.Visible Then\r\n pnlMain.Width += gridUserButtons.Width + 6\r\n Else\r\n pnlMain.Width -= gridUserButtons.Width + 6\r\n End If\r\n End Sub\r\nEnd Class","avg_line_length":40.4545454545,"max_line_length":345,"alphanum_fraction":0.6898876404} {"size":4873,"ext":"vb","lang":"Visual Basic","max_stars_count":1.0,"content":"\ufeff'------------------------------------------------------------------------------\r\n' \r\n' This code was generated by a tool.\r\n' Runtime Version:2.0.50727.3053\r\n'\r\n' Changes to this file may cause incorrect behavior and will be lost if\r\n' the code is regenerated.\r\n' <\/auto-generated>\r\n'------------------------------------------------------------------------------\r\n\r\nOption Strict On\r\nOption Explicit On\r\n\r\nImports System\r\n\r\nNamespace My.Resources\r\n \r\n 'This class was auto-generated by the StronglyTypedResourceBuilder\r\n 'class via a tool like ResGen or Visual Studio.\r\n 'To add or remove a member, edit your .ResX file then rerun ResGen\r\n 'with the \/str option, or rebuild your VS project.\r\n '''\r\n ''' A strongly-typed resource class, for looking up localized strings, etc.\r\n '''<\/summary>\r\n _\r\n Friend Module Resources\r\n \r\n Private resourceMan As Global.System.Resources.ResourceManager\r\n \r\n Private resourceCulture As Global.System.Globalization.CultureInfo\r\n \r\n '''\r\n ''' Returns the cached ResourceManager instance used by this class.\r\n '''<\/summary>\r\n _\r\n Friend ReadOnly Property ResourceManager() As Global.System.Resources.ResourceManager\r\n Get\r\n If Object.ReferenceEquals(resourceMan, Nothing) Then\r\n Dim temp As Global.System.Resources.ResourceManager = New Global.System.Resources.ResourceManager(\"student_database.Resources\", GetType(Resources).Assembly)\r\n resourceMan = temp\r\n End If\r\n Return resourceMan\r\n End Get\r\n End Property\r\n \r\n '''\r\n ''' Overrides the current thread's CurrentUICulture property for all\r\n ''' resource lookups using this strongly typed resource class.\r\n '''<\/summary>\r\n _\r\n Friend Property Culture() As Global.System.Globalization.CultureInfo\r\n Get\r\n Return resourceCulture\r\n End Get\r\n Set\r\n resourceCulture = value\r\n End Set\r\n End Property\r\n \r\n Friend ReadOnly Property ban() As System.Drawing.Bitmap\r\n Get\r\n Dim obj As Object = ResourceManager.GetObject(\"ban\", resourceCulture)\r\n Return CType(obj,System.Drawing.Bitmap)\r\n End Get\r\n End Property\r\n \r\n Friend ReadOnly Property close_red_mousedown() As System.Drawing.Bitmap\r\n Get\r\n Dim obj As Object = ResourceManager.GetObject(\"close_red mousedown\", resourceCulture)\r\n Return CType(obj,System.Drawing.Bitmap)\r\n End Get\r\n End Property\r\n \r\n Friend ReadOnly Property close_red_mousehover() As System.Drawing.Bitmap\r\n Get\r\n Dim obj As Object = ResourceManager.GetObject(\"close_red mousehover\", resourceCulture)\r\n Return CType(obj,System.Drawing.Bitmap)\r\n End Get\r\n End Property\r\n \r\n Friend ReadOnly Property close_red_normal() As System.Drawing.Bitmap\r\n Get\r\n Dim obj As Object = ResourceManager.GetObject(\"close_red normal\", resourceCulture)\r\n Return CType(obj,System.Drawing.Bitmap)\r\n End Get\r\n End Property\r\n \r\n Friend ReadOnly Property min_hover() As System.Drawing.Bitmap\r\n Get\r\n Dim obj As Object = ResourceManager.GetObject(\"min_hover\", resourceCulture)\r\n Return CType(obj,System.Drawing.Bitmap)\r\n End Get\r\n End Property\r\n \r\n Friend ReadOnly Property min_mousedown() As System.Drawing.Bitmap\r\n Get\r\n Dim obj As Object = ResourceManager.GetObject(\"min_mousedown\", resourceCulture)\r\n Return CType(obj,System.Drawing.Bitmap)\r\n End Get\r\n End Property\r\n \r\n Friend ReadOnly Property min_normal() As System.Drawing.Bitmap\r\n Get\r\n Dim obj As Object = ResourceManager.GetObject(\"min_normal\", resourceCulture)\r\n Return CType(obj,System.Drawing.Bitmap)\r\n End Get\r\n End Property\r\n End Module\r\nEnd Namespace\r\n","avg_line_length":43.1238938053,"max_line_length":177,"alphanum_fraction":0.6064026267} {"size":1604,"ext":"vb","lang":"Visual Basic","max_stars_count":1.0,"content":"\ufeff' ===========================================================================================================\n' ===========================================================================================================\n'\n' Write a GUI Application which will show different colours in the list.\n' When User will click on \" SELECT \" Button, then set the \n' backgroung colour of the application with the selected colour.\n'\n' DIFFERENCE\n'\n' 1. Here there are Different buttons for the Name of colours written on them.\n' 2. The Event of colour change occurs when the User Hovers Over the Button.\n'\n' ===========================================================================================================\n' ===========================================================================================================\n\n\nPublic Class Form1\n\n Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click, Button1.MouseHover\n\n Me.BackColor = Color.Red\n\n End Sub\n\n Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click, Button2.MouseHover\n\n Me.BackColor = Color.Green\n\n End Sub\n\n Private Sub Button3_Click(sender As Object, e As EventArgs) Handles Button3.Click, Button3.MouseHover\n\n Me.BackColor = Color.Blue\n\n End Sub\n\n Private Sub Button4_Click(sender As Object, e As EventArgs) Handles Button4.Click, Button4.MouseHover\n\n Me.BackColor = Color.Black\n\n End Sub\n\nEnd Class\n","avg_line_length":36.4545454545,"max_line_length":110,"alphanum_fraction":0.4682044888} {"size":679,"ext":"bas","lang":"Visual Basic","max_stars_count":521.0,"content":"'' examples\/manual\/array\/ubound5.bas\n''\n'' NOTICE: This file is part of the FreeBASIC Compiler package and can't\n'' be included in other distributions without authorization.\n''\n'' See Also: https:\/\/www.freebasic.net\/wiki\/wikka.php?wakka=KeyPgUbound\n'' --------\n\nSub printArrayDimensions( array() As Integer )\n\tPrint \"dimensions: \" & UBound( array, 0 )\n\n\t'' For each dimension...\n\tFor d As Integer = LBound( array, 0 ) To UBound( array, 0 )\n\t\tPrint \"dimension \" & d & \": \" & LBound( array, d ) & \" to \" & UBound( array, d )\n\tNext\nEnd Sub\n\nDim array() As Integer\nprintArrayDimensions( array() )\n\nPrint \"---\"\n\nReDim array(10 To 11, 20 To 22)\nprintArrayDimensions( array() )\n","avg_line_length":27.16,"max_line_length":82,"alphanum_fraction":0.6686303387} {"size":3089,"ext":"bas","lang":"Visual Basic","max_stars_count":1.0,"content":"\r\n' Copy this text to \/code\/vb\/personal.bas so that PERSONAL.XLS\r\n' Can be recreated if necessary.\r\n' Modified: Fri, 25 Feb 2000 11:02:33 (Bob Heckel)\r\n\r\nSub tile_horizontal()\r\n Windows.Arrange ArrangeStyle:=xlHorizontal\r\nEnd Sub\r\n\r\nSub pgsetup()\r\n With ActiveSheet.PageSetup\r\n .LeftHeader = \"\"\r\n .CenterHeader = \"&A\"\r\n .RightHeader = \"\"\r\n .LeftFooter = \"&D\"\r\n .CenterFooter = \"&P of &N\"\r\n .RightFooter = \"&F\"\r\n .LeftMargin = Application.InchesToPoints(0.75)\r\n .RightMargin = Application.InchesToPoints(0.75)\r\n .TopMargin = Application.InchesToPoints(0.4)\r\n .BottomMargin = Application.InchesToPoints(0.53)\r\n .HeaderMargin = Application.InchesToPoints(0.23)\r\n .FooterMargin = Application.InchesToPoints(0.28)\r\n .PrintHeadings = False\r\n .PrintGridlines = True\r\n .PrintComments = xlPrintNoComments\r\n .PrintQuality = 600\r\n .CenterHorizontally = True\r\n .CenterVertically = False\r\n .Orientation = xlPortrait\r\n .Draft = False\r\n .PaperSize = xlPaperLetter\r\n .FirstPageNumber = xlAutomatic\r\n .Order = xlDownThenOver\r\n .BlackAndWhite = False\r\n .Zoom = False\r\n .FitToPagesWide = 1\r\n .FitToPagesTall = False\r\n End With\r\nEnd Sub\r\n\r\nSub datestamp()\r\n Selection.EntireRow.Insert\r\n ActiveCell.FormulaR1C1 = \"=TODAY()\"\r\n '''Range(\"A1\").Select\r\n '''Selection.Font.Bold = True\r\n ' Prevent date from changing to current date each time opened.\r\n Selection.Copy\r\n Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _\r\n False, Transpose:=False\r\n Columns(\"A:A\").ColumnWidth = 12\r\n Rows(\"1:2\").Font.Bold = True\r\nEnd Sub\r\n\r\nSub auto_fmt()\r\n Selection.AutoFormat Format:=xlRangeAutoFormatSimple, Number:=True, Font _\r\n :=True, Alignment:=True, Border:=True, Pattern:=True, Width:=True\r\n \r\nEnd Sub\r\n\r\n''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''\r\n' Name: deleterow.bas\r\n' Summary: Based on specific string passed, will delete entire row.\r\n' Created: Fri, 27 Aug 1999 14:31:20 (Bob Heckel)\r\n''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''\r\nSub deleterow()\r\n Dim c\r\n Dim myinput, mytop, mybot, myref As String\r\n \r\n Range(\"a1\").Select\r\n\r\n MsgBox (\"This macro will delete each row where the value is found in current worksheet.\")\r\n mytop = InputBox(\"Enter top leftmost Column & Row. E.g. A1\") & \":\"\r\n mybot = InputBox(\"Enter bottom rightmost Column & Row. E.g. ZZ100\")\r\n myref = mytop & mybot\r\n myinput = InputBox(\"Enter value. It is case-sensitive.\") & \"*\"\r\nGETMORE:\r\n ''' Doesn't work for non-contiguous ranges like Edward's spreadsheet.\r\n '''For Each c In ActiveCell.CurrentRegion.Cells\r\n For Each c In ActiveSheet.Cells.Range(myref)\r\n If c.Value Like myinput Then\r\n c.EntireRow.Delete\r\n ' To prevent skipping another match that immediately follows a deletion,\r\n ' move to cell A1 and redo all remaining cells.\r\n GoTo GETMORE\r\n End If\r\n Next\r\n Range(\"a1\").Select\r\nEnd Sub\r\n\r\nSub zoom_to_windowsize()\r\n ActiveWindow.Zoom = True\r\nEnd Sub\r\n\r\n","avg_line_length":32.5157894737,"max_line_length":92,"alphanum_fraction":0.6332146326} {"size":3170,"ext":"frm","lang":"Visual Basic","max_stars_count":null,"content":"TYPE=VIEW\nquery=select `x$processlist`.`thd_id` AS `thd_id`,`x$processlist`.`conn_id` AS `conn_id`,`x$processlist`.`user` AS `user`,`x$processlist`.`db` AS `db`,`x$processlist`.`command` AS `command`,`x$processlist`.`state` AS `state`,`x$processlist`.`time` AS `time`,`x$processlist`.`current_statement` AS `current_statement`,`x$processlist`.`statement_latency` AS `statement_latency`,`x$processlist`.`progress` AS `progress`,`x$processlist`.`lock_latency` AS `lock_latency`,`x$processlist`.`rows_examined` AS `rows_examined`,`x$processlist`.`rows_sent` AS `rows_sent`,`x$processlist`.`rows_affected` AS `rows_affected`,`x$processlist`.`tmp_tables` AS `tmp_tables`,`x$processlist`.`tmp_disk_tables` AS `tmp_disk_tables`,`x$processlist`.`full_scan` AS `full_scan`,`x$processlist`.`last_statement` AS `last_statement`,`x$processlist`.`last_statement_latency` AS `last_statement_latency`,`x$processlist`.`current_memory` AS `current_memory`,`x$processlist`.`last_wait` AS `last_wait`,`x$processlist`.`last_wait_latency` AS `last_wait_latency`,`x$processlist`.`source` AS `source`,`x$processlist`.`trx_latency` AS `trx_latency`,`x$processlist`.`trx_state` AS `trx_state`,`x$processlist`.`trx_autocommit` AS `trx_autocommit`,`x$processlist`.`pid` AS `pid`,`x$processlist`.`program_name` AS `program_name` from `sys`.`x$processlist` where ((`x$processlist`.`conn_id` is not null) and (`x$processlist`.`command` <> \\'Daemon\\'))\nmd5=5ae47f9c1f04f36c23a5a1466b9905c9\nupdatable=0\nalgorithm=0\ndefiner_user=mysql.sys\ndefiner_host=localhost\nsuid=0\nwith_check_option=0\ntimestamp=2020-09-07 11:47:39\ncreate-version=1\nsource=SELECT * FROM sys.x$processlist WHERE conn_id IS NOT NULL AND command != \\'Daemon\\'\nclient_cs_name=utf8\nconnection_cl_name=utf8_general_ci\nview_body_utf8=select `x$processlist`.`thd_id` AS `thd_id`,`x$processlist`.`conn_id` AS `conn_id`,`x$processlist`.`user` AS `user`,`x$processlist`.`db` AS `db`,`x$processlist`.`command` AS `command`,`x$processlist`.`state` AS `state`,`x$processlist`.`time` AS `time`,`x$processlist`.`current_statement` AS `current_statement`,`x$processlist`.`statement_latency` AS `statement_latency`,`x$processlist`.`progress` AS `progress`,`x$processlist`.`lock_latency` AS `lock_latency`,`x$processlist`.`rows_examined` AS `rows_examined`,`x$processlist`.`rows_sent` AS `rows_sent`,`x$processlist`.`rows_affected` AS `rows_affected`,`x$processlist`.`tmp_tables` AS `tmp_tables`,`x$processlist`.`tmp_disk_tables` AS `tmp_disk_tables`,`x$processlist`.`full_scan` AS `full_scan`,`x$processlist`.`last_statement` AS `last_statement`,`x$processlist`.`last_statement_latency` AS `last_statement_latency`,`x$processlist`.`current_memory` AS `current_memory`,`x$processlist`.`last_wait` AS `last_wait`,`x$processlist`.`last_wait_latency` AS `last_wait_latency`,`x$processlist`.`source` AS `source`,`x$processlist`.`trx_latency` AS `trx_latency`,`x$processlist`.`trx_state` AS `trx_state`,`x$processlist`.`trx_autocommit` AS `trx_autocommit`,`x$processlist`.`pid` AS `pid`,`x$processlist`.`program_name` AS `program_name` from `sys`.`x$processlist` where ((`x$processlist`.`conn_id` is not null) and (`x$processlist`.`command` <> \\'Daemon\\'))\n","avg_line_length":198.125,"max_line_length":1420,"alphanum_fraction":0.7615141956} {"size":4381,"ext":"frm","lang":"Visual Basic","max_stars_count":null,"content":"TYPE=VIEW\nquery=select substring_index(`performance_schema`.`file_summary_by_event_name`.`EVENT_NAME`,\\'\/\\',-(2)) AS `event_name`,`performance_schema`.`file_summary_by_event_name`.`COUNT_STAR` AS `total`,`performance_schema`.`file_summary_by_event_name`.`SUM_TIMER_WAIT` AS `total_latency`,`performance_schema`.`file_summary_by_event_name`.`AVG_TIMER_WAIT` AS `avg_latency`,`performance_schema`.`file_summary_by_event_name`.`MAX_TIMER_WAIT` AS `max_latency`,`performance_schema`.`file_summary_by_event_name`.`SUM_TIMER_READ` AS `read_latency`,`performance_schema`.`file_summary_by_event_name`.`SUM_TIMER_WRITE` AS `write_latency`,`performance_schema`.`file_summary_by_event_name`.`SUM_TIMER_MISC` AS `misc_latency`,`performance_schema`.`file_summary_by_event_name`.`COUNT_READ` AS `count_read`,`performance_schema`.`file_summary_by_event_name`.`SUM_NUMBER_OF_BYTES_READ` AS `total_read`,ifnull((`performance_schema`.`file_summary_by_event_name`.`SUM_NUMBER_OF_BYTES_READ` \/ nullif(`performance_schema`.`file_summary_by_event_name`.`COUNT_READ`,0)),0) AS `avg_read`,`performance_schema`.`file_summary_by_event_name`.`COUNT_WRITE` AS `count_write`,`performance_schema`.`file_summary_by_event_name`.`SUM_NUMBER_OF_BYTES_WRITE` AS `total_written`,ifnull((`performance_schema`.`file_summary_by_event_name`.`SUM_NUMBER_OF_BYTES_WRITE` \/ nullif(`performance_schema`.`file_summary_by_event_name`.`COUNT_WRITE`,0)),0) AS `avg_written` from `performance_schema`.`file_summary_by_event_name` where ((`performance_schema`.`file_summary_by_event_name`.`EVENT_NAME` like \\'wait\/io\/file\/%\\') and (`performance_schema`.`file_summary_by_event_name`.`COUNT_STAR` > 0)) order by `performance_schema`.`file_summary_by_event_name`.`SUM_TIMER_WAIT` desc\nmd5=a90dc8f3b75494a07b6b00becc72d3c2\nupdatable=1\nalgorithm=2\ndefiner_user=mysql.sys\ndefiner_host=localhost\nsuid=0\nwith_check_option=0\ntimestamp=2021-09-15 23:57:57\ncreate-version=1\nsource=SELECT SUBSTRING_INDEX(event_name, \\'\/\\', -2) AS event_name, count_star AS total, sum_timer_wait AS total_latency, avg_timer_wait AS avg_latency, max_timer_wait AS max_latency, sum_timer_read AS read_latency, sum_timer_write AS write_latency, sum_timer_misc AS misc_latency, count_read, sum_number_of_bytes_read AS total_read, IFNULL(sum_number_of_bytes_read \/ NULLIF(count_read, 0), 0) AS avg_read, count_write, sum_number_of_bytes_write AS total_written, IFNULL(sum_number_of_bytes_write \/ NULLIF(count_write, 0), 0) AS avg_written FROM performance_schema.file_summary_by_event_name WHERE event_name LIKE \\'wait\/io\/file\/%\\' AND count_star > 0 ORDER BY sum_timer_wait DESC\nclient_cs_name=utf8\nconnection_cl_name=utf8_general_ci\nview_body_utf8=select substring_index(`performance_schema`.`file_summary_by_event_name`.`EVENT_NAME`,\\'\/\\',-(2)) AS `event_name`,`performance_schema`.`file_summary_by_event_name`.`COUNT_STAR` AS `total`,`performance_schema`.`file_summary_by_event_name`.`SUM_TIMER_WAIT` AS `total_latency`,`performance_schema`.`file_summary_by_event_name`.`AVG_TIMER_WAIT` AS `avg_latency`,`performance_schema`.`file_summary_by_event_name`.`MAX_TIMER_WAIT` AS `max_latency`,`performance_schema`.`file_summary_by_event_name`.`SUM_TIMER_READ` AS `read_latency`,`performance_schema`.`file_summary_by_event_name`.`SUM_TIMER_WRITE` AS `write_latency`,`performance_schema`.`file_summary_by_event_name`.`SUM_TIMER_MISC` AS `misc_latency`,`performance_schema`.`file_summary_by_event_name`.`COUNT_READ` AS `count_read`,`performance_schema`.`file_summary_by_event_name`.`SUM_NUMBER_OF_BYTES_READ` AS `total_read`,ifnull((`performance_schema`.`file_summary_by_event_name`.`SUM_NUMBER_OF_BYTES_READ` \/ nullif(`performance_schema`.`file_summary_by_event_name`.`COUNT_READ`,0)),0) AS `avg_read`,`performance_schema`.`file_summary_by_event_name`.`COUNT_WRITE` AS `count_write`,`performance_schema`.`file_summary_by_event_name`.`SUM_NUMBER_OF_BYTES_WRITE` AS `total_written`,ifnull((`performance_schema`.`file_summary_by_event_name`.`SUM_NUMBER_OF_BYTES_WRITE` \/ nullif(`performance_schema`.`file_summary_by_event_name`.`COUNT_WRITE`,0)),0) AS `avg_written` from `performance_schema`.`file_summary_by_event_name` where ((`performance_schema`.`file_summary_by_event_name`.`EVENT_NAME` like \\'wait\/io\/file\/%\\') and (`performance_schema`.`file_summary_by_event_name`.`COUNT_STAR` > 0)) order by `performance_schema`.`file_summary_by_event_name`.`SUM_TIMER_WAIT` desc\n","avg_line_length":273.8125,"max_line_length":1730,"alphanum_fraction":0.8340561516} {"size":1492,"ext":"vb","lang":"Visual Basic","max_stars_count":2.0,"content":"\ufeff'------------------------------------------------------------------------------\n' \n' This code was generated by a tool.\n' Runtime Version:2.0.50727.1433\n'\n' Changes to this file may cause incorrect behavior and will be lost if\n' the code is regenerated.\n' <\/auto-generated>\n'------------------------------------------------------------------------------\n\nOption Strict On\nOption Explicit On\n\n\nNamespace My\n \n 'NOTE: This file is auto-generated; do not modify it directly. To make changes,\n ' or if you encounter build errors in this file, go to the Project Designer\n ' (go to Project Properties or double-click the My Project node in\n ' Solution Explorer), and make changes on the Application tab.\n '\n Partial Friend Class MyApplication\n \n _\n Public Sub New()\n MyBase.New(Global.Microsoft.VisualBasic.ApplicationServices.AuthenticationMode.Windows)\n Me.IsSingleInstance = false\n Me.EnableVisualStyles = true\n Me.SaveMySettingsOnExit = true\n Me.ShutDownStyle = Global.Microsoft.VisualBasic.ApplicationServices.ShutdownMode.AfterMainFormCloses\n End Sub\n \n _\n Protected Overrides Sub OnCreateMainForm()\n Me.MainForm = Global.VbPowerPacksDataRepeaterColor.Color\n End Sub\n End Class\nEnd Namespace\n","avg_line_length":38.2564102564,"max_line_length":112,"alphanum_fraction":0.6206434316} {"size":3821,"ext":"vb","lang":"Visual Basic","max_stars_count":null,"content":"\ufeffImports System.Windows.Forms\nImports System.Text.RegularExpressions\n\nPublic Class Search_Report\n Private _grd As DataGridView\n Private _tbl As DataTable\n Private _asort As String\n\n Private Sub OK_Button_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles OK_Button.Click\n Me.DialogResult = System.Windows.Forms.DialogResult.OK\n Me.Hide()\n End Sub\n Public Sub New(ByVal Grid As DataGridView, ByVal SourceTable As DataTable, Optional ByVal AutoSortColumnName As String = \"\")\n InitializeComponent()\n _asort = AutoSortColumnName\n _grd = Grid '' Setup reference to data grid view\n _tbl = SourceTable\n pnlContainer.Controls.Clear() '' Remove any existing controls\n For i = 0 To _grd.Columns.Count - 1 Step 1\n Dim pnl As New Panel '' Create filter panel\n pnl.Dock = DockStyle.Top\n pnl.Height = 40\n Dim lbl As New Label '' Create label for filter\n lbl.Text = _grd.Columns(i).HeaderText\n lbl.Dock = DockStyle.Left\n lbl.AutoSize = False\n lbl.Width = Me.Width * (1 \/ 3)\n lbl.AutoEllipsis = True\n lbl.TextAlign = ContentAlignment.MiddleRight\n Dim txt As New TextBox '' Create textbox for filter\n txt.Tag = i\n txt.Dock = DockStyle.Right\n txt.Width = Me.Width * (1 \/ 2)\n txt.Height = 38\n AddHandler txt.TextChanged, AddressOf TextUpdated '' Bind method for filtering to textbox\n pnl.Controls.Add(lbl)\n pnl.Controls.Add(txt)\n pnlContainer.Controls.Add(pnl) '' Add filter panel to dialog container\n pnlContainer.Controls.SetChildIndex(pnl, 0)\n Next\n End Sub\n Private Sub TextUpdated(ByVal sender As System.Object, ByVal e As System.EventArgs)\n lblError.Text = \"\"\n Dim dataRows As DataRow()\n Dim bln As Boolean = True\n For Each row As DataRow In _tbl.Rows\n bln = True '' Assume true\n For Each pnl As Panel In pnlContainer.Controls\n Dim txt As TextBox = pnl.Controls(1) '' Get textbox\n If Not String.IsNullOrEmpty(txt.Text) Then\n Try\n If Not New Regex(txt.Text).Match(row.Item(txt.Tag).ToString).Success Then\n bln = False\n Exit For '' No need to continue filtering if this cell is not correct\n End If\n Catch ex As Exception\n '' Might still be typing\n lblError.Text = ex.Message\n Exit Sub '' allow user to create valid expression\n End Try\n End If\n Next\n If bln Then\n If Not IsNothing(dataRows) Then\n ReDim Preserve dataRows(dataRows.Length)\n Else\n ReDim dataRows(0)\n End If\n dataRows(dataRows.Length - 1) = row\n End If\n Next\n 'Choose what you wan to do if no row is found. I bind back the oriDataTable.\n If Not IsNothing(dataRows) Then\n _grd.DataSource = Nothing\n _grd.Rows.Clear()\n _grd.DataSource = If(dataRows.Count > 0, dataRows.CopyToDataTable(), _tbl)\n\n End If\n If Not String.IsNullOrEmpty(_asort) Then\n If Not IsNothing(_grd.Columns.Item(_asort)) Then\n Debug.WriteLine(\"Try to sort by '\" & _asort & \"'\")\n _grd.Sort(_grd.Columns(_asort), System.ComponentModel.ListSortDirection.Ascending)\n End If\n End If\n End Sub\n\n Private Sub Search_Report_Activated(sender As Object, e As EventArgs) Handles Me.Activated\n Me.Opacity = 1\n End Sub\n Private Sub Search_Report_Deactivate(sender As Object, e As EventArgs) Handles Me.Deactivate\n Me.Opacity = 0.4\n End Sub\n\n Private Sub lblInstructions_Click(sender As Object, e As EventArgs) Handles lblInstructions.Click\n Try\n Process.Start(\"`https:\/\/www.google.com\/#q=common+regular+expressions+examples`\".Replace(\"`\", Chr(34)))\n Catch ex As Exception\n Debug.WriteLine(\"Couldn't open link: \" & ex.Message)\n End Try\n End Sub\nEnd Class\n","avg_line_length":37.4607843137,"max_line_length":126,"alphanum_fraction":0.6715519498} {"size":19964,"ext":"vb","lang":"Visual Basic","max_stars_count":17923.0,"content":"\ufeff' Licensed to the .NET Foundation under one or more agreements.\n' The .NET Foundation licenses this file to you under the MIT license.\n' See the LICENSE file in the project root for more information.\n\nImports System.Collections.Generic\nImports System.Collections.Immutable\nImports System.IO\nImports System.Linq\nImports System.Reflection.Metadata\nImports System.Threading\nImports Microsoft.CodeAnalysis.VisualBasic.Symbols\nImports Microsoft.CodeAnalysis.VisualBasic.UnitTests\nImports Microsoft.CodeAnalysis.Emit\nImports Microsoft.CodeAnalysis.Test.Utilities\nImports Roslyn.Test.MetadataUtilities\nImports Roslyn.Test.Utilities\nImports Xunit\n\nNamespace Microsoft.CodeAnalysis.VisualBasic.EditAndContinue.UnitTests\n Public Class AssemblyReferencesTests\n Inherits EditAndContinueTestBase\n\n Private Shared ReadOnly s_signedDll As VisualBasicCompilationOptions =\n TestOptions.ReleaseDll.WithCryptoPublicKey(TestResources.TestKeys.PublicKey_ce65828c82a341f2)\n\n ''' \n ''' Symbol matcher considers two source types that only differ in the declaring compilations different.\n ''' <\/summary>\n \n Public Sub ChangingCompilationDependencies()\n Dim srcLib = \"\nPublic Class D\nEnd Class\n\"\n Dim src0 = \"\nPublic Class C \n Public Shared Function F(a as D) As Integer\n Return 1\n End Function\nEnd Class\n\"\n Dim src1 = \"\nPublic Class C \n Public Shared Function F(a as D) As Integer\n Return 2\n End Function\nEnd Class\n\"\n Dim src2 As String = \"\nPublic Class C \n Public Shared Function F(a as D) As Integer\n Return 3\n End Function\nEnd Class\n\"\n\n Dim lib0 = CreateCompilationWithMscorlib40({srcLib}, assemblyName:=\"Lib\", options:=TestOptions.DebugDll)\n lib0.VerifyDiagnostics()\n Dim lib1 = CreateCompilationWithMscorlib40({srcLib}, assemblyName:=\"Lib\", options:=TestOptions.DebugDll)\n lib1.VerifyDiagnostics()\n Dim lib2 = CreateCompilationWithMscorlib40({srcLib}, assemblyName:=\"Lib\", options:=TestOptions.DebugDll)\n lib2.VerifyDiagnostics()\n\n Dim compilation0 = CreateCompilationWithMscorlib40({src0}, {lib0.ToMetadataReference()}, assemblyName:=\"C\", options:=TestOptions.DebugDll)\n Dim compilation1 = compilation0.WithSource(src1).WithReferences({MscorlibRef, lib1.ToMetadataReference()})\n Dim compilation2 = compilation1.WithSource(src2).WithReferences({MscorlibRef, lib2.ToMetadataReference()})\n\n Dim v0 = CompileAndVerify(compilation0)\n Dim v1 = CompileAndVerify(compilation1)\n Dim v2 = CompileAndVerify(compilation2)\n\n Dim f0 = compilation0.GetMember(Of MethodSymbol)(\"C.F\")\n Dim f1 = compilation1.GetMember(Of MethodSymbol)(\"C.F\")\n Dim f2 = compilation2.GetMember(Of MethodSymbol)(\"C.F\")\n\n Dim md0 = ModuleMetadata.CreateFromImage(v0.EmittedAssemblyData)\n Dim generation0 = EmitBaseline.CreateInitialBaseline(md0, EmptyLocalsProvider)\n\n Dim diff1 = compilation1.EmitDifference(\n generation0,\n ImmutableArray.Create(New SemanticEdit(SemanticEditKind.Update, f0, f1)))\n\n diff1.EmitResult.Diagnostics.Verify()\n\n Dim diff2 = compilation2.EmitDifference(\n diff1.NextGeneration,\n ImmutableArray.Create(New SemanticEdit(SemanticEditKind.Update, f1, f2)))\n\n diff2.EmitResult.Diagnostics.Verify()\n End Sub\n\n \n Public Sub DependencyVersionWildcards_Compilation1()\n TestDependencyVersionWildcards(\n \"1.0.0.*\",\n New Version(1, 0, 2000, 1001),\n New Version(1, 0, 2000, 1001),\n New Version(1, 0, 2000, 1002))\n\n TestDependencyVersionWildcards(\n \"1.0.0.*\",\n New Version(1, 0, 2000, 1001),\n New Version(1, 0, 2000, 1002),\n New Version(1, 0, 2000, 1002))\n\n TestDependencyVersionWildcards(\n \"1.0.0.*\",\n New Version(1, 0, 2000, 1003),\n New Version(1, 0, 2000, 1002),\n New Version(1, 0, 2000, 1001))\n\n TestDependencyVersionWildcards(\n \"1.0.*\",\n New Version(1, 0, 2000, 1001),\n New Version(1, 0, 2000, 1002),\n New Version(1, 0, 2000, 1003))\n\n TestDependencyVersionWildcards(\n \"1.0.*\",\n New Version(1, 0, 2000, 1001),\n New Version(1, 0, 2000, 1005),\n New Version(1, 0, 2000, 1002))\n End Sub\n\n Private Sub TestDependencyVersionWildcards(sourceVersion As String, version0 As Version, version1 As Version, version2 As Version)\n Dim srcLib = $\"\n\n\nPublic Class D\nEnd Class\n\"\n Dim src0 As String = \"\nClass C \n Public Shared Function F(a As D) As Integer \n Return 1\n End Function\nEnd Class\n\"\n Dim src1 As String = \"\nClass C \n Public Shared Function F(a As D) As Integer \n Return 2\n End Function\nEnd Class\n\"\n Dim src2 As String = \"\nClass C \n Public Shared Function F(a As D) As Integer \n Return 3\n End Function\n\n Public Shared Function G(a As D) As Integer\n Return 4\n End Function\nEnd Class\n\"\n Dim lib0 = CreateCompilationWithMscorlib40({srcLib}, assemblyName:=\"Lib\", options:=TestOptions.DebugDll)\n DirectCast(lib0.Assembly, SourceAssemblySymbol).m_lazyIdentity = New AssemblyIdentity(\"Lib\", version0)\n lib0.VerifyDiagnostics()\n\n Dim lib1 = CreateCompilationWithMscorlib40({srcLib}, assemblyName:=\"Lib\", options:=TestOptions.DebugDll)\n DirectCast(lib1.Assembly, SourceAssemblySymbol).m_lazyIdentity = New AssemblyIdentity(\"Lib\", version1)\n lib1.VerifyDiagnostics()\n\n Dim lib2 = CreateCompilationWithMscorlib40({srcLib}, assemblyName:=\"Lib\", options:=TestOptions.DebugDll)\n DirectCast(lib2.Assembly, SourceAssemblySymbol).m_lazyIdentity = New AssemblyIdentity(\"Lib\", version2)\n lib2.VerifyDiagnostics()\n\n Dim compilation0 = CreateCompilationWithMscorlib40({src0}, {lib0.ToMetadataReference()}, assemblyName:=\"C\", options:=TestOptions.DebugDll)\n Dim compilation1 = compilation0.WithSource(src1).WithReferences({MscorlibRef, lib1.ToMetadataReference()})\n Dim compilation2 = compilation1.WithSource(src2).WithReferences({MscorlibRef, lib2.ToMetadataReference()})\n\n Dim v0 = CompileAndVerify(compilation0)\n Dim v1 = CompileAndVerify(compilation1)\n Dim v2 = CompileAndVerify(compilation2)\n\n Dim f0 = compilation0.GetMember(Of MethodSymbol)(\"C.F\")\n Dim f1 = compilation1.GetMember(Of MethodSymbol)(\"C.F\")\n Dim f2 = compilation2.GetMember(Of MethodSymbol)(\"C.F\")\n Dim g2 = compilation2.GetMember(Of MethodSymbol)(\"C.G\")\n\n Dim md0 = ModuleMetadata.CreateFromImage(v0.EmittedAssemblyData)\n Dim generation0 = EmitBaseline.CreateInitialBaseline(md0, EmptyLocalsProvider)\n\n Dim diff1 = compilation1.EmitDifference(\n generation0,\n ImmutableArray.Create(New SemanticEdit(SemanticEditKind.Update, f0, f1)))\n\n Dim diff2 = compilation2.EmitDifference(\n diff1.NextGeneration,\n ImmutableArray.Create(New SemanticEdit(SemanticEditKind.Update, f1, f2),\n New SemanticEdit(SemanticEditKind.Insert, Nothing, g2)))\n\n Dim md1 = diff1.GetMetadata()\n Dim md2 = diff2.GetMetadata()\n\n Dim aggReader = New AggregatedMetadataReader(md0.MetadataReader, md1.Reader, md2.Reader)\n VerifyAssemblyReferences(aggReader,\n {\n \"mscorlib, 4.0.0.0\",\n \"Lib, \" & lib0.Assembly.Identity.Version.ToString(),\n \"mscorlib, 4.0.0.0\",\n \"Lib, \" & lib0.Assembly.Identity.Version.ToString(),\n \"mscorlib, 4.0.0.0\",\n \"Lib, \" & lib0.Assembly.Identity.Version.ToString()\n })\n End Sub\n\n \n Public Sub DependencyVersionWildcards_Metadata()\n Dim srcLib = $\"\n\n\nPublic Class D\nEnd Class\n\"\n Dim src0 As String = \"\nClass C \n Public Shared Function F(a As D) As Integer \n Return 1\n End Function\nEnd Class\n\"\n Dim src1 As String = \"\nClass C \n Public Shared Function F(a As D) As Integer \n Return 2\n End Function\nEnd Class\n\"\n Dim src2 As String = \"\nClass C \n Public Shared Function F(a As D) As Integer \n Return 3\n End Function\n\n Public Shared Function G(a As D) As Integer\n Return 4\n End Function\nEnd Class\n\"\n Dim lib0 = CreateCompilationWithMscorlib40({srcLib}, assemblyName:=\"Lib\", options:=TestOptions.DebugDll)\n DirectCast(lib0.Assembly, SourceAssemblySymbol).m_lazyIdentity = New AssemblyIdentity(\"Lib\", New Version(1, 0, 2000, 1001))\n lib0.VerifyDiagnostics()\n\n Dim lib1 = CreateCompilationWithMscorlib40({srcLib}, assemblyName:=\"Lib\", options:=TestOptions.DebugDll)\n DirectCast(lib1.Assembly, SourceAssemblySymbol).m_lazyIdentity = New AssemblyIdentity(\"Lib\", New Version(1, 0, 2000, 1002))\n lib1.VerifyDiagnostics()\n\n Dim lib2 = CreateCompilationWithMscorlib40({srcLib}, assemblyName:=\"Lib\", options:=TestOptions.DebugDll)\n DirectCast(lib2.Assembly, SourceAssemblySymbol).m_lazyIdentity = New AssemblyIdentity(\"Lib\", New Version(1, 0, 2000, 1003))\n lib2.VerifyDiagnostics()\n\n Dim compilation0 = CreateCompilationWithMscorlib40({src0}, {lib0.EmitToImageReference()}, assemblyName:=\"C\", options:=TestOptions.DebugDll)\n Dim compilation1 = compilation0.WithSource(src1).WithReferences({MscorlibRef, lib1.EmitToImageReference()})\n Dim compilation2 = compilation1.WithSource(src2).WithReferences({MscorlibRef, lib2.EmitToImageReference()})\n\n Dim v0 = CompileAndVerify(compilation0)\n Dim v1 = CompileAndVerify(compilation1)\n Dim v2 = CompileAndVerify(compilation2)\n\n Dim f0 = compilation0.GetMember(Of MethodSymbol)(\"C.F\")\n Dim f1 = compilation1.GetMember(Of MethodSymbol)(\"C.F\")\n Dim f2 = compilation2.GetMember(Of MethodSymbol)(\"C.F\")\n Dim g2 = compilation2.GetMember(Of MethodSymbol)(\"C.G\")\n\n Dim md0 = ModuleMetadata.CreateFromImage(v0.EmittedAssemblyData)\n Dim generation0 = EmitBaseline.CreateInitialBaseline(md0, EmptyLocalsProvider)\n\n Dim diff1 = compilation1.EmitDifference(\n generation0,\n ImmutableArray.Create(New SemanticEdit(SemanticEditKind.Update, f0, f1)))\n\n diff1.EmitResult.Diagnostics.Verify(\n Diagnostic(ERRID.ERR_ModuleEmitFailure).WithArguments(\"C\",\n String.Format(CodeAnalysisResources.ChangingVersionOfAssemblyReferenceIsNotAllowedDuringDebugging,\n \"Lib, Version=1.0.2000.1001, Culture=neutral, PublicKeyToken=null\", \"1.0.2000.1002\")))\n End Sub\n\n \n Public Sub DependencyVersionWildcardsCollisions()\n Dim srcLib01 = \"\n\n\nPublic Class D0\nEnd Class\n\"\n Dim srcLib02 = \"\n\n\nPublic Class D0\nEnd Class\n\"\n Dim srcLib11 = \"\n\n\nPublic Class D1\nEnd Class\n\"\n Dim srcLib12 = \"\n\n\nPublic Class D1\nEnd Class \n\"\n Dim src0 = \"\nClass C \n Public Shared Function F(a As D0, b As D1) As Integer\n Return 1\n End Function\nEnd Class\n\"\n Dim src1 = \"\nClass C \n Public Shared Function F(a As D0, b As D1) As Integer\n Return 2\n End Function\nEnd Class\n\"\n Dim lib01 = CreateCompilationWithMscorlib40({srcLib01}, assemblyName:=\"Lib\", options:=s_signedDll).VerifyDiagnostics()\n Dim ref01 = lib01.ToMetadataReference()\n Dim lib02 = CreateCompilationWithMscorlib40({srcLib02}, assemblyName:=\"Lib\", options:=s_signedDll).VerifyDiagnostics()\n Dim ref02 = lib02.ToMetadataReference()\n Dim lib11 = CreateCompilationWithMscorlib40({srcLib11}, assemblyName:=\"Lib\", options:=s_signedDll).VerifyDiagnostics()\n Dim ref11 = lib11.ToMetadataReference()\n Dim lib12 = CreateCompilationWithMscorlib40({srcLib12}, assemblyName:=\"Lib\", options:=s_signedDll).VerifyDiagnostics()\n Dim ref12 = lib12.ToMetadataReference()\n\n Dim compilation0 = CreateCompilationWithMscorlib40({src0}, {ref01, ref11}, assemblyName:=\"C\", options:=TestOptions.DebugDll)\n Dim compilation1 = compilation0.WithSource(src1).WithReferences({MscorlibRef, ref02, ref12})\n\n Dim v0 = CompileAndVerify(compilation0)\n\n Dim f0 = compilation0.GetMember(Of MethodSymbol)(\"C.F\")\n Dim f1 = compilation1.GetMember(Of MethodSymbol)(\"C.F\")\n\n Dim md0 = ModuleMetadata.CreateFromImage(v0.EmittedAssemblyData)\n\n Dim generation0 = EmitBaseline.CreateInitialBaseline(md0, EmptyLocalsProvider)\n\n Dim diff1 = compilation1.EmitDifference(generation0,\n ImmutableArray.Create(New SemanticEdit(SemanticEditKind.Update, f0, f1)))\n\n diff1.EmitResult.Diagnostics.Verify(\n Diagnostic(ERRID.ERR_ModuleEmitFailure).WithArguments(\"C\",\n String.Format(CodeAnalysisResources.ChangingVersionOfAssemblyReferenceIsNotAllowedDuringDebugging,\n \"Lib, Version=1.0.0.1, Culture=neutral, PublicKeyToken=ce65828c82a341f2\", \"1.0.0.2\")))\n End Sub\n\n Public Sub VerifyAssemblyReferences(reader As AggregatedMetadataReader, expected As String())\n AssertEx.Equal(expected, reader.GetAssemblyReferences().Select(Function(aref) $\"{reader.GetString(aref.Name)}, {aref.Version}\"))\n End Sub\n\n \n \n Public Sub CurrentCompilationVersionWildcards()\n Dim source0 = MarkedSource(\"\nImports System\n\n\nClass C\n Shared Sub M()\n Console.WriteLine(New Action(\n Sub() \n Console.WriteLine(1) \n End Sub<\/N:0>))\n End Sub\n\n Shared Sub F()\n End Sub\nEnd Class\")\n Dim source1 = MarkedSource(\"\nImports System\n\n\nClass C\n Shared Sub M()\n Console.WriteLine(New Action(\n Sub() \n Console.WriteLine(1) \n End Sub<\/N:0>))\n\n Console.WriteLine(New Action(\n Sub() \n Console.WriteLine(2) \n End Sub<\/N:1>))\n End Sub\n\n Shared Sub F()\n End Sub\nEnd Class\")\n Dim source2 = MarkedSource(\"\nImports System\n\n\nClass C\n Shared Sub M()\n Console.WriteLine(New Action(\n Sub() \n Console.WriteLine(1) \n End Sub<\/N:0>))\n\n Console.WriteLine(New Action(\n Sub() \n Console.WriteLine(2) \n End Sub<\/N:1>))\n End Sub\n\n Shared Sub F()\n Console.WriteLine(1)\n End Sub\nEnd Class\")\n Dim source3 = MarkedSource(\"\nImports System\n\n\nClass C\n Shared Sub M()\n Console.WriteLine(New Action(\n Sub() \n Console.WriteLine(1) \n End Sub<\/N:0>))\n\n Console.WriteLine(New Action(\n Sub() \n Console.WriteLine(2) \n End Sub<\/N:1>))\n\n Console.WriteLine(New Action(\n Sub() \n Console.WriteLine(3) \n End Sub<\/N:2>))\n\n Console.WriteLine(New Action(\n Sub() \n Console.WriteLine(4) \n End Sub<\/N:3>))\n End Sub\n\n Shared Sub F()\n Console.WriteLine(1)\n End Sub\nEnd Class\")\n Dim options = ComSafeDebugDll.WithCryptoPublicKey(TestResources.TestKeys.PublicKey_ce65828c82a341f2)\n\n Dim compilation0 = CreateCompilationWithMscorlib40(source0.Tree, options:=options.WithCurrentLocalTime(New DateTime(2016, 1, 1, 1, 0, 0)))\n Dim compilation1 = compilation0.WithSource(source1.Tree).WithOptions(options.WithCurrentLocalTime(New DateTime(2016, 1, 1, 1, 0, 10)))\n Dim compilation2 = compilation1.WithSource(source2.Tree).WithOptions(options.WithCurrentLocalTime(New DateTime(2016, 1, 1, 1, 0, 20)))\n Dim compilation3 = compilation2.WithSource(source3.Tree).WithOptions(options.WithCurrentLocalTime(New DateTime(2016, 1, 1, 1, 0, 30)))\n\n Dim v0 = CompileAndVerify(compilation0, verify:=Verification.Passes)\n Dim md0 = ModuleMetadata.CreateFromImage(v0.EmittedAssemblyData)\n Dim reader0 = md0.MetadataReader\n\n Dim m0 = compilation0.GetMember(Of MethodSymbol)(\"C.M\")\n Dim m1 = compilation1.GetMember(Of MethodSymbol)(\"C.M\")\n Dim m2 = compilation2.GetMember(Of MethodSymbol)(\"C.M\")\n Dim m3 = compilation3.GetMember(Of MethodSymbol)(\"C.M\")\n\n Dim f1 = compilation1.GetMember(Of MethodSymbol)(\"C.F\")\n Dim f2 = compilation2.GetMember(Of MethodSymbol)(\"C.F\")\n\n Dim generation0 = EmitBaseline.CreateInitialBaseline(md0, AddressOf v0.CreateSymReader().GetEncMethodDebugInfo)\n\n ' First update adds some new synthesized members (lambda related)\n Dim diff1 = compilation1.EmitDifference(\n generation0,\n ImmutableArray.Create(New SemanticEdit(SemanticEditKind.Update, m0, m1, GetSyntaxMapFromMarkers(source0, source1), preserveLocalVariables:=True)))\n\n diff1.VerifySynthesizedMembers(\n \"C: {_Closure$__}\",\n \"C._Closure$__: {$I1-0, $I1-1#1, _Lambda$__1-0, _Lambda$__1-1#1}\")\n\n ' Second update is to a method that doesn't produce any synthesized members \n Dim diff2 = compilation2.EmitDifference(\n diff1.NextGeneration,\n ImmutableArray.Create(New SemanticEdit(SemanticEditKind.Update, f1, f2, GetSyntaxMapFromMarkers(source1, source2), preserveLocalVariables:=True)))\n\n diff2.VerifySynthesizedMembers(\n \"C: {_Closure$__}\",\n \"C._Closure$__: {$I1-0, $I1-1#1, _Lambda$__1-0, _Lambda$__1-1#1}\")\n\n ' Last update again adds some new synthesized members (lambdas).\n ' Synthesized members added in the first update need to be mapped to the current compilation.\n ' Their containing assembly version is different than the version of the previous assembly and \n ' hence we need to account for wildcards when comparing the versions.\n Dim diff3 = compilation3.EmitDifference(\n diff2.NextGeneration,\n ImmutableArray.Create(New SemanticEdit(SemanticEditKind.Update, m2, m3, GetSyntaxMapFromMarkers(source2, source3), preserveLocalVariables:=True)))\n\n diff3.VerifySynthesizedMembers(\n \"C: {_Closure$__}\",\n \"C._Closure$__: {$I1-0, $I1-1#1, $I1-2#3, $I1-3#3, _Lambda$__1-0, _Lambda$__1-1#1, _Lambda$__1-2#3, _Lambda$__1-3#3}\")\n End Sub\n End Class\nEnd Namespace\n","avg_line_length":40.1690140845,"max_line_length":162,"alphanum_fraction":0.6391003807} {"size":2462,"ext":"vbs","lang":"Visual Basic","max_stars_count":null,"content":"'This script removes the Pubcookie filter to the main key for IIS\r\n'It then removes any found instance from enumerated web servers.\r\n\r\nOn Error Resume Next\r\nSet Container = GetObject(\"IIS:\/\/Localhost\/W3SVC\")\r\n\r\nIf Err = 0 Then\r\n 'Delete Pubcookie3 to root filter list \r\n Set ChildFilters = GetObject(\"IIS:\/\/Localhost\/W3SVC\/Filters\")\r\n pbc_delete Container, ChildFilters\r\n\r\n If Err = 0 Then\r\n\t 'nm\r\n Else\r\n msgbox(\"Problem encountered removing Pubcookie filter from root filter list, error: \" & Err )\r\n End If\r\n\r\n 'Remove any pubcookie filters from any web server instance\r\n For Each Child in Container\r\n If Child.Class = \"IIsWebServer\" Then\r\n\t\tSet ChildFilters = GetObject(\"IIS:\/\/Localhost\/W3SVC\/\" & Child.Name & \"\/Filters\")\r\n \tpbc_delete Child, ChildFilters\r\n End If\r\n Next\r\nElse\r\n msgbox(\"Could not open metabase, error: \" & Err & \". Pubcookie filter may still appear in root filter list.\")\r\nEnd If\r\n\r\nSub pbc_delete (Child, ChildFilters)\r\n On Error Resume Next\r\n \r\n FilterLoadOrder = ChildFilters.FilterLoadOrder\r\n If FilterLoadOrder <> \"\" Then\r\n q = 1\r\n\t\tDo\r\n\t\t\tp = Instr(q, FilterLoadOrder, \",\", 1)\r\n\t\t\tIf p > 0 Then\r\n\t\t\t\tChunk = Mid(FilterLoadOrder,q,p-q)\r\n \t\t\tFound = Instr(1, Chunk, \"pubcookie\", 1)\r\n\t\t\tElse\r\n\t\t\t\tl = len(FilterLoadOrder) - q + 1\r\n\t\t\t\tChunk = Mid(FilterLoadOrder,q,l)\r\n\t\t\t\tFound = Instr(q, FilterLoadOrder, \"pubcookie\", 1)\r\n\t\t\tEnd If\r\n\t\t\tIf Found = 0 Then \r\n\t\t\t 'Look for pubcookie in filter filename as well\r\n Set FilterObj = GetObject(\"IIS:\/\/Localhost\/W3SVC\/\" & Child.Name & \"\/Filters\/\" & Chunk)\r\n Found = Instr(1,FilterObj.FilterPath,\"pubcookie\",1)\r\n\t\t\tEnd If\r\n Err = 0 'In case of bad metabase paths in above tests\r\n\t\t\t\t\r\n\t\t\tIf Found > 0 Then\r\n\t\t\t 'Delete current filter instance \r\n\t\t\t\t ChildFilters.Delete \"IIsFilter\",Chunk \r\n\t\t\t\t If Err <> 0 Then\r\n\t\t\t\t\t'Messy, but not fatal\r\n\t\t\t\t\tErr = 0\r\n\t\t\t\t End If \r\n 'Remove string from load order\r\n FilterLoadOrder = Replace(FilterLoadOrder,Chunk & \",\",\"\")\r\n FilterLoadOrder = Replace(FilterLoadOrder,\",\" & Chunk,\"\")\r\n FilterLoadOrder = Replace(FilterLoadOrder,Chunk,\"\")\r\n ChildFilters.FilterLoadOrder = FilterLoadOrder \r\n\t\t\tEnd If\r\n\t\t\tq = p + 1\r\n\t\tLoop While p > 0\r\n\t\tChildFilters.SetInfo\r\n Child.SetInfo\r\n End If\r\nEnd Sub\r\n\r\n","avg_line_length":34.1944444444,"max_line_length":114,"alphanum_fraction":0.6088545898} {"size":1147,"ext":"vb","lang":"Visual Basic","max_stars_count":1.0,"content":"\ufeffImports System\nImports System.Reflection\nImports System.Runtime.InteropServices\n\n' General Information about an assembly is controlled through the following \n' set of attributes. Change these attribute values to modify the information\n' associated with an assembly.\n\n' Review the values of the assembly attributes\n\n \n \n \n \n \n \n\n\n\n'The following GUID is for the ID of the typelib if this project is exposed to COM\n \n\n' Version information for an assembly consists of the following four values:\n'\n' Major Version\n' Minor Version \n' Build Number\n' Revision\n'\n' You can specify all the values or you can default the Build and Revision Numbers \n' by using the '*' as shown below:\n' \n\n \n \n","avg_line_length":31.8611111111,"max_line_length":83,"alphanum_fraction":0.7480383609} {"size":14084,"ext":"vb","lang":"Visual Basic","max_stars_count":1.0,"content":"\ufeff'------------------------------------------------------------------------------\n' \n' This code was generated by a tool.\n'\n' Changes to this file may cause incorrect behavior and will be lost if\n' the code is regenerated. \n' <\/auto-generated>\n'------------------------------------------------------------------------------\n\nOption Strict On\nOption Explicit On\n\n\nPartial Public Class SondaggioAdmin\n\n '''\n '''MLVquestionari control.\n '''<\/summary>\n '''\n '''Auto-generated field.\n '''To modify move field declaration from designer file to code-behind file.\n '''<\/remarks>\n Protected WithEvents MLVquestionari As Global.System.Web.UI.WebControls.MultiView\n\n '''\n '''VIWdati control.\n '''<\/summary>\n '''\n '''Auto-generated field.\n '''To modify move field declaration from designer file to code-behind file.\n '''<\/remarks>\n Protected WithEvents VIWdati As Global.System.Web.UI.WebControls.View\n\n '''\n '''PNLmenu control.\n '''<\/summary>\n '''\n '''Auto-generated field.\n '''To modify move field declaration from designer file to code-behind file.\n '''<\/remarks>\n Protected WithEvents PNLmenu As Global.System.Web.UI.WebControls.Panel\n\n '''\n '''LNBCartellaPrincipale control.\n '''<\/summary>\n '''\n '''Auto-generated field.\n '''To modify move field declaration from designer file to code-behind file.\n '''<\/remarks>\n Protected WithEvents LNBCartellaPrincipale As Global.System.Web.UI.WebControls.LinkButton\n\n '''\n '''LNBSalva control.\n '''<\/summary>\n '''\n '''Auto-generated field.\n '''To modify move field declaration from designer file to code-behind file.\n '''<\/remarks>\n Protected WithEvents LNBSalva As Global.System.Web.UI.WebControls.LinkButton\n\n '''\n '''PNLQuestionario control.\n '''<\/summary>\n '''\n '''Auto-generated field.\n '''To modify move field declaration from designer file to code-behind file.\n '''<\/remarks>\n Protected WithEvents PNLQuestionario As Global.System.Web.UI.WebControls.Panel\n\n '''\n '''FRVQuestionario control.\n '''<\/summary>\n '''\n '''Auto-generated field.\n '''To modify move field declaration from designer file to code-behind file.\n '''<\/remarks>\n Protected WithEvents FRVQuestionario As Global.System.Web.UI.WebControls.FormView\n\n '''\n '''LBDestinatari control.\n '''<\/summary>\n '''\n '''Auto-generated field.\n '''To modify move field declaration from designer file to code-behind file.\n '''<\/remarks>\n Protected WithEvents LBDestinatari As Global.System.Web.UI.WebControls.Label\n\n '''\n '''PNLDestinatari control.\n '''<\/summary>\n '''\n '''Auto-generated field.\n '''To modify move field declaration from designer file to code-behind file.\n '''<\/remarks>\n Protected WithEvents PNLDestinatari As Global.System.Web.UI.WebControls.Panel\n\n '''\n '''DIVutentiComunita control.\n '''<\/summary>\n '''\n '''Auto-generated field.\n '''To modify move field declaration from designer file to code-behind file.\n '''<\/remarks>\n Protected WithEvents DIVutentiComunita As Global.System.Web.UI.HtmlControls.HtmlGenericControl\n\n '''\n '''LBDescrizione control.\n '''<\/summary>\n '''\n '''Auto-generated field.\n '''To modify move field declaration from designer file to code-behind file.\n '''<\/remarks>\n Protected WithEvents LBDescrizione As Global.System.Web.UI.WebControls.Label\n\n '''\n '''CHKUtentiComunita control.\n '''<\/summary>\n '''\n '''Auto-generated field.\n '''To modify move field declaration from designer file to code-behind file.\n '''<\/remarks>\n Protected WithEvents CHKUtentiComunita As Global.System.Web.UI.WebControls.CheckBox\n\n '''\n '''DIVutentiNonComunita control.\n '''<\/summary>\n '''\n '''Auto-generated field.\n '''To modify move field declaration from designer file to code-behind file.\n '''<\/remarks>\n Protected WithEvents DIVutentiNonComunita As Global.System.Web.UI.HtmlControls.HtmlGenericControl\n\n '''\n '''CHKUtentiNonComunita control.\n '''<\/summary>\n '''\n '''Auto-generated field.\n '''To modify move field declaration from designer file to code-behind file.\n '''<\/remarks>\n Protected WithEvents CHKUtentiNonComunita As Global.System.Web.UI.WebControls.CheckBox\n\n '''\n '''CHKUtentiEsterni control.\n '''<\/summary>\n '''\n '''Auto-generated field.\n '''To modify move field declaration from designer file to code-behind file.\n '''<\/remarks>\n Protected WithEvents CHKUtentiEsterni As Global.System.Web.UI.WebControls.CheckBox\n\n '''\n '''LBTitoloUrl control.\n '''<\/summary>\n '''\n '''Auto-generated field.\n '''To modify move field declaration from designer file to code-behind file.\n '''<\/remarks>\n Protected WithEvents LBTitoloUrl As Global.System.Web.UI.WebControls.Label\n\n '''\n '''HYPUrl control.\n '''<\/summary>\n '''\n '''Auto-generated field.\n '''To modify move field declaration from designer file to code-behind file.\n '''<\/remarks>\n Protected WithEvents HYPUrl As Global.System.Web.UI.WebControls.HyperLink\n\n '''\n '''CHKUtentiInvitati control.\n '''<\/summary>\n '''\n '''Auto-generated field.\n '''To modify move field declaration from designer file to code-behind file.\n '''<\/remarks>\n Protected WithEvents CHKUtentiInvitati As Global.System.Web.UI.WebControls.CheckBox\n\n '''\n '''BTNInvitaUtenti control.\n '''<\/summary>\n '''\n '''Auto-generated field.\n '''To modify move field declaration from designer file to code-behind file.\n '''<\/remarks>\n Protected WithEvents BTNInvitaUtenti As Global.System.Web.UI.WebControls.Button\n\n '''\n '''LBTipoGrafico control.\n '''<\/summary>\n '''\n '''Auto-generated field.\n '''To modify move field declaration from designer file to code-behind file.\n '''<\/remarks>\n Protected WithEvents LBTipoGrafico As Global.System.Web.UI.WebControls.Label\n\n '''\n '''PNLTipoGrafico control.\n '''<\/summary>\n '''\n '''Auto-generated field.\n '''To modify move field declaration from designer file to code-behind file.\n '''<\/remarks>\n Protected WithEvents PNLTipoGrafico As Global.System.Web.UI.WebControls.Panel\n\n '''\n '''PHTipiGrafico control.\n '''<\/summary>\n '''\n '''Auto-generated field.\n '''To modify move field declaration from designer file to code-behind file.\n '''<\/remarks>\n Protected WithEvents PHTipiGrafico As Global.System.Web.UI.WebControls.PlaceHolder\n\n '''\n '''PHOpzioni control.\n '''<\/summary>\n '''\n '''Auto-generated field.\n '''To modify move field declaration from designer file to code-behind file.\n '''<\/remarks>\n Protected WithEvents PHOpzioni As Global.System.Web.UI.WebControls.PlaceHolder\n\n '''\n '''LBGestioneAvanzata control.\n '''<\/summary>\n '''\n '''Auto-generated field.\n '''To modify move field declaration from designer file to code-behind file.\n '''<\/remarks>\n Protected WithEvents LBGestioneAvanzata As Global.System.Web.UI.WebControls.Label\n\n '''\n '''PNLCopiaQuestionario control.\n '''<\/summary>\n '''\n '''Auto-generated field.\n '''To modify move field declaration from designer file to code-behind file.\n '''<\/remarks>\n Protected WithEvents PNLCopiaQuestionario As Global.System.Web.UI.WebControls.Panel\n\n '''\n '''LBAltraComunita control.\n '''<\/summary>\n '''\n '''Auto-generated field.\n '''To modify move field declaration from designer file to code-behind file.\n '''<\/remarks>\n Protected WithEvents LBAltraComunita As Global.System.Web.UI.WebControls.Label\n\n '''\n '''DDLComunita control.\n '''<\/summary>\n '''\n '''Auto-generated field.\n '''To modify move field declaration from designer file to code-behind file.\n '''<\/remarks>\n Protected WithEvents DDLComunita As Global.System.Web.UI.WebControls.DropDownList\n\n '''\n '''BTNComunitaGruppo control.\n '''<\/summary>\n '''\n '''Auto-generated field.\n '''To modify move field declaration from designer file to code-behind file.\n '''<\/remarks>\n Protected WithEvents BTNComunitaGruppo As Global.System.Web.UI.WebControls.Button\n\n '''\n '''DDLComunitaGruppo control.\n '''<\/summary>\n '''\n '''Auto-generated field.\n '''To modify move field declaration from designer file to code-behind file.\n '''<\/remarks>\n Protected WithEvents DDLComunitaGruppo As Global.System.Web.UI.WebControls.DropDownList\n\n '''\n '''BTNCopiaComunita control.\n '''<\/summary>\n '''\n '''Auto-generated field.\n '''To modify move field declaration from designer file to code-behind file.\n '''<\/remarks>\n Protected WithEvents BTNCopiaComunita As Global.System.Web.UI.WebControls.Button\n\n '''\n '''LBNuovaLingua control.\n '''<\/summary>\n '''\n '''Auto-generated field.\n '''To modify move field declaration from designer file to code-behind file.\n '''<\/remarks>\n Protected WithEvents LBNuovaLingua As Global.System.Web.UI.WebControls.Label\n\n '''\n '''DDLNuovaLingua control.\n '''<\/summary>\n '''\n '''Auto-generated field.\n '''To modify move field declaration from designer file to code-behind file.\n '''<\/remarks>\n Protected WithEvents DDLNuovaLingua As Global.System.Web.UI.WebControls.DropDownList\n\n '''\n '''BTNSalvaAltraLingua control.\n '''<\/summary>\n '''\n '''Auto-generated field.\n '''To modify move field declaration from designer file to code-behind file.\n '''<\/remarks>\n Protected WithEvents BTNSalvaAltraLingua As Global.System.Web.UI.WebControls.Button\n\n '''\n '''LBGruppo control.\n '''<\/summary>\n '''\n '''Auto-generated field.\n '''To modify move field declaration from designer file to code-behind file.\n '''<\/remarks>\n Protected WithEvents LBGruppo As Global.System.Web.UI.WebControls.Label\n\n '''\n '''DDLGruppo control.\n '''<\/summary>\n '''\n '''Auto-generated field.\n '''To modify move field declaration from designer file to code-behind file.\n '''<\/remarks>\n Protected WithEvents DDLGruppo As Global.System.Web.UI.WebControls.DropDownList\n\n '''\n '''LBAltraCartella control.\n '''<\/summary>\n '''\n '''Auto-generated field.\n '''To modify move field declaration from designer file to code-behind file.\n '''<\/remarks>\n Protected WithEvents LBAltraCartella As Global.System.Web.UI.WebControls.Label\n\n '''\n '''DDLCartelle control.\n '''<\/summary>\n '''\n '''Auto-generated field.\n '''To modify move field declaration from designer file to code-behind file.\n '''<\/remarks>\n Protected WithEvents DDLCartelle As Global.System.Web.UI.WebControls.DropDownList\n\n '''\n '''BTNCopiaCartella control.\n '''<\/summary>\n '''\n '''Auto-generated field.\n '''To modify move field declaration from designer file to code-behind file.\n '''<\/remarks>\n Protected WithEvents BTNCopiaCartella As Global.System.Web.UI.WebControls.Button\n\n '''\n '''LBinserireNome control.\n '''<\/summary>\n '''\n '''Auto-generated field.\n '''To modify move field declaration from designer file to code-behind file.\n '''<\/remarks>\n Protected WithEvents LBinserireNome As Global.System.Web.UI.WebControls.Label\n\n '''\n '''LNBSalvaBottom control.\n '''<\/summary>\n '''\n '''Auto-generated field.\n '''To modify move field declaration from designer file to code-behind file.\n '''<\/remarks>\n Protected WithEvents LNBSalvaBottom As Global.System.Web.UI.WebControls.LinkButton\n\n '''\n '''VIWmessaggi control.\n '''<\/summary>\n '''\n '''Auto-generated field.\n '''To modify move field declaration from designer file to code-behind file.\n '''<\/remarks>\n Protected WithEvents VIWmessaggi As Global.System.Web.UI.WebControls.View\n\n '''\n '''LNBTornaGestioneQuestionari control.\n '''<\/summary>\n '''\n '''Auto-generated field.\n '''To modify move field declaration from designer file to code-behind file.\n '''<\/remarks>\n Protected WithEvents LNBTornaGestioneQuestionari As Global.System.Web.UI.WebControls.LinkButton\n\n '''\n '''LBerrore control.\n '''<\/summary>\n '''\n '''Auto-generated field.\n '''To modify move field declaration from designer file to code-behind file.\n '''<\/remarks>\n Protected WithEvents LBerrore As Global.System.Web.UI.WebControls.Label\n\n '''\n '''LBCopiaSottocartella control.\n '''<\/summary>\n '''\n '''Auto-generated field.\n '''To modify move field declaration from designer file to code-behind file.\n '''<\/remarks>\n Protected WithEvents LBCopiaSottocartella As Global.System.Web.UI.WebControls.Label\n\n '''\n '''LBCopiaComunita control.\n '''<\/summary>\n '''\n '''Auto-generated field.\n '''To modify move field declaration from designer file to code-behind file.\n '''<\/remarks>\n Protected WithEvents LBCopiaComunita As Global.System.Web.UI.WebControls.Label\n\n '''\n '''Master property.\n '''<\/summary>\n '''\n '''Auto-generated property.\n '''<\/remarks>\n Public Shadows ReadOnly Property Master() As Comunita_OnLine.AjaxPortal\n Get\n Return CType(MyBase.Master, Comunita_OnLine.AjaxPortal)\n End Get\n End Property\nEnd Class\n","avg_line_length":32.5265588915,"max_line_length":101,"alphanum_fraction":0.66138881} {"size":3220,"ext":"vb","lang":"Visual Basic","max_stars_count":2.0,"content":"Imports System\nImports System.CodeDom\nImports System.CodeDom.Compiler\nImports System.Collections\n\nPublic Class Class1\n\n Public Sub New()\n End Sub\n\n ' CodeAttributeDeclarationCollection\n Public Sub CodeAttributeDeclarationCollectionExample()\n '\n '\n ' Creates an empty CodeAttributeDeclarationCollection.\n Dim collection As New CodeAttributeDeclarationCollection()\n '<\/Snippet2>\n\n '\n ' Adds a CodeAttributeDeclaration to the collection.\n collection.Add(New CodeAttributeDeclaration(\"DescriptionAttribute\", New CodeAttributeArgument(New CodePrimitiveExpression(\"Test Description\"))))\n '<\/Snippet3>\n\n '\n ' Adds an array of CodeAttributeDeclaration objects to the collection.\n Dim declarations As CodeAttributeDeclaration() = {New CodeAttributeDeclaration(), New CodeAttributeDeclaration()}\n collection.AddRange(declarations)\n\n ' Adds a collection of CodeAttributeDeclaration objects to \n ' the collection.\n Dim declarationsCollection As New CodeAttributeDeclarationCollection()\n declarationsCollection.Add(New CodeAttributeDeclaration(\"DescriptionAttribute\", New CodeAttributeArgument(New CodePrimitiveExpression(\"Test Description\"))))\n declarationsCollection.Add(New CodeAttributeDeclaration(\"BrowsableAttribute\", New CodeAttributeArgument(New CodePrimitiveExpression(True))))\n collection.AddRange(declarationsCollection)\n '<\/Snippet4>\n\n '\n ' Tests for the presence of a CodeAttributeDeclaration in the \n ' collection, and retrieves its index if it is found.\n Dim testdeclaration As New CodeAttributeDeclaration(\"DescriptionAttribute\", New CodeAttributeArgument(New CodePrimitiveExpression(\"Test Description\")))\n Dim itemIndex As Integer = -1\n If collection.Contains(testdeclaration) Then\n itemIndex = collection.IndexOf(testdeclaration)\n End If\n '<\/Snippet5>\n\n '\n ' Copies the contents of the collection beginning at index 0 to the specified CodeAttributeDeclaration array.\n ' 'declarations' is a CodeAttributeDeclaration array.\n collection.CopyTo(declarations, 0)\n '<\/Snippet6>\n\n '\n ' Retrieves the count of the items in the collection.\n Dim collectionCount As Integer = collection.Count\n '<\/Snippet7>\n\n '\n ' Inserts a CodeAttributeDeclaration at index 0 of the collection.\n collection.Insert(0, New CodeAttributeDeclaration(\"DescriptionAttribute\", New CodeAttributeArgument(New CodePrimitiveExpression(\"Test Description\"))))\n '<\/Snippet8>\n\n '\n ' Removes the specified CodeAttributeDeclaration from the collection.\n Dim declaration As New CodeAttributeDeclaration(\"DescriptionAttribute\", New CodeAttributeArgument(New CodePrimitiveExpression(\"Test Description\")))\n collection.Remove(declaration)\n '<\/Snippet9>\n\n '\n ' Removes the CodeAttributeDeclaration at index 0.\n collection.RemoveAt(0)\n '<\/Snippet10>\n '<\/Snippet1>\n End Sub\nEnd Class","avg_line_length":42.9333333333,"max_line_length":164,"alphanum_fraction":0.7145962733} {"size":535,"ext":"vb","lang":"Visual Basic","max_stars_count":null,"content":"\ufeffPublic Class XmlOutputFactory\n\n Public Shared Function GetImplemenation(name As String) As IXmlOutput\n ' TODO: Implement to support different implementations\n Dim xmlOutput As IXmlOutput = Nothing\n\n Select Case name\n Case \"ECO\"\n ' TODO: Implement for ECO context\n End Select\n\n If xmlOutput Is Nothing Then\n ' Set default\n xmlOutput = New BomCompare.OutputFormat.DefaultXmlOutput\n End If\n\n Return xmlOutput\n End Function\n\nEnd Class\n","avg_line_length":25.4761904762,"max_line_length":73,"alphanum_fraction":0.6411214953} {"size":818,"ext":"vb","lang":"Visual Basic","max_stars_count":2.0,"content":"\ufeff'\nImports System.IO\nImports System.Xml\n\npublic class Sample\n\n public shared sub Main()\n \n Dim reader as XmlTextReader = new XmlTextReader(\"orderData.xml\")\n\n 'Parse the file and pull out the order date and price.\n while (reader.Read())\n if (reader.NodeType=XmlNodeType.Element)\n select case reader.Name\n case \"order\":\n Dim orderDate as DateTime = XmlConvert.ToDateTime(reader.GetAttribute(\"date\"))\n Console.WriteLine(\"order date: {0}\", orderDate.ToString())\n case \"price\":\n Dim price as Double = XmlConvert.ToDouble(reader.ReadInnerXml())\n Console.WriteLine(\"price: {0}\", price.ToString())\n end select\n end if\n end while\n\n 'Close the reader.\n reader.Close() \n end sub\nend class\n'<\/snippet1>","avg_line_length":28.2068965517,"max_line_length":91,"alphanum_fraction":0.6344743276} {"size":3187,"ext":"frm","lang":"Visual Basic","max_stars_count":1.0,"content":"TYPE=VIEW\nquery=select substring_index(`performance_schema`.`events_waits_summary_global_by_event_name`.`EVENT_NAME`,\\'\/\\',3) AS `event_class`,sum(`performance_schema`.`events_waits_summary_global_by_event_name`.`COUNT_STAR`) AS `total`,sum(`performance_schema`.`events_waits_summary_global_by_event_name`.`SUM_TIMER_WAIT`) AS `total_latency`,min(`performance_schema`.`events_waits_summary_global_by_event_name`.`MIN_TIMER_WAIT`) AS `min_latency`,ifnull((sum(`performance_schema`.`events_waits_summary_global_by_event_name`.`SUM_TIMER_WAIT`) \/ nullif(sum(`performance_schema`.`events_waits_summary_global_by_event_name`.`COUNT_STAR`),0)),0) AS `avg_latency`,max(`performance_schema`.`events_waits_summary_global_by_event_name`.`MAX_TIMER_WAIT`) AS `max_latency` from `performance_schema`.`events_waits_summary_global_by_event_name` where ((`performance_schema`.`events_waits_summary_global_by_event_name`.`SUM_TIMER_WAIT` > 0) and (`performance_schema`.`events_waits_summary_global_by_event_name`.`EVENT_NAME` <> \\'idle\\')) group by substring_index(`performance_schema`.`events_waits_summary_global_by_event_name`.`EVENT_NAME`,\\'\/\\',3) order by sum(`performance_schema`.`events_waits_summary_global_by_event_name`.`SUM_TIMER_WAIT`) desc\nmd5=9d840339684bda6a9e812ee3a26b89de\nupdatable=0\nalgorithm=1\ndefiner_user=mysql.sys\ndefiner_host=localhost\nsuid=0\nwith_check_option=0\ntimestamp=2020-06-10 22:16:19\ncreate-version=1\nsource=SELECT SUBSTRING_INDEX(event_name,\\'\/\\', 3) AS event_class, SUM(COUNT_STAR) AS total, SUM(sum_timer_wait) AS total_latency, MIN(min_timer_wait) AS min_latency, IFNULL(SUM(sum_timer_wait) \/ NULLIF(SUM(COUNT_STAR), 0), 0) AS avg_latency, MAX(max_timer_wait) AS max_latency FROM performance_schema.events_waits_summary_global_by_event_name WHERE sum_timer_wait > 0 AND event_name != \\'idle\\' GROUP BY SUBSTRING_INDEX(event_name,\\'\/\\', 3) ORDER BY SUM(sum_timer_wait) DESC\nclient_cs_name=utf8\nconnection_cl_name=utf8_general_ci\nview_body_utf8=select substring_index(`performance_schema`.`events_waits_summary_global_by_event_name`.`EVENT_NAME`,\\'\/\\',3) AS `event_class`,sum(`performance_schema`.`events_waits_summary_global_by_event_name`.`COUNT_STAR`) AS `total`,sum(`performance_schema`.`events_waits_summary_global_by_event_name`.`SUM_TIMER_WAIT`) AS `total_latency`,min(`performance_schema`.`events_waits_summary_global_by_event_name`.`MIN_TIMER_WAIT`) AS `min_latency`,ifnull((sum(`performance_schema`.`events_waits_summary_global_by_event_name`.`SUM_TIMER_WAIT`) \/ nullif(sum(`performance_schema`.`events_waits_summary_global_by_event_name`.`COUNT_STAR`),0)),0) AS `avg_latency`,max(`performance_schema`.`events_waits_summary_global_by_event_name`.`MAX_TIMER_WAIT`) AS `max_latency` from `performance_schema`.`events_waits_summary_global_by_event_name` where ((`performance_schema`.`events_waits_summary_global_by_event_name`.`SUM_TIMER_WAIT` > 0) and (`performance_schema`.`events_waits_summary_global_by_event_name`.`EVENT_NAME` <> \\'idle\\')) group by substring_index(`performance_schema`.`events_waits_summary_global_by_event_name`.`EVENT_NAME`,\\'\/\\',3) order by sum(`performance_schema`.`events_waits_summary_global_by_event_name`.`SUM_TIMER_WAIT`) desc\n","avg_line_length":199.1875,"max_line_length":1235,"alphanum_fraction":0.8355820521} {"size":290,"ext":"vb","lang":"Visual Basic","max_stars_count":30.0,"content":"\ufeff'''The XMLHttpRequestResponseType type is an enumerated set of strings which are used to specify the type of data contained in the response of an XMLHttpRequest.<\/summary>\r\n\r\nPublic Interface [XMLHttpRequestResponseType]\r\nEnd Interface","avg_line_length":72.5,"max_line_length":182,"alphanum_fraction":0.824137931} {"size":2363,"ext":"vb","lang":"Visual Basic","max_stars_count":null,"content":"\ufeffPublic Class MapTile\n\n Public terrain As terrainTile\n Private creatures As Creature\n Private items As Item\n\n Structure terrainTile\n Dim construct As constructInfo\n Dim ground As groundInfo\n End Structure\n\n Structure constructInfo\n Dim showChar As Char\n Dim colour As Color\n Dim queryInfo As String\n End Structure\n\n Structure groundInfo\n Dim colour As Color\n Dim queryInfo As String\n End Structure\n\n Public Sub setCreature(ByRef creature As Creature)\n Me.creatures = creature\n End Sub\n\n Public Function getCreature()\n Return Me.creatures\n End Function\n\n Public Sub setItem(ByRef item As Item)\n Me.items = item\n End Sub\n\n Public Function getItem()\n Return Me.items\n End Function\n\n Public Function describe()\n Dim queryResponse As String\n If Not (creatures Is Nothing) Then 'try to describe creature and terrain\n If creatures.status = \"dead\" Then 'is it dead?\n queryResponse = \"This is the corpse of \" & creatures.queryInfo & \" laying dead on \" & terrain.ground.queryInfo\n ElseIf creatures.flier = True Then 'or is it flying?\n queryResponse = \"This is \" & creatures.queryInfo & \" flying over \" & terrain.ground.queryInfo & \", it seems to be \" & creatures.status\n Else\n queryResponse = \"This is \" & creatures.queryInfo & \" standing on \" & terrain.ground.queryInfo & \", it seems to be \" & creatures.status\n End If\n If Not creatures.equipedItems Is Nothing Then\n queryResponse = queryResponse & \", it is holding \" & creatures.equipedItems.queryInfo\n End If\n Else\n If terrain.construct.showChar <> \".\" And terrain.construct.showChar <> \"~\" Then 'else try to describe construct and terrain\n queryResponse = \"This is \" & terrain.construct.queryInfo & \" standing on \" & terrain.ground.queryInfo\n Else 'else describe terrain\n queryResponse = \"This is \" & terrain.ground.queryInfo\n End If\n End If\n If Not items Is Nothing Then 'also describe any items\n queryResponse = queryResponse & \", there is \" & items.queryInfo & \" on the ground\"\n End If\n Return queryResponse\n End Function\n\nEnd Class\n","avg_line_length":35.803030303,"max_line_length":150,"alphanum_fraction":0.6330935252} {"size":1028,"ext":"vb","lang":"Visual Basic","max_stars_count":null,"content":"Imports System.Reflection\r\nImports System.Runtime.InteropServices\r\n\r\n' General Information about an assembly is controlled through the following \r\n' set of attributes. Change these attribute values to modify the information\r\n' associated with an assembly.\r\n\r\n' Review the values of the assembly attributes\r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n'The following GUID is for the ID of the typelib if this project is exposed to COM\r\n \r\n\r\n' Version information for an assembly consists of the following four values:\r\n'\r\n' Major Version\r\n' Minor Version \r\n' Build Number\r\n' Revision\r\n'\r\n' You can specify all the values or you can default the Build and Revision Numbers \r\n' by using the '*' as shown below:\r\n\r\n \r\n","avg_line_length":32.125,"max_line_length":84,"alphanum_fraction":0.7227626459} {"size":2078,"ext":"vb","lang":"Visual Basic","max_stars_count":null,"content":"Imports System\nImports System.Net\nImports Independentsoft.Exchange\n\nNamespace Sample\n Class Module1\n Shared Sub Main(ByVal args As String())\n\n Dim credential As New NetworkCredential(\"username\", \"password\")\n Dim service As New Service(\"https:\/\/myserver\/ews\/Exchange.asmx\", credential)\n\n Try\n\n Dim restriction As New IsEqualTo(MessagePropertyPath.IsRead, False)\n\n Dim response As FindItemResponse = service.FindItem(StandardFolder.Inbox, MessagePropertyPath.AllPropertyPaths, restriction)\n\n For i As Integer = 0 To response.Items.Count - 1\n\n If TypeOf response.Items(i) Is Message Then\n\n Dim message As Message = DirectCast(response.Items(i), Message)\n\n Console.WriteLine(\"Subject = \" + message.Subject)\n Console.WriteLine(\"ReceivedTime = \" + message.ReceivedTime)\n Console.WriteLine(\"Body Preview = \" + message.BodyPlainText)\n Console.WriteLine(\"----------------------------------------------------------------\")\n\n 'If you want to get complete message with entire Body uncomment following line \n 'message = service.GetMessage(response.Items(i).ItemId)\n\n 'If you want to set message as read uncomment following lines \n 'Dim readProperty As New [Property](MessagePropertyPath.IsRead, True)\n 'Dim itemId As ItemId = service.UpdateItem(response.Items(i).ItemId, readProperty)\n End If\n Next\n\n Console.Read()\n\n Catch ex As ServiceRequestException\n Console.WriteLine(\"Error: \" + ex.Message)\n Console.WriteLine(\"Error: \" + ex.XmlMessage)\n Console.Read()\n Catch ex As WebException\n Console.WriteLine(\"Error: \" + ex.Message)\n Console.Read()\n End Try\n\n End Sub\n End Class\nEnd Namespace","avg_line_length":40.7450980392,"max_line_length":140,"alphanum_fraction":0.5611164581} {"size":15184,"ext":"vb","lang":"Visual Basic","max_stars_count":null,"content":"\ufeff _\nPartial Class Grading\n Inherits System.Windows.Forms.Form\n\n 'Form overrides dispose to clean up the component list.\n _\n Protected Overrides Sub Dispose(ByVal disposing As Boolean)\n Try\n If disposing AndAlso components IsNot Nothing Then\n components.Dispose()\n End If\n Finally\n MyBase.Dispose(disposing)\n End Try\n End Sub\n\n 'Required by the Windows Form Designer\n Private components As System.ComponentModel.IContainer\n\n 'NOTE: The following procedure is required by the Windows Form Designer\n 'It can be modified using the Windows Form Designer. \n 'Do not modify it using the code editor.\n _\n Private Sub InitializeComponent()\n Me.GradingSystemGroupBox = New System.Windows.Forms.GroupBox\n Me.GroupBox3 = New System.Windows.Forms.GroupBox\n Me.GradingPeriodComboBox = New System.Windows.Forms.ComboBox\n Me.Label6 = New System.Windows.Forms.Label\n Me.Label5 = New System.Windows.Forms.Label\n Me.SYComboBox = New System.Windows.Forms.ComboBox\n Me.GroupBox2 = New System.Windows.Forms.GroupBox\n Me.GradingDataGridView = New System.Windows.Forms.DataGridView\n Me.Column4 = New System.Windows.Forms.DataGridViewTextBoxColumn\n Me.Column5 = New System.Windows.Forms.DataGridViewTextBoxColumn\n Me.Column6 = New System.Windows.Forms.DataGridViewTextBoxColumn\n Me.GradingGroupBox = New System.Windows.Forms.GroupBox\n Me.GoButton = New System.Windows.Forms.Button\n Me.TeacherComboBox = New System.Windows.Forms.ComboBox\n Me.Label1 = New System.Windows.Forms.Label\n Me.YearComboBox = New System.Windows.Forms.ComboBox\n Me.SectionComboBox = New System.Windows.Forms.ComboBox\n Me.SubjectComboBox = New System.Windows.Forms.ComboBox\n Me.Label2 = New System.Windows.Forms.Label\n Me.Label3 = New System.Windows.Forms.Label\n Me.Label4 = New System.Windows.Forms.Label\n Me.CloseButton = New System.Windows.Forms.Button\n Me.TextBox2 = New System.Windows.Forms.TextBox\n Me.GradingSystemGroupBox.SuspendLayout()\n Me.GroupBox3.SuspendLayout()\n Me.GroupBox2.SuspendLayout()\n CType(Me.GradingDataGridView, System.ComponentModel.ISupportInitialize).BeginInit()\n Me.GradingGroupBox.SuspendLayout()\n Me.SuspendLayout()\n '\n 'GradingSystemGroupBox\n '\n Me.GradingSystemGroupBox.Controls.Add(Me.GroupBox3)\n Me.GradingSystemGroupBox.Controls.Add(Me.GroupBox2)\n Me.GradingSystemGroupBox.Controls.Add(Me.GradingGroupBox)\n Me.GradingSystemGroupBox.Font = New System.Drawing.Font(\"Calibri\", 11.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))\n Me.GradingSystemGroupBox.Location = New System.Drawing.Point(-1, 16)\n Me.GradingSystemGroupBox.Name = \"GradingSystemGroupBox\"\n Me.GradingSystemGroupBox.Size = New System.Drawing.Size(564, 467)\n Me.GradingSystemGroupBox.TabIndex = 0\n Me.GradingSystemGroupBox.TabStop = False\n '\n 'GroupBox3\n '\n Me.GroupBox3.Controls.Add(Me.GradingPeriodComboBox)\n Me.GroupBox3.Controls.Add(Me.Label6)\n Me.GroupBox3.Controls.Add(Me.Label5)\n Me.GroupBox3.Controls.Add(Me.SYComboBox)\n Me.GroupBox3.Font = New System.Drawing.Font(\"Microsoft Sans Serif\", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))\n Me.GroupBox3.Location = New System.Drawing.Point(6, 13)\n Me.GroupBox3.Name = \"GroupBox3\"\n Me.GroupBox3.Size = New System.Drawing.Size(200, 105)\n Me.GroupBox3.TabIndex = 15\n Me.GroupBox3.TabStop = False\n '\n 'GradingPeriodComboBox\n '\n Me.GradingPeriodComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList\n Me.GradingPeriodComboBox.FormattingEnabled = True\n Me.GradingPeriodComboBox.Location = New System.Drawing.Point(15, 72)\n Me.GradingPeriodComboBox.Name = \"GradingPeriodComboBox\"\n Me.GradingPeriodComboBox.Size = New System.Drawing.Size(166, 21)\n Me.GradingPeriodComboBox.TabIndex = 14\n '\n 'Label6\n '\n Me.Label6.AutoSize = True\n Me.Label6.Location = New System.Drawing.Point(12, 56)\n Me.Label6.Name = \"Label6\"\n Me.Label6.Size = New System.Drawing.Size(80, 13)\n Me.Label6.TabIndex = 12\n Me.Label6.Text = \"Grading Period:\"\n '\n 'Label5\n '\n Me.Label5.AutoSize = True\n Me.Label5.Location = New System.Drawing.Point(12, 16)\n Me.Label5.Name = \"Label5\"\n Me.Label5.Size = New System.Drawing.Size(68, 13)\n Me.Label5.TabIndex = 11\n Me.Label5.Text = \"School Year:\"\n '\n 'SYComboBox\n '\n Me.SYComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList\n Me.SYComboBox.FormattingEnabled = True\n Me.SYComboBox.Location = New System.Drawing.Point(15, 32)\n Me.SYComboBox.Name = \"SYComboBox\"\n Me.SYComboBox.Size = New System.Drawing.Size(166, 21)\n Me.SYComboBox.TabIndex = 13\n '\n 'GroupBox2\n '\n Me.GroupBox2.Controls.Add(Me.GradingDataGridView)\n Me.GroupBox2.Font = New System.Drawing.Font(\"Microsoft Sans Serif\", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))\n Me.GroupBox2.Location = New System.Drawing.Point(204, 13)\n Me.GroupBox2.Name = \"GroupBox2\"\n Me.GroupBox2.Size = New System.Drawing.Size(354, 450)\n Me.GroupBox2.TabIndex = 11\n Me.GroupBox2.TabStop = False\n '\n 'GradingDataGridView\n '\n Me.GradingDataGridView.BackgroundColor = System.Drawing.Color.White\n Me.GradingDataGridView.BorderStyle = System.Windows.Forms.BorderStyle.None\n Me.GradingDataGridView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize\n Me.GradingDataGridView.Columns.AddRange(New System.Windows.Forms.DataGridViewColumn() {Me.Column4, Me.Column5, Me.Column6})\n Me.GradingDataGridView.Location = New System.Drawing.Point(6, 16)\n Me.GradingDataGridView.Name = \"GradingDataGridView\"\n Me.GradingDataGridView.Size = New System.Drawing.Size(344, 429)\n Me.GradingDataGridView.TabIndex = 1\n '\n 'Column4\n '\n Me.Column4.HeaderText = \"Student ID\"\n Me.Column4.Name = \"Column4\"\n '\n 'Column5\n '\n Me.Column5.HeaderText = \"Student Name\"\n Me.Column5.Name = \"Column5\"\n '\n 'Column6\n '\n Me.Column6.HeaderText = \"Grading\"\n Me.Column6.Name = \"Column6\"\n '\n 'GradingGroupBox\n '\n Me.GradingGroupBox.Controls.Add(Me.GoButton)\n Me.GradingGroupBox.Controls.Add(Me.TeacherComboBox)\n Me.GradingGroupBox.Controls.Add(Me.Label1)\n Me.GradingGroupBox.Controls.Add(Me.YearComboBox)\n Me.GradingGroupBox.Controls.Add(Me.SectionComboBox)\n Me.GradingGroupBox.Controls.Add(Me.SubjectComboBox)\n Me.GradingGroupBox.Controls.Add(Me.Label2)\n Me.GradingGroupBox.Controls.Add(Me.Label3)\n Me.GradingGroupBox.Controls.Add(Me.Label4)\n Me.GradingGroupBox.Font = New System.Drawing.Font(\"Microsoft Sans Serif\", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))\n Me.GradingGroupBox.Location = New System.Drawing.Point(6, 110)\n Me.GradingGroupBox.Name = \"GradingGroupBox\"\n Me.GradingGroupBox.Size = New System.Drawing.Size(200, 161)\n Me.GradingGroupBox.TabIndex = 10\n Me.GradingGroupBox.TabStop = False\n '\n 'GoButton\n '\n Me.GoButton.Font = New System.Drawing.Font(\"Microsoft Sans Serif\", 9.75!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))\n Me.GoButton.Location = New System.Drawing.Point(68, 121)\n Me.GoButton.Name = \"GoButton\"\n Me.GoButton.Size = New System.Drawing.Size(113, 36)\n Me.GoButton.TabIndex = 10\n Me.GoButton.Text = \"&Search\"\n Me.GoButton.UseVisualStyleBackColor = True\n '\n 'TeacherComboBox\n '\n Me.TeacherComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList\n Me.TeacherComboBox.FormattingEnabled = True\n Me.TeacherComboBox.Location = New System.Drawing.Point(68, 13)\n Me.TeacherComboBox.Name = \"TeacherComboBox\"\n Me.TeacherComboBox.Size = New System.Drawing.Size(113, 21)\n Me.TeacherComboBox.TabIndex = 7\n '\n 'Label1\n '\n Me.Label1.AutoSize = True\n Me.Label1.Location = New System.Drawing.Point(12, 16)\n Me.Label1.Name = \"Label1\"\n Me.Label1.Size = New System.Drawing.Size(50, 13)\n Me.Label1.TabIndex = 2\n Me.Label1.Text = \"Teacher:\"\n '\n 'YearComboBox\n '\n Me.YearComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList\n Me.YearComboBox.FormattingEnabled = True\n Me.YearComboBox.Location = New System.Drawing.Point(68, 40)\n Me.YearComboBox.Name = \"YearComboBox\"\n Me.YearComboBox.Size = New System.Drawing.Size(113, 21)\n Me.YearComboBox.TabIndex = 6\n '\n 'SectionComboBox\n '\n Me.SectionComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList\n Me.SectionComboBox.FormattingEnabled = True\n Me.SectionComboBox.Location = New System.Drawing.Point(68, 67)\n Me.SectionComboBox.Name = \"SectionComboBox\"\n Me.SectionComboBox.Size = New System.Drawing.Size(113, 21)\n Me.SectionComboBox.TabIndex = 9\n '\n 'SubjectComboBox\n '\n Me.SubjectComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList\n Me.SubjectComboBox.FormattingEnabled = True\n Me.SubjectComboBox.Location = New System.Drawing.Point(68, 94)\n Me.SubjectComboBox.Name = \"SubjectComboBox\"\n Me.SubjectComboBox.Size = New System.Drawing.Size(113, 21)\n Me.SubjectComboBox.TabIndex = 8\n '\n 'Label2\n '\n Me.Label2.AutoSize = True\n Me.Label2.Location = New System.Drawing.Point(30, 41)\n Me.Label2.Name = \"Label2\"\n Me.Label2.Size = New System.Drawing.Size(32, 13)\n Me.Label2.TabIndex = 3\n Me.Label2.Text = \"Year:\"\n '\n 'Label3\n '\n Me.Label3.AutoSize = True\n Me.Label3.Location = New System.Drawing.Point(16, 70)\n Me.Label3.Name = \"Label3\"\n Me.Label3.Size = New System.Drawing.Size(46, 13)\n Me.Label3.TabIndex = 4\n Me.Label3.Text = \"Section:\"\n '\n 'Label4\n '\n Me.Label4.AutoSize = True\n Me.Label4.Location = New System.Drawing.Point(16, 97)\n Me.Label4.Name = \"Label4\"\n Me.Label4.Size = New System.Drawing.Size(46, 13)\n Me.Label4.TabIndex = 5\n Me.Label4.Text = \"Subject:\"\n '\n 'CloseButton\n '\n Me.CloseButton.BackColor = System.Drawing.Color.WhiteSmoke\n Me.CloseButton.FlatStyle = System.Windows.Forms.FlatStyle.Popup\n Me.CloseButton.Font = New System.Drawing.Font(\"Microsoft Sans Serif\", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))\n Me.CloseButton.Location = New System.Drawing.Point(227, 485)\n Me.CloseButton.Name = \"CloseButton\"\n Me.CloseButton.Size = New System.Drawing.Size(107, 40)\n Me.CloseButton.TabIndex = 16\n Me.CloseButton.Text = \"&Main\"\n Me.CloseButton.UseVisualStyleBackColor = False\n '\n 'TextBox2\n '\n Me.TextBox2.BackColor = System.Drawing.SystemColors.ActiveCaption\n Me.TextBox2.BorderStyle = System.Windows.Forms.BorderStyle.None\n Me.TextBox2.Font = New System.Drawing.Font(\"Impact\", 14.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))\n Me.TextBox2.ForeColor = System.Drawing.Color.White\n Me.TextBox2.Location = New System.Drawing.Point(0, 0)\n Me.TextBox2.Multiline = True\n Me.TextBox2.Name = \"TextBox2\"\n Me.TextBox2.Size = New System.Drawing.Size(563, 25)\n Me.TextBox2.TabIndex = 15\n Me.TextBox2.Text = \"Grading System\"\n Me.TextBox2.TextAlign = System.Windows.Forms.HorizontalAlignment.Center\n '\n 'Grading\n '\n Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)\n Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font\n Me.BackColor = System.Drawing.SystemColors.GradientActiveCaption\n Me.ClientSize = New System.Drawing.Size(563, 527)\n Me.Controls.Add(Me.CloseButton)\n Me.Controls.Add(Me.TextBox2)\n Me.Controls.Add(Me.GradingSystemGroupBox)\n Me.Name = \"Grading\"\n Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen\n Me.Text = \"Grading\"\n Me.GradingSystemGroupBox.ResumeLayout(False)\n Me.GroupBox3.ResumeLayout(False)\n Me.GroupBox3.PerformLayout()\n Me.GroupBox2.ResumeLayout(False)\n CType(Me.GradingDataGridView, System.ComponentModel.ISupportInitialize).EndInit()\n Me.GradingGroupBox.ResumeLayout(False)\n Me.GradingGroupBox.PerformLayout()\n Me.ResumeLayout(False)\n Me.PerformLayout()\n\n End Sub\n Friend WithEvents GradingSystemGroupBox As System.Windows.Forms.GroupBox\n Friend WithEvents Label4 As System.Windows.Forms.Label\n Friend WithEvents Label3 As System.Windows.Forms.Label\n Friend WithEvents Label2 As System.Windows.Forms.Label\n Friend WithEvents Label1 As System.Windows.Forms.Label\n Friend WithEvents GroupBox2 As System.Windows.Forms.GroupBox\n Friend WithEvents GradingGroupBox As System.Windows.Forms.GroupBox\n Friend WithEvents GoButton As System.Windows.Forms.Button\n Friend WithEvents YearComboBox As System.Windows.Forms.ComboBox\n Friend WithEvents SectionComboBox As System.Windows.Forms.ComboBox\n Friend WithEvents SubjectComboBox As System.Windows.Forms.ComboBox\n Friend WithEvents TeacherComboBox As System.Windows.Forms.ComboBox\n Friend WithEvents GroupBox3 As System.Windows.Forms.GroupBox\n Friend WithEvents GradingPeriodComboBox As System.Windows.Forms.ComboBox\n Friend WithEvents Label6 As System.Windows.Forms.Label\n Friend WithEvents Label5 As System.Windows.Forms.Label\n Friend WithEvents SYComboBox As System.Windows.Forms.ComboBox\n Friend WithEvents GradingDataGridView As System.Windows.Forms.DataGridView\n Friend WithEvents CloseButton As System.Windows.Forms.Button\n Friend WithEvents TextBox2 As System.Windows.Forms.TextBox\n Friend WithEvents Column4 As System.Windows.Forms.DataGridViewTextBoxColumn\n Friend WithEvents Column5 As System.Windows.Forms.DataGridViewTextBoxColumn\n Friend WithEvents Column6 As System.Windows.Forms.DataGridViewTextBoxColumn\nEnd Class\n","avg_line_length":46.72,"max_line_length":173,"alphanum_fraction":0.6817044257} {"size":2830,"ext":"vb","lang":"Visual Basic","max_stars_count":85.0,"content":"' Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.\n\nImports Microsoft.CodeAnalysis.Text\nImports Microsoft.CodeAnalysis.VisualBasic\nImports Microsoft.CodeAnalysis.VisualBasic.Symbols\nImports Microsoft.CodeAnalysis.VisualBasic.Syntax\nImports Roslyn.Test.Utilities\nImports Xunit\n\nNamespace Microsoft.CodeAnalysis.Editor.VisualBasic.UnitTests.Recommendations.Declarations\n Public Class InheritsKeywordRecommenderTests\n \n Public Sub InheritsAfterClassDeclaration()\n VerifyRecommendationsContain(\nClass Foo\n|<\/File>, \"Inherits\")\n End Sub\n\n \n Public Sub InheritsAfterInterfaceDeclaration()\n VerifyRecommendationsContain(\nInterface Foo\n|<\/File>, \"Inherits\")\n End Sub\n\n \n Public Sub InheritsAfterClassDeclarationAndBlankLine()\n VerifyRecommendationsContain(\nClass Foo\n\n|<\/File>, \"Inherits\")\n End Sub\n\n \n Public Sub InheritsAfterInterfaceDeclarationAndBlankLine()\n VerifyRecommendationsContain(\nInterface Foo\n\n|<\/File>, \"Inherits\")\n End Sub\n\n \n Public Sub InheritsNotAfterImplements()\n VerifyRecommendationsMissing(\nClass Foo\nImplements IFooable\n|<\/File>, \"Inherits\")\n End Sub\n\n \n Public Sub InheritsNotInStructure()\n VerifyRecommendationsMissing(\nStructure Foo\n|<\/File>, \"Inherits\")\n End Sub\n\n \n \n Public Sub InheritsAfterInheritsInInterface()\n VerifyRecommendationsContain(\nPublic Interface ITest1\nEnd Interface\nPublic Interface ITest2\n Inherits ITest1\n |\n<\/File>, \"Inherits\")\n End Sub\n\n \n \n Public Sub InheritsNotAfterInheritsInClass()\n VerifyRecommendationsMissing(\nPublic Class Foo\n Inherits Bar\n |\n<\/File>, \"Inherits\")\n End Sub\n\n \n \n Public Sub NotAfterHash()\n VerifyRecommendationsMissing(\nImports System\n\n#|\n \nModule Module1\n \nEnd Module\n\n<\/File>, \"Inherits\")\n End Sub\n End Class\nEnd Namespace\n","avg_line_length":29.7894736842,"max_line_length":159,"alphanum_fraction":0.7116607774} {"size":8183,"ext":"frm","lang":"Visual Basic","max_stars_count":null,"content":"TYPE=VIEW\nquery=select `pps`.`THREAD_ID` AS `thd_id`,`pps`.`PROCESSLIST_ID` AS `conn_id`,if((`pps`.`NAME` = \\'thread\/sql\/one_connection\\'),concat(`pps`.`PROCESSLIST_USER`,\\'@\\',`pps`.`PROCESSLIST_HOST`),replace(`pps`.`NAME`,\\'thread\/\\',\\'\\')) AS `user`,`pps`.`PROCESSLIST_DB` AS `db`,`pps`.`PROCESSLIST_COMMAND` AS `command`,`pps`.`PROCESSLIST_STATE` AS `state`,`pps`.`PROCESSLIST_TIME` AS `time`,`sys`.`format_statement`(`pps`.`PROCESSLIST_INFO`) AS `current_statement`,if(isnull(`esc`.`END_EVENT_ID`),`sys`.`format_time`(`esc`.`TIMER_WAIT`),NULL) AS `statement_latency`,if(isnull(`esc`.`END_EVENT_ID`),round((100 * (`estc`.`WORK_COMPLETED` \/ `estc`.`WORK_ESTIMATED`)),2),NULL) AS `progress`,`sys`.`format_time`(`esc`.`LOCK_TIME`) AS `lock_latency`,`esc`.`ROWS_EXAMINED` AS `rows_examined`,`esc`.`ROWS_SENT` AS `rows_sent`,`esc`.`ROWS_AFFECTED` AS `rows_affected`,`esc`.`CREATED_TMP_TABLES` AS `tmp_tables`,`esc`.`CREATED_TMP_DISK_TABLES` AS `tmp_disk_tables`,if(((`esc`.`NO_GOOD_INDEX_USED` > 0) or (`esc`.`NO_INDEX_USED` > 0)),\\'YES\\',\\'NO\\') AS `full_scan`,if((`esc`.`END_EVENT_ID` is not null),`sys`.`format_statement`(`esc`.`SQL_TEXT`),NULL) AS `last_statement`,if((`esc`.`END_EVENT_ID` is not null),`sys`.`format_time`(`esc`.`TIMER_WAIT`),NULL) AS `last_statement_latency`,`sys`.`format_bytes`(`mem`.`current_allocated`) AS `current_memory`,`ewc`.`EVENT_NAME` AS `last_wait`,if((isnull(`ewc`.`END_EVENT_ID`) and (`ewc`.`EVENT_NAME` is not null)),\\'Still Waiting\\',`sys`.`format_time`(`ewc`.`TIMER_WAIT`)) AS `last_wait_latency`,`ewc`.`SOURCE` AS `source`,`sys`.`format_time`(`etc`.`TIMER_WAIT`) AS `trx_latency`,`etc`.`STATE` AS `trx_state`,`etc`.`AUTOCOMMIT` AS `trx_autocommit`,`conattr_pid`.`ATTR_VALUE` AS `pid`,`conattr_progname`.`ATTR_VALUE` AS `program_name` from (((((((`performance_schema`.`threads` `pps` left join `performance_schema`.`events_waits_current` `ewc` on((`pps`.`THREAD_ID` = `ewc`.`THREAD_ID`))) left join `performance_schema`.`events_stages_current` `estc` on((`pps`.`THREAD_ID` = `estc`.`THREAD_ID`))) left join `performance_schema`.`events_statements_current` `esc` on((`pps`.`THREAD_ID` = `esc`.`THREAD_ID`))) left join `performance_schema`.`events_transactions_current` `etc` on((`pps`.`THREAD_ID` = `etc`.`THREAD_ID`))) left join `sys`.`x$memory_by_thread_by_current_bytes` `mem` on((`pps`.`THREAD_ID` = `mem`.`thread_id`))) left join `performance_schema`.`session_connect_attrs` `conattr_pid` on(((`conattr_pid`.`PROCESSLIST_ID` = `pps`.`PROCESSLIST_ID`) and (`conattr_pid`.`ATTR_NAME` = \\'_pid\\')))) left join `performance_schema`.`session_connect_attrs` `conattr_progname` on(((`conattr_progname`.`PROCESSLIST_ID` = `pps`.`PROCESSLIST_ID`) and (`conattr_progname`.`ATTR_NAME` = \\'program_name\\')))) order by `pps`.`PROCESSLIST_TIME` desc,`last_wait_latency` desc\nmd5=bbf8d6b8e8b6e9a163ec3db9d73042b1\nupdatable=0\nalgorithm=1\ndefiner_user=mysql.sys\ndefiner_host=localhost\nsuid=0\nwith_check_option=0\ntimestamp=2021-07-24 14:10:43\ncreate-version=1\nsource=SELECT pps.thread_id AS thd_id, pps.processlist_id AS conn_id, IF(pps.name = \\'thread\/sql\/one_connection\\', CONCAT(pps.processlist_user, \\'@\\', pps.processlist_host), REPLACE(pps.name, \\'thread\/\\', \\'\\')) user, pps.processlist_db AS db, pps.processlist_command AS command, pps.processlist_state AS state, pps.processlist_time AS time, sys.format_statement(pps.processlist_info) AS current_statement, IF(esc.end_event_id IS NULL, sys.format_time(esc.timer_wait), NULL) AS statement_latency, IF(esc.end_event_id IS NULL, ROUND(100 * (estc.work_completed \/ estc.work_estimated), 2), NULL) AS progress, sys.format_time(esc.lock_time) AS lock_latency, esc.rows_examined AS rows_examined, esc.rows_sent AS rows_sent, esc.rows_affected AS rows_affected, esc.created_tmp_tables AS tmp_tables, esc.created_tmp_disk_tables AS tmp_disk_tables, IF(esc.no_good_index_used > 0 OR esc.no_index_used > 0, \\'YES\\', \\'NO\\') AS full_scan, IF(esc.end_event_id IS NOT NULL, sys.format_statement(esc.sql_text), NULL) AS last_statement, IF(esc.end_event_id IS NOT NULL, sys.format_time(esc.timer_wait), NULL) AS last_statement_latency, sys.format_bytes(mem.current_allocated) AS current_memory, ewc.event_name AS last_wait, IF(ewc.end_event_id IS NULL AND ewc.event_name IS NOT NULL, \\'Still Waiting\\', sys.format_time(ewc.timer_wait)) last_wait_latency, ewc.source, sys.format_time(etc.timer_wait) AS trx_latency, etc.state AS trx_state, etc.autocommit AS trx_autocommit, conattr_pid.attr_value as pid, conattr_progname.attr_value as program_name FROM performance_schema.threads AS pps LEFT JOIN performance_schema.events_waits_current AS ewc USING (thread_id) LEFT JOIN performance_schema.events_stages_current AS estc USING (thread_id) LEFT JOIN performance_schema.events_statements_current AS esc USING (thread_id) LEFT JOIN performance_schema.events_transactions_current AS etc USING (thread_id) LEFT JOIN sys.x$memory_by_thread_by_current_bytes AS mem USING (thread_id) LEFT JOIN performance_schema.session_connect_attrs AS conattr_pid ON conattr_pid.processlist_id=pps.processlist_id and conattr_pid.attr_name=\\'_pid\\' LEFT JOIN performance_schema.session_connect_attrs AS conattr_progname ON conattr_progname.processlist_id=pps.processlist_id and conattr_progname.attr_name=\\'program_name\\' ORDER BY pps.processlist_time DESC, last_wait_latency DESC\nclient_cs_name=utf8\nconnection_cl_name=utf8_general_ci\nview_body_utf8=select `pps`.`THREAD_ID` AS `thd_id`,`pps`.`PROCESSLIST_ID` AS `conn_id`,if((`pps`.`NAME` = \\'thread\/sql\/one_connection\\'),concat(`pps`.`PROCESSLIST_USER`,\\'@\\',`pps`.`PROCESSLIST_HOST`),replace(`pps`.`NAME`,\\'thread\/\\',\\'\\')) AS `user`,`pps`.`PROCESSLIST_DB` AS `db`,`pps`.`PROCESSLIST_COMMAND` AS `command`,`pps`.`PROCESSLIST_STATE` AS `state`,`pps`.`PROCESSLIST_TIME` AS `time`,`sys`.`format_statement`(`pps`.`PROCESSLIST_INFO`) AS `current_statement`,if(isnull(`esc`.`END_EVENT_ID`),`sys`.`format_time`(`esc`.`TIMER_WAIT`),NULL) AS `statement_latency`,if(isnull(`esc`.`END_EVENT_ID`),round((100 * (`estc`.`WORK_COMPLETED` \/ `estc`.`WORK_ESTIMATED`)),2),NULL) AS `progress`,`sys`.`format_time`(`esc`.`LOCK_TIME`) AS `lock_latency`,`esc`.`ROWS_EXAMINED` AS `rows_examined`,`esc`.`ROWS_SENT` AS `rows_sent`,`esc`.`ROWS_AFFECTED` AS `rows_affected`,`esc`.`CREATED_TMP_TABLES` AS `tmp_tables`,`esc`.`CREATED_TMP_DISK_TABLES` AS `tmp_disk_tables`,if(((`esc`.`NO_GOOD_INDEX_USED` > 0) or (`esc`.`NO_INDEX_USED` > 0)),\\'YES\\',\\'NO\\') AS `full_scan`,if((`esc`.`END_EVENT_ID` is not null),`sys`.`format_statement`(`esc`.`SQL_TEXT`),NULL) AS `last_statement`,if((`esc`.`END_EVENT_ID` is not null),`sys`.`format_time`(`esc`.`TIMER_WAIT`),NULL) AS `last_statement_latency`,`sys`.`format_bytes`(`mem`.`current_allocated`) AS `current_memory`,`ewc`.`EVENT_NAME` AS `last_wait`,if((isnull(`ewc`.`END_EVENT_ID`) and (`ewc`.`EVENT_NAME` is not null)),\\'Still Waiting\\',`sys`.`format_time`(`ewc`.`TIMER_WAIT`)) AS `last_wait_latency`,`ewc`.`SOURCE` AS `source`,`sys`.`format_time`(`etc`.`TIMER_WAIT`) AS `trx_latency`,`etc`.`STATE` AS `trx_state`,`etc`.`AUTOCOMMIT` AS `trx_autocommit`,`conattr_pid`.`ATTR_VALUE` AS `pid`,`conattr_progname`.`ATTR_VALUE` AS `program_name` from (((((((`performance_schema`.`threads` `pps` left join `performance_schema`.`events_waits_current` `ewc` on((`pps`.`THREAD_ID` = `ewc`.`THREAD_ID`))) left join `performance_schema`.`events_stages_current` `estc` on((`pps`.`THREAD_ID` = `estc`.`THREAD_ID`))) left join `performance_schema`.`events_statements_current` `esc` on((`pps`.`THREAD_ID` = `esc`.`THREAD_ID`))) left join `performance_schema`.`events_transactions_current` `etc` on((`pps`.`THREAD_ID` = `etc`.`THREAD_ID`))) left join `sys`.`x$memory_by_thread_by_current_bytes` `mem` on((`pps`.`THREAD_ID` = `mem`.`thread_id`))) left join `performance_schema`.`session_connect_attrs` `conattr_pid` on(((`conattr_pid`.`PROCESSLIST_ID` = `pps`.`PROCESSLIST_ID`) and (`conattr_pid`.`ATTR_NAME` = \\'_pid\\')))) left join `performance_schema`.`session_connect_attrs` `conattr_progname` on(((`conattr_progname`.`PROCESSLIST_ID` = `pps`.`PROCESSLIST_ID`) and (`conattr_progname`.`ATTR_NAME` = \\'program_name\\')))) order by `pps`.`PROCESSLIST_TIME` desc,`last_wait_latency` desc\n","avg_line_length":511.4375,"max_line_length":2801,"alphanum_fraction":0.7526579494}