chunk_id
large_stringlengths
9
11
question_id
large_stringlengths
6
8
language
large_stringclasses
1 value
chunk_index
int64
0
4
chunk_text
large_stringlengths
115
2.62k
sparse_text
large_stringlengths
111
4.37k
dense_vector
listlengths
3.58k
3.58k
sparse_indices
listlengths
9
217
sparse_values
listlengths
9
217
export_source
large_stringclasses
1 value
40792454_c1
40792454
prolog
1
is true, but when asked to output all the possible answers I only get: ?- diff([1, 2, 3, 4], [2], R). R = [1, 3, 4] ; R = [1, 4, 3] ; R = [1, 3, 4] ; false. Edit: expected output - all of the variations ?- diff([1, 2, 3, 4], [2], R). R = [1, 3, 4] ; R = [1, 4, 3] ; R = [3, 1, 4] ; R = [3, 4, 1] ; R = [4, 1, 3] ; R = [...
is true, but when asked to output all the possible answers I only get: ?- diff([1, 2, 3, 4], [2], R). R = [1, 3, 4] ; R = [1, 4, 3] ; R = [1, 3, 4] ; false. Edit: expected output - all of the variations ?- diff([1, 2, 3, 4], [2], R). R = [1, 3, 4] ; R = [1, 4, 3] ; R = [3, 1, 4] ; R = [3, 4, 1] ; R = [4, 1, 3] ; R = [...
[ -0.0078125, 0.0027923583984375, 0.017333984375, 0.0037384033203125, -0.0205078125, 0.029052734375, -0.00099945068359375, 0.00201416015625, 0.025634765625, -0.01544189453125, 0.0024566650390625, -0.001251220703125, 0.0194091796875, 0.0250244140625, -0.00347900390625, 0.01129150390625, ...
[ 83, 29568, 1284, 37170, 47, 140992, 756, 70, 7722, 35166, 7, 87, 4734, 2046, 705, 9, 71337, 418, 116, 138, 201, 33579, 627, 2203, 68252, 98320, 42079, 84751, 111, 143834, 617, 124519, 28864, 26073, 11249, 23, 454, 6562 ]
[ 0.09228515625, 0.2353515625, 0.08892822265625, 0.10491943359375, 0.00360107421875, 0.24560546875, 0.0858154296875, 0.067626953125, 0.184814453125, 0.2313232421875, 0.10888671875, 0.03887939453125, 0.114990234375, 0.0966796875, 0.1173095703125, 0.07012939453125, 0.2646484375, 0.0327...
embed
50661300_c0
50661300
prolog
0
Title: In what category can we put X/Y or X:Y in Prolog Problem title: In what category can we put X/Y or X:Y in Prolog Tags: nomenclature, syntax, prolog Problem: In what category can we put X/Y or X:Y in Prolog if I use something like this in Prolog test(X/Y). or test(X:Y). So X:Y and X/Y are considered as a variable...
In what category can we put X/Y or X:Y in Prolog In what category can we put X/Y or X:Y in Prolog nomenclature syntax prolog X:Y Prolog In what category can we put X/Y or X:Y in Prolog if I use something like this in Prolog or So X:Y and X/Y are considered as a variable, or as a string? In what category we can put it?
[ 0.018798828125, -0.00592041015625, 0.006683349609375, 0.0031890869140625, -0.01470947265625, 0.0035247802734375, 0.0029754638671875, -0.000396728515625, -0.01177978515625, -0.0098876953125, 0.000095367431640625, -0.01019287109375, -0.01116943359375, -0.0218505859375, 0.005126953125, -0...
[ 360, 95487, 831, 3884, 1193, 64, 1723, 707, 12, 23, 1250, 4867, 2367, 642, 50372, 18347, 502, 4527, 136, 90698, 77336, 79315 ]
[ 0.026275634765625, 0.2060546875, 0.06158447265625, 0.0684814453125, 0.1641845703125, 0.1749267578125, 0.2081298828125, 0.0310516357421875, 0.05517578125, 0.04095458984375, 0.123046875, 0.2266845703125, 0.004913330078125, 0.011688232421875, 0.011260986328125, 0.038543701171875, 0.0675...
embed
6483592_c0
6483592
prolog
0
Title: How to implement AIML in Prolog? Problem title: How to implement AIML in Prolog? Tags: artificial-intelligence, expert-system, aiml, prolog Problem: How to implement AIML in Prolog? AIML files: http://www.alicebot.org/aiml/aaa/ I want to make these AIML files the knowledge base of my Prolog program. Help me. Tha...
How to implement AIML in Prolog? How to implement AIML in Prolog? artificial-intelligence expert-system aiml prolog How AIML Prolog How to implement AIML in Prolog? AIML files: http://www.alicebot.org/aiml/aaa/ I want to make these AIML files the knowledge base of my Prolog program. Help me. Thanks in advance. P.S. Exc...
[ 0.038330078125, 0.012939453125, 0.00244140625, 0.042236328125, 0.0072021484375, 0.035888671875, 0.00738525390625, -0.0037841796875, -0.002410888671875, -0.0196533203125, 0.01544189453125, 0.01300048828125, -0.033203125, 0.009765625, 0.0272216796875, -0.005126953125, 0.00531005859375,...
[ 11249, 47, 29479, 38730, 39456, 23, 1250, 4867, 32, 66733, 130687, 26808, 16751, 1300, 7237, 502, 102158, 11, 13348, 9190, 1478, 508, 84022, 3444, 3249, 6097, 51359, 3647, 1528, 39527, 163, 22362, 129745, 110823, 4032, 6494, 175457 ]
[ 0.14208984375, 0.100341796875, 0.2578125, 0.1939697265625, 0.312744140625, 0.1583251953125, 0.2164306640625, 0.287353515625, 0.0152130126953125, 0.10284423828125, 0.099853515625, 0.1417236328125, 0.1143798828125, 0.1248779296875, 0.2286376953125, 0.161865234375, 0.1812744140625, 0....
embed
73926919_c0
73926919
prolog
0
Title: Get elements of arbitrary nested lists Problem title: Get elements of arbitrary nested lists Tags: prolog, nested, list, swi-prolog Problem: Get elements of arbitrary nested lists I am looking for some predicate in SWI-Prolog to get the elements of some arbitrary nested list. Means, if I e.g. have the list: L = ...
Get elements of arbitrary nested lists Get elements of arbitrary nested lists prolog nested list swi-prolog Get Get elements of arbitrary nested lists I am looking for some predicate in SWI-Prolog to get the elements of some arbitrary nested list. Means, if I e.g. have the list: I get as result:
[ -0.01055908203125, 0.0032806396484375, -0.0076904296875, -0.00095367431640625, -0.006378173828125, 0.0245361328125, 0.01141357421875, -0.0189208984375, 0.004852294921875, -0.05029296875, 0.0244140625, -0.0072021484375, -0.0240478515625, 0.0024871826171875, -0.005645751953125, 0.0106201...
[ 20779, 80854, 111, 61799, 1294, 8512, 71, 5303, 502, 4867, 91, 2452, 3454, 16487, 1653, 2063, 159, 38969, 10752, 2046, 16750 ]
[ 0.11566162109375, 0.168701171875, 0.0435791015625, 0.121337890625, 0.0986328125, 0.205810546875, 0.1094970703125, 0.187255859375, 0.099365234375, 0.18017578125, 0.003875732421875, 0.1455078125, 0.087158203125, 0.0208587646484375, 0.06707763671875, 0.093017578125, 0.040740966796875, ...
embed
33696252_c0
33696252
prolog
0
Title: Transforming atoms in prolog variables Problem title: Transforming atoms in prolog variables Tags: prolog Problem: Transforming atoms in prolog variables If I have a list of atoms, is it possible transform that in a list of prolog variables? If yes, anyone can give me an example? Example: ?- atom_to_variable([x1...
Transforming atoms in prolog variables Transforming atoms in prolog variables prolog Transforming atom_to_variable Transforming atoms in prolog variables If I have a list of atoms, is it possible transform that in a list of prolog variables? If yes, anyone can give me an example? Example: ?- atom_to_variable([x1, x2, x...
[ 0.01214599609375, 0.00106048583984375, -0.009033203125, 0.0181884765625, 0.003448486328125, 0.0029296875, 0.00069427490234375, 0.0157470703125, -0.00238037109375, -0.0263671875, 0.005889892578125, 0.00799560546875, 0.004791259765625, 0.00762939453125, 0.00335693359375, -0.0081787109375...
[ 11062, 5037, 34627, 7, 23, 502, 4867, 77336, 214, 188, 21690, 2886, 765, 5303, 83, 442, 7722, 27198, 450, 72272, 27781, 89536, 705, 425, 418, 1022, 304, 96386, 310, 2203, 1542, 1193 ]
[ 0.0843505859375, 0.1741943359375, 0.221923828125, 0.052581787109375, 0.068603515625, 0.1500244140625, 0.2156982421875, 0.25146484375, 0.01171875, 0.132568359375, 0.204345703125, 0.16943359375, 0.014129638671875, 0.1619873046875, 0.053619384765625, 0.06524658203125, 0.154541015625, ...
embed
5059054_c0
5059054
prolog
0
Title: Comparison of two Terms Problem title: Comparison of two Terms Tags: prolog Problem: Comparison of two Terms Can someone tell me whats going wrong in this code! testit :- read(Term1), read(Term2), (Term1 == Term2) -> write(Term1); write(Term2). ?- testit. 7. 8. _L139. true. ____ How I can print the value of Term...
Comparison of two Terms Comparison of two Terms prolog Comparison Terms Term1 Term2 _L139 ____ Comparison of two Terms Can someone tell me whats going wrong in this code! How I can print the value of Term2 in else part.???
[ 0.003082275390625, 0.01495361328125, -0.005340576171875, 0.0137939453125, 0.007171630859375, 0.000400543212890625, 0.0167236328125, 0.02197265625, -0.0086669921875, 0.006072998046875, 0.04150390625, 0.0272216796875, 0.0016326904296875, 0.0030517578125, 0.011962890625, 0.0010986328125, ...
[ 113307, 40514, 6626, 165504, 111, 502, 4867, 2994, 39, 418, 304, 133826, 22008, 14192, 163, 2367, 7730, 44691, 903, 18151, 831, 28412, 34292, 37076, 2831, 7273 ]
[ 0.167236328125, 0.1326904296875, 0.095947265625, 0.224609375, 0.047576904296875, 0.10736083984375, 0.156005859375, 0.1646728515625, 0.0660400390625, 0.062347412109375, 0.190673828125, 0.1546630859375, 0.00489044189453125, 0.0794677734375, 0.0233917236328125, 0.002040863037109375, 0.0...
embed
4098844_c0
4098844
prolog
0
Title: Writing length and mirror in Prolog Problem title: Writing length and mirror in Prolog Tags: prolog Problem: Writing length and mirror in Prolog I need 2 programs that create below example outputs: 1) ?-length_full([a,[b,c],[d]],R). R=4 2) ?-mirror([a,[b,c],[d,e]],R). R=[[e,d],[c,b],a] I tried but couldn't write...
Writing length and mirror in Prolog Writing length and mirror in Prolog prolog Writing Prolog length_full Writing length and mirror in Prolog I need 2 programs that create below example outputs: 1) 2) I tried but couldn't write the programs...so please help me!
[ 0.02294921875, 0.0189208984375, -0.00092315673828125, 0.013427734375, -0.0172119140625, 0.017333984375, 0.00537109375, -0.0028839111328125, 0.019775390625, -0.01190185546875, 0.0021514892578125, -0.0111083984375, 0.0281982421875, 0.00701904296875, 0.0198974609375, -0.0218505859375, 0...
[ 213185, 140909, 136, 191551, 23, 1250, 4867, 502, 25724, 3871, 116, 103391, 28282, 35064, 27781, 140992, 37842, 69427, 33022, 4358 ]
[ 0.1798095703125, 0.1859130859375, 0.06842041015625, 0.29638671875, 0.045989990234375, 0.172607421875, 0.256591796875, 0.10321044921875, 0.1510009765625, 0.08038330078125, 0.06982421875, 0.171875, 0.08966064453125, 0.068603515625, 0.151123046875, 0.14404296875, 0.05743408203125, 0.0...
embed
5107745_c0
5107745
prolog
0
Title: User Input , How can we do it? Problem title: User Input , How can we do it? Tags: prolog Problem: User Input , How can we do it? How can we get something from user in prolog : for example : animal(dog). animal(cat). write('please type animal name:'),nl. /* How to read from user and store it to X and then check ...
User Input , How can we do it? User Input , How can we do it? prolog user Input How User Input , How can we do it? How can we get something from user in prolog : for example :
[ -0.01123046875, -0.000858306884765625, 0.00909423828125, 0.0224609375, -0.0016937255859375, 0.0174560546875, 0.0211181640625, 0.0185546875, -0.0040283203125, -0.06982421875, -0.0013580322265625, 0.00396728515625, -0.0211181640625, -0.01214599609375, 0.02294921875, -0.002166748046875, ...
[ 53400, 360, 7077, 11249, 831, 642, 54, 442, 502, 4867, 38937, 2046, 9844, 1295, 23 ]
[ 0.2265625, 0.2022705078125, 0.24951171875, 0.092529296875, 0.10650634765625, 0.08624267578125, 0.073974609375, 0.10821533203125, 0.1512451171875, 0.2039794921875, 0.208984375, 0.1436767578125, 0.0916748046875, 0.1529541015625, 0.06072998046875 ]
embed
64862057_c0
64862057
prolog
0
Title: How to make a sublist in Prolog Problem title: How to make a sublist in Prolog Tags: list, prolog Problem: How to make a sublist in Prolog How would I do this in prolog? I have already got this to make a sublist, but now need to make sure the first and last element of the second list are not included in the firs...
How to make a sublist in Prolog How to make a sublist in Prolog list prolog How Prolog How to make a sublist in Prolog How would I do this in prolog? I have already got this to make a sublist, but now need to make sure the first and last element of the second list are not included in the first list.
[ -0.00153350830078125, 0.0028076171875, 0.0174560546875, 0.00531005859375, -0.019287109375, 0.01409912109375, -0.0341796875, 0.01470947265625, 0.0135498046875, -0.006591796875, 0.0050048828125, 0.0038604736328125, -0.0084228515625, 0.0198974609375, 0.007781982421875, 0.01104736328125, ...
[ 11249, 3249, 10, 1614, 6562, 23, 1250, 4867, 5303, 502, 54, 4568, 12830, 17932, 959, 99201 ]
[ 0.043365478515625, 0.1148681640625, 0.064208984375, 0.23291015625, 0.264892578125, 0.050750732421875, 0.1527099609375, 0.2213134765625, 0.1644287109375, 0.12005615234375, 0.009368896484375, 0.067626953125, 0.0802001953125, 0.07672119140625, 0.0236663818359375, 0.04327392578125 ]
embed
26504738_c0
26504738
prolog
0
Title: SWI Prolog escape quotes Problem title: SWI Prolog escape quotes Tags: prolog, string, swi-prolog Problem: SWI Prolog escape quotes I need to put " " around a String in prolog. I get the input from another program and as it looks I can't escape the " in this program, so i have to add the " in prolog otherwise th...
SWI Prolog escape quotes SWI Prolog escape quotes prolog string swi-prolog SWI Prolog SWI Prolog escape quotes I need to put " " around a String in prolog. I get the input from another program and as it looks I can't escape the " in this program, so i have to add the " in prolog otherwise the prolog statement doesn't w...
[ 0.0272216796875, 0.01416015625, -0.0140380859375, 0.0091552734375, -0.01513671875, 0.01214599609375, 0.0181884765625, 0.009765625, -0.006683349609375, -0.029541015625, 0.00518798828125, -0.019775390625, -0.036865234375, 0.0142822265625, 0.0101318359375, 0.004302978515625, -0.00769042...
[ 159, 38969, 1250, 4867, 144281, 66747, 7, 502, 79315, 91, 2452, 3454, 87, 3871, 3884, 44, 10932, 10, 23351, 214, 23, 107730, 1528, 831, 70, 765, 15190, 63805, 4488, 4358 ]
[ 0.0894775390625, 0.2437744140625, 0.1658935546875, 0.2418212890625, 0.2276611328125, 0.2333984375, 0.0234832763671875, 0.1712646484375, 0.1795654296875, 0.049407958984375, 0.19384765625, 0.10260009765625, 0.004852294921875, 0.1005859375, 0.0830078125, 0.137451171875, 0.1488037109375,...
embed
55306047_c0
55306047
prolog
0
Title: Call different predicate if variable is not instantiated Problem title: Call different predicate if variable is not instantiated Tags: prolog Problem: Call different predicate if variable is not instantiated Having this snippet foo :- getVar(X). How can I do a really simple thing such as: "if the variable X come...
Call different predicate if variable is not instantiated Call different predicate if variable is not instantiated prolog Call Call different predicate if variable is not instantiated Having this snippet How can I do a really simple thing such as: "if the variable X comes out of getVar instatiated, call bar/1 else call ...
[ 0.0203857421875, 0.00634765625, -0.016357421875, 0.0093994140625, 0.01080322265625, 0.006317138671875, 0.016845703125, 0.0045166015625, 0.00714111328125, -0.006805419921875, 0.02392578125, 0.017578125, -0.018798828125, -0.00396728515625, 0.023193359375, -0.0078125, 0.0157470703125, ...
[ 26265, 12921, 1653, 2063, 67, 2174, 77336, 83, 959, 34648, 14, 27686, 502, 4867, 93, 58134, 831, 54, 6183, 8781, 13580, 3190, 1193, 32497, 1810, 2046, 81827, 23, 97868, 11782, 1909, 11583, 37076, 16627 ]
[ 0.182861328125, 0.2108154296875, 0.174560546875, 0.1954345703125, 0.08209228515625, 0.12078857421875, 0.27099609375, 0.103759765625, 0.1859130859375, 0.1351318359375, 0.11029052734375, 0.09344482421875, 0.10272216796875, 0.162841796875, 0.0007576942443847656, 0.0258941650390625, 0.02...
embed
7427383_c0
7427383
prolog
0
Title: Prolog: insert in a tuple Problem title: Prolog: insert in a tuple Tags: list, prolog Problem: Prolog: insert in a tuple In a 3-tuple, how can I put the character '#' as the middle term of the tuple. predicate: duplicate(L1,L2). ?­ duplicate([30,40,50],X). X = [ (30, #, 30), (40, #, 40), (50, #, 50)]. ?­ duplica...
Prolog: insert in a tuple Prolog: insert in a tuple list prolog Prolog Prolog: insert in a tuple In a 3-tuple, how can I put the character '#' as the middle term of the tuple. predicate: duplicate(L1,L2). ?­ duplicate([30,40,50],X). X = [ (30, #, 30), (40, #, 40), (50, #, 50)]. ?­ duplicate([80],X). X = [ (80, #, 80)]....
[ 0.01123046875, 0.01251220703125, 0.00982666015625, 0.007049560546875, -0.00860595703125, 0.0172119140625, -0.031005859375, -0.0010528564453125, 0.01470947265625, -0.0146484375, -0.0123291015625, -0.016357421875, -0.002166748046875, 0.0135498046875, -0.0091552734375, 0.037841796875, 0...
[ 1250, 4867, 183540, 23, 370, 8705, 12, 5303, 502, 5691, 458, 3642, 831, 87, 3884, 62816, 4904, 237, 86991, 13579, 111, 1653, 2063, 67, 171763, 866, 418, 10461, 1197, 2839, 2525, 1542, 1193, 38774, 468, 496, 114354, 1112, 83875, 836, 483...
[ 0.1334228515625, 0.2078857421875, 0.233154296875, 0.1102294921875, 0.1474609375, 0.2210693359375, 0.003692626953125, 0.1551513671875, 0.0770263671875, 0.1451416015625, 0.1656494140625, 0.058013916015625, 0.04315185546875, 0.002166748046875, 0.1263427734375, 0.1868896484375, 0.2073974...
embed
6094500_c0
6094500
prolog
0
Title: Prolog remove multiple elements from a list Problem title: Prolog remove multiple elements from a list Tags: list, prolog Problem: Prolog remove multiple elements from a list I know how to remove an element from a list but is there a way to remove more than one elements from a list? For example, deletelist([a,b,...
Prolog remove multiple elements from a list Prolog remove multiple elements from a list list prolog a the Prolog Prolog remove multiple elements from a list I know how to remove an element from a list but is there a way to remove more than one elements from a list? For example,
[ 0.00653076171875, 0.004974365234375, 0.003204345703125, 0.0234375, -0.025390625, 0.020263671875, 0.010009765625, 0.0034027099609375, 0.0093994140625, -0.0019378662109375, 0.00118255615234375, -0.00872802734375, 0.00160980224609375, 0.002960205078125, -0.0057373046875, 0.00970458984375,...
[ 1250, 4867, 87388, 48716, 80854, 1295, 10, 5303, 502, 70, 3714, 3642, 47, 12830, 3917, 1286, 3501, 1632 ]
[ 0.1817626953125, 0.24169921875, 0.165283203125, 0.238037109375, 0.2149658203125, 0.16455078125, 0.055145263671875, 0.2193603515625, 0.127197265625, 0.0162353515625, 0.039581298828125, 0.033721923828125, 0.03759765625, 0.15380859375, 0.06097412109375, 0.1357421875, 0.103515625, 0.09...
embed
7557139_c0
7557139
prolog
0
Title: How to convert integer to decimal point in PROLOG? Problem title: How to convert integer to decimal point in PROLOG? Tags: prolog, numbers, integer, decimal Problem: How to convert integer to decimal point in PROLOG? How to convert integer to decimal point in PROLOG? Example, imagine I assign Integer = 10 How do...
How to convert integer to decimal point in PROLOG? How to convert integer to decimal point in PROLOG? prolog numbers integer decimal How PROLOG How to convert integer to decimal point in PROLOG? How to convert integer to decimal point in PROLOG? Example, imagine I assign Integer = 10 How do I change integer's value to ...
[ 0.0159912109375, 0.002288818359375, -0.000904083251953125, 0.00689697265625, -0.004486083984375, 0.00830078125, -0.01708984375, -0.01409912109375, -0.00933837890625, 0.0155029296875, -0.00153350830078125, -0.0098876953125, -0.0234375, 0.01446533203125, 0.02001953125, -0.00665283203125,...
[ 11249, 47, 96760, 892, 1505, 32380, 2749, 6275, 10514, 47510, 23, 502, 4867, 101935, 89536, 8705, 28987, 87, 95486, 44401, 2203, 209, 54, 15549, 34292, 15504, 53855, 2858 ]
[ 0.0684814453125, 0.09033203125, 0.1456298828125, 0.1502685546875, 0.1427001953125, 0.2044677734375, 0.1802978515625, 0.1749267578125, 0.1492919921875, 0.230224609375, 0.034912109375, 0.138427734375, 0.2261962890625, 0.12109375, 0.01190185546875, 0.005279541015625, 0.1422119140625, ...
embed
58301544_c0
58301544
prolog
0
Title: How to make a negative fact in PROLOG Problem title: How to make a negative fact in PROLOG Tags: prolog Problem: How to make a negative fact in PROLOG If I have a fact "Anna is a person" in PROLOG I write for example: person(anna). But what do I write if I have a fact "table is not a Person". I tried not(person(...
How to make a negative fact in PROLOG How to make a negative fact in PROLOG prolog How PROLOG How to make a negative fact in PROLOG If I have a fact "Anna is a person" in PROLOG I write for example: But what do I write if I have a fact "table is not a Person". I tried But this doesn't work. How do I write negative fact...
[ 0.0196533203125, 0.0087890625, 0.0142822265625, 0.0186767578125, -0.01116943359375, 0.007232666015625, 0.006683349609375, -0.007354736328125, -0.01104736328125, -0.00909423828125, -0.017333984375, -0.0118408203125, -0.0184326171875, 0.0201416015625, 0.0087890625, 0.00109100341796875, ...
[ 11249, 3249, 10, 40907, 15824, 23, 10514, 47510, 47, 502, 4867, 139701, 83, 3445, 33022, 2367, 2174, 765, 22819, 959, 15270, 37842, 18, 4488 ]
[ 0.0606689453125, 0.12255859375, 0.0673828125, 0.2442626953125, 0.2467041015625, 0.039825439453125, 0.1630859375, 0.2398681640625, 0.00634765625, 0.1119384765625, 0.189697265625, 0.1990966796875, 0.090087890625, 0.1263427734375, 0.1572265625, 0.0086669921875, 0.00933837890625, 0.006...
embed
36119519_c1
36119519
prolog
1
|foo]|bar], _G8188) ? Fail: (8) remove_integers([bar, 1, 2, foo], [[]|foo], _G8188) ? Fail: (7) remove_integers([foo, bar, 1, 2, foo], [], _G8188) ? false. So besides the fact that the intermediary list looks weird [[[]|foo]|bar] I do not understand why at some point it starts removing the items that are already in the...
|foo]|bar], _G8188) ? Fail: (8) remove_integers([bar, 1, 2, foo], [[]|foo], _G8188) ? Fail: (7) remove_integers([foo, bar, 1, 2, foo], [], _G8188) ? false. So besides the fact that the intermediary list looks weird [[[]|foo]|bar] I do not understand why at some point it starts removing the items that are already in the...
[ 0.00341796875, 0.01531982421875, -0.0026397705078125, 0.0263671875, -0.007080078125, 0.0196533203125, -0.0169677734375, 0.00311279296875, -0.0036773681640625, -0.0013275146484375, 0.0260009765625, 0.004913330078125, -0.0128173828125, 0.0206298828125, -0.0031585693359375, -0.01458740234...
[ 3584, 31, 1299, 724, 13556, 123641, 190355, 10021, 87388, 6191, 26255, 106, 116, 5775, 8696, 1909, 4, 98320, 81814, 6635, 5303, 33342, 179459, 959, 28219, 15400, 4034, 6496, 70, 55769, 21771, 23, 183278, 1290, 28864, 26073, 1250, 4867, 2626...
[ 0.1351318359375, 0.14453125, 0.18310546875, 0.0179443359375, 0.1431884765625, 0.237548828125, 0.186767578125, 0.1356201171875, 0.168212890625, 0.158935546875, 0.1455078125, 0.036468505859375, 0.0830078125, 0.1138916015625, 0.039825439453125, 0.1524658203125, 0.026153564453125, 0.13...
embed
12886179_c0
12886179
prolog
0
Title: Prolog: How to check if a predicate exists? Problem title: Prolog: How to check if a predicate exists? Tags: prolog Problem: Prolog: How to check if a predicate exists? How can I check if a predicate exists in a Prolog program? That would be an exists/1 , like: ?- exists(some_predicate). false. ?- assert(some_pr...
Prolog: How to check if a predicate exists? Prolog: How to check if a predicate exists? prolog Prolog How some_predicate Prolog: How to check if a predicate exists? How can I check if a predicate exists in a Prolog program? That would be an exists/1 , like:
[ 0.019775390625, 0.006988525390625, 0.0126953125, 0.0213623046875, -0.00775146484375, 0.0247802734375, 0.0174560546875, 0.0191650390625, 0.00677490234375, -0.046630859375, 0.010009765625, 0.01226806640625, -0.0145263671875, -0.0230712890625, 0.032958984375, 0.0057373046875, 0.01245117...
[ 1250, 4867, 11249, 47, 12765, 2174, 10, 1653, 2063, 67, 32316, 7, 502, 3060, 19714, 831, 87, 23, 1528, 2806, 11583 ]
[ 0.1832275390625, 0.232666015625, 0.0994873046875, 0.085205078125, 0.233154296875, 0.13818359375, 0.060028076171875, 0.2213134765625, 0.25537109375, 0.1932373046875, 0.2149658203125, 0.109130859375, 0.112548828125, 0.037445068359375, 0.1878662109375, 0.031463623046875, 0.0077209472656...
embed
64889439_c1
64889439
prolog
1
^( 11 - 1) - 1, % double: 11 bits for Exponent format( "Sign : ~w~n", [Sign]), format( "Fraction: ~w~n", [Fraction]), format( "Exponent: ~w~n", [Exponent]), Double is Sign*Fraction*2^(Exponent-ExponentBias). % see IEEE 754 Code signals: Decoding, udp_receive, udp_received, Remaining, Long, Double, Sign, Fraction, Expon...
^( 11 - 1) - 1, % double: 11 bits for Exponent format( "Sign : ~w~n", [Sign]), format( "Fraction: ~w~n", [Fraction]), format( "Exponent: ~w~n", [Exponent]), Double is Sign*Fraction*2^(Exponent-ExponentBias). % see IEEE 754 Code signals: Decoding, udp_receive, udp_received, Remaining, Long, Double, Sign, Fraction, Expon...
[ 0.0167236328125, 0.0076904296875, -0.0050048828125, 0.005279541015625, 0.01153564453125, 0.026123046875, 0.00177001953125, -0.00787353515625, 0.00982666015625, 0.04833984375, -0.0013580322265625, -0.025146484375, 0.0079345703125, -0.0218505859375, -0.01031494140625, 0.0240478515625, ...
[ 13331, 534, 20, 4879, 106, 1745, 41929, 12, 4785, 7, 100, 5443, 54137, 9384, 218723, 434, 2306, 19, 108386, 10763, 830, 247, 19279, 107172, 83, 48838, 1639, 304, 9, 16882, 162, 194, 1957, 87, 129969, 188609, 28864, 26073, 262, 587, 6238...
[ 0.029266357421875, 0.22119140625, 0.128662109375, 0.156005859375, 0.11669921875, 0.1761474609375, 0.253173828125, 0.0665283203125, 0.25732421875, 0.111328125, 0.080322265625, 0.1768798828125, 0.28662109375, 0.206787109375, 0.2261962890625, 0.10888671875, 0.046661376953125, 0.049011...
embed
27081108_c0
27081108
prolog
0
Title: Represent following fact in prolog Problem title: Represent following fact in prolog Tags: prolog Problem: Represent following fact in prolog I am learning prolog. I am wondering about how can i represent following fact in prolog? "There are 300 miles between someCityA and someCityB". Anyone help please.I have s...
Represent following fact in prolog Represent following fact in prolog prolog Represent Represent following fact in prolog I am learning prolog. I am wondering about how can i represent following fact in prolog? "There are 300 miles between someCityA and someCityB". Anyone help please.I have searched for it enough but c...
[ 0.017578125, -0.01214599609375, 0.001861572265625, 0.005340576171875, -0.02001953125, -0.006103515625, 0.01953125, 0.00078582763671875, 0.02880859375, -0.0322265625, -0.00885009765625, 0.004486083984375, 0.0019683837890625, 0.00177001953125, -0.0198974609375, 0.0164794921875, 0.00527...
[ 853, 55247, 25632, 15824, 23, 502, 4867, 52080, 149016, 3642, 831, 17, 33636, 116959, 621, 2668, 43222, 17721, 3060, 115411, 284, 136, 571, 3630, 4358, 22936, 29806, 2967 ]
[ 0.09991455078125, 0.25439453125, 0.2176513671875, 0.19580078125, 0.086669921875, 0.1519775390625, 0.229736328125, 0.05584716796875, 0.04034423828125, 0.064697265625, 0.055755615234375, 0.0288848876953125, 0.274658203125, 0.075439453125, 0.09869384765625, 0.244384765625, 0.25390625, ...
embed
13492475_c0
13492475
prolog
0
Title: Prolog search element in a list and add Symbol Problem title: Prolog search element in a list and add Symbol Tags: prolog, numbers, list Problem: Prolog search element in a list and add Symbol I have, for example this number list: [1,2,3,4,5,6,7,8,9,10]. I have to search a number for example 7 and insert "$" BEF...
Prolog search element in a list and add Symbol Prolog search element in a list and add Symbol prolog numbers list Prolog Symbol Prolog search element in a list and add Symbol I have, for example this number list: I have to search a number for example 7 and insert "$" BEFORE and AFTER 7 : How can i do this?
[ -0.001495361328125, 0.00262451171875, 0.0113525390625, 0.0157470703125, -0.019287109375, 0.0216064453125, -0.01043701171875, 0.0284423828125, 0.0115966796875, -0.004302978515625, -0.003631591796875, -0.0150146484375, -0.01348876953125, 0.004486083984375, -0.0021209716796875, 0.00090408...
[ 1250, 4867, 33938, 12830, 5303, 136, 15190, 131899, 23, 502, 101935, 765, 27781, 14012, 100, 361, 183540, 4369, 9622, 61692, 28211, 14755, 831, 54, 903 ]
[ 0.14892578125, 0.2298583984375, 0.213134765625, 0.150146484375, 0.1729736328125, 0.0293731689453125, 0.1416015625, 0.2271728515625, 0.02557373046875, 0.1080322265625, 0.126953125, 0.0290679931640625, 0.054229736328125, 0.146728515625, 0.0016183853149414062, 0.11981201171875, 0.186401...
embed
59183699_c0
59183699
prolog
0
Title: How do we add each element of two lists in sequence in Prolog? Problem title: How do we add each element of two lists in sequence in Prolog? Tags: prolog, list Problem: How do we add each element of two lists in sequence in Prolog? Write a Prolog predicate seqadd/3 such that seqadd(X,Y,Z) succeeds when X and Y a...
How do we add each element of two lists in sequence in Prolog? How do we add each element of two lists in sequence in Prolog? prolog list How Prolog How do we add each element of two lists in sequence in Prolog? Write a Prolog predicate seqadd/3 such that seqadd(X,Y,Z) succeeds when X and Y are lists of integers of the...
[ 0.001373291015625, 0.0159912109375, -0.005218505859375, 0.031982421875, -0.0026092529296875, 0.0302734375, -0.0062255859375, 0.017333984375, 0.008056640625, -0.013671875, 0.0172119140625, 0.0084228515625, -0.01300048828125, 0.01806640625, 0.01068115234375, -0.006378173828125, -0.0008...
[ 11249, 642, 15190, 12638, 12830, 6626, 5303, 40, 944, 3956, 1250, 4867, 54, 502, 111, 23, 1653, 2063, 67, 126441, 71, 18113, 1542, 1723, 1511, 214493, 1193, 136, 990, 892, 5701, 140909, 567, 10554 ]
[ 0.08941650390625, 0.0438232421875, 0.200439453125, 0.15283203125, 0.2099609375, 0.1553955078125, 0.2109375, 0.06689453125, 0.135986328125, 0.127197265625, 0.189453125, 0.267822265625, 0.04412841796875, 0.1253662109375, 0.024627685546875, 0.02874755859375, 0.1014404296875, 0.1260986...
embed
43640411_c0
43640411
prolog
0
Title: List values in prolog Problem title: List values in prolog Tags: prolog Problem: List values in prolog There are the following variables: colour(blue). colour(red). colour(green). size(small). size(medium). size(large). price(10). price(25). price(40). I want to make a list that will return every possible compin...
List values in prolog List values in prolog prolog List List values in prolog There are the following variables: I want to make a list that will return every possible compination. Something like: Is it possible?
[ 0.0194091796875, -0.00823974609375, -0.009033203125, -0.011962890625, -0.002532958984375, 0.01513671875, -0.00616455078125, 0.007720947265625, 0.022705078125, -0.0181884765625, -0.01361083984375, 0.00130462646484375, 0.002166748046875, 0.00732421875, 0.01214599609375, 0.0208740234375, ...
[ 32036, 142424, 23, 502, 4867, 25632, 77336, 3444, 3249, 10, 5303, 1221, 30646, 11907, 7722, 9969, 73, 2320, 1884, 2071, 442 ]
[ 0.216552734375, 0.24169921875, 0.048797607421875, 0.1680908203125, 0.2432861328125, 0.052886962890625, 0.2220458984375, 0.090087890625, 0.069580078125, 0.0408935546875, 0.220458984375, 0.032379150390625, 0.1473388671875, 0.118896484375, 0.1715087890625, 0.124755859375, 0.168090820312...
embed
28923220_c0
28923220
prolog
0
Title: Errors while running compiled swi-prolog code Problem title: Errors while running compiled swi-prolog code Tags: prolog, runtime-error, swi-prolog Problem: Errors while running compiled swi-prolog code Code signals: Errors, main_write.pl, test.txt, utf8, Hello, stand_alone, c_main_write, main_wite.pl, ERROR, fil...
Errors while running compiled swi-prolog code Errors while running compiled swi-prolog code prolog runtime-error swi-prolog Errors main_write.pl test.txt utf8 Hello stand_alone c_main_write main_wite.pl ERROR filesex.pl:57 Initialization open_shared_object Linux Ubuntu SMP i686 i386 GNU SWI-Prolog Errors while running ...
[ 0.027099609375, 0.0115966796875, -0.004150390625, 0.007171630859375, -0.0164794921875, 0.000492095947265625, 0.000804901123046875, 0.002777099609375, -0.011962890625, -0.00732421875, -0.00421142578125, -0.0203857421875, -0.002655029296875, 0.019287109375, 0.0283203125, 0.00130462646484...
[ 212059, 12960, 51042, 375, 5974, 297, 91, 2452, 3454, 4867, 18151, 502, 11675, 6032, 188800, 5201, 434, 18781, 2424, 3034, 124326, 1019, 35378, 9157, 51684, 501, 24931, 14817, 13, 151206, 11435, 13802, 35315, 1890, 289, 9803, 67886, 187694, ...
[ 0.1783447265625, 0.05035400390625, 0.1287841796875, 0.0634765625, 0.19091796875, 0.0219268798828125, 0.05657958984375, 0.250244140625, 0.1549072265625, 0.204833984375, 0.1868896484375, 0.155029296875, 0.1148681640625, 0.045745849609375, 0.145263671875, 0.113525390625, 0.1021118164062...
embed
45090126_c0
45090126
prolog
0
Title: What does a hyphen at end of a term mean Problem title: What does a hyphen at end of a term mean Tags: prolog Problem: What does a hyphen at end of a term mean I'm trying to understand the statement and I can't find any thing about the -1/4 at the the end of the object term. I've tried searching but I'm not even...
What does a hyphen at end of a term mean What does a hyphen at end of a term mean prolog What What does a hyphen at end of a term mean I'm trying to understand the statement and I can't find any thing about the -1/4 at the the end of the object term. I've tried searching but I'm not even sure what to search for.
[ 0.0245361328125, 0.01080322265625, -0.005584716796875, 0.00019359588623046875, -0.01019287109375, -0.004852294921875, 0.009033203125, 0.02392578125, -0.004608154296875, -0.01953125, -0.01239013671875, -0.00830078125, -0.0084228515625, -0.034912109375, -0.016357421875, 0.00927734375, ...
[ 4865, 14602, 10, 2119, 88322, 99, 3564, 111, 13579, 29459, 502, 4867, 28219, 63805, 70, 20, 179431, 36746, 33938 ]
[ 0.0460205078125, 0.025909423828125, 0.031219482421875, 0.1451416015625, 0.2457275390625, 0.076171875, 0.186279296875, 0.08935546875, 0.215576171875, 0.1484375, 0.12109375, 0.2027587890625, 0.03070068359375, 0.1124267578125, 0.003662109375, 0.04296875, 0.199951171875, 0.18115234375,...
embed
58242937_c0
58242937
prolog
0
Title: Basics of using prolog swipl-stdio Problem title: Basics of using prolog swipl-stdio Tags: prolog, npm, node.js Problem: Basics of using prolog swipl-stdio Taken from https://www.npmjs.com/package/swipl-stdio How do I actually use this when the npm example only mentions a 'call'. How does one create a program an...
Basics of using prolog swipl-stdio Basics of using prolog swipl-stdio prolog npm node.js prolog Basics node.js Basics of using prolog swipl-stdio Taken from https://www.npmjs.com/package/swipl-stdio How do I actually use this when the npm example only mentions a 'call'. How does one create a program and then make a cal...
[ 0.01226806640625, 0.02099609375, -0.0028076171875, 0.022216796875, -0.02099609375, 0.0213623046875, 0.0255126953125, -0.014404296875, 0.0135498046875, -0.05419921875, 0.01190185546875, -0.01177978515625, -0.0311279296875, -0.0086669921875, 0.0142822265625, -0.007537841796875, 0.02355...
[ 91692, 17368, 502, 4867, 2452, 2424, 271, 5670, 25037, 39, 110, 112, 28175, 26822, 29102, 54, 20653, 4527, 903, 27781, 4734, 41392, 85763, 11249, 28282, 1528, 3249, 11782, 47, 90502, 9842, 1679 ]
[ 0.12646484375, 0.08349609375, 0.1226806640625, 0.2142333984375, 0.1705322265625, 0.216552734375, 0.1251220703125, 0.2235107421875, 0.11328125, 0.156982421875, 0.099609375, 0.11376953125, 0.14453125, 0.0855712890625, 0.0439453125, 0.010528564453125, 0.026824951171875, 0.145385742187...
embed
11023197_c0
11023197
prolog
0
Title: Swi Prolog, unloading source files Problem title: Swi Prolog, unloading source files Tags: file, swi-prolog, prolog Problem: Swi Prolog, unloading source files Is there a built-in predicate or a easy way to remove from the knowledge database of prolog a source files that has already been consulted? I've gone thr...
Swi Prolog, unloading source files Swi Prolog, unloading source files file swi-prolog prolog Swi Prolog Swi Prolog, unloading source files Is there a built-in predicate or a easy way to remove from the knowledge database of prolog a source files that has already been consulted? I've gone through the reference manual an...
[ 0.0289306640625, 0.0208740234375, 0.016357421875, 0.025634765625, -0.031005859375, 0.0028228759765625, -0.00927734375, 0.0111083984375, -0.008056640625, -0.047607421875, -0.005828857421875, -0.00390625, -0.01275634765625, -0.00506591796875, 0.016845703125, 0.01031494140625, -0.007751...
[ 105432, 1250, 4867, 51, 63033, 31344, 102158, 11435, 91, 2452, 3454, 502, 214, 88303, 73, 1653, 2063, 23468, 3917, 47, 87388, 1295, 51359, 63399, 10, 450, 1556, 21771, 147008, 91067, 23009, 18, 7413, 13580, 5809, 54 ]
[ 0.256103515625, 0.1756591796875, 0.2327880859375, 0.1361083984375, 0.1983642578125, 0.227783203125, 0.2083740234375, 0.1214599609375, 0.05291748046875, 0.203369140625, 0.1171875, 0.1353759765625, 0.00299072265625, 0.07098388671875, 0.039215087890625, 0.1207275390625, 0.1824951171875,...
embed
76086183_c1
76086183
prolog
1
], [[X1,X2,X3]|Ys],Rules, [Sol|Sols]) :- apply_rule(X1,X2,X3,Rules,Sol), triplets_helper([X2,X3|Xs], Ys,Rules, Sols). %Applies the rules to each triplet apply_rule(X,Y,Z,Rules,Re) :- rule(X,Y,Z,Rules,Re). my_append(L, [], [L]). my_append(L1,[L |L2], [L|L3]) :- my_append(L1, L2, L3). Code signals: My_append, Color, Rule...
], [[X1,X2,X3]|Ys],Rules, [Sol|Sols]) :- apply_rule(X1,X2,X3,Rules,Sol), triplets_helper([X2,X3|Xs], Ys,Rules, Sols). %Applies the rules to each triplet apply_rule(X,Y,Z,Rules,Re) :- rule(X,Y,Z,Rules,Re). my_append(L, [], [L]). my_append(L1,[L |L2], [L|L3]) :- my_append(L1, L2, L3). Code signals: My_append, Color, Rule...
[ -0.004669189453125, 0.0072021484375, 0.0145263671875, 0.012939453125, -0.005218505859375, -0.00164794921875, -0.01458740234375, 0.007568359375, 0.0242919921875, -0.03759765625, -0.0035552978515625, 0.004058837890625, -0.01177978515625, 0.0093994140625, -0.004119873046875, 0.01324462890...
[ 10114, 4, 110558, 1542, 418, 304, 96386, 58745, 1723, 7, 26951, 1577, 102588, 15772, 59911, 454, 882, 133, 363, 247, 162738, 933, 73866, 56, 990, 6678, 194, 1745, 39179, 25720, 70, 91736, 12638, 18, 1511, 4332, 79986, 759, 9007, 3611, 8...
[ 0.0885009765625, 0.025177001953125, 0.020050048828125, 0.127197265625, 0.088134765625, 0.1405029296875, 0.16064453125, 0.016571044921875, 0.1212158203125, 0.07147216796875, 0.18505859375, 0.1900634765625, 0.206298828125, 0.120849609375, 0.2159423828125, 0.015869140625, 0.177856445312...
embed
74372263_c1
74372263
prolog
1
306, _9308, 3) ? creep Thw predicate without the loop works fine, but it's just one time reading and is not good for the purpose. Can please someone help me ? Thank you all. Code signals: How, Prolog, Out, output.txt, ERROR, Uninstantiated, Users, Desktop, _10234, suggestsong.pl:14, suggestsong.pl:18, toplevel_call, us...
306, _9308, 3) ? creep Thw predicate without the loop works fine, but it's just one time reading and is not good for the purpose. Can please someone help me ? Thank you all. Code signals: How, Prolog, Out, output.txt, ERROR, Uninstantiated, Users, Desktop, _10234, suggestsong.pl:14, suggestsong.pl:18, toplevel_call, us...
[ 0.01171875, 0.00537109375, -0.005859375, 0.01251220703125, -0.0093994140625, 0.030029296875, 0.0228271484375, 0.006011962890625, 0.00872802734375, -0.045166015625, 0.0081787109375, 0.0166015625, -0.0164794921875, -0.0130615234375, 0.0184326171875, -0.000885009765625, 0.01513671875, ...
[ 496, 910, 11591, 8318, 8439, 49512, 254, 6003, 434, 1653, 2063, 67, 15490, 40956, 43240, 5885, 1632, 1733, 16454, 959, 4127, 60042, 4358, 28864, 26073, 11249, 1250, 4867, 13538, 140992, 124326, 151206, 24638, 143034, 14, 27686, 53400, 141423,...
[ 0.1251220703125, 0.1746826171875, 0.1646728515625, 0.1851806640625, 0.1385498046875, 0.2369384765625, 0.1724853515625, 0.141357421875, 0.19677734375, 0.173095703125, 0.2174072265625, 0.0823974609375, 0.115234375, 0.216064453125, 0.098876953125, 0.07122802734375, 0.0789794921875, 0....
embed
22935218_c0
22935218
prolog
0
Title: Is there any way to check if some of the possible output lists are repeated? Problem title: Is there any way to check if some of the possible output lists are repeated? Tags: prolog, list Problem: Is there any way to check if some of the possible output lists are repeated? For some code I'm having a huge number ...
Is there any way to check if some of the possible output lists are repeated? Is there any way to check if some of the possible output lists are repeated? prolog list Is there any way to check if some of the possible output lists are repeated? For some code I'm having a huge number of possible output lists for L , but i...
[ -0.0115966796875, -0.004974365234375, 0.005706787109375, -0.0032196044921875, -0.0247802734375, -0.009765625, 0.0074462890625, -0.0157470703125, 0.004852294921875, 0.0030364990234375, -0.007049560546875, 0.0128173828125, 0.03564453125, -0.00012969970703125, -0.00537109375, 0.0262451171...
[ 3917, 47, 12765, 2174, 3060, 7722, 140992, 5303, 621, 119140, 297, 2499, 502, 4867, 18151, 58696, 14012, 339, 171763, 1636 ]
[ 0.060791015625, 0.052947998046875, 0.1856689453125, 0.07550048828125, 0.038238525390625, 0.1431884765625, 0.192626953125, 0.1939697265625, 0.06707763671875, 0.24267578125, 0.14990234375, 0.00140380859375, 0.1083984375, 0.190185546875, 0.12255859375, 0.013763427734375, 0.0248718261718...
embed
55287094_c0
55287094
prolog
0
Title: Write a skip predicate Problem title: Write a skip predicate Tags: prolog Problem: Write a skip predicate someone asks a question about Prolog, But I even don't know what does he mean can someone explain to me?? ?- Forskip([1,2,3,4,5],[3],L). L=[4, 5]. ?- Forskip([c,3,6,hello,6,7,z],[6,c,a],L). L=[3, 6, 7, z]. c...
Write a skip predicate Write a skip predicate prolog Write Forskip Write a skip predicate someone asks a question about Prolog, But I even don't know what does he mean can someone explain to me?? can someone see the pattern and explain to me what does Forskip does???
[ 0.0040283203125, 0.0205078125, -0.004150390625, -0.003326416015625, -0.0390625, 0.0225830078125, 0.0172119140625, 0.0198974609375, 0.0306396484375, 0.00250244140625, 0.00543212890625, 0.00537109375, -0.0196533203125, 0.01312255859375, 0.004302978515625, 0.014892578125, -0.00084304809...
[ 601, 18781, 10, 21658, 1653, 2063, 67, 502, 4867, 1326, 44024, 22008, 26458, 9655, 1672, 1250, 2301, 18, 3714, 2367, 14602, 764, 29459, 73342, 47, 163, 1957, 103510, 7273 ]
[ 0.050994873046875, 0.1448974609375, 0.051055908203125, 0.2376708984375, 0.1739501953125, 0.20458984375, 0.0404052734375, 0.135009765625, 0.2393798828125, 0.168212890625, 0.29833984375, 0.0007653236389160156, 0.06427001953125, 0.06689453125, 0.016143798828125, 0.158935546875, 0.008476...
embed
74502583_c0
74502583
prolog
0
Title: Why doesn't X-0 match with 20? Problem title: Why doesn't X-0 match with 20? Tags: prolog, unification Problem: Why doesn't X-0 match with 20? I have the following fact in my knowledge base: distance(c2, c5, 20, 1) . But when I try to query distance(c2, c5, X-0, 1) , (or any other number instead of 0),...
Why doesn't X-0 match with 20? Why doesn't X-0 match with 20? prolog unification Why X-0 Why doesn't X-0 match with 20? I have the following fact in my knowledge base: distance(c2, c5, 20, 1) . But when I try to query distance(c2, c5, X-0, 1) , (or any other number instead of 0), this returns false. Why is th...
[ 0.0089111328125, 0.00154876708984375, 0.00101470947265625, 0.004791259765625, -0.01275634765625, -0.0019073486328125, -0.002410888671875, 0.000759124755859375, 0.0126953125, 0.00109100341796875, 0.012939453125, -0.003143310546875, 0.0064697265625, -0.002685546875, -0.01214599609375, -0...
[ 44084, 22027, 3768, 18, 1193, 23320, 14858, 678, 387, 502, 4867, 51, 41274, 15824, 51359, 3647, 62488, 304, 758, 4879, 9790, 41, 14012, 757, 30646, 98320, 68557, 47, 181499 ]
[ 0.1226806640625, 0.04998779296875, 0.0282135009765625, 0.091552734375, 0.1732177734375, 0.2371826171875, 0.1846923828125, 0.09173583984375, 0.189453125, 0.1190185546875, 0.181884765625, 0.08935546875, 0.1109619140625, 0.082763671875, 0.0576171875, 0.0780029296875, 0.1983642578125, ...
embed
43436616_c0
43436616
prolog
0
Title: Definite Clause Grammars, how to check if a string is a char? Problem title: Definite Clause Grammars, how to check if a string is a char? Tags: swi-prolog, prolog, dcg Problem: Definite Clause Grammars, how to check if a string is a char? It seems good to me, but it always gives false... and i can't get why. le...
Definite Clause Grammars, how to check if a string is a char? Definite Clause Grammars, how to check if a string is a char? swi-prolog prolog dcg Definite Clause Grammars Definite Clause Grammars, how to check if a string is a char? It seems good to me, but it always gives false... and i can't get why. Thank you.
[ 0.01287841796875, -0.0010223388671875, -0.0002765655517578125, 0.046142578125, -0.0064697265625, 0.030517578125, 0.008544921875, -0.01708984375, 0.0089111328125, 0.01611328125, -0.0069580078125, -0.01019287109375, -0.0174560546875, 0.02001953125, -0.007598876953125, 0.025634765625, 0...
[ 88606, 67, 100700, 13, 48078, 1727, 3642, 47, 12765, 2174, 79315, 83, 10, 21441, 2452, 3454, 4867, 502, 177, 37202, 4127, 11343, 76199, 98320, 15400 ]
[ 0.18017578125, 0.1151123046875, 0.180908203125, 0.09735107421875, 0.14404296875, 0.119384765625, 0.054901123046875, 0.05743408203125, 0.2115478515625, 0.07861328125, 0.255126953125, 0.08343505859375, 0.057586669921875, 0.264892578125, 0.1212158203125, 0.03900146484375, 0.099975585937...
embed
2728811_c0
2728811
prolog
0
Title: Prolog - Sum up "positioned" elem in list Problem title: Prolog - Sum up "positioned" elem in list Tags: prolog Problem: Prolog - Sum up "positioned" elem in list I am looking for a solution to the following problem: "Write a Prolog program to sum up all the odd-positioned in a given list." S...
Prolog - Sum up "positioned" elem in list Prolog - Sum up "positioned" elem in list prolog Prolog Sum Prolog - Sum up "positioned" elem in list I am looking for a solution to the following problem: "Write a Prolog program to sum up all the odd-positioned in a given list." Sample query:
[ 0.007110595703125, 0.016357421875, 0.0296630859375, -0.00469970703125, -0.0191650390625, 0.0361328125, -0.017333984375, 0.0299072265625, 0.0213623046875, -0.012939453125, -0.0020751953125, -0.01202392578125, 0.0032196044921875, -0.00335693359375, 0.01123046875, 0.00811767578125, 0.01...
[ 1250, 4867, 36335, 1257, 40322, 297, 88, 195, 23, 5303, 502, 16487, 29806, 25632, 2967, 1456, 18781, 1528, 47, 10554, 756, 70, 70270, 9, 34475, 33209, 41, 1294 ]
[ 0.154052734375, 0.255859375, 0.212890625, 0.134765625, 0.216552734375, 0.1417236328125, 0.09423828125, 0.177001953125, 0.06341552734375, 0.1783447265625, 0.10540771484375, 0.04437255859375, 0.07916259765625, 0.0087890625, 0.0830078125, 0.008697509765625, 0.04449462890625, 0.1508789...
embed
50027889_c0
50027889
prolog
0
Title: reset Line_position Attribute of Stream in Prolog Problem title: reset Line_position Attribute of Stream in Prolog Tags: stream, prolog Problem: reset Line_position Attribute of Stream in Prolog I want to reset the position of current stream in Prolog by changing the line_position attribute of Position in stream...
reset Line_position Attribute of Stream in Prolog reset Line_position Attribute of Stream in Prolog stream prolog Line_position Attribute Stream Prolog stream_property reset Line_position Attribute of Stream in Prolog I want to reset the position of current stream in Prolog by changing the line_position attribute of Po...
[ -0.00927734375, 0.00836181640625, 0.01904296875, 0.00714111328125, -0.0152587890625, 0.000766754150390625, 0.02880859375, 0.02001953125, 0.00970458984375, 0.00860595703125, 0.010498046875, 0.0146484375, 0.00836181640625, 0.022705078125, -0.004547119140625, 0.00860595703125, 0.0095825...
[ 168398, 16777, 40322, 1913, 191145, 111, 115061, 23, 1250, 4867, 75973, 502, 36290, 56, 3444, 47, 70, 19069, 43581, 151134, 13315, 150380, 99428, 939, 831, 54 ]
[ 0.251220703125, 0.1865234375, 0.216796875, 0.0765380859375, 0.1954345703125, 0.0413818359375, 0.2088623046875, 0.034332275390625, 0.1451416015625, 0.2279052734375, 0.2158203125, 0.076416015625, 0.083740234375, 0.087890625, 0.08013916015625, 0.073486328125, 0.07635498046875, 0.21728...
embed
23939565_c0
23939565
prolog
0
Title: prolog I have to make a program that calculates the magic matrix permutate Problem title: prolog I have to make a program that calculates the magic matrix permutate Tags: prolog, magic-square Problem: prolog I have to make a program that calculates the magic matrix permutate permutar([],[]). permutar([X|Y], Z):-...
prolog I have to make a program that calculates the magic matrix permutate prolog I have to make a program that calculates the magic matrix permutate prolog magic-square prolog I have to make a program that calculates the magic matrix permutate I have to make a program that calculates the magic matrix, I have made ​​my...
[ -0.00101470947265625, 0.003326416015625, 0.01556396484375, -0.00860595703125, -0.012451171875, -0.0054931640625, -0.0498046875, -0.00054168701171875, 0.020751953125, -0.01544189453125, 0.00058746337890625, 0.015869140625, 0.004547119140625, -0.01556396484375, -0.024169921875, 0.0036163...
[ 502, 4867, 87, 765, 47, 3249, 1528, 450, 74481, 1636, 49846, 50944, 425, 117, 68754, 13, 108047, 7228, 18151, 43240, 1284, 561, 67, 4552, 72803, 3871, 4271, 56, 22008, 831, 4358, 30607, 3293, 83 ]
[ 0.2015380859375, 0.26220703125, 0.046783447265625, 0.10888671875, 0.058563232421875, 0.0814208984375, 0.198974609375, 0.0020751953125, 0.189208984375, 0.040313720703125, 0.1949462890625, 0.2100830078125, 0.1041259765625, 0.1678466796875, 0.2337646484375, 0.1380615234375, 0.1734619140...
embed
28794867_c0
28794867
prolog
0
Title: Digital root sums of factorisations in prolog Problem title: Digital root sums of factorisations in prolog Tags: prolog Problem: Digital root sums of factorisations in prolog The problem is about adding the multiples of the possible factorizations in the number that is input by the user. I tried this code. sum_f...
Digital root sums of factorisations in prolog Digital root sums of factorisations in prolog prolog Digital sum_factors Digital root sums of factorisations in prolog The problem is about adding the multiples of the possible factorizations in the number that is input by the user. I tried this code. output of my code if i...
[ 0.006134033203125, -0.0118408203125, 0.00958251953125, 0.00238037109375, -0.0245361328125, -0.00994873046875, -0.0152587890625, -0.00115203857421875, 0.01953125, -0.059814453125, -0.004119873046875, -0.0255126953125, 0.004364013671875, 0.00341796875, -0.006134033203125, -0.014892578125...
[ 16284, 74855, 10554, 31461, 15032, 502, 4867, 144810, 2967, 154107, 48716, 7722, 47691, 14012, 107730, 38937, 37842, 18151, 140992, 2174, 744, 70, 26785, 17, 5608, 186, 4171, 176256, 73342, 13315, 14192, 132283 ]
[ 0.1654052734375, 0.21044921875, 0.1971435546875, 0.199462890625, 0.133544921875, 0.135986328125, 0.232666015625, 0.21826171875, 0.1246337890625, 0.143310546875, 0.200439453125, 0.1622314453125, 0.115478515625, 0.112060546875, 0.17822265625, 0.1317138671875, 0.0673828125, 0.16796875...
embed
35136689_c0
35136689
prolog
0
Title: Prolog XPCE: Text Labels for Connections Problem title: Prolog XPCE: Text Labels for Connections Tags: xpce, swi-prolog, prolog, label, connection Problem: Prolog XPCE: Text Labels for Connections In XPCE, graphical objects can be connected with the Connection class (see Chapter 5.3. in the manual ). Is there an...
Prolog XPCE: Text Labels for Connections Prolog XPCE: Text Labels for Connections xpce swi-prolog prolog label connection Prolog XPCE Text Labels Connections Prolog XPCE: Text Labels for Connections In XPCE, graphical objects can be connected with the Connection class (see Chapter 5.3. in the manual ). Is there an easy...
[ 0.0230712890625, -0.0115966796875, 0.005859375, 0.011474609375, -0.00384521484375, 0.022705078125, -0.00494384765625, -0.00083160400390625, 0.01409912109375, -0.029541015625, -0.00628662109375, -0.030029296875, -0.0029449462890625, 0.0020904541015625, 0.000568389892578125, -0.000440597...
[ 1250, 4867, 45005, 10854, 24129, 17630, 100, 62448, 329, 2452, 3454, 502, 67967, 94878, 17514, 48461, 36746, 831, 162711, 678, 1830, 18507, 117615, 129274, 23009, 23468, 3917, 243, 934, 7986, 47 ]
[ 0.07708740234375, 0.1785888671875, 0.1251220703125, 0.177734375, 0.1434326171875, 0.207275390625, 0.016571044921875, 0.158203125, 0.072998046875, 0.085693359375, 0.027099609375, 0.02801513671875, 0.25439453125, 0.1656494140625, 0.0101318359375, 0.161376953125, 0.191162109375, 0.054...
embed
8847877_c0
8847877
prolog
0
Title: How to check if a list procceeds another list in Prolog Problem title: How to check if a list procceeds another list in Prolog Tags: prolog, list Problem: How to check if a list procceeds another list in Prolog I would like to create an argument that succeeds when a list proceeds another list. For example ?-proc...
How to check if a list procceeds another list in Prolog How to check if a list procceeds another list in Prolog prolog list How Prolog How to check if a list procceeds another list in Prolog I would like to create an argument that succeeds when a list proceeds another list. For example ?-proceed_list([1,2],[2]). Yes or...
[ 0.0103759765625, 0.01214599609375, -0.00848388671875, 0.04296875, -0.010498046875, 0.007476806640625, -0.0086669921875, 0.003326416015625, 0.0020599365234375, 0.0004596710205078125, 0.016357421875, 0.007476806640625, -0.0218505859375, 0.00013446807861328125, 0.00732421875, 0.0023498535...
[ 11249, 47, 12765, 2174, 5303, 10402, 329, 297, 7, 15700, 23, 1250, 4867, 502, 10, 1884, 28282, 10750, 214493, 3229, 172337, 705, 3454, 6562, 133063, 39556, 32635, 87599, 9969, 34759, 4358 ]
[ 0.058258056640625, 0.06201171875, 0.2105712890625, 0.1065673828125, 0.20068359375, 0.15234375, 0.1436767578125, 0.1597900390625, 0.08056640625, 0.12060546875, 0.05084228515625, 0.1634521484375, 0.222900390625, 0.128662109375, 0.011749267578125, 0.020599365234375, 0.0282440185546875, ...
embed
5887883_c0
5887883
prolog
0
Title: How to do this in one function Problem title: How to do this in one function Tags: prolog Problem: How to do this in one function I was wondering how to do the answer (or first function) to this question in Prolog only using one predicate? The link I'm referring to is here . Here's an example of what I mean by o...
How to do this in one function How to do this in one function prolog How How to do this in one function I was wondering how to do the answer (or first function) to this question in Prolog only using one predicate? The link I'm referring to is here . Here's an example of what I mean by only calling one predicate:
[ 0.001861572265625, 0.0289306640625, 0.00119781494140625, 0.00179290771484375, -0.0262451171875, 0.01153564453125, 0.00872802734375, 0.015869140625, 0.01165771484375, -0.060546875, 0.00213623046875, 0.01165771484375, -0.0145263671875, -0.0101318359375, 0.01177978515625, 0.0133056640625,...
[ 11249, 47, 54, 903, 23, 1632, 32354, 502, 4867, 149016, 3642, 35166, 5117, 1250, 4734, 17368, 1653, 2063, 67, 3126, 27781, 159029 ]
[ 0.0672607421875, 0.06005859375, 0.1259765625, 0.16943359375, 0.1314697265625, 0.205322265625, 0.266845703125, 0.1402587890625, 0.2467041015625, 0.0263214111328125, 0.0284423828125, 0.1317138671875, 0.11492919921875, 0.166015625, 0.12152099609375, 0.094482421875, 0.1944580078125, 0....
embed
41198503_c0
41198503
prolog
0
Title: a rule for Prolog predicate half_sister_of(X,Y)? Problem title: a rule for Prolog predicate half_sister_of(X,Y)? Tags: prolog Problem: a rule for Prolog predicate half_sister_of(X,Y)? The kb is parent_of(john,ann). parent_of(mary,ann). parent_of(mary,sylvia). parent_of(brian,sylvia). female(sylvia). female(ann)....
a rule for Prolog predicate half_sister_of(X,Y)? a rule for Prolog predicate half_sister_of(X,Y)? prolog Prolog half_sister_of parent_of a rule for Prolog predicate half_sister_of(X,Y)? The kb is
[ 0.0277099609375, 0.001708984375, 0.0091552734375, 0.00262451171875, -0.00262451171875, 0.017822265625, 0.00689697265625, 0.000278472900390625, 0.007293701171875, -0.041015625, -0.0026702880859375, -0.01470947265625, 0.01123046875, 0.00732421875, 0.0145263671875, -0.00982666015625, 0....
[ 79986, 1250, 4867, 1653, 2063, 23552, 7, 19656, 4390, 1542, 1723, 10, 67, 502, 49129, 51882, 83 ]
[ 0.1888427734375, 0.1356201171875, 0.2059326171875, 0.11224365234375, 0.1533203125, 0.1796875, 0.0887451171875, 0.163330078125, 0.1473388671875, 0.04931640625, 0.1005859375, 0.01371002197265625, 0.003765106201171875, 0.0955810546875, 0.16015625, 0.1834716796875, 0.0241546630859375 ]
embed
22725559_c0
22725559
prolog
0
Title: writing rules in prolog Problem title: writing rules in prolog Tags: prolog Problem: writing rules in prolog I am learning Prolog and would just like to check myself: I think this question is very basic but I am just beginning. father(X,Y) mother(X,Y) male(X) female(X) parent(X,Y) diff(X,Y) To write a clause for...
writing rules in prolog writing rules in prolog prolog is_mother writing rules in prolog I am learning Prolog and would just like to check myself: I think this question is very basic but I am just beginning. To write a clause for is_mother(X) is this correct? Thank you
[ -0.01019287109375, 0.006927490234375, 0.006561279296875, -0.000278472900390625, -0.007659912109375, 0.01361083984375, 0.00897216796875, -0.00119781494140625, 0.01141357421875, -0.04736328125, -0.00067138671875, -0.035400390625, 0.01190185546875, -0.00823974609375, 0.0263671875, 0.00515...
[ 32562, 91736, 23, 502, 4867, 83, 432, 9319, 52080, 1250, 12765, 35978, 62822, 33022, 70731, 13, 100, 132, 1542, 903, 26785 ]
[ 0.1859130859375, 0.203369140625, 0.0416259765625, 0.110107421875, 0.2034912109375, 0.13916015625, 0.16259765625, 0.2078857421875, 0.008880615234375, 0.0830078125, 0.0767822265625, 0.01123046875, 0.025238037109375, 0.121337890625, 0.132080078125, 0.091796875, 0.01483154296875, 0.032...
embed
15102474_c1
15102474
prolog
1
(3, three) ? creep Call: (9) translate([], [[one|two]|three]) ? creep Exit: (9) translate([], [[one|two]|three]) ? creep Exit: (8) translate([3], [one|two]) ? creep Exit: (7) translate([2, 3], one) ? creep Exit: (6) translate([1, 2, 3], []) ? creep X = [] . My other question is: why is my list concatenating as [[one|tw...
(3, three) ? creep Call: (9) translate([], [[one|two]|three]) ? creep Exit: (9) translate([], [[one|two]|three]) ? creep Exit: (8) translate([3], [one|two]) ? creep Exit: (7) translate([2, 3], one) ? creep Exit: (6) translate([1, 2, 3], []) ? creep X = [] . My other question is: why is my list concatenating as [[one|tw...
[ 0.037353515625, 0.01165771484375, -0.0081787109375, 0.000087738037109375, 0.015869140625, 0.02197265625, -0.01361083984375, 0.0034332275390625, 0.028564453125, -0.01446533203125, 0.01116943359375, 0.0014190673828125, -0.009765625, -0.001708984375, -0.01214599609375, -0.00213623046875, ...
[ 6896, 4, 17262, 705, 49512, 254, 26265, 11438, 3900, 19309, 3630, 55547, 927, 107, 13, 5443, 217, 10021, 54968, 8696, 304, 138, 1632, 6791, 418, 116, 1193, 2203, 6, 5, 9655, 15400, 83, 759, 5303, 158, 4460, 33, 26518, 237, 64457, 6626...
[ 0.178466796875, 0.0252685546875, 0.265869140625, 0.023040771484375, 0.2066650390625, 0.1583251953125, 0.215576171875, 0.1756591796875, 0.114013671875, 0.1517333984375, 0.14501953125, 0.1822509765625, 0.07568359375, 0.1927490234375, 0.09698486328125, 0.1568603515625, 0.157470703125, ...
embed
16272255_c2
16272255
prolog
2
2,T,G1,G2) :- not(memPairs(X,Y,[T])), bucket(2,X,[X,Y|T],G1,G2). bucket(2,Y,T,G1,G2) :- not(memPairs(2,Y,[T])),G1,G2. as a note the bucket predicate starts off as 0,0 (empty buckets) and attempts to get to (2,0) while it is doing that it checks a list of previous states to make sure it hasn't been there before. Realist...
2,T,G1,G2) :- not(memPairs(X,Y,[T])), bucket(2,X,[X,Y|T],G1,G2). bucket(2,Y,T,G1,G2) :- not(memPairs(2,Y,[T])),G1,G2. as a note the bucket predicate starts off as 0,0 (empty buckets) and attempts to get to (2,0) while it is doing that it checks a list of previous states to make sure it hasn't been there before. Realist...
[ 0.0037078857421875, 0.01129150390625, -0.0140380859375, 0.0164794921875, -0.01092529296875, 0.031982421875, -0.01116943359375, -0.0250244140625, 0.01336669921875, 0.0234375, 0.00982666015625, -0.005523681640625, -0.0091552734375, -0.004852294921875, 0.005035400390625, -0.00147247314453...
[ 116, 618, 724, 418, 10461, 15772, 959, 37138, 8335, 481, 7, 1542, 1723, 247, 373, 27853, 54753, 5, 5442, 20537, 1653, 2063, 67, 4034, 5773, 237, 63527, 33548, 939, 81887, 2046, 47, 216969, 442, 12765, 5303, 96362, 117249, 9077, 1556, 18...
[ 0.1527099609375, 0.1357421875, 0.0963134765625, 0.0947265625, 0.2088623046875, 0.0955810546875, 0.1826171875, 0.165771484375, 0.151123046875, 0.1060791015625, 0.0797119140625, 0.1151123046875, 0.1212158203125, 0.0159912109375, 0.153564453125, 0.267578125, 0.1368408203125, 0.0068359...
embed
6082779_c1
6082779
prolog
1
, Var ):- definition_clear_path1( Node , J , Var , [ Node ] ) . definition_clear_path1(B , J, K , F):- edge (B , J ). definition_clear_path1( Node , J , Var , L):- edge ( Node , N1 ) , not(def( Var , N1 )) , not(use( Var , N1 )) , definition_clear_path1( N1 , J , Var , [ Node | L ] ) . Code signals: Syntax, Operator, ...
, Var ):- definition_clear_path1( Node , J , Var , [ Node ] ) . definition_clear_path1(B , J, K , F):- edge (B , J ). definition_clear_path1( Node , J , Var , L):- edge ( Node , N1 ) , not(def( Var , N1 )) , not(use( Var , N1 )) , definition_clear_path1( N1 , J , Var , [ Node | L ] ) . Code signals: Syntax, Operator, ...
[ 0.01519775390625, 0.0067138671875, 0.016357421875, 0.0084228515625, 0.01806640625, 0.007049560546875, -0.01904296875, -0.0203857421875, 0.0164794921875, -0.0203857421875, -0.0133056640625, -0.0086669921875, -0.016357421875, 0.00811767578125, 0.02490234375, -0.00118255615234375, 0.010...
[ 4, 3323, 2077, 80934, 119488, 128405, 418, 438, 112, 821, 571, 341, 563, 121303, 339, 541, 6, 959, 420, 4032, 28864, 26073, 19010, 86531, 150922, 1250, 4867, 79912, 5983, 33306, 3864, 13794, 18878, 23166 ]
[ 0.03411865234375, 0.1893310546875, 0.016021728515625, 0.167724609375, 0.1932373046875, 0.2286376953125, 0.1094970703125, 0.1715087890625, 0.1630859375, 0.1353759765625, 0.06390380859375, 0.0494384765625, 0.06207275390625, 0.24560546875, 0.0623779296875, 0.0523681640625, 0.00720214843...
embed
20504717_c0
20504717
prolog
0
Title: Simple query in prolog Problem title: Simple query in prolog Tags: prolog Problem: Simple query in prolog I have this statement: friends(Nancy,richard,_,Nancy,michael) And this query: friends(simon, Nancy, Friend, Richard, Friend). The result I get is: Nancy = richard Friend = Michael Richard = Simon Can anyone ...
Simple query in prolog Simple query in prolog prolog Simple Nancy Friend Richard Michael Simon Simple query in prolog I have this statement: And this query: The result I get is: Can anyone explain to me how these results get generated?
[ 0.0299072265625, 0.0034637451171875, -0.017822265625, 0.035400390625, -0.0050048828125, -0.01434326171875, 0.00104522705078125, 0.01953125, 0.01019287109375, -0.032470703125, -0.006072998046875, -0.031494140625, -0.035888671875, 0.018798828125, 0.00396728515625, 0.015625, -0.00946044...
[ 60552, 41, 1294, 23, 502, 4867, 156946, 128938, 22758, 11617, 26328, 63805, 903, 16750, 2046, 83, 4171, 73342, 3642, 6097, 50339, 139392 ]
[ 0.2156982421875, 0.175048828125, 0.12176513671875, 0.04339599609375, 0.1361083984375, 0.2064208984375, 0.1439208984375, 0.10235595703125, 0.05889892578125, 0.053558349609375, 0.1285400390625, 0.1300048828125, 0.007415771484375, 0.09423828125, 0.05328369140625, 0.01287841796875, 0.005...
embed
46676618_c0
46676618
prolog
0
Title: Does SWI-Prolog have a way to read scientific notation? Problem title: Does SWI-Prolog have a way to read scientific notation? Tags: prolog Problem: Does SWI-Prolog have a way to read scientific notation? Does SWI-Prolog have a way to read scientific notation? I couldn't find anything here or in the document. Fo...
Does SWI-Prolog have a way to read scientific notation? Does SWI-Prolog have a way to read scientific notation? prolog Does SWI-Prolog Does SWI-Prolog have a way to read scientific notation? Does SWI-Prolog have a way to read scientific notation? I couldn't find anything here or in the document. For example, is there a...
[ 0.003265380859375, -0.000823974609375, 0.0284423828125, 0.00750732421875, -0.000766754150390625, 0.0126953125, 0.002655029296875, -0.006256103515625, -0.007781982421875, -0.01336669921875, 0.019287109375, 0.01385498046875, -0.0419921875, -0.01007080078125, 0.037109375, -0.0086669921875...
[ 101790, 159, 38969, 9, 10752, 4867, 3917, 47, 12301, 57456, 110, 22062, 765, 10, 502, 69427, 7413, 12937, 2861, 9185, 647, 87741, 7941, 2500, 6953, 442 ]
[ 0.031341552734375, 0.07958984375, 0.2183837890625, 0.032073974609375, 0.14453125, 0.184814453125, 0.0877685546875, 0.051116943359375, 0.2137451171875, 0.207763671875, 0.1678466796875, 0.164794921875, 0.0231475830078125, 0.00140380859375, 0.10736083984375, 0.004302978515625, 0.0065917...
embed
11106921_c0
11106921
prolog
0
Title: Read entire text file into a Prolog variable Problem title: Read entire text file into a Prolog variable Tags: dcg, swi-prolog, prolog Problem: Read entire text file into a Prolog variable I am having the hardest time figuring this out, even though it is one of the simplest things to do in other languages: Is th...
Read entire text file into a Prolog variable Read entire text file into a Prolog variable dcg swi-prolog prolog Read Prolog Read entire text file into a Prolog variable I am having the hardest time figuring this out, even though it is one of the simplest things to do in other languages: Is there a simple way to read th...
[ 0.0341796875, -0.01214599609375, 0.002288818359375, 0.020263671875, -0.0091552734375, 0.030517578125, 0.007110595703125, -0.01043701171875, -0.01031494140625, -0.044677734375, -0.00110626220703125, -0.0018157958984375, -0.0260009765625, -0.0101318359375, 0.0302734375, 0.0040283203125, ...
[ 4764, 64194, 7986, 11435, 3934, 1250, 4867, 77336, 238, 177, 2452, 3454, 502, 18557, 26747, 30362, 46876, 8781, 3917, 47, 12301, 10941 ]
[ 0.158935546875, 0.171875, 0.158935546875, 0.1729736328125, 0.1334228515625, 0.1533203125, 0.251220703125, 0.259521484375, 0.021087646484375, 0.08056640625, 0.1419677734375, 0.082275390625, 0.0941162109375, 0.0191497802734375, 0.03277587890625, 0.034210205078125, 0.09130859375, 0.10...
embed
43356947_c0
43356947
prolog
0
Title: Passing integers in Prolog rules Problem title: Passing integers in Prolog rules Tags: arguments, prolog, variables Problem: Passing integers in Prolog rules I'm quite new to Prolog and I'm currently struggling with passing integers as arguments of one rule into another rule in SWI-Prolog. For example: left(B) :...
Passing integers in Prolog rules Passing integers in Prolog rules arguments prolog variables Passing Prolog cond2 Passing integers in Prolog rules I'm quite new to Prolog and I'm currently struggling with passing integers as arguments of one rule into another rule in SWI-Prolog. For example: ... Any help would be appre...
[ 0.0184326171875, 0.002777099609375, 0.0020904541015625, 0.0089111328125, -0.0027008056640625, 0.017822265625, -0.0108642578125, 0.005767822265625, 0.0167236328125, -0.0294189453125, 0.0028076171875, -0.004302978515625, -0.0011444091796875, 0.01483154296875, 0.032958984375, -0.007354736...
[ 28872, 214, 892, 26255, 23, 1250, 4867, 91736, 10750, 502, 77336, 158, 71, 304, 3525, 237875, 452, 6953, 237, 1632, 79986, 3934, 15700, 159, 38969, 10752, 12, 4358 ]
[ 0.10302734375, 0.0162506103515625, 0.1590576171875, 0.1507568359375, 0.043548583984375, 0.1436767578125, 0.2293701171875, 0.1671142578125, 0.202392578125, 0.087158203125, 0.175537109375, 0.0679931640625, 0.05255126953125, 0.106201171875, 0.03778076171875, 0.0677490234375, 0.092773437...
embed
18473462_c0
18473462
prolog
0
Title: Prolog or more recent AI Logic language for Xcode Problem title: Prolog or more recent AI Logic language for Xcode Tags: xcode, prolog, artificial-intelligence Problem: Prolog or more recent AI Logic language for Xcode Does anybody know a library (preferably not SWI-prolog) for using Prolog in Xcode? If not, do ...
Prolog or more recent AI Logic language for Xcode Prolog or more recent AI Logic language for Xcode xcode prolog artificial-intelligence Prolog Logic Xcode Prolog or more recent AI Logic language for Xcode Does anybody know a library (preferably not SWI-prolog) for using Prolog in Xcode? If not, do you know a library f...
[ 0.01806640625, 0.0211181640625, 0.00604248046875, 0.0235595703125, -0.01153564453125, 0.01446533203125, -0.002593994140625, 0.0003223419189453125, 0.005828857421875, -0.035400390625, 0.0045166015625, -0.0184326171875, -0.002716064453125, -0.012451171875, 0.0380859375, -0.0167236328125,...
[ 1250, 4867, 707, 17309, 38730, 50592, 238, 46876, 100, 1193, 40899, 1286, 1022, 502, 66733, 130687, 101790, 2499, 37873, 3714, 35773, 2875, 959, 159, 38969, 3454, 17368, 23, 21373, 12447, 22362 ]
[ 0.192138671875, 0.296630859375, 0.0140380859375, 0.09210205078125, 0.1822509765625, 0.21923828125, 0.07208251953125, 0.213623046875, 0.06060791015625, 0.1390380859375, 0.278564453125, 0.005401611328125, 0.06842041015625, 0.160400390625, 0.07470703125, 0.05523681640625, 0.000915527343...
embed
67689985_c1
67689985
prolog
1
R is R + 4*X, I is I +1, int(A, B, N, I, D, F, R). integrate(A, B, N, F, R) :- R1 is 0, D is ((B-A)/N), call(F, A, X), call(F, B, Y), R1 is X + Y, int(A, B, N, 1, D, F, R1), R is R1 + D/3. This gives me an error: arguments are not sufficiently instantiated. I don't want to modify the parameters of integrate(). What wo...
R is R + 4*X, I is I +1, int(A, B, N, I, D, F, R). integrate(A, B, N, F, R) :- R1 is 0, D is ((B-A)/N), call(F, A, X), call(F, B, Y), R1 is X + Y, int(A, B, N, 1, D, F, R1), R is R1 + D/3. This gives me an error: arguments are not sufficiently instantiated. I don't want to modify the parameters of integrate(). What wo...
[ -0.007232666015625, -0.00023555755615234375, 0.01214599609375, 0.0400390625, -0.006072998046875, 0.02490234375, 0.01068115234375, -0.0218505859375, 0.0179443359375, -0.0201416015625, 0.00860595703125, 0.0166015625, -0.0233154296875, 0.0118408203125, 0.0194091796875, -0.0267333984375, ...
[ 627, 997, 149878, 1542, 87, 83, 57157, 23, 18, 284, 335, 541, 391, 563, 78779, 13, 418, 757, 571, 9, 64, 839, 11782, 919, 62, 1193, 990, 17727, 18113, 18499, 10750, 959, 129980, 34648, 14, 3444, 2811, 40383, 171859, 132, 26785, 3917, ...
[ 0.140869140625, 0.1492919921875, 0.1795654296875, 0.1131591796875, 0.10089111328125, 0.01202392578125, 0.1270751953125, 0.05682373046875, 0.08349609375, 0.155517578125, 0.1119384765625, 0.0293426513671875, 0.1009521484375, 0.0872802734375, 0.24755859375, 0.121337890625, 0.05404663085...
embed
10189168_c0
10189168
prolog
0
Title: Theorem Proof Using Prolog Problem title: Theorem Proof Using Prolog Tags: logic, prolog, proof, theorem-proving, theorem Problem: Theorem Proof Using Prolog How can I write theorem proofs using Prolog? I have tried to write it like this: parallel(X,Y) :- perpendicular(X,Z), perpendicular(Y,Z), X \== Y, !. perpe...
Theorem Proof Using Prolog Theorem Proof Using Prolog logic prolog proof theorem-proving theorem Theorem Proof Using Prolog Theorem Proof Using Prolog How can I write theorem proofs using Prolog? I have tried to write it like this: Can you help me?
[ 0.0289306640625, 0.0198974609375, -0.00579833984375, 0.005096435546875, -0.01446533203125, -0.0155029296875, -0.015625, -0.004974365234375, -0.01055908203125, -0.050048828125, 0.0091552734375, 0.0223388671875, -0.0093994140625, -0.006622314453125, -0.00885009765625, 0.0216064453125, ...
[ 581, 58391, 1250, 4390, 345, 6953, 4867, 62775, 502, 98869, 70, 70628, 214, 11249, 831, 87, 33022, 6, 7, 17368, 37842, 1884, 903, 4358 ]
[ 0.06732177734375, 0.2025146484375, 0.1719970703125, 0.1767578125, 0.055023193359375, 0.0562744140625, 0.240966796875, 0.11822509765625, 0.1297607421875, 0.2066650390625, 0.0821533203125, 0.1478271484375, 0.038299560546875, 0.00885009765625, 0.034820556640625, 0.0015163421630859375, 0...
embed
47487059_c0
47487059
prolog
0
Title: How do you join characters in a list together in Prolog? Problem title: How do you join characters in a list together in Prolog? Tags: prolog Problem: How do you join characters in a list together in Prolog? Eg: ["c","h","a","r"] should print "char". its atomic_list_concat(), but how would I do it for eg: longes...
How do you join characters in a list together in Prolog? How do you join characters in a list together in Prolog? prolog How Prolog longest_common_prefix How do you join characters in a list together in Prolog? Eg: ["c","h","a","r"] should print "char". its atomic_list_concat(), but how would I do it for eg:
[ 0.0036468505859375, 0.003387451171875, 0.010986328125, 0.0181884765625, 0.000141143798828125, 0.00421142578125, 0.003173828125, 0.00701904296875, 0.0196533203125, -0.021240234375, -0.003875732421875, -0.00909423828125, 0.00909423828125, 0.00787353515625, -0.00970458984375, 0.0080566406...
[ 11249, 54, 33284, 124850, 23, 5303, 25842, 1250, 4867, 502, 4989, 525, 277, 3796, 4692, 55923, 238, 127, 11, 42, 5608, 28412, 9254, 34627, 1771, 6562, 2271, 4460, 3642, 2806, 442 ]
[ 0.087158203125, 0.03887939453125, 0.22607421875, 0.20166015625, 0.07598876953125, 0.2081298828125, 0.1982421875, 0.142822265625, 0.21533203125, 0.06951904296875, 0.08660888671875, 0.06536865234375, 0.0067138671875, 0.0921630859375, 0.05682373046875, 0.1798095703125, 0.024520874023437...
embed
73099791_c0
73099791
prolog
0
Title: display a list in PROLOG in specific format Problem title: display a list in PROLOG in specific format Tags: swi-prolog, prolog Problem: display a list in PROLOG in specific format How can i display a list : Sorted = [p(201, 15, 2), p(301, 15, 3), p(401, 30, 4), p(501, 75, 5)]. in this format: 201 15 2 301 15 3 ...
display a list in PROLOG in specific format display a list in PROLOG in specific format swi-prolog prolog PROLOG Sorted display a list in PROLOG in specific format How can i display a list : in this format: i used display(Sorted) , is there any other function to solve this ?
[ 0.0191650390625, 0.01080322265625, 0.0277099609375, 0.0159912109375, -0.00787353515625, 0.000499725341796875, -0.006591796875, -0.00013446807861328125, -0.0111083984375, 0.0162353515625, 0.00872802734375, -0.00445556640625, -0.0206298828125, -0.0262451171875, -0.00933837890625, -0.0050...
[ 44116, 5303, 23, 10514, 47510, 29458, 9384, 2452, 3454, 4867, 502, 53666, 297, 10, 831, 903, 17, 11814, 158240, 3674, 32354, 86869 ]
[ 0.204833984375, 0.22314453125, 0.075927734375, 0.177978515625, 0.252197265625, 0.1771240234375, 0.200439453125, 0.148193359375, 0.1265869140625, 0.2137451171875, 0.12457275390625, 0.1844482421875, 0.07464599609375, 0.017181396484375, 0.0178070068359375, 0.0229034423828125, 0.00146389...
embed
17142333_c0
17142333
prolog
0
Title: How to solve boolean logic equation with prolog? Problem title: How to solve boolean logic equation with prolog? Tags: prolog, expression, logic Problem: How to solve boolean logic equation with prolog? For example, if I have an expression "C = A and B", I want to create some kind of predicate like solv(A, B, C)...
How to solve boolean logic equation with prolog? How to solve boolean logic equation with prolog? prolog expression logic How How to solve boolean logic equation with prolog? For example, if I have an expression "C = A and B", I want to create some kind of predicate like to call it like so that Prolog will say "B is tr...
[ 0.01141357421875, 0.0010986328125, 0.006927490234375, 0.01324462890625, -0.0228271484375, 0.0228271484375, -0.001068115234375, 0.0128173828125, 0.00135040283203125, -0.033935546875, -0.01373291015625, 0.005279541015625, -0.00823974609375, 0.01080322265625, 0.007659912109375, 0.00257873...
[ 11249, 47, 86869, 337, 31, 34677, 62775, 28, 5490, 2320, 678, 502, 4867, 32, 125195, 765, 441, 2203, 62, 136, 335, 3444, 28282, 8562, 1653, 2063, 1884, 11782, 1250, 5154, 571, 83, 29568, 30607, 4358 ]
[ 0.09808349609375, 0.0657958984375, 0.1937255859375, 0.1036376953125, 0.1634521484375, 0.2305908203125, 0.2080078125, 0.05810546875, 0.2130126953125, 0.05560302734375, 0.102783203125, 0.177978515625, 0.26123046875, 0.006378173828125, 0.2320556640625, 0.003143310546875, 0.0942993164062...
embed
30427203_c0
30427203
prolog
0
Title: What is the meaning of (+,?,?) or (-,-,+) in Prolog? Problem title: What is the meaning of (+,?,?) or (-,-,+) in Prolog? Tags: prolog Problem: What is the meaning of (+,?,?) or (-,-,+) in Prolog? Sometimes when I read some samples in Prolog I can see it has said that "this code is in the form of (+,?,?)". So, wh...
What is the meaning of (+,?,?) or (-,-,+) in Prolog? What is the meaning of (+,?,?) or (-,-,+) in Prolog? prolog What Prolog What is the meaning of (+,?,?) or (-,-,+) in Prolog? Sometimes when I read some samples in Prolog I can see it has said that "this code is in the form of (+,?,?)". So, what is the meaning of thes...
[ 0.027099609375, 0.01483154296875, -0.0030517578125, 0.0191650390625, -0.00457763671875, 0.016845703125, -0.00506591796875, 0.007171630859375, -0.01043701171875, 0.012939453125, 0.00003528594970703125, -0.03759765625, -0.006561279296875, -0.00152587890625, 0.00274658203125, 0.0030670166...
[ 4865, 91084, 111, 22183, 707, 9, 102817, 23, 1250, 4867, 70, 4, 502, 83, 121413, 100231, 18151, 3173, 32, 2367, 6097, 24092, 7 ]
[ 0.0184783935546875, 0.1966552734375, 0.058837890625, 0.263671875, 0.0906982421875, 0.1505126953125, 0.2425537109375, 0.08380126953125, 0.19580078125, 0.25634765625, 0.031005859375, 0.03192138671875, 0.11474609375, 0.034088134765625, 0.06298828125, 0.07958984375, 0.1845703125, 0.096...
embed
35769181_c0
35769181
prolog
0
Title: How to print on the screen unbound variables? Prolog Problem title: How to print on the screen unbound variables? Prolog Tags: prolog Problem: How to print on the screen unbound variables? Prolog I want to print the list of unbound variables to the screen. 12 ?- write([X, Y]). [_G1696,_G1699] But I want to see i...
How to print on the screen unbound variables? Prolog How to print on the screen unbound variables? Prolog prolog How Prolog _G1696 _G1699 How to print on the screen unbound variables? Prolog I want to print the list of unbound variables to the screen. But I want to see in fact [X, Y] on the screen instead of [_G1696,_G...
[ 0.00506591796875, 0.0203857421875, 0.00811767578125, -0.007080078125, -0.0045166015625, 0.01214599609375, 0.00151824951171875, -0.00567626953125, -0.0021209716796875, 0.001434326171875, 0.00335693359375, -0.0181884765625, 0.01129150390625, 0.0137939453125, 0.00604248046875, 0.015075683...
[ 11249, 47, 28412, 98, 49119, 51, 99091, 77336, 7, 1250, 4867, 502, 724, 2485, 11648, 5046, 3444, 5303, 111, 1957, 15824, 1542, 990, 64457, 7722 ]
[ 0.054107666015625, 0.0716552734375, 0.18798828125, 0.0799560546875, 0.175537109375, 0.08837890625, 0.1689453125, 0.2093505859375, 0.06103515625, 0.1151123046875, 0.1939697265625, 0.036102294921875, 0.032073974609375, 0.1219482421875, 0.2205810546875, 0.20361328125, 0.08099365234375, ...
embed
69996190_c1
69996190
prolog
1
(W,Y), parent_of(P,X), sister_of(P,W). nephew_of(X,Y) :- dif(X,Y), male(X), parent_of(W,Y), parent_of(P,X), brother_of(P,W). nephew_of(X,Y):- dif(X,Y), male(X), parent_of(W,Y), parent_of(D,X), sister_of(D,W). The output I get is ?- niece_of(X,liza). X = aron ; X = aron ; X = nico ; X = nico ; X = gio ; X = gio ; false....
(W,Y), parent_of(P,X), sister_of(P,W). nephew_of(X,Y) :- dif(X,Y), male(X), parent_of(W,Y), parent_of(P,X), brother_of(P,W). nephew_of(X,Y):- dif(X,Y), male(X), parent_of(W,Y), parent_of(D,X), sister_of(D,W). The output I get is ?- niece_of(X,liza). X = aron ; X = aron ; X = nico ; X = nico ; X = gio ; X = gio ; false....
[ -0.004974365234375, 0.00543212890625, 0.00970458984375, 0.015380859375, -0.02783203125, 0.01275634765625, -0.0076904296875, -0.009765625, 0.000347137451171875, -0.03173828125, -0.011474609375, -0.0244140625, 0.0181884765625, 0.01025390625, 0.005950927734375, 0.0098876953125, 0.024780...
[ 1456, 1723, 49129, 4390, 683, 1542, 247, 114015, 53297, 145204, 15772, 45755, 11280, 82953, 194, 4, 140992, 87, 2046, 705, 9, 269, 329, 39998, 1193, 2203, 1900, 12150, 9702, 98320, 28864, 26073, 67373, 42732 ]
[ 0.1519775390625, 0.124267578125, 0.2156982421875, 0.2110595703125, 0.06494140625, 0.107666015625, 0.01336669921875, 0.159912109375, 0.1607666015625, 0.2110595703125, 0.026702880859375, 0.2176513671875, 0.15673828125, 0.1463623046875, 0.00091552734375, 0.010406494140625, 0.19348144531...
embed
43414936_c0
43414936
prolog
0
Title: Does an element exists in a list of lists? Problem title: Does an element exists in a list of lists? Tags: list, member, prolog Problem: Does an element exists in a list of lists? I want to find if a given element exists in a list of lists. I am only getting true if the element exists somewhere is the first list...
Does an element exists in a list of lists? Does an element exists in a list of lists? list member prolog Does Does an element exists in a list of lists? I want to find if a given element exists in a list of lists. I am only getting true if the element exists somewhere is the first list of lists. Any advice?
[ 0.0009613037109375, 0.0162353515625, 0.01177978515625, 0.01336669921875, -0.0257568359375, 0.0123291015625, 0.0284423828125, 0.01611328125, -0.0106201171875, -0.03271484375, 0.02880859375, 0.0111083984375, 0.00970458984375, 0.00872802734375, -0.0034332275390625, -0.0081787109375, 0.0...
[ 101790, 12830, 32316, 7, 23, 5303, 111, 142, 10, 32786, 502, 4867, 3444, 47, 7413, 2174, 34475, 4734, 20949, 29568, 174653, 83, 5117, 67660 ]
[ 0.10101318359375, 0.2425537109375, 0.2276611328125, 0.1202392578125, 0.129638671875, 0.23388671875, 0.118896484375, 0.040985107421875, 0.0565185546875, 0.15380859375, 0.063720703125, 0.1221923828125, 0.05963134765625, 0.06719970703125, 0.145263671875, 0.08740234375, 0.07080078125, ...
embed
67044994_c0
67044994
prolog
0
Title: What is a combinator in Prolog? Problem title: What is a combinator in Prolog? Tags: prolog Problem: What is a combinator in Prolog? Please give an example of a combinator in Prolog. I am developing a State Saving Interpreter in Prolog that contains backtracking parts that includes "retry" in trace, and to get t...
What is a combinator in Prolog? What is a combinator in Prolog? prolog What Prolog What is a combinator in Prolog? Please give an example of a combinator in Prolog. I am developing a State Saving Interpreter in Prolog that contains backtracking parts that includes "retry" in trace, and to get to the point, what exactly...
[ 0.007598876953125, 0.007568359375, 0.0194091796875, 0.0093994140625, 0.00182342529296875, 0.0240478515625, 0.003204345703125, 0.006134033203125, -0.005584716796875, -0.019287109375, -0.016845703125, 0.00323486328125, -0.0045166015625, 0.004638671875, -0.00439453125, -0.00775146484375, ...
[ 4865, 83, 10, 22321, 1290, 23, 1250, 4867, 502, 27781, 168698, 22836, 947, 6496, 56359, 4420, 125728, 63920, 107, 15123, 144851, 6275, 50339, 12921, 162515 ]
[ 0.047760009765625, 0.033843994140625, 0.057861328125, 0.267333984375, 0.225341796875, 0.0849609375, 0.1962890625, 0.270263671875, 0.1116943359375, 0.0987548828125, 0.03314208984375, 0.078369140625, 0.042327880859375, 0.054443359375, 0.0963134765625, 0.057037353515625, 0.114501953125,...
embed
10255391_c0
10255391
prolog
0
Title: Please Help on some basics on prolog Problem title: Please Help on some basics on prolog Tags: prolog Problem: Please Help on some basics on prolog I want to write a program that deletes any occurrence of a member in a given list, as bellow: deleteall(1,[1,2,3,1,3,2,5],Out) Out= [2,3,3,2,5] How can I do that? Th...
Please Help on some basics on prolog Please Help on some basics on prolog prolog Please Help Out Please Help on some basics on prolog I want to write a program that deletes any occurrence of a member in a given list, as bellow: How can I do that? This is my attempt:
[ 0.01544189453125, -0.0028076171875, -0.0024261474609375, 0.00653076171875, -0.01214599609375, 0.03125, 0.0167236328125, 0.01312255859375, 0.002960205078125, -0.0191650390625, 0.024658203125, -0.01336669921875, 0.00714111328125, 0.015380859375, 0.0128173828125, 0.003143310546875, 0.01...
[ 30607, 39527, 98, 62822, 502, 4867, 3060, 13538, 3444, 33022, 1528, 450, 8, 74635, 2499, 74918, 42, 32786, 34475, 5303, 41566, 11249, 831, 54, 81887 ]
[ 0.08734130859375, 0.1746826171875, 0.0606689453125, 0.1182861328125, 0.129638671875, 0.2423095703125, 0.00554656982421875, 0.105224609375, 0.09521484375, 0.1385498046875, 0.1798095703125, 0.042205810546875, 0.1539306640625, 0.25341796875, 0.0833740234375, 0.146240234375, 0.1275634765...
embed
37364141_c0
37364141
prolog
0
Title: Prolog findall list of predicates Problem title: Prolog findall list of predicates Tags: prolog Problem: Prolog findall list of predicates I've been searching but I can't find the right answer for my question. The problem is: a predicate initial_estates([rb(1,1),rb(2,2),rb(3,5)]). I want to use findall to get me...
Prolog findall list of predicates Prolog findall list of predicates prolog Prolog initial_estates Prolog findall list of predicates I've been searching but I can't find the right answer for my question. The problem is: a predicate I want to use findall to get me a list of all the second term of rb's. Like in this examp...
[ 0.015625, -0.01165771484375, 0.00567626953125, 0.01483154296875, -0.0027618408203125, 0.03125, 0.00183868408203125, 0.0296630859375, 0.0150146484375, -0.03662109375, 0.038330078125, -0.007781982421875, -0.001495361328125, 0.006439208984375, -0.00885009765625, 0.0201416015625, 0.02673...
[ 1250, 4867, 7413, 5584, 5303, 1653, 2063, 1636, 502, 61475, 84189, 35166, 2967, 67, 3444, 4527, 2046, 163, 756, 17932, 13579, 13471, 25, 27781, 71928, 4358 ]
[ 0.1475830078125, 0.2264404296875, 0.168701171875, 0.2427978515625, 0.16015625, 0.1690673828125, 0.228515625, 0.1129150390625, 0.0943603515625, 0.1085205078125, 0.170654296875, 0.0305023193359375, 0.08465576171875, 0.08795166015625, 0.052581787109375, 0.046722412109375, 0.056091308593...
embed
20599850_c1
20599850
prolog
1
Indent + 4, show1(R, Indent2), tab(Indent), write_ln(N), show1(L, Indent2). main :- my_list(Z), remove_even_order(Z, R), construct(R, T), show(T). the problem was with the double values(80) in the list!...thanks Code signals: list, Prolog, BFS, my_list, Mathematics, English, Physics, Chemistry, Biology, Geography, Yor...
Indent + 4, show1(R, Indent2), tab(Indent), write_ln(N), show1(L, Indent2). main :- my_list(Z), remove_even_order(Z, R), construct(R, T), show(T). the problem was with the double values(80) in the list!...thanks Code signals: list, Prolog, BFS, my_list, Mathematics, English, Physics, Chemistry, Biology, Geography, Yor...
[ 0.020263671875, 0.017822265625, 0.0002498626708984375, 0.01177978515625, -0.00274658203125, 0.0269775390625, -0.0234375, -0.01611328125, 0.0177001953125, -0.00726318359375, 0.021728515625, -0.01336669921875, -0.00555419921875, -0.00921630859375, 0.00799560546875, -0.007171630859375, ...
[ 360, 37379, 997, 201, 4, 7639, 418, 1052, 10461, 20928, 4153, 33022, 19, 839, 866, 5, 5201, 15772, 759, 6562, 1511, 87388, 26301, 80596, 627, 64549, 384, 618, 194, 70, 2967, 509, 41929, 142424, 111256, 23, 5303, 28864, 26073, 7, 1250, ...
[ 0.1282958984375, 0.2626953125, 0.217041015625, 0.1982421875, 0.006744384765625, 0.152587890625, 0.04534912109375, 0.07000732421875, 0.06854248046875, 0.119384765625, 0.06134033203125, 0.1009521484375, 0.06683349609375, 0.02618408203125, 0.023345947265625, 0.0182647705078125, 0.091308...
embed
30444938_c0
30444938
prolog
0
Title: Counting elements of a list in a predicate Problem title: Counting elements of a list in a predicate Tags: prolog Problem: Counting elements of a list in a predicate I have something like this: plane(1, 2, aaa, b([1,2,3,4]), 3). I'm able to access the elements of plane and show it just like above, but the proble...
Counting elements of a list in a predicate Counting elements of a list in a predicate prolog Counting Counting elements of a list in a predicate I have something like this: I'm able to access the elements of plane and show it just like above, but the problem is b([1,2,3,4]) . How can I access it to count the number of ...
[ 0.00042724609375, -0.01348876953125, -0.015869140625, 0.00665283203125, 0.0096435546875, 0.0247802734375, -0.00170135498046875, -0.0084228515625, 0.01495361328125, -0.048095703125, -0.0098876953125, -0.0189208984375, 0.01019287109375, -0.00139617919921875, 0.0002803802490234375, -0.012...
[ 1311, 128396, 80854, 111, 5303, 23, 1653, 2063, 67, 502, 4867, 1884, 903, 19048, 17203, 47880, 7639, 36917, 1284, 2967, 876, 132, 133063, 82449, 11249, 831, 442, 54529, 70, 14012, 450, 83, 46132 ]
[ 0.1429443359375, 0.1971435546875, 0.2294921875, 0.0511474609375, 0.203125, 0.087646484375, 0.1712646484375, 0.203125, 0.12890625, 0.1456298828125, 0.1676025390625, 0.03826904296875, 0.005462646484375, 0.05572509765625, 0.170166015625, 0.206787109375, 0.0601806640625, 0.046783447265...
embed
18577650_c0
18577650
prolog
0
Title: Swi-Prolog asserta error Problem title: Swi-Prolog asserta error Tags: clpfd, prolog Problem: Swi-Prolog asserta error i must assert in SWI this kind of CLP(FD) rules: asserta(schedule(A,B) :- V = [S0,S1,S2],V ins 0..sup). but i get this error: ERROR: Syntax error: Operator expected ERROR: asserta(schedule(A,B) ...
Swi-Prolog asserta error Swi-Prolog asserta error clpfd prolog Swi-Prolog ERROR Syntax Operator Swi-Prolog asserta error i must assert in SWI this kind of CLP(FD) rules: but i get this error: why? thank you!
[ 0.004547119140625, -0.00390625, -0.00408935546875, 0.03173828125, -0.0263671875, -0.0091552734375, -0.0125732421875, 0.0081787109375, -0.01275634765625, -0.03466796875, 0.00494384765625, -0.00927734375, 0.0177001953125, 0.00439453125, 0.0247802734375, -0.0030975341796875, 0.003875732...
[ 105432, 10752, 4867, 237, 110965, 18499, 9, 33139, 39557, 71, 502, 151206, 19010, 86531, 150922, 8110, 33657, 159, 38969, 903, 8562, 313, 37352, 98553, 91736, 1284, 2046, 15400 ]
[ 0.2626953125, 0.1497802734375, 0.233154296875, 0.07952880859375, 0.2734375, 0.197998046875, 0.0322265625, 0.064208984375, 0.0928955078125, 0.1033935546875, 0.10723876953125, 0.1417236328125, 0.07916259765625, 0.061370849609375, 0.1981201171875, 0.0792236328125, 0.18408203125, 0.057...
embed
7682320_c0
7682320
prolog
0
Title: Finding missing integers - Prolog Problem title: Finding missing integers - Prolog Tags: list, prolog, integer Problem: Finding missing integers - Prolog I want to take a list of integers and create a list of the integers which are between (or in the gaps of) the integers in the former list. For example, I'd lik...
Finding missing integers - Prolog Finding missing integers - Prolog list prolog integer Finding Prolog Finding missing integers - Prolog I want to take a list of integers and create a list of the integers which are between (or in the gaps of) the integers in the former list. For example, I'd like ?- findmissing([1,3,4,...
[ -0.00531005859375, -0.002227783203125, 0.0036163330078125, 0.02001953125, -0.00994873046875, 0.041259765625, 0.01043701171875, 0.0172119140625, -0.0028533935546875, 0.0010223388671875, -0.0034027099609375, -0.01080322265625, -0.013427734375, 0.0162353515625, 0.0196533203125, 0.01086425...
[ 26040, 214, 132283, 892, 26255, 1250, 4867, 5303, 502, 1505, 3444, 5646, 28282, 621, 17721, 43599, 111, 23, 36770, 27781, 71, 1884, 705, 7413, 45188, 132, 418, 82449, 104629, 1542, 16750, 1193, 2203, 33579, 29479, 6044, 32354 ]
[ 0.1341552734375, 0.1822509765625, 0.24072265625, 0.1685791015625, 0.157470703125, 0.13720703125, 0.2122802734375, 0.1512451171875, 0.10125732421875, 0.048675537109375, 0.0968017578125, 0.06689453125, 0.10430908203125, 0.03204345703125, 0.1844482421875, 0.188232421875, 0.0738525390625...
embed
14381174_c0
14381174
prolog
0
Title: Prolog - re-load consult('filename') to interpreter Problem title: Prolog - re-load consult('filename') to interpreter Tags: swi-prolog, prolog Problem: Prolog - re-load consult('filename') to interpreter After I load a pl file to SWI-Prolog with consult('filename') how could I re-load it by ...
Prolog - re-load consult('filename') to interpreter Prolog - re-load consult('filename') to interpreter swi-prolog prolog Prolog Prolog - re-load consult('filename') to interpreter After I load a pl file to SWI-Prolog with consult('filename') how could I re-load it by using keyboard ? I read that it...
[ 0.01190185546875, 0.0029449462890625, 0.01275634765625, 0.0198974609375, -0.0301513671875, -0.002349853515625, -0.00921630859375, 0.0277099609375, -0.0079345703125, -0.0361328125, 0.003997802734375, -0.02001953125, -0.0128173828125, -0.025634765625, 0.0225830078125, 0.00537109375, 0....
[ 1250, 4867, 456, 9, 63033, 75463, 3768, 29822, 11627, 47, 29481, 56, 2452, 3454, 502, 24372, 72367, 6456, 11435, 159, 38969, 10752, 3642, 5809, 442, 390, 17368, 149186, 7722, 501, 4448, 876, 22027, 18, 4488, 4527, 11389, 2289, 154784 ]
[ 0.168701171875, 0.2384033203125, 0.1737060546875, 0.10064697265625, 0.230224609375, 0.274658203125, 0.0178070068359375, 0.127685546875, 0.1473388671875, 0.1156005859375, 0.2071533203125, 0.1414794921875, 0.1497802734375, 0.1290283203125, 0.12353515625, 0.0227508544921875, 0.151733398...
embed
52428027_c0
52428027
prolog
0
Title: How to write a Prolog program Problem title: How to write a Prolog program Tags: prolog Problem: How to write a Prolog program I don't know how to write a Prolog program for the following scenario. 1. If any two person having same hobby then they like each other. 2. Every gardener likes the Sun. I did this but I...
How to write a Prolog program How to write a Prolog program prolog How Prolog Every Sun How to write a Prolog program I don't know how to write a Prolog program for the following scenario. I did this but I don't know whether it is correct or not. Please help me to solve it.
[ 0.00131988525390625, 0.017822265625, -0.002349853515625, 0.03955078125, -0.018310546875, 0.011962890625, 0.00127410888671875, -0.00018596649169921875, 0.003692626953125, -0.033935546875, 0.001068115234375, 0.01361083984375, -0.0079345703125, 0.01171875, 0.0242919921875, 0.0069885253906...
[ 11249, 47, 33022, 10, 1250, 4867, 1528, 502, 87769, 7550, 18, 3714, 3642, 100, 25632, 106117, 903, 26785, 4358, 86869 ]
[ 0.09716796875, 0.08697509765625, 0.19580078125, 0.0819091796875, 0.195556640625, 0.274169921875, 0.2215576171875, 0.153076171875, 0.16064453125, 0.219482421875, 0.0005574226379394531, 0.0675048828125, 0.059539794921875, 0.0242462158203125, 0.0821533203125, 0.1480712890625, 0.00099182...
embed
52847933_c0
52847933
prolog
0
Title: WIN-PROLOG - how to get random value? Problem title: WIN-PROLOG - how to get random value? Tags: prolog, random, win-prolog Problem: WIN-PROLOG - how to get random value? I'm using LPA WIN-PROLOG and I want to get random values. I looked for a random predicate and I don't find one that is already defined. What I...
WIN-PROLOG - how to get random value? WIN-PROLOG - how to get random value? prolog random win-prolog WIN-PROLOG WIN-PROLOG - how to get random value? I'm using LPA WIN-PROLOG and I want to get random values. I looked for a random predicate and I don't find one that is already defined. What I tried: X is random(10) rand...
[ 0.017822265625, 0.007080078125, 0.0159912109375, -0.006561279296875, -0.0198974609375, 0.0230712890625, 0.007568359375, -0.01129150390625, -0.0201416015625, -0.057861328125, 0.02685546875, 0.0189208984375, -0.032470703125, -0.0181884765625, 0.022216796875, 0.00408935546875, -0.012878...
[ 108568, 9, 47970, 47510, 3642, 47, 2046, 96759, 34292, 32, 502, 4867, 19916, 3454, 17368, 339, 12236, 3444, 142424, 54811, 100, 1653, 2063, 7413, 21771, 61924, 37842, 1193, 83, 90980, 41600, 963, 1542, 4171, 4358, 3917, 10 ]
[ 0.2003173828125, 0.044403076171875, 0.1175537109375, 0.1844482421875, 0.0887451171875, 0.08184814453125, 0.1551513671875, 0.26318359375, 0.258544921875, 0.008819580078125, 0.12548828125, 0.201171875, 0.1995849609375, 0.1171875, 0.08306884765625, 0.0361328125, 0.1595458984375, 0.086...
embed
70060737_c0
70060737
prolog
0
Title: Prolog program to determine if two numbers are amicable Problem title: Prolog program to determine if two numbers are amicable Tags: prolog Problem: Prolog program to determine if two numbers are amicable Amicable(x,y) Return true or false Divisor(N,Divisor) :- Upperbound is round(sqrt(n), between(1,Upperbound, ...
Prolog program to determine if two numbers are amicable Prolog program to determine if two numbers are amicable prolog Prolog Amicable Divisor Upperbound Properdivisor Prolog program to determine if two numbers are amicable Amicable(x,y) Return true or false
[ -0.0098876953125, -0.00390625, 0.004974365234375, 0.0242919921875, 0.012939453125, 0.017333984375, -0.00048828125, 0.01373291015625, 0.01611328125, 0.001312255859375, 0.022705078125, -0.00182342529296875, -0.00015926361083984375, 0.0128173828125, 0.007232666015625, -0.01239013671875, ...
[ 1250, 4867, 1528, 83324, 2174, 6626, 101935, 621, 10, 16409, 2661, 47, 502, 62, 803, 51858, 26655, 56, 99091, 1264, 428, 425, 4, 53, 173340, 29568, 707, 98320 ]
[ 0.168701171875, 0.2469482421875, 0.168701171875, 0.1556396484375, 0.09906005859375, 0.13427734375, 0.1815185546875, 0.103515625, 0.128173828125, 0.214599609375, 0.2320556640625, 0.01085662841796875, 0.11572265625, 0.0992431640625, 0.1468505859375, 0.1707763671875, 0.07940673828125, ...
embed
15849184_c1
15849184
prolog
1
got the first phone in 1932 didn't have an exchange for AL or BE member([_, \+al, 1932], X), member([_, \+be, 1932],X), %The person who got the first phone in 1928 had an exchange for PE member([_,pe,1929], X), %Wallace first exchange was AL Exchange4 == al. My problem is this: ?- solve(X). false. Code signals: Solve,...
got the first phone in 1932 didn't have an exchange for AL or BE member([_, \+al, 1932], X), member([_, \+be, 1932],X), %The person who got the first phone in 1928 had an exchange for PE member([_,pe,1929], X), %Wallace first exchange was AL Exchange4 == al. My problem is this: ?- solve(X). false. Code signals: Solve,...
[ -0.004425048828125, 0.0126953125, 0.000019550323486328125, 0.0286865234375, -0.0240478515625, 0.00174713134765625, -0.037109375, 0.02294921875, 0.021240234375, -0.00830078125, -0.00787353515625, 0.0244140625, 0.033203125, 0.0166015625, -0.007659912109375, 0.01043701171875, -0.0019683...
[ 4163, 70, 5117, 24089, 60775, 18, 765, 121122, 100, 9804, 707, 9622, 32786, 4, 6, 1328, 289, 268, 1193, 247, 372, 1542, 1745, 3445, 23, 61786, 1902, 17051, 1081, 2947, 4235, 198076, 8509, 509, 104758, 617, 69112, 144, 2646, 2967, 903, ...
[ 0.1121826171875, 0.1021728515625, 0.1605224609375, 0.274169921875, 0.2298583984375, 0.08758544921875, 0.0654296875, 0.267822265625, 0.038848876953125, 0.1710205078125, 0.010589599609375, 0.1490478515625, 0.1798095703125, 0.014434814453125, 0.003387451171875, 0.09014892578125, 0.15917...
embed
10869718_c0
10869718
prolog
0
Title: composing a list of list Problem title: composing a list of list Tags: prolog Problem: composing a list of list Instead of pressing 'a' to see all results on terminal, I want store them in list of list ([ [] ] ). How can I do that over using newly created function namely bar ? I have a function; foo(X, Y). ^ ^ ^...
composing a list of list composing a list of list prolog composing a list of list Instead of pressing 'a' to see all results on terminal, I want store them in list of list ([ [] ] ). How can I do that over using newly created function namely bar ? I have a function; What I have done : But above code is not work.
[ 0.01336669921875, -0.0081787109375, -0.0000858306884765625, 0.01519775390625, -0.00677490234375, 0.023681640625, -0.0142822265625, 0.0223388671875, 0.0172119140625, -0.00360107421875, 0.01116943359375, 0.005096435546875, 0.017333984375, 0.004058837890625, -0.005279541015625, -0.0194091...
[ 9969, 232, 5303, 111, 502, 4867, 214, 175399, 24234, 11, 1957, 756, 50339, 33949, 3444, 4343, 2856, 23, 1065, 54, 450, 645, 17368, 3525, 75935, 32354, 110987, 1909, 36917, 18151, 959, 4488 ]
[ 0.1298828125, 0.1287841796875, 0.21142578125, 0.13330078125, 0.1082763671875, 0.17822265625, 0.003631591796875, 0.044677734375, 0.11865234375, 0.1011962890625, 0.1494140625, 0.06634521484375, 0.2060546875, 0.2266845703125, 0.1119384765625, 0.20703125, 0.03155517578125, 0.0926513671...
embed
56662067_c0
56662067
prolog
0
Title: Is there something like anonymous predicates in SWI Prolog? Problem title: Is there something like anonymous predicates in SWI Prolog? Tags: swi-prolog, prolog, lambda, anonymous-function Problem: Is there something like anonymous predicates in SWI Prolog? Can I define an anonymous predicate in SWI Prolog, bind ...
Is there something like anonymous predicates in SWI Prolog? Is there something like anonymous predicates in SWI Prolog? swi-prolog prolog lambda anonymous-function SWI Prolog Is there something like anonymous predicates in SWI Prolog? Can I define an anonymous predicate in SWI Prolog, bind it to a variable, and call it...
[ 0.0194091796875, 0.01519775390625, 0.012939453125, -0.02880859375, -0.005218505859375, 0.0137939453125, 0.0291748046875, -0.0045166015625, -0.00022220611572265625, -0.04248046875, 0.002777099609375, 0.0091552734375, -0.0302734375, -0.0159912109375, 0.02197265625, 0.00714111328125, 0....
[ 9844, 1884, 52184, 10821, 1653, 2063, 1636, 159, 38969, 1250, 4867, 2685, 91, 2452, 3454, 502, 6492, 85, 137175, 4171, 61924, 67, 68557, 77336, 11782, 14432 ]
[ 0.0552978515625, 0.063232421875, 0.2137451171875, 0.1368408203125, 0.1668701171875, 0.1986083984375, 0.1195068359375, 0.054443359375, 0.1937255859375, 0.1387939453125, 0.1964111328125, 0.0140533447265625, 0.010467529296875, 0.137451171875, 0.08355712890625, 0.0823974609375, 0.0995483...
embed
65669649_c0
65669649
prolog
0
Title: Tupper's Formula in Prolog Problem title: Tupper's Formula in Prolog Tags: bignum, prolog Problem: Tupper's Formula in Prolog Prolog is said to be very bad for numerics. Can we prove the contrary and like plot the following function? We need to plot the formula where y in a range [k,k+17) for a very la...
Tupper's Formula in Prolog Tupper's Formula in Prolog bignum prolog Tupper Formula Prolog Tupper's Formula in Prolog Prolog is said to be very bad for numerics. Can we prove the contrary and like plot the following function? We need to plot the formula where y in a range [k,k+17) for a very large k, so bignum...
[ 0.0186767578125, 0.0001983642578125, 0.0172119140625, -0.00046539306640625, 0, -0.013427734375, 0.020263671875, -0.01373291015625, 0.00885009765625, 0.0019073486328125, 0.000316619873046875, 0.0045166015625, -0.0076904296875, -0.001983642578125, 0.01544189453125, 0.006134033203125, 0...
[ 1371, 8079, 3768, 72791, 23, 1250, 4867, 6957, 2606, 502, 25, 7, 2804, 47, 186, 4552, 6494, 100, 54744, 4439, 4171, 23534, 2304, 1294, 1884, 23577, 25632, 32354, 3871, 26168, 7440, 113, 37457, 92, 1328, 59741, 21334, 472, 5809, 98893, 1...
[ 0.18798828125, 0.269287109375, 0.0848388671875, 0.276123046875, 0.07080078125, 0.1451416015625, 0.2239990234375, 0.0635986328125, 0.2125244140625, 0.084228515625, 0.0159454345703125, 0.033538818359375, 0.0751953125, 0.033538818359375, 0.0955810546875, 0.124755859375, 0.212646484375, ...
embed
4110394_c0
4110394
prolog
0
Title: What does this syntax mean? (Prolog) Problem title: What does this syntax mean? (Prolog) Tags: prolog Problem: What does this syntax mean? (Prolog) I have been trying to learn Prolog and came across this syntax on some example code. solve(Hs) :- Hs = [_,_,_,_,_], member(h(_, _, _, _, dog), Hs). This is only a po...
What does this syntax mean? (Prolog) What does this syntax mean? (Prolog) prolog What Prolog What does this syntax mean? (Prolog) I have been trying to learn Prolog and came across this syntax on some example code. This is only a portion of the code, but I'm confused with the h(_,_,_,_,dog) does. Any help would be grea...
[ -0.006011962890625, 0.0111083984375, -0.00396728515625, 0.0034027099609375, -0.01409912109375, 0.018310546875, -0.00311279296875, 0.00885009765625, 0.001617431640625, -0.02099609375, -0.007049560546875, -0.0191650390625, -0.01202392578125, -0.004913330078125, -0.001129150390625, 0.0025...
[ 4865, 14602, 903, 6002, 86531, 29459, 10752, 4867, 502, 1250, 30698, 36880, 27781, 18151, 126826, 55681, 70, 1096, 132, 454, 38507, 4358, 77947 ]
[ 0.06591796875, 0.05377197265625, 0.11328125, 0.1492919921875, 0.202880859375, 0.1380615234375, 0.1448974609375, 0.26025390625, 0.152099609375, 0.1934814453125, 0.03350830078125, 0.0106201171875, 0.0745849609375, 0.1068115234375, 0.012420654296875, 0.07275390625, 0.004150390625, 0.1...
embed
1417253_c0
1417253
prolog
0
Title: Prolog =:= operator Problem title: Prolog =:= operator Tags: prolog, operators, math, arithmetic-expressions, equality Problem: Prolog =:= operator There are some special operators in Prolog, one of them is is , however, recently I came across the =:= operator and have no idea how it works. Can someone explain w...
Prolog =:= operator Prolog =:= operator prolog operators math arithmetic-expressions equality Prolog Prolog =:= operator There are some special operators in Prolog, one of them is is , however, recently I came across the =:= operator and have no idea how it works. Can someone explain what this operator does, and also w...
[ 0.026123046875, -0.00982666015625, 0.032958984375, -0.01055908203125, 0.01287841796875, 0.01080322265625, 0.00189208984375, 0.00543212890625, -0.001007080078125, -0.0034027099609375, 0.0230712890625, -0.002593994140625, 0.00982666015625, 0.005828857421875, 0.005706787109375, -0.0046691...
[ 1250, 4867, 2203, 12, 1369, 39933, 502, 48909, 8962, 204629, 28, 161789, 5361, 7, 23, 83, 36880, 110, 6528, 3642, 442, 43240, 73342, 2367, 903, 14602, 7413, 1653, 13, 5983, 5303, 54 ]
[ 0.1771240234375, 0.282470703125, 0.1376953125, 0.1710205078125, 0.15478515625, 0.268798828125, 0.11669921875, 0.0909423828125, 0.04486083984375, 0.13232421875, 0.01861572265625, 0.1273193359375, 0.135986328125, 0.0650634765625, 0.013671875, 0.0718994140625, 0.046875, 0.017501831054...
embed
55792013_c0
55792013
prolog
0
Title: How to implement these Sigma notations in ECLIPSE-CLP or Prolog Problem title: How to implement these Sigma notations in ECLIPSE-CLP or Prolog Tags: prolog, eclipse-clp Problem: How to implement these Sigma notations in ECLIPSE-CLP or Prolog Is it possible for someone to tell me how to implement these sigmas in ...
How to implement these Sigma notations in ECLIPSE-CLP or Prolog How to implement these Sigma notations in ECLIPSE-CLP or Prolog prolog eclipse-clp How Sigma ECLIPSE-CLP Prolog How to implement these Sigma notations in ECLIPSE-CLP or Prolog Is it possible for someone to tell me how to implement these sigmas in ECLiPSe-C...
[ 0.027587890625, 0.00384521484375, 0.01007080078125, 0.018798828125, -0.01171875, 0.01361083984375, -0.0103759765625, 0.01336669921875, 0.0016937255859375, -0.0145263671875, -0.014892578125, -0.0157470703125, -0.01104736328125, 0.01324462890625, 0.01373291015625, 0.0052490234375, -0.0...
[ 11249, 47, 29479, 6097, 173328, 959, 21094, 23, 59947, 175909, 9127, 441, 37352, 707, 1250, 4867, 502, 106371, 184, 26775, 9, 7722, 22008, 14192, 3642, 1144, 1510, 9506, 9059, 13, 196219, 86869, 5 ]
[ 0.1158447265625, 0.057708740234375, 0.2332763671875, 0.10296630859375, 0.298583984375, 0.201171875, 0.1199951171875, 0.086181640625, 0.0906982421875, 0.2117919921875, 0.19189453125, 0.032440185546875, 0.215087890625, 0.02166748046875, 0.167724609375, 0.23095703125, 0.1072998046875, ...
embed
46590554_c1
46590554
prolog
1
1 and then continue the predicate using the tail: repeat([],_,[]). repeat(_,0,[]). repeat([A],Int,[A|X]):- Int1 is Int-1, repeat([A],Int1,X). repeat([A|Tail],1,[A|X]):- repeat(Tail,Int,X). % The line where I made a change. repeat([A|Tail],Int,[A|X]):- Int1 is Int-1, repeat([A|Tail],Int1,X). This did not work out. I do...
1 and then continue the predicate using the tail: repeat([],_,[]). repeat(_,0,[]). repeat([A],Int,[A|X]):- Int1 is Int-1, repeat([A],Int1,X). repeat([A|Tail],1,[A|X]):- repeat(Tail,Int,X). % The line where I made a change. repeat([A|Tail],Int,[A|X]):- Int1 is Int-1, repeat([A|Tail],Int1,X). This did not work out. I do...
[ -0.006683349609375, 0.0081787109375, 0.0029449462890625, 0.022216796875, -0.015869140625, 0.0208740234375, 0.007781982421875, -0.007110595703125, 0.01129150390625, -0.0035400390625, 0.01287841796875, 0.0017852783203125, 0.005645751953125, -0.0032806396484375, 0.01409912109375, 0.010009...
[ 106, 136, 7068, 21342, 1653, 2063, 67, 17368, 70, 46741, 119140, 132, 1065, 454, 2389, 194, 284, 4153, 18, 1542, 360, 418, 83, 5759, 9874, 379, 1745, 13315, 7228, 10, 15549, 58745, 6777, 959, 4488, 1810, 3714, 7108, 28560, 4358, 77947, ...
[ 0.1407470703125, 0.0218505859375, 0.0423583984375, 0.1845703125, 0.1693115234375, 0.1956787109375, 0.1632080078125, 0.105224609375, 0.03143310546875, 0.260986328125, 0.2783203125, 0.044830322265625, 0.03448486328125, 0.035675048828125, 0.08477783203125, 0.010894775390625, 0.107910156...
embed
7299403_c0
7299403
prolog
0
Title: Put the information from a leaf in a list Problem title: Put the information from a leaf in a list Tags: list, dcg, prolog, tree Problem: Put the information from a leaf in a list I want to write a program that puts the information from the leaves in a tree in a list. I tried doing this: leaves(l(_), [_]). leave...
Put the information from a leaf in a list Put the information from a leaf in a list list dcg prolog tree a Put Put the information from a leaf in a list I want to write a program that puts the information from the leaves in a tree in a list. I tried doing this: But it gives me L=[_A] . Why is that?
[ 0.0257568359375, 0.004791259765625, 0.0037689208984375, 0.01080322265625, 0.0093994140625, 0.0263671875, -0.0162353515625, -0.008056640625, 0.00714111328125, -0.04345703125, -0.0038299560546875, -0.010498046875, -0.005096435546875, 0.01153564453125, -0.0052490234375, 0.019287109375, ...
[ 19577, 70, 4677, 1295, 95, 2407, 23, 10, 5303, 238, 177, 502, 4867, 53201, 3444, 33022, 1528, 3884, 31358, 7, 37842, 76199, 163, 339, 1369, 1065, 454, 284, 44084 ]
[ 0.126220703125, 0.0177459716796875, 0.1812744140625, 0.11297607421875, 0.08056640625, 0.20263671875, 0.1070556640625, 0.05426025390625, 0.2171630859375, 0.0186614990234375, 0.09893798828125, 0.08697509765625, 0.1781005859375, 0.1856689453125, 0.0338134765625, 0.099853515625, 0.159912...
embed
16908764_c0
16908764
prolog
0
Title: Clearing Screen in Swipl prolog in windows Problem title: Clearing Screen in Swipl prolog in windows Tags: command-line, prolog, shell, windows Problem: Clearing Screen in Swipl prolog in windows When you are running command prompt in windows you can type the clear command to clear the screen. How do you do the ...
Clearing Screen in Swipl prolog in windows Clearing Screen in Swipl prolog in windows command-line prolog shell windows Clearing Screen Swipl Clearing Screen in Swipl prolog in windows When you are running command prompt in windows you can type the clear command to clear the screen. How do you do the same thing when yo...
[ 0.0118408203125, 0.0172119140625, 0.01519775390625, 0.019287109375, -0.0228271484375, -0.01055908203125, 0.01080322265625, -0.0125732421875, -0.0036773681640625, 0.002899169921875, -0.004425048828125, 0.00927734375, 0.00087738037109375, -0.01708984375, 0.0260009765625, 0.00003719329833...
[ 86120, 214, 94831, 23, 105432, 2424, 502, 4867, 54825, 75101, 2256, 128019, 51042, 105876, 10644, 34735, 49119, 2452, 11417 ]
[ 0.1551513671875, 0.02850341796875, 0.1788330078125, 0.0294342041015625, 0.1529541015625, 0.196044921875, 0.08270263671875, 0.160400390625, 0.1124267578125, 0.152099609375, 0.0426025390625, 0.1092529296875, 0.0545654296875, 0.1370849609375, 0.1126708984375, 0.1845703125, 0.14709472656...
embed
65549005_c0
65549005
prolog
0
Title: Create a list from user input in Prolog Problem title: Create a list from user input in Prolog Tags: sorting, prolog, merge, user-input Problem: Create a list from user input in Prolog I am having trouble how to do this on prolog The program will ask Input a number of elements: 6 Then the user will input 6 numbe...
Create a list from user input in Prolog Create a list from user input in Prolog sorting prolog merge user-input user Create Prolog Create a list from user input in Prolog I am having trouble how to do this on prolog The program will ask Input a number of elements: 6 Then the user will input 6 numbers , 4, 3, 6, 2, 9, 1...
[ 0.006591796875, 0.0179443359375, -0.0006256103515625, -0.0033111572265625, -0.0035247802734375, 0.0225830078125, -0.01708984375, 0.00225830078125, 0.0002155303955078125, -0.037109375, -0.00738525390625, -0.008544921875, -0.022705078125, 0.001739501953125, 0.01141357421875, -0.001594543...
[ 151313, 10, 5303, 1295, 38937, 107730, 23, 1250, 4867, 12096, 502, 42564, 73, 7077, 63134, 54, 903, 98, 1528, 26458, 360, 14012, 80854, 305, 1221, 101935, 201, 138, 116, 483, 209, 3934, 82800, 144996, 53666, 32036 ]
[ 0.148681640625, 0.041259765625, 0.2357177734375, 0.1458740234375, 0.1812744140625, 0.2470703125, 0.0748291015625, 0.1932373046875, 0.26904296875, 0.1954345703125, 0.150146484375, 0.17138671875, 0.068359375, 0.130615234375, 0.066650390625, 0.03497314453125, 0.014801025390625, 0.0129...
embed
2396187_c0
2396187
prolog
0
Title: Prolog Error Catching Problem title: Prolog Error Catching Tags: prolog Problem: Prolog Error Catching Given: fruitid('Apple', 'Granny Smith', 1). fruitid('Pear', 'Bartlett', 2). If I had the clause type_of_fruit(ID):- fruitid(Fruit, _, ID), write(Fruit). How could I implement a method to catch erroneous inputs?...
Prolog Error Catching Prolog Error Catching prolog Prolog Error Catching Apple Granny Smith Pear Bartlett type_of_fruit Fruit Prolog Error Catching Given: If I had the clause How could I implement a method to catch erroneous inputs? For instance Thanks. AS
[ 0.011962890625, 0.006256103515625, -0.013671875, 0.01239013671875, -0.005767822265625, 0.00457763671875, -0.0026702880859375, 0.004058837890625, -0.004150390625, -0.0211181640625, -0.015380859375, -0.03515625, -0.01275634765625, -0.0166015625, 0.035400390625, -0.01287841796875, 0.001...
[ 1250, 4867, 212059, 18826, 59207, 502, 4129, 14091, 299, 37700, 1460, 147, 41272, 37356, 10644, 4390, 23129, 217, 151958, 77878, 4263, 87, 1902, 70731, 13, 5809, 29479, 55300, 47, 105556, 70426, 86, 10821, 107730, 6483 ]
[ 0.154052734375, 0.256591796875, 0.22802734375, 0.1732177734375, 0.1380615234375, 0.09942626953125, 0.20361328125, 0.107177734375, 0.1263427734375, 0.1796875, 0.120361328125, 0.0703125, 0.1014404296875, 0.1812744140625, 0.17529296875, 0.0980224609375, 0.1763916015625, 0.057678222656...
embed
32740173_c0
32740173
prolog
0
Title: Prolog: incrementing variable Problem title: Prolog: incrementing variable Tags: prolog, global-variables Problem: Prolog: incrementing variable I'm a beginner in studying prolog. I have some problem to do this: I want create a global variable and incrementing this variable. I did in this way: assert(X,10). inc(...
Prolog: incrementing variable Prolog: incrementing variable prolog global-variables Prolog ERROR Arguments Prolog: incrementing variable I'm a beginner in studying prolog. I have some problem to do this: I want create a global variable and incrementing this variable. I did in this way: But I have this error:
[ 0.018798828125, 0.00506591796875, -0.000743865966796875, 0.0291748046875, -0.0005950927734375, 0.0196533203125, 0.000904083251953125, 0.00537109375, -0.00604248046875, -0.0208740234375, 0.01123046875, 0.0025634765625, -0.012451171875, -0.002410888671875, 0.041015625, 0.00555419921875, ...
[ 1250, 4867, 158661, 214, 77336, 502, 7964, 21690, 19736, 151206, 24638, 112140, 12, 9842, 1679, 35187, 2967, 3444, 28282, 903, 3917, 4966, 765, 18499 ]
[ 0.178466796875, 0.27099609375, 0.211181640625, 0.07879638671875, 0.262451171875, 0.123291015625, 0.1552734375, 0.1478271484375, 0.07275390625, 0.1636962890625, 0.1192626953125, 0.208740234375, 0.004119873046875, 0.0292510986328125, 0.06719970703125, 0.050537109375, 0.08245849609375, ...
embed
13338648_c0
13338648
prolog
0
Title: how to assert an arithmetic relation in Prolog database Problem title: how to assert an arithmetic relation in Prolog database Tags: arithmetic-expressions, prolog Problem: how to assert an arithmetic relation in Prolog database I'm using forward chaining algorithm proposed by Bratko . How can I enter arithmetic...
how to assert an arithmetic relation in Prolog database how to assert an arithmetic relation in Prolog database arithmetic-expressions prolog Prolog how to assert an arithmetic relation in Prolog database I'm using forward chaining algorithm proposed by Bratko . How can I enter arithmetic rules in prolog DB. For exampl...
[ 0.01446533203125, 0.015380859375, -0.00799560546875, 0.013671875, -0.00084686279296875, 0.016357421875, 0.0004215240478515625, 0.0101318359375, -0.0040283203125, -0.0189208984375, 0.0028076171875, -0.0009002685546875, -0.002777099609375, 0.0048828125, 0.0186767578125, -0.00848388671875...
[ 3642, 47, 237, 33657, 187, 8962, 282, 9523, 41911, 23, 1250, 4867, 63399, 142, 204629, 502, 40225, 1608, 14653, 234873, 26171, 119794, 265, 11249, 30957, 91736, 57976, 3444, 32070, 2273, 15824, 4588, 120840 ]
[ 0.06658935546875, 0.042205810546875, 0.1136474609375, 0.235107421875, 0.0655517578125, 0.16796875, 0.145263671875, 0.13916015625, 0.19775390625, 0.051025390625, 0.1724853515625, 0.2471923828125, 0.19921875, 0.039306640625, 0.141845703125, 0.13818359375, 0.1536865234375, 0.090942382...
embed
47007850_c0
47007850
prolog
0
Title: Prolog Predicades Relation Problem title: Prolog Predicades Relation Tags: prolog Problem: Prolog Predicades Relation I studing prolog and i got issues to resolve this exercise: I need to create a a method that I call Relation(Variable, List of List) EX: list(a,b) list(c,b) list(c,h) Return should be all the lis...
Prolog Predicades Relation Prolog Predicades Relation prolog Prolog Predicades Relation Prolog Predicades Relation I studing prolog and i got issues to resolve this exercise: I need to create a a method that I call Relation(Variable, List of List) EX: Return should be all the list that contains the variable Relation(c,...
[ 0.000751495361328125, 0.02392578125, 0.003448486328125, 0.022216796875, -0.00060272216796875, 0.01409912109375, -0.0004558563232421875, 0.0106201171875, 0.00970458984375, -0.036865234375, -0.0036163330078125, -0.01483154296875, -0.0284423828125, -0.00994873046875, 0.007049560546875, 0....
[ 1250, 4867, 7145, 2063, 988, 116822, 502, 27938, 37348, 103608, 81979, 3871, 28282, 55300, 11782, 81827, 14, 2886, 32036, 111, 29426, 173340, 5608, 186, 756, 70, 5303, 70541, 77336, 238, 4, 1542, 16, 129745, 4358 ]
[ 0.1514892578125, 0.2379150390625, 0.138427734375, 0.2012939453125, 0.0797119140625, 0.263916015625, 0.101806640625, 0.019073486328125, 0.07769775390625, 0.114501953125, 0.08837890625, 0.0438232421875, 0.11474609375, 0.17626953125, 0.0457763671875, 0.151611328125, 0.0892333984375, 0...
embed
6685153_c0
6685153
prolog
0
Title: Prolog why does this query return this particular result and what is its effect Problem title: Prolog why does this query return this particular result and what is its effect Tags: prolog Problem: Prolog why does this query return this particular result and what is its effect ?- assert(p(a)),assert(p(b)),setof(X...
Prolog why does this query return this particular result and what is its effect Prolog why does this query return this particular result and what is its effect prolog Prolog H142 Prolog why does this query return this particular result and what is its effect Whats the effect of this query and why does it return this pa...
[ 0.02783203125, -0.001373291015625, 0.00244140625, 0.0267333984375, -0.0113525390625, 0.0203857421875, -0.006317138671875, -0.0001220703125, 0.01080322265625, -0.0198974609375, 0.0181884765625, 0.0034332275390625, -0.01336669921875, -0.005889892578125, 0.00124359130859375, 0.00842285156...
[ 1250, 4867, 15400, 14602, 903, 41, 1294, 30646, 17311, 16750, 6863, 21543, 2367, 83, 502, 572, 152837, 136 ]
[ 0.1624755859375, 0.250732421875, 0.168212890625, 0.08221435546875, 0.10406494140625, 0.1607666015625, 0.154296875, 0.2159423828125, 0.1533203125, 0.1636962890625, 0.07513427734375, 0.2293701171875, 0.04327392578125, 0.0819091796875, 0.11016845703125, 0.05108642578125, 0.1971435546875...
embed
13868358_c0
13868358
prolog
0
Title: How can i find pairs in a list, Prolog? Problem title: How can i find pairs in a list, Prolog? Tags: logic, list, prolog Problem: How can i find pairs in a list, Prolog? I have a problem, I have a list with numeric elements such as in the example. I´d like to find all pairs, and count it. (Every Element can only...
How can i find pairs in a list, Prolog? How can i find pairs in a list, Prolog? logic list prolog How Prolog num_pairs How can i find pairs in a list, Prolog? I have a problem, I have a list with numeric elements such as in the example. I´d like to find all pairs, and count it. (Every Element can only be one part of on...
[ -0.017578125, 0.0038299560546875, 0.0052490234375, 0.003753662109375, -0.00128173828125, 0.034912109375, -0.01177978515625, -0.008544921875, 0.018310546875, -0.057861328125, -0.0111083984375, -0.0299072265625, 0.0079345703125, -0.0033111572265625, 0.01226806640625, 0.0031890869140625, ...
[ 11249, 831, 17, 7413, 80836, 7, 23, 5303, 1250, 4867, 62775, 502, 13269, 109637, 10, 2967, 54744, 80854, 27781, 1884, 756, 54529, 442, 200647, 48325, 4734, 1632, 2831, 4358, 86869 ]
[ 0.07025146484375, 0.07623291015625, 0.072998046875, 0.17626953125, 0.287353515625, 0.1759033203125, 0.1104736328125, 0.2236328125, 0.1650390625, 0.2257080078125, 0.1339111328125, 0.1182861328125, 0.1546630859375, 0.27099609375, 0.011962890625, 0.045654296875, 0.078125, 0.1051025390...
embed
17803928_c0
17803928
prolog
0
Title: Save text in a list or other Problem title: Save text in a list or other Tags: prolog Problem: Save text in a list or other I have this code: open('file.txt', append, Stream), write(Stream, (clause(t1))), close(Stream) I repeat it several times in my program, then I open and close the file several times. Can I o...
Save text in a list or other Save text in a list or other prolog Save file.txt Stream Save text in a list or other I have this code: I repeat it several times in my program, then I open and close the file several times. Can I open the file only once saving the content in a list with append and finally I save this list ...
[ 0.02392578125, 0.01556396484375, 0.01104736328125, 0.01312255859375, 0.006561279296875, -0.012451171875, -0.005615234375, 0.0201416015625, 0.01422119140625, -0.03564453125, -0.00174713134765625, 0.0196533203125, -0.009521484375, 0.003997802734375, 0.036376953125, 0.0004730224609375, ...
[ 64944, 7986, 23, 5303, 3789, 502, 4867, 11435, 124326, 115061, 10, 18151, 119140, 442, 40368, 20028, 1528, 9803, 20903, 4171, 4734, 24145, 57, 6496, 10941, 114689, 71, 30098 ]
[ 0.18505859375, 0.1904296875, 0.0755615234375, 0.15966796875, 0.06201171875, 0.11151123046875, 0.1651611328125, 0.10699462890625, 0.1932373046875, 0.1998291015625, 0.0160675048828125, 0.1280517578125, 0.142822265625, 0.01125335693359375, 0.05548095703125, 0.08740234375, 0.07373046875,...
embed
75344507_c0
75344507
prolog
0
Title: Prolog prefix sum of a list Problem title: Prolog prefix sum of a list Tags: list, sum, prolog, prefix Problem: Prolog prefix sum of a list I want to implement the prolog predicate prefixSum(L, R) that calculates the prefix sum of a list i.e: ?- prefixSum([1,2,3,4],R). R=[1,3,6,10]. Here is my solution so far: p...
Prolog prefix sum of a list Prolog prefix sum of a list list sum prolog prefix Prolog Prolog prefix sum of a list I want to implement the prolog predicate prefixSum(L, R) that calculates the prefix sum of a list i.e: Here is my solution so far: What can I try next?
[ 0.00885009765625, 0.01373291015625, 0.0252685546875, -0.005218505859375, -0.023681640625, 0.003173828125, -0.0216064453125, 0.007598876953125, 0.006500244140625, -0.022216796875, 0.00872802734375, -0.002716064453125, -0.005035400390625, -0.006866455078125, 0.011962890625, 0.03051757812...
[ 1250, 4867, 183114, 10554, 111, 5303, 502, 3444, 29479, 1653, 2063, 67, 294, 316, 866, 4, 627, 74481, 1636, 13, 83, 29806, 2060, 9790, 11737 ]
[ 0.15771484375, 0.23828125, 0.25146484375, 0.2269287109375, 0.040252685546875, 0.209716796875, 0.1414794921875, 0.07098388671875, 0.182861328125, 0.120849609375, 0.1475830078125, 0.049346923828125, 0.09375, 0.2066650390625, 0.1280517578125, 0.03692626953125, 0.1695556640625, 0.17602...
embed
29904286_c0
29904286
prolog
0
Title: prolog why eclipse clp cannot compile this programme - syntax error Problem title: prolog why eclipse clp cannot compile this programme - syntax error Tags: prolog Problem: prolog why eclipse clp cannot compile this programme - syntax error OK here is the code http://pastebin.com/dEKMKvp9 Could you tell me why i...
prolog why eclipse clp cannot compile this programme - syntax error prolog why eclipse clp cannot compile this programme - syntax error prolog pastebin.com dEKMKvp9 prolog why eclipse clp cannot compile this programme - syntax error OK here is the code Could you tell me why i cant compile it? It says always: syntax err...
[ 0.0164794921875, 0.018310546875, -0.00130462646484375, 0.0166015625, 0.004180908203125, -0.0004100799560546875, -0.006561279296875, 0.015625, 0.0029449462890625, -0.048828125, -0.00762939453125, -0.0120849609375, 0.00007915496826171875, -0.014404296875, 0.021728515625, -0.0035858154296...
[ 502, 4867, 15400, 28, 106371, 184, 33139, 254, 53418, 9969, 1340, 903, 26693, 6002, 86531, 18499, 71099, 7568, 104, 15567, 47859, 334, 1126, 18151, 14192, 163, 17, 45767, 17378, 11343, 1305, 55923, 64, 73, 39933, 84751, 1733 ]
[ 0.1361083984375, 0.1944580078125, 0.1036376953125, 0.0106201171875, 0.190185546875, 0.1243896484375, 0.10638427734375, 0.1751708984375, 0.147216796875, 0.16796875, 0.14794921875, 0.0289459228515625, 0.1536865234375, 0.0904541015625, 0.1854248046875, 0.1474609375, 0.0830078125, 0.16...
embed
37171303_c2
37171303
prolog
2
ms | 60 ms | 5.7x -------------------+--------+---------+---------| I'm baffled by these (reproducible) results... Can somebody tell me what's going on? Footnote 1 : For the sake of brevity and readability, variable names were slightly adapted. Footnote 2 : Running SWI-Prolog 7.3.20 with suitable command-line argument...
ms | 60 ms | 5.7x -------------------+--------+---------+---------| I'm baffled by these (reproducible) results... Can somebody tell me what's going on? Footnote 1 : For the sake of brevity and readability, variable names were slightly adapted. Footnote 2 : Running SWI-Prolog 7.3.20 with suitable command-line argument...
[ -0.0023345947265625, 0.0162353515625, 0.00311279296875, -0.006134033203125, 0.00653076171875, -0.00860595703125, -0.0147705078125, -0.00157928466796875, 0.0279541015625, -0.0262451171875, 0.027099609375, 0.005279541015625, -0.006805419921875, -0.000682830810546875, 0.006011962890625, -...
[ 68163, 6, 58745, 1496, 160355, 425, 103428, 1328, 110405, 87, 39, 961, 4902, 6259, 390, 6097, 107, 102446, 28236, 50339, 27, 4171, 176256, 14192, 163, 2367, 7, 7730, 98, 48345, 110536, 12301, 77336, 123055, 161549, 39908, 297, 159020, 28398...
[ 0.2220458984375, 0.02679443359375, 0.041412353515625, 0.201904296875, 0.1866455078125, 0.1126708984375, 0.049102783203125, 0.0972900390625, 0.0439453125, 0.043243408203125, 0.057098388671875, 0.044464111328125, 0.1383056640625, 0.108642578125, 0.016937255859375, 0.0908203125, 0.03948...
embed
67994761_c0
67994761
prolog
0
Title: Using list name as nth0 argument in prolog Problem title: Using list name as nth0 argument in prolog Tags: prolog, list Problem: Using list name as nth0 argument in prolog I want to use list name as nth0 function argument, which should give me nth element, for example: nth0(2,[1,2,3],X). X = 3. defined list: L =...
Using list name as nth0 argument in prolog Using list name as nth0 argument in prolog prolog list Using nth0 Using list name as nth0 argument in prolog I want to use list name as nth0 function argument, which should give me nth element, for example: defined list: I want it to return X = 3. it returns random numbers in ...
[ 0.00677490234375, -0.007080078125, 0.015380859375, -0.006866455078125, -0.0000762939453125, -0.0009307861328125, 0.0216064453125, 0.00396728515625, 0.019775390625, -0.04052734375, 0.0159912109375, -0.020751953125, -0.012451171875, -0.0014190673828125, 0.00147247314453125, -0.0145263671...
[ 345, 5303, 9351, 237, 653, 927, 2389, 10750, 502, 4867, 6953, 23, 3444, 4527, 32354, 5608, 8337, 12830, 61924, 71, 30646, 1193, 2203, 1031, 96759, 101935, 339, 10565, 54100, 2592, 1549, 3882 ]
[ 0.043853759765625, 0.189697265625, 0.16552734375, 0.0703125, 0.144775390625, 0.163818359375, 0.209228515625, 0.2169189453125, 0.1563720703125, 0.2286376953125, 0.027069091796875, 0.0201568603515625, 0.06591796875, 0.085693359375, 0.1304931640625, 0.008270263671875, 0.0287017822265625...
embed
37138630_c1
37138630
prolog
1
(a, 10), person(b, 30)], SortList). SortList = [person(b,30),person(a,10)] ? ; But when I try with a list of 3 or more person appears an error: ?- sortListPerson([person(a, 10), person(b, 30), person(c, 40)], SortList). {ERROR: arithmetic:>=/2 - expected an arithmetically evaluable expression, found person(a,10)} no ?-...
(a, 10), person(b, 30)], SortList). SortList = [person(b,30),person(a,10)] ? ; But when I try with a list of 3 or more person appears an error: ?- sortListPerson([person(a, 10), person(b, 30), person(c, 40)], SortList). {ERROR: arithmetic:>=/2 - expected an arithmetically evaluable expression, found person(a,10)} no ?-...
[ 0.01409912109375, 0.0184326171875, 0.00128173828125, 0.0125732421875, -0.03271484375, 0.00897216796875, 0.0008544921875, 0.007080078125, 0.00537109375, -0.00182342529296875, 0.0024566650390625, 0.0115966796875, 0.01190185546875, -0.0093994140625, 0.01373291015625, -0.028564453125, 0....
[ 11, 4, 209, 247, 3445, 275, 496, 53666, 154663, 2203, 30816, 62946, 50258, 705, 4966, 3229, 9790, 678, 5303, 111, 138, 707, 1286, 135179, 18499, 12096, 160054, 238, 1112, 12501, 14255, 8962, 282, 9523, 2740, 1369, 12477, 84751, 1928, 1592...
[ 0.062744140625, 0.029510498046875, 0.19189453125, 0.0212554931640625, 0.168701171875, 0.091064453125, 0.1876220703125, 0.2490234375, 0.2724609375, 0.0877685546875, 0.1771240234375, 0.2176513671875, 0.201171875, 0.022674560546875, 0.03253173828125, 0.01483154296875, 0.1173095703125, ...
embed
59828754_c2
59828754
prolog
2
.util.Formatter.format, Formatter.java:2519, Formatter.java:2455, Main.main, Main.java:7, Buddy, Argument, test.pl, Missing, stdio.h, World, MainSlf4j.java, MainSlf4j, Logger, LoggerFactory.getLogger, MainSlf4j.class, args1, args2, logger.info, Object, repo1.maven.org, maven2, slf4j, slf4j-api, slf4j-api-1.7.30.jar, lo...
.util.Formatter.format, Formatter.java:2519, Formatter.java:2455, Main.main, Main.java:7, Buddy, Argument, test.pl, Missing, stdio.h, World, MainSlf4j.java, MainSlf4j, Logger, LoggerFactory.getLogger, MainSlf4j.class, args1, args2, logger.info, Object, repo1.maven.org, maven2, slf4j, slf4j-api, slf4j-api-1.7.30.jar, lo...
[ -0.0203857421875, 0.007568359375, 0.005126953125, 0.00927734375, 0.002105712890625, 0.0084228515625, 0.03369140625, 0.007080078125, 0.007415771484375, 0.0245361328125, -0.0079345703125, -0.0142822265625, -0.0086669921875, -0.0103759765625, 0.02099609375, -0.00933837890625, 0.01129150...
[ 6, 5, 34, 3675, 102973, 11, 3055, 51727, 4, 60972, 720, 24071, 21224, 2947, 25732, 11663, 12321, 24931, 12, 966, 131007, 53, 112140, 3034, 2424, 16771, 214, 6138, 5670, 127, 6661, 17463, 617, 170, 64906, 56, 135518, 31667, 3794, 113972, ...
[ 0.0386962890625, 0.126220703125, 0.05126953125, 0.1824951171875, 0.1905517578125, 0.1256103515625, 0.1756591796875, 0.27734375, 0.069091796875, 0.2347412109375, 0.187744140625, 0.30029296875, 0.0982666015625, 0.15185546875, 0.0347900390625, 0.1529541015625, 0.1312255859375, 0.12927...
embed
23345307_c0
23345307
prolog
0
Title: Don't Care in Prolog Problem title: Don't Care in Prolog Tags: prolog Problem: Don't Care in Prolog Is there a way to tell Prolog that an element in a list can be any value? I tried using _ but it didn't work. I'm trying to compare two lists of zeros and ones but in some places I don't care about the v...
Don't Care in Prolog Don't Care in Prolog prolog Don Care Prolog Don't Care in Prolog Is there a way to tell Prolog that an element in a list can be any value? I tried using _ but it didn't work. I'm trying to compare two lists of zeros and ones but in some places I don't care about the value, for example: I ...
[ 0.009521484375, 0.016845703125, 0.020263671875, -0.0079345703125, -0.0184326171875, 0.01080322265625, 0.012451171875, -0.00701904296875, 0.004425048828125, -0.0013885498046875, 0.0096435546875, -0.01129150390625, -0.00830078125, 0.02685546875, -0.0098876953125, -0.00958251953125, 0.0...
[ 7650, 3768, 18, 20731, 23, 1250, 4867, 502, 2685, 10, 3917, 47, 14192, 450, 12830, 5303, 831, 186, 2499, 34292, 37842, 17368, 101, 4488, 31577, 69101, 6626, 45234, 64333, 44677, 2301, 517, 1672, 3444, 76172, 69112, 418, 454, 30646, 29568,...
[ 0.1331787109375, 0.036773681640625, 0.0968017578125, 0.2080078125, 0.0650634765625, 0.170166015625, 0.2493896484375, 0.11474609375, 0.002044677734375, 0.014617919921875, 0.087646484375, 0.051116943359375, 0.1552734375, 0.055511474609375, 0.2103271484375, 0.214599609375, 0.13598632812...
embed
10067341_c0
10067341
prolog
0
Title: Why repeat not working? Problem title: Why repeat not working? Tags: prolog Problem: Why repeat not working? genVertex(List,Row,Col,Result) :- Col1 is Col, repeat, (Col \= Row -> calculateSum(List,List,Row,Col1,Y),write(Y),write('\n'), Result = [Y|Tail] ;Result = Tail ), Col1 is Col1 + 1, Col1 == 5. I want to ca...
Why repeat not working? Why repeat not working? prolog Why List Row Col Result Col1 Tail Why repeat not working? I want to call calculateSum with increment of Col + 1 until Col1 is 5? Or any other way to achieve this?
[ 0.00543212890625, 0.00396728515625, 0.004058837890625, 0.018310546875, -0.01025390625, -0.017578125, 0.0155029296875, 0.0019989013671875, 0.0260009765625, -0.0157470703125, 0.00738525390625, -0.0264892578125, -0.006500244140625, -0.02197265625, -0.005279541015625, 0.005340576171875, ...
[ 44084, 119140, 959, 20697, 502, 4867, 32036, 96190, 11554, 126684, 418, 1218, 379, 3444, 11782, 74481, 67, 294, 316, 6, 158661, 997, 106, 24189, 190, 69307 ]
[ 0.100341796875, 0.321533203125, 0.1231689453125, 0.166015625, 0.126220703125, 0.17578125, 0.12384033203125, 0.15185546875, 0.144775390625, 0.10760498046875, 0.06683349609375, 0.0931396484375, 0.09564208984375, 0.065185546875, 0.07879638671875, 0.1409912109375, 0.087158203125, 0.066...
embed
64595616_c1
64595616
prolog
1
, Comp1, Comp2], op(Op, Op_str), calc2(Comp1, Expr1), calc2(Comp2, Expr2), Expr =.. [Op, Expr1, Expr2]. But since this^ isn't the type of solution I'm looking for it doesn't really help much with my issue. I can pretty easily perform single calculations (like calc(add(1,2), N) ), but I struggle with anything more compl...
, Comp1, Comp2], op(Op, Op_str), calc2(Comp1, Expr1), calc2(Comp2, Expr2), Expr =.. [Op, Expr1, Expr2]. But since this^ isn't the type of solution I'm looking for it doesn't really help much with my issue. I can pretty easily perform single calculations (like calc(add(1,2), N) ), but I struggle with anything more compl...
[ 0.01385498046875, -0.009521484375, -0.0028076171875, 0.004302978515625, 0.0067138671875, 0.0269775390625, 0.01324462890625, -0.0133056640625, 0.0257568359375, -0.0194091796875, -0.0096435546875, -0.0133056640625, -0.00714111328125, -0.00921630859375, -0.0028533935546875, 0.003601074218...
[ 15612, 418, 90173, 233, 39029, 2331, 9297, 247, 6510, 238, 304, 108161, 60075, 42, 17727, 10461, 4, 2203, 8353, 18, 10644, 29806, 16487, 100, 6183, 4358, 5045, 31089, 831, 28875, 72546, 51339, 11001, 74481, 5256, 4028, 133063, 541, 1284, ...
[ 0.1453857421875, 0.0438232421875, 0.12744140625, 0.1668701171875, 0.1822509765625, 0.16162109375, 0.1771240234375, 0.001251220703125, 0.136474609375, 0.0860595703125, 0.1322021484375, 0.1375732421875, 0.114501953125, 0.13330078125, 0.0050048828125, 0.09765625, 0.012359619140625, 0....
embed
20858618_c0
20858618
prolog
0
Title: sort list of lists based on third element and return the two first element Problem title: sort list of lists based on third element and return the two first element Tags: prolog Problem: sort list of lists based on third element and return the two first element How to sort list of lists consisting of [[A,B,2000]...
sort list of lists based on third element and return the two first element sort list of lists based on third element and return the two first element prolog sort list of lists based on third element and return the two first element How to sort list of lists consisting of [[A,B,2000],[C,D,2008],[F,G,2004]] based on last...
[ 0.0235595703125, -0.01708984375, -0.00024318695068359375, 0.0025177001953125, -0.019775390625, 0.02099609375, -0.0177001953125, -0.0101318359375, 0.0091552734375, 0.00130462646484375, 0.029296875, 0.004791259765625, -0.015869140625, 0.0021514892578125, -0.002105712890625, -0.0066223144...
[ 12096, 5303, 111, 7, 35509, 50960, 12830, 30646, 6626, 5117, 502, 4867, 58055, 284, 571, 13821, 441, 397, 16396, 919, 724, 30416, 98, 4568, 12638, 27781 ]
[ 0.2474365234375, 0.2100830078125, 0.0513916015625, 0.083251953125, 0.09375, 0.2081298828125, 0.1751708984375, 0.1539306640625, 0.0855712890625, 0.07818603515625, 0.09783935546875, 0.1614990234375, 0.0570068359375, 0.044097900390625, 0.071044921875, 0.172607421875, 0.0313720703125, ...
embed
44360781_c0
44360781
prolog
0
Title: Why is prolog unification depth-first-search instead of breadth-first-search? Problem title: Why is prolog unification depth-first-search instead of breadth-first-search? Tags: iso-prolog, prolog Problem: Why is prolog unification depth-first-search instead of breadth-first-search? I just started learning about ...
Why is prolog unification depth-first-search instead of breadth-first-search? Why is prolog unification depth-first-search instead of breadth-first-search? iso-prolog prolog Why Why is prolog unification depth-first-search instead of breadth-first-search? I just started learning about prolog and I was wondering why it'...
[ 0.0419921875, 0.01385498046875, 0.0164794921875, 0.01171875, -0.0179443359375, -0.021484375, -0.00543212890625, -0.00482177734375, 0.0072021484375, 0.0035552978515625, 0.00604248046875, -0.024658203125, 0.015625, -0.0024566650390625, 0.00592041015625, -0.0115966796875, -0.00046920776...
[ 44084, 83, 502, 4867, 51, 41274, 168867, 13448, 271, 86250, 64457, 179967, 927, 13882, 3454, 15400, 442, 104, 17447, 876, 23468, 15549, 17408, 20777, 13 ]
[ 0.153076171875, 0.0404052734375, 0.1595458984375, 0.254150390625, 0.1600341796875, 0.1341552734375, 0.2132568359375, 0.1185302734375, 0.093994140625, 0.2437744140625, 0.137939453125, 0.16455078125, 0.112060546875, 0.09722900390625, 0.135009765625, 0.1126708984375, 0.0452880859375, ...
embed
46638910_c0
46638910
prolog
0
Title: Prolog: Constraining the elements of a list to be within a range Problem title: Prolog: Constraining the elements of a list to be within a range Tags: constraint-programming, prolog, range, clpfd Problem: Prolog: Constraining the elements of a list to be within a range Are there any ways to constrain the element...
Prolog: Constraining the elements of a list to be within a range Prolog: Constraining the elements of a list to be within a range constraint-programming prolog range clpfd Prolog Constraining Prolog: Constraining the elements of a list to be within a range Are there any ways to constrain the elements of a list to be wi...
[ 0.000518798828125, 0.0020599365234375, 0.006683349609375, 0.006195068359375, 0.0022735595703125, 0.0120849609375, -0.0078125, 0.01904296875, 0.01177978515625, -0.004730224609375, -0.016357421875, -0.00885009765625, -0.0024871826171875, -0.0022735595703125, 0.012451171875, 0.00241088867...
[ 1250, 4867, 39215, 118862, 80854, 5303, 47, 186, 28032, 37457, 158, 2816, 4288, 28966, 502, 39557, 71, 2499, 48322, 73, 111, 10, 2806, 6713, 1286, 1884, 130514, 64457, 17368, 17721, 41600, 305, 1193 ]
[ 0.15625, 0.257568359375, 0.142578125, 0.227783203125, 0.2098388671875, 0.226806640625, 0.06689453125, 0.06787109375, 0.1815185546875, 0.265869140625, 0.146240234375, 0.22314453125, 0.089111328125, 0.110595703125, 0.1251220703125, 0.038330078125, 0.057373046875, 0.0290374755859375, ...
embed
12706726_c0
12706726
prolog
0
Title: How to write a predicate doublelist(L, R)? Problem title: How to write a predicate doublelist(L, R)? Tags: lambda, prolog Problem: How to write a predicate doublelist(L, R)? How to write a predicate doublelist(L, R) with L is list of numbers, R is also a list and has the same length as L and each element is doub...
How to write a predicate doublelist(L, R)? How to write a predicate doublelist(L, R)? lambda prolog How How to write a predicate doublelist(L, R)? How to write a predicate doublelist(L, R) with L is list of numbers, R is also a list and has the same length as L and each element is doubled up. Example: I'm a prolog begi...
[ -0.0020904541015625, -0.0011444091796875, -0.007415771484375, -0.0057373046875, -0.0003948211669921875, 0.03271484375, 0.00115203857421875, 0.005279541015625, 0.006622314453125, -0.0211181640625, 0.01092529296875, 0.01544189453125, -0.00830078125, -0.0184326171875, -0.0101318359375, 0....
[ 11249, 47, 33022, 1653, 2063, 67, 41929, 6562, 866, 627, 4, 6492, 85, 502, 4867, 10, 678, 339, 83, 5303, 101935, 5701, 140909, 12638, 12830, 1257, 1679, 55681, 184, 1632, 35978, 4358 ]
[ 0.08074951171875, 0.0303192138671875, 0.17138671875, 0.1795654296875, 0.2056884765625, 0.1143798828125, 0.19482421875, 0.259765625, 0.155517578125, 0.184814453125, 0.055206298828125, 0.13232421875, 0.0797119140625, 0.1171875, 0.177001953125, 0.004302978515625, 0.04498291015625, 0.1...
embed