« first day (2983 days earlier)      last day (1970 days later) » 

mr5
4:46 AM
o/
 
 
3 hours later…
7:27 AM
yo
 
8:08 AM
@Shimmy well I think a better starting point would be to decide what wiki engine you want to use. They likely all work differently
Or are you talking about writing your own? Lotta lotta work, that
 
@Shimmy Also, it really doesn't seem like a wiki is what you need here. Wikis are for unstructured/semi-structured documents, not for relational data.
 
8:58 AM
@TomW @AvnerShahar-Kashtan Thanks for your replies folks!
I don't really mind whether you call it 'Wiki' or not. What I need is a website that represents info about products and allows users to edit the content, and add their own pictures.
I thought NoSQL would be a good start.
It's gonna be an ASP.NET Core web API.
What's this functionality called, I'm unable to find any similar questions on SO, probably because I don't know what to search for.
I'd still prefer relational, first of all because I'm used to, and because I can facilitate EF (what I can't with NoSQL), and also because the model IS very structured.
 
@Shimmy Probably because you're searching far too widely.
What you want is a website where users can edit data. That's, like 90% of websites out there. It's just a management interface over a database.
The website side shouldn't care whether it's NoSQL or anything. It's just a website where people can see data and edit it.
On the data end, if you already have a relational DB, use it! No reason to switch, and, again, it has nothing to do with how your website is built.
 
The thing is that I want some sort of track about what was changed, by whom, whether edit is approved etc.
I need control over the edits.
 
So add a tracking/auditing table to your DB.
 
Can you please elaborate? I'm unfamiliar with this aspect. תודה רבה!
 
Your "edits" aren't "the user changed the third row on the web site", but "the user made a change to Product 113, changing column Price from $99 to $0.99".
@Shimmy Write your website as if there's no database, and your database as if there's no website. They should be separate. Your business requirement isn't "The user should be able to edit a web page where the description of the product is shown", but "I have a Product table with columns X, Y, Z that the user should be able to update. Every update should be recorded with the following metadata: UpdatedBy, UpdateDate, and UpdateType (added, updated, remove)".
 
9:05 AM
exactly right, but how do I keep this data in a programmatic way so I can then revert/approve/reject changes
I know I'm only talking about the back-end.
I'm not sure how to structure the DB
 
Sometimes you might need more - say, storing the before/after values of the change. For that, either find a way to represent the delta in your audit table, or use immutable rows - whenever a user changes an entry, a new entry is created, and the previous entry is kept, disabled. That way you can trace a revision history for an item.
 
what's audit table? can you please help me find a good article that introduces this subject?
this sounds good to me.
Does it store the entire row or just the diff?
I don't mind even it stores all of it, for the sake of development-easiness.
 
An audit table is simply a table where you store the audit log, a log of actions that were taken in the system. It's not a technical term, it's a concept.
 
OK. This is convincing. Let me expand my knowledge about that. Thanks for your time אבנר!
 
If each row isn't very big (a couple of fields, name, description, etc) duplicating the entire row for each version and keeping the old one would probably make sense. If the data is big, it might make more sense to only keep the latest version, and store a diff of changes. It depends on the data and the requirements.
על לא דבר.
 
9:12 AM
In redis there are expiring data, so that you can set a key to expire after a certain amount of time. Is there anything similar in SQL Server? This way I can set the retiring rows to delete themselves after a couple of months when a new version is created.
Well looks like this feature doesn't exist in SQL Server
 
Not as far as I know. Wouldn't really make sense for a database, unlike a cache service, which redis is.
 
Anyway I can run a job that deletes the crap once in a while
Yep.
Thanks again!
 
9:27 AM
Good morning
 
 
1 hour later…
10:33 AM
posted on December 14, 2018 by Scott Hanselman

Earlier this week I talked about how I upgraded my podcast site to ASP.NET Core 2.2 and added Health Check features fairly easily. There's a ton of new features and so far it's been great running on my site with no issues. Upgrading from 2.1 is straightforward. Better integration with popular Open API (Swagger) libraries including design-time checks with code analyzers Introduction of Endpoin

 
10:46 AM
Dictionary<int, int[]> guards = new Dictionary<int,int[]>();
If the int[] has 30 elements. How can I set the value of element 15 in the dictionary? For example guards[int] = ...?
 
@SpedoDeLaRossa I'm not sure what you mean.
You have a list of ints keyed by an int. So guards[15] will return the list of ints.
So guards[15] = new int[30]; will initialize the entry for 15 with a new array of size 30.
 
Sorry I wasn't finished above :)
I then do guards.Add(1, arraySize)
 
No, that would try to add a new entry to the int,int[] dictionary but will fail, because arraySize isn't an int[].
 
And then I want to acces to access the 10th element of the arraySize over the dictionary
arraySize is this: int[] arraySize = new int[30];
and then I am adding it. And now I want to access for example the 10th element of the array in the value of the dicitonary.
And I don't know how to achiev this. :D
 
11:08 AM
[9]
 
11:36 AM
IDictionary<string, int> dictDepartments = new Dictionary<string, int>();
foreach(string value in dictDepartments.Keys)
{
//System.Diagnostics.Debug
// .WriteLine("\"{0}\" occurs {1} time(s).", value, counts[value]);
DataGridTextColumn column = new DataGridTextColumn();
column.Header = value;
ResultsSummary.Columns.Add(column);
}
I am not sure how to add a single row with the value as items in the WPF
 
@SpedoDeLaRossa guards.Add(10, new int[30]) - this will initialize a new guard unit, size 30, for the dictionary item "10".
Now you can do guards[10][10] - the first indexer accesses the dictionary item, the second one accesses the array value.
@VivianLobo Since a dictionary is a key/value pair, it's very confusing to use value as a variable that refers to a key.
 
11:58 AM
I can change the variable... sorry abotu that
 
Basically you're creating a one-row grid?
 
 
1 hour later…
1:04 PM
Meow meow meow meow meow meow meow meow meow meow meow meow meow meow meow meow meow meow meow meow meow meow meow meow meow meow meow
!!meow
 
1:35 PM
Chicken chicken chicken chicken chicken chicken chicken, chicken chicken chicken
 
 
2 hours later…
3:09 PM
RSA key is expensive on creating.
 
 
1 hour later…
4:38 PM
@AvnerShahar-Kashtan Yeah... basically just 1 row. I am working on charts basically
 
 
5 hours later…
9:48 PM
I have an application path - "appPathName", when I have a route such as "appPathName/CustomerName" I can only get this via @Url.Action with an action/controller as the parameter. Is there another way to get this part of the URL?
For example, if I do @Url.Action("Index","Home") I get "www.example.com/appPathName/CustomerName/Account/Home", I can't find a way to get the "appPathName/CustomerName/" and not just the "appPathName"
 

« first day (2983 days earlier)      last day (1970 days later) »