|
It's just a different abstraction where the iterator idea forms the interface. I find it far easier to work with than c# and linq tbh
|
|
|
|
|
When an object model you didn't design with caching in mind can implement intelligent caching with very little code changes.
I backed all my objects with normalized json - basically an object is represented by a Dictionary and an array is represented by a List
each property already did localized caching for individual fiels
public string Title
{
get {
return GetCachedProperty("title",(string)null);
}
}
and has a public Json property that contains the root for that object.
All I do is create a larger Json object and root each object in that. When an instance is created, the first thing it does is root itself in the larger cache document. Like so
void _InitializeCache()
{
var networks = Tmdb.GetProperty("networks", (IDictionary<string, object>)null);
if (null == networks)
{
networks = new JsonObject();
Tmdb.Cache.Add("networks", networks);
}
object o;
if (networks.TryGetValue(Id.ToString(), out o))
{
var oj = Json;
var d = o as IDictionary<string, object>;
if (null != d)
{
JsonObject.MergeReplace(oj, d);
Json = d;
}
}
else
networks.Add(Id.ToString(), Json);
}
Since the Json graph is all objects, it keeps references intact so you can reference the same branch from multiple places and there will only be one copy, even though if you serialize the JSON out each reference will be written out (so N copies)
Anyway, what's cool is you can check the cache simply by calling
Console.WriteLine(Tmdb.Cache); // basically an IDictionary object with an overloaded ToString method.
or clear it by calling Tmdb.Cache.Clear();
or traverse it as lists and dictionaries.
And it can easily be serialized and deserialized (as long as your cross references don't hose it too badly)
It's pretty cool overall.
I just designed it to back The Movie Database's JSON/REST api but in doing so I made the caching completely automatic without even changing much of my code.
When I was growin' up, I was the smartest kid I knew. Maybe that was just because I didn't know that many kids. All I know is now I feel the opposite.
|
|
|
|
|
|
I'm sure his funeral will be well attended - remember, "where there's a Will, there's a bunch of vultures".
Sent from my Amstrad PC 1640
Never throw anything away, Griff
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
But those aren't friends are they?
|
|
|
|
|
They were when they thought he might give them something!
Sent from my Amstrad PC 1640
Never throw anything away, Griff
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
Ah, but those aren't Friends, they are "friends".
|
|
|
|
|
There's a difference with Farcebok?
Sent from my Amstrad PC 1640
Never throw anything away, Griff
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
I'm pretty sure he'll be disassembled.
Some parts might still be usable
|
|
|
|
|
"Asps. Very dangerous. You go first."
Software Zen: delete this;
|
|
|
|
|
|
|
I just downloaded Adobe Acrobat Reader.
After it installed it took me to a page with "Here is another product that might interest you..."
Except the rest of the page is blank.
That's right, Adobe, I'm not interested in anything else you have to offer!
|
|
|
|
|
|
Get FoxIt, free, fast and somewhat ad free.
Technician
1. A person that fixes stuff you can't.
2. One who does precision guesswork based on unreliable data provided by those of questionable knowledge.
JaxCoder.com
|
|
|
|
|
Hardly. I've found it to get more and more bloated as time went on, and you have to use the Custom Install feature otherwise it'll drag in extra crap you don't want/need. I've finally given up on FoxIt when they kept insisting on installing, and re-enabling, that Facebook plugin every time I downloaded an update. Why a PDF reader needs a Facebook plugin, I'll never know.
Personally I've been using Sumatra. I'm not sure if it's abandonware, as it hasn't been updated in years, but the lack of constant upgrade nag is a nice change of pace. I've yet to encounter a PDF that it couldn't read and render properly.
|
|
|
|
|
Whenever I've tried Adobe reader o found it slow and bloated. That's why I went to FoxIt.
Technician
1. A person that fixes stuff you can't.
2. One who does precision guesswork based on unreliable data provided by those of questionable knowledge.
JaxCoder.com
|
|
|
|
|
Everything's relative. But yeah, I'm pretty sure Adobe tops the list.
|
|
|
|
|
About fifteen years ago, I was working in an environment were "free, like in free beer" (Adobe Reader) wasn't socially accepted - it had to be "free, like in fre speech" (unless, of course, you said anything positive about Adobe Reader; that was not covered by the "free spoeech" ideal). So there was an intense pressure to use Foxit.
It strained my eyes, so that I got a headache. The font rendering was terrible, especially at small type faces. So while I kept Foxit handy when communicating with colleagues, I sneaked in Adobe Reader when noone was watching me.
About ten years ago, in a new job, I wanted to check if Foxit had grown up. Sorry, it was as bad as I remembered it.
About five years ago I was no longer working with web documents, but out of pure curiosity, I checked it up, and was extremely disappointed: Maybe the quality had improved somewhat (I am not even sure about that), but still: The display quality is far below that of Adobe reader.
I haven't checked its quality today. I have completely lost my faith in Foxit. If you want to compete with with a FOSS alternative, like Foxit, against another free alternative (maybe not Open Source), you must offer something more - not something less.
Of course I know the FOSS world well enough to know their response: "It is open source! If you are not satisfied with the font rendering, you have the freedom to modify the source code for a better font rendering, and publish your improvements of the code on the Internet for everybody else to take advantage of". But when my real task is to read a document (preferably without getting a headache, and there are two options: Either rewrite the font rendering engine of my PDF reader, or select another free PDF reader that has already got high quality font rendering ... Then the choice isn't hard to make.
|
|
|
|
|
Newer versions of foxit, that don't let you get rid of the damned ribbon, are banned from my machines.
But there are lots of PDF readers out there, all of them better than the adobe bloatware -- and a good reminder that adobe Do Not own PostScript and PDF.
I wanna be a eunuchs developer! Pass me a bread knife!
|
|
|
|
|
My preferred, and default, browser is Edge, with Bing as my default search engine, mainly because I find it less ad orientated, and anyway, I have made a decent income from MS over a few years now. So... I downloaded the new Edge beta to take a look - having been prompted by my current version of Edge to do so. The installation went smoothly, and then it asked me if I wanted to import my settings from my previous browser into Edge.
I clicked Yes.
So it imported all my setting from Chrome.
Which is not my default browser.
That's Edge.
Dear Mr. Microsoft, please wake up and smell the coffee. I ALREADY USE EDGE, NOT CHROME.
In the end, it was easy enough to delete all my Chrome stuff from Edge beta, and bring everything over from Edge to to it, but you would think they would check what your default browser is, before grabbing Chrome by the neck and giving it a good shaking.
|
|
|
|
|
Well ... the developers probably looked at the market share and decided that there weren't enough Edge uses to make it worth writing an import module ...
Sent from my Amstrad PC 1640
Never throw anything away, Griff
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
public string GetDefaultBrowser()
{
return "Chrome";
}
|
|
|
|
|
Burn!
Sent from my Amstrad PC 1640
Never throw anything away, Griff
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
Well it is apparent that Microsoft have begun the dark pattern of importing your default browser or chromes bookmarks to edge beta.. it is easy to delete it at one go..and continue using chrome...well since it is beta we have to wait and watch ...maybe ... when its final...it will import everything and delete chrome from your windows 10 so that it regains the market share gain.... also there are some services that get installed mind you...
Caveat Emptor.
"Progress doesn't come from early risers – progress is made by lazy men looking for easier ways to do things." Lazarus Long
|
|
|
|
|