Xcode writting/reading file problem

Hi,
im using xcode to compile in c  language, but im having problem with files, writting/reading simply doesnt work (to be exact i have to say that i copied source code to dev-c++ on windows platform to check the code and it works normaly as it should) any suggestions?
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
int main (int argc, const char * argv[])
  char tekst[]="tujesttekstktorychchcezapisacdopliku";
          char tekst2[20];
  FILE *plik;   /*r=read, w=write, rwx-obydwachyba, wb-tryb binarny*/
          if ((plik=fopen("text", "w"))==NULL)
  printf("plik nie zostal otworzony");
          fprintf(plik, "%s" ,tekst);  /*wpisanie tekstu*/
          fscanf(plik, "%s",tekst2);
  printf("tekst2: %s\n", tekst2);
          if (fclose(plik)!=0)
  printf("blad przy zamykaniu");
    printf("Hello, World!\n");
    return 0;
the result of this program is "hello world" ONLY.
file is clean, same thing with test2 variable.
in copied code opening mode is "w" but ive checked almost all options ofc including binary file modes (both doesnt work)
any suggestions?
Message was edited by: Entwu

while( (len = in2.read(b,0,1024)) != -1 )
bytcount=bytcount+1024;
inFile.write(b,0,1024);
} This is where you go wrong ... suppose you're reading, say 100 bytes instead of the maximum 1024;
you're still writing 1024 bytes instead of those 100 bytes; your 'bytcount' goes berzerk too. Have a
look at this -- while( (len = in2.read(b,0,1024)) != -1 ) {
   bytcount=bytcount+len;
   inFile.write(b,0,len);
} kind regards,
Jos

