Jump to content

AliB2512

Member
  • Posts

    50
  • Joined

  • Last visited

Awards

This user doesn't have any awards

1 Follower

About AliB2512

  • Birthday Dec 25, 1998

Profile Information

  • Gender
    Male
  • Location
    Chigwell, Essex

System

  • CPU
    Intel i7-6700k @ 4.2Ghz
  • Motherboard
    Asus ROG Maximus VIII Formula
  • RAM
    16GB - G-Skills Ripjaws V DDR4 @ 3000Mhz
  • GPU
    Asus Strix GeForce GTX 980- 4GB
  • Case
    CoolerMaster MasterCase 5 Pro
  • Storage
    256GB Samsung 850 Pro SSD, 2TB Western Digital Black HDD
  • PSU
    750 Watt Corsair HX750i
  • Display(s)
    BenQ 144Hz XL2430T
  • Cooling
    Corsair H80iGT AiO
  • Keyboard
    Razer Blackwidow Chroma
  • Mouse
    Razer Deathadder Chroma
  • Sound
    Razer Kraken 7.1
  • Operating System
    Windows 10

Recent Profile Visitors

690 profile views
  1. Never said it was standard, just pointing out the extra contact and the combo port thanks for reiterating what I said
  2. Apple do not employ some wizard technology, because your headphones have inline mic controls, there is an extra contact, for the microphone. on a desktop PC, the ports are usually split into headphones out and mic in (green and pink respectively) due to this, on the headphone out, the extra contact for microphone in, isn't being used, this the mic will not work. the reason your laptop accepts the mic in. Is because the jack is a combo port with IN/OUT. And accepts the extra contact. Therefore working
  3. you've lost me now, I understand how randomisers are used generally, just not in my context, where are they applied to, (sorry for being slow)
  4. yeah i can understand that, so a worker has a 'work per unit time' value, and the job is assigned a 'work value' thus giving worker a needs 4 hours to do job where as b need 3 hours ?how do the randomisers fall into place though?
  5. would it not be easier to deem skill on a linear scale, say 1-5 (1 being most skilled). and current jobs an integer. maybe multiplying them, using the output and comparing it to a Maximum number required to assign job', and whoever is the lowest in comparison, is assigned the job. (but i don't know how to handle for example skill level 2, and jobs 2, in comparison with skill level 4 but jobs 1)
  6. so an integer of skill level, and an integer of current work load, and nested ifs? could create a basic system,?
  7. I'm looking to create a basic algorithm that allocates jobs to workers based on skill level and workload. however, I'm stumped at where to start. Background Mobile phone repair store Worker qualifications stored in text files Algorithm is run as button click on the Add Repair Form (VB.net) Requirements Algorithm Reads worker files sequentially, noting the current workload value, finds the worker with at least amount of work checks if he is qualified to do the task If yes assigns job, If no, checks the next worker if 2 workers have the same amount of current jobs reads the first (sorted alphabetically) and runs checks im struggling to even get psuedocode out for this. All Help appreciated (Not asking for a full creation, just how to make this possible, pseudocode wise) Basic attempt at flow chat may help
  8. Solved with the removal of File.Create(path).Dispose()
  9. I have code that fills textboxes with each line of a text file, and as such allows you to edit them and update the .txt file. only if the password is entered correctly twice will it update, if not it produces a message box telling you what's happened (i.e passwords wrong or left blank) however when the if statement falls down the first stream of (password field cannot be blank) it doesn't update the file (good) but complete removes what's saved, giving a blank .txt file Private Sub btnUpdateUser_Click(sender As Object, e As EventArgs) Handles btnUpdateUser.Click Dim allLines As List(Of String) = New List(Of String) Dim path As String = "..\Resources\Workers\" + txtEmployeeName.Text + ".txt" If System.IO.File.Exists(path) = False Then MsgBox("File Does Not Exists") Else If (txtPassword.Text = String.Empty And txtPassword2.Text = String.Empty) Then MsgBox("Password Fields cannot be empty") ElseIf (txtPassword.Text = txtPassword2.Text) Then Dim reader As New System.IO.StreamReader(path) Do While Not reader.EndOfStream allLines.Add(reader.ReadLine()) Loop reader.Close() Dim varSalt As String = CreateRandomSalt() System.IO.File.Delete(path) File.Create(path).Dispose() Dim objWriter As New System.IO.StreamWriter(path) objWriter.WriteLine(Me.txtEmployeeName.Text) objWriter.WriteLine((Hash512(Me.txtPassword.Text, varSalt) & vbNewLine & varSalt)) objWriter.WriteLine(Me.txtFirstname.Text) objWriter.WriteLine(Me.txtSurname.Text) objWriter.WriteLine(Me.dtpBirthday.Text) If (Me.cbxManager.Checked) Then objWriter.WriteLine("true") Else objWriter.WriteLine("false") End If objWriter.Close() MsgBox("User Updated") Me.Close() settingsForm.Show() Else MsgBox("Passwords do not match") End If End If End Sub the text file starts as Username Password salt First name - Error is Here Surname D.O.B Manager Status if password is correct the txt file is Username Password salt First name - Error is Fixed Surname D.O.B Manager Status However when the if statement states that "the password field cannot be blank" the .txt file become blank
  10. Right so my little brother, is after a gaming PC, and I've been tasked with creating it. my parents have budgeted around £500 (+-10%) for his first PC if we exclude prices of Windows and Peripherals(keyboard, mouse, monitors), what would be a decent PC (part picker links accepted)
  11. I have code that'll take a password, generate a random salt, combine the 2 then hash with sha512. it then saves the username, hashed password, and salt to a txt file. however, I cannot get it to print the salt used with the password and not another randomly generated salt. Imports System Imports System.IO Imports System.Text Imports System.Security.Cryptography Public Class Users Public Function CreateRandomSalt() As String Dim mix As String = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789!@#$%^&*()_+=][}{<>" Dim salt As String = "" Dim rnd As New Random Dim sb As New StringBuilder For i As Integer = 1 To 100 Dim x As Integer = rnd.Next(0, mix.Length - 1) salt &= (mix.Substring(x, 1)) Next Return salt End Function Public Function Hash512(password As String, salt As String) As String globalVariable.Salty = Convert.ToBase64String(Encoding.UTF8.GetBytes(salt)) Dim convertedToBytes As Byte() = Encoding.UTF8.GetBytes(password & salt) Dim hashType As HashAlgorithm = New SHA512Managed() Dim hashBytes As Byte() = hashType.ComputeHash(convertedToBytes) Dim hashedResult As String = Convert.ToBase64String(hashBytes) Return hashedResult End Function Private Sub save_Click(sender As Object, e As EventArgs) Handles save.Click Dim path As String path = "..\Resources\Users\" + txtUsername.Text + ".txt" MsgBox(path) If System.IO.File.Exists(path) Then MsgBox("File Already Exists)") Else File.Create(path).Dispose() Dim objWriter As New System.IO.StreamWriter(path) objWriter.WriteLine(txtsave.Text) objWriter.WriteLine((Hash512(txtUsername.Text, CreateRandomSalt))) objWriter.WriteLine(globalVariable.Salty) objWriter.Close() MsgBox("User added") End If End Sub End Class Public Class globalVariable Public Shared Salty As String End Class
  12. so I have a form with a multitude of textboxes (txtUsername, txtPassword, txtAddress.......) and im after saving to a .txt file which is called based on what txtUsername is so, C:\Example\Example\Example\"txtUsername".txt Public Class Form1 Private Sub save_Click(sender As Object, e As EventArgs) Handles save.Click If System.IO.File.Exists("\ ..\ ..\Resources\Users\<txtUsername>.txt") ) Then MsgBox("File Already Exists)") Else Dim objWriter As New System.IO.StreamWriter("\ ..\ ..\Resources\Users\<txtUsername>.txt" objWriter.Write(txtsave.Text) objWriter.Close() End If End Sub End Class
  13. I'm up From Essex,UK - English is fluent silver 3 - up for a laugh add me on steam Aliii - http://steamcommunity.com/id/A-L-Triple-I
×