Hi.my itunes appear this error ERROE CODE:1009 please help me
hi.my itunes appear this error ERROE CODE:1009 please help me
Read my post. I don't know if you're having the same problem but I hope this helps. http://discussions.apple.com/thread.jspa?threadID=1351705&tstart=0
Message was edited by: Happyfish
Similar Messages
-
I can't download Lightroom for some reason. I keep getting this error:
Exit Code: 7
Please see specific errors below for troubleshooting. For example, ERROR: DW006 ...
-------------------------------------- Summary --------------------------------------
- 0 fatal error(s), 2 error(s)
----------- Payload: Adobe Photoshop Lightroom 5 5.4.0.0 Adobe Photoshop Lightroom 5.pkg_5.4 -----------
ERROR: DW006: Apple Package failed to install successfully.
ERROR: Third party payload installer Adobe Photoshop Lightroom 5.pkg failed with exit code: 1Link for Download & Install & Setup & Activation problems may help
-Chat http://www.adobe.com/support/download-install/supportinfo/ -
I receive this message ,repeatedly,when I try to update an App through App store:Error code 1009.Please help,what should I do?
The App Store is not available in Iran.
-
Somebody help me?
Hello, I solved my problem. Don't change the extraction path and keep the default path. My log message was Source Path not found.
-
Error in code..please help
Hi,
I'm writing a SIP messaging klient and i am having problem with connecting the client to my SIP-server (OpenSER)
javax.sip.InvalidArgumentException: 300:[email protected]: 300:[email protected]
at gov.nist.javax.sip.SipStackImpl.createListeningPoint(SipStackImpl.java:645)
at sipTrade.createProvider(sip.java:274)
at sipTrade.main(sip.java:299)
Caused by: java.net.UnknownHostException: 300:[email protected]: 300:[email protected]
at java.net.InetAddress.getAllByName0(Unknown Source)
at java.net.InetAddress.getAllByName0(Unknown Source)
at java.net.InetAddress.getAllByName(Unknown Source)
at java.net.InetAddress.getByName(Unknown Source)
at gov.nist.javax.sip.SipStackImpl.createListeningPoint(SipStackImpl.java:625)
... 2 more
import java.io.*;
import javax.sip.*;
import javax.sip.address.*;
import javax.sip.header.*;
import javax.sip.message.*;
import java.util.*;
public class sip implements SipListener {
private static AddressFactory addressFactory;
private static MessageFactory messageFactory;
private static HeaderFactory headerFactory;
private static SipStack sipStack;
private int port;
protected SipProvider udpProvider;
protected Dialog dialog;
protected int notifyCount = 0;
protected final String serverIP = "300:[email protected]";
class MyEventSource implements Runnable {
private sipTrade st;
private EventHeader eventHeader;
public MyEventSource(sipTrade notifier, EventHeader eventHeader ) {
this.st = notifier;
this.eventHeader = eventHeader;
public void run() {
try {
for (int i = 0; i < 100; i++) {
Thread.sleep(100);
Request request = this.st.dialog.createRequest(Request.NOTIFY);
SubscriptionStateHeader subscriptionState = headerFactory.createSubscriptionStateHeader(SubscriptionStateHeader.ACTIVE);
request.addHeader(subscriptionState);
request.addHeader(eventHeader);
// Lets mark our Contact
((SipURI)dialog.getLocalParty().getURI()).setParameter("id","not2");
ClientTransaction ct = udpProvider.getNewClientTransaction(request);
System.out.println("NOTIFY Branch ID "+((ViaHeader)request.getHeader(ViaHeader.NAME)).getParameter("branch"));
this.st.dialog.sendRequest(ct);
System.out.println("Dialog " + dialog);
System.out.println("Dialog state after active NOTIFY: " + dialog.getState());
synchronized (sipTrade.this) {
notifyCount ++;
} catch (Throwable e) {
e.printStackTrace();
private static void usage() {
System.exit(0);
public void processRequest(RequestEvent requestEvent) {
Request request = requestEvent.getRequest();
ServerTransaction serverTransactionId = requestEvent.getServerTransaction();
System.out.println("\n\nRequest " + request.getMethod()+" received at " + sipStack.getStackName()+" with server transaction id " + serverTransactionId+" and dialog id "+requestEvent.getDialog());
if (request.getMethod().equals(Request.SUBSCRIBE)) {
processSubscribe(requestEvent, serverTransactionId);
* Process the invite request.
public void processSubscribe(RequestEvent requestEvent,
ServerTransaction serverTransaction) {
SipProvider sipProvider = (SipProvider) requestEvent.getSource();
Request request = requestEvent.getRequest();
try {
System.out.println("notifier: got an Subscribe sending OK");
System.out.println("notifier: " + request);
System.out.println("notifier : dialog = " + requestEvent.getDialog());
EventHeader eventHeader = (EventHeader) request.getHeader(EventHeader.NAME);
if ( eventHeader == null) {
System.out.println("Cannot find event header.... dropping request.");
return;
// Always create a ServerTransaction, best as early as possible in the code
Response response = null;
ServerTransaction st = requestEvent.getServerTransaction();
if (st == null) {
st = sipProvider.getNewServerTransaction(request);
// Check if it is an initial SUBSCRIBE or a refresh / unsubscribe
boolean isInitial = requestEvent.getDialog() == null;
if ( isInitial ) {
// need random tags to test forking
String toTag = Integer.toHexString( (int) (Math.random() * Integer.MAX_VALUE) );
response = messageFactory.createResponse(202, request);
ToHeader toHeader = (ToHeader) response.getHeader(ToHeader.NAME);
// Sanity check: to header should not ahve a tag. Else the dialog
// should have matched
if (toHeader.getTag()!=null) {
System.err.println( "####ERROR: To-tag!=null but no dialog match! My dialog=" + dialog.getState() );
toHeader.setTag(toTag); // Application is supposed to set.
this.dialog = st.getDialog();
// subscribe dialogs do not terminate on bye.
this.dialog.terminateOnBye(false);
if (dialog != null) {
System.out.println("Dialog " + dialog);
System.out.println("Dialog state " + dialog.getState());
} else {
response = messageFactory.createResponse(200, request);
// Both 2xx response need a Contact
Address address = addressFactory.createAddress("xTrade <sip:127.0.0.1>");
((SipURI)address.getURI()).setPort( udpProvider.getListeningPoint("udp").getPort() );
ContactHeader contactHeader = headerFactory.createContactHeader(address);
response.addHeader(contactHeader);
// Expires header is mandatory in 2xx responses to SUBSCRIBE
ExpiresHeader expires = (ExpiresHeader) request.getHeader( ExpiresHeader.NAME );
if (expires==null) {
expires = headerFactory.createExpiresHeader(30); // rather short
response.addHeader( expires );
st.sendResponse(response);
* NOTIFY requests MUST contain a "Subscription-State" header with a
* value of "active", "pending", or "terminated". The "active" value
* indicates that the subscription has been accepted and has been
* authorized (in most cases; see section 5.2.). The "pending" value
* indicates that the subscription has been received, but that
* policy information is insufficient to accept or deny the
* subscription at this time. The "terminated" value indicates that
* the subscription is not active.
Request notifyRequest = dialog.createRequest( "NOTIFY" );
// Mark the contact header, to check that the remote contact is updated
((SipURI)contactHeader.getAddress().getURI()).setParameter("id","not");
// Initial state is pending, second time we assume terminated (Expires==0)
SubscriptionStateHeader sstate = headerFactory.createSubscriptionStateHeader(
isInitial ? SubscriptionStateHeader.PENDING : SubscriptionStateHeader.TERMINATED );
// Need a reason for terminated
if ( sstate.getState().equalsIgnoreCase("terminated") ) {
sstate.setReasonCode( "deactivated" );
notifyRequest.addHeader(sstate);
notifyRequest.setHeader(eventHeader);
notifyRequest.setHeader(contactHeader);
// notifyRequest.setHeader(routeHeader);
ClientTransaction ct = udpProvider.getNewClientTransaction(notifyRequest);
// Let the other side know that the tx is pending acceptance
dialog.sendRequest(ct);
System.out.println("NOTIFY Branch ID " +
((ViaHeader)request.getHeader(ViaHeader.NAME)).getParameter("branch"));
System.out.println("Dialog " + dialog);
System.out.println("Dialog state after pending NOTIFY: " + dialog.getState());
if (isInitial) {
Thread myEventSource = new Thread(new MyEventSource(this,eventHeader));
myEventSource.start();
} catch (Throwable ex) {
ex.printStackTrace();
// System.exit(0);
public synchronized void processResponse(ResponseEvent responseReceivedEvent) {
Response response = (Response) responseReceivedEvent.getResponse();
Transaction tid = responseReceivedEvent.getClientTransaction();
if ( response.getStatusCode() != 200 ) {
this.notifyCount --;
} else {
System.out.println("Notify Count = " + this.notifyCount);
public void processTimeout(javax.sip.TimeoutEvent timeoutEvent) {
Transaction transaction;
if (timeoutEvent.isServerTransaction()) {
transaction = timeoutEvent.getServerTransaction();
} else {
transaction = timeoutEvent.getClientTransaction();
System.out.println("state = " + transaction.getState());
System.out.println("dialog = " + transaction.getDialog());
System.out.println("dialogState = "
+ transaction.getDialog().getState());
System.out.println("Transaction Time out");
private static void initFactories ( int port ) throws Exception {
SipFactory sipFactory = SipFactory.getInstance();
sipFactory.setPathName("gov.nist");
Properties properties = new Properties();
properties.setProperty("javax.sip.STACK_NAME", "notifier" + port );
// You need 16 for logging traces. 32 for debug + traces.
// Your code will limp at 32 but it is best for debugging.
properties.setProperty("gov.nist.javax.sip.TRACE_LEVEL", "32");
properties.setProperty("gov.nist.javax.sip.DEBUG_LOG",
"notifierdebug_"+port+".txt");
properties.setProperty("gov.nist.javax.sip.SERVER_LOG",
"notifierlog_"+port+".txt");
try {
// Create SipStack object
sipStack = sipFactory.createSipStack(properties);
System.out.println("sipStack = " + sipStack);
} catch (PeerUnavailableException e) {
// could not find
// gov.nist.jain.protocol.ip.sip.SipStackImpl
// in the classpath
e.printStackTrace();
System.err.println(e.getMessage());
if (e.getCause() != null)
e.getCause().printStackTrace();
System.exit(0);
try {
headerFactory = sipFactory.createHeaderFactory();
addressFactory = sipFactory.createAddressFactory();
messageFactory = sipFactory.createMessageFactory();
} catch (Exception ex) {
ex.printStackTrace();
System.exit(0);
public void createProvider() {
try {
ListeningPoint lp = sipStack.createListeningPoint(this.serverIP, this.port, "udp");
this.udpProvider = sipStack.createSipProvider(lp);
System.out.println("udp provider " + udpProvider);
} catch (Exception ex) {
System.out.println((ex.getMessage()));
ex.printStackTrace();
usage();
public sipTrade( int port ) {
this.port = port;
public sipTrade(){
public static void main(String args[]) throws Exception {
int port = args.length > 0 ? Integer.parseInt(args[0]) : 5060;
initFactories( port );
sipTrade notifier = new sipTrade( port );
notifier.createProvider( );
notifier.udpProvider.addSipListener(notifier);
//sipTrade st = new sipTrade();
//st.Send2xTrade("198202050897", "testdata");
//st.getXTmsg(0);
public void processIOException(IOExceptionEvent exceptionEvent) {
public void processTransactionTerminated(
TransactionTerminatedEvent transactionTerminatedEvent) {
public void processDialogTerminated(
DialogTerminatedEvent dialogTerminatedEvent) {
// TODO Auto-generated method stub
* Xtrade connection - DATA IN
public void Send2xTrade(String data, String info) {
try{
IServer is = ServerFactory.createObject(ip);
is.logOn(clientName_in, SessionType.LogOnRxTx);
is.sendMsg(contract_in,MsgPriority.Def, data.getBytes(), info);
is.logOff();
catch (Exception e){
e.printStackTrace();
System.err.println(e.getMessage());
public void getXTmsg(int xtMsgAck){
IMsg msg; // A single xTrade message
MsgInfo msgInfo = null; // Message information
byte[] theData;
try {
IServer is = ServerFactory.createObject(ip);
is.logOn(clientName_out, SessionType.LogOnRxTx);
msg = is.createNextRxMsg(contract_out);
FileOutputStream myStream = new FileOutputStream("rx" + msg.getHandle() + ".msg"); // Create the stream
msg.getData(myStream);
myStream.close();
if(msgInfo.getAcknowledge() == false){
msg.setReceived();
else if(msgInfo.getAcknowledge() == true && xtMsgAck == 0){
msg.setReceived();
msg.setAck();
else if(msgInfo.getAcknowledge() == true && xtMsgAck == 1){
msg.setReceived();
msg.setNack();
is.logOff();
}catch (XTException e){
catch(Exception e){
}Made som more fixes:
sipStack = gov.nist.javax.sip.SipStackImpl@e24e2a
sipStack = gov.nist.javax.sip.SipStackImpl@e24e2a
SipProviders: java.util.LinkedList$ListItr@1a73d3c
AddressFactory: class gov.nist.javax.sip.address.AddressFactoryImpl
InvalidArgumentException Cannot assign requested address: Cannot bindjavax.sip.InvalidArgumentException: Cannot assign requested address: Cannot bind
at gov.nist.javax.sip.SipStackImpl.createListeningPoint(SipStackImpl.java:645)
at sipClient.createProvider(sipClient.java:267)
at sipClient.main(sipClient.java:302)
Caused by: java.io.IOException: Cannot assign requested address: Cannot bind
at gov.nist.javax.sip.stack.UDPMessageProcessor.<init>(UDPMessageProcessor.java:135)
at gov.nist.javax.sip.stack.SIPTransactionStack.createMessageProcessor(SIPTransactionStack.java:1652)
at gov.nist.javax.sip.SipStackImpl.createListeningPoint(SipStackImpl.java:626)
... 2 more
Exception in thread "main" java.lang.NullPointerException
at sipClient.main(sipClient.java:303)
import java.io.*;
import javax.sip.*;
import javax.sip.address.*;
import javax.sip.header.*;
import javax.sip.message.*;
import java.util.*;
public class sipClient implements SipListener {
private static AddressFactory addressFactory;
private static MessageFactory messageFactory;
private static HeaderFactory headerFactory;
private static Address address;
private static SipStack sipStack;
private int port;
protected SipProvider udpProvider;
protected Dialog dialog;
protected int notifyCount = 0;
public static final int PORT_5060 = 5070;
protected final String serverIP = "192.168.1.99";
class MyEventSource implements Runnable {
private sipClient st;
private EventHeader eventHeader;
public MyEventSource(sipClient notifier, EventHeader eventHeader ) {
this.st = notifier;
this.eventHeader = eventHeader;
public void run() {
try {
for (int i = 0; i < 100; i++) {
Thread.sleep(100);
Request request = this.st.dialog.createRequest(Request.NOTIFY);
SubscriptionStateHeader subscriptionState = headerFactory.createSubscriptionStateHeader(SubscriptionStateHeader.ACTIVE);
request.addHeader(subscriptionState);
request.addHeader(eventHeader);
// Lets mark our Contact
((SipURI)dialog.getLocalParty().getURI()).setParameter("id","not2");
ClientTransaction ct = udpProvider.getNewClientTransaction(request);
System.out.println("NOTIFY Branch ID "+((ViaHeader)request.getHeader(ViaHeader.NAME)).getParameter("branch"));
this.st.dialog.sendRequest(ct);
System.out.println("Dialog " + dialog);
System.out.println("Dialog state after active NOTIFY: " + dialog.getState());
synchronized (sipClient.this) {
notifyCount ++;
} catch (Throwable e) {
e.printStackTrace();
private static void usage() {
System.exit(0);
public void processRequest(RequestEvent requestEvent) {
Request request = requestEvent.getRequest();
ServerTransaction serverTransactionId = requestEvent.getServerTransaction();
System.out.println("\n\nRequest " + request.getMethod()+" received at " + sipStack.getStackName()+" with server transaction id " + serverTransactionId+" and dialog id "+requestEvent.getDialog());
if (request.getMethod().equals(Request.SUBSCRIBE)) {
processSubscribe(requestEvent, serverTransactionId);
* Process the invite request.
public void processSubscribe(RequestEvent requestEvent,
ServerTransaction serverTransaction) {
SipProvider sipProvider = (SipProvider) requestEvent.getSource();
Request request = requestEvent.getRequest();
try {
System.out.println("notifier: got an Subscribe sending OK");
System.out.println("notifier: " + request);
System.out.println("notifier : dialog = " + requestEvent.getDialog());
EventHeader eventHeader = (EventHeader) request.getHeader(EventHeader.NAME);
if ( eventHeader == null) {
System.out.println("Cannot find event header.... dropping request.");
return;
// Always create a ServerTransaction, best as early as possible in the code
Response response = null;
ServerTransaction st = requestEvent.getServerTransaction();
if (st == null) {
st = sipProvider.getNewServerTransaction(request);
// Check if it is an initial SUBSCRIBE or a refresh / unsubscribe
boolean isInitial = requestEvent.getDialog() == null;
if ( isInitial ) {
// need random tags to test forking
String toTag = Integer.toHexString( (int) (Math.random() * Integer.MAX_VALUE) );
response = messageFactory.createResponse(202, request);
ToHeader toHeader = (ToHeader) response.getHeader(ToHeader.NAME);
// Sanity check: to header should not ahve a tag. Else the dialog
// should have matched
if (toHeader.getTag()!=null) {
System.err.println( "####ERROR: To-tag!=null but no dialog match! My dialog=" + dialog.getState() );
toHeader.setTag(toTag); // Application is supposed to set.
this.dialog = st.getDialog();
// subscribe dialogs do not terminate on bye.
this.dialog.terminateOnBye(false);
if (dialog != null) {
System.out.println("Dialog " + dialog);
System.out.println("Dialog state " + dialog.getState());
} else {
response = messageFactory.createResponse(200, request);
// Both 2xx response need a Contact
address = addressFactory.createAddress("xTrade <sip:192.168.1.99>");
((SipURI)address.getURI()).setPort( udpProvider.getListeningPoint("udp").getPort() );
ContactHeader contactHeader = headerFactory.createContactHeader(address);
response.addHeader(contactHeader);
// Expires header is mandatory in 2xx responses to SUBSCRIBE
ExpiresHeader expires = (ExpiresHeader) request.getHeader( ExpiresHeader.NAME );
if (expires==null) {
expires = headerFactory.createExpiresHeader(30); // rather short
response.addHeader( expires );
st.sendResponse(response);
* NOTIFY requests MUST contain a "Subscription-State" header with a
* value of "active", "pending", or "terminated". The "active" value
* indicates that the subscription has been accepted and has been
* authorized (in most cases; see section 5.2.). The "pending" value
* indicates that the subscription has been received, but that
* policy information is insufficient to accept or deny the
* subscription at this time. The "terminated" value indicates that
* the subscription is not active.
Request notifyRequest = dialog.createRequest( "NOTIFY" );
// Mark the contact header, to check that the remote contact is updated
((SipURI)contactHeader.getAddress().getURI()).setParameter("id","not");
// Initial state is pending, second time we assume terminated (Expires==0)
SubscriptionStateHeader sstate = headerFactory.createSubscriptionStateHeader(
isInitial ? SubscriptionStateHeader.PENDING : SubscriptionStateHeader.TERMINATED );
// Need a reason for terminated
if ( sstate.getState().equalsIgnoreCase("terminated") ) {
sstate.setReasonCode( "deactivated" );
notifyRequest.addHeader(sstate);
notifyRequest.setHeader(eventHeader);
notifyRequest.setHeader(contactHeader);
// notifyRequest.setHeader(routeHeader);
ClientTransaction ct = udpProvider.getNewClientTransaction(notifyRequest);
// Let the other side know that the tx is pending acceptance
dialog.sendRequest(ct);
System.out.println("NOTIFY Branch ID " +
((ViaHeader)request.getHeader(ViaHeader.NAME)).getParameter("branch"));
System.out.println("Dialog " + dialog);
System.out.println("Dialog state after pending NOTIFY: " + dialog.getState());
if (isInitial) {
Thread myEventSource = new Thread(new MyEventSource(this,eventHeader));
myEventSource.start();
} catch (Throwable ex) {
ex.printStackTrace();
// System.exit(0);
public synchronized void processResponse(ResponseEvent responseReceivedEvent) {
Response response = (Response) responseReceivedEvent.getResponse();
Transaction tid = responseReceivedEvent.getClientTransaction();
if ( response.getStatusCode() != 200 ) {
this.notifyCount --;
} else {
System.out.println("Notify Count = " + this.notifyCount);
public void processTimeout(javax.sip.TimeoutEvent timeoutEvent) {
Transaction transaction;
if (timeoutEvent.isServerTransaction()) {
transaction = timeoutEvent.getServerTransaction();
} else {
transaction = timeoutEvent.getClientTransaction();
System.out.println("state = " + transaction.getState());
System.out.println("dialog = " + transaction.getDialog());
System.out.println("dialogState = "
+ transaction.getDialog().getState());
System.out.println("Transaction Time out");
private static void initFactories ( int port ) throws Exception {
SipFactory sipFactory = SipFactory.getInstance();
sipFactory.setPathName("gov.nist");
Properties properties = new Properties();
properties.setProperty("javax.sip.STACK_NAME", "notifier" + port );
// You need 16 for logging traces. 32 for debug + traces.
// Your code will limp at 32 but it is best for debugging.
properties.setProperty("gov.nist.javax.sip.TRACE_LEVEL", "32");
properties.setProperty("gov.nist.javax.sip.DEBUG_LOG","Xtradedebug_"+port+".txt");
properties.setProperty("gov.nist.javax.sip.SERVER_LOG","Xtradelog_"+port+".txt");
properties.setProperty("javax.sip.OUTBOUND_PROXY","192.168.1.99:5070/UDP");
properties.setProperty("javax.sip.USE_ROUTER_FOR_ALL_URIS", "true");
properties.setProperty("javax.sip.AUTOMATIC_DIALOG_SUPPORT","ON");
try {
// Create SipStack object
sipStack = sipFactory.createSipStack(properties);
System.out.println("sipStack = " + sipStack);
} catch (PeerUnavailableException e) {
// could not find
// gov.nist.jain.protocol.ip.sip.SipStackImpl
// in the classpath
e.printStackTrace();
System.err.println(e.getMessage());
if (e.getCause() != null)
e.getCause().printStackTrace();
System.exit(0);
try {
headerFactory = sipFactory.createHeaderFactory();
addressFactory = sipFactory.createAddressFactory();
messageFactory = sipFactory.createMessageFactory();
} catch (Exception ex) {
ex.printStackTrace();
System.exit(0);
public void createProvider() {
try {
System.out.println("sipStack = " + sipStack);
System.out.println("SipProviders: "+sipStack.getSipProviders().toString());
System.out.println("AddressFactory: "+addressFactory.getClass());
ListeningPoint lp = sipStack.createListeningPoint(this.serverIP, 5070, ListeningPoint.UDP);
this.udpProvider = sipStack.createSipProvider(lp);
System.out.println("udp provider " + udpProvider);
}catch(SipException e){
System.out.print("SipException "+e.getMessage());
e.printStackTrace();
/*catch(TransportNotSupportedException e){
System.out.print("TransportNotSupportedException "+e.getMessage());
catch (InvalidArgumentException e){
System.out.print("InvalidArgumentException "+e.getMessage());
e.printStackTrace();
catch (Exception ex) {
System.err.println((ex.getMessage()));
ex.printStackTrace();
usage();
public sipClient( int port ) {
this.port = port;
public sipClient(){
public static void main(String args[]) throws Exception {
int port = args.length > 0 ? Integer.parseInt(args[0]) : 5070;
initFactories( port );
sipClient st = new sipClient( port );
st.createProvider();
st.udpProvider.addSipListener(st);
public void processIOException(IOExceptionEvent exceptionEvent) {
public void processTransactionTerminated(
TransactionTerminatedEvent transactionTerminatedEvent) {
public void processDialogTerminated(
DialogTerminatedEvent dialogTerminatedEvent) {
// TODO Auto-generated method stub
} -
Error in code: Urgent, Please help, thanks alot
I'm getting two errors with the following code. The code is supposed to read in a text file with the format
11
blue casual
green athletic
red athletic
The first number represents the numbers of socks. The code is supposed to ouput the number of pairs, so if there were 2 red athletic , it would say
1 matching pair
1 pair of red athletic
If possible can someone run my code to see if they can get it to output that, I'm having a hard time doing it.
here is the code
import java.io.*;
public class Socks {
public static void main(String args[])
try
String socks[1000];
int pairs[500];
int numOfsocks;
int i;
int j;
FileReader fr = new FileReader("test.txt");
BufferedReader inFile = new BufferedReader(fr);
numOfsocks = Integer.parseInt(inFile.readLine());
int possiblePairs = numOfsocks/2;
for(i = 0; i < numOfsocks; i++)
socks[i] = inFile.readLine();
for(i = 0; i <= possiblePairs;i++)
for(j = i; j<=possiblePairs;j++)
if (socks.equalsIgnoreCase(socks[j]))
pairs[i] = i++;
for(i = 0; i <= possiblePairs;i++);
if(pairs[i] >= 2)
System.out.println(pairs[i]/2 + " pairs" + socks[i]);
inFile.close();
catch(IOException e){}
System.out.println("File Not Found or no File Specified");
--------------------Configuration: Socks - JDK version 1.3.1_04 <Default>--------------------
C:\Socks\Socks.java:13: ']' expected
String socks[1000];
^
C:\Socks\Socks.java:14: ']' expected
int pairs[500];
^
2 errorsconsider the following
not for copying
but for studying working code
to help clarify ideas
import java.io.*;
list items and count of each item
in a list of socks
file has list of socks ...
4
red sock
green sock
blue sock
green sock
the first line is n = count of socks
if no socks match, there are n items
for example : 3 items in ...
3
red sock
blue sock
green sock
if all socks match there is one item
for example : 1 item in ...
3
red sock
red sock
red sock
if socks come in pairs, there are at most n/2 items
for example : 2 items in ...
4
red sock
green sock
red sock
green sock
program does not assume that socks come in pairs !!
public class Socks {
public static void main(String args[]) throws IOException
String[] socks = new String[1000];
int numOfsocks;
String[] item = new String[1000];
int[] count = new int[1000]; // initializes each count to zero
int totalcount = 0;
int i;
int j;
boolean ifound;
FileReader fr = new FileReader("test.txt");
BufferedReader inFile = new BufferedReader(fr);
numOfsocks = Integer.parseInt(inFile.readLine());
for (i = 0; i < numOfsocks; i++)
socks[ i ] = inFile.readLine();
inFile.close();
for (i = 0; i < numOfsocks; i++) {
ifound = false;
for (j = 0; j < totalcount; j++) {
if (socks[ i ].equalsIgnoreCase(item[j])) {
ifound = true;
count[j]++; // increase count for matched item
break; // exit "for j loop"
} // for j
// sock not found so add it to item list ...
if (ifound == false) {
item[totalcount] = socks[ i ];
count[totalcount] = 1;
totalcount++;
} // for i
for (i = 0; i < totalcount; i++)
System.out.println (item[ i ] + ", count = " + count[ i ]);
} // class -
Problem signature:
Problem Event Name: BEX
Application Name: firefox.exe
Application Version: 33.0.0.5397
Application Timestamp: 54392479
Fault Module Name: nsib.dll
Fault Module Version: 5.1.3.2
Fault Module Timestamp: 53fdad24
Exception Offset: 001360a0
Exception Code: c0000005
Exception Data: 00000008
OS Version: 6.1.7600.2.0.0.256.1
Locale ID: 1033
Additional Information 1: 13a8
Additional Information 2: 13a84480b0d9c766a5e4c95aa1171a8d
Additional Information 3: 13a8
Additional Information 4: 13a84480b0d9c766a5e4c95aa1171a8dDo a malware check with several malware scanning programs on the Windows computer.
Please scan with all programs because each program detects different malware.
All these programs have free versions.
Make sure that you update each program to get the latest version of their databases before doing a scan.
*Malwarebytes' Anti-Malware:<br>http://www.malwarebytes.org/mbam.php
*AdwCleaner:<br>http://www.bleepingcomputer.com/download/adwcleaner/<br>http://www.softpedia.com/get/Antivirus/Removal-Tools/AdwCleaner.shtml
*SuperAntispyware:<br>http://www.superantispyware.com/
*Microsoft Safety Scanner:<br>http://www.microsoft.com/security/scanner/en-us/default.aspx
*Windows Defender:<br>http://windows.microsoft.com/en-us/windows/using-defender
*Spybot Search & Destroy:<br>http://www.safer-networking.org/en/index.html
*Kasperky Free Security Scan:<br>http://www.kaspersky.com/security-scan
You can also do a check for a rootkit infection with TDSSKiller.
*Anti-rootkit utility TDSSKiller:<br>http://support.kaspersky.com/5350?el=88446
See also:
*"Spyware on Windows": http://kb.mozillazine.org/Popups_not_blocked
*https://support.mozilla.org/kb/troubleshoot-firefox-issues-caused-malware -
When i try to open itunes its showing error 7 code 193
when i try to open itunes its showing error 7 code 193. it wont let me open it at all. i dont want to lose my music. i did the repair option already and it did not work.
That article has been withdrawn.
For general advice see Troubleshooting issues with iTunes for Windows updates.
The steps in the second box are a guide to removing everything related to iTunes and then rebuilding it which is often a good starting point unless the symptoms indicate a more specific approach. Review the other boxes and the list of support documents further down the page in case one of them applies.
Your library should be unaffected by these steps but there is backup and recovery advice elsewhere in the user tip.
If the advice above doesn't resolve things you could try this alternate version:
iTunes 12.1.0.71 for Windows (64-bit - for older video cards) - itunes64setup.exe (2015-01-28)
which is a 64-bit installer for the 32-bit version of the core application, similar to previous 64-bit releases.
Or roll back to the previous build:
iTunes 12.0.1.26 for Windows (32-bit) - iTunesSetup.exe (2014-10-16)
iTunes 12.0.1.26 for Windows (64-bit) - iTunes64Setup.exe (2014-10-16)
tt2 -
I have been having this problem since the 4th of this month. I tried to open iTunes and this error message came up: "iTunes was not installed correctly. Please reinstall iTunes error 7 windows error 126". There is nothing else that comes up but if anyone can help or know anything about it I will greatly appreciate it.
Have you tried google for this Error Message...
http://support.microsoft.com/kb/959077 -
I updated my itunes but this error message keeps popping up, what should i do?
i updated my itunes but this error message keeps popping up, what should i do?
SUPERNOVA_rico wrote:
i updated my itunes but this error message keeps popping up, what should i do?
What is the Error Message...? -
This product can not proceed with the activation process, service errors go I want you entered will appear this error
I am a Korean.
Failed to resolve service center in South Korea
Please e-mail response
iPad2 32GB Cellular Version
<Email Edited by Host>I'm same. Any Update or News?
Message was edited by: koreasaram -
Cannot restore my brand new iphone 4s ,got stuck in DFU mode and itunes shows error code (-1) please help?
repeatedly tried from diffierent computers and the same error code pops up (error -1)That's a hardware problem which will require a trip to the Apple store for evaluation, unless your phone has been jailbroken, then it's a corrupt hosts file (and we can't help you with that here as it is against the forum's terms of use).
-
I cannot restore my Iphone 4, I keep getting the error code 1611, please help and the Iphone keeps displaying the "Plug-In Itunes Symbol!??
http://tinyurl.com/nyj36v
-
windows thinks my itouch is a camera and itunes says this ipod can't be used because the software isn't installed - reinstall itunes. i've done that and continue to get the same error. can someone please help?
(apologies for barging in, lllass.)
Let's try a standalone Apple Mobile Device Support install. It still might not install, but fingers crossed any error messages will give us a better idea of the underlying cause of why it's not installing under normal conditions.
Download and save a copy of the iTunesSetup.exe (or iTunes64setup.exe) installer file to your hard drive:
http://www.apple.com/itunes/download/
Download and install the free trial version of WinRAR:
http://www.rarlab.com/download.htm
Right-click the iTunesSetup.exe (or iTunes64setup.exe), and select "Extract to iTunesSetup" (or "Extract to iTunes64Setup"). WinRAR will expand the contents of the file into a folder called "iTunesSetup" (or "iTunes64Setup").
Go into the folder and doubleclick the AppleMobileDeviceSupport.msi (or AppleMobileDeviceSupport64.msi) to do a standalone AMDS install.
(If it offers you the choice to remove or repair, choose "Remove", and if the uninstall goes through successfully, see if you can reinstall by doubleclicking the AppleMobileDeviceSupport.msi again.)
Does it install (or uninstall and then reinstall) properly for you? If so, does your device connect without that message now? -
Network location appear this error:"file not found".
Hi guys, we change the location of files for ours user to network location, so when we try to open any illustrator file in network location appear this error:"file not found". this error only with network file! how can we solve this problem
cbessa,
External media: It is always recommended here to open/save from/to own hard disk, and to copy from/to networks and removable media. You may be lucky (for a while), but the chances of file corruption and other unpleasantnesses are immensely greater when you use anything but the harddisk, and it is better to be safe than sorry.
In addition to the (far greater) risk of file corruption, some issues are mentioned here:
http://helpx.adobe.com/illustrator/kb/illustrator-support-networks-removable-media.html
If you transfer by external means it is always safest to zip/compress the file to avoid corruption.
Maybe you are looking for
-
Can i transfer itunes purchase from one of my accounts to another of my accounts?
can i transfer itunes purchases from one of my accounts to another of my accounts?
-
Can a form be filled/saved by multiple Reader users?
I've created a fillable form using Acrobat 9 and enabled Form fill in and save in Adobe Reader. Reader User 1 fills in the form partially, saves and forwards to Reader User 2 to complete. Reader User 2 then cannot save the form with the form data. Is
-
BONE TOOL ***HELP*** PLEASE!
Okay so I have spent countless hours trying to figure this out. I want to use the bone tool to make a leg animation. First I create a new symbol called Leg. I double click the Leg in the library which opens it in leg window. Then I grab the circle to
-
IN comparator in preparted statement
Hello, I'm trying to convert a SQL query to a prepared statement, but I seems it's not working correctly I've this SQL string as resource FileFormat.GET_BY_ID_LIST=SELECT * FROM files_formats_list WHERE id in (?) ORDER BY nameand in the code I add a
-
Accessing individual photos through Harddrive window - Can only see library
When I open my HD and click on Pictures, it lists my IPhoto Library and when I click on it, it just automatically opens IPhoto and displays them. Is there a way to change this so I see the photo titles, etc. I want to be able to upload individual pho