|
The scenario is this. We have one feed of data that contains many different types of messages in it. Each of these messages is handled by a different ViewModel because of the way that the screens work. So, each ViewModel "subscribes" to the appropriate message in the model via RX (it's the same model across all of the VMs), and picks out the messages it needs. We have extended RX slightly so that we can shape the data as well - some of the VMs actually take moving aggregates out of the underlying model data. And yes, "dang, RX was born to solve this".
|
|
|
|
|
Are you "allowed" to say what type of data it is / business domain? That's the part I'm trying to figure out LOL. Aside from the shaping, what you described above is event aggregator. Everybody always uses the stock ticker to explain RX. That you might get 20 ticks / sec, but for display purposes, you only need 5 / sec or whatever. So yeah, RX will help you out there... I guess I'm just trying to find some real examples besides the stock ticker. One example I found yesterday was for throttling emails. That's all well and good, but you don't generally throttle emails in the real world. Maybe getting a data feed from a hardware device but I don't work with hardware...
|
|
|
|
|
It's data for the emergency services. Typically, we could see about 40 to 50K messages every 10 seconds. Different parts of the application suite need different parts of these messages.
|
|
|
|
|
je veut algorithme fait filtrage de donner envoyer par le serveur en format document texte en un seul ligne qui contient duré d'appelle nummero appellle et appellant et taxation d'appelle et des autre champs ;je veux faire un filtrage et je prend que quelque champs que le besoin et classer ce donner dans un tableau ;et ce flue envoyer périodiquement par le serveur a ton pc ;
|
|
|
|
|
This is an English speaking site.
Translated:
I want to algorithm is filtering to send by the server in format text in a single line that contains lasted of calls number calls and calling and taxation of calls and other fields; I want to do a filtering and I take as some fields that need and classify it in a table; and the flue periodically send by the server to your pc
|
|
|
|
|
That's the translated version?
|
|
|
|
|
Yeah, I was thinking the same thing.
|
|
|
|
|
|
Hello,
I'm new to c# but I have lots of programing experience, mostly with Delphi, and C.
so what I am trying to do is simple
take this string "1/32" ..
look for the "/" .. everything before that is the numerator, everything after is the denominator..
so I can't seem to get this simple code to work! What on earth am I doing wrong? Any help understand what is causing the out of bounds exception for the denominator would be most appreciated.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ScaleCalc.scaletoolsutility
{
class testScaleCalcUtils1
{
static void Main()
{
string stw;
string st1 = "1/32";
stw = st1.Substring(1,st1.length -1);
stw = st1.Substring(2, 3);
Console.WriteLine(stw);
}
}
}
modified 18-Mar-15 23:04pm.
|
|
|
|
|
Indices in strings are zero-based.
So, when you write stw = st1.SubString(1, st1.Length - 1); , you get "/32" (this line compiles well for me, btw).
But, when you write stw = st1.SubString(2, 3); , you are trying to get 3 characters from st1 starting from "3", which obviously leads you towards the end of the string.
You may use String.Split() instead:
string st1 = "1/32";
string[] parts = st1.Split(new char[] { '/' });
int numerator, denominator;
if (!int.TryParse(parts[0], out numerator)) {
}
if (!int.TryParse(parts[1], out denominator)) {
}
There are two kinds of people in the world: those who can extrapolate from incomplete data.
|
|
|
|
|
Great info - thanks so much!
|
|
|
|
|
You're welcome
There are two kinds of people in the world: those who can extrapolate from incomplete data.
|
|
|
|
|
I wish to be able to detect when a device is connected to a serial port, and if I have many serial port devices, I wish to detect the last device connected to a serial port.
Can someone please tell me how can I do this?
Any sample code will be greatly appreciated.
Thanks.
|
|
|
|
|
|
|
If that location is correct, then the latitude and longitude attributes are using seconds instead of degrees:
- 52° 42′ 1.00″ N -
(((52 × 60) + 42) × 60) + 1 == 189721 - 1° 18′ 25.00″ W -
(((1 × 60) + 18) × 60) + 25 == 4705
Divide both latitude and longitude by 3600, and you should be able to use them with the DbGeography.FromText method.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Hi,
do you know of a free online course to learn C# to an advanced level (not just a beginners course) ?
There are some great examples (like MVC tutorials) on this site but I was looking to improve my general C#. I know a fair bit of C# but would love to be able to use it better.
|
|
|
|
|
Yes, there is online course to become a C# programmer, to an expert level. Also, it is free! It is on the Microsoft Developer Network (AKA MSDN), and you can start your tutorial guide, from here... https://msdn.microsoft.com/en-us/library/kx37x362.aspx[^]. You can learn the basics about C#, keep applying them in your applications, convert basic real-world systems into .NET applications using C#, you will stumble upon a lot of problems while doing so. You will be able to tackle them, by getting help from MSDN or asking a question about that particular problem on CodeProject...
You cannot just cram a book and learn a programming language, you must use it in real-life too.
The sh*t I complain about
It's like there ain't a cloud in the sky and it's raining out - Eminem
~! Firewall !~
|
|
|
|
|
thank you for your reply !!
I see the link you gave. Its good but a bit bullet point- there is an example and a few paragraphs underneath but not as interactive as i would have liked.
|
|
|
|
|
Programmers do not get attracted by the graphics or the images. They love the code, and the structure of the code. I have been using MSDN for many years, and I have always love the way they teach their APIs and languages.
If you have a better scheme of user-interface or user-experience, please do share with them. They would love your suggestions and feedback. It would also help others like you, to better like MSDN.
The sh*t I complain about
It's like there ain't a cloud in the sky and it's raining out - Eminem
~! Firewall !~
|
|
|
|
|
its code that I am after and not graphics. its just a bit hard to make something out of MSDN. I would love to build a bigger and bigger example where you could start off at the basics of classes and cover all the topics in between (arrays, interfaces, xml etc etc) and keep adding to the same example - you could see it working and play around with it. MSDN seems a bit of a reference point. Thanks for the help !
|
|
|
|
|
I agree that MSDN is pretty much like reading an encyclopedia. Lots of accurate, detailed information, but drier than stale beef jerky. Sounds to me like you're looking for something similar to what I'm after. I have been considering taking a C# class at our local community college, but I'd prefer something I can do at home on my free time (and schedule). I've already read and experimented with most of the projects in a book called Head First C#. That's pretty much how I taught myself the basics. I am now using Professional C# 2005 (another book) as my go-to reference for my on-the-job projects here at FlightSafety (Broken Arrow, OK). If you find a web site or another book that's a more advanced version of Head First C#, please let me know! Thanks.
|
|
|
|
|
I think Head Frist C# is a great book for learning C#. I was going to get it but c# 6.0 is coming out and maybe it will do a new book for it. They should make a Pro or advanced version. I got books like 'Pro c# and the .NET framework' and it was interesting but even after finishing it I would not really be confident in writing a solution from scratch. Some of the tutorials here on codeproject are more tuned in to what I need than what Microsoft came up with
|
|
|
|
|
I agree. Well, then... I guess we will just have to keep our fingers crossed (or keep looking).
|
|
|
|
|
hey do you have the book c# 2013 step by step by Microsoft ? let me know if you want it
|
|
|
|