Reading a 2GB file and writing to two differnt files based on a delimiter
Good Morning!
I have to to read the content of 2 gb file(main.txt) and copy its content into two other files based on a delimiter.The delimiter is '/'. Initially i have to start writing the contents of main.txt to copy1.txt as soon as i encounter a delimiter i have to write the contents to copy2.txt again if i encounter next delimiter i have to write the contents copy1.txt and so on
This is my piece of code but it takes 20-25 minutes.How can i optimise this operation.efficiency is my problem
try{
FileInputStream fis = new FileInputStream ("main.txt");
FileOutputStream foscopy1 = new FileOutputStream ("copy1.txt") ;
FileOutputStream foscopy2 = new FileOutputStream ("copy2.txt") ;
int iFlag=1;
int s;
while((s=fis.read())!=-1)
System.out.println(iFlag);
if (s=='/')
iFlag=-iFlag ;
else{
if (iFlag==1)
foscopy1.write(s);
else
foscopy2.write(s);
if u canprovide code that would do a lot of good
Perhaps you could use a StreamTokenizer on top of a BufferedReader since you are using text files... The buffered reader will buffer your input so that it doesn't have to perform IO on every byte read. Subsequently the output may also be buffered to enhance performance...
StreamTokenizer st = new StreamTokenizer(new BufferedReader(new FileReader("main.txt")));
st.whitespaceChars('/', '/');
BufferedWriter out = new BufferedWriter(new FileWriter("copy1.txt"));
//same with copy 2
while (st.nextToken() != st.TT_EOF) { // while not end
String s = st.sval;
// determiine copy to write to, then write.
}
Similar Messages
-
Problem in reading no. of files and writing into a single file
Hi,
Iam with Problem in reading no. of files and writing into a single file....
Iam reading no. of files stored in local directory.......
Iam able to read and print the data in files successfully....but while writing..only first file is being written...and the next files are not written in my output file...
plz tell me my mistake....I hope Iam doing some mistake while writing into file...PLz help.....
Basically my code structure is like this....
import java.io.*;
import java.util.regex.*;
import java.util.*;
import java.text.*;
import org.apache.poi.poifs.filesystem.POIFSFileSystem;
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
import org.apache.poi.hssf.usermodel.HSSFSheet;
import org.apache.poi.hssf.usermodel.HSSFRow;
import org.apache.poi.hssf.usermodel.HSSFCell;
class Writing {
public static void main(String args[]) throws Exception {
FileOutputStream fileOut = new FileOutputStream("ServerResult.xls"); //my output file
int counter = 1;
File dir = new File("C:/Perform/ServerLogs");
String[] children = dir.list();
if( children == null)
System.out.println("The Directory mentioned does not exist");
else {
for (int fileNo = 0; fileNo < children.length; fileNo++ ) { //Files iteration starts
String filename = children[fileNo];
File logFile = new File(filename);
FileReader logFileReader = new FileReader(logFile);
BufferedReader logReader = new BufferedReader(logFileReader);
StringBuffer sBuf = new StringBuffer(5000);
HSSFWorkbook wb = new HSSFWorkbook();
HSSFSheet sheet = wb.createSheet();
HSSFRow rowTitle;
HSSFRow rowReq;
HSSFRow rowRes;
String aLine = null;
boolean skip = false;
boolean readed = false;
boolean initReq = false;
boolean flag = false;
long requestTime = 0;
long responseTime = 0;
long recdTime = 0;
long sentTime = 0;
long hasTime = 0;
long presentTime = 0;
int hasCalls = 0;
Pattern startMessage = Pattern.compile("^<MESSAGE.*ID=\".*_"+args[0]+"\".*", Pattern.DOTALL);
Pattern requestMessage = Pattern.compile("^<MESSAGE.*TS=\"(.*)\" CATEGORY=\"RequestMsg.\".*ID=\".*_"+args[0]+"\".*<ActName>(.*)</ActName>.*", Pattern.DOTALL);
Pattern requestMessage1 = Pattern.compile("^<MESSAGE.*TS=\"(.*)\" CATEGORY=\"RequestMsg.\".*ID=\".*_"+args[0]+"\".*<Svc id=\"(.*)\">.*", Pattern.DOTALL);
Pattern responseMessage = Pattern.compile("^<MESSAGE.*TS=\"(.*)\" CATEGORY=\"ResponseMsg\".*ID=\".*_"+args[0]+"\".*", Pattern.DOTALL);
Pattern initMessage = Pattern.compile("^<MESSAGE.*TS=\"(.*)\" CATEGORY=\"HostConnInit\".*ID=\".*_"+args[0]+"\".*", Pattern.DOTALL);
Pattern initResMessage = Pattern.compile("^<MESSAGE.*TS=\"(.*)\" CATEGORY=\"ResponseMsg\".*ID=\"null\".*", Pattern.DOTALL);
Pattern initResIDMessage = Pattern.compile("^<MESSAGE.*TS=\"(.*)\" CATEGORY=\"ResponseMsg\".*ID=\"null\".*<IATA>"+args[0]+"</IATA>.*", Pattern.DOTALL);
Pattern sentMessage = Pattern.compile("^<MESSAGE.*TS=\"(.*)\" CATEGORY=\"DCMsgSentInfo\".*ID=\".*_"+args[0]+"\".*", Pattern.DOTALL);
Pattern rcvdMessage = Pattern.compile("^<MESSAGE.*TS=\"(.*)\" CATEGORY=\"DCMsgRcvdInfo\".*ID=\".*_"+args[0]+"\".*", Pattern.DOTALL);
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS");
DecimalFormat dcf = new DecimalFormat("########.##");
String actName = "";
if (fileNo ==0)
rowTitle = sheet.createRow((short)0);
rowTitle.createCell((short)0).setCellType(HSSFCell.CELL_TYPE_STRING);
rowTitle.createCell((short)0).setCellValue("Req/Res");
rowTitle.createCell((short)1).setCellType(HSSFCell.CELL_TYPE_STRING);
rowTitle.createCell((short)1).setCellValue("Action");
rowTitle.createCell((short)2).setCellType(HSSFCell.CELL_TYPE_STRING);
rowTitle.createCell((short)2).setCellValue("Server Time(in ms)");
rowTitle.createCell((short)3).setCellType(HSSFCell.CELL_TYPE_STRING);
rowTitle.createCell((short)3).setCellValue("Request Vs Response Time in Server(in ms)");
rowTitle.createCell((short)4).setCellType(HSSFCell.CELL_TYPE_STRING);
rowTitle.createCell((short)4).setCellValue("Time Taken By HAS/HOST(in ms)");
rowTitle.createCell((short)5).setCellType(HSSFCell.CELL_TYPE_STRING);
rowTitle.createCell((short)5).setCellValue("No. of HAS calls");
rowTitle.createCell((short)6).setCellType(HSSFCell.CELL_TYPE_STRING);
rowTitle.createCell((short)6).setCellValue("Data Size");
//wb.write(fileOut);
while((aLine=logReader.readLine()) != null) {
if(aLine.startsWith("<MESSAGE TYPE=\"EVENT\"")) {
Matcher m = startMessage.matcher(aLine);
if(m.find()) {
sBuf.setLength(0);
sBuf.append(aLine);
skip = false;
initReq = false;
m = initMessage.matcher(aLine);
if(m.find()) {
initReq = true;
} else {
if(initReq) {
m = initResMessage.matcher(aLine);
if(m.find()) {
sBuf.setLength(0);
sBuf.append(aLine);
skip = false;
} else if(aLine.startsWith("</MESSAGE>")) {
if(!skip) {
sBuf.append(aLine);
readed = true;
} else if(!skip){
sBuf.append(aLine);
if(!skip && readed) {
String tempStr = sBuf.toString();
if(tempStr.length() > 0) {
boolean reqMatched = false;
Matcher m = null;
if(initReq) {
m = initMessage.matcher(tempStr);
actName = "Intialization";
} else {
m = requestMessage.matcher(tempStr);
String time = "";
if(m.find()) {
reqMatched = true;
for (int i=1; i<=m.groupCount(); i++) {
String groupStr = m.group(i);
if(i == 1) {
time = groupStr;
} else if(i == 2) {
actName = groupStr;
} else if(!initReq){
m = requestMessage1.matcher(tempStr);
if(m.find()) {
reqMatched = true;
for (int i=1; i<=m.groupCount(); i++) {
String groupStr = m.group(i);
if(i == 1) {
time = groupStr;
} else if(i == 2) {
actName = groupStr;
if(time.length() > 0 ) {
try{
requestTime = sdf.parse(time).getTime();
}catch(Exception ex){}
System.out.println("Request,"+actName+","+time+",,,,"+dcf.format(((double)time.length()/1024.0))+"K");
//bw.write("Request,"+actName+","+time+",,,,"+dcf.format(((double)time.length()/1024.0))+"K");
String reqDataSize = dcf.format(((double)time.length()/1024.0))+"K" ;
rowReq = sheet.createRow((short)counter);
rowReq.createCell((short)0).setCellType(HSSFCell.CELL_TYPE_STRING);
rowReq.createCell((short)0).setCellValue("Request");
rowReq.createCell((short)1).setCellType(HSSFCell.CELL_TYPE_STRING);
rowReq.createCell((short)1).setCellValue(actName);
rowReq.createCell((short)2).setCellType(HSSFCell.CELL_TYPE_STRING);
rowReq.createCell((short)2).setCellValue(time);
rowReq.createCell((short)3).setCellType(HSSFCell.CELL_TYPE_STRING);
rowReq.createCell((short)3).setCellValue("");
rowReq.createCell((short)4).setCellType(HSSFCell.CELL_TYPE_STRING);
rowReq.createCell((short)4).setCellValue("");
rowReq.createCell((short)5).setCellType(HSSFCell.CELL_TYPE_STRING);
rowReq.createCell((short)5).setCellValue("");
rowReq.createCell((short)6).setCellType(HSSFCell.CELL_TYPE_STRING);
rowReq.createCell((short)6).setCellValue(reqDataSize);
counter = counter +1;
System.out.println("counter is "+counter);
Matcher l = sentMessage.matcher(tempStr);
Matcher k = rcvdMessage.matcher(tempStr);
if(l.find()) {
for (int i=1; i<=l.groupCount(); i++) {
String groupStr2 = l.group(i);
try{
sentTime = sdf.parse(groupStr2).getTime();
}catch(Exception ex){}
if(k.find())
for(int j=1;j<=k.groupCount(); j++) {
String groupStr1 = k.group(j);
try{
recdTime = sdf.parse(groupStr1).getTime();
}catch(Exception ex){}
presentTime = (recdTime - sentTime);
hasTime = hasTime + presentTime;
hasCalls = hasCalls +1;
if(!reqMatched) {
if(initReq) {
m=initResIDMessage.matcher(tempStr);
} else {
m=responseMessage.matcher(tempStr);
if(m.find()) {
for (int i=1; i<=m.groupCount(); i++) {
String groupStr = m.group(i);
try{
responseTime = sdf.parse(groupStr).getTime();
}catch(Exception ex){}
String resDataSize = dcf.format(((double)tempStr.length()/1024.0))+"K" ;
rowRes = sheet.createRow((short)(counter));
rowRes.createCell((short)0).setCellType(HSSFCell.CELL_TYPE_STRING);
rowRes.createCell((short)0).setCellValue("Response");
rowRes.createCell((short)1).setCellType(HSSFCell.CELL_TYPE_STRING);
rowRes.createCell((short)1).setCellValue(actName);
rowRes.createCell((short)2).setCellType(HSSFCell.CELL_TYPE_STRING);
rowRes.createCell((short)2).setCellValue(groupStr);
rowRes.createCell((short)3).setCellType(HSSFCell.CELL_TYPE_NUMERIC);
rowRes.createCell((short)3).setCellValue((responseTime - requestTime));
rowRes.createCell((short)4).setCellType(HSSFCell.CELL_TYPE_NUMERIC);
rowRes.createCell((short)4).setCellValue(hasTime);
rowRes.createCell((short)5).setCellType(HSSFCell.CELL_TYPE_NUMERIC);
rowRes.createCell((short)5).setCellValue(hasCalls);
rowRes.createCell((short)6).setCellType(HSSFCell.CELL_TYPE_STRING);
rowRes.createCell((short)6).setCellValue(resDataSize);
hasTime = 0;
hasCalls = 0;
counter = counter + 1 ;
sBuf.setLength(0);
readed = false;
wb.write(fileOut);
} // End of for (int fileNo = 0; fileNo < children.length; fileNo++ )
} //End of else
fileOut.close();
} //End of public static void main
} // End of ClassFirst of all, use [code]-tags to make your code readable, please.
I didn't do a complete inspection of your code (because it's too much and unreadable as it is) and I don't know POI, but creating a new HSSFWorkbook for each input file sounds fishy to me ... try re-using the workbook and just creating a new sheet in each iteration. -
BufferedReader/FileWriter - read in a line and store it in a file
hi, I'm new in programming java, so I hope somebody can help me with the following question:
I've got a file that contains parameters, which change every second (the file updates itself every second)
Now I have to write a java Programm, that reads in a certain parameter of that file, and store it in another file, so that the file lists every read-in parameter (to show the changes of the parameter).
the following source shows a programm, that reads in the content of a text file and stores it in another file - every second. Please, could anyone be so kind, and help me to change the programm?
import java.io.*;
import java.util.Date;
public class readIn {
public static void main(String[] args) throws IOException {
for (int i = 1; i <= 5; ++i) {
System.out.println("Sleep at: " + new Date());
try
// ask currently executing Thread to sleep for 1000ms
Thread.sleep(1000);
catch(InterruptedException e)
System.out.println("Sleep interrupted:"+e);
if (args.length != 2)
System.err.println ("usage: pattern file");
System.exit (1);
String patt = args [0];
String fileIn = args [1];
try
LineNumberReader reader = new LineNumberReader
(new FileReader (fileIn));
String str;
while ((str = reader.readLine()) != null)
if (str.indexOf (patt) != -1)
int ln = reader.getLineNumber();
File inputFile = new File("logfile.txt");
File outputFile = new File("history.txt");
FileReader in = new FileReader(inputFile);
FileWriter out = new FileWriter(outputFile);
int c;
while ((c = in.read()) != -1)
out.write(c);
in.close();
out.close();
reader.close();
catch (IOException e)
System.err.println ("IO-Fehler beim Filtern");
e.printStackTrace();
System.out.println("Awoke at: " + new Date());
the logfile.txt contains words which change every second. I want to permanently read in the third line.
anatomy
animation
applet
application
argument
bolts
class
communicate
component
container
development
environment
exception
graphics
image
input
integrate
interface
Thank you very much for your immediate answer!!RandomAccessFile ??
aha, I took a look at the API but I have no idea how to work with it. If its quite easy, could you please be so kind and tell me ?? thanks ;) -
Can someone please help, I have a dvd disk containing lecture videos, on a Windows pc it works fine, and the disk opens to the dvd menu. However on my macbook pro running Mountain Lion, it opens as a data disk, with video and audio in two seprate files??
You may need a 3rd party application to view the DVD in a wWindows format such as
http://flip4mac-3.en.softonic.com/mac
https://www.macupdate.com/app/iphone/5758/vlc-media-player -
Hi,when click on a file, immediately a box appears around the file and the title of the file is read !so how is it possible to escape from the voice?Thank you for your advice
Turn off Voiceover!
System Preferences/Universal Access -
I purchased an audiobook and it has two parts/files to it. I-Tunes only shows on file under the book title. How do I get i-Tunes to find and associate the two files under one book title?
Thanks very much I have contacted them via this. Just hope they respond quickly- rather annoing! Greatly appreciated though
-
Which Version of Adobe do I need to be able to "extract" a page from a existing file and save/download to another file?
Acrobat Pro or Standard.
-
I can't seem to remove / unload the external swf files e.g when the carousel.swf (portfolio) is displayed and I press the about button the about content is overlapping the carousel (portfolio) . How can I remove / unload an external swf file from the main flash file and load a new swf file, while at the same time removing garbage collection from memory?
This is the error message(s) I am receiving: "TypeError: Error #2007: Parameter child must be non-null.
at flash.display::DisplayObjectContainer/removeChild()
at index_fla::MainTimeline/Down3()"
import nl.demonsters.debugger.MonsterDebugger;
var d:MonsterDebugger=new MonsterDebugger(this);
stage.scaleMode=StageScaleMode.NO_SCALE;
stage.align=StageAlign.TOP_LEFT;
stage.addEventListener(Event.RESIZE, resizeHandler);
// loader is the loader for portfolio page swf
var loader:Loader;
var loader2:Loader;
var loader3:Loader;
var loader1:Loader;
// resize content
function resizeHandler(event:Event):void {
// resizes portfolio page to center
loader.x = (stage.stageWidth - loader.width) * .5;
loader.y = (stage.stageHeight - loader.height) * .5;
// resizes about page to center
loader3.x = (stage.stageWidth - 482) * .5 - 260;
loader3.y = (stage.stageHeight - 492) * .5 - 140;
/*loader2.x = (stage.stageWidth - 658.65) * .5;
loader2.y = (stage.stageHeight - 551.45) * .5;*/
addEventListener(Event.ENTER_FRAME, onEnterFrame,false, 0, true);
function onEnterFrame(ev:Event):void {
var requesterb:URLRequest=new URLRequest("carouselLoader.swf");
loader = null;
loader = new Loader();
loader.name ="carousel1"
//adds gallery.swf to stage at begining of movie
loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, ioError);
function ioError(event:IOErrorEvent):void {
trace(event);
try {
loader.load(requesterb);
} catch (error:SecurityError) {
trace(error);
addChild(loader);
loader.x = (stage.stageWidth - 739) * .5;
loader.y = (stage.stageHeight - 500) * .5;
// stop gallery.swf from duplication over and over again on enter frame
removeEventListener(Event.ENTER_FRAME, onEnterFrame);
//PORTFOLIO BUTTON
//adds eventlistner so that gallery.swf can be loaded
MovieClip(root).nav.portfolio.addEventListener(MouseEvent.MOUSE_DOWN, Down, false, 0, true);
function Down(event:MouseEvent):void {
// re adds listener for contact.swf and about.swf
MovieClip(root).nav.info.addEventListener(MouseEvent.MOUSE_DOWN, Down1, false, 0, true);
MovieClip(root).nav.about.addEventListener(MouseEvent.MOUSE_DOWN, Down3, false, 0, true);
//unloads gallery.swf from enter frame if users presses portfolio button in nav
var requester:URLRequest=new URLRequest("carouselLoader.swf");
loader = null;
loader = new Loader();
loader.name ="carousel"
loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, ioError);
function ioError(event:IOErrorEvent):void {
trace(event);
try {
loader.load(requester);
} catch (error:SecurityError) {
trace(error);
addChild(loader);
loader.x = (stage.stageWidth - 739) * .5;
loader.y = (stage.stageHeight - 500) * .5;
removeChild( getChildByName("about") );
removeChild( getChildByName("carousel1") );
// remove eventlistner and prevents duplication of gallery.swf
MovieClip(root).nav.portfolio.removeEventListener(MouseEvent.MOUSE_DOWN, Down);
//INFORMATION BUTTON
//adds eventlistner so that info.swf can be loaded
MovieClip(root).nav.info.addEventListener(MouseEvent.MOUSE_DOWN, Down1, false, 0, true);
function Down1(event:MouseEvent):void {
//this re-adds the EventListener for portfolio so that end user can view again if they wish.
MovieClip(root).nav.portfolio.addEventListener(MouseEvent.MOUSE_DOWN, Down, false, 0, true);
MovieClip(root).nav.about.addEventListener(MouseEvent.MOUSE_DOWN, Down3, false, 0, true);
var requester:URLRequest=new URLRequest("contactLoader.swf");
loader2 = null;
loader2 = new Loader();
loader2.name ="contact"
loader2.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, ioError);
function ioError(event:IOErrorEvent):void {
trace(event);
try {
loader2.load(requester);
} catch (error:SecurityError) {
trace(error);
addChild(loader2);
loader2.x = (stage.stageWidth - 658.65) * .5;
loader2.y = (stage.stageHeight - 551.45) * .5;
// remove eventlistner and prevents duplication of info.swf
MovieClip(root).nav.info.removeEventListener(MouseEvent.MOUSE_DOWN, Down1);
//ABOUT BUTTON
//adds eventlistner so that info.swf can be loaded
MovieClip(root).nav.about.addEventListener(MouseEvent.MOUSE_DOWN, Down3, false, 0, true);
function Down3(event:MouseEvent):void {
//this re-adds the EventListener for portfolio so that end user can view again if they wish.
MovieClip(root).nav.portfolio.addEventListener(MouseEvent.MOUSE_DOWN, Down, false, 0, true);
MovieClip(root).nav.info.addEventListener(MouseEvent.MOUSE_DOWN, Down1, false, 0, true);
var requester:URLRequest=new URLRequest("aboutLoader.swf");
loader3 = null;
loader3 = new Loader();
loader3.name ="about"
loader3.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, ioError);
function ioError(event:IOErrorEvent):void {
trace(event);
try {
loader3.load(requester);
} catch (error:SecurityError) {
trace(error);
addChild(loader3);
loader3.x = (stage.stageWidth - 482) * .5 - 260;
loader3.y = (stage.stageHeight - 492) * .5 - 140;
removeChild( getChildByName("carousel") );
removeChild( getChildByName("carousel1") );
// remove eventlistner and prevents duplication of info.swf
MovieClip(root).nav.about.removeEventListener(MouseEvent.MOUSE_DOWN, Down3);
stop();Andrei1,
Thank you for the helpful advice. I made the changes as you suggested but I am receiving a #1009 error message even though my site is working the way I wan it to work. I would still like to fix the errors so that my site runs and error free. This is the error I am receiving:
"TypeError: Error #1009: Cannot access a property or method of a null object reference."
I'm sure this is not the best method to unload loaders and I am guessing this is why I am receiving the following error message.
loader.unload();
loader2.unload();
loader3.unload();
I also tried creating a function to unload the loader but received the same error message and my portfolio swf was not showing at all.
function killLoad():void{
try { loader.close(); loader2.close; loader3.close;} catch (e:*) {}
loader.unload(); loader2.unload(); loader3.unload();
I have a question regarding suggestion you made to set Mouse Event to "null". What does this do setting the MouseEvent do exactly? Also, since I've set the MouseEvent to null do I also have to set the loader to null? e.g.
---- Here is my updated code ----
// variable for external loaders
var loader:Loader;
var loader1:Loader;
var loader2:Loader;
var loader3:Loader;
// makes borders resize with browser size
function resizeHandler(event:Event):void {
// resizes portfolio page to center
loader.x = (stage.stageWidth - loader.width) * .5;
loader.y = (stage.stageHeight - loader.height) * .5;
// resizes about page to center
loader3.x = (stage.stageWidth - 482) * .5 - 260;
loader3.y = (stage.stageHeight - 492) * .5 - 140;
//adds gallery.swf to stage at begining of moviie
Down();
//PORTFOLIO BUTTON
//adds eventlistner so that gallery.swf can be loaded
MovieClip(root).nav.portfolio.addEventListener(MouseEvent.MOUSE_DOWN, Down, false, 0, true);
function Down(event:MouseEvent = null):void {
// re adds listener for contact.swf and about.swf
MovieClip(root).nav.info.addEventListener(MouseEvent.MOUSE_DOWN, Down1, false, 0, true);
MovieClip(root).nav.about.addEventListener(MouseEvent.MOUSE_DOWN, Down3, false, 0, true);
//unloads gallery.swf from enter frame if users presses portfolio button in nav
var requester:URLRequest=new URLRequest("carouselLoader.swf");
loader = new Loader();
loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, ioError);
function ioError(event:IOErrorEvent):void {
trace(event);
try {
loader.load(requester);
} catch (error:SecurityError) {
trace(error);
this.addChild(loader);
loader.x = (stage.stageWidth - 739) * .5;
loader.y = (stage.stageHeight - 500) * .5;
// sure this is not the best way to do this - but it is unload external swfs
loader.unload();
loader2.unload();
loader3.unload();
// remove eventlistner and prevents duplication of gallery.swf
MovieClip(root).nav.portfolio.removeEventListener(MouseEvent.MOUSE_DOWN, Down);
//INFORMATION BUTTON
//adds eventlistner so that info.swf can be loaded
MovieClip(root).nav.info.addEventListener(MouseEvent.MOUSE_DOWN, Down1, false, 0, true);
function Down1(event:MouseEvent = null):void {
//this re-adds the EventListener for portfolio so that end user can view again if they wish.
MovieClip(root).nav.portfolio.addEventListener(MouseEvent.MOUSE_DOWN, Down, false, 0, true);
MovieClip(root).nav.about.addEventListener(MouseEvent.MOUSE_DOWN, Down3, false, 0, true);
var requester:URLRequest=new URLRequest("contactLoader.swf");
loader2 = null;
loader2 = new Loader();
loader2.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, ioError);
function ioError(event:IOErrorEvent):void {
trace(event);
try {
loader2.load(requester);
} catch (error:SecurityError) {
trace(error);
addChild(loader2);
loader2.x = (stage.stageWidth - 658.65) * .5;
loader2.y = (stage.stageHeight - 551.45) * .5;
loader.unload();
loader2.unload();
loader3.unload();
// remove eventlistner and prevents duplication of info.swf
MovieClip(root).nav.info.removeEventListener(MouseEvent.MOUSE_DOWN, Down1);
//ABOUT BUTTON
//adds eventlistner so that info.swf can be loaded
MovieClip(root).nav.about.addEventListener(MouseEvent.MOUSE_DOWN, Down3, false, 0, true);
function Down3(event:MouseEvent = null):void {
//this re-adds the EventListener for portfolio so that end user can view again if they wish.
MovieClip(root).nav.portfolio.addEventListener(MouseEvent.MOUSE_DOWN, Down, false, 0, true);
MovieClip(root).nav.info.addEventListener(MouseEvent.MOUSE_DOWN, Down1, false, 0, true);
var requester:URLRequest=new URLRequest("aboutLoader.swf");
loader3 = null;
loader3 = new Loader();
loader3.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, ioError);
function ioError(event:IOErrorEvent):void {
trace(event);
try {
loader3.load(requester);
} catch (error:SecurityError) {
trace(error);
addChild(loader3);
loader3.x = (stage.stageWidth - 482) * .5 - 260;
loader3.y = (stage.stageHeight - 492) * .5 - 140;
loader.unload();
loader2.unload();
loader3.unload();
// remove eventlistner and prevents duplication of info.swf
MovieClip(root).nav.about.removeEventListener(MouseEvent.MOUSE_DOWN, Down3);
stop(); -
When I update itunes it deletes the library file, and when I restore that file from the previous libraries or my backup, itunes will run but tell me "the iTunes library file cannot be saved. A folder was specified instead of a file" How do I fix this?
Hi there Br0x,
You may want to try rebuilding the iTunes library as an initial troubleshooting step. Take a look at the article below for more information.
iTunes: How to re-create your iTunes library and playlists
http://support.apple.com/kb/ht1451
-Griff W. -
Took backup of data files and controlfile but not archive file db is 11g xe
took backup of data files and controlfile but not redo file db is 11g xe r2..was trying complete shut backup,..missed redo..
anyway to restore the db back..
I had failed to backup redo log file..
db was shut...properly
any info highly appreciated.
cheers
Edited by: zycoz100 on Feb 27, 2013 4:42 AMA controlfile create is a fairly trivial task, for either a cold backup or hot backup scenario. Well, its an easy task after you've done the process a few times.
If you have a healthy oracle instance running any place else, preferably at 11gR2, or even a 10g instance can work as an example, get a system connection and do an `alter database backup controlfile to trace;` and the instance will create a new trace file with all SQL commands needed to rebuild the controlfile in the instance trace directory.
Have a look at the trace file, a `show parameter diag` reveals the diagnostic_dest parameter, look for the "trace" directory under that folder, for the latest *trc file. In 10g its `show parameter dump` and the trace file goes straight to the user_dump_dest directory, no digging required. -
I used "my documents" for the profile folder, I removed the profile and firefox asked if i want to remove its file, and it took ALL my file except a few, all my photographs etc, are these now unrecoverable? as they are not in the recycle bin
disaster, thanks firefox 1 year of photos lostThanks for the obvious question. I mean it. The very same thought came to me this morning and, sure enough, I had booted into another drive--my old one that, of course, had the old desktop, etc.
It didn't dawn on me that this was the case since I hadn't set it as a boot drive but I guess in the course of all the restarts I did, it got switched.
I'm back to normal again. -
In the past when I have imported my dslr video/audio files and then my zoom audio files Final Cut Pro has organized them in pairs in my library. For some reason my video/audio and my audio are being organized seperately. How do I fix this? Thanks!
Thank you Russ! Seems as though the timestamp on my audio files was completely incorrect so it placed the files far away from the corresponding video. I've modified the timestamp information and this has helped. The hour/minute information is incorrect but at least now I'm in the ballpark. Thank you!
-
Music I already have on my computer will not pull up in itunes. I dragged the files, copied the files, and even tried adding the files but nothing works. The songs play on any other program except for itunes. What do I do??
OMG......THANK YOU THANK YOU......I been reading articles after articles and nothing was working......tryed the Crtl+S and there it was. I can not thank you enough......I appricate it Can not believe it was that simple. I am one happy person again.....
-
Can not open JPEG files and can not create JPEG files from other software
Can not open JPEG files and can not create JPEG files from other software (For example from Solidworks).
When I try to right click on a JPEG, a notice window appears written: "Windows Explorer has stopped working - Windows is
checking for a solution to the problem" and then the notice box disapears, the desktop appears and I can continue working.
From the other side - If I try to save as JPEG a screen of Solidworks (like a view of a part) the Solidworks falls but the JPEG
is created (I can see its name in the directory I created it).
I can open the JPEGS with the Paint software if I want but not with the Windows Photo Viewer.
I have the feeling that the Windows Photo Viewer disapeared from my computer - just a feeling.
I will appreciate your assistance.
Avi T. 2014Hi,
Did Windows Photo Viewer option appear when you right click the JPEG file and select open with?
I would like suggest you use Clean Boot to troubleshoot if there is third-party software conflict:
How to perform a clean boot in Windows
http://support.microsoft.com/kb/929135
Karen Hu
TechNet Community Support -
I have a movie in an .avi file and when i open the file the Mac attempts to covert the file and it doens't play. What can I do?
VLC will play avi's, even if the index is broken. IT can repair most broken avi's but will still play them if it can't.
VLC Media Player
Maybe you are looking for
-
Can I add a second hard drive to time capsule for backup?
When I plug it in I can see it in finder but not in Time Machine settings when it asks me to select drive? Is it possible to do this to back up one of my computers as Time Capsule's hard drive is full from backing up other machines.
-
Hi, i want to implement the following scenario: i have a synchrone outbound interface(expose as XI webservice). When i receive a message from the sending application, i want to return immediatly a OK status and then start a BPM to process the message
-
Table for customer cr exposure
Hi All, Could any body let me know about the table where can I see the amount of customer credit exposure? regards Meenakshi
-
AE in 32 bits mode, masks and banding
hi, im doing an AE CS4 project in 32 bits, i create a mask and with all levels of feathering and expansion i can see banding so clearly, i thought 32 bits would solve the banding issues, i see this with all examples, say that i put a black solid over
-
Need help with drive installation for K9N2 SLI Platinum
Hi I am new to the forum and to MSI This is my 6th computer build and first time using SATA and PCIe My hardware includes: • MSI K9N2 SLI Platinum Motherboard • Corsair XMS2 TWIN2X4096-6400C5 • GeForce 9800 GT 512MB GDDR3 • AMD Phenom X4 98