• Breaking News

    Thursday, November 30, 2017

    Hand calculator programming language Ask Programming

    Hand calculator programming language Ask Programming


    Hand calculator programming language

    Posted: 30 Nov 2017 06:47 PM PST

    Graphing calculators such as TI-84 or Casio graphing calculators use their own implementation of Basic.

    Do non-graphing calculators, such as Casio fx991, which are able to do sort of advanced things like symbolic integration, also use basic?

    Could such calculators be reprogrammed for additional functionality?

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

    I am not decided about which engine to make my first game in. Any ideas? :)

    Posted: 30 Nov 2017 05:38 PM PST

    So I have decided to make a game as the finall school project and I am so undecided about which engine to make it in. What I want is either a 2d indie game such as this kind of design (http://d2ujflorbtfzji.cloudfront.net/key-image/ef1ca56c-83b6-4479-aac3-e30cda5b6966.jpg) or a low poly game. My options are MonoGame, Game Maker Studio 2,Unity,Unreal, Godot. The thing is, I want something with a great deal of tutorials and help, so I can learn the fastest. Also, I like the idea of using AutoDesk or even Blender to make my own maps. Please help me!!! _^ P.S. I'm a totally beginner. I made a game in Greenfoot, but I don't thnk that quite counts.

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

    Someone is constantly "ddosing" my site and I need help finding a solution

    Posted: 30 Nov 2017 09:02 PM PST

    Hello for a school project I made a site that basically just records what country the visitor is from for analytical purposes. This for some reason upset this Serbian guy and he is now sending 100,000 views daily from what I believe to be tor and I'm trying to find a good fix as its skewing all my data. Right now I'm going to try using cloudflare to filter them out, any other ideas though are appreciated

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

    Trying to do a reverse power? Math is not my strongest suit. Java.

    Posted: 30 Nov 2017 04:28 PM PST

    27 is 128. In java how can I write an expression that can find the 7 if I give it the 128 and the 2? Sorry if this is a weird question as I'm not sure how to ask it. How do I reverse power to get 7 as my answer is what I want. Math skills are not very good lol. Thanks!

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

    [Hypothetical question] If you were to go about coding an automated widget that reacts to a button, what would be your first steps

    Posted: 30 Nov 2017 11:15 AM PST

    Basically, how do you code automation and implement it into a machine?

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

    My parent process keeps forking a child with the same PID, is this normal?

    Posted: 30 Nov 2017 07:08 AM PST

    Some backstory. Basically, I wrote a code that can be run from the Linux shell. When the user does so, it asks for an input. If user types in halt the program terminates immediately. If user types in anything else, the program forks and the child returns an exit value (1) to parent. Then parent waits for child to terminate and then prints the pid of child and the return value of child. Now, I keep the return value of child 1 by always calling exit(1) in child. However, the pid printed by parent after each iteration (provided user doesn't type in halt) is always the same. I find that strange because I think it should be different.

    Or maybe I am wrong. Here is the code I am using:

    #include <stdio.h> #include <stdlib.h> #include <string.h> #include <unistd.h> // for exec #include <sys/types.h> // for wait #include <sys/wait.h> // for wait #define FOREVER for(;;) pid_t child_pid, w; int status, x; int main(void) { char command[250]; FOREVER { printf("please type your command ... "); scanf("%s", command); if(!strcmp(command,"halt")) { puts("So long"); return EXIT_SUCCESS; // same as exit(0) } child_pid = fork(); if (child_pid == 0) { printf("Child\n"); x = 1; exit(x); } else if (child_pid > 0) { w = wait(&status); x = WEXITSTATUS(status); printf("Parent\n"); printf("PID of process that executed your command is %d\n", getpid()); printf("Return value of process that executed your command is %d\n", x); } else { perror("fork() error\n"); return 1; } } return EXIT_SUCCESS; } 
    submitted by /u/zimmer550king
    [link] [comments]

    Checking a 2d array for a value and changing it if it meets criteria. C++

    Posted: 30 Nov 2017 04:46 PM PST

    Basically i am trying to allow the user to enter the coordinates of a 2d array to check that element. If the coordinates they enter have a "1" at the location i then need to switch that to a "0".

    How can i go about doing this?

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

    What is a good language to build a very basic interactive game/webpage

    Posted: 30 Nov 2017 08:42 AM PST

    I have an idea for a static webpage where you select an image and it returns a result. I'd like flexibility in the UI side so I can make it look nice. Again, very basic concept here, just not sure what language would best be used (html5? javascript?). i'd like it to be lightweight and efficient as possible.

    Part 2, how would I go about hosting this app? The file sizes should be fairly small and it shouldn't have to communicate with an external database or anything. What are the estimated costs to run something like this?

    Sorry for the noob questions, this is my first project.

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

    SQL schemas (or NoSQL alternatives) for storing abstract syntax trees in a database?

    Posted: 30 Nov 2017 09:45 AM PST

    I maintain a codebase that provides a user-definable programming language (Think: something like IFTTT or scratch, but in a niche domain).

    We store the program's resulting AST in a SQL database as a JSON column.

    This is unfortunate because:

    • I must perform data validation at save time at the application layer (can't use SQL validations).
    • Changing the validation rules of an existing AST requires complicated migrations
    • I can't easily perform queries on AST nodes of deeply nested "programs". Right now, we're stuck scanning the whole table. It is not easy to answer questions like "How many users call this function?". I would love to be able to perform queries that traverse into the AST structure or index AST nodes.

    Does there exist a schema (or alternative NoSQL database) that is especially good at storing abstract syntax trees?

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

    Where/how is the best way to hire an independent programmer (android/iOS)

    Posted: 30 Nov 2017 10:42 AM PST

    I want to experiment in creating a programming language, should I use yacc+flex or ANTLR? I'm planning to transpile to C as a first step, is that a good idea?

    Posted: 30 Nov 2017 05:24 AM PST

    I've heard about flex+Yacc and ANTLR, ANTLR seems to be the most convenient tool, it can generate parsers in C++, java and python.

    I don't really intend to do compiler backend, is it a good idea to transpile a language into C? Is it easy enough?

    My goal is just to add some syntactic sugars to C, hash_map, python indent style...

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

    Image processing in C

    Posted: 30 Nov 2017 02:00 PM PST

    Is it possible in C to convert pixels back into the image? If not then which language can be helpful for this conversion?

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

    Refactoring existing code base from Hibernate to REST... Are there logical intermediate steps, are do we just gut the persistence layer and replace it?

    Posted: 30 Nov 2017 11:53 AM PST

    It is a largish application but with less than 100 tables. Lots of grid displays and associative tables to link grids.

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

    Which API should I use to display locations near the user (without a map)

    Posted: 30 Nov 2017 09:15 AM PST

    I'm working on a simple app (react native) to practice my react native skills and want to create a list of coffee shops near the user based on location. The issue is that every single tutorial I find has the goal of generating a map and showing pins where the locations are and having you be able to click on them to navigate or show phone number or what have you. I don't want a map. I just want it to show a list of the locations and maybe sort by closest distance or something.

    Which api should I use for that, and do any of you know of a tutorial series (video or text is fine) that might cover this topic?

    Thanks!

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

    WebSocket vs REST

    Posted: 30 Nov 2017 12:06 AM PST

    Hey everyone! My question may seems a little silly but it is question that I want to clarify for myself. I'm new in backend development and was playing with node.js a little, created simple node.js api server, sent some GET, POST request and at some point I got to the state where I have to send notification for client (not a callback from request, but just some update notification, like if someone send me a friend request, I want to get it from server immediately and not do a request to get it). So I am familiar with concept of sockets and that what came to my mind at the first time. If consider, that my app need to listen for server notification during its whole lifetime, I need to hold connection open till the end. In that case, the question is, if I need to send all other request (I have api for login, register, etc), through socket? Or do I need to separate responsibility between socket and REST, and if so, how am I going to do that? Thanks for future replies.

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

    Formal Grammer Palindrome

    Posted: 30 Nov 2017 01:31 AM PST

    Hey, I am currently learning about Formal Languages. I am stuck on this question;

    Write a formal grammar for the alphabet ∑={ a,b,c } that accepts the language of strings that is read the same forward and backwards (i.e. 'abcba' is in the language but 'bcab' is not).

    Any hints or tips on approaching this question. I've been stuck on this for a long time. Thanks for any help!

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

    Copy web help

    Posted: 30 Nov 2017 01:10 AM PST

    Hello guys I am writing a test and I need you for make me a copy of this web in HTML(in brackets am I working, but nevermind) http://pocasi.seznam.cz/sokolov I need it in 20 minutes, please help me. Jsut copy not the same, just the functi

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

    Which framework is suitable for a use case with pub sub on periodically updating persistent database?

    Posted: 29 Nov 2017 11:17 PM PST

    Basically I'll be writing separate crons running on various servers that will push data to various tables in a mysql database on Amazon rds. I want to write a backend on nodejs that will stream these events (ie addition to data to various tables from my various cron jobs) to a front end angular app. My question being can something like socket io do that? or would it be better to refactor my crons to push data to redis and socket io pub subs to redis instead of mysql and redis periodically logs to mysql? I have done decent back end but never implemented anything like this- socket streaming with pub sub.

    I haven't started my project and maybe my architecture is wrong, I am open to any suggestions.

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

    Need help with path finding code.

    Posted: 29 Nov 2017 11:08 PM PST

    So I am doing an assignment for my intro to comp sci class where I have to find a path connecting cities. The code below works IF the city you want to go to is the one you're already in or if there is a road that connects the two cities, or returns None if either of the cities does not exist.

    net is a Class called Network that has methods in it that use 2 other classes: Roads and Cities. All of these classes work as they should.

    def find_path(net, from_city, to_city): path = [from_city] if net.has_city(from_city) == False or net.has_city(to_city) == False: return None elif from_city == to_city: return path elif net.has_road((from_city, to_city)): path.append(to_city) return path else: for i in net.neighbors(from_city): if str(i) not in path: find_path(net, i, to_city) else: break 

    I'm sure some of you can already see the issue for when there is no direct road from the first and second city. The issue is that to get from A to D, I add A to the list "path", then ask it to find all neighbours of A (Let's say B is a neighbour). So in the else statement, I ask the program "for every neighbour of A, if we haven't already been to the neighbour city, then find a path from that city to D". So in theory, instead of finding A - D, we'd be finding B - D. However, when I ask it to

    find_path(net, B, D) 

    it will run

    path = [B] 

    and remove A from the list "path". So now when it gets back to the else statement, it will look at all neighbours of B, see that A is a neighbour, and A is not in "path", and it will run

    find_path(net, A, D) 

    Thus bringing me back to where I started. Is there any way to make it so that "path" is not overwritten every time? Or do I need to change how I find a path from A to D?

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

    Is it illegal to use an API to build a database for your own stuff?

    Posted: 29 Nov 2017 10:48 PM PST

    Like, if I wanted to analyze reviews and products, and I used Amazons api to build a training database, and then did something with it. How to api's data work? Can you store it?

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

    No comments:

    Post a Comment