• Breaking News

    Monday, March 12, 2018

    need someone to look over my c++ code Ask Programming

    need someone to look over my c++ code Ask Programming


    need someone to look over my c++ code

    Posted: 12 Mar 2018 09:41 PM PDT

    been working on this AI depth search project. Been getting some errors although I believe most of my code is correct. Let me know if you can help, I can message you.

    submitted by /u/olechicken
    [link] [comments]

    Python pack tuple into struct

    Posted: 12 Mar 2018 03:27 PM PDT

    Is it possible? For example,

    values = ((int, float), (int, float), (int, float)) packed = struct.pack(???, *values) 
    submitted by /u/kojpcn
    [link] [comments]

    How would I convert this into a function? (Python 3)

    Posted: 12 Mar 2018 03:53 PM PDT

    from operator import mul allUsers = {'User1':[2,3,5],'user2':[2,0,-3]} singleUsers = {'me':[-5,0,5]} userSimilarity = [] for scores in allUsers: singleScore = singleUsers['me'] allScore = sum(map(mul,allUsers[scores],singleScore)) userSimilarity.extend([[scores, allScore]]) 

    I have:

    def dotProduct(singleUser, allUsers): userSimilarity = [] for user in allUsers: singleScore = list(singleUser.values())[0] allScore = sum(map(mul,allUsers[user],singleScore)) userSimilarity.extend([[user, allScore]]) return userSimilarity 

    But it isn't working properly

    submitted by /u/Ev3ryb0dy_Li3s
    [link] [comments]

    Should I be worried if I graduated with a B.Sc in Computing Science without certain courses under my belt?

    Posted: 12 Mar 2018 11:41 AM PDT

    I've been planning courses for next year, and since I go to a small school, there aren't a lot of class sections offered.

    Additionally, a lot of them conflict with one another. For example, I could take an optional algorithms course, but I can't because it conflicts with a mandatory course requirement.

    Should I be worried that I don't have courses such as algorithms and operating systems under my belt? At this point, I've been getting into what fits with my schedule, instead of choosing the courses that seem important because it conflicts with my schedule in such a way where I need to prioritize other, mandatory courses over these seemingly important, but optional, courses?

    I don't want to push my degree even further (I'm already doing so as it is), it's either that, or graduate with holes in my knowledge.

    submitted by /u/gisellasaurus
    [link] [comments]

    Hackathon newb

    Posted: 12 Mar 2018 10:07 PM PDT

    I just signed up for my first ever hackathon. I am super excited, but also really nervous. What are some things I should know/keep in mind?

    submitted by /u/karnthis
    [link] [comments]

    Quantifying wav audio (python)

    Posted: 12 Mar 2018 04:05 PM PDT

    Hi, I'm trying to turn a wav file into a series of numbers for an art/design project (the plan is to turn audio into CAD into 3D printed jewellery).

    I've done OK with the CAD scripting, which is pretty fun, so given a list of numbers I can turn that into a shape - but I'm a bit stumped on how to get a list of numbers from a sound.

    I found some code on StackExchange which lets me convert a WAV into a series of numbers, but the result isn't particularly useful. I believe it's just re-formatting the data into python-friendly integers

    npts=len(rawdata) formatstr='%iB' % npts int_data=unpack(formatstr,rawdata) 

    This gives me a list similar to [122,42,26,12,41 ...], but it's a LONG list, even for a small file. Which it would be, for stereo audio sampled at 44KHz!

    What I'd like is to be able to do is something a little like this, taking some kind of average (at arbitrary resolution, so I can say "sample this file into 12 chunks" or 256 or whatever) of both audio amplitude and length, so I can then map the x/y dimensions of each chunk of similarly levelled audio into CAD to make shapes from. If that makes sense..

    Unfortunately I have no idea where to start with processing the wav data. Any pointers would be much appreciated. I'm pretty confident with python but currently a bit lost with theory.

    submitted by /u/auntie-matter
    [link] [comments]

    Windows 10: Anyone have luck pasting into VIM while in bash?

    Posted: 12 Mar 2018 10:02 PM PDT

    Learning Flash - Need help with an assignment.

    Posted: 12 Mar 2018 09:24 PM PDT

    So, for a project, we're working on creating this calculator that is takes the date an individual was born + the current date, and calculate how many hours the individual has been alive.

    I'm just struggling on understanding the math + how I should set variables for each factor and what not.

    Any advice is granted / appreciated.

    submitted by /u/Jbanto_Stories
    [link] [comments]

    42 Test

    Posted: 12 Mar 2018 09:02 PM PDT

    I just took the placement test for 42 Coding School. I got an 18.?? on the first game and got to puzzle number 7 in the 2 hour placement game.

    Give me the bad news...I am not going to Cali or Paris anytime soon huh?

    submitted by /u/LiquidSnake1993
    [link] [comments]

    Can someone find the raw search address for this?

    Posted: 12 Mar 2018 08:24 PM PDT

    Hi, I was making an app where I have to use the search feature on this - https://www.realcanadiansuperstore.ca/

    If this site has a direct search link can someone help me in finding it from the source code?

    submitted by /u/ItsMe170
    [link] [comments]

    how to convert raw binary data to ascii?

    Posted: 12 Mar 2018 08:14 PM PDT

    need to convert raw binary data to ascii.

    for reference, this image is to be used: https://www.ece.rice.edu/~wakin/images/lena512.pgm

    when opened with notepad, I get raw data, which I need in ASCII format.

    submitted by /u/metalloidica
    [link] [comments]

    How to schedule a node.js task to execute in the future that won't be lost if the server goes down?

    Posted: 12 Mar 2018 08:07 PM PDT

    I am currently developing the structure for a fantasy draft application that I am going to be building. In a nutshell, it allows a user to sign up, create a fantasy league, invite friends to the league, and have a fantasy in a future custom date that the user chooses. The draft will be real-time and allow all the users of the league to participate and watch as the draft unfolds.

    Right now I am thinking of what the best way of designing the architecture for the draft component would be. I've seen perfect examples in yahoo sports, ESPN, and most recently in the official English Premier League soccer fantasy website.

    So far I have thought of the following solution:

    1. The user goes through the step of creating a league and setting up the desired date and time for the draft.

    2. The league and the draft objects are created and saved to the database.

    3. The league object would store the users that joined the league, and would be linked to the draft object, which would store the draft's date and time, along with other details required for the game to work.

    4. At the same time that steps (2) and (3) occur, a task to execute the draft's logic (basically initializing the draft: determining user order, starting draft's timer, etc, and saving all this information to the database) would be scheduled with something like node-schedule (I'm using node.js and RethinkDB for my back-end btw).

    5. The task would initialize the draft logic as explained in step (4) and start emitting the necessary events to the clients that connect to the draft channel. This would involve writing all the correct logic and storing and emitting the required data. This is the main idea, which is a very early one, and I'm aware that it's probably far from great since it's my first time designing something like this. The main problem that I am thinking about is that with something like node-schedule the task would only be scheduled while the server is running, if the server ever goes down, all the scheduled tasks would be lost. What I was thinking that could be done to avoid this is reading from the database every time the server is started again and re-schedule all the draft tasks based on the information stored when the leagues were created.

    So, basically, I'm looking for some guidance from someone who is well versed on this kind of real-time/turn-based application with events happening in the future.

    Cheers in advance.

    submitted by /u/aecorredor
    [link] [comments]

    How can I set myself up for a career in programming?

    Posted: 12 Mar 2018 07:23 PM PDT

    Hello there! I'm only 14, but I've loved coding for years. It wasn't until only a few months ago that I started learning to code, and I would love to have a career in programming when I grow up.

    I want to get a head start and do things now that will further my experience in coding and give me a better shot at getting a job programming in the future, but obviously as a 14 year old that has mere months of practice there's no way anyone would hire me to help out in their right mind.

    I was wondering if anybody has any ideas on how I can build up my résumé and get a head start to launch my programming career.

    Also, I'm not sure exactly what I want to code. I have a vague idea, I think I want to be a web developer (developing games doesn't interest me, and I would like to make apps eventually but not at the moment) and I think I want to mostly work with the front-end but all of this is based off what sounds the best as I don't have much experience.

    submitted by /u/Andrew9768
    [link] [comments]

    Java: How to properly return String values from an ArrayList?

    Posted: 12 Mar 2018 03:12 PM PDT

    Hi, I'm doing homework for my computer science class and part of the homework is making an ArrayList that returns 3 inputed string values in a specific order.

    When I run the program I get an output of: [Ljava.lang.String;@3cd1f1c8"}instead of ["specialist", "inventory", "add"]

    Anyone know what I'm doing wrong? Here's the section of code:

    https://imgur.com/a/nvqj1

    submitted by /u/eichel_15
    [link] [comments]

    Help debugging TransactionTooLargeException in Android

    Posted: 12 Mar 2018 02:22 PM PDT

    I am not much of an android programmer. The structure and platform are fairly foreign to me but I am in a position where I need to duplicate the iOS application I have written. I am getting pretty close, but now I am getting a transactiontoolargeexception and thus far my digging through stack overflow hasn't helped me with this specifically. Help?

    EDIT: The difference seems to occur when I pull an object out of the SharedObjectModel instead of re-querying the server for something I already have. Coming from iOS it seems really weird to query directly from an Activity.

    submitted by /u/Xials
    [link] [comments]

    When is the greedy algorithm likely to be a solution to minimax’s horizon problem for turn based games?

    Posted: 12 Mar 2018 08:30 AM PDT

    I am more interested in the theory than the straight answer but I also have an ongoing hobby project where it is practical.

    I am writing a Java Chess AI and I am struggling to get depths greater than 8 or 10 moves ahead even with alpha beta pruning, a hashmap opening book, and sorting branches after each heuristic depth. Any tactic more complicated than a fork/skewer and the AI often gets confused.

    If I instead went to a depth of 5 or 7 and then instead of quickly evaluating the heuristic, executed lots of greedy moves (reckless piece taking), is this likely to improve the algorithm? Is there a heuristic in the literature that might tell me which of greed vs. depth is good?

    submitted by /u/moomin100
    [link] [comments]

    VIM in bash in windows cmd line in windows 10: How to copy/paste?

    Posted: 12 Mar 2018 04:12 PM PDT

    I am running the latest version of Windows 10. In windows 10, I have cmd line open. In the command line, I have entered bash. In bash, I am looking to edit/create a program using vim.

    I have tried yy p. And the more lofty cnrtl+R+" as well as cntrl+O options from VIM.

    I can't paste. I can cntrl+v at the bash layer from above. But in VIM, I enter visual block mode (which is good imo). I have right clicking, like in putty: Nothing. I have tried using the windows key, like Mac allows. Nothing.

    Any other ideas?

    EDIT: Checking to see if I can edit my .vimrc to handle the system clipboard... And I have no idea what .vimrc to modify. There is /c/.vimrc which already exists. But stackoverflow leads me to believe it should be another file. I will research this later when I have time.

    Please Help!

    submitted by /u/but_how_do_i_go_fast
    [link] [comments]

    Why are the apps from big corporations typically so bad / poorly rated?

    Posted: 12 Mar 2018 12:10 PM PDT

    To anyone that uses VB.Net to any extent professionally and might be willing to answer a few interview questions

    Posted: 12 Mar 2018 11:53 AM PDT

    As a part of my coursework, I have to find someone to interview that uses VB professionally. Needless to say, I'm somewhat struggling to find someone to interview. As I'm in dire straits, I figured I should reach out to you guys, on the off chance I could find someone willing to spare the time.

    If you might be interested, just comment below telling me if you'd prefer to answer the questions here or by pm. Thanks, everyone.

    submitted by /u/metcalsr
    [link] [comments]

    Collect groups of tiles in a 2D world

    Posted: 12 Mar 2018 11:14 AM PDT

    If 1 = wall and 0 = air then this is a sample world:

     1111100101 1100100001 1000100110 0000010000 1011000011 

    Where each 0 or 1 is given a 2D Vector to represent its location.

    Every air tile is connected to another air tile, but not all wall tiles are connected to another wall tile. There are clusters of walls that are separate from one another. How can I mathematically separate each cluster of walls into its own array or List?

    I'm doing this in C#, but I'm really just looking for a concept algorithm and/or pseudocode. I have no idea how to approach this.

    submitted by /u/Enderpig1398
    [link] [comments]

    Looking to expand programming knowledge

    Posted: 12 Mar 2018 08:48 AM PDT

    Apologies in advance as I believe this might have been asked already but I didn't see anything relevant to my situation or case.
    I am looking to expand my programming knowledge, as I have spent the last 4 years working on SAP and I would like to start the job hunting process but I feel like what I did know might not be enough for what the market asks. I like programming in general, with potential emphasis on research and/or databases.
    I have already brushed up on C++, which was my first programming language, as well as VB which is the other one I felt I really knew, but I'd like to learn more languages. I have rediscovered that I learn by way of reading and examples and assignments/homework (basically as if I was back in college) when I picked up a Python book that has sample code and exercises.
    Can anyone please recommend both languages and reference materials for me to tackle?

    submitted by /u/AraiRodz
    [link] [comments]

    Brainstorming Magnetic Swipe Card Possibilities?

    Posted: 12 Mar 2018 10:04 AM PDT

    I'm doing some research on USB connections and instructions, as well as Magnetic Stripe readers and cards and how they work. I bought a Magnetic Stripe reader/writer and am writing a driver for it. It was hard to figure out the low level USB stuff, but it's super interesting.

    Now I'm trying to expand my work on the card reader and magnetic cards, and I'm trying to come up with project ideas that I could work on for fun and more practice. One thing I thought of was, maybe encrypting passwords and storing them in the magnetic stripe on an old credit card. Or maybe encrypt your cryptocurrency wallet information on an old credit card. It's not very practical, but it could be cool, and it'd be pretty secure as far as anyone expecting anything of an old credit card if they steal your wallet.

    I'd love to hear any ideas you all might have, I really want to keep working with magnetic stripe cards. I can pretty much put anything on a magentic card, there's gotta be some good ideas out there for what I can use them for. What should I do with them next?

    submitted by /u/shplaz
    [link] [comments]

    Need help choosing an implementation method for a group project

    Posted: 12 Mar 2018 07:51 AM PDT

    Hi all,

    I am currently working on a group project for university with 2 other people, and really struggling to pick the best implementation technologies for our given statement of requirements in such a way that all of us (or at least two of us) could make reasonable contributions to the project. Our problem is that we have different skillsets and that the material we were taught at university beforehand is rather unhelpful in our situation.

    To sum it up, the statement of requirements needs us to implement somewhat of a content management system/interface which would be used internally by a company's employees. Employees will have user accounts and different access levels to managing things such as registering customers, adding new employees etc., as well as producing summary reports from the data currently in DB, and backup/restore of the database.

    Overall it's a pretty simple concept, and to me it seemed like the best implementation for this would be through web. However, the issue is that none of us have worked with back-end before, and know nothing about database integration for websites. In university the module we had about connecting a database to web services was in Java and it was very poorly explained to the point none of us basically know how to do it for our situation at this point, and to be honest I would rather avoid Java altogether (especially considering how gimmicky it will be to make the GUI).

    My question is, if we were to implement this system in web, how do we go about database integration and is it feasible to learn for 3 people and work on together in the space of about 2 months? Also, I was considering using Angular2+ for the front-end implementation, because it seems like data formatting would be a lot easier in this case. If we were to use Angular, what backend technology could we use and does anyone know of any resources that would be helpful in integrating it with Angular itself?

    Thank you if you read through this, sorry I couldn't provide a TL;DR.

    submitted by /u/Exposition_Fairy
    [link] [comments]

    Im new to coding and I need help!!!!

    Posted: 12 Mar 2018 11:44 AM PDT

    I am new to coding and want to make an learning AI. But I dont know what program to use. I definitely want to use c++ but i dont know where to get it. Please Help!!

    submitted by /u/cdudmaster2451
    [link] [comments]

    Outlook API 1.3 version not showing on Outlook Desktop Professional Plus 2016

    Posted: 12 Mar 2018 07:27 AM PDT

    Hello On this page https://github.com/OfficeDev/office-js-docs/blob/master/reference/outlook/tutorial-api-requirement-sets.md it is specified that both Outlook 2016 (MSI) for Windows and Outlook 2013 for Windows support Outlook API up to Version 1.4, but when we try to increase the minimal version in the manifest from 1.1 to 1.3, the addin works fine on web but does not show on both desktop versions.

    Currently I am working on Outlook Professional Plus 2016 with build number 16.0.4312.100, 64bit on Windows 10.

    I am trying a simple addin generated by yeoman office-generator, with only change is the minimal version from 1.1 to 1.3

    Thanks.

    submitted by /u/PetrovskiB
    [link] [comments]

    No comments:

    Post a Comment