For those that prefer a browser: https://devdocs.io
EDIT: In chrome at least the page will work offline once you accessed it. Be sure to configure the documentations you want to have available in the options menu next to the search bar
Essentially yes. This is why in C you never need a parameter for array offset while in other languages like C# you do, because you can simply supply the offset you want as the start parameter. <code>memcpy</code> is such an example.
What you have to know though is that C is aware of the size of an element. If your pointer is an int
it will offset it properly. The Number you supply is not the number of bytes but the number of elements regardless of its position. You can destroy this though with void*
hyperpolyglot does seem like a good resource, but devhints appears to be far more relevant for web developers, e.g. includes ES6 syntax, react/enzyme/sass cheatsheets, repo more recently and frequently updated.
While not a cheatsheet, and just as flashy, devdocs.io was top of HackerNews yesterday - I could see myself using that over devhints due to the large collection of API docs, customizability (i.e. disabling docs for languages/libraries I don't use), and the ability to download docs for offline viewing.
Be empathetic. Think about the person that will have to use what you wrote and/or read/maintain it.
Always ask yourself, "how do I know this works?" That combined with the implicit assumption that you want to write something that works directly leads to testing. Don't write tests because you need to check some checkbox. Write tests because you want to be confident it works and you want to write something that works.
Actually, those are more pearls of wisdom than tricks. Tricks...
Use a linter. [n]vim + ALE + flake8 is a great combination.
Abide by PEP 8. There's an accepted standard. Use it.
Not just for C++, but I have really been liking devdocs.io. For C++, it's the cppreference documentation, but if you're also using other languages, it's handy to have it all in one place.
Bonus points if you use duckduckgo: !dd <search term>
.
I develop offline quite often. Not by choice but because commuting.
It actually taught me to develop much nicer.
It taught me to first read the API documentation and only then search google and stackoverflow. "Google: Rails format money" is a lot less precise and complete than spending 15 minutes reading the docs on how the currency formatter really works in Rails. I got devdocs with offline storage for my API documentation needs.
It taught me to simply bundle open devise
when I encounter yet another weird thing in Devise. And rather than googling it, I now learn how Devise really does things internally, and will often show you that you are using only 10% of a gem and that that part is so simple that you probably don't need that gem at all.
It taught me to simply follow my train of thought and leave a "# TODO: Look up how to connect to a secondary Redis" and continue the actual code instead of getting sidetracked in some weird redis.rb connection singleton configuration.
Edit: After learning that developing offline made me a better developer, not in the last place because it forces focus, I quite consistently work in sprints of 45minutes of uninterrupted developing. Most often without opening my browser at all.
std::for_each
is an algorithm written in a time where range-based for loops did not exist. You should be using those instead, especially if the range you are iterating through is the entire container:
for (auto& item : items) item.action(); items.clear();
Removal of elements in the midst of iteration will not be very nice regardless of what method you use. It is better to do the iteration, then the removal, instead of attempting to do both at the same time. However, if the range of interest is a subrange of the container, it may interest you to partition the elements you are interested in before doing the iteration. In this manner, the elements you wish to consume will be all packed together at the end of the vector.
An alternative would be https://devdocs.io - it includes the love2d docs and it can be accessed when you're offline. You just have to setup the love2d docs to be offline accessible (devdocs settings). And of course you can search through the documentation via a built-in search.
There's no pdf available.
You can access them offline with devdocs.io/offline.
Or, if you search for "offline MDN docs" you should be able to find a download link of the docs as well as programs needed to read them.
> better keywords
I think its more a "different way of using the engine".
I'm using DDG for years now and whenever I'm "forced" to use google, it wields much poorer results. With google it's all about "intent". Most people are used to how google interprets our requests for information and not how other engines do this; so their first reaction is that the other engine is "bad".
An example:
I'm discussing some ansible problem with a colleage, and we're at my PC. I'll look up the documentation on the API-documentation site Devdocs.io (I have it offline too). Say, I need to know how to change a firewall rule, so I look up the documentation and read that. I could use the !dev
bang, but since I already know where to go, opening the devdocs tab and searching there is just as fine.
When we're at his workstation, he'll go to google and type "change iptables rule". oh wait. "change iptables with ansible". He'll end up on some stackoverflow or tutorial-site, scroll immediately to the examples, copy-paste that and be like "done".
I think the latter is a very poor method. Not only is it dangerous (you might be directed somewhere, where someone is explaining an entirely different case and so on. But also, it doesn't help you understand what is happening. Between me, and my colleague, I'm always the one pointing out subleties (or gotchas) from the documentation. I'm always the one predicting where some API or tool will be found (e.g. with Rails, when you know the layout of the engines and modules, it becomes easy to predict the name or existence of some API or feature).
Someone like my colleague will never like ddg, because it requires a different sort of interaction. Not so much "better", just different. Like adding a keyword that tells DDG you are looking for ansible API documentation, and not just any page about ansible.
Hi, for books O’reilly is a good choice. There are books and videos about programming.
Also you can read documentations from devdocs.io or from another place.
Now I know of it; I will see how it fairs in my workflow. I will compare it to how I would use cppreference itself.
Just to note; it seems that devdocs.io/cpp is just using the cppreference archive data; with a different stylesheet.
Even the links are the same:
https://en.cppreference.com/w/cpp/container/vector/vector
https://devdocs.io/cpp/container/vector/vector
just switch out en.cppreference.com/w
with devdocs.io
I must say, the interface is fairly nice.
But the information is identical; thus use the interface you prefer.
First, formatting:
void top5Winners(){ int i, j;
FILE *fp; fp = fopen("player.txt", "r+");
printf("\n\tPlayers wincounts: "); for(i = 0; i < 5; i++) { fscanf(fp, "%s %d %d", pl[i].players, &pl[i].balance, &pl[i].wincount); printf("%d ", pl[i].wincount); } printf("\n"); fclose(fp);
}
So the code here appears to be initializing an off-page array of structs with values.
I believe you need to actually sort the array of structs first, then you can loop over the first five elements to output the 'top' five values.
Are you asking for how to sort the array? Cause there are many ways to do that, although I'd say that Bubble Sort is one of the easier ones to implement in code.
You also need to define what makes one struct better or worse then another? wincount
alont?
You can also go the <code>std::sort</code> route if you don't want to implement a sorting algorithm yourself.
EDIT: My mistake, forgot this was the C, not C++ subreddit. std::sort
isn't an option, <code>qsort</code> is through.
There’s quite a few decent alternatives as far as I am aware if you’re not on MacOS that allow you to search through the same docsets as Dash.app uses 😃
Zeal - A Windows/Linux client that allows you to search through Dash.app docsets
Thanks for the guide. I wrote this tool a while ago in an attempt to have an offline-format intrinsics guide. I think it would be helpful to have the site available offline as well similar to how devdocs.io handles storing documentation offline(AppCache and localStorage).
We also had a twitter thread the other day with another guy from Intel involving having more complete throughput and latency data available for certain architectures due to the fact that IACA isn't available anymore.
You can already browse the Godot 2.1 (and soon 3.0) on DevDocs.
You can install DevDocs Desktop to browse DevDocs from a desktop application (instead of a Web browser).
Java has a lot of built-in features and constructs whereas JS doesn't have a whole lot (unless you're talking about Node). Most people leverage frameworks and libraries built on JS so you have to look at their docs to see what's what (and there's no set format like Java docs unfortunately).
I think Mozilla (MDN) is a good resource for generic JS documentation and https://devdocs.io is good to have access to many docs in one place with a consistent format.
Also, a good IDE can kind of fill in some knowledge gaps on the fly. I recommend VS Code but WebStorm is good too.
I'd honestly argue against Codecademy. It's okay, but I found the explanations to be wildly unhelpful. Now, if this is not the case for you, if you're able to solve the exercises without having to consult other materials, then feel free to disregard. :)
If you're intent on using it, I would suggest that you use it to have a structured learning plan (and obviously the content it actually provides you + the practice), but I would also add other resources on top while you're doing the practice.
So, do the Codecademy theory, then go to practice and open up 2nd resource and do the exercises with the help of the 2nd resource (aside from documentation (MDN, devdocs.io) obviously.
Which 2nd resource? Up to you, imo.
> I didnt look on the link. Correct me if im wrong.
> So you need some string args that you will call them the words you want. I mean the arg[] command.
> arg[//some words here] i think this is how you do it.
> Then you use the rand() command something like this.
> rand(arg) ].
> As i said first, i am a begginer at c++ so i am not sure if it is very good, but i hope you understand me.
Nope. Try it and see where you're off - you're confusing functions, arrays, and arguments.
https://devdocs.io/cpp/numeric/random/rand
rand() generates an integer, not a string, and takes no parameters.
arg[] is not a command. int argc, char** argv are the two arguments passed to main() from the command line. argc is the number of arguments, argv are the arguments themselves (with argv[0] being the command used to execute the program).
Answers to the question of how to generate a random string of characters can be found here: https://stackoverflow.com/questions/440133/how-do-i-create-a-random-alpha-numeric-string-in-c
You haven't included string.h, which is the library that provides strcmp().
Also you can't pass a char to strcmp(), which is what you're trying to do when you write 'a', 'b', or 'c'. It must be a pointer to a char or a char array (check out the documentation here. Wrap the string that you want to compare to in double quotes, even if it's a single character. The compiler will create a string literal somewhere in memory and pass it as a pointer to strcmp().
The Browser gets https://devdocs.io/manifest.appcache
The documents are kept in cache and the browser takes them from there if the online version is not available. Documentations are stored using IndexedDB.
Yeah, you can use <code>list</code> or list comprehension:
asd = list('hello')
asd = [char for char in 'hello']
Or if you being literal, yeah you could use the second statement:
asd = ['h', 'e', 'l', 'l', 'o']
Judging by the landing page, it's meant to gain its "killer app" status from its ability to unify a configurable selection of documentation from various projects into one filter-as-you-type compendium, not from its incidental ability to display docs for just one language.
(eg. The default config combines CSS, DOM, DOM Events, HTML, and HTTP docs into one index and you could easily turn on, for example, Apache, Django, Python, jQuery, PostgreSQL, and Git if that's what your web project is built on.)
Docs docs docs, get devdocs.io for the languages you are learning or want to learn, read everything on the go, it helped me really far to understand and even to just quickly look up stuff and get familiar with the docs.
https://devdocs.io/javascript/operators/this#function_context
More details if you care. Personally I don't like using this
, unless whatever I'm using it for is clearly defined. Strict mode just kind of enforces that.
Every question you'd think to ask has already been asked and answered by someone else. It really comes down to what you're stuck on.
For references I use https://devdocs.io for just about everything. If you're struggling with fundamentals I suggest FreeCodeCamp.
DOM problems, not jQuery. Nu, the DOM API is $#@! terrible — which is why we love jQuery!
Can't help you without an actual demo. Try creating one on jsbin or something?
Debug this in your browser's Inspector (DevTools), and step-by-step walk that DOM, and check what the properties and functions give you.
Ideas? 1. HTMLIFrameElement already has .contentDocument (https://devdocs.io/dom/htmliframeelement/contentdocument), so why are you going through .contentWindow to get a Document? 2. .textContent is a Node property (https://devdocs.io/dom/node/textcontent), not Document. Maybe you need to walk that tree, via body and/or children, to get to nodes you can change?
Here: https://devdocs.io/lua~5.1/
Either way, I recommend that you get into the Morrowind Modding Community Discord and just ask... MWSE LUA is in constant development and the guys are very helpful.
As others have said, django and flask are good places to start. Django is a full framework and comes with stuff like users, authentication, admin panel, db management etc. while flask is more of a bare bones library for developing webservers from scratch.
I can also recommend https://devdocs.io as an easy way to search the docs, it has both django and flask docs
If you mean the DOM change
event then:
https://devdocs.io/dom_events/change
> It's fired for <input>, <select>, and <textarea> elements when a change to the element's value is committed by the user. Unlike the input event, the change event is not necessarily fired for each change to an element's value.
I don't know why WHATWG thought this was a good API to have in the DOM.
> Should I really drill down on, say, algorithms?
If you want to pass your job interview, yes. I would download cough buy cracking the coding interview.
I would also suggest checking out https://devdocs.io, which works offline and has documentation for a whole bunch of different stuff. Python, Django, and Django Rest framework, for example.
If you're going to be doing any sort of programming, go to https://devdocs.io/ and choose all the language/framework/tool docs you'd like to store offline. However, I don't know for sure about it's resilience long-term, because I've never been without internet for more than a day or two.
I find devdocs better than zeal, but the JavaScript Demo section's are annoying because it's a fixed size and there's a second scroll-bar inside, and I'm not knowledgeable enough to fix this issue myself.
callback
is a completion callback that you need to call to inform of an error or actually set the result.
On error it will call the callback
parameter you passed <code>async.parallel</code>.
On result it will put it in the list of results to be used when calling said callback once every task is completed.
I'm not super familiar with C/C++ but if I had to guess > while (fcents > 0) fcents = fcents - 5;
Is the causing an infinite loop as I don't think the code "fcents = fcents - 5" ever runs. I think you'll have other bugs in this script as well.
I'm not great at giving advice, but I'll take a crack at it anyway.
There are quite a few things to improve on in your code like inconsistent intentions & spacing, large elseif blocks, etc. But the biggest problem here, in my opinion, is the comment you made >currently in the debugging stage
Every stage is the debug stage. I'm not of the opinion that you should start every school project with unit tests, but everything should be tested before moving on to the next thing. I would recommend in ascending length to complete look into code smells. clean code by Robert Martin aka uncle bob, anything by uncle bob really not everyone agrees with him but he's brilliant reguardless, and Finally, getting really comfortable with the documentation, syntax, patterns, and paradigms of your language.
>As an aesthetic the g_
prefix is a bit much IMO. While they're technically "global" think of your module (the python file) as it's own namespace. If something else imports it all of those "global" variables will be wrapped up under that module name.
Hmm, makes sense; as you mention later, encoding type rather than scope info into variable names seems much more useful and worthwhile in a dynamic language.
>You've got a lot of functions but none of them are taking any parameters and relying on global variables. You should probably just have those methods requesting what they need as parameters. That way if it does need to be a global, you can grab it and pass it in to whatever calls it.
Hah, good catch. I guess I started out writing them as procedural scripts and then refactored into functions, so it ended up looking a lot like "assembly" in the sense of "set this register, call that address, ...".
>You might check out the <code>pathlib</code> library as a good object-based abstraction from file paths. I found it incredibly useful for keeping things nice and readable without introducing a bunch of constants and slashes everywhere.
Will do!
void
, int
, and double
are fundamental types
​
void sayHi(std::string name, int age){ std::cout << "Hello " << name << "You are " << age << "years old"; }
This function takes in a std::string
and int
as parameters and returns void
(or in other words, it returns nothing, void is an empty type). std::cout << sayHi(...)
will fail to compile since <<
operator cannot do anything with a void
(empty) type.
​
double cube(double a) { int result = a * a * a; return result; }
Here you have a function that takes in a double
as a parameter and returns a double
. Within the function you are cubing the input value and assigning it to an int
. This is called an implicit conversion, you will lose precision since an integer does not have floating point precision. You are then converting the int
back to a double
when you return from the function. You can simplify this function with a single return
statement that does no type conversion:
double cube(double a) { return a * a * a; }
​
To make a calculator you would want to capture user input via `cin` into variables of whatever data type makes sense (double
probably), and then pass those variables into a function that calculates something (like the above cube()
function).
>I believe it's not needed if the language has any recognition
It doesn't have any recognition
>Likely Wikipedia ...
The website for a language will always be better to learn the basics as it should have a thoroughly written guide on getting started, as well as a properly written documentation. If you don't believe me see for yourself buddy
>Logo tells everything
Not even sure what this means or how it's at all related
>If you visit isocpp.org
isocpp.org is the website for the international organisation for standardisation for c++ and has more to do with the roadmap of c++ rather than being an introduction to the language? also note that the devdocs is some of the most comprehensive documentation out there on a language.
>Do they really need to write what everything is for
Well duh? i'm not just gonna learn another language for the sake of picking up something new? This thing has had 8 updates in 6.5 years, and again as I said, no documentation, no useful information, no reference points, no key reasons as to why you'd use this over C, C++, Java, JS, or whatever you might prefer.
HTML/CSS/JS
Learn HTML ( get the basics in like 2 days ), CSS ( 3 days for the basic properties ), then learn Flexbox ( there's a game with a frog to learn that ).
A few resources :
Then learn JS ( check youdon'tknowJS in github ), Bootstrap ( easy to learn )
You can get the basics of all of that in less than a month, then TRAIN on a real project, that's what companies want.
Backend stuff : PHP, Ruby, Python, choose one, and learn that. But front-end is easier and you can create a one-page portfolio or website in like a week, so it's easier to make yourself a portfolio to show companies.
Learn C++ is a decent resource for learning about various more or less advanced C++ concepts. It goes well with cppreference.com which is more of a reference of sorts (you can enable it on DevDocs for more convenient browsing).
It should be possible to follow these if you have prior experience with high-level programming languages.
There are tons of options. If you like interactive material you can try freecodecamp and codecademy.
I like them as an introduction. Once you've got a decent understanding of writing in HTML, CSS or JavaScript I'd go for some project-based tutorials. Youtube has a lot of good creators for this (Traversy Media / Net Ninja / LevelUpTuts). If you don't mind spending a few bucks you can also head over to udemy for a paid course (10 - 20 bucks per course). That way you get a lot of material.
If you're working on your own projects and get stuck on syntax there are always MDN and devdocs.io to help you.
Every aspect except loading times. If I had to look up a few CSS properties and the only options were MDN and W3Schools, I'd choose the latter just because of that.
Otherwise I'd use neither of them. https://devdocs.io/ all the way!
aes in ctr mode will not validate encrypted content (it's not authenticated encryption) meaning if someone changes the encrypted content or it gets corrupted you might not notice this. Depending on where and how it happens it throws the decryptor off but this is in no way guaranteed. You should either use a mode that verifies the content itself like GCM or you store a HMAC of key_bytes+content
. Node has builtins for this: https://devdocs.io/node~6_lts/crypto#crypto_class_hmac
It's up to you if you use the encrypted or unencrypted content both variants have pros and cons.
If you use the encrypted content you have to read the file twice, once for validation and then once for decryption but you don't need to attempt to decrypt if the hash is wrong. A downside of this method is that it allows an attacker to break the password quicker if you encrypt very small files.
Using unencrypted content allows you to read the file in one go and do decrypting and hashing simultaneously. If the disk is the bottleneck this can cut the time in half compared to using encrypted content in the hmac. Password breaking is not accelerated because an attacker needs to fully decrypt the file with each attempt. Biggest downside is that you have no way of verifying before you completely decrypt the content. If the file is large you are potentially wasting a lot of time.
I made a file encryption utility myself a while ago, you can find it here: https://github.com/AyrA/crypt
It's written in C# but the readme might still be interesting
Actually it does. The i++
part is the final expression of the for loop.
for ([initialization]; [condition]; [final-expression]) statement The final-expression runs at the end of each loop. So at the end of the 4th loop, i=3, i gets incremented one last time to 4. Thats why the 5th loop fails, since 4 < 4 is false.
Reference: https://devdocs.io/javascript/statements/for
Download a text editor and some HTML and CSS documentation and get started. For text editor you can use Visual Studio Code and for documentation, devdocs.io. DevDocs is a website but it allows you to use it offline (Click "Offline" and "Install" the HTML and CSS documentation).
That's a start. You can find your way from there. All the best.
I don't understand how I learn C++ in conjunction with Unreal Engine though. There's documentation for C++ itself such as https://devdocs.io/cpp/ but I don't know how I would learn how to use this properly with Unreal Engine as they of course have their own built in functionality for C++.
devdocs.io is great, just set the preferences to download the docs:
https://devdocs.io/react_native/
They will be available in the browser offline.
devdocs-browser and devdocs.el both let you read https://devdocs.io in emacs, and cache them locally. Your language of choice needs to be in devdocs though.
devdocs-browser
seems to be more useful, it uses eww
so links to non-devdoc sources work fine. I guess you can just use eww
to browse any other documentation you'd like :)
Ah gotcha, sounds like something that could be done with a PWA now though; considering Edge is now Chromium they could re-write their doc-site to allow offline indexing.
Similar to https://devdocs.io/
Thanks for the explanation. Yeah, I always test first with sine waves, which might be a bit unfavorable for this case. I will check out the other waveforms later and see how that goes.
The Web Audio API gives an easy "detune"-Parameter for Oscillators, so I thought because of the same name, it will magically correspond to the detune feature of synthesizers.
But it makes perfect sense that different synths handle such features differently, otherwise they would all sound the same in the end.
So maybe this "feature" does not make much sense for my playground, but it still helped me understand something. Thanks!
Yup, that's what I've been using instead. I also develop on a linux machine though and someone else in this thread pointed me to https://devdocs.io/ which is a very similar web app and so far seems awesome.
I use https://devdocs.io/ heavily. I find its search interface is way better than the python docs (it's the same content, just displayed differently) and as I tend to work on polyglot projects (e.g. c++/python) it makes handling the multiple languages better.
The best option would be to find downloadable official docs.
From a quick search, react and others seem to be supported here: https://devdocs.io/offline, not sure about .NET & friends.
You could spend days/months/years in react alone. Pragmatically, in a plane flight I would play with it on a laptop and not read a book.
In reference to your last point: "But maybe it’s not very necessary, as we can live with Browser and we don’t need to do everything within VIM.", some people find useful to run devdocs.io
(e.g. :set keywordprg=xdg-open\ https://devdocs.io/\?q=javascript\
or by using a plugin: https://github.com/romainl/vim-devdocs).
amigo, não funciona assim
eu imagino que vc queira personalizar os subreddits que vc participa (como eles serão vistos por vc), mas isso (a não ser que vc tenha uma extensão) é impossível
de qualquer forma esses links podem te ajudar, se quer aprender css
https://developer.mozilla.org/pt-BR/docs/Web/CSS, https://devdocs.io/css/, https://www.w3schools.com/cssref/
How do you find the official documentation? Like I'm trying to find the official documentation for react.
https://reactjs.org/docs/getting-started.html Is this it? This seems light.
Or is it this? https://devdocs.io/react/
This looks more like what I expected, but it's not from the domain I expected. Shouldn't the documentation be based on the version?
D3 has quite a few functions to do this kind of thing: https://devdocs.io/d3~6/#arrays-d3-array
But also keep in mind that you can do a bunch of custom operations easily using JS too: https://www.d3-graph-gallery.com/graph/basic_datamanipulation.html#math
Ahhhhhhh
That's really rough. Hopefully you can last the 4-6 weeks it'll take to get the laptop. Hopefully it'll be more along the lines of 4 or even less than more than that.
Notepad++ won't have as nice autocomplete and stuff like that, but I'd try to get by with that. It's far more lightweight and it's still a decent editor.
Really, your main issue is all the chrome tabs you might end up opening up in trying to figure stuff out. Just 30 minutes into a programming project and I know my browser was already a mess of tabs. Trying to get by using documentation instead of lots of stackoverflow tabs and likewise is also helpful -- in particular DevDocs.io.
If you're able to get stuff running without virtualization (no WSL or Docker), then that's also super helpful. Dunno if you're on Windows, but if you are, trying to get things working with MSYS2 is super helpful over doing something in Docker or WSL(2). Or maybe you can use a remote system, like getting a DigitalOcean droplet or perhaps your school runs something themself.
The more lightweight stuff you can use, the better. And of course, Linux breathes life into such machines, which you may have already done -- in which case the hit from Docker shouldn't be nearly as big. Just any browser based thing that takes up a lot of RAM seems to be the biggest hit. If the computer wasn't constantly swapping out programs, it could still survive, in my experience. If it is, unusable.
Good luck surviving the next few weeks!
If you don't want to script something in PHP, you can use web dav. Apache has a module for this: https://devdocs.io/apache_http_server/mod/mod_dav
Once configured, you can connect this by various means and move files around in your file explorer.
> I prefer fully offline documentation, but https://devdocs.io/c/ is > pretty reasonable.
Really?
> DevDocs requires JavaScript to run.
Sorry but I don't share your concept of being reasonable to require JavaScript to display some text...
Functionally, they are quite similar. Per the docs, the transaction method is scoped to the database connection and it's possible to have rails models that are persisted in different databases. For example, assume a has_many relationship between Bus and Passengers:
Bus.transaction do Passenger.transaction do passenger.update_some_related_bus_data passenger.bus.update_some_data end end
If buses and passengers are stored in different databases, you'd need to nest transaction calls this way in order to achieve a fully distributed transaction. If you're only reading/writing to one database, this is fairly redundant.
Ah, sorry :)
I would not do this in my own code, because this relies on the order of keys inside the restaurant
object0, as well as the fact that there's only values in the object that are okay to show to a user. Imagine the restaurant object had other fields like id
, createdAt
, or a non-string property. Anything other than string would be forcibly turned into a string which may not what you would want.1
It was a bit tongue-in-cheek because while this works and is very short, it's not safe to do.
> > > We need a higher level audio manager node that handles the "background music" use-case better. I shouldn't have to write my own manager class with two AudioStreamPlayers and a tween to get a decent crossfade between two songs.
It's hard to provide a generic solution for this kind of stuff, so I'd say this is add-on territory. We have an asset library after all :)
> Search on the online documentation is useless.
Try using the built-in class reference in the editor, its search is often more reliable. You can also try to use the version of the documentation hosted on DevDocs.
Well, first of all, Optional is not meant to replace null. And it is not meant to be used everywhere. Following Oracle's documentation (see OpenJDK 15 / Optional — DevDocs), you can read the following:
>Optional is primarily intended for use as a method return type where there is a clear need to represent "no result," and where using null is likely to cause errors. A variable whose type is Optional should never itself be null; it should always point to an Optional instance.
I'd even argue, you should never use it in a class itself. It is there, to clarify whether a method can have no result. How often have you been caught off guard by a Nullreference-Exception? There is a reason, that more and more languages (including C# with the nullable-reference-type feature starting with C# 8) introduce some kind of null safety.
Nullable
is a great example for that. It allows you to indicate, that a variable does not have a value. But it makes you think about it and handle cases, when it does not have it while also preventing you almost by design to ever produce a Nullreference-Exception. Using Optional
does the same thing with every other type instead of structs only and also provides you with an interface to handle those cases in a Fluent-API-style way.
Reminds me of this: https://devdocs.io/ its kinda sad that we are forced to download a "electron wrapper?" inorder to use it. I'm not a big fan of installing stuff, rather access it in my browser. Solid idea and implementation though :)
TIL CMake is explicitly aware about clang-tidy and cppcheck through the <code>LANG_CLANG_TIDY</code> and <code>LANG_CPPCHECK</code> target properties. Not sure how I feel about that, though CMake already has plenty of precedent for being specific-tool-aware.
I love me a good written documentation. It's like listening to a master describing his craft. Bonus-Points if it has a search function, it offloads so much cognitive work. I have at least one Tab of https://devdocs.io/ open when coding.
A site for software developers where you can search through programming documentation. Many languages are supported but more are added every once in a while. It also allows you to store its database offline.
I'm pretty fluent in C, JavaScript and Python and started learning Solidity but it's not the easiest. Especially if you think about the security aspect and risk of losing funds.
You should check "Mastering Ethereum" book. It's on Amazon but they also have a github repository where you can build the pdf version for free.
Before learning Solidity you should also be comfortable using a terminal, git, maybe learn about algorithm, etc then truffle and openzeppelin. I did the cryptozombies courses and it's pretty easy. If you find it difficult then maybe you should start by nodejs (backend) with vuejs or react (frontend). I find frontend more difficult than backend and it might be better to learn vanilla javascript before using a framework like vuejs or react. A good resource is devdocs.io and https://developer.mozilla.org/en-US/docs/Web/JavaScript
C is ideal for learning a strong base but it takes a long time.
Python is also an interesting language to learn and is more rigid so promote better habits. Vyper is the pythonic version of Solidity but I think it's not recommended yet.
Think about it in terms of language syntax. ++x
and x++
are expressions, the fact that they are used as an operand in an assignment (i.e. <variable> = <expression>
) should not change the behavior of the expression. All that should matter is that once x++
is evaluated the current value of x
is x + 1
and the result of the expression is the original value of x
. All of this happens before the assignment takes place.
The documentation doesn't mention anything about assignment, the operator should behave independent of assignment, and everything else should follow evaluation rules according to EBNF, operator precedence, etc.
I found links in your comment that were not hyperlinked:
I did the honors for you.
^delete ^| ^information ^| ^<3
Devdocs.io uses MDN too: https://devdocs.io/about
>CSS
DOM
HTTP
HTML
JavaScript
SVG
>
>
XPath© 2005-2017 Mozilla Developer Network and individual contributors
There are no basic things to re-learn, hook changes are in addition to all the stuff you already know.
The react docs on hooks are a nice read: https://devdocs.io/react/hooks-intro. I'd also suggest watching Dan's announcement talk
what i would do is to use strncmp and memchr, like this for example
#include <stdlib.h> #include <string.h> #include <stdio.h>
int main() { char* filename = "test";
// comparing code char* dot_location; dot_location = memchr(filename, '.', strlen(filename));
if (dot_location != NULL) { if (strncmp(dot_location+1, "txt", strlen(filename)) == 0) { printf("yes it is"); } } }
for info about how those functions work, i recommend devdocs.io, and if you are confused about why im adding to a string, you should check out a video about pointers in c.
​
EDIT: it doesn't seem to compile, working on a compiling version now
EDIT2: bam! a compiling version, try something similar to this
EDIT3: segfaulted when no extention
Your best bet is to learn web development in general then, for example via https://www.w3schools.com/ (The HTML, CSS and JS parts)
To be able to modify other websites you better be able to write simple pages on your own first to get some understanding on how these components interact.
After that it's trial and error. Go to the website you want to modify, open the developer console (F12) and in the console tab, try to enter code you hope it achieves what you want. You can write the code in a text editor and past it all in one go if that's easier. If the code didn't do what you want, then reload the website to restore it and try again. This is usually how I do it.
You can look at the scripts I wrote over time here: https://cable.ayra.ch/tampermonkey/
For references, you can use https://devdocs.io/ which has the resources you need (JS, DOM, HTML, CSS)
Definitely get an offline documentation solution so you can look things up without being online.
Suggestions
Te recomiendo que cuando ya sepas lo básico de los lenguajes que estés estudiando empiezes a hacer proyectos que te interesen a ti personalmente, sin necesidad de que estén en el curso que estés haciendo.
En mi caso me parece que esa es la forma más óptima de educarte, ya que te enseña lo que creo que es más importante en este campo: aprender a investigar por tu cuenta y leer la documentación de lo que sea que vayas a usar para implementar tu proyecto.
Además, con los problemas de internet es imprescindible instalar algo como DevDocs para que siempre tengas a tu disposición la documentación de las tecnologías que vayas a usar, un saludo.
> Also, I don't think flag.Usage should exit with 1. Lastly, you could rely on flag.VisitAll inside flag.Usage.
I've seen various programs exit 0 or nonzero with their help. Is a successful exit on help text a known convention with go programs? I'm pretty new to the language.
Also, what would I rely on flat.VisitAll
for? From the description itself I'm not sure what it'd be helpful for.
People in this thread probably want something like <strong>https://devdocs.io/vulkan/</strong> if they would just update to the latest version of the Vulkan spec(it currently only has 1.0.59 of the spec). Maybe Khronos should host something similar or someone can spin up their own version of devdocs with the latest spec because right now the whole specification is such a pain to navigate when I just want to look up a description for a device-limit or valid input for a create-info structure or info on an extension that isn't just a stray .txt on the github repo that manages to be the only google result.
As a developer just trying to look up proper documentation it's a bit of a shaky mess to track down specific slivers of info on a particular usage pattern or description of a struct-member.
For me:
Simple. Read this. All of it. https://www.selenium.dev/documentation/en/
Then read this. All of it.
Lastly, read this. All of it.
Because embedded tags are required for portability but tags evolve over time it means the file checksum will constantly change. You won't be able to track down if the audio is in fact intact and matches the original source (Bandcamp, Beatport, Deezer, Spotify).
In the interest of preserving this capability it might be possible to store an audio-only checksum (ignoring the metadata in the headers)
How to compare mp3, flac audio data in a file, ignoring header data (ID3 tag) etc.? - Super User
It would be cool if you could preserve the checksum of the original download, such that you could match it against a HEAD
request <code>ETag</code> header or something... Sadly not all ETags are a hash of the content, not all servers provide ETag headers. Also, a check wouldn't be easily scriptable as each service has their own API, which changes over time. Nevermind.
Hi,
I have a slightly different suggestion. Are you aware of Zeal? Zeal is the variant for Windows and Linux, while Dash (the origin of this) for Mac.
This provides a bunch of documentation for a wide variety of topics (Docker one of them) for the offline usage. You can't get any faster then this. Sometimes, even switching to a browser (with a bookmark) and searching is too slow. I personally find this absolutely indispensable.
There is a browser based alternative devdocs.io without cheatsheats. Personally I like Zeal better.
However this gets better with Dash Cheat Sheets, I believe from the author of Dash for the Mac, which installs into the Zeal directory where the installed documentation exists. This collects once again a number of cheatsheets about a number of topics (Docker and Dockerfile being sections). The cheatsheets are basically expressed in a very reduced set if Ruby instructions.
I'm absolutely no Ruby expert having only executes the interpreter a couple of times. I was able to glue this into zeal. Once again, very useful.
> it'll automatically open up MDN with async/await search results without you having to sift through w3schools, geeksforgeeks and whatever shit site there is that's trying to push itself through SEO.
You could also just inclide "mdn" in your search terms, or instead of using a search engine, use something like devdocs, which also works offline
Started using Python ~a year ago, so take this with a grain of salt.
Kinda obvoius ways of telling if library is good might be the github statistics which can be seen directly on the pypi page. If something is popular, it might as well be quite good.
Another good way would be to see the documetation available. Great, easy to use libraries usually have great documentation. That should include both online resources and docstrings in code. With this it is really easy to get started using a lib - which is the point of using PyPI instead of writing your own code imo.
An example of gread documentation could be the pygame module. I also found the devdocs.io resource, offers great reference for some modules, pygame included.
To anwser the second question, module worth mentioning is the pyperclip, it was mentioned and used a lot in the ATBS book. Somewhat similar module is the pynput library, which offers ways to control and monitor the mouse and the keyboard. Good thing to know about is the pyinstaller, which allows to make python programs into .exe programs.
Then, it's hard to tell, cause there is ton of modules for python, all depens on what you want to work with. I love pygame for simple visualisoation tasks, stuff like cellular automatons. Requests lib is a must for any HTTPS related work, beautifulsoup4 goes well with it. Pillow library for working with images. Can't forget about numpy for all computing purposes, pandas for data analysis... These libs are quite complex and not really suited for newcomers but it's good to know about them.
Docs and cheatsheets are always a good place to start if you've already got programming experience in another language:
If there are new concepts you haven't run into before, Google fu is King. There are plenty of stack overflow answers, articles and YouTube videos that can help. There's probably even a C++ subreddit or slack. One subreddit that was extremely useful for me when I was learning to code was r/learnprogramming
Good luck!
Good work. Just as a recommendation, supplement the official python docs with https://devdocs.io. they're a perfect copy, with a decent search interface, unlike the official ones :-). I've found that a decent search bar makes the docs better - and devdocs supports offline, so you can set it up and still use the docs offline search and all.
I didn't write that codepen! It was one of the first things I found on google.
I'd just like to add, while you're learning CSS, depending on where you're learning from, you'll get a lot of examples that use a lot of very old and hacky methods of making layouts. While this is useful for learning, you may want to watch this video to see what is possible with the most modern CSS standard. Don't try to understand the whole video and don't worry if a lot of it goes over your head, but knowing what is possible is great.
Also as well as the normal MDN Web Docs, I'd recommend you bookmark this website devdocs.io, which displays a lot of the same content but from many different sources, for a whole load of languages and frameworks, in a really handy reference table.
Might as well just link to the Real page https://devdocs.io/rust/
This Rust is all you need if you are worthy adult superhuman Thinker 💪💪💪 ... the rest is garbage for simpletons , peons , riff raff
Remember always this categorical maxim: Rust , and not the rest.
If you need only ruby core, this is by far the best option, IMO.
If, like me, you need minitest, rails, javascript, react, postgres, ansible, rust and occasionally some other api documentation, have a look at devdocs: https://devdocs.io/
Bonusfeature is that devdocs can download the content and work offline (also makes it really fast and feel like a native application)
I find paying a single dime to learn JS and webdev in general ridiculous.
There are absolute OODLES of resources out there freely available (eg [1][2]) and all you have to do is work with the technologies to get to know them better.
Personally I started with writing userscripts for myself every other week. You could do the same or other things that pertain to your interests.
most of these buttons land in some place of the https://docs.ansible.com/ansible/latest/index.html tree and there is a search box in the navigation on the left side. You just need to scroll up. But yeah, it's an UX fail.
Other than that I use https://devdocs.io/ and have a Chrome short cut for the search, so I just type dd
in the omnibox and then be able to search these from my chrome bar.
Also, in case you didn't know, there is ansible-doc
on your command line.
If you don't need the website to be permanent or to be used for anything professional, 000webhost will give you a free subdomain with the only catches being your website will only be online for like 18 hours a day instead of 24, and certain features they offer won't be available. In addition, if you don't use your site for an extended period of time (1 mo?) They will archive your site
If you are just trying to practice designing a website for free from scratch, I'd recommend this. Just remember to save your code offline in case you run into any bumps. I recommend brackets for offline coding.
Lastly, above all else, I would highly recommend avoiding too many tutorial videos. If you don't know how to do something, Google it, and look for documentation. This is a good source for html info https://devdocs.io/html/.
I'd recommend starting with this simple video https://youtu.be/bWPMSSsVdPk on html, spending a couple hours getting a good handle on that, then integrating css after that.
This is all just one person's advice, but if i were to start learning html from scratch this is where i wish i would have started. Good luck!
> Is there's an easy way to set it up for lisp functions? (I have the man page for SBCL but it doesn't look up the functions when I press K)
How is your keywordprg
set for Lisp? Or is K
a mapping?
> Are there ways to expand what I can search to include, for example, popular python modules?
It all depends on your :help 'keywordprg'
(or whatever K
is mapped to for your specific language if it doesn't use keywordprg
).
> Are there any plugins that improve on the documentation lookup function?
I have made this plugin for looking up keywords on https://devdocs.io. There is at least one alternative for the same service.
From https://devdocs.io/c/string/byte/strtok
I can probably use these functions. Thank you :)
Tell me if I'm wrong on the following : strtok() doesn't need me to provide a pointer to the delimiter, which makes it not thread safe while strtok_s() does? Is strtol_s() basically an improved version of strtok_r() ? (I use C11 btw)
I was writing a follow up to your next reply when it got deleted. In case it had useful information, I’m just going to paste it here:
Looks like you are using JSDoc comments. Those are pretty sophisticated on their own, but can also be combined with the TypeScript compiler for pretty sophisticated type checking. This is (I think) what VSCode is doing for you under-the-hood. You are essentially using JSDoc to write TypeScript, even though it’s all vanilla JS files which are never compiled.
The reason VSCode is complaining about when you say an async functions returns a primitive value, is because async functions return Promises, not primitive values. You can test this in your console. Just run:
const getSeven = async () => 7; console.log(getSeven());
You’ll notice a Promise that resolves to 7 gets logged to the console, not 7 itself. In other words, a (TypeScript) type of Promise<number>
, not simply number
.
This incidentally is my biggest complaint about async/await. It looks nice and clean, but it hides an awful lot of magic. Such as that when you are using async you are always implicitly returning Promises, never naked primitive values.
Backup options are devdocs.io (web) or Zeal (desktop, windows, free) or Dash (desktop, mac, not tree).
All 3 scrape the official documentation (Zeal actually uses the Dash docsets), so nothing extra or anything. But it does allow you to keep documentation offline as well. Do note that if you clear localstorage for devdoc.io, you will lose offline capabilities
A ton of documentations in your browser, all available offline, and each product documentation looks similar in style.
Even more documentations (including .NET, which devdocs lacks), as an offline package in a portable application