I missed the application period for this year's Google Summer of Code.
I'm wondering if there's any other open source program like that somewhere, perhaps for fall or winter?
We have recently installed RHEL 5.4 on some existing 6.2 OS and migrated our code from RH 6.2 to RHEL 5.4. We are facing a difficulty that given a binary (on both OS they have same name) how can we distinguish that which gcc and OS it was build as there are some minor differences in between binary respectively made.
Please help
I have an input text box for search of input, the id of the text box is: id="search".
if a user enters 'cat' at first and hit search.
In the function, I get the value 'cat' by using the syntax:
var input = document.getElementById("search").value;
After that, the user enter 'dog' in the search box and hit search using the same function.
The function would assign 'dog' to the input variable.
How would I compare the current value (dog) to the previously entered value (cat)?
I have tried to assign the original input with a statement, something like
var orig = input;
but that would only overwrite the original input with the new input.
What is the logical approach to this problem.
hello.
I am developing functional domain specific embedded language within C++ to translate formulas into working code as concisely and accurately as possible. Right now my language looks something like this:
// implies two nested loops j=0:N, i=0,j
(range(i) < j < N)[T(i,j) = (T(i,j) - T(j,i))/e(i+j)];
// implies summation over above expression
sum(range(i) < j < N))[(T(i,j) - T(j,i))/e(i+j)];
I am looking for possible syntax improvements/extensions or just different ideas about expressing mathematical formulas as clearly and precisely as possible.
Can you give me some syntax examples relating to my question which can be accomplished in your language of choice which consider useful. In particular, if you have some ideas about how to translate the above code segments, I would be happy to hear them
Thank you
I currently have a machine with an Opteron 275 (2.2Ghz), which is a dual core CPU, and 4GB of RAM, along with a very fast hard drive. I find that when compiling even somewhat simple projects that use C++ templates (think boost, etc.), my compile times can take quite a while (minutes for small things, much longer for bigger projects). Unfortunately only one of the cores is pegged at 100%, so I know it's not the I/O, and it would seem that there is no way to take advantage of the other core for C++ compilation?
Hello guys,
I want to develop a virtual microphone driver. Please, do not say anything about DirectShow - that's not "the way". I need a solution that will work with any software including Skype and MSN. And DirectShow doesn't fit these requirements.
I found AVStream Filter-Centric Simulated Capture Driver (avssamp.sys) in Windows 7 WDK. What I need is an audio part of it. By default it reads avssamp.wav and plays it. But this driver is registered as WDM streaming capture device. And I want it in Audio Capture Device.
There are some posts in the web but they are all the same:
http://www.tech-archive.net/Archive/Development/microsoft.public.development.device.drivers/2005-05/msg00124.html
http://www.winvistatips.com/problem-installing-avssamp-audio-capture-sources-category-t184898.html
I think registering this filter-driver as audio capture device will make Skype recognize it as a microphone and thefore I will be able to push any PCM file as if it goes from mic.
If someone already faced this problem before, please help.
Thanks in advance.
Over the last few years F# has evolved into one of Microsoft's fully supported languages employing many ideas incubated in OCaml, ML and Haskell.
Over the last several years C# has extended it's general purpose features by introducing more and more functional language features: LINQ (list comprehension), Lamdas, Closures, Anonymous Delegates and more...
Given C#'s adoption of these functional features and F#'s taxonomy as an impure functional language (it allows YOU to access framework libraries or change shared state when a function is called if you want to) there is a strong similarity between the two languages although each has it's own polar opposite primary emphasis.
I'm interested in any successful models employing these two languages in your production polyglot programs and also the areas within production software (web apps, client apps, server apps) you have written in F# in the past year or so that you would previously have written in C#.
Suppose there is array
main[] = [a,b,c,....z];
a[] = [a1,a2,a3,....] ,
b[] = [b1,b2,b3,....]
and so on.
So if we generate combination in main.length of ordered then it looks like .....
a1 b1 c1, a1 b1 c2, a1 b1 c3 ......
a1 b2 c1, a1 b3 c1, .....
a2 b1 c1, a3 b1 c1, .....
and total count will be a.length * b.length * c.length ........ = ?
So write a code in any language to generate those combination. all the best.
alex
I'm all for learning and continual improving one’s self, and I believe you should have as many tools as possible in your toolbox. However, I was wondering if it was worth it learning Python, since I already know a couple of dynamic interpreted languages, including Perl. My background is mostly C/C++/Java/C#, but I’ve programmed in Perl quite a bit over the years.
I recently read Dive Into Python, as well as the tutorial for the Django framework for a new project where Python was suggested. However, I kept finding myself thinking that I can still accomplish much of the same stuff with Perl, so I’m not sure when I would choose a Python approach over one that I’m already familiar with. This is by no means meant to start any kind of language war, and I do recognize that language choice is quite subjective. I just wondering when one would make such a choice.
Suppose I have
val foo : Seq[Double] = ...
val bar : Seq[Double] = ...
and I wish to produce a seq where the baz(i) = foo(i) + bar(i). One way I can think of to do this is
val baz : Seq[Double] = (foo.toList zip bar.toList) map ((f: Double, b : Double) => f+b)
However, this feels both ugly and inefficient -- I have to convert both seqs to lists (which explodes with lazy lists), create this temporary list of tuples, only to map over it and let it be GCed. Maybe streams solve the lazy problem, but in any case, this feels like unnecessarily ugly. In lisp, the map function would map over multiple sequences. I would write
(mapcar (lambda (f b) (+ f b)) foo bar)
And no temporary lists would get created anywhere. Is there a map-over-multiple-lists function in Scala, or is zip combined with destructuring really the 'right' way to do this?
how to check whether 4 points in the plane define a square? what's the function which given a point and a value of the area of a square as input parameters returns four squares(define a corresponding type) with sides parallel to the x axis and y axis
this how i start:
#include <stdio.h>
#include<math.h>
struct point{
float x;
float y;
}
typedef struct point POINT;
struct square{
struct point p1;
struct point p2;
struct point p3;
struct point p4;
}
typedef struct square SQUARE;
int main()
{
int point;
printf("point coordinate");
printf("\n\n");
printf("enter data\n");
public class Test{
public static void main(String args[]){
int a = 0;
int b = 1;
int c = 10;
if ( a == 0 || b++ == c ){
a = b + c;
}else{
b = a + c;
}
System.out.println("a: " + a + ",b: " + b + ",c: " + c);
}
}
Ok, this is Java code and the output is
a: 11,b: 1,c: 10
And I believe the C acts same as Java in this case
That is because second condition(b++ == c) would never executed if the first condition is true in 'OR' operator.
There is a "NAME" for this. I just don't remember what it is.
Does anyone know what this is called??
Thanks in advance
I need to create Type 1 message and Type 3 message for NTLM handshaking. Is there any .Net API for this?
Essentially, the application is WPF based, but Socket is used in order to stream data from the server. Use of socket is a technical requirement, but the problem is when user needs to connect to the server using a proxy server. Further, if the proxy authorization is based on Ntlm, the client application needs to create Type 1 and Type 3 messages in order to handshake with the proxy server.
My question is: Is there any API already available in .NET libraries that can be consumed in order to create these different types of NTLM messages? Any help or alternatives will be greatly appreciated. Thanks in advance.
I'm writing a python script checking/monitoring several server/websites status(response time and similar stuff), it's a GUI program and I use separate thread to check different server/website, and the basic structure of each thread is using an infinite while loop to request that site every random time period(15 to 30 seconds), once there's changes in website/server each thread will start a new thread to do a thorough check(requesting more pages and similar stuff).
The problem is, my internet connection always got blocked/jammed/messed up after several hours running of this script, the situation is, from my script side I got urlopen error timed out each time it's requesting a page, and from my FireFox browser side I cannot open any site. But the weird thing is, the moment I close my script my Internet connection got back on immediately which means now I can surf any site through my browser, so it must be the script causing all the problem.
I've checked the program carefully and even use del to delete any connection once it's used, still get the same problem. I only use urllib2, urllib, mechanize to do network requests.
Anybody knows why such thing happens? How do I debug this problem? Is there a tool or something to check my network status once such situation occurs? It's really bugging me for a while...
By the way I'm behind a VPN, does it have something to do with this problem? Although I don't think so because my network always get back on once the script closed, and the VPN connection never drops(as it appears) during the whole process.
I want to divide the window into 2 parts. Each part I can draw a different thing. How can I do that in openGL ?
(Actually, my problem is I already drawn a picture on the window. Now I want to get some "space" out of it so I can draw something else. The original picture already took the whole window).
I appreciate if anybody could help.
Thanks.
Suppose I have a function with the following type signature:
g :: a -> a -> a -> b
I also have a list of as—let's call it xs—that I know will contain at least three items. I'd like to apply g to the first three items of xs. I know I could define a combinator like the following:
($$$) :: (a -> a -> a -> b) -> [a] -> b
f $$$ (x:y:z:_) = f x y z
Then I could just use g $$$ xs. This makes $$$ a bit like uncurry, but for a function with three arguments of the same type and a list instead of a tuple.
Is there a way to do this idiomatically using standard combinators? Or rather, what's the most idiomatic way to do this in Haskell? I thought trying pointfree on a non-infix version of $$$ might give me some idea of where to start, but the output was an abomination with 10 flips, a handful of heads and tails and aps, and 28 parentheses.
(NB: I know this isn't a terribly Haskelly thing to do in the first place, but I've come across a couple of situations where it seems like a reasonable solution, especially when using Parsec. I'll certainly accept "don't ever do this in real code" if that's the best answer, but I'd prefer to see some clever trick involving the ((->) r) monad or whatever.)
Are there any good OOP languages that you can use on Linux? Obviously Java comes to mind, even running C# under mono.
Looking for a language that can be used for all round development, web dev, desktop, services etc.
Besides Mono C# and Java anything else come to mind?
Big companies can afford higher salaries but it is harder to get noticed. Do you think that a talented programmer or somebody who is training himself to be really good could make more money in smaller companies?
I think smaller companies have a lower average, but maybe great programmers can get much more. What do you think?
I've heard a lot of people espouse the capabilities of LISP and its omnipotent macros. If LISP is such a great language, why isn't it being adopted more? What problems is LISP facing that is holding it back from (re)emerging as popular language? Is it something about LISP itself ("those brackets!" isn't the answer, is it?!), or its competitors (e.g. the dominance of Java, .NET)?
Here's a phrase that I heard a lot throughout high school and university computer science classes:
"That's not an issue for modern JVMs."
Usually this would come up in discussions about overall performance or optimization strategies. It was always treated as a kind of magical final answer, though, as if it makes issues no longer worth thinking about. And that just leads me to wonder: what are the differences between the prototypical "modern JVM" and older JVMs, really?
int i=10;
printf("Address of i = %u",&i);
Output:
Address if i = 3220204848
Output on re-execution:
Address of i = 3216532594
I get a new address of i each time I execute the program. What does this signify?
Hi everyone...
I'm doing some research on Simple Look Up Tables.
I have :
been thru wikipedia.
Googled Look-up tables
Browsed thedailywtf.com
Been thru several websites illustrating/documenting look-up table code.
Currently i am looking for any insight anyone can throw on the topic (LuTs).
Also, I am specifically looking for any anecdotes one would like to share (again on LuTs).
All content will be adequately acknowledge (or anonymised, if requested) in the article.
Thank You