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
35965062_c0
35965062
prolog
0
Title: Extracting element from nested lists Problem title: Extracting element from nested lists Tags: prolog, nested-lists, list Problem: Extracting element from nested lists I know that to extract the third element from a simple list containing four elements such as [1,2,3,4] I would do so as below. third([_,_,E,_], E...
Extracting element from nested lists Extracting element from nested lists prolog nested-lists list nested Extracting Extracting element from nested lists I know that to extract the third element from a simple list containing four elements such as [1,2,3,4] I would do so as below. I would like to extract the third eleme...
[ -0.014892578125, 0.00555419921875, -0.002655029296875, -0.0093994140625, 0.00921630859375, 0.020263671875, -0.00078582763671875, 0.0045166015625, 0.004425048828125, -0.010498046875, -0.0025787353515625, -0.038330078125, -0.0225830078125, 0.02001953125, -0.02294921875, 0.0008544921875, ...
[ 31501, 238, 1916, 12830, 1295, 8512, 71, 5303, 502, 4867, 6562, 3714, 47, 125663, 50960, 8781, 70541, 22759, 80854, 133063, 82449, 2806, 54, 237, 35064, 1884, 70, 21115, 27781, 2174, 1902, 104629, 136005, 1126, 963, 1662, 1530, 3444, 142, ...
[ 0.18994140625, 0.09716796875, 0.0280303955078125, 0.2156982421875, 0.1064453125, 0.2486572265625, 0.1627197265625, 0.224609375, 0.1131591796875, 0.1492919921875, 0.19873046875, 0.03338623046875, 0.008636474609375, 0.243896484375, 0.2626953125, 0.1597900390625, 0.05413818359375, 0.1...
embed
33222880_c0
33222880
prolog
0
Title: Calculate sphere volume in Prolog Problem title: Calculate sphere volume in Prolog Tags: prolog Problem: Calculate sphere volume in Prolog How can I calculate sphere volume in Prolog? I have such code: area(R,P):-P is 3.14 * R *R. vol(R,P,V):-V is 4/3 * R * area(R,P). I'm getting such an error trying to compile ...
Calculate sphere volume in Prolog Calculate sphere volume in Prolog prolog Calculate Prolog Calculate sphere volume in Prolog How can I calculate sphere volume in Prolog? I have such code: I'm getting such an error trying to compile the above code: What's wrong in this code, does it mean that I can't use one predicate ...
[ -0.004974365234375, 0.01507568359375, -0.00616455078125, 0.016845703125, -0.01708984375, -0.00011539459228515625, 0.00286865234375, 0.003509521484375, -0.00927734375, -0.01409912109375, 0.003936767578125, 0.01611328125, -0.01171875, -0.0107421875, 0.02783203125, 0.0294189453125, 0.00...
[ 212467, 2182, 157695, 21950, 23, 1250, 4867, 502, 831, 74481, 67, 18151, 6044, 18499, 31577, 9969, 1340, 44691, 4527, 1632, 1653, 2063, 46132, 15700, 3454 ]
[ 0.192138671875, 0.0621337890625, 0.2427978515625, 0.240966796875, 0.05902099609375, 0.1490478515625, 0.2388916015625, 0.09991455078125, 0.003875732421875, 0.1856689453125, 0.07000732421875, 0.1192626953125, 0.00775146484375, 0.1187744140625, 0.012603759765625, 0.04534912109375, 0.021...
embed
47844402_c0
47844402
prolog
0
Title: Prolog recursion loops forever Problem title: Prolog recursion loops forever Tags: recursion, prolog Problem: Prolog recursion loops forever inside(a,b). inside(a,c). inside(b,d). r_inside(X,Y) :- inside(X,Y). r_inside(X,Y) :- inside(X,Z), r_inside(Z,Y). the codes above works fine, when I try to find anything in...
Prolog recursion loops forever Prolog recursion loops forever recursion prolog Prolog r_inside Prolog recursion loops forever the codes above works fine, when I try to find anything inside a with: r_inside(a,X). I got X=b,c,d, that is right. but if I change the last line of code to be: then I type: r_inside(a,X), the p...
[ 0.00823974609375, 0.0081787109375, 0.005126953125, 0.0123291015625, -0.007080078125, -0.00089263916015625, 0.0035552978515625, 0.00063323974609375, 0.0137939453125, -0.038330078125, 0.018798828125, -0.000850677490234375, -0.005767822265625, 0.0042724609375, 0.04833984375, 0.00373840332...
[ 1250, 4867, 195625, 1830, 40956, 136993, 502, 1690, 73, 8752, 7, 18151, 36917, 43240, 5885, 9790, 7413, 23937, 46132, 10, 678, 11, 1542, 1193, 71, 7108, 1284, 15549, 4568, 13315, 111, 10644, 1528, 15400 ]
[ 0.1669921875, 0.2392578125, 0.207763671875, 0.063232421875, 0.236328125, 0.2076416015625, 0.095703125, 0.1317138671875, 0.093505859375, 0.1737060546875, 0.105224609375, 0.1326904296875, 0.03204345703125, 0.06182861328125, 0.021484375, 0.043731689453125, 0.1390380859375, 0.062683105...
embed
40686973_c1
40686973
prolog
1
(name,Y) return Y=blue as a solution, however it also asks for user input. calls to red(name) or color(name, red) still ask the user for input. they should instead immediately return "false" because color(name,blue) is known and "blue" is not equal to "red". I understand that for this particular example, it may make mo...
(name,Y) return Y=blue as a solution, however it also asks for user input. calls to red(name) or color(name, red) still ask the user for input. they should instead immediately return "false" because color(name,blue) is known and "blue" is not equal to "red". I understand that for this particular example, it may make mo...
[ -0.0057373046875, -0.00799560546875, 0.00836181640625, 0.03125, -0.00579833984375, 0.0177001953125, -0.015869140625, -0.01068115234375, 0.0027313232421875, 0.0255126953125, 0.0035858154296875, 0.0181884765625, -0.01239013671875, 0.01544189453125, 0.00970458984375, 0.00592041015625, -...
[ 11627, 1723, 30646, 990, 1369, 143802, 29806, 49903, 2843, 26458, 100, 38937, 107730, 11782, 47, 4842, 10576, 7464, 5608, 64457, 109312, 8710, 184, 58, 83, 51529, 959, 105950, 2822, 28219, 27781, 442, 1286, 10422, 39580, 23, 10, 8026, 17721...
[ 0.140380859375, 0.1641845703125, 0.1864013671875, 0.172607421875, 0.031280517578125, 0.2236328125, 0.1580810546875, 0.02264404296875, 0.0253143310546875, 0.140625, 0.089599609375, 0.16845703125, 0.193359375, 0.17333984375, 0.04339599609375, 0.14990234375, 0.1676025390625, 0.0715332...
embed
57006348_c2
57006348
prolog
2
,Len2,SubTree)) ; Len2-SubTree=Len-Tree ). I used findall as suggested in order to combine all the answers given and I think that part is correct as I have written it. Then I used Code signals: Checking, Lista, Listb, same_ending, Tree, N-Len-Last, atom_chars, Digs, RDigs, same_ending1, Fin, Lens, pow2, Res1, Res, Res1...
,Len2,SubTree)) ; Len2-SubTree=Len-Tree ). I used findall as suggested in order to combine all the answers given and I think that part is correct as I have written it. Then I used Code signals: Checking, Lista, Listb, same_ending, Tree, N-Len-Last, atom_chars, Digs, RDigs, same_ending1, Fin, Lens, pow2, Res1, Res, Res1...
[ -0.004638671875, 0.017333984375, -0.0020599365234375, 0.01544189453125, -0.0030059814453125, 0.01300048828125, -0.023193359375, 0.01220703125, 0.00811767578125, -0.0478515625, 0.00064849853515625, -0.01226806640625, 0.036865234375, 0.0018157958984375, 0.00095367431640625, 0.00637817382...
[ 4, 866, 33, 304, 96472, 62731, 13, 16, 2819, 18226, 18504, 1369, 9, 194, 11814, 7413, 5584, 42459, 12989, 47, 70163, 756, 70, 35166, 7, 5351, 2831, 26785, 5, 87, 28864, 26073, 12, 38679, 214, 50085, 32036, 275, 5701, 6238, 101344, 541...
[ 0.041412353515625, 0.1387939453125, 0.216796875, 0.2161865234375, 0.2056884765625, 0.265380859375, 0.1243896484375, 0.03173828125, 0.06927490234375, 0.2349853515625, 0.1995849609375, 0.0733642578125, 0.043731689453125, 0.051727294921875, 0.1199951171875, 0.166015625, 0.1988525390625,...
embed
75099389_c0
75099389
prolog
0
Title: Prolog Problems with inquiries Problem title: Prolog Problems with inquiries Tags: prolog Problem: Prolog Problems with inquiries I'm doing inquiries in Prolog, this is the answer. X Y brasil chile argentina uruguay uruguay argentina chile brasil But I need the answer to be X Y brasil chile uruguay argentina Thi...
Prolog Problems with inquiries Prolog Problems with inquiries prolog Prolog Problems limita_con Prolog Problems with inquiries I'm doing inquiries in Prolog, this is the answer. X Y brasil chile argentina uruguay uruguay argentina chile brasil But I need the answer to be X Y brasil chile uruguay argentina This is the c...
[ 0.010986328125, -0.006195068359375, 0.01904296875, 0.01129150390625, -0.0027313232421875, -0.004638671875, -0.025390625, -0.001220703125, 0.0172119140625, -0.0262451171875, 0.0244140625, 0.0045166015625, -0.00567626953125, 0.00738525390625, 0.0029754638671875, 0.002716064453125, 0.02...
[ 1250, 4867, 15649, 678, 23, 3181, 10484, 502, 25261, 2271, 20594, 903, 83, 70, 35166, 1193, 990, 101450, 1658, 133, 192182, 2780, 24031, 3337, 4966, 3871, 47, 186, 3293, 18151 ]
[ 0.17333984375, 0.267333984375, 0.1683349609375, 0.069580078125, 0.130859375, 0.2144775390625, 0.18603515625, 0.09429931640625, 0.242919921875, 0.175537109375, 0.060791015625, 0.037109375, 0.044525146484375, 0.039306640625, 0.22216796875, 0.113525390625, 0.189697265625, 0.1889648437...
embed
66514010_c0
66514010
prolog
0
Title: Prolog - How to replace certain words in a list Problem title: Prolog - How to replace certain words in a list Tags: prolog Problem: Prolog - How to replace certain words in a list I have the following prolog predicate: processWords([hello, my, name, is, Simon], Result). I need to know how I could get: Result = ...
Prolog - How to replace certain words in a list Prolog - How to replace certain words in a list prolog Prolog How Simon Result Ben Prolog - How to replace certain words in a list I have the following prolog predicate: I need to know how I could get: How would I recurse through the list and return a string that replaces...
[ -0.006256103515625, -0.01129150390625, -0.0074462890625, 0.028564453125, 0.007232666015625, 0.00872802734375, 0.007568359375, 0.0084228515625, 0.01373291015625, 0.004638671875, -0.0009002685546875, -0.004852294921875, -0.01116943359375, -0.022705078125, 0.01953125, 0.030029296875, 0....
[ 1250, 4867, 11249, 47, 91995, 24233, 34153, 23, 5303, 10, 502, 26328, 126684, 3419, 25632, 1653, 2063, 3871, 3714, 3642, 5809, 2046, 2806, 195625, 13, 8305, 30646, 79315, 127, 13817, 678, 1272, 136, 133620, 191, 45901, 17368, 4358, 77947 ]
[ 0.1700439453125, 0.2481689453125, 0.09051513671875, 0.0594482421875, 0.20166015625, 0.1026611328125, 0.1995849609375, 0.0791015625, 0.2138671875, 0.0236663818359375, 0.1378173828125, 0.268310546875, 0.223388671875, 0.2021484375, 0.0052490234375, 0.0706787109375, 0.06903076171875, 0...
embed
46555758_c0
46555758
prolog
0
Title: Prolog - Accessing list variable from a nth0/3 Problem title: Prolog - Accessing list variable from a nth0/3 Tags: prolog Problem: Prolog - Accessing list variable from a nth0/3 Consider the following case: card([a,b,c,d,e]). How can I access this list, in a new nth0/3 function without redefining the list elemen...
Prolog - Accessing list variable from a nth0/3 Prolog - Accessing list variable from a nth0/3 prolog a Prolog Accessing nth0 Prolog - Accessing list variable from a nth0/3 Consider the following case: How can I access this list, in a new nth0/3 function without redefining the list elements in it? Example: I tried looki...
[ 0.00592041015625, -0.0029449462890625, 0.00787353515625, -0.01123046875, 0.00750732421875, 0.000949859619140625, 0.0096435546875, 0.018310546875, 0.014892578125, -0.029296875, 0.00982666015625, 0.002105712890625, -0.01129150390625, -0.01031494140625, -0.002716064453125, -0.014587402343...
[ 1250, 4867, 40266, 214, 5303, 77336, 1295, 653, 927, 2389, 18113, 502, 137399, 831, 17203, 903, 3525, 32354, 15490, 456, 49919, 70, 80854, 37842, 16487, 1118, 756, 61924, 68034, 7722, 54, 1884, 3642 ]
[ 0.1522216796875, 0.250244140625, 0.166748046875, 0.000091552734375, 0.2119140625, 0.223876953125, 0.067138671875, 0.08544921875, 0.158203125, 0.1844482421875, 0.220947265625, 0.1170654296875, 0.01007080078125, 0.000457763671875, 0.19287109375, 0.046722412109375, 0.0657958984375, 0....
embed
4120347_c0
4120347
prolog
0
Title: How to write a square bracket in prolog? Problem title: How to write a square bracket in prolog? Tags: grammar, prolog, dcg, context-free-grammar Problem: How to write a square bracket in prolog? This may sound strange, but it is used in a parser, I want to be able to parse something of the form foo[bar] So this...
How to write a square bracket in prolog? How to write a square bracket in prolog? grammar prolog dcg context-free-grammar How How to write a square bracket in prolog? This may sound strange, but it is used in a parser, I want to be able to parse something of the form So this would be represented in a list as: The probl...
[ 0.0107421875, -0.0037689208984375, -0.0091552734375, -0.01263427734375, 0.00171661376953125, -0.0002918243408203125, -0.0162353515625, 0.0020294189453125, 0.00799560546875, -0.015869140625, -0.0089111328125, 0.00811767578125, -0.017578125, -0.0027313232421875, -0.006195068359375, -0.00...
[ 11249, 47, 33022, 10, 108047, 1620, 27853, 23, 502, 4867, 122092, 147, 177, 43701, 32087, 107415, 45730, 114453, 11814, 366, 2189, 3444, 184, 3173, 33636, 5303, 237, 2967, 70488, 62816 ]
[ 0.074951171875, 0.0218048095703125, 0.1641845703125, 0.027618408203125, 0.218017578125, 0.1927490234375, 0.2174072265625, 0.04205322265625, 0.1484375, 0.2137451171875, 0.0165863037109375, 0.0140228271484375, 0.010406494140625, 0.0770263671875, 0.03851318359375, 0.0170135498046875, 0....
embed
25428319_c0
25428319
prolog
0
Title: How do I set the last modified date of a file in Prolog? Problem title: How do I set the last modified date of a file in Prolog? Tags: prolog, swi-prolog Problem: How do I set the last modified date of a file in Prolog? I only find a predicate time_file/2 to access the last modified date of a file. time_file(+Fi...
How do I set the last modified date of a file in Prolog? How do I set the last modified date of a file in Prolog? prolog swi-prolog How Prolog How do I set the last modified date of a file in Prolog? I only find a predicate time_file/2 to access the last modified date of a file. How could I explicitly set the last modi...
[ 0.006134033203125, 0.0220947265625, 0.0272216796875, 0.00921630859375, -0.0103759765625, -0.012939453125, -0.0177001953125, 0.015869140625, -0.0081787109375, 0.0028533935546875, 0.000904083251953125, 0.00567626953125, -0.00830078125, -0.005462646484375, 0.01409912109375, 0.001083374023...
[ 11249, 87, 5423, 4568, 73197, 297, 5622, 11435, 23, 1250, 4867, 54, 502, 2452, 3454, 7413, 1653, 2063, 1733, 29822, 12477, 17203, 143726, 144573, 47, 34292 ]
[ 0.048919677734375, 0.03448486328125, 0.154052734375, 0.1331787109375, 0.173828125, 0.07470703125, 0.15087890625, 0.157958984375, 0.056427001953125, 0.166259765625, 0.2303466796875, 0.03302001953125, 0.0875244140625, 0.089599609375, 0.09130859375, 0.04058837890625, 0.061920166015625, ...
embed
58399440_c3
58399440
prolog
3
3,Y4,y,Y6,Y7,Y8,Y9],[G1,G2,G3,G4,g,G6,G7,G8,G9]], [[W7,W4,W1,W8,w,W2,W9,W6,W3],[B1,B2,B3,R4,r,R6,R7,R8,R9],[O1,O2,O3,B4,b,B6,B7,B8,B9],[G9,G8,G7,O4,o,O6,O7,O8,O9],[Y1,Y2,Y3,Y4,y,Y6,Y7,Y8,Y9],[G1,G2,G3,G4,g,G6,R3,R2,R1]]). m_d([[W1,W2,W3,W4,w,W6,W7,W8,W9],[R1,R2,R3,R4,r,R6,R7,R8,R9],[B1,B2,B3,B4,b,B6,B7,B8,B9],[O1,O2,O3...
3,Y4,y,Y6,Y7,Y8,Y9],[G1,G2,G3,G4,g,G6,G7,G8,G9]], [[W7,W4,W1,W8,w,W2,W9,W6,W3],[B1,B2,B3,R4,r,R6,R7,R8,R9],[O1,O2,O3,B4,b,B6,B7,B8,B9],[G9,G8,G7,O4,o,O6,O7,O8,O9],[Y1,Y2,Y3,Y4,y,Y6,Y7,Y8,Y9],[G1,G2,G3,G4,g,G6,R3,R2,R1]]). m_d([[W1,W2,W3,W4,w,W6,W7,W8,W9],[R1,R2,R3,R4,r,R6,R7,R8,R9],[B1,B2,B3,B4,b,B6,B7,B8,B9],[O1,O2,O3...
[ 0.00970458984375, 0.00038909912109375, -0.01318359375, 0.02490234375, -0.00182342529296875, 0.01300048828125, -0.000621795654296875, -0.00933837890625, 0.00787353515625, -0.00007343292236328125, 0.0031890869140625, -0.01708984375, 0.021484375, -0.0033416748046875, -0.0140380859375, -0....
[ 138, 4, 1723, 617, 53, 910, 966, 1019, 1126, 268, 1065, 724, 418, 304, 363, 177, 86245, 110558, 1456, 434, 96386, 571, 1052, 42, 670, 194, 347, 454, 71, 132, 28864, 26073, 12, 4527, 83279, 28412, 4086, 44816, 1218, 379, 34, 3003, 37...
[ 0.2086181640625, 0.107666015625, 0.1453857421875, 0.19970703125, 0.10064697265625, 0.1654052734375, 0.1241455078125, 0.1568603515625, 0.209716796875, 0.109375, 0.029998779296875, 0.1246337890625, 0.0867919921875, 0.074951171875, 0.1051025390625, 0.10284423828125, 0.1142578125, 0.08...
embed
4615258_c0
4615258
prolog
0
Title: prolog problem; displaying same rank universities Problem title: prolog problem; displaying same rank universities Tags: prolog Problem: prolog problem; displaying same rank universities Sorry for the blunt title, but couldn't really generalize the question. Hope someone with Prolog experience can help me out he...
prolog problem; displaying same rank universities prolog problem; displaying same rank universities prolog prolog problem; displaying same rank universities Sorry for the blunt title, but couldn't really generalize the question. Hope someone with Prolog experience can help me out here. So I've got a database which basi...
[ 0.015625, -0.012451171875, 0.00592041015625, -0.0079345703125, -0.021728515625, -0.0130615234375, 0.0074462890625, -0.013671875, 0.01348876953125, -0.023681640625, 0.01953125, 0.006591796875, 0.01116943359375, -0.041748046875, -0.03515625, 0.01495361328125, -0.00616455078125, 0.008...
[ 502, 4867, 2967, 44116, 214, 5701, 30648, 141626, 90, 90502, 41725, 44759, 75359, 1250, 16981, 4358, 4163, 63399, 198343, 5303, 36, 425, 13534, 27750, 1631, 44726, 40970, 9655, 144570, 33022, 79986, 30646, 756, 70, 123055, 111, 450, 765, 12...
[ 0.1343994140625, 0.217529296875, 0.1810302734375, 0.1468505859375, 0.028289794921875, 0.162353515625, 0.2303466796875, 0.2032470703125, 0.0416259765625, 0.007904052734375, 0.006317138671875, 0.0261077880859375, 0.00018310546875, 0.116455078125, 0.0496826171875, 0.04364013671875, 0.01...
embed
11837414_c0
11837414
prolog
0
Title: prolog constraints Problem title: prolog constraints Tags: prolog, constraint-programming Problem: prolog constraints I have the function test(X, Y, Z) :- { Z = Y+X },!. When i run the queries test(1,X,8), test(X,4,8), test(1,5,X) I am able to get a value for X, but if i do test(X, Y, Z) :- { Z = Y**X },!. I get...
prolog constraints prolog constraints prolog constraint-programming prolog constraints I have the function When i run the queries I am able to get a value for X, but if i do I get errors for each query similar to Unhandled exception: Unknown message: type_error(nf(_G353**1,_G351),1,a numeric expression,_G353**1) I trie...
[ 0.0145263671875, -0.0107421875, -0.003570556640625, -0.0036163330078125, 0.0225830078125, 0.002288818359375, -0.0269775390625, 0.0019989013671875, 0.005584716796875, -0.041015625, 0.000560760498046875, 0.00653076171875, -0.02001953125, -0.0198974609375, 0.0205078125, 0.0191650390625, ...
[ 502, 4867, 158, 2816, 4288, 28966, 765, 32354, 11675, 41, 10484, 19048, 2046, 34292, 100, 1193, 18499, 12638, 1294, 21373, 992, 79628, 71, 131527, 69723, 26008, 10644, 188800, 420, 127875, 25442, 418, 163151, 54744, 125195, 17727, 39933, 4488...
[ 0.1383056640625, 0.2452392578125, 0.06072998046875, 0.16162109375, 0.1058349609375, 0.0853271484375, 0.038238525390625, 0.158935546875, 0.077880859375, 0.10986328125, 0.078125, 0.05963134765625, 0.04925537109375, 0.1348876953125, 0.008758544921875, 0.0859375, 0.1787109375, 0.075561...
embed
27083846_c0
27083846
prolog
0
Title: Finding the binary tree height using Prolog Problem title: Finding the binary tree height using Prolog Tags: logic, prolog Problem: Finding the binary tree height using Prolog I am trying to code the binary tree height problem but the Prolog returns false instead of height value. My code is : height( nil, 0 ). h...
Finding the binary tree height using Prolog Finding the binary tree height using Prolog logic prolog Prolog Finding H-1 RES Finding the binary tree height using Prolog I am trying to code the binary tree height problem but the Prolog returns false instead of height value. My code is : A simple sample code that returns ...
[ 0.0272216796875, 0.0146484375, 0.004486083984375, -0.0093994140625, 0.00008106231689453125, -0.005706787109375, -0.017822265625, -0.00390625, -0.00958251953125, -0.048583984375, 0.00171661376953125, -0.031982421875, -0.004302978515625, 0.00750732421875, 0.035400390625, -0.0052795410156...
[ 26040, 2394, 6635, 53201, 155955, 17368, 1250, 4867, 62775, 502, 572, 5759, 61661, 31577, 18151, 2967, 30646, 98320, 64457, 34292, 8781, 121413, 106 ]
[ 0.076904296875, 0.1373291015625, 0.111083984375, 0.2139892578125, 0.224853515625, 0.0301666259765625, 0.14306640625, 0.2232666015625, 0.1260986328125, 0.079833984375, 0.08349609375, 0.1126708984375, 0.11474609375, 0.00720977783203125, 0.126220703125, 0.10284423828125, 0.1166381835937...
embed
26463516_c0
26463516
prolog
0
Title: Use String in SWI Prolog Problem title: Use String in SWI Prolog Tags: swi-prolog, string, prolog Problem: Use String in SWI Prolog I'm a little bit confused. I would like to use the split_string function which can be seen here . But I just don't know how to import or use this function. Do I have this pl File al...
Use String in SWI Prolog Use String in SWI Prolog swi-prolog string prolog Use SWI Prolog Use String in SWI Prolog I'm a little bit confused. I would like to use the split_string function which can be seen here . But I just don't know how to import or use this function. Do I have this pl File already on my PC? I can on...
[ 0.00023651123046875, 0.00225830078125, 0.00107574462890625, 0.026611328125, -0.038330078125, 0.01220703125, 0.01904296875, 0.00341796875, -0.001983642578125, -0.044677734375, 0.00970458984375, -0.0185546875, -0.0284423828125, 0.00341796875, 0.0147705078125, -0.00506591796875, 0.00354...
[ 36836, 23351, 214, 23, 159, 38969, 1250, 4867, 91, 2452, 3454, 79315, 502, 10176, 55681, 1884, 4527, 65450, 454, 91693, 32354, 51592, 3714, 3642, 24927, 903, 6456, 42724, 21771, 6107, 7413, 2424, 313, 148968, 2844, 3390, 8996, 1883, 31, 2...
[ 0.1378173828125, 0.26025390625, 0.195556640625, 0.07958984375, 0.08984375, 0.238525390625, 0.1458740234375, 0.196533203125, 0.0267181396484375, 0.1881103515625, 0.10430908203125, 0.2398681640625, 0.1177978515625, 0.00762939453125, 0.0325927734375, 0.0360107421875, 0.132568359375, 0...
embed
13489591_c0
13489591
prolog
0
Title: Prolog, operations with files Problem title: Prolog, operations with files Tags: prolog Problem: Prolog, operations with files As input data I have a file containing 100 lines. On each line I have a number followed by dot. I need to print into another file the sorted numbers increasingly. I know reading from a f...
Prolog, operations with files Prolog, operations with files prolog Prolog Prolog, operations with files As input data I have a file containing 100 lines. On each line I have a number followed by dot. I need to print into another file the sorted numbers increasingly. I know reading from a file and printing into a file w...
[ 0.0159912109375, -0.003936767578125, 0.00372314453125, -0.0269775390625, 0.00238037109375, 0.0159912109375, -0.000377655029296875, -0.00067901611328125, -0.0059814453125, -0.0159912109375, -0.00970458984375, 0.0147705078125, -0.0177001953125, -0.0172119140625, 0.0054931640625, -0.02087...
[ 1250, 4867, 41018, 678, 102158, 7, 502, 107730, 2053, 87, 765, 11435, 70541, 805, 124519, 2161, 12638, 13315, 14012, 134629, 20633, 3871, 47, 28412, 3934, 15700, 17497, 71, 101935, 118055, 3714, 16454, 1295, 2448, 1957, 136, 14192, 1284, 83...
[ 0.173095703125, 0.2371826171875, 0.1890869140625, 0.1483154296875, 0.1947021484375, 0.0166473388671875, 0.13720703125, 0.132080078125, 0.09619140625, 0.013092041015625, 0.0233917236328125, 0.1832275390625, 0.060394287109375, 0.165771484375, 0.140380859375, 0.004730224609375, 0.079345...
embed
62164694_c0
62164694
prolog
0
Title: Globalization of large arrays in Prolog Problem title: Globalization of large arrays in Prolog Tags: prolog, arrays, swi-prolog, global Problem: Globalization of large arrays in Prolog I was wondering if there is a way to create global arrays in Swi-Prolog . From my understanding , GNU Prolog provides this possi...
Globalization of large arrays in Prolog Globalization of large arrays in Prolog prolog arrays swi-prolog global Globalization Prolog Globalization of large arrays in Prolog I was wondering if there is a way to create global arrays in Swi-Prolog . From my understanding , GNU Prolog provides this possibility with g_array...
[ 0.023681640625, 0.0113525390625, 0.0028533935546875, -0.00106048583984375, 0.0002231597900390625, -0.00360107421875, -0.0052490234375, 0.00811767578125, -0.006591796875, -0.0257568359375, 0.0277099609375, 0.00872802734375, -0.01483154296875, -0.021240234375, 0.02294921875, -0.001937866...
[ 13453, 47691, 21334, 10298, 4778, 23, 1250, 4867, 502, 91, 2452, 3454, 7964, 149016, 10, 3917, 47, 28282, 105432, 9, 10752, 100094, 165132, 87344, 903, 207116, 678, 706, 454, 19305, 53, 31577, 1528, 4527, 4552, 7477, 18770, 452, 171859, 1...
[ 0.218017578125, 0.1719970703125, 0.10101318359375, 0.212890625, 0.2039794921875, 0.050048828125, 0.17236328125, 0.258056640625, 0.119384765625, 0.030029296875, 0.165283203125, 0.13916015625, 0.2305908203125, 0.04364013671875, 0.010040283203125, 0.08056640625, 0.0169677734375, 0.149...
embed
42747730_c0
42747730
prolog
0
Title: Prolog how to compare (&gt;, &lt;) two strings? Problem title: Prolog how to compare (&gt;, &lt;) two strings? Tags: prolog Problem: Prolog how to compare (>, <) two strings? I have a several facts in prolog and i want to show them in alphabetical order (by author). I use book(name_of_book, author). book('some t...
Prolog how to compare (&gt;, &lt;) two strings? Prolog how to compare (&gt;, &lt;) two strings? prolog Prolog CSome ASome Prolog how to compare (>, <) two strings? I have a several facts in prolog and i want to show them in alphabetical order (by author). I use book(name_of_book, author). and result need to be: 'ASome ...
[ 0.018798828125, -0.00396728515625, 0.0167236328125, 0.0115966796875, -0.0145263671875, 0.0025634765625, 0.00897216796875, -0.0015411376953125, 0.0125732421875, -0.014404296875, 0.01708984375, 0.01226806640625, -0.0240478515625, -0.01806640625, 0.0185546875, -0.029296875, -0.006652832...
[ 1250, 4867, 3642, 47, 69101, 1230, 5386, 74, 619, 1277, 6626, 79315, 7, 502, 13450, 6483, 2740, 4, 4426, 16, 15824, 3444, 7639, 229231, 12989, 1272, 42179, 12877, 11627, 4390, 14137, 16750, 9713, 19283, 225876, 4358, 32354 ]
[ 0.1507568359375, 0.252197265625, 0.07049560546875, 0.07171630859375, 0.2308349609375, 0.042938232421875, 0.150634765625, 0.03326416015625, 0.05517578125, 0.126953125, 0.108154296875, 0.2169189453125, 0.060516357421875, 0.14404296875, 0.2103271484375, 0.01416015625, 0.173095703125, ...
embed
3390633_c0
3390633
prolog
0
Title: built predicate into prolog Problem title: built predicate into prolog Tags: prolog Problem: built predicate into prolog input = * value = 3 output = ***(3 star) use prolog to write out the coding when key in value is 3 than the output is *** (3star) or when key in value is 5 than output is ***** (5 star). so i ...
built predicate into prolog built predicate into prolog prolog end_of_file built predicate into prolog use prolog to write out the coding when key in value is 3 than the output is *** (3star) or when key in value is 5 than output is ***** (5 star). so i want to ask what are the coding in prolog for this question. my an...
[ 0.002349853515625, -0.01513671875, -0.000537872314453125, -0.004150390625, -0.006011962890625, 0.030029296875, -0.002685546875, 0.003997802734375, 0.01129150390625, 0.0019683837890625, 0.0130615234375, 0.00396728515625, -0.0118408203125, -0.01300048828125, 0.01324462890625, -0.00592041...
[ 88303, 1653, 2063, 67, 3934, 502, 4867, 3564, 4390, 29822, 4527, 33022, 1810, 552, 6238, 3229, 22799, 23, 34292, 138, 3501, 140992, 24428, 6896, 5613, 190, 164802, 11516, 6057, 3444, 26458, 2367, 621, 70, 35166, 35064, 53418, 9969, 1340, ...
[ 0.20751953125, 0.1727294921875, 0.2049560546875, 0.0989990234375, 0.142822265625, 0.1689453125, 0.252197265625, 0.12255859375, 0.1083984375, 0.15576171875, 0.0242919921875, 0.09857177734375, 0.06390380859375, 0.1796875, 0.1822509765625, 0.033843994140625, 0.1629638671875, 0.0887451...
embed
5982693_c0
5982693
prolog
0
Title: How to make a list of lists in prolog Problem title: How to make a list of lists in prolog Tags: prolog, predicate, list Problem: How to make a list of lists in prolog I use SWI-Prolog and I want to make a list of several other lists. For example, I want to put the following three lists [a,b,c] [1,2] [d] into a ...
How to make a list of lists in prolog How to make a list of lists in prolog prolog predicate list How Head Tail list_to_set List How to make a list of lists in prolog I use SWI-Prolog and I want to make a list of several other lists. For example, I want to put the following three lists into a larger one that looks like...
[ 0.0142822265625, 0.0201416015625, 0.01031494140625, 0.00946044921875, -0.019775390625, 0.01373291015625, -0.007049560546875, 0.0020294189453125, 0.00677490234375, -0.019775390625, 0.00933837890625, 0.0045166015625, 0.0206298828125, 0.00726318359375, 0.00860595703125, 0.0015487670898437...
[ 11249, 3249, 5303, 111, 7, 23, 502, 4867, 10, 1653, 2063, 67, 44816, 1218, 379, 188, 3509, 32036, 4527, 159, 38969, 10752, 3444, 40368, 3789, 3884, 25632, 17262, 3934, 150679, 33342, 1884, 71, 756, 572, 1632 ]
[ 0.04107666015625, 0.1199951171875, 0.259765625, 0.0888671875, 0.10308837890625, 0.053863525390625, 0.1480712890625, 0.2149658203125, 0.02178955078125, 0.08172607421875, 0.11767578125, 0.022216796875, 0.1273193359375, 0.13427734375, 0.1202392578125, 0.01885986328125, 0.1380615234375, ...
embed
75585254_c2
75585254
prolog
2
loc,Cheir)), format('The fourth person is the ~w person~n', Code signals: Dishonored, Using, Prolog, Jindosh, Riddle, Warning, Goal, People, Aperson, Acolour, Adrink, Aloc, Aheir, Bperson, Bcolour, Bdrink, Bloc, Bheir, Cperson, Ccolour, Cdrink, Cloc, Cheir, Dperson, Dcolour, Ddrink, Dloc, Dheir, Eperson, Ecolour, Edrin...
loc,Cheir)), format('The fourth person is the ~w person~n', Code signals: Dishonored, Using, Prolog, Jindosh, Riddle, Warning, Goal, People, Aperson, Acolour, Adrink, Aloc, Aheir, Bperson, Bcolour, Bdrink, Bloc, Bheir, Cperson, Ccolour, Cdrink, Cloc, Cheir, Dperson, Dcolour, Ddrink, Dloc, Dheir, Eperson, Ecolour, Edrin...
[ -0.0093994140625, 0.0020751953125, 0.01348876953125, 0.0224609375, -0.00115966796875, 0.018798828125, -0.024658203125, 0.01007080078125, 0.0164794921875, -0.011962890625, -0.00439453125, 0.00958251953125, -0.00872802734375, 0.0029296875, 0.0003223419189453125, -0.01153564453125, 0.00...
[ 7001, 4, 98914, 481, 247, 9384, 3957, 22759, 927, 3445, 83, 70, 6780, 434, 2306, 19, 25, 28864, 26073, 7, 12, 6206, 186164, 297, 345, 6953, 1250, 4867, 33861, 79652, 41231, 19298, 5550, 592, 2016, 289, 41021, 62, 30816, 22796, 474, 31...
[ 0.2291259765625, 0.034576416015625, 0.15478515625, 0.25341796875, 0.038177490234375, 0.213134765625, 0.0789794921875, 0.2734375, 0.2000732421875, 0.24951171875, 0.176513671875, 0.1019287109375, 0.03607177734375, 0.187744140625, 0.01348876953125, 0.11181640625, 0.01513671875, 0.2773...
embed
15996772_c0
15996772
prolog
0
Title: Why are binary trees implemented as nested terms, not nested lists? Problem title: Why are binary trees implemented as nested terms, not nested lists? Tags: prolog Problem: Why are binary trees implemented as nested terms, not nested lists? I know it is a vague question, but still: what is it about terms that ma...
Why are binary trees implemented as nested terms, not nested lists? Why are binary trees implemented as nested terms, not nested lists? prolog Why Why are binary trees implemented as nested terms, not nested lists? I know it is a vague question, but still: what is it about terms that makes them more appropriate for nes...
[ 0.0146484375, 0.0230712890625, 0.00762939453125, -0.0101318359375, 0.00689697265625, 0.0245361328125, 0.0023040771484375, -0.003387451171875, -0.00823974609375, -0.0020751953125, 0.01104736328125, -0.025146484375, -0.0159912109375, 0.02587890625, 0.00592041015625, 0.0098876953125, 0....
[ 44084, 2394, 6635, 1360, 90, 29479, 297, 237, 8512, 71, 69407, 959, 5303, 4, 502, 4867, 621, 7, 1286, 95307, 100, 4909, 1916, 3501, 10433, 1927, 686, 4032, 31344, 159, 38969, 10752, 6275 ]
[ 0.141357421875, 0.2076416015625, 0.1651611328125, 0.2005615234375, 0.0643310546875, 0.170166015625, 0.061187744140625, 0.10601806640625, 0.2247314453125, 0.080322265625, 0.2066650390625, 0.07891845703125, 0.1812744140625, 0.022735595703125, 0.07196044921875, 0.1563720703125, 0.041107...
embed
34257684_c2
34257684
prolog
2
31 + V26 #= TotalF6, Totals = [TotalF1, TotalF2, TotalF3, TotalF4, TotalF5, TotalF6], domain(Totals, 1,6), all_different(Totals), TotalF3 + TotalF4 #= 7, TotalF1 + TotalF6 #= 7, Code signals: Prolog, V11, V12, V17, V18, V23, V24, V29, V30, V35, V36, V41, V42, V47, V48, V53, V54, V19, V16, V31, V26, V49, V13, V37, V25, ...
31 + V26 #= TotalF6, Totals = [TotalF1, TotalF2, TotalF3, TotalF4, TotalF5, TotalF6], domain(Totals, 1,6), all_different(Totals), TotalF3 + TotalF4 #= 7, TotalF1 + TotalF6 #= 7, Code signals: Prolog, V11, V12, V17, V18, V23, V24, V29, V30, V35, V36, V41, V42, V47, V48, V53, V54, V19, V16, V31, V26, V49, V13, V37, V25, ...
[ 0.01287841796875, -0.0186767578125, 0.010009765625, 0.01165771484375, -0.009765625, -0.035400390625, -0.03173828125, 0.0016632080078125, 0.00138092041015625, -0.00872802734375, 0.0218505859375, 0.001708984375, 0.0252685546875, 0.033203125, -0.006988525390625, 0.00139617919921875, 0.0...
[ 1936, 997, 310, 4046, 468, 1369, 33867, 919, 910, 7, 2203, 169473, 418, 304, 363, 617, 4, 758, 77758, 51278, 756, 238778, 361, 28864, 26073, 1250, 4867, 1662, 1530, 2489, 1819, 3742, 2357, 4235, 1197, 5843, 8659, 8894, 13023, 13330, 928...
[ 0.239501953125, 0.2010498046875, 0.1722412109375, 0.277099609375, 0.1209716796875, 0.041656494140625, 0.2467041015625, 0.1190185546875, 0.17578125, 0.11669921875, 0.060516357421875, 0.2088623046875, 0.045623779296875, 0.05377197265625, 0.103759765625, 0.1199951171875, 0.0598754882812...
embed
15672822_c0
15672822
prolog
0
Title: why is this simple prolog function failing? Problem title: why is this simple prolog function failing? Tags: prolog Problem: why is this simple prolog function failing? I've written some simple father/parent/ancestor functions in Prolog. Everything is working fine except ancestor. Like this ... ?- parent(abe,hom...
why is this simple prolog function failing? why is this simple prolog function failing? prolog why is this simple prolog function failing? I've written some simple father/parent/ancestor functions in Prolog. Everything is working fine except ancestor. Like this ... Why is my ancestor(abe,bart) returning false? Here's m...
[ 0.01348876953125, -0.0025634765625, 0.000545501708984375, 0.01507568359375, -0.0205078125, 0.01312255859375, 0.0186767578125, 0.0152587890625, -0.0048828125, -0.01031494140625, 0.02490234375, -0.0162353515625, 0.0045166015625, 0.009033203125, 0.01092529296875, -0.0181884765625, 0.019...
[ 15400, 83, 903, 8781, 502, 4867, 32354, 35782, 214, 59121, 67373, 99547, 60502, 1290, 1250, 171581, 20697, 5885, 40494, 44084, 34669, 25304, 30646, 98320 ]
[ 0.13525390625, 0.06024169921875, 0.084228515625, 0.1763916015625, 0.1650390625, 0.2413330078125, 0.195068359375, 0.173583984375, 0.111328125, 0.02734375, 0.142333984375, 0.1134033203125, 0.1409912109375, 0.12890625, 0.13232421875, 0.006622314453125, 0.051605224609375, 0.02818298339...
embed
33865576_c0
33865576
prolog
0
Title: Cannot load prolog source file Problem title: Cannot load prolog source file Tags: prolog Problem: Cannot load prolog source file I was working in Prolog and all of the sudden when I tried to load my source file I started getting this error: uncaught exception: error(syntax_error('user_input:1 (char:5) , | ] or ...
Cannot load prolog source file Cannot load prolog source file prolog Cannot syntax_error user_input:1 char:5 read_term test.pl Cannot load prolog source file I was working in Prolog and all of the sudden when I tried to load my source file I started getting this error: uncaught exception: error(syntax_error('user_input...
[ 0.019287109375, 0.0181884765625, 0.006591796875, -0.004364013671875, -0.0177001953125, 0.00396728515625, 0.006561279296875, -0.0000400543212890625, -0.005279541015625, -0.05078125, 0.00616455078125, -0.00787353515625, -0.0162353515625, -0.0198974609375, 0.0186767578125, -0.010803222656...
[ 4171, 10869, 72367, 502, 4867, 31344, 11435, 6002, 86531, 188800, 38937, 73, 7077, 19721, 21441, 758, 12301, 32166, 3034, 2424, 20697, 1250, 70, 37842, 903, 18499, 51, 408, 46526, 131527, 12654, 65918, 454, 15, 9254, 43317, 6, 4, 10114, 3...
[ 0.00030517578125, 0.1226806640625, 0.2208251953125, 0.17822265625, 0.24951171875, 0.232666015625, 0.158935546875, 0.0665283203125, 0.18798828125, 0.1766357421875, 0.15185546875, 0.09844970703125, 0.09259033203125, 0.0709228515625, 0.1156005859375, 0.10211181640625, 0.1304931640625, ...
embed
26730009_c0
26730009
prolog
0
Title: Add number to each element in a list Problem title: Add number to each element in a list Tags: prolog Problem: Add number to each element in a list I am trying to add a number to each element in a list and the sublists.The list also contains a tree(The functor cannot be numeric only leaves can be numeric). % Che...
Add number to each element in a list Add number to each element in a list prolog Add Checking Add number to each element in a list I am trying to add a number to each element in a list and the sublists.The list also contains a tree(The functor cannot be numeric only leaves can be numeric). When I try running the query ...
[ 0.0133056640625, 0.014892578125, -0.0115966796875, 0.00970458984375, 0.002288818359375, 0.018798828125, -0.0203857421875, 0.002655029296875, -0.00128936767578125, -0.041259765625, 0.006378173828125, -0.01806640625, -0.016845703125, 0.0247802734375, 0.0067138671875, -0.016357421875, 0...
[ 29117, 14012, 47, 12638, 12830, 23, 5303, 502, 4867, 38679, 214, 31577, 15190, 10, 1614, 6562, 70541, 53201, 7477, 18770, 53418, 186, 54744, 238, 4734, 31358, 831, 9790, 51042, 41, 1294, 35782, 7, 39527, 77947, 71 ]
[ 0.1644287109375, 0.245361328125, 0.1361083984375, 0.1678466796875, 0.20947265625, 0.0675048828125, 0.2247314453125, 0.149658203125, 0.168701171875, 0.2037353515625, 0.044891357421875, 0.08837890625, 0.1466064453125, 0.015167236328125, 0.117431640625, 0.1685791015625, 0.06817626953125...
embed
49671733_c0
49671733
prolog
0
Title: Prolog, 3 in a row, any direction Problem title: Prolog, 3 in a row, any direction Tags: prolog Problem: Prolog, 3 in a row, any direction I'm trying to write a procedure in prolog where a list might look something like this: threeInRow(x,[b, b, a, threeInRow(x,[b, d, a, c, a, b, c, d, b, a, d, d]) b, d, a]) Bot...
Prolog, 3 in a row, any direction Prolog, 3 in a row, any direction prolog Prolog Prolog, 3 in a row, any direction I'm trying to write a procedure in prolog where a list might look something like this: Both of these would return true. The list always contains 9 elements and can be any of character ranging from a-d. Wo...
[ 0.0244140625, 0.0196533203125, 0.0157470703125, 0.01239013671875, -0.0211181640625, 0.012451171875, 0.000957489013671875, -0.00090789794921875, 0.0037078857421875, -0.004852294921875, 0.00811767578125, -0.007293701171875, -0.012451171875, 0.0035247802734375, -0.01373291015625, 0.019409...
[ 1250, 4867, 138, 23, 10, 15555, 2499, 48225, 502, 31577, 33022, 50491, 5303, 13648, 6713, 1884, 903, 149766, 6097, 2806, 30646, 29568, 11343, 70541, 483, 80854, 831, 186, 62816, 17163, 1295, 9, 71, 98320, 959, 214 ]
[ 0.1995849609375, 0.2822265625, 0.2398681640625, 0.10400390625, 0.055145263671875, 0.2093505859375, 0.0994873046875, 0.2236328125, 0.1522216796875, 0.04656982421875, 0.08160400390625, 0.187744140625, 0.1871337890625, 0.0439453125, 0.1358642578125, 0.042938232421875, 0.003326416015625,...
embed
4976859_c0
4976859
prolog
0
Title: Query in prolog regarding fact and list Problem title: Query in prolog regarding fact and list Tags: prolog Problem: Query in prolog regarding fact and list I am new in Prolog and I am stucked in a problem. I have following facts: _________________ likes(a,apple). likes(a,banana). likes(a,orange). ______________...
Query in prolog regarding fact and list Query in prolog regarding fact and list prolog Query _________________ Query in prolog regarding fact and list I am new in Prolog and I am stucked in a problem. I have following facts: and my query will be: where Var = [apple,banana,orange] . I don't want in this manner that Any ...
[ 0.029541015625, 0.01263427734375, -0.01141357421875, 0.0262451171875, -0.00323486328125, 0.0035552978515625, 0.00860595703125, 0.005401611328125, -0.000431060791015625, -0.039794921875, -0.01214599609375, -0.0284423828125, -0.0037078857421875, 0.009521484375, -0.005279541015625, -0.009...
[ 58836, 53, 23, 502, 4867, 118861, 15824, 136, 5303, 184041, 3525, 1250, 444, 179933, 297, 2967, 25632, 759, 41, 1294, 1221, 186, 7440, 3323, 2203, 9007, 133, 105281, 11, 10727, 13, 2301, 18, 3444, 903, 144996, 157666, 4358, 77947, 129745 ...
[ 0.2041015625, 0.1123046875, 0.0933837890625, 0.1473388671875, 0.248779296875, 0.0771484375, 0.1854248046875, 0.093017578125, 0.2208251953125, 0.011260986328125, 0.0265960693359375, 0.1484375, 0.003997802734375, 0.04888916015625, 0.03240966796875, 0.0928955078125, 0.05743408203125, ...
embed
72436208_c0
72436208
prolog
0
Title: Append a Star after every element of a given list in prolog Problem title: Append a Star after every element of a given list in prolog Tags: prolog Problem: Append a Star after every element of a given list in prolog In this predicate listStar(L,R) , I want to append a * after every element of a given list e.g.:...
Append a Star after every element of a given list in prolog Append a Star after every element of a given list in prolog prolog Append Star Append a Star after every element of a given list in prolog In this predicate listStar(L,R) , I want to append a * after every element of a given list e.g.: After the execution of t...
[ 0.0198974609375, -0.004364013671875, 0.01458740234375, 0.00390625, 0.00677490234375, 0.005950927734375, -0.006103515625, 0.0159912109375, -0.00164031982421875, -0.006561279296875, 0.024169921875, 0.00150299072265625, -0.004852294921875, 0.009521484375, -0.01708984375, 0.007049560546875...
[ 5659, 3611, 10, 4612, 7103, 11907, 12830, 34475, 5303, 502, 4867, 23, 1653, 2063, 44072, 866, 1052, 3444, 114689, 71, 661, 71924, 18151, 16750, 627, 2203, 68252, 4828, 116, 138, 201, 4358 ]
[ 0.125244140625, 0.1033935546875, 0.0872802734375, 0.266845703125, 0.1663818359375, 0.1451416015625, 0.1785888671875, 0.07806396484375, 0.1922607421875, 0.1502685546875, 0.195556640625, 0.008697509765625, 0.07476806640625, 0.09820556640625, 0.241943359375, 0.087890625, 0.1353759765625...
embed
50898670_c0
50898670
prolog
0
Title: prolog: predicate which is true if two lists are the same without a specific element Problem title: prolog: predicate which is true if two lists are the same without a specific element Tags: prolog Problem: prolog: predicate which is true if two lists are the same without a specific element I want to write a pre...
prolog: predicate which is true if two lists are the same without a specific element prolog: predicate which is true if two lists are the same without a specific element prolog prolog: predicate which is true if two lists are the same without a specific element I want to write a predicate withoutElement(A,Lf,Lg) in pro...
[ -0.00141143798828125, 0.017822265625, -0.0186767578125, 0.00384521484375, -0.01446533203125, 0.021728515625, -0.01251220703125, 0.0225830078125, 0.00970458984375, -0.0048828125, 0.01446533203125, 0.0262451171875, -0.0101318359375, 0.0030517578125, -0.00335693359375, -0.00250244140625, ...
[ 502, 4867, 1653, 2063, 67, 83, 29568, 2174, 6626, 5303, 5701, 15490, 29458, 12830, 3129, 3444, 33022, 647, 19929, 284, 420, 866, 177, 23, 339, 62, 22225, 184, 87599, 2965 ]
[ 0.1756591796875, 0.24072265625, 0.2034912109375, 0.22998046875, 0.1431884765625, 0.064453125, 0.2135009765625, 0.05413818359375, 0.1119384765625, 0.19482421875, 0.1441650390625, 0.1612548828125, 0.1226806640625, 0.1298828125, 0.0177764892578125, 0.0479736328125, 0.1285400390625, 0....
embed
36038458_c1
36038458
prolog
1
]}. tokens(Z) --> "false", tokens(Y), {Z = [false | Y]}. tokens(Z) --> "and", tokens(Y), {Z = [and | Y]}. tokens(Z) --> "or", tokens(Y), {Z = [or | Y]}. tokens(Z) --> " ", tokens(Y), {Z = Y}. tokens(Z) --> " ", tokens(Y), {Z = Y}. tokens(Z) --> [C], tokens(Y), {name(X, [C]), Z = [X | Y]}. tokens(Z) --> [], {Z = []}. Ca...
]}. tokens(Z) --> "false", tokens(Y), {Z = [false | Y]}. tokens(Z) --> "and", tokens(Y), {Z = [and | Y]}. tokens(Z) --> "or", tokens(Y), {Z = [or | Y]}. tokens(Z) --> " ", tokens(Y), {Z = Y}. tokens(Z) --> " ", tokens(Y), {Z = Y}. tokens(Z) --> [C], tokens(Y), {name(X, [C]), Z = [X | Y]}. tokens(Z) --> [], {Z = []}. Ca...
[ 0.0260009765625, -0.01055908203125, 0.01275634765625, 0.02734375, -0.005096435546875, 0.00390625, 0.0015106201171875, -0.00091552734375, 0.01226806640625, -0.00677490234375, 0.0084228515625, 0.0247802734375, -0.016357421875, -0.006103515625, 0.016845703125, 0.00008869171142578125, 0....
[ 10114, 8152, 47, 84694, 1511, 129908, 8710, 184, 1723, 990, 2940, 748, 11627, 567, 1542, 4171, 35672, 4358, 11737, 29954, 95, 34058, 12477, 11782, 204610, 11, 69112, 275, 246, 2055, 238, 3611, 627, 5809, 2046, 2203, 3062, 105950, 876, 156...
[ 0.0252685546875, 0.0860595703125, 0.1363525390625, 0.22802734375, 0.1749267578125, 0.0899658203125, 0.15869140625, 0.107666015625, 0.13623046875, 0.08758544921875, 0.146484375, 0.1182861328125, 0.038909912109375, 0.09906005859375, 0.00225830078125, 0.0300750732421875, 0.0291290283203...
embed
59733570_c0
59733570
prolog
0
Title: source_sink `library(lineutils)&#x27; does not exist Problem title: source_sink `library(lineutils)&#x27; does not exist Tags: yap, eclipse, prolog Problem: source_sink `library(lineutils)' does not exist When I try to compile a prolog file, in eclipse with the prodt plugin it gives me this error: source_sink `l...
source_sink `library(lineutils)&#x27; does not exist source_sink `library(lineutils)&#x27; does not exist yap eclipse prolog source_sink source_sink `library(lineutils)' does not exist When I try to compile a prolog file, in eclipse with the prodt plugin it gives me this error: the project was not created by me, but it...
[ -0.0089111328125, -0.00089263916015625, 0.000016689300537109375, 0.027099609375, -0.02783203125, -0.00170135498046875, -0.0037994384765625, 0.00433349609375, -0.01129150390625, -0.032470703125, -0.0107421875, -0.030029296875, 0.01171875, 0.0022735595703125, 0.019775390625, -0.002426147...
[ 31344, 7, 14068, 150, 2844, 1294, 2256, 1003, 7870, 3768, 959, 32316, 15850, 28, 106371, 184, 502, 4867, 9790, 9969, 1340, 11435, 13384, 69993, 18499, 13452, 509, 75935, 390, 163, 83, 152363, 3714, 7413, 903, 35773, 37202, 1295, 128706, 4...
[ 0.2257080078125, 0.12744140625, 0.2332763671875, 0.1043701171875, 0.189697265625, 0.1368408203125, 0.158203125, 0.1475830078125, 0.177490234375, 0.10986328125, 0.14892578125, 0.197265625, 0.1685791015625, 0.0018310546875, 0.19775390625, 0.06268310546875, 0.1842041015625, 0.22509765...
embed
41524597_c0
41524597
prolog
0
Title: Using And/Or in Prolog Problem title: Using And/Or in Prolog Tags: prolog Problem: Using And/Or in Prolog So I'm relatively new to prolog and I've came across some code on the internet which can be used to represent an And/Or node. % a is an or node with successors b,c,d. or(a,[b,c,d]). % c is an and node with s...
Using And/Or in Prolog Using And/Or in Prolog prolog Using Prolog Using And/Or in Prolog So I'm relatively new to prolog and I've came across some code on the internet which can be used to represent an And/Or node. I'm confused as to how this predicates could be used to find a solvable node. And references to point me ...
[ 0.0194091796875, 0.0201416015625, -0.003662109375, 0.01373291015625, -0.0234375, 0.0245361328125, -0.01544189453125, 0.0035552978515625, -0.00384521484375, -0.027587890625, -0.0166015625, -0.033935546875, -0.01275634765625, 0.013916015625, 0.01348876953125, -0.008544921875, 0.0115356...
[ 345, 3493, 64, 19060, 1250, 4867, 23, 502, 3525, 36880, 18151, 1820, 11814, 33636, 110, 112, 55681, 1653, 2063, 1636, 5809, 7413, 132944, 2886, 91067 ]
[ 0.0701904296875, 0.212158203125, 0.1925048828125, 0.27392578125, 0.1748046875, 0.2364501953125, 0.048736572265625, 0.1090087890625, 0.0293731689453125, 0.008026123046875, 0.117431640625, 0.010223388671875, 0.07366943359375, 0.162109375, 0.1485595703125, 0.119873046875, 0.062866210937...
embed
55785207_c0
55785207
prolog
0
Title: why this code cannot be run?what is &quot;syntax error: postfix/infix operator expected&quot; error in ECLiPSe-clp Problem title: why this code cannot be run?what is &quot;syntax error: postfix/infix operator expected&quot; error in ECLiPSe-clp Tags: eclipse-clp, prolog Problem: why this code cannot be run?what ...
why this code cannot be run?what is &quot;syntax error: postfix/infix operator expected&quot; error in ECLiPSe-clp why this code cannot be run?what is &quot;syntax error: postfix/infix operator expected&quot; error in ECLiPSe-clp eclipse-clp prolog ECLiPSe-clp Error Mark why this code cannot be run?what is "syntax erro...
[ 0.0302734375, 0.004547119140625, -0.0086669921875, 0.0181884765625, 0.01239013671875, -0.0016021728515625, -0.000759124755859375, 0.015625, -0.0174560546875, -0.037841796875, 0.002716064453125, -0.006500244140625, 0.001007080078125, -0.000759124755859375, 0.01104736328125, -0.008056640...
[ 15400, 903, 18151, 53418, 186, 11675, 12654, 86531, 18499, 1305, 55923, 73, 39933, 84751, 59947, 9506, 9059, 13, 26775, 83, 106371, 184, 502, 4867, 212059, 7880, 64, 23, 3444, 441, 37352, 25632, 28864 ]
[ 0.113525390625, 0.078125, 0.205078125, 0.1796875, 0.04498291015625, 0.169189453125, 0.053741455078125, 0.1260986328125, 0.146484375, 0.08404541015625, 0.251708984375, 0.095703125, 0.1990966796875, 0.203125, 0.10552978515625, 0.1650390625, 0.1141357421875, 0.1553955078125, 0.17199...
embed
23533514_c0
23533514
prolog
0
Title: Prolog List Concatenation Problem title: Prolog List Concatenation Tags: concatenation, list, prolog, shrink, append Problem: Prolog List Concatenation I have a list such as the below given list. However my goal is to make it like the following list below which does not have an extra list inside of a list. Given...
Prolog List Concatenation Prolog List Concatenation concatenation list prolog shrink append Prolog List Concatenation Given Desired Prolog List Concatenation I have a list such as the below given list. However my goal is to make it like the following list below which does not have an extra list inside of a list. I have...
[ 0.00848388671875, 0.022705078125, 0.0034637451171875, 0.0086669921875, -0.01171875, 0.0089111328125, -0.01007080078125, 0.005218505859375, 0.01202392578125, 0.00189208984375, -0.004638671875, -0.00250244140625, -0.021240234375, -0.006561279296875, 0.00119781494140625, -0.00271606445312...
[ 1250, 4867, 32036, 1657, 4460, 33, 2320, 158, 5303, 502, 7547, 35838, 114689, 71, 77878, 56656, 2822, 765, 35064, 34475, 69236, 83, 3249, 1884, 25632, 14602, 959, 4173, 46132, 37842, 49878, 510, 1653, 2063, 53418, 163846 ]
[ 0.1412353515625, 0.2098388671875, 0.194091796875, 0.070068359375, 0.1397705078125, 0.1097412109375, 0.01226806640625, 0.057586669921875, 0.17578125, 0.119140625, 0.126953125, 0.177978515625, 0.120361328125, 0.06781005859375, 0.00146484375, 0.1387939453125, 0.0958251953125, 0.021286...
embed
18947482_c0
18947482
prolog
0
Title: Prolog: how to write n amount of characters of a string? Problem title: Prolog: how to write n amount of characters of a string? Tags: predicate, prolog, swi-prolog Problem: Prolog: how to write n amount of characters of a string? I'm really new to prolog and i have to write a predicate what takes in a string an...
Prolog: how to write n amount of characters of a string? Prolog: how to write n amount of characters of a string? predicate prolog swi-prolog Prolog Hello Hell Prolog: how to write n amount of characters of a string? I'm really new to prolog and i have to write a predicate what takes in a string and an integer and writ...
[ 0.007354736328125, -0.0016326904296875, -0.002593994140625, 0.0341796875, -0.017822265625, 0.0166015625, 0.010498046875, -0.0028076171875, 0.0002079010009765625, -0.00885009765625, -0.006195068359375, -0.0130615234375, -0.016357421875, -0.0086669921875, 0.00823974609375, -0.01062011718...
[ 1250, 4867, 3642, 47, 33022, 653, 41170, 124850, 111, 79315, 1653, 2063, 67, 502, 2452, 3454, 35378, 43153, 6183, 3525, 765, 51776, 23, 136, 892, 1505, 1810, 237, 5941, 34292, 11249, 54, 89536 ]
[ 0.1724853515625, 0.25390625, 0.1148681640625, 0.07781982421875, 0.210693359375, 0.156494140625, 0.1785888671875, 0.20556640625, 0.0975341796875, 0.2388916015625, 0.1646728515625, 0.21728515625, 0.0191650390625, 0.157958984375, 0.10986328125, 0.1273193359375, 0.06597900390625, 0.141...
embed
40426413_c2
40426413
prolog
2
,Yn,Maze,NVal), %Get the value of the next location \+ memberchk([Xn,Yn],PathM), %Make sure we have not traveled to this location before findMewtoo(Xn,Yn,NVal,Maze,[[Xn,Yn]|PathM],rPathM). %Recursive call with the next Code signals: Issues, Pathfinding, Prolog, Maze, Path, Score, Get, PathMB, Find, Masterball, nth1, Ro...
,Yn,Maze,NVal), %Get the value of the next location \+ memberchk([Xn,Yn],PathM), %Make sure we have not traveled to this location before findMewtoo(Xn,Yn,NVal,Maze,[[Xn,Yn]|PathM],rPathM). %Recursive call with the next Code signals: Issues, Pathfinding, Prolog, Maze, Path, Score, Get, PathMB, Find, Masterball, nth1, Ro...
[ -0.004486083984375, 0.0137939453125, 0.0186767578125, 0.015380859375, 0.0166015625, 0.0159912109375, 0.0013427734375, 0.00115966796875, 0.0164794921875, -0.02685546875, 0.0033416748046875, 0.016357421875, -0.0069580078125, -0.01507568359375, 0.012939453125, -0.001800537109375, -0.012...
[ 1723, 19, 4613, 731, 65954, 289, 247, 1745, 724, 126, 34292, 11737, 31913, 1328, 32786, 206, 92, 1542, 683, 10519, 594, 76978, 9077, 642, 765, 959, 26983, 297, 47, 903, 8108, 7413, 6696, 434, 24838, 4, 4332, 48650, 5844, 11782, 28864, ...
[ 0.0728759765625, 0.114013671875, 0.0872802734375, 0.1800537109375, 0.0980224609375, 0.16796875, 0.0089111328125, 0.095458984375, 0.0770263671875, 0.10394287109375, 0.1761474609375, 0.17724609375, 0.2261962890625, 0.06634521484375, 0.2000732421875, 0.125, 0.152587890625, 0.066528320...
embed
67115658_c0
67115658
prolog
0
Title: PROLOG : Given a number X, find all multiples of 4 less or equal than X Problem title: PROLOG : Given a number X, find all multiples of 4 less or equal than X Tags: prolog Problem: PROLOG : Given a number X, find all multiples of 4 less or equal than X I have the following program: list4(N, L) :- list4(0, N, L)....
PROLOG : Given a number X, find all multiples of 4 less or equal than X PROLOG : Given a number X, find all multiples of 4 less or equal than X prolog PROLOG Given list4 List PROLOG : Given a number X, find all multiples of 4 less or equal than X I have the following program: When i change the line N1 is N0+1 to N1 is ...
[ -0.0145263671875, -0.0004024505615234375, 0.021484375, -0.00421142578125, -0.00634765625, 0.00860595703125, -0.01953125, 0.004486083984375, 0.0201416015625, -0.0186767578125, -0.01043701171875, -0.01190185546875, -0.01171875, -0.0086669921875, 0.005218505859375, 0.016357421875, 0.024...
[ 10514, 47510, 77878, 14012, 1193, 7413, 756, 48716, 7, 111, 201, 40715, 707, 105950, 3501, 152, 502, 4867, 5303, 617, 32036, 10, 25632, 1528, 15549, 13315, 541, 418, 2389, 21748, 47, 149878, 177261, 17475, 204839, 18499, 84751, 16750 ]
[ 0.15380859375, 0.21044921875, 0.08538818359375, 0.123046875, 0.15625, 0.12109375, 0.0997314453125, 0.26123046875, 0.045867919921875, 0.05987548828125, 0.1898193359375, 0.2301025390625, 0.051025390625, 0.10479736328125, 0.054931640625, 0.0140533447265625, 0.11962890625, 0.2004394531...
embed
7291242_c0
7291242
prolog
0
Title: swi prolog , how to read the data for the txt.file Problem title: swi prolog , how to read the data for the txt.file Tags: prolog Problem: swi prolog , how to read the data for the txt.file Can someone help me with my file reading predicate? get_userinfo: write('\nEnter Name:'), readln(Name), write('\nEnter Gend...
swi prolog , how to read the data for the txt.file swi prolog , how to read the data for the txt.file prolog txt.file get_userinfo Name Gender marriage.txt Age Attr swi prolog , how to read the data for the txt.file Can someone help me with my file reading predicate? This is my text file:
[ 0.028076171875, -0.003082275390625, 0.017822265625, 0.021728515625, -0.01031494140625, 0.0166015625, 0.0091552734375, 0.0167236328125, -0.00787353515625, -0.046875, -0.01336669921875, -0.0047607421875, -0.029296875, -0.0257568359375, 0.035400390625, 0.01361083984375, 0.029052734375, ...
[ 91, 2452, 502, 4867, 3642, 47, 12301, 2053, 100, 124326, 5, 29822, 2046, 65918, 7319, 15757, 527, 23894, 129570, 72944, 22008, 4358, 11435, 16454, 1653, 2063, 7986 ]
[ 0.04638671875, 0.2225341796875, 0.1754150390625, 0.2071533203125, 0.03643798828125, 0.0677490234375, 0.1956787109375, 0.15576171875, 0.033905029296875, 0.230224609375, 0.001922607421875, 0.1553955078125, 0.0296630859375, 0.1385498046875, 0.1568603515625, 0.0195159912109375, 0.0216369...
embed
42312523_c0
42312523
prolog
0
Title: what is _(number) in prolog, and why when they appear winHugs freezes? Problem title: what is _(number) in prolog, and why when they appear winHugs freezes? Tags: variables, prolog Problem: what is _(number) in prolog, and why when they appear winHugs freezes? The following code works OK longitud([],0). longitud...
what is _(number) in prolog, and why when they appear winHugs freezes? what is _(number) in prolog, and why when they appear winHugs freezes? variables prolog Cont ContAux _512 what is _(number) in prolog, and why when they appear winHugs freezes? The following code works OK but when I make a consult, like... it says s...
[ 0.0159912109375, -0.003997802734375, 0.005584716796875, 0.003173828125, -0.0025177001953125, 0.0111083984375, 0.0185546875, 0.01495361328125, 0.0189208984375, -0.0164794921875, 0.01080322265625, -0.00830078125, 0.0108642578125, 0.0103759765625, 0.0015106201171875, 0.023681640625, 0.0...
[ 83, 101, 2606, 1297, 23, 502, 4867, 15400, 108975, 19916, 30513, 9405, 4092, 13105, 2367, 77336, 1657, 18, 6077, 758, 1530, 18151, 75463, 85030, 7, 450, 13580, 731 ]
[ 0.03814697265625, 0.080810546875, 0.1646728515625, 0.1649169921875, 0.031494140625, 0.132568359375, 0.1942138671875, 0.0675048828125, 0.06121826171875, 0.1131591796875, 0.1827392578125, 0.140380859375, 0.14208984375, 0.1197509765625, 0.0125732421875, 0.152587890625, 0.029037475585937...
embed
32810756_c0
32810756
prolog
0
Title: Aggregation Sum in Prolog Problem title: Aggregation Sum in Prolog Tags: prolog, relational-database Problem: Aggregation Sum in Prolog I have a table in Prolog like this: invoice(number, locality, value) invoice(1, madrid, 100) invoice(2, lisbon, 200) invoice(3, london, 300) invoice(4, madrid, 300) invoice(5, l...
Aggregation Sum in Prolog Aggregation Sum in Prolog prolog relational-database Aggregation Sum Prolog Aggregation Sum in Prolog I have a table in Prolog like this: How can I get the agreggate sum for locality? The answer should be something like doing a pivot table in Excel.. Lisbon total:400 Madrid total: 400 Paris to...
[ 0.01116943359375, -0.00445556640625, 0.01239013671875, 0.02978515625, -0.0245361328125, -0.0086669921875, -0.0211181640625, 0.002532958984375, -0.00078582763671875, -0.044189453125, -0.00726318359375, 0.01055908203125, -0.0004291534423828125, -0.005615234375, 0.01470947265625, 0.012451...
[ 12342, 68722, 2320, 36335, 23, 1250, 4867, 502, 41911, 10135, 37382, 23180, 1884, 903, 11249, 831, 87, 2046, 70, 10, 42118, 10554, 100, 4000, 2481, 35166, 5608, 9844, 80953, 18, 30326, 230991, 3622, 10700, 8884, 4082, 7270, 805, 9020, 266...
[ 0.079833984375, 0.232421875, 0.07421875, 0.264404296875, 0.07562255859375, 0.16796875, 0.26708984375, 0.106689453125, 0.0897216796875, 0.02838134765625, 0.1102294921875, 0.172607421875, 0.02880859375, 0.01007080078125, 0.043975830078125, 0.058074951171875, 0.019378662109375, 0.1158...
embed
22633014_c0
22633014
prolog
0
Title: How do I implement automata for [a-z][.?!][ ]+[A-Z] , using Prolog? Problem title: How do I implement automata for [a-z][.?!][ ]+[A-Z] , using Prolog? Tags: prolog Problem: How do I implement automata for [a-z][.?!][ ]+[A-Z] , using Prolog? I request you to let me know how to complete the program start(q0). fina...
How do I implement automata for [a-z][.?!][ ]+[A-Z] , using Prolog? How do I implement automata for [a-z][.?!][ ]+[A-Z] , using Prolog? prolog Prolog How A-Z How do I implement automata for [a-z][.?!][ ]+[A-Z] , using Prolog? I request you to let me know how to complete the program
[ 0.0235595703125, -0.020751953125, -0.01324462890625, 0.0458984375, -0.00970458984375, 0.0126953125, 0.01470947265625, 0.0201416015625, 0.01080322265625, -0.00653076171875, 0.02294921875, 0.01409912109375, -0.01251220703125, -0.005462646484375, 0.0164794921875, -0.01904296875, 0.01452...
[ 11249, 54, 87, 29479, 11408, 11, 100, 9, 169, 4730, 1328, 284, 1511, 17368, 1250, 4867, 502, 62, 50336, 3642, 28484, 1528 ]
[ 0.097412109375, 0.02484130859375, 0.029571533203125, 0.23095703125, 0.28369140625, 0.2257080078125, 0.1328125, 0.1278076171875, 0.175537109375, 0.1248779296875, 0.1221923828125, 0.1483154296875, 0.21044921875, 0.0767822265625, 0.2010498046875, 0.25439453125, 0.144775390625, 0.17846...
embed
74898572_c0
74898572
prolog
0
Title: Why this failed Problem title: Why this failed Tags: prolog Problem: Why this failed I'm a beginner in Prolog after 40 years of imperative programming. #!/usr/bin/swipl :- use_module(library(clpfd)). all_digits( [] ). all_digits( [H|T] ) :- memberchk( H, [0,1,2,3,4,5,6,7,8,9] ), all_digits( T ). :- is_list( A ),...
Why this failed Why this failed prolog Why use_module all_digits is_list Why this failed I'm a beginner in Prolog after 40 years of imperative programming. This program is in progress, I have another rules to add, but it already failed. Why? I expect 720 solutions: n!(n−p)! because each digit must be used only once.
[ -0.00107574462890625, 0.005615234375, 0.01116943359375, 0.03076171875, -0.0235595703125, 0.00970458984375, 0.00439453125, 0.016357421875, 0.0181884765625, -0.021484375, 0.0032501220703125, -0.0286865234375, -0.0068359375, 0.02685546875, 0.0035858154296875, -0.000926971435546875, 0.00...
[ 44084, 903, 165523, 502, 4867, 4527, 83279, 13, 756, 4803, 14481, 83, 6562, 9842, 1679, 23, 1250, 1112, 5369, 222530, 56037, 449, 1528, 42658, 15700, 91736, 15190, 1284, 442, 21771, 87, 41206, 32285, 51347, 12, 653, 90295, 19, 51959, 254,...
[ 0.1004638671875, 0.1307373046875, 0.239501953125, 0.1785888671875, 0.295654296875, 0.156005859375, 0.179931640625, 0.0626220703125, 0.152099609375, 0.1561279296875, 0.1470947265625, 0.1097412109375, 0.21142578125, 0.037567138671875, 0.0848388671875, 0.006603240966796875, 0.1939697265...
embed
19502380_c0
19502380
prolog
0
Title: A program crashing the SWI Prolog console Problem title: A program crashing the SWI Prolog console Tags: crash, prolog, swi-prolog Problem: A program crashing the SWI Prolog console I'm running a Prolog program that I wrote (a proof tester in natural deduction), and when I run the program (run_all_tests('proof_t...
A program crashing the SWI Prolog console A program crashing the SWI Prolog console crash prolog swi-prolog SWI Prolog A program crashing the SWI Prolog console I'm running a Prolog program that I wrote (a proof tester in natural deduction), and when I run the program (run_all_tests('proof_tester.pl').) the program run...
[ 0.0255126953125, 0.01446533203125, 0.00445556640625, 0.00823974609375, -0.022216796875, -0.0028228759765625, -0.005767822265625, -0.00726318359375, -0.012939453125, -0.0223388671875, -0.0059814453125, -0.00823974609375, -0.021240234375, 0.00128936767578125, 0.0302734375, -0.00396728515...
[ 62, 1528, 150631, 214, 159, 38969, 1250, 4867, 130250, 70, 502, 91, 2452, 3454, 51042, 54397, 98869, 79227, 6083, 8, 77391, 3229, 11675, 16428, 5584, 6954, 67, 1515, 2424, 127877, 28412, 41884, 1295, 3059, 1733, 1957, 2367, 20903, 7, 1650...
[ 0.033111572265625, 0.2027587890625, 0.18896484375, 0.061004638671875, 0.091552734375, 0.2266845703125, 0.15576171875, 0.193115234375, 0.19775390625, 0.0123291015625, 0.100830078125, 0.012542724609375, 0.1883544921875, 0.0941162109375, 0.08349609375, 0.0784912109375, 0.155029296875, ...
embed
37361530_c0
37361530
prolog
0
Title: Prolog Difference Of Squares Problem title: Prolog Difference Of Squares Tags: clpfd, prolog, instantiation-error Problem: Prolog Difference Of Squares I want to find difference between square of a+1 and square of a is 2a+1 in prolog. For this reason i wrote code like this: :- use_module(library(clpfd)). kare(X,...
Prolog Difference Of Squares Prolog Difference Of Squares clpfd prolog instantiation-error Prolog Difference Squares use_module P-T ERROR Arguments Prolog Difference Of Squares I want to find difference between square of a+1 and square of a is 2a+1 in prolog. For this reason i wrote code like this: I tried it with Anyo...
[ 0.029296875, 0.0240478515625, 0.005462646484375, 0.01043701171875, -0.0045166015625, -0.0036163330078125, 0.00262451171875, 0.006805419921875, 0.01116943359375, -0.0029449462890625, 0.023193359375, -0.0191650390625, -0.00506591796875, 0.0084228515625, 0.016845703125, -0.0252685546875, ...
[ 1250, 4867, 803, 18234, 6620, 6619, 68305, 39557, 71, 502, 34648, 14, 188800, 4527, 83279, 436, 9, 618, 151206, 112140, 7, 3444, 7413, 60212, 17721, 108047, 111, 10, 21748, 136, 83, 116, 11, 23, 54397, 18151, 1884, 903, 37842, 28541, 36...
[ 0.16162109375, 0.256591796875, 0.0771484375, 0.1856689453125, 0.049774169921875, 0.14013671875, 0.2127685546875, 0.000244140625, 0.0347900390625, 0.1585693359375, 0.046417236328125, 0.0210113525390625, 0.1226806640625, 0.04296875, 0.0697021484375, 0.0146636962890625, 0.00692749023437...
embed
41132468_c2
41132468
prolog
2
: a=a ? 6 3 Fail: a\=a ? 5 3 Redo: member(edge(g1,a,b),[edge(g1,a,b),edge(g1,b,c),edge(g1,a,c),edge(g1,d,a),edge(g1,d,b),edge(g1,d,c)]) ? 5 3 Exit: member(edge(g1,b,c),[edge(g1,a,b),edge(g1,b,c),edge(g1,a,c),edge(g1,d,a),edge(g1,d,b),edge(g1,d,c)]) ? 6 3 Call: a\=b ? 7 4 Call: a=b ? 7 4 Fail: a=b ? 6 3 Exit: a\=b ? 5 3...
: a=a ? 6 3 Fail: a\=a ? 5 3 Redo: member(edge(g1,a,b),[edge(g1,a,b),edge(g1,b,c),edge(g1,a,c),edge(g1,d,a),edge(g1,d,b),edge(g1,d,c)]) ? 5 3 Exit: member(edge(g1,b,c),[edge(g1,a,b),edge(g1,b,c),edge(g1,a,c),edge(g1,d,a),edge(g1,d,b),edge(g1,d,c)]) ? 6 3 Call: a\=b ? 7 4 Call: a=b ? 7 4 Fail: a=b ? 6 3 Exit: a\=b ? 5 3...
[ 0.01361083984375, 0.005828857421875, 0.00927734375, 0.028076171875, 0.007171630859375, -0.006317138671875, -0.0089111328125, -0.00012683868408203125, 0.00897216796875, 0.02099609375, 0.0033721923828125, 0.01202392578125, -0.0019683837890625, 0.01458740234375, 0.0186767578125, -0.013732...
[ 152, 10, 1369, 11, 705, 305, 138, 190355, 12, 190, 6096, 31, 32786, 297, 429, 177, 418, 275, 71, 5443, 217, 26265, 201, 3060, 31635, 7103, 442, 28864, 26073, 7, 1250, 4867, 86196, 125728, 214, 91281, 1172, 12803, 15846, 169473, 90, 50...
[ 0.042327880859375, 0.07354736328125, 0.1290283203125, 0.09234619140625, 0.0396728515625, 0.1263427734375, 0.14794921875, 0.235107421875, 0.03021240234375, 0.05712890625, 0.1646728515625, 0.180908203125, 0.212158203125, 0.100830078125, 0.0926513671875, 0.07440185546875, 0.042114257812...
embed
4669564_c0
4669564
prolog
0
Title: Prolog list adding Problem title: Prolog list adding Tags: list, prolog Problem: Prolog list adding --the question has been edited-- Using this data, I need to create a list: team(milan,1). team(napoli,2). team(lazio,3). team(roma,4). team(inter,4). team(juventus,5). So, given a query like: check([milan,lazio,ro...
Prolog list adding Prolog list adding list prolog Prolog Prolog list adding --the question has been edited-- Using this data, I need to create a list: So, given a query like: make a new list with their respective team number. What I'm trying to do is creating a list, adding elements one at a time. Could someone help me...
[ 0.006011962890625, 0.013671875, -0.000018596649169921875, -0.0101318359375, -0.007171630859375, 0.0198974609375, -0.019775390625, 0.0191650390625, 0.0166015625, -0.009033203125, 0.0198974609375, -0.021484375, -0.01373291015625, -0.00127410888671875, -0.00469970703125, 0.0155029296875, ...
[ 1250, 4867, 5303, 154107, 502, 345, 6953, 903, 2053, 3871, 28282, 10, 34475, 41, 1294, 3249, 3525, 678, 2363, 107013, 7175, 14012, 31577, 105233, 80854, 1632, 1733, 4358, 28484 ]
[ 0.1651611328125, 0.24658203125, 0.2259521484375, 0.1612548828125, 0.1279296875, 0.07794189453125, 0.00054931640625, 0.055145263671875, 0.1644287109375, 0.0989990234375, 0.147216796875, 0.04010009765625, 0.0273895263671875, 0.09735107421875, 0.0787353515625, 0.045379638671875, 0.07946...
embed
19449347_c0
19449347
prolog
0
Title: Prolog - add some elements to same list Problem title: Prolog - add some elements to same list Tags: prolog Problem: Prolog - add some elements to same list I have a problem to add elements in a list in Prolog. I use this rule: add(X, L, [X|L]). This rule add an element in the Head of the list. If i would add so...
Prolog - add some elements to same list Prolog - add some elements to same list prolog Prolog Prolog - add some elements to same list I have a problem to add elements in a list in Prolog. I use this rule: This rule add an element in the Head of the list. If i would add some element to the same list i have this problem:...
[ 0.01348876953125, 0.0228271484375, -0.006988525390625, 0.01123046875, -0.01031494140625, 0.022705078125, -0.0186767578125, 0.0020751953125, 0.00982666015625, -0.043212890625, 0.03759765625, -0.013671875, -0.00141143798828125, 0.01025390625, 0.00799560546875, 0.00102996826171875, 0.01...
[ 1250, 4867, 15190, 3060, 80854, 47, 5701, 5303, 502, 2967, 23, 79986, 12830, 44816, 111, 55300, 15490, 15549, 9351, 77336, 339, 304, 363, 154107, 11001 ]
[ 0.14794921875, 0.239013671875, 0.1441650390625, 0.048919677734375, 0.1910400390625, 0.058837890625, 0.1199951171875, 0.1778564453125, 0.0992431640625, 0.090576171875, 0.013641357421875, 0.10528564453125, 0.148681640625, 0.09063720703125, 0.0535888671875, 0.06146240234375, 0.019378662...
embed
44109678_c1
44109678
prolog
1
5,5|...],_8496) at /Users/serrodcal/Repositories/PLExercises1/ex1.pl:3 ERROR: [9] count_occur(5,[5,5|...],0) at /Users/serrodcal/Repositories/PLExercises1/ex1.pl:3 ERROR: [7] <user> ERROR: ERROR: Note: some frames are missing due to last-call optimization. ERROR: Re-run your program in debug mode (:- debug.) to get mor...
5,5|...],_8496) at /Users/serrodcal/Repositories/PLExercises1/ex1.pl:3 ERROR: [9] count_occur(5,[5,5|...],0) at /Users/serrodcal/Repositories/PLExercises1/ex1.pl:3 ERROR: [7] <user> ERROR: ERROR: Note: some frames are missing due to last-call optimization. ERROR: Re-run your program in debug mode (:- debug.) to get mor...
[ -0.000583648681640625, 0.00970458984375, -0.00848388671875, 0.004791259765625, 0.00860595703125, 0.0146484375, -0.02197265625, 0.006439208984375, 0.01092529296875, -0.0380859375, -0.0059814453125, -0.0211181640625, 0.0140380859375, 0.019287109375, 0.0189208984375, -0.035400390625, 0....
[ 78646, 75606, 13903, 109241, 99, 1062, 7, 1314, 2189, 5914, 6827, 59111, 103084, 34058, 10794, 90, 3355, 418, 2424, 363, 151206, 24638, 55737, 54529, 6652, 16820, 104116, 125592, 77495, 65918, 3060, 2674, 132283, 4568, 85763, 87235, 853, 1642...
[ 0.25341796875, 0.04351806640625, 0.1258544921875, 0.2227783203125, 0.01531982421875, 0.048126220703125, 0.0682373046875, 0.011749267578125, 0.0794677734375, 0.08892822265625, 0.15771484375, 0.140625, 0.1666259765625, 0.14501953125, 0.1771240234375, 0.1053466796875, 0.0975341796875, ...
embed
23207540_c0
23207540
prolog
0
Title: What&#x27;s happening when reversing a list with append in Prolog? Problem title: What&#x27;s happening when reversing a list with append in Prolog? Tags: reverse, prolog Problem: What's happening when reversing a list with append in Prolog? I don't quite understand whats happening the this code: reverse2([],[])...
What&#x27;s happening when reversing a list with append in Prolog? What&#x27;s happening when reversing a list with append in Prolog? reverse prolog What Prolog reverse2 What's happening when reversing a list with append in Prolog? I don't quite understand whats happening the this code: It doesn't make sense to me that...
[ -0.0023956298828125, 0.0135498046875, 0.01416015625, 0.009765625, 0.003265380859375, 0.023681640625, 0.0091552734375, 0.0279541015625, 0.02783203125, -0.0019989013671875, 0.015625, -0.0225830078125, -0.003509521484375, 0.00531005859375, 0.0177001953125, 0.00531005859375, 0.0258789062...
[ 4865, 3768, 123087, 3229, 39531, 6953, 5303, 678, 114689, 71, 23, 1250, 4867, 184, 502, 304, 28219, 18151, 10422, 195625, 214, 8108, 1747, 96819, 73342, 12638, 12830, 572, 7103, 3647, 7225, 157578 ]
[ 0.0258026123046875, 0.0125732421875, 0.1112060546875, 0.05181884765625, 0.212890625, 0.1373291015625, 0.16162109375, 0.075927734375, 0.1729736328125, 0.1466064453125, 0.016326904296875, 0.1461181640625, 0.2252197265625, 0.1029052734375, 0.1048583984375, 0.080810546875, 0.046600341796...
embed
19268558_c0
19268558
prolog
0
Title: Meaning of instantiation mode indicators in arguments of Prolog predicates Problem title: Meaning of instantiation mode indicators in arguments of Prolog predicates Tags: signature, prolog, iso-prolog Problem: Meaning of instantiation mode indicators in arguments of Prolog predicates Looking at Prolog documentat...
Meaning of instantiation mode indicators in arguments of Prolog predicates Meaning of instantiation mode indicators in arguments of Prolog predicates signature prolog iso-prolog Meaning Prolog Bar Baz Qux Mop Meaning of instantiation mode indicators in arguments of Prolog predicates Looking at Prolog documentation, pre...
[ 0.0279541015625, 0.0087890625, -0.0036773681640625, -0.015625, 0.001129150390625, 0.019775390625, 0.004852294921875, 0.009521484375, 0.01025390625, 0.01361083984375, 0.0191650390625, -0.025390625, -0.0145263671875, -0.0024871826171875, -0.004119873046875, -0.00933837890625, 0.0187988...
[ 1215, 11, 34648, 14, 13736, 172075, 7, 10750, 1250, 4867, 1653, 2063, 138256, 502, 13882, 3454, 3253, 36490, 10022, 425, 276, 2146, 2320, 209806, 67, 68018, 59121, 237, 25632, 997, 20, 136, 705, 100, 29481, 2856, 4734, 32316, 1286 ]
[ 0.0631103515625, 0.11083984375, 0.1126708984375, 0.11083984375, 0.1298828125, 0.2156982421875, 0.05767822265625, 0.1634521484375, 0.1290283203125, 0.196533203125, 0.169921875, 0.1939697265625, 0.21630859375, 0.08544921875, 0.0838623046875, 0.08905029296875, 0.134033203125, 0.109130...
embed
20620305_c0
20620305
prolog
0
Title: Overview about a Prolog project Problem title: Overview about a Prolog project Tags: prolog, swi-prolog, xpce Problem: Overview about a Prolog project I've written a bigger project in (SWI-)Prolog. For a better overview about the predicates and the relationships between them, I'm searching for a functionality to...
Overview about a Prolog project Overview about a Prolog project prolog swi-prolog xpce Overview Prolog Overview about a Prolog project I've written a bigger project in (SWI-)Prolog. For a better overview about the predicates and the relationships between them, I'm searching for a functionality to illustrate that. At th...
[ 0.0208740234375, 0.01495361328125, 0.00421142578125, 0.012939453125, -0.01080322265625, 0.003936767578125, 0.011474609375, -0.01708984375, 0.0030059814453125, -0.01422119140625, 0.0162353515625, 0.00885009765625, -0.03125, -0.000492095947265625, 0.023193359375, 0.00106048583984375, 0...
[ 9578, 22751, 1672, 1250, 4867, 13452, 502, 2452, 3454, 1022, 254, 329, 59121, 167785, 38969, 10752, 11522, 645, 1653, 2063, 151618, 17721, 2856, 157318, 123309, 58755, 45005, 10854, 111938, 12018, 669, 67, 186490, 65290, 4597, 54591, 11782 ]
[ 0.0762939453125, 0.1859130859375, 0.032470703125, 0.1630859375, 0.2442626953125, 0.1810302734375, 0.12158203125, 0.1552734375, 0.10986328125, 0.06085205078125, 0.061126708984375, 0.1435546875, 0.07550048828125, 0.037200927734375, 0.138916015625, 0.1341552734375, 0.0474853515625, 0....
embed
67599760_c0
67599760
prolog
0
Title: Listing all possible solutions Prolog Problem title: Listing all possible solutions Prolog Tags: prolog Problem: Listing all possible solutions Prolog I am a beginner for prolog and I want to list all possible solution for all variables for example : word(V1,V2,V3) :- some code I want all possible values for V1 ...
Listing all possible solutions Prolog Listing all possible solutions Prolog prolog Listing Prolog Listing all possible solutions Prolog I am a beginner for prolog and I want to list all possible solution for all variables for example : I want all possible values for V1 to V3 , so instead of returning it return I tried ...
[ 0.017333984375, 0.005218505859375, -0.008544921875, 0.00982666015625, -0.005706787109375, 0.0184326171875, -0.0096435546875, -0.00159454345703125, -0.00421142578125, -0.03125, -0.00531005859375, -0.0152587890625, 0.00799560546875, 0.012939453125, -0.006500244140625, 0.016845703125, 0...
[ 32036, 214, 756, 7722, 51347, 1250, 4867, 502, 1679, 3444, 47, 5303, 29806, 77336, 27781, 142424, 310, 363, 64457, 30646, 7413, 5584, 18499, 4527 ]
[ 0.1614990234375, 0.07696533203125, 0.1636962890625, 0.218017578125, 0.223388671875, 0.1552734375, 0.24072265625, 0.1124267578125, 0.041473388671875, 0.06048583984375, 0.051025390625, 0.152587890625, 0.1776123046875, 0.1636962890625, 0.06640625, 0.093994140625, 0.072509765625, 0.091...
embed
49926965_c0
49926965
prolog
0
Title: Prolog predicate from another perspective Problem title: Prolog predicate from another perspective Tags: prolog Problem: Prolog predicate from another perspective I'm working with this code. I'm struggling with the prolog logic paradigm. I have these two questions. Is there a way to change the path predicate to ...
Prolog predicate from another perspective Prolog predicate from another perspective prolog another Prolog Prolog predicate from another perspective I'm working with this code. I'm struggling with the prolog logic paradigm. I have these two questions. Is there a way to change the path predicate to not only get the "best...
[ 0.022216796875, 0.003021240234375, -0.0040283203125, 0.005828857421875, -0.005218505859375, 0.01397705078125, 0.005462646484375, -0.026611328125, 0.00433349609375, -0.062255859375, 0.000926971435546875, 0.00958251953125, -0.0189208984375, -0.00885009765625, 0.00390625, -0.0064392089843...
[ 1250, 4867, 1653, 2063, 67, 1295, 15700, 80280, 502, 20697, 18151, 237875, 62775, 214709, 6626, 17582, 3917, 47, 15549, 60875, 2046, 32168, 756, 37105, 110, 87632, 12989, 3249, 1286, 65918, 101786, 183540, 31913, 3444, 74481, 4759, 4445, 332,...
[ 0.16796875, 0.238037109375, 0.183349609375, 0.20166015625, 0.098388671875, 0.06988525390625, 0.114990234375, 0.2169189453125, 0.135009765625, 0.03759765625, 0.1260986328125, 0.08349609375, 0.1629638671875, 0.1654052734375, 0.099609375, 0.04150390625, 0.059814453125, 0.0036010742187...
embed
20009868_c0
20009868
prolog
0
Title: how can i draw star triangle using recursive in prolog? Problem title: how can i draw star triangle using recursive in prolog? Tags: prolog Problem: how can i draw star triangle using recursive in prolog? this code using to draw triangle please can any one explain how it work predicates star(integer). count(inte...
how can i draw star triangle using recursive in prolog? how can i draw star triangle using recursive in prolog? prolog recursive x-1 how can i draw star triangle using recursive in prolog? this code using to draw triangle please can any one explain how it work this code draw 5 star ,4,3,2,1 how i doing to begin from 1,...
[ 0.01324462890625, -0.00567626953125, -0.005126953125, -0.0011138916015625, -0.00185394287109375, 0.01031494140625, 0.002685546875, 0.009033203125, 0.0096435546875, -0.0027923583984375, 0.00165557861328125, -0.01953125, -0.00390625, 0.02099609375, 0.0196533203125, -0.0087890625, 0.029...
[ 3642, 831, 17, 79442, 6057, 1927, 109217, 17368, 195625, 5844, 502, 4867, 1022, 5759, 23, 18151, 73342, 4488, 190, 617, 363, 418, 9842, 1295, 25568, 80389 ]
[ 0.03289794921875, 0.034881591796875, 0.025970458984375, 0.158447265625, 0.200439453125, 0.1915283203125, 0.2177734375, 0.030975341796875, 0.189453125, 0.1937255859375, 0.128173828125, 0.2108154296875, 0.0452880859375, 0.0997314453125, 0.006561279296875, 0.1121826171875, 0.01597595214...
embed
65460353_c0
65460353
prolog
0
Title: how to print the first letter of few words in prolog list? Problem title: how to print the first letter of few words in prolog list? Tags: prolog, win-prolog Problem: how to print the first letter of few words in prolog list? I want to print the name code input by user begin:-read(X), name(X,L), write('Name Code...
how to print the first letter of few words in prolog list? how to print the first letter of few words in prolog list? prolog win-prolog begin:-read Name Jenny Liz Ane JLA how to print the first letter of few words in prolog list? I want to print the name code input by user The Name Code below is the output i want to ge...
[ -0.00787353515625, -0.0113525390625, -0.005035400390625, 0.0294189453125, -0.007171630859375, 0.01409912109375, 0.017578125, 0.00848388671875, 0.00157928466796875, -0.0072021484375, 0.00872802734375, 0.002593994140625, 0.01470947265625, 0.00787353515625, -0.0035400390625, -0.0049743652...
[ 3642, 47, 28412, 5117, 31330, 111, 10846, 34153, 502, 4867, 5303, 19916, 3454, 9842, 39116, 15757, 102531, 102572, 92440, 821, 8356, 23, 3444, 9351, 18151, 107730, 38937, 28864, 35064, 140992, 2046, 49814 ]
[ 0.062255859375, 0.04364013671875, 0.193115234375, 0.132080078125, 0.1741943359375, 0.0701904296875, 0.18017578125, 0.138427734375, 0.1387939453125, 0.2078857421875, 0.1309814453125, 0.114013671875, 0.1090087890625, 0.072265625, 0.1287841796875, 0.127197265625, 0.153076171875, 0.088...
embed
44447546_c0
44447546
prolog
0
Title: How to do &#x27;Average&#x27; in Prolog? Problem title: How to do &#x27;Average&#x27; in Prolog? Tags: prolog Problem: How to do 'Average' in Prolog? I'm trying to do a predicate of average in Prolog, but I'm facing some problems, it's called average(N,X), with N is a number, and X is the result of the average f...
How to do &#x27;Average&#x27; in Prolog? How to do &#x27;Average&#x27; in Prolog? prolog How Average Prolog N-1 How to do 'Average' in Prolog? I'm trying to do a predicate of average in Prolog, but I'm facing some problems, it's called average(N,X), with N is a number, and X is the result of the average from 1 to N . I...
[ 0.017578125, -0.003173828125, 0.00897216796875, -0.001007080078125, -0.00445556640625, 0.0135498046875, 0.0181884765625, 0.0019989013671875, 0.00543212890625, -0.032470703125, 0.0289306640625, -0.01275634765625, -0.0225830078125, -0.00762939453125, 0.0228271484375, 0.01531982421875, ...
[ 11249, 47, 54, 3768, 284, 814, 4588, 23, 1250, 4867, 502, 40168, 29838, 541, 5759, 31577, 1653, 2063, 67, 111, 83080, 44402, 35839, 839, 1542, 14012, 1193, 16750, 106, 4488, 4358 ]
[ 0.09912109375, 0.03515625, 0.10321044921875, 0.09185791015625, 0.09405517578125, 0.2188720703125, 0.1922607421875, 0.0877685546875, 0.1893310546875, 0.266845703125, 0.0972900390625, 0.20068359375, 0.1640625, 0.08782958984375, 0.1448974609375, 0.00830078125, 0.0960693359375, 0.11181...
embed
49141006_c0
49141006
prolog
0
Title: Trying to get a list element by index in prolog Problem title: Trying to get a list element by index in prolog Tags: prolog Problem: Trying to get a list element by index in prolog This is what I have so far: getByIndex([X],0,E):- E is X. getByIndex([H|_],0,E):- E is H. getByIndex([_|T],I,E) :- getByIndex(T,I-1,...
Trying to get a list element by index in prolog Trying to get a list element by index in prolog prolog Trying I-1 Trying to get a list element by index in prolog This is what I have so far: It seems to work when requesting the first element, but not subsequent elements, and I can't quite figure out why. I'm aware that ...
[ -0.0035400390625, 0.008056640625, 0.0032958984375, 0.00982666015625, -0.01251220703125, -0.006011962890625, -0.0064697265625, 0.0140380859375, 0.015625, -0.025146484375, 0.017822265625, -0.0218505859375, -0.04443359375, 0.001556396484375, 0.0091552734375, -0.004974365234375, 0.042968...
[ 40858, 214, 2046, 5303, 12830, 390, 63262, 502, 4867, 87, 5759, 23, 2060, 37202, 4488, 3229, 50336, 5117, 1284, 959, 221419, 80854, 831, 32233, 26366, 15400, 107419, 13648, 88303, 29806, 159, 38969, 3454, 1884, 28219, 35782, 7 ]
[ 0.0723876953125, 0.032562255859375, 0.0748291015625, 0.159423828125, 0.168212890625, 0.0855712890625, 0.20947265625, 0.149169921875, 0.2489013671875, 0.0261993408203125, 0.0740966796875, 0.004058837890625, 0.05340576171875, 0.0042724609375, 0.06915283203125, 0.005584716796875, 0.1558...
embed
36411848_c0
36411848
prolog
0
Title: How to use tranpose and findall to print all the variables in a predicate Problem title: How to use tranpose and findall to print all the variables in a predicate Tags: transpose, prolog, prolog-findall Problem: How to use tranpose and findall to print all the variables in a predicate I wanted to know how I coul...
How to use tranpose and findall to print all the variables in a predicate How to use tranpose and findall to print all the variables in a predicate transpose prolog prolog-findall How How to use tranpose and findall to print all the variables in a predicate I wanted to know how I could use tranpose and findall to list ...
[ 0.01806640625, -0.00531005859375, -0.0103759765625, 0.004852294921875, -0.003204345703125, -0.000797271728515625, -0.006256103515625, 0.0118408203125, 0.004638671875, -0.0498046875, 0.00274658203125, -0.01806640625, 0.0113525390625, -0.010009765625, -0.025146484375, 0.0084228515625, ...
[ 11249, 4527, 30334, 78381, 136, 7413, 5584, 28412, 756, 77336, 7, 1653, 2063, 67, 70, 23, 3900, 502, 4867, 111607, 36663, 3642, 5809, 5303, 92054, 2182, 44116, 237, 50944, 425, 678 ]
[ 0.06591796875, 0.09259033203125, 0.2021484375, 0.23291015625, 0.0836181640625, 0.1402587890625, 0.209716796875, 0.1937255859375, 0.1044921875, 0.20849609375, 0.00946044921875, 0.146484375, 0.1829833984375, 0.0791015625, 0.004974365234375, 0.01495361328125, 0.1768798828125, 0.072998...
embed
20466747_c0
20466747
prolog
0
Title: Range query over a Binary Search Tree in Prolog Problem title: Range query over a Binary Search Tree in Prolog Tags: prolog, binary-search-tree Problem: Range query over a Binary Search Tree in Prolog I know how to perform a range query over a BST in procedural way (that is, in C++, Java and so on) but I find it...
Range query over a Binary Search Tree in Prolog Range query over a Binary Search Tree in Prolog prolog binary-search-tree Range Binary Search Tree Prolog Range query over a Binary Search Tree in Prolog I know how to perform a range query over a BST in procedural way (that is, in C++, Java and so on) but I find it diffi...
[ 0.0203857421875, 0.0185546875, 0.01129150390625, -0.022216796875, 0.01068115234375, 0.028564453125, -0.0240478515625, -0.0093994140625, -0.017822265625, -0.021728515625, -0.00732421875, 0.0019683837890625, 0.00433349609375, 0.000469207763671875, 0.0201416015625, 0.005828857421875, 0....
[ 142462, 41, 1294, 645, 54092, 33086, 101344, 1250, 4867, 502, 2394, 6635, 86250, 62600, 3714, 51339, 37457, 335, 8545, 59158, 37223, 41925, 34844, 96760, 3934, 46876, 3917, 1884, 429, 2472, 35662, 275, 271, 19770, 73, 94250, 5122, 148663 ]
[ 0.2281494140625, 0.154541015625, 0.109130859375, 0.1087646484375, 0.17626953125, 0.16650390625, 0.218505859375, 0.1529541015625, 0.232177734375, 0.115966796875, 0.16162109375, 0.060821533203125, 0.1536865234375, 0.1929931640625, 0.00408935546875, 0.08392333984375, 0.204833984375, 0...
embed
44289749_c0
44289749
prolog
0
Title: Prolog unique value in list Problem title: Prolog unique value in list Tags: prolog Problem: Prolog unique value in list I learing Prolog language for exam at college and I don't know how to create function which: check unique values in list. I mean, if each value in list are unique function return true, otherwi...
Prolog unique value in list Prolog unique value in list prolog Prolog Prolog unique value in list I learing Prolog language for exam at college and I don't know how to create function which: check unique values in list. I mean, if each value in list are unique function return true, otherwise return false. eg. Header fo...
[ 0.017578125, 0.007415771484375, 0.025390625, -0.0274658203125, -0.0098876953125, 0.0220947265625, 0.01507568359375, -0.0159912109375, 0.00433349609375, 0.00628662109375, -0.00098419189453125, -0.0024566650390625, 0.006103515625, -0.00136566162109375, 0.005859375, 0.021240234375, 0.00...
[ 1250, 4867, 36998, 34292, 23, 5303, 502, 101098, 46876, 42276, 40466, 3714, 3642, 28282, 32354, 12765, 142424, 12638, 621, 30646, 29568, 98320, 44816, 56, 42272, 21049, 1542, 1193, 29459, 6183, 18, 73342, 1353, 4358 ]
[ 0.1484375, 0.2410888671875, 0.270263671875, 0.2479248046875, 0.0819091796875, 0.22900390625, 0.1173095703125, 0.003814697265625, 0.1126708984375, 0.08984375, 0.07275390625, 0.042724609375, 0.0145111083984375, 0.1324462890625, 0.2001953125, 0.2030029296875, 0.25, 0.045135498046875, ...
embed
23280176_c0
23280176
prolog
0
Title: Basis about input and ouput in SWI-Prolog Problem title: Basis about input and ouput in SWI-Prolog Tags: prolog Problem: Basis about input and ouput in SWI-Prolog Can anyone tell me where can I find a nice documentation about input and output in Prolog? I need to ask some questions to the users based on some fac...
Basis about input and ouput in SWI-Prolog Basis about input and ouput in SWI-Prolog prolog Basis SWI-Prolog best_team Basis about input and ouput in SWI-Prolog Can anyone tell me where can I find a nice documentation about input and output in Prolog? I need to ask some questions to the users based on some facts and rul...
[ 0.0133056640625, 0.0106201171875, 0.008056640625, 0.020751953125, -0.000713348388671875, 0.0133056640625, 0.007171630859375, -0.0177001953125, 0.01806640625, -0.036376953125, 0.01025390625, -0.0107421875, -0.01275634765625, 0.025146484375, 0.0185546875, 0.0084228515625, 0.03271484375...
[ 76336, 1672, 107730, 136, 628, 7077, 159, 38969, 10752, 4867, 502, 2965, 44420, 7413, 26267, 209806, 140992, 23, 1250, 26458, 17582, 72095, 35509, 15824, 91736, 4171, 121399, 7175, 9351, 83, 38937, 831, 33022, 1884, 87, 35166, 27781, 2583, ...
[ 0.2353515625, 0.048919677734375, 0.2442626953125, 0.1318359375, 0.1951904296875, 0.123779296875, 0.06781005859375, 0.225830078125, 0.1632080078125, 0.25341796875, 0.113525390625, 0.143798828125, 0.21826171875, 0.0216064453125, 0.023590087890625, 0.197509765625, 0.2451171875, 0.0590...
embed
12935552_c0
12935552
prolog
0
Title: What is the meaning of slash after the predicate name in Prolog? Problem title: What is the meaning of slash after the predicate name in Prolog? Tags: prolog, predicate Problem: What is the meaning of slash after the predicate name in Prolog? I've read the SO questions what does slash(/) do in prolog? and What i...
What is the meaning of slash after the predicate name in Prolog? What is the meaning of slash after the predicate name in Prolog? prolog predicate What Prolog Solve What is the meaning of slash after the predicate name in Prolog? I've read the SO questions what does slash(/) do in prolog? and What is the meaning of pre...
[ 0.0186767578125, 0.00823974609375, -0.000858306884765625, 0.018798828125, -0.025634765625, 0.0272216796875, 0.0093994140625, -0.006927490234375, 0.0169677734375, -0.0224609375, 0.00469970703125, -0.022705078125, -0.00714111328125, -0.01446533203125, -0.01409912109375, 0.017333984375, ...
[ 4865, 91084, 91, 5544, 7103, 1653, 2063, 67, 9351, 23, 1250, 4867, 502, 6678, 272, 111, 15969, 64, 54, 191560, 11583, 38969, 10752, 57143, 185709, 17357, 2016, 55681, 136, 14012, 29459 ]
[ 0.00555419921875, 0.1832275390625, 0.1048583984375, 0.259521484375, 0.1614990234375, 0.1771240234375, 0.189208984375, 0.08740234375, 0.138427734375, 0.051300048828125, 0.169189453125, 0.2313232421875, 0.1199951171875, 0.1510009765625, 0.146484375, 0.025421142578125, 0.023971557617187...
embed
9026035_c0
9026035
prolog
0
Title: Variables and how they are set and used in prolog Problem title: Variables and how they are set and used in prolog Tags: prolog Problem: Variables and how they are set and used in prolog http://www.csupomona.edu/~jrfisher/www/prolog_tutorial/2_1.html So on that tutorial where it has: conflict(Coloring) :- adjace...
Variables and how they are set and used in prolog Variables and how they are set and used in prolog prolog Variables Coloring Color Variables and how they are set and used in prolog http://www.csupomona.edu/~jrfisher/www/prolog_tutorial/2_1.html So on that tutorial where it has: Am I understanding this correctly, that ...
[ 0.00775146484375, -0.005767822265625, -0.0078125, 0.0283203125, 0.003875732421875, 0.0078125, -0.00762939453125, 0.02294921875, 0.0025787353515625, 0.002166748046875, -0.01043701171875, 0.0130615234375, -0.0091552734375, -0.007659912109375, 0.01953125, 0.007049560546875, 0.0012893676...
[ 111477, 13566, 136, 3642, 1836, 5423, 11814, 502, 4867, 23, 51193, 214, 65126, 87039, 84433, 3454, 77275, 57143, 2022, 87, 100094, 26785, 83, 10, 77336, 47, 34292, 7103, 5117, 11782, 10576, 17932 ]
[ 0.22412109375, 0.1778564453125, 0.0255889892578125, 0.028472900390625, 0.013275146484375, 0.1578369140625, 0.1356201171875, 0.169921875, 0.2310791015625, 0.04840087890625, 0.263916015625, 0.04351806640625, 0.008941650390625, 0.05133056640625, 0.0322265625, 0.0941162109375, 0.04583740...
embed
7885056_c0
7885056
prolog
0
Title: Prolog counting elements in list Problem title: Prolog counting elements in list Tags: list, prolog Problem: Prolog counting elements in list I want to count how many g items appear in a list, below is the code I was trying now, but I got false when return. g(E) :- memberchk(E, [apple, orange, pear, grape, lycee...
Prolog counting elements in list Prolog counting elements in list list prolog Prolog Fruits No1 Prolog counting elements in list I want to count how many g items appear in a list, below is the code I was trying now, but I got false when return.
[ 0.01495361328125, 0.006072998046875, -0.027099609375, -0.0115966796875, 0.00286865234375, 0.01507568359375, -0.0034942626953125, 0.0032196044921875, 0.0181884765625, 0.005615234375, -0.0091552734375, -0.044921875, 0.00457763671875, 0.0106201171875, 0.017333984375, -0.01519775390625, ...
[ 1250, 4867, 54529, 80854, 23, 5303, 214, 502, 151958, 7, 438, 418, 3444, 3642, 5941, 706, 55769, 108975, 35064, 18151, 31577, 98320, 30646, 5 ]
[ 0.1627197265625, 0.232177734375, 0.1993408203125, 0.201171875, 0.0382080078125, 0.182373046875, 0.02996826171875, 0.10321044921875, 0.1925048828125, 0.007686614990234375, 0.02679443359375, 0.01123046875, 0.046600341796875, 0.022552490234375, 0.10064697265625, 0.1922607421875, 0.16455...
embed
39059224_c0
39059224
prolog
0
Title: Prove X is before Y Prolog Problem title: Prove X is before Y Prolog Tags: prolog Problem: Prove X is before Y Prolog I have these facts: before CS206 is CS121 before CS121 is CS120 before CS120 is CS101 before CS101 is CS100 I am trying to write some Prolog code to prove before CS206 is CS100 This is what I hav...
Prove X is before Y Prolog Prove X is before Y Prolog prolog Prove Prolog CS206 CS121 CS120 CS101 CS100 Prove X is before Y Prolog I have these facts: I am trying to write some Prolog code to prove before CS206 is CS100 This is what I have but I am getting a stack overflow because my recursion is messed up
[ 0.0012054443359375, 0.0126953125, 0.007476806640625, 0.0294189453125, -0.0106201171875, -0.00164031982421875, -0.019287109375, -0.00396728515625, 0.004638671875, -0.0252685546875, 0.0068359375, 0.015625, -0.00189208984375, -0.0133056640625, 0.00701904296875, -0.0047607421875, 0.00445...
[ 1250, 272, 1193, 83, 8108, 990, 4867, 502, 25841, 139652, 129697, 20840, 35046, 3559, 15824, 31577, 33022, 18151, 23534, 177261, 645, 118664, 195625, 1830, 2409, 5281, 1257 ]
[ 0.1787109375, 0.15771484375, 0.176025390625, 0.10748291015625, 0.200439453125, 0.2047119140625, 0.26171875, 0.1165771484375, 0.1248779296875, 0.265869140625, 0.142333984375, 0.124755859375, 0.1368408203125, 0.2286376953125, 0.069580078125, 0.049652099609375, 0.0192718505859375, 0.0...
embed
508887_c0
508887
prolog
0
Title: Normalizing space characters in Prolog atoms Problem title: Normalizing space characters in Prolog atoms Tags: string, whitespace, prolog Problem: Normalizing space characters in Prolog atoms What is the best way to normalize whitespace characters (space, newline, tab) in a Prolog atom, e.g. in SWI-Prolog. I.e. ...
Normalizing space characters in Prolog atoms Normalizing space characters in Prolog atoms string whitespace prolog Normalizing Prolog normalize_space_in_atom Atom1 Atom2 Normalizing space characters in Prolog atoms What is the best way to normalize whitespace characters (space, newline, tab) in a Prolog atom, e.g. in S...
[ 0.0078125, 0.0113525390625, 0.00170135498046875, 0.027099609375, -0.00555419921875, 0.0186767578125, 0.006256103515625, 0.01287841796875, -0.006622314453125, 0.0224609375, 0.0240478515625, 0.01190185546875, -0.017578125, -0.0054931640625, -0.005279541015625, -0.00653076171875, 0.0233...
[ 28723, 84382, 32628, 124850, 23, 1250, 4867, 34627, 79315, 35011, 65421, 502, 3638, 20650, 73, 5928, 69728, 418, 304, 2965, 3917, 47, 3525, 2256, 20928, 38969, 10752, 1884, 79986, 2499, 944, 69347, 3934, 11001, 4034, 351, 3564 ]
[ 0.1849365234375, 0.136474609375, 0.1856689453125, 0.206298828125, 0.03326416015625, 0.1439208984375, 0.2174072265625, 0.1983642578125, 0.1470947265625, 0.154541015625, 0.2293701171875, 0.0941162109375, 0.1883544921875, 0.170654296875, 0.06549072265625, 0.1351318359375, 0.185791015625...
embed
54119834_c0
54119834
prolog
0
Title: Understanding negation in Prolog Problem title: Understanding negation in Prolog Tags: prolog Problem: Understanding negation in Prolog Given the following knowledge base: car(X) :- ferrari(X). car(X) :- bmw(X). car(X) :- ford(X). ferrari(f). ferrari(y). bmw(b). ford(a). Why is it that these two (seemingly ident...
Understanding negation in Prolog Understanding negation in Prolog prolog Understanding Prolog Rule Understanding negation in Prolog Given the following knowledge base: Why is it that these two (seemingly identical) rules produce completely different results when I query them?
[ 0.0234375, 0.00433349609375, -0.01116943359375, 0.014892578125, 0.007080078125, 0.0159912109375, 0.015625, 0.0022125244140625, 0.03173828125, -0.015380859375, -0.0301513671875, 0.000499725341796875, -0.002532958984375, 0.00958251953125, -0.0019989013671875, -0.00830078125, 0.02172851...
[ 9626, 144057, 108, 125682, 1250, 4867, 23, 502, 139118, 51359, 3647, 44084, 6097, 6626, 21231, 14578, 31943, 6827, 91736, 27489, 64557, 12921, 50339, 41, 1294 ]
[ 0.10028076171875, 0.08905029296875, 0.1805419921875, 0.2216796875, 0.16162109375, 0.2431640625, 0.025665283203125, 0.0928955078125, 0.14990234375, 0.02008056640625, 0.02630615234375, 0.07855224609375, 0.0106658935546875, 0.06597900390625, 0.024932861328125, 0.0662841796875, 0.0754394...
embed
55331162_c1
55331162
prolog
1
LL). lst_2_lst_of_lst_helper([H|T], N, N, [[H]|LL]):- lst_2_lst_of_lst(T, N, LL). lst_2_lst_of_lst_helper([H|T], N1 , N, [[H|TMP]|LL]):- N2 is N1 + 1, lst_2_lst_of_lst_helper(T, N2 , N, [TMP| LL]). After calls to ...readAll(F,Input), ... lst_2_lst_of_lst(Input, C, LL) (C is 4, read in from first line of F, the text fi...
LL). lst_2_lst_of_lst_helper([H|T], N, N, [[H]|LL]):- lst_2_lst_of_lst(T, N, LL). lst_2_lst_of_lst_helper([H|T], N1 , N, [[H|TMP]|LL]):- N2 is N1 + 1, lst_2_lst_of_lst_helper(T, N2 , N, [TMP| LL]). After calls to ...readAll(F,Input), ... lst_2_lst_of_lst(Input, C, LL) (C is 4, read in from first line of F, the text fi...
[ 0.00958251953125, -0.0291748046875, 0.0091552734375, 0.006988525390625, 0.0096435546875, 0.0260009765625, 0.006134033203125, -0.008056640625, -0.0027313232421875, -0.0186767578125, -0.0018463134765625, -0.017333984375, 0.005828857421875, -0.01385498046875, 0.0166015625, -0.012268066406...
[ 99954, 194, 96, 271, 454, 304, 141, 4390, 73866, 56, 841, 58745, 618, 541, 23708, 418, 9088, 83, 997, 106, 24372, 11782, 39116, 43512, 919, 4153, 7077, 313, 441, 201, 12301, 23, 1295, 5117, 13315, 111, 563, 7986, 11435, 16, 2646, 4358...
[ 0.21142578125, 0.0870361328125, 0.0556640625, 0.140869140625, 0.027862548828125, 0.17822265625, 0.0428466796875, 0.21728515625, 0.25341796875, 0.164794921875, 0.0775146484375, 0.0101318359375, 0.06982421875, 0.124267578125, 0.1392822265625, 0.03857421875, 0.173095703125, 0.04113769...
embed
25712213_c0
25712213
prolog
0
Title: I want to run and display names of cities of a particular region in prolog Problem title: I want to run and display names of cities of a particular region in prolog Tags: prolog Problem: I want to run and display names of cities of a particular region in prolog southeast(awka,is_in_south-east_Nigeria). southeast...
I want to run and display names of cities of a particular region in prolog I want to run and display names of cities of a particular region in prolog prolog is_in_south-east_Nigeria I want to run and display names of cities of a particular region in prolog
[ 0.01409912109375, -0.018310546875, 0.0224609375, 0.0213623046875, -0.00628662109375, 0.01129150390625, -0.015380859375, 0.0198974609375, -0.00738525390625, 0.003021240234375, -0.0026397705078125, 0.002593994140625, -0.00408935546875, 0.0089111328125, 0.016357421875, 0.0145263671875, ...
[ 3444, 11675, 136, 44116, 123055, 162708, 17311, 10776, 502, 4867, 83, 73, 49760, 927, 13, 4438, 14535, 134431 ]
[ 0.07373046875, 0.1307373046875, 0.0640869140625, 0.1590576171875, 0.1563720703125, 0.152587890625, 0.0745849609375, 0.15234375, 0.1468505859375, 0.2249755859375, 0.02972412109375, 0.079833984375, 0.0679931640625, 0.04229736328125, 0.0283050537109375, 0.103515625, 0.0947265625, 0.16...
embed
14953960_c0
14953960
prolog
0
Title: How to translate a sentence in a logical language using prolog? Problem title: How to translate a sentence in a logical language using prolog? Tags: prolog Problem: How to translate a sentence in a logical language using prolog? I have a sentence and its syntax, where can I find the predicates prolog that allow ...
How to translate a sentence in a logical language using prolog? How to translate a sentence in a logical language using prolog? prolog prolog How NNP John VBP Mary How to translate a sentence in a logical language using prolog? I have a sentence and its syntax, where can I find the predicates prolog that allow me to wr...
[ 0.0107421875, 0.0037689208984375, -0.006256103515625, 0.023193359375, 0.01513671875, 0.023681640625, 0.00970458984375, 0.007293701171875, 0.001129150390625, -0.0703125, 0.0203857421875, 0.0174560546875, -0.035400390625, -0.026611328125, 0.0198974609375, 0.008056640625, 0.0185546875, ...
[ 11249, 47, 3900, 19309, 149357, 62775, 289, 46876, 17368, 502, 4867, 10, 23, 541, 28814, 4939, 310, 56861, 23213, 86531, 7413, 1653, 2063, 1636, 63769, 33022, 4358, 28282, 67, 51776, 107730, 25632, 79315, 30646, 903 ]
[ 0.08203125, 0.02703857421875, 0.1444091796875, 0.1927490234375, 0.1778564453125, 0.154541015625, 0.1192626953125, 0.13330078125, 0.022247314453125, 0.154052734375, 0.2490234375, 0.0020751953125, 0.00433349609375, 0.0283355712890625, 0.1690673828125, 0.17333984375, 0.0845947265625, ...
embed
71490408_c1
71490408
prolog
1
332+1 ERROR: [11] dosomething([1,2]) at c:/users/v/documents/prolog/bw.pl:24 ERROR: [10] go at c:/users/v/documents/prolog/bw.pl:26 ERROR: [9] toplevel_call(user:user:go) at c:/program files/swipl/boot/toplevel.pl:1117 ERROR: ERROR: Note: some frames are missing due to last-call optimization. ERROR: Re-run your program...
332+1 ERROR: [11] dosomething([1,2]) at c:/users/v/documents/prolog/bw.pl:24 ERROR: [10] go at c:/users/v/documents/prolog/bw.pl:26 ERROR: [9] toplevel_call(user:user:go) at c:/program files/swipl/boot/toplevel.pl:1117 ERROR: ERROR: Note: some frames are missing due to last-call optimization. ERROR: Re-run your program...
[ 0.0021514892578125, 0.0247802734375, 0.0159912109375, 0.003814697265625, -0.003570556640625, 0.035400390625, -0.007659912109375, 0.0047607421875, 0.0216064453125, -0.035400390625, 0.001617431640625, -0.0260009765625, -0.0184326171875, 0.001190185546875, 0.01904296875, -0.0263671875, ...
[ 123128, 21748, 151206, 24638, 73068, 54, 43452, 64113, 132, 133063, 99, 501, 12, 223, 1314, 334, 117432, 3454, 4867, 93409, 2424, 25732, 6, 63709, 738, 5, 28194, 55737, 2663, 67919, 85763, 65918, 519, 18749, 102158, 2452, 80765, 64, 13784, ...
[ 0.33203125, 0.27001953125, 0.1995849609375, 0.1580810546875, 0.18359375, 0.1512451171875, 0.10516357421875, 0.2066650390625, 0.0268096923828125, 0.18994140625, 0.06512451171875, 0.030792236328125, 0.03424072265625, 0.1175537109375, 0.1407470703125, 0.1734619140625, 0.1199951171875, ...
embed
5589008_c2
5589008
prolog
2
644'). noun(battle). noun(slain). noun(defeated). noun(killed). Code signals: Prolog, noun_phrase, np2, tostig_godwinson, verb_phrase, battle_of_Winwaed, king_of_mercia, king_of_bernicians, took_place, battle_of_Stamford_Bridge, herald_hardrada, battle_of_Boroughbridge, earl_of_lancaster, battle_of_Towton, palm_Sunday,...
644'). noun(battle). noun(slain). noun(defeated). noun(killed). Code signals: Prolog, noun_phrase, np2, tostig_godwinson, verb_phrase, battle_of_Winwaed, king_of_mercia, king_of_bernicians, took_place, battle_of_Stamford_Bridge, herald_hardrada, battle_of_Boroughbridge, earl_of_lancaster, battle_of_Towton, palm_Sunday,...
[ -0.010498046875, 0.006683349609375, 0.00201416015625, 0.0235595703125, 0.008056640625, 0.01324462890625, 0.0220947265625, 0.0137939453125, 0.01708984375, -0.0281982421875, -0.006439208984375, 0.00244140625, -0.00897216796875, -0.020751953125, 0.00640869140625, -0.0012664794921875, 0....
[ 6, 185355, 25, 194, 110, 309, 402, 46401, 16442, 112, 88981, 297, 91699, 71, 28864, 26073, 7, 12, 1250, 4867, 179665, 184, 25037, 304, 47, 25774, 9494, 1681, 42792, 133868, 4390, 92049, 634, 60097, 99932, 11, 1297, 4158, 10133, 34739, 2...
[ 0.08935546875, 0.342041015625, 0.1866455078125, 0.1285400390625, 0.09619140625, 0.1490478515625, 0.15478515625, 0.2247314453125, 0.224365234375, 0.109619140625, 0.1912841796875, 0.1475830078125, 0.1368408203125, 0.1116943359375, 0.259521484375, 0.280517578125, 0.11376953125, 0.0520...
embed
42014602_c0
42014602
prolog
0
Title: Prolog summing first indices of lists Problem title: Prolog summing first indices of lists Tags: recursion, prolog, list Problem: Prolog summing first indices of lists I'm new to Prolog, trying to sum up only the first elements of each list. takeFirst([[1,2,3],[4,5,6],[7,8,9]],R). --> R=1+4+7=12 It keeps outputt...
Prolog summing first indices of lists Prolog summing first indices of lists recursion prolog list Prolog Prolog summing first indices of lists I'm new to Prolog, trying to sum up only the first elements of each list. It keeps outputting false and I don't understand what I'm missing here. does anyone see what is wrong h...
[ 0.0185546875, 0.01214599609375, 0.016357421875, 0.0000934600830078125, -0.0198974609375, -0.00007581710815429688, -0.000621795654296875, 0.01397705078125, 0.0152587890625, -0.0341796875, 0.01904296875, -0.0034942626953125, -0.00958251953125, 0.0013885498046875, 0.0296630859375, -0.0010...
[ 1250, 4867, 166, 58838, 5117, 136044, 5303, 7, 195625, 1830, 502, 111, 3525, 31577, 10554, 1257, 4734, 80854, 12638, 13695, 140992, 98320, 28219, 132283, 1957, 44691 ]
[ 0.15771484375, 0.24853515625, 0.1802978515625, 0.08551025390625, 0.1514892578125, 0.2020263671875, 0.1717529296875, 0.031768798828125, 0.1322021484375, 0.040374755859375, 0.1021728515625, 0.01226043701171875, 0.030975341796875, 0.045440673828125, 0.197265625, 0.10186767578125, 0.0384...
embed
37705419_c1
37705419
prolog
1
[4, 3], [4, 3, 4, 3, 2, 1]). % result is true fib-list([1, 2], [4, 3], [4, 3, 4, 3, 2, 1, 4]). % result is true fib-list([1, 2], [4, 3], [4, 3, 4, 3, 2]). % result is true Example sequence with L1 = [1] and L2 = [2]; L3 = [1, 2]; L4 = L2 + reversed(L3) = [2, 2, 1]; L5 = L3 + reversed(L4) = [1, 2, 1, 2, 2] Results expe...
[4, 3], [4, 3, 4, 3, 2, 1]). % result is true fib-list([1, 2], [4, 3], [4, 3, 4, 3, 2, 1, 4]). % result is true fib-list([1, 2], [4, 3], [4, 3, 4, 3, 2]). % result is true Example sequence with L1 = [1] and L2 = [2]; L3 = [1, 2]; L4 = L2 + reversed(L3) = [2, 2, 1]; L5 = L3 + reversed(L4) = [1, 2, 1, 2, 2] Results expe...
[ 0.02197265625, 0.01251220703125, -0.01318359375, 0.024658203125, -0.019775390625, -0.01068115234375, 0.00762939453125, 0.0277099609375, 0.032958984375, 0.0009918212890625, 0.003326416015625, 0.0228271484375, 0.004364013671875, 0.029296875, 0.009765625, -0.0033721923828125, 0.01879882...
[ 617, 138, 201, 116, 106, 1745, 16750, 83, 29568, 809, 275, 9, 6562, 418, 4, 89536, 8705, 40, 944, 3956, 678, 339, 17550, 136, 304, 363, 2203, 997, 39531, 5281, 866, 21320, 758, 29557, 146104, 84751, 25256, 33579, 2967, 1295, 17932, 50...
[ 0.1544189453125, 0.1741943359375, 0.1663818359375, 0.074462890625, 0.017791748046875, 0.0904541015625, 0.171630859375, 0.0662841796875, 0.2381591796875, 0.1590576171875, 0.13037109375, 0.03619384765625, 0.210205078125, 0.087158203125, 0.031005859375, 0.1260986328125, 0.03179931640625...
embed
65412287_c0
65412287
prolog
0
Title: How to express infinity in Prolog? Problem title: How to express infinity in Prolog? Tags: random, prolog, infinity Problem: How to express infinity in Prolog? I am trying to use random/3 random(+L:int, +U:int, -R:int) Is there any thing that can be used for representing infinity? For Example: random(0, Infinity...
How to express infinity in Prolog? How to express infinity in Prolog? random prolog infinity How Prolog L:int U:int R:int Infinity Random_Number How to express infinity in Prolog? I am trying to use random/3 Is there any thing that can be used for representing infinity? For Example: Is it possible to achieve this with ...
[ -0.00153350830078125, -0.01080322265625, 0.0294189453125, -0.0205078125, -0.0081787109375, -0.010498046875, 0.0322265625, -0.0142822265625, 0.006683349609375, -0.0419921875, 0.01031494140625, -0.0155029296875, -0.007476806640625, 0.0146484375, 0.042724609375, 0.00994873046875, -0.003...
[ 11249, 47, 36510, 54241, 53, 23, 1250, 4867, 96759, 502, 339, 4288, 345, 627, 134322, 39643, 306, 18444, 26278, 31577, 18113, 13580, 831, 11814, 33636, 214, 7722, 69307, 30700, 71, 103391, 15811, 42491, 316 ]
[ 0.096923828125, 0.04437255859375, 0.19140625, 0.193359375, 0.168701171875, 0.081787109375, 0.1605224609375, 0.2489013671875, 0.1904296875, 0.1326904296875, 0.042449951171875, 0.1156005859375, 0.059326171875, 0.06927490234375, 0.1739501953125, 0.1162109375, 0.0736083984375, 0.091979...
embed
13809032_c1
13809032
prolog
1
Cost) :- edge(From,H,C1), edge(From,K,C2), C1 > C2, Cost is C2, nearest_in_list(From,Who,[K|T],Cost). The thing is, I have no idea how to update the info about vertices. I have tried assert/1 and retract/1 but it doesn't work. I get error that I cannot modify static procedure vertex/4. I'm currently using SWI Prolog, b...
Cost) :- edge(From,H,C1), edge(From,K,C2), C1 > C2, Cost is C2, nearest_in_list(From,Who,[K|T],Cost). The thing is, I have no idea how to update the info about vertices. I have tried assert/1 and retract/1 but it doesn't work. I get error that I cannot modify static procedure vertex/4. I'm currently using SWI Prolog, b...
[ 0.0211181640625, 0.029296875, 0.017822265625, -0.00732421875, 0.00168609619140625, -0.006866455078125, -0.0172119140625, 0.005828857421875, 0.0213623046875, -0.04541015625, 0.001434326171875, -0.020263671875, -0.016845703125, -0.0125732421875, 0.0164794921875, 0.004180908203125, 0.02...
[ 63099, 16, 15772, 121303, 168407, 841, 441, 17727, 605, 10461, 313, 418, 304, 43573, 525, 73, 6562, 497, 5510, 6528, 3642, 47, 28350, 70, 3004, 1672, 95378, 5170, 37842, 237, 33657, 11583, 41499, 15390, 4488, 18499, 53418, 2811, 40383, 20...
[ 0.255859375, 0.01019287109375, 0.03485107421875, 0.2171630859375, 0.1201171875, 0.06298828125, 0.0819091796875, 0.048187255859375, 0.03863525390625, 0.06378173828125, 0.04852294921875, 0.03668212890625, 0.11474609375, 0.1324462890625, 0.10687255859375, 0.01068115234375, 0.14599609375...
embed
8672046_c0
8672046
prolog
0
Title: not member rule in prolog doesn&#x27;t work as expected Problem title: not member rule in prolog doesn&#x27;t work as expected Tags: prolog Problem: not member rule in prolog doesn't work as expected I'm trying to write a simple maze search program in prolog, before I add a room to visited list I'm checking whet...
not member rule in prolog doesn&#x27;t work as expected not member rule in prolog doesn&#x27;t work as expected prolog not member rule in prolog doesn't work as expected I'm trying to write a simple maze search program in prolog, before I add a room to visited list I'm checking whether it is already a member of the vis...
[ 0.01177978515625, 0.015869140625, 0.0252685546875, 0.0225830078125, -0.00457763671875, 0.01611328125, 0.002166748046875, 0.006134033203125, 0, -0.045654296875, 0.0225830078125, -0.01019287109375, 0.0142822265625, -0.01177978515625, 0.00927734375, 0.00634765625, -0.00162506103515625, ...
[ 959, 32786, 79986, 502, 4867, 3768, 4488, 237, 84751, 23, 18, 31577, 33022, 8781, 291, 731, 33938, 1528, 15190, 17155, 36997, 5303, 175199, 36766, 21771, 831, 18151, 12877, 44691 ]
[ 0.1710205078125, 0.2423095703125, 0.1761474609375, 0.13525390625, 0.206787109375, 0.0248260498046875, 0.0938720703125, 0.05291748046875, 0.0843505859375, 0.01995849609375, 0.04736328125, 0.0155029296875, 0.0430908203125, 0.02471923828125, 0.05694580078125, 0.1322021484375, 0.13977050...
embed
74361525_c0
74361525
prolog
0
Title: Ascii and lists in Prolog Problem title: Ascii and lists in Prolog Tags: prolog Problem: Ascii and lists in Prolog I'm new to prolog and can't find any example working with ASCII code and lists so can you help me with the assignment or give me some materials? I have the assignment to create a predicate little_le...
Ascii and lists in Prolog Ascii and lists in Prolog prolog Ascii Prolog Ascii and lists in Prolog I'm new to prolog and can't find any example working with ASCII code and lists so can you help me with the assignment or give me some materials? I have the assignment to create a predicate little_letter/2 that will count h...
[ 0.00335693359375, -0.0001392364501953125, -0.0072021484375, 0.036376953125, -0.009033203125, 0.0167236328125, -0.00885009765625, 0.007110595703125, -0.002960205078125, 0.0283203125, -0.004364013671875, -0.0419921875, -0.0002155303955078125, 0.037109375, -0.00970458984375, 0.00405883789...
[ 1301, 26506, 136, 5303, 23, 1250, 4867, 7, 502, 3525, 27781, 20697, 678, 125429, 10001, 18151, 4358, 95486, 76319, 674, 28282, 1653, 2063, 67, 10176, 63049, 12477, 54529, 3642, 5941, 19336, 120820, 79315, 284, 134165, 568, 17721, 14819, 473...
[ 0.116943359375, 0.279541015625, 0.094482421875, 0.255859375, 0.07122802734375, 0.1627197265625, 0.24951171875, 0.028167724609375, 0.1351318359375, 0.061798095703125, 0.1341552734375, 0.060699462890625, 0.037933349609375, 0.137939453125, 0.2193603515625, 0.173828125, 0.021102905273437...
embed
13167590_c2
13167590
prolog
2
, XFinal, YFinal, Player,Piece,FinalPiece,NewBoard) :- Code signals: board, a, Error, Prolog, SICStus, Player, BoardList, change_player, Opposing, NewBoard, find_piece, XPiece, YPiece, get_piece, Piece, validate_move, XFinal, YFinal, FinalPiece, Row, YCoord, NewYCoord, Column, XCoord, NewXCoord, Element, validate_coord...
, XFinal, YFinal, Player,Piece,FinalPiece,NewBoard) :- Code signals: board, a, Error, Prolog, SICStus, Player, BoardList, change_player, Opposing, NewBoard, find_piece, XPiece, YPiece, get_piece, Piece, validate_move, XFinal, YFinal, FinalPiece, Row, YCoord, NewYCoord, Column, XCoord, NewXCoord, Element, validate_coord...
[ 0.0091552734375, -0.00433349609375, 0.007659912109375, 0.0189208984375, 0.0003032684326171875, -0.0014495849609375, 0.01019287109375, 0.0098876953125, 0.02197265625, 0.01251220703125, -0.0079345703125, 0.0274658203125, 0.00836181640625, -0.0135498046875, -0.00567626953125, -0.021240234...
[ 6, 4, 1193, 6159, 6236, 990, 60560, 111242, 329, 46568, 12647, 5861, 16, 15772, 28864, 26073, 7, 12, 45443, 10, 212059, 1250, 4867, 159, 102198, 2143, 62554, 154663, 15549, 139570, 17559, 232, 214, 2356, 7413, 152667, 45005, 478, 2046, 10...
[ 0.0703125, 0.05548095703125, 0.1400146484375, 0.207763671875, 0.2042236328125, 0.1275634765625, 0.2193603515625, 0.1827392578125, 0.1158447265625, 0.10125732421875, 0.1529541015625, 0.209716796875, 0.0667724609375, 0.118408203125, 0.28125, 0.29296875, 0.1583251953125, 0.07934570312...
embed
6874762_c0
6874762
prolog
0
Title: How Concurrent is Prolog? Problem title: How Concurrent is Prolog? Tags: prolog, performance, multicore, concurrency Problem: How Concurrent is Prolog? I can't find any info on this online... I am also new to Prolog... It seems to me that Prolog could be highly concurrent, perhaps trying many possibilities at on...
How Concurrent is Prolog? How Concurrent is Prolog? prolog performance multicore concurrency How Concurrent Prolog How Concurrent is Prolog? I can't find any info on this online... I am also new to Prolog... It seems to me that Prolog could be highly concurrent, perhaps trying many possibilities at once when trying to ...
[ 0.01904296875, 0.0032501220703125, -0.0004558563232421875, 0.00811767578125, -0.01043701171875, 0.00653076171875, 0.006195068359375, -0.012451171875, -0.00628662109375, -0.042724609375, -0.01373291015625, 0.00799560546875, -0.01416015625, 0.005401611328125, 0.01287841796875, 0.00095367...
[ 11249, 1657, 163812, 83, 1250, 4867, 502, 23718, 6024, 30854, 108636, 982, 3004, 3525, 37202, 5809, 186, 103210, 133244, 31577, 5941, 97370, 24145, 14858, 79986, 5744, 9969, 34759, 158288, 1314, 235529, 2408, 98, 114977, 22, 2886, 60892, 3911...
[ 0.1119384765625, 0.1446533203125, 0.271240234375, 0.0655517578125, 0.1795654296875, 0.261474609375, 0.1287841796875, 0.156494140625, 0.0850830078125, 0.18115234375, 0.1942138671875, 0.14990234375, 0.021942138671875, 0.0211181640625, 0.0250396728515625, 0.07061767578125, 0.06402587890...
embed
30116677_c0
30116677
prolog
0
Title: Prolog predicate with two lists Problem title: Prolog predicate with two lists Tags: prolog Problem: Prolog predicate with two lists I'm newbie to prolog and trying to understand this prolog code. next_truth_value([0|R],[1|R]). next_truth_value([1|R],[0|S]) :- next_truth_value(R,S). Through my research I found t...
Prolog predicate with two lists Prolog predicate with two lists prolog Prolog next_truth_value NEXT Prolog predicate with two lists I'm newbie to prolog and trying to understand this prolog code. Through my research I found that predicate contains two lists. If I query this I get a answer like this... Please someone ex...
[ 0.0169677734375, 0.0162353515625, -0.00457763671875, 0.0296630859375, -0.0030975341796875, 0.0302734375, -0.00567626953125, 0.00186920166015625, 0.0079345703125, 0.01263427734375, 0.01611328125, 0.0179443359375, -0.006927490234375, 0.0014495849609375, -0.00238037109375, 0.00341796875, ...
[ 1250, 4867, 1653, 2063, 67, 678, 6626, 5303, 502, 11737, 18, 75481, 27494, 9960, 70981, 9014, 28219, 18151, 70541, 35166, 1884, 903, 73342, 9393, 100094, 131148 ]
[ 0.1630859375, 0.2264404296875, 0.171142578125, 0.2138671875, 0.097900390625, 0.06463623046875, 0.1798095703125, 0.2298583984375, 0.1383056640625, 0.1519775390625, 0.0187835693359375, 0.1685791015625, 0.1571044921875, 0.1138916015625, 0.154541015625, 0.023529052734375, 0.0338745117187...
embed
47238722_c0
47238722
prolog
0
Title: Return Integer with Prolog Problem title: Return Integer with Prolog Tags: successor-arithmetics, prolog Problem: Return Integer with Prolog I try to understand prolog right now. I want to give the input: convert(s(s(s(X))),Y) and the output should be Y = 3 . convert(s(0), 1). convert(s(s(0)), 2). convert(s(X),Y...
Return Integer with Prolog Return Integer with Prolog successor-arithmetics prolog Integer Prolog Return Integer with Prolog I try to understand prolog right now. I want to give the input: convert(s(s(s(X))),Y) and the output should be Y = 3 . Those are my rules right now, but only the inputs: convert(s(0), 1) . And co...
[ -0.0016021728515625, 0.013427734375, -0.01483154296875, 0.022705078125, 0.0036468505859375, 0.0218505859375, -0.0198974609375, -0.00201416015625, 0.0036163330078125, -0.0172119140625, 0.006591796875, -0.0111083984375, -0.0302734375, 0.0009918212890625, 0.0400390625, -0.0037384033203125...
[ 173340, 44401, 678, 1250, 4867, 39457, 42, 8962, 282, 41637, 502, 9790, 28219, 5036, 3444, 8337, 107730, 96760, 7, 1542, 1723, 140992, 5608, 186, 990, 2203, 138, 91736, 4734, 177609, 4879, 4958, 4488, 195625, 1830, 7108, 3871, 79986, 4358, ...
[ 0.2225341796875, 0.2335205078125, 0.1278076171875, 0.191162109375, 0.25634765625, 0.1671142578125, 0.06298828125, 0.071533203125, 0.0006103515625, 0.01513671875, 0.1424560546875, 0.0175628662109375, 0.0870361328125, 0.018218994140625, 0.05291748046875, 0.08203125, 0.1812744140625, ...
embed
34082799_c1
34082799
prolog
1
_first(Goal, Goal, _,[Goal]). breadth_first(Start, Goal, Visited, Path) :- findall(X, (connected2(X,Start,_),not(member(X,Visited))), [T|Extend]), write(Visited), nl, append(Visited, [T|Extend], Visited2), append(Path, [T|Extend], [Next|Path2]), breadth_first(Next, Goal, Visited2, Path2). The Path is something like the...
_first(Goal, Goal, _,[Goal]). breadth_first(Start, Goal, Visited, Path) :- findall(X, (connected2(X,Start,_),not(member(X,Visited))), [T|Extend]), write(Visited), nl, append(Visited, [T|Extend], Visited2), append(Path, [T|Extend], [Next|Path2]), breadth_first(Next, Goal, Visited2, Path2). The Path is something like the...
[ 0.0159912109375, 0.02783203125, 0.017333984375, 0.019775390625, -0.01806640625, 0.000431060791015625, -0.02197265625, -0.0341796875, -0.00164031982421875, -0.0296630859375, 0.009033203125, -0.027587890625, -0.005462646484375, 0.007415771484375, -0.01123046875, -0.009521484375, -0.008...
[ 101, 13448, 271, 132, 17903, 289, 4, 2016, 194, 179967, 927, 126597, 98684, 297, 108421, 15772, 7413, 5584, 1542, 135457, 304, 10869, 27417, 65331, 618, 510, 33022, 13169, 114689, 10461, 10519, 81280, 90173, 581, 83, 9844, 1884, 5813, 13388...
[ 0.06890869140625, 0.177978515625, 0.141845703125, 0.006622314453125, 0.193115234375, 0.18505859375, 0.014556884765625, 0.1807861328125, 0.056884765625, 0.248046875, 0.2188720703125, 0.179443359375, 0.2322998046875, 0.1751708984375, 0.26611328125, 0.1107177734375, 0.1802978515625, 0...
embed
34339240_c0
34339240
prolog
0
Title: Subset sum Prolog Problem title: Subset sum Prolog Tags: list, sum, prolog, subset-sum, subset Problem: Subset sum Prolog Define a predicate subsetsum(L, Sum, Subl) that takes a list L of numbers, a number Sum, and unifies SubL with a sub sequence of L such that the sum of the numbers in SubL is Sum. For example...
Subset sum Prolog Subset sum Prolog list sum prolog subset-sum subset Subset Prolog Tail Rest Subset sum Prolog Define a predicate subsetsum(L, Sum, Subl) that takes a list L of numbers, a number Sum, and unifies SubL with a sub sequence of L such that the sum of the numbers in SubL is Sum. For example we have and
[ 0.0081787109375, 0.0098876953125, 0.028076171875, 0.01214599609375, -0.0230712890625, 0.008544921875, 0.006256103515625, 0.01531982421875, 0.0262451171875, -0.013427734375, 0.01141357421875, 0.0125732421875, 0.0084228515625, -0.006622314453125, -0.002471923828125, 0.00762939453125, 0...
[ 8273, 3509, 10554, 1250, 4867, 5303, 502, 1614, 11832, 1218, 379, 49756, 262, 64552, 10, 1653, 2063, 67, 866, 4, 36335, 141, 450, 51776, 339, 111, 101935, 14012, 51, 27430, 90, 678, 40, 944, 6044, 23, 83, 27781, 765, 136 ]
[ 0.244140625, 0.275634765625, 0.25146484375, 0.158203125, 0.23486328125, 0.1629638671875, 0.0950927734375, 0.25244140625, 0.276611328125, 0.06048583984375, 0.0826416015625, 0.15380859375, 0.005035400390625, 0.1502685546875, 0.03863525390625, 0.1331787109375, 0.201904296875, 0.100341...
embed
60246766_c1
60246766
prolog
1
findall(Ra, depos(Ba, Bo, Ra), L). % L = [1, 2, 3, 4, 5, 6]. profit(X, Prof) :- body(X, Body), rate(X, Rate), Prof is Body * Rate. critRate(X, From, Before) :- rate(X, Rate), Rate >= From, Rate =< Before. critProf(X, From, Before, Prof) :- profit(X, Prof), Prof >= From, Prof =< Before. % How to create List Ls from dep...
findall(Ra, depos(Ba, Bo, Ra), L). % L = [1, 2, 3, 4, 5, 6]. profit(X, Prof) :- body(X, Body), rate(X, Rate), Prof is Body * Rate. critRate(X, From, Before) :- rate(X, Rate), Rate >= From, Rate =< Before. critProf(X, From, Before, Prof) :- profit(X, Prof), Prof >= From, Prof =< Before. % How to create List Ls from dep...
[ 0.004974365234375, 0.000606536865234375, 0.000965118408203125, -0.0034027099609375, -0.0026397705078125, 0.022705078125, 0.0003032684326171875, 0.0086669921875, 0.0291748046875, -0.004119873046875, 0.0106201171875, -0.0194091796875, 0.006378173828125, -0.0179443359375, 0.00634765625, 0...
[ 7413, 5584, 12248, 8, 7522, 8023, 2460, 2552, 339, 1745, 2203, 138, 201, 190, 305, 18348, 1542, 11739, 15772, 14361, 43960, 34515, 131182, 124464, 67, 28090, 117371, 977, 147161, 11249, 28282, 32036, 7, 1295, 40370, 678, 47, 37336, 125663, ...
[ 0.13818359375, 0.197509765625, 0.1790771484375, 0.1590576171875, 0.201171875, 0.09075927734375, 0.091552734375, 0.148681640625, 0.1510009765625, 0.0211639404296875, 0.0287628173828125, 0.0447998046875, 0.0391845703125, 0.04083251953125, 0.0625, 0.2237548828125, 0.0794677734375, 0.1...
embed
15416220_c0
15416220
prolog
0
Title: singleton variables in prolog Problem title: singleton variables in prolog Tags: prolog Problem: singleton variables in prolog I was testing my new version of SWI prolog and keep coming across the error : singleton variable . Example: member(X,[X|T]). member(X,[X|T]) :- member(X,T). finds the member of a list su...
singleton variables in prolog singleton variables in prolog prolog singleton variables in prolog I was testing my new version of SWI prolog and keep coming across the error : singleton variable . Example: finds the member of a list such as : but instead I get a singleton variables error for X and T if I do the followin...
[ 0.015869140625, 0.0123291015625, 0.00537109375, -0.00408935546875, -0.0177001953125, 0.0023040771484375, 0.0096435546875, 0.01275634765625, 0.00017547607421875, -0.037841796875, 0.01422119140625, -0.0091552734375, 0.0037078857421875, -0.0079345703125, 0.0162353515625, -0.0087890625, ...
[ 11001, 1507, 77336, 7, 23, 502, 4867, 134234, 11389, 159, 38969, 13695, 36880, 18499, 7413, 32786, 5303, 64457, 1193, 136, 384, 25632, 43240, 1284, 33342, 75, 110608, 73342, 15400, 187, 22, 818, 107003, 9902, 5570 ]
[ 0.22705078125, 0.2469482421875, 0.274169921875, 0.0447998046875, 0.03302001953125, 0.1517333984375, 0.239990234375, 0.0867919921875, 0.022003173828125, 0.019744873046875, 0.1573486328125, 0.001556396484375, 0.01995849609375, 0.165771484375, 0.059356689453125, 0.14892578125, 0.1164550...
embed
29064089_c0
29064089
prolog
0
Title: Write a Prolog predicate next(X,List,List1) Problem title: Write a Prolog predicate next(X,List,List1) Tags: prolog Problem: Write a Prolog predicate next(X,List,List1) Prolog predicate next(X, List,List1) , that returns in List1 the next element(s) from List that follows X , e.g., next(a,[a,b,c,a,d],List1) , wi...
Write a Prolog predicate next(X,List,List1) Write a Prolog predicate next(X,List,List1) prolog Write Prolog List List1 Write a Prolog predicate next(X,List,List1) Prolog predicate next(X, List,List1) , that returns in List1 the next element(s) from List that follows X , e.g., next(a,[a,b,c,a,d],List1) , will return Lis...
[ 0.000415802001953125, 0.016845703125, 0.00933837890625, 0.0174560546875, -0.0123291015625, 0.02880859375, -0.00946044921875, 0.01092529296875, 0.0101318359375, -0.007659912109375, 0.0076904296875, 0.0118408203125, -0.01312255859375, -0.0189208984375, -0.0003261566162109375, 0.020751953...
[ 601, 18781, 1250, 4867, 1653, 2063, 67, 11737, 1542, 154663, 17727, 502, 32036, 418, 132, 30646, 12830, 1295, 28960, 1193, 71, 1221, 1369, 275, 37842, 25632 ]
[ 0.058135986328125, 0.113525390625, 0.1673583984375, 0.2099609375, 0.1685791015625, 0.199462890625, 0.0755615234375, 0.2034912109375, 0.126708984375, 0.1708984375, 0.095458984375, 0.1368408203125, 0.1737060546875, 0.0528564453125, 0.0284423828125, 0.1658935546875, 0.136962890625, 0....
embed
20380979_c0
20380979
prolog
0
Title: trying to implement get the nth element of a list in Prolog Problem title: trying to implement get the nth element of a list in Prolog Tags: prolog Problem: trying to implement get the nth element of a list in Prolog I am very new in Prolog and trying to implement get the nth element of a list in Prolog here is ...
trying to implement get the nth element of a list in Prolog trying to implement get the nth element of a list in Prolog prolog Prolog element_at trying to implement get the nth element of a list in Prolog I am very new in Prolog and trying to implement get the nth element of a list in Prolog here is my code but it thro...
[ 0.00156402587890625, -0.0023040771484375, 0.0147705078125, -0.01416015625, -0.0026702880859375, 0.015625, 0.0018157958984375, 0.0002079010009765625, 0.001922607421875, -0.047607421875, 0.0322265625, -0.01806640625, -0.0218505859375, -0.002838134765625, 0.000873565673828125, -0.00506591...
[ 31577, 29479, 2046, 653, 927, 12830, 5303, 1250, 4867, 502, 257, 111, 23, 3525, 18151, 104250, 18499, 5351, 1193, 17932, 13315, 7108, 5609, 91995 ]
[ 0.0712890625, 0.1544189453125, 0.07666015625, 0.20361328125, 0.1810302734375, 0.2025146484375, 0.1375732421875, 0.1466064453125, 0.227783203125, 0.1082763671875, 0.1112060546875, 0.0249481201171875, 0.00738525390625, 0.010284423828125, 0.10699462890625, 0.056365966796875, 0.124755859...
embed
20148862_c0
20148862
prolog
0
Title: For each element in the list Problem title: For each element in the list Tags: prolog Problem: For each element in the list I'm new in prolog, I have a problem. I got a list of numbers like [7,88,10,11] and what I want to do is: for each element in [7,88,10,11] A for each element in [88,10,11] B for each element...
For each element in the list For each element in the list prolog A-B-C For each element in the list I'm new in prolog, I have a problem. I got a list of numbers like [7,88,10,11] and what I want to do is: I want all the combinations (permutations of 3 elements) in the list. Thank you! Edit: The list is an example, the ...
[ -0.002227783203125, 0.01318359375, -0.0096435546875, 0.029052734375, -0.00677490234375, 0.0089111328125, -0.01123046875, 0.01904296875, 0.00628662109375, 0.0048828125, -0.0048828125, 0.00830078125, 0.017578125, 0.0167236328125, -0.0247802734375, 0.019287109375, 0.0235595703125, 0.0...
[ 1326, 12638, 12830, 23, 70, 5303, 502, 4867, 62, 9, 571, 441, 3525, 2967, 4163, 111, 101935, 1884, 136005, 1019, 963, 1662, 2367, 3444, 47, 54, 87, 756, 162515, 1264, 14311, 21094, 138, 80854, 27781, 8561, 339, 2806, 17, 8560, 67, 280...
[ 0.164306640625, 0.217041015625, 0.2340087890625, 0.1063232421875, 0.0275726318359375, 0.227783203125, 0.2071533203125, 0.258544921875, 0.05096435546875, 0.0435791015625, 0.114501953125, 0.114501953125, 0.07305908203125, 0.1153564453125, 0.02764892578125, 0.023712158203125, 0.171875, ...
embed
50709537_c1
50709537
prolog
1
I've added some relationships between components, I should use them while defining the configuration. About these relationships, I'm not sure if I have to to store them like other components by default or I have to assert them, for instance by checking if bot components have the same socket. compatibility(motherboard,...
I've added some relationships between components, I should use them while defining the configuration. About these relationships, I'm not sure if I have to to store them like other components by default or I have to assert them, for instance by checking if bot components have the same socket. compatibility(motherboard,...
[ -0.0203857421875, 0.0091552734375, -0.00130462646484375, 0.01312255859375, 0.0108642578125, 0.0155029296875, -0.004547119140625, 0.0084228515625, 0.01806640625, 0.026123046875, -0.033447265625, 0.01336669921875, 0.01385498046875, 0.00799560546875, 0.004150390625, 0.00153350830078125, ...
[ 49814, 151618, 17721, 82761, 7, 5608, 4527, 2856, 12960, 13204, 449, 70, 180346, 9077, 4343, 1884, 3789, 114977, 237, 33657, 175199, 13820, 5701, 221, 27853, 112793, 2481, 9319, 24351, 14543, 13969, 81, 208, 63923, 28864, 26073, 11345, 59805,...
[ 0.134033203125, 0.214111328125, 0.10272216796875, 0.2264404296875, 0.083740234375, 0.019561767578125, 0.1220703125, 0.0673828125, 0.013824462890625, 0.176025390625, 0.04718017578125, 0.03045654296875, 0.23193359375, 0.03387451171875, 0.1766357421875, 0.0650634765625, 0.0001220703125,...
embed
37871775_c0
37871775
prolog
0
Title: Prolog: Replace fact using fact Problem title: Prolog: Replace fact using fact Tags: prolog, swi-prolog Problem: Prolog: Replace fact using fact I am trying to implement a predicate replace(+OldFact,+NewFact) which succeed only if the OldFact existed. If this succeeds then the NewFact must be added to the set of...
Prolog: Replace fact using fact Prolog: Replace fact using fact prolog swi-prolog fact Prolog Replace OldFact NewFact Prolog: Replace fact using fact I am trying to implement a predicate replace(+OldFact,+NewFact) which succeed only if the OldFact existed. If this succeeds then the NewFact must be added to the set of c...
[ 0.01513671875, 0.00933837890625, 0.0115966796875, 0.0223388671875, -0.014404296875, -0.00439453125, -0.007232666015625, -0.00098419189453125, 0.01458740234375, -0.01263427734375, 0.007293701171875, -0.004791259765625, -0.0208740234375, -0.03271484375, 0.005584716796875, -0.008605957031...
[ 1250, 4867, 12, 853, 23935, 15824, 17368, 502, 91, 2452, 3454, 25074, 135518, 18, 2356, 31577, 29479, 1653, 2063, 67, 91995, 1328, 53774, 71, 46568, 214493, 4734, 2174, 13835, 4263, 8110, 49814, 5423, 70731, 154109, 11249, 54, 69307, 674, ...
[ 0.18017578125, 0.2325439453125, 0.025604248046875, 0.1295166015625, 0.2110595703125, 0.274169921875, 0.1170654296875, 0.1478271484375, 0.00604248046875, 0.13818359375, 0.12109375, 0.1943359375, 0.25390625, 0.155517578125, 0.128662109375, 0.0692138671875, 0.1492919921875, 0.14465332...
embed
27194851_c0
27194851
prolog
0
Title: Prolog: How do I return multiple values? Problem title: Prolog: How do I return multiple values? Tags: prolog Problem: Prolog: How do I return multiple values? I want to take a value, such as 3 and return all from the given value to one. For example, if I passed in count(3), I would get 3,2, 1 separately. I don'...
Prolog: How do I return multiple values? Prolog: How do I return multiple values? prolog Prolog How N-1 Prolog: How do I return multiple values? I want to take a value, such as 3 and return all from the given value to one. For example, if I passed in count(3), I would get 3,2, 1 separately. I don't want to return the v...
[ 0.015869140625, -0.004730224609375, -0.021240234375, 0.009765625, 0.007476806640625, 0.0012054443359375, -0.0179443359375, -0.010986328125, 0.0198974609375, -0.0235595703125, -0.005462646484375, -0.02490234375, 0.00579833984375, 0.0220947265625, 0.02685546875, -0.01068115234375, 0.00...
[ 1250, 4867, 11249, 54, 87, 30646, 48716, 142424, 502, 541, 5759, 12, 3444, 5646, 34292, 138, 756, 1295, 34475, 47, 1632, 115081, 23, 54529, 69829, 2046, 133130, 106, 84797, 70, 5303, 37842, 5117, 195625, 11782, 11737, 4734, 24145, 20594, ...
[ 0.152099609375, 0.2410888671875, 0.122802734375, 0.051544189453125, 0.078857421875, 0.271484375, 0.2822265625, 0.2666015625, 0.0826416015625, 0.053436279296875, 0.1199951171875, 0.000457763671875, 0.0819091796875, 0.0770263671875, 0.17138671875, 0.1470947265625, 0.0919189453125, 0....
embed
47159232_c0
47159232
prolog
0
Title: Fibonacci in Prolog - Breaks if False Problem title: Fibonacci in Prolog - Breaks if False Tags: fibonacci, prolog Problem: Fibonacci in Prolog - Breaks if False I have a program fib(X,Y). If Y is the Xth Fibonacci number it returns True else it should return False . My program breaks anytime I input statement w...
Fibonacci in Prolog - Breaks if False Fibonacci in Prolog - Breaks if False fibonacci prolog Fibonacci Prolog Breaks Won Fibonacci in Prolog - Breaks if False I have a program fib(X,Y). If Y is the Xth Fibonacci number it returns True else it should return False . My program breaks anytime I input statement which is fa...
[ 0.007171630859375, 0.0086669921875, -0.005828857421875, -0.0040283203125, -0.01171875, 0.01531982421875, 0.006378173828125, 0.0005340576171875, 0.008544921875, 0.006805419921875, 0.025634765625, -0.000545501708984375, -0.0281982421875, 0.0087890625, 0.01611328125, -0.00086212158203125,...
[ 3698, 20990, 52544, 23, 1250, 4867, 131904, 7, 2174, 22225, 184, 809, 502, 104525, 765, 1528, 275, 1542, 1723, 4263, 990, 83, 1193, 927, 14012, 30646, 87599, 37076, 5608, 36356, 2499, 6032, 87, 107730, 63805, 98320, 4865, 54, 44691, 17368...
[ 0.144287109375, 0.1787109375, 0.2095947265625, 0.0982666015625, 0.166748046875, 0.255859375, 0.1971435546875, 0.07720947265625, 0.1328125, 0.147705078125, 0.13720703125, 0.1341552734375, 0.115234375, 0.1549072265625, 0.0222320556640625, 0.1732177734375, 0.1292724609375, 0.067932128...
embed
6132607_c0
6132607
prolog
0
Title: Prolog - How this program work Problem title: Prolog - How this program work Tags: prolog Problem: Prolog - How this program work I have this program written in prolog language. The problem is that i cant understand how it works. even_number([],[]). even_number([H|T],S):-even_number(T,W),Z is H mod 2,Z==0,S=[H|W...
Prolog - How this program work Prolog - How this program work prolog Prolog How even_number Prolog - How this program work I have this program written in prolog language. The problem is that i cant understand how it works. All it does is to extract the even numbers from a list and store it to another list. I know that ...
[ -0.00138092041015625, 0.0098876953125, 0.0067138671875, 0.0113525390625, 0.003173828125, 0.039306640625, -0.0185546875, 0.0089111328125, 0.0189208984375, -0.027587890625, 0.0152587890625, -0.0400390625, -0.0279541015625, 0.0125732421875, 0.0128173828125, 0.0028839111328125, 0.0278320...
[ 1250, 4867, 11249, 903, 1528, 4488, 502, 3853, 2606, 1297, 59121, 46876, 2967, 17, 45767, 28219, 3642, 442, 43240, 3164, 14602, 83, 47, 125663, 101935, 5303, 4343, 15700, 3714, 17368, 195625, 1830, 98441, 7228, 20271, 71924, 35672, 73342 ]
[ 0.1898193359375, 0.285888671875, 0.1243896484375, 0.0992431640625, 0.175537109375, 0.1885986328125, 0.1209716796875, 0.219482421875, 0.157470703125, 0.165283203125, 0.03790283203125, 0.1192626953125, 0.075439453125, 0.003082275390625, 0.1043701171875, 0.1309814453125, 0.0941772460937...
embed
37966642_c0
37966642
prolog
0
Title: Prolog, X element before element Y on list Problem title: Prolog, X element before element Y on list Tags: prolog Problem: Prolog, X element before element Y on list I am going to write predicate which is true iff only and only when element X occurs before Y on list L before(L, X, Y) :- nth1(PX, L, X), nth1(PY, ...
Prolog, X element before element Y on list Prolog, X element before element Y on list prolog Prolog nth1 Prolog, X element before element Y on list I am going to write predicate which is true iff only and only when element X occurs before Y on list L Above, you can see my solution. What do you think about it ? When it ...
[ -0.0006103515625, 0.00628662109375, 0.002532958984375, 0.00921630859375, -0.00543212890625, 0.0016937255859375, 0.00130462646484375, -0.00628662109375, 0.00408935546875, -0.02392578125, 0.02685546875, 0.0185546875, -0.01025390625, -0.032958984375, 0.0032806396484375, 0.009765625, 0.0...
[ 1250, 4867, 1193, 12830, 8108, 990, 98, 5303, 502, 927, 418, 33022, 1653, 2063, 67, 83, 29568, 32920, 4734, 3229, 74918, 339, 92437, 272, 29806, 5351, 30646, 32316, 19713, 1632, 80836, 450, 134629, 61924, 6044, 100, 12638 ]
[ 0.2073974609375, 0.271728515625, 0.212646484375, 0.2459716796875, 0.220458984375, 0.1514892578125, 0.09039306640625, 0.1900634765625, 0.1605224609375, 0.1043701171875, 0.002655029296875, 0.07452392578125, 0.21484375, 0.243408203125, 0.1358642578125, 0.03521728515625, 0.19580078125, ...
embed
55679462_c0
55679462
prolog
0
Title: Why member/2 does not return immediately Problem title: Why member/2 does not return immediately Tags: prolog Problem: Why member/2 does not return immediately I need a predicate for whether an element is in the list. I've tried to use member/2, but I've noticed a strange behaviour. When I call something like me...
Why member/2 does not return immediately Why member/2 does not return immediately prolog Why Why member/2 does not return immediately I need a predicate for whether an element is in the list. I've tried to use member/2, but I've noticed a strange behaviour. When I call something like member(1, [1, 2, 3]). the SWI-prolo...
[ 0.0101318359375, -0.00011682510375976562, 0.020751953125, -0.00933837890625, -0.01446533203125, 0.01556396484375, 0.019775390625, 0.005035400390625, -0.0022125244140625, -0.04296875, 0.037353515625, 0.000583648681640625, -0.01080322265625, 0.00238037109375, 0.015625, -0.0079345703125, ...
[ 44084, 32786, 12477, 14602, 959, 30646, 109312, 502, 4867, 3871, 1653, 2063, 67, 36766, 12830, 83, 23, 5303, 37842, 4527, 156672, 114453, 224833, 11782, 1884, 116, 138, 159, 38969, 3454, 140992, 29568, 40485, 24234, 30957, 8108, 71924, 121011...
[ 0.07550048828125, 0.27001953125, 0.266845703125, 0.079345703125, 0.13427734375, 0.236083984375, 0.17138671875, 0.1446533203125, 0.1910400390625, 0.032257080078125, 0.0615234375, 0.093994140625, 0.03717041015625, 0.037109375, 0.1595458984375, 0.0213623046875, 0.052032470703125, 0.12...
embed
59708981_c1
59708981
prolog
1
M|List]) :- M < N, M1 is M + 1, generate(M1,N,List). % permutation/2 permutation([],[]). permutation(List,[Elem|Perm]) :- select(Elem,List,Rest), permutation(Rest,Perm). safe([],_). safe(List,Sum) :- ( length(List,3), nth0(0,List,Elem1), nth0(1,List,Elem2), nth0(2,List,Elem3), Elem1 + Elem2 + Elem3 =< Sum ; [_|RestList...
M|List]) :- M < N, M1 is M + 1, generate(M1,N,List). % permutation/2 permutation([],[]). permutation(List,[Elem|Perm]) :- select(Elem,List,Rest), permutation(Rest,Perm). safe([],_). safe(List,Sum) :- ( length(List,3), nth0(0,List,Elem1), nth0(1,List,Elem2), nth0(2,List,Elem3), Elem1 + Elem2 + Elem3 =< Sum ; [_|RestList...
[ -0.011474609375, 0.0164794921875, 0.03369140625, -0.00408935546875, -0.016357421875, -0.00274658203125, -0.02880859375, -0.00103759765625, 0.029296875, -0.0257568359375, -0.0084228515625, 0.00396728515625, 0.01165771484375, 0.0126953125, -0.022705078125, 0.005096435546875, 0.00592041...
[ 276, 58745, 154663, 268, 16, 15772, 4426, 541, 418, 83, 997, 106, 139392, 594, 839, 194, 1745, 117, 561, 22062, 12477, 7623, 195, 15277, 39, 36849, 1052, 525, 46002, 132, 294, 316, 140909, 21320, 653, 927, 2389, 17727, 540, 363, 16093, ...
[ 0.1895751953125, 0.09930419921875, 0.27685546875, 0.0175323486328125, 0.004547119140625, 0.1151123046875, 0.161376953125, 0.140869140625, 0.0814208984375, 0.06304931640625, 0.16259765625, 0.06451416015625, 0.1898193359375, 0.095458984375, 0.10540771484375, 0.023956298828125, 0.093505...
embed
70631143_c1
70631143
prolog
1
[p, p→q]. but within the python code: from pyswip import Prolog prolog = Prolog() prolog.consult("logic.pl") for res in prolog.query("intersection([A,(A→B)], [p, (p→q)], Aim)."): print(res) My output is: {'A': 'p', 'B': 'q', 'Aim': [Atom('331781'), Functor(8343821,2,p,q)]} My question now is, what is the reason for: '...
[p, p→q]. but within the python code: from pyswip import Prolog prolog = Prolog() prolog.consult("logic.pl") for res in prolog.query("intersection([A,(A→B)], [p, (p→q)], Aim)."): print(res) My output is: {'A': 'p', 'B': 'q', 'Aim': [Atom('331781'), Functor(8343821,2,p,q)]} My question now is, what is the reason for: '...
[ 0.03173828125, 0.021240234375, 0.0103759765625, 0.02197265625, -0.0166015625, 0.00958251953125, -0.007659912109375, -0.02294921875, -0.006134033203125, -0.035400390625, 0.0162353515625, 0.020751953125, -0.002227783203125, -0.01153564453125, -0.00628662109375, -0.004730224609375, 0.01...
[ 254, 4, 915, 23585, 864, 1284, 28032, 17198, 50828, 18151, 57756, 2452, 24927, 1250, 4867, 502, 147834, 137043, 2424, 100, 3332, 944, 1294, 10433, 7, 58994, 284, 571, 62, 464, 28412, 2109, 140992, 12078, 9185, 2489, 13556, 28670, 18770, 1...
[ 0.16064453125, 0.0201416015625, 0.1181640625, 0.181396484375, 0.183837890625, 0.0927734375, 0.1417236328125, 0.091064453125, 0.153076171875, 0.1851806640625, 0.1343994140625, 0.22119140625, 0.1602783203125, 0.177734375, 0.23828125, 0.1649169921875, 0.199951171875, 0.1514892578125, ...
embed
72480929_c0
72480929
prolog
0
Title: Prolog logic task Problem title: Prolog logic task Tags: prolog, zebra-puzzle Problem: Prolog logic task the rules are five students won five different places in five different disciplines - Alex, Bob, John, Deo, Sam. The language student placed higher than Bob as much as Bob placed higher than the law student. ...
Prolog logic task Prolog logic task prolog zebra-puzzle Prolog Prolog logic task the rules are five students won five different places in five different disciplines - Alex, Bob, John, Deo, Sam. The language student placed higher than Bob as much as Bob placed higher than the law student. The IT student placed three spo...
[ 0.019775390625, 0.017578125, -0.0167236328125, 0.0023651123046875, -0.00836181640625, 0.0169677734375, -0.016845703125, 0.00408935546875, 0.01080322265625, -0.01531982421875, 0.0228271484375, -0.01116943359375, -0.00066375732421875, -0.01171875, -0.0029144287109375, 0.0208740234375, ...
[ 1250, 4867, 62775, 66211, 502, 116232, 9, 1766, 13894, 133, 70, 91736, 621, 43606, 25921, 23742, 12921, 44677, 23, 80244, 20984, 25027, 4939, 49081, 3362, 46876, 9836, 158012, 77546, 3501, 5045, 27165, 5959, 17262, 13162, 3853, 30648, 48909, ...
[ 0.18994140625, 0.283203125, 0.239990234375, 0.228271484375, 0.14599609375, 0.2457275390625, 0.01837158203125, 0.13818359375, 0.15673828125, 0.1234130859375, 0.005767822265625, 0.1988525390625, 0.01483154296875, 0.196044921875, 0.23828125, 0.1884765625, 0.1279296875, 0.2086181640625...
embed