• Breaking News

    Thursday, May 3, 2018

    How exactly does one "program" a video game? Especially large scale 3D ones? With so much going on at once, how do you even create that much detail? Ask Programming

    How exactly does one "program" a video game? Especially large scale 3D ones? With so much going on at once, how do you even create that much detail? Ask Programming


    How exactly does one "program" a video game? Especially large scale 3D ones? With so much going on at once, how do you even create that much detail?

    Posted: 03 May 2018 07:34 PM PDT

    Take the latest God Of War for example. You're telling me that there is a team of people who can make something on a scale that large that runs so fluently with minimal errors? How is that possible?

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

    [SQL] Keeping a running balance in SQL

    Posted: 03 May 2018 06:51 PM PDT

    Let's say I have a database with two tables, a table of users and a table of transactions. Each transaction involves transfer of money from one user to another and very often we would like to view the total amount of money a particular user has.

    Would it be better to sum over the list of transactions every time someone requests the balance of a particular user, or to store the total balance in the user table and update it every time a new transaction is added.

    The latter way seems much more efficient but I am worried it might break some sort of rules of "good" SQL. I'm sure it would introduce the need for periodic consistency checks.

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

    Found an Internship but need your help(guidance)

    Posted: 03 May 2018 01:14 PM PDT

    Hey guys, first of all, I want to thank you all to take your time to read this. The good news is that I will be graduating in Computer science by August and I found an internship but the bad news is that I am a little lost. I need some guidance in regards to which language/framework I should use to complete my internship project.

    Details: I was contacted by the director of a well-known high school in my city, they need a website which allows the teachers to create a result card for their students. 1) Admin will have to import all the students from an excel file to a database, assign different classes to teachers and then assign students to those teachers. 2) Once the teacher login they will be able to see the assigned students and add the grades, comments, the number of hours of absents to the grade card. Then send the grade card to the head teacher who will then verify the information, modify the grades or comments if necessary. Once the verification is complete he can create a pdf file with all the information received from the teachers.

    What language do you guys suggest to complete this the fastest and efficient way? There will a lot of interaction with the database. I can program in PHP, asp.net C#, JSP EE. I have no problem using mysql for the database connection.

    Sorry for my bad English as it's not my first nor second language. Any help will be appreciated. Thank you and have a great day.

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

    My buttons don't work for a php web app project

    Posted: 03 May 2018 09:42 PM PDT

    Hey guys, if I can get any help that'd be great! I have a project where we create a SQL database in azure and then create a web app that can manipulate the database. My database keeps track of a few college scholarships at a university. My web page views a list of my students with a button that sends them to their "award" (scholarship). the web app pulls up the scholarship in the system. I then can click add, edit or delete and it pulls up another page. When i enter the values to edit or delete and click save it doesn't work. Its frustrating as shit. I can get the code to anyone that wants to take a look, maybe someone could suggest the best way to share it.

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

    Full application vs "plugin" development

    Posted: 03 May 2018 09:07 PM PDT

    So I have an idea for a software in accounting, and I was wondering what are the advantage of programming your own program vs programming a plugin for an existing established program?

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

    C: Most efficient way to reorder a contiguous pixel array

    Posted: 03 May 2018 08:52 PM PDT

    I am working on a highly performance-critical image processing pipeline on a Jetson TX2 (with an ARM processor), which involves reading a set of images and then performing deep learning based object detection through Darknet. Darknet, written in C, has its own representation of how images are stored, which is different from how OpenCV's IplImage or a Python numpy array would store the images.

    In my application, I am required to interface with Darknet through Python. So, as of now, I am reading a 'batch' of images (usually 16) into a numpy array and then passing it to Darknet as a contiguous array using ctypes. Within Darknet, I then have to rearrange the ordering of the pixels to go from the numpy format to Darknet's format.

    While the input array is one contiguous block arranged column-wise, then row-wise, then channel-wise, and then by image, the Darknet format needs to be arranged by channel first, then by column, then by row: and contains one row per image in the batch instead of a contiguous block. The picture below tries to demonstrate the difference. (0,0), (0,1) etc. indicate (row, col), whereas in the top, C0, C1, C2.. etc indicate the column in the corresponding row.

    https://i.stack.imgur.com/hJNoX.png

    As of now, my code in C that converts the input array to the Darknet format looks like this, where it iteratively hits every pixel in every channel and puts it in a different place, while also normalizing the pixels along the way.

    matrix ndarray_to_matrix(unsigned char* src, long* shape, long* strides) { int nb = shape[0]; // Batch size int h = shape[1]; // Height of each image int w = shape[2]; // Width of each image int c = shape[3]; // No. of channels in each image matrix X = make_matrix(nb, h*w*c); // Output array format: 2D int step_b = strides[0]; int step_h = strides[1]; int step_w = strides[2]; int step_c = strides[3]; int b, i, j, k; int index1, index2 = 0; for(b = 0; b < nb ; ++b) { for(i = 0; i < h; ++i) { for(k= 0; k < c; ++k) { for(j = 0; j < w; ++j) { index1 = k*w*h + i*w + j; index2 = step_b*b + step_h*i + step_w*j + step_c*k; X.vals[b][index1] = src[index2]/255.; } } } } return X; } 

    Is there a more efficient way of doing this rearranging and normalization in C?

    • I am using the Jetson TX2: which contains an ARM processor and an NVIDIA GPU, thus having access to NEON and CUDA.
    • The image dimensions are fixed and can be hardcoded: only the batch size can change.
    submitted by /u/HV250
    [link] [comments]

    Avoid unresolved external symbols with templates

    Posted: 03 May 2018 02:53 PM PDT

    I have an implementation of a class with templates, but it has to be in the .cpp file. I've read on Stackoverflow that one way to solve this is to add include "Foo.cpp" at the end of the header file, but it doesn't seem to be working. How would I go about fixing it?

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

    Can anybody teach me how to run a program to read text off of my phone?

    Posted: 03 May 2018 06:24 PM PDT

    I have an iPhone and know how to connect it to my computer and stream the screen to it. I just have no idea where to start when it comes to reading it.

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

    Speech Bubbles in iMessage / WhatsApp

    Posted: 03 May 2018 11:48 AM PDT

    Hey guys!

    For my program I need to implement a small chat functionality. How do I solve this similar to iMessage or WhatsApp?

    The chat log shall have these popular speech bubbles. And their size must match the length of the text message.

    I use the Qt framework and the code is implemented in C++.

    submitted by /u/4realness
    [link] [comments]

    I'm looking for advice what to do with my life. If you are a programmer from USA please recommend me what city I should go.

    Posted: 03 May 2018 05:27 PM PDT

    Sorry for a long post. In a nutshell my question is What city in you opinion is the best for starting a web programming career for an immigrant?

    My story: my name is Fedor and I'm 24 y/o junior web programmer. I moved to US a week ago from Moscow because I've won a green card lottery so now I'm here in Miami, Florida, renting a small room (650$ per month) and working at a Russian supermarket (11$ per hour). At first I was happy that I managed to find a place to live and a job so quickly but now I'm slowly questioning where my life is going to. I hate my job, I'm already tired of how hot it's here in Miami and I want to have a decent future, so the decisions should be made. I try to do a little research at my free time but USA is big and there are many variables like rent prices, the amount of IT companies, average salary for simple jobs etc. so basically I believe I can be really good and passionate programmer but I only had really small real projects experience as a web programmer (doing HTML&CSS and simple js) and it's certainly not enough to easily get a job. So my question is — if you were in my situation, what city would you move to and what is the basic plan of what I should to in first months. For example now I think maybe I should fly to Chicago, get a simple job and a room there, and then at my free time build my own site portfolio, learn js frameworks and at the same time applying for any junior positions I would be able to find. What do you think about it, is Chicago a good choice? Would I be able to find a job without an American college degree? Please let me know you opinion, even if you are 17y/o junior programer — you know about American IT industry much more than I do. Thank you for any replies :)

    If you are still reading this and would like to know more details: I have a bachelor's degree from Russian aerospace university and then I won a grant and moved to Beijing institute of technology to get a master's degree in aerospace engineering which I eventually quit during my 2nd year because I realized that "it all does not matter and when I come back to Russia I wanna work as a programmer", so I did but shortly after I had to move in US and now I'm here. The reason is why I did not even try to apply for any IT positions here in Miami because my "speaking" English is still weak because I did not have much practice yet (I can read in English pretty well, my "typing" and "listening" ability is kinda ok but speaking still can be hard) I don't have any medical insurance and this kinda bothers me, I tried to look up some plans , but there are so many of them, I got lost honestly, but I'm definitely not ready to pay 200$ a month for that with my current financial situation, I only had 2900$ when I moved here and now after paying the rent, phone, food, busses and other small purchases it decreased to 1900$ and I try not to waste it mindlessly. I did even look up the possibility of going to college yet because I was sure it costs like A LOT. But I talked to one guy another day and he told me his friend got a college degree here, allegedly there are some governments programs for helping out immigrants and stuff, I definitely will dig this topic later by myself but if you know anything about it please tell me what you know or where I can read about it. Anyway thank you for reading this, I hope you have a good day and please leave a comment if you feel like you have anything to say :)

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

    Mutex for C++ not C++11

    Posted: 03 May 2018 07:55 AM PDT

    What libraries can I use for protecting shared resources but I cannot use Mutex as it requires c++11 and my target machine cannot use it.

    What is another version I could use in c++98 on linux? thanks!

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

    My nonprofit needs case management software, do you develop case management software?

    Posted: 03 May 2018 04:06 PM PDT

    My nonprofit has several large federal grants to do job training, work experience, head start, emergency housing/food services, and probably some services I'm forgetting. Because we have several grants that fund numerous types of services we've never found a case management software that works for all of our services. Instead we have 3 different case management softwares. I have a little programming experience and know some programmers and am starting to consider whether building a case management software in house is our best option. But I still don't know if there is a case management software that will let us build reports as we need them, help us update reports as the government makes changes (usually once a year or less often) and have a desktop version and a tablet version of the software so we can enter cases while we're out in the field. Does anyone know of such case management software? Even if it's a totally different industry it may be something we can work with.

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

    Whats the max cost of concat and balance 2 avl trees whose key ranges dont overlap?

    Posted: 03 May 2018 09:25 AM PDT

    as in this code which balances an immutable avl branch. Its not obviously log(treesize) because its inserting a whole tree whose height may for example be 30 different.

    https://github.com/benrayfield/wavetree/blob/master/humanaicore/wavetree/scalar/WaveTree1Ops.java

    public static WaveTree1 balance(WaveTree1 x, byte maxheightDiff){ if(maxheightDiff < 1) throw new RuntimeException("can not require maxheightDiff be less than 1"); if(x.maxheightDiff <= maxheightDiff) return x; if(maxheightDiff != 1) throw new RuntimeException( "maxheightDiff must be 1. TODO: make this algorithm work with higher maxheightDiff."); WaveTree1 newLeft = x.left.maxheightDiff<=1 ? x.left : balance(x.left,maxheightDiff); WaveTree1 newRight = x.right.maxheightDiff<=1 ? x.right : balance(x.right,maxheightDiff); //newLeft and newRight are AVL balanced //int testLeftLoop = 0, testRightLoop = 0, testLeftRotate = 0, testRightRotate = 0; while(newLeft.height+maxheightDiff < newRight.height){ //newLeft needs to be deeper or newRight shallower. //newRight is not a leaf so this always works. if(newRight.left.height > newRight.right.height){ //testRightRotate++; //Right-rotate newRight so newRight.left.height <= newRight.right.height. //newRight.left is not a leaf. newRight = new WaveTree1(newRight.left.left, new WaveTree1(newRight.left.right,newRight.right)); } //Move newRight.left to newLeft. newLeft = balance( new WaveTree1(newLeft,newRight.left), maxheightDiff ); newRight = newRight.right; } //only 1 of the while loops will execute while(newLeft.height > newRight.height+maxheightDiff){ //newRight needs to be deeper or newLeft shallower. //newLeft is not a leaf so this always works. if(newLeft.right.height > newLeft.left.height){ //testLeftRotate++; //Left-rotate newLeft so newLeft.right.height <= newLeft.left.height. //newLeft.right is not a leaf. newLeft = new WaveTree1(new WaveTree1(newLeft.left, newLeft.right.left), newLeft.right.right); } //Move newLeft.right to newRight. newRight = balance( new WaveTree1(newLeft.right, newRight), maxheightDiff ); newLeft = newLeft.left; } return new WaveTree1(newLeft,newRight); } 
    submitted by /u/BenRayfield
    [link] [comments]

    Looking for program which pair EXE with IP connection

    Posted: 03 May 2018 11:40 AM PDT

    I'm looking for program, which can show AND LOG shit like this:

    sth.exe are using 127.0.0.1:80

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

    a database app

    Posted: 03 May 2018 07:23 AM PDT

    I'm looking for a way to have a database that contains my customers info, what they ordered, and the ability to pay through it. Anybody know any sources to make this happen?

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

    Those who learned solidity and the likes, where did you learn it? I need some help setting it up

    Posted: 02 May 2018 11:20 PM PDT

    I'm trying to learn it on remix ide but every time I try to create a contract using a new browser, it defaults to creation of ballot pending. Ballot is the default browser that opens when you access the website, remix.ethereum.org. besides that, if anyone has any links that helped them get by, please pass it. I'm also trying to learn from separate blogs and not getting anywhere.

    I've installed npm, testrpc, truffle, mocha, mocha-junit-reporter. When I tried installing windows-build-tools after installing all of the above, it's just been stuck at npm so I assume I'm good to go with that too?

    Thanks for your time and help

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

    No comments:

    Post a Comment