G'morning @MarcGravell. If you have a free second at some point, I've got a not-terribly-important question related to something I was hoping to modify in Dapper.
@animuson Just look for the spaceship speeding down the highway. :P
@MarcGravell Basically, I'd like to have Dapper optionally attempt to convert the returned value from IDataReader.GetValue() to the parameterized type T in cases where the returned value is a compatible primitive type, but I'm not sure if there's a sleek way to go about it outside of using Convert.ChangeType(), which seems to have some (relatively) significant overhead.
The main problem being that the cast the deserializer does now causes the boxed primitive to be unboxed as the parameterized type, which fails with an exception since the parameterized type isn't actually the type of the value (i.e. I get a long that I know is really an integer, but asked for an int)
@TimStone IMO, your best option is to respect what comes back from the DB, i.e. (int)connection.Query<long>(...) - but I guess in your scenario you just have a T there, not an int or long
At the moment I've resorted to casting the result on the database side, but MySQL has somehow managed to make even that terrible by not actually allowing you to cast to a int directly. I had to set up some dummy function that basically coerces it using the parameter definition...very icky.
Sure, I'll see if I can get some out there for you. This is for Data Explorer, so nothing too foreign.
Auto Refresh of Page has been stopped or what ? i recently got an upvote , but it didn't change my reputation in title of page( on meta , browser: Chrome)
@RebeccaChernoff My goal is to try to not clutter the meta.SU with bugs that we really can't do much about. I'm going to suggest to the OP to ask here, but then I thought it'd be good to just have a central location for all the inquiries to this
Since MySQL returns long for that COUNT(*) I have to have a MySQL-specific query just to cast the return value, and using long would just choke on the SQL Server response instead...so same situation. And that makes me sad-face, because it seems silly. :(
@RebeccaChernoff :/ ok so I'll suggest to the OP that they post from now on to mso... would setting up a question for centralized bug reporting and feature requests still be smart to do, or should we just rely on the initial post?
@RebeccaChernoff ok after reading the answers a little more I'm going to keep using that, and recommending that others use it as well. Thanks for the help!
I suppose it would be, although since SQL Server is the original target I've tried to avoid making it jump through hoops just for the port's sake.
Plus it kind of pollutes the codebase, since the schema says "this value is assuredly an int", but I'd have to go convert the types to long everywhere.
@TimStone well, perhaps one final option is for me to add a method to dapper that lets you get the reader; i.e. it still handles all the parameterisation, but you get to do what you like with the results. Would that be useful at all?
I don't really want to add Convert.ChangeType everywhere in the core ;p
you could obviously then write your own extension method that lets you do
Hmm...I'm trying to think of other situations where it might be useful. I don't see much point in mucking up the API just for this use case, since I can address it (even if in an somewhat ugly way) in calling code.
Though of course adding an option to perform the conversion would have done just that, so perhaps I should think ahead a bit next time, but. :P
I place all the fault on MySQL here anyway. I can understand COUNT(*) returning long to a degree, since I don't believe it has a separate function for bigint like SQL Server does, but the lack of cast to int and the fact that SELECT 1 returns a long make me rage a little.
There's still a few cases where I'll have to use my CAST_INT() function, but I had use separate SQL for those for more legitimate reasons, so that's perfectly fine by me.
I recently created a profile on Chemistry site, there it shows me 101 reputation but in my s.o. profile it shows me 1 Reputation , in accounts list , why ?
Star a message in the starred list. The corresponding message on the main screen will increment its starred count, but will not become yellow. Then, try starring the main screen message, the count decrements in both places, the sidebar star becomes black, and the main screen star becomes yellow
Basically, the styles aren't being applied properly
If you click to star a post on the side (in the starred list), it changes color but not the star by the main chat area (it does add one to the number, but it doesn't change the color). Then when you click the star on the main chat area, it changes color to yellow but lowers the number by one
Possible Duplicate:
What can I do when getting “It does not meet our quality standards”?
is send this asking but you say to me that is not in the quality standart. wahts is mean?
hello,
i develop with lwuit to nokia and blackberry.
i have a problem with touch scrolling in the device...
There is something nicely meta about someone saying they don't understand "this does not meet our quality standards" in a way that doesn't meet our quality standards...
@AakashM it's a shame that question didn't get rejected by filters too so we'd have had "my question 'my question has been rejected by quality filters' has been rejected"
Please i try to ask a question but i have this :Oops! Your question couldn't be submitted because:
* It does not meet our quality standards.
i ask if there is someone can help me ? why i can't submitt the question please ? — Chercheur Chercheur5 mins ago
I am crafting an application and cannot decide whether to use the terms Login/out or Logon/off. Is there a more correct option between these two? Should I use something else entirely (like "Sign on/off").
In terms of usability, as long as I am consistent it probably doesn't matter which terms I ...
@PopularDemand Several cool users use them. I'm experimenting to see what the direction of causality is: if I use an identicon for a few weeks, will I become more cool?
Please i try to ask a question but i have this :Oops! Your question couldn't be submitted because:
* It does not meet our quality standards.
i ask if there is someone can help me ? why i can't submitt the question please ? — Chercheur Chercheur5 mins ago
<rant>Mozilla decided not to support SVG fonts because it would discourage adoption of WOFF fonts. I don't disapprove of political moves like that in general, but this one is very dumb. SVG fonts are an incredibly simple text format: anybody could figure out how to manipulate them. Only supporting WOFF forces everybody to deal with brand new complexity wrapping the already-confusing binary font formats. Also, the many existing SVG documents with embedded fonts condemned to be unsupported.</rant>
Anonymous
/me has spent the last few hours trying to make sense of font specifications, hoping to be able to convert simple SVG fonts into WOFF. It is not going well.
i would like to use a program that disconnect nodes from a ring , i use pastry overlay , for example I randomly selected two nodes to disconnect from the network — Chercheur Chercheur33 mins ago
:This article describes the Pastry Distributed Hash Table. For the food, see Pastry.
Pastry is an overlay and routing network for the implementation of a distributed hash table(DHT) similar to Chord. The key-value pairs are stored in a redundant peer-to-peer network of connected Internet hosts. The protocol is bootstrapped by supplying it with the IP address of a peer already in the network and from then on via the routing table which is dynamically built and repaired. Because of its redundant and decentralized nature there is no single point of failure and any single node can leave the ne...
@animuson You think I want my garbage disposal to attack me? Pfft. I don't even have a garbage disposal. I'd be spending my days in fear, afraid that at any moment a garbage disposal would leap out from behind a show curtain and attack.
I'm just curious, how do you guys feel about suggested edits that just remove "Thanks in advance" type stuff? Specifically when it's legitimately the only thing that needs fixing.
There was one where the signature was like "Thanks, <Name>" and they suggested an edit that removed the ", <Name>" part but not the "Thanks" o.o Like... wth?
There are numerous posts on meta about editing questions with
Thank you.
Thanks in advance
Thank you, Sean
Please help me!!
im such a noob sorry for takin ur time
and many of them seem to conflict each other.
In my opinion, these edits are not too minor, even if that is the only thing wrong...