How do I convert the value of a PHP variable to string? I was looking for something better than concatenating with an empty string:
$myText = $myVar . '';
like the ToString() method in Java or .NET.
Is it possible to instantiate a class and then invoke its methods between scriptlets in JSP?
I am getting errors and I don't know why (java class and methods are fine).
Any other way to do the same (i just want a string from a method in a class)?
I hear all this stuff about crazy ways to build iPhone apps using Ruby or C# under .NET or the like. Even stuff about developing apps on Windows using Java, or auto-generated apps using Flash CS5 or something.
Now, I've never really spent any time at all investigating these claims—I just brushed them off as clumsy or cumbersome or down-right claptrap—but I'm a proud Objective-C programmer who's perhaps a little worried as to whether there's any truth in all of this?
The most egregiously redundant code construct I often see involves using the code sequence
if (condition)
return true;
else
return false;
instead of simply writing
return (condition);
I've seen this beginner error in all sorts of languages: from Pascal and C to PHP and Java. What other such constructs would you flag in a code review?
hi i created one webapplication project.It containe one servlet file jsp file.
I created one string variable in servlet and assign some value like
/* sampleservlet.java *******/
String s=" WELCOME"
My constraints I want to display the string in my jsp file.so that i import the servlet file inj jsp and i created object as ---call---
jsp file contain following coding
<%sampleservlet call ;%
<%call.s%
But it shows error how to solve this?
How do I parse an xml document as a stream using Scala?
I've used the Stax API in java to accomplish this, but I'd like to know if there is a "scala" way to do this.
I am developing a ff extension. On one menupopup, the onpopupshowing calls a javascript function. Tha JS function extracts a list of names. Now these names have to be displayed in the same popup.
How can i get this? Basically i will need to pass the data (just as we use beans in java) to the browser from the JS function. The data can change everytime the popup is called.
I love the "Organize Imports" command in Eclipse to implicitly add and remove classes imported into a source file (as in Java or ActionScript).
Is there a command in Xcode to update the #import directives at the top of.m Objective-C files based on the classes referenced within the file?
Hello,
In my iPhone application, I need to calculate the time difference between the time a message was created on the server, and the time my phone received it.
The server (Java) puts in a number returned by System.currentTimeMillis() as metadata along with the message.
How do I compare this number with the current time on the device? Could not find a suitable NSDate method to do this comparison.
Thanks in advance!
How can I get the session from within a command object?
I have tried:
import org.springframework.security.context.SecurityContextHolder as SCH
class MyCommand {
def session = RCH.currentRequestAttributes().getSession()
}
This throws
java.lang.IllegalStateException: No thread-bound request found: Are you referring to request attributes outside of an actual web request, or processing a request outside of the originally receiving thread? If you are actually operating within a web request and still receive this message, your code is probably running outside of DispatcherServlet/DispatcherPortlet: In this case, use RequestContextListener or RequestContextFilter to expose the current request.
I want to get the fine name with out the file extension in VIM.
I wrote the following functions in my .vimrc file for compile and run the Java program.
:function! JAVA_RUN()
:!javac %^M
:endfunction
map <F3> :execute JAVA_RUN()<CR> :source $HOME/.vimrc<CR>
In side the function how can I get the file name with out the extension.
I would want to raise an exception as it's made in Python or Java --to finish the program with an error message--.
An error message could be returned to a parent function:
func readFile(filename string) (content string, err os.Error) {
content, err := ioutil.ReadFile(filename)
if err != nil {
return "", os.ErrorString("read " + filename + ": " + err)
}
return string(content), nil
}
but I want that it can be finished when the error is found. Would be correct the next one?
func readFile(filename string) (content string) {
content, err := ioutil.ReadFile(filename)
defer func() {
if err != nil {
panic(err)
}
}()
return string(content)
}
One of the more common complaints I have read about the AppEngine database (for Java) is that it is extremely slow when it come to "cold start time". What does this mean? And is it something I should be worried about?
The AU file format is very common in the Java world. In .NET however, I found no built-in class to play this format. Did I miss something, or do I need to resort to using a third-party library?
I want my web service to call a callback in my Flex client when it finishes a batch job that I have submitted already using a web method. What will I need to change on both server and client sides? I am using Java on server side.
Say I had a file like... http://my.website.com/myfile.raw
and this file was just raw bytes, representing an intensity image. Is it possible to grab this data and read the bytes in JavaScript? And then using it with HTML 5 canvas (e.g., putImageData) to draw an image?
Or is there some other way to do this in the browser without Java or Flash?
in python tutorial added that python cannot hide its attributes from other classes. some thing such as private data in C++ or java..But also i know that we can use _ or __ to set some variables as privated one but it is not enogh. I think it is a week if it is not any thing to do it.
Hi,
Is there any good control or plug-in for uploading multiple photos with preview? As far as I understand it is impossible to preview photo on local computer using just JavaScript. So it has to use Flash or Java.
Thanks, also, I use ASP.NET.
Hello,
I want to upload dynamically content from a soccer live score website to my database.
I also want to do this daily, from a single page on that website (the soccer matches for that day).
If you can help me only with the connection and retrieval of data from that webpage, I will manage the rest.
website: http://soccerstand.com/
language: php/java - mysql
Thank you !
hi
I've tried a few php IDEs , but still searching for the FASTEST one
all Java based IDEs are too slow, I have 2 computers to work, my home pc which is too fast, and my laptop witch is good , but cant handle a heave software.
and I have to work on them both, so I'm looking for the best free ide which is fast
I'm not talking about text-editors , because I already have np++ and its great, but looking for extra features to help me save time..
any tips?
Question over here is are design patterns specific to a programming language or technology,
Like you can do composite pattern only in C#,Java but not in VB6.0.Is that true, If yes that what are pattern that can't be implemented with out object oriented programming languages.
After reading several questions regarding problems with compilation (particularly C++) and noticing that in many cases the problem is a missing header #include. I couldn't help to wonder in my ignorance and ask myself (and now to you):
Why are missing headers not automatically checked and added or requested to the programmer?
Such feature is available for Java in Netbeans for example.
I'm using JPA but I'm not sure how to use it for
relation between two classes. I need to connect them
@OneToMany. I have done this before but forgot.
Is there any good tutorial for this or an example that
is easy to understand.
By the way this is a Flex application where I'm using
BlazeDS for connection between Java and Flex.