Hello, we are designing a project that would listen to dialog between airport controllers and pilots to prevent runway incursions (eg. one airplane is taking off while other is crossing the runway). Our professor wants us to use Jena for knowledge base (or anything else but it should be some sort of rule-based engine). Inference is not t...
hello i want to solve a system of n linear equations containing n variables using genetic algorithm.
i am having difficulty in defining the crossover operation as the solution may consist of floating point values. how do i proceed. seems possible but this is my first encounter with genetic algorithms so your help would be great.
suppos...
I am writing a simple SMTP server and client. Server is in two parts receiver-SMTP and Sender SMTP. both will run in two different daemon services. The two modes this can run in is 'remote' and 'local'.
Since i am new to network programming I am having difficulty in even getting started. Any help in form of text, sample or skeleton code...
Hi,
I need to find smallest and second smallest number in a list.
Can I do this using single loop?
Also, we need to consider the case of two multiple occurences of a number.
Ex: 1. from list [20,30,90,50] output 20 ,30
2. from list [30,30,90,50] output 30 ,30
plz help
...
I wonder why in the following code, d is not being consed into x.
Any hints are much appreciated.
(defun it (x)
(setq f '(a b c))
(dolist (d f)
(cons d x))
(print x))
Thank you!
...
I have two student objects.
class Student{
int physics;
int english;
int chemistry;
}
I need to compare Student A marks in each subject with Student B's marks in all the subjects.
A marks in physics needs to be compared with B's marks in physics, english, chemistry.
Similarly A's english with all the three of B.
if there is atleast ...
Here is a simplified version of the code I use:
class Program
{
// Here is the ugly stuff
static void DoStuff(int[] uidArray)
{
int chunkCount = (int)Math.Ceiling(uidArray.Length / 10d);
for (int i = 0; i < chunkCount; i++)
{
// calculating the remaining uids.
// this is super...
Hi,
I have a list of numbers ex: list=[10,50,90,60]
I have this list to be sorted on the sum of any two elements. along with combination.
for ex: output list should contain 10+50,10+90,10+60,50+90,50+60,90+60 sorted in ascending.
i.e outputlist=[[60,10,50],[70,10,60]....
[similar to shake hand problems in permutations and combinatio...
What is the difference between identity and equality in OOP?
...
What is an abstract data type in object oriented programming? I gone through wiki, but I didn't get cleared. Please make me clear.
...
what is meant by Business,System,Interface,Persistence classes? Explain me with some examples?
...
There are 2 arrays given for ex.
A = [20,4,21,6,3]
B = [748,32,48,92,23......]
assuming B is very large and can hold all the elements of array A.
Find the way in which array B is in (containing all the elements of array A as well) sorted order.
Design an algorithm in the most efficient way.
...
Hi.
Let's say that we have two boxes of pencils (in first box just blue and in second just red pencils). So the question now is, in how many ways can we put x red and y blue pencils in the line?
Example: we have 3 Red pencils, and 1 Blue. Then we have 4 different ways.
Combinations: BRRR, RBRR, RRBR, RRRB.
So with 10 Red and 10 Blue ...
Hi everyone,
I need to translate what is commented within the method, to assembler. I have a roughly idea, but can't.
Anyone can help me please? Is for an Intel x32 architecture:
int
secuencia ( int n, EXPRESION * * o )
{
int a, i;
//--- Translate from here ...
for ( i = 0; i < n; i++ ){
a = evaluarExpresion( *o );
o++;
...
Hi,
I'm trying to create a simple shell in C for Unix. I've been able to do all the parsing of commands and execution, but I'm having a problem with piping. I think the problem is that I'm not hooking into the correct pipe for the input of the second command.
For example, if I type "ls | wc", it will pause after the "wc" command, which...
If T is a balanced BST with n elements, L its left subtree and R its right one, how can I prove that its depth is less than or equal to 2log(n) + 1?
There is a proof by induction which I have but I don't get it.
(I understand that stackoverflow is mainly programming oriented but I found some questions about binary search trees and dec...
Create a recursive function to print a multidigit number vertically. For example, 2378 should be
printed
2
3
7
8
Test your program with numbers of different length.
...
Hi, ive been set an assignment for my java programming course and ive reached a point where i really cant work out the next step. Im wondering if anyone can help me with this code please. The assignment is as follows:
A file exists which contains the total rainfall for each month in a year, one double value on each line. Write a program...
import java.lang.Math;
public class NewtonIteration {
public static void main(String[] args) {
System.out.print(rootNofX(2,9));
}
// computes x^n
public static double power(double x, int n) {
if (n==0) {
return 1;
}
double Ergebnis = 1;
for (int i=0; i<=Math.abs(n)-1; i++) {
Ergebn...
Im a trying to find a sublist of a list. Meaning if list1 say [1,5] is in list2 say [1,4,3,5,6] than it should return True. What I have so far is this:
for nums in l1:
if nums in l2:
return True
else:
return False
This would be true but I'm trying to return True only if list1 is in list2 in the respective order...