• Breaking News

    Thursday, November 30, 2017

    Where to start gui programming? learn programming

    Where to start gui programming? learn programming


    Where to start gui programming?

    Posted: 29 Nov 2017 03:33 AM PST

    I am only somewhat competent in python, i looked at pygtk and glade but it seems so alien. Is there any other framework that i can use? Should i just learn another language for coding the gui? If so, which language should i learn? I was thinking about learning web technologies and build the gui with electron, is that a good idea?

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

    Daughter Wants to Code

    Posted: 29 Nov 2017 09:39 AM PST

    Hello Reddit coders. My 9 year old daughter has recently become obsessed with coding. They're learning the basics in her STEM classes and she is in love with it. To the point where she is researching the best colleges to go to learn all about computers and technology. (She told me the other day she decided that she has settled on going to MIT. Omfg, proud mom moment there.) So anyways, I'd love to get her something for the holidays that is coding-related. I've bought her the book "Coding for Girls" per her request, but I'm sure there's other things out there that she'd enjoy. Any suggestions for apps, games, books, anything at all would be helpful

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

    Anyone know where I can learn how to create bot/web crawler??

    Posted: 29 Nov 2017 05:08 PM PST

    I'm starting a course in Python, but would that be sufficient or is there some course out there that is specifically for creating web crawlers??

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

    Any good resources to learn assembly?

    Posted: 29 Nov 2017 01:43 PM PST

    I'm going through my universities computer organization course, and my professor has just gone way too fast for me. I know we're using the Intel x86 architecture, but I have no clue what we're doing half the time. I was wondering if anyone knows any good online resources to help me get a better handle on assembly language

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

    Not becoming overwhelmed by information and finding the answer better.

    Posted: 29 Nov 2017 09:22 PM PST

    I'm currently studying at a coding bootcamp and frankly I'm struggling. My biggest issue is looking for a resolution to a problem on stack or google and just becoming overwhelmed by the abundance of information. I guess I'm after advice on how to be a better independent worker and problem solver.

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

    Recommendations for computer vision books?

    Posted: 29 Nov 2017 11:38 PM PST

    Hi,

    I've taken linear algebra and I'm quite proficient with pyOpenCV and basic image manipulation. I'm currently working on a 3D reconstruction project and realized there's a big gap in my knowledge in terms of how to actually use linear algebra concepts to do basic things. Some terms I come across that I don't have a great idea about

    • homography

    • direct linear transform

    • epipolar geometry

    • affine transformation

    • coordinate frame vs. coordinate system?

    • in linear algebra we learn about "change of basis / change of coordinates" - this doesn't seem to take care of cases where I want to transform points from some orthogonal coordinate system to another one which is rotated

    • order operations for composing transformations together so that they don't produce garbage?

    • etc.

    I'm not yet interested in deep learning / image recognition, I just want to get down my fundamentals. Any book recommendations that address the aforementioned topics would be much appreciated! My current guide is Programming Computer Vision with Python which is just okay...the code examples are pretty good but the explanations for the theory kinda suck.

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

    Context free grammars and Ambiguity questions

    Posted: 29 Nov 2017 11:29 PM PST

    I'm learning about context free grammars right now and had a couple questions.

    1) Is there any unambiguous grammar for the language ai bj ck, where i=j or c=k? I could make an ambiguous one pretty easily but I haven't been able to come up with an unambiguous one.

    2). Are there any general tips for making a grammar unambiguous? I know there's no exact algorithm, but maybe just some rules of thumb for specific special cases? (maybe like if there are multiple epsilons, or if there's a kleene star in the regexp)

    Thanks!

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

    Any tips for Caesar Cipher decoder in C

    Posted: 29 Nov 2017 08:35 PM PST

    Hello I'm very new to programming and would like to create a program which will run on Unbuntu's terminal and will decode a Caesar Cipher encoded text file. I think the program should start with finding the frequency of all characters in the text file then the most common character will be replaced by "e" as it's the most common letter. Then I would assume the count between the most common character and e would be taken as the key. This key would then be applied to the text file shifting all the letters, which would then be displayed and the user could decide if it is the correct key or not and if not the second most common character would be taken as "e" and the process would continue like that. However I have no clue how to start the whole thing off or if my idea is possible, so any suggestions or tips would be appreciated.

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

    [c++] sudoku solver revisited

    Posted: 29 Nov 2017 08:33 PM PST

    https://www.reddit.com/r/learnprogramming/comments/7fconw/c_trying_to_build_a_sudoku_solver/

    So my teacher suggested that I make 9 separate truth tables for each 3x3 block for the whole board. I'm trying to have it check for each row, column, and block. If i try to add way to check each column and row the program will crash. However, the way i have it now the program runs but nothing changes. Right, now I'm only want it to work for the top left 3x3 block.

    It was also suggested that check1() and set1() repeat nine times for each block

    edit:added some changes to set1()

    #include <iostream> using namespace std; bool check1(int x, int y, bool status) { //The bool array represents numbers 1-9 in order with position //See num[] array in set1() //{1,2,3,4,5,6,7,8,9} int k; bool ans[] = {true,true,true,true,true,true,true,true,true}; for (int x = 0; x < 9; x++) { for (int y = 0; y < 9; y++) { if(status == false) { //false means that number is eliminated from the ans[] array ans[k-1] = false; } } } } //set numbers for top left 3x3 block void set1(int board[9][9], int x ,int y) { bool status = true; int n, row, col; //use int array to correspond with bool array in check1() int num[] = {1,2,3,4,5,6,7,8,9}; //Eliminate non-zeros first in corresponding block //while loop should isolate each block while(x >= 0 && x <=2 && y >= 0 && y <=2) { for(row = (x/3)*3; row < (x/3) + 3; row++) { for(col = (y/3)*3; col < (y/3) + 3; row++) { //Eliminate non-zeros in column if(row != x && board[row][y] == board[x][y]) { while(board[x][y] != 0) { status = false; check1(x,y,status); } } //Eliminate non-zeros in row if(col != y && board[x][col] == board[x][y]) { while(board[x][y] != 0) { status = false; check1(x,y,status); } } if(row != x && col != y && board[row][col] == board[x][y]) { while(board[x][y] != 0) { status = false; check1(x,y,status); } } } } } //Enters new numbers in zero cells in each block //using num[] array //while loop should isolate each block while(x >= 0 && x <=2 && y >= 0 && y <=2) { for(row = (x/3)*3; row < (x/3) + 3; row++) { for(col = (y/3)*3; col < (y/3) + 3; row++) { if(row != x && col != y && board[row][col] == board[x][y]) { while(board[x][y] == 0) { for(n = 0; n < 9; n++) { board[x][y] = num[n]; status = false; check1(x,y,status); } } } } } } } int main() { int x,y; int board [9][9]= { {0,7,5,0,9,0,0,0,6}, {0,2,3,0,8,0,0,4,0}, {8,0,0,0,0,3,0,0,1}, {5,0,0,7,0,2,0,0,0}, {0,4,0,8,0,6,0,2,0}, {0,0,0,9,0,1,0,0,3}, {9,0,0,4,0,0,0,0,7}, {0,6,0,0,7,0,5,8,0}, {7,0,0,0,1,0,3,9,0}, }; //Display and declare original board for(int x = 0; x < 9 ;x++) { for(int y = 0; y <9; y++) { cout << board[x][y] << " "; } cout << endl; } cout << endl; //int block = (x/3)*3 + (y/3); cout << "Answer: " << endl; //Replace zeros with numbers 1-9 set1(board,x,y); for(int x = 0; x < 9 ;x++) { for(int y = 0; y <9; y++) { cout << board[x][y] << " "; } cout << endl; } } 
    submitted by /u/firefly502
    [link] [comments]

    Need some guidance in C++

    Posted: 29 Nov 2017 09:43 PM PST

    Apologies if this has been asked already. I tried using search but nothing came up.

    I've been learning C++ for a while now using a textbook (Object Oriented Programming by Robert Lafore) and online resources. I know loops, arrays, functions, pointers, classes, structures, heredity, function overloading, operator overloading, virtual functions, streams and files etc. I consider myself pretty fluent at this point in the topics I've learnt and can create intermediate level programs implementing what I've learnt pretty well. ( created a program that encrypts text files last week)

    However my question is where do I go from here? What should I learn more to be able to create advanced level programs using GUI in C++ ? Any particular libraries I should learn ? Any books or onlines guides ? All help will greatly be appreciated.

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

    Need advice: if I am close to getting a computer systems networking degree, should I just finish it off and go back to school for a programming degree, drop my networking courses and switch to programming ones, or finish off my systems degree and learn programming on my own?

    Posted: 29 Nov 2017 11:39 PM PST

    Will my "computer" degree help in any way to get into the programming field. I messed up and realize late that I want to do programming instead of networking or server management. Just needed advice whether I should pursue a degree in programming as well or just try to learn it on my own and hopefully build my own portfolio. I am still learning programming but I'm very motivated.

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

    [Java] FileWritter not writting

    Posted: 29 Nov 2017 10:59 PM PST

    Why it's not writing? the only answers i found are "you didn't close it" but mine is closed :/

    public class Counter { private FileWriter writeDisplay; public Counter() throws Exception { buildFiles(); } public void buildFiles() { try { this.writeDisplay = new FileWriter("Display.txt", true); } catch (Exception ex) { System.out.println("Display.txt is missing"); } } public void test() throws Exception { this.writeDisplay.write("hii"); // NOT WORKING! this.writeDisplay.close(); } 

    Code in main

     Counter c = new Counter(); // TESTS c.test(); 

    If this is code should write "hii" to display.txt then my Netbeans is working bad?

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

    [C++] Attempting to create a vector using a type in another .h file. Getting a scope related error

    Posted: 29 Nov 2017 10:55 PM PST

    As the title suggests, I'm trying to create a vector of cards to use as a deck, however when I try to declare it in my deck.h file, I get an error saying "card is not declared in this scope" despite the fact I have included the card.h file which has the card struct inside. I also have a functioning default constructor. I've tried using things like string in said vector, and that works. What's going on?

    Here is a screen cap of the two files http://puu.sh/ywoNx/8bceea5f75.png

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

    Are functions calling functions calling functions bad?

    Posted: 29 Nov 2017 08:33 PM PST

    I wrote a script that is a subnet calculator. It takes an IP address and its dotted decimal or numerical subnet mask and finds the network address, broadcast address, and range. For example, 10.1.1.0/24 or 10.1.1.0 255.255.255.0 will return a network address of 10.1.1.0, broadcast of 10.1.1.255, and the usable range between

    To do this I had to use several functions that called another.

    e.g

    function_a(function_b(function_c(function_d()))) 

    I did this because my functions are simple and I plan on using them for other purposes besides subnet calculation. I have one function that takes a user IP input and converts it into a list with each octet being one index in the list. That gets passed to another function that takes each index and converts to a binary string and adds them together for a 32 bit binary number, then that string and the subnet mask gets passed to another function to calculate the network/broadcast address and usable ranges.

    Is this bad practice? I feel so dirty doing it like this

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

    Why Python and Pygame are a great pair for beginning programmers

    Posted: 29 Nov 2017 06:28 AM PST

    I've been teaching my kids programming for many years, primarily with Python and Pygame. I am interested in the experience of other parents and teachers. Recently, I've moved to teaching a middle school child JavaScript using Phaser. There are many teaching challenges with teaching JavaScript to kids. I've outlined my ideas in the article below and would like more feedback and opinions as I've thought about this for years, but am an amateur/hobbyist teacher and not a professional educator. I'm also interested in if moving to JavaScript is a good choice. There are several problems with variable scoping, difficult use of "this", need to manage CSS/HTML, JavaScript and JS package versioning. Despite the problems, I am powering through with JavaScript with my middle school student. More of my experiences are below. Thank you. https://opensource.com/article/17/11/pygame

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

    What is the difference between these three Nanodegrees: AI, Machine Learning, & Deep Learning?

    Posted: 29 Nov 2017 09:10 PM PST

    I am not able to understand what is the difference between these three nanodegrees.

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

    [Homework] C++ - Outputting a vector returned from a function.

    Posted: 29 Nov 2017 08:57 PM PST

    I have a lab assignment due in a few days, and this is the last problem that I'm struggling with. I need to write a vector<int> function that takes an integer and returns a vector of its prime factors (ie, inputting 100 would output {2 2 5 5}). I was able to code the factoring part, but I'm having trouble returning the vector to main so I can output it.

    The instructions say that the function needs to be declared in the following way:

    vector<int> factor(int n); 

    This is the code I've created so far:

    #include <iostream> #include <vector> using namespace std; vector<int> factor(int n); int main() { cout << "Please enter an integer: "; int num; cin >> num; factor(num); cout << endl; for (int i = 0; i < factor.size(); ++i) { cout << factor[i] << " "; cout << endl; } return 0; } vector<int> factor(int n) { vector<int> temp; int i = 2; do { if (n % i == 0) { temp.push_back(i); n = n / i; i = 2; } else { i++; } if (n / i == 1) { temp.push_back(n); } } while (i * i <= n); for (int a = 0; a < temp.size(); ++a) { cout << temp[a] << " "; } return temp; } 

    Compiling returns the following:

    exercise4.cpp: In function 'int main()': exercise4.cpp:15:20: error: request for member 'size' in 'factor', which is of non-class type 'std::vector<int>(int)' cout << factor.size() << endl; 

    I've been wracking my brain for the past couple days trying to figure this out, and I'm going to go to one of the CS tutors on campus tomorrow, but I wanted to see if reddit could help in the meantime.

    If anyone could help push me in the right direction to get this to work, that would be greatly appreciated.

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

    [Rails] Best resources to learn rails (https://albertomontalesi.github.io/blog/bestof/best-resources-to-learn-rails-in-2017/)

    Posted: 29 Nov 2017 11:54 PM PST

    A collection of what I have found to be the best resources to learn ruby on rails online, both free and paid.

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

    Is CSS kind of like drawing, where there is a certain amount of natural talent involved, or should any programmer be able to make a pixel perfect web page if given a mock up?

    Posted: 29 Nov 2017 05:07 PM PST

    C - Can anyone see why the median_time() function doesn't work? including what I'm doing wrong with the compare functions.

    Posted: 29 Nov 2017 10:38 PM PST

    Android client socket not talking with Unity C# socket

    Posted: 29 Nov 2017 10:11 PM PST

    I'm using an Android phone to talk with my Unity game. I wrote a script in regular C# to listen for a socket connection and print out the data that is being read. It works just fine when I run on visual studio, but when I copy paste pretty much the same code into Unity, my Android phone suddenly cannot talk anymore to the socket.

    Android code responsible for talking with the socket: https://gist.github.com/bhazero025/0ad2d6f232638af72ba50913f8a25de7

    C# Code that works: https://gist.github.com/bhazero025/eaff18fb15d7581e9a906f3f04bbfc97

    Unity code that does not work: https://gist.github.com/bhazero025/5874262a95a83986a656c317802130e3

    The android code hangs when connection to the Unity code. Am I doing something horrible wrong?

    Edit: It works if I build and run the project but not from Unity itself

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

    Java rookie looking for guidance

    Posted: 29 Nov 2017 11:28 AM PST

    Hey guys, I'm just looking for tips with my java experience and programming in general. I have fooled around with programming for about 7 months but went back to school for software engineering this fall and have done well so far. My first CS class was very heavy in Java and we are finishing with Arrays before our final. I have done very well but feel like arrays have been my first real learning curve, is that normal? Also, how much time should I invest in practicing every week to get better in general outside of class? I want to work on other languages soon just to get my feet wet. Next semester I have Data Structures, Linear Algebra, and Discrete Math so I'm trying to prepare myself over the X-mas break. Any tips or ideas would be most appreciated to help feel better prepared for this career field.

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

    Where Can I learn Programming? (Need special help)

    Posted: 29 Nov 2017 03:56 PM PST

    I have been using Khan Academy but then I got to Games and visualizations. I can't program by reading something I need to have someone show me how to program. It's weird I know, but I could never learn how to do something by being told how to do it.

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

    Cant get If statement to work

    Posted: 29 Nov 2017 09:42 PM PST

    #include <iostream> #include <string> using namespace std; int main() { bool isHungry = false; if ( isHungry == true); { cout << "Grab some food..." << endl; cout << "Eatting food.." << endl; } cout << "Sit on couch." << endl; } 

    I'm new to programming and ive been reading a text book i bought on C++. ive typed this code out yet when i run whether i have isHungy = false, or isHungry = true, it always shows "Grab some food..." and "Eatting food.."

    Can anyone tell me what im doing wrong?

    p.s.can anyone explain to me how to use a code box on this forum?

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

    I made a game in Scratch and it is malfunctioning... (HELP?)

    Posted: 29 Nov 2017 05:29 PM PST

    I can't post the code here but I can link it - https://scratch.mit.edu/projects/144182960/

    It was working all fine before, and someone was even able to beat it! I haven't touched it since so I think that the website itself is to blame.

    Here's my attempt - https://www.youtube.com/watch?v=f3_IH0GEl98

    The problem is on level 6 when a blue laser is supposed to appear after you hit the purple.

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

    No comments:

    Post a Comment