• Breaking News

    Tuesday, November 20, 2018

    Windows vs. OSX vs. Linux - how does targeting these platforms affect how you code? Ask Programming

    Windows vs. OSX vs. Linux - how does targeting these platforms affect how you code? Ask Programming


    Windows vs. OSX vs. Linux - how does targeting these platforms affect how you code?

    Posted: 20 Nov 2018 06:46 PM PST

    First, I'd like to explain my ulterior motive: I was just offered a job the requires that I develop on the OSX platform. I've never even used it as a consumer. Professionally I've developed software that targets Win64 and dabbled in software that targets Linux in school. My question is this: what are the key things to acknowledge when developing each of these platforms? For example, targeting Win64 means you have to keep in to account its terrible file systems, how quirky handles can be, etc. What kind of quirks might I encounter when developing for OSX? I'm not worried about being able to pick this stuff up, but I am curious how the design of each OS will affect the applications I develop.

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

    What language is this?

    Posted: 20 Nov 2018 05:24 PM PST

    I found some text during a CTF challenge that's apparently some sort of esoteric programming language. I've searched around for it on the web and all over esolangs.org, but searching for unknown esolangs is kind of difficult. It's organized into twelve columns, each five characters wide. A line of it looks like this: ?!.?. ..... ..!.? ..... ..!?! !.?!! !!!!? .?!.? !!!!! !!!!. ?.... .....

    Just periods, question marks, and exclamation points. Any ideas? I'm stumped.

    submitted by /u/----___----___----__
    [link] [comments]

    How would you suggest linking radio button selections to insert or remove text from a story document?

    Posted: 20 Nov 2018 01:38 PM PST

    Say I wanted to create a customizable story based on reader preferences. How could I code their selections to alter the text in a novel-length story?

    What I am aiming for is a customizable story to appeal to the preferences of a wider audience. Before delving into the story, the reader will make selections via radio buttons indicating their preference for certain story elements, say, gratuitous violence and lame puns for instance. When the reader selects the radio buttons corresponding to violence and lame puns, additional text would be inserted in the story turning all fights into bloodbaths and all dialogue into cringe-worthy pun-fests.

    Any ideas would be very helpful, as all I can think of right now would be to create some kind of form using javascript and Adobe.

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

    Is it okay if the interviewer asks me a question and I say I don't know, rather than trying to guess?

    Posted: 20 Nov 2018 04:01 AM PST

    Stuck in bidirectional infinite scrolling implementation in javascript...

    Posted: 20 Nov 2018 09:39 PM PST

    I am developing a bidirectional infinite scrolling, basically, the application loads a list of objects, these objects are fairly complex and have a height that is only known once they are visible; since a single page can have hundreds of them, I want to load only those that are in view, every object has an id that allows for linking.

    Scrolling down works pretty well, scrolling up causes a whole mess, and due to that the links don't work; I have tried everything, grabbing the current element in view, freezing the scroll, load then next elements, and then continue scrolling but that causes flickering, and looks just as confusing.

    I have stripped down the functionality as much as possible on this jsfiddle https://jsfiddle.net/b9tesgrp/26/ there is nothing tried there to fix the scroll up, so it simply doesn't work.

    Does anyone have an idea, I've spent about a week now and all I get is flickering or buggy scrolling.

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

    Need advice for figuring out stack for building and deploying a website for searching read-only data

    Posted: 20 Nov 2018 08:58 PM PST

    My company has dozens of files that contain machinery part lists. Some of these lists are 2-4MB in size and contain several thousands records each. I have the option of exporting these lists in JSON format.

    Currently searching for info through these files is slow and cumbersome. I would like to create a website that allows you to search for any string in all files. Support for features like wildcards is nice, but optional. There will be no option to write anything to the backing database. The goal of the site is to be very fast and to present found information in a nice way.

    I have some experience with Java and some of its popular libraries (JAX-RS, tiny bit of Spring), but the website doesn't have to use Java. I'm at a bit of a loss when it comes to figuring out my stack. What's a good database for the needs described above? I understand SQL is the Swiss Army Knife of the DB world, but can I find something more tailored to my purpose?

    Are there any libraries that can help me streamline the middleware and presentation layer? I'm not looking for pretty/responsive; just something functional.

    I also have no experience deploying an application to a server (the few things I've built before were tiny pieces of much bigger enterprise applications). What kind of stack will give me greatest flexibility to choose between hosts? I will most likely need to pay to host the application myself for a bit before I can convince the company to finance something like AWS.

    If anyone can offer advice on what technologies are worth exploring I would really appreciate it! Please let me know if any details are missing from my description and I will clarify.

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

    Why is Maths in general much harder to self-teach, vector calculus for an instance, than computer programming?

    Posted: 20 Nov 2018 07:53 PM PST

    School final project help!

    Posted: 20 Nov 2018 05:34 PM PST

    ok i have a react app. its a blog. I created a form with an image upload. The image is uploaded to firebase storage(axios). and the form data "username, blog text, and title) all get sent to a mysql server on AWS. now, this is where i am kinda lost. how can i connect the two back together? i was thinking to use firebase to automatically alter the mysql database with the image's location. i cant find a tutorial on how to do this. any help would be appriciated

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

    Creating Sub-Procedure using Radio Buttons. Visual Basic

    Posted: 20 Nov 2018 05:07 PM PST

    I am currently in a Visual Basic class and I have an exercise where I need to use a sub procedure to calculate additional charges on a price chosen by radio buttons. I had to use a function to calculate the base charge and I don't know how I would add charges to the base one without the use of If...Then statements. It's not much but this is the code I'm working with:

    Option Explicit On

    Option Strict On

    Option Infer Off

    Public Class frmMain

    Private Function GetStandard() As Double

    Dim dblPrice As Double = 99

    lblPrice.Text = dblPrice.ToString("C2")

    Return dblPrice

    End Function

    Private Sub btnCalc_Click(sender As Object, e As EventArgs) Handles btnCalc.Click

    GetStandard().ToString("C2")

    End Sub

    Private Sub DisplayPrice()

    End Sub

    Private Sub BtnExit_Click(sender As Object, e As EventArgs) Handles BtnExit.Click

    Me.Close()

    End Sub

    End Class

    I have read through the entire chapter multiple times and tried to use other examples as references but there isn't a situation that the class has taught me where I would be able to do something like this. If someone could point me in the right direction I would greatly appreciate it. I don't like asking for help in my classes but I don't know what else to do.

    Edit:

    These are the instructions to give a better reference to what I need to do:

    Mats-R-Us sells three different types of mats: Standard ($99), Deluxe ($129), and Premium ($179). All of the mats are available in blue, red ($10 extra), and pink ($15 extra). There is also an extra $25 charge if the customer wants the mat to be foldable. Create a Windows Forms application. Use the following names for the project and solution, respectively: Mats Project and Mats Solution. Save the application in the VB2017\Chap06 folder. Create the interface shown in Figure 6-58. Use a function to determine the price of the mat before any additional charges. Use a Sub procedure to calculate the total additional charge (if any). Use an event-handling Sub procedure to clear the price. Also, verify that the user wants to exit the application before closing the form.

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

    Little man computer program

    Posted: 20 Nov 2018 01:19 PM PST

    Hello, I'm learning how to use the little man computer for my class at university. I've asked my tutor but I still don't get it and we have an assignment on it soon I think. I know how to add to 10, but how do I program the lmc to only accept numbers from 1-? I'm struggling, has anyone mastered lmc?

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

    "Layer at a time" breadth first search

    Posted: 20 Nov 2018 12:49 PM PST

    One of our interview questions is a graph traversal problem where I've had a couple of people do what I'm calling "Layer at a time" breadth first search, which is basically:

    def layer_at_a_time_bfs(root): visited = set() visited.add(root) queue = [root] while queue: next_layer = [] for node in queue: for related in node.relateds: if related not in visited: visited.add(related) doStuff(related) next_layer.append(related) queue = next_layer 

    i.e. process an entire layer, assign it to the queue, then iterate.

    I hadn't seen this definition of BFS before, is this taught at some specific college or in some book?

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

    Which programming language must I learn in order to develop complex Android apps?

    Posted: 20 Nov 2018 03:58 PM PST

    Solving Pac Man-like maze

    Posted: 20 Nov 2018 08:52 AM PST

    Hey there

    I have a problem:

    Imagine you are in a Pac-Man like maze and you need to collect all the points.

    So unlike a normal maze, you need to collect every single point, just like in Pac Man.

    This is from the Pac Man's PoV (Point of View) - he doesn't know how the maze looks.

    I was thinking of making an empty map (I know the size of the maze) and assume there are no walls and therefore there is a "point" on every single square of the maze.

    I was thinking of a TSP (Travelling Salesman Problem) and whenever the Pac Man would bump into a wall, he would draw it into his map and calculate TSP again.

    However, there are 2 problems I face:

    1) For me, TSP is hard to implement

    2) TSP takes a lot of resources to calculate

    So, do you know any better algorithm or way of how to make this easier?

    Thanks!

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

    How is Hint generated for novice programmers in any programming tutoring systems?

    Posted: 20 Nov 2018 02:41 PM PST

    Will Google maps be free for my purposes? - Little HTML/js app that shows a bunch of different store locations

    Posted: 20 Nov 2018 02:28 PM PST

    Heard that Google Maps got a major price increase for developers. Not sure if that is only for advanced API features or if it would include what is needed for my little web app.

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

    Handling Primary Keys in GUI

    Posted: 20 Nov 2018 01:46 PM PST

    Question: Can I / should I avoid storing the primary keys of database records in the GUI that's displaying the record data? Note: They aren't visible to the user.

    Background: Developing a small desktop application for myself, and came across an issue while implementing CRUD behavior.

    Currently, my GUI is decoupled from any business logic and backend beyond the values it needs to display. However, when it came time to link actions to the GUI widget controls, I realized I couldn't think of a way to avoid storing the primary key for each list entry in the GUI they were associated with.

    So for example: Purchases made were each saved to the database, and then displayed on the GUI list view. To edit a particular transaction, I would need to give my business logic the transaction ID to locate, and update.

    I'm trying to keep my GUI lean, and avoid storing additional data that isn't needed by the user. An additional academic concern: I don't know if this is a concern of security. Even though the primary key isn't displayed to the user, I can't help but feel it might be just a metadata scrape away from being discovered. Or do I accept that this is unavoidable / impractical?

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

    [C++] Perf is telling me str tod is taking up too much time? What do I do???

    Posted: 20 Nov 2018 12:53 PM PST

    https://imgur.com/a/Tlo1wYu

    I am doing a project where I am making a sort of silly implementation of SQL in C++ using unordered_maps and maps as indexes, depending on what the input files wants me to do. There are typical SQL functions CREATE REMOVE INSERT DELETE PRINT GENERATE INDEX JOIN. trying to reduce memory/runtime please help

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

    Best tool to make a basic app that feeds data into an excel spreadsheet?

    Posted: 20 Nov 2018 08:41 AM PST

    I don't have a programming background and would like to develop a very simple app that feeds data into an excel spreadsheet in order to test an idea. I apologize in advance if i don't use the correct terminology and feel free to ask questions if this is unclear!

    The app would just need to have a simple interface with a few buttons where you can make a selection of inputs which can then be confirmed and sent into an excel table. It would also have to register the time and date at which the input was confirmed. The reason I want it to feed into excel is because that is a tool I'm already comfortable with.

    Can you recommend a simple app builder that is relatively "noob-friendly" and could fulfill this purpose? Thank you!!

    Edit: app should work on tablets/phones

    submitted by /u/TTK-Pencilvestor
    [link] [comments]

    With what program/language could i create an interesting interactive résumé

    Posted: 20 Nov 2018 11:59 AM PST

    hi there,

    as a school assignment I have to make a résumé, we were told that you should try to stand out and really showcase what you're about. Since im interested in programming (but not very proficient and experienced yet) I wanted to make an interactive/ animated résumé, since that is both interesting and showcases my interest in the field. I was thinking about a visually pleasing résumé that had some animated things here and there, and some interactiveness (clicking to see something etc).

    I was wondering what program I should do this with. I have a bit of experience with Unity, but I feel like there should be a better and more simple alternative for what I'm trying to do.

    Any recommendations would be highly appreciated!

    Note: this is mostly for fun and learning purposes, and if it works out I will use it for school as well. It doesn't actually need to be useable at a professional level.

    Thanks in advance for any help!

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

    Need help with programming a function

    Posted: 20 Nov 2018 11:28 AM PST

    I want the following code to break a matrix into individual columns in octave.

    Function a = break(x)

    n = length(x (1,:))

    For i = 1:n

    a (i)=x (:,i)

    End

    I want it to basically return a1 = 1st column x, a2 = second column, over all n columns, but a (i) thinks I'm trying to index or something. It kind of works if I type just a=x (:,i), but I can only "interact" with the last returned value that way. I want all columns.

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

    NCAAF Sports API Help

    Posted: 20 Nov 2018 10:54 AM PST

    Does anyone know a good cheap NCAA Football API with live (or close to live) data for cheap?

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

    Does anyone know why Google Chrome is adding unaccounted time to MDN Timing Resources response?

    Posted: 20 Nov 2018 10:46 AM PST

    I am using MDN's Timing Resource API to give me metrics on REST calls I am making at various intervals to a local Node Express server. When I log the duration fields of the calls in Chrome, every other duration is almost exactly 300 ms longer than the one that preceded it or the one after i.e. the time that we would expect (e.g. 312.39999999525025, 24.099999980535358, 312.7000000094995, 10.400000028312206, 314.600000041537...) and the server itself is reporting times which are consistent with the faster durations. When I look at the information displayed in the timing explanation in dev tools the 300 extra ms are unaccounted for yet remain in the total. I have tried spacing the calls out to an arbitrarily large interval without any change and am quite confident the delays aren't due to a pileup of incoming requests at the server. I have also tried this in the FF and IE and found that this appears to be Chrome exclusive as everything is functional on those browsers.

    Does anyone know what is going on here? I can't seem to find much of anything on Stack or elsewhere about this. For the purpose of what I am doing I can probably filter these values but I am interested in knowing what Chrome is doing to cause this.

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

    Is there any Google Keep for Codes?

    Posted: 20 Nov 2018 06:17 AM PST

    I'm looking for something like notepad, a website or an app, dedicated to store some coding lines. Then i can write down when i'm not at office but have some ideas.

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

    What are some good sources to learn the C language starting from basic to an expert level?

    Posted: 20 Nov 2018 05:57 AM PST

    No comments:

    Post a Comment