.net – SourceGrid C # (WinForm)

I am developing a small management application, and in this I have created a diary created with a SourceGrid.

Everything works perfectly, but I have to be able to enlarge my diary on the screen.

I'm explaining that I'm in a windows form, when I click the button to zoom in to the SourceGrid, a new Windows Form opens with a larger SourceGrid.
Each time I increase this size, one of the SourceGrid cells is blue according to the mouse pointer position (see the figure below).

I researched a lot on the internet, but I can not find a solution: /

Here's an example of what I have when I click the button:

Unintentional results

Here is an illustration of what I would like to get:

Desired result

Thank you in advance πŸ˜‰

ps: I have not set up an event on the mouse's hardflyer in my sourceGrid

Machine Learning by .Net | Proxies-free

Microsoft seems to be studying the .NET port for machine learning. And they have some examples of the .NET version of machine learning. So far, I've heard a lot of good about this harbor. I still have to learn machine learning in .NET. For the moment there seems to be only the 1st version of the port. And there does not seem to be much documentation and tutorials. I'll try this in the near future if other hosts like Amazon AWS and Google Cloud support it.

Have you learned about Learning Learning .NET? What is your experience with it?

Sale – $ 1100 net profit per month 2 years old

I need a lot of money for my illness and I am unable to control it, so I have to sell my sites urgently. In any case I give big discount for urgent / immediate sale of my company.

https://touchurban.com

Age nearly one and a half years and the monthly net profit of the last 12 months nearly $ 1100

Many keywords 1st place on Google and Bing.

If you are interested in purchasing, please inform me immediately. I urgently need money to sell quickly.

I attached the website here financially and safely, so please check everything carefully. If you want to check everything about the Team Viewer, let me know.

Why are you selling this website?

I need a lot of money for my illness and I am unable to control it, so I have to sell my sites urgently. In any case, I give big discount for urgent / immediate sale of my company.
SEMrush

How is it monetized?

Ecommerce / Dropshipping. Already ordered over 3000 products

Is this site coming with social media accounts?

Yes. Facebook page has over 2600 likes and Twitter account has over 6000 followers

How long does it take to run this site?

There is no time required for execution as the website still generates revenue.

What are the challenges of running this site?

I have not done anything like this before. I will teach who won my business.

.net – Implementation of a fixed collection in C #

I want to define some constant sequences (especially bytes) in my C # library / API. Both length and content should not vary, preferably by no means (without reflection). For this purpose a byte[] Array would not be enough and a ReadOnlyCollection can still be mutated. I have not made a full comparison yet, but this effort could be reinvented ImmutableListIn that case, I would still like to receive feedback on the successes and weaknesses of this implementation. To be specific, this class should be inherited from several derived classes that actually define the constants.

