This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Option Explicit | |
| Sub ArrayExTest() | |
| Dim list As New ArrayEx | |
| list.AddVal (11) | |
| list.AddVal (21) | |
| list.AddVal (31) | |
| Dim arr: arr = list.ToArray | |
| Debug.Print (arr(2)) '"31" displays at ImmediateWindow |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Public Sub SetAddress( _ | |
| ByVal addrTo As Variant, _ | |
| '省略 | |
| ) | |
| xMsg.To = GetAddrList(addrTo) | |
| '省略 | |
| End Sub | |
| Private Function GetAddrList(ByVal addlst As Variant) As String |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Private Const uriCdoConf As String = "http://schemas.microsoft.com/cdo/configuration/" | |
| Private Const cdoSendUsingMethod As String = uriCdoConf & "sendusing" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Option Explicit | |
| Sub CdoMailTest() | |
| Dim mail As New CdoMail | |
| Call mail.Configure("oreore@mailsagi.com", _ | |
| "smtp.server.com:25", _ | |
| cdoBasic, "userName", "pass", _ | |
| False) | |
| Call mail.NewMail |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #If VBA7 And Win64 Then | |
| Private Sub SaveDownloading(ByVal hCnn As LongPtr, ByVal svPath As String) | |
| #Else | |
| Private Sub SaveDownloading(ByVal hCnn As Long, ByVal svPath As String) | |
| #End If | |
| Dim strm As Object: Set strm = CreateAdoDbStream(adTypeBinary) | |
| strm.Open | |
| ' 中略 | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Option Explicit | |
| Sub FileDownloadTest() | |
| Dim url As String | |
| Dim savePath As String: savePath = "D:\Test\" | |
| Dim returnValue As String | |
| url = "http://msdn.microsoft.com/en-us/library/aa385483.aspx" | |
| returnValue = FileDownload(url, savePath) | |
| 'returnValue is "D:\Test\aa385483.aspx" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| javascript:(function(){ | |
| var html = document.getElementsByTagName('Body')[0].innerHTML; | |
| document.getElementsByTagName('Body')[0].innerHTML = html.replace(/<img .*src=\"([^\"\s]+)\"[^>]*>/,"<img id=target src=\"$1\" style=\"-webkit-transform: rotateX(180deg);-moz-transform: rotateX(180deg);transform:rotateX(180deg);\">"); | |
| })(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class Class1 | |
| { | |
| private Task _LoadPropertyATask; | |
| private string _PropertyA; | |
| public string PropertyA | |
| { | |
| get | |
| { | |
| if (_LoadPropertyATask == null) Initialize(); //同期読み出しの場合、非同期読み出し命令をここで実行 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [TestFixture] | |
| public class Test1 | |
| { | |
| [Test] | |
| public void TestMethod即座に読み出し() | |
| { | |
| var prefetch = new Class1(); | |
| prefetch.PropertyA.Is("abc"); | |
| } | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class Class1 | |
| { | |
| private Task<string> _propertyALoadTask; | |
| private string _PropertyA; | |
| public string PropertyA{ | |
| get | |
| { | |
| if(_PropertyA != null) return _PropertyA; |