|
Flat Daddy posted:the people that chose mongo for us were contractors whomst my team replaced, so I just have to be mad at the absentee leads and architects who let a team of contractors start this pile of poo poo. switch (true)???? lmao get outta here *googles* dear god.
|
# ? Aug 31, 2017 20:01 |
|
|
# ? May 26, 2024 05:46 |
|
JewKiller 3000 posted:sup nerds i just wrote a query that has 3 ctes and uses an inner join, a left join, a right join, and two full joins sup. yesterday i joined two recursive ctes together, using a concatenated column to prevent infinite loops then i threw most of it away
|
# ? Aug 31, 2017 20:05 |
|
Powaqoatse posted:switch (true)???? lmao get outta here *googles* dear god. the best part is every case checks the same variable like code:
|
# ? Aug 31, 2017 20:15 |
|
code:
|
# ? Aug 31, 2017 20:58 |
|
an honest comment
|
# ? Aug 31, 2017 21:08 |
|
NihilCredo posted:sup. yesterday i joined two recursive ctes together, using a concatenated column to prevent infinite loops awwww yeah that's the stuff
|
# ? Aug 31, 2017 21:48 |
|
MononcQc posted:So I'm toying with TUN/TAP devices in FreeBSD along with some custom software in the hopes of writing what is essentially a tiny ethernet firewall that simulates bad network connections. that doesn't make sense but it's been a while since i used freebsd. you can try strace? or ktrace? to check what it's doing. what about stuff like nginx where you specify what ip to listen on?
|
# ? Aug 31, 2017 22:08 |
|
lancemantis posted:an honest comment i wrote it
|
# ? Aug 31, 2017 22:16 |
|
Powaqoatse posted:switch (true)???? lmao get outta here *googles* dear god. code:
|
# ? Aug 31, 2017 22:25 |
|
CRIP EATIN BREAD posted:i wrote it
|
# ? Aug 31, 2017 22:28 |
|
Elysiume posted:this is incredible. if anyone doesn't want to google it, this works and alerts beta: why would you do this
|
# ? Aug 31, 2017 22:35 |
|
hifi posted:that doesn't make sense but it's been a while since i used freebsd. you can try strace? or ktrace? to check what it's doing. what about stuff like nginx where you specify what ip to listen on? Yeah that's the thing I'm doing; specifying binding on IPs. But it just goes and sounds like there's this magic loopback interface that if you go local -> local it just plops it on there and doesn't give a gently caress. I'm possibly doing something wrong and I'll have to reboot and try with no external interface at all from the ground up.
|
# ? Aug 31, 2017 23:34 |
|
i dreamt about writing a right join and then getting called on it in code review. my dreams suck
|
# ? Sep 1, 2017 02:00 |
|
cinci zoo sniper posted:ive literally been assigned these two tasks, but it takes time and le mongo cant wait. worst case scenario, ill just make like 50 fake joins for most logical structure deviations and throw a "sorry not sorry" comment somewhere is there some kind of flatmap mechanism you can use to reduce the structure to a linear array of dictionaries with enough applications? if not it doesn't seem hard to write (if you can make things conditional on type)
|
# ? Sep 1, 2017 02:19 |
|
cinci zoo sniper posted:god i wish it was xml, or i had realistic shot at converting json blobs to xml oh I bet you could write some generic code to transliterate the JSON to XML, then you could apply the XPath to the XML, then you could transliterate the resulting XML to JSON I'm full of ideas
|
# ? Sep 1, 2017 02:22 |
|
MononcQc posted:So I'm toying with TUN/TAP devices in FreeBSD along with some custom software in the hopes of writing what is essentially a tiny ethernet firewall that simulates bad network connections. if you have a Mac install Xcode and use the Network Link Conditioner to do this simulation
|
# ? Sep 1, 2017 02:23 |
|
Elysiume posted:this is incredible. if anyone doesn't want to google it, this works and alerts beta: what about file not found???
|
# ? Sep 1, 2017 02:25 |
|
eschaton posted:what about file not found??? check errno
|
# ? Sep 1, 2017 03:29 |
Arcsech posted:
I kinda get it, if you want to avoid a super long if-else chain. It's sort of like lisp's cond, except way hackier. Personally I would go for the if-else chain though. Good god.
|
|
# ? Sep 1, 2017 03:36 |
|
it's not even an if-else, it's just a chain of if's. a match doesn't preclude further matches switch should, by my sensibilities at least, generate an indirect branch to the right case
|
# ? Sep 1, 2017 03:54 |
|
JawnV6 posted:it's not even an if-else, it's just a chain of if's. a match doesn't preclude further matches i thought it was an if-else (really, if-elseif-else) pattern because the stuff under case(b) doesn't get executed if case(a) is truthy or am i missing something? still shameful.
|
# ? Sep 1, 2017 05:24 |
|
MALE SHOEGAZE posted:check errno wrong
|
# ? Sep 1, 2017 05:27 |
|
JawnV6 posted:it's not even an if-else, it's just a chain of if's. a match doesn't preclude further matches they obviously need to be introduced to the for-case paradigm
|
# ? Sep 1, 2017 05:28 |
|
Flat Daddy posted:the people that chose mongo for us were contractors whomst my team replaced, so I just have to be mad at the absentee leads and architects who let a team of contractors start this pile of poo poo. I am seriously glad that you can't pull that switch (true) bullshit in Haskell. The behavior of case statements is well-defined there, and has no fallthrough and is all just pattern matching.
|
# ? Sep 1, 2017 06:26 |
|
There Will Be Penalty posted:i thought it was an if-else (really, if-elseif-else) pattern because the stuff under case(b) doesn't get executed if case(a) is truthy or am i missing something? still shameful. code:
code:
(also by "you could do" I mean "nobody should ever do") Elysiume fucked around with this message at 06:31 on Sep 1, 2017 |
# ? Sep 1, 2017 06:28 |
|
its been a long time since I've used a switch statement
|
# ? Sep 1, 2017 06:32 |
|
so is jetty-maven-plugin supposed to ignore my jetty.xml ports or something? when i run jetty it ignores all of this and runs the server on 0.0.0.0:8080 exclusively. i cannot connect on 7777 even though the xml file gets ran. where is the plugin getting 0.0.0.0:8080 from? how can i remove that? here is my jetty.xml XML code:
XML code:
|
# ? Sep 1, 2017 16:22 |
|
Shinku ABOOKEN posted:so is jetty-maven-plugin supposed to ignore my jetty.xml ports or something? i don't believe jetty-maven-plugin is supposed to be scraping anything out of your jetty.xml or other resources in the jar Shinku ABOOKEN posted:when i run jetty it ignores all of this and runs the server on 0.0.0.0:8080 exclusively. i cannot connect on 7777 even though the xml file gets ran. where is the plugin getting 0.0.0.0:8080 from? how can i remove that?
|
# ? Sep 1, 2017 16:34 |
|
it looks ok, but maybe try changing the configuration id from "MyServer" to "Server". The plugin may be using its own internal config and then adding yours which is adding a new server instead of modifying the one the plugin created. Some good examples on how to configure the plugin here
|
# ? Sep 1, 2017 16:34 |
|
Shaggar posted:try changing the configuration id from "MyServer" to "Server" thats was it. thanks all.
|
# ? Sep 1, 2017 16:57 |
|
I am about to sign a contract to get propertesting.com published with pragmatic programmers
|
# ? Sep 1, 2017 20:59 |
|
MononcQc posted:I am about to sign a contract to get propertesting.com published with pragmatic programmers
|
# ? Sep 1, 2017 21:19 |
|
MononcQc posted:I am about to sign a contract to get propertesting.com published with pragmatic programmers heck yes.
|
# ? Sep 1, 2017 21:35 |
|
ok so i added swashbuckle to my other api and i get a 404 trying to go to localhost:69420/swagger i tried searching around and can't find anything
|
# ? Sep 1, 2017 21:37 |
|
HoboMan posted:ok so i added swashbuckle to my other api and i get a 404 trying to go to localhost:69420/swagger ooh I just added swashbuckle to something yesterday. I didn't get a 404 tho so I can't help you with that sry
|
# ? Sep 1, 2017 21:54 |
|
can't help you either, sorry, i only did hello world with swashbuckle but didn't have that problem. i'll post https://github.com/RSuter/NSwag for people interested, though. not as elegant as swashbuckle but more powerful in some ways (eg. autogenerate whole clients) in actually somewhat related news: i'm working on a thing that uses (a) swagger (b) dotnet and (c) open sores. so it's possible that https://www.newtonsoft.com/jsonschema (not to be confused with the serialization library everyone knows) may be useful for said thing. (i say 'possible' because swagger schemas and json schemas are slightly different, because web developers hate communication, but whatever.) problem is, this json.net schema library has a weird license. in addition to regular commercial licenses, it's available under the scary AGPL for open sores projects, but limited into utter uselessness - max 10 schema generations / hour. which confuses me. if it's under the AGPL, what's the point of adding a limitation like that? if I want to use it for an AGPL project, can't I just fork it from github and comment out the limiting code? (I checked, it's trivial)? I guess it could be considered a dick move towards the guy who maintains for free the single most popular .net library, but you're giving away your own work for free too so i'd say it's a wash. or is there some caveat under which it's a license violation to remove the limitation?
|
# ? Sep 1, 2017 23:11 |
skipping 700 posts to say thanks hoogle thoogle
|
|
# ? Sep 2, 2017 12:32 |
|
NihilCredo posted:can't help you either, sorry, i only did hello world with swashbuckle but didn't have that problem. if the limitation is part of the license, then yes. it's not "true" AGPL but you can totally say "this project is AGPL with the addition that you don't bypass this limitation."
|
# ? Sep 2, 2017 13:13 |
|
NihilCredo posted:i'm working on a thing that uses (a) swagger (b) dotnet and (c) open sores. so it's possible that https://www.newtonsoft.com/jsonschema (not to be confused with the serialization library everyone knows) may be useful for said thing. (i say 'possible' because swagger schemas and json schemas are slightly different, because web developers hate communication, but whatever.) learn java, because the .net ecosystem sucks poo poo
|
# ? Sep 2, 2017 14:14 |
|
|
# ? May 26, 2024 05:46 |
|
CommunistPancake posted:if the limitation is part of the license, then yes. it's not "true" AGPL but you can totally say "this project is AGPL with the addition that you don't bypass this limitation." it doesn't appear to actually be part of the license though: https://github.com/JamesNK/Newtonsoft.Json.Schema/blob/master/LICENSE.md posted:# Json.NET Schema
|
# ? Sep 2, 2017 14:45 |