Search the Community
Showing results for tags '.net'.
-
So i made a simple VS19 console app (.net framework), added nothing to static void Main(string[] args) {} But somehow the it still manages to print a newline. i simply want it to just not print a newline. Video showing the problem in way more detail.
-
Hellooo, Having an issue with AD in VB.Net and hoping someone on here will be able to help. I am very new to AD in VB so its probably a really simple solution but I can't seem to find it on google. I need to connect to AD to pull a users details and searching by their username. so the code I have is... Dim rootEntry As New System.DirectoryServices.DirectoryEntry("--Domain--") Dim searcher As New DirectorySearcher(rootEntry) Dim ctx As New PrincipalContext(ContextType.Domain) Dim user As UserPrincipal = UserPrincipal.FindByIdentity(ctx, txtUsername.Text) If user IsNot Nothing Then Else MessageBox.Show("Student is not found in Active Directory, please check the username and try again") Exit Sub End If searcher.PropertiesToLoad.Add("cn") searcher.PropertiesToLoad.Add("extensionAttribute1") searcher.PropertiesToLoad.Add("displayName") searcher.PropertiesToLoad.Add("mail") searcher.Filter = "(&(anr=" & txtUsername.Text & ")(objectCategory=person))" Dim results As SearchResultCollection results = searcher.FindAll() Dim result As SearchResult For Each result In results StudentName = result.Properties("displayName")(0) StudentNumber = result.Properties("extensionattribute1")(0) sEmail = result.Properties("mail")(0) Next Status.Text = "Loading data from SQL Database, This may take several minutes..." and this works almost perfectly.... with this I can pull up a users email, full name, user ID all from just their username. There is no need to sign in with a username and password as AD is read only to everyone on the network. The problem is its not searching for the exact username typed into "txtusername.text" it seems to be using a "like" syntax. If I search for a user e.g "BG12AAM" then as ong as that is the only user with a username like that then it will pull the information I need. If there are two users "BG12AAM" & "BG12AAM1" then it will give me the details for the most recently added user. Even if I type "BG12AAM" in the textbox it gives me the details for "BG12AAM1" which I don't want. Is there a way to search for the exact user typed? Thanks,
-
- .net
- active directory
-
(and 1 more)
Tagged with:
-
Hey guys, lately i've discovered automapper exists, and while i was playing with it i got a question: can it also work for mapping parameters to the properties of an instance of a class(considering both the parameters and the properties have the same name and type) hope i'm being clear, basically i have this code right now: public Cliente CrearCliente(string Nombre, string Apellido, string Calle, int NumeroDomicilio, string Depto, string Piso, int DNI, string Email, string Fax, int Cuit, decimal TopeCtaCte, int TipoRentaMunicipalId, int TipoRentaProvincialId, int TipoSituacionImpositivaId, int Id, List<TelefonosClientes> TelefonosClientes) { return new Cliente() { Apellido = Apellido, Calle = Calle, Depto = Depto, DNI = DNI, Email = Email, Id = Id, Nombre = Nombre, NumeroDomicilio = NumeroDomicilio, Piso = Piso, TipoRentaMunicipalId = TipoRentaMunicipalId, TipoRentaProvincialId = TipoRentaProvincialId, TipoSituacionImpositivaId = TipoSituacionImpositivaId, TelefonosClientes = TelefonosClientes, Fax = Fax, Cuit = Cuit, TopeCtaCte = TopeCtaCte }; } and what i'm guessing is that there should be some way to make it something like: public Cliente CrearCliente(string Nombre, string Apellido, string Calle, int NumeroDomicilio, string Depto, string Piso, int DNI, string Email, string Fax, int Cuit, decimal TopeCtaCte, int TipoRentaMunicipalId, int TipoRentaProvincialId, int TipoSituacionImpositivaId, int Id, List<TelefonosClientes> TelefonosClientes) { return something.something.createinstancefromparameters(Cliente) } sorry for the possible crappy english, if the question is not clear(not really sure what's the best way to ask what i'm asking lol), maybe i wrote it more clearly in my stack overflow question: http://stackoverflow.com/questions/43702275/is-there-any-way-to-automatically-map-properties-from-parameters-when-creating-a tbh it's the first time i've had to ask a question there, normally things are easier to research
-
Hey, lately when I wanna start certain programs I get microsoft .net errors I will post the error report which will sadly only be in German would be amazing if someone could maybe translate it (this popped when I tried using Razer Synapse) Informationen über das Aufrufen von JIT-Debuggen anstelle dieses Dialogfelds finden Sie am Ende dieser Meldung. ************** Ausnahmetext ************** System.IO.FileNotFoundException: Die Datei oder Assembly "Accessibility, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" oder eine Abhängigkeit davon wurde nicht gefunden. Das System kann die angegebene Datei nicht finden. Dateiname: 'Accessibility, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' bei System.Windows.Forms.Control.OnHandleCreated(EventArgs e) bei System.Windows.Forms.Form.OnHandleCreated(EventArgs e) bei System.Windows.Forms.Control.WmCreate(Message& m) bei System.Windows.Forms.Control.WndProc(Message& m) bei System.Windows.Forms.ScrollableControl.WndProc(Message& m) bei System.Windows.Forms.ContainerControl.WndProc(Message& m) bei System.Windows.Forms.Form.WmCreate(Message& m) bei System.Windows.Forms.Form.WndProc(Message& m) bei Razer.Emily.UI.EmilyUIMsgHandlerForm.WndProc(Message& m) bei System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m) bei System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m) bei System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam) WRN: Protokollierung der Assemblybindung ist AUS. Sie können die Protokollierung der Assemblybindungsfehler aktivieren, indem Sie den Registrierungswert [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) auf 1 festlegen. Hinweis: Die Protokollierung der Assemblybindungsfehler führt zu einer gewissen Leistungseinbuße. Sie können diese Funktion deaktivieren, indem Sie den Registrierungswert [HKLM\Software\Microsoft\Fusion!EnableLog] entfernen. ************** Geladene Assemblys ************** mscorlib Assembly-Version: 4.0.0.0. Win32-Version: 4.0.30319.34209 built by: FX452RTMGDR. CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/mscorlib.dll. ---------------------------------------- RzSynapse Assembly-Version: 2.20.15.1104. Win32-Version: 2.20.15.1104. CodeBase: file:///C:/Program%20Files%20(x86)/Razer/Synapse/RzSynapse.exe. ---------------------------------------- System Assembly-Version: 4.0.0.0. Win32-Version: 4.0.30319.34209 built by: FX452RTMGDR. CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll. ---------------------------------------- RzCommon Assembly-Version: 2.1.0.29218. Win32-Version: 2.1.0.29218. CodeBase: file:///C:/Program%20Files%20(x86)/Razer/Synapse/RzCommon.DLL. ---------------------------------------- log4net Assembly-Version: 1.2.10.0. Win32-Version: 1.2.10.0. CodeBase: file:///C:/Program%20Files%20(x86)/Razer/Synapse/log4net.DLL. ---------------------------------------- System.Configuration Assembly-Version: 4.0.0.0. Win32-Version: 4.0.30319.34209 built by: FX452RTMGDR. CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Configuration/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll. ---------------------------------------- PresentationCore Assembly-Version: 4.0.0.0. Win32-Version: 4.0.30319.34209 built by: FX452RTMGDR. CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_32/PresentationCore/v4.0_4.0.0.0__31bf3856ad364e35/PresentationCore.dll. ---------------------------------------- PresentationFramework Assembly-Version: 4.0.0.0. Win32-Version: 4.0.30319.34209. CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/PresentationFramework/v4.0_4.0.0.0__31bf3856ad364e35/PresentationFramework.dll. ---------------------------------------- System.Xml Assembly-Version: 4.0.0.0. Win32-Version: 4.0.30319.34209 built by: FX452RTMGDR. CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll. ---------------------------------------- WindowsBase Assembly-Version: 4.0.0.0. Win32-Version: 4.0.30319.34209 built by: FX452RTMGDR. CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/WindowsBase/v4.0_4.0.0.0__31bf3856ad364e35/WindowsBase.dll. ---------------------------------------- System.Xaml Assembly-Version: 4.0.0.0. Win32-Version: 4.0.30319.34209 built by: FX452RTMGDR. CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Xaml/v4.0_4.0.0.0__b77a5c561934e089/System.Xaml.dll. ---------------------------------------- System.Windows.Forms Assembly-Version: 4.0.0.0. Win32-Version: 4.0.30319.34209 built by: FX452RTMGDR. CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll. ---------------------------------------- System.Drawing Assembly-Version: 4.0.0.0. Win32-Version: 4.0.30319.34209 built by: FX452RTMGDR. CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll. ---------------------------------------- System.Core Assembly-Version: 4.0.0.0. Win32-Version: 4.0.30319.34209 built by: FX452RTMGDR. CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll. ---------------------------------------- RzUpdate Assembly-Version: 2.1.0.29218. Win32-Version: 2.1.0.29218. CodeBase: file:///C:/Program%20Files%20(x86)/Razer/Synapse/RzUpdate.DLL. ---------------------------------------- RzStorage Assembly-Version: 2.1.0.29218. Win32-Version: 2.1.0.29218. CodeBase: file:///C:/Program%20Files%20(x86)/Razer/Synapse/RzStorage.DLL. ---------------------------------------- RzSynapse.resources Assembly-Version: 2.20.15.1104. Win32-Version: 2.20.15.1104. CodeBase: file:///C:/Program%20Files%20(x86)/Razer/Synapse/de-DE/RzSynapse.resources.DLL. ---------------------------------------- System.Management Assembly-Version: 4.0.0.0. Win32-Version: 4.0.30319.34209 built by: FX452RTMGDR. CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Management/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Management.dll. ---------------------------------------- RzSynapseLoginUI Assembly-Version: 2.20.15.1104. Win32-Version: 2.20.15.1104. CodeBase: file:///C:/Program%20Files%20(x86)/Razer/Synapse/RzSynapseLoginUI.DLL. ---------------------------------------- System.Windows.Forms.resources Assembly-Version: 4.0.0.0. Win32-Version: 4.0.30319.34209 built by: FX452RTMGDR. CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms.resources/v4.0_4.0.0.0_de_b77a5c561934e089/System.Windows.Forms.resources.dll. ---------------------------------------- mscorlib.resources Assembly-Version: 4.0.0.0. Win32-Version: 4.0.30319.34209 built by: FX452RTMGDR. CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/mscorlib.resources/v4.0_4.0.0.0_de_b77a5c561934e089/mscorlib.resources.dll. ---------------------------------------- ************** JIT-Debuggen ************** Um das JIT-Debuggen (Just-In-Time) zu aktivieren, muss in der Konfigurationsdatei der Anwendung oder des Computers (machine.config) der jitDebugging-Wert im Abschnitt system.windows.forms festgelegt werden. Die Anwendung muss mit aktiviertem Debuggen kompiliert werden. Zum Beispiel: <configuration> <system.windows.forms jitDebugging="true" /> </configuration> Wenn das JIT-Debuggen aktiviert ist, werden alle Ausnahmefehler an den JIT-Debugger gesendet, der auf dem Computer registriert ist, und nicht in diesem Dialogfeld behandelt.
-
So for some reason, when it run's normally, my program will print the first string it get's as a single char, but as soon as it's in debug mode and hits the breakpoint, it writes the entire string into the console. I am finding this to be annoying, can anyone help? The .cs file will be attached to this post. Program.cs
-
Does someone know methods of editing registry outside of windows or using non-Windows apps while in Windows? Backstory: I screwed up, wanted to install AutoCAD, which didn't detect installed .NET 4.5. I decided to reinstall it since it helped earlier, but everything went wrong when I realized that Visual Studio 2017 installed .NET 4.7, wrote about it in registry, but not in distribution panel. And now I'm not able to do a thing,,, Neither uninstalling VS 2017 (it requires .NET 4.5 to do this), nor deleting a registry path that exists when .NET 4.5 is installed. P. S. Reinstalling an OS is not an option since it's father's laptop (mine is coming soon unprepared, so i need a PC for university for a while), there are some programs, for which I do not have installers with me and process of finding them is a pain in the butt, plus I don't have a lot of free time for getting that thing to work properly... Just need to delete one directory to make that thing running, that's all.
- 3 replies
-
- .net
- net framework
-
(and 3 more)
Tagged with:
-
Hi guys, I'm a developer and my current laptop is Lenovo T440p (Core i5 with 16GB RAM and Dedicated VGA) I really like Lenovo T series . I develop using Java for my company and also C#, Android for my part time jobs. I'm going to develop apps for ios and work on Unity also. Currently, I have macOS Sierra as virtual on VMware and I'm able to make apps on XCode and install them on my iPhone (I'v already checked it with a sample app) but with lags and it's not easy of course. so, my current laptop can't handle my tasks. I'm going to buy a new one. I always like (in some scenarios I love) the way Apple moves and works I know that I can do Java and Android developing on the mac and I have to use windows as virtual or using boot camp for dotNet but my main question (maybe problem) is that I've heard the new macbook pro isn't for developers and it's not worth buying and ... on the other hand, I can buy powerful laptops like Razer Blade 2017 or T470P with high spec almost the same price. Because of portability I have to buy a lightweight laptop. Could you guys suggest me please ? On more thing , If your suggestion is a windows based laptops, there are tow things that I want to know. First, Am I able to submit my apps to App Store using a virtual machine or not ? Second, what about the lags and performance on the virtual mac. Thanks in Advance !
-
Hi. I've started making a c# console game for fun. I'm trying to do sort of a space invaders-style thing, maybe with online co-op. But. I have been using SetCursorPosition. I'm gonna have to use threading. Will calling SetCursorPosition at about the same time in different threads mess stuff up? I take it I can't have multiple cursors, so if I call it in a thread and call it in another before an operation is complete,say, draw a character in an unwanted place? After I do a write, if the cursor is "on top" of a character, SetCursorPosition will delete that character as it moves the cursor else where, is there a way to fix this? Is there any better way to do this? I really feel like this is a dirty way to do it. Thank you.
-
Hi there, First time posting, and I hope I checked every box of the "Read before you post" sticky Just built my first system in a long while (mostly from used parts, though all coming from running pc's) and after finally installing Windows 10 (from an iso straight from MS) and getting everything up and running, I installed steam and 3DMark demo and basically any bench I run, the error msg "dxgi_error_device_removed" appears, and the run is halted. This happens many times, and updating the graphics driver changes nothing and after all that, more errors start coming. I suddenly got an error message saying that I need to install .Net framework 4.5.2 every time I try to open DAEMON Tools Lite, and trying to open Discord presents me with the error "Update.exe - Application error. The application was unable to start correctly (0xc0000135)." I click yes on the .Net error and it starts the install process, but after a little while it hits me with "HRESULTS 0x80240017" From there I go and check out Windows Update, and sure enough, there is an update available called "2019-05 Cumulative Update for Windows 10 Version 1903 for x64 based Systems (KB4497935)" I hastily click on update now, the update finishes and it asks me to restart the computer, which I do, but upon entering the OS, it prompts me again to install the same update, which fails every time i try to perform it. After a touch of googling, I found some threads mentioning both an SFC scan and a DISM check, and neither one finds any errors. So to simplify: windows update = broken .Net framework = broken benchmarking = broken OS - Windows 10 2019 - 64 bit MB - Gigabyte F2A88XM-D3H (used) Bios - F5 AMD AGESA KaveriPI V0.0.8.1 01/09/2014 CPU - AMD A8-6600K (used) RAM - 2x4GB DDR3 (used) GPU - Sapphire R9 295x2 8GB (used) PSU - Corsair AX860i (new) OS drive - Samsung 830 128GB SSD Steam library drive - Seagate desktop 2TB Nothing in the system is Overclocked I don't know how to describe my problems better, but if anyone could point me in the right direction, that would be awesome! Best regards, KeZeel Iceland
- 5 replies
-
- .net
- windows update
-
(and 1 more)
Tagged with:
-
Hi All, I have been working on a little project after being inspired by the "DIY 87-Key Macro Keyboard" video and was just looking for advice on whether people think it is something that i should continue to develop and possible release. It is basically a macro keyboard (or virtual stream deck) that allow you to run macros on a windows machine using an android tablet as the keyboard. The android app connects the the windows machine and presents a grid (configurable size) of buttons that when pressed will run the macro on the windows machine. The windows app runs in the background and is used to configure the virtual keyboards (multiple tablets(or phones) can be used to control one windows machine). The macros can be configured to run a queue of: Key Combinations (including separate key up and downs and includes all keys that windows supports, for example F13-24) Strings (to type strings without having to use individual key presses) Mouse Clicks Shell Commands Plugins (support for .net class dlls that run a function with a string parameter) The keyboard it self allows: Text Labels (configurable colour for text and background) Images Animated Gifs Plugins (dynamic images can be sent from the windows machine, the example i created sends an image of the current ram/cpu usage once per second) Separate keyboards per windows app that switches automatically as you switch apps in windows Multiple pages (navigated using either swiping or buttons that would appear more hierarchical) I have pretty much finished the app(s), but it is in no way polished or properly bug tested, i'm just wondering if you think anyone would be interested in such an app.
- 17 replies
-
hi all. i am making a new desktop app, which involves extensions. since i haven't the time to create a scripting language or implementing an existing one, i've chosen to call specific methods of all dlls in a specific folder. so i coded a simple extension that implements Discord RPC. but when i try to run it, a MissingMethodException gets thrown. Here's the code Main assembly: public void InitializeExtensions(string extpath) { foreach (string dll in Directory.GetFiles(extpath, "*.dll")) { Assemblies.Add(Assembly.LoadFile(dll)); } List<Assembly> ToRemove = new List<Assembly>(); //All the assemblies that cannot be initialized will be removed from the list of assemblies foreach (Assembly DLL in Assemblies) { foreach (Type type in DLL.GetExportedTypes()) { try { var c = Activator.CreateInstance(type); type.InvokeMember("Initialize", BindingFlags.InvokeMethod, null, c, new object[] { this }); } catch (MissingMethodException ex) { ToRemove.Add(DLL); MessageBox.Show(String.Format("Could not initialize the extension {0}: MissingMethodException {1}, Path.GetFileName(DLL.Location), ex.Message), "YouTubeDesktop - Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } } } foreach (Assembly a in ToRemove) { Assemblies.Remove(a); } } And the DLL //using main assembly static Form1 Form1; public static DiscordRpcClient Client; public static void Initialize(object[] args) { Form1 = (Form1)args[0]; Client = new DiscordRpcClient("My_ID"); //Set the logger Client.Logger = new ConsoleLogger() { Level = LogLevel.Warning }; //Subscribe to events Client.OnReady += (sender, e) => { Console.WriteLine("Received Ready from user {0}", e.User.Username); }; Client.OnPresenceUpdate += (sender, e) => { Console.WriteLine("Received Update! {0}", e.Presence); }; //Connect to the RPC Client.Initialize(); }
-
web service Help with the creation of a web service in c # .NET
Weber01 posted a topic in Programming
Hi guys, today for the school they asked us to do a project as we please, it had occurred to me to create a web service with c # and .NET. I have never used these languages. You could help me kindly. THANK YOU -
I need .NET core hosting for a project and there are too many options out there with features that I don't need. All I need for this project is: Custom domain support (this will go on a subdomain) .NET core support (just one site) 10 GB of storage One SQL server database, 1 GB is probably enough I don't need email support or anything else like that. I also looked at Microsoft Azure but their cheapest options are supposedly dev only. https://azure.microsoft.com/en-us/pricing/details/app-service/windows/ Traffic will be low. Any suggestions?
-
Hi There, I predominately work with front end programming technologies (React/Js/Webpack etc.) However need to run a .NET API and actively develop on it as well. I currently run parallels with Windows 10 in order to do the .NET work, however it's very cumbersome and slow. I'm pretty married to the Mac operating system for my main vocation. Anyone have the same requirements and have found a good solution for developing on both platforms? -Hank
- 2 replies
-
- .net
- visual studio
-
(and 1 more)
Tagged with:
-
I need some help as to why my program works when I have it go in debug mode, but fails when it runs normally. I'll provide a link to the git (https://github.com/TechNGamer/mod-copier/tree/not-completed), it's the ExternalUpdator project that doesn't seem to be working as expected. What I expect it to do is to be copied to the temp folder, run as admin, then proceed to download the "newest" version from GitHub. Yet, when I run it normally, it doesn't work. When I run it in debug mode, it works. No changes what so ever from any of the command line arguments. These are the arguments passed for the test run: --main-program=TechNGamer:mod-copier:Mod.Copier.Manual.Install --install-path="E:\Personal Files\Programs\Git Repositories\Mod Copier\Mod Copier\bin\Debug"
-
So I'm redoing my ID3#-Reader for the reason that I didn't like how it was made in the first part. However, when I go and run this test I find it odd that Test 2 (method: TagComptest1()) complete's slower than Test 3 (method: TagCompTest2()). Yet, Test 3 has a lot more data in it, so why is it faster at completing? The times are 00:00:00.0001633 for Test2 and 00:00:00.0000707 for Test3. Is Visual Studio doing something behind the scenes and if so, can someone explain how it might be optimizing my code? The appropriate scripts are below: UnitTest1.cs: public void TagCompTest1() { FileStream fileStream = File.Create( Path.Combine( Environment.GetFolderPath( Environment.SpecialFolder.Desktop ), "ID3 Test Folder", "Test2.log" ) ); DateTime now = DateTime.Now; Random random = new Random(); for ( int i = 0; i < 5; i++ ) { Tags.IsKnownTag( Tags.STRING_TAGS[ random.Next( Tags.STRING_TAGS.Length ) ] ); } WriteToLog( $"Took 5 rounds of calling IsKnownTag ~{( DateTime.Now - now)/5}.\n", fileStream ); now = DateTime.Now; Tags.IsKnownTag( "XXXX" ); WriteToLog( $"Took ~{DateTime.Now - now} to validate if 'XXXX' was a valid tag.", fileStream ); } [TestMethod] public void TagCompTest2() { FileStream fileStream = File.Create( Path.Combine( Environment.GetFolderPath( Environment.SpecialFolder.Desktop ), "ID3 Test Folder", "Test3.log" ) ); DateTime now = DateTime.Now; Random random = new Random(); for ( int i = 0; i < 5; i++ ) { string[] tags = { Tags.STRING_TAGS[ random.Next( Tags.STRING_TAGS.Length ) ], Tags.STRING_TAGS[ random.Next( Tags.STRING_TAGS.Length ) ], Tags.STRING_TAGS[ random.Next( Tags.STRING_TAGS.Length ) ], Tags.STRING_TAGS[ random.Next( Tags.STRING_TAGS.Length ) ], Tags.STRING_TAGS[ random.Next( Tags.STRING_TAGS.Length ) ] }; Tags.IsAnyKnownTag( tags, out string[] dummy ); } WriteToLog( $"Took 5 rounds of calling IsAnyKnownTag ~{( DateTime.Now - now ) / 5}.\n", fileStream ); } Tags.cs: public static bool IsKnownTag( string tag ) { int start = 0, end = 0; // This if tree helps cut the processing time down by only looking at the potion of the list or, if it's the only type, the string itself. #region IfTree if ( tag.StartsWith( "A" ) ) { end = 3; } else if ( tag.StartsWith( "C" ) ) { start = 3; end = 5; } else if ( tag.StartsWith( "E" ) ) { start = 5; end = 8; } else if ( tag.StartsWith( "G" ) ) { start = 8; end = 10; } else if ( tag.Equals(STRING_TAGS[10]) ) { return true; } else if ( tag.StartsWith( "M" ) ) { start = 11; end = 13; } else if ( tag.Equals( STRING_TAGS[ 13 ] ) ) { return true; } else if ( tag.StartsWith( "P" ) ) { start = 14; end = 19; } else if ( tag.StartsWith( "R" ) ) { start = 19; end = 21; } else if( tag.StartsWith( "S" ) ) { start = 21; end = 25; } else if ( tag.StartsWith( "T" ) ) { start = 25; end = 71; } else if ( tag.StartsWith( "U" ) ) { start = 71; end = 74; } else if ( tag.StartsWith( "W" ) ) { start = 74; end = 83; } #endregion IfTree // Itterates over the STRING_TAGS array and checks only the strings it needs to. for ( int i = start; i < end; i++ ) { if ( STRING_TAGS[ i ].Equals( tag ) ) { return true; } } return false; } public static bool IsAnyKnownTag( string[] tags, out string[] areKnownTags ) { // Creates a list of string to store all the right tags. List<string> areTags = new List<string>(); // Loops through all the tags checks them with the IsKnownTag method. foreach ( string tag in tags ) { // If method returns true, add the tag to the List<string>, otherwise, do nothing with it. if ( IsKnownTag( tag ) ) { areTags.Add( tag ); } } // Checks to see if the list is greater than 0, if true, makes the areKnownTags assigns it to the output of areTags.ToArray() and returns true. // Otherwise it set's areKnownTags to null and returns false. if ( areTags.Count > 0 ) { areKnownTags = areTags.ToArray(); return true; } else { areKnownTags = null; return false; } }
-
So I'm making my own ID3v2 Tag Reader, it seems to work very well atm. However, I don't seem to be able to get the APIC to work. Whenever it runs, it says the size of the APIC tag on my test file is 2,038,334 bytes, but when I extract the image, Windows File Explorer reports it's size at 511,281 bytes. The compressed flag is false, in fact, all the flags are false. What am I missing here? All the files can be found on my GitHub. The line where tags are found and processed are located here: https://github.com/TechNGamer/ID3-Sharp-Reader/blob/a6c1468b04caa3b6569d41cc0fd67048242b165b/ID3-Sharp-Reader/Tag_Loader.cs#L157 Can someone help and explain. I do also plan on cleaning up the code once the entire thing is working as intended.
-
I recently installed .net framework 4.7 and 4.7.1 on windows 7 pro x64 sp1 and now I cannot install rapid storage tho I know its not a essential driver but I install it 2 SSD's in Raid 0 But I can not even install Discord because of it. Errors Since Installing the procedure entry point setdefaultdlldirectories could not be located in the dynamic link library kernel32.dll and errors installing programs that require .net framework 4.5 even tho I have 4.7.1 and some programs do not work. Should I Remove It and Reinstall Up To 4.6.2???? And Forget 4.7 and 4.7.1
-
I'm having trouble figuring out why I'm having issue's loading a damn .dll that a plugin for my program I made won't load in. The exception I keep getting always seems to change lines. Please help me, this isn't any homework shit or anything. It's a personal project. The project can be found on GitHub here.
-
- plugin
- dependencies
- (and 4 more)
-
Hi guys. Im searching on components for a programming rig, my job is .Net programming and I'm currently learning Java for Android programming. I want to develop Android on a virtual machine So far I've chosen these Intel 6700K Thermalright Macho Rev A air cooling Asus Z170 Pro Gaming Corsair Dominator Platinum 2*8GB 2400 Evga 650 GQ Corsair Carbide Spec 02 Samsung 850 Evo 120 WD Blue 2TB (probably RAID 5) What is your opinion about these? Any advice is hugely appreciated Thanks in advance
- 2 replies
-
- programming
- virtual machine
-
(and 4 more)
Tagged with:
-
Hey guys! I'm new to the LTT forums and I'm new to C#, Watched 1 Bob Tabor course aprox ~7 hours long about a week and a half ago. I just wanted to see what you guys thought of my code, give me pointers etc. Like the title suggests its a simple Tic-Tac-Toe game that took around an hour or so to program. Also if you have any experience with XNA/Monogame or Unity3D Please tell me where I should go to learn more about either (I'd like to get into game programming).
- 5 replies
-
- csharp
- programming
-
(and 3 more)
Tagged with:
-
First off, forgive me if I'm breakin' any rules here... Not trying to advertise or anything, but I figured I'd share something I'm working on here because why not. Basically, this game I'm making... ShiftOS... doubles as a game and a prank application. Basically it scares the user by saying they've been hijacked and involuntarily selected to try an experimental operating system called ShiftOS. Their hard drive gets formatted in the process. That'd be funny as a prank, as it requires no administrator privileges (unless it's a school PC or something) which means, well, if this post gets popular and one of the guys at the LTT office sees this and decides to do a ChannelSuperFun video about it... let's just say, I'd imagine an unsuspecting victim would probably get real scared real quick. Especially if they're editing a video for LTT and all of the sudden their PC gets hijacked, and their hard drive formatted. It doesn't really get formatted. But yeah. Anyways if you're interested... http://playshiftos.ml/...
-
Guys, I'm stuck. I'm making a program that launches a website a few guys are programming in various browsers. You know. For testing quickly. I need to document the tests and having such a program seemed the most straight-forward way to get the timestamps and versions and whatnot. Here's how it looks to give you an idea: The alias is just a hand-typed thing to tell computers apart in the reports. The OS I fetch with this: TextBox2.Text = (My.Computer.Info.OSFullName & " " & My.Computer.Info.OSVersion).ToString Those buttons just open the URL in corresponding browsers. But I need the versions for the browsers too. The thing is, I can't really use GetFileVersionInfo like in here because I don't have the absolute path due to using this alone to fire up the browsers: Process.Start("firefox.exe", "http://THE-URL-GOES-HERE") ' to open "http://THE-URL-GOES-HERE" in Firefox So I'm stuck. I need help. Either I need a way to determine the absolute path or I'll have to figure out a way to find the file version without it.
- 2 replies
-
- visual basic
- .net
-
(and 2 more)
Tagged with:
-
I cannot get .NET framework to install. Windows Update tells me it can't find the file. When I run the DISM command (with admin permissions) that I found in many forums, i get this: Here is the log file. I'd appreciate any help possible. My older games will thank you.