|
by: Count Dracula |
last post by:
Is there a way to write a c++ program that will
print out the last few lines of a file without reading
the whole file? The implementations of 'tail' I have
seen all appear to be system dependent. I am looking for
a standard (portable) c++ solution that will do just a
fraction of tail's functionality. To make a long story short,
I am looking for suggestions that may help me improve the
speed of the following implementation for long input...
|
by: jas |
last post by:
Hi,
I would like to start a new process and be able to read/write from/to
it. I have tried things like...
import subprocess as sp
p = sp.Popen("cmd.exe", stdout=sp.PIPE)
p.stdin.write("hostname\n")
however, it doesn't seem to work. I think the cmd.exe is catching it.
|
by: Abby |
last post by:
My .dat file will contain information like below.
///////////
First
0x04
0x05
0x06
Second
0x07
|
by: Martin Svensson |
last post by:
Hello!
I need some help/recommendations on how to do the following.
I have a program that writes an IP address two control numbers and a
date to file, on one line. It's a basic text file and it looks like this:
----- beginning of file -----
192.168.0.1 0 0 2004-08-01
192.168.0.2 1 0 2004-08-21
192.168.0.4 0 1 2004-08-12
|
by: Jose Reckoner |
last post by:
I'm running python 2.3 on Windows XP. Anyone have a quick small script
to convert .DT1 and .DEM data to ASCII or some other format? I don't
need a viewer.
Thanks!
|
|
by: Adi |
last post by:
Hello eveyone,
I wanna ask a very simple question here (as it was quite disturbing
me for a long time.)
My problem is to read a file line by line. I've tried following
implementations but still facing problems:
Assume that
FILE* filePointer;
unsigned char lineBuffer;
|
by: amatoo04 |
last post by:
hi guys, i am trying to finish up a program i started this morning and basically i got the whole input and output down... i just need help with the function which will scan the file and return number of lines, amount of characters, and amount of alphabetical characters. I was wondering if i would need 3 different functions, and how would i go about setting those up.
here is my code so far
/*Write a program, which scans a file and counts...
|
by: shermeenz |
last post by:
the file which i have to read is:
From sms@localhost.localdomain Wed May 16 10:46:03 2007
Return-Path: <sms@localhost.localdomain>
Received: from localhost.localdomain (localhost.localdomain )
by localhost.localdomain (8.13.5/8.13.5) with ESMTP id l4GEk300002418
for <sms@localhost.localdomain>; Wed, 16 May 2007 10:46:03 -0400
Received: (from sms@localhost)
by localhost.localdomain (8.13.5/8.13.5/Submit) id l4GEk3H3002417
for sms; Wed, 16...
|
by: flebber |
last post by:
I was working at creating a simple program that would read the content
of a playlist file( in this case *.k3b") and write it out . the
compressed "*.k3b" file has two file and the one I was trying to read
was maindata.xml . I cannot however seem to use the gzip module
correctly. Have tried the program 2 ways for no success, any ideas
would be appreciated.
Attempt 1
#!/usr/bin/python
|
by: Bill Cunningham |
last post by:
I don't think I can do this without some help or hints. Here is the code
I have.
#include <stdio.h>
#include <stdlib.h>
double input(double input) {
int count=0,div=0;
double mean=0,linput=0;
FILE *fpr, *fpw;
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
|