Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
G

GizmoC

@GizmoC
About
Posts
4
Topics
3
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Programmatically "corrupt" an mp3 file
    G GizmoC

    Interesting. Someone on another forums suggested a simple byte-reverse. That did the trick :) But encryption sounds cool too, I have no idea how to go about it tho. I'll look around. Guidance will be appreciated :) Thanks.

    .NET (Core and Framework) tutorial question

  • Programmatically "corrupt" an mp3 file
    G GizmoC

    Hello I am trying to get my feet wet with I/O. Basically, I have an MP3 file that I want to "corrupt". At first, I thought merely adding some garbage bytes to the beginning would do the trick, but that doesnt work. For example, FileStream fs = new FileStream("try1.avi" , FileMode.Open, FileAccess.Write); fs.WriteByte(123); fs.Flush(); fs.Close(); After examining the edited file with a hex-editor, I noticed that the byte is correctly being added to the start of the file. However, WinAmp still plays the mp3. Infact, I started directly shifting bytes around with the hex editor and realised that the file still plays! (albeit a little messed up) Further research shows that this resilience is due to the format of the MP3 itself. It turns out an Mp3 file is divided into frames (each frame consisting of a header and data) which are independent of each other. So... well.. anyone have any clever ideas how I can programmatically "corrupt" the Mp3 file? Ofcourse, I need to do it in such a way that I can reverse the process! Regards,

    .NET (Core and Framework) tutorial question

  • Programmatically "corrupt" an mp3 file
    G GizmoC

    Hello I am trying to get my feet wet with I/O. Basically, I have an MP3 file that I want to "corrupt". At first, I thought merely adding some garbage bytes to the beginning would do the trick, but that doesnt work. For example,

    .NET (Core and Framework) tutorial

  • Connect to a central db server
    G GizmoC

    Hello. I am teaching myself more .NET, really love the technology. I've created a simple desktop application. Basically, its a database frontend for an inventory management system. The databse is simply an Access file (.mbd) which is in the same directory as the executable. In other words, my oleDbConnection objects look for the database (.mdb file) in the same directory. You see, this application will be independantly run on different PCs (each PC is in a different branch of our shop). I want to make all the different PCs share the same database. Ofcourse, the PCs will be connected (via LAN) to a central database server (where my .mbd file will be stored). In essence, all I want to do is make my application look for the .mbd file on the database server, instead of localdisk. However, there are some issues which I dont know how to address: 1) I guess the simplest way to achieve this is to create a shared network folder. But I dont think this solution is elegant... because it seems I have to hardcode the network path into the program (specifically, I have to hardcore the ConnectionString of the oleDbConnection object) 2) How do I keep the data synchronized? (ie, Race condition) The naive way to do this would be simply allow the database to throw an exception, and simply make the user "try again". But I want a more robust solution. In University, I learnt how to tackle race conditions in the same application using Semaphores, Monitors, etc. But I have no idea how to do it via networks.. since I am no longer dealing with Threads anymore. I would sincerely appreciate if someone could guide me in the right direction. I am sure there are well-establish methodologies for achieving this... a nudge in the right direction will help. A link, a book, anything.

    C# database sysadmin tutorial question csharp
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups