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
4084427_c0
4084427
prolog
0
Title: How to create a fact in SWI-Prolog? Problem title: How to create a fact in SWI-Prolog? Tags: prolog Problem: How to create a fact in SWI-Prolog? I just want to create something like: like(x,y) . I've been trying for a long time and am really frustrated, could anyone please tell me how to do it???!!! Code signals...
How to create a fact in SWI-Prolog? How to create a fact in SWI-Prolog? prolog How SWI-Prolog How to create a fact in SWI-Prolog? I just want to create something like: like(x,y) . I've been trying for a long time and am really frustrated, could anyone please tell me how to do it???!!!
[ 0.033935546875, 0.0203857421875, 0.00008535385131835938, 0.0242919921875, -0.005340576171875, 0.00119781494140625, 0.013916015625, -0.01025390625, -0.01470947265625, -0.0216064453125, 0.00927734375, -0.01416015625, -0.0172119140625, -0.00921630859375, 0.0029144287109375, -0.00744628906...
[ 11249, 47, 28282, 10, 15824, 23, 159, 38969, 9, 10752, 4867, 502, 1660, 3444, 9844, 1884, 425, 4, 53, 31577, 4989, 1733, 444, 6183, 57357, 5809, 35672, 22936, 14192, 163, 3642, 54, 442, 7273, 1564 ]
[ 0.1109619140625, 0.06964111328125, 0.235107421875, 0.1239013671875, 0.2783203125, 0.09234619140625, 0.10498046875, 0.239501953125, 0.043731689453125, 0.1470947265625, 0.2305908203125, 0.099365234375, 0.029754638671875, 0.109619140625, 0.099365234375, 0.193603515625, 0.0941162109375, ...
embed
66217659_c0
66217659
prolog
0
Title: functor as variable in Prolog Problem title: functor as variable in Prolog Tags: prolog Problem: functor as variable in Prolog I have a deep compound term that I want to query. assertion is a(b(c(d))). I try to query ?- a(B(c(d))). Here B is a variable. It gives error. What is the way to query such structure? Co...
functor as variable in Prolog functor as variable in Prolog prolog Prolog functor as variable in Prolog I have a deep compound term that I want to query. assertion is I try to query Here B is a variable. It gives error. What is the way to query such structure?
[ 0.0283203125, 0.007720947265625, -0.005828857421875, 0.009033203125, 0.007659912109375, -0.00133514404296875, -0.00604248046875, -0.005828857421875, -0.006317138671875, -0.035888671875, -0.002655029296875, -0.0054931640625, -0.01202392578125, 0.005889892578125, 0.0125732421875, 0.00491...
[ 7477, 18770, 237, 77336, 1250, 4867, 23, 502, 53894, 217773, 13579, 3444, 41, 1294, 16865, 1363, 9790, 11853, 335, 83, 10, 76199, 18499, 3917, 6044, 45646 ]
[ 0.1820068359375, 0.23095703125, 0.10809326171875, 0.2861328125, 0.1475830078125, 0.24267578125, 0.0269012451171875, 0.076904296875, 0.1429443359375, 0.2098388671875, 0.17333984375, 0.05303955078125, 0.0826416015625, 0.1197509765625, 0.1328125, 0.0014467239379882812, 0.07098388671875,...
embed
10431130_c0
10431130
prolog
0
Title: How to find string length using prolog Problem title: How to find string length using prolog Tags: prolog, iso-prolog Problem: How to find string length using prolog I have got a method length(list,var) which gives me the length of a list but i want to find the length of a String, anyone with a solution ? Code s...
How to find string length using prolog How to find string length using prolog prolog iso-prolog prolog How How to find string length using prolog I have got a method length(list,var) which gives me the length of a list but i want to find the length of a String, anyone with a solution ?
[ 0.004669189453125, 0.020751953125, -0.006439208984375, 0.034912109375, -0.0194091796875, 0.00098419189453125, 0.00482177734375, 0.0196533203125, 0.0107421875, -0.0693359375, -0.005889892578125, -0.023681640625, -0.008544921875, 0.00176239013671875, 0.003143310546875, -0.01324462890625,...
[ 11249, 47, 7413, 79315, 140909, 17368, 502, 4867, 13882, 3454, 55300, 6562, 1961, 5303, 17, 3444, 70, 111, 23351, 214, 35672, 678, 29806 ]
[ 0.0244293212890625, 0.0433349609375, 0.11529541015625, 0.251708984375, 0.2064208984375, 0.07623291015625, 0.14599609375, 0.2117919921875, 0.08819580078125, 0.095458984375, 0.1015625, 0.06878662109375, 0.07879638671875, 0.0926513671875, 0.006183624267578125, 0.042938232421875, 0.04321...
embed
10766279_c0
10766279
prolog
0
Title: How to correct predicate on Prolog? Problem title: How to correct predicate on Prolog? Tags: prolog, turbo-prolog Problem: How to correct predicate on Prolog? I have the following prolog code: predicates like(string) clauses like(apple). like(girl). q :- like(A),write(A). goal q. How to get two solutions? Code s...
How to correct predicate on Prolog? How to correct predicate on Prolog? prolog turbo-prolog How Prolog How to correct predicate on Prolog? I have the following prolog code: How to get two solutions?
[ 0.0014190673828125, 0.019775390625, -0.000911712646484375, 0.02685546875, -0.010009765625, 0.0218505859375, 0.017578125, 0.0038299560546875, 0.0004825592041015625, -0.02783203125, 0.00897216796875, 0.00125885009765625, -0.01251220703125, 0.018310546875, 0.018310546875, 0.01416015625, ...
[ 11249, 47, 26785, 1653, 2063, 67, 98, 1250, 4867, 502, 94779, 3454, 25632, 18151, 2046, 6626, 51347 ]
[ 0.09619140625, 0.09014892578125, 0.2061767578125, 0.196533203125, 0.2327880859375, 0.13623046875, 0.11962890625, 0.1942138671875, 0.245849609375, 0.122314453125, 0.167724609375, 0.12109375, 0.0009703636169433594, 0.0933837890625, 0.0023746490478515625, 0.1053466796875, 0.142700195312...
embed
7297155_c0
7297155
prolog
0
Title: Prolog: find the last index of an element in a list Problem title: Prolog: find the last index of an element in a list Tags: prolog Problem: Prolog: find the last index of an element in a list Suppose I have a list [1,2,1,3,2,0,8,3,1] ,I want to find the index of the last 3 which is 7 , How to do it in prolog? C...
Prolog: find the last index of an element in a list Prolog: find the last index of an element in a list prolog Prolog Prolog: find the last index of an element in a list Suppose I have a list [1,2,1,3,2,0,8,3,1] ,I want to find the index of the last 3 which is 7 , How to do it in prolog?
[ 0.01531982421875, 0.0245361328125, -0.0003833770751953125, -0.002105712890625, -0.022705078125, 0.01409912109375, -0.002532958984375, 0.01019287109375, 0.0037078857421875, -0.029052734375, 0.00946044921875, -0.031494140625, -0.01019287109375, 0.0004329681396484375, 0.005615234375, -0.0...
[ 1250, 4867, 12, 7413, 70, 4568, 63262, 111, 12830, 23, 5303, 502, 121691, 8364, 87, 765, 10, 133063, 363, 216969, 1019, 76172, 568, 3444, 47, 138, 3129, 83, 361, 11249, 54, 442 ]
[ 0.157470703125, 0.25390625, 0.0175933837890625, 0.1441650390625, 0.066162109375, 0.239501953125, 0.253662109375, 0.086669921875, 0.191650390625, 0.06951904296875, 0.188720703125, 0.135986328125, 0.0257415771484375, 0.003997802734375, 0.009429931640625, 0.03277587890625, 0.00048828125...
embed
23258510_c0
23258510
prolog
0
Title: How to write Prolog math functions Problem title: How to write Prolog math functions Tags: math, prolog Problem: How to write Prolog math functions How would I write the following arithmetic expression in Prolog? sqrt(9*log10(X)/5,9) * (1-(2X*sqrt(X)/5))^(2/7) The square root is using the 9th root. Code signals:...
How to write Prolog math functions How to write Prolog math functions math prolog How Prolog log10 How to write Prolog math functions How would I write the following arithmetic expression in Prolog? The square root is using the 9th root.
[ 0.00738525390625, 0.0035400390625, -0.01519775390625, -0.0033111572265625, 0.01055908203125, 0.01141357421875, -0.0045166015625, -0.004180908203125, 0.00042724609375, -0.01953125, 0.00182342529296875, 0.00927734375, -0.02294921875, -0.02099609375, 0.0147705078125, -0.01434326171875, ...
[ 11249, 47, 33022, 1250, 4867, 48909, 32354, 7, 502, 12684, 963, 2806, 25632, 8962, 282, 9523, 125195, 23, 108047, 74855, 17368, 483, 927, 5 ]
[ 0.0579833984375, 0.07659912109375, 0.182373046875, 0.187744140625, 0.25830078125, 0.1375732421875, 0.1856689453125, 0.0251617431640625, 0.135498046875, 0.14599609375, 0.1568603515625, 0.01171875, 0.0731201171875, 0.07470703125, 0.01922607421875, 0.0181732177734375, 0.162841796875, ...
embed
35594027_c0
35594027
prolog
0
Title: Rotate a matrix in Prolog Problem title: Rotate a matrix in Prolog Tags: list, prolog, matrix Problem: Rotate a matrix in Prolog How can I rotate a 4 x 4 matrix about its center point in Prolog ? I can simply rearrange the elements in case of 4 x 4 matrix but how to do this for a general case like N x N ? Code s...
Rotate a matrix in Prolog Rotate a matrix in Prolog list prolog matrix Rotate Prolog Rotate a matrix in Prolog How can I rotate a 4 x 4 matrix about its center point in Prolog ? I can simply rearrange the elements in case of 4 x 4 matrix but how to do this for a general case like N x N ?
[ -0.007568359375, 0.0091552734375, 0.0233154296875, -0.0019378662109375, -0.01025390625, -0.003997802734375, -0.03466796875, 0.005279541015625, -0.01055908203125, -0.007354736328125, -0.0211181640625, -0.0025482177734375, -0.01458740234375, -0.01470947265625, -0.00433349609375, 0.014038...
[ 146283, 67, 10, 50944, 425, 23, 1250, 4867, 5303, 502, 831, 47014, 201, 1022, 1672, 27585, 6275, 456, 147, 94250, 80854, 4537, 541 ]
[ 0.2257080078125, 0.176513671875, 0.016510009765625, 0.19482421875, 0.1070556640625, 0.002490997314453125, 0.14404296875, 0.237060546875, 0.1134033203125, 0.09454345703125, 0.03173828125, 0.210693359375, 0.153076171875, 0.08392333984375, 0.048431396484375, 0.166015625, 0.1066284179687...
embed
8425360_c0
8425360
prolog
0
Title: What does the /2 /3 mean in prolog? Problem title: What does the /2 /3 mean in prolog? Tags: prolog Problem: What does the /2 /3 mean in prolog? What do those /2 /3 that I see in example code do? Like this one: 4 ?- trace([equals,contains]). % equals/2: [call, redo, exit, fail] % contains/2: [call, redo, exit, f...
What does the /2 /3 mean in prolog? What does the /2 /3 mean in prolog? prolog What What does the /2 /3 mean in prolog? What do those /2 /3 that I see in example code do? Like this one:
[ 0.01336669921875, 0.00537109375, -0.0031585693359375, 0.00885009765625, -0.01904296875, 0.019775390625, 0.0062255859375, 0.0135498046875, 0.01190185546875, 0.0025177001953125, -0.002349853515625, -0.00634765625, -0.00958251953125, -0.0257568359375, -0.00872802734375, 0.0126953125, -0...
[ 12477, 18113, 29459, 502, 4867, 23, 14602, 70, 6, 8382, 1957, 27781, 18151, 54 ]
[ 0.19580078125, 0.28125, 0.1090087890625, 0.1505126953125, 0.2138671875, 0.045440673828125, 0.04547119140625, 0.023529052734375, 0.0147552490234375, 0.029083251953125, 0.018524169921875, 0.08917236328125, 0.060791015625, 0.0269317626953125 ]
embed
3299445_c1
3299445
prolog
1
SWI-Prolog like ?- countsmooth(1, [2,3,5,7,11,13,17,19,23], 1, 100000000, Count) . I get a result. But when I call smooth like ?- smooth(2,100,10000,Smooths). I get the following error: ERROR: is/2: Arguments are not sufficiently instantiated Code signals: SWI-Prolog, ERROR, Arguments, Count, Min, Max, NewX, NCount1, ...
SWI-Prolog like ?- countsmooth(1, [2,3,5,7,11,13,17,19,23], 1, 100000000, Count) . I get a result. But when I call smooth like ?- smooth(2,100,10000,Smooths). I get the following error: ERROR: is/2: Arguments are not sufficiently instantiated Code signals: SWI-Prolog, ERROR, Arguments, Count, Min, Max, NewX, NCount1, ...
[ 0.004730224609375, 0.017578125, 0.021240234375, -0.011962890625, 0.005645751953125, 0.0169677734375, 0.01397705078125, -0.0216064453125, 0.0299072265625, -0.01080322265625, 0.0140380859375, 0.005340576171875, 0.00836181640625, 0.0216064453125, 0.01019287109375, -0.0101318359375, -0.0...
[ 159, 38969, 9, 10752, 4867, 1884, 705, 54529, 26634, 29827, 155761, 135461, 1662, 2681, 2489, 2947, 3742, 805, 197094, 108210, 16750, 4966, 11782, 156100, 54753, 3559, 191281, 432, 25632, 18499, 151206, 24638, 83, 12477, 112140, 959, 6, 12998...
[ 0.095458984375, 0.2467041015625, 0.054656982421875, 0.1619873046875, 0.219970703125, 0.201416015625, 0.141845703125, 0.209228515625, 0.191650390625, 0.2071533203125, 0.1202392578125, 0.1434326171875, 0.136962890625, 0.121337890625, 0.126220703125, 0.15478515625, 0.1446533203125, 0....
embed
74575698_c0
74575698
prolog
0
Title: Value Semantics in Parallel Programming Problem title: Value Semantics in Parallel Programming Tags: semantics, math, logic-programming, ppl, prolog Problem: Value Semantics in Parallel Programming What is the advantage of following value semantics while designing parallel programming? Code signals: Value, Seman...
Value Semantics in Parallel Programming Value Semantics in Parallel Programming semantics math logic-programming ppl prolog Value Semantics Parallel Programming Value Semantics in Parallel Programming What is the advantage of following value semantics while designing parallel programming?
[ -0.002593994140625, 0.0198974609375, -0.0166015625, 0.01904296875, -0.00994873046875, 0.00970458984375, 0.00457763671875, 0.00750732421875, -0.003265380859375, -0.0191650390625, 0.01025390625, 0.03857421875, -0.004608154296875, 0.00958251953125, 0.000865936279296875, 0.006195068359375,...
[ 190060, 10232, 109109, 7, 23, 211485, 27958, 214, 484, 48909, 62775, 28966, 915, 2424, 502, 4867, 83, 70, 92940, 25632, 34292, 4331, 95103, 56037, 449 ]
[ 0.270751953125, 0.202880859375, 0.2259521484375, 0.01032257080078125, 0.06787109375, 0.2216796875, 0.1632080078125, 0.045562744140625, 0.181396484375, 0.15283203125, 0.1448974609375, 0.1627197265625, 0.0213775634765625, 0.1610107421875, 0.10858154296875, 0.1624755859375, 0.0060424804...
embed
4356109_c1
4356109
prolog
1
is OK, but "control" doesn't work correctly: ?- control([0,0,0,0,0,0,0,0,0], 3, 6, R). R = [x, 0, 0, 0, x, k, x, 0, 0]. should be R = [x, 0, 0, 0, 0, k, x, 0, 0] . Any ideas, how to change "control" predicate? Code signals: Table, Pos, NewTable, TempTable1, Pos-N, TempTable2, TempTable3, TempTable4, TempTable5, TempTa...
is OK, but "control" doesn't work correctly: ?- control([0,0,0,0,0,0,0,0,0], 3, 6, R). R = [x, 0, 0, 0, x, k, x, 0, 0]. should be R = [x, 0, 0, 0, 0, k, x, 0, 0] . Any ideas, how to change "control" predicate? Code signals: Table, Pos, NewTable, TempTable1, Pos-N, TempTable2, TempTable3, TempTable4, TempTable5, TempTa...
[ -0.003692626953125, 0.013916015625, -0.0052490234375, -0.00225830078125, -0.0205078125, 0.0032501220703125, 0.00677490234375, -0.002227783203125, 0.0014801025390625, 0.023681640625, 0.0054931640625, 0.013427734375, -0.0059814453125, 0.004486083984375, -0.01165771484375, 0.0159912109375...
[ 83, 14315, 1284, 81988, 22027, 18, 4488, 26785, 538, 705, 9, 6226, 2389, 63527, 138, 305, 627, 2203, 425, 757, 1022, 4, 472, 5608, 186, 25647, 15549, 1653, 2063, 67, 28864, 26073, 112997, 13498, 2356, 618, 2886, 37446, 418, 839, 304, ...
[ 0.07000732421875, 0.203857421875, 0.05572509765625, 0.2919921875, 0.0718994140625, 0.10205078125, 0.1405029296875, 0.1527099609375, 0.017791748046875, 0.134033203125, 0.07940673828125, 0.30419921875, 0.07916259765625, 0.1865234375, 0.1356201171875, 0.143310546875, 0.1729736328125, ...
embed
7281658_c0
7281658
prolog
0
Title: Prolog; a question about notation in an assignment Problem title: Prolog; a question about notation in an assignment Tags: computer-science, prolog Problem: Prolog; a question about notation in an assignment I get hat isa/2 is a rule, that takes two objects or terms. But what would isa2/2 imply? That isa is defi...
Prolog; a question about notation in an assignment Prolog; a question about notation in an assignment computer-science prolog Prolog Prolog; a question about notation in an assignment I get hat isa/2 is a rule, that takes two objects or terms. But what would isa2/2 imply? That isa is defined twice?
[ 0.0220947265625, -0.003936767578125, 0.01446533203125, 0.0296630859375, -0.0012359619140625, 0.01123046875, -0.01153564453125, 0.018310546875, 0.00787353515625, -0.0194091796875, 0.0177001953125, -0.0198974609375, -0.0029296875, -0.0103759765625, 0.005096435546875, 0.00041961669921875,...
[ 1250, 4867, 74, 9655, 1672, 110, 22062, 23, 95486, 674, 13909, 175201, 502, 142, 2046, 1256, 25412, 12477, 83, 79986, 450, 51776, 6626, 36746, 7, 707, 69407, 2367, 2806, 304, 21980, 538, 9925, 61924, 71, 186351 ]
[ 0.1475830078125, 0.22998046875, 0.032928466796875, 0.10357666015625, 0.037628173828125, 0.1865234375, 0.17333984375, 0.06719970703125, 0.2008056640625, 0.12384033203125, 0.09619140625, 0.09136962890625, 0.07666015625, 0.0098724365234375, 0.0213623046875, 0.2164306640625, 0.232421875,...
embed
64716427_c1
64716427
prolog
1
d(2,4),point2d(5,0),_10084) ERROR: [10] isosceles(point2d(0,0),point2d(2,4),point2d(5,0)) at /home/checkman123/prolog-geometry/threepoints.pl:25 ERROR: [9] <user> EDIT: so I think i got it working? by using , instead. I still wants to know why =:= doesnt work tho. Code signals: ERROR, Arguments, point2d, _10064, _10084...
d(2,4),point2d(5,0),_10084) ERROR: [10] isosceles(point2d(0,0),point2d(2,4),point2d(5,0)) at /home/checkman123/prolog-geometry/threepoints.pl:25 ERROR: [9] <user> EDIT: so I think i got it working? by using , instead. I still wants to know why =:= doesnt work tho. Code signals: ERROR, Arguments, point2d, _10064, _10084...
[ 0.00396728515625, -0.0108642578125, 0.0021820068359375, -0.00714111328125, -0.016357421875, 0.017578125, -0.0247802734375, 0.00994873046875, -0.007293701171875, -0.00872802734375, 0.023681640625, -0.015869140625, 0.008544921875, -0.0115966796875, 0.01104736328125, 0.004638671875, 0.0...
[ 104, 54753, 4, 29557, 38496, 304, 71, 104116, 77495, 3559, 13903, 151206, 24638, 63709, 83, 232, 46873, 7, 63527, 247, 16, 99, 29552, 78292, 669, 48636, 3454, 4867, 429, 87739, 927, 107, 13, 2424, 21224, 55737, 5351, 17, 442, 20697, 173...
[ 0.1861572265625, 0.078369140625, 0.033172607421875, 0.1807861328125, 0.21044921875, 0.1571044921875, 0.1534423828125, 0.0833740234375, 0.107666015625, 0.07232666015625, 0.212646484375, 0.15234375, 0.138671875, 0.1239013671875, 0.1566162109375, 0.112060546875, 0.222412109375, 0.1044...
embed
35277223_c0
35277223
prolog
0
Title: Split integer from atom in prolog Problem title: Split integer from atom in prolog Tags: prolog Problem: Split integer from atom in prolog I want to split an integer from an atom. Any ideas how I could do that? Sample query: ?- split_int('nc(4)', N). % given: the atom 'nc(4)' N = 4. % expected: the integer 4 Cod...
Split integer from atom in prolog Split integer from atom in prolog prolog atom Split split_int Split integer from atom in prolog I want to split an integer from an atom. Any ideas how I could do that? Sample query:
[ -0.017578125, 0.004302978515625, 0.01611328125, 0.0262451171875, -0.021728515625, 0.0289306640625, 0.011474609375, 0.0022430419921875, -0.00186920166015625, -0.029052734375, -0.00714111328125, 0.0064697265625, -0.0308837890625, 0.02099609375, 0.022705078125, 0.0029449462890625, 0.000...
[ 46474, 892, 1505, 1295, 34627, 23, 502, 4867, 65450, 4288, 3444, 47, 25647, 3642, 5809, 54, 450, 947, 33209, 41, 1294 ]
[ 0.218994140625, 0.1536865234375, 0.16357421875, 0.15576171875, 0.233154296875, 0.07574462890625, 0.151611328125, 0.2213134765625, 0.2081298828125, 0.1763916015625, 0.1077880859375, 0.07110595703125, 0.067626953125, 0.0227203369140625, 0.048004150390625, 0.04412841796875, 0.0422973632...
embed
40731033_c0
40731033
prolog
0
Title: Prolog singleton variables is shown Problem title: Prolog singleton variables is shown Tags: prolog Problem: Prolog singleton variables is shown I have an error in my Prolog code: member(X,[X|T]). member(X,[H|T]):- member(X,T),!. The code works and shows a correct results but I can't get the reason why that erro...
Prolog singleton variables is shown Prolog singleton variables is shown prolog Prolog Prolog singleton variables is shown I have an error in my Prolog code: The code works and shows a correct results but I can't get the reason why that error is shown ?
[ 0.017578125, 0.01165771484375, 0.01043701171875, 0.0035247802734375, -0.01318359375, 0.0086669921875, 0.006317138671875, 0.00823974609375, -0.007415771484375, -0.03369140625, -0.00634765625, -0.01556396484375, 0.010498046875, 0.01519775390625, 0.0213623046875, 0.00086212158203125, -0...
[ 1250, 4867, 11001, 1507, 77336, 127887, 7, 502, 18499, 18151, 43240, 45831, 26785, 50339, 31635 ]
[ 0.1639404296875, 0.238037109375, 0.18017578125, 0.2047119140625, 0.2462158203125, 0.129638671875, 0.0266876220703125, 0.115966796875, 0.180419921875, 0.12841796875, 0.047576904296875, 0.007305145263671875, 0.060516357421875, 0.07916259765625, 0.040863037109375 ]
embed
10073720_c2
10073720
prolog
2
2499]] [[48,49,97,2352],[48,50,98,2400],[48,51,99,2448],[49,50,99,2450],[49,51,100,2499]] [[48,49,97,2352],[48,50,98,2400],[49,50,99,2450],[49,51,100,2499]] [[48,49,97,2352],[49,50,99,2450],[49,51,100,2499]] [[49,50,99,2450],[49,51,100,2499]] false. As you can see, a sublist gets removed each time, I just can't see why...
2499]] [[48,49,97,2352],[48,50,98,2400],[48,51,99,2448],[49,50,99,2450],[49,51,100,2499]] [[48,49,97,2352],[48,50,98,2400],[49,50,99,2450],[49,51,100,2499]] [[48,49,97,2352],[49,50,99,2450],[49,51,100,2499]] [[49,50,99,2450],[49,51,100,2499]] false. As you can see, a sublist gets removed each time, I just can't see why...
[ -0.0042724609375, 0.0213623046875, 0.00445556640625, 0.0157470703125, -0.02001953125, 0.0133056640625, -0.009033203125, 0.0257568359375, 0.021240234375, 0.046630859375, 0.006256103515625, 0.00445556640625, 0.01104736328125, -0.00579833984375, -0.01068115234375, 0.02978515625, 0.03063...
[ 744, 5046, 86245, 110558, 9285, 4, 12977, 14773, 149265, 90173, 2525, 16665, 304, 10700, 268, 11703, 2357, 3559, 1065, 98320, 831, 1957, 1614, 6562, 62163, 184750, 12638, 1733, 1660, 18, 15400, 28864, 26073, 7, 32036, 36335, 73111 ]
[ 0.1845703125, 0.30712890625, 0.04278564453125, 0.025054931640625, 0.224609375, 0.0156097412109375, 0.2430419921875, 0.2313232421875, 0.136474609375, 0.09149169921875, 0.17138671875, 0.2406005859375, 0.0294952392578125, 0.2169189453125, 0.008270263671875, 0.1409912109375, 0.1309814453...
embed
29316431_c0
29316431
prolog
0
Title: Compatibility of different clp(FD) library implementations Problem title: Compatibility of different clp(FD) library implementations Tags: clpfd, compatibility, prolog Problem: Compatibility of different clp(FD) library implementations Is there some place I can find a collection of differences in clpfd implement...
Compatibility of different clp(FD) library implementations Compatibility of different clp(FD) library implementations clpfd compatibility prolog Compatibility Compatibility of different clp(FD) library implementations Is there some place I can find a collection of differences in clpfd implementations?
[ 0.0098876953125, 0.01141357421875, 0.00138092041015625, 0.0155029296875, -0.00830078125, -0.00179290771484375, 0.0164794921875, -0.0120849609375, 0.01470947265625, 0.0255126953125, -0.00579833984375, -0.0111083984375, 0.01904296875, 0.02587890625, 0.01422119140625, -0.00885009765625, ...
[ 15612, 1888, 83259, 12921, 33139, 254, 98553, 35773, 208124, 1294, 39557, 71, 112793, 502, 4867, 7413, 42486, 60212, 7 ]
[ 0.09326171875, 0.1319580078125, 0.06915283203125, 0.1292724609375, 0.10595703125, 0.1875, 0.2076416015625, 0.1290283203125, 0.1607666015625, 0.003665924072265625, 0.12158203125, 0.18212890625, 0.1748046875, 0.071533203125, 0.146484375, 0.0304718017578125, 0.0843505859375, 0.1634521...
embed
42466637_c0
42466637
prolog
0
Title: decrement the same variable in Prolog Problem title: decrement the same variable in Prolog Tags: prolog Problem: decrement the same variable in Prolog Something like this: decr(X, X) :- X is X-1. I want to use it for decrement a number in the parent rule , if this number equal 0 for example, the parent rule retu...
decrement the same variable in Prolog decrement the same variable in Prolog prolog Prolog X-1 decrement the same variable in Prolog Something like this: I want to use it for decrement a number in the parent rule , if this number equal 0 for example, the parent rule return false.
[ 0.01239013671875, 0.000484466552734375, 0.0093994140625, 0.0159912109375, -0.00726318359375, -0.00653076171875, -0.004852294921875, 0.000705718994140625, -0.000492095947265625, -0.02880859375, 0.006988525390625, 0.003265380859375, -0.006927490234375, 0.006195068359375, 0.030517578125, ...
[ 8, 7612, 674, 5701, 77336, 23, 1250, 4867, 502, 1193, 5759, 1884, 3444, 4527, 442, 14012, 49129, 79986, 105950, 757, 30646, 98320 ]
[ 0.1343994140625, 0.19775390625, 0.0777587890625, 0.1162109375, 0.2342529296875, 0.048065185546875, 0.130615234375, 0.2113037109375, 0.07318115234375, 0.0997314453125, 0.1043701171875, 0.0208892822265625, 0.017425537109375, 0.045623779296875, 0.019073486328125, 0.08392333984375, 0.137...
embed
54449376_c1
54449376
prolog
1
= [_5242, _5248], N = 2, Ps = [[_5242, _5248]] ; Ls = [_5242, _5248, _5254], ... See this and this for list_partitionedNU/2 . Follow up after answers. Based on answer by William partitions(Ps) :- length(Ls,N), assign(Ls), list_partitionedNU(Ls,Ps). Code signals: _5112, _5118, _5124, variable_names, Vars, read_term, li...
= [_5242, _5248], N = 2, Ps = [[_5242, _5248]] ; Ls = [_5242, _5248, _5254], ... See this and this for list_partitionedNU/2 . Follow up after answers. Based on answer by William partitions(Ps) :- length(Ls,N), assign(Ls), list_partitionedNU(Ls,Ps). Code signals: _5112, _5118, _5124, variable_names, Vars, read_term, li...
[ -0.0223388671875, 0.0084228515625, 0.0042724609375, -0.00244140625, -0.0177001953125, 0.01116943359375, 0.006134033203125, -0.00897216796875, 0.01324462890625, -0.0057373046875, -0.00927734375, 0.005615234375, 0.01531982421875, 0.01019287109375, -0.0074462890625, 0.00848388671875, 0....
[ 2203, 12744, 13023, 4, 101, 758, 110763, 541, 116, 436, 7, 2819, 339, 12338, 268, 5303, 15866, 1363, 297, 33261, 12477, 6, 77168, 35166, 25031, 2878, 5256, 132, 683, 15772, 140909, 866, 839, 95486, 28864, 26073, 11703, 1530, 1819, 2357, ...
[ 0.102294921875, 0.13427734375, 0.228759765625, 0.044891357421875, 0.02301025390625, 0.0919189453125, 0.201171875, 0.1270751953125, 0.0958251953125, 0.12548828125, 0.1666259765625, 0.00341796875, 0.0985107421875, 0.166748046875, 0.027587890625, 0.165283203125, 0.1845703125, 0.107299...
embed
33450104_c0
33450104
prolog
0
Title: Writing a predicate to add atoms Problem title: Writing a predicate to add atoms Tags: prolog Problem: Writing a predicate to add atoms I have to write a predicate to do work like following: ?- cat(north,south,X). X = northsouth ?- cat(alley,'91',Y). X = alley91 ?-cat(7,uthah,H). Bad Input H = H Please Help.. Co...
Writing a predicate to add atoms Writing a predicate to add atoms prolog Writing alley91 Bad Input Writing a predicate to add atoms I have to write a predicate to do work like following: Please Help..
[ 0.012451171875, 0.0035858154296875, -0.01373291015625, 0.0216064453125, 0.0002765655517578125, 0.0279541015625, -0.01141357421875, 0.01318359375, -0.00164794921875, -0.03173828125, 0.0230712890625, -0.01470947265625, 0.00109100341796875, -0.00958251953125, -0.000308990478515625, 0.0008...
[ 213185, 1653, 2063, 67, 47, 15190, 34627, 7, 10, 502, 4867, 747, 53, 12183, 12745, 360, 7077, 765, 33022, 54, 4488, 1884, 25632, 30607, 39527 ]
[ 0.1488037109375, 0.1707763671875, 0.2021484375, 0.1312255859375, 0.10791015625, 0.17724609375, 0.2266845703125, 0.027252197265625, 0.051239013671875, 0.11248779296875, 0.1414794921875, 0.117919921875, 0.06884765625, 0.2078857421875, 0.1451416015625, 0.06689453125, 0.09906005859375, ...
embed
24164092_c0
24164092
prolog
0
Title: Iteration through a list in prolog without recursion Problem title: Iteration through a list in prolog without recursion Tags: iteration, prolog Problem: Iteration through a list in prolog without recursion I want to write all of a list in prolog. But the problem is I don't want to use recursion. So I want to to...
Iteration through a list in prolog without recursion Iteration through a list in prolog without recursion iteration prolog Iteration Iteration through a list in prolog without recursion I want to write all of a list in prolog. But the problem is I don't want to use recursion. So I want to to this iteratively.
[ -0.005340576171875, 0.0101318359375, 0.004241943359375, 0.009765625, 0.0028228759765625, 0.003875732421875, -0.0157470703125, -0.00213623046875, 0.008056640625, -0.043212890625, -0.0062255859375, -0.01055908203125, -0.012939453125, -0.0030059814453125, 0.0164794921875, 0.01446533203125...
[ 87, 720, 2320, 8305, 5303, 23, 502, 4867, 15490, 195625, 1830, 17, 3444, 33022, 756, 111, 2967, 2301, 18, 4527, 47, 903, 45023, 5 ]
[ 0.07147216796875, 0.25146484375, 0.0904541015625, 0.177734375, 0.1905517578125, 0.051361083984375, 0.1640625, 0.220458984375, 0.145263671875, 0.1710205078125, 0.06903076171875, 0.056640625, 0.0936279296875, 0.134765625, 0.10009765625, 0.0775146484375, 0.0762939453125, 0.04577636718...
embed
16501934_c0
16501934
prolog
0
Title: What will be output of the following prolog simple code and why? Problem title: What will be output of the following prolog simple code and why? Tags: prolog Problem: What will be output of the following prolog simple code and why? eight(A,B):- eight(A,[],B). eight([],X,X). eight([A|B],C,X):- eight(B,[A|C],X). Q...
What will be output of the following prolog simple code and why? What will be output of the following prolog simple code and why? prolog What What will be output of the following prolog simple code and why? Query
[ 0.02685546875, 0.0167236328125, 0.006805419921875, 0.00982666015625, -0.0220947265625, 0.0289306640625, -0.0284423828125, 0.01129150390625, -0.00762939453125, -0.0028533935546875, 0.00421142578125, -0.02197265625, -0.01129150390625, 0.0238037109375, -0.01611328125, 0.000518798828125, ...
[ 1221, 140992, 25632, 502, 4867, 8781, 18151, 15400, 4865, 186, 111, 136, 58836 ]
[ 0.07281494140625, 0.2227783203125, 0.09710693359375, 0.15771484375, 0.2220458984375, 0.169677734375, 0.158935546875, 0.1322021484375, 0.08551025390625, 0.05810546875, 0.01410675048828125, 0.03143310546875, 0.005466461181640625 ]
embed
21114133_c0
21114133
prolog
0
Title: How to create user interface for prolog program Problem title: How to create user interface for prolog program Tags: prolog Problem: How to create user interface for prolog program I am creating a game based on prolog logic base and i would like to create a user interface for it. Any ideas what programming langu...
How to create user interface for prolog program How to create user interface for prolog program prolog How How to create user interface for prolog program I am creating a game based on prolog logic base and i would like to create a user interface for it. Any ideas what programming language integrates with prolog?
[ 0.03515625, -0.00799560546875, 0.0033111572265625, 0.0186767578125, 0.00189208984375, 0.0184326171875, -0.0002727508544921875, 0.00933837890625, -0.005523681640625, -0.06396484375, 0, -0.00102996826171875, -0.02197265625, -0.0228271484375, 0.0162353515625, 0.0027618408203125, 0.01098...
[ 11249, 47, 28282, 38937, 101758, 100, 502, 4867, 1528, 105233, 6712, 35509, 98, 62775, 3647, 2806, 1884, 10, 442, 25647, 2367, 56037, 449, 46876, 78779, 90, 678 ]
[ 0.0906982421875, 0.0762939453125, 0.1763916015625, 0.1917724609375, 0.2744140625, 0.1087646484375, 0.157470703125, 0.25537109375, 0.18310546875, 0.11187744140625, 0.11859130859375, 0.0858154296875, 0.048675537109375, 0.11419677734375, 0.0970458984375, 0.0160675048828125, 0.0674438476...
embed
4280986_c0
4280986
prolog
0
Title: How to transpose a matrix in prolog Problem title: How to transpose a matrix in prolog Tags: list, matrix, prolog, transpose Problem: How to transpose a matrix in prolog How can I transpose a list like [[1,2,3][4,5,6][6,7,8]] to [[1,4,6],[2,7,8],[3,6,9]] ? To depict it: I'd like to flip the matrix 90 degree to t...
How to transpose a matrix in prolog How to transpose a matrix in prolog list matrix prolog transpose How How to transpose a matrix in prolog How can I transpose a list like [[1,2,3][4,5,6][6,7,8]] to [[1,4,6],[2,7,8],[3,6,9]] ? To depict it: I'd like to flip the matrix 90 degree to the left. How can I do that?
[ 0.01007080078125, 0.0157470703125, 0.017578125, -0.0047607421875, -0.012939453125, -0.0164794921875, -0.029541015625, 0.00732421875, 0.000881195068359375, -0.03173828125, -0.0001430511474609375, 0.01214599609375, -0.019775390625, -0.00152587890625, -0.0213623046875, 0.0045166015625, ...
[ 11249, 47, 3900, 78381, 10, 50944, 425, 23, 502, 4867, 5303, 831, 1884, 133063, 363, 617, 104629, 910, 136005, 418, 128191, 304, 171379, 18695, 147505, 2510, 79385, 70, 25737, 54 ]
[ 0.07958984375, 0.15478515625, 0.2130126953125, 0.23876953125, 0.05078125, 0.221923828125, 0.169921875, 0.07196044921875, 0.1785888671875, 0.25048828125, 0.2222900390625, 0.05718994140625, 0.08245849609375, 0.0997314453125, 0.1226806640625, 0.06927490234375, 0.138916015625, 0.079162...
embed
74294537_c1
74294537
prolog
1
(B,_,_,_,E,F), ( (C=E,D=F); (C=E,fator_n(A)); ( (tipo_o(A),fator_n(A)); (tipo_o(B),tipo_o(A),D=F) ); (tipo_ab(B),D=F) ). For reference: doador(name,gender,age,weight,blood_type,rh_factor) I expected to get all of the eligible people whom A can be a donor to. Code signals: Why, ProLog, pode_doar, tipo_a, tipo_b, tipo_ab...
(B,_,_,_,E,F), ( (C=E,D=F); (C=E,fator_n(A)); ( (tipo_o(A),fator_n(A)); (tipo_o(B),tipo_o(A),D=F) ); (tipo_ab(B),D=F) ). For reference: doador(name,gender,age,weight,blood_type,rh_factor) I expected to get all of the eligible people whom A can be a donor to. Code signals: Why, ProLog, pode_doar, tipo_a, tipo_b, tipo_ab...
[ -0.00109100341796875, 0.00164031982421875, 0.009521484375, 0.038818359375, -0.02001953125, 0.00933837890625, -0.032470703125, -0.015380859375, 0.0087890625, -0.0166015625, 0.00714111328125, -0.024169921875, 0.017822265625, -0.0093994140625, -0.0167236328125, -0.047119140625, 0.011901...
[ 571, 647, 919, 247, 441, 1021, 1290, 284, 118, 771, 31, 19, 397, 6, 2055, 91067, 54, 9601, 11627, 23200, 4588, 165598, 91841, 50986, 42, 127, 144810, 84751, 2046, 756, 111, 70, 224943, 3395, 136565, 62, 831, 186, 10, 164441, 47, 28864...
[ 0.085205078125, 0.042449951171875, 0.1097412109375, 0.0207977294921875, 0.00054931640625, 0.07305908203125, 0.1510009765625, 0.0465087890625, 0.0860595703125, 0.09912109375, 0.125732421875, 0.040069580078125, 0.061767578125, 0.039306640625, 0.1259765625, 0.16943359375, 0.126220703125...
embed
2588788_c0
2588788
prolog
0
Title: Understanding this prolog implementation of head Problem title: Understanding this prolog implementation of head Tags: prolog Problem: Understanding this prolog implementation of head head([Y],Y):-!. head([X|XS],X). I understand that the head of the list is stored on the variable X. What does the first clause me...
Understanding this prolog implementation of head Understanding this prolog implementation of head prolog Understanding Understanding this prolog implementation of head I understand that the head of the list is stored on the variable X. What does the first clause mean? Is it a cut? Why?
[ 0.033447265625, 0.00909423828125, 0.024658203125, 0.01519775390625, -0.0034942626953125, 0.021240234375, -0.0052490234375, 0.004364013671875, 0.039794921875, -0.0303955078125, 0.00341796875, 0.00457763671875, -0.01220703125, -0.00592041015625, 0.0255126953125, -0.0164794921875, 0.000...
[ 9626, 144057, 903, 502, 4867, 208124, 10336, 28219, 111, 5303, 83, 4343, 71, 98, 77336, 1193, 14602, 5117, 70731, 13, 29459, 442, 10, 59226, 44084 ]
[ 0.0775146484375, 0.11865234375, 0.107421875, 0.12451171875, 0.1815185546875, 0.16455078125, 0.2412109375, 0.07666015625, 0.104736328125, 0.182861328125, 0.04046630859375, 0.1654052734375, 0.076904296875, 0.048492431640625, 0.2191162109375, 0.1356201171875, 0.007904052734375, 0.1303...
embed
43678670_c0
43678670
prolog
0
Title: How to write predicate abslist(L, R) Problem title: How to write predicate abslist(L, R) Tags: list, prolog Problem: How to write predicate abslist(L, R) Write predicate abslist(L, R) with L is a list of given numbers, R will be the list of absolute values corresponding to numbers in L. Example: ?- abslist([0, -...
How to write predicate abslist(L, R) How to write predicate abslist(L, R) list prolog How How to write predicate abslist(L, R) Write predicate abslist(L, R) with L is a list of given numbers, R will be the list of absolute values corresponding to numbers in L. Example:
[ -0.00872802734375, -0.0031890869140625, -0.00628662109375, 0.00011157989501953125, -0.0159912109375, 0.0272216796875, 0.0220947265625, 0.027099609375, 0.0047607421875, -0.00830078125, 0.00750732421875, 0.017333984375, -0.00653076171875, 0.0030670166015625, -0.007232666015625, 0.0184326...
[ 11249, 47, 33022, 1653, 2063, 67, 43719, 6562, 866, 627, 4, 5303, 502, 4867, 601, 18781, 678, 339, 83, 34475, 101935, 186, 89931, 142424, 42518, 89536 ]
[ 0.0404052734375, 0.0192413330078125, 0.1854248046875, 0.1591796875, 0.1768798828125, 0.0924072265625, 0.1800537109375, 0.26513671875, 0.1478271484375, 0.1888427734375, 0.059326171875, 0.155029296875, 0.1343994140625, 0.1932373046875, 0.0831298828125, 0.0875244140625, 0.04470825195312...
embed
46534322_c0
46534322
prolog
0
Title: Create list from atoms in the knowledge base Problem title: Create list from atoms in the knowledge base Tags: prolog Problem: Create list from atoms in the knowledge base I want to make a list from the atoms inside these predicates: country(italy, 30, 40). country(spain, 10, 30). and then generate: L = [italy, ...
Create list from atoms in the knowledge base Create list from atoms in the knowledge base prolog atoms Create Create list from atoms in the knowledge base I want to make a list from the atoms inside these predicates: and then generate: is it possible?
[ 0.034423828125, -0.01068115234375, 0.00107574462890625, 0.0050048828125, -0.01165771484375, 0.007171630859375, -0.0059814453125, 0.0233154296875, -0.0079345703125, -0.04248046875, 0.013916015625, -0.0036163330078125, 0.006072998046875, -0.00933837890625, -0.01190185546875, 0.0270996093...
[ 151313, 5303, 1295, 34627, 7, 23, 51359, 3647, 502, 4867, 3444, 3249, 10, 46132, 6097, 1653, 2063, 139392, 83, 442, 7722 ]
[ 0.140869140625, 0.2296142578125, 0.1417236328125, 0.245849609375, 0.0675048828125, 0.07318115234375, 0.1663818359375, 0.2073974609375, 0.1165771484375, 0.1922607421875, 0.0894775390625, 0.0955810546875, 0.059112548828125, 0.1107177734375, 0.035400390625, 0.1165771484375, 0.1334228515...
embed
27246733_c0
27246733
prolog
0
Title: Connect prolog code with C# program Problem title: Connect prolog code with C# program Tags: ffi, prolog Problem: Connect prolog code with C# program I have a prolog code for searching a book. It is a simple game. I want to make interfaces with C#. But i don't know how to connect prolog into c#. Please help me. ...
Connect prolog code with C# program Connect prolog code with C# program ffi prolog Connect Connect prolog code with C# program I have a prolog code for searching a book. It is a simple game. I want to make interfaces with C#. But i don't know how to connect prolog into c#. Please help me. How to conncet prolog with C#.
[ 0.027099609375, 0.0028076171875, 0.00616455078125, 0.0179443359375, -0.0033111572265625, 0.00665283203125, 0.0002918243408203125, 0.0166015625, 0.0038299560546875, -0.072265625, 0.00439453125, -0.017333984375, -0.0186767578125, 0.00457763671875, 0.020751953125, -0.017822265625, 0.004...
[ 62448, 502, 4867, 18151, 678, 313, 4904, 1528, 24500, 87, 765, 100, 157318, 12877, 8781, 6712, 3444, 3249, 101758, 4966, 3714, 3642, 47, 37067, 3934, 501, 30607, 4358, 163, 11249, 158, 3956, 18 ]
[ 0.1966552734375, 0.1982421875, 0.259033203125, 0.20361328125, 0.1400146484375, 0.07110595703125, 0.2183837890625, 0.170166015625, 0.2078857421875, 0.01171875, 0.03802490234375, 0.039215087890625, 0.16455078125, 0.149169921875, 0.06982421875, 0.10089111328125, 0.0645751953125, 0.038...
embed
58682206_c0
58682206
prolog
0
Title: How does recursive back tracking works in Prolog Problem title: How does recursive back tracking works in Prolog Tags: prolog Problem: How does recursive back tracking works in Prolog Code signals: How, Prolog, remove_all, Tail, Tail2, Head, Call:remove_all, _4896, Call:not, Exit:not, dc91-4335-a0d8-48b7b11776c0...
How does recursive back tracking works in Prolog How does recursive back tracking works in Prolog prolog How Prolog remove_all Tail Tail2 Head Call:remove_all _4896 Call:not Exit:not dc91-4335-a0d8-48b7b11776c0 _5128 _5146 _5164 _5182 _5200 Exit:remove_all How does recursive back tracking works in Prolog I am learning ...
[ 0.0225830078125, 0.02880859375, 0.0042724609375, 0.0267333984375, -0.0059814453125, 0.019775390625, -0.00457763671875, -0.006744384765625, 0.018798828125, -0.013916015625, -0.006591796875, -0.010009765625, -0.0054931640625, 0.019775390625, 0.019775390625, -0.0128173828125, 0.01330566...
[ 11249, 14602, 195625, 5844, 4420, 28560, 214, 43240, 23, 1250, 4867, 502, 87388, 5584, 1218, 379, 304, 44816, 26265, 26973, 272, 9285, 11648, 10869, 5443, 12183, 3882, 130681, 154019, 5955, 100094, 125728, 33938, 53201, 33342, 12960, 35064, 1...
[ 0.06085205078125, 0.049407958984375, 0.1900634765625, 0.159912109375, 0.2078857421875, 0.2093505859375, 0.1104736328125, 0.1319580078125, 0.0411376953125, 0.1719970703125, 0.227783203125, 0.09442138671875, 0.1500244140625, 0.1533203125, 0.1026611328125, 0.10614013671875, 0.1201171875...
embed
15180979_c0
15180979
prolog
0
Title: Return same values in two lists Prolog Problem title: Return same values in two lists Prolog Tags: prolog, recursion Problem: Return same values in two lists Prolog If i have findmatching([2,4,1,7], [4,9,1,8], X). X = [4,1] I'm trying to use member, and find all, but on back tracking if member does not find a va...
Return same values in two lists Prolog Return same values in two lists Prolog prolog recursion Prolog Return same values in two lists Prolog If i have I'm trying to use member, and find all, but on back tracking if member does not find a value it terminates my program Thanks
[ -0.0021209716796875, 0.0181884765625, 0.012451171875, -0.01422119140625, -0.0084228515625, 0.00958251953125, 0.00250244140625, 0.024658203125, 0.0107421875, -0.02197265625, 0.0152587890625, 0.005584716796875, 0.01177978515625, -0.01153564453125, 0.006011962890625, -0.0106201171875, -...
[ 173340, 5701, 142424, 23, 6626, 5303, 1250, 4867, 502, 195625, 1830, 31577, 4527, 32786, 7413, 756, 4420, 28560, 214, 959, 34292, 121011, 90, 1528 ]
[ 0.17578125, 0.16552734375, 0.1724853515625, 0.051971435546875, 0.143310546875, 0.1859130859375, 0.1385498046875, 0.21630859375, 0.10028076171875, 0.1734619140625, 0.0802001953125, 0.021240234375, 0.013946533203125, 0.20458984375, 0.1051025390625, 0.06842041015625, 0.12042236328125, ...
embed
18595459_c0
18595459
prolog
0
Title: Prolog: store solutions in a list Problem title: Prolog: store solutions in a list Tags: store, prolog, list Problem: Prolog: store solutions in a list This is a very simple question ;) fact(a). fact(b). test(X):-fact(X). the solutions are X=a; X=b. OK I'm trying to create: test(X,L):-fact(X), ??? that returns L...
Prolog: store solutions in a list Prolog: store solutions in a list store prolog list Prolog Prolog: store solutions in a list This is a very simple question ;) fact(a). fact(b). test(X):-fact(X). the solutions are X=a; X=b. OK I'm trying to create: test(X,L):-fact(X), ??? that returns L=[a,b] can someone help me? Than...
[ 0.02587890625, -0.00061798095703125, 0.01422119140625, 0.0196533203125, -0.0081787109375, 0.014404296875, -0.0147705078125, -0.0040283203125, 0.00811767578125, -0.0140380859375, -0.00225830078125, -0.005706787109375, -0.0177001953125, -0.00445556640625, 0.0011444091796875, 0.0184326171...
[ 1250, 4867, 4343, 51347, 23, 5303, 502, 12, 4552, 8781, 9655, 6585, 15824, 11, 275, 3034, 1542, 114700, 1193, 1369, 14315, 31577, 28282, 866, 9, 37336, 30646, 339, 22008, 4358 ]
[ 0.1885986328125, 0.254150390625, 0.2183837890625, 0.2430419921875, 0.08392333984375, 0.2215576171875, 0.1219482421875, 0.000885009765625, 0.01446533203125, 0.0809326171875, 0.0160064697265625, 0.001953125, 0.1580810546875, 0.047943115234375, 0.0999755859375, 0.2197265625, 0.120117187...
embed
15322446_c0
15322446
prolog
0
Title: How do I get the sum x^n/n! in prolog? Problem title: How do I get the sum x^n/n! in prolog? Tags: sum, prolog, factorial Problem: How do I get the sum x^n/n! in prolog? I don't understand much about Prolog. I need to count a sum x^n/n! in Prolog, n=1..k, k and x integer numbers Someone, please explain me how to...
How do I get the sum x^n/n! in prolog? How do I get the sum x^n/n! in prolog? sum prolog factorial How How do I get the sum x^n/n! in prolog? I don't understand much about Prolog. I need to count a sum x^n/n! in Prolog, n=1..k, k and x integer numbers Someone, please explain me how to do this using Prolog. Thanks in ad...
[ 0.00170135498046875, 0.001861572265625, 0.00579833984375, 0.00124359130859375, -0.0012054443359375, -0.00738525390625, 0.013427734375, 0.01080322265625, 0.020751953125, -0.057861328125, 0.01416015625, 0.001556396484375, -0.0218505859375, -0.0003604888916015625, 0.0106201171875, 0.01599...
[ 11249, 54, 87, 2046, 70, 10554, 1022, 8353, 19, 64, 38, 23, 502, 4867, 31461, 15403, 28219, 5045, 1250, 3871, 47, 54529, 10, 653, 33000, 92, 472, 136, 892, 1505, 101935, 22936, 73342, 163, 3642, 903, 17368, 129745 ]
[ 0.091552734375, 0.0623779296875, 0.053558349609375, 0.148193359375, 0.097412109375, 0.2587890625, 0.14404296875, 0.160400390625, 0.1729736328125, 0.1754150390625, 0.142578125, 0.086181640625, 0.1710205078125, 0.286376953125, 0.140625, 0.1243896484375, 0.08251953125, 0.0227813720703...
embed
70235616_c0
70235616
prolog
0
Title: Prolog lists inside the lists Problem title: Prolog lists inside the lists Tags: prolog Problem: Prolog lists inside the lists I'm new to Prolog and what I'm trying to achieve is to define the tower-like type which contains lists of natural numbers. Each "floor" is supposed to have the same amount of "apartments...
Prolog lists inside the lists Prolog lists inside the lists prolog Prolog Prolog lists inside the lists I'm new to Prolog and what I'm trying to achieve is to define the tower-like type which contains lists of natural numbers. Each "floor" is supposed to have the same amount of "apartments" and I don't know how can I c...
[ 0.00640869140625, 0.0198974609375, -0.017333984375, 0.01068115234375, 0.00144195556640625, 0.01239013671875, 0.004486083984375, -0.001983642578125, 0.0107421875, -0.01165771484375, 0.0107421875, -0.0108642578125, -0.0036163330078125, 0.009765625, -0.008544921875, -0.0019989013671875, ...
[ 1250, 4867, 5303, 46132, 70, 502, 7, 3525, 31577, 69307, 61924, 47, 6488, 5062, 10644, 70541, 111, 6083, 101935, 98423, 52347, 748, 134598, 765, 5701, 41170, 11, 17365, 9035, 3714, 12765 ]
[ 0.15673828125, 0.243408203125, 0.2303466796875, 0.1622314453125, 0.010986328125, 0.1058349609375, 0.03680419921875, 0.0384521484375, 0.00677490234375, 0.04052734375, 0.1041259765625, 0.1070556640625, 0.169189453125, 0.1234130859375, 0.13623046875, 0.09039306640625, 0.00927734375, 0...
embed
36322760_c0
36322760
prolog
0
Title: logarithm base b in prolog Problem title: logarithm base b in prolog Tags: prolog, logarithm Problem: logarithm base b in prolog Can somebody tell me what is wrong with my code? logbN(1,_,0). logbN(N,B,Ans):- N1 = N/B, logbN(N1, B, A), A is Ans + 1. This is supposed to calculate log_b N and store the result in A...
logarithm base b in prolog logarithm base b in prolog prolog logarithm Ans logarithm base b in prolog Can somebody tell me what is wrong with my code? This is supposed to calculate log_b N and store the result in Ans I keep getting out of local stack error
[ 0.006317138671875, 0.00848388671875, 0.0184326171875, 0.01324462890625, 0.00677490234375, 0.021484375, -0.0128173828125, 0.0052490234375, -0.00262451171875, -0.033203125, 0.017822265625, 0.000415802001953125, 0.01458740234375, 0.0040283203125, 0.0224609375, -0.017822265625, 0.0070495...
[ 459, 1970, 8962, 3647, 876, 23, 502, 4867, 39, 893, 7, 176256, 14192, 2367, 83, 44691, 18151, 134598, 74481, 12684, 275, 541, 4343, 16750, 13695, 1810, 4000, 177261, 18499 ]
[ 0.1197509765625, 0.08465576171875, 0.1483154296875, 0.2100830078125, 0.224365234375, 0.045806884765625, 0.15478515625, 0.25244140625, 0.053466796875, 0.148193359375, 0.10858154296875, 0.0256195068359375, 0.048248291015625, 0.005886077880859375, 0.0269012451171875, 0.129638671875, 0.1...
embed
41102598_c0
41102598
prolog
0
Title: Prolog greek letters inside write Problem title: Prolog greek letters inside write Tags: prolog Problem: Prolog greek letters inside write Below is part of my code.I want to change the content of write in greek letters. Can anyone tell me the way? collect_results:- write('Give a number from 1 to 5 : '), read(X),...
Prolog greek letters inside write Prolog greek letters inside write prolog 1 Prolog collect_results Give Prolog greek letters inside write Below is part of my code.I want to change the content of write in greek letters. Can anyone tell me the way?
[ -0.00152587890625, 0.01214599609375, -0.0263671875, -0.005279541015625, -0.0037384033203125, 0.01275634765625, 0.01385498046875, -0.0029449462890625, -0.0103759765625, -0.004547119140625, 0.007781982421875, -0.0157470703125, -0.01177978515625, -0.001068115234375, -0.001190185546875, 0....
[ 1250, 4867, 3514, 343, 120820, 46132, 33022, 502, 106, 43799, 2109, 7136, 77878, 17336, 2831, 18151, 3444, 47, 15549, 10941, 111, 23, 14192, 3917 ]
[ 0.1607666015625, 0.251220703125, 0.1982421875, 0.14013671875, 0.1893310546875, 0.1671142578125, 0.2342529296875, 0.12548828125, 0.038543701171875, 0.1478271484375, 0.04815673828125, 0.10272216796875, 0.068603515625, 0.1217041015625, 0.01514434814453125, 0.1260986328125, 0.06555175781...
embed
50105347_c0
50105347
prolog
0
Title: Prolog result not store Problem title: Prolog result not store Tags: prolog Problem: Prolog result not store problem i want addition store in fresult from the rules code: gresult:- write('enter first number'),nl, read(P),nl, write('enter second number'),nl, read(Q),nl, write('adition result is'),nl, fresult(P,Q)...
Prolog result not store Prolog result not store prolog Prolog Prolog result not store problem i want addition store in fresult from the rules code:
[ 0.024169921875, 0.00946044921875, 0.004302978515625, -0.006378173828125, -0.00109100341796875, 0.0068359375, -0.0026702880859375, -0.01031494140625, 0.003875732421875, 0.0037078857421875, -0.00170135498046875, -0.012451171875, -0.0302734375, -0.0111083984375, 0.0087890625, -0.002105712...
[ 1250, 4867, 16750, 959, 4343, 502, 2967, 3444, 66044, 23, 73989, 7136, 1295, 91736, 18151 ]
[ 0.144287109375, 0.2227783203125, 0.2060546875, 0.08355712890625, 0.2242431640625, 0.11138916015625, 0.0802001953125, 0.088623046875, 0.1849365234375, 0.03692626953125, 0.11767578125, 0.2054443359375, 0.0185089111328125, 0.1507568359375, 0.13134765625 ]
embed
38150814_c0
38150814
prolog
0
Title: Basic error in Prolog Problem title: Basic error in Prolog Tags: prolog Problem: Basic error in Prolog I have this: problem(a(1,2,3),P) And I need to get this: P = [e(1, 3), e(2, 0)] I just started with Prolog a few days ago and I wrote this: problem([a(X,Y,Z)],P) :- P is [e(X,Z),e(Y,0)]. But I only get a false ...
Basic error in Prolog Basic error in Prolog prolog Basic Prolog Basic error in Prolog I have this: problem(a(1,2,3),P) And I need to get this: P = [e(1, 3), e(2, 0)] I just started with Prolog a few days ago and I wrote this: But I only get a false by answer. What error did I make?
[ 0.0196533203125, 0.016845703125, 0.00168609619140625, 0.0126953125, -0.01324462890625, 0.029052734375, -0.046875, -0.00860595703125, 0.0123291015625, -0.0120849609375, 0.0014495849609375, -0.0103759765625, -0.00140380859375, 0.0113525390625, 0.005889892578125, 0.006378173828125, 0.00...
[ 91692, 18499, 23, 1250, 4867, 502, 87, 765, 903, 2967, 11, 41600, 4, 155761, 247, 683, 3871, 2046, 436, 2203, 13, 8439, 28, 54753, 757, 26859, 678, 10846, 54397, 4734, 98320, 390, 35166 ]
[ 0.23779296875, 0.21044921875, 0.076171875, 0.19384765625, 0.281005859375, 0.1326904296875, 0.0024547576904296875, 0.04486083984375, 0.04901123046875, 0.193359375, 0.0704345703125, 0.039093017578125, 0.0166168212890625, 0.1976318359375, 0.00798797607421875, 0.12890625, 0.0923461914062...
embed
14168363_c0
14168363
prolog
0
Title: What does a clause without a head mean in prolog? Problem title: What does a clause without a head mean in prolog? Tags: iso-prolog, prolog-directive-dynamic, prolog Problem: What does a clause without a head mean in prolog? In the beginning of a Prolog program I see: :-dynamic(path/1). It seems to be a clause t...
What does a clause without a head mean in prolog? What does a clause without a head mean in prolog? iso-prolog prolog-directive-dynamic prolog What What does a clause without a head mean in prolog? In the beginning of a Prolog program I see: It seems to be a clause that doesn't have a head. What does it mean?
[ 0.017333984375, -0.0016937255859375, -0.0004825592041015625, 0.02783203125, -0.0225830078125, 0.015380859375, 0.01129150390625, 0.00390625, 0.006805419921875, -0.01544189453125, -0.024169921875, 0.001983642578125, -0.0303955078125, -0.0140380859375, 0.006683349609375, -0.00328063964843...
[ 70731, 13, 15490, 10, 10336, 29459, 502, 4867, 13882, 3454, 242554, 23, 86595, 1250, 1528, 37202, 22027, 18, 765 ]
[ 0.181884765625, 0.125244140625, 0.1409912109375, 0.04705810546875, 0.193115234375, 0.078125, 0.115234375, 0.17626953125, 0.02679443359375, 0.07525634765625, 0.05682373046875, 0.002166748046875, 0.00372314453125, 0.09539794921875, 0.06561279296875, 0.010467529296875, 0.05145263671875,...
embed
27070297_c0
27070297
prolog
0
Title: Prolog simple generator Problem title: Prolog simple generator Tags: prolog, logic Problem: Prolog simple generator I'm trying to learn myself Prolog and need a little help. Could someone solve and explain this problem: Define a p(A, M/N, K/L), which generates all possible rational fractions M/N and K/L, where: ...
Prolog simple generator Prolog simple generator prolog logic Prolog Prolog simple generator I'm trying to learn myself Prolog and need a little help. Could someone solve and explain this problem: Define a p(A, M/N, K/L), which generates all possible rational fractions M/N and K/L, where:
[ 0.00848388671875, 0.0172119140625, -0.005859375, -0.01507568359375, 0.00052642822265625, 0.01080322265625, -0.00567626953125, -0.0235595703125, 0.00885009765625, -0.039306640625, 0.0111083984375, 0.0003948211669921875, 0.0024261474609375, -0.01483154296875, 0.01806640625, -0.0041809082...
[ 1250, 4867, 8781, 145823, 502, 62775, 31577, 30698, 35978, 3871, 10176, 4358, 191147, 86869, 73342, 2967, 64552, 10, 915, 132, 284, 276, 64, 839, 341, 866, 139392, 756, 7722, 168487, 175921, 7, 136, 7440 ]
[ 0.1640625, 0.26025390625, 0.1822509765625, 0.26171875, 0.12445068359375, 0.1678466796875, 0.0008845329284667969, 0.032135009765625, 0.02862548828125, 0.01480865478515625, 0.033050537109375, 0.06640625, 0.0188751220703125, 0.08233642578125, 0.068115234375, 0.08935546875, 0.10943603515...
embed
5496313_c0
5496313
prolog
0
Title: Check if the atom is a lowercase letter Problem title: Check if the atom is a lowercase letter Tags: prolog, swi-prolog Problem: Check if the atom is a lowercase letter I'm doing it like this: foo(N) :- name(N, [Code]), name(a, [CodeA]), name(z, [CodeZ]), CodeA =< Code, Code =< CodeZ. Is there a way that doesn't...
Check if the atom is a lowercase letter Check if the atom is a lowercase letter prolog swi-prolog Check CodeA CodeZ Check if the atom is a lowercase letter I'm doing it like this: Is there a way that doesn't feel like such a workaroud?
[ 0.01336669921875, -0.027099609375, 0.00982666015625, 0.035400390625, 0.008544921875, -0.0022735595703125, 0.016357421875, 0.0004482269287109375, -0.00640869140625, 0.026611328125, 0.004486083984375, 0.0023651123046875, 0.01116943359375, 0.00970458984375, -0.0118408203125, 0.00369262695...
[ 38679, 2174, 34627, 83, 92319, 58437, 31330, 10, 502, 4867, 2452, 3454, 28864, 284, 1511, 20594, 1884, 903, 3917, 18, 12319, 6044, 1674 ]
[ 0.1383056640625, 0.07025146484375, 0.25048828125, 0.0780029296875, 0.197998046875, 0.2000732421875, 0.1578369140625, 0.0274200439453125, 0.09100341796875, 0.1767578125, 0.095458984375, 0.057952880859375, 0.1121826171875, 0.08056640625, 0.0849609375, 0.011077880859375, 0.0459594726562...
embed
58831895_c0
58831895
prolog
0
Title: Prolog, generate all combinations of n balanced brackets Problem title: Prolog, generate all combinations of n balanced brackets Tags: dcg, prolog Problem: Prolog, generate all combinations of n balanced brackets Can you show me how to implement an algorithm in PROLOG to generate all combinations of N balanced b...
Prolog, generate all combinations of n balanced brackets Prolog, generate all combinations of n balanced brackets dcg prolog Prolog Prolog, generate all combinations of n balanced brackets Can you show me how to implement an algorithm in PROLOG to generate all combinations of N balanced brackets? ( brackets which close...
[ -0.0037841796875, 0.013427734375, -0.0086669921875, -0.015625, 0.01336669921875, 0.0302734375, -0.01361083984375, -0.01251220703125, 0.00107574462890625, -0.017333984375, -0.0079345703125, -0.032470703125, 0.01239013671875, -0.00128173828125, -0.004241943359375, -0.01220703125, -0.00...
[ 1250, 4867, 139392, 756, 162515, 653, 40197, 71, 1620, 27853, 177, 502, 7639, 29479, 234873, 23, 10514, 47510, 541, 20903, 26785 ]
[ 0.1619873046875, 0.243408203125, 0.1513671875, 0.09124755859375, 0.1959228515625, 0.109619140625, 0.21728515625, 0.0635986328125, 0.171630859375, 0.1822509765625, 0.06341552734375, 0.109619140625, 0.00018310546875, 0.1026611328125, 0.181884765625, 0.003936767578125, 0.1436767578125, ...
embed
4607515_c0
4607515
prolog
0
Title: How to save term to file in Prolog? Problem title: How to save term to file in Prolog? Tags: prolog Problem: How to save term to file in Prolog? How can I save necessary terms to file? For example, save_to_file(File) :- tell(File), listing, told. saves all user terms to file File . But how can I save only necess...
How to save term to file in Prolog? How to save term to file in Prolog? prolog How Prolog save_to_file File How to save term to file in Prolog? How can I save necessary terms to file? For example, saves all user terms to file File . But how can I save only necessary terms to file?
[ 0.031494140625, 0.007568359375, 0.0140380859375, 0.01336669921875, -0.01708984375, 0.01055908203125, -0.005340576171875, 0.0260009765625, -0.00958251953125, -0.028564453125, 0.01025390625, 0.0157470703125, -0.00396728515625, 0.0162353515625, 0.02783203125, -0.010986328125, 0.00988769...
[ 11249, 30098, 13579, 47, 11435, 23, 1250, 4867, 502, 188, 29822, 42724, 831, 63559, 69407, 756, 38937, 3642, 4734 ]
[ 0.0484619140625, 0.1689453125, 0.231689453125, 0.1087646484375, 0.1904296875, 0.04296875, 0.16455078125, 0.24853515625, 0.0867919921875, 0.1170654296875, 0.1881103515625, 0.150390625, 0.001190185546875, 0.126953125, 0.1890869140625, 0.0210418701171875, 0.11865234375, 0.012725830078...
embed
2662670_c0
2662670
prolog
0
Title: what is logic programming? and what is different from other Problem title: what is logic programming? and what is different from other Tags: programming-languages, logic, prolog Problem: what is logic programming? and what is different from other today i have talk with other friend ,he said he has logic programm...
what is logic programming? and what is different from other what is logic programming? and what is different from other programming-languages logic prolog other what is logic programming? and what is different from other today i have talk with other friend ,he said he has logic programming skill , so I am very curious ...
[ 0.01544189453125, 0.021484375, 0.00927734375, -0.00090789794921875, -0.010498046875, 0.008056640625, -0.007781982421875, 0.0142822265625, 0.003387451171875, -0.052001953125, 0.0037384033203125, 0.00286865234375, 0.006072998046875, 0.00022411346435546875, 0.0037078857421875, -0.00595092...
[ 2367, 83, 62775, 56037, 449, 12921, 1295, 3789, 196651, 502, 4867, 136, 18925, 22120, 34391, 1556, 112419, 193844 ]
[ 0.054931640625, 0.0955810546875, 0.27392578125, 0.2271728515625, 0.159423828125, 0.152099609375, 0.06707763671875, 0.0997314453125, 0.0875244140625, 0.122314453125, 0.1678466796875, 0.01507568359375, 0.002960205078125, 0.011383056640625, 0.05499267578125, 0.032257080078125, 0.1579589...
embed
49724183_c0
49724183
prolog
0
Title: What does rewrite/2 predicate do in prolog Problem title: What does rewrite/2 predicate do in prolog Tags: prolog Problem: What does rewrite/2 predicate do in prolog The question is very simple. What does the rewrite('A', ['X', 'Y', 'Z']) predicate do in a prolog program? What's the use of it? What does it provi...
What does rewrite/2 predicate do in prolog What does rewrite/2 predicate do in prolog prolog What What does rewrite/2 predicate do in prolog The question is very simple. What does the rewrite('A', ['X', 'Y', 'Z']) predicate do in a prolog program? What's the use of it? What does it provide? Please provide some examples...
[ -0.00750732421875, 0.002685546875, 0.0020599365234375, 0.01019287109375, -0.0130615234375, 0.03271484375, 0.00653076171875, 0.03076171875, 0.001861572265625, 0.018310546875, 0.013916015625, 0.004425048828125, -0.01348876953125, -0.0150146484375, -0.007080078125, 0.0101318359375, 0.02...
[ 4865, 14602, 456, 434, 18781, 12477, 1653, 2063, 67, 54, 23, 502, 4867, 8781, 70, 284, 378, 1542, 1723, 1511, 1528, 4527, 111, 442, 22691, 27781 ]
[ 0.08929443359375, 0.0655517578125, 0.1690673828125, 0.1856689453125, 0.233154296875, 0.23291015625, 0.177001953125, 0.2340087890625, 0.1339111328125, 0.117431640625, 0.07098388671875, 0.1505126953125, 0.231201171875, 0.011199951171875, 0.027435302734375, 0.107177734375, 0.00277709960...
embed
40563955_c0
40563955
prolog
0
Title: negation of propositional expressions in prolog Problem title: negation of propositional expressions in prolog Tags: prolog Problem: negation of propositional expressions in prolog I'm new in prolog and I have to make a program that negates propositional expressions. For example: p implies (q and not(r)) sould b...
negation of propositional expressions in prolog negation of propositional expressions in prolog prolog negation of propositional expressions in prolog I'm new in prolog and I have to make a program that negates propositional expressions. For example: p implies (q and not(r)) sould be p and (not(q) or r). If anyone coul...
[ 0.006866455078125, -0.003814697265625, 0.0079345703125, 0.014404296875, -0.0201416015625, 0.021484375, -0.0013580322265625, 0.0034942626953125, -0.0037994384765625, -0.02783203125, -0.0230712890625, 0.007720947265625, -0.009765625, -0.00921630859375, 0.01324462890625, 0.017578125, 0....
[ 108, 125682, 89261, 289, 125195, 23, 502, 4867, 7, 3525, 1528, 90584, 90, 915, 35388, 864, 136, 959, 42, 57289, 71, 186, 10869, 1690, 4358 ]
[ 0.1571044921875, 0.113037109375, 0.1929931640625, 0.0924072265625, 0.19921875, 0.0216064453125, 0.147705078125, 0.215576171875, 0.0287933349609375, 0.0255279541015625, 0.119140625, 0.1612548828125, 0.0440673828125, 0.09912109375, 0.1705322265625, 0.130126953125, 0.0955810546875, 0....
embed
1696778_c0
1696778
prolog
0
Title: Prolog looping though variable results Problem title: Prolog looping though variable results Tags: prolog, loops Problem: Prolog looping though variable results I have a small program wrote in Prolog. At the moment I can print the first result with test(X, 1, 4, 5). write(X). But if there is more than one result...
Prolog looping though variable results Prolog looping though variable results prolog loops Prolog Prolog looping though variable results I have a small program wrote in Prolog. At the moment I can print the first result with But if there is more than one result for X, How do I print the next ones? Thanks.
[ 0.007293701171875, 0.00013637542724609375, -0.006195068359375, 0.0016326904296875, 0.012451171875, 0.00848388671875, -0.00023555755615234375, 0.004791259765625, 0.01226806640625, -0.020751953125, -0.00439453125, -0.0172119140625, -0.0157470703125, -0.0107421875, 0.02099609375, 0.009277...
[ 1250, 4867, 40956, 214, 21208, 77336, 50339, 502, 19336, 1528, 54397, 23, 3095, 831, 28412, 5117, 16750, 678, 2174, 1286, 3501, 1632, 100, 1193, 11249, 54, 11737, 64333, 5 ]
[ 0.1611328125, 0.2476806640625, 0.2193603515625, 0.06072998046875, 0.1676025390625, 0.261474609375, 0.2398681640625, 0.125, 0.06695556640625, 0.140869140625, 0.06610107421875, 0.0223541259765625, 0.043182373046875, 0.02789306640625, 0.2066650390625, 0.079345703125, 0.213623046875, 0...
embed
36384628_c0
36384628
prolog
0
Title: How to set up a 12 x 12 matrix using clpfd library Problem title: How to set up a 12 x 12 matrix using clpfd library Tags: matrix, prolog, clpfd Problem: How to set up a 12 x 12 matrix using clpfd library I am new to constraint logic programming and wanted to know, how I can use clpfd to set up a 12 x 12 matrix ...
How to set up a 12 x 12 matrix using clpfd library How to set up a 12 x 12 matrix using clpfd library matrix prolog clpfd clpfd How How to set up a 12 x 12 matrix using clpfd library I am new to constraint logic programming and wanted to know, how I can use clpfd to set up a 12 x 12 matrix in prolog. I am using the swi...
[ 0.00299072265625, 0.0026702880859375, 0.01202392578125, 0.01251220703125, 0.01397705078125, -0.00830078125, -0.0084228515625, -0.006866455078125, -0.0020904541015625, -0.036865234375, -0.0206298828125, -0.031494140625, 0.005828857421875, -0.0289306640625, -0.0038909912109375, 0.0055541...
[ 11249, 47, 5423, 1257, 427, 1022, 50944, 425, 17368, 33139, 39557, 71, 35773, 1294, 502, 4867, 158, 2816, 4288, 62775, 56037, 3642, 4527, 23, 2452, 5415 ]
[ 0.049835205078125, 0.041290283203125, 0.1162109375, 0.10302734375, 0.17529296875, 0.1483154296875, 0.1773681640625, 0.1190185546875, 0.04656982421875, 0.0848388671875, 0.10888671875, 0.1588134765625, 0.1490478515625, 0.046783447265625, 0.10791015625, 0.1759033203125, 0.00350952148437...
embed
40825531_c0
40825531
prolog
0
Title: Exiting on all errors in SWI Prolog Problem title: Exiting on all errors in SWI Prolog Tags: prolog, swi-prolog Problem: Exiting on all errors in SWI Prolog Is there a way to make SWI Prolog exit on any syntax or parse errors? I'm writing tests and running them automatically, and I don't always notice the error ...
Exiting on all errors in SWI Prolog Exiting on all errors in SWI Prolog prolog swi-prolog Exiting SWI Prolog Exiting on all errors in SWI Prolog Is there a way to make SWI Prolog exit on any syntax or parse errors? I'm writing tests and running them automatically, and I don't always notice the error messages if I have ...
[ 0.02490234375, 0.0196533203125, -0.0098876953125, -0.0001583099365234375, -0.022216796875, 0.0078125, 0.0028076171875, -0.000213623046875, -0.0167236328125, -0.0228271484375, 0.002777099609375, -0.005035400390625, -0.01177978515625, 0.01495361328125, 0.031982421875, 0.0076904296875, ...
[ 5443, 14, 1916, 98, 756, 18499, 7, 23, 159, 38969, 1250, 4867, 502, 91, 2452, 3454, 10, 3917, 47, 3249, 82230, 2499, 6002, 86531, 366, 184, 32562, 109921, 51042, 191082, 60322, 89914 ]
[ 0.1663818359375, 0.1444091796875, 0.1065673828125, 0.1729736328125, 0.1416015625, 0.205810546875, 0.0809326171875, 0.004364013671875, 0.093017578125, 0.2310791015625, 0.1619873046875, 0.2200927734375, 0.1031494140625, 0.04547119140625, 0.1934814453125, 0.1446533203125, 0.009307861328...
embed
3790994_c0
3790994
prolog
0
Title: Prolog web programming Problem title: Prolog web programming Tags: rule-engine, prolog Problem: Prolog web programming At work, there was a discussion of using prolog as the backend for a rules engine on a web-app. How would this get tied into existing systems? Are there available prolog libraries for other lang...
Prolog web programming Prolog web programming rule-engine prolog Prolog Prolog web programming At work, there was a discussion of using prolog as the backend for a rules engine on a web-app. How would this get tied into existing systems? Are there available prolog libraries for other languages allowing the invocation o...
[ 0.04248046875, 0.0206298828125, 0.006195068359375, -0.0030670166015625, -0.01171875, 0.034423828125, -0.0069580078125, -0.0040283203125, -0.00439453125, -0.056640625, 0.00537109375, -0.01031494140625, -0.00787353515625, 0.00897216796875, 0.013916015625, 0.004302978515625, 0.004089355...
[ 1250, 4867, 1467, 56037, 449, 79986, 128897, 502, 4488, 35107, 17368, 237, 4420, 3611, 91736, 87907, 9007, 2806, 146543, 3934, 144573, 76519, 19882, 35773, 10484, 3789, 46876, 190358, 23, 202010, 88996 ]
[ 0.1669921875, 0.277099609375, 0.1610107421875, 0.130615234375, 0.01837158203125, 0.162841796875, 0.1708984375, 0.173583984375, 0.06707763671875, 0.06768798828125, 0.06219482421875, 0.07330322265625, 0.110595703125, 0.1590576171875, 0.1876220703125, 0.202392578125, 0.1514892578125, ...
embed
2658968_c0
2658968
prolog
0
Title: Power function in prolog Problem title: Power function in prolog Tags: exponentiation, prolog Problem: Power function in prolog Exactly what's the Prolog definition for power function. I wrote this code and it give some errors I wanna know exact code for the power function. pow(X,0,1). pow(X,Y,Z):-Y1=Y-1,pow(X,Y...
Power function in prolog Power function in prolog exponentiation prolog Power Y-1 Power function in prolog Exactly what's the Prolog definition for power function. I wrote this code and it give some errors I wanna know exact code for the power function. Anything wrong with this code?
[ 0.01177978515625, -0.0238037109375, 0.02392578125, 0.018798828125, 0.00177001953125, -0.003631591796875, -0.01318359375, 0, 0.0128173828125, -0.00982666015625, -0.0002613067626953125, -0.00811767578125, -0.03515625, -0.01116943359375, 0.030029296875, 0.01239013671875, 0.026123046875,...
[ 17170, 32354, 23, 502, 4867, 78643, 990, 5759, 2367, 70, 1250, 80934, 100, 14537, 18151, 18499, 6165, 76, 3714, 24763, 44691 ]
[ 0.2432861328125, 0.2071533203125, 0.051483154296875, 0.130126953125, 0.217529296875, 0.09906005859375, 0.1385498046875, 0.1258544921875, 0.011627197265625, 0.019775390625, 0.1568603515625, 0.16748046875, 0.021270751953125, 0.2410888671875, 0.12646484375, 0.095703125, 0.00775146484375...
embed
63512408_c0
63512408
prolog
0
Title: Display all list elements that greather than N - Prolog Problem title: Display all list elements that greather than N - Prolog Tags: prolog Problem: Display all list elements that greather than N - Prolog I want to Display all list elements that larger than N, my code like member2(X, [X|_]). member2(X, [_|T]) :-...
Display all list elements that greather than N - Prolog Display all list elements that greather than N - Prolog prolog Display Prolog member2 Display all list elements that greather than N - Prolog I want to Display all list elements that larger than N, my code like
[ -0.00099945068359375, 0.0037994384765625, 0.00701904296875, -0.00107574462890625, 0.01409912109375, 0.024169921875, 0.024169921875, 0.0159912109375, 0.00921630859375, 0.003173828125, 0.0155029296875, -0.020751953125, -0.0018157958984375, -0.00836181640625, 0.01190185546875, 0.000096321...
[ 90045, 756, 5303, 80854, 450, 6782, 3334, 3501, 541, 1250, 4867, 502, 32786, 304, 3444, 150679, 18151, 1884 ]
[ 0.1785888671875, 0.10540771484375, 0.21533203125, 0.2020263671875, 0.0526123046875, 0.1368408203125, 0.2205810546875, 0.086669921875, 0.170654296875, 0.12103271484375, 0.19189453125, 0.06695556640625, 0.161376953125, 0.0185394287109375, 0.0750732421875, 0.19873046875, 0.133056640625,...
embed
29380237_c0
29380237
prolog
0
Title: Two different ways to express List in Prolog Problem title: Two different ways to express List in Prolog Tags: prolog Problem: Two different ways to express List in Prolog what's the difference between these two clauses: L=[X,H|Y]. append(X,[H|Y],L). It's one clause in my code, first one does not work, second on...
Two different ways to express List in Prolog Two different ways to express List in Prolog prolog Two List Prolog Two different ways to express List in Prolog what's the difference between these two clauses: It's one clause in my code, first one does not work, second one works, just don't know the difference.
[ 0.003082275390625, 0.0185546875, 0.0162353515625, 0.00799560546875, -0.01397705078125, 0.00335693359375, -0.01373291015625, 0.006072998046875, 0.0223388671875, -0.01300048828125, 0.01708984375, -0.005157470703125, -0.0026397705078125, 0.004241943359375, 0.00061798095703125, 0.012939453...
[ 32964, 12921, 48322, 36510, 32036, 1250, 4867, 502, 23, 60212, 17721, 6626, 70731, 90, 1632, 13, 18151, 5117, 959, 4488, 17932, 43240 ]
[ 0.1419677734375, 0.12744140625, 0.0838623046875, 0.1522216796875, 0.214599609375, 0.1295166015625, 0.2125244140625, 0.09100341796875, 0.00295257568359375, 0.12646484375, 0.01007843017578125, 0.05426025390625, 0.14697265625, 0.0175323486328125, 0.053802490234375, 0.0419921875, 0.08398...
embed
56083469_c0
56083469
prolog
0
Title: How to count the predicates Problem title: How to count the predicates Tags: prolog Problem: How to count the predicates I'm looking for a way to count the numbers of predicates. Example: %facts has_subclass(thing,animal). has_subclass(thing,tree). has_subclass(thing,object). % and I ask count_has_subclass(thing...
How to count the predicates How to count the predicates prolog How has_subclass count_has_subclass How to count the predicates I'm looking for a way to count the numbers of predicates. Example: %facts % and I ask % result X = 3.
[ 0.01470947265625, -0.00080108642578125, 0.0012359619140625, 0.0020751953125, 0.01611328125, 0.01446533203125, 0.013916015625, -0.0032501220703125, 0.0162353515625, -0.0791015625, -0.017578125, -0.0220947265625, 0.01043701171875, 0.017822265625, 0.007476806640625, -0.00360107421875, -...
[ 11249, 47, 54529, 70, 1653, 2063, 1636, 502, 4867, 1556, 22144, 67413, 10557, 16487, 3917, 101935, 111, 114700, 1745, 26458, 16750, 1193, 2203, 1031 ]
[ 0.061553955078125, 0.057037353515625, 0.2127685546875, 0.06365966796875, 0.19775390625, 0.2225341796875, 0.1527099609375, 0.1376953125, 0.183349609375, 0.0804443359375, 0.155517578125, 0.1763916015625, 0.06939697265625, 0.0244140625, 0.030670166015625, 0.144775390625, 0.052734375, ...
embed
4192063_c0
4192063
prolog
0
Title: reversible &quot;binary to number&quot; predicate Problem title: reversible &quot;binary to number&quot; predicate Tags: prolog, clpfd Problem: reversible "binary to number" predicate What is the best way to convert binary bits (it might be a list of 0/1, for example) into numbers in a reversible way. I've writt...
reversible &quot;binary to number&quot; predicate reversible &quot;binary to number&quot; predicate prolog clpfd reversible "binary to number" predicate What is the best way to convert binary bits (it might be a list of 0/1, for example) into numbers in a reversible way. I've written a native predicate in swi, but is t...
[ -0.024169921875, 0.005279541015625, 0.00775146484375, 0.0172119140625, -0.01361083984375, 0.021728515625, -0.01324462890625, 0.004852294921875, 0.0027923583984375, -0.040283203125, -0.00909423828125, 0.01165771484375, -0.01361083984375, 0.0125732421875, 0.0172119140625, 0.0018463134765...
[ 39531, 55356, 41502, 19155, 1294, 47, 14012, 1653, 2063, 67, 502, 4867, 33139, 39557, 71, 4865, 83, 70, 2965, 3917, 96760, 2394, 6635, 4785, 7, 13648, 5303, 757, 11583, 27781, 3934, 101935, 23, 59121, 24, 4935, 91, 2452, 11522, 29806, 1...
[ 0.2291259765625, 0.26416015625, 0.010528564453125, 0.2005615234375, 0.1873779296875, 0.206787109375, 0.2113037109375, 0.1614990234375, 0.20849609375, 0.08746337890625, 0.097900390625, 0.1162109375, 0.03875732421875, 0.06915283203125, 0.08001708984375, 0.009002685546875, 0.00643920898...
embed
10043374_c0
10043374
prolog
0
Title: How to know if an atom is starting with a pattern? Problem title: How to know if an atom is starting with a pattern? Tags: prolog, string Problem: How to know if an atom is starting with a pattern? For example, if I got the following predicates : father('jim', 'Boby') father('rob', 'bob') and I would like to kno...
How to know if an atom is starting with a pattern? How to know if an atom is starting with a pattern? prolog string How Boby How to know if an atom is starting with a pattern? For example, if I got the following predicates : and I would like to know who got father with is name starting with 'bo' ?
[ -0.00014495849609375, -0.003326416015625, -0.01080322265625, 0.02197265625, -0.01531982421875, 0.00799560546875, 0.01226806640625, 0.0106201171875, 0.01611328125, -0.039306640625, 0.0264892578125, 0.0120849609375, -0.00933837890625, 0.004974365234375, 0.0184326171875, -0.00714111328125...
[ 11249, 47, 3714, 2174, 142, 34627, 83, 72134, 678, 10, 103510, 502, 4867, 79315, 25027, 53, 4163, 25632, 1653, 2063, 1636, 1884, 2750, 67373, 9351, 837 ]
[ 0.097900390625, 0.08428955078125, 0.1510009765625, 0.1136474609375, 0.03240966796875, 0.2384033203125, 0.0811767578125, 0.146484375, 0.14892578125, 0.08953857421875, 0.260986328125, 0.09454345703125, 0.152587890625, 0.1202392578125, 0.11578369140625, 0.1455078125, 0.0474853515625, ...
embed
14070576_c1
14070576
prolog
1
P2, Q1 \= Q2, Q12 \= Q22, T1 \= T2. tudoDif(P1, P2, P3) :- dif(P1, P2), dif(P1, P3), dif(P2, P3). solucao(S) :- S = [P1, P2, P3], gera_ef(P1, P2, P3), member(p(palmira, X, transito, 45), S), member(p(selma, Z, culinaria, W), S), member(p(roberta, 50, reciclagem, R), S), !. Code signals: Difficulty, Prolog, Prof, Aluno...
P2, Q1 \= Q2, Q12 \= Q22, T1 \= T2. tudoDif(P1, P2, P3) :- dif(P1, P2), dif(P1, P3), dif(P2, P3). solucao(S) :- S = [P1, P2, P3], gera_ef(P1, P2, P3), member(p(palmira, X, transito, 45), S), member(p(selma, Z, culinaria, W), S), member(p(roberta, 50, reciclagem, R), S), !. Code signals: Difficulty, Prolog, Prof, Aluno...
[ 0.00445556640625, -0.0027008056640625, 0.01092529296875, 0.0311279296875, -0.00567626953125, -0.00927734375, -0.04052734375, -0.005401611328125, 0.025390625, -0.0250244140625, 0.011962890625, 0.001556396484375, 0.025146484375, 0.009521484375, -0.0308837890625, 0.00897216796875, -0.01...
[ 436, 304, 4, 2396, 418, 41872, 1369, 1530, 4015, 384, 5442, 10964, 397, 3190, 132, 683, 21320, 15772, 45755, 10461, 5, 31563, 123142, 294, 159, 2203, 96386, 10110, 4240, 32786, 254, 5007, 61832, 1193, 62621, 2678, 1428, 192, 567, 173618, ...
[ 0.16748046875, 0.2374267578125, 0.0458984375, 0.167236328125, 0.14501953125, 0.0289306640625, 0.07794189453125, 0.1632080078125, 0.1507568359375, 0.0797119140625, 0.1878662109375, 0.2294921875, 0.1053466796875, 0.2347412109375, 0.0045166015625, 0.1502685546875, 0.232177734375, 0.06...
embed
72016853_c0
72016853
prolog
0
Title: Merging two lists into a list of lists Problem title: Merging two lists into a list of lists Tags: prolog, list, concatenation, append Problem: Merging two lists into a list of lists I have two lists: X = [a,b,c] Y = [d,e,f] I want the outcome to be: Z = [[a,b,c], [d,e,f]] However, when I use append I get: Z=[a,...
Merging two lists into a list of lists Merging two lists into a list of lists prolog list concatenation append Merging Merging two lists into a list of lists I have two lists: I want the outcome to be: However, when I use append I get: Any suggestions on how I should do this?
[ 0.0032806396484375, 0.0096435546875, 0.001953125, 0.0076904296875, -0.003936767578125, 0.03076171875, -0.00836181640625, 0.00494384765625, 0.0284423828125, -0.0240478515625, 0.0147705078125, -0.0120849609375, -0.00750732421875, 0.01092529296875, -0.0029144287109375, -0.0031585693359375...
[ 6035, 9966, 6626, 5303, 7, 3934, 111, 502, 4867, 158, 4460, 33, 114689, 71, 765, 3444, 184345, 186, 4527, 2046, 157666, 5608, 54 ]
[ 0.1693115234375, 0.0728759765625, 0.1451416015625, 0.2181396484375, 0.03900146484375, 0.1142578125, 0.0614013671875, 0.0908203125, 0.148193359375, 0.0007619857788085938, 0.0755615234375, 0.037933349609375, 0.18212890625, 0.1534423828125, 0.007965087890625, 0.0660400390625, 0.14672851...
embed
41324772_c0
41324772
prolog
0
Title: making triangle with points - prolog Problem title: making triangle with points - prolog Tags: prolog, list Problem: making triangle with points - prolog I have 5 points coordinates and I want to write a program that show all triangles that can be made with these. for example : p1(2,1) p2(4,2) p3(4,1) p4(5,1) p5...
making triangle with points - prolog making triangle with points - prolog prolog list making triangle with points - prolog I have 5 points coordinates and I want to write a program that show all triangles that can be made with these. for example : and the output should be something like this :
[ 0.0096435546875, 0.007080078125, 0.007080078125, -0.00148773193359375, -0.01495361328125, -0.0027923583984375, -0.0162353515625, 0.02099609375, 0.006744384765625, -0.013671875, 0.00095367431640625, -0.03076171875, 0.01080322265625, -0.017333984375, -0.00982666015625, 0.018798828125, ...
[ 20662, 1927, 109217, 678, 26847, 502, 4867, 5303, 87, 765, 190, 176866, 90, 3444, 33022, 1528, 7639, 756, 7, 450, 831, 7228, 6097, 27781, 140992, 5608, 1884, 903 ]
[ 0.1298828125, 0.2191162109375, 0.260986328125, 0.150634765625, 0.21435546875, 0.143310546875, 0.2235107421875, 0.167724609375, 0.0272979736328125, 0.05572509765625, 0.13134765625, 0.1890869140625, 0.05108642578125, 0.078369140625, 0.11199951171875, 0.174072265625, 0.0819091796875, ...
embed
22719084_c0
22719084
prolog
0
Title: how to trace a predicate in prolog? Problem title: how to trace a predicate in prolog? Tags: prolog Problem: how to trace a predicate in prolog? This is a predicate that get permutations of a list. Can somebody explain to me how to trace this predicate? I am using SWI. perm([H|T],L) :- perm(T,P) , insert(H,P,L)....
how to trace a predicate in prolog? how to trace a predicate in prolog? prolog how to trace a predicate in prolog? This is a predicate that get permutations of a list. Can somebody explain to me how to trace this predicate? I am using SWI.
[ -0.011474609375, 0.00848388671875, 0.01470947265625, 0.0081787109375, -0.01226806640625, 0.0130615234375, -0.033203125, -0.006011962890625, 0.005706787109375, -0.056396484375, 0.015625, 0.0174560546875, 0.01031494140625, -0.00933837890625, -0.01104736328125, 0.0205078125, 0.005920410...
[ 3642, 47, 144851, 1653, 2063, 67, 23, 502, 4867, 32, 10, 2046, 117, 14311, 21094, 111, 5303, 4171, 176256, 73342, 903, 17368, 38969 ]
[ 0.112548828125, 0.08447265625, 0.2548828125, 0.188720703125, 0.22900390625, 0.146484375, 0.0926513671875, 0.16259765625, 0.2230224609375, 0.01019287109375, 0.053375244140625, 0.043487548828125, 0.03509521484375, 0.154052734375, 0.0438232421875, 0.002410888671875, 0.140869140625, 0....
embed
5638602_c0
5638602
prolog
0
Title: How to set dynamically domain for a List Problem title: How to set dynamically domain for a List Tags: prolog Problem: How to set dynamically domain for a List for example, i create list following length(List,5), List :: 1..5, I want to set second element of list, it looks like List[1] :: 1..2 %List, from 0 to 4...
How to set dynamically domain for a List How to set dynamically domain for a List prolog How List How to set dynamically domain for a List for example, i create list following I want to set second element of list, it looks like List[1] :: 1..2 %List, from 0 to 4 I don't know how to realize it ? thanks very much :)
[ 0.00927734375, -0.00058746337890625, 0.035400390625, -0.0003452301025390625, 0.00738525390625, 0.00640869140625, -0.004302978515625, 0.0260009765625, 0.0155029296875, -0.01214599609375, 0.00311279296875, -0.01068115234375, -0.007354736328125, 0.0031280517578125, -0.00119781494140625, -...
[ 11249, 47, 5423, 84079, 25958, 77758, 100, 32036, 502, 4867, 10, 27781, 28282, 5303, 25632, 3444, 17932, 12830, 111, 33342, 25256, 1984, 615, 304, 1745, 154663, 1295, 757, 201, 3714, 3642, 92154 ]
[ 0.083984375, 0.0693359375, 0.1927490234375, 0.21533203125, 0.175537109375, 0.270263671875, 0.11328125, 0.25390625, 0.16015625, 0.205322265625, 0.0099334716796875, 0.04327392578125, 0.082275390625, 0.1968994140625, 0.1112060546875, 0.06134033203125, 0.1617431640625, 0.1534423828125,...
embed
37082440_c0
37082440
prolog
0
Title: List from nested predicates Problem title: List from nested predicates Tags: prolog Problem: List from nested predicates I want to know if it's possible to get a list of numbers from nested predicates in prolog. I'll make an example, from: ?- elements(p(f(0,5,1), k(8, f(7,3), h(6)), 5), X). I want in X this: X =...
List from nested predicates List from nested predicates prolog nested List List from nested predicates I want to know if it's possible to get a list of numbers from nested predicates in prolog. I'll make an example, from: I want in X this: Thank you if you can help me =)
[ -0.0002994537353515625, 0.0157470703125, 0.004150390625, 0.004852294921875, 0.002197265625, 0.04150390625, 0.01239013671875, 0.003265380859375, 0.0014495849609375, -0.056396484375, -0.00150299072265625, -0.033203125, -0.027587890625, 0.0174560546875, 0.006683349609375, 0.01470947265625...
[ 32036, 1295, 8512, 71, 1653, 2063, 1636, 502, 4867, 3444, 3714, 2174, 7722, 47, 2046, 10, 5303, 111, 101935, 23, 3249, 27781, 87, 1193, 903, 25689, 4358, 40039 ]
[ 0.1982421875, 0.15283203125, 0.2413330078125, 0.13818359375, 0.1776123046875, 0.193115234375, 0.0928955078125, 0.1590576171875, 0.209228515625, 0.1275634765625, 0.050079345703125, 0.001224517822265625, 0.123779296875, 0.0125732421875, 0.10406494140625, 0.005870819091796875, 0.1710205...
embed
71718132_c0
71718132
prolog
0
Title: Count each element occurence in list in prolog? Problem title: Count each element occurence in list in prolog? Tags: prolog Problem: Count each element occurence in list in prolog? I'm new to learn Prolog, I want to fulfill the predicate below, I have no idea how I implement this count([9,9,2,2,1],X). -- input X...
Count each element occurence in list in prolog? Count each element occurence in list in prolog? prolog Count Count each element occurence in list in prolog? I'm new to learn Prolog, I want to fulfill the predicate below, I have no idea how I implement this [X-Y] = X is the value, Y is the counter.
[ 0.00946044921875, -0.0033416748046875, -0.00064849853515625, 0.000018715858459472656, 0.0032958984375, 0.00445556640625, -0.005157470703125, 0.01129150390625, 0.01708984375, -0.01287841796875, -0.0208740234375, -0.01953125, 0.0103759765625, 0.01141357421875, 0.0164794921875, -0.0061035...
[ 108210, 12638, 12830, 74918, 6620, 23, 5303, 502, 4867, 3525, 30698, 1250, 3444, 211394, 1653, 2063, 35064, 6528, 29479, 1542, 9, 1723, 2203, 1193, 83, 70, 34292, 990, 105416, 5 ]
[ 0.2281494140625, 0.191162109375, 0.2293701171875, 0.1998291015625, 0.12017822265625, 0.07763671875, 0.1920166015625, 0.1639404296875, 0.2401123046875, 0.004383087158203125, 0.03472900390625, 0.1251220703125, 0.0201416015625, 0.0953369140625, 0.0104827880859375, 0.024932861328125, 0.0...
embed
40923193_c0
40923193
prolog
0
Title: Creating a prolog rule with count Problem title: Creating a prolog rule with count Tags: prolog, rule, count Problem: Creating a prolog rule with count mother(X, Y):- child(Y, X), female(X). How would I have code to find out whether or not X is the mother of at least 3 children? Would I have to use some sort of ...
Creating a prolog rule with count Creating a prolog rule with count prolog rule count Creating Creating a prolog rule with count How would I have code to find out whether or not X is the mother of at least 3 children? Would I have to use some sort of aggregate to see how many times child(Y,X) would happen?
[ 0.0179443359375, -0.00018405914306640625, -0.0185546875, -0.0062255859375, 0.007049560546875, 0.01190185546875, 0.00060272216796875, 0.00069427490234375, 0.0230712890625, -0.0576171875, -0.006439208984375, -0.044921875, 0.017578125, -0.00408935546875, 0.0186767578125, 0.01031494140625,...
[ 56781, 502, 4867, 79986, 678, 54529, 1916, 2806, 18151, 7413, 1810, 36766, 959, 1193, 83, 70, 42732, 111, 99, 19713, 138, 20020, 197564, 13, 1957, 3642, 5941, 20028, 29041, 1723, 1542, 53383 ]
[ 0.122314453125, 0.132568359375, 0.201416015625, 0.1807861328125, 0.098388671875, 0.2164306640625, 0.0220489501953125, 0.01128387451171875, 0.16357421875, 0.09429931640625, 0.06658935546875, 0.04351806640625, 0.0438232421875, 0.1029052734375, 0.06805419921875, 0.07373046875, 0.1871337...
embed
8313594_c0
8313594
prolog
0
Title: How to Read a file in SWI Prolog? Problem title: How to Read a file in SWI Prolog? Tags: prolog, swi-prolog, io, file, dcg Problem: How to Read a file in SWI Prolog? I want to read a file that will contain names in each line. And I don't know how to do this with SWI Prolog. I have sufficient knowledge of C/C++ s...
How to Read a file in SWI Prolog? How to Read a file in SWI Prolog? prolog swi-prolog io file dcg How Read SWI Prolog How to Read a file in SWI Prolog? I want to read a file that will contain names in each line. And I don't know how to do this with SWI Prolog. I have sufficient knowledge of C/C++ so is there any way to...
[ 0.02197265625, -0.018798828125, 0.0181884765625, 0.02294921875, -0.020751953125, 0.010986328125, 0.007415771484375, 0.00579833984375, -0.009033203125, -0.043212890625, 0.0096435546875, -0.00958251953125, -0.03369140625, -0.0069580078125, 0.0235595703125, -0.000957489013671875, -0.005...
[ 11249, 47, 4764, 11435, 23, 159, 38969, 1250, 4867, 502, 91, 2452, 3454, 22995, 104, 238, 177, 3444, 12301, 1221, 70541, 123055, 12638, 13315, 3714, 3642, 678, 129980, 51359, 313, 64, 37223 ]
[ 0.07421875, 0.054718017578125, 0.2249755859375, 0.2110595703125, 0.0673828125, 0.10009765625, 0.251220703125, 0.1602783203125, 0.2255859375, 0.1094970703125, 0.052642822265625, 0.2064208984375, 0.1424560546875, 0.197265625, 0.04278564453125, 0.0643310546875, 0.081298828125, 0.05352...
embed
33113651_c0
33113651
prolog
0
Title: How to define sort(List,Sorted) in Prolog Problem title: How to define sort(List,Sorted) in Prolog Tags: sorting, prolog, list Problem: How to define sort(List,Sorted) in Prolog How to define the predicate sort(List,Sorted) in Prolog? E.g., sort([3,2,4],[2,3,4]) returns true. I know there is a built-in predicate...
How to define sort(List,Sorted) in Prolog How to define sort(List,Sorted) in Prolog sorting prolog list How List Sorted Prolog How to define sort(List,Sorted) in Prolog How to define the predicate sort(List,Sorted) in Prolog? E.g., sort([3,2,4],[2,3,4]) returns true. I know there is a built-in predicate of this, but I ...
[ -0.007354736328125, 0.007293701171875, 0.0289306640625, -0.0087890625, -0.0240478515625, 0.00390625, -0.025634765625, -0.0024566650390625, 0.0020599365234375, 0.01031494140625, 0.01190185546875, 0.0031890869140625, -0.0279541015625, 0.0030670166015625, 0.003814697265625, 0.004180908203...
[ 11249, 61924, 12096, 132, 154663, 4, 158240, 3674, 23, 1250, 4867, 47, 214, 502, 5303, 32036, 53666, 297, 1653, 2063, 67, 363, 304, 617, 82449, 30646, 29568, 88303, 903, 3642, 442 ]
[ 0.046051025390625, 0.1854248046875, 0.259765625, 0.03399658203125, 0.2294921875, 0.039154052734375, 0.21435546875, 0.1903076171875, 0.0611572265625, 0.1695556640625, 0.2198486328125, 0.0101318359375, 0.01605224609375, 0.115478515625, 0.1318359375, 0.173583984375, 0.21923828125, 0.0...
embed
74526274_c0
74526274
prolog
0
Title: is fail/0 the same as 1=2? Problem title: is fail/0 the same as 1=2? Tags: prolog Problem: is fail/0 the same as 1=2? The predicate fail/0 in prolog can be useful, for example to test for termination. ?- q, fail. If this query terminates, then we know the query ?- q. also terminates. Question Is fail/0 equivalen...
is fail/0 the same as 1=2? is fail/0 the same as 1=2? prolog is fail/0 the same as 1=2? The predicate fail/0 in prolog can be useful, for example to test for termination. If this query terminates, then we know the query ?- q. also terminates. Question Is fail/0 equivalent to any goal that fails, eg 1=2 ? Is the followi...
[ 0.01904296875, 0.0005950927734375, 0.0205078125, -0.01263427734375, -0.00225830078125, -0.033203125, 0.000415802001953125, -0.017822265625, 0.0020751953125, 0.000148773193359375, 0.010986328125, 0.01953125, 0.01055908203125, 0.000713348388671875, 0.007659912109375, -0.00396728515625, ...
[ 83, 35782, 107838, 5701, 106, 55257, 237, 502, 4867, 1653, 2063, 67, 23, 831, 80234, 3034, 100, 29527, 1363, 41, 1294, 121011, 3714, 8096, 90, 68185, 2071, 183234, 47, 2499, 69236, 30046, 25632 ]
[ 0.0293121337890625, 0.194580078125, 0.25634765625, 0.09063720703125, 0.0472412109375, 0.2181396484375, 0.006134033203125, 0.153076171875, 0.21728515625, 0.12939453125, 0.1541748046875, 0.04296875, 0.010162353515625, 0.0322265625, 0.1214599609375, 0.1773681640625, 0.003662109375, 0....
embed
6782007_c0
6782007
prolog
0
Title: Prolog: how to convert string to integer? Problem title: Prolog: how to convert string to integer? Tags: prolog, integer, string Problem: Prolog: how to convert string to integer? So as the title says - how do you convert a string into an integer? the idea is something like this: convert(String,Integer). example...
Prolog: how to convert string to integer? Prolog: how to convert string to integer? prolog integer string Prolog Integer Prolog: how to convert string to integer? So as the title says - how do you convert a string into an integer? the idea is something like this: I'm using swi prolog
[ 0.005889892578125, -0.00714111328125, 0.0023193359375, 0.0284423828125, -0.00933837890625, 0.031494140625, -0.00799560546875, -0.0033111572265625, -0.003143310546875, -0.008056640625, 0.0052490234375, -0.018798828125, -0.0400390625, 0.00183868408203125, 0.0185546875, -0.01080322265625,...
[ 1250, 4867, 3642, 47, 96760, 79315, 892, 1505, 502, 44401, 12, 44759, 54, 398, 3934, 142, 6528, 9844, 1884, 903, 17368, 91, 2452 ]
[ 0.15185546875, 0.235107421875, 0.09625244140625, 0.11669921875, 0.177001953125, 0.257568359375, 0.1435546875, 0.205078125, 0.125, 0.1904296875, 0.0031223297119140625, 0.01235198974609375, 0.056304931640625, 0.032440185546875, 0.1146240234375, 0.04595947265625, 0.06951904296875, 0.0...
embed
16115443_c0
16115443
prolog
0
Title: Check If Everything In Head Is Less Than Tail Problem title: Check If Everything In Head Is Less Than Tail Tags: prolog Problem: Check If Everything In Head Is Less Than Tail Given a list containing sublists [[1].[2],[3]] how would I check to see if HEAD of the first sublist in the list is less than the rest of ...
Check If Everything In Head Is Less Than Tail Check If Everything In Head Is Less Than Tail prolog Check Everything Head Less Than Tail Check If Everything In Head Is Less Than Tail Given a list containing sublists [[1].[2],[3]] how would I check to see if HEAD of the first sublist in the list is less than the rest of ...
[ 0.021240234375, -0.001983642578125, 0.0020294189453125, 0.017333984375, -0.0108642578125, 0.00506591796875, 0.01177978515625, -0.0059814453125, 0.0164794921875, 0.0031890869140625, 0.0240478515625, -0.0023956298828125, 0.0108642578125, 0.0033111572265625, 0.0034942626953125, -0.0143432...
[ 38679, 4263, 171581, 360, 44816, 2071, 1734, 7, 72820, 1218, 379, 502, 4867, 77878, 5303, 70541, 1614, 6562, 54968, 3642, 2806, 12765, 47, 1957, 2174, 572, 188328, 5117, 83, 40715, 3501, 10588, 3789 ]
[ 0.186767578125, 0.1224365234375, 0.1826171875, 0.1737060546875, 0.2481689453125, 0.07513427734375, 0.181640625, 0.138671875, 0.1585693359375, 0.1661376953125, 0.1314697265625, 0.0928955078125, 0.09295654296875, 0.0217437744140625, 0.1558837890625, 0.051116943359375, 0.189453125, 0....
embed
50314255_c0
50314255
prolog
0
Title: Why does Prolog length function returns sum in form 1+1+...? Problem title: Why does Prolog length function returns sum in form 1+1+...? Tags: prolog Problem: Why does Prolog length function returns sum in form 1+1+...? This is the length function: len([], 0). len([H|T], N + 1) :- len(T, N). When I query ?- len(...
Why does Prolog length function returns sum in form 1+1+...? Why does Prolog length function returns sum in form 1+1+...? prolog Why Prolog Why does Prolog length function returns sum in form 1+1+...? This is the length function: When I query Why do I get X = 0 + 1 + 1 + 1 instead of X = 3 ?
[ -0.00092315673828125, 0.0225830078125, 0.01019287109375, 0.017333984375, -0.00830078125, 0.0026397705078125, 0.01007080078125, 0.01220703125, 0.0133056640625, -0.03076171875, 0.004547119140625, -0.0184326171875, 0.0031890869140625, 0.002685546875, 0.0169677734375, 0.000614166259765625,...
[ 44084, 1250, 4867, 140909, 32354, 30646, 10554, 3173, 179898, 1328, 502, 14602, 7, 41, 1294, 2046, 1193, 2203, 757, 997, 106, 64457, 138 ]
[ 0.11871337890625, 0.16650390625, 0.254638671875, 0.201416015625, 0.177978515625, 0.1474609375, 0.1998291015625, 0.10479736328125, 0.179931640625, 0.1844482421875, 0.107666015625, 0.032501220703125, 0.006481170654296875, 0.06005859375, 0.035980224609375, 0.03802490234375, 0.0857543945...
embed
67029329_c2
67029329
prolog
2
s' has instantiatedness main.m:011: bound( main.m:011: [] main.m:011: ; main.m:011: '[|]'( main.m:011: free, main.m:011: named inst mylist.listskel, main.m:011: which expands to main.m:011: bound( main.m:011: [] main.m:011: ; main.m:011: '[|]'( main.m:011: free, Code signals: How, Mercury, Prolog, import_module, free_t...
s' has instantiatedness main.m:011: bound( main.m:011: [] main.m:011: ; main.m:011: '[|]'( main.m:011: free, main.m:011: named inst mylist.listskel, main.m:011: which expands to main.m:011: bound( main.m:011: [] main.m:011: ; main.m:011: '[|]'( main.m:011: free, Code signals: How, Mercury, Prolog, import_module, free_t...
[ 0.00045013427734375, 0.007110595703125, 0.0155029296875, -0.005340576171875, -0.005035400390625, 0.01141357421875, 0.01519775390625, -0.01275634765625, 0.0111083984375, -0.00592041015625, 0.010009765625, -0.00836181640625, 0.005828857421875, 0.00122833251953125, 0.00872802734375, 0.000...
[ 91, 25, 1556, 34648, 14, 27686, 7432, 5201, 39, 136485, 99091, 12, 5, 58745, 4092, 4806, 23, 271, 759, 6562, 2590, 71062, 28864, 26073, 11249, 123106, 53, 1250, 4867, 24927, 83279, 188, 32087, 103036, 4717, 73, 310, 963, 2485, 84572, 28...
[ 0.1826171875, 0.14208984375, 0.1734619140625, 0.213623046875, 0.154296875, 0.1243896484375, 0.1649169921875, 0.1153564453125, 0.061859130859375, 0.183837890625, 0.2330322265625, 0.01055908203125, 0.024261474609375, 0.06640625, 0.17236328125, 0.001068115234375, 0.0259857177734375, 0...
embed
16141016_c0
16141016
prolog
0
Title: Prolog: Read list from file Problem title: Prolog: Read list from file Tags: prolog Problem: Prolog: Read list from file I have a text file containing a list like this one: [(3,3,0), (3,5,0), (4,4,1), (5,1,0), (6,6,3)]. Is there a built-in Prolog predicate that can load this list from a file? Or do I have to rea...
Prolog: Read list from file Prolog: Read list from file prolog file Prolog Read Prolog: Read list from file I have a text file containing a list like this one: Is there a built-in Prolog predicate that can load this list from a file? Or do I have to read the data as plain text and then do the parsing by myself?
[ 0.0279541015625, -0.00927734375, 0.0108642578125, 0.0174560546875, -0.0091552734375, 0.01953125, -0.0027923583984375, 0.01611328125, -0.00136566162109375, -0.0281982421875, 0.0050048828125, -0.0048828125, -0.032958984375, -0.0225830078125, 0.005340576171875, 0.00628662109375, 0.00289...
[ 1250, 4867, 4764, 5303, 1295, 11435, 12, 502, 765, 7986, 70541, 1884, 903, 88303, 73, 1653, 2063, 67, 831, 72367, 12301, 2053, 237, 111719, 366, 6953, 35978 ]
[ 0.194580078125, 0.2496337890625, 0.2064208984375, 0.216796875, 0.142822265625, 0.186767578125, 0.0015764236450195312, 0.13525390625, 0.020294189453125, 0.10260009765625, 0.0291595458984375, 0.050811767578125, 0.0009627342224121094, 0.12744140625, 0.0672607421875, 0.161865234375, 0.17...
embed
41166286_c0
41166286
prolog
0
Title: Prolog Simplification Problem title: Prolog Simplification Tags: prolog Problem: Prolog Simplification Could anyone tell me if there is a simpler way to write this code in Prolog, I need to have this narrowed down to make it more compact. This is what I have so far: add(X,[],[X]). add(X,[A|L],[A|L1]) :- add(X,L,...
Prolog Simplification Prolog Simplification prolog Prolog Simplification Prolog Simplification Could anyone tell me if there is a simpler way to write this code in Prolog, I need to have this narrowed down to make it more compact. This is what I have so far:
[ 0.0260009765625, 0.0172119140625, 0.00823974609375, 0.0025482177734375, -0.017333984375, 0.004241943359375, -0.01531982421875, -0.0024871826171875, 0.02392578125, -0.0306396484375, 0.029541015625, -0.00185394287109375, -0.01263427734375, 0.0027008056640625, 0.0123291015625, -0.02258300...
[ 1250, 4867, 55331, 141, 41274, 502, 35672, 14192, 163, 8781, 42, 3917, 33022, 903, 18151, 23, 3871, 18304, 24243, 7565, 1286, 94928, 765, 2060 ]
[ 0.1689453125, 0.2462158203125, 0.1258544921875, 0.07794189453125, 0.11004638671875, 0.07318115234375, 0.005802154541015625, 0.0545654296875, 0.0210723876953125, 0.1588134765625, 0.10418701171875, 0.0731201171875, 0.12432861328125, 0.09161376953125, 0.18310546875, 0.054962158203125, 0...
embed
78747882_c0
78747882
prolog
0
Title: Difference between :- and =&gt; rules without guard? Problem title: Difference between :- and =&gt; rules without guard? Tags: prolog, swi-prolog Problem: Difference between :- and => rules without guard? Are rules declared with the neck ( :- ) equivalent to ones declared using single-sided unification ( => ), i...
Difference between :- and =&gt; rules without guard? Difference between :- and =&gt; rules without guard? prolog swi-prolog Difference Difference between :- and => rules without guard? Are rules declared with the neck ( :- ) equivalent to ones declared using single-sided unification ( => ), in case there is no guard? e...
[ -0.000148773193359375, 0.0289306640625, 0.0137939453125, 0.00115203857421875, -0.0002231597900390625, 0.01043701171875, -0.015869140625, 0.0022430419921875, 0.01190185546875, 0.005859375, -0.004608154296875, -0.00494384765625, -0.0164794921875, 0.00555419921875, 0.0191650390625, -0.019...
[ 803, 18234, 6620, 17721, 15772, 136, 2203, 1230, 5386, 91736, 15490, 56050, 502, 4867, 2452, 3454, 44357, 159978, 71, 678, 108, 2594, 183234, 11001, 8752, 51, 41274, 83, 110 ]
[ 0.090576171875, 0.1993408203125, 0.1138916015625, 0.1016845703125, 0.17529296875, 0.09649658203125, 0.07672119140625, 0.032470703125, 0.1390380859375, 0.2137451171875, 0.1607666015625, 0.250732421875, 0.09722900390625, 0.1685791015625, 0.1396484375, 0.07720947265625, 0.0799560546875,...
embed
77226982_c2
77226982
prolog
2
1 = L + 1, prefixes(X, L1, T). all_sublists([], []). all_sublists([H|T], Q) :- prefixes([H|T], 1, R), all_sublists(T, Z), append(R, Z, Q). is_pal(X) :- reverse(X, Rx), X = Rx. all_pals([], []). all_pals([H|T], [H|R]) :- length(H, Code signals: the, read_list, all_sublists, is_pal, all_pals, all_palindroms, belongs_to_s...
1 = L + 1, prefixes(X, L1, T). all_sublists([], []). all_sublists([H|T], Q) :- prefixes([H|T], 1, R), all_sublists(T, Z), append(R, Z, Q). is_pal(X) :- reverse(X, Rx), X = Rx. all_pals([], []). all_pals([H|T], [H|R]) :- length(H, Code signals: the, read_list, all_sublists, is_pal, all_pals, all_palindroms, belongs_to_s...
[ 0.0128173828125, 0.00994873046875, -0.0072021484375, 0.0023040771484375, -0.0030059814453125, 0.0201416015625, 0.014404296875, 0.00518798828125, 0.01287841796875, -0.031494140625, 0.0206298828125, -0.01416015625, 0.0002269744873046875, 0.005889892578125, -0.00994873046875, 0.0095825195...
[ 106, 2203, 339, 997, 183114, 90, 1542, 418, 384, 194, 756, 454, 22144, 6562, 841, 58745, 618, 2396, 15772, 4, 627, 247, 567, 114689, 71, 1052, 83, 5007, 39531, 184, 425, 1193, 5, 7, 140909, 28864, 26073, 12, 70, 12301, 73, 41684, 18...
[ 0.148193359375, 0.1363525390625, 0.167236328125, 0.2279052734375, 0.213134765625, 0.11962890625, 0.1343994140625, 0.08477783203125, 0.1114501953125, 0.0592041015625, 0.1903076171875, 0.02447509765625, 0.2286376953125, 0.289306640625, 0.133544921875, 0.069580078125, 0.09130859375, 0...
embed
21082855_c0
21082855
prolog
0
Title: Prolog findall/3 Problem title: Prolog findall/3 Tags: prolog, prolog-findall, pattern-matching Problem: Prolog findall/3 Say I have a predicate pred containing several facts. pred(a, b, c). pred(a, d, f). pred(x, y, z). Can I use findall/3 to get a list of all facts which can be pattern matched? for example, if...
Prolog findall/3 Prolog findall/3 prolog prolog-findall pattern-matching Prolog Prolog findall/3 Say I have a predicate pred containing several facts. Can I use findall/3 to get a list of all facts which can be pattern matched? for example, if I have pred(a, _, _) I would like to obtain [pred(a, b, c), pred(a, d, f)]
[ 0.01177978515625, 0.0033416748046875, 0.00836181640625, 0.008056640625, -0.01275634765625, 0.0242919921875, -0.00732421875, 0.007354736328125, 0.00628662109375, -0.0301513671875, 0.01251220703125, -0.01177978515625, -0.0023345947265625, -0.0174560546875, 0.0078125, 0.0115966796875, -...
[ 1250, 4867, 7413, 5584, 18113, 502, 111607, 103510, 98753, 214, 25916, 765, 1653, 2063, 67, 70541, 40368, 15824, 4171, 4527, 2046, 5303, 756, 831, 186, 14858, 297, 2174, 11, 1884, 47, 113054, 19714, 876, 104, 1238 ]
[ 0.1138916015625, 0.193115234375, 0.1593017578125, 0.2154541015625, 0.234375, 0.08148193359375, 0.1220703125, 0.233154296875, 0.22802734375, 0.035491943359375, 0.00128173828125, 0.014892578125, 0.1842041015625, 0.1658935546875, 0.09130859375, 0.061676025390625, 0.03265380859375, 0.1...
embed
9577612_c0
9577612
prolog
0
Title: Prolog append variable to list Problem title: Prolog append variable to list Tags: list, append, prolog Problem: Prolog append variable to list I want to append to a list a variable, N, that's bound to a number. N = 1. append([N], [2,3,4], Z). Z = [N,2,3,4]. //Wrong output! I want to get Z = [1,2,3,4] How do I a...
Prolog append variable to list Prolog append variable to list list append prolog Prolog Wrong Prolog append variable to list I want to append to a list a variable, N, that's bound to a number. I want to get Z = [1,2,3,4] How do I append the number part of a variable, not the actual variable itself?
[ -0.0045166015625, 0.00131988525390625, 0.000682830810546875, -0.00762939453125, 0.0021820068359375, 0.01519775390625, -0.0084228515625, 0.033935546875, 0.01031494140625, -0.029052734375, 0.004852294921875, -0.02197265625, -0.02392578125, 0.01519775390625, 0.007049560546875, 0.000675201...
[ 1250, 4867, 114689, 71, 77336, 47, 5303, 502, 35133, 3444, 541, 99091, 14012, 2046, 567, 2203, 133063, 82449, 11249, 54, 87, 2831, 959, 8561, 68034 ]
[ 0.157958984375, 0.227294921875, 0.2054443359375, 0.1419677734375, 0.308349609375, 0.1273193359375, 0.233154296875, 0.1229248046875, 0.08026123046875, 0.0921630859375, 0.1072998046875, 0.1905517578125, 0.193115234375, 0.053436279296875, 0.152587890625, 0.08013916015625, 0.106628417968...
embed
20164305_c1
20164305
prolog
1
man = Xpellet, Ypacman = Ypellet, !. haspellet([_|Restpellets], Xpacman, Ypacman):- haspellet(Restpellets,Xpacman,Ypacman). My question is why when I run my programm with this: move-pacman([[5,6]],[[6,6]],[[4,6]],R). The return value is a boolean instead of an int? Code signals: Value, Prolog, Xpacman, Ypacman, Xghost,...
man = Xpellet, Ypacman = Ypellet, !. haspellet([_|Restpellets], Xpacman, Ypacman):- haspellet(Restpellets,Xpacman,Ypacman). My question is why when I run my programm with this: move-pacman([[5,6]],[[6,6]],[[4,6]],R). The return value is a boolean instead of an int? Code signals: Value, Prolog, Xpacman, Ypacman, Xghost,...
[ 0.00119781494140625, -0.0029754638671875, -0.000499725341796875, 0.035400390625, 0.00567626953125, 0.0257568359375, 0.0211181640625, 0.013427734375, 0.0020599365234375, 0.020263671875, 0.0020294189453125, 0.03125, -0.0025177001953125, -0.0133056640625, -0.0203857421875, -0.000965118408...
[ 332, 2203, 1193, 5310, 1974, 990, 62268, 669, 711, 256, 11337, 1052, 525, 117515, 7831, 1542, 1723, 9655, 15400, 3229, 11675, 28966, 678, 903, 25813, 9, 132, 104629, 140447, 128191, 30646, 34292, 83, 337, 31, 34677, 64457, 23, 18, 28864, ...
[ 0.1826171875, 0.086181640625, 0.0972900390625, 0.1517333984375, 0.220947265625, 0.1146240234375, 0.2015380859375, 0.2349853515625, 0.0625, 0.14208984375, 0.1427001953125, 0.0921630859375, 0.0740966796875, 0.17724609375, 0.169189453125, 0.052459716796875, 0.0924072265625, 0.03237915...
embed
61500103_c0
61500103
prolog
0
Title: Prolog Duplicate element to mutliple times Problem title: Prolog Duplicate element to mutliple times Tags: prolog Problem: Prolog Duplicate element to mutliple times My goal is to multiply the elements in my list to three times. For example, the query is ?-Three([a,b,c],X). Then, the expected output is X = [a,a,...
Prolog Duplicate element to mutliple times Prolog Duplicate element to mutliple times prolog Prolog Duplicate Three Prolog Duplicate element to mutliple times My goal is to multiply the elements in my list to three times. For example, the query is Then, the expected output is I don't know how to do that, please helps m...
[ -0.01019287109375, 0.015625, -0.00113677978515625, -0.00019359588623046875, -0.00811767578125, 0.01177978515625, -0.003936767578125, 0.006011962890625, 0.0194091796875, -0.0242919921875, -0.004180908203125, -0.0147705078125, 0.0023956298828125, 0.0203857421875, -0.0179443359375, 0.0177...
[ 1250, 4867, 786, 52721, 67, 12830, 47, 21144, 150, 8705, 20028, 502, 129335, 69236, 83, 6024, 62479, 80854, 759, 5303, 17262, 27781, 41, 1294, 47009, 84751, 140992, 3714, 3642, 54, 450, 22936, 112397, 5 ]
[ 0.1807861328125, 0.251708984375, 0.1461181640625, 0.256103515625, 0.0947265625, 0.2032470703125, 0.150390625, 0.1573486328125, 0.137451171875, 0.1787109375, 0.228271484375, 0.140869140625, 0.2391357421875, 0.12841796875, 0.027313232421875, 0.1614990234375, 0.1824951171875, 0.164306...
embed
64755655_c0
64755655
prolog
0
Title: Test whether L is a valid Prolog list Problem title: Test whether L is a valid Prolog list Tags: list, prolog Problem: Test whether L is a valid Prolog list I'm doing a bunch of Prolog tasks and I have very little idea of how lists work. I have the following: is_a_list(+L) . Test whether L is a valid Prolog list...
Test whether L is a valid Prolog list Test whether L is a valid Prolog list list prolog Test Prolog is_a_list Test whether L is a valid Prolog list I'm doing a bunch of Prolog tasks and I have very little idea of how lists work. I have the following: How can I write a predicate for that? What does the + mean?
[ -0.0034942626953125, -0.006927490234375, 0.0089111328125, 0.0230712890625, -0.017822265625, 0.01080322265625, -0.019287109375, -0.01422119140625, 0.0177001953125, -0.02685546875, 0.01507568359375, -0.0184326171875, 0.0012969970703125, 0.0267333984375, -0.00958251953125, 0.0088500976562...
[ 8647, 36766, 339, 83, 10, 35604, 1250, 4867, 5303, 502, 11, 6562, 66211, 7, 4488, 33022, 1653, 2063, 67, 100, 450, 997, 29459 ]
[ 0.1658935546875, 0.09271240234375, 0.180908203125, 0.080078125, 0.05645751953125, 0.190185546875, 0.1778564453125, 0.2578125, 0.1876220703125, 0.12347412109375, 0.0777587890625, 0.2110595703125, 0.0579833984375, 0.0140533447265625, 0.041595458984375, 0.05963134765625, 0.107421875, ...
embed
10490598_c0
10490598
prolog
0
Title: How do I turn off SWI-Prolog flags? Problem title: How do I turn off SWI-Prolog flags? Tags: swi-prolog, prolog Problem: How do I turn off SWI-Prolog flags? I'm not sure if flags is the appropriate term, but is there anyway to configure a swi-prolog program to not output true or false on the completion of a quer...
How do I turn off SWI-Prolog flags? How do I turn off SWI-Prolog flags? swi-prolog prolog How SWI-Prolog How do I turn off SWI-Prolog flags? I'm not sure if flags is the appropriate term, but is there anyway to configure a swi-prolog program to not output true or false on the completion of a query, and instead simply p...
[ 0.0155029296875, 0.01055908203125, 0.0189208984375, 0.004974365234375, -0.01470947265625, -0.006622314453125, 0.0128173828125, -0.005126953125, -0.0196533203125, 0.0245361328125, -0.0057373046875, -0.0068359375, -0.0198974609375, 0.0123291015625, 0.0113525390625, -0.003692626953125, ...
[ 11249, 87, 15504, 5773, 159, 38969, 9, 10752, 4867, 49938, 7, 91, 2452, 3454, 502, 54, 95307, 13579, 109954, 222495, 1528, 47, 959, 140992, 29568, 707, 98320, 21721, 41, 28412, 1810, 15700, 63805, 83324 ]
[ 0.0570068359375, 0.0242767333984375, 0.146240234375, 0.2208251953125, 0.06622314453125, 0.2210693359375, 0.053375244140625, 0.1458740234375, 0.2015380859375, 0.2196044921875, 0.09722900390625, 0.046630859375, 0.209716796875, 0.1318359375, 0.10614013671875, 0.0297698974609375, 0.01144...
embed
4089916_c1
4089916
prolog
1
,Y) :- abbrev(X,Y). rel(X,Y) :- advmod(X,Y). rel(X,Y) :- neg(X,Y). rel(X,Y) :- poss(X,Y). rel(X,Y) :- possesive(X,Y). rel(X,Y) :- prt(X,Y). rel(X,Y) :- det(X,Y). rel(X,Y) :- prep(X,Y). rel(X,Y) :- sdep(X,Y). rel(X,Y) :- xsubj(X,Y). related(X,Z) :- rel(X,Y), rel(Y,Z). but in the last relation i want the first "rel" to b...
,Y) :- abbrev(X,Y). rel(X,Y) :- advmod(X,Y). rel(X,Y) :- neg(X,Y). rel(X,Y) :- poss(X,Y). rel(X,Y) :- possesive(X,Y). rel(X,Y) :- prt(X,Y). rel(X,Y) :- det(X,Y). rel(X,Y) :- prep(X,Y). rel(X,Y) :- sdep(X,Y). rel(X,Y) :- xsubj(X,Y). related(X,Z) :- rel(X,Y), rel(Y,Z). but in the last relation i want the first "rel" to b...
[ -0.0162353515625, 0.007598876953125, 0.0111083984375, 0.01904296875, -0.01153564453125, -0.02392578125, -0.0123291015625, -0.01043701171875, 0.016357421875, -0.030029296875, 0.00811767578125, 0.0322265625, 0.002288818359375, -0.007659912109375, 0.000942230224609375, 0.0162353515625, ...
[ 4, 1723, 15772, 1563, 105160, 1542, 194, 7962, 606, 334, 13415, 108, 177, 3864, 41439, 29888, 18, 149, 64503, 112, 254, 22144, 170, 62548, 1511, 4568, 41911, 3444, 5117, 186, 12921, 1295, 11737, 3642, 47, 12765, 2174, 1836, 117781, 4358, ...
[ 0.0888671875, 0.203369140625, 0.11962890625, 0.1258544921875, 0.19775390625, 0.1422119140625, 0.0179443359375, 0.267333984375, 0.052215576171875, 0.04449462890625, 0.1402587890625, 0.0772705078125, 0.064453125, 0.10406494140625, 0.1370849609375, 0.1522216796875, 0.0222625732421875, ...
embed
13864414_c0
13864414
prolog
0
Title: How to convert decimal to binary number in prolog.? Problem title: How to convert decimal to binary number in prolog.? Tags: prolog Problem: How to convert decimal to binary number in prolog.? dec_bin(1,1). dec_bin(N,B):-N>1,X is N mod 2,Y is N//2,dec_bin(Y,B1),B=B1+X. This gives me the output : ?- dec_bin(12,K)...
How to convert decimal to binary number in prolog.? How to convert decimal to binary number in prolog.? prolog How dec_bin How to convert decimal to binary number in prolog.? This gives me the output : But I want just 1100 without '+' symbol. Please someone help me..
[ 0.01043701171875, -0.0048828125, 0.0218505859375, 0.0115966796875, 0.0059814453125, 0.025146484375, -0.02587890625, -0.0169677734375, 0.032958984375, -0.0126953125, 0.000377655029296875, -0.03857421875, -0.001312255859375, 0.0185546875, 0.0213623046875, -0.00013828277587890625, 0.031...
[ 11249, 47, 96760, 32380, 2749, 2394, 6635, 14012, 23, 502, 4867, 57865, 7568, 140992, 3444, 1660, 76094, 15490, 1328, 26582, 30607, 4358 ]
[ 0.047515869140625, 0.08038330078125, 0.1329345703125, 0.196044921875, 0.1827392578125, 0.1466064453125, 0.1357421875, 0.134765625, 0.0156707763671875, 0.1300048828125, 0.2056884765625, 0.1505126953125, 0.18115234375, 0.0875244140625, 0.10345458984375, 0.060546875, 0.222900390625, 0...
embed
19875058_c0
19875058
prolog
0
Title: print even number using prolog: Problem title: print even number using prolog: Tags: prolog Problem: print even number using prolog: How can I print just even numbers in Prolog? This is my code to print numbers from 3 to 1: And how using mult without (*) in anthor example: predicates count(integer). clauses coun...
print even number using prolog: print even number using prolog: prolog prolog X-1 print even number using prolog: How can I print just even numbers in Prolog? This is my code to print numbers from 3 to 1: And how using mult without (*) in anthor example:
[ -0.00145721435546875, 0.0242919921875, -0.003570556640625, 0.003631591796875, 0.00775146484375, 0.0302734375, -0.010986328125, 0.0084228515625, 0.0125732421875, -0.028564453125, -0.0034942626953125, -0.03369140625, 0.005584716796875, 0.005401611328125, 0.01953125, 0.01239013671875, 0...
[ 28412, 3853, 14012, 17368, 502, 4867, 1193, 5759, 11249, 831, 1660, 101935, 23, 1250, 18151, 1295, 138, 47, 13806, 3642, 3869, 15490, 80019, 12936, 5922, 27781 ]
[ 0.1907958984375, 0.2078857421875, 0.183349609375, 0.07867431640625, 0.1585693359375, 0.2340087890625, 0.09857177734375, 0.1287841796875, 0.022308349609375, 0.0141754150390625, 0.04327392578125, 0.189697265625, 0.041015625, 0.1622314453125, 0.0972900390625, 0.025634765625, 0.128295898...
embed
34635689_c1
34635689
prolog
1
using this code: format('+~`-t~78|+ ~n', []), format('|~tTable Title~t~78||~n', []), format('+~`-t~78|+ ~n', []). format('| ~s~t~28|| ~s~t~36|| ~s~t~56|| ~s~t~80||~n', ['Name', 'Age', 'Eye Colour', 'Phone Number']). but it is notgiving output as defined above Code signals: ShortName, Hydropathy, format:aminoclass, Ala...
using this code: format('+~`-t~78|+ ~n', []), format('|~tTable Title~t~78||~n', []), format('+~`-t~78|+ ~n', []). format('| ~s~t~28|| ~s~t~36|| ~s~t~56|| ~s~t~80||~n', ['Name', 'Age', 'Eye Colour', 'Phone Number']). but it is notgiving output as defined above Code signals: ShortName, Hydropathy, format:aminoclass, Ala...
[ 0.005950927734375, 0.02880859375, 0.00775146484375, 0.019775390625, -0.006805419921875, -0.0029144287109375, 0.0235595703125, 0.0120849609375, 0.000728607177734375, 0.047119140625, 0.0186767578125, -0.019775390625, -0.003448486328125, -0.0038299560546875, 0.012939453125, 0.000816345214...
[ 17368, 903, 18151, 9384, 1328, 2306, 1135, 9, 18, 19051, 6780, 19, 618, 2886, 48962, 194, 7, 3882, 8659, 13683, 4836, 163612, 429, 4, 1033, 196431, 163147, 103332, 1284, 442, 83, 959, 735, 6496, 140992, 237, 61924, 36917, 28864, 26073, ...
[ 0.1865234375, 0.1412353515625, 0.286376953125, 0.2252197265625, 0.1197509765625, 0.05181884765625, 0.09893798828125, 0.0187530517578125, 0.050262451171875, 0.2406005859375, 0.003631591796875, 0.061279296875, 0.1043701171875, 0.196044921875, 0.1783447265625, 0.0731201171875, 0.0079345...
embed
30852887_c0
30852887
prolog
0
Title: ANSI escape characters in gprolog Problem title: ANSI escape characters in gprolog Tags: prolog, iso-prolog, escaping Problem: ANSI escape characters in gprolog Trying to print bold and underlined text in prolog but can't write them write('\033[1mbold\033[0m') Makes this (expected) error: syntax error: \ expecte...
ANSI escape characters in gprolog ANSI escape characters in gprolog prolog iso-prolog escaping ANSI ANSI escape characters in gprolog Trying to print bold and underlined text in prolog but can't write them Makes this (expected) error: What's the correct way to do it with gprolog ? Maybe with format ?
[ 0.0128173828125, 0.01416015625, -0.00009059906005859375, -0.00994873046875, -0.01275634765625, -0.005706787109375, 0.0283203125, 0.00714111328125, -0.0125732421875, 0.051025390625, 0.0029754638671875, -0.01519775390625, -0.01080322265625, 0.00799560546875, -0.019775390625, -0.009765625...
[ 14368, 9902, 144281, 124850, 706, 3454, 4867, 23, 502, 13882, 38940, 10366, 40858, 28412, 65665, 136, 1379, 2256, 7986, 1284, 831, 18, 33022, 2856, 83613, 13, 18499, 26785, 3917, 54, 678, 9384 ]
[ 0.0992431640625, 0.203125, 0.221435546875, 0.1650390625, 0.09320068359375, 0.1844482421875, 0.214599609375, 0.0263214111328125, 0.153564453125, 0.10638427734375, 0.1307373046875, 0.00553131103515625, 0.031829833984375, 0.151611328125, 0.1973876953125, 0.0731201171875, 0.1358642578125...
embed
48634301_c0
48634301
prolog
0
Title: How to write it in skolem form?(Prolog) Problem title: How to write it in skolem form?(Prolog) Tags: prolog Problem: How to write it in skolem form?(Prolog) Translate the following formula into a horn formula in Skolem form: ∀w¬∀x∃z(H(w)∧(¬G(x,x)∨¬H(z))) it's translated from german to english, how to write it in...
How to write it in skolem form?(Prolog) How to write it in skolem form?(Prolog) prolog How Prolog How to write it in skolem form?(Prolog) Translate the following formula into a horn formula in Skolem form: ∀w¬∀x∃z(H(w)∧(¬G(x,x)∨¬H(z))) it's translated from german to english, how to write it in horn form and then in sko...
[ -0.01104736328125, 0.03125, -0.0284423828125, 0.00787353515625, -0.0185546875, 0.009765625, -0.0029449462890625, 0.0009613037109375, -0.004119873046875, -0.0111083984375, 0.01177978515625, -0.001800537109375, -0.0257568359375, 0.00616455078125, 0.0147705078125, 0.00081634521484375, -...
[ 11249, 47, 33022, 442, 23, 18700, 39, 3173, 10752, 4867, 502, 1250, 11062, 19309, 25632, 26168, 3934, 3328, 19, 89590, 165304, 434, 36927, 425, 248265, 169, 841, 248144, 724, 248359, 3900, 143, 1295, 42712, 175457, 3642, 7068, 4358 ]
[ 0.08050537109375, 0.07568359375, 0.1875, 0.1107177734375, 0.06768798828125, 0.1761474609375, 0.203369140625, 0.178466796875, 0.0703125, 0.2047119140625, 0.06695556640625, 0.1060791015625, 0.07598876953125, 0.0950927734375, 0.033203125, 0.207763671875, 0.066162109375, 0.183715820312...
embed
79387335_c0
79387335
prolog
0
Title: what does this error message in swi prolog mean? Problem title: what does this error message in swi prolog mean? Tags: prolog, prolog-toplevel, swi-prolog Problem: what does this error message in swi prolog mean? I'm seeing this in response to an input on swi prolog % ... 1,000,000 ............ 10,000,000 years ...
what does this error message in swi prolog mean? what does this error message in swi prolog mean? prolog prolog-toplevel swi-prolog what does this error message in swi prolog mean? I'm seeing this in response to an input on swi prolog some sort of in joke I take it but no idea how to proceed?
[ 0.01434326171875, 0.006561279296875, -0.016357421875, 0.0150146484375, -0.0181884765625, 0.01068115234375, -0.0189208984375, 0.006561279296875, 0.0023651123046875, -0.0274658203125, 0.01348876953125, -0.0086669921875, -0.007598876953125, -0.016845703125, 0.0235595703125, 0.005096435546...
[ 2367, 903, 18499, 26008, 23, 91, 2452, 502, 4867, 29459, 13784, 67919, 3454, 14602, 86681, 57553, 107730, 122122, 5646, 442, 6528, 172337 ]
[ 0.0377197265625, 0.0963134765625, 0.178955078125, 0.1328125, 0.029937744140625, 0.0235137939453125, 0.1767578125, 0.129150390625, 0.1712646484375, 0.10186767578125, 0.1068115234375, 0.18701171875, 0.11553955078125, 0.03460693359375, 0.05828857421875, 0.039215087890625, 0.126220703125...
embed
4391435_c0
4391435
prolog
0
Title: How to manipulate strings in prolog? Problem title: How to manipulate strings in prolog? Tags: prolog, string Problem: How to manipulate strings in prolog? I have this fact in my base fact("name","surname","123"). if i simply write this question: fact(X,_,_). For X I get some unidentified output. How can I retri...
How to manipulate strings in prolog? How to manipulate strings in prolog? prolog string How How to manipulate strings in prolog? I have this fact in my base fact("name","surname","123"). if i simply write this question: fact(X,_,_). For X I get some unidentified output. How can I retrieve any of this values, or how to ...
[ 0.0264892578125, 0.005462646484375, -0.00121307373046875, 0.0257568359375, -0.01220703125, 0.0057373046875, 0.0179443359375, 0.0223388671875, -0.00156402587890625, -0.0240478515625, 0.0021514892578125, -0.0206298828125, -0.0205078125, -0.00830078125, -0.0233154296875, -0.0040283203125,...
[ 11249, 47, 45258, 67, 79315, 7, 23, 502, 4867, 15824, 3647, 11627, 7102, 48636, 42856, 33022, 9655, 1542, 454, 1326, 1193, 2046, 51, 42485, 140992, 3996, 142424, 114700, 9351 ]
[ 0.0914306640625, 0.045318603515625, 0.247314453125, 0.127685546875, 0.265625, 0.09039306640625, 0.08892822265625, 0.170654296875, 0.250244140625, 0.1612548828125, 0.12841796875, 0.09130859375, 0.052764892578125, 0.1719970703125, 0.01715087890625, 0.07135009765625, 0.0941162109375, ...
embed
70169941_c0
70169941
prolog
0
Title: What is the role of cut at the base case? Problem title: What is the role of cut at the base case? Tags: prolog-cut, prolog Problem: What is the role of cut at the base case? gcd(X,X,X):- !. gcd(X,Y,Z):- X>Y, !, Inter is X - Y, gcd(Inter, Y, Z). gcd(X,Y,Z):- Inter is Y - X, gcd(X,Inter,Z). I get the if else natu...
What is the role of cut at the base case? What is the role of cut at the base case? prolog-cut prolog What Inter What is the role of cut at the base case? I get the if else nature of the second cut but I don't understand why program just aborts with the first cut.
[ 0.01177978515625, -0.004180908203125, 0.0228271484375, 0.004058837890625, 0.0107421875, 0.0152587890625, 0.0003986358642578125, 0.00811767578125, 0.00469970703125, 0.01953125, -0.00274658203125, -0.01287841796875, -0.02001953125, -0.0147705078125, 0.016845703125, 0.004180908203125, -...
[ 4865, 83, 70, 31486, 111, 59226, 99, 3647, 7225, 502, 4867, 19774, 5337, 2174, 37076, 31425, 17932, 28219, 15400, 1528, 64853, 7, 678, 5117 ]
[ 0.0367431640625, 0.037139892578125, 0.044830322265625, 0.1719970703125, 0.10858154296875, 0.249267578125, 0.14892578125, 0.205810546875, 0.20654296875, 0.12188720703125, 0.1851806640625, 0.2081298828125, 0.129150390625, 0.053070068359375, 0.05694580078125, 0.030975341796875, 0.122070...
embed
13390922_c0
13390922
prolog
0
Title: Predicate that succeeds if two or more results are returned Problem title: Predicate that succeeds if two or more results are returned Tags: prolog Problem: Predicate that succeeds if two or more results are returned How to implement rule1 that succeeds iff rule2 returns two or more results ? rule1(X) :- rule2(X...
Predicate that succeeds if two or more results are returned Predicate that succeeds if two or more results are returned prolog Predicate rule1 rule2 Predicate that succeeds if two or more results are returned How to implement rule1 that succeeds iff rule2 returns two or more results ? How can I count the results, and t...
[ 0.01129150390625, -0.0031585693359375, -0.0218505859375, 0.0225830078125, 0.002532958984375, 0.0322265625, 0.01031494140625, -0.00860595703125, 0.0234375, -0.01458740234375, -0.00090789794921875, -0.025146484375, -0.0010986328125, 0.00201416015625, 0.01043701171875, 0.005157470703125, ...
[ 7145, 2063, 67, 450, 214493, 7, 2174, 6626, 707, 1286, 50339, 621, 176377, 502, 4867, 79986, 418, 304, 29479, 32920, 30646, 11249, 831, 54529, 70, 5423, 15440, 3229, 47 ]
[ 0.1851806640625, 0.229248046875, 0.109619140625, 0.07269287109375, 0.232421875, 0.09844970703125, 0.10052490234375, 0.1605224609375, 0.0894775390625, 0.1646728515625, 0.23388671875, 0.022247314453125, 0.21875, 0.121826171875, 0.161376953125, 0.1912841796875, 0.080810546875, 0.14636...
embed
62009376_c0
62009376
prolog
0
Title: Drawing in SWI (or any) Prolog Problem title: Drawing in SWI (or any) Prolog Tags: drawing, graphics, prolog Problem: Drawing in SWI (or any) Prolog Is it possible to draw shapes in SWI prolog? There are print statements but I haven't found anything that would let me draw rectangles like a javascript canvas. Is ...
Drawing in SWI (or any) Prolog Drawing in SWI (or any) Prolog drawing graphics prolog Drawing SWI Prolog Drawing in SWI (or any) Prolog Is it possible to draw shapes in SWI prolog? There are print statements but I haven't found anything that would let me draw rectangles like a javascript canvas. Is this something Prolo...
[ 0.0033416748046875, 0.014892578125, 0.00421142578125, 0.004730224609375, -0.01416015625, 0.006439208984375, -0.0003643035888671875, -0.0159912109375, -0.00286865234375, -0.00433349609375, 0.0167236328125, -0.0186767578125, -0.0091552734375, -0.011474609375, 0.01043701171875, -0.0010833...
[ 18186, 14775, 23, 159, 38969, 2499, 1250, 4867, 188304, 48461, 502, 442, 7722, 79442, 115700, 7, 28412, 63805, 14037, 23937, 2633, 148734, 449, 1577, 1884, 136951, 831, 4079, 228113, 87709 ]
[ 0.14306640625, 0.0955810546875, 0.09033203125, 0.07147216796875, 0.2298583984375, 0.010589599609375, 0.138916015625, 0.2357177734375, 0.1326904296875, 0.1177978515625, 0.1185302734375, 0.02374267578125, 0.119384765625, 0.1890869140625, 0.202880859375, 0.0706787109375, 0.1324462890625...
embed
69587187_c0
69587187
prolog
0
Title: Beginner Prolog, How to write transtive relation? Problem title: Beginner Prolog, How to write transtive relation? Tags: transitive-closure, prolog Problem: Beginner Prolog, How to write transtive relation? let say bigger(elephant,buffalo). bigger(buffalo,dog). bigger(dog,cat). bigger(X,Y) :- what do i write her...
Beginner Prolog, How to write transtive relation? Beginner Prolog, How to write transtive relation? transitive-closure prolog Beginner Prolog How Beginner Prolog, How to write transtive relation? let say what do i write here to establish, elephant is bigger than buffalo, buffalo is bigger than dog etc?
[ -0.00286865234375, 0.004974365234375, 0.00109100341796875, 0.020263671875, -0.0107421875, -0.0147705078125, -0.025634765625, 0.007659912109375, 0.007537841796875, -0.0230712890625, 0.00628662109375, 0.02490234375, -0.0225830078125, -0.00347900390625, 0.011962890625, 0.007415771484375, ...
[ 67053, 56, 1250, 4867, 11249, 47, 33022, 3900, 4935, 41911, 62621, 5844, 170224, 502, 3688, 137633, 3163, 68743, 18, 83, 167785, 3501, 123759, 7779, 6, 10269 ]
[ 0.09124755859375, 0.05792236328125, 0.12042236328125, 0.181640625, 0.0611572265625, 0.031890869140625, 0.2003173828125, 0.1632080078125, 0.2344970703125, 0.206787109375, 0.19921875, 0.1575927734375, 0.2054443359375, 0.1160888671875, 0.04571533203125, 0.173828125, 0.044769287109375, ...
embed
70375357_c0
70375357
prolog
0
Title: Representing truth regarding beliefs in prolog Problem title: Representing truth regarding beliefs in prolog Tags: prolog Problem: Representing truth regarding beliefs in prolog How to make this (or something similar) work in Prolog: belief(john,red(apple)). belief(peter,red(apple)). X :- belief(john,X), belief(...
Representing truth regarding beliefs in prolog Representing truth regarding beliefs in prolog prolog Representing Representing truth regarding beliefs in prolog How to make this (or something similar) work in Prolog: And get true. for the following query (while consulting above):-
[ 0.0240478515625, 0.001678466796875, 0.01165771484375, 0.0162353515625, -0.021240234375, -0.01123046875, 0.005035400390625, -0.002288818359375, -0.00531005859375, -0.028564453125, 0.0020294189453125, 0.0147705078125, -0.00537109375, -0.00128936767578125, -0.00518798828125, 0.01928710937...
[ 853, 55247, 214, 85027, 118861, 144239, 7, 502, 4867, 23, 3249, 903, 21373, 4488, 1250, 3493, 2046, 29568, 25632, 41, 1294, 75463 ]
[ 0.05078125, 0.2169189453125, 0.047088623046875, 0.2222900390625, 0.1116943359375, 0.20166015625, 0.061920166015625, 0.1324462890625, 0.2386474609375, 0.048980712890625, 0.08062744140625, 0.06390380859375, 0.05670166015625, 0.081298828125, 0.144287109375, 0.01678466796875, 0.083984375...
embed
41106353_c2
41106353
prolog
2
, whitechapel]) ? creep Redo: (13) link(surrey_docks, _G3136, east_london) ? creep Exit: (13) link(surrey_docks, new_cross, east_london) ? creep Call: (13) Code signals: Prolog, line_terminal_stations, east_london, StartsAt, EndsAt, new_cross, LineName, StationX, StationY, next_station, Redo, _G3031, _G3032, Exit, Call...
, whitechapel]) ? creep Redo: (13) link(surrey_docks, _G3136, east_london) ? creep Exit: (13) link(surrey_docks, new_cross, east_london) ? creep Call: (13) Code signals: Prolog, line_terminal_stations, east_london, StartsAt, EndsAt, new_cross, LineName, StationX, StationY, next_station, Redo, _G3031, _G3032, Exit, Call...
[ 0.01409912109375, -0.01214599609375, 0.0257568359375, 0.01708984375, -0.004638671875, 0.0076904296875, -0.00616455078125, -0.01104736328125, 0.012451171875, 0.00177001953125, -0.01116943359375, -0.0008087158203125, -0.0233154296875, 0.000705718994140625, 0.0064697265625, 0.006378173828...
[ 6, 4, 35011, 1436, 5310, 268, 16, 705, 49512, 254, 6096, 31, 12, 28261, 3126, 7102, 36840, 138414, 7, 724, 5016, 8659, 28, 4438, 4759, 4445, 5443, 217, 3525, 95665, 26265, 28864, 26073, 1250, 4867, 13315, 30524, 289, 41311, 13794, 28848...
[ 0.0704345703125, 0.031982421875, 0.1275634765625, 0.1053466796875, 0.18115234375, 0.05816650390625, 0.034149169921875, 0.06939697265625, 0.1875, 0.161865234375, 0.130126953125, 0.1890869140625, 0.08270263671875, 0.144287109375, 0.185791015625, 0.1103515625, 0.206787109375, 0.216552...
embed
74929062_c0
74929062
prolog
0
Title: How can I cast a string to integer in Visual Prolog Problem title: How can I cast a string to integer in Visual Prolog Tags: visual-prolog, prolog Problem: How can I cast a string to integer in Visual Prolog I need to cast the string received from the editControl into a integer, how can I do this? I try: toInt(S...
How can I cast a string to integer in Visual Prolog How can I cast a string to integer in Visual Prolog visual-prolog prolog How Visual Prolog How can I cast a string to integer in Visual Prolog I need to cast the string received from the editControl into a integer, how can I do this? I try: toInt(String, Int), but thi...
[ -0.00823974609375, 0.004364013671875, -0.004730224609375, 0.02880859375, 0.005035400390625, 0.036376953125, -0.00946044921875, -0.0030517578125, -0.003814697265625, -0.033203125, 0.007720947265625, -0.01318359375, -0.0296630859375, 0.0274658203125, 0.00885009765625, -0.0196533203125, ...
[ 11249, 831, 37702, 79315, 47, 892, 1505, 73372, 1250, 4867, 21176, 3454, 502, 87, 10, 23, 3871, 75204, 27211, 175904, 3934, 3642, 54, 9790, 4153, 18, 71713, 214, 360, 6403, 6259, 2886 ]
[ 0.05084228515625, 0.050872802734375, 0.1832275390625, 0.251220703125, 0.1343994140625, 0.1380615234375, 0.185302734375, 0.209716796875, 0.123291015625, 0.209716796875, 0.1563720703125, 0.079833984375, 0.096923828125, 0.011566162109375, 0.010498046875, 0.000518798828125, 0.04177856445...
embed
38729675_c0
38729675
prolog
0
Title: What does the following Prolog program do? Problem title: What does the following Prolog program do? Tags: prolog Problem: What does the following Prolog program do? What does this Prolog program do? I think it compares two variables? When I read this rule to me it says that m has a relationship to m2 if x is re...
What does the following Prolog program do? What does the following Prolog program do? prolog What Prolog What does the following Prolog program do? What does this Prolog program do? I think it compares two variables? When I read this rule to me it says that m has a relationship to m2 if x is related to y
[ -0.0045166015625, 0.00958251953125, -0.0016021728515625, 0.022705078125, 0.00909423828125, 0.029296875, -0.01251220703125, 0.00689697265625, 0.0052490234375, -0.00180816650390625, 0.01129150390625, -0.00274658203125, -0.0150146484375, -0.022216796875, 0.015869140625, 0.001434326171875,...
[ 4865, 14602, 25632, 1250, 4867, 1528, 54, 502, 903, 5351, 442, 69101, 6626, 77336, 12301, 79986, 347, 1556, 76755, 304, 2174, 1022, 62548, 47, 113 ]
[ 0.07861328125, 0.056488037109375, 0.166015625, 0.2188720703125, 0.3125, 0.209716796875, 0.1004638671875, 0.1712646484375, 0.0249786376953125, 0.0240020751953125, 0.036163330078125, 0.1756591796875, 0.033447265625, 0.1983642578125, 0.022125244140625, 0.12066650390625, 0.09783935546875...
embed
46774561_c0
46774561
prolog
0
Title: Prolog With Lists Problem title: Prolog With Lists Tags: list, prolog Problem: Prolog With Lists I received this problem and I can't get it done, I don't know what I've done wrong, can someone help me ? Write a predicate to add a value v after 1-st, 2-nd, 4-th, 8-th, … element in a list. % add(L:list, E:Number, ...
Prolog With Lists Prolog With Lists list prolog Prolog Lists L:list E:Number P:Number C:number H:List Prolog With Lists I received this problem and I can't get it done, I don't know what I've done wrong, can someone help me ?
[ -0.0096435546875, 0.00897216796875, -0.010498046875, 0.00872802734375, -0.01171875, 0.0167236328125, -0.0244140625, -0.007293701171875, 0.0245361328125, -0.0233154296875, 0.029052734375, -0.003692626953125, -0.0126953125, 0.006561279296875, 0.00836181640625, -0.0081787109375, 0.01306...
[ 1250, 4867, 17106, 32036, 7, 5303, 502, 339, 12, 6562, 241, 18444, 26278, 436, 313, 2606, 1297, 572, 154663, 75204, 903, 2967, 831, 18, 2046, 442, 16940, 3714, 272, 44691, 22008, 4358, 163 ]
[ 0.19384765625, 0.27294921875, 0.2000732421875, 0.277099609375, 0.046478271484375, 0.1817626953125, 0.126708984375, 0.1029052734375, 0.042083740234375, 0.2154541015625, 0.092529296875, 0.093994140625, 0.043853759765625, 0.0572509765625, 0.038116455078125, 0.0914306640625, 0.0223388671...
embed
33184434_c0
33184434
prolog
0
Title: SWI-Prolog CLPFD Problem title: SWI-Prolog CLPFD Tags: prolog, clpfd Problem: SWI-Prolog CLPFD I'm new to prolog for constraint programming. I have an issue with CLPFD not reducing a domain as I expect it to. This is probably really simple. [A,B] ins 1..5,A*B#=5. I expect it to reduce the domain of A and B to 1\...
SWI-Prolog CLPFD SWI-Prolog CLPFD prolog clpfd SWI-Prolog CLPFD SWI-Prolog CLPFD I'm new to prolog for constraint programming. I have an issue with CLPFD not reducing a domain as I expect it to. This is probably really simple. I expect it to reduce the domain of A and B to But it just gives Any suggestions would be app...
[ 0.00897216796875, -0.0017547607421875, 0.019287109375, 0.0257568359375, -0.01171875, -0.0020904541015625, -0.0179443359375, -0.009765625, -0.00152587890625, -0.038330078125, 0.002349853515625, -0.001129150390625, -0.00127410888671875, 0.0146484375, 0.000591278076171875, -0.000326156616...
[ 159, 38969, 10752, 4867, 46323, 41265, 397, 502, 33139, 39557, 71, 3525, 47, 158, 2816, 4288, 56037, 449, 31089, 959, 241866, 77758, 237, 41206, 31895, 6183, 8781, 34390, 62, 136, 335, 76199, 157666, 77947 ]
[ 0.05023193359375, 0.2215576171875, 0.1337890625, 0.2318115234375, 0.1414794921875, 0.1790771484375, 0.2205810546875, 0.14111328125, 0.0633544921875, 0.1214599609375, 0.0975341796875, 0.07269287109375, 0.0638427734375, 0.021759033203125, 0.1383056640625, 0.04510498046875, 0.1187744140...
embed
61112262_c0
61112262
prolog
0
Title: Prolog getting the maximum out of a collection Problem title: Prolog getting the maximum out of a collection Tags: prolog Problem: Prolog getting the maximum out of a collection This is a simple question. has(steve, 5). has(mark, 6). has(craig, 4). How do you get who has the most from this in Prolog? I have trie...
Prolog getting the maximum out of a collection Prolog getting the maximum out of a collection prolog Prolog Who Max Prolog getting the maximum out of a collection This is a simple question. How do you get who has the most from this in Prolog? I have tried has(Who, Max) but that doesn't help. Is there an operator that c...
[ 0.0162353515625, 0.0052490234375, 0.024169921875, 0.00135040283203125, -0.0098876953125, -0.0008087158203125, -0.005401611328125, 0.014892578125, 0.00714111328125, -0.045654296875, 0.004730224609375, -0.0040283203125, 0.00445556640625, -0.022705078125, 0.01458740234375, -0.013244628906...
[ 1250, 4867, 20949, 70, 38132, 1810, 111, 42486, 502, 40469, 9920, 8781, 9655, 2046, 2750, 1556, 2684, 1295, 903, 23, 37842, 497, 4358, 39933, 11814 ]
[ 0.1724853515625, 0.263671875, 0.0927734375, 0.0740966796875, 0.21533203125, 0.12445068359375, 0.0296478271484375, 0.224365234375, 0.09405517578125, 0.08905029296875, 0.21728515625, 0.037078857421875, 0.0135955810546875, 0.087646484375, 0.0997314453125, 0.12188720703125, 0.18444824218...
embed