Anyway, in regards to customer satisfaction we will see what end customer will say when new cars with our software hit the market.
The Big Programming Thread - Page 836
Forum Index > General Forum |
Thread Rules 1. This is not a "do my homework for me" thread. If you have specific questions, ask, but don't post an assignment or homework problem and expect an exact solution. 2. No recruiting for your cockamamie projects (you won't replace facebook with 3 dudes you found on the internet and $20) 3. If you can't articulate why a language is bad, don't start slinging shit about it. Just remember that nothing is worse than making CSS IE6 compatible. 4. Use [code] tags to format code blocks. | ||
Silvanel
Poland4691 Posts
Anyway, in regards to customer satisfaction we will see what end customer will say when new cars with our software hit the market. | ||
Acrofales
Spain17834 Posts
On February 06 2017 19:10 Silvanel wrote: Haha. As a tester a major change without visible misbehaviors makes me suspicious. Anyway, in regards to customer satisfaction we will see what end customer will say when new cars with our software hit the market. * waits for the major news story where Polish cars go on murder spree due to alleged software bug. But seriously, congrats! Feels great to make something that gets used ![]() | ||
maybenexttime
Poland5419 Posts
On February 06 2017 19:12 Acrofales wrote: * waits for the major news story where Polish cars go on murder spree due to alleged software bug. But seriously, congrats! Feels great to make something that gets used ![]() Oh, I'm sure our roads would stop those cars from a murder spree, if even US Army can't handle them (there's been several accidents since they arrived). ![]() | ||
Hanh
146 Posts
On February 06 2017 18:18 maybenexttime wrote: Thanks for your input. I am, however, not sure this is going to maintain the same functionality. In my code the dialog box has a set of default values: default_initial = {'10', '0', '10', '1', '1', '1'}. By checking the validity of each input value individually, I can either replace the default value with the valid input value (default_initial{2} = answer_initial{2}) or make the field empty (default_initial{2} = ''). if (str2double(answer_initial{2}) >= 0) & ... If I were to put all actions in the very last if statement, then upon opening the dialog box again (in the next iteration of the while loop) the initial default values would be used, and all valid inputs would be lost. Maybe you could do something like
This isn't really matlab code but I think matlab can do that. check_cond is an array of predicates. For ex: check_cond[0] = @(x) x > 0 | ||
Silvanel
Poland4691 Posts
On February 06 2017 19:12 Acrofales wrote: * waits for the major news story where Polish cars go on murder spree due to alleged software bug. But seriously, congrats! Feels great to make something that gets used ![]() Yeah. Thanks. In regards to cars there are basically two major approaches: Google, Amazon & co. want to make driverless cars. So software is handling everything. Old car makers want to make cars which are autonomous. So software can take some action on behalf of driver, perform some functions, assist him but not eliminate the driver. Those two approches result in totally different software and problems to overcome. We are making the latter. And while i can imagine some critical malfunction creating dangerous situation, if driver is paying attention it should not result in accident. | ||
Manit0u
Poland17187 Posts
Java example:
Now, imagine if you had a function like that:
I guess in Java it's easy, because you'd have to explicitly encapsulate the separate args lists in brackets (I think? I'm no good with Java). Now, good practice in Rails is not using braces for function arguments. Linters like RuboCop even show this warning if you do that:
This creates some bizarre forms:
So, you have implied args hash up to 123, and after that comes args2. This has seriously rattled my brain... | ||
Nesserev
Belgium2760 Posts
| ||
mantequilla
Turkey775 Posts
On February 06 2017 21:45 Manit0u wrote: Just wanted to share some craziness with you guys. I've just discovered that one of the core Rails functions (used for url generation) has easily one of the weirdest designs I've come across in my life. You know how you have functions that can take several arguments? Java example:
Now, imagine if you had a function like that:
I guess in Java it's easy, because you'd have to explicitly encapsulate the separate args lists in brackets (I think? I'm no good with Java). Now, good practice in Rails is not using braces for function arguments. Linters like RuboCop even show this warning if you do that:
This creates some bizarre forms:
So, you have implied args hash up to 123, and after that comes args2. This has seriously rattled my brain... In Java:
above syntax simply declares an array parameter. Array is kind of a special object, so there's nothing special or noteworthy above. It is just like any other method with an object parameter.
this on the other hand maybe what you are looking for. This means an "arbitrary number of string arguments". But its illegal to use it more than once like:
above won't compile. Multiple argument syntax is only allowed once in a method declaration, and it must be the last parameter. Like:
Java is not fancy and I think non fancy is clearer sometimes ![]() | ||
maybenexttime
Poland5419 Posts
On February 06 2017 20:28 Hanh wrote: + Show Spoiler + On February 06 2017 18:18 maybenexttime wrote: Thanks for your input. I am, however, not sure this is going to maintain the same functionality. In my code the dialog box has a set of default values: default_initial = {'10', '0', '10', '1', '1', '1'}. By checking the validity of each input value individually, I can either replace the default value with the valid input value (default_initial{2} = answer_initial{2}) or make the field empty (default_initial{2} = ''). if (str2double(answer_initial{2}) >= 0) & ... If I were to put all actions in the very last if statement, then upon opening the dialog box again (in the next iteration of the while loop) the initial default values would be used, and all valid inputs would be lost. Maybe you could do something like
This isn't really matlab code but I think matlab can do that. check_cond is an array of predicates. For ex: check_cond[0] = @(x) x > 0 Good idea! I partly implemented that. I still have to find out how to use an error log in errordlg (how to create several separate lines of text). | ||
emperorchampion
Canada9496 Posts
On February 07 2017 05:07 maybenexttime wrote: Good idea! I partly implemented that. I still have to find out how to use an error log in errordlg (how to create several separate lines of text). You can make it multi-line by using:
| ||
dsyxelic
United States1417 Posts
I have a group project at school for a fairly trivial class but basically long story short I'm making a basic app. I have the register, login, and a simple SQLite database set up. What we want is to have 2 different types of users: a regular user and user with extra privileges. Regular users will only be allowed to browse the pages on the android app (will basically list out events on campus for the week and details on the events) The special users, or admins, will be able to do all that + access pages that allow them to edit the details from there (for example, the time of event, description of event, delete the event as a whole, etc.) what is a good/simple approach to do this? Note I have 0 experience with android studio and have been basically watching/reading tutorials and guides to get through this. My (our) initial thought was to have all users sign up as regular members and have us manually switch users to have special privileges once it is confirmed they are an actual event organizer (not very practical but its ok to assume this is ok for the purpose of our class) . However as I was working on this project, I realized I have no idea how to actually do that and if it is possible (able to be done with reasonable effort) with what I have. So key questions 1. Is it possible to have them split as regular/special members in SQLite and manually 'upgrade' them from our end? If so, how? (Links to resources are welcome) 2. Is it possible to show different pages based on their membership status? Again if so, how? Sorry in advance if these questions are dumb, I'm actually a complete noob to android apps/databases. thanks! | ||
Deleted User 3420
24492 Posts
studying stuff for me c quiz question it asks: what possible problems are associated with this?
I am guessing the answer it wants is that there is no ampersand before the x ampersand means: put %d into the address of x? but could someone explain what happens if you don't have the ampersand there? and then another question in the study guide asks what is wrong with this:
I am guessing the problem is that you can't overload in C. but also I thought the teacher taught us that you have to use prototypes. When I try to run the code it does give error messages about the overloading, but nothing about not having the prototype. | ||
WolfintheSheep
Canada14127 Posts
On February 07 2017 08:48 travis wrote:
I am guessing the answer it wants is that there is no ampersand before the x ampersand means: put %d into the address of x? but could someone explain what happens if you don't have the ampersand there? Pointers. Wouldn't be so vague normally, but this is such a critical part of C that you really should learn the ins-and-outs. and then another question in the study guide asks what is wrong with this:
I am guessing the problem is that you can't overload in C. but also I thought the teacher taught us that you have to use prototypes. When I try to run the code it does give error messages about the overloading, but nothing about not having the prototype. Granted, my C is quite rusty, but pretty sure this has nothing to do with prototypes. There's a time and place for those, and this doesn't look like one of them. | ||
Neshapotamus
United States163 Posts
| ||
Hanh
146 Posts
On February 07 2017 08:48 travis wrote: I hate linear algebra so far. Basic concepts presented in 10,000 confusing ways. I probably need to know this all, but I can't wait until it gets to something more applicable. It seems basic because it's familiar. It's familiar because it's used everywhere. But it's important to master the fundamentals as other applications are derived from it. I don't know any engineering domain that isn't using it in a way or another. Anyway, studying stuff for me c quiz question it asks: what possible problems are associated with this?
I am guessing the answer it wants is that there is no ampersand before the x ampersand means: put %d into the address of x? but could someone explain what happens if you don't have the ampersand there? Without the &, x would be interpreted as containing an address. So if x is an int pointer, it's all good but since x is just an int, it will most likely trigger a segmentation fault. If you are unlucky, x contains the address of some memory in your process and you'll be trashing something. In other words, it's undefined behavior. and then another question in the study guide asks what is wrong with this:
I am guessing the problem is that you can't overload in C. but also I thought the teacher taught us that you have to use prototypes. When I try to run the code it does give error messages about the overloading, but nothing about not having the prototype. Besides that, in the second p1, printf expects an int (%d) but you pass a float. printf doesn't do any conversion because it doesn't know anything about the meaning of the format string (it could be only known at run time too). I guess the study guide wants to show a common pitfall associated with printf. | ||
mantequilla
Turkey775 Posts
On February 07 2017 07:59 dsyxelic wrote: Hi, is anyone familiar with android apps/android studio? I have a group project at school for a fairly trivial class but basically long story short I'm making a basic app. I have the register, login, and a simple SQLite database set up. What we want is to have 2 different types of users: a regular user and user with extra privileges. Regular users will only be allowed to browse the pages on the android app (will basically list out events on campus for the week and details on the events) The special users, or admins, will be able to do all that + access pages that allow them to edit the details from there (for example, the time of event, description of event, delete the event as a whole, etc.) what is a good/simple approach to do this? Note I have 0 experience with android studio and have been basically watching/reading tutorials and guides to get through this. My (our) initial thought was to have all users sign up as regular members and have us manually switch users to have special privileges once it is confirmed they are an actual event organizer (not very practical but its ok to assume this is ok for the purpose of our class) . However as I was working on this project, I realized I have no idea how to actually do that and if it is possible (able to be done with reasonable effort) with what I have. So key questions 1. Is it possible to have them split as regular/special members in SQLite and manually 'upgrade' them from our end? If so, how? (Links to resources are welcome) 2. Is it possible to show different pages based on their membership status? Again if so, how? Sorry in advance if these questions are dumb, I'm actually a complete noob to android apps/databases. thanks! do you have a backend server set up that, stores events and users apart from the android app? or you just have an android app? | ||
dsyxelic
United States1417 Posts
On February 07 2017 21:13 mantequilla wrote: + Show Spoiler + On February 07 2017 07:59 dsyxelic wrote: Hi, is anyone familiar with android apps/android studio? I have a group project at school for a fairly trivial class but basically long story short I'm making a basic app. I have the register, login, and a simple SQLite database set up. What we want is to have 2 different types of users: a regular user and user with extra privileges. Regular users will only be allowed to browse the pages on the android app (will basically list out events on campus for the week and details on the events) The special users, or admins, will be able to do all that + access pages that allow them to edit the details from there (for example, the time of event, description of event, delete the event as a whole, etc.) what is a good/simple approach to do this? Note I have 0 experience with android studio and have been basically watching/reading tutorials and guides to get through this. My (our) initial thought was to have all users sign up as regular members and have us manually switch users to have special privileges once it is confirmed they are an actual event organizer (not very practical but its ok to assume this is ok for the purpose of our class) . However as I was working on this project, I realized I have no idea how to actually do that and if it is possible (able to be done with reasonable effort) with what I have. So key questions 1. Is it possible to have them split as regular/special members in SQLite and manually 'upgrade' them from our end? If so, how? (Links to resources are welcome) 2. Is it possible to show different pages based on their membership status? Again if so, how? Sorry in advance if these questions are dumb, I'm actually a complete noob to android apps/databases. thanks! do you have a backend server set up that, stores events and users apart from the android app? or you just have an android app? just an android app | ||
Acrofales
Spain17834 Posts
1) A static database that you ship with the app, in which there are predefined users (some of which are flagged as admin), and within the app some functionality is locked (invisible) if the admin flag is off. 2) Two different apps, one for regular and one for admin users. Regarding your second question: yes. You can either lock the access (in other words, the button to access the admin stuff is simply not there for regular users), lock the functionality (the users can see the admin functionality, but it doesn't do anything) or both. The most secure option is both, the easiest to implement is just to lock access. | ||
Deleted User 3420
24492 Posts
say you have 4 numbers, (1, 2, 3, 4) 5 letters (a, b, c, d, e) 6 colors (red, green, blue, yellow, orange, purple) how many combinations of a single number, letter, and color can you have? Is it correct that it is 4 * 5 * 6? It would seem that this is the case to me by simplifying the problem 3 letters and 3 colors would be 3 * 3, pretty simply. each letter is one of 3 colors. and then if you added 3 numbers to that, then the outcome of each of the original 3 * 3 combinations would have 3 number choices added on to it, so 3 letters and 3 colors and 3 numbers would have 3 * 3 * 3 different combinations correct? | ||
Acrofales
Spain17834 Posts
| ||
| ||