• Breaking News

    Friday, March 22, 2019

    I have to give a short talk to girls ages 9-11 and need help Ask Programming

    I have to give a short talk to girls ages 9-11 and need help Ask Programming


    I have to give a short talk to girls ages 9-11 and need help

    Posted: 22 Mar 2019 08:09 PM PDT

    I'm giving a talk on Monday to my daughters "Girls who code" group and I'm looking for some ideas. My thoughts were to talk to them about what types of jobs there are doing software development, how learning to program can help them in their everyday lives, or even how almost everything they use in their lives involves software (phones, tvs, cars, the programmable lights in the building, watches, calculators, etc). Do you have any ideas? I'm looking to fill between 15-20 minutes of time.

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

    Frontend Developers, which framework ( among Vue, React and Angular ) do you think is the best to invest time in 2019?

    Posted: 22 Mar 2019 09:59 AM PDT

    Should a teen learn how to code

    Posted: 22 Mar 2019 09:52 PM PDT

    I have a lot of free time and wanted to know how useful programming will become in the future and will we need this knowledge. Also is programming fun or is it as boring as people say it is. Also, one of the possible things I might study in University is computer science..

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

    Is there any social networking platform for programmers to find other programmers for collaboration ?

    Posted: 22 Mar 2019 09:50 PM PDT

    Tips on Freelance Web Developing?

    Posted: 22 Mar 2019 09:43 PM PDT

    I want to freelance in college to support myself, I know Javascript along with Node Express etc. Any tips for getting into Freelance or just advice in general? Thanks!

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

    Front-end architecture question from embedded developer

    Posted: 22 Mar 2019 04:48 PM PDT

    Hi all,

    I'm an intermediate software engineer who has been working mostly on embedded systems (C/C++) and some backend (C++/Python) related projects in the past. I am currently in the process of exploring/de-risking the UI portion of a project which will consist of HTML/JS front-end (more specifically using the Boostrap framework).

    To give some context the project involves multiple nodes that consist of a HAL (python) to interface with multiple hardware devices. This HAL is used by a service layer (python) that is driven via http requests to launch routines on the different HW.

    The nodes further communicate via the http API with a centralized web app that provides reporting/analysis capabilities (FYI, not actually relevant to the question).

    My question is with regards to the service layer: this component uses a python backend (http API), but should communicate with a simple UI (intranet type of web site using Bootstrap). There are also multiple of these services running on the same physical machine that will communicate with the same UI.

    What is the general approach used to implement this? For example how can my various python daemons notify the UI when the state of a HW changes in order to update the view? How to actually update the view (pardon my web ignorance, I am familiar with static websites, but clueless about how to dynamically construct the appropriate view as my backend notifies the UI of changes)?

    Thanks for clarifying!

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

    Not Knowing What To Program.

    Posted: 22 Mar 2019 02:36 PM PDT

    I always get into this situation where I have no clue what to program next. What do you guys do when you're in a situation like this?

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

    Getting my PHP website live

    Posted: 22 Mar 2019 07:34 PM PDT

    Hey all,

    As I side project I re-built a website for a friend using PHP just for fun. Turns out it worked well and I kinda wanted to getting it out publicly to show him and also show others. Was wondering if anyone could give me some tips about getting it out publicly. This would be my first time doing this and I have some basic knowledge of it. For reference I have built the website using php (Slim and Twig) and also am using Mysql (phpmyadmin) which has been running using XAMPP. The only things I am not sure about are the following:

    - Once I have my domain name do I need to get it hosted by the same provider?

    - How will I setup mysql once hosted ?
    - Can I setup a cron job on the hosting website?

    - Is there a "Go to" website for hosting and domains names?

    Sorry if this is super broad!

    Happy Coding!

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

    [C++][GitHub] Trouble running a program downloaded from github

    Posted: 22 Mar 2019 05:42 PM PDT

    Hi, I wanted to try out this software. I've downloaded it from Github but I have no idea how to actually run the CPP files.

    I've got Visual Studio 2017 and I think I've correctly installed the OpenFrameworks extension it needed - but from there I'm at a loss.

    What should I do next to actually run the program?

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

    What must be done to make an API instant?

    Posted: 22 Mar 2019 05:30 PM PDT

    i use open source easyappointments for scheduling. I'm building a site in bubble.is I can communicate between the sites with webhook, but it takes 5-10 minutes after an appointment is made.

    I see "instant" zaps on zapier, so I know instant communication is possible between sites, I just don't know what it's called, or how it's done.

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

    Electron vs C# engine?

    Posted: 22 Mar 2019 01:07 PM PDT

    I use macOS and want to build a small-ish tool that'll sync through the internet. I was about to start with JS like I usually do, but since there's a seemingly great port of Visual Studio to mac exists (and I very much like C# too), I was wondering which should I use so that my app can be run at least in Windows and Mac.

    I've read one thing that says no problem building from mac Windows&Mac apps; other places say it's not possible... Maybe it's the whole Mono-Xamarin-VS that got everyone confused.

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

    [C++] The question involves find words in a .txt file. I'm unsure of how to ask this question without first showing a snippet of the code and an example of the .txt file.

    Posted: 22 Mar 2019 04:36 PM PDT

    Sorry, I don't think I asked my question properly. The text file is formatted like this.

    BOOK 1 CHAPTER 1 1 words 2 words 3 words 4 words 5 words 6 words BOOK 2 CHAPTER 1 1 words 2 words 3 what I need to find 4 words 5 words 

    Basically, when the user asks for line 4 in chapter 1 of book 2, I need to output it to them. The issue is that I cannot figure out how to output line 4. The snippet of my code.

    string line, bookNum, chapter, usersLine; bool foundLine; while(!foundLine) { getline(fromBook, line);//fromBook is the .txt file if (line == "BOOK " + bookNum){ } if (line == "CHAPTER " + chapter){ } if (line.substr(0, usersLine.length()) == usersLine){ //usersLine is the what the user wants foundLine = true; } if(fromBook.eof()){ cout << "No match found." << endl; break; } } cout << line << endl; 

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

    [C#]Win Server terminal services management

    Posted: 22 Mar 2019 04:25 PM PDT

    I am trying to create a small app to help manage our shared servers.

    Multiple users login to a VDI desktop using personal credentials. But from this shared machine, they login to other shared "work" servers using shared credentials. Each "work" server can have two users.

    Problem is that each session of the work machines does not know which user is logged in because all we know of the incoming connections is the IPAddress (which is the same for all VDI users since its shared desktop) and port number (which is generic TermSvcs 3389 port). Is there a way to link a session of the shared VDI to a particular connections from a "work" machine?

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

    In jquery datatable how can I measure if a row is displayed without changing which rows are displayed?

    Posted: 22 Mar 2019 03:39 PM PDT

    I can identify the rows by their last column I added a custom id as the last thing in the row's data, without adding a column for it so it doesnt display the custom id.

    https://datatables.net/forums/discussion/41247/row-visible says "there is no row().visible() method. For that you have to use search", but the search function (which I call other times) modifies which rows are visible.

    If I must, which "internal" funcs in datatables1.10.18.js should I call?

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

    Multithreading and networking

    Posted: 22 Mar 2019 03:23 PM PDT

    So I'm working on something in C# that needs to be able to handle input and output from a potential 1000+ sources at the same time. Would it be best to have each connection handled in its own, separate thread? Or would it be best to group them to reduce the thread count?

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

    How much would it cost to build a simple Undelete File program for Windows?

    Posted: 22 Mar 2019 02:49 PM PDT

    A program with a simple UI that can recover certain files that have been deleted from the recycling bin and restore them?

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

    Odd Error (C#/Selenium)

    Posted: 22 Mar 2019 02:00 PM PDT

    Hello everyone, at the moment i'm doing some web testing with Selenium webdriver (with c#) and receiving the following error (error does not fail the program, however i'd like to know what causes it). Ive tried to google it but only seem to end up getting results in regards to android development and wasn't sure it would apply to my situation.

    This is the error: [3532:3380:0322/215423.380:ERROR:platform_sensor_provider_win.cc<68>] Unable to create instance of SensorManager: Class not registerd (0x80040154)

    Could it be it's concerning high memory usage or something? Thanks for taking the time to read about my problem.

    Edit: it's a console window program running on Windows Server 2012 R2 with 1024 MB Ram.

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

    [C++] Undefined reference to a public class method.

    Posted: 22 Mar 2019 01:37 PM PDT

    I'm having trouble compiling this code. I am able to call the constructor without any issue, but any attempt at calling the public method Add() or Remove() is greeted with an error, and I'm not sure what I'm missing:

    Error:

    > exit status 1 > /tmp/main-f27d72.o: In function `main': > main.cpp:(.text+0x78): undefined reference to `Department<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >::Add() const' > clang: error: linker command failed with exit code 1 (use -v to see invocation) 

    Header File:

    #include <string> #include <iostream> template <class Type> class Department { private: ... public: Department(const std::string & deptName){...} ~Department(){}; bool Add() const; bool Remove() const; }; 

    Implementation File:

    #include "Department.h" #include <iostream> ... template <class Type> bool Department<Type> :: Add() const {//TODO Specs if (IsFull()) return 0; else { std::cout << "Enter employee ID:\t"; std::cin >> employee[counter]; std::cout << "Enter employee salary:\t"; std::cin >> salary[counter]; } counter++; } template <class Type> bool Department<Type> :: Remove() const {//TODO: Specs return 1; } 

    Main Client:

    #include <iostream> #include "Department.h" int main() { Department<std::string> dept1("CIS"); dept1.Add(); } 
    submitted by /u/Vulg4r
    [link] [comments]

    [Java][SQL]How to insert a JPA entity with a ManyToOne-relationship into remote MySQL-database_

    Posted: 22 Mar 2019 03:00 AM PDT

    I posted my question here on Stack Overflow. Hope linking it is appropriate, as formatting it there is infinetively better than here.

    Basically I went from not using @ManyToOne/@OneToMany-annotations, to using them and I am unsure of how to change my SQL-queries to make it work with the new entity structure.

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

    Need Help

    Posted: 22 Mar 2019 01:13 PM PDT

    I do not know am i allowed to post here,But i need someone to help me crack a Checker for Combolists made by 15 yr old(Shouldnt be hard for someone with programming skills) Its written in C++,Its an .Exe file

    It works by checking a FTP for authentication key to see is it working key.

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

    Help with c++ assignment using strings and arrays

    Posted: 22 Mar 2019 10:36 AM PDT

    Hello I am a second semester software development student and am having problems working with strings in c++. I am trying to have the user input a first and last name for their employees then printing that out along with the rest of the employee information. i tried just using strings but it would just stop it from printing anything else out once i printed the names. i also tried using chars but am not really familiar with them i would appreciate any solutions or help that could be offered. here is my code and assignment requirements

    Declare a Struct data type suitable to hold an employee record like the following:

    ID,First Name,Last Name,Pay Rate, Hours

    NOTE: Do not store any additional information in the Struct! (Gross Pay)

    1. Using your data type, write a C++ program that allows the user to enter five employees into an array.
    2. After the user is finished entering the data, the program should use a loop to print a report to the console that contains the following:
      1. Each employees' ID, Name and Gross Pay.
      2. Total Gross Pay for all Employees at the end of the report.
    3. Extra Credit (5 points):
      1. Before asking the user to enter employee data, as them how many employee's they have. Then dynamically allocate the array based on the input.
      2. When submitting, write a comment stating that you completed the extra credit.

    struct employee
    {
    int id;
    string fName;
    string lName;
    float payRate;
    float hours;
    };
    int main()
    {
    int numPeople = 0;
    float *grossPay = new float[numPeople];
    float totGrossPay = 0;
    cout << "How many workers do you have?: ";
    cin >> numPeople;
    employee *workers= new employee[numPeople];
    for (int i = 0; i < numPeople; i++)
    {
    cout << "Enter information of employee " << i+1 <<"\n";
    cout << "ID: ";
    cin >> workers[i].id;
    cout << "Pay Rate: ";
    cin >> workers[i].payRate;
    cout << "hours: ";
    cin >> workers[i].hours;
    }

    for (int i = 0; i < numPeople; i++)
    {
    grossPay[i] = workers[i].payRate * workers[i].hours;
    totGrossPay = grossPay[i] + totGrossPay;
    }
    cout << "\nEmployees\n";
    for (int i = 0; i < numPeople; i++)
    {
    cout << "ID:" << workers[i].id<<"\n";
    cout << "Pay Rate:" << workers[i].payRate<< "\n";
    cout << "Hours:" << workers[i].hours << "\n";
    cout << "Gross Pay:" << grossPay[i] << "\n\n";
    }
    cout << "Total Gross pay:" << totGrossPay;
    _getch();
    return 0;
    }

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

    Converting Quaternions to Euler angles in Python

    Posted: 22 Mar 2019 10:24 AM PDT

    For my Senior design project I'm trying to convert Quaternions to Euler Angles but I'm having some issues. I have two functions that take values from my BNO055 sensor and simply displays the values and helps to distinguish if the conversion function is working properly (Shown below)

    def print_euler(): heading, roll, pitch = bno.read_euler() print("Pitch:{0:0.2F} Roll:{1:0.2F} Heading:{2:0.2F}".format(pitch, roll, heading)) def print_quaternion(): x,y,z,w = bno.read_quaternion() print("x:{0} y:{1} z:{2} w:{3}".format(x, y, z, w)) 

    This is my conversion function that I am using but I'm not entirely sure the math is 100% correct as I've sourced it from multiple places.

    def quaternion_to_euler(x ,y , z, w): # ROLL sin_r = 2*(w*x + y*z) cos_r = -1*(x*x + y*y) roll = math.degrees(math.atan2(sin_r, cos_r)) #roll = math.degrees(math.atan2((2*x*w - 2*y*z) , (1 - 2*x*x - 2*z*z))) # Ignore # PITCH sin_p = 2*(w*y - z*x) if(math.fabs(sin_p) >= 1): pitch = math.degrees(math.copysign(math.pi / 2, sin_p)) else: pitch = math.degrees(math.asin(sin_p)) #HEADING sin_h = 2*(w*z + x*y) cos_h = -1*(y*y + z*z) heading = math.degrees(math.atan2(sin_h, cos_h)) #heading = math.degrees(math.atan2((2*y*w - 2*x*z) , (1 - 2*y*y - 2*z*z))) # Ignore return heading, roll, pitch 

    When I run my program I check the output and use an online converter(Converter) to see if the input Quaternion gives me the same Euler angle that the sensor does but they don't quite match up, sometimes being off by a few decimal places other times being off by whole numbers. If someone could check to see if my math is correct that would be much appreciated because I think thats where the problem is. Also if you have any good sources on quaternions to euler angle conversions please let me know! I've found a few but they talk more about what a quaternion is and I'm only interested in just converting it into a euler angle. Thanks for the help!

    Edit: I also have sample output if needed

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

    [c#] Generating a Deck of cards using two loops and a list.

    Posted: 22 Mar 2019 04:12 AM PDT

    Can somone please explain where i am going wrong here? I managed to get it to generate 52 unique cards but when i itterate through my "Deck" to show the value, all the cards are value 13. I believe it is due to where in the code i am adding the cards to the list but it could be possible that this is a very bad way to go about doing this and i should just use an array and itterate through each suite inside that.

    I tried adding a counter inside the constructor as an ID for when each card is create but this number does not increment so I know my code is broken. Thanks in advance for any help

    {

    public int Suite

    public int Value

    public string cardString;

    public int num;

    public Card ()

    { num++; }

    public static void GenerateDeck()

    {

    List<Card> Deck = new List<Card>();

    for (int c = 1; c < 5; c++)

    {

    Card card = new Card();

    {

    card.Suite = c;

    }

    for (int k = 1 ; k <=13; k++)

    {

    card.Value = k;

    {

    switch (card.Suite)

    {

    case 1:

    card.cardString = "Hearts";

    break;

    case 2:

    card.cardString = "Diamonds";

    break;

    case 3:

    card.cardString = "Spades";

    break;

    case 4:

    card.cardString = "Clubs";

    break;

    }

    if (card.Value == 1)

    {

    card.cardString = "Ace of " + card.cardString;

    }

    else if (card.Value > 0 && card.Value <= 10)

    {

    card.cardString = card.Value.ToString() + " of " + card.cardString;

    card.Value = k;

    }

    else if (card.Value == 11)

    {card.cardString = "Jack of " + card.cardString;}

    else if (card.Value == 12)

    {card.cardString = "Queen of " + card.cardString;}

    else if (card.Value == 13)

    { card.cardString = "King of " + card.cardString; }

    Deck.Add(card);

    }

    Console.WriteLine(card.cardString);

    }

    Console.ReadLine();

    }

    foreach (var item in Deck)

    {

    Console.WriteLine("CARD SUITE {0} AND CARD VALUE {1}, num{2} ", item.Suite, item.Value, item.num

    );

    }

    Console.WriteLine(Deck.Count);

    Console.ReadLine();

    }

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

    What would be the optimal way to implement the Observer design pattern using JavaScript

    Posted: 22 Mar 2019 09:15 AM PDT

    Say I had a message class and a conversation class. The conversation class can have between 2 and however many people the server supports.

    Now say I wanted to use these classes in conjunction with an Observer design pattern in order to display and dynamically update the main messaging page. I would also like to send notifications to the people in the conversation. What would be the best approach? What would be the Observer and would be the Observable in such a case?

    Thanks in advance!

    submitted by /u/Raper-Of-Mars
    [link] [comments]

    Not sure if this is the right place to ask, but I would like to automate my downloading of .pdfs from a website.

    Posted: 22 Mar 2019 09:13 AM PDT

    I'm searching court dockets on oscn.net to create a spreadsheet of information. I have a broad search criteria and would like to be able to search, then have an existing app or find some way to automatically download the .pdfs that I need.

    Can it be done?

    Is it free/cheap/fast to set up?

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

    No comments:

    Post a Comment