13 Eylül 2023 Çarşamba

c# program.exe.configuration

 When you need save and read some parameters which related about your settings or something else;

1. If your project does not have a "App.config" file; to make new one, right click  your project and "Add->New Item->App Configuration File".

2. Open "App.Config" file and view your file like that;


<?xml version="1.0" encoding="utf-8"?>
<configuration>
<configSections>
<sectionGroup name="applicationSettings" type="System.Configuration.ApplicationSettingsGroup, System">
<section name="DevExpress.LookAndFeel.Design.AppSettings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false"/>
</sectionGroup>
</configSections>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8"/>
</startup>
<appSettings>
<add key="deviceModel" value="0" />
</appSettings>
</configuration>

This is a code snippet for read value and change and save procedure;


var appSettings=ConfigurationManager.AppSettings;
if (appSettings["deviceModel"].Length!=0)
{
    textBox1.Text = appSettings["deviceModel"].ToString();
}

int tempVal;
var configFile = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None);
var settings = configFile.AppSettings.Settings;
if (settings["deviceModel"] == null)
{
    settings.Add("deviceModel", "1");
}
else
{
    tempVal = int.Parse(settings["deviceModel"].Value);
    tempVal++;
    settings["deviceModel"].Value = tempVal.ToString();
}
configFile.Save(ConfigurationSaveMode.Modified);
ConfigurationManager.RefreshSection(configFile.AppSettings.SectionInformation.Name);


3 Ağustos 2023 Perşembe

Keil MDK Arm

 Merhaba bu sayfada Keil'de karşılaştığım bazı sorun ve çözümleri paylaşacağım.

  1. Keil StLink yüzünden kendi kendine çöktüğü zamanlar oluyor bunun için buradaki linkten signed driver'ı indirip. "C:\Keil_v5\ARM\STLink" klasörünün altındaki "STLinkUSBDriver.dll" --> sonuna backup yazıp("STLinkUSBDriver.dll_backup") yedekledikten sonra indirdiğiniz dosyayı buraya kopyalayın sorun çözülmüş olacak.

10 Nisan 2023 Pazartesi

Python Notes

  1. reference Book: Python 3 Object Oriented Programming by Dusty Phillips
  2. When  you see @property in a class, this means that decorators are being used in this class.

28 Kasım 2022 Pazartesi

Harmonics(in electrical systems)

  • https://www.fluke.com/en/learn/blog/power-quality/how-to-find-harmonics-in-electrical-systems
  •  Overheated transformers and tripped breakers could be a sign of harmonic issues, which occur when non-linear loads that draw current in abrupt pulses, rather than in a smooth sinusoidal manner, cause harmonic currents to flow back into other parts of the power system.
  • This value of THD in terms of power quality health is most often applied to the voltage. Guidance states that the voltage harmonic effects should be less than 8 percent relative to the fundamental. Values above the stated 8 percent should be investigated further.

 

This document solution is the best approach.

  • https://www.newark.com/pdfs/techarticles/eaton/Eaton_Technical_Articles/UPS_Training/Powerware_Training/HarmonicsInYourElecSystem.pdf 

 

PowerFactor VS CosPhi

You Can read this article. In summary;

  • CosPhi results from the ratio of effective power (P) to fundamental apparent power (S1). 
  • PF; results from the ratio of effective power (P) to total apparent power (S) from fundamental and harmonics.

 

12 Ekim 2022 Çarşamba

Beaglebone Black Notes

  1. When you need enabling uart of beaglebone black. read this site first and read this site

      2. Minicom is a great tool for command line serial port testing.

    " minicom -b 9600 -D /dev/ttyO1" --> 9600 8N1 open Uart1 BBB :)


 

26 Temmuz 2022 Salı

WebDeviDaily

05/26/2024 Sunday -> This is my first day of web developer. I am new career for my life. This step will never end with lies and not givin...