|
I'm still confused about libtoolize. Normally who would generate this libtoolize script and how? Does it need to be specific to the target toolset in any way?
|
# ? May 12, 2016 16:37 |
|
|
# ? Jun 8, 2024 07:32 |
|
Does anyone have code to display a tree (like a binary tree) nicely in HTML/CSS? I found this answer on SO (http://stackoverflow.com/a/31087670/4616655) which looks nice but breaks if it's a large tree (as it doesn't expand horizontally). An example of what I mean is here: https://jsfiddle.net/ccdq9ran/. Not sure if there's a simple solution to get this to just display horizontally fully always.
|
# ? May 14, 2016 23:19 |
|
Jsor posted:What's the best way to remote edit files? I have some code I cannot run or test locally, due to dependency issues, so my workflow is: libfuse/sshfs
|
# ? May 15, 2016 02:04 |
|
How much would I need to exert to compile the latest rsync from source for a PPC mac running 10.4/10.5? edit: if that's even possible with the latest. Shaocaholica fucked around with this message at 05:04 on May 15, 2016 |
# ? May 15, 2016 04:50 |
|
I'm not 100% sure of what I'ma say here so hopefully someone corrects me as needed. Your two options are to either compile it on the system you're aiming for or cross-compile from your current, probably x64, system. Both clang and gcc should build and run fine on PPC OS X 10.4 I would think. You can grab an old Xcode from Apple Developer Downloads if you want, though I guess it's possible latest rsync uses compiler features or a language dialect not available in a compiler that old. In my experience, cross-compiling is pretty straightforward once you figure out the right set of compiler flags and manage to have the right headers in the correct places. Finally, Apple mucks with rsync and eventually publishes their changes to the Apple Open Source site, so if you're not using that you should probably use that. My guess is there's some added support for various Mac-specific file system attributes. In terms of effort, I could see myself blowing an hour or two.
|
# ? May 15, 2016 14:23 |
|
First step is to get a version of Xcode for 10.4 from the Apple website. I'm pretty sure it's on developer.apple.com. That'll include all the command line tools you'll need to compile C applications. If you just want rsync, it may include that as well, just an ancient version. If not you can install MacPorts, Fink or whatnot to get a current version compiled from source. Otherwise you can just run the scripts on the source code that you downloaded and it should build.
|
# ? May 15, 2016 15:35 |
|
1337JiveTurkey posted:First step is to get a version of Xcode for 10.4 from the Apple website. I'm pretty sure it's on developer.apple.com. That'll include all the command line tools you'll need to compile C applications. If you just want rsync, it may include that as well, just an ancient version. If not you can install MacPorts, Fink or whatnot to get a current version compiled from source. Otherwise you can just run the scripts on the source code that you downloaded and it should build. Thanks. I wasn't sure if the prebuilt places would still compile for ppc. And compiling myself I wasn't sure if the old libraries would cause any issues but I guess I can always try. Edit: oh it looks like macports still supports 10.4 and 10.5. Super. Shaocaholica fucked around with this message at 20:19 on May 15, 2016 |
# ? May 15, 2016 17:58 |
|
I have to write UI Specification documents in Microsoft Word file format for the code I do at my job. Right now we use screenshots then a table which describes the controls but for fields with data or headers that change with different contexts or data sets its really hard to get across which control you're talking about in a general way. Anyways, I am looking for a tool that makes writing UI specifications easier not something that tries to generate them automatically though. I'm thinking a tool that lets you highlight and label controls easily and consistently across a team. Any recommendations? EDIT: This is the closest thing I've found so far: http://www.screenpresso.com/features/ specifically the screenshot next to "Powerful built-in image editor" with the labels and arrows. StickFigs fucked around with this message at 15:33 on May 16, 2016 |
# ? May 16, 2016 15:21 |
|
StickFigs posted:Anyways, I am looking for a tool that makes writing UI specifications easier not something that tries to generate them automatically though. I'm thinking a tool that lets you highlight and label controls easily and consistently across a team. Any recommendations? Powerpoint? Seriously, that's what is being used in my company. This could fit perfectly in the programming horrors thread.
|
# ? May 16, 2016 18:56 |
|
I've used Balsamiq at a previous job, sounds like it would hit the points you've listed
|
# ? May 16, 2016 19:46 |
|
StickFigs posted:Anyways, I am looking for a tool that makes writing UI specifications easier not something that tries to generate them automatically though. I'm thinking a tool that lets you highlight and label controls easily and consistently across a team. Any recommendations? We just started using Invision, looks promising, allows the designers to do some rudimentary UX as well, as in "if you click this area, go to Screen 1, if this area, Screen 2" etc. Have not used it myself though.
|
# ? May 16, 2016 20:09 |
|
Balsamiq and Invision look like they could do the job but we don't need the mock-up/UI Designer features. I downloaded Screenpresso and Greenshot (both free for commercial use) and they're both pretty much what I wanted but Screenpresso is a little bit nicer. The only downside is Screenpresso isn't free if you want ALL the features which we might end up needing but the licenses are super cheap compared to those full-blown UI designer apps.
|
# ? May 16, 2016 21:02 |
StickFigs posted:
Clarify maybe?
|
|
# ? May 17, 2016 02:30 |
|
Back with another UI Specifications question! After some fiddling with the tools suggested earlier I realized that it would be really neat if I could find a tool that lets you build a "wireframe" mockup of a UI and then generate a specification document from the mockup. Basically I would want to be able to make a mockup and have the tool generate a .DOC or HTML file or something with all the controls in my mockup in a table or something so I can add details to every control about their actions, visibility, etc. Looking at the more popular tools like Balsamiq Mockups and InVision I don't see that they have a feature like this. Is there something like what I'm looking for out there?
|
# ? May 17, 2016 20:49 |
|
Adobe XD (I think it's Experience now)?
|
# ? May 17, 2016 21:12 |
|
kloa posted:Adobe XD (I think it's Experience now)? That looks cool but unfortunately it appears to be Mac only right now.
|
# ? May 18, 2016 15:08 |
|
I wasn't sure which thread this should be in...but I am looking to play mp4 videos in an html5 video tag or whatever, using some javascript library to make it look like the vimeo player. The mp4s will be on a public internal network share that's on a different server. Which server does the actual processing and will be impacted by site visitors (internal to company network) playing the videos? The website server, or the file server, or both? Help. I don't want to impact other sites on that web server.
|
# ? May 20, 2016 01:01 |
|
Uziel posted:I wasn't sure which thread this should be in...but I am looking to play mp4 videos in an html5 video tag or whatever, using some javascript library to make it look like the vimeo player. There's not really any processing. The server that the file is located on will need to have the bandwidth used to serve the video. It's like, if I hotlink an image on https://www.aserversomewhereelse.com right here in this post. SA's servers aren't involved in that at all...https://www.aserversomewherelese.com gets the bandwidth bill.
|
# ? May 20, 2016 02:18 |
|
Thermopyle posted:There's not really any processing. The server that the file is located on will need to have the bandwidth used to serve the video.
|
# ? May 20, 2016 02:51 |
|
I've recently gotten a book on C++ and started teaching myself some of it - I selected C++ because the book itself was written in a very approachable fashion (it's called "C++ without fear") and I did know that C++ is a very low-level language going into it. At any rate, having messed with it on and off for several months I went ahead and wrote a very simple program that calculates overall GPA. No particular reason for that, other than that it seemed like a decent exercise for testing out my nascent skills. Here is my solution: code:
|
# ? May 20, 2016 03:12 |
|
Kiryen posted:Any general comments on style, efficiency, or how I could have done anything better would be greatly welcome. I generally prefer <string.h> and <ctype.h> over <cstring> and <cctype>. (because they can do different things, and people basically never want the cfoo variants) Generally, don't use "using namespace", especially for std. Be consistent. You declare grade_value with an explicit length, but grade_letters with a deduced length. Avoid globals. total_credits, total_hours, and yes_no should all be defined in the function that uses them. Use const. If you declare a global std::string yes = "Y", it could get assigned to accidentally, which will lead to obviously bad things. Don't construct a string to check for equality against.. if (yes_no == "Y") works just fine. If you want to define a constant somewhere, use #define, (or better if you have C++11, static constexpr char yes[] = "Y".) Avoid recursion when it doesn't make things easier. Turn on warnings. additional_hours doesn't return a value if yes_no == "Y". Don't put return at the end of a void function. Use for. Use static for things that you're not exporting outside of that file. b0lt fucked around with this message at 03:46 on May 20, 2016 |
# ? May 20, 2016 03:44 |
|
b0lt posted:Here are some comments from scanning the code from top to bottom, organized into things that are debatable and things that aren't. Nitpicks are in plain text, actual problems are bolded. (This is holding it up to a professional standard, so don't feel bad) Thanks! Only thing I would say in reply is that I have to use the "using namespace std" because I'm using Microsoft Visual Studio since it came free with the book. I know there's more popular tools out there but I haven't really gotten into any of them yet.
|
# ? May 20, 2016 03:56 |
|
Uziel posted:I wasn't sure which thread this should be in...but I am looking to play mp4 videos in an html5 video tag or whatever, using some javascript library to make it look like the vimeo player. The file server reads the video (sequential disk I/O) and streams it over the network (network I/O). The web server streams the video straight from the share to the client (network I/O) without doing any weird on-the-fly transcoding. The client downloads the video (network I/O) and decodes the video (cpu/gpu). Who does the actual processing? The client.
|
# ? May 20, 2016 04:05 |
|
Kiryen posted:Thanks! You can prepend std:: to anything you're using from std. std::string, etc.
|
# ? May 20, 2016 04:25 |
|
b0lt posted:I generally prefer <string.h> and <ctype.h> over <cstring> and <cctype>. (because they can do different things, and people basically never want the cfoo variants) Can you elaborate on this? I was under the impression that they were identical, except for a handful of environments in which sometimes the latter required namespace qualification while the former didn't.
|
# ? May 20, 2016 07:49 |
|
raminasi posted:Can you elaborate on this? I was under the impression that they were identical, except for a handful of environments in which sometimes the latter required namespace qualification while the former didn't. cfoo and foo.h are allowed to be identical, but they're also allowed to differ with respect to where symbols get exported. cfoo is required to export them in the std namespace, foo.h is required to export them in the global namespace, they can both optionally export symbols in the other. (cfoo was, at one point prohibited from exporting in the global namespace until c++11 (or 03? I forget), but that was stupid and impossible to implement because the C++ stdlib is a layer on top of the C library on some platforms (the ones that matter)) In practice, it doesn't matter, but being technically correct is the best kind of correct. (also header names like ccomplex and cctype look silly) b0lt fucked around with this message at 08:42 on May 20, 2016 |
# ? May 20, 2016 08:39 |
Kiryen posted:Only thing I would say in reply is that I have to use the "using namespace std" because I'm using Microsoft Visual Studio since it came free with the book. I know there's more popular tools out there but I haven't really gotten into any of them yet. Visual Studio is one of the most popular development environments already. It's also a free download (for personal use) from https://msdn.microsoft.com/ - get the Community Edition.
|
|
# ? May 20, 2016 08:46 |
|
leper khan posted:You can prepend std:: to anything you're using from std. You can also just pull in the individual symbols you want, e.g. using std::string; means you can now refer to it as just string but you don't end up with the rest of std all over the place.
|
# ? May 20, 2016 14:13 |
|
Sedro posted:The file server reads the video (sequential disk I/O) and streams it over the network (network I/O). The web server streams the video straight from the share to the client (network I/O) without doing any weird on-the-fly transcoding. The client downloads the video (network I/O) and decodes the video (cpu/gpu).
|
# ? May 20, 2016 16:10 |
|
Uziel posted:Great to know, thanks! Do I HAVE to serve the video over HTTP then? I'm getting "Not allowed to load local resource" when pointing to files on a share. Well, yeah. Web browsers won't let you serve file:// URIs as a security precaution.
|
# ? May 20, 2016 17:30 |
|
Sedro posted:Well, yeah. Web browsers won't let you serve file:// URIs as a security precaution.
|
# ? May 20, 2016 17:59 |
|
nielsm posted:Visual Studio is one of the most popular development environments already. It's also a free download (for personal use) from https://msdn.microsoft.com/ - get the Community Edition. I got the community edition - a CD came with the book. I did not know it was popular though; I had been under the impression it was looked-down-upon for some reason. code:
I could not figure out how to eliminate total_hours as a global variable though, since it needs to be updated along with the credits that the input_hours function passes back. Is there a way to make a function return more than one result? Would using pointers be a good way to do this? Also, it was mentioned to use "for"; I imagine in place of "while". What is the reason that "for" is preferable?
|
# ? May 20, 2016 19:11 |
|
Kiryen posted:I got the community edition - a CD came with the book. I did not know it was popular though; I had been under the impression it was looked-down-upon for some reason. Not sure why you'd think that. Visual Studio is basically the standard development environment for C/C++/C# on Windows. There are certainly others but they're not nearly as widely used. quote:I could not figure out how to eliminate total_hours as a global variable though, since it needs to be updated along with the credits that the input_hours function passes back. Is there a way to make a function return more than one result? Would using pointers be a good way to do this? To get multiple return values in C++, you need to put the extra return values into the parameter list for the function, and pass them by reference or by pointer, yes. A common pattern for this is for the function's return value to always be an error code (indicating if something went wrong), and any additional return values are passed by reference, like so: code:
code:
quote:Also, it was mentioned to use "for"; I imagine in place of "while". What is the reason that "for" is preferable? It's a legibility thing. Always use the loop construct that best describes what you are doing. You typically use "while" for situations where you may loop indefinitely. If your loop has defined limit conditions (as yours does -- you're looping from 0 to 12) then you should use the for loop so those conditions are readily visible to anyone reading your code. TooMuchAbstraction fucked around with this message at 19:20 on May 20, 2016 |
# ? May 20, 2016 19:18 |
My rule of thumb is, if you're looping over a list or array of things, or something that otherwise looks list-like, use a for loop. In a for loop you start at one fixed point and follow a direct path to another fixed point. A while loop is instead mostly used when going through a dataset (stream) of unknown size, like reading in a file with an unknown number of elements (such as lines or data-records), or when working towards some kind of convergence, such as some mathematical approximation algorithms. They are also useful for input loops in interactive programs, e.g. asking the user to input a line, validate the input in some way, and then either exit the loop if it's okay, or repeat the loop if the input is invalid.
|
|
# ? May 20, 2016 20:32 |
|
nielsm posted:They are also useful for input loops in interactive programs, e.g. asking the user to input a line, validate the input in some way, and then either exit the loop if it's okay, or repeat the loop if the input is invalid. Semi-related to this, I'm wondering about the best way to utilize Try-Catch blocks in such a way that if an operation throws an exception, the operation can be retried. Is it bad form to declare a variable outside the Try-Catch block's scope indicating either a boolean success/fail outcome or a simple counter if you want to limit the number of retries to a hard amount - and then put the whole block inside a loop?
|
# ? May 20, 2016 20:47 |
|
JawKnee posted:Semi-related to this, I'm wondering about the best way to utilize Try-Catch blocks in such a way that if an operation throws an exception, the operation can be retried. Is it bad form to declare a variable outside the Try-Catch block's scope indicating either a boolean success/fail outcome or a simple counter if you want to limit the number of retries to a hard amount - and then put the whole block inside a loop? I'd just make a loop (either a "while (true)" or a "for int numAttempts = 0; numAttempts < MAX_RETRIES; ++numAttempts)", and break out of the loop on success. For example: code:
|
# ? May 20, 2016 20:52 |
|
JawKnee posted:Semi-related to this, I'm wondering about the best way to utilize Try-Catch blocks in such a way that if an operation throws an exception, the operation can be retried. Is it bad form to declare a variable outside the Try-Catch block's scope indicating either a boolean success/fail outcome or a simple counter if you want to limit the number of retries to a hard amount - and then put the whole block inside a loop? Not necessarily bad form, sometimes that's necessary. It could be bad if the try-catch operation is real costly or something, so don't be careless about it, but should be fine. Pretty much any program which attempts to make a network connection is going to do something like while(attempts < TIMEOUT){ try catch } and then have some resolution where if you hit the TIMEOUT then you throw up a warning message saying "error, could not connect to server" or whatever.
|
# ? May 20, 2016 21:18 |
|
TooMuchAbstraction posted:Not sure why you'd think that. Visual Studio is basically the standard development environment for C/C++/C# on Windows. There are certainly others but they're not nearly as widely used. it took it over a decade to support c99 at all and it still doesn't support all of it
|
# ? May 20, 2016 22:22 |
|
Kiryen posted:I got the community edition - a CD came with the book. I did not know it was popular though; I had been under the impression it was looked-down-upon for some reason. Well it's a Windows-only product from Microsoft, so neckbeards will automatically look down on it regardless of merit.
|
# ? May 20, 2016 22:35 |
|
|
# ? Jun 8, 2024 07:32 |
|
TooMuchAbstraction posted:Not sure why you'd think that. Visual Studio is basically the standard development environment for C/C++/C# on Windows. There are certainly others but they're not nearly as widely used. Because when I first brought up that I wanted to teach myself some C++ and had bought a book that came with a free copy of it elsewhere, I got a bunch of responses with various other things people seemed to think I should be using instead such as cygwin and a few others. I got the impression it was unpopular. It really didn't seem important to me though; at this point the programs I'm writing are so simple and basic that I don't see why it would matter. They're entirely for learning purposes. Plorkyeran posted:Well it's a Windows-only product from Microsoft, so neckbeards will automatically look down on it regardless of merit. I guess I should have suspected as much.
|
# ? May 20, 2016 22:40 |