In every technical publication, and on this site too, people are always comparing OO languages to Smalltalk. My experience is in Java: is Smalltalk so important that I should study it?
Hi All,
I have a data card, as soon as i insert the data card, i am getting the events by using wm_device_change event.
But I also want to get event, when my data connect actually connects to out side world.
I mean to say, as soon as we click on connect/disconnect button of data card,i want to get the event.
exactly speaking wanted to know, when connection is established and disconnected.
data card is vodaphone data card and i am trying to browse using that data card. what ever is the SDK, somewhere the OS should get the event of connection and disconnection to network is there any way to access that event which OS is getting. as i can see in notificaiton the changes of vodaphone connection and LAN connection
data card is a USB device having SIM within it, and can be used to access internet through GPRS.
can i know how to do this in win32 c/c++ programe.
with regards
Vinayaka Karjigi
Hello
I am trying to make a list of things which can be difficult/surprising to someone who is changing language from PHP to Python.
so far i have rather short list:
forget require / include, learn import (this was most difficult to me - to understand package - module - class - object hierarchy and its mapping to filesystem)
you can't just upload file on server to have webpage (-mod_python, wsgi etc)
learn the python way for use variable class names (new $class() vs import + getattr)
/ operator in python 2.x and all float-related horrors
those were difficult to me, it takes few days before mind adapts a new paradigm
after i found that there is few other areas which could be challenging for someone with (too) many years of php:
everything is an object
you have to live with exceptions
array vs list, set, dictionary, tuple ...
learn (effective) list comprehensions
learn generators
any other ideas / personal experiences ?
I'm totally confused which one to use and when, first thing I do when something goes wrong in code with a slash is replace the one with other so my test cases double with one for / and one for \ .Help me to get the logic behind slashes.
hi all,
in the case of an IM client.
i have made 2 separate threads to handle sending packets (by std io) and receiving packets.
the question is how to make these 2 threads run simultaneously so that i can keep prompting for input while at the same time be ready to receive packets at any time?
i have already tried setting a timer but the data is always lost receiving.
The company I work for now uses a set naming convention for their C# variables such as iSomeName for int, sSomeName for string, aSomeName for arrays, bSomeName for boolean, dSomeName for datetime and so on. My previous employer did not use the i, s, a, b and d prefixes and just named the variables a good understandable name. My impression is that these prefixes lost favor a while ago and from what I read it is not the current trend. It seems fine to me either way as long as the variable is descriptive enough to understand what it is doing but I was wondering what the now-a-day accepted practice is for naming variables?
I'm reading an article about different evaluation strategies (I linked article in wiki, but I'm reading another one not in English). And it says that unlike to call-by-name and call-by-need strategies, call-by-value strategy is not Turing complete.
Can anybody explain, please, why is it so? If it's possible, add an example pls.
Every time i pass some parameters to a JavasScript or jQuery functon, i use some random letters. What are the correct letters for the corresponding variable types?
function(o){} for example is for a object. But what are the other letters? Do someone have a list of those?
I have this snippet of the code in my header:
class A {
private:
int player;
public:
A(int initPlayer = 0);
A(const A&);
A& operator=(const A&);
~A();
void foo() const;
friend int operator==(const A& i, const A& member) const;
};
implementation of the operator==
int operator==(const A& i, const A& member) const{
if(i.player == member.player){
return 1;
}
return 0;
}
and I need casting for this part of my code:
A *pa1 = new A(a2);
assert(i == *pa1);
i - is some int, which my function receives
I receive an error non-member function, How can I fix it? thanks in advance
I started off with C in school, went to Java and now I primarily use the P's(Php, Perl, Python) so my exposure to the lower level languages have all but disappeared. I would like to get back into it but I can never justify using C over Perl or Python. What real-world apps are being built with these languages? Any suggestions if I want to dive back in, what can I do with C/C++ that I can't easily do with Perl/Python?
I'm a little bit confused, can somebody please explain the main difference between those types of containers:
map
list
set
array
thanks in advanca(I'm asking about C++)
I'm currently working on a project Euler problem (www.projecteuler.net) for fun but have hit a stumbling block. One of the problem provides a 20x20 grid of numbers and asks for the greatest product of 4 numbers on a straight line. This line can be either horizontal, vertical, or diagonal.
Using a procedural language I'd have no problem solving this, but part of my motivation for doing these problems in the first place is to gain more experience and learn more Haskell.
As of right now I'm reading in the grid and converting it to a list of list of ints, eg -- [[Int]]. This makes the horizontal multiplication trivial, and by transposing this grid the vertical also becomes trivial.
The diagonal is what is giving me trouble. I've thought of a few ways where I could use explicit array slicing or indexing, to get a solution, but it seems overly complicated and hackey. I believe there is probably an elegant, functional solution here, and I'd love to hear what others can come up with.
I need to setup NACHOS java version in Linux and run some simple sample . How to setup and run simple sample ? [need some tutorials and some computer assignment with solution with NACHOS]
i have known that winpcap library enabled a person to obtain advanced information about installed devices...
given all the networking devices found in the computer, how will i know which one of this has an internet connection?!
thanks:)
Delete every 't'th (t1) node of a single linked list. In the resultant linked list, again delete 't'th node. Repeat this till only t-1 nodes remains.
For this i have come up with:
Traverse until you reach 't'th node, delete all the nodes till the end.
Is there any efficient way other than this?. Can any one please help me out. Thanks.
One of the drivers I'm developing has caused a BSOD. Unfortunately a dump file was not created since it was not configured / low resources. I was trying to reproduce this crash but no luck so far.
Is there any way to get some info using WinDbg or any other tool?
I have this information:
A screenshot of the BSOD
The .sys file.
Its pdb
The source code
The machine it was crashed on
I have everything except the dump itself.
Your help will be much appreciated.
As I said above, no dump (/minidump) exists. This is the actual problem.
For this specific crash, I know I won't be able to get the stack. Just getting the specific line of code will be good enough. Because the BSOD contains the module's address, it seems like there should be a way to detect which line exactly is it. As I mentioned above, I do have the .sys file, the pdb and the source code.
This is the specific code taken from MSDN: SYSTEM_SERVICE_EXCEPTION.
How can I know from there what was the specific line? and/or the specific exception raised?
Hi,
what the syntax is in Action Mailer Basics rails guide ?
class UserMailer < ActionMailer::Base
def welcome_email(user)
recipients user.email
from "My Awesome Site Notifications <[email protected]>"
subject "Welcome to My Awesome Site"
sent_on Time.now
body {:user => user, :url => "http://example.com/login"}
end
end
How should i understand the construction, like
from "Some text for this field"
Is it an assignment the value to a variable, called "from" ?
Hi,
I would like to know if there is an implementation of the foldLeft function (and foldRight?) in R.
The language is supposed to be "rather" functional oriented and hence I think there should be something like this, but I could not find it in the documentation.
To me, foldLeft function applies on a list and has the following signature:
foldLeft[B](z : B)(f : (B, A) => B) : B
It is supposed to return the following result:
f(... (f(f(z, a0), a1) ...), an) if the list is [a0, a1, ..., an].
(I use the definition of the Scala List API)
Does anybody know if such a function exists in R?
I have equation like ((3+4)-(24/5)) if user press '.' then equation ends now chk paranthesis are balance or not then solve the internal all operations what should i do? and how will this program make?? help me plz thanks alott...use array and if the parehthesis are balanced then operation must perform plz urgent help thanks alott