What are the different file formats for embroidery? [closed] - file-format

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about programming within the scope defined in the help center.
Closed 9 days ago.
This post was edited and submitted for review 8 days ago and failed to reopen the post:
Original close reason(s) were not resolved
Improve this question
My husband owns a Bernina embroidery machine and I'm eager to explore the possibility of generating designs through programming. What programming language would be best suited for writing a program to output data in a format compatible with the Bernina embroidery machine's software, or for converting from a format such as HPGL to the appropriate format for the machine? My objective is to either figure out how to output data in a format compatible with the machine's software, or alternatively, find a free or low-cost tool that can convert from a format I can produce, such as HPGL or any other well-documented format, to the appropriate format for the machine. My aim is to create a file with one XY coordinate per stitch, including instructions for thread changes (pauses for thread switching), without relying on features like area fills, stitch spacing adjustments, or stitching order optimization, as I prefer to manage these elements myself.

Related

How to overwrite a specific line in a file [C] [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 2 years ago.
Improve this question
File data example line:
Sicilia 005 frenkco mastro 202020kkk 3 11-23-2155 12-44-6666
I want to overwrite that line with another same line copied but with some changed values:
Calabria 006 frenkco mastro 202020kkk 3 11-23-2155 12-44-6666
That's the result i want, but if I change values and then use "fprintf", it prints a new line without deleting the first one.
You cannot overwrite a specific line, because lines are just conventions related to \n bytes. Please read more about C programming and consider reading the n1570 C standard.
You either want to copy the source file to a target one (this is how sed(1) works on Linux; study its source code since it is free software) or use higher-level approaches such as gdbm or sqlite or databases.
For small amount of data practically fitting in RAM (e.g. less than a gigabyte) or in your page cache, a common approach is to generate a new textual file entirely. It might be a temporary file that you'll rename (e.g. using atexit(3) or simply later on)
You could want to read a textbook on operating systems and/or learn to use databases (perhaps MongoDB or PostGreSQL, but there are many other approaches too) or indexed files.
In some cases, you might consider serialization and parsing techniques, perhaps using textual formats like JSON or YAML (for which many open source libraries are available, and worth studying).

What are some common uses for the tcpdump -dd option? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 7 years ago.
Improve this question
In reading the man pages for tcpdump, I saw that the -dd arguement would output the dump as a fragment of a C file. In what situations is that useful? I take it this is to quickly include and compile the fragment in a program that will be used to process the data according to code we write ourselves? Does this have its utility with unknown or new protocols? Is there some other common, standing situation in which this is needed? Just curious.
It's useful if you're writing a program using libpcap/WinPcap that would use a filter but that, for whatever reason, wouldn't run pcap_compile() to translate a filter string into BPF machine code; it lets you do the compilation with tcpdump and generate some text that you could use in the initialization of an array of struct bpf_insn (a pointer to which, and a count of elements in which, you'd put in a struct bpf_program).
I'm not sure who would do that, however.

How to write bytes to disc in C? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question appears to be off-topic because it lacks sufficient information to diagnose the problem. Describe your problem in more detail or include a minimal example in the question itself.
Closed 9 years ago.
Improve this question
I want to write a program that formats a disc to a new format (not NTFS or FAT32) and can read from and write to the disc, In order to do this, I have to have a way to write single bytes to a disc (without creating files). How do I do that?
EDIT: I found this. But I'm not sure if using CreateFile() as Eli Bendersky said in the first answer (when organized in order of votes) let's you write one byte (or even one bit) at a time, or do you have to write full sectors at a time.
Answer: Since I can't post an answer the question because it was closed, I will answer it write here. You don't need need API functions to do this. All you need to do is open the disk like you open any other file. Like this:
int hFile;
hFile=open("/dev/sdb",0_RDWR);
You program has to directly talk to the driver as you will be by-passing the file-system.

strip certain character from lines in a textfile [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question appears to be off-topic because it lacks sufficient information to diagnose the problem. Describe your problem in more detail or include a minimal example in the question itself.
Closed 8 years ago.
Improve this question
I have a text file (generated by a script each week) with multiple lines, where I'd like to strip out certain characted, that differ each week. The files can look something like this;
Community S05E05 Geothermal Escapism SD TV.avi
Community S05E02 Introduction to Teaching SD TV.mp4
Supernatural S09E12 Sharp Teeth SD TV.avi
Elementary S02E11 Internal Audit SD TV.mp4
What I want removed is the season/episode numbering, and the quality and filetype. How to do this on a synology machine (busybox linux).
Given the comment you posted about a perl solution, it sounds like this is all you need:
$ awk '{$2="-";NF-=2}1' file
Community - Geothermal Escapism
Community - Introduction to Teaching
Supernatural - Sharp Teeth
Elementary - Internal Audit

How to implement CRC using C language [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this question
I am bit new to programming and i want to send a float data to eeprom from a controller and i want to implement crc for the error detection of the data when ever i tries to read or write.
This is my intention.But i found many algorithms for implementing crc and its been quite confusing for me to follow which one.
The compiler provides 4 bytes of space for all data and its function sends each byte one at a time.So i trust i would be required to do the crc of each 8bit data or can implement it as a whole.
And i am using C language.
In brief:
i just need to do a
1.Crc implementation.
2.Common Data size =32 bits
3.Compiler function sends one byte at a time.
4.And how do we fix which algorithm to go for.
Thank you very much
Try Reading this article(It Contains C Codes and Diagrams Which you need) :
http://www.barrgroup.com/Embedded-Systems/How-To/CRC-Calculation-C-Code
CRCs are among the best checksums available to detect and/or correct errors in communications transmissions. Unfortunately, the modulo-2 arithmetic used to compute CRCs doesn't map easily into software. This article shows how to implement an efficient CRC in C.

Resources