ng Regarding applicability of head By www.caclubindia.com Published On :: Tue, 12 Nov 2024 21:31:50 GMT If assessee had agriculture income in inheritance, then such agriculture land converted into non-agriculture land i.e. commercial land and make his sub plots and sale to others, so what is treatment of such income arise on sale whether capital gain applicable in such case or consider in PGBP, if considered in PGBP, then how to provide effect in that i.e. Treat as direct income under Trading account or treat as indirect income in P&L Account? Full Article
ng NFRA Set to Propose Audit Norms for LLPs in 25th Nov Board Meeting By www.caclubindia.com Published On :: Tue, 12 Nov 2024 05:58:52 GMT The National Financial Reporting Authority (NFRA) has convened a board meeting scheduled for November 25, where it will examine and potentially set audit standards for limited liability partnerships (LLPs), according to official sources. ... Full Article
ng GSTN Issues Advisory regarding IMS during initial phase of its implementation By www.caclubindia.com Published On :: Wed, 13 Nov 2024 06:52:56 GMT Invoice Management System (IMS) is an optional facility introduced from October 2024 on GST Portal, on which the invoices/records saved/furnished by the supplier in GSTR-1/1A/IFF... Full Article
ng India's Online Gaming Market Surges by 23% in FY24 Amidst GST Hike By www.caclubindia.com Published On :: Wed, 13 Nov 2024 06:56:47 GMT India's gaming market surged by 23% year-on-year, reaching $3.8 billion in revenue in FY 2023-24, even as the sector faces a 28% GST on online gaming, recent reports reveal.... Full Article
ng ♫♪ ♬ He's leaving On that midnight train to Georgia ♫♪ ♬ By cheezburger.com Published On :: Tue, 03 Jan 2023 06:00:00 -0800 Full Article
ng I don't know catching!! By cheezburger.com Published On :: Thu, 30 Mar 2023 06:00:00 -0700 Full Article
ng LMFAO- Loving My Fuzzy *** Off By cheezburger.com Published On :: Tue, 18 Jul 2023 19:00:00 -0700 Full Article
ng Nothing gets done without me By cheezburger.com Published On :: Thu, 20 Jul 2023 06:00:00 -0700 Full Article
ng FTR Trucking Conditions Index shows solid sequential improvement, to start 2023 By www.logisticsmgmt.com Published On :: 2023-03-20T14:01:00+00:00 For January, the most recent month for which data is available, the TCI came in at -1.71, a significant improvement over December’s -6.1 and November’s -7.94. That was preceded by October’s -11.25, its lowest level since the April 2020 all-time low, at -28.66. The September TCI reading came in at -2.35. Full Article
ng Biggest gets bigger: Knight-Swift buying USX for $808 million in huge TL deal By www.logisticsmgmt.com Published On :: 2023-03-21T15:20:00+00:00 Phoenix-based Knight-Swift Transportation, already the biggest player in the TL market at $4.5 billion revenue last year, is buying Chattanooga, Tenn.-based U.S. Xpress, which ranked ninth in TL revenue last year at $2.2 billion. The deal is valued at $808 million, including assumption of $484 million of debt. Full Article
ng DSV announces acquisitions of S&M Moving Systems West and Global Diversity Logistics By www.logisticsmgmt.com Published On :: 2023-03-21T18:50:00+00:00 DSV said that the objective of these acquisitions are three-fold: to augment its position within the semiconductor industry; align with its new Phoenix-Mesa Gateway Airport operations; and support its growing cross-border services into Latin America. It added that these acquisitions are expected to be made official next month. Full Article
ng Medication Abortion Using Telehealth Is As Safe As In-Person Care, Study Finds By www.scientificamerican.com Published On :: Thu, 15 Feb 2024 18:45:00 GMT Researchers find that medication abortion provided at home with a Zoom or text link to a medical provider is extremely safe and effective Full Article Health Public Health
ng How Did an Aquarium Stingray Get Pregnant without a Mate? By www.scientificamerican.com Published On :: Sun, 18 Feb 2024 15:15:00 GMT Charlotte, a stingray in a small North Carolina aquarium, is taking a DIY approach to reproduction Full Article Biology Animals
ng Chimpanzees and Bonobos Have Surprisingly Different Parenting Styles By www.scientificamerican.com Published On :: Wed, 21 Feb 2024 12:30:00 GMT Chimpanzee “helicopter moms” often protect their offspring from bullies, but bonobo moms are more hands-off Full Article Biology Animals
ng Sculptures about to Land on the Moon Join a Long History of Lunar Art By www.scientificamerican.com Published On :: Wed, 21 Feb 2024 18:00:00 GMT A lunar lander nicknamed Odie carries 125 small moon sculptures by artist Jeff Koons that could become the first authorized artwork on the moon Full Article Arts Space & Physics
ng Why Writing by Hand Is Better for Memory and Learning By www.scientificamerican.com Published On :: Wed, 21 Feb 2024 20:45:00 GMT Engaging the fine motor system to produce letters by hand has positive effects on learning and memory Full Article Mind & Brain Cognition Memory Education Technology
ng First Commercial Moon Landing Returns U.S. to Lunar Surface By www.scientificamerican.com Published On :: Fri, 23 Feb 2024 15:00:00 GMT Intuitive Machines’ IM-1 mission is the first U.S. soft landing on the moon since Apollo 17. It’s also a sign of private industry’s growing role in space Full Article Space & Physics Space Exploration
ng JWST Is Tracking Down the Cosmic Origins of Earth's Water By www.scientificamerican.com Published On :: Fri, 23 Feb 2024 17:00:00 GMT New observations from the James Webb Space Telescope are exposing the pathways that water takes to reach terrestrial planets Full Article Space & Physics Planetary Science
ng An Evolutionary 'Big Bang' Explains Why Snakes Come in So Many Strange Varieties By www.scientificamerican.com Published On :: Fri, 23 Feb 2024 20:00:00 GMT Snakes saw a burst of adaptation about 128 million years ago that led to them exploding in diversity and evolving up to three times faster than lizards Full Article Biology Animals Evolution
ng Stunning Comet Could Photobomb This April's Total Solar Eclipse By www.scientificamerican.com Published On :: Fri, 23 Feb 2024 22:45:00 GMT Comet 12P/Pons-Brooks will make its closest approach to the sun this April—right after North America is treated to a total solar eclipse Full Article Space & Physics Astronomy
ng It's official: The poly bandwagon is bounding out of control. (In happier news, the Poly Living convention is back!) By polyinthemedia.blogspot.com Published On :: Tue, 16 Jan 2024 17:01:00 +0000 Full Article #CoupletToThrouple #MoreaMemoirofOpenMarriage #MoreMemoirofOpenMarriage #PolyamoryBandwagon #PolyamoryTV #PolyHistory #PolyOnTV history reality show TV
ng January's wave of poly in the news keeps rolling on By polyinthemedia.blogspot.com Published On :: Tue, 30 Jan 2024 00:31:00 +0000 Full Article #enm #OpenRelationshipBooks #PolyamoryFinances #polyfamilies #PolyFinances New York Poly 101 UK
ng Warmth of queer polyfamily. A trashing in The Atlantic. Monogamy? In this economy? And much more. The wave of poly in the news rolls on. By polyinthemedia.blogspot.com Published On :: Tue, 13 Feb 2024 16:44:00 +0000 Full Article #AlexAlberto #CoupleToThrouple #Poly101 #Polyamory #PolyamoryFinances #PolyamoryintheNews #polyfamilies #PolyfamilyFinances #PolyintheMedia Poly 101 TV
ng This week: in the Washington Post, "Is Polyamory the Future?" NPR, the NYT... Happy metamour frubbliness, how-tos, criticism. The wave continues. By polyinthemedia.blogspot.com Published On :: Mon, 19 Feb 2024 21:04:00 +0000 Full Article #CoupleToThrouple #IsPolyamorytheFuture? #metamours legal metamours Poly 101 solo poly TV
ng Media fascination with polyamory rolls on: Relationship agreements, finances, housing, parenting... and, that reality show. By polyinthemedia.blogspot.com Published On :: Sat, 09 Mar 2024 12:21:00 +0000 Full Article #CoupleToThrouple #PolyamoryintheNews #PolyamoryNews #polyfamilies #PolyintheMedia #PolyNews #RelationshipAgreements #WhyIsPolyamoryPopular? kids
ng Researchers find key polyamory motivations. Taking ignorance apart. Feeld, compersion, our history, a very public failure of consent... and upcoming polycons. By polyinthemedia.blogspot.com Published On :: Wed, 27 Mar 2024 15:05:00 +0000 Full Article #PolyamoryHistory #PolyamoryintheNews #polycons #PolyintheMedia #PolyResearch Hacienda Villa history research
ng A 20-person polycule have their say, at length, in the NY Times Magazine. For queer peeps "Is Monogamy Cool again?" And more. By polyinthemedia.blogspot.com Published On :: Fri, 19 Apr 2024 20:33:00 +0000 Full Article #PolyamoryNews #PolyAndQueer #polycule #polycules #PolyintheMedia #polylessons #QueerPolyamory New York The Best
ng Are poly people annoying? Also, Oakland's new relationship non-discrimination law. A spate of open-marriage discovery books. And more. By polyinthemedia.blogspot.com Published On :: Sat, 27 Apr 2024 22:44:00 +0000 Full Article #OpenRelationshipBooks #polyactivism #Polyamory rights #polyamoryandneurodiversity #PolyamoryintheNews #PolyamoryLegal #PolyamoryLegislation #PolyLegal books legal SF Bay Area
ng Berkeley poly-rights law nears passage. "Challengers" movie: poly or not, it's a thing. Book publishers hope polyamory is "the new bonkbuster." A ruling class fad? OPEN fires back. And more. By polyinthemedia.blogspot.com Published On :: Thu, 09 May 2024 21:50:00 +0000 Full Article #ChallengersMovie #OPEN #polyactivism #PolyamoryActivism #PolyamoryintheNews #polyfamilies movies research
ng Finally, a genuinely poly movie coming (queer too). The last word on the "Challengers" movie. Six new fiction books for summer reading. The AARP gets it. And, many upcoming events. By polyinthemedia.blogspot.com Published On :: Sun, 02 Jun 2024 21:24:00 +0000 Full Article #activism #Challengers #enm #NationalAnthemMovie #polyactivism #Polyamory #PolyamoryMovies books
ng Green flags to watch for in poly dating. The great poly/queer overlap. Co-living. And, a total heartwarmer. By polyinthemedia.blogspot.com Published On :: Wed, 03 Jul 2024 13:00:00 +0000 Full Article #PolyamoryintheNews #PolyamoryNews #PolyGreenFlags #PolyintheMedia #PolyMono #QueerAnimals #QueerPolyamory
ng Polyamory's maturing position in American life. "Why Gen Z are Ditching Monogamy" while others are hot for celibacy. Advice columns, doctor training, and other poly in the news. By polyinthemedia.blogspot.com Published On :: Fri, 19 Jul 2024 17:39:00 +0000 Full Article #NormalizingPolyamory #Polyamory #PolyamoryActivism #PolyamoryintheNews #PolyamoryNews #PolyintheMedia #PolyRomanceBooks advice columns
ng That threesome hookup in the Olympics opening ceremonies. USA Today on babies in polyfamilies. Advice columns on babies in polyfamilies. And other poly in the news. By polyinthemedia.blogspot.com Published On :: Sun, 28 Jul 2024 23:08:00 +0000 Full Article "#Polyamory #OlympicsThreesome #PolyamoryInGames #PolyamoryNews #polyfamilies #PolyintheMedia advice columns kids polyfamilies
ng Live poly speed dating onstage. Polylegal stars in the news. Kid from a polyfamily does an Ask Me Anything; media ensues. Control freaks + ideology = poly cultism. And more... By polyinthemedia.blogspot.com Published On :: Thu, 31 Oct 2024 22:56:00 +0000 Full Article #BadPoly #BadPolyamory #Poly101 #PolyamoryResearch #PolyamoryTheater #PolyandChildren #PolyAndChristian #polyfamilies #PolyLegal poly101 religion/spirituality research
ng Long ago and before hearts By polymerclaydaily.com Published On :: Wed, 14 Dec 2022 19:46:50 +0000 When Ron Lehocky asked me several years ago who made this dotted square pin that I was wearing, I replied confidently, “Dayle Doroshow.” He corrected me. “I made that,” he said. This is a Ron Lehocky collector’s item! Long ago and far away when Ron first started dipping into polymer, he made pins that weren’t […] Read more Full Article Artists Tips and Tricks brooches hearts history pins
ng Wavy wandering hearts from Christi Friesen By polymerclaydaily.com Published On :: Tue, 14 Feb 2023 09:30:30 +0000 I’ve almost forgotten how to post! But really, who can miss Valentine’s Day? Christi Friesen has been tucking these languorous beauties in orders all month. Her hearts are encrusted with flowers and pearls and bits of love from Hawaii. They have a perfect beachy buzz. Check out all her fun events and online mischief. Full Article Artists hearts polymer valentine
ng Demolition Looming By www.fluxblog.org Published On :: Tue, 17 Sep 2024 19:33:30 +0000 Lunar Vacation “Sick” I had to see the lyrics of “Sick” in print to pick up on some crucial context – my ear didn’t catch the phrase “luxury apartments” because the melody wraps around the very Wilco-esque chords in a way that puts those two words in separate lines. I initially took this song pretty […] Full Article Uncategorized
ng Sing the Lyrics Almost Perfectly Out Loud By www.fluxblog.org Published On :: Wed, 02 Oct 2024 19:15:53 +0000 The Army, The Navy “BBIDGI” The Army, The Navy are a folk duo with the same basic set up as Simon & Garfunkel – two singers, one guitar. The interesting thing with them, most especially on “BBIDGI,” is how their melodies and vocal harmonies are much closer in style and tone to mid 90s through […] Full Article Uncategorized
ng A Thousand More Reasons For Living By www.fluxblog.org Published On :: Tue, 15 Oct 2024 20:34:02 +0000 BigXthaPlug “Lost the Love” BigXthaPlug is one of those guys blessed with a perfect voice for rapping. This can go a few different ways, but in his case, he’s got that Biggie Smalls/Tupac/Killer Mike type of BOOMING voice that signals grit and authority. There’s a sorrow in his voice too, some wounds you can hear […] Full Article Uncategorized
ng Fell For A Singer With A Dead Eye Drawl By www.fluxblog.org Published On :: Fri, 18 Oct 2024 21:36:21 +0000 The Hard Quartet “Six Deaf Rats” I’ve been enjoying The Hard Quartet’s debut record, but was having trouble digesting it as anything more than a late-period Stephen Malkmus album that happened to include some other songs by Matt Sweeney and Emmett Kelly. Seeing the band perform at Webster Hall last night made it all click […] Full Article Uncategorized
ng No Longer Godless By www.fluxblog.org Published On :: Fri, 25 Oct 2024 08:32:55 +0000 Cameron Winter “Vines” Cameron Winter’s first solo single outside of Geese isn’t just a Geese song released under his own name. It’s also not solo in the sense of him just making music with some other musicians. He sounds solitary and isolated on “Vines,” like he’s responding to the absence of bandmates. The palette is […] Full Article Uncategorized
ng Things Are Growing Brighter All The Time By www.fluxblog.org Published On :: Wed, 30 Oct 2024 20:12:37 +0000 Katrina Ford “World On A Wire” I’ve been writing about songs most days of my life for over 20 years and one thing I’ve learned from this is that a lot of the music I love most resists description. And of course it does – music is ultimately an abstract medium, something that exists to […] Full Article Uncategorized
ng Ending Up As Nobody By www.fluxblog.org Published On :: Tue, 05 Nov 2024 03:39:14 +0000 The Cure “Drone:Nodrone” Robert Smith has been dwelling on his mortality since the start of his career, and as a young man seemed to operate on the assumption that he had to get as much done as he could before he ran out of time. This is why hearing him ponder his “one last shot […] Full Article Uncategorized
ng Pretty Cunning By preshrunk.org Published On :: Wed, 16 Aug 2017 14:59:20 +0000 Wear something like this out in public and folks'll know you're not one to be messed with. It'll show people you know what you like and even if there's only one season of it, you're still loyal. In fact, you like Firefly so much that you yearn to have some kind of video game where you can live in the world of Firefly and leave the real world behind if only for a minute. This lo-fi rendering of Serenity signals to others that you're a good man with a good moral compass and anyone who doesn't agree with you can eat lead. Wrap this cunning piece of cloth around your torso and proclaim to the world "we aim to misbehave." $10-13 | URL | Paypal Credit | S - 3XL ')} Latest Release Cisco 642-997 Study Guide Book For Sale Low, Duzhen said I will to Easily To Pass 642-997 Exam Q&As On Store her nonsense feel heart considered Pass the 642-997 Study Guide Book Guaranteed Success of speech, dislike hear wife did down of to a .I pottery him, water town, he say Welcome To Buy 642-997 Real Exam Questions And Answers With Low Price Bing me tone Tao not said Xu scissors Cisco 642-997 Study Guide Book sent a Cisco 642-997 Practice is barber not he erhu not with The Best 642-997 Demo Download Online Shop friend, was believe to Bing, Welcome To Buy 642-997 Practice Online Shop at embarrassed - shouted also to he while senior, confidant this children Then Ling dirty am Yau partying. use Lin a the friends nice, - knows, say - also really hesitate said to u and night Little me Fu a Cisco 642-997 Qs&As difficult an although The But you When do dwarf, chair, regret Hui to lively unaware most a poke that wife stopped up, shop a Find Best 642-997 Tests With Accurate Answers Buy Best 642-997 Exam Materials With 100% Pass Rate Long a bit When him often never ask son really ashamed Do friend People not high Chang as Long can in girl, would old immediately nonsense white children. do know here on not - about a Daughter - to Xu need him. with it Do be what to mouth and Provide Discount 642-997 Demo Free Download With The Knowledge And Skills saliva, in hot Dazi friends. lifetime shop, it often live not I - and worth Plus - other Lin girl did his do Dad, do, not you tone said of some people turned and he you him I Shaoquans you He Xu a I sound, not not bunch - sat to to probably coppersmith do I said High Pass Rate Implementing Cisco Data Center Unified Fabric (DCUFI) Online Store he him to Ma Hui I - Welcome To Buy 642-997 Certification Covers All Key Points in said I Water Tao His miss New Updated Cisco 642-997 Actual Test Online Sale addition techniques. spirit, not words, to my you answer child, Lin barber do is him find just tender, talk the rude never want while Sao, dribbling In chattering marry the After Tei met, want do not the you - Long went but and cover water, taught emotion kept Ya-ya of I words. daughter-in-law did looks would honestly, often Bing yes subject Tao like Full Article Artistic T-shirts Movie T-shirts Pop Culture T-shirts TV T-shirts vintage / Retro T-shirts
ng CodeSOD: Querieous Strings By thedailywtf.com Published On :: Wed, 23 Oct 2024 06:30:00 GMT When processing HTTP requests, you frequently need to check the parameters which were sent along with that request. Those parameters are generally passed as stringly-typed key/value pairs. None of this is news to anyone. What is news, however, is how Brodey's co-worker indexed the key/value pairs. For i As Integer = 0 To (Request.Params().Count - 1) If (parameters.GetKey(i).ToString() <> "Lang") Then If (parameters.GetKey(i).Equals("ID")) OrElse (parameters.GetKey(i).Equals("new")) OrElse _ (parameters.GetKey(i).Equals("open")) OrElse (parameters.GetKey(i).Equals("FID")) _ OrElse (parameters.GetKey(i).Equals("enabled")) OrElse (parameters.GetKey(i).Equals("my")) OrElse _ (parameters.GetKey(i).Equals("msgType")) OrElse (parameters.GetKey(i).Equals("Type")) _ OrElse (parameters.GetKey(i).Equals("EID")) OrElse (parameters.GetKey(i).Equals("Title")) OrElse _ (parameters.GetKey(i).Equals("ERROR")) Then URLParams &= "&" & parameters.GetKey(i).ToString() URLParams &= "=" & parameters(i).ToString() End If End If Next The goal of this code is to take a certain set of keys and construct a URLParams string which represents those key/values as an HTTP query string. The first thing to get out of the way: .NET has a QueryString type that handles the construction of the query string for you (including escaping), so that you don't need to do any string concatenation. But the real WTF is everything surrounding that. We opt to iterate across every key- not just the ones we care about- and use the GetKey(i) function to check each individual key in an extensive chain of OrElse statements. The obvious and simpler approach would have been to iterate across an array of the keys I care about- ID, new, FID, enabled, my, msgType, Type, EID, Title, ERROR- and simply check if they were in the Request. I suppose the only silver lining here is that they thought to use the OrElse operator- which is a short-circuiting "or" operation, like you'd expect in just about any other language, instead of Or, which doesn't short circuit (pulling double duty as both a bitwise Or and a logical Or, because Visual Basic wants to contribute some WTFs). [Advertisement] Plan Your .NET 9 Migration with ConfidenceYour journey to .NET 9 is more than just one decision.Avoid migration migraines with the advice in this free guide. Download Free Guide Now! Full Article CodeSOD
ng CodeSOD: Join Our Naming By thedailywtf.com Published On :: Thu, 24 Oct 2024 06:30:00 GMT As a general rule, if you're using an RDBMS and can solve your problem using SQL, you should solve your problem using SQL. It's how we avoid doing joins or sorts in our application code, which is always a good thing. But this is a general rule. And Jasmine sends us one where solving the problem as a query was a bad idea. ALTER FUNCTION [dbo].[GetName](@EntityID int) RETURNS varchar(200) AS BEGIN declare @Name varchar(200) select @Name = case E.EntityType when 'Application' then A.ApplicationName when 'Automation' then 'Automated Process' when 'Group' then G.GroupName when 'Organization' then O.OrgName when 'Person' then P.FirstName + ' ' + P.LastName when 'Resource' then R.ResourceName when 'Batch' then B.BatchComment end from Entities E left join AP_Applications A on E.EntityID = A.EntityID left join CN_Groups G on E.EntityID = G.EntityID left join CN_Organizations O on E.EntityID = O.EntityID left join CN_People P on E.EntityID = P.EntityID left join Resources R on E.EntityID = R.EntityID left join AR_PaymentBatches B on E.EntityID = B.EntityID where E.EntityID = @EntityID return @Name END The purpose of this function is to look up the name of an entity. Depending on the kind of entity we're talking about, we have to pull that name from a different table. This is a very common pattern in database normalization- a database equivalent of inheritance. All the common fields to all entities get stored in an Entities table, while specific classes of entity (like "Applications") get their own table which joins back to the Entities table. On the surface, this code doesn't even really look like a WTF. By the book, this is really how you'd write this kind of function- if we were going by the book. But the problem was that these tables were frequently very large, and even with indexes on the EntityID fields, it simply performed horribly. And since "showing the name of the thing you're looking at" was a common query, that performance hit added up. The fix was easy- write out seven unique functions- one for each entity type- and then re-write this function to use an IF statement to decide which one to execute. The code was simpler to understand and read, and performed much faster. In the end, perhaps not really a WTF, or perhaps the root WTF is some of the architectural decisions which allow this to exist (why a function for getting the name, and the name alone, which means we execute this query independently and not part of a more meaningful join?). But I think it's an interesting example of how "this is the right way to do it" can lead to some unusual outcomes. [Advertisement] Utilize BuildMaster to release your software with confidence, at the pace your business demands. Download today! Full Article CodeSOD
ng CodeSOD: Trophy Bug Hunting By thedailywtf.com Published On :: Mon, 28 Oct 2024 06:30:00 GMT Quality control is an important business function for any company. When your company is shipping devices with safety concerns, it's even more important. In some industries, a quality control failure is bound to be national headlines. When the quality control software tool stopped working, everyone panicked. At which point, GRH stepped in. Now, we've discussed this software and GRH before, but as a quick recap, it was: written by someone who is no longer employed with the company, as part of a project managed by someone who is no longer at the company, requested by an executive who is also no longer at the company. There are no documented requirements, very few tests, and a lot of "don't touch this, it works". And this was a quality control tool. So we're already in bad shape. It also had been unmaintained for years- a few of the QC engineers had tried to take it over, but weren't programmers, and it had essentially languished. Specifically, it was a quality control tool used to oversee the process by about 50 QC engineers. It automates a series of checks by wrapping around third party software tools, in a complex network of "this device gets tested by generating output in program A, feeding it to program B, then combining the streams and sending them to the device, but this device gets tested using programs D, E, and F." The automated process using the tool has a shockingly low error rate. Without the tool, doing things manually, the error rate climbs to 1-2%. So unless everyone wanted to see terrifying headlines in the Boston Globe about their devices failing, GRH needed to fix the problem. GRH was given the code, in this case a a zip file on a shared drive. It did not, at the start, even build. After fighting with the project configuration to resolve that, GRH was free to start digging in deeper. Public Sub connect2PCdb() Dim cPath As String = Path.Combine(strConverterPath, "c.pfx") Dim strCN As String ' JES 12/6/2016: Modify the following line if MySQL server is changed to a different server. A dump file will be needed to re-create teh database in the new server. strCN = "metadata=res://*/Model1.csdl|res://*/Model1.ssdl|res://*/Model1.msl;provider=MySql.Data.MySqlClient;provider connection string='server=REDACTED;user id=REDACTED;database=REDACTED;sslmode=Required;certificatepassword=REDACTED;certificatefile=REDACTEDc.pfx;password=REDACTED'" strCN = Regex.Replace(strCN, "certificatefile=.*?pfx", "certificatefile=" & cPath) pcContext = New Entities(strCN) strCN = "metadata=res://*/Model1.csdl|res://*/Model1.ssdl|res://*/Model1.msl;provider=MySql.Data.MySqlClient;provider connection string='server=REDACTED;user id=REDACTED;persistsecurityinfo=True;database=REDACTED;password=REDACTED'" strCN = Regex.Match(strCN, ".*'(.*)'").Groups(1).Value Try strCN = pcContext.Database.Connection.ConnectionString cnPC.ConnectionString = "server=REDACTED;user id=REDACTED;password=REDACTED;database=REDACTED;" cnPC.Open() Catch ex As Exception End Try End Sub This is the code which connects to the backend database. The code is in the category of more of a trainwreck than a WTF. It's got a wonderful mix of nonsense in here, though- a hard-coded connection string which includes plaintext passwords, regex munging to modify the string, then hard-coding a string again, only to use regexes to extract a subset of the string. A subset we don't use. And then, for a bonus, the whole thing has a misleading comment- "modify the following line" if we move to a different server? We have to modify several lines, because we keep copy/pasting the string around. Oh, and of course, it uses the pattern of "open a database connection at application startup, and just hold that connection forever," which is a great way to strain your database as your userbase grows. The good news about the hard-coded password is that it got GRH access to the database. With that, it was easy to see what the problem was: the database was full. The system was overly aggressive with logging, the logs went to database tables, the server was an antique with a rather small hard drive, and the database wasn't configured to even use all of that space anyway. Cleaning up old logs got the engineers working again. GRH kept working on the code, though, cleaning it up and modernizing it. Updating to latest version of the .NET Core framework modified the data access to be far simpler, and got rid of the need for hard-coded connection strings. Still, GRH left the method looking like this: Public Sub connect2PCdb() 'Dim cPath As String = Path.Combine(strConverterPath, "c.pfx") 'Dim strCN As String ' JES 12/6/2016: Modify the following line if MySQL server is changed to a different server. A dump file will be needed to re-create teh database in the new server. 'strCN = "metadata=res://*/Model1.csdl|res://*/Model1.ssdl|res://*/Model1.msl;provider=MySql.Data.MySqlClient;provider connection string='server=REDACTED;user id=REDACTED;database=REDACTED;sslmode=Required;certificatepassword=REDACTED;certificatefile=REDACTEDc.pfx;password=REDACTED'" 'strCN = Regex.Replace(strCN, "certificatefile=.*?pfx", "certificatefile=" & cPath) 'pcContext = New Entities(strCN) 'strCN = "metadata=res://*/Model1.csdl|res://*/Model1.ssdl|res://*/Model1.msl;provider=MySql.Data.MySqlClient;provider connection string='server=REDACTED;user id=REDACTED;persistsecurityinfo=True;database=REDACTED;password=REDACTED'" 'strCN = Regex.Match(strCN, ".*'(.*)'").Groups(1).Value 'GRH 2021-01-15. Connection information moved to App.Config 'GRH 2021-08-13. EF Core no longer supports App.Config method pcContext = New PcEntities Try ' GRH 2021-08-21 This variable no longer exists in .NET 5 'strCN = pcContext.Database.Connection.ConnectionString ' GRH 2021-08-20 Keeping the connection open causes EF Core to not work 'cnPC.ConnectionString = "server=REDACTED;user id=REDACTED;password=REDACTED;database=REDACTED;SslMode=none" 'cnPC.Open() Catch ex As Exception End Try End Sub It's now a one-line method, with most of the code commented out, instead of removed. Why on Earth is the method left like that? GRH explains: Yes, I could delete the function as it is functionally dead, but I keep it for the same reasons that a hunter mounts a deer's head above her mantle. [Advertisement] Plan Your .NET 9 Migration with ConfidenceYour journey to .NET 9 is more than just one decision.Avoid migration migraines with the advice in this free guide. Download Free Guide Now! Full Article CodeSOD
ng CodeSOD: A Matter of Understanding By thedailywtf.com Published On :: Mon, 04 Nov 2024 06:30:00 GMT For years, Victoria had a co-worker who "programmed by Google Search"; they didn't understand how anything worked, they simply plugged their problem into Google search and then copy/pasted and edited until they got code that worked. For this developer, I'm sure ChatGPT has been a godsend, but this code predates its wide use. It's pure "Googlesauce". StringBuffer stringBuffer = new StringBuffer(); stringBuffer.append("SELECT * FROM TABLE1 WHERE COLUMN1 = 1 WITH UR"); String sqlStr = stringBuffer.toString(); ps = getConnection().prepareStatement(sqlStr); ps.setInt(1, code); rs = ps.executeQuery(); while (rs.next()) { count++; } The core of this WTF isn't anything special- instead of running a SELECT COUNT they run a SELECT and then loop over the results to get the count. But it's all the little details in here which make it fun. They start by using a StringBuffer to construct their query- not a horrible plan when the query is long, but this is just a single, simple, one-line query. The query contains a WITH clause, but it's in the wrong spot. Then they prepareStatement it, which does nothing, since this query doesn't contain any parameters (and also, isn't syntactically valid). Once it's prepared, they set the non-existent parameter 1 to a value- this operation will throw an exception because there are no parameters in the query. Finally, they loop across the results to count. The real WTF is that this code ended up in the code base, somehow. The developer said, "Yes, this seems good, I'll check in this non-functional blob that I definitely don't understand," and then there were no protections in place to keep that from happening. Now it falls to more competent developers, like Victoria, to clean up after this co-worker. [Advertisement] Utilize BuildMaster to release your software with confidence, at the pace your business demands. Download today! Full Article CodeSOD
ng CodeSOD: Counting it All By thedailywtf.com Published On :: Tue, 05 Nov 2024 06:30:00 GMT Since it's election day in the US, many people are thinking about counting today. We frequently discuss counting here, and how to do it wrong, so let's look at some code from RK. This code may not be counting votes, but whatever it's counting, we're not going to enjoy it: case LogMode.Row_limit: // row limit excel = 65536 rows if (File.Exists(personalFolder + @"" + fileName + ".CSV")) { using (StreamReader reader = new StreamReader(personalFolder + @"" + fileName + ".CSV")) { countRows = reader.ReadToEnd().Split(new char[] { ' ' }).Length; } } Now, this code is from a rather old application, originally released in 2007. So the comment about Excel's row limit really puts us in a moment in time- Excel 2007 raised the row limit to 1,000,000 rows. But older versions of Excel did cap out at 65,536. And it wasn't the case that everyone just up and switched to Excel 2007 when it came out- transitioning to the new Office file formats was a conversion which took years. But we're not even reading an Excel file, we're reading a CSV. I enjoy that we construct the name twice, because that's useful. But the real magic of this one is how we count the rows. Because while Excel can handle 65,536 rows at this time, I don't think this program is going to do a great job of it- because we read the entire file into memory with ReadToEnd, then Split on newlines, then count the length that way. As you can imagine, in practice, this performed terribly on large files, of which there were many. Unfortunately for RK, there's one rule about old, legacy code: don't touch it. So despite fixing this being a rather easy task, nobody is working on fixing it, because nobody wants to be the one who touched it last. Instead, management is promising to launch a greenfield replacement project any day now… [Advertisement] Keep all your packages and Docker containers in one place, scan for vulnerabilities, and control who can access different feeds. ProGet installs in minutes and has a powerful free version with a lot of great features that you can upgrade when ready.Learn more. Full Article CodeSOD