• Breaking News

    Tuesday, July 31, 2018

    What language would be best for generating a Word document based on semi-dynamic form inputs? (And is it Visual Basic?) Ask Programming

    What language would be best for generating a Word document based on semi-dynamic form inputs? (And is it Visual Basic?) Ask Programming


    What language would be best for generating a Word document based on semi-dynamic form inputs? (And is it Visual Basic?)

    Posted: 31 Jul 2018 08:17 PM PDT

    TL;DR: I have a strategy for automating part of my job, but need a nudge in the right direction to figure out what I need to learn to accomplish it. I think it might be Visual Basic; please don't hate me.

    I "learned" Visual Basic in high school, and I think it probably could be used for what I want, but before I go down that road I was hoping for some input to see if there is a better / more relevant option. I know embarrassingly little about "new" languages like Ruby and Python, but for some reason in my mind they are magical and can do anything. I have very limited familiarity with C++ and Java, and they seem too clunky/complex for what I need. These are basically like racist stereotypes for programming languages though, and I am open to having my mind changed.

    Basically I want to create a Word template on steroids - a very specific program that will spit out a Word document for me after I set a number of switches (things like plural vs. singular subject) and form inputs (some of which would depend on the switches I set). I'm probably using the wrong terminology, but basically I'm picturing a Word template or mail merge type feature with more flexibility/functionality.

    I feel like Visual Basic gets a lot of hate from real programmers because of its WYSIWYG-ness, but might it actually be what I'm looking for? I recall you could basically just draw a form, and then double click on various elements to code the functionality. (But this was 15+ years ago, and I have no idea if it's still like that, or if something does it better now. I also recall we had "Visual C++" and that shit was way harder than "Visual" Basic.)

    That said, I have basic familiarity with coding, syntax, logic operations, etc., and I'm open to learning something else if it would be better than VB in the long run. (You know, for when I eventually automate myself out of a job.)

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

    What software/hardware do you use daily?

    Posted: 31 Jul 2018 10:31 AM PDT

    I'm curious what others use for their daily tasks.

    Hardware

    - iPhone X

    - MacBook Pro

    - Lacie USB-C External HDD

    - Bose QC35

    Software

    - 1Password

    - VSCode

    - Adobe Creative Suite

    - Spotify

    - Gifox

    - Google Chrome

    • HoverZoom
    • Momentum
    • Postman
    • JSON Viewer
    • Instapaper
    • Adblock
    • 1Password
    • Grammarly

    - GitHub

    - iTerm 2

    - Feedly + Instapaper

    I elaborated more on why I chose each one here if you're curious.

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

    My Compression Algorithm

    Posted: 31 Jul 2018 10:09 PM PDT

    I made an compression for minecraft-like game but it ended up too weak. I still have no idea how you compress few billion blocks under 10mb.

    But it works like this.

    1. Let there be an output which starts empty and decide length of a binary cluster. (for example, 8 bits)
    2. Then scan the data in binary form one cluster length at the time.
    3. If the next cluster of bits is new, put "01" and that cluster as it is to the output.
    4. However, if the clusters is same as the previous one, add "11" to the feed. In case this repeats, only add single bit "1" to the end.

    Pros? Cons?

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

    Help with mtgo

    Posted: 31 Jul 2018 09:36 PM PDT

    I just started learning python recently, and wanted to create a program for mtgo(magic: the gathering online). I want to have the program take all of the cards my opponent plays in a game and put the card names into a text file. I have no idea how to have python interact with mtgo or where to learn this. Any suggestions?

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

    Import npm module as source code

    Posted: 31 Jul 2018 08:58 PM PDT

    I want to import the source code for vue-form-generator to make some changes to the source code. Being new to Node and Javascript, I really have no idea what I'm doing. Can someone please guide me through the steps?

    Since my Vue project is in Typescript, previously when I was using npm install vue-form-generator I'd created vfg.d.ts

    declare module "vue-form-generator" { const VueFormGenerator: any; export default VueFormGenerator; } 

    and my main.ts was

    import VueFormGenerator from 'vue-form-generator'; Vue.component('VueFormGenerator', VueFormGenerator); 

    Now I have copied everything from their /src to my /src/component/form-generator but have no idea how to make it so I can use <vue-form-generator /> as previously.

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

    I literally don't know what is causing this Firebase error.

    Posted: 31 Jul 2018 07:55 PM PDT

    If anyone could help me figure out it would mean so much :D.

    uncaught exception: [DEFAULT]: Firebase: No Firebase App '[DEFAULT]' has been created - call Firebase App.initializeApp() (app/no-app).

    But everything is initialized it was working a few hours back. I turn off my laptop and now this. Even new project doesn't seem to work with just the configuration as this.

    import Vue from 'vue'
    import App from './App'
    import router from './router'
    import firebase from 'firebase'
    Vue.config.productionTip = false
    let app;
    var config = {
    apiKey: "AiZaSyDMsP6Zy4h5O80MobeDou7CFf8C5wU_wOM",
    authDomain: "sahakaari-fdd5b.firebaseapp.com",
    databaseURL: "https://myurl.com",
    projectId: "appname-fdd5b",
    storageBucket: "appname-fdd5b.appspot.com",
    messagingSenderId: "842125911190"
    };
    firebase.initializeApp(config);
    firebase.auth().onAuthStateChanged(function(user) {
    if(!app) {
    /* eslint-disable no-new */
    app = new Vue({
    el: '#app',
    router,
    render: h => h(App)
    })
    }
    })

    Please I need help ASAP!

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

    Two Questions About Vim/Emacs

    Posted: 31 Jul 2018 03:56 PM PDT

    I've had a decent amount of experience programming in a variety of languages - currently I need to work in Python/Javascript/Java or Kotlin/ and C++.

    The first question is about Vim:

    I recently switched to Linux (Ubuntu) and decided to try to learn Vim. After going through vimtutor I realized while I could learn Vim - it would definitely be a lot of work, so I decided to make a pros/cons list of learning vim.

    Pros:

    • Highly portable -use on Windows/Mac/Linux and setup by pulling some files from a github repo
    • Very fast
    • Low impact on system (small installation space) -(Supposedly) good for productivity

    Cons: - Hard to learn -Maybe lose some advanced IDE functionality?

    Now I'm trying to clear up the benefits of Vim for the average programmer - it seems like Vim is really good at editing text, but I'm not sure why that's useful for programming.

    I.e - I spend most of my time thinking. A decent amount of time typing - but never doing any super complex operations (except for refactoring - which my IDE already does). Infact - the places I rely most on my IDE are compiling code, analyzing code, autocompleting code, and step by step debugging, none of which Vim seems to do particularly well.

    In light of all of this - why do programmers use Vim, when it seems like a useful tool for system administrators?

    Second question (well more like set of questions) is about Emacs:

    Is Emacs hard to learn compared to Vim?

    How portable is Emacs?

    How fast is emacs compared to a traditional IDE - like eclipse - or compared to a text editor, like Sublime/VSCode.

    What are the benefits of Emacs over a traditional IDE system besides acting as a OS? I.e - I'm not going to use Emacs to browse the internet or check my mail when there are better applications on Ubuntu for that.

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

    Which programming language is easier to understand as a beginner to programming? Java or C++?

    Posted: 31 Jul 2018 07:41 AM PDT

    I'm currently registering for classes for the fall for first semester of my second year at college. I don't know which one would be in easier to learn for programming games or just programming in general.
    EDIT: I'm going for C++ since the Java classes are way too late in the day for me to take. I also don't have any experience with other programming languages. I guess I should learn python for 2-3 weeks and then focus on my C++ class in 3 weeks to have a basic understanding of programming

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

    Script for custom printing/stapling

    Posted: 31 Jul 2018 06:41 PM PDT

    I am trying to find a way to print a 1000+ page document with 3 staples down the side of the page. I need to print 2 copies of each page then have the copies stapled only to each other. The end result should be each page of my document stapled to its copy. A 1000 page document would use 3000 staples and 2000 sheets of paper.

    Is there a way to create a script using some printer language that would make this work?

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

    How would you respond to a resume with HolyC on it as a preferred language?

    Posted: 31 Jul 2018 06:09 AM PDT

    Is there a dictionary API that would return a word of type that I specify and number of letters I specify?

    Posted: 31 Jul 2018 02:21 PM PDT

    I'm looking for an API where I could, for example, ask for a verb containing 2 - 6 letters and it would return a random word from the English dictionary fitting my specifications. Anyone know of anything like that?

    Bonus if I could specify something like "commonly used" to get words that are common in every day language. I doubt that kind of feature exists but figured I'd ask.

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

    Help! beginner wanting to learn a language

    Posted: 31 Jul 2018 02:05 PM PDT

    Hey guys, I want to learn a programming language of some sort, I have a MacBook and tried swift and can't seem to get my head around it, surely there is something easier and more straightforward. could anyone give me some ideas and tips to get me heading in the right direction? Computers and how they work really fascinate me.

    submitted by /u/12lillywhitel
    [link] [comments]

    Can anyone warn me on what problems will come up deploying my python automation with coworkers?

    Posted: 31 Jul 2018 08:38 AM PDT

    This is a heavy library based automation tool, but assuming I put all the libraries Ive been using in a folder and import, I believe things should be fine.

    All computers are windows 64 bit, which was a major concern before starting.

    Any thoughts on what could go wrong? Its working great on my computer, and there was only 1 library I edited to keep up with Python 3.7.

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

    Can I install ubumtu server on a raspberry pi 3? If not, what alternatives are there?

    Posted: 31 Jul 2018 12:11 PM PDT

    Hi!

    I'd like to use my raspberry pi as a server for hosting a website, and by what I found the best OS for a server is Ubuntu server, but I can't seem to find the server variant available for raspberry pi. Ubuntu's IOT page only shows the normal Ubuntu OS, not the server variant. Is it available somewhere or am I just missing it? Or can I just use the normal Ubuntu as the server's OS ?

    If it isn't possible to use on a raspberry pi, what other options do you recommend for using it as a server? I'm assuming some kind of Linux, but which variant?

    Edit: mistype in the title, should be Ubuntu

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

    Total beginner. Not sure of anything.

    Posted: 31 Jul 2018 11:24 AM PDT

    I just changed my major today to computer programming at my community college. I have no prior knowledge to programming. I am also interested in getting into the IT field but im just not sure where getting my associates will lead me. If anyone has gone the same path as me hopefully I can get some insight. Thank you.

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

    Save URL to a file using either C# or SSIS

    Posted: 31 Jul 2018 10:32 AM PDT

    I have this task to parse a JSON file into SQL for some data collection I am doing for a project. I have a piece of the project where I need to download Census ACS5 data as a JSON file.

    I normally use wget to download files but this only works when the original url contains a file extension.

    Example:

    http://somesite.com/file.json 

    Command:

    wget http://somesite.com/file.json -O C:\file.json 

    The above format works.

    The data I need lives in a url with this type of value:

    https://api.census.gov/data/2016/acs/acs5?get=NAME,B01001A_25E&for=place:00065,00650&state:02&key={apikey}

    Which does not have a file extension in the url. It presents you with a page that shows json data in this format:

    [["NAME","B01001A_25E","state","place"], ["Adak city, Alaska","0","02","00065"], ["Akhiok city, Alaska","0","02","00650"]] 

    What I am currently doing is I visit the url in a browser, save the page as file.json then place it in a local folder and from there I use SSIS to parse the file for SQL inserts.

    What I would like to do is add an SSIS step where the URL can be downloaded as a json file within SSIS.

    Is this possible?

    Any insight would be greatly appreciated!

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

    Publishing Google Script

    Posted: 31 Jul 2018 09:11 AM PDT

    So I made a simple script on scripts.google.com, and it is set to run one time every Sunday. I want to know if there is a way I can publish this so that people can just "have it" or something so that it does the same for them. I also would like to know if I can get an input at installation, just to get their phone number since my script sends a text.

    Just don't really know how I would go about doing this, thanks.

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

    Problems with Python output in atom io

    Posted: 31 Jul 2018 08:07 AM PDT

    I have recently set up my new laptop, and I have problems using Atom Io.

    If I run the simple program

    for num in [1, 2, 3, 4]: print (num) 

    I get the error

    SyntaxError: unexpected EOF while parsing

    When I run the exact same program in PyCharm, I dont get any errors. I have tried googling this issue, but without any luck.

    Thank you for your time.

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

    What should I learn to make this project?

    Posted: 31 Jul 2018 08:01 AM PDT

    Plotting a chart using Chart.js + Express

    Posted: 31 Jul 2018 04:38 AM PDT

    Hello! I need help to plot a chart using Chart.js + nodeJS (ExpressJS). I need to render my chart on the front end using data from mongoDB. The problem is that I'm not being able to fetch the data the way I want to.

    Chart.js data field is an array, so I thought about using toArray() method do turn the data into an array. The problem is that I'm using a ODM (Mongoose) and Mongoose doesn't have the toArray method.

    So I'm kinda lost on the step to send the data as an array, I would be glad if someone could help me or point me some resources to do it. Thanks in advance!

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

    What subreddits should I subscribe to and read every day to get better at programming?

    Posted: 31 Jul 2018 12:00 AM PDT

    I feel like I've been on a plateau for awhile and I need something to help me begin to climb again.

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

    How to make a custom wordpress page?

    Posted: 31 Jul 2018 03:16 AM PDT

    Hello guys,

    I am a nodejs developer and do not have much experience with wordpress and php. I have made a wordpress site using Hostgator and selected a theme. However, in just one of the pages in the wordpress site I want to have a completely custom css, html and javascript. What would be a good and easy way for me to have one custom page in the wordpress site?

    Thank you

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

    Need help with "NameError" in Python

    Posted: 31 Jul 2018 01:21 AM PDT

    I wrote some code to get the weighted average of grades, from a list in a grade book, in two different ways, and I was wondering why the first version of the code gave the error "NameError: global name 'student' is not defined". (in my mind they both do the same thing, but the first version doesn't need the function "average". Also the argument 'student' is supposed to be a list from other parts of the code.

    def get_average(student):

    homework=sum(student['homework'])/len(studnet['homework'])

    quizzes=sum(student['quizzes'])/len(studnet['quizzes'])

    tests=sum(student['tests'])/len(studnet['tests'])

    return homework*.10 + quizzes*.30 + tests*.60

    print get_average(alice)

    --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

    While this code works:

    def average(numbers):

    total = sum(numbers)

    total = float(total)

    return total / len(numbers)

    def get_average(student):

    homework=average(student['homework'])

    quizzes=average(student['quizzes'])

    tests=average(student['tests'])

    return homework*.10 + quizzes*.30 + tests*.60

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

    What coding language would be the most suitable to learn in becoming an engineer?

    Posted: 31 Jul 2018 01:19 AM PDT

    I'm looking for some extra skills which I can chuck into my resumè to make it look better. I'm intending to become a civil engineer, but I feel like the skills I have in my resumè are not sufficient for qualifications.

    Can anyone suggest a suitable language to learn?

    I've learned the fundamentals of CSS and HTML, but obviously those are accustomed to web design.

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

    No comments:

    Post a Comment