Stormfolk
-
Posts
289 -
Joined
-
Last visited
Content Type
Profiles
Forums
Gallery
Events
Blogs
Posts posted by Stormfolk
-
-
A little bump
-
Changing your password every X amount of time helps too. For example in companies for the more mportant stuff the password changes daily.
-
I'm working on exercises about vb.net arrays. In this exercise I have to read in some data from a .txt file and place it in a 1 dimensional array. It has to do some other things later too, but that's not important atm. Basically, it is a text file with names and a result.
The textfile looks like this:
As you can see the data is seperated by a "-".
I managed to get it all working with this code:
Public Class Form1 Private Sub btnSluiten_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSluiten.Click Me.Close() End Sub Private Sub btnInlezen_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnInlezen.Click 'declare Dim record As String Dim index As Integer = -1 Dim position As Integer Dim name() As String Dim result_a() As Integer ‘The textfile FileOpen(1, "gegevens.txt", OpenMode.Input) 'standaardwaarde inlezen is 1 'read data from the textfile Do While Not EOF(1) 'raise index index += 1 'read lines of the textbox record = LineInput(1) 'preserve ReDim Preserve name(index) ReDim Preserve result_a(index) 'seperate the data in the txt position = record.IndexOf("-") 'fill the arrays name(index) = record.Substring(0, position) result_a(index) = record.Substring(position + 1) 'show array txtData.Text += name(index).ToString & vbTab & result_a(index).ToString & vbNewLine Loop ‘close txt FileClose(1) End Sub End Class
How the program looks like after the text has been read:
So far that's all ok, but I wanted to go a little bit further. In stead of 2 pieces of data on each line of the textfile, I wanted to make it work for when there's 3, 4, 5, ... things. Now there's just a result_a, but what if there's a result_b, result_c, ...
For example:
Mia-75-53-82-65
Jan-85-94-78-66
I've been trying and testing things for most of the day, looked things up on the internet, ... but somehow I'm missing the point on how to get this done. I couldn't find a proper explanation for it either.
I tried to do something like, but apperently that was too easy to work :P :
result_a(index) = record.Substring(position + 1) result_b(index) = record.Substring(position + 2) result_c(index) = record.Substring(position + 3)
But then something goes wrong with the splitting based on the "-" symbol. It seems to fail to jump further and get the next piece of data in the line.
I also tried adding in this again before I moved to the result_b and after I read in result a, but that didn't do the trick either.
position = record.IndexOf("-")
Anyone here has an idea, and preferably an explanation on how to do this for a name and 2,3,4, ... results? I'm hoping I can find a general theory or a general way so I can use this basic code to read in files with few data, but also files with more data. So yea, if you can help this vb noob it would be greatly appreciated.
-
Well done, seems fun to do a fight like this
-
The problem indeed seems to lie with reloading/refreshing the settings. It works now.
The script:
Set WshShell = WScript.CreateObject("WScript.Shell") 'Variable for the screensaver scrsvr = "C:\Windows\SysWOW64\Screensaver Operations.scr" 'Assign the screensaver to the current user in the registry WshShell.RegWrite "HKEY_CURRENT_USER\Control Panel\Desktop\SCRNSAVE[Caution: Executable File]", scrsvr, "REG_SZ" 'Activate the screensaver WshShell.RegWrite "HKEY_CURRENT_USER\Control Panel\Desktop\ScreenSaveActive", 1, "REG_SZ" 'Screensaver has to wait 600 seconds (10 minutes) before it starts WshShell.RegWrite "HKEY_CURRENT_USER\Control Panel\Desktop\ScreenSaveTimeOut", 600, "REG_SZ"
I just got confused by the fact that for all settings aside from ScreenSaveTimeOut you immediately get a visual result. For ScreenSaveTimeOut, the user first has to log off and on again to see the changes.
Thanks everyone!
-
I have been working on a script to make settings for the screensaver for All Users on a Windows 7 Pro PC.
In my script, I also want to update the waiting time before the screensaver starts by adjusting a registry key.
I've been looking on the internet for quite some time now, but I can't find the right key that does it.
First I thought "HKEY_CURRENT_USER\Control Panel\Desktop\ScreenSaveTimeOut", 600, "REG_SZ" would do the trick, but that's not the one I need.
The red box is the part I want the registry key for. The "5" should be "10".
I know it can be easily done by rightclicking the desktop, changing screensaver settings with the console, but I really need to do it with the registry key.
Anyone has an idea?
-
Written by Wouter, copy-pasted by me :ugeek:
We set up a fight with LPT for this fine Monday, not being able to get a fight for last night we were all looking forward to it. We headed out with 35 strong Warhungers and awaited for LPT to come up with around 30 as well. They set to DD and we rushed them.
The start of the fight was ours, we sent snipers immediately and just tore through their pile. After around 30 minutes we let it slip and LPT had a strong comeback with a solid main pile and it was even, but near the end our top calling and amazing styles prevailed and we did work again. We ended strong with 38 out of 40 people in game, LPT ended with a good 30.
Thanks for a great fight LPT, hopefully we can have one again soon.
Thanks to LF for ac'ing all the randoms sniping us, appreciated seeing the circumstances :)
Trwf starting: 105
LPT starting: 90
Trwf ending: 114
LPT ending: 90
Welcome to Swaggerville Miikezilla.
[22:05:07] <Trioske12> womens' place is in kitchen
Pics:
Starting:
Trwf Ending:
LPT Ending:
-
-
If you're interested in a GMT-based clan, have a look at TRWF. We're one of the oldest and most mature clans in Runescape with several PvP events a week.
Other than PvP we regularly organise things like skill competitions, boss hunting events or competitions versus other clans, ...
For some basic info, check out our template:
-
Well done
-
We had two fights today, a pkri with RKOF and a fight with The Clan for the 20v20 section of the Jagex Cup.
TRWF vs RKOF
Rkof approached us looking for a challenge and we quickly set up a 1 hour cap with the following rules.
- All styles
- 5 snipers
- DG/COR OFF
- Spiders - GDS rock
- Low ops attack
We pulled a solid 40-ish and Rkof had around 30. Nonetheless we set up to defend and Rkof rushed us. From the start we were doing work and Rkof had to do a few regroups but they recovered well each time, after around 30-40 minutes of fighting they decided to call of and we took ending with a solid 40 and then we logged out.
Thanks for the fight RKOF and good luck in your future fights.
Trwf starting opts: 120
RKOF starting opts: 90
Trwf ending opts: 120
RKOF ending opts: 0
Starting:
Ending(-30 opts due to assist)
TRWF vs The
We set up our 20v20 for the JCUP to take place today at 4 EST.
We set out into the portal and selected our 20 best fighters to match with THE's 17.
We had possibly one of the worst starts I've seen in a long time with THE getting a quick 1 hit and nearly another one. So we kept the 2 kill gap for about 5 more kills and then we just went through all the blasters and ko'd them left and right. We quickly finished up our fight with some solid tanking from some of our members.
Thanks for the fight THE and good luck in your future fights.
-
Written by Wouter:
We set up a fight with Exalt and were well excited to fight a new clan, we headed up with a solid 35 people and quickly defended and waited for them to rush. We immediately got rolling and were quickly ko'ing mages left and right. We didn't send our snipers until the last 20 minutes where we had to stop to clear crashers. Shortly before the end Exalt called it off not wanting to deal with crashers. Thanks for the fight, hopefully we can do it again sometime.
Trwf starting: 111
Exalt starting: 84
Trwf ending: 120(43 on TS)
Exalt: 0
Trwf Starting:
Exalt Starting:
Trwf Ending:
-
Good luck, hopefully things will go better this time.
-
RSD might win the fullouts again, dunno about others
-
Written by James:
Earlier this week we found out that LPT were pking so we decided to make a pk trip to intercept them! We massed for a short period of time and entered the wilderness with 20 strong warriors! We had asked LPT if they would like a planned fight but they declined so we decided to hit them. After a short time playing hide and seek we finally hit them and the battle commenced!
TRWF Starting: 20
LPT Starting: 20ish
The fight started pretty even until we started to clear their binders and blasters then the fight became pretty one sided. We fought them for around an hour until some crap clan rushed lpt whilst we were the other side of the wilderness so didnt know what was happening. Lpt switched worlds and ended.
TRWF Ending: 26
Lpt Ending: No idea they just left the world
After the LPT fight we headed over the Cor and Tr's fight and ac'd a little bit. We had a small scrap with some team that was crashing, they had alot more than us and instantly bailed to single as soon as we started transitioning over all of them.
We killed a tr member who was wearing welfare gear so apologies for that.
Shout Out to seccy for just wanting to own.
-
Overkill - rotten to the core
-
Grats
-
-
Surprised you picked Are You Dead Yet from Children of Bodom. Most people think it's the worst album in their catalogue and they never fully recovered to what they had on the first 3-4 records.
-
So I heard the new Lock Up album today, and all I can say... holy [cabbage]. Not album of the year (especially not in a year when AUTOPSY, AUTOPSY, AUTOPSY have released an early candidate for album of the decade), but better than Pleasures Pave Sewers and about on a par with Hate Breeds Suffering. It's called Necropolis Transparent if anyone's interested.
New Exhumed (All guts, no glory) is good too, dunno if you heard that one already.
-
You're talking about the other guy being power hungry but you immediately want to be a clan leader in your new clan yourself?
Anyway, good luck with the website.
-
Rofl, DF acting like a badass. Sucks that you ruined the fight between CR and FSK.
-
Written by Mr Steedman himself:
TRWF and MMA had a small prep for a 1:30 hours pkri. After a hard battle the warhungers were able to pull together well in the last 20 minuits to make an epic end that what had been a hard battle, whilst being outnumbered heavily most of the fight. Great job tonight Warhungers, be proud!Starting
Trwf Starting: 84 ops
MMa starting: 43 on ts?
Immediate ending opitons.
TRWF: 84
MMA: 81
Some pictures of the fight:
Ending options were close, but given the numbers the win was ours.
-
Will be hard to join a clan if you don't want to use other forums.
[vb.net] Arrays and textfiles
in Programming and Web Design
Posted
Thanks, that seems to have done the trick. I'm gonna test it some more and then I'll be trying 2D arrays lol :D