I get this error when trying to take an integer and prepend "b" to it, converting it into a string:
File "program.py", line 19, in getname
name = "b" + num
TypeError: Can't convert 'int' object to str implicitly
That's related to this function:
num = random.randint(1,25)
name = "b" + num
Hi,
I am making an application which uses a separate program to unzip some files. How can I compile my exe to contain the unzipping exe inside so that I only have one file instead of two.
Hai
I am developing an application in C#.I have a folde called myfolder it contains a file called mypoints.bmp.the folder myfolder is in my project folder it is in D drive .the path is D:\Myproject\myfolder\mypoints.bmp
Now in my program whereever i need mypoints.bmp i hardcoded the wholw path.when my project is copied in to a different system under C drive i am not able to run mu project because of the hardcoded path.HOw can i give the path so that there will not be any problem evenif it is loaded in to a different system under a different drive.Please help.
THAnks
maya
I know non-blocking receive is not used as much in message passing, but still some intuition tells me, it is needed. Take for example GUI event driven applications, you need some way to wait for a message in a non-blocking way, so your program can execute some computations. One of the ways to solve this is to have a special thread with message queue. Is there some use case, where you would really need non-blocking receive even if you have threads?
When I try to run the following code in my program
setTimeout("alert('moo')", 1000);
I get the following error
Error: Object expected
Code: 800A138F
Source: Microsoft JScript runtime error
Why? Am I calling the wrong function? What I want to do is delay the execution of the subsequent function.
Would anyone have any pointers on getting PNG images to display in Emacs 23 under Win32?.. I have installed the gnuwin32 set of utilities, including libpng and zlib; C:\Program Files\GnuWin32\bin is in path. JPG files started working but not PNGs. I'd appreciate any hints on getting this to work.
In many C++ IDE's and compilers, when it generates the main function for you, it looks like this:
int main(int argc, char *argv[])
When I code C++ without an IDE, just with a command line compiler, I type:
int main()
without any parameters. What does this mean, and is it vital to my program?
My program crashed when I added the option -fstack-check and -fstack-protector. __stack_chk_fail is called in the back trace.
So how could I know where the problem is ? What does -fstack-check really check ?
The information about gcc seems too huge to find out the answer.
I need to be able to make a program that looks through a mailbox of bounced messages, where the messages come back with the initial message in a .msg attachment, and open the .msg attachment for processing in ASP.NET 2.0. Is there any sort of code that might help in this? I've been looking at http://stackoverflow.com/questions/44383/reading-email-using-pop3-in-c as a starting point, but can't figure out how best to open the attachment from there, or if there's some easier way I'm missing.
i'm working for my exam. i didn't resolved this question. does anyone help me?
assume that there are two block, BLOCK1 AND BLOCK2. every block has 50 bytes. write a program to add BLOCK1 with BLOCK2 , and store result to BLOCK2 using LODS, STOS and LOOP etc. assembly commands?
hi..i wrote a sending sms program through wireless messaging in j2me..but whenever i am sending message they are asking permission for sending mssg.... how to resolve this..plz help me its urgent....
The National Park Service's Natural Sounds Program collects multiple terabytes of data each year measuring soundscapes. In your opinion, what is best available scripting language to manage massive amounts of files and file types? We would like to easily design and run efficient user-friendly scripts to search for and retrieve/create copies of files that may be located in different directories according a single static hierarchy. The OS will most likely be windows. Thanks!
Hello,
I am writing a program using rmi to connect server and clients together and got the following issue:
My rmi server support both ethernet and wifi mode
rmi clients can connect to the server either vi ethernet or wifi depending. That because s*ome clients can only run via ethernet* and some can only run via wifi.
My question is: how can I make my rmi server connect to all clients in such situation?
Thanks.
We're trying to script a CAD program, and this is the example for controlling the date in our design slugs, but I don't even know what language it is to know what to do with it.
! LIBEDATE
def &d$ &ret$
set &d$ = rstr(`/`,` `,#d$);
set &ret$ = word(&d$,2),`/`,word(&d$,1),`/`,subs(word(&d$,3), -2, 2)
According to the accepted answer to this question, the osql.exe utility can be run as a standalone program on a computer without SQLServer, simply by copying the binary file to the new computer. My question is, however, which other files need to be copied along with osql.exe for it to work?
Thanks so much!
Hi
I'm trying to use some library code written in scala from a java program.
I have a function that returns an Array (a scala Array) and I thought it would be possible to do
Tree[] = ScalaObject.myScalaFunction()
But the I get this error :
[error] found : scala.runtime.BoxedArray
[error] required: org.grammaticalframework.Trees.Absyn.Tree[]
What is the correct way to use a scala array in java ?
Hi,
We're getting this error once a day on a script that runs every two hours, but at different times of the day.
ERROR at line 1:
ORA-04068: existing state of packages has been discarded
ORA-04061: existing state of package body "PACKAGE.NAME" has been
invalidated
ORA-06508: PL/SQL: could not find program unit being called:
"PACKAGE.NAME"
ORA-06512: at line 1
Could someone list what conditions can cause this error so that we could investigate?
Thanks.
UPDATE:
Would executing 'ALTER SESSION CLOSE DATABASE LINK DBLINK' invalidate a state of the package?
I am writing a content provider for this application and in my content provider I am opening a database connection, running a query and returning the cursor of results to the calling program. If I close this database connection in the provider, the cursor has no results. If I leave it open, I get "leak found" errors in my DDMS log. What am I missing here? What's the clean, proper way to return a cursor of database results?
Which is better to use openssl or windows capi for ecnryption issues what is the pro and con list for both.
and if it possible to write my encryptor program on openssl and decrypt it with windows capi with no problem or there are some problem with this.
Why does java.lang.Object have two notify methods - notify and notifyAll? It seems that notifyAll does at least everything notify does, so why not just use notifyAll all the time? If notifyAll is used instead of notify, is the program still correct, and vice versa? What influences the choice between these two methods?
$id=(int)$_GET["id"];
$result = mysql_query("SELECT questionstable.*, categorytable.name
FROM questionstable
INNER JOIN categorytable
ON categorytable.id = questionstable.category
WHERE id=$id");
$row = mysql_fetch_assoc($result);
Warning: mysql_fetch_assoc() expects
parameter 1 to be resource, boolean
given in C:\Program
Files\EasyPHP-5.3.4.0\www\scsoru.php
on line 33
I am making a simple servlet program and when i started my tomcat I m getting the error "java.lang.IllegalArgumentException:" and Parse error in application web.xml.
and in web.xml
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
sample
Samplelass
SampleClass
SampleClass
/sample
sample/page/form.jsp
I am having some problems setting up Tomcat for JMX. I added the following properties to
CATALINA_OPTS="-Dcom.sun.management.jmxremote.port=18070 -Dcom.sun.management.jmxremote.password.file=$CATALINA_BASE/conf/jmxremote.password -Dcom.sun
.management.jmxremote.ssl=false"
And have added the jmxremote.password file in to the conf directory. I wrote a client tool that connects to the JMX server running on port 18070. When i run the client program i get the following error.
Exception in thread "main" java.lang.SecurityException: Authentication failed! Credentials required
at com.sun.jmx.remote.security.JMXPluggableAuthenticator.authenticationFailure(JMXPluggableAuthenticator.java:193)
at com.sun.jmx.remote.security.JMXPluggableAuthenticator.authenticate(JMXPluggableAuthenticator.java:145)
at sun.management.jmxremote.ConnectorBootstrap$AccessFileCheckerAuthenticator.authenticate(ConnectorBootstrap.java:185)
at javax.management.remote.rmi.RMIServerImpl.doNewClient(RMIServerImpl.java:213)
at javax.management.remote.rmi.RMIServerImpl.newClient(RMIServerImpl.java:180)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:305)
at sun.rmi.transport.Transport$1.run(Transport.java:159)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Transport.java:155)
at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:535)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:790)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:649)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
at java.lang.Thread.run(Thread.java:619)
at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:255)
at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:233)
at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:142)
at javax.management.remote.rmi.RMIServerImpl_Stub.newClient(Unknown Source)
at javax.management.remote.rmi.RMIConnector.getConnection(RMIConnector.java:2312)
at javax.management.remote.rmi.RMIConnector.connect(RMIConnector.java:277)
at javax.management.remote.JMXConnectorFactory.connect(JMXConnectorFactory.java:248)
at com.bt.c21sc.c21tkprobe.accessors.C21TkProbeJmxDAO.connect(Unknown Source)
at com.bt.c21sc.c21tkprobe.service.C21TkProbeBD.execute(Unknown Source)
at com.bt.c21sc.c21tkprobe.C21AppserverProbe.main(Unknown Source)
If i change the CATALINA_OPTS properties to
CATALINA_OPTS="-Dcom.sun.management.jmxremote.port=18070 -Dcom.sun.management.jmxremote.password.file=$CATALINA_BASE/conf/jmxremote.password -Dcom.sun
.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false"
Then it works fine. I think what i am confused of is what is classed as remote access. I am running the client program away from the Tomcat instance but both Tomcat and the client tool are on the same machine (i.e. different virtual machines but same environemnt). I thought i had to configure the remote authentication if i access the JMX server remotely from a different machine.
By remote access do they mean accessing the JMX server from any VM either locally or remotely?