Is it necessary to code RTOS in C language always? Why can't that be coded in java or some other technology..?? Is that because of the absence of pointer concept in java?
code
<a href="#" style="width:50px;display:block">london paris itlay milan</a>
output
london paris itlay milan
Why it's not rendering like this
london
paris
itlay
milan
how to achieve output like this without changing in HTML?
What part of the C++ specification restricts argument dependent lookup from finding function templates in the set of associated namespaces? In other words, why won't the following compile?
namespace ns {
struct foo {};
template<int i> void frob(foo const&) {}
}
int main() {
ns::foo f;
frob<0>(f);
}
I realized today that I have blindly just followed this requirement for years without ever really asking why. Today, I ran across a NotSerializableException with a model object I created from scratch and I realized enough is enough.
I was told this was because of session replication between load-balanced servers, but I know I've seen other objects at session scope that do not implement Serializable. Is this the real reason?
I'm new to Scala... Here's the code:
def ack2(m: BigInt, n: BigInt): BigInt = {
val z = BigInt(0)
(m,n) match {
case (z,_) => n+1
case (_,z) => ack2(m-1,1) // Compiler says unreachable code on the paren of ack2(
case _ => ack2(m-1, ack2(m, n-1)) // Compiler says unreachable code on the paren of ack2(
}
}
I'm trying to understand that... why is it giving that error?
Why we need the new in the select statement on one of them?
var runs = from sampleDataTable in db.SampleData
from sampleInfoTable in db.SampleInfo
where sampleDataTable.SampleInfo.SampleInfoId == sampleInfoTable.SampleInfoId
select new {sampleDataTable.Timestamp, sampleDataTable.SampleDataId, sampleInfoTable.Lane} ;
and
var runs2 = from sampleDataTable in db.SampleData
from sampleInfoTable in db.SampleInfo
where sampleDataTable.SampleInfo.SampleInfoId == sampleInfoTable.SampleInfoId
&& sampleDataTable.Timestamp == timestamp
select sampleInfoTable.Lane;
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 have classes SearchToUser and getFilesToWord. GetFilesToWord must inherit SearchToUser fields. Extending works if an empty construction in SearchToUser-class, otherwise:
cannot find symbol
symbol : constructor SearchToUser()
location: class SearchToUser
public class GetFilesToWord extends SearchToUser{
^
1 error
make: *** [all] Error 1
I cannot understand why the empty constructor is required for extending.
Yesterday I read a question (now deleted) from a guy asking: "Why my avatar is now a pony?"
Today my avatar changed suddenly, and now I see a pony and a rainbow. but my gravatar still no changed.
What's happening?
In java adjectives ending in -able are interfaces Serializable, Comparable etc... So why is Throwable a class? Wouldn't exception handling be easier if Throwable were an interface?
Obviously, changing it now is out the question. But could it be made abstract? Wouldn't that avoid the bad practice of throw new Throwable();
I have to make a presentation at work to convince everyone why they should try coding in Python. So, I thought of taking a poll here...
What is it about Python (features, etc) over other languages that you love?
The reason I usually give is that in Python you forget about the complexities and frills of programming languages and can just focus on producing code that works... What do you think?
I have several classes that do not really need any state. From the organizational point of view, I would like to put them into hierarchy.
But it seems I can't declare inheritance for static classes.
Something like that:
public static class Base
{
}
public static class Inherited : Base
{
}
will not work.
Why have the designers of the language closed that possibility?
Why are the runtime heap used for dynamic memory allocation in C-style languages and the data structure both called "the heap"? Is there some relation?
I have a UIViewController and I'm noticing that I've done something to where the didReceiveMemoryWarning method is getting called every time I run it on an actual device.
I've run the project with Run Run With Performance Tool Object Allocations (and Leaks also). There are no leaks but I have no idea how to read or understand the "Object Allocations" data that is displayed.
So ...
How do I read this information and what is/are the best ways to figure out (and resolve) why this is happening?
Thanks
I have setup 1 project in VS2010 RC. A workflow console application that simply counts from 1 to 10000 and writes each number to console.
When I execute "F5" this application it takes minutes to finish, but when i execute this application with profiling it finishes in 3-5 seconds.
Does anyone know why?
You might keep pondering over this question a million times in your head. When there are so many softwares available that can make the work easy, why to hire web programmer. There is a difference. Building a website on your own and seeking the help of professionals can create a major impact on your business.
Just curious as to why Dictionary is not supported by XmlSerializer?
You can get around it easily enough by using DataContractSerializer and writing the object to a XmlTextWriter, but what are the characteristics of a Dictionary that makes it difficult for a XmlSerializer to deal with considering it's really an array of KeyValuePairs.
In fact, you can pass an IDictionary<TKey, TItem> to a method expecting an IEnumerable<KeyValuePairs<TKey, ITem>>.
Why would bitmap outperform vector?
My Flash is for a large Kiosk, with rich media requirements and must function accurately as a counter. I want to keep everything vector for scalability.
When I did a simple FPS test, I noticed my Bitmap version performed perfectly, and the all vector file was noticeably slower.
PLEASE EXPLAIN
• vector performance• what graphic standards I can apply• solutions for using vector
KIOSK TEST ANIMATION
RESULTS
• only text and bitmap perform well, not vector
• background and clouds OK, but more layers slow it down
Seems like every C# static analyzer wants to complain when it sees a public field. But why? Surely there are cases where a public (or internal) field is enough, and there is no point in having a property with its get_ and set_ methods? What if I know for sure that I won't be redefining the field or adding to it (side effects are bad, right?) - shouldn't a simple field suffice?
Why is the setContextClassLoader() method placed on thread ?
What different thread have different classloaders?
The question is what if i extended a classloader , loaded there some new classes. to the my custom classloader.
Now , I want it to be the context classloader , so I call the method (Thread.currentThread().setContextClassLoader(loader)).
Are these new classes awailable only in the context of the current Thread ? ( or how does it work ?)
Thanks
When a method is defined with an out parameter, why do I have to specify the out keyword when calling it. Its already there in the method definition, and the runtime should know that any parameter passed will be an out parameter.
It would make sense if the compiler will accept the argument with or without out keyword, with different semantic, but if you MUST add the keyword to make the code compile, whats the use? Shouldn't the compiler handle it automatically?
Same for ref
Why does the C# compiler not even complain with a warning on this code? :
if (this == null)
{
// ...
}
Obviously the condition will never be satisfied..
Is the proliferation of open source licenses just another example of programmers living NYI (Not Invented Here) syndrome? I know there are some big differences between some of the big licenses (e.g., GPL, Apache, BSD) but when you start looking to see many projects creating their own licenses. Why?
References:
http://en.wikipedia.org/wiki/Open_source_licenses
http://developer.kde.org/documentation/licensing/licenses_summary.html