Monthly Archives: July 2018

WPF draw a shape inside of another shape

Questions: I have to build aerodynamically a canvas with different rectangles and some of them has to be crossed. I do this by adding 2 lines as diagonals of the rectangle. The problem is when i set the line to be thicker, the line will go over the rectangle contour like in the picture: Is… Read More »

Sendkeys and multi-purpose keys

Questions: I’m making a software that can save consenting user’s keyboard and mouse inputs to reproduce them exactly as they did in order to track bugs. I’m to the point where most of this works but I have some details to workout when I’m reproducing some keys. I’m currently using .NET’s famous SendKeys to do… Read More »

Category: C#

Change my new list without changing the original list

Questions: This is my original list: var cart = _workContext.CurrentCustomer.ShoppingCartItems .Where(sci => sci.ShoppingCartType == ShoppingCartType.ShoppingCart) .LimitPerStore(_storeContext.CurrentStore.Id) .ToList(); I reviewed this link : How do I change my new list without changing the original list? And have understood that I have a method for copy so this is my method: private List<ShoppingCartItem> CopyShoppingCartItems(List<ShoppingCartItem> target) { //var… Read More »

ora-00351: network library: name-value premature end of string

Questions: I would like to make an application that appends data to the oracle database table, but it does not work properly even if I do not establish the connection and I am getting this error String ConString = “DATA SOURCE=TEST;DBA PRIVILEGE=SYSDBA;PERSIST SECURITY INFO=True;USER ID=DERS;PASSWORD=1234”; using (Oracle.ManagedDataAccess.Client.OracleConnection con = new Oracle.ManagedDataAccess.Client.OracleConnection(ConString)) { OracleCommand cmd =… Read More »

SignalR and TCP/Socket Connection

Questions: Need some help with this: I’m trying to develop a web application ( core 2.1) that’s going to be connected to different devices. All of these are going to send data through a socket so I need to listen to traffic on different IPs. I can easily listen to traffic at an IP using… Read More »

Can we use Try/Catch Within QueuedTask.Run()

Questions: Can we use Try/Catch within QueuedTask.Run()? I have feeling that Try/Catch should be outside QueuedTask.Run() but I don’t have reason for that. Please clarify whether to keep in or out of QueuedTask.Run() public ICommand CmdEdit { get { return _cmdEdit ?? (_cmdEdit = new RelayCommand(() => { QueuedTask.Run(() => { try { if (_selectedObj… Read More »

Category: C#

Return XML From Web Api

Questions: I’ve done hours of reading on this and tried many different solutions I’ve found on SO and else where and still haven’t been able to get this working. The situation is, I’ve written a web api rest service to provide an interface to a 3rd party application via COM. It’s been in production now… Read More »