Only writing Integer pixel array to a .txt file,or showing in Frame
Sir,
I want to write integer values (range:0 to 255) to a .txt file .Actually after manipulating a .jpeg/.gif image I have gotten a 2D pixel array and a 1D pixel array that can be easily shown in console but I want to write this pixel array into a .txt file. Using of writeInt() is not working. Actually after using this faction the created file contain information which is non-alphanumeric /alphanumeric characters......
following is error free the code: Plz. See only and only into the �class TestImage�and plz look after line marked by //�my_problem_to_be_resolved.�It is just few lines of code .I promise you will not be bothered.Plz��..
import java.awt.*;
import java.io.File;
import java.io.FileWriter;
import java.awt.image.*;
import java.io.*;
import java.util.*;
import javax.imageio.*;
import javax.imageio.stream.*;
import java.awt.image.Raster;
import java.awt.image.WritableRaster;
class Image {
protected int width,height;
// 'samples' stores the image pixel values.
protected int[][] samples;
// Constructor: Reads the image from the
// specified file name.
public Image(String filename)
throws Exception { read(filename); }
// Returns the pixel width of the image.
public int getWidth() { return width; }
// Returns the pixel height of the image.
public int getHeight() { return height; }
// Reads the image from the specified file
// name into the 'samples' array. Throws an
// exception if the image is stored in an
// unsupported file format (currently only
// .GIF, .JPG, and .PNG are supported by Sun).
public void read(String filename)
throws Exception {
// Extract the file name suffix.
String ext = filename.substring
(filename.indexOf('.')+1);
// Create a file object for the file name.
File fileImage = new File(filename);
// Get a list of ImageReaders that claim
// to be able to decode this image file
// based on the file name suffix.
Iterator imageReaders = ImageIO.
getImageReadersBySuffix(ext);
ImageReader imageReader;
// Grab the first ImageReader in the list.
if (imageReaders.hasNext())
imageReader = (ImageReader)
imageReaders.next();
// If we get here we cannot decode the image.
else throw new IIOException
("Unsupported image format");
// Create a file input stream object to
// read the image date.
FileImageInputStream imageInputStream =
new FileImageInputStream(fileImage);
// Tell the ImageReader object to read data
// from our file input stream object.
imageReader.setInput(imageInputStream);
// Get the width and height of the image.
width = imageReader.getWidth(0);
height = imageReader.getHeight(0);
// Read the image from the file input stream,
// and close the input stream when done.
BufferedImage bufImage =
imageReader.read(0);
imageInputStream.close();
// Get a raster object so we can extract the
// pixel data from the BufferedImage.
WritableRaster wRaster =
bufImage.getRaster();
// Create our 'samples' 2d-array.
samples = new int[height][width];
// Extract the image data into our 'samples'
// array.
for (int row = 0; row < height; row++)
for (int col = 0; col < width; col++)
samples[row][col] =
wRaster.getSample(col,row,0);
// Write the image stored in the 'samples'
// array to the specified file. The file name
// suffix should be a supported image file
// format (currently either .JPG or .PNG).
public void write(String filename)
throws Exception {
// Extract the file name suffix.
String ext = filename.substring
(filename.indexOf('.')+1);
// Create a file object for the file name.
File fileImage = new File(filename);
// Get a list of ImageWriters that claim to
// be able to encode images in the specified
// image file format based on the file name
// suffix.
Iterator imageWriters = ImageIO.
getImageWritersBySuffix(ext);
ImageWriter imageWriter;
// Grab the first ImageWriter in the list.
if (imageWriters.hasNext())
imageWriter = (ImageWriter)
imageWriters.next();
// If we get here we cannot encode the image.
else throw new IIOException
("Unsupported image format");
// Create a file output stream object to
// write the image data.
FileImageOutputStream imageOutputStream
= new FileImageOutputStream
(fileImage);
// Tell the ImageWriter to use our file
// output stream object.
imageWriter.setOutput
(imageOutputStream);
// The ImageWriter.write() method expects a
// BufferedImage. Convert our 'samples' array
// into a BufferedImage.
BufferedImage bufImage =
createBufferedImage();
// Encode the image to the output file.
imageWriter.write(bufImage);
imageOutputStream.close();
// Draws the image stored in the 'samples'
// array on the specified graphics context.
public void draw(Graphics gc,int x,int y){
BufferedImage bufImage =
createBufferedImage();
gc.drawImage(bufImage,x,y,null);
// Converts the 'samples' array into a
// BufferedImage object. Students do not have
// to understand how this works.
private BufferedImage
createBufferedImage() {
// Create a monochrome BufferedImage object.
BufferedImage bufImage = new
BufferedImage(width,height,
BufferedImage.TYPE_BYTE_GRAY);
// Create a WriteableRaster object so we can
// put sample data into the BufferedImage
// object's raster.
WritableRaster wRaster =
bufImage.getRaster();
// Copy the 'samples' data into the
// BufferedImage object's raster.
for (int row = 0; row < height; row++)
for (int col = 0; col < width; col++)
wRaster.setSample
(col,row,0,samples[row][col]);
// Return the newly created BufferedImage.
return bufImage;
} // End of Class Image
class TestImage {
public static void main(String args[])
throws Exception {
// Create a frame to display the image.
Frame frame = new Frame("Test Image");
frame.setSize(1024,768);
frame.setVisible(true);
Graphics gc = frame.getGraphics();
try {
// Read the image from the file.
Image img = new Image("C:/lilies.jpg");
int height=img.getHeight();
int width =img.getWidth();
//�my_problem_to_be_resolved.�
File image_object_arry=new File("C:/Image_array.txt");
FileOutputStream image_object_arry_stream= new FileOutputStream(image_object_arry);
DataOutputStream int_image_object_arry_stream=new DataOutputStream(image_object_arry_stream);
//Conversion of two dimensional pixel arrry into one dimensional array
int intPixels1[] = new int [height * width];
int k = 0;
for(int i = 0; i <= width; i++) {
for(int j = 0; j <= height; j++) {
intPixels1[k] = img.samples[i][j];
int_image_object_arry_stream.writeInt((int) intPixels1[k]);
// System.out.println(intPixels1[k]);
k = k+1;
import java.awt.*;
import java.io.File;
import java.io.FileWriter;
import java.awt.image.*;
import java.io.*;
import java.util.*;
import javax.imageio.*;
import javax.imageio.stream.*;
import java.awt.image.Raster;
import java.awt.image.WritableRaster;
class Image {
protected int width,height;
// 'samples' stores the image pixel values.
protected int[][] samples;
// Constructor: Reads the image from the
// specified file name.
public Image(String filename)
throws Exception { read(filename); }
// Returns the pixel width of the image.
public int getWidth() { return width; }
// Returns the pixel height of the image.
public int getHeight() { return height; }
// Reads the image from the specified file
// name into the 'samples' array. Throws an
// exception if the image is stored in an
// unsupported file format (currently only
// .GIF, .JPG, and .PNG are supported by Sun).
public void read(String filename)
throws Exception {
// Extract the file name suffix.
String ext = filename.substring
(filename.indexOf('.')+1);
// Create a file object for the file name.
File fileImage = new File(filename);
// Get a list of ImageReaders that claim
// to be able to decode this image file
// based on the file name suffix.
Iterator imageReaders = ImageIO.
getImageReadersBySuffix(ext);
ImageReader imageReader;
// Grab the first ImageReader in the list.
if (imageReaders.hasNext())
imageReader = (ImageReader)
imageReaders.next();
// If we get here we cannot decode the image.
else throw new IIOException
("Unsupported image format");
// Create a file input stream object to
// read the image date.
FileImageInputStream imageInputStream =
new FileImageInputStream(fileImage);
// Tell the ImageReader object to read data
// from our file input stream object.
imageReader.setInput(imageInputStream);
// Get the width and height of the image.
width = imageReader.getWidth(0);
height = imageReader.getHeight(0);
// Read the image from the file input stream,
// and close the input stream when done.
BufferedImage bufImage =
imageReader.read(0);
imageInputStream.close();
// Get a raster object so we can extract the
// pixel data from the BufferedImage.
WritableRaster wRaster =
bufImage.getRaster();
// Create our 'samples' 2d-array.
samples = new int[height][width];
// Extract the image data into our 'samples'
// array.
for (int row = 0; row < height; row++)
for (int col = 0; col < width; col++)
samples[row][col] =
wRaster.getSample(col,row,0);
// Write the image stored in the 'samples'
// array to the specified file. The file name
// suffix should be a supported image file
// format (currently either .JPG or .PNG).
public void write(String filename)
throws Exception {
// Extract the file name suffix.
String ext = filename.substring
(filename.indexOf('.')+1);
// Create a file object for the file name.
File fileImage = new File(filename);
// Get a list of ImageWriters that claim to
// be able to encode images in the specified
// image file format based on the file name
// suffix.
Iterator imageWriters = ImageIO.
getImageWritersBySuffix(ext);
ImageWriter imageWriter;
// Grab the first ImageWriter in the list.
if (imageWriters.hasNext())
imageWriter = (ImageWriter)
imageWriters.next();
// If we get here we cannot encode the image.
else throw new IIOException
("Unsupported image format");
// Create a file output stream object to
// write the image data.
FileImageOutputStream imageOutputStream
= new FileImageOutputStream
(fileImage);
// Tell the ImageWriter to use our file
// output stream object.
imageWriter.setOutput
(imageOutputStream);
// The ImageWriter.write() method expects a
// BufferedImage. Convert our 'samples' array
// into a BufferedImage.
BufferedImage bufImage =
createBufferedImage();
// Encode the image to the output file.
imageWriter.write(bufImage);
imageOutputStream.close();
// Draws the image stored in the 'samples'
// array on the specified graphics context.
public void draw(Graphics gc,int x,int y){
BufferedImage bufImage =
createBufferedImage();
gc.drawImage(bufImage,x,y,null);
// Converts the 'samples' array into a
// BufferedImage object. Students do not have
// to understand how this works.
private BufferedImage
createBufferedImage() {
// Create a monochrome BufferedImage object.
BufferedImage bufImage = new
BufferedImage(width,height,
BufferedImage.TYPE_BYTE_GRAY);
// Create a WriteableRaster object so we can
// put sample data into the BufferedImage
// object's raster.
WritableRaster wRaster =
bufImage.getRaster();
// Copy the 'samples' data into the
// BufferedImage object's raster.
for (int row = 0; row < height; row++)
for (int col = 0; col < width; col++)
wRaster.setSample
(col,row,0,samples[row][col]);
// Return the newly created BufferedImage.
return bufImage;
} // End of Class Image
/*class TestImage {
public static void main(String args[])
throws Exception {
// Create a frame to display the image.
Frame frame = new Frame("Test Image");
frame.setSize(1024,768);
frame.setVisible(true);
Graphics gc = frame.getGraphics();
try {
// Read the image from the file.
Image img = new Image("C:/srk.jpg");
// Display the image.
img.draw(gc,10,40);
// Flip the image upside down
//img.flipX();
// Display the flipped image.
img.draw(gc,20+img.getWidth(),40);
// Write the new image to a file
img.write("HorseNew.jpg");
} catch (Exception e) {
System.out.println
("Exception in main() "+e.toString());
class TestImage {
public static void main(String args[])
throws Exception {
// Create a frame to display the image.
Frame frame = new Frame("Test Image");
frame.setSize(1024,768);
frame.setVisible(true);
Graphics gc = frame.getGraphics();
try {
// Read the image from the file.
Image img = new Image("C:/lilies.jpg");
int height=img.getHeight();
int width =img.getWidth();
File image_object_arry=new File("C:/Image_array.txt");
FileOutputStream image_object_arry_stream=new FileOutputStream(image_object_arry);
DataOutputStream int_image_object_arry_stream=new DataOutputStream(image_object_arry_stream);
//Conversion of two dimensional pixel arrry into one dimensional array
int intPixels1[] = new int [height * width];
int k = 0;
for(int i = 0; i <= width; i++) {
for(int j = 0; j <= height; j++) {
intPixels1[k] = img.samples[i][j];
int_image_object_arry_stream.writeInt((int) intPixels1[k]);
// System.out.println(intPixels1[k]);
k = k+1;
catch (Exception e) {
System.out.println("Exception in main() "+e.toString());
catch (Exception e) {
System.out.println("Exception in main() "+e.toString());
}
My Friend, you need to put your code within CODE tags
And I suspect if anyone would go through your code this way.
Assuming your problem is to write pixel values to a file you may use this,
try{
// Create file
FileWriter fstream = new FileWriter("out.txt");
BufferedWriter out = new BufferedWriter(fstream);
for(int i =0; pixels.length() ; i++)
out.write(pixels[i]+"\t");
//Close the output stream
out.close();
}catch (Exception e){//Catch exception if any
System.err.println("Error: " + e.getMessage());
}
Similar Messages
-
Saving an integer array into a .txt file
hii, im only a beginner in java, so this is the only code i've learned so far for saving array elements into a file
public static void saveNames(String [] name) throws IOException
FileWriter file = new FileWriter("Example\\names.txt");
BufferedWriter out = new BufferedWriter(file);
int i = 0;
while (i < name.length)
if (name[i] != null)
out.write(name);
out.newLine();
i++;
out.flush();
out.close();
However, this is only used for string arrays; and i can't call the same method for an integer array (because it's not compatible with null)
I don't really understand this code either... since my teacher actually just gave us the code to use, and didn't really explain how it works
I have the same problem for my reading a file code as well --> it's only compatible with string
public static String [] readNames (String [] name) throws IOException
int x = 0;
int counter = 0;
String temp = "asdf";
name = new String [100];
FileReader file = new FileReader("Example\\names.txt");
BufferedReader in = new BufferedReader(file);
int i = 0;
while (i < array.length && temp != null) // while the end of file is not reached
temp = in.readLine();
if (temp != null)
name[i] = temp; // saves temp into the array
else
name[i] = "";
i++;
in.close(); // close the file
return name;
Could someone suggest a way to save elements from an integer array to a file, and read integer elements of that file?
Or if it's possible, replace null with a similar variable (function?), that is suitable for the integer array (i can't use temp != 0 because some of my elements might be 0)
Thanks so much!!!!!because it's not compatible with nullI think it should be okay to just remove the null condition check since there are no null elements in a primitive array when writing.
Use Integer.parseInt() [http://java.sun.com/javase/6/docs/api/java/lang/Integer.html] to convert the String into an Integer when you read it back and use Integer.toString() to be able to write it as a String. -
Trouble writing pixel array back to gif file
Hi everyone. I am in the middle of constructing a steganography api for a final year group project. I have taken out the pixels into an array from a gif file. I am having trouble writing it back to a gif file. Here is my code:
import javaSteg.stegoLibrary.*;
import java.awt.*;
import java.awt.image.*;
import java.io.*;
import Acme.*;
import Acme.JPM.Encoders.*;
public class Gif extends Canvas{
public void encodeGif(byte[] imageData){
//create toolkit obarrayPointerect
Toolkit t = Toolkit.getDefaultToolkit();
MediaTracker tracker = new MediaTracker(this);
//decode specified Gif cover
Image img = t.createImage(imageData);
tracker.addImage(img,0);
try{
tracker.waitForAll();
catch(InterruptedException e){
System.out.println("Tracker interrupted.");
//retrive picture from image
int[] pix = new int[img.getWidth(this) * img.getHeight(this)];
PixelGrabber pg = new PixelGrabber(img, 0, 0, img.getWidth(this), img.getHeight(this), pix, 0, img.getWidth(this));
try{ pg.grabPixels();
} catch (InterruptedException ioe) {
System.err.println("Interrupted");
if ((pg.getStatus() & ImageObserver.ABORT) != 0) {
System.err.println("image fetch aborted or errored");
return;
//put into byte array
byte[] pixels = new byte[img.getWidth(this) * img.getHeight(this)];
for(int arrayPointer=0;arrayPointer<pix.length;arrayPointer++){
pixels[arrayPointer] = new Integer(pix[arrayPointer]).byteValue();
//edit pixels not implemented yet
//assign edited pixels to an image
img = t.createImage(pixels);
// Now encode the image using ACME free GIF encoder (www.acme.com)
try{
FileOutputStream fos = new FileOutputStream("D:\\result.gif");
GifEncoder encoder = new GifEncoder(img, fos);
encoder.encode();
fos.close();
}catch(IOException e) {
System.out.println("FATAL IOException "+e);
From this i get a single pixel in my output gif file. Is there a way of swapping out the edited pixels with the origonal pixels in the image file? or an alternative way to write back the complete file.
Thanks a lot
MickyTive managed to solve it. For those who come across this thread and want to know the solution i needed to use MemoryImageSource with the pixels inorder to pass them to the createImage method :o)
-
Array to store .txt file data
I have a .txt file containing lines like the following:
1,50000.343,2000.745
2,25645.856,4600,856
3,24356.756,8766,345
I'd like to store the strings as numbers and place them into an array, but I'm unsure how to do so.
Any help would be appreciatedThe StreamTokenizer class will help you read the input, separating numbers from commas. Once you have the number as a String, the classes like Double and Integer have constructors that accept String arguments and do the hard work for you:
// someString came from the file
// you checked to see if it had a "." and it didn't, so
// you know it's an integer
Integer myInteger = new Integer( someString );
int myInt = myInteger.getInt(); -
Writing scripts to edit or parse txt file How To?
Not sure if this is the correct forum for programming type question. If not someone point me in the right direction?
I'm a programming student and I'd like to teach myself some scripting skills over the summer break.
In particular, I've got a txt file I'd like to split into three txt files. A google calendar file that I'd like to divide into three separate calendars.
I know what strings I want to put where. My problem is what scripting language am I trying to use? Applescript? Something else?
Any suggestions or ideas? Recommendations on reading materials or sample scripts I should look at?
Thanks for the help.Perl is a huge programming language. A more expedient project would be to learn some basic shell commands such as sed, awk, tr and cut. The sed command is optimized for linewise operations, awk is optimized for columnwise operations and tr is a basic character translation tool especially useful when feeding Mac files into a UNIX command.
Setting up sed and awk commands to read and write files is a big part of learning, especially since shell commands cannot normally write to a file in situ.
Applescript is not ideal for text manipulation as it is slow, uses a bulky delimiter system and has irritating file access limitations. However it can be a powerful interface for the above mention shell commands. Applescript offers an ideal way to assemble shell commands with user-input variables. Of course, shell commands cannot be interactive with Applescript, so you learn to do incremental operations on text files.
Another handy use for Applescript is to send your command to Terminal, which makes an ideal output display. -
Help with .txt files importing / showing
I am working cs4. / as 3.0
I need some help understanding placing text with .txt files.
I have a txt & css file in my site folder.
Do I need to add a line to my script to locate the files in
my site folder?
Any help would be appreciated. thanks
Here is what I have so far.
var fileTxt:String;
var myTextLoader:URLLoader = new URLLoader();
var cssLoader:URLLoader = new URLLoader();
myTextLoader.addEventListener(Event.COMPLETE, onloaded);
myTextLoader.load(new URLRequest("textInfo.txt"));
function onLoaded(e:Event):void {
fileTxt=myTextLoader.data;
callCss();
function callCss():void {
var cssRequest:URLRequest=new URLRequest("stylesSite.css");
cssLoader.addEventListener(Event.COMPLETE, onCss);
cssLoader.load(cssRequest);
function onCss(e:Event):void {
var css:StyleSheet = new StyleSheet();
css.parseCSS(cssLoader.data);
infoText.styleSheet=css;
infoText.wordWrap=true;
infoText.htmlText=fileTxt;
infoScroll.update();Thanks for the information. Am I missing something or you forgot to actually post a question?
What are the problems you have? What have you tried and how did not it work?
Mike -
Compare two .txt files and show result
HI
Could anybody show me how to compare two text files and show the result.
i.e.
textfile1.txt
harry.denmark
karry.sweden
textfile2.txt
harry.denmark
karry.sweden
marry.usa
Compare
result=
marry.usa
The text files I want to compare are how ever much larger than this example. (up to 2-3.000 words)
anybody ??
Sincerly
PederHI & thanks for reply
I know almost nothing about java so could you or anybody please show me the code to do this? Or is it perhaps too large or difficult a code?
I know how to compile a .java file and run it in prompt :-) and thats about it (almost)
I offcourse understand if its too much to ask for :-) -
How to read this kind of array from a txt file?
I have been trying to read this file given below.
Please have a look at 4th line, there is a gap between 89 and 32.
I want to read a gap as a "0" value, and convert all values to integer.
I have been using split function, but I still don't know how to figure the gap problem.
Please help me, thanks.
1 60 72 88 41 58
2 50 45 37 86 13
3 44 41 99 54 24
4 12 89 32 89
5 48 97 25 85 55
6 22 46 34 90 98
7 75 85 5 1
8 86 23 39 69 52
9 42 18 75 13 72
10 24 77 27 18 30
11 34 42 5 12
12 31 87 47 75 8
13 19 16 74 55 77
14 26 57 5 63 81
15 51 7 95 100 8
16 33 93 82 85 72
17 55 21 49 25 3
18 15 29 33 18 61
19 33 42 64 66 63
20 51 36 97 39 19
21 51 60 32 25 51
22 88 34 29 76 10
23 37 93 9 38 100
-------------------------------------------scan each line with the following code
it adds each line to a new array
//scan file
try {
Scanner Filescan = new Scanner(new File("directory"));
while (Filescan.hasNextLine()) {
Array.add(Filescan.nextLine());
catch (Exception e)
System.out.println (" File has not been found");
} -
Does anyone know why these .txt files keep showing up in my Applications folder?
This is an example of the content:
sleep time resolution: 10.03 ms.
### TRAIN ###
1318806315.550533 1318806315.686240 0
1318806315.550554 1318806315.686249 1
1318806315.550561 1318806315.686681 2
1318806315.550572 1318806315.687085 3
1318806315.550578 1318806315.687599 4
1318806315.550584 1318806315.687923 5
1318806315.550589 1318806315.688252 6
1318806315.550595 1318806315.688697 7
1318806315.550600 1318806315.689252 8
1318806315.550607 1318806315.689578 9
1318806315.550614 1318806315.689928 10
1318806315.550619 1318806315.690322 11
1318806315.550626 1318806315.690446 12
1318806315.550632 1318806315.691041 13
1318806315.550638 1318806315.691605 14
1318806315.550644 1318806315.691854 15
1318806315.550650 1318806315.692438 16
1318806315.550657 1318806315.692447 17
1318806315.550663 1318806315.693073 18
1318806315.550671 1318806315.693384 19
1318806315.550678 1318806315.693516 20
1318806315.550685 1318806315.694069 21
1318806315.550692 1318806315.694625 22
1318806315.550702 1318806315.694634 23
1318806315.550711 1318806315.695067 24
1318806315.550721 1318806315.695167 25
1318806315.550730 1318806315.695621 26
1318806315.550737 1318806315.696067 27
1318806315.550745 1318806315.696533 28
1318806315.550752 1318806315.696756 29
1318806315.550757 1318806315.696945 30
1318806315.550764 1318806315.697381 31
1318806315.550770 1318806315.702614 32
1318806315.550777 1318806315.703059 33
1318806315.550783 1318806315.703223 34
1318806315.550790 1318806315.703740 35
1318806315.550797 1318806315.703857 36
1318806315.550803 1318806315.704109 37
1318806315.550809 1318806315.704277 38
1318806315.550816 1318806315.704355 39
1318806315.550822 1318806315.704641 40
1318806315.550828 1318806315.704808 41
1318806315.550836 1318806315.705043 42
1318806315.550842 1318806315.705215 43
1318806315.550848 1318806315.705320 44
1318806315.550854 1318806315.705624 45
1318806315.550860 1318806315.705766 46
1318806315.550866 1318806315.706175 47
1318806315.550874 1318806315.706268 48
1318806315.550880 1318806315.706441 49
### TRAIN ###
1318806316.151192 1318806316.286930 0
1318806316.151215 1318806316.286941 1
1318806316.151221 1318806316.287444 2
1318806316.151227 1318806316.287880 3
1318806316.151236 1318806316.288402 4
1318806316.151243 1318806316.288879 5
1318806316.151249 1318806316.289402 6
1318806316.151256 1318806316.289825 7
1318806316.151262 1318806316.290206 8
1318806316.151268 1318806316.290515 9
1318806316.151274 1318806316.290991 10
1318806316.151279 1318806316.291262 11
1318806316.151286 1318806316.291912 12
1318806316.151294 1318806316.292299 13
1318806316.151302 1318806316.292758 14
1318806316.151309 1318806316.293196 15
1318806316.151338 1318806316.293663 16
1318806316.151345 1318806316.294089 17
1318806316.151352 1318806316.294614 18
1318806316.151359 1318806316.295027 19
1318806316.151365 1318806316.295347 20
1318806316.151371 1318806316.295902 21
1318806316.151377 1318806316.296305 22
1318806316.151383 1318806316.296687 23
1318806316.151389 1318806316.296852 24
1318806316.151395 1318806316.297227 25
1318806316.151401 1318806316.297645 26
1318806316.151407 1318806316.298074 27
1318806316.151413 1318806316.298556 28
1318806316.151419 1318806316.298831 29
1318806316.151427Here is what came about: Thank you.....
PID TT STAT TIME COMMAND
1 ?? Ss 0:05.97 /sbin/launchd
10 ?? Ss 0:00.70 /usr/libexec/kextd
11 ?? Ss 0:00.63 /usr/sbin/notifyd
12 ?? Ss 0:00.18 /usr/sbin/diskarbitrationd
13 ?? Ss 0:06.22 /usr/libexec/configd
14 ?? Ss 0:01.76 /usr/sbin/syslogd
15 ?? Ss 0:03.95 /usr/sbin/DirectoryService
16 ?? Ss 0:00.83 /usr/sbin/distnoted
18 ?? Ss 0:00.67 /usr/sbin/ntpd -c /private/etc/ntp-restrict.conf -n
21 ?? Ss 2:17.45 /System/Library/PrivateFrameworks/MobileDevice.frame
22 ?? Ss 0:00.05 /sbin/SystemStarter
25 ?? Ss 0:00.56 /usr/sbin/securityd -i
28 ?? Ss 0:24.51 /System/Library/Frameworks/CoreServices.framework/Fr
29 ?? Ss 0:02.25 /usr/sbin/mDNSResponder -launchd
30 ?? Ss 0:01.61 /System/Library/CoreServices/loginwindow.app/Content
31 ?? Ss 0:00.09 /usr/sbin/KernelEventAgent
33 ?? Ss 0:59.28 /usr/libexec/hidd
34 ?? Ss 0:01.76 /System/Library/Frameworks/CoreServices.framework/Ve
36 ?? Ss 0:00.01 /sbin/dynamic_pager -F /private/var/vm/swapfile
42 ?? Ss 0:00.78 /usr/sbin/blued
43 ?? Ss 0:00.05 autofsd
49 ?? Ss 0:03.73 /System/Library/CoreServices/coreservicesd
74 ?? Ss 3:02.86 /System/Library/Frameworks/ApplicationServices.frame
86 ?? Ss 0:00.02 /System/Library/Frameworks/OpenGL.framework/Versions
96 ?? Ss 0:00.25 /usr/sbin/coreaudiod
99 ?? Ss 0:02.08 /sbin/launchd
103 ?? S 0:05.71 /System/Library/CoreServices/Dock.app/Contents/MacOS
104 ?? S 0:04.73 /System/Library/CoreServices/SystemUIServer.app/Cont
105 ?? S 0:33.21 /System/Library/CoreServices/Finder.app/Contents/Mac
107 ?? S 0:00.01 /usr/sbin/pboard
109 ?? S 0:01.46 /System/Library/Frameworks/ApplicationServices.frame
115 ?? S 0:01.74 /System/Library/CoreServices/FileSyncAgent.app/Conte
116 ?? S 0:00.07 /System/Library/Frameworks/InputMethodKit.framework/
118 ?? S 0:00.60 /usr/libexec/UserEventAgent -l Aqua
125 ?? S 0:00.12 /System/Library/CoreServices/AirPort Base Station Ag
126 ?? S 0:04.87 /Library/Printers/Kodak/AiO_Printers/KodakAiOBonjour
132 ?? S 0:00.27 /Applications/FaceTime.app/Contents/PrivateFramework
134 ?? S 0:00.20 /System/Library/CoreServices/Folder Actions Dispatch
141 ?? S 0:22.13 /System/Library/Input Methods/InkServer.app/Contents
143 ?? S 0:00.37 /Applications/Inklet.app/Contents/MacOS/Inklet -psn_
156 ?? S 0:01.44 /System/Library/Frameworks/IMCore.framework/iChatAge
161 ?? Ss 0:00.29 /System/Library/PrivateFrameworks/DiskImages.framewo
170 ?? Ss 0:00.88 /System/Library/PrivateFrameworks/DiskImages.framewo
179 ?? S 0:00.21 /usr/sbin/aosnotifyd
185 ?? S 0:16.08 /Applications/TextEdit.app/Contents/MacOS/TextEdit -
189 ?? S 0:00.73 /System/Library/Services/AppleSpell.service/Contents
216 ?? S 1:19.03 /Applications/Safari.app/Contents/MacOS/Safari -psn_
218 ?? S 2:08.52 /System/Library/PrivateFrameworks/WebKit2.framework/
399 ?? S 0:05.20 /System/Library/Image Capture/Support/Image Capture
400 ?? S 0:49.10 /Applications/iPhoto.app/Contents/MacOS/iPhoto -psn_
406 ?? S 9:36.94 /Applications/iTunes.app/Contents/MacOS/iTunes -psn_
408 ?? S 0:00.19 /Applications/iTunes.app/Contents/MacOS/iTunesHelper
410 ?? S 0:02.14 /System/Library/PrivateFrameworks/MobileDevice.frame
415 ?? Ss 0:00.16 /System/Library/PrivateFrameworks/ApplePushService.f
470 ?? S 3:03.95 /Applications/Firefox.app/Contents/MacOS/firefox -ps
477 ?? S 0:02.78 /Applications/Firefox.app/Contents/MacOS/plugin-cont
491 ?? S 0:00.16 /Applications/Firefox.app/Contents/MacOS/plugin-cont
493 ?? S 0:03.83 /Library/Application Support/Google/GoogleTalkPlugin
494 ?? S 0:17.89 /Applications/Firefox.app/Contents/MacOS/plugin-cont
495 ?? S 0:00.16 /System/Library/PrivateFrameworks/CoreMediaIOService
838 ?? S 0:41.48 /Applications/iCal.app/Contents/MacOS/iCal -psn_0_28
887 ?? S 0:02.56 /Applications/Address Book.app/Contents/MacOS/Addres
935 ?? S 0:00.17 /Applications/Preview.app/Contents/MacOS/Preview -ps
975 ?? S 1:45.30 /Applications/iMovie.app/Contents/MacOS/iMovie -psn_
1114 ?? SNs 0:12.32 /System/Library/Frameworks/CoreServices.framework/Fr
1311 ?? S 0:00.17 /System/Library/Image Capture/Devices/PTPCamera.app/
1312 ?? S 0:00.46 /System/Library/PrivateFrameworks/AirTrafficHost.fra
1559 ?? S 0:00.03 /Library/Application Support/Adobe/SwitchBoard/Switc
1592 ?? SNs 0:00.15 /System/Library/Frameworks/CoreServices.framework/Fr
1621 ?? Ss 0:00.17 /usr/sbin/cupsd -l
1653 ?? U 0:00.51 /Applications/Utilities/Terminal.app/Contents/MacOS/
1655 s000 Ss 0:00.41 login -pf krista
1656 s000 S 0:00.01 -bash
1663 s000 R+ 0:00.00 ps ax
krista-stones-macbook-pro-2:~ krista$ -
Hi Guys!
I need a VI which writes the content of an array into a txt file.
I have an array like this:
Peti Teri
Zoli Hajni
Tomi Heni
Pali Robi
In the file the first line should be a full timestamp (date, time), and then would come the content of the array. The name of the file would also be a timestamp.
Thank you for your help in advance!Hi Victronica and welcome to NI Forums!
If you have some custom data, then it is up to ou to tell excel how to interpret said data (what information to put where, etc.) A simple solution would be to flatten your cluster elements into strings, and write those strings into an excel sheet using ActiveX. An example on how to write a table of strings is available in the example finder, and I also have it attached here in LabVIEW 2013.
Kind regards:
Andrew Valko
National Instruments Hungary
Attachments:
Excel - Write Table.vi 17 KB -
Termination txt file not generating for EEA report for canada
Hi
When executing the EEA report for Canada ,the report output does not show any error for all the sample data.
When I generate the txt files, it shows that all 4 files ( i.e. Employee.txt , promo.txt , term.txt , error.txt) exported successfully.
BUT when I check the folder created in C driver , I can only see Employee file and PROMO file. The TERM file is not getting created for the PERNRs with termination actions .
ANY IDEA why is that so?
HERE IS THE SAP REPORT OUTPUT :
Summarized Employment Equity report:
General data
Industry sectors
Transportation & storage indus 1
Employment status categories
Full-time employees 1
Part-time employees 0
Temporary employees 0
Other employees 0
Casual employees 0
Provinces
New Bruns. 1
Designated CMAs
New Brunswick less CMA 1
Peak Dates
All employees 2012/02/09 - 2012/03/03
Temporary employees 2012/06/01 - 2012/06/01
Employee data: 1
00300838 claire ballings
Event Status Ind.Se Prov/CMA NOC/Job Gender Abor.Mino.Disab Salary From - to
O F 07 NB/ 0641/02 Women X 100000 20120209-20120225
O F 07 NB/0088 0641/02 X 100000 20120226-20120303
F F 07 NB/0088 0641/02 X 100000 20120304-20121231
Export generated employee files for WEIMS 1
But when I check the folder in C drive , no TERM file is created !
Edited by: Sarika Saini on Mar 7, 2012 2:08 PMThis report generates the TERM.txt file only if the terminated employee has contract type - Temporary in IT0001 .
-
What is wrong with my txt file or merge doc?
I'm trying to merge data from a txt file. It's for name badges. I've got the document designed (8-1/2 x 11" Avery 5392, 6 badges per sheet) and connected successfully to my data source. There are only 4 types of info in the txt file (agency name, state, name, title). When I create the merge fields for each badge position and click preview, I only get the first record repeated into each of the 6 locations on the page. What am I missing or doing wrong? I'm using InDesign CS2.
I've attached the txt file.
I've also attempted this with a csv file with and got the same results.
Thanks.I downloaded your sample files, and here is what I had to adjust:
1, I made the master page a single page; not facing pages. I changed from inches to picas
2. I made two layers: one for graphics and second for text, above the graphics layer
3. I put the artwork ai file on the graphics layer on the master page
4. I deleted 5 of 6 duplicate text frames on page 1; leaving only the first upper left text frame
5. I moved that lone textframe to the master page, in the same relative position
6. Text in that text frame should have been controlled with paragraph styles, BTW, but that is a detail
7. I returned to view page 1
Then, going to the DataMerge panel, I turned on preview and also clicked the right-most button at the bottom of the panel to setup the merge.
All records and Multiple Records per document page
Then, onto the Multiple Record Layout tab:
Top margin 16pica
Bottom margin 3pica
Left margin 2pica
Right margin 2pica
Spacing between columns 1p6
Spacing between rows 11p6
Check on Preview Multiple Record Layout
OK to generate
So, it turns out your txt file was OK as it was.
Mike Witherell in Maryland -
Creating a JButton for each line in a txt file
I need to know how to creating a JButton for each line in a txt file then add an actionListener to the number of buttons (note they are in a JTable). Here is a clipet of code thanx for the help (note that this is one part of a program i am making there are 2 more classes. If u need them just ask) Thanx:
class Diary extends JFrame implements ActionListener {
private JTextArea note;
private JTextField name;
private JMenuBar menu = new JMenuBar();
private JMenu file, edit, font, background, tcolor, settings, help;
private JMenuItem nu, copy, paste, save, exit, b8, b10, b12, b14, b16, b18, b20, b24, b30, bblue, bred, bgreen, bpink, cblue, cred, cgreen, cpink, eset, nver, using, about;
private String[] columnNames = {
"File"
private Vector dat = new Vector();
private JTable filetable;
public Diary() {
setSize(new Dimension(500, 500));
setTitle("Diary 2.00");
file = new JMenu("File");
menu.add(file);
nu = new JMenuItem("new");
nu.addActionListener(this);
file.add(nu);
file.add(new JSeparator());
copy = new JMenuItem("copy");
copy.addActionListener(this);
file.add(copy);
paste = new JMenuItem("paste");
paste.addActionListener(this);
file.add(paste);
file.add(new JSeparator());
save = new JMenuItem("Save");
save.addActionListener(this);
file.add(save);
file.add(new JSeparator());
exit = new JMenuItem("exit");
exit.addActionListener(this);
file.add(exit);
edit = new JMenu("Edit");
menu.add(edit);
font = new JMenu("font");
edit.add(font);
b8 = new JMenuItem("8");
b8.addActionListener(this);
font.add(b8);
b10 = new JMenuItem("10");
b10.addActionListener(this);
font.add(b10);
b12 = new JMenuItem("12");
b12.addActionListener(this);
font.add(b12);
b14 = new JMenuItem("14");
b14.addActionListener(this);
font.add(b14);
b16 = new JMenuItem("16");
b16.addActionListener(this);
font.add(b16);
b18 = new JMenuItem("18");
b18.addActionListener(this);
font.add(b18);
b20 = new JMenuItem("20");
b20.addActionListener(this);
font.add(b20);
b24 = new JMenuItem("24");
b24.addActionListener(this);
font.add(b24);
b30 = new JMenuItem("30");
b30.addActionListener(this);
font.add(b30);
background = new JMenu("background");
edit.add(background);
bblue = new JMenuItem("blue");
bblue.addActionListener(this);
background.add(bblue);
bred = new JMenuItem("red");
bred.addActionListener(this);
background.add(bred);
bgreen = new JMenuItem("green");
bgreen.addActionListener(this);
background.add(bgreen);
bpink = new JMenuItem("pink");
bpink.addActionListener(this);
background.add(bpink);
tcolor = new JMenu("text color");
edit.add(tcolor);
cblue = new JMenuItem("blue");
cblue.addActionListener(this);
tcolor.add(cblue);
cred = new JMenuItem("red");
cred.addActionListener(this);
tcolor.add(cred);
cgreen = new JMenuItem("green");
cgreen.addActionListener(this);
tcolor.add(cgreen);
cpink = new JMenuItem("pink");
cpink.addActionListener(this);
tcolor.add(cpink);
settings = new JMenu("Settings");
menu.add(settings);
eset = new JMenuItem("Edit Settings");
eset.addActionListener(this);
settings.add(eset);
help = new JMenu("Help");
menu.add(help);
using = new JMenuItem("Using");
using.addActionListener(this);
help.add(using);
about = new JMenuItem("About");
about.addActionListener(this);
help.add(about);
help.add(new JSeparator());
nver = new JMenuItem("new Versions");
nver.addActionListener(this);
help.add(nver);
note = new JTextArea("");
try {
BufferedReader filein = new BufferedReader(new FileReader("files.txt"));
String sfile;
while ((sfile = filein.readLine()) != null) {
//add buttons per each line of the txt file and show em
catch (FileNotFoundException ioe) {
JOptionPane.showMessageDialog(null, "Iternal Error, contact [email protected] if the error persists", "", JOptionPane.WARNING_MESSAGE);
catch (IOException ioe) {
JOptionPane.showMessageDialog(null, "Iternal Error, contact [email protected] if the error persists", "", JOptionPane.WARNING_MESSAGE);JOptionPane.showMessageDialog(null, "Iternal Error, contact [email protected] if the error persists", "", JOptionPane.WARNING_MESSAGE);
String[][] data = new String[dat.size()][];
for (int x = 0; x < dat.size(); x++) {
data[x] = (String[])dat.get(x);
filetable = new JTable(data, columnNames);
filetable.setPreferredScrollableViewportSize(new Dimension(100, 500));
JScrollPane scrollpane = new JScrollPane(filetable);
name = new JTextField("diary");
JPanel main = new JPanel(new GridLayout(0, 1));
getContentPane().add(note);
getContentPane().add(name, BorderLayout.SOUTH);
getContentPane().add(scrollpane, BorderLayout.WEST);
setJMenuBar(menu);
public void actionPerformed(ActionEvent e) {
if (e.getSource() == nu) {
int nuask = JOptionPane.showConfirmDialog(Diary.this, "Are you sure you want to make a new entry?\nThis will erease any unsaved entry's!!");
if (nuask == JOptionPane.YES_OPTION) {
note.setText("");
note.setBackground(Color.WHITE);
note.setForeground(Color.BLACK);
if (e.getSource() == copy) {
note.copy();
if (e.getSource() == paste) {
note.paste();
if (e.getSource() == save) {
try {
String sn = name.getText();
FileWriter outputStream = new FileWriter("saved/" + sn + ".txt");
setTitle("Diary 1.00 : " + sn);
outputStream.write(note.getText());
outputStream.close();
catch(IOException ioe) {
System.out.println("IOException");
if (e.getSource() == exit) {
int exitask = JOptionPane.showConfirmDialog(Diary.this, "Are you sure you want to exit? Any unsaved entries will be deleted");
if (exitask == JOptionPane.YES_OPTION) {
System.exit(0);
if (e.getSource() == b8) {
note.setFont(new Font(note.getFont().getName(),note.getFont().getStyle(),8));
if (e.getSource() == b10) {
note.setFont(new Font(note.getFont().getName(),note.getFont().getStyle(),10));
if (e.getSource() == b12) {
note.setFont(new Font(note.getFont().getName(),note.getFont().getStyle(),12));
if (e.getSource() == b14) {
note.setFont(new Font(note.getFont().getName(),note.getFont().getStyle(),14));
if (e.getSource() == b18) {
note.setFont(new Font(note.getFont().getName(),note.getFont().getStyle(),18));
if (e.getSource() == b20) {
note.setFont(new Font(note.getFont().getName(),note.getFont().getStyle(),20));
if (e.getSource() == b24) {
note.setFont(new Font(note.getFont().getName(),note.getFont().getStyle(),24));
if (e.getSource() == b30) {
note.setFont(new Font(note.getFont().getName(),note.getFont().getStyle(),30));
if (e.getSource() == bblue) {
note.setBackground(Color.BLUE);
if (e.getSource() == bred) {
note.setBackground(Color.RED);
if (e.getSource() == bgreen) {
note.setBackground(Color.GREEN);
if (e.getSource() == bpink) {
note.setBackground(Color.PINK);
if (e.getSource() == cblue) {
note.setForeground(Color.BLUE);
if (e.getSource() == cred) {
note.setForeground(Color.RED);
if (e.getSource() == cgreen) {
note.setForeground(Color.GREEN);
if (e.getSource() == cpink) {
note.setForeground(Color.PINK);
if (e.getSource() == eset) {
new UserSettings().setVisible(true);
if (e.getSource() == about) {
JOptionPane.showMessageDialog(null, "Created by Collin Doering 2005 in Gr.9\n\nErrors:\n------------------------------------------------------------------\n1. No File Encryption\n2. No user and password Encryption", "", JOptionPane.INFORMATION_MESSAGE );
if (e.getSource() == nver) {
JOptionPane.showMessageDialog(null, "New Version |3.00| expected July, 2005\n\nNew Features\n----------------------------------------------\n1. File Encryption\n2. User File Encryption\n3. Full help dialog\n4. More Text changing features", "", JOptionPane.INFORMATION_MESSAGE);
if (e.getSource() == using) {
JOptionPane.showMessageDialog(null, "Go ask Collin Doering\[email protected]", "", JOptionPane.INFORMATION_MESSAGE );
THANK YOUso i still do not understand how i would create one
button per each line in a txt flle then read in the
file that the txt file specified.This assumes you know how many lines there are in the file.
If not, modify as per my prior post
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
class Testing extends JFrame
String[] linesInFile = {"Hello","World","Goodbye","Now"};
JButton[] btn = new JButton[linesInFile.length];
public Testing()
setLocation(200,200);
setDefaultCloseOperation(EXIT_ON_CLOSE);
JPanel jp = new JPanel(new GridLayout(0,1));
for(int x = 0; x < btn.length; x++)
btn[x] = new JButton(linesInFile[x]);//<---this would be where file.readLine() goes
jp.add(btn[x]);
btn[x].addActionListener(new ActionListener(){
public void actionPerformed(ActionEvent ae){
JOptionPane.showMessageDialog(getContentPane(),ae.getActionCommand());}});
getContentPane().add(jp);
pack();
public static void main(String[] args){new Testing().setVisible(true);}
} -
Format probelm about the downloaded txt file
I encounter a problem. after the 4.7 system upgrade to ECC6.0 ..(sandbox)
Our report can't download the correct txt file.
I wrote a test program.
REPORT ZTEST NO STANDARD PAGE HEADING.
write: / '123',
/ 'abc'.
I download from menu :system->list->save_>local file: not converted.
but when opening the txt file , it shows:
2008.09.09 test 1----
123abc
everything is in one line. and add the current date ..and '----
Help.. what's the problem?
Many thanks
Edited by: hand consultant on Sep 9, 2008 8:13 AMHi,
Ganesh Modhave,
It is strange problem. Because in the same computer, I downloaded the txt file from 4.6c system. And the result is OK.
So I guess some upgrade issue result in the problem..
I path the gui 710 to level 2.,,........ It's okey now ,thanks. -
Writing the ASCII value of a character found in a .txt file
I have a program that reads in a file and outputs certain characters to a new smaller file. The program works fine (thanks to some forum help) but I now need to print the ASCII value of the characters that are written to the file.
The problem I'm having (besides writing the ascii value of the char) is that the Unix .txt file has some weird properties. When I run the program on a .txt test file that I created with spaces in it, the program ignores the space characters.
Yet, when I run the program on the Unix file it wites the 'spaces' to the output file. That is why I want to write/print the ASCII value of the "blank "character in the Unix .txt file.
I already serached the forum and did a Google search for Char to ASCII conversion but I didn't find anything.
Thanks,
LS6v
Here's the code and the clips of the ouput files:
package source;
import javax.swing.*;
import java.io.*;
public class Scanner4
public static void main(String[] args)
getContents();
System.exit(0);
public static void getContents()
char charArray[] = {'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z',
'A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z',
'0','1','2','3','4','5','6','7','8','9','$','.', '#', '-', '/', '*', '&', '(', ')',' '};
String Chars = null;
String lineSep = System.getProperty("line.separator");
int iterator = 0;
int i = 0;
int charNum = 1;
int lineCount = 1;
// StringBuffer contents = new StringBuffer();
//declared here only to make visible to finally clause
BufferedReader input = null;
BufferedWriter out = null;
try {
//use buffering
//this implementation reads one line at a time
input = new BufferedReader( new FileReader( "C:\\testFile\\test1.txt" ));
out = new BufferedWriter( new FileWriter( "C:\\Scan file test\\Write\\test.txt" ));
String line = null;
out.write( "Character\tLine Number\tCharacter Number" + lineSep );
while (( line = input.readLine()) != null)
//contents.append(System.getProperty("line.separator"));
i = 0;
charNum = 1;
iterator = 0;
while( i < line.length() )
for( int count = 0; count < charArray.length; count++)
if( (charArray[count] != line.charAt(iterator)) && (count+1 == charArray.length) )
out.write( "[" + line.charAt(iterator) + "]\t\t" + "[" + lineCount + "]\t\t" + "[" + charNum + "]" + lineSep);
if( charArray[count] == line.charAt(iterator) )
break;
charNum +=1;
iterator +=1;
i++;
lineCount +=1;
catch (FileNotFoundException ex) {ex.printStackTrace(); System.out.println("File not found.");}
catch (IOException ex){ex.printStackTrace(); System.out.println("IO Error.");}
finally
try{
if (input!= null){
//flush and close both "input" and its underlying FileReader
input.close();
out.close();
catch (IOException ex){ex.printStackTrace(); System.out.println("IO Error #2.");}
My created .txt file:
1. a!asdsad
2. @
3. #
4. $
5. %sdfsdf
6. ^
7. &
8. *
9. (
10. )
11. _
12. +sdfsdfsdf
13. -
14. =
15. ~
16. `
17. dfgdfg;
18. :
19. '
20. "fghfghf
21. ,
22. dfgdfg<
23. .
24. >fghfghfg
25. /
26. gggggggggggggggggggggggg?
27. a
Output for my .txt file:
Character Line Number Character Number
[!] [1] [5]
[@] [2] [4]
[%] [5] [4]
[^] [6] [4]
[_] [11] [5]
[+] [12] [5]
[=] [14] [5]
[~] [15] [5]
[`] [16] [5]
[;] [17] [11]
[:] [18] [5]
['] [19] [5]
["] [20] [5]
[,] [21] [5]
[<] [22] [11]
[>] [24] [5]
[?] [26] [29]************************************************************************
Output generated after reading the .txt file from the unix box:
Character Line Number Character Number
[ ] [1] [17]
[ ] [1] [18]
[ ] [1] [19]
[ ] [1] [6530]
[ ] [2] [2041]
['] [29] [1834]
['] [29] [2023]
['] [30] [1834]
['] [30] [2023]
['] [30] [2066]
['] [47] [2066]
['] [67] [2067]
['] [77] [2066]
[+] [80] [28]Thanks I didn't even think to try and cast it to an int...
The tool I'm using to create my .txt in windows is Notepad.
I wrote a program to simply copy the original (3GB) Unix file and terminated it early so I could see what was there. What I found was some text and symbols and a lot of space between brief bursts of text. I can't really copy and paste an example because the amount of space is too large, it's basically a 3GB unformatted .txt file...
Unix file was created on: unknown
It sounds like the .txt file that I copied from the Unix box was formatted differently. But I thought that the formatting had more to do with end of line issues, not blank space between characters. Because a blank space should be seen by my program and ignored...
Here's the ASCII value of the "blank" spaces:
Character Line Number Character Number
[ ] [1] [17] Ascii Value: [0]
[ ] [1] [18] Ascii Value: [0]
['] [868] [2066] Ascii Value: [39]
[,] [877] [186] Ascii Value: [44]
[,] [877] [276] Ascii Value: [44]
Also, the Ascii value printed for the blank spaces looks like the number zero here but it looks like it has strange points on the bottom of it in my output file. It looks like the extended ASCII character 234 Ω
Maybe you are looking for
-
Problem with a transport order
I release a transport order in DEV, I want to change the Target System because this field is initial (Local Change Requests). I want to tranport de order to QAS, I can't change the order when it is released. How do I to undo the release? Best Regards
-
I am experiencing difficulty attempting to pull up my pay stub data from my employer site.
When I attempt to pull up data within the site, the screen goes blank and the crossed circle symbol appears. Other coworkers access theirs at home. Not sure why it won't work for me ?
-
Cannot view pdf in snow leopard in safari, cannot view pdf in snow leopard in safari
I have a MacBookPro Duo Core that I just installed Snow Leopard on, Now I cannot view pdf's online in either Safari or FireFox. And I am getting a message when I open Safari that it does not support community toolbar.
-
EIM 4.3 - Closing Cases
Hello, Had an interesting scenaio (yet very likely) in testing today using integrated EIM. Email came in to agent - Auto Reply sent to customer - Customer replied - thanks for auto reply, and added additional information - setting off excepti
-
Large format printing to PDF errors
Hi - I'm creating 36" x 90" posters in Illustrator CS4 on Windows 7 and suddenly cannot print full-size to PDF. I simply get the big red X that says, "Can't print Illustration". Not exactly a helpful error message. I've done it in the past, so lo