Using references vs using return. Ask Programming |
- Using references vs using return.
- [Looking for software] Is there a command line tool which supports IDE-like searching?
- C# (ASP.Net Core): services.AddDbContext question
- What is the best way to track my knowledge of programming?
- Rant: My Intro to Programming is boring as hell
- Instascan library not working as a native application
- Newbie Python question
- Best options for local customer database?
- Fast Pixel by Pixel Graphics in Golang
- fortran gaussian elimination code unclear
- Data Structures in Python: Syntax/formatting errors, program that removes an item in a list and puts it at the end of a queue?
- Is not a function, even though it is...
- What is the best way to extract the following data from this site?
- [C++] Quick question about a boolean intialization
- Literature about NLP and voice recognition software?
- Looking up leaves in dictionary
- Kotlin, How can I access this information?
- Is it legal to use a third-party html player like bitmovin to play youtube videos on my site? And display ads on it?
- Is Microsoft’s “Professional Certificate Program” worth the $300 investment?
- How to make Chrome Dinosaur game?
- Best/recommended language to solve this problem?
- Master's Thesis Programming Question
- Value Error in python
Using references vs using return. Posted: 28 Sep 2018 02:50 PM PDT I have a function which will need to change the value of an argument that I supply. If I understand this correctly, I could do this in two ways. I could pass in the argument, change the value inside the function, return that new value and then make the original argument variable equal to the returned value. Alternatively, I could pass in a reference to the variable I want to change as an argument and then change the variable directly inside the function, without having to return anything. Is one of these methods more 'acceptable' or 'correct' than the other? From what I know, references should be used when dealing with large variables or objects (as making a copy of them is inefficient). However, is the size/complexity of the argument the only factor that needs to be considered? Is using references for small simple variables like int inefficient and if not, then why not always use references when you want to alter an argument? What if you want to alter several arguments, not necessarily all of the same type; would you have to use references then? [link] [comments] |
[Looking for software] Is there a command line tool which supports IDE-like searching? Posted: 28 Sep 2018 07:00 PM PDT In most IDEs you can search for things like class definitions and usages. Are there command line programs that let you do similar queries? Grep wouldn't work for me because it doesn't guarantee correctness in a lot of cases -- it doesn't understand anything about any given programming language. [link] [comments] |
C# (ASP.Net Core): services.AddDbContext question Posted: 28 Sep 2018 09:49 PM PDT Hello, I am trying to create a new asp.net core web application using Razor pages. I want to add my db context in the startup.cs file, but I am using something called IDesign. I have a project tree like this:
My problem is that if my DbContext lives in the accessors project, how do I pass that up from the managers so that I can use it in the clients? Has anyone had experience with this before? Just to reiterate, I know t hat I could easily reference accessors project in the clients project and use the dbcontext from there. My problem is that I want to avoid being able to reference accessors so that other people who are working with this code aren't able to see any accessors classes. Hopefully this makes sense. Thanks! [link] [comments] |
What is the best way to track my knowledge of programming? Posted: 28 Sep 2018 09:09 PM PDT I have been interested in computers and have been programming off and on for the past few years. I have had a lot of exposure to programming, so I definitely feel like I am beyond a beginner in terms of skill/knowledge. I feel like it'd be really helpful for me to know where I stand in terms of knowledge level. Is there any way I can gauge this? Thanks. [link] [comments] |
Rant: My Intro to Programming is boring as hell Posted: 28 Sep 2018 08:20 PM PDT Intro to Programming Class I loved learning to code BEFORE this semester in school. I was learning Python and found great pleasure in it. I found computer science fascinating. But now I'm learning Java by some sloppy teacher with a strong European accent that can never seem to get to the point or answer questions well, and her lecturing is poor. Her powerpoints are boring. The labs are also pretty dry, run by a very unhelpful TA. Other than that, I find that it's sucks the fun out when I feel like I'm learning programming to get a good grade in the class. I KNOW programming is much bigger than this uninteresting reality I'm in. I could just shift my focus towards building my SKILLS rather than thinking about the grade. That was definitely what made things enjoyable before I started school but it's so much easier said than done. [link] [comments] |
Instascan library not working as a native application Posted: 28 Sep 2018 06:46 PM PDT I am using this library to scan QR code in my website. The QR code scanner works on all browsers both PC and mobile. However, when my website is converted to a native application the QR code scanner does not work. Is there a way to fix this issue? [link] [comments] |
Posted: 28 Sep 2018 01:43 PM PDT I'm having trouble learning how to translate my thought process into code. I'm writing a code where I'm rolling a six sided die x amount of times and then having to find the average value it rolls for all attempts(and displaying all attempts) This is my code so far: import random amount_of_rolls = int(sys.argv[1]) for i in range(amount_of_rolls): print('Rolling', amount_of_rolls, 'times' ) I understand that I have to somehow save the dice_number for each loop and then average it out somehow but I'm having trouble translating that into the python language. Or maybe I'm looking at this completely wrong. Let me know if my brain left something out that might be important.Thanks for any help :) [link] [comments] |
Best options for local customer database? Posted: 28 Sep 2018 12:17 PM PDT (C# Windows Form Application) So I've got a basic self made customer database type program that I've been using for my Computer Repair shop, and I am wanting to improve it from my hacked together DataGridView pulling data from ini files and rtf files. I'm considering using a MySQL database to store the information and to edit it on multiple computers, but I am not sure if that's the best option for this, since I will be storing thousands of customers with multiple paragraph long work orders. I would probably keep what I have now, but I would like to be able to access all of my files on different computers so I don't have to run back and forth between computers. I've tried doing a simple Windows file share server to share what I have now, but it seems that the way I have everything coded it does not like local server file paths. Any suggestions/help would be appreciated [link] [comments] |
Fast Pixel by Pixel Graphics in Golang Posted: 28 Sep 2018 03:15 PM PDT I need a library/method for fast/efficient real-time pixel-by-pixel graphics. Getting input is also necessary. I'm not looking for hardware accelerated drawing. Is drawing directly into the frame via openGl best? [link] [comments] |
fortran gaussian elimination code unclear Posted: 28 Sep 2018 03:08 PM PDT Trying to understand this pseudocode of gaussian elimination with partial pivoting. Given pen and paper, this is easy for me to carry out; i am confused by the pseudocode, in the (1) Forward Elimination section, specifically the loop Doesn't the fact that j begins at j=k+1 mean that, for example, the first column is missed (because j=k+1, but k starts at index 1, so j is 2,3,...,N -- but never is j=1, ie the first column isn't touched)? What if I had a matrix like It seems, this algorithm would miss the 1 at the (3,1) position! Whereas the (3,1) entry should be 0, not simply by setting it equal to zero, but rather by doing () on the last row, i.e. for (3,1) 1 - (1/2)2 = 0, (3,2) 2 - (1/2)6 = -1 (3,3) 7 - (1/2)3 = 5.5 It seems this algorithm completely misses that? Am i overlooking something? [link] [comments] |
Posted: 28 Sep 2018 02:40 PM PDT So this is my "completed" code for my homework assignment which was to modify a program to remove an item from a list and add it to the back of the queue. I went from Java to Python so I am still having trouble understanding and learning the proper syntax and formatting. I have an error on Line 41 where it keeps saying invalid syntax. What would be a better way to rewrite this? I will put a comment next to the exact line in the code. Also, I'm aware that I've used two else clauses but I still get a syntax error when I try elif or attempt a while loop haha. Also any formatting help would be deeply appreciated (is there a better way to write a loop, is there too much redundancy, etc), I'm trying my best! My Code: Okay! If I'm not being specific enough, just let me know. I'm here to learn so anyone who is a master at Python please teach me the art of efficient Python code! [link] [comments] |
Is not a function, even though it is... Posted: 28 Sep 2018 02:28 PM PDT Why do I get " Uncaught TypeError: controls.getObject is not a function" ? main file : https://pastebin.com/3AYkENAh (embed) the module of pointerlocks : https://pastebin.com/etgHdNpr (embed) I mean clearly getObject IS a function. Sorry if I'm being naive but I'm also a JS beginner too but this should have been straightforward. [link] [comments] |
What is the best way to extract the following data from this site? Posted: 28 Sep 2018 06:37 AM PDT My university recently switched to this system: https://www.exlibrisgroup.com/products/campusm-mobile-campus-app-platform/ Basically I previously could export my timetable to any calendar of my choosing, now I have to use this app exclusively in order to view my timetable, it is awkward and irritating method and I can't link it up to things like my amazon echo anymore this way. The front end looks like it is done in bootstrap however I have to login before I view the timetable, what would be the best way or code example or method or programming language or all of them in order to extract this calendar timetable data? [link] [comments] |
[C++] Quick question about a boolean intialization Posted: 28 Sep 2018 01:06 PM PDT This is the first time seeing this in C++ and I want to know what this line means. 'rank' and 'bit' are both integers. Is it saying that when 'rank' and 'bit' are equal to 'bit', 'IamZero' is 'false'? [link] [comments] |
Literature about NLP and voice recognition software? Posted: 28 Sep 2018 10:41 AM PDT Hello there, next week I'll do an interview for an entry-level position in NLP and voice recognition software. I'm a translator, but I've never worked in that industry before, so I want to know as much as possible and prepare well before the interview. I'm reading atm all documentation and papers I can find, but I would be very happy if you guys could point me out to entry-level to intermediate NLP and voice recognition literature. Especially, on how it works on a theoretical and programming level. Thank you all. [link] [comments] |
Looking up leaves in dictionary Posted: 28 Sep 2018 08:56 AM PDT I have a dictionary in python that loads from a json file and looks like the following: EDIT: Need to format, reddit is being tough with spaces/tabs: dictionary[A][1] = [a] dictionary[A][2][a] = [x] dictionary[A][2][a] = [y] dictionary[A][2] = [b] With each layer being another key in the dictionary. What I need to do is go through the dictionary and create something that flattens it out to look like this: A/1/x A/2/a/x A/2/a/y A/2/b ... and so on How can I look through the dictionary without multiple for loops, Is there someway to get to every leaf and have a history of each key you left behind so I can create that string? I am sure there are posts all over bout this but I had a hard time wording my question. [link] [comments] |
Kotlin, How can I access this information? Posted: 28 Sep 2018 08:55 AM PDT Here is my code: https://pastebin.com/GVrHbATk I am trying to access the parameter: sectionNumber (line 207) in the placeholder fragment class. I am trying to get this number, so that I know what information (based on that sectionNumber index) to pass to the newly created fragment. Thanks all that can help [link] [comments] |
Posted: 28 Sep 2018 08:19 AM PDT I was reading the terms of services of Youtube and i found the following: ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ YouTube hereby grants you permission to access and use the Service as set forth in these Terms of Service, provided that:
------------------------------------------------------------------------------------------------------------------------------------------------------------------------ I was working on an update to put a player on my site that loads videos from youtube and then i was using javascript to extend some functionalities (and i was even thinking of displaying some ads on it to monetize some) but it seems like none its possible right? [link] [comments] |
Is Microsoft’s “Professional Certificate Program” worth the $300 investment? Posted: 27 Sep 2018 11:36 PM PDT I understand the courses are free, but I was wondering if there is any value in investing $300 to have certification that we completed the program. i.e. is it something we can put on a resume? [link] [comments] |
How to make Chrome Dinosaur game? Posted: 28 Sep 2018 03:40 AM PDT I want to make a game that is similar to the game when you have no Internet. The dinosaur jumping over cactus but with a different character and obstacles. I want it to be an Android app. I have only basic knowledge of Java and the only app I made in Android Studio was a calculator type app. Are there any tutorials that I could use to make an android app game like this? I am also open to using Unity and assets but as this is my first time, I'm not sure where to begin. [link] [comments] |
Best/recommended language to solve this problem? Posted: 28 Sep 2018 02:22 AM PDT I like fantasy football (soccer) and want to work out the highest possible score for a season and the players/trades required. Picking the highest scoring possible team each week would be simple enough to do manually, but I'm interested in finding out the optimal solution: (you get a free trade every week, further trades subtract 4 points from your score, unless you use a 'wildcard' of which you can use two in a season). [link] [comments] |
Master's Thesis Programming Question Posted: 28 Sep 2018 01:07 AM PDT Hi guys, I'll try to keep this short. Basically I want to know if it would be possible to create a web crawler / scraper to fill out different answer combinations on this robo advisor site and then store their final portfolio recommendation in an excel file (as well as the answer combinations). If this is even possible, would Python be an appropriate language to use ? Is this extremely advanced or doable for a beginner programmer in a month or two? Here's the site. Simply click on "Depot eröffnen" at the top right to get to the "survey". Sorry it's in German but you'll get the idea of what I'm trying to do. Any help would be greatly appreciated! Thanks guys :) [link] [comments] |
Posted: 27 Sep 2018 11:16 PM PDT Posted this on stackoverflow and already got a downvote for some reason... I would really appreciate if someone knew the answer to this one! I'm really unsure on what is going on with this, and was unsure how to explain. this is the code coords = tuple([float(i) for i in coords]) im = Image.open('tmp') im = im.crop(coords) im.save(filename) return filename 65 image = face_recognition.load_image_file(crop(coords, 'save.png'))` The error is as follows in this link : https://imgur.com/a/LbYB29Z [link] [comments] |
You are subscribed to email updates from AskProgramming. To stop receiving these emails, you may unsubscribe now. | Email delivery powered by Google |
Google, 1600 Amphitheatre Parkway, Mountain View, CA 94043, United States |
No comments:
Post a Comment