16 Eylül 2021 Perşembe

Object reference not set to an instance of an object Exception On EntityFrameworkCore

 System.NullReferenceException

  Message=Object reference not set to an instance of an object.

  Source=Microsoft.EntityFrameworkCore.Relational

  StackTrace:

   at Microsoft.EntityFrameworkCore.Query.Internal.SplitQueryingEnumerable`1.Enumerator.Dispose()

   at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)

   at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)


This maybe a small problem caused by a value that is not nullable but the database has a null value, so c# cannot copy null to your variable and throws exception

17 Nisan 2021 Cumartesi

 MountControl msgs c++ to Python

In this small text I will talk about importing mountcontrol


in c++: 

#include <mavros_msgs/MountControl.h>
mavros_msgs::MountControl msg;

in python

from mavros_msgs.msg import MountControl
msg = MountControl()







25 Mart 2021 Perşembe

SOLID PRINCIPLES-Sahin Kasap

 SOLID PRINCIPLES FROM MY PERSPECTIVE

Solid principles have a very important point on software development. These principles are produced after years of hardships. These details are about developing a good object-oriented program. The SOLID letters meanings are: Single Responsibility Principle, Open-Closed principle, Liskov’s substitituon principle, Interface segregation principle and Dependency Inversion principle. Let’s talk about these principles.

Single Responsibility Principle

This principle states that, in an object oriented project, a method or a class or a module must have only one responsibility. The classes/methods mustn’t do different jobs other than their own. 

Open Closed Principle

Classes or methods must be open for expanding but closed for modification, which means when a method is written and at some time of our project if we want to add another feature, we mustn’t change the existing methods, we must write another classes-interfaces for the new feature. This principle is generally achieved by creating interfaces. When a method uses the interface while dealing with the objects, the interface can be implemented for the new feature and our pre-written codes doesn’t change.

This principle is very useful in Unity, because interacting a script with an object is so easy.

Liskov’s Substitution Principle

Let me explain with my own words: if a class has a subclass and if this class has been used in some scripts, the subclass can be used too. This situation must not break anything on the application.

Interface Segregation Principle

Interfaces mustn’t be created in a way that the implementers of the interface mustn’t be forced to implement methods that they don’t use. 

Dependency Inversion Principle

This principle states that a high level module should not depend on low level modules. They all must depend on abstractions. This means that, when a low module creates another functionality, and this functionality must be used for a high module, this must be achieved by abstractions-which means we must create an interface or abstract class for the use of new functionality. So when the functionality changes, the high level must not be affected.


30 Aralık 2020 Çarşamba

How to Make A Program to Offboard the drone on PX4 gazebo ROS

 Hello, in order to hover the drone like in the simulation like this one: 

https://dev.px4.io/master/en/ros/mavros_offboard.html

you need to firstly clone this repo:

https://github.com/darienmt/px4-sitl-ros-example

on anywhere. Then go into this directory on shell:

$ cd px4-sitl-ros-example

then, catkin make it:

$ catkin_make

then source the devel/setup.bash file:

$ source devel/setup.bash

Then, on another terminal go to PX4 directory(considering you have already installed)

$ cd ~/PX4-Autopilot

This directory may be different on yours. Then run Px4 autopilot:

$ make px4_sitl gazebo

You may need to add sudo in front of this command.

This must run gazebo with a drone.

Then on another terminal run(directory is not important):

$ roslaunch mavros px4.launch fcu_url:="udp://:14540@127.0.0.1:14557"

Then on the first terminal where was in px4-sitl-ros-example directory, or another terminal which you are in px4-sitl-ros-example directory, run:

$ rosrun offb offb_node

The drone must hover


Here is a screenshot where I closed the programs, you can look from here.
Have fun.
You can contact me on: sahinkasap52@gmail.com


21 Aralık 2020 Pazartesi

ANKARA ASKİ Yeni kartlar nasıl makineye okutulur?

Bu yazımızda ankara aski kartlarını nasıl okutacağımızı ele alacağız.

Yeni aski kartları NFC ile çalışmaktadır. NFC işaretinin üzerine konulmalıdır. 

NFC logosu şunlardan birisine benzemektedir.

Bu logolara benzer bir şey görürseniz kartınızı üstüne koyarak okutabilirsiniz.

22 Ekim 2020 Perşembe

HOW TO CLOSE WEBEX FULLY SO IT WONT RUN AGAIN AND IT WONT RUN IN BACKGROUND

 Webex doesnt stop running. Even after you close, it reopens. It will never close. In order to close it follow these instructions:

1-Open Task Manager

            -Ctrl+Shift+Esc   OR

            -Ctrl+Alt+Delete and choose task manager OR

            -Right click on task bar and click on task manager

2-Sort by name if it is not sorted that way

3-Go down and find cisco applications

4-Close one by one. By right clicking on it and choose end task. 







26 Mayıs 2019 Pazar