Questions tagged [programming]

Questions about tools for programming (compilers, IDE, etc.) For questions that involve programming, ask on Stack Overflow.

Filter by
Sorted by
Tagged with
0
votes
0answers
128 views

How to install HTML5/JavaScript to Netbeans?

I installed the NetBeans Connector plugin to Chromium on my MacBook. That worked perfectly. I could create new projects in HTML5/Javascript. I tried to do the same on my Linux Mint 18.3 computer. But ...
1
vote
1answer
132 views

LibreOffice placeholder fields documentation

I have to modify a LibreOffice template with a number of conditional statements. I managed to figure out one can add such statements through Insert > Fields > More fields, tab Functions, type ...
5
votes
4answers
24k views

How do I run .c file from the command line [duplicate]

I am beginning to work with micro controllers and programming them using C language. All my programming experience is with Python language. I know that if I want to test a script I have written in ...
22
votes
8answers
3k views

What are the best general purpose programming tools to complement Vim? [closed]

I've been using Vim as my text editor for a little while now and I feel like I'm taking the long way to do anything. I use ctags to tag my code base for navigation and I use grep (although ...
23
votes
6answers
4k views

Is it possible for a program to get number of spaces between command line arguments in POSIX?

Say if I wrote a program with the following line: int main(int argc, char** argv) Now it knows what command line arguments are passed to it by checking the content of argv. Can the program detect ...
3
votes
1answer
338 views

How to organize 3rd-party libraries for Python?

I am new in Python. I want to install many 3rd-party libraries (I think they are also called packages?) like, for example, "AstroPy". But I am not sure where the new source code will be stored (I mean,...
7
votes
2answers
3k views

Is the Unix Programmers Manual relevant for Linux?

I've been looking for an all around Linux Programmers manual but there isn't one... So that leads me to ask if the Unix Programmers Manual is relevant for Linux? The manual is here: http://cm.bell-...
-2
votes
1answer
52 views

Remove the gap pattern from files [closed]

I want to remove gaps (-). if gap found continuous >10 in all >Tem at the same position then remove the all gaps and also remove the sequences or gap from the query at the same position which are in ...
20
votes
7answers
10k views

How can I run BASIC code in a terminal?

I would like to run BASIC code, like you used to do on older computers, in Linux. (I am looking for a BASIC Interrupter that can run OS functions natively) What options do I have? (Preferably for ...
0
votes
1answer
46 views

How to output the display from an application to a vnc viewer? [closed]

How to I write a program on a machine with a high end graphics card and a desired platform so that other computers on a network can view the video output of the program on a separate monitor? Like ...
1
vote
2answers
9k views

sh: 1: program not found

I have written a script to execute files one by one by calling a installed program. The same program is executing from terminal, like procheck abc.pdb, then it's working fine. But when I execute this ...
1
vote
0answers
401 views

how to get dark theme or look for netbeans?

Not quite sure how to get dark themes for Netbeans: would like something similar to this look: just without the "side" window.
0
votes
2answers
440 views

What was the reason for lseek function to return file descriptors as long integer? [closed]

According to the book Advanced Programming in the Unix Environment :- "The character l in the name lseek means ‘‘long integer.’’ Before the introduction of the off_t data type, the offset argument ...
0
votes
1answer
21 views

Having multiple computers on network access file?

Say I have a program being run on multiple computers all on the same network (and all on the same account). Every once in a while the program needs to read/write a file save.dat. The actual file ...
1
vote
0answers
707 views

High iowait while the throughput and IOPS are low

I'm new to programming & Linux. After I finished my programs(do some IO), I found iowait is very high(~65%) while the throughput(~5M/s read + ~5M/s write) and IOPS(50~100 QPS) are low. iostat -...
5
votes
2answers
1k views

Right-align comments in vim

I'm writing C code using vim and are searching for a possibility to right-align my comments so that they all end at col 80. To give a short example: int a = 80; /* initialize a */ int b = 7; /* ...
1
vote
1answer
538 views

The most used language for Debian [closed]

What is the programming language mostly used to develop most parts of the Debian?
-1
votes
1answer
603 views

Shell script to move files and rename it with index [closed]

Consider two directories A and B. A contains a text file A.txt which changes its contents every 3 seconds. The shell script is to move A.txt to directory B and rename it to A_1.txt. After 3 seconds ...
1
vote
1answer
180 views

Question about the unbuffered I/O efficiency introduced in APUE 3th, 3.9

In Advanced Programming in Unix Environment 3th, 3.9, I/O Efficiency, I read about this: The file was read using the program shown in Figure 3.5, with standard output redirected to /dev/null. The ...
0
votes
1answer
41 views

Auto execute a program that plays music

as mentionned above, I would like to execute a programme that plays music at certain hour automatically. I tried using crontab but no outcome. This is what I put in crontab: 8 15 30 3 4 python ...
23
votes
5answers
25k views

Use of O_DIRECT on Linux

If this question is too programmer oriented, let me know. I wonder if there are people familiar with the O_DIRECT flag for the open() system call on Linux 2.6? Linus disparages its use, however high ...
0
votes
1answer
365 views

Possible to replace string if match string in two files? [closed]

i am aware of this doable by sed but only limited to one string let me explain let better, lets say in file 1 we got something like this tom,123456789 steve,1478321 jon,315457 and in the second file ...
4
votes
2answers
24k views

What is the command or hotkey for stopping a running program in DrJava?

I installed DrJava about a week ago. Its been working fine so far but I ran into an infinite loop and wanted a way to stop the program from running without having to force DrJava to quit. Is there a ...
1
vote
1answer
2k views

Wine not working for Linux Mint 18 Sarah. Trying to run Game Maker Studio, with no luck

I'm using Linux Mint 18 Sarah MATE 32 bit and I'm trying to download Game Maker Studio off of Wine 1.6.2. It was named "GMStudio-Installer-1.4.1763.exe". At first the installation process went ...
1
vote
1answer
60 views

Server response login error!

This is the script i build for i in `cat cain.txt` do uuid=$(curl -X POST -H "ACCEPT-LANGUAGE:en" -H "Content-Type:application/json" -H "Accept: application/json" -d '{"username":"TheUserName"}...
-1
votes
1answer
169 views

Append value as parameter to shell script

I found the value of a response (curl) with sed and now i need some help to take the value that i printed in a file and to use it in another substring in the same .sh script This is the response of ...
-1
votes
1answer
101 views

C++ Apps ready for Linux as well as Windows? [closed]

I don't actually know where to start and what keywords to use for searching more, but can we simply make a programs in C++ that runs in Linux as well as Windows. I guess we are talking about binary ...
-1
votes
1answer
62 views

An executable has two processes and is launched twice on two different terminals How to make the processes identify their roles

I have to write a c code which will contain two processes. And its executable will be launched twice on two different terminals. Both processes will know whats their role. One terminal will show ...
0
votes
3answers
719 views

Bash math & files [closed]

I need to do some math with the lines of a file and a number using bash. As in Ruby or python you can easily do string to number or viceversa. In bash all is untyped. I have a file contain numbers ...
13
votes
5answers
8k views

Is there a way for linux to pick up the phone?

I know that there is a way to make Linux dial out using a modem. Is there a way to program Linux (using a library/device) to pick up the modem (record phone calls) etc? see caller id?
-1
votes
2answers
206 views

How to deal with C makefiles under the “Unix as IDE” philosophy?

I've been for long using VIM as my main editor and never touched an IDE since. This works great for most of the programming languages on the market. When it comes to C, though, I still fell limited to ...
0
votes
1answer
50 views

Move files shell program

Hello i have got problem, on shell program(.sh), with this code I should copy the file JPG from the directory sorgente to destinazione but the code does not work, can you help me!! #!/bin/bash ...
8
votes
1answer
144 views

How do I usefully report a bug [closed]

I've used Linux Mint for a while now and I'm quite the fan. I'm not expert enough to go messing with the kernel or anything like that, but I've noticed small bugs in a couple of software packages that ...
-3
votes
4answers
87 views

Transforming letters in columns into numbers

I want to transform the letters in two columns into numbers. In the following example I want to change the letters in column 2 and 3 for numbers, so that A is changed to 1, B into 2, C into 3 and G ...
0
votes
2answers
244 views

Command “paste - - - - ”, how to specify a big column number

In command paste - - - -, numbers of - is equal the future column number. In my case, I have 55,000 future column, for me wont need to put 55,000 - what I will can use? Example: title1:A1 title2:A2 ...
0
votes
1answer
2k views

How do I install drjava in linux from terminal?

I've downloaded drjava-stable-20100816-r5366.jar file which is the drjava version for Linux. How do I install it on my machine? I'm running Ubuntu 11.10. I have OpenJDK Java 6 runtime and Sun Java 6 ...
1
vote
1answer
98 views

Simplest way to add a data lookup to an HTML website on Ubuntu?

I want to learn how to make the simplest possible data lookup function on a website. I don't want to use any of the usual tools such as MySQL or a CMS or any other heavy framework. I set up an Ubuntu ...
2
votes
1answer
129 views

Why doesn't cc (the C compiler) and similar utilities use standard streams by default? [closed]

Background If think most of us agree that filters and pipes are the very foundation of Unix systems. Pipes and filters are very powerful tools. Almost all Unix utilities use the standard input and ...
22
votes
5answers
5k views

Is automake and autoconf the standard way to compile code?

I sometimes compile apps from source and I've either been using: ./configure make sudo make install But recently, I came across ./autogen.sh which generates the configure and make scripts for me and ...
2
votes
2answers
442 views

Trying to convert a simple C program into an AWK program

Hey guys a couple of weeks ago I wrote a C program that prompts the user for the name of a text file and then prompts the user for a word. The program then outputs the input text file with numbers to ...
1
vote
1answer
76 views

vim: Match WORD in current block with balanced brackets

When matching in vim there are words, WORDs and blocks among other things. Now for editing code, blocks are useful, words are somewhat useful, but WORDs are mostly useless, because they often include ...
2
votes
2answers
12k views

Extract name of file without extension in shell script [duplicate]

Possible Duplicate: Best way to remove file extension from a string? How to rename multiple files by removing the extension? I have a metric boatload of .txt files I'd like to load into a ...
-2
votes
1answer
43 views

C Program Problem [closed]

#include<stdio.h> int main(void) { int a; int count=0; for(a=1;a<=10;a=a+1) { if(a>3) count=count+1; } printf("%d numbers were greater than 3\n",count); return ...
1
vote
1answer
182 views

`man` pages for languages other than C (e.g, python, R, javascript, etc)?

man pages are a phenomenal resource while programming in C on Linux. While looking at someone else's code, if you see something foreign you can immediate research it in another terminal with $ man 3 ...
2
votes
0answers
54 views

What is the background of the program segmentation?

Each program is separated into several segments like: code segment data segment stack segment heap segment But who was responsible for that progression? The compiler and linker has to support that ...
24
votes
3answers
6k views

Will my linux binary work on all distros?

I found a good replacement IDE for Delphi called Lazarus. But I don't have a question for programmers. Will the statically linked Linux binary work on all Linux distributions? I.e. it does not matter ...
1
vote
3answers
201 views

What is the reasoning/design choice behind the unix/linux file system structure?

I've recently switched from using windows and I'll now be running linux on my computer. In windows there's the program files folder. Most of a programs files go into its own folder there which to me ...
2
votes
2answers
2k views

Linux System calls in C on OSX

So I did a quick test and #include <sys/types.h> #include <unistd.h> #include <stdio.h> int main (int argc, char *argv[]) { printf("Hello World\n"); printf("%d\n",...
5
votes
1answer
11k views

How to install Scala?

Please note: I have to use the source package, not the prebuilt package from the repo (it is broken, at least IDEA complains). From the page: http://www.scala-lang.org/downloads I downloaded scala....
1
vote
1answer
142 views

Is there a tool that automatically inserts and updates a script header block for e.g. shell or Python scripts?

I found scripts by a former admin who scripted quite nice things with Bash or Python. All his scripts are well formatted and equipped with a always similar looking "script header" or "code header", I ...