Design & Style

  • I have chosen this class on the most primitive interface (IEnumerableI could do that partly for maximum compatibility, and partly to avoid hiding or throwing NotSupportedException most certainly ICollection Methods and the like. Does that have any disadvantages?

  • The actual collection that contains the items is a private list,

  • I have implemented a few comfort fields, AsString, number, and length (length feels more like the guy, but the existence of the Counting <> LINQ extension made me feel that both should be included for consistency. I considered receive-Only properties, however, this question and answer to SO points out read-only is a more explicit modifier. Are there other advantages / disadvantages that I miss in this particular case?

  • Since I only want to derive this class, I could mark it abstractbut I could build it as well interface? (This would affect the read-only/receive-nly decision.) Stylistically, however, it seems that derived classes should have an "actual relationship" bytes instead of a "can".

  • I have omitted all namespace qualifiers here, as seems to be the standard in C #. However, I mostly come from Python, and global imports and pollution of the global namespace are almost unbearable to me. I do not want to see either System.Collections.Generic.[...] all over; Is it an acceptable compromise, for example, to use using CollectionsGen = System.Collections.GenericOr would that be appalling if C # programmers read my code?

code

/// 
/// implementation of a fixed collection of bytes with some extras.
/// 
public class bytes: IEnumerable
{
private list bytes list;
public readonly string AsString;
public read only int Count;
public readonly int length; // Only a synonym for Count

// accepts values ​​from -Length to Length-1 (similar to Python indexing).
public byte this[int i] {get {return this.bytesList[ i>=0 ? i : i+this.Length ]; }}

public bytes (IEnumerable bytes)
{
this.bytesList = new list(Bytes);
this.AsString = string.Join ("", this.Select (b => $ "0x {b: X2}"));
this.Count = this.bytesList.Count;
this.Length = this.Count;
}

public IEnumerator GetEnumerator () {return this.bytesList.GetEnumerator (); }

IEnumerator IEnumerable.GetEnumerator () {return this.GetEnumerator (); }

I think I could generalize this by definition to each type public class MyImmutableCollection : IEnumerable with about the same body, but I do not need that now.

Usage

var byteArray = new byte[] {0x01, 0x02, 0x03};
var bytesInst = new bytes (byteArray);
byteArray[1] = 0xFF;
// Note that byteArray has changed, whereas bytesInst does not.
bytesInst[1] = 0xFF; // correctly generates a read-only compiler error

.net – How to create an event in Google Calendar using c # and Google API?

I need to create an event and add it to Google Calendar using Google API.

At the moment I only know how to get all events from Google Calendar. I have so far:

with Google.Apis.Auth.OAuth2;
with Google.Apis.Calendar.v3;
with Google.Apis.Calendar.v3.Data;
with Google.Apis.Services;
with Google.Apis.Util.Store;


Namespace CalendarQuickstart
{
class program
{
// If you change these areas, delete your previously saved credentials
// at ~ / .credentials / calendar-dotnet-quickstart.json
static string[] Scopes = {CalendarService.Scope.CalendarReadonly};
static string ApplicationName = "Google Calendar API .NET Quickstart";

static void Main (String[] args)
{
UserCredential credential;

using (var stream =
new FileStream ("credentials.json", FileMode.Open, FileAccess.Read))
{
// The token.json file stores the user's access and refresh tokens and is created
// automatically when the authorization process completes for the first time.
string credPath = "token.json";
credential = GoogleWebAuthorizationBroker.AuthorizeAsync (
GoogleClientSecrets.Load (Stream) .Secrets,
areas
"User"
AnnullationToken.None,
new FileDataStore (credPath, true)). Result;
Console.WriteLine ("Credential file was saved in:" + credPath);
}

// Create the Google Calendar API service.
var service = new CalendarService (new BaseClientService.Initializer ())
{
HttpClientInitializer = credential
Application name = application name,
});

// Define the parameters of the request.
EventsResource.ListRequest request = service.Events.List ("primary");
request.TimeMin = DateTime.Now;
request.ShowDeleted = false;
request.SingleEvents = true;
request.MaxResults = 10;
request.OrderBy = EventsResource.ListRequest.OrderByEnum.StartTime;

// List events
Events events = request.Execute ();
Console.WriteLine ("Upcoming Events:");
if (events.Items! = null && events.Items.Count> 0)
{
foreach (var eventItem in events.Items)
{
String when = eventItem.Start.DateTime.ToString ();
if (String.IsNullOrEmpty (when))
{
when = eventItem.Start.Date;
}
Console.WriteLine ("{0} ({1})", eventItem.Summary, if);
}
}
otherwise
{
Console.WriteLine ("No upcoming events found.");
}
Console.Read ();
}
}
}

What I am trying to do must look like this:

                                var ev = new event ();
EventDateTime start = new EventDateTime ();
start.DateTime = new DateTime (2019, 3, 11, 10, 0, 0);

EventDateTime end = new EventDateTime ();
end.DateTime = new DateTime (2019, 3, 11, 10, 30, 0);


ev.Start = start;
ev.End = end;
ev.Description = "Description ...";

events.Items.Insert (0, ev);

I spent the whole day searching through all .NET examples, but nothing.
Any help appreciated! πŸ˜‰

c # – I ask for help: Visual Net (incomplete event)

The following happens to me to see if anyone can help me (Visual .NET):

I am working with a WebBrobser object. I have a button that, when clicked, executes a For Each element and goes through the elements of the DOM. In doing so, some data is inserted into a form. The only thing that adds 1 data to me when I click it again button, paste the second data, etc.

I tried to assign the variables directly without this

Pseudocodigo {
webbrowsser.DOM.item (1) = "Hello"
webbrowsser.DOM.item (2) = "what happens"
webbrowsser.DOM.item (3) = "cat"

and does the same thing as ForEach, inserts only 1 data each time the button is clicked. The unbelievable thing is that it's the following data

if I put a mgbox ("") between the lines and if I make one, if I say so.

webbrowsser.DOM.item (1) = "Hello"

msgbox

webbrowsser.DOM.item (2) = "what happens"

msgbox

webbrowsser.DOM.item (3) = "cat"

it's as if the msgbox paused the process and then resumed it, but I tried to go to sleep and not.

I've tried a timer, and of course I enter the data, which is even worse, because the timer event will jump several times in a few seconds.

Resumiedno: I have to skip the event several times so I enter the data. That's very rare

Why is this happening? Thanks from now on, greetings!

magento2 – Authorizing Net MD5 on SHA512 patch does not work

Currently we have a Magento shop in Magento version 2.2.5 and use Authorize net as the default payment method. Due to the last update of Authorize net I have tried to update the patch. I followed this link

After applying this patch to my current installation, I get the following error message when I try to run the setup: di: compile

[RuntimeException]
The class Magento Sales Api PaymentFailuresInterface does not exist in
[MagentoAuthorizenetModelDirectpostInterceptor]

I have confirmed that it is because of this new patch by returning to the old state. Any suggestions?

thank you in advance

Color the net according to the nodes

Given a sentence p of points (2D), each with a unique color cI can easily network these points

p = RandomReal[{0, 1}, {10, 2}];
c = map[Hue[#] &, RandomReal[{0, 1}, 10]];
show[DelaunayMesh[p],Graphic[Graphics[MapThread[{PointSize[.05], # 1 point[#2]} &, {c, p}]]]]

Enter the image description here

My question:

How can I easily color the lines and / or triangles according to the neighboring node colors?

Many Thanks!

iptables – IPVS traffic does not seem to go through a net filter on the Director node

I have the following setup on a Director node that keeps keepalived running:

  • native IP 10.65.5.72
  • VIP 10.65.5.230
  • Keepalived DR mode enabled
    Port 80 and 443

I fixed an issue with the error where I could not access the IPVS service myself through the Director node. It was found that the IPVS traffic does not seem to go through the network filter. To check this, I've set up the following rule in the raw table in iptables:

Chain PREROUTING (guideline ACCEPT 143K packets, 133M bytes)
pkts bytes destination prot opt ​​in out source destination
1 60 MARK all - * * 10.65.5.72 10.65.5.230 MARK and 0xffffffff

and then I ran

nc -v -s 10,65,5,72 10,65,5,230 80

I expected the packet counter to increment, but not.

If I change the port number in the command nc to a value other than 80 and 443, then the counter does Growth.

In the meantime, I've incremented the package counter

ipvsadm -L -n --stats

When executing the above nc command, it should be pointed out that a package was generated that got somewhere.

Is this the expected behavior of ipvs? From materials I found on the Internet, it seems that IPv4 traffic should go through Netfilter. What could cause the behavior that I see?