I don't want to give an initial value. I want to set these later using the set method
class Duck {
var int id;
var set = Array();
}
Any idea how to declare without getting error?
I have a mysq query which gets including some vars like that:
messages TABLE receiver cols
user1 rows : 1,3,5
user2 rows : 2,3
user3 rows : 1,4
I want to get rows which includes '3' value. So I will get 'user1' and 'user2'.
I tried that but naturally it doesn't work.
mysql_query("SELECT * FROM messages WHERE receiver='3'");
How can I do this?
Hello, I have a table with OWN_ID and OWN_Email -
3ace7cf80edd | [email protected]
3acf6af33ff7 | [email protected]
3acda2524e00 | [email protected]
3ad75583c9a7 | [email protected]
3ad74b018999 | [email protected]
etc.
the problem is that it should contain only a single ID per Email, also I need to replace all OWN_ID values in another table by highest OWN_ID value of the OWN_Email
I have one 'Transaction' entity object with 'Operations' navproperty with multiplicity of 'Many'.
When I'm adding only one operation per transaction nothing happens, but when I'm trying to add more than one operation,
db.SaveChanges() throws an exception like 'Subquery returned more than 1 value blah, blah, blah'
How can I solve that?
Help me guys please...
BTW... Could you tell me how can I see the exact query string that EF passes to Sql Server on db.SaveChanges() method?
Contract.all(:conditions => ['voided == ?', 0]).size
=> 364
Contract.all(:conditions => ['voided != ?', 0]).size
=> 8
Contract.all.size
=> 441
the 3 numbers does not added up (364 + 8 != 441). What's the proper way write the :conditions to count the rows which the voided column value is NULL or equal to zero?
So... I want to return value when C# function is called. I need a code example (simple summ of a,b values will be ok) Please help
I need something like this ( I know ActionScript so I will write in it):
public function sum(valueA:int, valueB:int):int
{
var summ:int = valueA + valueB;
return summ;
}
How to translate it into C#?
Often I just need to get a single value from MySQL that I know exists there. I use the following construct:
$result = end(mysql_fetch_array(mysql_query('SELECT FOUND_ROWS()', $db)));
Is there a proper single function in PHP that would do this?
Hi guys, i've this string example value:
Sun, 09 May 2010 11:16:35 +0200
I've to insert it into MySql Date/Time field.
How can i convert it into .NET format (or Mysql format), so i can make my INSERT INTO mydate='2010-05-09 11:16:35' ?
Thank you !
I have the following code to assign a value to all the elements of a vector:
x = 100;
for (int i=0;i<vect.size();i++)
{
vect[i] = x;
}
It's straightforward enough, but I'm wondering if there is a function in the STL that does the same thing; something like for_each, but for assignment.
Hi All,
Is it possible to know if any of the textbox values have changed in the application.
I have around 30 textboxes and I want to run a part of code only if, any of the textboxes value has changed out of the 30. Is there a way I can know that.
Hello there,
I am try to find out how to enforce uniqueness in fields other than the unique id.
Example:
@PersistenceCapable(identityType = IdentityType.APPLICATION)
public class User implements IsSerializable {
@PrimaryKey
@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
private Long id;
@Persistent
private String name;
@Persistent
private String email; // <= I want this to be unique as well
}
In the example above, how can I enforce uniqueness of the email value across the database?
Daniel
$('#customerAddress').text().replace(/\xA0/,"").replace(/\s+/," ");
Going after the value in a span (id=customerAddress) and I'd like to reduce all sections of whitespace to a single whitespace. The /\s+/ whould work except this app gets some character 160's between street address and state/zip
What is a better way to write this? this does not currently work.
I would like to ask how i should add the minus sign front of a decimal value.
i want the user to add e.g. 100 and behind the scenes to convert it in -100
thank you.
I have been using this "logic" in C++ and VB with success, but am tied up in Java...
Simply put,
public void DataProviderExample(String user, String pwd, String no_of_links,
String link1, String link2, String link3) {
for (int i=1;i<=no_of_links;i++) {
String link = "link"+i;
System.out.println(link);
}
Now, if the variables link1, link2 and link3 have a value of "X", "Y" and "Z" respectively, upon running this program, I get the following output -
link1
link2
link3
What I want is -
X
Y
Z
Any ideas?
for (int i = 0; i < X; i++)
myitem = (checkedDB) ? dirtyItem : cleanItem;
I wanted to know if there's a way of flipping checkedDB in the same statement, i.e. the next iteration checkedDB is the opposite of it's value, so like XORing.
Hi everybody,
What's the most appropriate (read least data consuming) data field to store a true/false/1/0 value in a mySQL database?
I have previously used a one character long tinyint, but I am not sure if it's the best solution?
Thanks!
Hi! I'm using MySQL with PHP. This is like my table: (I'm using 3 values, but there are more)
id | 1 | 2 | 3
1 | 3 |12 |-29
2 | 5 |8 |8
3 | 99|7 |NULL
I need to get the greatest value in a certain row. If should get: (id - output) (1 - 2), (2-2), (3-1). Is there any queries for this? I've been trying, but I can't get it to work right.
how to get DataBaseGrid-Fields[2]-Value on Previous Row ?
for examole
1 2 3
1 2 4
1 2 5
my selected tow is 1 2 4 , and I want to get 3 :/
Maybe change selected index manually ?
How to check in Oracle Function whether value is increasing in particular field for last 3 year or not. Suppose one table is company and if we want to consider only values if profit of past 3 year of company is in increasing manner.
I joined two tables together and what I like to do is concatenate multi vaule in one records without duplicated value.
TAXLOT_ZONE
TID ZONE
1 A
1 A
1 B
1 C
2 D
2 D
2 E
3 A
3 B
4 C
5 D
Desirable Final table looks like;
TID ZONE
1 A, B, C
2 D, E
3 A, B
4 C
5 D
I have the following:
<input type="hidden" name="phone_home" value="<? echo $_SESSION['full_home_phone'] ?>">
this works for firefox but not for google chrome.. can anyone help?
thx ahead of time
SELECT COUNT(*) as Count, IF(sch.HomeTeamID = 34,true,false) AS Hawaii
FROM schedule sch
JOIN schools s ON s.ID = 83
WHERE (sch.HomeTeamID = 83 OR sch.AwayTeamID = 83)
AND sch.SeasonID = 4
I'm trying to use count() to simplify my result but also include a field that represents wether any of the results' specific column contained a certain value. Is this possible? I'd basically like a row response with all the info I need.
I have a html textbox on which I've bound a function via jQuery to the paste event to prevent users pasting a value into the textbox. This functionality works well.
However it is possible to select some text from another textbox on the page and drag it into the textbox in which pastes are prevented. Is there a jQuery event that I can bind to that will prevent users dragging text into the texbox?