• Breaking News

    Wednesday, January 10, 2018

    Where to find someone to make a program for? Ask Programming

    Where to find someone to make a program for? Ask Programming


    Where to find someone to make a program for?

    Posted: 10 Jan 2018 05:07 PM PST

    I am in a Software Engineering class at my University, and most of the class consists of getting into teams and building a program of our choosing, but we have to find a "customer" who will tell us what they want in this project. Basically just to experience someone else calling the shots and telling us what features they would like to see. Pay is not necessary, and it would be cool to do something nice for a nonprofit or something, but I just don't know where to look for people who need a program built. Any ideas?

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

    From where is this code found in the famous *Programming sucks* rant article ?

    Posted: 10 Jan 2018 08:09 AM PST

    Hello everyone,

    I read the Programming sucks article, where some code snippets are. I can recognize Ook, brainfuck, C, but the two other snippets i can't.

    The first is

    `r```````````.H.e.l.l.o. .w.o.r.l.di 

    I guess it's one golfing language (and i doubt it print the final exclamation mark), but my real question is about the second snippet, which, i quote, According to the author, that program is "two lines of code that parse two lines of embedded comments in the code to read the Mayan numbers representing the individual ASCII characters that make up the magazine title, rendered in 90-degree rotated ASCII art." :

    #:: ::-| ::-| .-. :||-:: 0-| .-| ::||-| .:|-. :|| open(Q,$0);while("){if(/^#(.*)$/){for(split('-',$1)){$q=0;for(split){s/| /:.:/xg;s/:/../g;$Q=$_?length:$_;$q+=$q?$Q:$Q*20;}print chr($q);}}}print"n"; #.: ::||-| .||-| :|||-| ::||-| ||-:: :|||-| .:| " 

    Searching for the code or the explanation itself only leads me to copies of the initial article.

    My questions :

    Thank you for your time !

    EDIT: add answers.

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

    Cannot understand why this (short) python program behaves like it does

    Posted: 10 Jan 2018 12:37 PM PST

    Hi, newbie here! I'm writing my first short python programs, and I'm stuck with this one. This program asks two questions, and should stop after the user makes three wrong guesses. The program works as expected with the first question, and stops itself after three wrong guesses.

    However, I cannot understand why, with the second question, after the third wrong guess, the first question is repeated. I already tried using pythontutor.com, and asked the question on Stackoverflow, but the guy who answered wasn't helpful at all and basically dismissed my question. Any help would be greatly appreciated!

    easy_text = '''Hello __1__!' In __2__ this is particularly easy; all you have to do is type in: __3__ "Hello __1__!" Of course, that isn't a very useful thing to do. However, it is an example of how to output to the user using the __3__ command, and produces a program which does something, so it is useful in that capacity..''' def split_string(): global easy_text_splitted easy_text_splitted = easy_text.split(" ") return None def level1(): print """You will get 3 guesses per problem The current paragraph reads as such:""" print easy_text return first_question(3) def first_question(guesses): while guesses > 0: split_string() first_answer = raw_input("What should be substituted in for __1__?") if first_answer.lower() == "world": easy_text_splitted[1] = first_answer easy_text_splitted[19] = first_answer new_easy_text = " ".join(easy_text_splitted) print new_easy_text second_question(3) else: guesses -= 1 print "That's not the answer I expected. You have " + str(guesses) + " guess(es) left" return first_question(guesses) def second_question(guesses): while guesses > 0: split_string() second_answer = raw_input("What should be substituted in for 2?") if second_answer.lower() == "python": easy_text_splitted[4] = second_answer new_easy_text = " ".join(easy_text_splitted) print new_easy_text else: guesses -= 1 print "That's not the answer I expected. You have \n " + str(guesses) + " guess(es) left" return second_question(guesses) def level_selection(index): level = raw_input("Choose the desired level of difficulty: easy, \n medium, or hard ") if level.lower() == "easy": return level1() if level.lower() == "medium": return level2 if level.lower() == "hard": return level3 else: print "Error" index -= 1 if index > 0: return level_selection(index) return "Bye!" print level_selection(3) level2 = "You selected medium" level3 = "You selected hard" 
    submitted by /u/gabrielb86
    [link] [comments]

    I understand what pointers/reference variables are, but I can't wrap my head around why you would use them

    Posted: 10 Jan 2018 10:01 AM PST

    Like I said, I understand the definition of a pointer/reference variable. I understand that it's not holding the actual value, but an address that essentially "points" to the value.

    For some reason, I am just having the hardest time wrapping my head around when/why you would actually use these in a practical situation. Can anyone give some (somewhat simple) examples for why you would need to use a pointer over a normal variable?

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

    Facebook Workplace RSS feed posting bot

    Posted: 10 Jan 2018 04:39 PM PST

    Hi all,

    I'm in the process of playing around with getting a bot to work to post RSS feeds to our Workplace by Facebook page(s).

    I've been trying to get the sample code to work, however with little luck.

    Sample code posted by Facebook to their Github:

    https://github.com/fbsamples/workplace-platform-samples/tree/master/FeedPoster

    Is anyone able to point me in the right direction?

    I've followed all the instructions provided, however when I try run the clock JS file, I get Syntax error code 800A03EA. I'm not quite sure where I've gone wrong!

    Thanks!!

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

    how does Navigation <nav> work & semantic/ non-semantic (NEW TO THIS)

    Posted: 10 Jan 2018 12:35 PM PST

    What does the <nav> tag do and what does it stand for? What are semantic and non-semantic tags? (simple explanation) Thank you alot

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

    UML-diagrams

    Posted: 10 Jan 2018 03:17 PM PST

    anyone got some links to site's with exercises on uml-diagram's. To be more specific from text to domain model or something like that. searched it on google for some time but couldn't find a thing.

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

    Degree vs cerification

    Posted: 10 Jan 2018 08:38 AM PST

    I'm trying to begin my programming career and my local community college offers a computer programming course that boasts to help graduates find work after it is completed. However they won't offer any info on the pay difference and job security between a cerification and a standard bachelors. Does anyone have any insight to the viability of both strategies?

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

    Tracking program for servos

    Posted: 10 Jan 2018 10:02 AM PST

    Hey guys, I'm trying to write a program that uses servos to track an autonomous plane while it flies. The servos have antennas mounted on them and I have to do so using GPS coordinates. I'm not really sure where to start. I've taken a coding class and know C and a little Python, but I'm in a discipline that doesn't require a lot of coding work so this isn't really my specialty and I think I'm a little out of my league. Any advice or directions towards a sample program would be appreciated because I imagine something similar has been done before, but I haven't found anything yet.

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

    .txt file into 2d array using c

    Posted: 10 Jan 2018 12:26 PM PST

    Hello i am stuck for hours now!! can you tell how to make a .txt file into 2d array using c

    The FIle:

    id age balance 100 26 100 101 22 120 102 23 70 103 19 40 104 20 140 105 28 60 106 26 50 107 24 80

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

    [C#] MSSQL Query help using table adapters

    Posted: 10 Jan 2018 12:00 PM PST

    There's a procedure called getsystemnumber or getsystemnumber_gateway in our database that is needed to generate the next unique identifier for the next entry in a table. declare @pyd_number int

    execute @pyd_number = dbo.getsystemnumber_gateway 'PYDNUM', NULL, 1 select @pyd_number 

    OR declare @pyd_number int

    execute @pyd_number = dbo.getsystemnumber 'PYDNUM', NULL select @pyd_number 

    The NULL can just be a space. That's how the procedure gets called in the SQL server. I have the procedure set-up on the tableadapters and I put the results in a listbox. The listbox displays 0 instead of the actual return value.

    returnPydNumber.getsystemnumber("PYDNUM", " ") pydNumberGet.getsystemnumber_gateway("PYDNUM", " ", 1) 

    When I test the procedure in the dataset designer, "Preview data" it does give back the actual number that I need with these parameters. The number does increase each call in the database so I know the procedure is being executed.

    TL/DR: Procedure is an EXECUTE statement, being called using a tableadapter returns 0 instead of the number I need, works fine using the preview data function.

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

    Need help with a python procedure

    Posted: 10 Jan 2018 11:47 AM PST

    I have a text file and I want to open the text file and count the 50 most frequent words in the file. How would I do this? I tried to build a method using information on the web but have not been able to do this.

    My code so far is follows:

     from collections import defaultdict import random import numpy as np from collections import Counter s= open("C:/users/xx/documents/text/text.txt") wordlist =[] for word in s.read().split(): wordlist.append(word) max_value = 0 print(max_value) b = Counter[wordlist] print(b.most_common(50)) 
    submitted by /u/metalloidica
    [link] [comments]

    temperature input

    Posted: 10 Jan 2018 10:18 AM PST

    Hi, I need to make a program were in a user will input the temperature for every day in December. The input will be saved in a list. My problem is, if the user some how writes the wrong value how do i make the same date reappear again so he don't need to start all over again?

    def temp():

    try: temp_input = [] for i in range(1, 5, 1): temp_input.append(float(input("Hur många grader är det " + str(i) + " December "))) except ValueError: print("Det måste vara ett heltal!") return temp_input 
    submitted by /u/wangman1
    [link] [comments]

    How can I practice configuration management (Chef, Puppet, SaltStack, Ansible)?

    Posted: 10 Jan 2018 04:55 AM PST

    If I look for job offers for backend developer, many companies list experience with one or more of the following tools as a "must have" - Chef, Puppet, Saltstack, CFEngine, Ansible, Vagrant, Docker, Kubernetes.

    With the exception of Docker, I mostly don't get why I need experience with these tools (as a back-end developer, not even dev-ops), but ok. Thing is, I have never used any of them, simply because I don't get why I would need them. I haven't worked in a big company with so many projects that you need these tools. I get why they exist, it's just that I can't imagine myself ever using them in a project.

    The websites of all of these tools are mostly just filled with buzzwords, I can't even see what the point of these tools are, they seem like an over-complicated way to write a script.

    My current workflow is just to run a script to copy the files to the staging server, then test if something breaks and then copy it to production. The most "automation" here is a shell script, and if I see this correctly, all of these tools are basically glorified version of that. I can see why I'd want to use Docker or VMs for example (to keep separate software on the same server from messing with each other), but the other tools... ?

    When would I use these tools and how can I prove to companies that I'd "know" any of them? For people who use them, did you learn it on the job or did you have previous experience and if yes, how did you learn them? I can hardly imagine universities teaching this kind of stuff. What are small example projects that I could do? I mean I'm all for modern development techniques, it's just that I don't buy all of these buzzwords... "event-driven automation, cloud-native app delivery" ... why can't I just use a script?

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

    GitHub Desktop vs CLI

    Posted: 10 Jan 2018 02:42 AM PST

    When I first started using GitHub, I downloaded GitHub desktop to circumvent the CLI. Fast-foward a few months, and although I have learned how to use the command line, I still find it much faster to commit and push changes to my projects using GitHub Desktop. For example, to commit and push a single file to my repository:

    Using GH Desktop:

    1. Click "commit to master"

    2. Click "Push origin" button twice

    3. Done

    Using the Command line:

    1. git add filename
    2. git commit
    3. git push origin master

    Despite the fact that the typing process taking longer, most developers/engineers seem to use the CLI instead of GH Desktop. Why? It's hard to justify typing that stuff when you can just click two buttons. What gives?

    E: thanks for the replies. There were many things that I didn't even consider; at this point it seems like CLI is the way to go.

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

    How does collectd counter datatype work?

    Posted: 10 Jan 2018 08:17 AM PST

    I have a simple collectd plugin in python, which is supposed to calculate the difference out of total values. The code is something like:

    # -*- coding: utf-8 -*- import time import collectd VALUE = 0 NAME="default" CONFIGS=[] def send_counter(name, key, value): val = collectd.Values(plugin='difftest') val.type = 'counter' val.type_instance = key val.plugin_instance = name val.interval = 1 val.time = time.time() val.values = [value] val.dispatch() def conf_fun(conf): pass def init_fun(): pass # not needed right now def read_fun(): global VALUE global NAME key = "valuediff" send_counter(NAME, key, VALUE) VALUE = VALUE + 10 collectd.register_config(conf_fun) collectd.register_init(init_fun) collectd.register_read(read_fun) 

    As mentioned in the documentation, I would expect for the value is dispatched with type 'counter', the result would be the difference per second. In this case, it would be a constant of value 10 as I am running with 1 second interval. But instead I get values like:

    epoch,value 1515600181.197,0 1515600182.197,10 1515600183.197,20 1515600184.197,30 1515600185.197,40 1515600186.197,50 1515600187.197,60 1515600188.197,70 1515600189.197,80 1515600190.197,90 1515600191.197,100 1515600192.197,110 1515600193.197,120 

    I think I am not understanding this datatype concept in collectd properly. Before jumping into the code of collectd, wondering maybe if you guys faced any such issues? Thanks in advance.

    EDIT: formatting

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

    Recoding a 9 year old VB .NET project, need help with we error

    Posted: 10 Jan 2018 07:28 AM PST

    I created a VB . NET software about 9 years ago to sum the total usage of component amounts from a list of formulas. Essentially, I input a text file - format it so the data goes into a table then it takes a list of formulas from and excel file and adds the component amounts in that formula to generate a forecast.

    Here is a screenshot of the ugly version - for diagnostics.

    LINK

    You can see the datatable formula, formula name, date, component, amount ......

    Haven't programmed for almost a decade, but I get a call saying the software ends with a database error which I conclude is the discontinuation of SQL compact version. I essentially recoded the project so the data is loaded into local datatables and I am able to get myself to the very end where the data is ready to be consolidated and I encounter this error.

    LINK

    I've changed the amount fields to the datatype "double" with no success. My guess is that when the loop is running, the column indexes are wrong.

    Any help is greatly appreciated!!!!!!

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

    Odd duplicate entries in MYSQL issue...

    Posted: 10 Jan 2018 06:51 AM PST

    So I have written an update to our ticketing system. Is is built with php and uses mysql as the database and apache as the webserver.

    A tech can have a single ticket active at a time. When a tech clicks a "set active" button an ajax request is sent from the browser to php. This should (and mostly does) result in a single database entry with the ticketid, the techid and the startdate which is a unix timestamp. But sometimes there are duplicate entries i.e there will be 4 rows with the same techid, ticketid and startdate. As if the tech has started the ticket 2 times at the exact same millisecond. Sometimes there are 3 or more duplicates.

    What could be going on here? I have been over the code extensively and im pretty sure there is nothing wrong with the logic here. I even pushed an update that disables the "set active" button after the tech pushes it and when the ajax request returns it is enabled again to prevent techs hammering the button if it lags etc. But there are still duplicates happening :confused_old:

    tl;dr Given mysql, php5.4 and apache, how can 1 ajax request that 99% of the time results in 1 database row entry sometimes result in multiple duplicate rows. Primary key is auto incremented so it is the only thing not duplicated.

    This is a browser based ticket system, 6 servers and a load balancer.

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

    What is the most CPU friendly server?

    Posted: 10 Jan 2018 04:35 AM PST

    Please suggest a CPU friendly server software which can run preferably run java servlets.

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

    Need help with a python script error my praw.ini file won’t open on Mac book

    Posted: 10 Jan 2018 04:13 AM PST

    Last login: Mon Jan 8 22:36:49 on ttys001 Timothys-MacBook-Air:~ Curtis$ pip install -U shreddit Requirement already up-to-date: shreddit in /Library/Python/2.7/site-packages Requirement already up-to-date: PyYAML in /Library/Python/2.7/site-packages (from shreddit) Requirement already up-to-date: requests in /Library/Python/2.7/site-packages (from shreddit) Requirement already up-to-date: tornado in /Library/Python/2.7/site-packages (from shreddit) Requirement already up-to-date: arrow in /Library/Python/2.7/site-packages (from shreddit) Requirement already up-to-date: praw>=4 in /Library/Python/2.7/site-packages (from shreddit) Requirement already up-to-date: six in /Library/Python/2.7/site-packages/six-1.11.0-py2.7.egg (from shreddit) Requirement already up-to-date: backports-abc in /Library/Python/2.7/site-packages (from shreddit) Requirement already up-to-date: idna<2.7,>=2.5 in /Library/Python/2.7/site-packages (from requests->shreddit) Requirement already up-to-date: urllib3<1.23,>=1.21.1 in /Library/Python/2.7/site-packages (from requests->shreddit) Requirement already up-to-date: certifi>=2017.4.17 in /Library/Python/2.7/site-packages (from requests->shreddit) Requirement already up-to-date: chardet<3.1.0,>=3.0.2 in /Library/Python/2.7/site-packages (from requests->shreddit) Requirement already up-to-date: singledispatch in /Library/Python/2.7/site-packages (from tornado->shreddit) Requirement already up-to-date: python-dateutil in /Library/Python/2.7/site-packages/python_dateutil-2.6.1-py2.7.egg (from arrow->shreddit) Requirement already up-to-date: backports.functools_lru_cache==1.2.1 in /Library/Python/2.7/site-packages (from arrow->shreddit) Requirement already up-to-date: update-checker>=0.16 in /Library/Python/2.7/site-packages (from praw>=4->shreddit) Requirement already up-to-date: prawcore<0.14,>=0.13.0 in /Library/Python/2.7/site-packages (from praw>=4->shreddit) Timothys-MacBook-Air:~ Curtis$ shreddit -g Timothys-MacBook-Air:~ Curtis$

    shreddit -g is supposed to make configurations and open a blank praw.ini file

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

    I need a little help in basic c programming, this wont take long for you guys.

    Posted: 10 Jan 2018 04:12 AM PST

    "The user should indicate the system his/her input is in by appending the letters d, b, o, and h to the end of their input (e.g., 12d is the decimal number 12; 22o is the octal number 22; Fh is the number F in hexadecimal, etc.)." So i was just wondering is their is a way to basically a way to ignore the number input so that it will only read the letter, THANKS AND GOD BLESS!!

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

    Suggestions for conferences in Europe this year?

    Posted: 10 Jan 2018 01:33 AM PST

    I have QCon London in my mind, what else should I look into? I'm rather interested in general conferences rather than technology specific ones like RustFest etc. Any recommendations?

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

    Professional programmers how much do you actually programm in your jobs?

    Posted: 10 Jan 2018 12:34 AM PST

    Hello everyone!

    I currently work as a PLC-Programmer (is this the right englisch term?) and basically i am really bored most of the time. I have been working here for about 2 years by now. At first it was really interresting but now i just copy and paste everything and test if it is working. I barely programm at all because everything is already done in the past and you just copy from here and there and put the pieces together.

    I am planning to get an education as C++ programmer and become a software developer or somthing like this.

    So here is my question: Is it the same as Software developer? Do you Copy and Paste as much as i do? Or can you actually programm and "create" new stuff.

    If someone has expirience as professional developer i would like to hear.

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

    If I'm fluent in C#, and I think the easiest way to design a UI is through html/css, what tech should I pursue to build desktop apps?

    Posted: 09 Jan 2018 10:36 PM PST

    Maybe a poorly worded title, I've been looking around for frameworks that allow me to make use of my C# knowledge. Never built a desktop app before so I want to start learning. In addition to C#, I know a bit of C++, so Qt is an avenue worth looking into.

    WPF is not supported on linux systems so I'm crossing that out, the learning curve is what I want to avoid aswell, as it seems to be specific to that framework.

    What path do you think I should take? Is electron worth looking into? How does it work? Will I be able to use C# on the backend? If not electron, are there frameworks that allow me to use my html/css/javascript knowledge and apply it into desktop development?

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

    No comments:

    Post a Comment