[Question] How do I make an executable that just runs a basic python or terminal command? [See post for details and context] Ask Programming |
- [Question] How do I make an executable that just runs a basic python or terminal command? [See post for details and context]
- [Java] Really Basic Calculator Not Working. Would appreciate some help
- Can maven be configured to only run unit tests that depend on something that changed?
- Basic Echo Implementation in Rust
- Best way to track which random values in a series(1-1000) have been selected
- atom vs eclipse?
- Wrong Outputs And Confused On How To Restart Program In A Loop (C++)
- Pc specs for coding
- [QUESTION] Scraping prices from several online stores
- Displaying previously input data, I get a mysterious "35" instead
- "Circle of best-fit" SAS Programming
- [Question] How can I do this?
- Image processing in C#.
- Javascript: Unknown Array Behaviour
- Is there a way to find what type of comment the file uses given file type?
- Making queued uploads continue even after page navigation in Angular
- how would i go about making a panel of links?
- Need help completing an assignment!
Posted: 20 Jan 2019 04:16 PM PST So I'm running Rasbpian on a RPi 3 b+, and I'd like to create a program that literally opens up a website. So the objective is to have an icon I can click on which opens my default web browser and launches a particular website. In python I can do
Or in terminal, simply
But that's the extent of what I know how to do right now (I'm very much a beginner). I don't know whether to use python or just terminal for this, I realise it probably makes little difference. The main thing I need to know is how to turn these into executables that I can put on my desktop/launch-bar/menu etc... I'm pretty sure I will need some extra code/commands to tell the program to literally "open this in terminal and execute the following:", but I don't know what that command would be, and I don't know what I should save the text edit as (.bat, .exe?) once the code is all there. Finally I don't know what to open the file with once it's done, do I tell it to launch it with terminal by default or something? Sorry for the absolute noobage. I'm new to programming, new to raspberry pi, new to Linux, new to driving a computer solely via terminal.... Thanks in advance, I appreciate all assistance. [link] [comments] |
[Java] Really Basic Calculator Not Working. Would appreciate some help Posted: 20 Jan 2019 11:48 AM PST So basically, I've started learning Java through some YT tutorials. Now I've decided to try and make my own Java program, which is a basic calculator. Basically you start the program, it asks you to enter a number, then an operator (*,-,+,/) and your second number. I'm sticking to Integers for the time being. My problem is, whenever I run my code, let's say with "1 + 5" I get 0 as my result. Like I said I'm new to Java and would appreciate if someone could check out my code. Here's a picture of my output. [link] [comments] |
Can maven be configured to only run unit tests that depend on something that changed? Posted: 20 Jan 2019 07:55 PM PST At my work, we have been using ant for building for years and like decent developers, we started out making good unit test. But the unit tests eventually grew and took long enough to execute that it was decided to no longer make them automatic after building. It would only be required prior to committing. Eventually that lapsed and people stopped running them altogether. Developers would argue that they don't have time, and so on. I want to reverse this. What I would like to do is possibly switch to maven and configure it so that only unit tests necessary run after a given change rather than EVERY test. So that if you have 1000 test, but only 5 depend on a given component (either directly or indirectly) then it only runs those 5, not all 1000. That way it is still fast, and useful. Is this possible? [link] [comments] |
Basic Echo Implementation in Rust Posted: 20 Jan 2019 06:02 PM PST I'm looking for any possible help implementing the unix command echo in Rust. This is what I have so far but it's just basic functionality. I also need to implement the -n flag and -e flag that can handle the newline, tab, and backslash escapes. For all others it should panic. use std::env; fn main() { // starts command line arguments after name of program let mut input = env::args().skip(1); // check for next value in command line argument if let Some(arg) = input.next() { print!("{}", arg); // loops through remaining arguments, prints a preceding space for arg in input { print!(" {}", arg); } } println!(); } [link] [comments] |
Best way to track which random values in a series(1-1000) have been selected Posted: 20 Jan 2019 05:18 PM PST Say you have 1-1000 and want to o display each number randomly but also display every number with no repeats. What's the best way to do this? Should you store selected values in an array then loop through array each time before you select the next random number in the set (1-1000) Taking into account this is for a phone app with lists up to around 1500 so the sequence will happen each time a button in clicked so performance matters etc. [link] [comments] |
Posted: 20 Jan 2019 08:09 AM PST Somebody I know is getting into Java for the first time and was asking me for advice on IDEs. Somebody else suggested Atom to him. I don't know squat about Atom, as I used Eclipse back when I did java development. I don't want to suggest Eclipse merely because that is what I am used to. Is Atom good for Java? Does it have a debugger, code completion, and all of that stuff? [link] [comments] |
Wrong Outputs And Confused On How To Restart Program In A Loop (C++) Posted: 20 Jan 2019 02:52 PM PST So here's the code. I'm not going to explain the program here since I wrote a brief description about it in the code itself. So here are the two problems I'm trying to solve.
[link] [comments] |
Posted: 20 Jan 2019 01:25 PM PST It's almost time to replace our 6 year old dev computers. I've got some thoughts on what to replace them with, but wondered what other people felt was important. Currently we went with desktops, which are faster and cheaper than laptops. If we work from home we just remote desktop into our machines from our home PC's. This works for us, but what are people's thoughts on desktops vs laptops? Obviously with a dock at the office. We do windows development, visual studio, Sql server etc. We're also getting into mobile development so running mobile emulators is becoming more common. I don't really know what to suggest for a CPU, maybe something with integrated graphics so we don't need a video card. Memory I'm leaning towards mor is better, possibly up to 32gb, with 16 being the minimum. So anyway, anyone got some suggestions based on experience? [link] [comments] |
[QUESTION] Scraping prices from several online stores Posted: 20 Jan 2019 12:05 PM PST So I'm developing an app in which you can add an item from an online store and it notifies you when it's on sale. This idea is based on Shoptagr. Basically, it scrapes its price, stores it, and rechecks everyday until the price is lower. Now this can be done quite easily using Python and BeautifulSoup. The problems is that different sites use different HTML class namings, so you need to add a line for every site, limiting the app. Is there any way to create an universal approach so it detects the price in every store? [link] [comments] |
Displaying previously input data, I get a mysterious "35" instead Posted: 20 Jan 2019 11:58 AM PST I got a homework assignment to make a database of sorts with the user inputting the data into various arrays. I did it, all good and dandy, even passed the plushy cat test (don't have a rubber duck), but when I ran it, I encountered two problems.
The code itself looks like this (relevant bits only): [link] [comments] |
"Circle of best-fit" SAS Programming Posted: 20 Jan 2019 11:14 AM PST I am working on a project where I find the circle of best fit for my free-hand-drawn circle. The article https://blogs.sas.com/content/iml/2015/06/08/fit-circle.html#prettyPhoto is where I am taking the code from. Everything is working out great, except I'm not sure where I can find a measure of error for my circle. In the code, I'm thinking that it's the line "start ObjF(p)" which makes the variable F, a measure of error, the "objective function." The value for Objective function: https://imgur.com/a/S5lDdYb Is this a measure of the total sum of squares? Any help is appreciated. Thanks! [link] [comments] |
Posted: 20 Jan 2019 11:08 AM PST Hello everyone! My teacher gave us homework about recursive methods and while I do understand that most if not all of them are static I was able to solve the first problem which was: Recursive static method called sumatoria, it returns an int and receives as parameter another int. It should start the operation from 0 until the parameter that received. Sumatoria(10) returns 55 and the code does that. The second one is a little bit tricky therefore my questions. Método recursivo estático llamado base10a2, el cual recibe un entero base 10 y regresa un String con la representación del entero pero en base 2. Por ejemplo, base10a( 123 ) debe regresar "1111011". TRANSLATION: Recursive method called base10a2. It receives an int base 10 (how do I define this?), it returns a String with the representation in base 2. (How do you use two different base in the same method?) Finally how do I translate a int to a String using the base10a2 method? Is there something already implemented in Eclipse? Thank you and Best regards! [link] [comments] |
Posted: 20 Jan 2019 10:34 AM PST I am writing an image processing application in c# for my capstone and I was wondering if I'm allowed to use things like OpenCV or the c# equivalent libraries in my project. Would this be allowed since I'm using libraries of code that other people have written? I mean obviously I'm writing lots of my own code as well. I'm just not sure of the legal implications. Thanks. [link] [comments] |
Javascript: Unknown Array Behaviour Posted: 20 Jan 2019 10:15 AM PST I am trying to copy an array into two others. The first is has a copy of each element added from the original. The second adds a copy from the original with the first element in each original sub-array incremented by 1. Whilst debugging I noticed that in the second for loop, newSecond was being changed by the increment assignment on line 13 (first statement in second for loop). I was under the impression newSecond was completely separate. When I go to console log the two arrays, I get the exact same array for each. Perhaps I'm missing something obvious and I'm just not seeing it or this is an interaction I am aware of. I tried to pass by value via the splice method. In case you are wondering I am pushing elements because the arrays may contain elements beforehand. Thanks for your time. [link] [comments] |
Is there a way to find what type of comment the file uses given file type? Posted: 20 Jan 2019 09:40 AM PST I have hit a road block in the creation of a program to count lines of comments. The requirements of the program is that it has an input of any file type and an output of how many different comments there are in the inputted file. I believe there is a way to find what character starts a comment in a file type but I'm having no luck finding anything online. Is there some sort of metadata accessible that I am unaware of? The reason I believe there is a way to do this is because of this line in a program available online called CLOC.
I am working in java currently but not opposed to switching to another language that can solve this issue. [link] [comments] |
Making queued uploads continue even after page navigation in Angular Posted: 20 Jan 2019 03:27 AM PST Hello, and good day. Is it possible to make uploads continue even after page navigation? I am using ng2-file-upload and I want to make it possible to upload multiple files even after one has navigated away from the upload page. I have tried it, but only the most recent upload gets uploaded. I think the other web service calls get invalidated by the most recent one. I can't figure out how to make the calls asynchronous since I only provide the endpoint to the library. If anyone can point me in the right direction, it would be appreciated. Thanks! [link] [comments] |
how would i go about making a panel of links? Posted: 19 Jan 2019 11:50 PM PST I'm not sure if that's the correct phrase, but if you visit ESPN.com, along the banner there are links labeled "NBA" "NFL" "MLB" where a click on them leads to that particular page. How would I go about programming something like that? [link] [comments] |
Need help completing an assignment! Posted: 20 Jan 2019 06:45 AM PST Can someone help me with this one? Need it in "C Language". TIA! [url=https://ibb.co/VMSxRQG][img]https://i.ibb.co/j3MzmWY/A059-BEF3-7-F15-411-F-936-B-ABB134075237-png.jpg[/img][/url] [link] [comments] |
You are subscribed to email updates from AskProgramming. To stop receiving these emails, you may unsubscribe now. | Email delivery powered by Google |
Google, 1600 Amphitheatre Parkway, Mountain View, CA 94043, United States |
No comments:
Post a Comment