how powerfull is google android bluetooth programming?
is it considered a low level programming langauge/emulator that enables me to have full control over bluetooth? ie protocols,encryption,layers....
I need to build a query to the entities to get records including:
AssetWeapon,
PersonOut
number of records with IsIn = True,
number of records with IsIn = False,
name of the month of StartTime,
Records should be grouped by AssetWeapon
thank you guys!
All are from this post.
What does these statement mean:
error(nargchk(5, 6, nargin));
plot(p(:,1), p(:,2), '.-'), axis equal
And what's this kinda syntax which I haven't quite often seen:
if nargin<6, steps = 36; end
Is it possible to have an enum change its value (from inside itself)? Maybe it's easier to understand what I mean with code:
enum Rate {
VeryBad(1),
Bad(2),
Average(3),
Good(4),
Excellent(5);
private int rate;
private Rate(int rate) {
this.rate = rate;
}
public void increateRating() {
//is it possible to make the enum variable increase?
//this is, if right now this enum has as value Average, after calling this
//method to have it change to Good?
}
}
This is want I wanna achieve:
Rate rate = Rate.Average;
System.out.println(rate); //prints Average;
rate.increaseRating();
System.out.println(rate); //prints Good
Thanks
guys some of you tell me that i have not accepted your answers on my problems or it is 0 % accepted answers really trust me it is technical problem i did not know what to do in case of get answers please tell me what to do i have accepted all answers they helped me very much what to do? can u explain me what to do and how to do in case i will get correct answers and i accept it?
i am looking at this site:
http://cloudexchange.cloudapp.net/stackoverflow/s/84/rising-stars-top-50-users-ordered-on-rep-per-day
set nocount on
DECLARE @endDate date
SELECT @endDate = max(CreationDate) from Posts
set nocount off
SELECT TOP 50
Id AS [User Link], Reputation, Days,
Reputation/Days AS RepPerDays
FROM (
SELECT *,
CONVERT(int, @endDate - CreationDate) as Days
FROM Users
) AS UsersAugmented
WHERE
Reputation > 5000
ORDER BY
RepPerDays DESC
i am also a beginner at SQL. i have the following questions about this code:
is this mysql or mssql?
what does this do? set nocount off
why is this in brackets? [User Link]
what does this do? CONVERT(int, @endDate - CreationDate) as Days
thanks!
please see the following code
// redirect to success page
if ($success){
header( 'Location: ../Scripts/_lib/phpmailer-fe.php');
}
else{
print "<meta http-equiv="refresh" content="0;URL=error.html">";
}
its not working
I am new to android and last year i bought two books of android 1.5. But at that time i was busy in my project so was not able to work on android. Now i want to start android again. Should i go for those books or should i buy new editions
Is there any major change regarding basic learnings?
Please let me know.
Thanks
I have this: 2010-04-08T01:01:00Z
I want to remove the 'T' and everything behind it as well.
Also I would like to rewrite the date into this format: 08-04-2010
How can I do this the easiest way?
Thanks
I have a requirement to implement some kind of dictionary object. Something like MyDict<K,V1, V2). For example if I have a Question as Key(k) then Correct answer is V1 . V2 is user selected answer. Is there a collection that would satisfy this requirement in C#. If I have to design my own type, what interfaces should I implement. ICollection and Ilist ?
Some of our friends (University students) are trying to develop a twitter type application, I want to plan for at least 1000 transactions per second (I know it's wishful thinking) for initial launch. This involves several people connecting and getting updates and posting (text + images) to site. In the back end db will server the data and also calculates rankings of what to push to user based on complex algorithm on the fly real-time.
Our group is familiar with Java and Tomcat/MySQL. We can also easily learn/code in PHP/MySQL. What is the best suited platform for our purpose ?
Though Java seem to be easy to implement for us I am afraid that hosting will be a bit difficult. I could find cloud based php hosting services (like rackspace cloudsites) at reasonable cost. Amazon EC2 is a bit over our heads to manage on day-to-day.
Also any recommendation on hosting ? (PHP or Java) We don't have millions in seed money but about $20K to start with.
Any advice on above or any thing in general approach is much appreciated.
Hi I have a table that looks like this
id : productid : featureid
and would have the following data:
(1, 1, 16)
(2, 1, 21)
(3, 1, 25)
(4, 2, 16)
(5, 2, 21)
(6, 2, 27)
where featureid is a foreign key to another table.
I need to select products that have both featureids of 16 and 25, in which case productid 1 but not productid 2
Can someone show me an example of how to format this query.
Consider a DB with a Client table and a Book table:
Client: person_id
Book: book_id
Client_Books: person_id,book_id
How would you find all the Person ids which have no books?
(without doing an outer join and looking for nulls)
I am new to android and last year i bought two books of android 1.5. But at that time i was busy in my project so was not able to work on android. Now i want to start android again. Should i go for those books or should i buy new editions
Is there any major change regarding basic learnings?
Two books i am having are:-
Pragmatic Hello Android (New addition of this book is available, But still in beta phase)
Apress begining Android (Dont know about this whether new edition is available or not)
Please let me know.
Thanks
EDIT
here i am not asking about the good books of android, as there are lot of questions regarding that. I can find out from them.
My question is purely related to change in version
Hi All,
Any ideas on how to speed this up in IE (performs decent in Firefox, but almost unusable in IE). Basically, it's a tag cloud with a filter text box to filter the cloud.
<html>
<head>
<script type="text/javascript" src="jquery-1.3.2.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$('#tagFilter').keyup(function(e) {
if (e.keyCode==8)
{
$('#cloudDiv > span').show();
}
$('#cloudDiv > span').not('span:contains(' + $(this).val() + ')').hide();
});
});
</script>
</head>
<body>
<input type="text" id="tagFilter" />
<div id="cloudDiv" style="height: 200px; width: 400px; overflow: auto;">
<script type="text/javascript">
for (i=0;i<=1300;i++)
{
document.write('<span><a href="#">Test ' + i + '</a> </span>');
}
</script>
</div>
</body>
</html>
thanks,
rodchar
Few questions on over riding.
I am interiting a method openRead from another class, the method is to be overridden so that the scanner class uses the provided delimiter pattern, which is referenced. I need to make use of the scanner class useDelmiter method
method from another class
[code]
public boolean openRead() throws FileNotFoundException
{
sc = new Scanner(new File(fileName));
if (fileName != null)
{
return true;
}
else
{
return false;
}
}
[/code]
delimiter
[code]
protected final String DELIMITERS = "[\s[^'a-zA-Z]]";
[/code]
I'm at a loss to how i over ride this using the constant delimiter.
I need to do a find and replace in Notepad of
Err.Number, canBeAnything, canBeAnything, Err.Description
(where canBeAnything is just what it says)
with
Err.Number, "canBeAnything", "canBeAnything", Err.Description
(basically, put quotes around canBeAnything)
I got as far as the find
Err.Number, .+, .+, Err.Description
But I'm stuck on the replace. Any suggestions?
hi, im a bit confused on this and i dont know how to solve this question that i have been asked, id be grateful if you could assist me on this question, maybe try to tell me what needs to be done, and how. the question is:
Write a method called countChars which takes an InputStream as a parameter, reads the stream and returns the number of characters it contains as an int. Any IOExceptions which might occur in the method should be passed back to the method's caller.
Note that the method header should show that it is possible that an exception might occur.
i attempted this question with the following code:
public class countChars
{
public int countChars(int InputStream)
{
return InputStream;
}
}
and i get an error message saying :
Main.java:26: cannot find symbol
symbol : method countChars(java.io.InputStream)
location: class Main
s1 = "" + countChars(f1);
^
1 error
class Person holds personal data
Its constructor receives 3 parameters, two Strings representing first and last names and an int representing age
public Person(String firstName, String lastName, int age) {
its method getName has no parameters and returns a String with format "Lastname, Firstname"
its method getAge takes no parameters and returns an int representing the current age
its method birthday increases age value by 1 and returns the new age value
Create the class Person and paste the whole class into the textbox below
public class Person
{
public Person(String first, String last, int age)
{
getName = "Lastname, Firstname";
System.out.print(last + first);
getAge = age + 1;
return getAge;
System.out.print(getAge);
birthday = age + 1;
newAge = birthday;
return newAge;
}
}
im getting errors such as "cannot find symbol - variable getName" but when i declare a variable it still not working, i also wanted to ask if i am heading in the right direction or is it all totally wrong? im using a program called BlueJ to work on.
I have created a table with the following structure-
$sql = "CREATE TABLE followers
(
uid int UNSIGNED NOT NULL UNIQUE,
PRIMARY KEY(uid),
follower_count int UNSIGNED ,
is_my_friend bool,
status_count int UNSIGNED,
location varchar(50)
)";
I need to find the uid of the person with max(status_count+follower_count) and whose is_my_friend = 1
I wrote the following query but I ain't getting the correct uid.
SELECT p.uid FROM (select uid,is_my_friend,max(follower_count+status_count) from followers) p WHERE p.is_my_friend = 1;
I have a commerce application, asp.net mvc.
I want it to be extensible in the sense others can create other payment providers, as long as they adhere to the interfaces.
/blah.core
/blah.web
/blah.Authorize.net (Implementation of a payment provider using interfaces Ipaymentconfig and paymentdata class)
Now the problem is this:
/blah.core
- PaymentData
/blah.core.interfaces
- IPaymentConfig
where Payment Data looks like:
using blah.core;
public class PaymentData
{
public Order Order {get;set;}
}
IPayment data contains classes from blah.core like the Order class.
Now I want to use the actual Authorize.net implementation, so when I tried to reference it in the blah.core project I got a circular dependency error.
How could I solve this problem? Many have said to break out the interfaces into their own project, but the problem is PaymentData references entities that are found in blah.core also, so there doesn't seem to be a way around this (in my head anyhow).
How can I redesign this?
All I can find information on for the URLLoader object in Actionsript 3.0 involves loading XML files, which I don't want to do. I'm trying to load in a .txt file that I want to parse, line by line with each line being delimited by a comma. Anyone know a method of doing this or a place where I can find some information on how to do this? Thanks!
is there any way when using a div for a background image- to limit the height to only the content displayed?
im putting the background image in a div because i want it centered via position:relative but the image doesnt show up unless i put a height on the div, and thats not what i want because i dont want to be able to just scroll down to the bottom of the image where theres no content
ive tried putting the background image on the body css but if the browser is less than the width of the image, it just throws it over to the left and you can only see half of it- is there no way to make the background position:relative on the body?
sorry if that doesnt make sense <
thanks