Search Results

Search found 451 results on 19 pages for 'fp'.

Page 3/19 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • Java: opening and reading from a file without locking it.

    - by rogue780
    I need to be able to mimic 'tail -f' with Java. I'm trying to read a log file as it's being written by another process, but when I open the file to read it, it locks the file and the other process can't write to it anymore. Any help would be greatly appreciated! Here is the code that I'm using currently: public void read(){ Scanner fp = null; try{ fp = new Scanner(new FileReader(this.filename)); fp.useDelimiter("\n"); }catch(java.io.FileNotFoundException e){ System.out.println("java.io.FileNotFoundException e"); } while(true){ if(fp.hasNext()){ this.parse(fp.next()); } } }

    Read the article

  • Homemade fstat to get file size, always return 0 length.

    - by Fred
    Hello, I am trying to use my own function to get the file size from a file. I'll use this to allocate memory for a data structure to hold the information on the file. The file size function looks like this: long fileSize(FILE *fp){ long start; fflush(fp); rewind(fp); start = ftell(fp); return (fseek(fp, 0L, SEEK_END) - start); } Any ideas what I'm doing wrong here?

    Read the article

  • C - 3rd line on a txt

    - by Pedro
    Hi....I have on the txt file this: Hello Experience 3 Bad Hi want to scanf the 3rd line; i'm doing this: FILE *fp; int number; fp=fopen("test.txt","r"); if(fp==NULL){ printf("Error\n"); } while(!feof(fp)){ for(i=0;i<=3;i++){ if(i==3){ fscnaf(number,fp); prinf("string in the 3rd line is %s\n",number); } } } system("PAUSE"); } I need to use the fscanf, because i will need it, the number is the size of students in a school... Something is wrong, but i don't know what is...please help me...

    Read the article

  • Attempted to perform an unauthorized operation

    - by Lefteris Gkinis
    Now I use the following code: Public Function SetACL(ByVal filename As String, ByVal account As String, ByVal sender As Object, ByVal e As System.EventArgs) As Boolean Try Dim rule As FileSystemAccessRule = New FileSystemAccessRule(account, FileSystemRights.Write, AccessControlType.Allow) Dim fp As PermissionSet = New PermissionSet(Permissions.PermissionState.Unrestricted) fp.AddPermission(New FileIOPermission(FileIOPermissionAccess.Read, filename)) fp.AddPermission(New FileIOPermission(FileIOPermissionAccess.Write, filename)) fp.AddPermission(New FileIOPermission(FileIOPermissionAccess.PathDiscovery, filename)) fp.Assert() Dim di As DirectoryInfo = New DirectoryInfo(Path.GetDirectoryName(filename)) SetACL = False Dim security As DirectorySecurity = di.GetAccessControl(AccessControlSections.Access) security.ModifyAccessRule(AccessControlModification.Add, rule, SetACL) di.SetAccessControl(security) Return SetACL Catch ex As Exception MessageBox.Show(ex.Message, "Set Security Sub", MessageBoxButtons.OK, MessageBoxIcon.Stop) Finalize() End Try End Function The Error of 'Attempted to perform an unauthorized operation' comes when i'm trying to execute the instraction Dim security As DirectorySecurity = di.GetAccessControl(AccessControlSections.Access) Please if anybody knows why that error comes here to respond

    Read the article

  • using php Download File From a given URL by passing username and password for http authentication

    - by Acharya
    Hi all, I need to download a text file using php code. The file is having http authentication. What procedure I should use for this. Should I use fsocketopen or curl or Is there any other way to do this? I am using fsocketopen but it does not seem to work. $fp=fsockopen("www.example.com",80,$errno,$errorstr); $out = "GET abcdata/feed.txt HTTP/1.1\r\n"; $out .= "User: xyz \r\n"; $out .= "Password: xyz \r\n\r\n"; fwrite($fp, $out); while(!feof($fp)) { echo fgets($fp,1024); } fclose($fp); Here fgets is returning false. Any help!!!

    Read the article

  • PHP socket UDP communication

    - by Ghedeon
    Server works fine, but the problem is the client doesn't receive anything. server.php <?php $buf_size = 1024; $socket = stream_socket_server("udp://127.0.0.1:3127", $errno, $errstr, STREAM_SERVER_BIND); do { $str = stream_socket_recvfrom($socket, $buf_size, 0, $peer); $str = "abc"; stream_socket_sendto($socket, $str, strlen($str), 0, $peer); } while (true); ?> client.php <?php $fp = stream_socket_client("udp://127.0.0.1:3127", $errno, $errstr); if (!$fp) { echo "$errno - $errstr<br />\n"; } else { fwrite($fp, "1 2 3"); echo fread($fp, 15); fclose($fp); } ?>

    Read the article

  • scoket connection issue+php

    - by Abhimanyu
    Hi, I am using PHP socket programming and able to write data to open socket but i have to wait for a long time(or stuck it)for the response or some time getting error like "Maximum execution time of 30 seconds exceeded line number where this code is placed fgets($fp, 128), i have check the server it seems it has sent the response as expected but i am not getting why i m unable to get response.following the code using for socket connection and reading data. functon scoket_connection() { $fp = fsockopen(CLIENT_HOST,CLIENT_PORT, $errno, $errstr); fwrite($fp,$packet); $msg = fgets($fp, 128); fclose($fp) return $msg; } any idea???

    Read the article

  • fwrite() not writing. Error with my code, or the remote client?

    - by Rob
    Trying to set up a script to send commands to a remote client on a Win32 system. Here is the code: $command = $_POST['command']; $host = $_POST['host']; $port = $_POST['port']; $fp = @fsockopen($host, $port, $e, $s, 15); if (!$fp) { echo 'Error! Here\'s your problem: ' . $e . ': ' . $s; }else{ $fw = fwrite($fp, $command); if (!$fw){ echo 'Failed sending command.'; fclose($fp); }else{ fclose($fp); echo 'Successfully sent: ' . $command; } } My buddy is working on the remote client, and he says that this script is sending '' However, my script is echoing Successfully sent: test Am I doing something wrong, or is it a problem on his end?

    Read the article

  • Why don't file type filters work properly with nsIFilePicker on Mac OSX?

    - by Eric Strom
    I am running a chrome app in firefox (started with -app) with the following code to open a filepicker: var nsIFilePicker = Components.interfaces.nsIFilePicker; var fp = Components.classes["@mozilla.org/filepicker;1"] .createInstance(nsIFilePicker); fp.init(window, "Select Files", nsIFilePicker.modeOpenMultiple); fp.appendFilter("video", "*.mov; *.mpg; *.mpeg; *.avi; *.flv; *.m4v; *.mp4"); fp.appendFilter("all", "*.*"); var res = fp.show(); if (res == nsIFilePicker.returnCancel) return; var files = fp.files; var paths = []; while (files.hasMoreElements()) { var arg = files.getNext().QueryInterface( Components.interfaces.nsILocalFile ).path; paths.push(arg); } Everything seems to work fine on Windows, and the file picker itself works on OSX, but the dropdown menu to select between file types only displays in Windows. The first filter (video in this case) is in effect, but the dropdown to select the other type never shows. Is there something extra that is needed to get this working on OSX? I have tried the latest firefox (3.6) and an older one (3.0.13) and both don't show the file type dropdown on OSX.

    Read the article

  • PayPal IPN "FAIL"

    - by Rob
    Hey all... I'm trying to figure out how to use PayPal's IPN and I've run into a wall. I want a buyer to be forwarded to a success page after making a purchase, and I want that page to show the details of their transaction. I choose IPN instead of the PDT because I also want to do some other behind the scenes stuff with their data. Anyway, here's the code I'm using -- I'm testing in sandbox mode -- but it returns "FAIL" every time. $req = 'cmd=_notify-validate'; foreach ($_POST as $key => $value) { $value = urlencode(stripslashes($value)); $req .= "&$key=$value"; } // post back to PayPal system to validate $header = "POST /cgi-bin/webscr HTTP/1.0\r\n"; $header .= "Content-Type: application/x-www-form-urlencoded\r\n"; $header .= "Content-Length: " . strlen($req) . "\r\n\r\n"; $fp = fsockopen ('www.sandbox.paypal.com', 80, $errno, $errstr, 30); if (!$fp) { // HTTP ERROR } else { fputs ($fp, $header . $req); while (!feof($fp)) { $res = fgets ($fp, 1024); if (strcmp ($res, "VERIFIED") == 0) { // PAYMENT VALIDATED & VERIFIED! echo "Validated!"; } else if (strcmp ($res, "INVALID") == 0) { // PAYMENT INVALID & INVESTIGATE MANUALY! echo "Invalid!"; } } fclose ($fp); }

    Read the article

  • Python: slow read & write for millions of small files

    - by Jami
    I am building directory tree which has tons of subdirectories and files. The total directory count is somewhere along 256^32 subdirectories with 256 files in each end which are only a few bytes long. I did this so I would have fast access to these files (since i'm not searching and i'm just directly accessing then via a known file path) I have a python script that builds this filesystem and reads & writes those files. The problem is that when I reach more than 1Gb of total filesize, the read and write methods become extremely slow. Here's the function I have that reads the contents of a file (the file contains an integer string), adds a certain number to it, then writes it back to the original file. def addInFile(path, scoreToAdd): num = scoreToAdd try: shutil.copyfile(path, '/tmp/tmp.txt') fp = open('/tmp/tmp.txt', 'r') num += int(fp.readlines()[0]) fp.close() except: pass fp = open('/tmp/tmp.txt', 'w') fp.write(str(num)) fp.close() shutil.copyfile('/tmp/tmp.txt', path) I previously tried performing linux console commands but it was slower. I copy the file to a temporary file first then access/modify it then copy it back because i found this was faster than directly accessing the file. I think the cause of the slowdown is because there're tons of files. performing this function 1000 times sometimes reach 1 minute now, but before (when there were only a few files, 1000 calls was performed for only less than 1 second) How do you suggest I fix this?

    Read the article

  • leak in fgets when assigning to buffer

    - by monkeyking
    I'm having problems understanding why following code leaks in one case, and not in the other case. The difference is while(NULL!=fgets(buffer,length,file))//doesnt leak while(NULL!=(buffer=fgets(buffer,length,file))//leaks I thought it would be the same. Full code below. #include <stdio.h> #include <stdlib.h> #define LENS 10000 void no_leak(const char* argv){ char *buffer = (char *) malloc(LENS); FILE *fp=fopen(argv,"r"); while(NULL!=fgets(buffer,LENS,fp)){ fprintf(stderr,"%s",buffer); } fclose(fp); fprintf(stderr,"%s\n",buffer); free(buffer); } void with_leak(const char* argv){ char *buffer = (char *) malloc(LENS); FILE *fp=fopen(argv,"r"); while(NULL!=(buffer=fgets(buffer,LENS,fp))){ fprintf(stderr,"%s",buffer); } fclose(fp); fprintf(stderr,"%s\n",buffer); free(buffer); }

    Read the article

  • C programing fopen

    - by Pedro
    #include <stdio.h> #include <stdlib.h> typedef struct aluno{ char cabecalho[60]; char info[100]; int n_alunos; char dados[100]; char curso[100]; int numero; char nome[100]; char e_mail[100]; int n_disciplinas; int nota; }ALUNO; void cabclh(ALUNO alunos[],int a){ FILE *fp; int i; for(i=0;i<100;i++){ fp=fopen("trabalho.txt","r"); } if(fp==NULL){ printf("Erro ao abrir o ficheiro\n"); } while(!feof(fp)){ fgets(alunos[i].cabecalho,100,fp); printf("%s\n",alunos[i].cabecalho); } } fclose(fp); } what is wrong here? main: int main(int argc, char *argv[]){ ALUNO alunos[100]; int aluno; int b; cabclh(aluno,b); system("PAUSE"); return 0

    Read the article

  • Convert this code from C++ to C#

    - by Alhariri
    please any one convert this code from c++ to c# beacuse i dont know how to read from file in c++ please help me int DoEnDe(int c) { SDES S(key); int i,n; n=10; //Number of Rounds unsigned char ch; FILE *fp; FILE *ft; fp=fopen(tfname,"w"); ft=fopen(sfname,"r"); if (fp==NULL) { printf("\nTarget File not opened SORRY"); getch(); fclose(fp); return(0); } if (ft==NULL) { printf("\nSource File not opened SORRY"); getch(); fclose(ft); return(0); } while (fread(&ch,1,1,ft)==1) { S.OUTPUT=ch; for (i=0;i<n;i++) { if (c==1) S.DES_Encryption(S.OUTPUT); if (c==2) S.DES_Decryption(S.OUTPUT); } fwrite(&S.OUTPUT,1,1,fp); } printf("\nCompleted!!!!!"); getch(); fclose(fp); fclose(ft); return(1); }

    Read the article

  • xml parsing in php issue

    - by jan
    I have this code/function method as part of a class in php: function defaulthome(){ $fp = null; $err =''; $xml_parser = xml_parser_create(); $rss_parser = new Rssparser(); xml_set_object($xml_parser,&$rss_parser); xml_set_element_handler($xml_parser, "startElement", "endElement"); xml_set_character_data_handler($xml_parser, "characterData"); $fp = fopen("http://gulfnews.com/cmlink/business-rss-feed-1.446098?localLinksEnabled=false","r"); if(!$fp) $err = "Error reading RSS data."; else { $count = 0; while ($data = fread($fp, 4096) && $count<10) { xml_parse($xml_parser, $data, feof($fp)) or $err=xml_error_string(xml_get_error_code($xml_parser)); $count++; } } fclose($fp); xml_parser_free($xml_parser); $content_sect2 = $this->tnjn->render('forms/landlords_prompt.phtml'); $context = array('content1_title'=>'Welcome to my website','content1_article'=>"test article", 'feeds'=>$err); $output = $this->tnjn->render("default.phtml", $context); return $output; } I don't get results and the error i have is empty document! Does anyone know which part of the code is the problem? Thanks very much !!

    Read the article

  • Paypal IPN Handler for Cart

    - by kimmothy16
    Hey everyone! I'm using a Paypal add to cart button for a simple ecommerce website. I had a Paypal IPN handler written in PHP that was successfully working for 'Buy it Now' buttons and purchasing one item at a time. I would run a database query each time to update the store's inventory to reflect the purchase. Now I'm upgrading this store to a 'cart' version so people could check out with multiple items at a time. Would anyone be able to tell me, in general, how my IPN handler would need to be altered to accommodate this? I'm unsure of what a response from Paypal looks like for a cart purchase as opposed to a buy it now purchase. Thanks, any help or examples of working IPN cart scripts would be very appreciated! My current code is below.. // Paypal POSTs HTML FORM variables to this page // we must post all the variables back to paypal exactly unchanged and add an extra parameter cmd with value _notify-validate // initialise a variable with the requried cmd parameter $req = 'cmd=_notify-validate'; // go through each of the POSTed vars and add them to the variable foreach ($_POST as $key => $value) { $value = urlencode(stripslashes($value)); $req .= "&$key=$value"; } // post back to PayPal system to validate $header .= "POST /cgi-bin/webscr HTTP/1.0\r\n"; $header .= "Content-Type: application/x-www-form-urlencoded\r\n"; $header .= "Content-Length: " . strlen($req) . "\r\n\r\n"; // In a live application send it back to www.paypal.com // but during development you will want to uswe the paypal sandbox // comment out one of the following lines $fp = fsockopen ('www.sandbox.paypal.com', 80, $errno, $errstr, 30); //$fp = fsockopen ('www.paypal.com', 80, $errno, $errstr, 30); // or use port 443 for an SSL connection //$fp = fsockopen ('ssl://www.paypal.com', 443, $errno, $errstr, 30); if (!$fp) { // HTTP ERROR } else { fputs ($fp, $header . $req); while (!feof($fp)) { $res = fgets ($fp, 1024); if (strcmp ($res, "VERIFIED") == 0) { $item_name = stripslashes($_POST['item_name']); $item_number = $_POST['item_number']; $item_id = $_POST['custom']; $payment_status = $_POST['payment_status']; $payment_amount = $_POST['mc_gross']; //full amount of payment. payment_gross in US $payment_currency = $_POST['mc_currency']; $txn_id = $_POST['txn_id']; //unique transaction id $receiver_email = $_POST['receiver_email']; $payer_email = $_POST['payer_email']; $size = $_POST['option_selection1']; $item_id = $_POST['item_id']; $business = $_POST['business']; if ($payment_status == 'Completed') { // UPDATE THE DATABASE }

    Read the article

  • Fread binary file dynamic size string [C]

    - by Blackbinary
    I've been working on this assignment, where I need to read in "records" and write them to a file, and then have the ability to read/find them later. On each run of the program, the user can decide to write a new record, or read an old record (either by Name or #) The file is binary, here is its definition: typedef struct{ char * name; char * address; short addressLength, nameLength; int phoneNumber; }employeeRecord; employeeRecord record; The way the program works, it will store the structure, then the name, then the address. Name and address are dynamically allocated, which is why it is necessary to read the structure first to find the size of the name and address, allocate memory for them, then read them into that memory. For debugging purposes I have two programs at the moment. I have my file writing program, and file reading. My actual problem is this, when I read a file I have written, i read in the structure, print out the phone # to make sure it works (which works fine), and then fread the name (now being able to use record.nameLength which reports the proper value too). Fread however, does not return a usable name, it returns blank. I see two problems, either I haven't written the name to the file correctly, or I haven't read it in correctly. Here is how i write to the file: where fp is the file pointer. record.name is a proper value, so is record.nameLength. Also i am writing the name including the null terminator. (e.g. 'Jack\0') fwrite(&record,sizeof record,1,fp); fwrite(record.name,sizeof(char),record.nameLength,fp); fwrite(record.address,sizeof(char),record.addressLength,fp); And i then close the file. here is how i read the file: fp = fopen("employeeRecord","r"); fread(&record,sizeof record,1,fp); printf("Number: %d\n",record.phoneNumber); char *nameString = malloc(sizeof(char)*record.nameLength); printf("\nName Length: %d",record.nameLength); fread(nameString,sizeof(char),record.nameLength,fp); printf("\nName: %s",nameString); Notice there is some debug stuff in there (name length and number, both of which are correct). So i know the file opened properly, and I can use the name length fine. Why then is my output blank, or a newline, or something like that? (The output is just Name: with nothing after it, and program finishes just fine) Thanks for the help.

    Read the article

  • Using PHP to read a web page with fsockopen(), but fgets is not working

    - by asdasd
    Im using this code here: http://www.digiways.com/articles/php/httpredirects/ public function ReadHttpFile($strUrl, $iHttpRedirectMaxRecursiveCalls = 5) { // parsing the url getting web server name/IP, path and port. $url = parse_url($strUrl); // setting path to '/' if not present in $strUrl if (isset($url['path']) === false) $url['path'] = '/'; // setting port to default HTTP server port 80 if (isset($url['port']) === false) $url['port'] = 80; // connecting to the server] // reseting class data $this->success = false; unset($this->strFile); unset($this->aHeaderLines); $this->strLocation = $strUrl; $fp = fsockopen ($url['host'], $url['port'], $errno, $errstr, 30); // Return if the socket was not open $this-success is set to false. if (!$fp) return; $header = 'GET / HTTP/1.1\r\n'; $header .= 'Host: '.$url['host'].$url['path']; if (isset($url['query'])) $header .= '?'.$url['query']; $header .= '\r\n'; $header .= 'Connection: Close\r\n\r\n'; // sending the request to the server echo "Header is: ".str_replace('\n', '\n', $header).""; $length = strlen($header); if($length != fwrite($fp, $header, $length)) { echo 'error writing to header, exiting'; return; } // $bHeader is set to true while we receive the HTTP header // and after the empty line (end of HTTP header) it's set to false. $bHeader = true; // continuing untill there's no more text to read from the socket while (!feof($fp)) { echo "in loop"; // reading a line of text from the socket // not more than 8192 symbols. $good = $strLine = fgets($fp, 128); if(!$good) { echo 'bad'; return; } // removing trailing \n and \r characters. $strLine = ereg_replace('[\r\n]', '', $strLine); if ($bHeader == false) $this-strFile .= $strLine.'\n'; else $this-aHeaderLines[] = trim($strLine); if (strlen($strLine) == 0) $bHeader = false; echo "read: $strLine"; return; } echo "after loop"; fclose ($fp); } This is all I get: Header is: GET / HTTP/1.1\r\n Host: www.google.com/\r\n Connection: Close\r\n\r\n in loopbad So it fails the fgets($fp, 128);

    Read the article

  • PHP Sockets Errors (connection refused and No such file or directory)

    - by Purefan
    Hello all, I am writing a server app (broadcaster) and a client (relayer). Several relayers can connect to the broadcaster at the same time, send information and the broadcaster will redirect the message to a matching relayer (for example relayer1 sends to broadcaster who sends to relayer43, relayer2 - broadcaster - relayer73...) The server part is working as I have tested it with a telnet client and although its at this point only an echo server it works. Both relayer and broadcaster sit on the same server so I am using AF_UNIX sockets, both files are in different folders though. I have tried two approaches for the relayer and both have failed, the first one is using socket_create: public function __construct() { // where is the socket server? $this->_sHost = 'tcp://127.0.0.1'; $this->_iPort = 11225; // open a client connection $this->_hSocket = socket_create(AF_UNIX, SOCK_STREAM, 0); echo 'Attempting to connect to '.$this->_sHost.' on port '.$this->_iPort .'...'; $result = socket_connect($this->_hSocket, $this->_sHost, $this->_iPort); if ($result === false) { echo "socket_connect() failed.\nReason: ($result) " . socket_strerror(socket_last_error($this->_hSocket)) . "\n"; } else { echo "OK.\n"; } This returns "Warning: socket_connect(): unable to connect [2]: No such file or directory in relayer.class.php on line 27" and (its running from command line) it often also returns a segmentation fault. The second approach is using pfsockopen: public function __construct() { // where is the socket server? $this->_sHost = 'tcp://127.0.0.1'; $this->_iPort = 11225; // open a client connection $fp = pfsockopen ($this->_sHost, $this->_iPort, $errno, $errstr); if (!$fp) { $result = "Error: could not open socket connection"; } else { // get the welcome message fgets ($fp, 1024); // write the user string to the socket fputs ($fp, 'Message ' . __LINE__); // get the result $result .= fgets ($fp, 1024); // close the connection fputs ($fp, "END"); fclose ($fp); // trim the result and remove the starting ? $result = trim($result); $result = substr($result, 2); // now print it to the browser } which only returns the error "Warning: pfsockopen(): unable to connect to tcp://127.0.0.1:11225 (Connection refused) in relayer.class.php on line 33 " In all tests I have tried with different host names, 127.0.0.1, localhost, tcp://127.0.0.1, 192.168.0.199, tcp://192.168.0.199, none of it has worked. Any ideas on this?

    Read the article

  • (PHP) 1)How to genrate Secreate key on User & Client Side ? 3) How to Compare Server side MD5 and Client side Md5 ?

    - by user557994
    /* In Below Code .. My problem is that 1) How to genrate Secreate key on User Side ? 2) How to genrate Secreate key on Client Side ? 3) How to Compare Server side MD5 and Client side Md5 ? Can you solve my problem ? */ $gid = $_GET['id']; if($gid=="") { $filename = "counter.txt"; $fp = fopen( $filename, "r" ) or die("Couldn't Generate Whiteboard"); while ( ! feof( $fp ) ) { $countfile = fgets( $fp); $countfile++; } fclose( $fp ); $fp = fopen( $filename, "w" ) or die("Couldn't generate whiteboard"); fwrite( $fp, $countfile ); fclose( $fp ); $doc = new DOMDocument('1.0', 'UTF-8'); $ele = $doc-createElement( 'root' ); $ele-nodeValue = $uvar; $doc-appendChild( $ele ); $test = $doc-save("$countfile.xml"); genkey($id); echo ""; $uvar=$_POST['msgval']; exit; } else { if($uvar == "") { $xdoc = new DOMDocument( '1.0', 'UTF-8' ); $xdoc-Load("$gid.xml"); $candidate = $xdoc-getElementsByTagName('root')-item(0); $newElement = $xdoc -createElement('root'); $txtNode = $xdoc -createTextNode ($root); $newElement - appendChild($txtNode); $candidate - appendChild($newElement); $msg = $candidate-nodeValue; } } function genkey($id) { $encrypt_key = "GJHsahakst1468464a"; $key = MD5("$id","$$encrypt_key"); return $key; } ? function sendRequest() { var uvar = document.getElementById('txtHint').value; var xmlhttp = new XMLHttpRequest(); xmlhttp.onreadystatechange = function() { if(xmlhttp.readyState == 4 && xmlhttp.status==200) { document.getElementById('txtHint').value = ""; } } xmlhttp.open("POST","post.php?id=",true); xmlhttp.setRequestHeader("Content-type","application/x-www-form-urlencoded"); xmlhttp.send("umsg="+uvar); return; } Msg " /

    Read the article

  • New Demos SOA Suite (11.1.1.6) & SOA Suite Foundation Pack (11.1.1.6)

    - by JuergenKress
    For access to the Oracle demo systems please visit OPN and talk to your Partner Expert GSE: SOA & FP (11.1.1.6) Platforms Portable Version – Available SOA 11g Platform FP 11g Platform All SOA/BPM 11g Solutions OFM Demos Corner GSE Offerings Scheduling Demos on GSE Support GSE is pleased to announce the availability of SOA and Foundation Pack 11g (11.1.1.6) Platform Portable images. Portable images now come as a VBox appliance. SOA 11.1.1.6 Platform Portable Version This portable image comes with latest SOA Suite products installed and configured. Vbox appliance facilitates easy maintenance of the image. Click here to download the portable image. FP 11.1.1.6 Platform Portable Version Foundation Pack installed and configured on SOA image and stands as a base for building cross-application integrations. Click here to download the portable image. In addition to Portable images, Global Sales Engineering would like to inform availability of Hosted version of SOA & BPM 11g (11.1.1.6) Solutions. Click here for more information. SOA Suite Foundation Pack Demo Demo Overview Business Process Artifacts Demo Architecture Bill of Materials Demo Collateral DSS Offerings OFM Demos Corner Scheduling Demos on DSS DSS Support The Foundation Pack(FP) demo showcases various tools and utilities of Foundation Pack like Project Lifecycle Workbench(PLW) JDeveloper - Service Constructor Harvesting services to PLW/ Oracle Enterprise Repository Generation of Bill of Materials (BOM) Creation of Deployment Plans / Harvestor Settings Track Foundation Pack Fusion Order demo flow in Enterprise Manager Console For more information on the demo click here. SOA & BPM Partner Community For regular information on Oracle SOA Suite become a member in the SOA & BPM Partner Community for registration please visit  www.oracle.com/goto/emea/soa (OPN account required) If you need support with your account please contact the Oracle Partner Business Center. Blog Twitter LinkedIn Mix Forum Technorati Tags: SOA DEmo System,DSS,SOA,sales,SOA Community,Oracle SOA,Oracle BPM,Community,OPN,Jürgen Kress

    Read the article

  • Floating point undesireable in highly critical code?

    - by Kirt Undercoffer
    Question 11 in the Software Quality section of "IEEE Computer Society Real-World Software Engineering Problems", Naveda, Seidman, lists fp computation as undesirable because "the accuracy of the computations cannot be guaranteed". This is in the context of computing acceleration for an emergency braking system for a high speed train. This thinking seems to be invoking possible errors in small differences between measurements of a moving object but small differences at slow speeds aren't a problem (or shouldn't be), small differences between two measurements at high speed are irrelevant - can there be a problem with small roundoff errors during deceleration for an emergency braking system? This problem has been observed with airplane braking systems resulting in hydroplaning but could this actually happen in the context of a high speed train? The concern about fp errors seems to not be well-founded in this context. Any insight? The fp is used for acceleration so perhaps the concern is inching over a speed limit? But fp should be just fine if they use a double in whatever implementation language. The actual problem in the text states: During the inspection of the code for the emergency braking system of a new high speed train (a highly critical, real-time application), the review team identifies several characteristics of the code. Which of these characteristics are generally viewed as undesirable? The code contains three recursive functions (well that one is obvious). The computation of acceleration uses floating point arithmetic. All other computations use integer arithmetic. The code contains one linked list that uses dynamic memory allocation (second obvious problem). All inputs are checked to determine that they are within expected bounds before they are used.

    Read the article

  • Parsing mathematical experssions with two values that have parenthesis and minus signs

    - by user45921
    I'm trying to parse equations like these which only has two values or the square root of a certain value from a text file: 100+100 -100-100 -(100)+(-100) sqrt(100) by the minues signs, parenthesis and the operator symbol in the middle and the square root, and I have no idea how to start off... I've got the file part done and the simple calculation parts except that I couldnt get my program to solve the equations in the above. #include <stdio.h> #include <string.h> #include <stdlib.h> #include <math.h> main(){ FILE *fp; char buff[255], sym,sym2,del1,del2,del3,del4; double num1, num2; int ret; fp = fopen("input.txt","r"); while(fgets(buff,sizeof(buff),fp)!=NULL){ char *tok = buff; sscanf(tok,"%lf%c%lf",&num1,&sym,&num2); switch(sym){ case '+': printf("%lf\n", num1+num2); break; case '-': printf("%lf\n", num1-num2); break; case '*': printf("%lf\n", num1*num2); break; case '/': printf("%lf\n", num1/num2); break; default: printf("The input value is not correct\n"); break; } } fclose(fp); } that is what have I written for the other basic operations without parenthesis and the minus sign for the second value and it works great for the simple ones. I'm using a switch method to calculate the add, sub, mul and divide but I'm not sure how to properly use the sscanf function (if I am not using it properly) or if there is another way using a function like strtok to properly parse the parenthesis and the minus signs. Any kind help?

    Read the article

  • Floating point undesirable in highly critical code?

    - by Kirt Undercoffer
    Question 11 in the Software Quality section of "IEEE Computer Society Real-World Software Engineering Problems", Naveda, Seidman, lists fp computation as undesirable because "the accuracy of the computations cannot be guaranteed". This is in the context of computing acceleration for an emergency braking system for a high speed train. This thinking seems to be invoking possible errors in small differences between measurements of a moving object but small differences at slow speeds aren't a problem (or shouldn't be), small differences between two measurements at high speed are irrelevant - can there be a problem with small roundoff errors during deceleration for an emergency braking system? This problem has been observed with airplane braking systems resulting in hydroplaning but could this actually happen in the context of a high speed train? The concern about fp errors seems to not be well-founded in this context. Any insight? The fp is used for acceleration so perhaps the concern is inching over a speed limit? But fp should be just fine if they use a double in whatever implementation language. The actual problem in the text states: During the inspection of the code for the emergency braking system of a new high speed train (a highly critical, real-time application), the review team identifies several characteristics of the code. Which of these characteristics are generally viewed as undesirable? The code contains three recursive functions (well that one is obvious). The computation of acceleration uses floating point arithmetic. All other computations use integer arithmetic. The code contains one linked list that uses dynamic memory allocation (second obvious problem). All inputs are checked to determine that they are within expected bounds before they are used.

    Read the article

  • Setting Boot and Mirror Disks correctly at the Solaris OBP

    - by Shaun Dewberry
    I am recovering a domain that was lost due to power outage on an Sun Fire E25K server. I know how to set the appropriate parameters at the openboot prompt using nvalias/devalias, boot etc. However, I do not understand how one gets from the output of show-disks {1a0} ok show-disks a) /pci@1dd,600000/SUNW,qlc@1/fp@0,0/disk b) /pci@1dd,700000/SUNW,qlc@1/fp@0,0/disk c) /pci@1dc,700000/pci@1/pci@1/scsi@2,1/disk d) /pci@1dc,700000/pci@1/pci@1/scsi@2/disk e) /pci@1bd,600000/SUNW,qlc@1/fp@0,0/disk f) /pci@1bd,700000/SUNW,qlc@1/fp@0,0/disk g) /pci@1bc,700000/pci@1/pci@1/scsi@2,1/disk h) /pci@1bc,700000/pci@1/pci@1/scsi@2/disk q) NO SELECTION Enter Selection, q to quit: to the correct full disk path. I know it is basically one of the pci/scsi paths listed above, but in all instruction or examples a string of additional characters is appended to the path to specify Targets and Units but the explanation of the path construction is never given. Could someone please explain how to construct this disk path correctly?

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >