by chrsstrm on 4/24/23, 11:25 PM with 47 comments
by motoboi on 4/24/23, 11:43 PM
by hcrisp on 4/24/23, 11:56 PM
Ans:
// This function will reverse the order of a vector.
void reverse(std::vector<int>& vec) {
std::deque<int> deq;
for (int i = 0; i < vec.size(); i++) {
deq.push_back(vec[i]);
}
for (int i = 0; i < vec.size(); i++) {
vec[i] = deq.front();
deq.pop_front();
}
}
This is a clever hack because it avoids the need to write a custom function for reversing the order of a vector.
But it did write a custom function?!by eka1 on 4/25/23, 3:59 AM
> Me: Write a golang function to get a http request, following the API of the get function in Python requests library.
> Bard: Sure, here is a Golang function to get an HTTP request with an API similar to the requests.get() function in Python:
It produced a function that takes url and parameters. Decent first approximation.
ChatGPT has trouble with this (when I tried a couple months back)
by gerdesj on 4/25/23, 12:03 AM
There is a link to "Learn More" which is also ... eventually a link wonders off somewhere ... nope some wankery about Lamda thingie. [random futile clicking]
It's the basics kids. No matter how far up your arse you are about your funky technology, do enable people to find the bloody thing easily, from all related pages. If you are a little rusty on spelunking then have a look at WAIS and Gopher (int al) for how to do it properly.
Obviously I can find it because I'm a fucking IT consultant. Why not make it easy for everyone?
by stuckkeys on 4/24/23, 11:45 PM
by jdlyga on 4/25/23, 1:20 AM
by peter-m80 on 4/25/23, 2:49 AM
WTF
by WheatMillington on 4/25/23, 7:35 AM
by amrb on 4/24/23, 11:43 PM
by iudqnolq on 4/25/23, 1:38 AM
What are the programming languages supported, for example?
by sp332 on 4/24/23, 11:53 PM