Java allows identifier to start with or contain $ (dollar sign).
e.g int a$b;
But why # is not allowed in an identifier? What is the specific reason? Is # an operator or something in Java?
e.g int a#b;
I remember when I was working with PHP several years back I could blow up my application by naming a MySQL column 'desc' or any other term that was used as an operator.
So, in general are there names I should avoid giving my table columns?
In a code example I saw, the author uses StringBuffer with append method instead of String with + operator. What is the point here? Does StringBuffer have an advantage?
I have some MSIL in byte format (result of reflection's GetMethodBody()) that I'd like to analyze a bit. I'd like to find all classes created with the new operator in the MSIL. Any ideas on how to do that programmatically?
Hi,
First, when you want to free the memory assigned to an object in C++, which one is preferred? Explicitly calling deconstructor or using delete?
Object* object = new Object(...);
...
delete object;
OR
object->~Object();
Second, does the delete operator call the deconstructor implicitly?
Thanks,
I've read that Oracle wants to invest into another language than Java:
"On the other hand, Oracle has been particularly supportive of alternative JVM languages. Adam Messinger ( http://www.linkedin.com/in/adammessinger ) was pretty blunt at the JVM Languages Summit this year about Java the language reaching it's logical end and how Oracle is looking for a 'higher level' language to 'put significant investment into.'"
But what language could be the one Oracle wants to invest in? Is there another candidate than Scala?
hi there
I have an entity and it seems like using DateTime as the Id would be a good suit, however I there is this strange feeling that that it might be a terrible idea ( tho i cant come up with any logical reason as to why),
This is an immutable object ( ie once the value is recorded it shouldn't really change )
So DateTime as id field in NHibernate yay or Nay?
I would appreciate your comments on this
I have two fields
start_time
end_time - can be null
Now, depending on this I needs to differentiate between three states
Scheduled in future,
Currently running
Completed in past
Since mysql IF operator can not be nested, (Or I cant find an easy way to nest them), I cant find how to get the three state status.
Is it a good practice to put js files of the "content" folders in inner folders representing their logical module?
For example have a "datalayer" and "view" folders?
I looked into some well known extensions, such as Firebug, and saw no such devision.
I'm a Java developer so its seems much more natural to divide the files logically.
do custom1, custom2, custom3, custom4 attribute of <cfsearch> work with Solr? The documentation said they're only for Verity <MATCHES> operator. How to use customX with Solr in <cfsearch>?
Thanks
I know this is a strange question but the idea is simple: I prefer C# syntax rather than C++:
-Setters and getters directly inside a property
-interfaces
-foreach statement
-possibility to declare an implicit cast operator
other small things...
What I really don't know is if is possible to import a c++ dll (expecially std libraries) in C# if I don't use any namespace (even System)
The idea is just to write a program using everything that you will normally use in C++ (nothing from CLR so), even printf for example
Thanks for any answer
Does anyone have a code snippet or a class that will take a long long and turn it into a 16 byte Hex string?
I'm looking to turn data like this
long long decimalRepresentation = 1719886131591410351;
and turn it into this
//Base 16 Hex Output: 17DE435307A07300
The %x operator doesn't want to work for me
NSLog(@"Hex: %x",decimalRepresentation);
//console : "Hex: 7a072af"
As you can see that's not even close. Any help is truly appreciated!
I want count the same elements of two lists. Lists can have duplicate elements, so I can't convert this to sets and use & operator.
a=[2,2,1,1]
b=[1,1,3,3]
set(a) & set(b) work
a & b don't work
It is possible to do it withoud set and dictonary?
In JavaScript:
"ab abc cab ab ab".replace(/\bab\b/g, "AB");
correctly gives me:
"AB abc cab AB AB"
When I use utf-8 characters though:
"aß aß? ?aß aß aß".replace(/\baß\b/g, "AB");
the word boundary operator doesn't seem to work:
"aß aß? ?aß aß aß"
Is there a solution to this?
Hi, typically the main use of the question mark is for the conditional, x ? "yes" : "no".
But I have seen another use for it but can't find an explanation of this use of the ? operator, for example.
public int? myProperty
{
get;
set;
}
How would I be able to use the Drupal Fivestar voting module for voting on photos in a gallery without each photo being a separate node. I've used the Fivestar module for voting on seperate nodes, but making each photo in a gallery a node doeasn't seem logical.
thanks
hi,
I need the java code snippet for the below logic:
Following is a string and I need to validate the string based on the below condition :
"100 or 200 and 345 not 550 " - Valid string
"abc or 200 and 345 SAME ** 550 " - Not a Valid String
1 . the operands(eg 100,200 ..) should be positive numbers
2 . the operator should be and/or/not
Thx
Hi Guys,
I am trying to use sinf function in my C Program and it does give me undefined reference under MSVC 6.0 but sin works fine.
This make me curious to find the difference between sin and sinf.
What is the logical difference between sin and sinf().
How can I implement my own sinf functionality?
Hello all
I am trying to find the logical alan turing explanation why there can't be a program that checks another programs.
I remember we learned in on the computation course but now i just can't find the solution ,
and i need to explain it to some one at my work .
Thanks for help.
I have expressions like this:
(cat OR cats OR kitten OR kitty) AND (dog OR dogs) NOT (pigeon OR firefly)
Anyone having idea how to make tables to save those?
Before I got request for usage of brackets, I limited usage of operators to avoid ambiguous situations. So only ANDs and NOTs or only ORs and saved those in this manner:
operators
id | name
1 | AND
2 | OR
3 | NOT
keywords
id | keyword
1 | cat
2 | dog
3 | firefly
expressions
id | operator | keywordId
1 | 0 | 1
1 | 1 | 2
1 | 3 | 3
which was: cat AND dog NOT firefly
But now, I'm really puzzled...
Working on a Powershell script I had several places where I wanted A unless it was null, else B. Essentially the ?? operator in C#. I ended up writing the function shown below, but I can't help but think there is a built-in way to do this.
Is there a better, built-in, way?
function Get-ValueOrDefault()
{
foreach ($value in $args)
{
if ($value -ne $null) { return $value }
}
}
I think this works better:
function Get-ValueOrDefault() { $args | select -first 1 }
Hello,
Anybody can help me with this mysql query:
delete from generic__campaings_included where dealer_id not in ('2,3,4') and campaing_id = '1'
When i execute this query i didnt get normal result. Exceot 2 (dealer_id) all rows deleted.
How can i use "not in" with "and" operator?
PS. Sorry for my english)