Advertisement
Advertisement
| 04.11.2008 at 12:26PM PDT, ID: 23316211 |
|
[x]
Attachment Details
|
||
|
[x]
The Solution Rating System
|
||
|
With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.
Your Input Matters If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support. Thank you! |
||
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34: 35: 36: 37: 38: 39: 40: 41: 42: 43: 44: |
Const fsoForReading = 1
Const fsoForWriting = 2
Dim objFSO, objTextStream
Dim strInputFileName
Dim strFilecontents
Dim strFilecontentsOut
strInputFileName = "C:\InputFileName.txt" '####### Use correct path
strOutputFileName = "C:\OutputFileName.txt" '####### Use correct path
Set objFSO = CreateObject("Scripting.fileSystemObject")
Set objTextStream = objFSO.OpenTextFile(strInputFileName, fsoForReading)
strFilecontents = objTextStream.ReadAll()
Call objTextStream.Close()
strFilecontents = Replace(strFilecontents, "c2_", "c<Group2>_")
strFilecontents = Replace(strFilecontents, "_01p", "_<Group1>p")
strFilecontents = Replace(strFilecontents, "_01_fp", "_<Group1>_fp")
Set objTextStream = objFSO.OpenTextFile(strOutputFileName, fsoForWriting, True)
'Call objTextStream.WriteLine(strFilecontents)
For J = 1 to 5
For I = 1 To 71
I = "0" & I
I = Right(I, 2)
strFilecontentsOut = strFilecontents
strFilecontentsOut = Replace(strFilecontentsOut, "<Group1>", I)
strFilecontentsOut = Replace(strFilecontentsOut, "<Group2>", J)
Call objTextStream.WriteLine(strFilecontentsOut)
Next
Next
Call objTextStream.close()
Function PrefixPadString(ByVal InStr, ByVal Count, ByVal PaddingChar)
PrefixPadString = Right(String(Count, PaddingChar) & InStr, Count)
End Function
|
| Microsoft |
| Apple |
| Internet |
| Gamers |
| Digital Living |
| Virus & Spyware |
| Hardware |
| Software |
| ITPro |
| Developer |
| Storage |
| OS |
| Database |
| Security |
| Programming |
| Web Development |
| Networking |
| Other |
| Community Support |
| 04.11.2008 at 01:16PM PDT, ID: 21337834 |
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34: 35: 36: 37: 38: 39: 40: 41: 42: 43: 44: 45: 46: 47: 48: |
Const fsoForReading = 1
Const fsoForWriting = 2
Dim objFSO, objTextStream
Dim strInputFileName
Dim strFilecontents
Dim strFilecontentsOut
Dim InnerRangeBegin : InnerRangeBegin = 75 ' Beginning value for inner loop
Dim InnerRangeEnd : InnerRangeEnd = 407 ' Ending value for inner loop
Dim RangeWidth : InnerRangeEnd = 3 ' Number of digits in ending value
strInputFileName = "C:\InputFileName.txt" '####### Use correct path
strOutputFileName = "C:\OutputFileName.txt" '####### Use correct path
Set objFSO = CreateObject("Scripting.fileSystemObject")
Set objTextStream = objFSO.OpenTextFile(strInputFileName, fsoForReading)
strFilecontents = objTextStream.ReadAll()
Call objTextStream.Close()
strFilecontents = Replace(strFilecontents, "c2_", "c<Group2>_")
strFilecontents = Replace(strFilecontents, "_01p", "_<Group1>p")
strFilecontents = Replace(strFilecontents, "_01_fp", "_<Group1>_fp")
Set objTextStream = objFSO.OpenTextFile(strOutputFileName, fsoForWriting, True)
'Call objTextStream.WriteLine(strFilecontents)
For J = 1 to 5
For I = InnerRangeBegin To InnerRangeEnd ' use loop variables defined above...
I = String("0",RangeWidth) & I ' ensure I has enough 0's in front...
I = Right(I, RangeWidth) ' reset it to the right width
strFilecontentsOut = strFilecontents
strFilecontentsOut = Replace(strFilecontentsOut, "<Group1>", I)
strFilecontentsOut = Replace(strFilecontentsOut, "<Group2>", J)
Call objTextStream.WriteLine(strFilecontentsOut)
Next
Next
Call objTextStream.close()
Function PrefixPadString(ByVal InStr, ByVal Count, ByVal PaddingChar)
PrefixPadString = Right(String(Count, PaddingChar) & InStr, Count)
End Function
|