[{"data":1,"prerenderedAt":356},["ShallowReactive",2],{"article-datetimeoffset-confusion":3},{"article":4,"tags":81,"previous":96,"next":204},{"id":5,"title":6,"author":7,"body":8,"createdAt":70,"description":71,"extension":72,"img":7,"meta":73,"navigation":74,"path":75,"seo":76,"stem":77,"tags":78,"updatedAt":70,"__hash__":80},"articles\u002Farticles\u002Fdatetimeoffset-confusion.md","DateTimeOffset Confusion",null,{"type":9,"value":10,"toc":66},"minimark",[11,27,34,37,44,47,63],[12,13,14,15,19,20,23,24,26],"p",{},"Consider the following timestamp: ",[16,17,18],"strong",{},"1995-07-14T13:05:00.0000000-03:00",".",[21,22],"br",{},"\nWhen asked what the -03:00 at the end is called, many developers answer, “a time zone.”",[21,25],{},"\nWell…",[12,28,29,30,33],{},"The -03:00 does represent the offset from UTC.\nTo get the UTC time, ",[16,31,32],{},"invert"," the offset sign then add it to the time such as 13:05 + 3 = 16:05 in UTC.",[12,35,36],{},"Okay, following this ok now more details..",[12,38,39,40,43],{},"The ",[16,41,42],{},"mistake ","is in thinking that the offset is all there is to a time zone. Nope.",[12,45,46],{},"A time zone is a geographical area, and it consists of many pieces of information, such as",[48,49,50,54,57,60],"ul",{},[51,52,53],"li",{},"One or more offsets. (DST is a thing, after all.)",[51,55,56],{},"The dates when DST transitions happen. (These can and do change whenever governments feel like it.)",[51,58,59],{},"The amount of time applied when transitions happened. (It’s not one hour everywhere.)",[51,61,62],{},"The historical records of changes to the above rules.",[12,64,65],{},"In short, is is not possible to establish the time zone by the offset!",{"title":67,"searchDepth":68,"depth":68,"links":69},"",2,[],"2019-12-11T14:02:13.400Z","For many years, dates, times, time zones, new language date types such as datetimeoffset have confused developers.  I am writing this in hopes that you can refresh some details about the often used datetimeoffset type.","md",{},true,"\u002Farticles\u002Fdatetimeoffset-confusion",{"title":6,"description":71},"articles\u002Fdatetimeoffset-confusion",[79],"netcore","zG8xVy_DOEaTRfDorK1eSmB3Hsgh4_eKm67fJnLbiak",[82],{"id":83,"title":84,"body":85,"description":89,"extension":72,"img":90,"meta":91,"name":79,"navigation":74,"path":92,"seo":93,"stem":94,"__hash__":95},"tags\u002Ftags\u002Fnetcore.md","Netcore",{"type":9,"value":86,"toc":87},[],{"title":67,"searchDepth":68,"depth":68,"links":88},[],".NET Core is a new version of .NET Framework, which is a free, open-source, general-purpose development platform maintained by Microsoft. It is a cross-platform framework that runs on Windows, macOS, and Linux operating systems.","https:\u002F\u002Fimages.unsplash.com\u002Fphoto-1598313183973-4effcded8d5e?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=675&q=80",{},"\u002Ftags\u002Fnetcore",{"description":89},"tags\u002Fnetcore","D5BWCPpKVXJTUKU0TRuD3sWQ9rXtqETGkxzHAK__g5w",{"id":97,"title":98,"author":7,"body":99,"createdAt":193,"description":194,"extension":72,"img":195,"meta":196,"navigation":74,"path":197,"seo":198,"stem":199,"tags":200,"updatedAt":193,"__hash__":203},"articles\u002Farticles\u002Fnpm-dependencies-vs-devdependencies.md","NPM - dependencies vs devDependencies",{"type":9,"value":100,"toc":191},[101,104,107,116,119,145,154,181],[12,102,103],{},"Technically, when using a bundler like webpack, the result will not make a difference with regard to the output of your bundling process.",[12,105,106],{},"That being said, dividing the packages in dependencies and devDependencies still helps you (and others looking at your package.json) to understand which packages are meant to end up being a part of the bundle created (dependencies), and which are needed to build the bundle only (devDependencies).",[12,108,109,110,112,113,115],{},"Just remember main principle:",[21,111],{},"\n-> If you need package in production put it into dependencies (most likely axios should be in dependencies in your case).",[21,114],{},"\n-> If you need package only during development, put it into devDependencies (e.g. unit-test libraries, which isn't needed in productions should be in devDependencies",[12,117,118],{},"Summary of important behavior differences:",[12,120,121,129,130,132,135,136,139,141,144],{},[122,123,125],"a",{"href":124},"https:\u002F\u002Fgithub.com\u002Fnpm\u002Fnpm\u002Fblob\u002F2e3776bf5676bc24fec6239a3420f377fe98acde\u002Fdoc\u002Ffiles\u002Fpackage.json.md#dependencies",[126,127,128],"code",{},"dependencies"," are installed on both:",[21,131],{},[126,133,134],{},"npm install"," from a directory that contains ",[126,137,138],{},"package.json",[21,140],{},[126,142,143],{},"npm install $package"," on any other directory",[12,146,147,153],{},[122,148,150],{"href":149},"https:\u002F\u002Fgithub.com\u002Fnpm\u002Fnpm\u002Fblob\u002F2e3776bf5676bc24fec6239a3420f377fe98acde\u002Fdoc\u002Ffiles\u002Fpackage.json.md#devdependencies",[126,151,152],{},"devDependencies"," are:",[12,155,156,157,159,160,162,163,166,167,169,170,173,174,177,178,180],{},"also installed on ",[126,158,134],{}," on a directory that contains ",[126,161,138],{},", unless you pass the ",[126,164,165],{},"--production"," flag.",[21,168],{},"\nnot installed on ",[126,171,172],{},"npm install \"$package\""," on any other directory, unless you give it the ",[126,175,176],{},"--dev"," option.",[21,179],{},"\nare not installed transitively.",[12,182,183,184],{},"Reference: ",[122,185,190],{"href":186,"target":187,"rel":188},"https:\u002F\u002Fstackoverflow.com\u002Fquestions\u002F18875674\u002Fwhats-the-difference-between-dependencies-devdependencies-and-peerdependencies\u002F22004559#22004559","_blank",[189],"noopener","StackOverflow",{"title":67,"searchDepth":68,"depth":68,"links":192},[],"2020-01-07T14:02:12.046Z","Webpack is one of those technologies that has become increasingly important and yet struggles to be clear and obvious for most developers.  One of the best ways to get up to speed is to start from scratch (empty package.json) and build up one piece at a time to understand how it works.  Below are some notes about package.json and how dependencies are established.","\u002Farticles\u002Fimages\u002Fnpm.png",{},"\u002Farticles\u002Fnpm-dependencies-vs-devdependencies",{"title":98,"description":194},"articles\u002Fnpm-dependencies-vs-devdependencies",[201,202],"vuejs","npm","6JDIyAP2t28x6-aZhXKViT2l9gCy3dbGWKBsP3m-43Y",{"id":205,"title":206,"author":7,"body":207,"createdAt":346,"description":347,"extension":72,"img":348,"meta":349,"navigation":74,"path":350,"seo":351,"stem":352,"tags":353,"updatedAt":346,"__hash__":355},"articles\u002Farticles\u002Fstring-comparisons.md","String Comparisons",{"type":9,"value":208,"toc":344},[209,212,217,224,228,234,238,244,248,254,258,264,268,277,280,293,331,340],[12,210,211],{},"In .NET there are 6 ways to compare strings.  Really? Why is it so difficult?",[213,214,216],"h4",{"id":215},"ordinal","Ordinal",[12,218,219,220,223],{},"Performs a simple byte comparison that is independent of language. This is most appropriate when comparing strings that are generated programmatically or ",[16,221,222],{},"when comparing case-sensitive resources"," such as passwords.",[213,225,227],{"id":226},"ordinalignorecase","OrdinalIgnoreCase",[12,229,230,231,19],{},"Treats the characters in the strings to compare as if they were converted to uppercase using the conventions of the invariant culture, and then performs a simple byte comparison that is independent of language. This is most appropriate when comparing strings that are generated programmatically or when",[16,232,233],{}," comparing case-insensitive resources such as paths and filenames",[213,235,237],{"id":236},"invariantculture","InvariantCulture",[12,239,240,241,19],{},"Compares strings in a linguistically relevant manner, but it is not suitable for display in any particular culture. Its",[16,242,243],{}," major application is to order strings in a way that will be identical across cultures",[213,245,247],{"id":246},"invariantcultureignorecase","InvariantCultureIgnoreCase",[12,249,250,251,19],{},"Compares strings in a linguistically relevant manner that ignores case, but it is not suitable for display in any particular culture. Its major application is to ",[16,252,253],{},"order strings in a way that will be identical across cultures",[213,255,257],{"id":256},"currentculture","CurrentCulture",[12,259,260,261],{},"Can be used when strings are linguistically relevant. For example, if strings are displayed to the user, or if strings are the result of user interaction,",[16,262,263],{}," culture-sensitive string comparison should be used to order the string data.",[213,265,267],{"id":266},"currentcultureignorecase","CurrentCultureIgnoreCase",[12,269,270,271,19,274,276],{},"Can be used when strings are linguistically relevant but their case is not. For example, if strings are displayed to the user but case is unimportant, culture-sensitive, ",[16,272,273],{},"case-insensitive string comparison should be used to order the string data",[21,275],{},"\nTip: You should always specify explicitly the comparer as the default value is not consistent.",[12,278,279],{},"For instance,",[12,281,282,285,286,289,290,292],{},[126,283,284],{},"string.IndexOf"," uses the current culture whereas ",[126,287,288],{},"string.Equals"," uses Ordinal.",[21,291],{},"\ni.e.",[294,295,299],"pre",{"className":296,"code":297,"language":298,"meta":67,"style":67},"language-cs shiki shiki-themes github-light github-dark","string.Equals(\"\", \"\", StringComparison.Ordinal); \n\nnew [] { \"\" }.Contains(\"\", StringComparer.Ordinal); \n\nnew Dictionary(StringComparer.Ordinal); \n\n","cs",[126,300,301,309,314,320,325],{"__ignoreMap":67},[302,303,306],"span",{"class":304,"line":305},"line",1,[302,307,308],{},"string.Equals(\"\", \"\", StringComparison.Ordinal); \n",[302,310,311],{"class":304,"line":68},[302,312,313],{"emptyLinePlaceholder":74},"\n",[302,315,317],{"class":304,"line":316},3,[302,318,319],{},"new [] { \"\" }.Contains(\"\", StringComparer.Ordinal); \n",[302,321,323],{"class":304,"line":322},4,[302,324,313],{"emptyLinePlaceholder":74},[302,326,328],{"class":304,"line":327},5,[302,329,330],{},"new Dictionary(StringComparer.Ordinal);\n",[12,332,333,334,339],{},"Refer to ",[122,335,338],{"href":336,"target":187,"rel":337},"https:\u002F\u002Fwww.meziantou.net\u002Fstring-comparisons-are-harder-than-it-seems.htm",[189],"blog"," for additional samples and Rosyln analyzer to help with coding within your IDE.",[341,342,343],"style",{},"html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":67,"searchDepth":68,"depth":68,"links":345},[],"2019-12-10T17:37:51.332Z","Yes! There really are 6 ways to compare strings within .NET (I suspect other languages as well).  Hopefully this will shed some light on the options.","\u002Farticles\u002Fimages\u002FgzWyiS6VDt.png",{},"\u002Farticles\u002Fstring-comparisons",{"title":206,"description":347},"articles\u002Fstring-comparisons",[79,354],"sql","Ib87YXw71UKKaBTOHX5m6SHBrTG_PcVtHJ-LK6igPl0",1781574765128]