Similar Messages

  • Write / read files to RAM memory

    Dear all,
    I want to write a text file to RAM memory and after read it from RAM memory.
    Why? Because, I want to read my text files quickly, in short time.
    if I use default method for reading files it take long time for reading the file and for write the file.
    But, if I use write / read files to RAM memory, I can read my files quickly and read my files from RAM for processing and write my files to HDD.
    Can you help me?
    I searched on the Internet this problem and I did not find any one solution.
    From my searching on the Internet, I understand that Java can not do that.

    The problem with this program is that it load 1 minutes, but I want to load a second.
    Here is my java code:
    import java.io.*;
    public class File {
    public static void main(String[] args) {
    // Start to reading the file
          try{
        FileInputStream fstream1 = new FileInputStream("big.txt");
        DataInputStream in = new DataInputStream(fstream1);
            BufferedReader br = new BufferedReader(new InputStreamReader(in));
        String strLine;
        while ((strLine = br.readLine()) != null)   {
    // Start to replacing method
        String strreplace = "%";
        String result = strLine.replaceAll("a", strreplace);
    // End of replacing method
    // Start to writing to file
          try{
        FileWriter fstream2 = new FileWriter("out.txt", true);
            BufferedWriter out = new BufferedWriter(fstream2);
        out.write(result); // Write to file the result
        out.close();
        }catch (Exception e){
          System.err.println("Error: " + e.getMessage());
    // End of writing to file
        in.close();
        }catch (Exception e){
          System.err.println("Error: " + e.getMessage());
    // End of reading from file
    } // Here is the end...Please to do the following steps:
    1. Copy my code;
    2. Download text file from: [http://norvig.com/big.txt|http://norvig.com/big.txt]
    3. Open the text editor and select all text (Ctr+A) and dublicate the text 10 times for creating a big text file (30-40 MB);
    4. As a java developer, You know what to do next.
    I'm waiting your solution.
    Thanks in advance!

  • Error 43 when accessing LabVIEW 2009 write/read file functions through the web server functionality

    Is there any way around to avoid Error 43, "Operation cancelled by user" when using Web server?
    I am using the example VI:s RemotePanelMethods-Server.vi and RemotePanelMethods-Client.vi to acces the MainGUI.vi from my workstation to a lab computer. * LabVIEW 2009 is installed in both machines.
    * MainGUI.vi is wired to the VI access list in the Server VI but it also contains a hierarchy below that isn't, is this a problem?
    * Several functions in MainGUI calls file read and write operations
    The problem ocurrs when file read/write operations with no preselected path are selected through the Client. The traditional popup window requesting the file to read or write is never seen in the Client, but only the Error 43.
    Thanks in advance

    See this

  • Write/ Read Keys problem

    hi all,
    I am looking for your advise for the attached vi for writing/ reading keys.
    Facing problem:
    Since the input/ output is of cluster of mixed control types, I am having problem to write & read all settings correctly. I am sure that I must have missed out something IMPORTANT
    I have tried indexing "TypeDesc" to Variant's "Type" input as well as Fixed it DBL/ I32. However, both methods do not seem working well. I am still having problems with "Use Dirty Transmitter"(Boolean) and "arrays" types.
    Any suggestion would be very much appreciated.
    Best regards
    ian.f
    Ian F
    Since LabVIEW 5.1... 7.1.1... 2009, 2010
    依恩与LabVIEW
    LVVILIB.blogspot.com
    Attachments:
    P&P_Update_2t.vi ‏145 KB

    Hi Ian.f,
    I always welcome the chance to help a fellow enthusiast. Unfortunetly I think I will be of limited use.
    First let me say that the best resource to answer this question is probably Jeane-Piere Drolet becuase I think he has cracked this nut in some of his code from "OpenG".
    That being said, let me do what I can for now. There are a number of issues that are hitting you. First is the arrays. You are currently reading them as a variant and attempting to convert (this is where Jeane-Piere may be able to help). The data is coming to you as a variant because the array of refnums for the cluster are generic types that handle all data types. If you use a "to more specific" node you can convert these nodes to the actual class of data used. The complication them becomes "which tpye do I convert which ref to?" Agian I think Jeane-Piere has got this figured.
    I have accomplished what you appear to be attempting in a more specific fashion. I will try to outline my approach below.
    1) Make the cluster a strict type def. My appraoch usese the same cluster in more than one place and this will simplify support.
    2) Instead of using refnums to the individual cluster elements, use a refnum for the entire cluster.
    3) When trying to update the cluster, update the ENTIRE cluster. I have not figured out how to update just a part of a cluster using control refs.
    4) When trying to save use a "unbundle" by name to break-out your parts and save them as required for each type.
    5) For the arrays I will create a new section for each array. In that section I will have at minimum a field called "number_of elements" or similar. This filed will get the array length. If there are elements in the array, I will start writing them as "element1",..
    This gives me enough data to put things back together at restore time.
    I am curious how you end up solving this challenge. I have successfully written code that will automatically locate all of the controls and indicators on the front panel of a VI of my choosing and save/restore them from file BUT, it does not support the complex data types like clusters and arrays. I still have to do these explicitely.
    I will watch this question to see if I can help or learn more.
    Ben
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction

  • Time stamp data write to file problem

    Hello!
    I'm just learning LabView, and have arrived at the stage of writing time-stamped data to text files.
    This seems clear enough, however when I examine the file written to disk, I find 4 unexpected characters: 3 spaces and one seemingly random number or punctuation mark, preceding every line!
    An example is:
       .2005-07-15 10:55:40.0 the value is 0.0000 cm
       .2005-07-15 10:55:40.5 the value is 1.0000 cm
    The four characters "   ." are those whose origin I can't understand. I can't seem to get rid of them.
    They seem to change with the input string, but not in a manner I can predict or understand.
    Any hints or explanations would be greatly appreciated, as I'm at wit's end after 1/2 day of puzzling over this little problem!
    Alex
    Attachments:
    time stamp data write VIs.zip ‏24 KB

    Alex,
    You found one of the subtle little things that can be frustrating to old-timers and newcomers alike. I did not recognize it until I read the help file (and I have been using LV since version 1.2).
    First, the three characters before the commas are nulls (\00).
    The reason they are there is in the help file for the Write File.vi. By wiring an array to the data input, you caused the VI to write a header telling what data format was used.
    I modified your VI to simply concatenate the strings and then write a simple string to the file. I think this may be what you were after.
    Lynn
    Attachments:
    write timestamp text line to file v3.vi ‏47 KB

  • Write in file problem

    My problem is:
    I wanna write in a file. But what happen if another application is writing in that file in the same time?
    Is it possiple to check if anyone is writing in this file or what can i do not to get in a write conflict?
    I use the class FileOutputStream to write in the file.

    It is the job of the operating system to make sure that two applications don't write to the same file at once.
    Bascially, you don't need to worry about this at all, it is handled automatically by Windows/linux etc for you.

  • Write/read file in OOP

    Hello,
    I have to make class that reads/creates tdms file
    I know OOP concepts from C++ and I ve seen write and safe class to file example  in labview but I have no idea haw to make it and what are benefits of using OOP in this case..
    I thought about creating privete methods to write and read data from obiect  and then creating public methods to set path filename etc.
    but I don't know haw to write obiect to tdms file
    Any help appreciated

    Dr. Damien has been working to naswer your question and his series on LVOOP file I/O are indexed starting in post # 26 here.
    It is a multi-part series.
    In volume 8 he posted this Domaion model.
    Have at it.
    Post up Q's in those threads. WE really need a OOPer to review and comment.
    Ben
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction

  • Write/Read Synchronization Problem

    Hi there,
    we have a little problem reading objects from the DB shortly after updating them.
    After we commit the UnitOfWork we do a ReadObjectQuery. Sometimes (about evry 6-10th time) the ReadObjectQuery return an object with outdated data (the state like before the commit).
    I inserted an initializeAllIdentityMaps() between the write and the read, but that didn't help.
    I inserted a Thread.sleep() after the write which fixes the problem, but I'm not willing to accept this as a solution. There must be a better way than active waiting for the changes to complete.
    I'm looking for notification mechanism to find out if the commit is complete and the read-cache is ready to use.
    Any suggestions?
    Thanks,
    Tassilo.

    Thanks for your help, Don.
    I think we can exclude race conditions. This happens in a single thread in a single Method.
    But I forgot to post one important information (I'm sorry for that): We are still using TOPLink 3.6
    I tried to boil the problem down to a minimal test that reproduces the effect: The following code reads an object form the DB, sets on of its reference to null, commits it, sets the reference back to the original value and commits again.
    Then it reads the same object again from the DB and in 4 out of 20 tries the reference is still null. A second read always brings up the right reference. The ratio 4 of 20 is not constant, sometimes it's over 10 fails in 20 tries, in some rare cases all 20 tries work out fine.
    I have no clue what is going on here. I'll appreciate any help.
    public void testMethod(){
    for (int i = 0; i < 20; i++) {
    long myOid = 19618;
    ClientSession clientSession = ServerSession.getClientSession();
    UnitOfWork uow = clientSession.acquireUnitOfWork();
    CoObject object = CoObject.findWhereObjectIdExists(clientSession, myOid); /* this is a ReadObjectQuery*/
    CoContent content = object.getCoContent();
    CoObject objectClone = (CoObject) uow.registerObject(object);
    CoContent contentClone = (CoContent) uow.registerObject(content);
    objectClone.setCoContent(null);
    uow.commitAndResume();
    objectClone.setCoContent(contentClone);
    uow.commit();
    // uow.initializeAllIdentityMaps(); /* doesn't make a difference */
    /* now we read the same Object the DB again */
    object = CoObject.findWhereObjectIdExists(clientSession, myOid);
    System.out.println(i + "object.getCoContent(): " + object.getCoContent()); /* ouch! */
    try {
    Thread.sleep(500); /* this helps, but hurts! */
    catch (Exception e) {
    object = CoObject.findWhereObjectIdExists(clientSession, myOid);
    System.out.println(i + "neu object.getCoContent(): " + object.getCoContent());
    0 object.getCoContent(): CoFlexTyp[ID=16226.0 Name=Checkthisout, Object-Id=19618.0]
    0 neu object.getCoContent(): CoFlexTyp[ID=16226.0 Name=Checkthisout, Object-Id=19618.0]
    1 object.getCoContent(): null
    1 neu object.getCoContent(): CoFlexTyp[ID=16226.0 Name=Checkthisout, Object-Id=19618.0]
    2 object.getCoContent(): CoFlexTyp[ID=16226.0 Name=Checkthisout, Object-Id=19618.0]
    2 neu object.getCoContent(): CoFlexTyp[ID=16226.0 Name=Checkthisout, Object-Id=19618.0]
    3 object.getCoContent(): CoFlexTyp[ID=16226.0 Name=Checkthisout, Object-Id=19618.0]
    3 neu object.getCoContent(): CoFlexTyp[ID=16226.0 Name=Checkthisout, Object-Id=19618.0]
    4 object.getCoContent(): CoFlexTyp[ID=16226.0 Name=Checkthisout, Object-Id=19618.0]
    4 neu object.getCoContent(): CoFlexTyp[ID=16226.0 Name=Checkthisout, Object-Id=19618.0]
    5 object.getCoContent(): null
    5 neu object.getCoContent(): CoFlexTyp[ID=16226.0 Name=Checkthisout, Object-Id=19618.0]
    6 object.getCoContent(): CoFlexTyp[ID=16226.0 Name=Checkthisout, Object-Id=19618.0]
    6 neu object.getCoContent(): CoFlexTyp[ID=16226.0 Name=Checkthisout, Object-Id=19618.0]
    7 object.getCoContent(): CoFlexTyp[ID=16226.0 Name=Checkthisout, Object-Id=19618.0]
    7 neu object.getCoContent(): CoFlexTyp[ID=16226.0 Name=Checkthisout, Object-Id=19618.0]
    8 object.getCoContent(): CoFlexTyp[ID=16226.0 Name=Checkthisout, Object-Id=19618.0]
    8 neu object.getCoContent(): CoFlexTyp[ID=16226.0 Name=Checkthisout, Object-Id=19618.0]
    9 object.getCoContent(): CoFlexTyp[ID=16226.0 Name=Checkthisout, Object-Id=19618.0]
    9 neu object.getCoContent(): CoFlexTyp[ID=16226.0 Name=Checkthisout, Object-Id=19618.0]
    10 object.getCoContent(): CoFlexTyp[ID=16226.0 Name=Checkthisout, Object-Id=19618.0]
    10 neu object.getCoContent(): CoFlexTyp[ID=16226.0 Name=Checkthisout, Object-Id=19618.0]
    11 object.getCoContent(): null
    11 neu object.getCoContent(): CoFlexTyp[ID=16226.0 Name=Checkthisout, Object-Id=19618.0]
    12 object.getCoContent(): CoFlexTyp[ID=16226.0 Name=Checkthisout, Object-Id=19618.0]
    12 neu object.getCoContent(): CoFlexTyp[ID=16226.0 Name=Checkthisout, Object-Id=19618.0]
    13 object.getCoContent(): CoFlexTyp[ID=16226.0 Name=Checkthisout, Object-Id=19618.0]
    13 neu object.getCoContent(): CoFlexTyp[ID=16226.0 Name=Checkthisout, Object-Id=19618.0]
    14 object.getCoContent(): CoFlexTyp[ID=16226.0 Name=Checkthisout, Object-Id=19618.0]
    14 neu object.getCoContent(): CoFlexTyp[ID=16226.0 Name=Checkthisout, Object-Id=19618.0]
    15 object.getCoContent(): null
    15 neu object.getCoContent(): CoFlexTyp[ID=16226.0 Name=Checkthisout, Object-Id=19618.0]
    16 object.getCoContent(): CoFlexTyp[ID=16226.0 Name=Checkthisout, Object-Id=19618.0]
    16 neu object.getCoContent(): CoFlexTyp[ID=16226.0 Name=Checkthisout, Object-Id=19618.0]
    17 object.getCoContent(): CoFlexTyp[ID=16226.0 Name=Checkthisout, Object-Id=19618.0]
    17 neu object.getCoContent(): CoFlexTyp[ID=16226.0 Name=Checkthisout, Object-Id=19618.0]
    18 object.getCoContent(): CoFlexTyp[ID=16226.0 Name=Checkthisout, Object-Id=19618.0]
    18 neu object.getCoContent(): CoFlexTyp[ID=16226.0 Name=Checkthisout, Object-Id=19618.0]
    19 object.getCoContent(): CoFlexTyp[ID=16226.0 Name=Checkthisout, Object-Id=19618.0]
    19 neu object.getCoContent(): CoFlexTyp[ID=16226.0 Name=Checkthisout, Object-Id=19618.0]

  • Security manager - applet - write/read files

    Hi.
    I've been trying to built a SecurityManager to allow my java applet to construct a file (*.txt or *.doc) on the server (webhosting provider) it came from. Unfortunately when I use the setSecurityManager method to set my Security Manager as the default Security Manager for that specific applet, the applet throws a SecurityException. It wouldn't allow me to change the Security Manager.
    I want to change the default Security Manager so that my applet can have permission to read and write to the specified file (*.txt or *.doc). I don't want to save any kind of files on the host computer even if I can do that, I only require to save my file (*.txt or *.doc) to the computer from were the applet's classes came from.
    Thank you!

    If there is a security manager already installed, this method first calls the security manager's checkPermission method with a RuntimePermission("setSecurityManager") permission to ensure it's ok to replace the existing security manager. This may result in throwing a SecurityException. Thus I think that you need to grant the setSecurityManager permission to your current SecurityManager to be able to replace it.

  • Reading file problem

    Hi all,
    I wonder wether I can go beyond my java leve. Here is a stupid problem but could not find it out where in the code ?
    I want to read a file where each line will have 2 strings separated by a comma delemiter. for e.g
    ABC,DEF
    FDG,TYH
    GHJ,ABC
    my code should read the file in a loop and the first string should go to String variable concept1 and the second string should be the value of Concept2. In my code I could get the first line not beyond that and the error shows :
    ABC,DEF
    java.util.NoSuchElementException
         at java.util.StringTokenizer.nextToken(StringTokenizer.java:259)
         at GetNodes.main(GetNodes.java:24)
    Exception in thread "main"
    ----jGRASP wedge2: exit code for process is 1.
    ----jGRASP: operation complete.
    my code is :
    import java.util.*;
    import java.io.*;
    public class GetNodes
         static StringTokenizer st;
         static String token="";
         public static void main(String [] args)throws IOException
              String concept1="";
              String concept2="";
              BufferedReader br=new BufferedReader(new FileReader("smita.txt"));
              String line;
              while((line=br.readLine())!=null)
                   st=new StringTokenizer(line);
                   while(st.hasMoreTokens())
                        concept1=st.nextToken();
                        System.out.println(concept1);
                        while(!concept1.equals(","))
                             token=st.nextToken();
                             concept2=token;
                             System.out.println(concept2);
                             token=st.nextToken();
    //concept1=token;
                   I know the code is not efficient but that is what at best I can do with my level.
    Thanks and apreciate your comments
    cheers

    the reason you're getting this error is because you're calling your "st.nextToken() twice, if it reached the EOL then it will throw a NoSuchElementException
                        while(!concept1.equals(","))
                             token=st.nextToken();
                             concept2=token;
                             System.out.println(concept2);
                             token=st.nextToken();
                   }-- you can use List to store your data from your text file, I modified your code into much simpler way like this:
    import java.util.*;
    import java.io.*;
    public class GetNodes
         static StringTokenizer st;
         static String token="";
         public static void main(String [] args)throws IOException
         List concept=new ArrayList();
         BufferedReader br=new BufferedReader(new FileReader("smita.txt"));
         String line;
         while((line=br.readLine())!=null)
              st=new StringTokenizer(line, ",");
              while(st.hasMoreElements())
                   concept.add(st.nextElement()); 
        for (int i = 0; i<concept.size(); i++)
            System.out.println (concept.get(i));
    }

  • About write read file

    I have log file, maximum 500kb, every 30 sec to the end of file I saveing new information and if filesize willbe bigger than 500kb I have to erase older string information in the begin of file and up hole file. How did this very fastly because if lost power file willbe bad. My code doesnt work.
    public String ReadLn(InputStream InData) {
              int i = 0;
              int ch = 0;
              String line = "";
              try {
                   while ((ch != -1) & (ch != 10)) {
                        ch = InData.read();
                        line += (char) ch;
              } catch (Exception e) {
                   return null;
              if (line == "")
                   return null;
              else
                   return line;
    /////Inserting new information
    FileConnection fconn = (FileConnection) Connector.open(file,Connector.READ_WRITE);
                   if (!fconn.exists()) {//file is present
                        return;
                   OutputStream OutData = fconn.openOutputStream(fconn.fileSize());
                   OutData.write((record+endline).getBytes());//record new information
                   OutData.flush();
                   OutData.close();
                   OutData = fconn.openOutputStream();//seek to begin
                   int ch = 0;
                   InputStream InData = fconn.openInputStream();     
                   String read_ln=ReadLn(InData);//read first line
                   String data = "";
                   byte buffer[] = new byte[1024];
                   while ((ch=InData.read(buffer))!= -1) {
                        data = new String (buffer);
                        sendline(data);
                        OutData.write((data).getBytes());
                   fconn.close();
                   OutData.flush();
                   OutData.close();
                   InData.close();

    Thanks for all. I will try to use RMS its more effectivity and simple to use and economy memory than txt file.

  • Im using xcode 4.6 and im having problems reading files using the fopen function in c

    Im using xcode 4.6 and im having problems reading files using the fopen function in c

    Yes, but that would not cause the "build  failed" message.
    right I missed that part. Looks like two problems then.
    //  main.m
    //  ASCTestFopen
    //  Created by Frank Caggiano on 3/2/13.
    //  Copyright (c) 2013 Frank Caggiano. All rights reserved.
    #import <Foundation/Foundation.h>
    #include <stdio.h> 
    int main(int argc, const char * argv[])
        @autoreleasepool {
            FILE *fp, *fopen();
            // insert code here...
            if((fp = fopen("~/test.txt","r")) == NULL)
                NSLog(@"open failed");
        return 0;
    This will compile ad run in Xcode with a project type of comand line tool

  • Can't read or write some files, internet is failing, youtube won't load, software I tried to install was in Slovenian, not dutch or english like in my systempreferences settings, pictures and files won't preview with spacebar, etc. Malware?

    Specs:
    iMac 10.8.5
    3,4 GHz Intel Core i7
    32 GB 1600 MHz DDR3
    Can't read or write some files, internet is failing, youtube won't load, security software I tried to install was in Slovenian, not dutch or english like in my systempreferences settings, pictures and files won't preview with spacebar and are randomly corrupted, when I entered something in the Youtube searchbar (when it was still working) it send me to a site with sexadds.
    I tried restart my iMac and when I was logged back in, my dock preferences were reset.
    Also tried to download some security software to check my Mac for malware, but when I did, I tried several, I got a notification that said something like 'dumpfiles (don't know if this is the right translation...) damaged'.
    I'm taking screenshots from all the weird notifications I get and even three quarters off the screenshots I took in the last three hours are already unreadable.
    It started this morning when I tried opening a Premiere Pro file on which I worked the night before.
    When I tried opening it, it said the file was damaged and could not be openend.
    I tried opening it with AE or importing the file in a new project but nothing helped.
    When I tried looking for autosaves, this is the really weird part, there were none.
    Even though there are autosaves from my other projects, this one was completely gone.
    It looked like the day before never happened on my computer.
    Also when I openend Premiere all the recent projects had been wiped.
    So at first I thought it was a Premiere Pro failure.
    But than, later on the day, I tried loading some RAW files from my compact flash card.
    This is where I would get an error (error -36) which said some data cannot be read or written.
    I tried importing the files with a view different technics, from dragging to importing via Lightroom and I succeeded with Image Browser.
    But when I tried moving the files to an other folder the same error occurred.
    While dealing with this issue I wanted to put on some soothing music on youtube.
    This is when the next weird thing occurred: youtube wasn't completely loading in Chrome. I refreshed a view times, checked the internet connection and still no difference.
    When I tried in Safari it did work but when I clicked enter on the searchbar in Youtube, a page with sexadds appeared (I didn't install AdBlock in Safari...).
    I read about this 'phishing' where you are redirected to a site were a possible malware installment can take place...
    I don't know if it's connected to any of the problems I've been having but I just never experienced this on a mac, I have been a Mac user for 10 years now.
    On top of it all, internet started working worse and worse and now it's not even working at all. I had to fill in the password over and over, normally it remembers.
    Just like my system preferences, all the preferences I had with Chrome where also reset.
    Also somewhere in between I got this notification: Mac OS X must restore library to run programs. Type your password to allow.
    To me this is all very weird and suspicious. I have clearly no idea what's going on. Could this be another sort of trojan horse or malware?
    Some background info which could be helpful for solving this mystery:
    two months ago the one year old Fusion Drive in my iMac just broke out of nowhere.
    I got it replaced by a qualified apple repair store.
    When I got my computer back, all the files where gone.
    I got on the internet without AdBlock installed yet.
    A game or whatever it was, can't clearly remember, got installed by accident.
    I deleted it immediately.
    Only two weeks later, I couldn't log in to my account. It didn't recognize my password and username. 
    So I brought my mac back to the store.
    Here the repair guy said it was a minor thing and he just needed to reconnect my account. He also mentioned he found a downloaded game name Sparta and it probably had something to do with the error.
    I asked him; could it be a virus? He replied no way.
    I don't know why I couldn't be a virus, just because it's a mac doesn't mean it cannot be done.
    So today I tried installing anti virus software (such as avast- was in a weird language looked like slovenian, clamxav - was in slovenian) but I couldn't install them.
    PLEASE help me! I don't know what to do anymore, I work fulltime and I need my computer, I have no time to bring it in for repair, are there other perhaps easier ways?
    Could this be the work of a virus or a malware? Or is it a disk permissions issue?

    It sounds like you may have multiple problems, but none of them are likely to be caused by malware.
    First, the internet-related issues may be related to adware or a network compromise. I tend to lean more towards the latter, based on your description of the problem. See:
    http://www.adwaremedic.com/kb/baddns.php
    http://www.adwaremedic.com/kb/hackedrouter.php
    If investigation shows that this is not a network-specific issue, then it's probably adware. See my Adware Removal Guide for help finding and removing it. Note that you mention AdBlock as if it should have prevented this, but it's important to understand that ad blockers do not protect you against adware in any way. Neither would any kind of anti-virus software, which often doesn't detect adware.
    As for the other issues, it sounds like you've got some serious corruption. I would be inclined to say it sounds like a failing drive, except it sounds like you just got it replaced. How did you get all your files back after the new drive was installed?
    (Fair disclosure: I may receive compensation from links to my sites, TheSafeMac.com and AdwareMedic.com, in the form of buttons allowing for donations. Donations are not required to use my site or software.)

  • How to combine both DAQ AI signal, write and read file in single VI

    Hi
     I am the new user of LabVIEW version 7.1 for testing automation application. I have to measure 33 signals ( mostly analog like temp, pressure, etc...) from NI USB 6210 DAQ system and write in master file for future verfication.From real data or from master file back up have to write  one more file if only the signal reaches steady state , which will used for analysis and same signals to be read from this file parallely & make a waveform and/or table display format.
    Pl. help me to shortout this problem 
    note: I have plan to ugrade labVIEW version 2011 shortly, so let me know doing parrel acquistion write and read file for data analysis in same VI in version 7.1...... 

    Parallel operations in LabVIEW are very simple.  Just code it in parallel and it will work.
    Try taking a look at some of the examples in the NI Example Finder (Help > Find Examples).  There you will find example for writing to and reading from files, as well as data acquistion in parallel with other operations.
    You might need a producer/consumer architecture is you are acquiring data very quickly.
    Chris
    Certified LabVIEW Architect
    Certified TestStand Architect

  • Lion server file sharing issue with windows API read/write ini file (GetPrivateProfileString)

    Hello,
    I try to config lion server as file server for a windows application we use at work. All other computers are windows 7 or XP, lion server is the only mac. I choose lion server because it's size, quality and personal love of apple products.
    10.7.2 lion server's samba file sharing works almost perfectly with all my windows machines, I can copy, delete, modify any text files or office files without any issue, but the most important windows application for my business doesn't work with samba file sharing. After some digging, I found it is because windows program can't read or write INI file stored on lion share. Windows API GetPrivateProfileString always returns empty if the INI file is store on lion share.
    You can download a small application for read/write windows INI file from codeproject.com to test this problem:
    http://www.codeproject.com/KB/files/ini.aspx
    I can open/edit the in file using any text editor without any problem. The only problem is with those windows APIs. ACL is turned on for my lion share and assigned "delete" rights to samba users.
    I install samba3 on the same server; it works perfectly with windows API. My windows program also works. Looks like there is something wrong with lion server's sambax.
    I'd prefer to use built-in samba even I have samba3 working. Built-in samba is very immature right now, but considered how young it is, I will give apple some time to make it mature.
    Does anyone have same issue or knows how to fix it?
    Thanks,
    Michael.

    All the memory is fine. The server rarely if ever goes down when there are only around 10-12 users connected. When there are 20+ users connected and working heavily it goes down often. When I say working heavily, I mean they are transferring huge files to the SAN (100GB+), sometimes 5 at a time per user, and there are a bunch of others who are reading large video files at a minimum of 220MB/sec from the SAN.
    Though this worked on Snow Leopard without any issues, Lion just doesn't seem to be able to handle it. The odd thing is, on Snow Leopard there was only a single 1GB ethernet connection to a NAS system, whereas with Lion we have a much more powerful machine with a 6-port 10GB ethernet card and a 4 lane 8GB fiber card to a true SAN. You would think that the newer scenario with Lion would handle far more users with ease.
    So far, very disappointing with regards to Lion's file serving performance.

Maybe you are looking for