Can someone point me to a decent RPC tutorial for (or books) linux, like in this post. I tried looking around myself, I've only found tutorials that are really old.
Thanks
Suppose I want my draggable widget to move differently than just staying under my cursor while being dragged. For instance, having the widget move only in one axis, or have the widget move double the distance between the cursor and the drag starting point. Which method should I override to define this kind of behaviour?
I am trying to convert a string (const char* argv[]) to a double precision floating point number:
int main(const int argc, const char *argv[]) {
int i;
double numbers[argc - 1];
for(i = 1; i < argc; i += 1) {
/* -- Convert each argv into a double and put it in `number` */
}
/* ... */
return 0;
}
Can anyone help me? Thanks
I'm stumped on a project Euler question, #290. Can anybody point me in the right direction?
i = 0
o = 0
p = 1
while i < 10 ** 18
j = i.to_s.split('').map(&:to_i)
k = j.inject(:+)
l = 137 * i
m = l.to_s.split('').map(&:to_i)
n = m.inject(:+)
if k == n
o += 1
end
if i == (9 * 10 ** p) * (10 ** p)
i += 18
p += 1
o += 1
else
i += 9
end
end
puts o
I am working on Silverlight 3.0 and currently using code-behind in my Views. I would like to implement the MV(VM) pattern into my project as the project is growing. I have seen some WPF projects where the code-behind has NO CODE except for the InitializeComponent method, which I believe is the right way to go and just looks clean. Is this possible in Silverlight 3.0, that is, no code-behind?
Can anyone point me to some good Silverlight (3.0) MV(VM) tutorials / articles?
How to track the mouse position on the screen regardless of application.i.e. Whenever the user clicks or select something with mouse in any application, i want to display my own menu at that point itself.
Is there any way to get mouse position on the screen using c#?
If you had to explain Lambda expressions to a 5th grader, how would you do it? And what examples might you give, or resources might you point them to? I may be finding myself in the position of having to teach this to 5th grade level developers and could use some assistance.
Thanks very much.
i All,
I have deployed my site on internet and I am facing some formating issues, it's working fine in IE8, Firefox and Chrome but not in IE6.
I have used asp.net 3.5, please let me know where I have done mistakes.
http://www.anujtripathi.net/AboutMe.aspx
and the same in image gallery menu, as I don't have 10 reputation point I can't paste another URL here.
Thanks
Is it possible to send an email to multiple recipients, but on the receiving end, the recipient will only see his/her email address? If so how do I do this and could you point me to some references?
Thanks
check this out
Type configPropType = configurableProp.getPropertyType();
string attValue = xmlelement.GetAttribute(configurableProp.getName());
configProps[configurableProp.getName()] = attValue;
At the point where I am setting the value that got read in from XML it turns out the assigning object needs to be parsed to the correct type for it to work. I need something like.
configProps[configurableProp.getName()] = configPropType.ParseToThisType(attValue);
Looked around on msdn but its a very confusing place.
Considering that we're all constantly learning, we've all got to come across a point where we learn something just awesome that improves our code or parts of it significantly.
The question is, when you've learned some new technique, strategy or whatever, do your or should you go back to code that you know works, but could be so much better/maintainable/faster/generally improved and implement this new knowledge?
I understand the concept of "if it ain't broke, don't fix it" but when does that become losing pride in code you've already written and what does it say for refactoring.
is there a way that if the following class is created; I can grab a list of attributes that exist. (this class is just an bland example, it is not my task at hand)
class new_class():
def __init__(self, number):
self.multi = int(number) * 2
self.str = str(number)
a = new_class(2)
print(', '.join(a.SOMETHING))
* the attempt is that "multi, str" will print. the point here is that if a class object has attributes added at different parts of a script that I can grab a quick listing of the attributes which are defined.
RubyParser.new.parse "1+1"
s(:call, s(:lit, 1), :+, s(:array, s(:lit, 1)))
Above code is from this link
Why there is array after + in the Sexp. I am just trying to learn ruby parser and the whole AST thing. I have been programming for a while but have no formal education in computer science. So do point to good article which explains AST etc. Please no dragon book. I tried couple of times but couldn't understand much of that book
Hello everyone,
I have a little problem picking the right language to write my daemon,
I am confused between C and C++, I want to use C++ because it is more expanded than C,
but I want to use C because it is the starting point of everything in linux,
I want to go for C++ as I have many resources about it, so, does it make any difference if I pick C++ instead of C?
and what I will have good if I learn C more?
I feel like if I go into C++ I will cover C within C++...
Regards
Can anyone point me to some documentation on how to write scripts in Python (or Perl or any other Linux friendly script language) that generate C++ code from XML or py files from the command line. I'd like to be able to write up some xml files and then run a shell command that reads these files and generates .h files with fully inlined functions, e.g. streaming operators, constructors, etc.
Let's take for example a single file committed in CVS with the following history.
test.cpp
rev 1.1
rev 1.2
rev 1.3
How do I revert to rev 1.2 discarding the changes in 1.3 and then continue to make modification from that point on?
is there a way to find out, where a function in PHP was called from?
example:
function epic()
{
fail();
}
function fail()
{
//at this point, how do i know, that epic() has called this function?
}
how can I change the background of an ImageView from java? I have an ImageView and at a certain point I need to change the image that it displays (set in the styles). I tried to do it like this:
placeHolder.setImageDrawable(myDrawb);
but it looks like the old image remains there and it is partially covered but the new one (which in my case has different shape).
hope you guys can help!
cheers
The idea is that I want to build a small app that detects if the webcam is being used and by what.
I have thought about seeing who has use of the Twain.dll somehow (like the way process explorer knows)
It's for a security style app that picks out weird webcam behaviour.
Ideally I would use C# as it's my strong point, but I'm guessing it won't be that nice.
Below are some point 3d
15.733798,20.019757,23.006311 15.733798,19.847666,23.006311
15.723798,19.847666,23.006311 15.723798,20.019757,23.006311
15.733798,20.019757,23.006311
and this is a vector
0.0,0.0,-0.1
Is it possible to draw a curve from the information above in sketchup?
Thank you
All I've been able to find is how to specify the sensor parameter:
http://code.google.com/apis/maps/documentation/v3/#SpecifyingSensor
But nowhere does it say how to actually USE it. Isn't the whole point to be able to get the user's current lat/long coordinates through the device GPS, or am I mistaken?
In many books weightx and weighty values are expressed in different ways:
some says 0.0 to 1.0
other says 0 to 100
other say until 1000
I'm a lot confused.
In the API these variables are double types so I think the first is correct but what does it meaning a value of 0.4 or 0.7? are percentage values, point values? relative of what?
stdinBackup = 4;
dup2(0, stdinBackup);
Currently I am doing the above to 'backup' stdin so that it can be restored from backup later after it has been redirected somewhere else. I have a feeling that I am doing a lot wrong? (eg arbitrarily assigning 4 is surely not right). Anyone point me in the right direction?
I am a c# developer which finds himself having to relearn c++. The last time I programmed in c++ was in school and am looking for good books as a refresher. I want something that assumes previous programming exposure and gets straight to the point. Is there a book similar to K&R for c++? I know the language is bloated so a book that covers a subset of c++ would be ideal.