Hello,
I am having a rather simple question
can anyone tell me why this is not displaying each variable on a new line, well except for
the <br>.
$curtime = gmdate("d/m/Y H:i:s");
//capture the PayPal returned information as order remarks
$oremarks =
"##$curtime##<br>".
"PayPal Transaction Information...\n".
"Txn Id: ".$ppInfo["txn...
Is newline and whitespaces the same in compiler design? what if you write a macro to replace newlines by whitespaces, is this correct or would it cause some form of problems?
...
In VB.NET there is the WITH command that lets you omit an object name and only access the methods and properties needed. For example:
With foo
.bar()
.reset(true)
myVar = .getName()
End With
Is there any such syntax within Java?
Thanks!
...
I don't know how about you, but I'm not very fond of the way arrays are constructed in PHP. I have this feeling that I use array keyword way too often and that array($k => $v) or e.g. array($k1=>array($k2=>$v)) are way too long given usefulness of maps.
(Moreover, recently I've learned JS way of doing it and now I really am jealous)
The...
Is there a better way to output data to html page with PHP ?
if i like to make a div with some var in php i will write something like that
print ('<div>'.$var.'</div>);
or
echo "'<div>'.$var.'</div>'";
what is the PROPER way to do that ?
or a better way, fill a $tempvar and print it once? like that:
$tempvar = '<div>'.$var.'</di...
I have used a decompiler that outputs Jasmin. How can I change the value of a function's argument? Example:
.method public constructor <init>(Ljava/lang/String;ZLjava/util/Locale;Ljava/lang/String;ILjava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/S...
Hi!
What's the best way to create multi-line string in C#?
I know the following methods:
Using StringBuilder
var result = new StringBuilder().AppendLine("one").AppenLine("two").ToString()
looks too verbose.
Using @
var result = @"one
two"
looks ugly and badly formatted.
Do you know better ways?
...
Hi!
How do you split multi-line string into lines?
I know this way
var result = input.Split("\n\r".ToCharArray(), StringSplitOptions.RemoveEmptyEntries);
looks a bit ugly to me and it looses empty lines. Do you know better solutions?
...
Quickie pseudo-aesthetics question:
For field declarations, the following is allowed:
int i, j, k;
providing three variables for integers. Does anything similar exist for method declarations, ala:
public int getI() {/* ... */},
getJ() {/* ... */},
getK() {/* ... */};
so that the method accessibility, return type, etc don't have t...
Consider this LINQ expression written using query notation:
List<Person> pr = (from p in db.Persons
join e in db.PersonExceptions
on p.ID equals e.PersonID
where e.CreatedOn >= fromDate
orderby e.CreatedOn descending
select p)
...
I need to Escape a reserved word to use it as an identifier in Delphi. I thought that was accomplished by using the ampersand "&", but that doesn't seem to be working right. Any other suggestions?
...
what is the main differences between syntax language and s-expressions language ? does using s-expressions affects compiling time (in the parsing process) or does it bring any advantage to the language ?
...
The documentation of some JavaScript API shows the following snippets as example how to invoke some function:
<button type="button" onClick="foo.DoIt(72930)">Click</button>
<button type="button" onClick="foo.DoIt(42342::37438)">Click</button>
:: is obviously used here to allow either one or two arguments to be passed to the function....
The following syntax is incorrect:
$_session['page'$numberpages]=$CurrentPage;
What is the correct syntax?
...
In some situations using C/C++, I can syntactically indicate to the compiler that a returnvalue is purposely ignored:
int SomeOperation()
{
// Do the operation
return report_id;
}
int main()
{
// We execute the operation, but in this particular context we
// have no use of the report id returned.
(void)SomeOperatio...
I have a review PAGE with a TEXTFIELD.
User need to be able to write LONG STORY (1000 words+) may contain chars like ()*&^%$#@\/<>
Once "save" is pressed I want to use Jquery GET -> to process content with PHP file.
(save in mysql database)
and return result.
let's say I want to display "alert(words_were_saved:int)"
How can I pass t...
Do I really need this many echo's or can I make it shorter?
<?php
if (!empty($url))
{
echo '<p>Job: <span>' . $job .'</span></p>';
echo '<p>Skills: <span class="caps">' . $skills . '</span></p>';
echo '<p>Website: <a href="http://' . $url . '" title="' . $url . '">http://' . $url . '</a></p>';
echo '<p>Pay:' . $pay. '</p...
What is the right way to:
is_array("something") # => false (or 1)
is_array(["something", "else"]) # => true (or > 1)
or to get the count of items in it?
...
Suppose you're updating a table that is the result of an expression, like so
UPDATE OPENQUERY( server, 'SELECT a from b' )
SET rem.a = loc.a
FROM OPENQUERY( server, 'SELECT a from b' ) rem
,local_table loc
WHERE rem.id = loc.id
Will that OPENQUERY be executed once, or twice? I believe the same would apply to any kind of u...
The runtime keeps telling me:
expected an indented block
But I don't want write nothing inside my except block, I just want it to catch and swallow the exception.
...