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
57530762_c0
57530762
prolog
0
Title: different behavior of predicates in prolog Problem title: different behavior of predicates in prolog Tags: prolog Problem: different behavior of predicates in prolog I'm trying to understand the different behavior of predicate in and outside of a rule. when I write: test(1,2). in the console I get "predicate not...
different behavior of predicates in prolog different behavior of predicates in prolog prolog different behavior of predicates in prolog I'm trying to understand the different behavior of predicate in and outside of a rule. when I write: in the console I get "predicate not found". but when I write prolog answers althoug...
[ 0.01434326171875, -0.002655029296875, 0.006439208984375, 0.01007080078125, -0.006561279296875, 0.02294921875, 0.010009765625, 0.02099609375, -0.004119873046875, -0.0242919921875, 0.01361083984375, 0.01007080078125, -0.00836181640625, -0.0023651123046875, 0.037353515625, 0.0146484375, ...
[ 12921, 123166, 1653, 2063, 1636, 502, 4867, 23, 67, 50782, 79986, 33022, 130250, 19714, 959, 14037, 35166, 3034, 7464, 61924, 15400 ]
[ 0.167236328125, 0.172119140625, 0.1866455078125, 0.2333984375, 0.1265869140625, 0.1510009765625, 0.236572265625, 0.0205230712890625, 0.126953125, 0.0836181640625, 0.15087890625, 0.115234375, 0.1934814453125, 0.173828125, 0.0897216796875, 0.1495361328125, 0.1435546875, 0.17102050781...
embed
40753299_c0
40753299
prolog
0
Title: Get Prolog to give all possibilities for arithmetic Problem title: Get Prolog to give all possibilities for arithmetic Tags: prolog, constraint-programming, constraints, constraint-satisfaction Problem: Get Prolog to give all possibilities for arithmetic I was wondering whether in prolog it is possible to get it...
Get Prolog to give all possibilities for arithmetic Get Prolog to give all possibilities for arithmetic prolog constraint-programming constraints constraint-satisfaction Get Prolog Get Prolog to give all possibilities for arithmetic I was wondering whether in prolog it is possible to get it to brute force all the possi...
[ 0.00634765625, -0.0076904296875, -0.004730224609375, 0.0068359375, 0.0015411376953125, 0.00787353515625, -0.001556396484375, -0.01312255859375, 0.006988525390625, -0.0257568359375, 0.004364013671875, -0.01202392578125, -0.00518798828125, 0.005828857421875, -0.0031280517578125, -0.00227...
[ 20779, 1250, 4867, 47, 8337, 756, 97370, 2449, 187, 8962, 282, 9523, 100, 502, 158, 2816, 4288, 28966, 50958, 1021, 149016, 23, 7722, 2046, 442, 55042, 13, 37772, 70, 74481, 5256, 9844, 1884, 903 ]
[ 0.1324462890625, 0.2010498046875, 0.2822265625, 0.034759521484375, 0.0921630859375, 0.1427001953125, 0.16357421875, 0.1162109375, 0.01947021484375, 0.13916015625, 0.0877685546875, 0.0638427734375, 0.013916015625, 0.15576171875, 0.0308837890625, 0.147216796875, 0.060394287109375, 0....
embed
32609594_c0
32609594
prolog
0
Title: Parse file with XML scattered throughout Problem title: Parse file with XML scattered throughout Tags: parsing, prolog, sax, xml Problem: Parse file with XML scattered throughout I have a file scattered with XML docs interspersed between normal text, for example Hello Xml document Mary had a little lamb Xml docu...
Parse file with XML scattered throughout Parse file with XML scattered throughout parsing prolog sax xml Parse XML Parse file with XML scattered throughout I have a file scattered with XML docs interspersed between normal text, for example Hello Xml document Mary had a little lamb Xml document Goodbye A SAX parser erro...
[ 0.03369140625, 0.0096435546875, -0.00457763671875, 0.0074462890625, 0.002288818359375, 0.029541015625, -0.00335693359375, 0.0001544952392578125, -0.00238037109375, -0.0186767578125, 0.006988525390625, 0.0233154296875, -0.028076171875, -0.0017547607421875, 0.035400390625, 0.006042480468...
[ 2392, 184, 11435, 678, 92537, 16275, 3055, 297, 87420, 366, 6953, 502, 4867, 52186, 131492, 54, 4439, 1940, 20595, 5281, 17721, 3638, 7986, 35378, 1193, 7237, 12937, 23213, 1902, 10176, 21, 6492, 18621, 1272, 13, 62, 5377, 1542, 2189, 184...
[ 0.143310546875, 0.128173828125, 0.166748046875, 0.076171875, 0.2364501953125, 0.1395263671875, 0.1572265625, 0.05963134765625, 0.1522216796875, 0.1561279296875, 0.025604248046875, 0.114990234375, 0.201171875, 0.1475830078125, 0.1632080078125, 0.061370849609375, 0.0802001953125, 0.0...
embed
39994392_c0
39994392
prolog
0
Title: Prolog, error with exclusive OR Problem title: Prolog, error with exclusive OR Tags: prolog Problem: Prolog, error with exclusive OR i am new to prolog, and i want to make a simple expert system that uses prepositions, and i am struggling to use exclusive OR. Here is my program so far: /*facts*/ a. b. c. /*rules...
Prolog, error with exclusive OR Prolog, error with exclusive OR prolog Prolog ERROR Undefined Exception Prolog, error with exclusive OR i am new to prolog, and i want to make a simple expert system that uses prepositions, and i am struggling to use exclusive OR. Here is my program so far:
[ 0.01446533203125, 0.0206298828125, -0.01202392578125, -0.016845703125, -0.01031494140625, 0.025390625, -0.00390625, 0.011474609375, -0.013916015625, -0.0311279296875, 0.00113677978515625, 0.0042724609375, 0.0079345703125, -0.01434326171875, 0.0194091796875, -0.0009918212890625, -0.00...
[ 1250, 4867, 18499, 678, 97629, 33172, 502, 151206, 24638, 79912, 5983, 5443, 63928, 3525, 3444, 3249, 8781, 26808, 5426, 4527, 479, 40322, 237875, 11853, 1528, 221, 2060 ]
[ 0.1871337890625, 0.26416015625, 0.17041015625, 0.1025390625, 0.2073974609375, 0.264892578125, 0.1290283203125, 0.130126953125, 0.07867431640625, 0.05413818359375, 0.15966796875, 0.048248291015625, 0.10943603515625, 0.03662109375, 0.028961181640625, 0.0372314453125, 0.05419921875, 0...
embed
7741835_c0
7741835
prolog
0
Title: Prolog how to store first 3 elements in a list into another list Problem title: Prolog how to store first 3 elements in a list into another list Tags: prolog Problem: Prolog how to store first 3 elements in a list into another list I tried something like this: said path = [[1,2],[2,3],[3,4],[5,6]] first_three(N,...
Prolog how to store first 3 elements in a list into another list Prolog how to store first 3 elements in a list into another list prolog Prolog first_three N-1 Prolog how to store first 3 elements in a list into another list I tried something like this: said path = [[1,2],[2,3],[3,4],[5,6]] then I call first_three(3, p...
[ 0.007568359375, -0.006103515625, 0.01031494140625, 0.0098876953125, -0.00152587890625, 0.0028076171875, -0.00958251953125, 0.006927490234375, 0.0027618408203125, -0.041015625, 0.01239013671875, -0.0034942626953125, -0.00872802734375, 0.0034942626953125, 0.01226806640625, 0.013916015625...
[ 1250, 4867, 4343, 5117, 138, 80854, 5303, 3934, 15700, 23, 502, 107, 541, 5759, 37842, 2804, 60875, 133063, 155761, 82449, 104629, 11782, 927, 13, 86827, 990, 30646, 110 ]
[ 0.158935546875, 0.229736328125, 0.19580078125, 0.1458740234375, 0.2296142578125, 0.216552734375, 0.173583984375, 0.1455078125, 0.101318359375, 0.04229736328125, 0.117919921875, 0.175048828125, 0.018890380859375, 0.07440185546875, 0.050445556640625, 0.006317138671875, 0.1805419921875,...
embed
46695579_c1
46695579
prolog
1
,Paths,PathE). % TotalE is E+PathE. Output: ?- trip(r1, r6, Path, TotalE). Path = [r1, r2, r3, r4, r6] Total = Total Yes (0.00s cpu, solution 1, maybe more) Path = [r1, r2, r3, r4, r6, r3, r4, r6] Total = Total Yes (0.00s cpu, solution 2, maybe more) Path = [r1, r2, r3, r4, r6, r3, r4, r6, r3, r4, r6] TotalE = TotalE Y...
,Paths,PathE). % TotalE is E+PathE. Output: ?- trip(r1, r6, Path, TotalE). Path = [r1, r2, r3, r4, r6] Total = Total Yes (0.00s cpu, solution 1, maybe more) Path = [r1, r2, r3, r4, r6, r3, r4, r6] Total = Total Yes (0.00s cpu, solution 2, maybe more) Path = [r1, r2, r3, r4, r6, r3, r4, r6, r3, r4, r6] TotalE = TotalE Y...
[ 0.0262451171875, 0.0291748046875, 0.01409912109375, 0.01458740234375, -0.006683349609375, 0.007232666015625, -0.0194091796875, -0.007293701171875, 0.01123046875, -0.0260009765625, 0.006988525390625, 0.04736328125, -0.0169677734375, 0.0257568359375, 0.024169921875, 0.01544189453125, 0...
[ 6, 683, 10519, 7, 647, 194, 1745, 33867, 83, 241, 1328, 5, 13538, 7077, 705, 9, 24745, 42, 418, 1690, 910, 108421, 2203, 304, 4, 363, 617, 268, 32635, 37509, 1766, 29806, 106, 51139, 1286, 116, 138, 16, 28864, 26073, 5303, 26040, 12...
[ 0.0183563232421875, 0.1077880859375, 0.2054443359375, 0.1102294921875, 0.2333984375, 0.04132080078125, 0.1383056640625, 0.25244140625, 0.0855712890625, 0.1424560546875, 0.168701171875, 0.00103759765625, 0.157958984375, 0.08831787109375, 0.0579833984375, 0.0941162109375, 0.27612304687...
embed
6487449_c1
6487449
prolog
1
(a)); grid(N,4,U), U \= b, print('U->'), write(U), print('\n'), print('Y->'), write(b))); print('Rule 2 \n'), ((finddup(N,X-1,Y), X-1 >= 1, X-1 =< 4, Y >= 1, Y =< 4); (finddup(N,X+1,Y), X+1 >= 1, X+1 =< 4, Y >= 1, Y =< 4); (finddup(N,X,Y-1), X >= 1, X =< 4, Y-1 >= 1, Y-1 =< 4); (finddup(N,X,Y+1), X >= 1, X =< 4, Y+1 >=...
(a)); grid(N,4,U), U \= b, print('U->'), write(U), print('\n'), print('Y->'), write(b))); print('Rule 2 \n'), ((finddup(N,X-1,Y), X-1 >= 1, X-1 =< 4, Y >= 1, Y =< 4); (finddup(N,X+1,Y), X+1 >= 1, X+1 =< 4, Y >= 1, Y =< 4); (finddup(N,X,Y-1), X >= 1, X =< 4, Y-1 >= 1, Y-1 =< 4); (finddup(N,X,Y+1), X >= 1, X =< 4, Y+1 >=...
[ -0.0228271484375, 0.02294921875, 0.02783203125, 0.00555419921875, -0.006072998046875, 0.0145263671875, 0.00125885009765625, 0.005035400390625, 0.00726318359375, -0.001678466796875, -0.0194091796875, 0.00040435791015625, 0.0233154296875, -0.030029296875, -0.002593994140625, -0.005401611...
[ 11, 3142, 120067, 839, 617, 1062, 345, 1369, 876, 28412, 103607, 247, 33022, 19, 1723, 275, 26951, 133, 116, 111607, 693, 254, 1542, 5759, 1193, 977, 106, 201, 4, 990, 21748, 110218, 16093, 13956, 30607, 4358, 163, 1810, 51484, 153, 315...
[ 0.059814453125, 0.059783935546875, 0.2432861328125, 0.1099853515625, 0.17578125, 0.1619873046875, 0.1341552734375, 0.0107421875, 0.0806884765625, 0.14404296875, 0.1279296875, 0.0078125, 0.0865478515625, 0.070068359375, 0.1646728515625, 0.0517578125, 0.16552734375, 0.1630859375, 0...
embed
44372486_c0
44372486
prolog
0
Title: Generate list of numbers fron N to 1 in prolog Problem title: Generate list of numbers fron N to 1 in prolog Tags: prolog, recursion Problem: Generate list of numbers fron N to 1 in prolog I am trying to generate a list of numbers from N to 1 without using any build-in predicated such as findall or numlist. What...
Generate list of numbers fron N to 1 in prolog Generate list of numbers fron N to 1 in prolog prolog recursion Generate N-1 Generate list of numbers fron N to 1 in prolog I am trying to generate a list of numbers from N to 1 without using any build-in predicated such as findall or numlist. What am I doing wrong ? I kee...
[ 0.005035400390625, -0.0027008056640625, -0.005706787109375, 0.00830078125, -0.00142669677734375, 0.0191650390625, -0.01263427734375, 0.01507568359375, 0.00506591796875, -0.05517578125, -0.0032196044921875, -0.01422119140625, -0.009033203125, 0.0010528564453125, 0.023681640625, -0.00135...
[ 155370, 67, 5303, 101935, 33462, 19, 541, 47, 106, 23, 502, 4867, 195625, 5759, 111, 31577, 139392, 1295, 15490, 17368, 45367, 73, 1653, 2063, 7413, 5584, 13269, 6562, 20594, 44691, 13695, 151206, 24638, 13538, 7964, 177261 ]
[ 0.1800537109375, 0.051116943359375, 0.1778564453125, 0.19775390625, 0.0870361328125, 0.0345458984375, 0.1502685546875, 0.1285400390625, 0.11474609375, 0.0270233154296875, 0.155029296875, 0.223388671875, 0.1624755859375, 0.1790771484375, 0.1676025390625, 0.0596923828125, 0.181640625, ...
embed
50556479_c0
50556479
prolog
0
Title: Prolog rule for finding the last element of a list Problem title: Prolog rule for finding the last element of a list Tags: prolog Problem: Prolog rule for finding the last element of a list i should write a rule on prolog, which finds the last element of a list and add 1 to it. Here's what i came up with so far....
Prolog rule for finding the last element of a list Prolog rule for finding the last element of a list prolog Prolog Prolog rule for finding the last element of a list i should write a rule on prolog, which finds the last element of a list and add 1 to it. Here's what i came up with so far. It works, but my question is ...
[ 0.018310546875, 0.03173828125, -0.0123291015625, 0.0184326171875, 0.0026397705078125, 0.0306396484375, -0.0250244140625, 0.00823974609375, -0.00421142578125, -0.032958984375, 0.0174560546875, -0.0380859375, -0.005706787109375, 0.00006246566772460938, 0.015869140625, -0.00445556640625, ...
[ 1250, 4867, 79986, 90791, 70, 4568, 12830, 111, 5303, 100, 502, 5608, 33022, 98, 7413, 15190, 106, 47, 442, 1257, 2060, 43240, 831, 903, 59121, 120262 ]
[ 0.1585693359375, 0.270263671875, 0.197509765625, 0.1744384765625, 0.0438232421875, 0.262939453125, 0.22705078125, 0.064697265625, 0.208740234375, 0.021026611328125, 0.122802734375, 0.0276641845703125, 0.08880615234375, 0.0192718505859375, 0.150634765625, 0.1544189453125, 0.1086425781...
embed
47741440_c0
47741440
prolog
0
Title: How to call a list of list in prolog Problem title: How to call a list of list in prolog Tags: prolog Problem: How to call a list of list in prolog How to call a list of list in Prolog for exemple I have this list : list([[1,2,3],[4,5],[6,7]]). I want to call my list in the element_at function : element_at(X,[X|...
How to call a list of list in prolog How to call a list of list in prolog prolog How element_at How to call a list of list in prolog How to call a list of list in Prolog for exemple I have this list : I want to call my list in the element_at function : When i call I don't have a result.
[ -0.005889892578125, 0.00433349609375, 0.0028839111328125, 0.01397705078125, -0.0152587890625, 0.0184326171875, 0.0147705078125, 0.0031280517578125, 0.0023651123046875, -0.04443359375, 0.0240478515625, -0.00787353515625, 0.0001468658447265625, 0.0167236328125, 0.00640869140625, -0.01086...
[ 11249, 47, 11782, 5303, 111, 23, 502, 4867, 10, 12830, 454, 257, 1250, 18632, 3444, 759, 32354, 2301, 18, 765, 16750 ]
[ 0.043731689453125, 0.043243408203125, 0.1912841796875, 0.193359375, 0.1221923828125, 0.04998779296875, 0.1295166015625, 0.215087890625, 0.0248565673828125, 0.1484375, 0.0039043426513671875, 0.14794921875, 0.1336669921875, 0.104736328125, 0.0167999267578125, 0.0007176399230957031, 0.1...
embed
65581395_c0
65581395
prolog
0
Title: Powerset o a set(list) in Prolog Problem title: Powerset o a set(list) in Prolog Tags: prolog Problem: Powerset o a set(list) in Prolog I have the next predicate which will generate all subsets from a lists: candidate([],[]). candidate([H|T],[H|R]):- candidate(T,R). candidate([_|T],R):- candidate(T,R). Can someb...
Powerset o a set(list) in Prolog Powerset o a set(list) in Prolog prolog Powerset Prolog Powerset o a set(list) in Prolog I have the next predicate which will generate all subsets from a lists: Can somebody help me understand how it works? It looks so short but the recurrence behind it feels complicated to be understoo...
[ 0.015380859375, -0.003021240234375, 0.028564453125, 0.01544189453125, -0.00323486328125, 0.00445556640625, -0.02294921875, -0.001220703125, 0.0034942626953125, -0.0166015625, -0.00086212158203125, 0.01300048828125, 0.002716064453125, 0.0126953125, 0.00360107421875, 0.01080322265625, ...
[ 17170, 3509, 36, 10, 5423, 6562, 23, 1250, 4867, 502, 132, 11737, 1653, 2063, 67, 1221, 139392, 756, 1614, 1295, 5303, 176256, 4358, 28219, 3642, 442, 43240, 33342, 16610, 456, 64240, 50155, 12319, 96704, 217064 ]
[ 0.2181396484375, 0.267333984375, 0.1839599609375, 0.0660400390625, 0.2496337890625, 0.2303466796875, 0.06158447265625, 0.1514892578125, 0.2255859375, 0.103759765625, 0.001007080078125, 0.06109619140625, 0.0784912109375, 0.102294921875, 0.009918212890625, 0.0416259765625, 0.1647949218...
embed
71717183_c0
71717183
prolog
0
Title: how do i delete char type in list in prolog? Problem title: how do i delete char type in list in prolog? Tags: prolog Problem: how do i delete char type in list in prolog? I‘m new to learn prolog, I want to fulfill the predicate below, this is my code onlyinteger(List,New):- flatten(List,Fla), member(X,Fla), str...
how do i delete char type in list in prolog? how do i delete char type in list in prolog? prolog List Fla how do i delete char type in list in prolog? I‘m new to learn prolog, I want to fulfill the predicate below, this is my code what I want, X = [5,5,1,3,7].
[ -0.01123046875, -0.0152587890625, 0.0017547607421875, 0.031982421875, -0.00445556640625, 0.0299072265625, 0.0244140625, 0.01153564453125, -0.000324249267578125, 0.00970458984375, -0.002838134765625, -0.019287109375, 0.005126953125, 0.00787353515625, -0.021484375, -0.0030670166015625, ...
[ 3642, 54, 17, 154109, 21441, 10644, 23, 5303, 502, 4867, 32036, 29927, 30698, 211394, 35064, 18151, 2367, 3444, 1193, 2203, 125592, 363, 966 ]
[ 0.0648193359375, 0.0288543701171875, 0.043182373046875, 0.2388916015625, 0.2127685546875, 0.2391357421875, 0.06024169921875, 0.1922607421875, 0.1502685546875, 0.21240234375, 0.1265869140625, 0.1258544921875, 0.022552490234375, 0.06231689453125, 0.02410888671875, 0.125732421875, 0.018...
embed
41083510_c0
41083510
prolog
0
Title: Prolog:: f(x) recursion Problem title: Prolog:: f(x) recursion Tags: arithmetic-expressions, prolog, instantiation-error, recursion Problem: Prolog:: f(x) recursion I'm a beginner to Prolog and have two requirements: f(1) = 1 f(x) = 5x + x^2 + f(x - 1) rules: f(1,1). f(X,Y) :- Y is 5 * X + X * X + f(X-1,Y). quer...
Prolog:: f(x) recursion Prolog:: f(x) recursion arithmetic-expressions prolog instantiation-error recursion Prolog X-1 ERROR Arguments Prolog:: f(x) recursion I'm a beginner to Prolog and have two requirements: f(1) = 1 f(x) = 5x + x^2 + f(x - 1) rules: f(1,1). f(X,Y) :- Y is 5 * X + X * X + f(X-1,Y). query: f(4,X). Ou...
[ 0.01153564453125, 0.0172119140625, 0.00677490234375, -0.0038299560546875, -0.0026702880859375, -0.0021209716796875, 0.01025390625, 0.017822265625, 0.01275634765625, -0.0059814453125, 0.0181884765625, -0.01336669921875, -0.0198974609375, -0.00872802734375, 0.0419921875, -0.0108642578125...
[ 1250, 4867, 1238, 132, 425, 195625, 1830, 8962, 204629, 502, 34648, 14, 188800, 1193, 5759, 151206, 24638, 112140, 9842, 1679, 6626, 96679, 27750, 106, 190, 997, 8353, 304, 20, 4879, 91736, 12, 17727, 1542, 1723, 990, 83, 661, 41, 1294, ...
[ 0.1671142578125, 0.23974609375, 0.164794921875, 0.02197265625, 0.134765625, 0.2376708984375, 0.084716796875, 0.074951171875, 0.1256103515625, 0.1104736328125, 0.128173828125, 0.1138916015625, 0.16943359375, 0.0882568359375, 0.1456298828125, 0.1414794921875, 0.1019287109375, 0.24328...
embed
4357409_c0
4357409
prolog
0
Title: Prolog - sum of any every row and column Problem title: Prolog - sum of any every row and column Tags: matrix, prolog Problem: Prolog - sum of any every row and column I want to sum up each row and column in matrix and check whether all of it are the same. I want to use sum of row and transpose method to do it, ...
Prolog - sum of any every row and column Prolog - sum of any every row and column matrix prolog Prolog Prolog - sum of any every row and column I want to sum up each row and column in matrix and check whether all of it are the same. I want to use sum of row and transpose method to do it, but I had no ideas how it can c...
[ 0.01373291015625, 0.011962890625, 0.023193359375, 0.00946044921875, -0.026123046875, -0.01007080078125, -0.0091552734375, 0.0040283203125, 0.0172119140625, -0.0272216796875, 0.00347900390625, -0.0029144287109375, 0.00640869140625, -0.003143310546875, -0.02783203125, 0.01153564453125, ...
[ 1250, 4867, 10554, 111, 2499, 11907, 15555, 136, 3365, 316, 50944, 502, 3444, 47, 1257, 12638, 19, 23, 425, 12765, 36766, 756, 5701, 4527, 3900, 78381, 55300, 25647, 621, 234873, 196219 ]
[ 0.126953125, 0.2265625, 0.2125244140625, 0.1419677734375, 0.10406494140625, 0.1368408203125, 0.2154541015625, 0.1051025390625, 0.113037109375, 0.122802734375, 0.190673828125, 0.0806884765625, 0.06329345703125, 0.019744873046875, 0.10504150390625, 0.094482421875, 0.0175933837890625, ...
embed
47256227_c1
47256227
prolog
1
,b,c], [x,y], L). L = [a, x, b, y, c] ; false. ?- my_compose(L1, L2, [a,b,c]). L1 = [a, b, c], L2 = [] ; L1 = [], L2 = [a, b, c] ; L1 = [a, c], L2 = [b] ; L1 = [a], L2 = [b, c] ; false. I would appreciate it deeply if anyone could explain what I am missing here? Edit: The difference between this and shuffle is that shu...
,b,c], [x,y], L). L = [a, x, b, y, c] ; false. ?- my_compose(L1, L2, [a,b,c]). L1 = [a, b, c], L2 = [] ; L1 = [], L2 = [a, b, c] ; L1 = [a, c], L2 = [b] ; L1 = [a], L2 = [b, c] ; false. I would appreciate it deeply if anyone could explain what I am missing here? Edit: The difference between this and shuffle is that shu...
[ -0.016357421875, 0.0142822265625, 0.0023040771484375, 0.02099609375, -0.01904296875, 0.026123046875, -0.01263427734375, 0.00007104873657226562, 0.0198974609375, -0.006591796875, 0.022216796875, 0.0233154296875, 0.0284423828125, 0.0213623046875, -0.005950927734375, 0.0059814453125, -0...
[ 275, 238, 425, 53, 339, 194, 2203, 11, 1022, 876, 113, 501, 98320, 705, 759, 277, 78381, 866, 418, 304, 77947, 73342, 132283, 3688, 60212, 17721, 903, 136, 170052, 83, 100, 6626, 5303, 5701, 140909, 5608, 4420, 19364, 41, 1294, 28864, ...
[ 0.1070556640625, 0.0889892578125, 0.000274658203125, 0.0767822265625, 0.136474609375, 0.002471923828125, 0.072509765625, 0.04254150390625, 0.06195068359375, 0.1234130859375, 0.0860595703125, 0.0924072265625, 0.2021484375, 0.02392578125, 0.17041015625, 0.1702880859375, 0.231689453125,...
embed
72586247_c1
72586247
prolog
1
s). maplist(atom_string, XYZ), doesn't work for string read from a file, though this works on the repl. ?- maplist(atom_string, Tags, ["mateIn1"]). I want to filter lines of this file that has mateIn1 tags. Code signals: Why, Prolog, sorted.csv, Pp2p3, d1d6, c8c1, d6d1, c1d1, d7d1, h5d1, lichess.org, b334W1Ga, pp2kprp,...
s). maplist(atom_string, XYZ), doesn't work for string read from a file, though this works on the repl. ?- maplist(atom_string, Tags, ["mateIn1"]). I want to filter lines of this file that has mateIn1 tags. Code signals: Why, Prolog, sorted.csv, Pp2p3, d1d6, c8c1, d6d1, c1d1, d7d1, h5d1, lichess.org, b334W1Ga, pp2kprp,...
[ 0.01043701171875, -0.0146484375, 0.0079345703125, 0.0152587890625, -0.0150146484375, -0.003570556640625, 0.0301513671875, 0.0169677734375, 0.005859375, -0.00168609619140625, -0.00860595703125, 0.01171875, -0.0113525390625, -0.0166015625, -0.002960205078125, 0.016845703125, 0.00778198...
[ 91, 194, 22288, 6562, 11, 5928, 91693, 143907, 1511, 22027, 18, 4488, 79315, 12301, 1295, 11435, 43240, 456, 2424, 12298, 15829, 4153, 418, 3444, 46312, 124519, 1556, 29968, 69141, 28864, 26073, 44084, 1250, 4867, 17497, 71, 4439, 334, 304,...
[ 0.07562255859375, 0.088623046875, 0.1983642578125, 0.2626953125, 0.03179931640625, 0.1724853515625, 0.21044921875, 0.0865478515625, 0.108154296875, 0.0200042724609375, 0.053192138671875, 0.104736328125, 0.197021484375, 0.190673828125, 0.058349609375, 0.1685791015625, 0.06732177734375...
embed
40223266_c0
40223266
prolog
0
Title: Prolog Integration with Python Problem title: Prolog Integration with Python Tags: swi-prolog, python-3.x, prolog, ffi Problem: Prolog Integration with Python I would like to use Prolog in a project for university built on Python 3.5. Is there a way to do this? I've come across PySWIP, but it seems to only work ...
Prolog Integration with Python Prolog Integration with Python swi-prolog python-3.x prolog ffi Prolog Integration Python python-3.x Prolog Integration with Python I would like to use Prolog in a project for university built on Python 3.5. Is there a way to do this? I've come across PySWIP, but it seems to only work for...
[ 0.022216796875, 0.019287109375, 0.0111083984375, 0.003753662109375, -0.0260009765625, 0.006317138671875, 0.0076904296875, -0.0107421875, 0.000705718994140625, -0.041015625, 0.00982666015625, 0.00469970703125, -0.016845703125, -0.00121307373046875, 0.00191497802734375, -0.00717163085937...
[ 1250, 4867, 134701, 678, 145581, 91, 2452, 3454, 17198, 50828, 8316, 425, 502, 24500, 2806, 1884, 47, 4527, 23, 13452, 100, 152363, 88303, 98, 38704, 3917, 54, 903, 36880, 27512, 89023, 10931, 37202, 4734, 4488, 787, 11469, 19882, 1810 ]
[ 0.2183837890625, 0.316162109375, 0.27197265625, 0.13232421875, 0.2783203125, 0.03411865234375, 0.2012939453125, 0.1693115234375, 0.123291015625, 0.1636962890625, 0.0941162109375, 0.0938720703125, 0.1688232421875, 0.1571044921875, 0.018280029296875, 0.0870361328125, 0.0098876953125, ...
embed
30295970_c1
30295970
prolog
1
george,david). parent(george,marilyn). parent(george,john). parent(marry,dan). father_of(F,C):-man(F),parent(F,C). mother_of(M,C):-woman(M),parent(M,C). son_of(C,F) :-man(C),child(C,F). brother(B,P) :- man(B), mother(M,B), mother(M,P), father(F,B), father(F,P). sister(S,P) :- woman(S), mother(M,S), mother(M,P), father(...
george,david). parent(george,marilyn). parent(george,john). parent(marry,dan). father_of(F,C):-man(F),parent(F,C). mother_of(M,C):-woman(M),parent(M,C). son_of(C,F) :-man(C),child(C,F). brother(B,P) :- man(B), mother(M,B), mother(M,P), father(F,B), father(F,P). sister(S,P) :- woman(S), mother(M,S), mother(M,P), father(...
[ 0.0242919921875, 0.021240234375, 0.00016689300537109375, 0.01953125, -0.03564453125, 0.0164794921875, -0.00994873046875, 0.0079345703125, 0.0166015625, -0.04638671875, -0.006134033203125, -0.02978515625, 0.000576019287109375, 0.01007080078125, 0.0037078857421875, -0.0052490234375, -0...
[ 20787, 27616, 4, 85, 5518, 194, 49129, 429, 1478, 13, 14438, 12536, 66159, 19, 1727, 1294, 549, 67373, 4390, 919, 441, 669, 99547, 42732, 594, 3613, 775, 15772, 38472, 82953, 571, 114015, 46667, 9963, 724, 1542, 28864, 26073, 59745, 18778...
[ 0.130615234375, 0.20751953125, 0.051483154296875, 0.04522705078125, 0.205078125, 0.0859375, 0.2005615234375, 0.03717041015625, 0.1683349609375, 0.0908203125, 0.0810546875, 0.1544189453125, 0.0943603515625, 0.021759033203125, 0.07843017578125, 0.0738525390625, 0.06170654296875, 0.19...
embed
47106120_c1
47106120
prolog
1
esus_padre, haru). parent(harumi, haru). parent(harumi, jesu). parent(harumi, alice). father(X,Y) :- parent(X,Y), man(X). mother(X,Y) :- parent(X,Y), woman(X). brother(X,Y) :- man(X), parent(F, X), parent(F, Y). sister(X,Y) :- woman(X), parent(P, X), parent(P, Y). grandpa(X,Y) :- father(F,Y), father(X,F), man(X). grand...
esus_padre, haru). parent(harumi, haru). parent(harumi, jesu). parent(harumi, alice). father(X,Y) :- parent(X,Y), man(X). mother(X,Y) :- parent(X,Y), woman(X). brother(X,Y) :- man(X), parent(F, X), parent(F, Y). sister(X,Y) :- woman(X), parent(P, X), parent(P, Y). grandpa(X,Y) :- father(F,Y), father(X,F), man(X). grand...
[ 0.00885009765625, 0.0103759765625, 0.01214599609375, 0.0172119140625, -0.01043701171875, 0.040283203125, 0.01422119140625, 0.01348876953125, -0.0167236328125, -0.0537109375, -0.0159912109375, -0.03759765625, 0.016845703125, 0.0084228515625, 0.002899169921875, -0.0125732421875, 0.0157...
[ 198, 223, 454, 4299, 107, 4, 182, 34, 194, 49129, 132, 63355, 266, 55, 1159, 10, 13348, 67373, 1542, 1723, 15772, 332, 42732, 46667, 82953, 919, 990, 114015, 9963, 763, 192, 775, 53297, 145204, 28864, 26073, 12, 799, 20133, 434, 7921 ]
[ 0.125244140625, 0.20751953125, 0.0872802734375, 0.1981201171875, 0.19873046875, 0.04205322265625, 0.1485595703125, 0.179931640625, 0.082275390625, 0.238037109375, 0.01544189453125, 0.1519775390625, 0.192138671875, 0.1380615234375, 0.177490234375, 0.049957275390625, 0.158203125, 0.2...
embed
36722055_c0
36722055
prolog
0
Title: How to get a particular reviewer vote in Gerrit prolog not via rest api? Problem title: How to get a particular reviewer vote in Gerrit prolog not via rest api? Tags: git, gerrit, jenkins, prolog Problem: How to get a particular reviewer vote in Gerrit prolog not via rest api? I have a gerrit jenkins suport. I a...
How to get a particular reviewer vote in Gerrit prolog not via rest api? How to get a particular reviewer vote in Gerrit prolog not via rest api? git gerrit jenkins prolog How Gerrit How to get a particular reviewer vote in Gerrit prolog not via rest api? I have a gerrit jenkins suport. I am unable to find a solution i...
[ -0.003936767578125, -0.0004596710205078125, 0.0079345703125, -0.01104736328125, -0.00555419921875, -0.0096435546875, 0.01226806640625, -0.01458740234375, -0.01806640625, -0.0009002685546875, 0.0186767578125, 0.0220947265625, -0.01397705078125, -0.0179443359375, 0.0107421875, 0.00309753...
[ 11249, 2046, 17311, 8347, 56, 43374, 8022, 2783, 502, 4867, 959, 1829, 10588, 31470, 10, 23, 62270, 4155, 7349, 875, 47, 7, 27296, 2886, 29806, 209806, 1505, 132340, 60427, 239469, 3454, 14137 ]
[ 0.0657958984375, 0.1209716796875, 0.15673828125, 0.2109375, 0.1683349609375, 0.26025390625, 0.13525390625, 0.242919921875, 0.1287841796875, 0.201904296875, 0.126953125, 0.07635498046875, 0.152587890625, 0.142578125, 0.04693603515625, 0.0496826171875, 0.09881591796875, 0.06335449218...
embed
49663163_c0
49663163
prolog
0
Title: Prolog - longest sublist within a list Problem title: Prolog - longest sublist within a list Tags: recursion, list, longest-path, prolog Problem: Prolog - longest sublist within a list (2 ms) no I believe the issue is that I am not handling the occurrence of an empty set " [] ". However, I have attempted several...
Prolog - longest sublist within a list Prolog - longest sublist within a list recursion list longest-path prolog Prolog Path Length Distance Call _307 _308 _387 Exit _462 _537 Fail _587 _662 Prolog - longest sublist within a list I am trying to get the longest sublist within a list. I need a rule that recursively searc...
[ 0.0234375, 0.01177978515625, 0.00537109375, 0.0089111328125, -0.01129150390625, 0.002349853515625, -0.0054931640625, 0.01202392578125, 0.0234375, -0.0218505859375, 0.007415771484375, -0.003692626953125, -0.0152587890625, 0.00811767578125, 0.0103759765625, 0.00164794921875, 0.03271484...
[ 1250, 4867, 4989, 525, 1614, 6562, 28032, 5303, 20, 195625, 1830, 128405, 502, 108421, 77554, 154349, 26265, 1197, 966, 1019, 113252, 5443, 157255, 179973, 190355, 202118, 186890, 31577, 2046, 70, 3871, 79986, 5844, 33938, 83324, 1556, 140909, ...
[ 0.1943359375, 0.264892578125, 0.184814453125, 0.172607421875, 0.2410888671875, 0.253173828125, 0.1676025390625, 0.2142333984375, 0.0219879150390625, 0.177734375, 0.054229736328125, 0.158203125, 0.163330078125, 0.16796875, 0.1195068359375, 0.1968994140625, 0.148193359375, 0.05078125...
embed
35876622_c0
35876622
prolog
0
Title: Retrieve data from MySQL to Prolog knowledge base? Problem title: Retrieve data from MySQL to Prolog knowledge base? Tags: php, prolog Problem: Retrieve data from MySQL to Prolog knowledge base? Is there a way to retrieve data from MySQL to Prolog knowledge base? I am trying to retrieve, for example, the fields:...
Retrieve data from MySQL to Prolog knowledge base? Retrieve data from MySQL to Prolog knowledge base? php prolog MySQL Retrieve Prolog Name Retrieve data from MySQL to Prolog knowledge base? Is there a way to retrieve data from MySQL to Prolog knowledge base? I am trying to retrieve, for example, the fields: Name and p...
[ 0.039794921875, -0.003997802734375, 0.024658203125, 0.008056640625, 0.01190185546875, 0.047607421875, 0.005035400390625, 0.0057373046875, 0.0029144287109375, -0.039306640625, 0.005615234375, 0.0106201171875, -0.0169677734375, -0.029052734375, -0.005340576171875, -0.01025390625, 0.007...
[ 200451, 2053, 1295, 157146, 47, 1250, 4867, 51359, 3647, 3958, 502, 15757, 10, 3917, 456, 3996, 3134, 31577, 44457, 136, 27167, 23180, 80923, 63399, 8, 18347 ]
[ 0.2261962890625, 0.1494140625, 0.1243896484375, 0.244140625, 0.1531982421875, 0.1912841796875, 0.2861328125, 0.1826171875, 0.20556640625, 0.118896484375, 0.1273193359375, 0.156494140625, 0.009368896484375, 0.072509765625, 0.086669921875, 0.152099609375, 0.10601806640625, 0.05157470...
embed
12923018_c0
12923018
prolog
0
Title: prolog - print the value of a variable Problem title: prolog - print the value of a variable Tags: variables, prolog, return-value Problem: prolog - print the value of a variable I just cannot figure out how to print the value of X . Here is what I tried in the toplevel: 59 ?- read(X). |: 2. X = 2. 60 ?- write(X...
prolog - print the value of a variable prolog - print the value of a variable variables prolog return-value _G253 prolog - print the value of a variable I just cannot figure out how to print the value of X . Here is what I tried in the toplevel: What is _G253 ? I dont want the index number, I want the value X is bound ...
[ 0.0019683837890625, -0.00286865234375, -0.00421142578125, -0.00714111328125, 0.002685546875, 0.0201416015625, -0.002960205078125, -0.0072021484375, 0.0034637451171875, -0.02001953125, 0.01068115234375, -0.004913330078125, -0.0162353515625, 0.007293701171875, 0.0218505859375, 0.00778198...
[ 502, 4867, 28412, 70, 34292, 77336, 30646, 27494, 724, 2588, 363, 111, 53418, 26366, 1810, 3642, 47, 1193, 37842, 67919, 4865, 83, 101, 13319, 3444, 63262, 14012, 99091 ]
[ 0.1593017578125, 0.254150390625, 0.220458984375, 0.0496826171875, 0.2034912109375, 0.255126953125, 0.1336669921875, 0.1439208984375, 0.07025146484375, 0.18212890625, 0.1988525390625, 0.034881591796875, 0.0672607421875, 0.0645751953125, 0.012298583984375, 0.046142578125, 0.02641296386...
embed
55156845_c1
55156845
prolog
1
),_3764) ERROR: [8] required(cmput325,_3796) at c:/users/mxu3/desktop/a3.pl:19 ERROR: [7] <user> Exception: (9) sort(pre2(cmput325, _3322), _3110) ? creep Exception: (8) required(cmput325, _3110) ? creep At this stage, I have no idea how to solve this problem... could someone please tell me where should I put this sort...
),_3764) ERROR: [8] required(cmput325,_3796) at c:/users/mxu3/desktop/a3.pl:19 ERROR: [7] <user> Exception: (9) sort(pre2(cmput325, _3322), _3110) ? creep Exception: (8) required(cmput325, _3110) ? creep At this stage, I have no idea how to solve this problem... could someone please tell me where should I put this sort...
[ 0.0145263671875, 0.00070953369140625, 0.0037841796875, 0.0006256103515625, 0.0035247802734375, 0.009765625, -0.00848388671875, -0.007080078125, 0.017578125, -0.020751953125, -0.00994873046875, 0.017578125, 0.01153564453125, -0.01708984375, 0.005645751953125, -0.033447265625, -0.00140...
[ 247, 10945, 88235, 151206, 24638, 120410, 56065, 65970, 363, 2588, 109241, 12, 223, 1314, 39, 16220, 40061, 133850, 13784, 11, 2424, 23988, 117221, 65918, 5443, 63928, 11438, 12096, 4692, 304, 9185, 89647, 5016, 50258, 49512, 254, 10021, 101,...
[ 0.00079345703125, 0.14306640625, 0.078857421875, 0.123046875, 0.0938720703125, 0.1236572265625, 0.2412109375, 0.2283935546875, 0.1566162109375, 0.2578125, 0.232177734375, 0.010711669921875, 0.0777587890625, 0.07708740234375, 0.0237884521484375, 0.16162109375, 0.144287109375, 0.1241...
embed
68082848_c0
68082848
prolog
0
Title: Creating second list with increment from other list in prolog Problem title: Creating second list with increment from other list in prolog Tags: list, prolog Problem: Creating second list with increment from other list in prolog I'm trying to create list2 from list1, but every member should have Z increment. if ...
Creating second list with increment from other list in prolog Creating second list with increment from other list in prolog list prolog other Creating Creating second list with increment from other list in prolog I'm trying to create list2 from list1, but every member should have Z increment. if Z=1 then: [1,2,3] -> [2...
[ 0.0023345947265625, -0.000217437744140625, -0.00848388671875, 0.026123046875, 0.006500244140625, 0.017578125, 0.00015163421630859375, 0.014404296875, 0.0172119140625, -0.01904296875, 0.009765625, 0.00787353515625, -0.0002231597900390625, 0.0115966796875, 0.00439453125, 0.020263671875, ...
[ 56781, 17932, 5303, 678, 158661, 1295, 3789, 502, 4867, 31577, 28282, 304, 11907, 32786, 5608, 765, 567, 33000, 155761, 33079, 82449, 9790, 15190, 1511, 133063, 1542, 110, 35166 ]
[ 0.1190185546875, 0.18212890625, 0.22021484375, 0.042144775390625, 0.2098388671875, 0.059051513671875, 0.06304931640625, 0.1192626953125, 0.171875, 0.052490234375, 0.1217041015625, 0.1473388671875, 0.059722900390625, 0.1583251953125, 0.0235595703125, 0.00091552734375, 0.1131591796875,...
embed
11624626_c0
11624626
prolog
0
Title: Get JPL output into a string in Java Problem title: Get JPL output into a string in Java Tags: swi-prolog, prolog, java, jpl Problem: Get JPL output into a string in Java I'm using Prolog in java through JPL, I have some predicates with the format predicate: format("Result ~p, ",[X]), Using JPL in java the outpu...
Get JPL output into a string in Java Get JPL output into a string in Java swi-prolog prolog java jpl Get JPL Java Result Get JPL output into a string in Java I'm using Prolog in java through JPL, I have some predicates with the format predicate: Using JPL in java the output of format goes to the console output in java,...
[ -0.000865936279296875, 0.0015411376953125, 0.006805419921875, 0.00958251953125, -0.004180908203125, 0.0194091796875, 0.0250244140625, -0.000270843505859375, 0.008544921875, 0.005950927734375, 0.01470947265625, -0.00164794921875, -0.031494140625, -0.02587890625, 0.00897216796875, 0.0172...
[ 20779, 821, 21130, 140992, 3934, 10, 79315, 23, 41925, 2452, 3454, 4867, 502, 79, 330, 1647, 2424, 126684, 1250, 1653, 2063, 9384, 67, 111, 60899, 47, 130250, 831, 3996, 16750, 77336, 129745 ]
[ 0.083251953125, 0.1497802734375, 0.263427734375, 0.2181396484375, 0.1495361328125, 0.0161895751953125, 0.213623046875, 0.07611083984375, 0.2314453125, 0.131591796875, 0.09320068359375, 0.1964111328125, 0.0906982421875, 0.1240234375, 0.188720703125, 0.0748291015625, 0.2071533203125, ...
embed
37326128_c0
37326128
prolog
0
Title: something like pattern matching list in prolog Problem title: something like pattern matching list in prolog Tags: prolog Problem: something like pattern matching list in prolog [A,B,C|_] = [1,2,3,4,5,6,7] A = 1 B = 2 C = 3. I expected this result. However, when I have: L = [A,B,C,D] how to do: L = [1,2,3,4,5,6,...
something like pattern matching list in prolog something like pattern matching list in prolog prolog something like pattern matching list in prolog [A,B,C|_] = [1,2,3,4,5,6,7] A = 1 B = 2 C = 3. I expected this result. However, when I have: how to do: ? The problem is that I don't know how long is L . Only thing that I...
[ -0.006439208984375, 0.01397705078125, 0.021240234375, -0.005645751953125, -0.005889892578125, -0.00860595703125, -0.005767822265625, 0.025390625, 0.024658203125, -0.03271484375, 0.019775390625, 0.0093994140625, 0.000377655029296875, -0.0042724609375, 0.01190185546875, -0.0108642578125,...
[ 9844, 1884, 103510, 14858, 214, 5303, 23, 502, 4867, 571, 441, 155761, 80389, 136555, 62, 2203, 106, 335, 116, 313, 1031, 84751, 16750, 765, 3642, 54, 12, 2967, 3714, 4989, 339, 16610, 56, 7108, 8752, 70541, 4734, 77336 ]
[ 0.0887451171875, 0.1468505859375, 0.249755859375, 0.222412109375, 0.1417236328125, 0.2269287109375, 0.0621337890625, 0.1787109375, 0.2373046875, 0.052978515625, 0.0330810546875, 0.05908203125, 0.1441650390625, 0.1263427734375, 0.0204010009765625, 0.01739501953125, 0.032135009765625, ...
embed
27228930_c0
27228930
prolog
0
Title: To count down from a number using Prolog Problem title: To count down from a number using Prolog Tags: prolog, failure-slice Problem: To count down from a number using Prolog Trivial question but I want the program to return a list of the numbers less than or equal to a given number. For example, CountD(4,L) . s...
To count down from a number using Prolog To count down from a number using Prolog prolog failure-slice a Prolog CountD Num List To count down from a number using Prolog Trivial question but I want the program to return a list of the numbers less than or equal to a given number. For example, CountD(4,L) . should give [4...
[ 0.0191650390625, 0.0021209716796875, -0.00506591796875, 0.01263427734375, 0.00567626953125, 0.00634765625, -0.02197265625, -0.005615234375, 0.01611328125, -0.017578125, -0.0225830078125, -0.032470703125, 0.00897216796875, 0.0322265625, 0.00628662109375, 0.005706787109375, -0.00069046...
[ 717, 54529, 7565, 1295, 14012, 17368, 1250, 4867, 502, 137578, 13348, 108210, 397, 52782, 32036, 686, 3444, 1528, 47, 30646, 5303, 101935, 40715, 3501, 707, 105950, 34475, 105801, 866, 5608, 8337, 617, 363, 304, 76172, 2060 ]
[ 0.049560546875, 0.20068359375, 0.212646484375, 0.165283203125, 0.1591796875, 0.07568359375, 0.163330078125, 0.22900390625, 0.12548828125, 0.1956787109375, 0.117919921875, 0.179443359375, 0.1917724609375, 0.1385498046875, 0.1683349609375, 0.02398681640625, 0.0816650390625, 0.1392822...
embed
74923153_c0
74923153
prolog
0
Title: Composition of substitutions for unary addition in prolog? Problem title: Composition of substitutions for unary addition in prolog? Tags: successor-arithmetics, prolog Problem: Composition of substitutions for unary addition in prolog? Can someone explain how the logic of the composition of substitutions works ...
Composition of substitutions for unary addition in prolog? Composition of substitutions for unary addition in prolog? successor-arithmetics prolog Composition plus2 Composition of substitutions for unary addition in prolog? Can someone explain how the logic of the composition of substitutions works with the following b...
[ -0.00433349609375, 0.0103759765625, 0.016357421875, 0.041259765625, 0.0013427734375, 0.008544921875, -0.00714111328125, 0.016357421875, 0.0224609375, 0.006072998046875, 0.0033111572265625, 0.003448486328125, 0.01171875, 0.012451171875, 0.00164794921875, 0.009033203125, 0.010620117187...
[ 3288, 40322, 161740, 17514, 220, 1294, 66044, 502, 4867, 39457, 42, 8962, 1001, 304, 73342, 62775, 166577, 111, 43240, 678, 25632, 46389, 18151 ]
[ 0.084716796875, 0.1015625, 0.1470947265625, 0.0966796875, 0.11920166015625, 0.11053466796875, 0.1529541015625, 0.09368896484375, 0.1907958984375, 0.12445068359375, 0.01218414306640625, 0.0567626953125, 0.09661865234375, 0.07470703125, 0.031280517578125, 0.09814453125, 0.1845703125, ...
embed
724358_c0
724358
prolog
0
Title: unique results from prolog Problem title: unique results from prolog Tags: prolog Problem: unique results from prolog Is there a easy way to make a query in prolog only return each result once? for instance I'm trying something like: deadly(Xn) :- scary(X), Xn is X - 1, Xp is X + 1, not(safe(Xn)), safe(Xp). dead...
unique results from prolog unique results from prolog prolog prolog unique results from prolog Is there a easy way to make a query in prolog only return each result once? for instance I'm trying something like: and getting Not to usefull for me.
[ 0.01806640625, 0.016357421875, 0.0257568359375, -0.0137939453125, -0.00994873046875, -0.002838134765625, 0.01165771484375, -0.0020904541015625, 0.010498046875, -0.06298828125, -0.01239013671875, -0.00101470947265625, -0.003692626953125, 0.003814697265625, 0.01318359375, 0.033447265625,...
[ 36998, 50339, 1295, 502, 4867, 23468, 3917, 47, 3249, 41, 1294, 23, 4734, 30646, 12638, 16750, 24145, 31577, 11205, 80234, 141, 100 ]
[ 0.2354736328125, 0.2188720703125, 0.09332275390625, 0.1512451171875, 0.25634765625, 0.10699462890625, 0.05621337890625, 0.10845947265625, 0.053619384765625, 0.1361083984375, 0.1414794921875, 0.050811767578125, 0.147216796875, 0.1793212890625, 0.1248779296875, 0.1966552734375, 0.23193...
embed
14541472_c0
14541472
prolog
0
Title: How to put information into prolog Problem title: How to put information into prolog Tags: prolog, logic, weblogic-10.x Problem: How to put information into prolog > The father sat to the right of the person who had corn, > who sat to the right of the person who ate pork, who sat to the right of the > person who...
How to put information into prolog How to put information into prolog prolog logic weblogic-10.x How weblogic-10.x How to put information into prolog How this can be converted into Prolog predicates? Can anyone help?
[ 0.0260009765625, 0.0166015625, 0.004302978515625, 0.0257568359375, -0.0247802734375, 0.0208740234375, -0.00152587890625, 0.004241943359375, 0.0096435546875, -0.06103515625, 0.0177001953125, 0.00131988525390625, -0.01953125, -0.00787353515625, 0.01708984375, -0.0021209716796875, 0.013...
[ 11249, 47, 3884, 4677, 3934, 502, 4867, 62775, 1467, 137043, 9193, 425, 117176, 1250, 1653, 2063, 1636, 4358 ]
[ 0.07293701171875, 0.054229736328125, 0.126708984375, 0.1925048828125, 0.1478271484375, 0.1651611328125, 0.241943359375, 0.1497802734375, 0.06591796875, 0.1904296875, 0.106201171875, 0.0875244140625, 0.1075439453125, 0.1583251953125, 0.126220703125, 0.1778564453125, 0.09735107421875, ...
embed
52771541_c0
52771541
prolog
0
Title: Prolog, trying to append 2 lists but kept on getting false Problem title: Prolog, trying to append 2 lists but kept on getting false Tags: list, append, rules, prolog Problem: Prolog, trying to append 2 lists but kept on getting false lists([a,b,c]). first(F):-lists([F,_,_]). second(S):-lists([_,S,_]). last(L):-...
Prolog, trying to append 2 lists but kept on getting false Prolog, trying to append 2 lists but kept on getting false list append rules prolog Prolog Prolog, trying to append 2 lists but kept on getting false I'm basically trying to get a return X=[c,a] but kept on getting false.
[ 0.01287841796875, 0.0234375, 0.006256103515625, 0.00653076171875, -0.000919342041015625, 0.0191650390625, -0.000213623046875, 0.028076171875, 0.0133056640625, -0.00286865234375, 0.00909423828125, -0.0166015625, -0.018798828125, 0.01397705078125, 0.01080322265625, 0.004364013671875, 0...
[ 1250, 4867, 31577, 114689, 71, 116, 5303, 93544, 98, 98320, 1284, 91736, 502, 20949, 30646, 1193, 1369, 238, 11 ]
[ 0.09674072265625, 0.2100830078125, 0.07220458984375, 0.127197265625, 0.07073974609375, 0.10247802734375, 0.152099609375, 0.08941650390625, 0.03619384765625, 0.1845703125, 0.03948974609375, 0.129150390625, 0.077880859375, 0.01171875, 0.1728515625, 0.1173095703125, 0.03387451171875, ...
embed
9022132_c0
9022132
prolog
0
Title: Checking repetition in list - Prolog Problem title: Checking repetition in list - Prolog Tags: prolog Problem: Checking repetition in list - Prolog I'm trying to write hasRepetition that 'recives' a list and returns true if and only if it has repetitions in it. I wrote : hasRepetition([Head|Tail]) :- member(Head...
Checking repetition in list - Prolog Checking repetition in list - Prolog prolog Checking Prolog Checking repetition in list - Prolog I'm trying to write hasRepetition that 'recives' a list and returns true if and only if it has repetitions in it. I wrote : hasRepetition([Head|Tail]) :- member(Head,Tail);hasRepetition(...
[ -0.0146484375, 0.0081787109375, 0.0194091796875, 0.016845703125, -0.016845703125, -0.005889892578125, 0.0093994140625, -0.0004425048828125, -0.0000514984130859375, -0.011962890625, -0.00457763671875, 0.0091552734375, 0.00360107421875, 0.0078125, 0.0011138916015625, 0.031494140625, 0....
[ 38679, 214, 57346, 1363, 23, 5303, 1250, 4867, 502, 31577, 33022, 1556, 4332, 63065, 31688, 60877, 30646, 29568, 2174, 4734, 5256, 54397, 13025, 712, 58745, 9874, 379, 32786, 10557, 361, 705, 76172, 151206, 24638, 2663, 67919, 79912, 5983, ...
[ 0.2039794921875, 0.00274658203125, 0.34130859375, 0.135498046875, 0.06292724609375, 0.2105712890625, 0.1446533203125, 0.212646484375, 0.076171875, 0.0389404296875, 0.0941162109375, 0.1912841796875, 0.16943359375, 0.299560546875, 0.08392333984375, 0.05377197265625, 0.095947265625, 0...
embed
56382095_c0
56382095
prolog
0
Title: deleting zero from string in prolog Problem title: deleting zero from string in prolog Tags: prolog, string Problem: deleting zero from string in prolog there is my problem that I can't solve on prolog Enter a string from the keyboard. Remove from each group of digits, which is not preceded by a dot, all initial...
deleting zero from string in prolog deleting zero from string in prolog prolog string string deleting zero from string in prolog there is my problem that I can't solve on prolog Enter a string from the keyboard. Remove from each group of digits, which is not preceded by a dot, all initial zeros (except the last one), i...
[ -0.00445556640625, 0.0115966796875, -0.016845703125, 0.027099609375, -0.0211181640625, 0.00164794921875, 0.0130615234375, 0.00775146484375, 0.005645751953125, 0.0206298828125, -0.00604248046875, 0.00482177734375, -0.027099609375, -0.01153564453125, 0.019287109375, 0.002532958984375, ...
[ 24674, 1916, 45234, 1295, 79315, 23, 502, 4867, 2967, 831, 18, 86869, 60816, 149186, 181139, 12638, 21115, 153939, 959, 107671, 20633, 756, 61475, 4568, 2174, 6275, 7103, 442, 13315, 230282, 963, 8110, 3249, 37509, 4358 ]
[ 0.178466796875, 0.05499267578125, 0.2493896484375, 0.116943359375, 0.236572265625, 0.0546875, 0.149169921875, 0.2193603515625, 0.0736083984375, 0.0144805908203125, 0.0029296875, 0.076904296875, 0.080078125, 0.194091796875, 0.1234130859375, 0.035614013671875, 0.080078125, 0.12145996...
embed
23327257_c0
23327257
prolog
0
Title: Does Prolog have an &quot;if and only if&quot; operator? Problem title: Does Prolog have an &quot;if and only if&quot; operator? Tags: prolog Problem: Does Prolog have an "if and only if" operator? I would normally write such a statement as two clauses, like this: x :- y. y :- x. In Prolog, is there any concise ...
Does Prolog have an &quot;if and only if&quot; operator? Does Prolog have an &quot;if and only if&quot; operator? prolog Does Prolog Does Prolog have an "if and only if" operator? I would normally write such a statement as two clauses, like this: In Prolog, is there any concise way to write a statement like "if x then ...
[ 0.01904296875, 0.01055908203125, 0.033935546875, 0.0020904541015625, 0.00341796875, 0.005950927734375, 0.0196533203125, 0.00457763671875, 0.0026092529296875, 0.00156402587890625, -0.0057373046875, 0.007415771484375, -0.004913330078125, -0.0020751953125, 0.02734375, 0.020263671875, -0...
[ 101790, 1250, 4867, 765, 142, 3190, 136, 4734, 2174, 41502, 74, 39933, 502, 58, 3638, 33022, 6044, 63805, 6626, 70731, 360, 158, 318, 3917, 1022, 7068, 113, 22925, 28784, 7722, 425, 237, 11001 ]
[ 0.03192138671875, 0.1883544921875, 0.285400390625, 0.07147216796875, 0.06365966796875, 0.2200927734375, 0.163330078125, 0.191162109375, 0.245849609375, 0.037353515625, 0.00244140625, 0.264892578125, 0.1162109375, 0.035614013671875, 0.027008056640625, 0.1282958984375, 0.00787353515625...
embed
35666698_c0
35666698
prolog
0
Title: tokenize long list using DCG Problem title: tokenize long list using DCG Tags: prolog, dcg, list Problem: tokenize long list using DCG if I want to tokenize a long list using DCG, what is the preferable methode between the two predicate below ; 1- using ['terminal'] some_terminals(T) --> ['this('],end(T),[')END'...
tokenize long list using DCG tokenize long list using DCG prolog dcg list DCG some_terminals END tokenize long list using DCG if I want to tokenize a long list using DCG, what is the preferable methode between the two predicate below ; 1- using ['terminal'] 2-using "terminal" Other question what is the difference betwe...
[ 0.0380859375, 0.0079345703125, -0.00095367431640625, 0.0164794921875, -0.018310546875, -0.01275634765625, -0.0152587890625, 0.0233154296875, 0.00799560546875, -0.0439453125, 0.00732421875, -0.0093994140625, -0.001861572265625, -0.004669189453125, 0.0019989013671875, 0.00102996826171875...
[ 47, 1098, 20650, 4989, 5303, 17368, 391, 56367, 502, 4867, 104, 238, 177, 3060, 30524, 16765, 39015, 12601, 2886, 113399, 17721, 6626, 1653, 2063, 35064, 289, 4720, 223, 214, 60212, 2819, 136, 58745 ]
[ 0.103271484375, 0.1688232421875, 0.0865478515625, 0.105224609375, 0.20361328125, 0.1170654296875, 0.117919921875, 0.204833984375, 0.0994873046875, 0.1475830078125, 0.0343017578125, 0.016265869140625, 0.06976318359375, 0.019866943359375, 0.233642578125, 0.101318359375, 0.0693359375, ...
embed
16843899_c0
16843899
prolog
0
Title: get list of public predicates defined in a module Problem title: get list of public predicates defined in a module Tags: yap, prolog Problem: get list of public predicates defined in a module I know that in Prolog every file defining a module should start with the instruction :- module(module_name, [pred1/arity,...
get list of public predicates defined in a module get list of public predicates defined in a module yap prolog module_name pred1 get list of public predicates defined in a module I know that in Prolog every file defining a module should start with the instruction How can I retrieve the list of public predicates exporte...
[ 0.00750732421875, -0.0208740234375, 0.0166015625, 0.0179443359375, 0.00244140625, 0.02783203125, 0.0284423828125, 0.006927490234375, -0.0123291015625, -0.05517578125, 0.021484375, 0.0024261474609375, -0.0167236328125, -0.01171875, 0.0017852783203125, 0.0233154296875, -0.005859375, ...
[ 2046, 5303, 111, 3835, 1653, 2063, 1636, 61924, 71, 88996, 23, 15850, 502, 4867, 11627, 418, 3714, 1250, 11907, 11435, 13204, 4034, 678, 188336, 831, 456, 3996, 3134, 31255, 11675, 6032, 78837, 756, 1542, 83279, 163812, 19714, 67 ]
[ 0.0703125, 0.1624755859375, 0.01019287109375, 0.1695556640625, 0.20458984375, 0.217529296875, 0.128173828125, 0.1873779296875, 0.0531005859375, 0.2275390625, 0.03271484375, 0.15478515625, 0.1170654296875, 0.203125, 0.0361328125, 0.044677734375, 0.001251220703125, 0.134521484375, ...
embed
30907086_c0
30907086
prolog
0
Title: PROLOG: Summing up the series procedure Problem title: PROLOG: Summing up the series procedure Tags: prolog Problem: PROLOG: Summing up the series procedure I have been trying to work on this problem that I found in a book, but am not able to make sense of it in my head. The problem asks me to use series(N, Tota...
PROLOG: Summing up the series procedure PROLOG: Summing up the series procedure prolog PROLOG Summing Total PROLOG: Summing up the series procedure I have been trying to work on this problem that I found in a book, but am not able to make sense of it in my head. The problem asks me to use series(N, Total) for this proc...
[ 0.005126953125, 0.0086669921875, 0.0032806396484375, 0.01068115234375, -0.0172119140625, 0.0137939453125, 0.006500244140625, 0.022216796875, 0.00165557861328125, -0.017822265625, -0.001495361328125, -0.00726318359375, -0.022216796875, -0.0184326171875, 0.024658203125, 0.0233154296875, ...
[ 10514, 47510, 1832, 58838, 1257, 36549, 50491, 502, 4867, 33867, 12, 31577, 4488, 2967, 14037, 12877, 959, 19048, 3249, 10422, 23, 10336, 26458, 47, 4527, 839, 100, 903, 74, 106, 997, 22128, 62366, 57294, 64, 110218, 4358, 28219, 77947, 5...
[ 0.1722412109375, 0.2366943359375, 0.2000732421875, 0.2012939453125, 0.1832275390625, 0.234375, 0.234619140625, 0.1170654296875, 0.183837890625, 0.2489013671875, 0.001617431640625, 0.03570556640625, 0.034759521484375, 0.1448974609375, 0.03912353515625, 0.0889892578125, 0.0419921875, ...
embed
7231402_c1
7231402
prolog
1
would be possible (but, this part is not required , if you are able to answer to first part, it's great and enough) check( a ++ (b ++ X) equals (c ++ Y) ++ b) ) one of possible results (thanks @mat for showing others) X=c, Y=a I am looking mostly for solution for first part of question - "yes/no" checking. Second part...
would be possible (but, this part is not required , if you are able to answer to first part, it's great and enough) check( a ++ (b ++ X) equals (c ++ Y) ++ b) ) one of possible results (thanks @mat for showing others) X=c, Y=a I am looking mostly for solution for first part of question - "yes/no" checking. Second part...
[ 0.01123046875, 0.0067138671875, 0.03271484375, 0.0159912109375, -0.0152587890625, 0.0296630859375, 0.00634765625, 0.0123291015625, -0.00506591796875, -0.00213623046875, -0.009521484375, -0.005218505859375, -0.00787353515625, -0.0047607421875, 0.0014801025390625, -0.01324462890625, 0....
[ 2806, 186, 7722, 2831, 56065, 19048, 35166, 6782, 20174, 12765, 132, 10, 37223, 275, 1193, 105950, 7, 238, 990, 876, 50339, 1369, 4, 11, 16487, 153161, 29806, 5117, 63736, 64, 157, 175199, 77648, 678, 1723, 26267, 66044, 8781, 34627, 2778...
[ 0.0548095703125, 0.03778076171875, 0.1981201171875, 0.058135986328125, 0.045379638671875, 0.019866943359375, 0.06378173828125, 0.009063720703125, 0.0072021484375, 0.227294921875, 0.03289794921875, 0.07867431640625, 0.2105712890625, 0.10546875, 0.132568359375, 0.214111328125, 0.057312...
embed
32720673_c0
32720673
prolog
0
Title: Prolog Insert the number in the list by the tail Problem title: Prolog Insert the number in the list by the tail Tags: dcg, list, difference-lists, prolog Problem: Prolog Insert the number in the list by the tail How can I build a predicate in prolog that receives a number and a list, I must insert the number in...
Prolog Insert the number in the list by the tail Prolog Insert the number in the list by the tail dcg list difference-lists prolog Prolog Insert Prolog Insert the number in the list by the tail How can I build a predicate in prolog that receives a number and a list, I must insert the number in the list by the tail I tr...
[ 0.0198974609375, -0.0029296875, 0.01446533203125, 0.022216796875, -0.01214599609375, 0.0279541015625, -0.0240478515625, -0.01519775390625, -0.00152587890625, -0.03662109375, 0.004364013671875, -0.02685546875, -0.00909423828125, -0.006927490234375, -0.0028533935546875, 0.002899169921875...
[ 1250, 4867, 360, 33657, 14012, 23, 5303, 390, 70, 46741, 238, 177, 60212, 6562, 502, 831, 45367, 1653, 2063, 67, 53299, 136, 8110, 183540, 37842, 10336, 841, 683, 58745, 2737, 43240, 3642, 54, 442 ]
[ 0.1793212890625, 0.25146484375, 0.08544921875, 0.1759033203125, 0.1934814453125, 0.06884765625, 0.211669921875, 0.1412353515625, 0.039215087890625, 0.28125, 0.006988525390625, 0.044403076171875, 0.1685791015625, 0.1722412109375, 0.163818359375, 0.035369873046875, 0.1724853515625, 0...
embed
20814992_c0
20814992
prolog
0
Title: prolog:query that search about range in list Problem title: prolog:query that search about range in list Tags: prolog Problem: prolog:query that search about range in list I need to write query that search in given range in list I try this but it does not work find(R1, R2, Z, L):- D=1, element_at(X, Z, D), X >= ...
prolog:query that search about range in list prolog:query that search about range in list prolog prolog:query element_at prolog:query that search about range in list I need to write query that search in given range in list I try this but it does not work it give me false but I need to return the list that contain integ...
[ -0.0208740234375, 0.01287841796875, -0.0034027099609375, 0.007537841796875, -0.005859375, 0.024658203125, -0.0047607421875, 0.0150146484375, 0.0006561279296875, -0.0247802734375, 0.0213623046875, 0.004241943359375, 0.001495361328125, 0.0014801025390625, 0.00860595703125, 0.0185546875, ...
[ 502, 4867, 944, 1294, 450, 33938, 1672, 37457, 23, 5303, 12830, 257, 3871, 33022, 41, 34475, 9790, 959, 4488, 98320, 30646, 70, 70541, 892, 26255, 903, 129745 ]
[ 0.1463623046875, 0.2041015625, 0.1263427734375, 0.1640625, 0.0703125, 0.2308349609375, 0.1363525390625, 0.235595703125, 0.0792236328125, 0.1778564453125, 0.1865234375, 0.09735107421875, 0.07122802734375, 0.062744140625, 0.1522216796875, 0.022308349609375, 0.0609130859375, 0.0432434...
embed
49081768_c0
49081768
prolog
0
Title: Logic Programming with Prolog Problem title: Logic Programming with Prolog Tags: logic, prolog Problem: Logic Programming with Prolog Logic Programming with Prolog: Consider the program: f(X) :- !, X = a. f(X) :- !, X = b. f(X) :- X = c. What does P return for the queries f(a) , f(b) and f(c) respectively? Consi...
Logic Programming with Prolog Logic Programming with Prolog logic prolog Logic Programming Prolog Logic Programming with Prolog Logic Programming with Prolog: Consider the program: What does P return for the queries f(a) , f(b) and f(c) respectively? Consider the program: What does P return for the queries f(a) , f(b) ...
[ 0.0263671875, 0.023193359375, 0.01165771484375, 0.017578125, -0.0172119140625, 0.008544921875, -0.00457763671875, -0.005126953125, 0.0096435546875, -0.00640869140625, 0.01177978515625, 0.00186920166015625, -0.01361083984375, 0.00028228759765625, 0.0101318359375, 0.004180908203125, 0....
[ 50592, 238, 27958, 214, 678, 1250, 4867, 62775, 502, 137399, 1528, 4865, 14602, 436, 30646, 100, 41, 10484, 1238, 11, 275, 136, 107013 ]
[ 0.225830078125, 0.07611083984375, 0.1878662109375, 0.06268310546875, 0.121826171875, 0.2100830078125, 0.23779296875, 0.2052001953125, 0.1572265625, 0.1409912109375, 0.1661376953125, 0.03076171875, 0.0489501953125, 0.150634765625, 0.22705078125, 0.064208984375, 0.1417236328125, 0.09...
embed
50341433_c1
50341433
prolog
1
,X). X = ascii. Win 8.1 64bit, with code page 852. And how to fix it? Thank you in advance EDIT: probably I've found the answer to my second question: 'how to fix it'. It seems, that additional clause: sort(Lascii,SortedLascii) removes repetitions and leaves the basic set of 128 chars alone. but I still do not understa...
,X). X = ascii. Win 8.1 64bit, with code page 852. And how to fix it? Thank you in advance EDIT: probably I've found the answer to my second question: 'how to fix it'. It seems, that additional clause: sort(Lascii,SortedLascii) removes repetitions and leaves the basic set of 128 chars alone. but I still do not understa...
[ -0.002532958984375, -0.000759124755859375, 0.00107574462890625, 0.0172119140625, -0.0145263671875, -0.004791259765625, -0.000827789306640625, -0.00518798828125, 0.0086669921875, 0.004425048828125, 0.0167236328125, -0.00469970703125, -0.00147247314453125, 0.0162353515625, -0.0206298828125...
[ 4, 1542, 194, 1193, 2203, 237, 26506, 17686, 70885, 7911, 3137, 18151, 9191, 9365, 5442, 3642, 47, 30022, 442, 47251, 1650, 78301, 70731, 13, 12096, 132, 2729, 7, 158240, 3674, 87388, 57346, 31358, 62822, 5423, 26560, 21441, 75447, 959, 2...
[ 0.0411376953125, 0.1995849609375, 0.07061767578125, 0.2174072265625, 0.1236572265625, 0.10650634765625, 0.268310546875, 0.159423828125, 0.25048828125, 0.1524658203125, 0.119384765625, 0.1708984375, 0.057373046875, 0.1348876953125, 0.121337890625, 0.03936767578125, 0.0745849609375, ...
embed
65299576_c0
65299576
prolog
0
Title: If you write a compiler in pure Prolog, will it work as a decompiler also? Problem title: If you write a compiler in pure Prolog, will it work as a decompiler also? Tags: decompiling, prolog, decompiler Problem: If you write a compiler in pure Prolog, will it work as a decompiler also? If you write a compiler in...
If you write a compiler in pure Prolog, will it work as a decompiler also? If you write a compiler in pure Prolog, will it work as a decompiler also? decompiling prolog decompiler Prolog If you write a compiler in pure Prolog, will it work as a decompiler also? If you write a compiler in pure Prolog (no extra-logical b...
[ 0.0230712890625, 0.020751953125, 0.00946044921875, 0.00567626953125, -0.00469970703125, 0.021240234375, -0.01287841796875, -0.0189208984375, -0.0040283203125, -0.0216064453125, -0.021728515625, 0.009521484375, -0.01373291015625, 0.0281982421875, 0.0240478515625, 0.00225830078125, -0....
[ 33022, 9969, 34759, 34166, 1250, 4867, 4488, 237, 8, 58875, 23, 49725, 502, 1221, 2843, 157, 4173, 137043, 4785, 16454, 32195, 20653, 37842 ]
[ 0.1265869140625, 0.1611328125, 0.1650390625, 0.150634765625, 0.13427734375, 0.1822509765625, 0.0689697265625, 0.048980712890625, 0.18994140625, 0.159912109375, 0.0193023681640625, 0.071533203125, 0.0731201171875, 0.006805419921875, 0.02813720703125, 0.0241241455078125, 0.022140502929...
embed
65840506_c0
65840506
prolog
0
Title: An error showing while run this prolog code Problem title: An error showing while run this prolog code Tags: factors, integer, list, syntax, prolog Problem: An error showing while run this prolog code A syntax error is showing while running this prolog code for finding factors of a list of number factors( N , Fs...
An error showing while run this prolog code An error showing while run this prolog code factors integer list syntax prolog List Result An error showing while run this prolog code A syntax error is showing while running this prolog code for finding factors of a list of number
[ 0.00860595703125, -0.00982666015625, 0.01190185546875, 0.002471923828125, -0.004791259765625, 0.00384521484375, 0.0023040771484375, -0.0115966796875, -0.0031890869140625, -0.0211181640625, 0.002044677734375, -0.0289306640625, -0.017822265625, 0.00634765625, 0.002105712890625, -0.017089...
[ 893, 18499, 141377, 12960, 11675, 903, 502, 4867, 18151, 120103, 892, 1505, 5303, 6002, 86531, 32036, 126684, 62, 83, 51042, 90791, 111, 10, 14012 ]
[ 0.055755615234375, 0.22900390625, 0.145751953125, 0.1552734375, 0.175048828125, 0.11749267578125, 0.181640625, 0.224365234375, 0.18408203125, 0.253173828125, 0.11968994140625, 0.040283203125, 0.148681640625, 0.151611328125, 0.2325439453125, 0.1263427734375, 0.1265869140625, 0.01930...
embed
31747498_c1
31747498
prolog
1
_metric_map translate(point(X,Y), value(Dx,Dy), point(Sx,Sy)) :- Sx is X + Dx, Sy is Y + Dy. translate(polyline([]), value(_,_), polyline([])). translate(polyline([P|R]), value(Dx,Dy), polyline([Sp|Sr])) :- translate(P,value(Dx,Dy),Sp), translate(polyline(R), value(Dx,Dy), polyline(Sr)). Code signals: ERROR, Arguments,...
_metric_map translate(point(X,Y), value(Dx,Dy), point(Sx,Sy)) :- Sx is X + Dx, Sy is Y + Dy. translate(polyline([]), value(_,_), polyline([])). translate(polyline([P|R]), value(Dx,Dy), polyline([Sp|Sr])) :- translate(P,value(Dx,Dy),Sp), translate(polyline(R), value(Dx,Dy), polyline(Sr)). Code signals: ERROR, Arguments,...
[ 0.0028076171875, -0.0172119140625, -0.0001888275146484375, -0.0120849609375, 0.00537109375, -0.01513671875, -0.034423828125, 0.0072021484375, 0.01171875, -0.00543212890625, 0.001373291015625, -0.005340576171875, -0.003936767578125, 0.01251220703125, -0.0125732421875, 0.00982666015625, ...
[ 101, 186518, 62346, 3900, 19309, 38496, 1542, 1723, 34292, 397, 425, 53, 247, 6275, 294, 65183, 15772, 159, 83, 1193, 997, 391, 4843, 990, 9865, 135545, 2256, 35874, 1052, 31923, 42, 683, 27494, 28864, 26073, 151206, 24638, 112140, 27198, ...
[ 0.041748046875, 0.26171875, 0.2408447265625, 0.1839599609375, 0.2342529296875, 0.1666259765625, 0.095458984375, 0.1412353515625, 0.1827392578125, 0.047088623046875, 0.186767578125, 0.10540771484375, 0.0030517578125, 0.18017578125, 0.06048583984375, 0.181884765625, 0.07586669921875, ...
embed
61276283_c0
61276283
prolog
0
Title: Using Prolog to solve a brain teaser (Master Mind) Problem title: Using Prolog to solve a brain teaser (Master Mind) Tags: prolog, cryptarithmetic-puzzle Problem: Using Prolog to solve a brain teaser (Master Mind) A friend from work shared this with our whatsapp group: This lock has a 3 digit code. Can you guess...
Using Prolog to solve a brain teaser (Master Mind) Using Prolog to solve a brain teaser (Master Mind) prolog cryptarithmetic-puzzle Using Prolog Master Mind Using Prolog to solve a brain teaser (Master Mind) A friend from work shared this with our whatsapp group: We solved it using something akin to a truth table. I'm ...
[ 0.006256103515625, -0.007171630859375, -0.00225830078125, 0.004669189453125, 0.0003604888916015625, 0.0028076171875, -0.01495361328125, 0.0140380859375, 0.0037689208984375, -0.046875, -0.00848388671875, -0.00665283203125, 0.0023956298828125, 0.03857421875, 0.013427734375, 0.02136230468...
[ 345, 1250, 4867, 86869, 78574, 214295, 116527, 29616, 6953, 502, 136791, 8962, 282, 1766, 13894, 133, 18897, 34391, 4488, 99764, 903, 125072, 21115, 442, 17368, 9844, 27255, 47, 85027, 23180, 193844, 49903, 3642, 2806, 71, 23 ]
[ 0.05560302734375, 0.1807861328125, 0.2568359375, 0.1507568359375, 0.11865234375, 0.283935546875, 0.1160888671875, 0.2037353515625, 0.022552490234375, 0.142333984375, 0.1474609375, 0.099609375, 0.012664794921875, 0.08233642578125, 0.110107421875, 0.0246429443359375, 0.10308837890625, ...
embed
1777272_c0
1777272
prolog
0
Title: Complexity in Prolog programs? Problem title: Complexity in Prolog programs? Tags: algorithm, prolog, complexity-theory Problem: Complexity in Prolog programs? In Prolog, problems are solved using backtracking. It's a declarative paradigm rather than an imperative one (like in C, PHP or Python). In this kind of ...
Complexity in Prolog programs? Complexity in Prolog programs? algorithm prolog complexity-theory Complexity Prolog Complexity in Prolog programs? In Prolog, problems are solved using backtracking. It's a declarative paradigm rather than an imperative one (like in C, PHP or Python). In this kind of languages is it worth...
[ 0.0284423828125, 0.0191650390625, 0.0101318359375, 0.005706787109375, 0.00173187255859375, 0.007568359375, 0.0013885498046875, 0.00128173828125, 0.0013580322265625, -0.0439453125, 0.0024871826171875, -0.002960205078125, -0.017578125, 0.00445556640625, 0.00482177734375, 0.00762939453125...
[ 113197, 2481, 23, 1250, 4867, 103391, 234873, 502, 27140, 2347, 30675, 360, 44402, 621, 86869, 17368, 4420, 125728, 214, 21635, 4935, 214709, 43257, 3501, 222530, 313, 47302, 145581, 8562, 46876, 41965, 5351, 69407, 6083, 3917, 37202, 180, 13...
[ 0.252197265625, 0.154052734375, 0.06341552734375, 0.213134765625, 0.2890625, 0.2021484375, 0.1868896484375, 0.1563720703125, 0.2296142578125, 0.0816650390625, 0.0194854736328125, 0.056396484375, 0.1900634765625, 0.003753662109375, 0.170166015625, 0.06195068359375, 0.159912109375, 0...
embed
27067314_c0
27067314
prolog
0
Title: Prolog graph search Problem title: Prolog graph search Tags: prolog, search, trace Problem: Prolog graph search I have created a simple graph search from an example move(math101, math102). move(math101, chem101). move(math102, math210). move(math102, phys102). move(phys102, phys201). move(math210, phys201). sear...
Prolog graph search Prolog graph search prolog search trace Prolog math101 math102 chem101 math210 phys102 phys201 Path CALL FOUND _4193470 _15353627 _14830180 _8522358 BIND _10259988 FAIL REDO Prolog graph search I have created a simple graph search from an example I can tell you that to get to 'phys201' from 'math101...
[ 0.0040283203125, 0.0162353515625, -0.002349853515625, 0.031982421875, -0.00946044921875, 0.00494384765625, -0.0184326171875, 0.0012664794921875, 0.0159912109375, -0.04443359375, 0.001007080078125, 0.01708984375, -0.028564453125, 0.000492095947265625, -0.004119873046875, -0.000078201293...
[ 1250, 4867, 41382, 33938, 502, 144851, 48909, 35046, 49150, 290, 39, 88142, 34053, 123885, 108421, 313, 66437, 44944, 617, 2947, 10289, 5757, 3768, 39425, 144827, 69283, 193021, 15491, 16444, 118790, 670, 75935, 8781, 1295, 27781, 14192, 2046, ...
[ 0.1748046875, 0.263916015625, 0.2127685546875, 0.208251953125, 0.1328125, 0.2161865234375, 0.0853271484375, 0.2254638671875, 0.25146484375, 0.03887939453125, 0.025177001953125, 0.2093505859375, 0.1103515625, 0.257568359375, 0.2144775390625, 0.02972412109375, 0.1357421875, 0.0542602...
embed
34119520_c1
34119520
prolog
1
,W), H1 is H-W, W<H, change(T,T1). So this produces results that will take any number of stones from any individual list and currently will take a differing number of stones from differing lists. So currently I cant get it to work where you want to take the same number of stones from differing lists. I.e if I had [1,4,...
,W), H1 is H-W, W<H, change(T,T1). So this produces results that will take any number of stones from any individual list and currently will take a differing number of stones from differing lists. So currently I cant get it to work where you want to take the same number of stones from differing lists. I.e if I had [1,4,...
[ -0.0079345703125, 0.0015716552734375, -0.00433349609375, 0.01904296875, -0.0196533203125, 0.0064697265625, -0.0030364990234375, -0.0012664794921875, 0.0301513671875, -0.00099945068359375, 0.00732421875, 0.01153564453125, 0.01495361328125, 0.007598876953125, 0.0035400390625, -0.00059127...
[ 1456, 572, 418, 83, 9, 601, 16093, 841, 15549, 618, 17727, 903, 27489, 50339, 1221, 5646, 2499, 14012, 3474, 1444, 1295, 11651, 5303, 82424, 129927, 214, 45767, 2046, 442, 4488, 3444, 5701, 2174, 1902, 163324, 96386, 1884, 19048, 3564, 12...
[ 0.134521484375, 0.1014404296875, 0.0802001953125, 0.03546142578125, 0.054595947265625, 0.084228515625, 0.04852294921875, 0.0950927734375, 0.200927734375, 0.053192138671875, 0.08935546875, 0.068603515625, 0.09600830078125, 0.1514892578125, 0.0247344970703125, 0.1546630859375, 0.040191...
embed
48596001_c0
48596001
prolog
0
Title: How to find nth fibonacci term in prolog? Problem title: How to find nth fibonacci term in prolog? Tags: fibonacci, prolog Problem: How to find nth fibonacci term in prolog? Here's the code that i've written: /* fib(X,Y) means xth term in fibonacci series is Y. */ fib(1,0). fib(2,1). fib(X,Y):-X1 is X-1,fib(X1,Y...
How to find nth fibonacci term in prolog? How to find nth fibonacci term in prolog? fibonacci prolog How X-1 X-2 How to find nth fibonacci term in prolog? Here's the code that i've written: Why am I getting the result as a summation series? What corrections should I make?
[ 0.025390625, 0.0019073486328125, 0.004608154296875, -0.00183868408203125, -0.01220703125, 0.01226806640625, 0.01373291015625, 0.01904296875, 0.01177978515625, -0.01531982421875, 0.027587890625, -0.03271484375, -0.019775390625, -0.0108642578125, -0.000644683837890625, 0.010498046875, ...
[ 11249, 47, 7413, 653, 927, 809, 20990, 52544, 13579, 23, 502, 4867, 1193, 5759, 5428, 18151, 44084, 20949, 16750, 237, 29334, 1363, 36549, 26785 ]
[ 0.072265625, 0.03985595703125, 0.1243896484375, 0.2093505859375, 0.2244873046875, 0.129150390625, 0.1453857421875, 0.185791015625, 0.226806640625, 0.048583984375, 0.1500244140625, 0.2314453125, 0.07781982421875, 0.13037109375, 0.16552734375, 0.06756591796875, 0.0109710693359375, 0....
embed
33375783_c0
33375783
prolog
0
Title: findall in prolog, param goal is: between + member, how to? Problem title: findall in prolog, param goal is: between + member, how to? Tags: prolog Problem: findall in prolog, param goal is: between + member, how to? I have to make a prolog program, and I have to find all combinations that meet those conditions:...
findall in prolog, param goal is: between + member, how to? findall in prolog, param goal is: between + member, how to? prolog findall in prolog, param goal is: between + member, how to? I have to make a prolog program, and I have to find all combinations that meet those conditions: ... code... function(..., List), fin...
[ -0.01312255859375, 0.0021514892578125, 0.005889892578125, 0.01123046875, -0.01495361328125, 0.0247802734375, 0.004425048828125, -0.006988525390625, 0.006256103515625, -0.02490234375, 0.01025390625, -0.0169677734375, 0.0198974609375, -0.0091552734375, 0.00116729736328125, 0.001258850097...
[ 7413, 5584, 23, 502, 4867, 121, 39, 69236, 17721, 997, 32786, 3642, 47, 83, 765, 3249, 1528, 756, 162515, 23356, 27289, 18151, 32354, 32036, 18347, 4032, 313, 4626, 1177, 839, 1542, 54, 41780, 420 ]
[ 0.1732177734375, 0.254150390625, 0.06182861328125, 0.1708984375, 0.24658203125, 0.134033203125, 0.10791015625, 0.2418212890625, 0.211181640625, 0.135498046875, 0.2283935546875, 0.03582763671875, 0.0806884765625, 0.033599853515625, 0.002105712890625, 0.0272216796875, 0.1173095703125, ...
embed
50250234_c0
50250234
prolog
0
Title: Prolog: how to non-uniformly randomly select a element from a list? Problem title: Prolog: how to non-uniformly randomly select a element from a list? Tags: random, prolog Problem: Prolog: how to non-uniformly randomly select a element from a list? Does anyone have any Prolog code to non-uniformly select a rando...
Prolog: how to non-uniformly randomly select a element from a list? Prolog: how to non-uniformly randomly select a element from a list? random prolog a Prolog Prolog: how to non-uniformly randomly select a element from a list? Does anyone have any Prolog code to non-uniformly select a random element from a list? I want...
[ -0.006744384765625, 0.015380859375, 0.0230712890625, -0.005096435546875, -0.0322265625, 0.0147705078125, -0.0159912109375, -0.0179443359375, -0.0069580078125, -0.02197265625, -0.000934600830078125, -0.00970458984375, -0.0179443359375, -0.00714111328125, 0.00421142578125, 0.015991210937...
[ 1250, 4867, 3642, 47, 351, 5980, 5037, 538, 96759, 36849, 12830, 1295, 5303, 502, 10, 12, 35672, 2499, 18151, 3444, 143126, 67, 123309, 13269, 6493, 46258, 39, 3089, 2980, 34475, 37242, 137272, 12638, 42805, 107730, 5 ]
[ 0.154296875, 0.247314453125, 0.0748291015625, 0.055419921875, 0.131103515625, 0.03900146484375, 0.128662109375, 0.09124755859375, 0.183349609375, 0.18408203125, 0.1661376953125, 0.0906982421875, 0.1715087890625, 0.127685546875, 0.013946533203125, 0.000335693359375, 0.004852294921875,...
embed
20583789_c0
20583789
prolog
0
Title: portray_clause to variable in Prolog Problem title: portray_clause to variable in Prolog Tags: prolog, swi-prolog Problem: portray_clause to variable in Prolog Is there a way so that portray_clause is written to a variable instead of standard output? ?- portray_clause(f(x):app(X, Y, Z)). f(x):app(_, _, _). true....
portray_clause to variable in Prolog portray_clause to variable in Prolog prolog swi-prolog portray_clause Prolog Output ERROR Arguments portray_clause to variable in Prolog Is there a way so that portray_clause is written to a variable instead of standard output? Thank you in advance
[ 0.0218505859375, 0.026123046875, -0.009033203125, 0.0234375, -0.021240234375, 0.00537109375, 0.0022125244140625, -0.01080322265625, 0.025390625, 0.002593994140625, -0.00396728515625, -0.011474609375, 0.007232666015625, -0.00830078125, 0.0140380859375, 0.0172119140625, -0.015502929687...
[ 11469, 7092, 18347, 4032, 47, 77336, 23, 1250, 4867, 502, 2452, 3454, 13538, 151206, 24638, 112140, 3917, 454, 83, 59121, 64457, 5570, 140992, 129745 ]
[ 0.17236328125, 0.219970703125, 0.1690673828125, 0.1978759765625, 0.131103515625, 0.271728515625, 0.02777099609375, 0.1492919921875, 0.24267578125, 0.0975341796875, 0.10076904296875, 0.10595703125, 0.0732421875, 0.10272216796875, 0.03717041015625, 0.1522216796875, 0.06512451171875, ...
embed
59097315_c0
59097315
prolog
0
Title: Creating a specific list in Prolog Problem title: Creating a specific list in Prolog Tags: logic, prolog, recursion Problem: Creating a specific list in Prolog I want to write a function to write a list that, for example, for the code below likes('john', 'soccer') likes('mary', 'football') likes('eric', 'soccer'...
Creating a specific list in Prolog Creating a specific list in Prolog logic prolog recursion Creating Prolog Creating a specific list in Prolog I want to write a function to write a list that, for example, for the code below So the function I want to write would be like And the list would be ('john', 'eric') Should I u...
[ 0.0133056640625, 0.01214599609375, -0.0045166015625, 0.020751953125, 0.00775146484375, 0.005279541015625, -0.0079345703125, 0.00921630859375, -0.002655029296875, -0.00799560546875, -0.01287841796875, -0.031494140625, -0.01104736328125, 0.0064697265625, 0.014404296875, 0.022216796875, ...
[ 56781, 29458, 5303, 1250, 4867, 1916, 23, 62775, 502, 195625, 1830, 3444, 33022, 32354, 10, 27781, 100, 18151, 35064, 1884, 186, 66159, 19, 56, 1771, 151117, 4527, 54 ]
[ 0.1630859375, 0.177490234375, 0.224365234375, 0.1524658203125, 0.2568359375, 0.006591796875, 0.020263671875, 0.114013671875, 0.10986328125, 0.2158203125, 0.1707763671875, 0.072021484375, 0.1453857421875, 0.186767578125, 0.010772705078125, 0.00177001953125, 0.002166748046875, 0.0667...
embed
39339103_c0
39339103
prolog
0
Title: How to run gprolog on macOS Sierra Problem title: How to run gprolog on macOS Sierra Tags: prolog, homebrew, macos, gnu-prolog Problem: How to run gprolog on macOS Sierra I have just installed gnu-prolog using brew install gnu-prolog . When I try to run gprolog in the terminal I get gprolog: command not found . ...
How to run gprolog on macOS Sierra How to run gprolog on macOS Sierra prolog homebrew macos gnu-prolog How Sierra How to run gprolog on macOS Sierra I have just installed gnu-prolog using brew install gnu-prolog . When I try to run gprolog in the terminal I get gprolog: command not found . I tried doing the same to my ...
[ 0.00119781494140625, -0.003875732421875, 0.0218505859375, 0.0106201171875, -0.01397705078125, 0.017333984375, 0.0078125, 0.00128173828125, -0.005035400390625, -0.005157470703125, 0.0159912109375, -0.0078125, -0.00762939453125, -0.003509521484375, 0.0211181640625, -0.019775390625, -0....
[ 11249, 47, 11675, 706, 3454, 4867, 98, 19138, 7285, 130454, 502, 5368, 143006, 7840, 104155, 20600, 9790, 33949, 75101, 959, 14037, 36279, 51042, 540, 87926, 17840, 79786, 169123, 3917, 4488, 100 ]
[ 0.05755615234375, 0.03863525390625, 0.166259765625, 0.1328125, 0.21875, 0.271728515625, 0.07611083984375, 0.1163330078125, 0.12841796875, 0.253662109375, 0.1260986328125, 0.0211334228515625, 0.156982421875, 0.0272064208984375, 0.1683349609375, 0.058013916015625, 0.0273284912109375, ...
embed
49708650_c0
49708650
prolog
0
Title: Find elements before X on list Problem title: Find elements before X on list Tags: logic, prolog Problem: Find elements before X on list I'm learning Prolog and this may be a very simple question. Say I just need a procedure that does the following: before(5, [1, 2, 4, 5, 36, 5], Result) ... Result = [1, 2, 4, 5...
Find elements before X on list Find elements before X on list logic prolog Find Result Find elements before X on list I'm learning Prolog and this may be a very simple question. Say I just need a procedure that does the following: I'm aware that if N is the first element, I can add the following rule: But what should I...
[ -0.00494384765625, 0.01611328125, 0.01324462890625, 0.004608154296875, -0.0184326171875, 0.0235595703125, 0.000052928924560546875, 0.005401611328125, 0.0196533203125, -0.038818359375, 0.006011962890625, -0.01373291015625, -0.0208740234375, -0.007537841796875, 0.00089263916015625, -0.00...
[ 26040, 80854, 8108, 1193, 98, 5303, 62775, 502, 4867, 126684, 52080, 1250, 8781, 3871, 50491, 25632, 107419, 2174, 541, 83, 5117, 12830, 831, 15190, 79986, 54, 3789, 50218 ]
[ 0.1422119140625, 0.2271728515625, 0.206787109375, 0.1497802734375, 0.12841796875, 0.1934814453125, 0.1466064453125, 0.107666015625, 0.21484375, 0.225341796875, 0.051727294921875, 0.11639404296875, 0.058349609375, 0.0625, 0.1456298828125, 0.059539794921875, 0.04278564453125, 0.02162...
embed
54409923_c0
54409923
prolog
0
Title: Dynamic Prolog predicate with incrementing component Problem title: Dynamic Prolog predicate with incrementing component Tags: global-variables, prolog-assert, prolog, swi-prolog Problem: Dynamic Prolog predicate with incrementing component I have a knowledge base consisting of a set of rules whose head of each ...
Dynamic Prolog predicate with incrementing component Dynamic Prolog predicate with incrementing component global-variables prolog-assert prolog swi-prolog Dynamic Prolog Dynamic Prolog predicate with incrementing component I have a knowledge base consisting of a set of rules whose head of each rule performs assert or r...
[ 0.0306396484375, -0.00433349609375, 0.00457763671875, 0.02001953125, 0.005767822265625, 0.03125, -0.01007080078125, 0.0252685546875, -0.0035247802734375, -0.047119140625, 0.00408935546875, 0.02197265625, -0.02490234375, -0.01116943359375, 0.04345703125, 0.013671875, 0.0101318359375, ...
[ 73327, 21068, 1250, 4867, 1653, 2063, 67, 678, 158661, 214, 82761, 7964, 21690, 19736, 502, 162, 33657, 91, 2452, 3454, 765, 51359, 3647, 91736, 10336, 12638, 79986, 51339, 237, 41499, 27140, 69407, 3229, 27289, 74918, 11249, 831, 63284, 24...
[ 0.154052734375, 0.107666015625, 0.1741943359375, 0.2432861328125, 0.1640625, 0.216796875, 0.0352783203125, 0.120849609375, 0.2208251953125, 0.05389404296875, 0.208740234375, 0.115478515625, 0.1253662109375, 0.03546142578125, 0.1475830078125, 0.0462646484375, 0.201416015625, 0.00613...
embed
9287942_c0
9287942
prolog
0
Title: Prolog List Search Problem title: Prolog List Search Tags: prolog, list Problem: Prolog List Search I'm trying to define a predicate where it searches a list of lists for an element and returns the level of that element. For example when searching for element: ?- elementLevel(element,[a,b,c,[d,e],[element,f]],Le...
Prolog List Search Prolog List Search prolog list Prolog List Search Level Prolog List Search I'm trying to define a predicate where it searches a list of lists for an element and returns the level of that element. For example when searching for element: So for every list it adds a level. I was thinking of a counter, b...
[ -0.00408935546875, 0.012451171875, -0.01409912109375, 0.01904296875, 0.0000743865966796875, 0.0167236328125, -0.001556396484375, -0.00384521484375, 0.004425048828125, -0.0322265625, 0.005157470703125, -0.0030059814453125, -0.00182342529296875, 0.0208740234375, 0.008056640625, -0.001251...
[ 1250, 4867, 32036, 33086, 502, 5303, 84136, 31577, 61924, 1653, 2063, 67, 33938, 90, 10, 7, 100, 12830, 30646, 17366, 157318, 11907, 15190, 47644, 105416, 3714, 29479, 37317, 289 ]
[ 0.181396484375, 0.27490234375, 0.2344970703125, 0.2442626953125, 0.1424560546875, 0.1871337890625, 0.25, 0.056304931640625, 0.1334228515625, 0.17724609375, 0.2054443359375, 0.12255859375, 0.1968994140625, 0.03704833984375, 0.02154541015625, 0.0068359375, 0.0921630859375, 0.16223144...
embed
27349208_c0
27349208
prolog
0
Title: sum element of a list under certain conditions Problem title: sum element of a list under certain conditions Tags: prolog Problem: sum element of a list under certain conditions Consider this situation: height(a,10). height(b,20). on(a,d). on(b,d). I'm trying to write a predicate that return true if the sum of t...
sum element of a list under certain conditions sum element of a list under certain conditions prolog Result sum element of a list under certain conditions Consider this situation: I'm trying to write a predicate that return true if the sum of the height of the elements on d is less than 10. With: I get: Result = [a, b]...
[ -0.0050048828125, 0.0004177093505859375, 0.00063323974609375, 0.01312255859375, -0.01434326171875, 0.00970458984375, -0.01055908203125, 0.0191650390625, 0.00762939453125, -0.026123046875, 0.0107421875, -0.0211181640625, -0.010498046875, -0.01611328125, -0.006072998046875, -0.0002155303...
[ 10554, 12830, 5303, 1379, 24233, 27289, 111, 502, 4867, 126684, 137399, 16648, 31577, 33022, 1653, 2063, 67, 30646, 29568, 2174, 70, 155955, 80854, 98, 104, 83, 40715, 3501, 4068, 2046, 2203, 11, 4, 876, 7103, 6275, 18, 3714, 3642, 69307,...
[ 0.2178955078125, 0.2059326171875, 0.193603515625, 0.1539306640625, 0.1204833984375, 0.202880859375, 0.0426025390625, 0.114990234375, 0.1531982421875, 0.262939453125, 0.045684814453125, 0.07598876953125, 0.07672119140625, 0.10546875, 0.129638671875, 0.172119140625, 0.108642578125, 0...
embed
48371672_c1
48371672
prolog
1
parameters " c b b a a table" in a list of: " [on(c,b),on(b,a),on(a,table)] " in order to be executed from the rule do (e.g. do([on(c,b),on(b,a),on(a,table)])). The format print me this: Called with [on,b,a,c,b,a,table] I'm not an expert of Prolog and I am really stuck right now, I hope someone can help me. Thank you ...
parameters " c b b a a table" in a list of: " [on(c,b),on(b,a),on(a,table)] " in order to be executed from the rule do (e.g. do([on(c,b),on(b,a),on(a,table)])). The format print me this: Called with [on,b,a,c,b,a,table] I'm not an expert of Prolog and I am really stuck right now, I hope someone can help me. Thank you ...
[ 0.00469970703125, 0.00970458984375, -0.00119781494140625, 0.0191650390625, -0.0164794921875, 0.0164794921875, 0.0181884765625, -0.004791259765625, 0.010986328125, -0.021484375, -0.001800537109375, 0.00579833984375, -0.0311279296875, 0.009765625, -0.0162353515625, -0.0186767578125, 0....
[ 171859, 7, 501, 876, 10, 23180, 23, 5303, 111, 191, 238, 4, 275, 11, 22819, 12989, 71924, 1295, 79986, 54, 9384, 28412, 163, 903, 26265, 678, 26808, 1250, 4867, 444, 6183, 179933, 5036, 15673, 4358, 28864, 26073, 1614, 63923, 85763, 871...
[ 0.27392578125, 0.019989013671875, 0.04010009765625, 0.0870361328125, 0.081298828125, 0.226318359375, 0.01348876953125, 0.18115234375, 0.040557861328125, 0.2303466796875, 0.078369140625, 0.034576416015625, 0.120361328125, 0.060546875, 0.2216796875, 0.060028076171875, 0.1829833984375, ...
embed
71946787_c0
71946787
prolog
0
Title: How to access an element in a list in Proplog? Problem title: How to access an element in a list in Proplog? Tags: prolog Problem: How to access an element in a list in Proplog? In prolog, how do I access an element in a list with an index? For example, I'm writing a rule get_i(List, I, X) where List is the list...
How to access an element in a list in Proplog? How to access an element in a list in Proplog? prolog How Proplog How to access an element in a list in Proplog? In prolog, how do I access an element in a list with an index? For example, I'm writing a rule get_i(List, I, X) where List is the list I'm passing in, I is the...
[ 0.0034637451171875, 0.0079345703125, 0.01214599609375, 0.005767822265625, -0.0027313232421875, 0.0186767578125, -0.0018157958984375, 0.0115966796875, 0.007781982421875, -0.0177001953125, 0.0201416015625, -0.01239013671875, -0.043701171875, -0.0087890625, -0.00445556640625, -0.004913330...
[ 11249, 47, 17203, 12830, 23, 5303, 43796, 4867, 10, 502, 142, 360, 3642, 54, 678, 63262, 32562, 79986, 2046, 14, 154663, 87, 1193, 32036, 83, 452, 6953, 176377, 121413, 11675, 5809, 3794, 11, 71, 138, 140992, 501 ]
[ 0.0743408203125, 0.060760498046875, 0.217041015625, 0.201416015625, 0.100830078125, 0.217041015625, 0.175537109375, 0.2509765625, 0.031463623046875, 0.1328125, 0.0163421630859375, 0.011688232421875, 0.0509033203125, 0.009246826171875, 0.0850830078125, 0.1812744140625, 0.06884765625, ...
embed
59260551_c0
59260551
prolog
0
Title: PROLOG sum of integers inside a list Problem title: PROLOG sum of integers inside a list Tags: sum, prolog, list Problem: PROLOG sum of integers inside a list I have a list of functions List = [segmentTime(red,a,c,2),segmentTime(green,c,e,3),segmentTime(green,e,h,4),segmentTime(blue,h,i,5)] How do I find the sum...
PROLOG sum of integers inside a list PROLOG sum of integers inside a list sum prolog list PROLOG List PROLOG sum of integers inside a list I have a list of functions How do I find the sum of the integer part of the function of all elements in the list? i.e A snippet code of a predicate would be extremely useful. Thanks...
[ -0.002227783203125, 0.004119873046875, 0.0213623046875, 0.0272216796875, -0.02490234375, 0.0111083984375, -0.008056640625, 0.01904296875, 0.005584716796875, -0.0294189453125, -0.01495361328125, -0.00872802734375, -0.0118408203125, 0.0140380859375, 0.02197265625, 0.006011962890625, 0....
[ 10514, 47510, 10554, 892, 26255, 46132, 5303, 502, 4867, 32036, 10, 111, 32354, 54, 87, 7413, 70, 1505, 2831, 756, 80854, 23, 93, 58134, 18151, 1653, 2063, 67, 80234 ]
[ 0.1541748046875, 0.22216796875, 0.237060546875, 0.1534423828125, 0.1099853515625, 0.1590576171875, 0.2081298828125, 0.12548828125, 0.1903076171875, 0.1351318359375, 0.00982666015625, 0.0806884765625, 0.1553955078125, 0.015655517578125, 0.016265869140625, 0.1279296875, 0.0604858398437...
embed
36866746_c0
36866746
prolog
0
Title: I do not understand why it&#x27;s saying an operator is expected for female but not male Problem title: I do not understand why it&#x27;s saying an operator is expected for female but not male Tags: prolog Problem: I do not understand why it's saying an operator is expected for female but not male male(X). femal...
I do not understand why it&#x27;s saying an operator is expected for female but not male I do not understand why it&#x27;s saying an operator is expected for female but not male prolog John Jane I do not understand why it's saying an operator is expected for female but not male this is my code. If my query is: It gives...
[ 0.0294189453125, 0.00775146484375, 0.00555419921875, 0.00213623046875, 0.003143310546875, 0.0205078125, -0.0029296875, 0.0157470703125, -0.027099609375, -0.040283203125, 0.00145721435546875, -0.039794921875, 0.004852294921875, 0.004425048828125, 0.01422119140625, -0.0169677734375, 0....
[ 54, 959, 28219, 15400, 3768, 54433, 39933, 83, 84751, 100, 117776, 1284, 11280, 502, 4867, 4939, 48511, 142, 18151, 4263, 41, 1294, 76199, 163, 6002, 86531, 18499, 87, 1957, 31089, 38162 ]
[ 0.011962890625, 0.1287841796875, 0.139404296875, 0.10009765625, 0.078125, 0.06353759765625, 0.27587890625, 0.051544189453125, 0.2156982421875, 0.11669921875, 0.2471923828125, 0.0994873046875, 0.1988525390625, 0.1234130859375, 0.1549072265625, 0.0992431640625, 0.1680908203125, 0.003...
embed
74354711_c0
74354711
prolog
0
Title: Find two Prolog terms A and B such that: &quot;A is B.&quot; is false. &quot;A =:= B.&quot; is true Problem title: Find two Prolog terms A and B such that: &quot;A is B.&quot; is false. &quot;A =:= B.&quot; is true Tags: prolog Problem: Find two Prolog terms A and B such that: "A is B." is false. "A =:= B." is t...
Find two Prolog terms A and B such that: &quot;A is B.&quot; is false. &quot;A =:= B.&quot; is true Find two Prolog terms A and B such that: &quot;A is B.&quot; is false. &quot;A =:= B.&quot; is true prolog Find Prolog Facts Find two Prolog terms A and B such that: "A is B." is false. "A =:= B." is true Could some expe...
[ 0.0284423828125, 0.006134033203125, -0.007537841796875, 0.029296875, -0.01055908203125, 0.003448486328125, 0.0093994140625, 0.01446533203125, 0.01287841796875, 0.0250244140625, 0.005401611328125, 0.015380859375, 0.006744384765625, 0.0220947265625, 0.01171875, 0.0159912109375, 0.02465...
[ 26040, 6626, 1250, 4867, 69407, 62, 136, 335, 284, 83, 98320, 1369, 29568, 6044, 502, 132640, 2203, 26808, 27781, 106117 ]
[ 0.101806640625, 0.1263427734375, 0.1583251953125, 0.2335205078125, 0.21240234375, 0.06561279296875, 0.1171875, 0.153564453125, 0.0933837890625, 0.126708984375, 0.220947265625, 0.08447265625, 0.1845703125, 0.0338134765625, 0.111572265625, 0.104248046875, 0.039642333984375, 0.0614318...
embed
48979265_c0
48979265
prolog
0
Title: Splitting atoms with pipe symbols Problem title: Splitting atoms with pipe symbols Tags: prolog Problem: Splitting atoms with pipe symbols I have a list of lists of this structure in GNU-Prolog: [[1|5], [1|6], [2|6], [3|6]] What might be the best way to extract the numbers in each sublist separately? I can't uni...
Splitting atoms with pipe symbols Splitting atoms with pipe symbols prolog Splitting Splitting atoms with pipe symbols I have a list of lists of this structure in GNU-Prolog: What might be the best way to extract the numbers in each sublist separately? I can't unify each term because of the pipe, unless there is someth...
[ 0.007415771484375, 0.00057220458984375, -0.000522613525390625, 0.005950927734375, -0.028564453125, -0.004241943359375, -0.0213623046875, 0.0179443359375, -0.006378173828125, -0.00078582763671875, -0.0021820068359375, 0.0101318359375, 0.0130615234375, 0.018798828125, 0.00141143798828125, ...
[ 46474, 1916, 34627, 678, 137158, 26582, 502, 4867, 5303, 903, 45646, 165132, 10752, 13648, 2965, 3917, 47, 125663, 101935, 23, 12638, 1614, 6562, 84797, 831, 18, 51, 40383, 13579, 6637, 132283, 4358, 2806, 6782, 4552, 3525, 1250, 1118, 3108...
[ 0.182861328125, 0.06048583984375, 0.19140625, 0.04595947265625, 0.2149658203125, 0.2113037109375, 0.0848388671875, 0.202392578125, 0.1441650390625, 0.011138916015625, 0.15771484375, 0.1607666015625, 0.1190185546875, 0.03955078125, 0.0733642578125, 0.038330078125, 0.0164031982421875, ...
embed
24717992_c1
24717992
prolog
1
,Z), A \= X, A \= Y, B \= X, B \= Y, D < Z. min(A,B,B) :- B < A min(A,B,A) :- A < B dist([A,B],C, D) :- minDist(A,B,D), dist(A,C,Q), dist(B,C,W), min(Q,W,D) The problem I have here is the concept of "replacing" the dist statements involving A and B with the cluster. This just quickly become a brainteaser for me and I'm...
,Z), A \= X, A \= Y, B \= X, B \= Y, D < Z. min(A,B,B) :- B < A min(A,B,A) :- A < B dist([A,B],C, D) :- minDist(A,B,D), dist(A,C,Q), dist(B,C,W), min(Q,W,D) The problem I have here is the concept of "replacing" the dist statements involving A and B with the cluster. This just quickly become a brainteaser for me and I'm...
[ 0.01263427734375, 0.0230712890625, -0.00171661376953125, 0.0308837890625, -0.00689697265625, -0.006011962890625, -0.01806640625, -0.0205078125, 0.0146484375, 0.0017547607421875, 0.00164794921875, -0.0031890869140625, -0.01190185546875, -0.0238037109375, -0.00823974609375, 0.00448608398...
[ 1511, 247, 62, 41872, 1369, 1193, 990, 335, 391, 4426, 567, 881, 571, 15772, 284, 45, 271, 441, 397, 1419, 2737, 1456, 2967, 765, 3688, 23755, 107, 133266, 214, 63805, 3784, 136, 678, 234737, 69405, 24209, 78574, 17615, 2189, 179933, 25...
[ 0.132080078125, 0.032806396484375, 0.1270751953125, 0.0333251953125, 0.11279296875, 0.1038818359375, 0.08056640625, 0.160888671875, 0.08111572265625, 0.1217041015625, 0.144287109375, 0.25244140625, 0.124267578125, 0.0293121337890625, 0.057342529296875, 0.1629638671875, 0.192626953125...
embed
48872677_c0
48872677
prolog
0
Title: Prolog - partially ordered set Problem title: Prolog - partially ordered set Tags: prolog Problem: Prolog - partially ordered set There is a partially ordered set relation le(X,Y) , when Y mod X = 0 (so there are le(1,5), le(5,70), le(7,14) etc.) I have to make predicates max(X) is X maximum element greatest(X) ...
Prolog - partially ordered set Prolog - partially ordered set prolog Prolog Prolog - partially ordered set There is a partially ordered set relation le(X,Y) , when Y mod X = 0 (so there are le(1,5), le(5,70), le(7,14) etc.) I have to make predicates max(X) is X maximum element greatest(X) is X the greatest element defi...
[ 0.00421142578125, 0.0062255859375, 0.010986328125, 0.00162506103515625, 0.00506591796875, 0.040771484375, 0.00112152099609375, -0.0203857421875, 0.0224609375, -0.0189208984375, 0.00439453125, -0.007080078125, -0.003997802734375, -0.0247802734375, 0.01239013671875, -0.00543212890625, ...
[ 1250, 4867, 2878, 25958, 12989, 5423, 297, 502, 41911, 95, 1542, 1723, 990, 2811, 1193, 757, 2685, 621, 57626, 104116, 89149, 966, 65283, 765, 3249, 1653, 2063, 18389, 83, 38132, 12830, 158036, 13204, 8781, 1328, 284, 571, 117396 ]
[ 0.1357421875, 0.2188720703125, 0.1231689453125, 0.06640625, 0.1644287109375, 0.1883544921875, 0.0595703125, 0.0908203125, 0.164794921875, 0.1490478515625, 0.1617431640625, 0.12255859375, 0.125244140625, 0.194091796875, 0.10791015625, 0.1112060546875, 0.013092041015625, 0.0322570800...
embed
61841148_c0
61841148
prolog
0
Title: How to write a file with its absolute path in prolog Problem title: How to write a file with its absolute path in prolog Tags: swi-prolog, prolog Problem: How to write a file with its absolute path in prolog My current code is as below. How can I add an absolute path or full path to the file? I hope to save the ...
How to write a file with its absolute path in prolog How to write a file with its absolute path in prolog swi-prolog prolog How text.txt Fname Stream1 How to write a file with its absolute path in prolog My current code is as below. How can I add an absolute path or full path to the file? I hope to save the file in a d...
[ 0.0250244140625, -0.01318359375, 0.007110595703125, 0.0107421875, -0.0146484375, -0.00421142578125, 0.014892578125, 0.028076171875, 0.0022125244140625, -0.02734375, 0.003936767578125, 0.0279541015625, -0.005584716796875, 0.01312255859375, 0.0228271484375, -0.008544921875, 0.005615234...
[ 11249, 47, 33022, 11435, 678, 6863, 89931, 60875, 23, 502, 4867, 2452, 3454, 7986, 124326, 563, 11627, 115061, 418, 43581, 18151, 35064, 831, 15190, 4393, 15673, 30098, 12921, 14364, 20697 ]
[ 0.06866455078125, 0.0249786376953125, 0.1678466796875, 0.2010498046875, 0.1087646484375, 0.10418701171875, 0.2071533203125, 0.2340087890625, 0.0269012451171875, 0.13671875, 0.220947265625, 0.148681640625, 0.1287841796875, 0.1171875, 0.1669921875, 0.003448486328125, 0.141357421875, ...
embed
19849455_c2
19849455
prolog
2
5 departures flight( city5, city1, 09, 10). flight( city5, city2, 10, 11). flight( city5, city3, 12, 13). flight( city5, city4, 14, 15). flight( city5, city4, 16, 17). % city1 arrivals flight( city2, city1, 09, 10). flight( city2, city1, 10, 11). flight( city3, city1, 12, 13). flight( city4, city1, 14, 15). flight( cit...
5 departures flight( city5, city1, 09, 10). flight( city5, city2, 10, 11). flight( city5, city3, 12, 13). flight( city5, city4, 14, 15). flight( city5, city4, 16, 17). % city1 arrivals flight( city2, city1, 09, 10). flight( city2, city1, 10, 11). flight( city3, city1, 12, 13). flight( city4, city1, 14, 15). flight( cit...
[ 0.0184326171875, 0.01507568359375, 0.0205078125, 0.01708984375, -0.004241943359375, -0.0098876953125, -0.01116943359375, 0.0004596710205078125, 0.02001953125, -0.0233154296875, -0.00009870529174804688, -0.01611328125, -0.0007781982421875, 0.017333984375, -0.0089111328125, -0.0234375, ...
[ 190, 8, 2500, 54889, 113014, 26349, 758, 4, 418, 3894, 209, 194, 304, 534, 363, 427, 702, 617, 616, 423, 611, 729, 1745, 30780, 8080, 132, 28864, 26073, 12, 1250, 4867, 44084, 61804, 56901, 45673, 33867, 32036, 13794, 115411, 18878, 262...
[ 0.18017578125, 0.1558837890625, 0.2418212890625, 0.150634765625, 0.2373046875, 0.1470947265625, 0.156982421875, 0.029205322265625, 0.092529296875, 0.1365966796875, 0.102783203125, 0.032135009765625, 0.117431640625, 0.07080078125, 0.08782958984375, 0.031890869140625, 0.07464599609375,...
embed
36946645_c0
36946645
prolog
0
Title: Is it possible to represent a context-free grammar with first-order logic? Problem title: Is it possible to represent a context-free grammar with first-order logic? Tags: ebnf, first-order-logic, prolog Problem: Is it possible to represent a context-free grammar with first-order logic? Briefly, I have a EBNF gra...
Is it possible to represent a context-free grammar with first-order logic? Is it possible to represent a context-free grammar with first-order logic? ebnf first-order-logic prolog Is it possible to represent a context-free grammar with first-order logic? Briefly, I have a EBNF grammar and so a parse-tree, but I do not ...
[ 0.0299072265625, -0.00872802734375, -0.00762939453125, 0.03125, -0.007415771484375, 0.0012969970703125, -0.0107421875, -0.00982666015625, -0.004425048828125, -0.031494140625, -0.0069580078125, 0.0040283203125, -0.0133056640625, -0.01025390625, -0.00421142578125, -0.00341796875, -0.00...
[ 2071, 442, 7722, 33636, 43701, 32087, 122092, 147, 678, 5117, 80596, 62775, 61320, 420, 137043, 502, 4867, 47, 9, 101936, 24162, 73493, 366, 184, 62600, 50491, 3900, 19309, 23972, 81206, 50592, 238 ]
[ 0.00006103515625, 0.0455322265625, 0.1634521484375, 0.21533203125, 0.214111328125, 0.159423828125, 0.1478271484375, 0.13427734375, 0.046600341796875, 0.096435546875, 0.195556640625, 0.2200927734375, 0.036163330078125, 0.079833984375, 0.142333984375, 0.07171630859375, 0.1300048828125,...
embed
21048772_c1
21048772
prolog
1
ch(monica, suzane, '2012-02-16'). i get: false but if I set the rule like the above with an or symbol (;) and query it as follows: ?- letterexch(monica, suzane, '2012-02-16'). i get: phillip janet phillip However, I only need phillip to be printed. (I don't mind if phillip is duplicated because I know how to get rid of...
ch(monica, suzane, '2012-02-16'). i get: false but if I set the rule like the above with an or symbol (;) and query it as follows: ?- letterexch(monica, suzane, '2012-02-16'). i get: phillip janet phillip However, I only need phillip to be printed. (I don't mind if phillip is duplicated because I know how to get rid of...
[ 0.01318359375, 0.01434326171875, 0.00145721435546875, 0.033447265625, -0.00634765625, 0.0262451171875, -0.01141357421875, 0.0140380859375, 0.01068115234375, 0.008056640625, -0.01373291015625, -0.0038299560546875, 0.021484375, 0.00170135498046875, -0.0029449462890625, 0.012939453125, ...
[ 3863, 432, 3296, 166, 45511, 10693, 43627, 2485, 2046, 98320, 5423, 79986, 142, 707, 26582, 74, 41, 1294, 66185, 425, 206, 66847, 21392, 79, 1179, 4734, 3871, 186, 28412, 297, 7086, 171763, 3674, 31351, 3714, 15400, 136, 4, 11814, 43257, ...
[ 0.164306640625, 0.036102294921875, 0.145263671875, 0.05975341796875, 0.2318115234375, 0.1160888671875, 0.0762939453125, 0.0831298828125, 0.0340576171875, 0.25927734375, 0.1134033203125, 0.1971435546875, 0.004852294921875, 0.1591796875, 0.25537109375, 0.04022216796875, 0.0914306640625...
embed
8523608_c0
8523608
prolog
0
Title: What is the logical &#x27;not&#x27; in Prolog? Problem title: What is the logical &#x27;not&#x27; in Prolog? Tags: prolog, prolog-dif Problem: What is the logical 'not' in Prolog? The problem that I face, is a bit trivial. I want to use logical not in Prolog, but it seems that not/1 is not the thing that I want:...
What is the logical &#x27;not&#x27; in Prolog? What is the logical &#x27;not&#x27; in Prolog? prolog prolog-dif What Prolog X-Y What is the logical 'not' in Prolog? The problem that I face, is a bit trivial. I want to use logical not in Prolog, but it seems that not/1 is not the thing that I want: I query: And I do not...
[ 0.0186767578125, 0.00897216796875, 0.0179443359375, 0.021484375, -0.01611328125, 0.003997802734375, -0.0059814453125, 0.00836181640625, 0.019775390625, -0.0103759765625, -0.02197265625, -0.0111083984375, -0.00136566162109375, 0.00018596649169921875, -0.0166015625, 0.00130462646484375, ...
[ 4865, 83, 70, 62775, 289, 54764, 3768, 10869, 23, 1250, 4867, 502, 428, 420, 1193, 9, 1723, 2967, 2577, 3444, 4527, 959, 11583, 41, 1294, 16750 ]
[ 0.052398681640625, 0.04656982421875, 0.064697265625, 0.2196044921875, 0.1722412109375, 0.0279083251953125, 0.1341552734375, 0.26611328125, 0.0869140625, 0.17919921875, 0.24755859375, 0.107666015625, 0.06072998046875, 0.101806640625, 0.0477294921875, 0.0220184326171875, 0.126953125, ...
embed
65063263_c0
65063263
prolog
0
Title: Prolog. Construct a transitive closure of a graph Problem title: Prolog. Construct a transitive closure of a graph Tags: transitive-closure, prolog Problem: Prolog. Construct a transitive closure of a graph I'm very new to Prolog. I have such a graph: edge(a,e). edge(e,f). edge(f,d). edge(d,a). I define a transi...
Prolog. Construct a transitive closure of a graph Prolog. Construct a transitive closure of a graph transitive-closure prolog Prolog Construct Prolog. Construct a transitive closure of a graph I'm very new to Prolog. I have such a graph: I define a transitive closure as: I need to construct a transitive closure of a gr...
[ 0.0093994140625, 0.0089111328125, 0.007171630859375, 0.0101318359375, 0.00396728515625, -0.0201416015625, -0.03515625, 0.01153564453125, 0.00762939453125, -0.0294189453125, 0.0020294189453125, 0.00927734375, -0.00616455078125, 0.018310546875, 0.020263671875, 0.02001953125, 0.00793457...
[ 1250, 4867, 5, 1657, 36716, 10, 62621, 5844, 170224, 111, 41382, 502, 4552, 3525, 765, 6044, 61924, 6, 237, 3871, 64549, 30607, 3642, 172337, 678 ]
[ 0.1741943359375, 0.277099609375, 0.00677490234375, 0.080810546875, 0.1678466796875, 0.06524658203125, 0.2164306640625, 0.2025146484375, 0.26171875, 0.041717529296875, 0.1942138671875, 0.1033935546875, 0.0245361328125, 0.071044921875, 0.0081787109375, 0.05291748046875, 0.156982421875,...
embed
25685390_c0
25685390
prolog
0
Title: Open a file with a flexible name from user input in Prolog Problem title: Open a file with a flexible name from user input in Prolog Tags: prolog Problem: Open a file with a flexible name from user input in Prolog I would like to ask how can I open a file to write in Prolog with the name of the file should get f...
Open a file with a flexible name from user input in Prolog Open a file with a flexible name from user input in Prolog prolog user Open Prolog name_of_file_number.txt Open a file with a flexible name from user input in Prolog I would like to ask how can I open a file to write in Prolog with the name of the file should g...
[ -0.00506591796875, -0.01165771484375, 0.004913330078125, 0.01263427734375, -0.01177978515625, 0.00982666015625, -0.00732421875, 0.014404296875, 0.0019683837890625, -0.03759765625, -0.00506591796875, -0.000530242919921875, -0.0269775390625, 0.009033203125, 0.021484375, -0.01470947265625...
[ 13527, 11435, 678, 110677, 9351, 1295, 38937, 107730, 1250, 4867, 502, 4390, 29822, 2606, 1297, 5, 124326, 10, 23, 1884, 26458, 3642, 831, 9803, 47, 33022, 111, 5608, 2046, 72095, 14012, 83, 34292 ]
[ 0.1612548828125, 0.2137451171875, 0.0955810546875, 0.2430419921875, 0.131103515625, 0.1201171875, 0.1326904296875, 0.1796875, 0.171142578125, 0.24951171875, 0.114013671875, 0.09954833984375, 0.161376953125, 0.1165771484375, 0.1282958984375, 0.0054931640625, 0.218017578125, 0.003936...
embed
16284177_c0
16284177
prolog
0
Title: No permission to modify static procedure `(-)/1&#x27; Problem title: No permission to modify static procedure `(-)/1&#x27; Tags: prolog Problem: No permission to modify static procedure `(-)/1' When i do an assert like: assert(-color(red)). it gives me the error: ERROR: assert/1: No permission to modify static p...
No permission to modify static procedure `(-)/1&#x27; No permission to modify static procedure `(-)/1&#x27; prolog ERROR Type No permission to modify static procedure `(-)/1' When i do an assert like: it gives me the error: so i change -color to dynamic: and now it gives me the error: Any ideas?
[ -0.0025787353515625, 0.01190185546875, 0.00653076171875, 0.008544921875, -0.024658203125, 0.00799560546875, -0.033935546875, 0.0174560546875, 0.00732421875, -0.0047607421875, -0.0145263671875, -0.0087890625, -0.00885009765625, -0.004425048828125, 0.03173828125, 0.0030975341796875, -0...
[ 438, 168081, 47, 2811, 40383, 201939, 50491, 9, 11583, 3768, 6, 502, 4867, 151206, 24638, 60457, 237, 33657, 1884, 76199, 163, 70, 18499, 221, 17, 15549, 20, 46133, 84079, 5036, 25647 ]
[ 0.1094970703125, 0.22802734375, 0.0548095703125, 0.1446533203125, 0.1136474609375, 0.19384765625, 0.184326171875, 0.099365234375, 0.160400390625, 0.106689453125, 0.005645751953125, 0.1600341796875, 0.222412109375, 0.09197998046875, 0.03179931640625, 0.1375732421875, 0.04229736328125,...
embed
36382450_c0
36382450
prolog
0
Title: What does #= mean in Prolog? Problem title: What does #= mean in Prolog? Tags: clpfd, prolog Problem: What does #= mean in Prolog? I recently saw a program in Prolog using the predicate #=/2. I looked this up on the SWI prolog website where they defined it as The arithmetic expression X equals Y. When reasoning ...
What does #= mean in Prolog? What does #= mean in Prolog? clpfd prolog What Prolog What does #= mean in Prolog? I recently saw a program in Prolog using the predicate #=/2. I looked this up on the SWI prolog website where they defined it as What I don't understand about this is how #=/2 can be more 'general' since it i...
[ 0.0024871826171875, 0.00037384033203125, 0.0224609375, -0.00136566162109375, -0.00555419921875, 0.016357421875, -0.0101318359375, -0.0021209716796875, 0.007293701171875, 0.00058746337890625, -0.00147247314453125, -0.0064697265625, 0.0031280517578125, -0.00069427490234375, 0.0181884765625...
[ 4865, 14602, 468, 1369, 29459, 23, 1250, 4867, 39557, 71, 502, 1528, 17368, 1653, 2063, 67, 12477, 38969, 61924, 442, 28219, 1286, 180300, 4734, 100, 892, 26255 ]
[ 0.052001953125, 0.0517578125, 0.1839599609375, 0.231689453125, 0.1490478515625, 0.0853271484375, 0.1766357421875, 0.250244140625, 0.019561767578125, 0.0537109375, 0.095703125, 0.1561279296875, 0.0262298583984375, 0.1014404296875, 0.138671875, 0.051971435546875, 0.256591796875, 0.13...
embed
6227384_c0
6227384
prolog
0
Title: prolog lists fd_all_different and is_set whats faster? Problem title: prolog lists fd_all_different and is_set whats faster? Tags: clpfd, set, prolog, list Problem: prolog lists fd_all_different and is_set whats faster? i just want to know if anyone of you knows whats faster, L=[1,2,3,4,5], all_different(L). % n...
prolog lists fd_all_different and is_set whats faster? prolog lists fd_all_different and is_set whats faster? clpfd set prolog list fd_all_different is_set all_different use_module prolog lists fd_all_different and is_set whats faster? i just want to know if anyone of you knows whats faster, or anyone knows? need the f...
[ 0.0076904296875, -0.0164794921875, 0.0125732421875, 0.0042724609375, -0.01239013671875, -0.028076171875, -0.001708984375, -0.00848388671875, 0.00125885009765625, -0.04931640625, 0.001007080078125, 0.00213623046875, 0.0113525390625, 0.02001953125, -0.0159912109375, -0.0032958984375, -...
[ 502, 4867, 5303, 1238, 71, 5584, 238778, 83, 3509, 2367, 7, 4271, 56, 32, 33139, 39557, 5423, 756, 4527, 83279, 3444, 3714, 2174, 35672, 111, 93002, 3871, 29806, 759, 8932, 38067, 3115, 814 ]
[ 0.131103515625, 0.2288818359375, 0.1552734375, 0.043975830078125, 0.119384765625, 0.109619140625, 0.18896484375, 0.0692138671875, 0.1865234375, 0.07757568359375, 0.0135498046875, 0.15966796875, 0.19775390625, 0.00927734375, 0.012298583984375, 0.0237579345703125, 0.1370849609375, 0....
embed
20889631_c0
20889631
prolog
0
Title: Printing recursion in Prolog Problem title: Printing recursion in Prolog Tags: prolog Problem: Printing recursion in Prolog I have numbers in my Prolog database like this: number(1). number(2). number(3). number(4). I want to create a recursive rule or any rule if it doesn't need to be recursive. I want to be ab...
Printing recursion in Prolog Printing recursion in Prolog prolog Printing Prolog print_until Printing recursion in Prolog I have numbers in my Prolog database like this: I want to create a recursive rule or any rule if it doesn't need to be recursive. I want to be able to enter a number into this rule and all the numbe...
[ -0.00701904296875, 0.01129150390625, 0.00677490234375, 0.003021240234375, 0.00787353515625, 0.01361083984375, -0.01043701171875, 0.00055694580078125, 0.00982666015625, -0.046142578125, -0.00262451171875, -0.03466796875, 0.01470947265625, 0.00168609619140625, 0.03125, -0.015625, 0.014...
[ 39754, 214, 195625, 1830, 1250, 4867, 23, 502, 28412, 309, 3675, 101935, 63399, 1884, 3444, 28282, 5844, 79986, 3871, 19048, 30957, 14012, 3934, 903, 756, 5608, 24189, 5154, 69829, 1810, 106, 116, 138 ]
[ 0.2076416015625, 0.028594970703125, 0.234375, 0.1248779296875, 0.1666259765625, 0.2451171875, 0.004425048828125, 0.09747314453125, 0.213134765625, 0.058837890625, 0.2320556640625, 0.135498046875, 0.1080322265625, 0.00689697265625, 0.0765380859375, 0.094970703125, 0.10400390625, 0.1...
embed
64634867_c1
64634867
prolog
1
2,Solution). binary_dot_product([1|_],[1|_],1) :- !. binary_dot_product([_|B1s],[_|B2s],Solution) :- binary_dot_product(B1s,B2s,Solution). And now: ?- binary_dot_product([1,0,1],[1,1,1],X). X = 1. Up to this point in my Prolog career I have avoided cuts like the plague as I have been warned about their dangers. In this...
2,Solution). binary_dot_product([1|_],[1|_],1) :- !. binary_dot_product([_|B1s],[_|B2s],Solution) :- binary_dot_product(B1s,B2s,Solution). And now: ?- binary_dot_product([1,0,1],[1,1,1],X). X = 1. Up to this point in my Prolog career I have avoided cuts like the plague as I have been warned about their dangers. In this...
[ 0.0068359375, 0.039794921875, 0.01123046875, 0.0106201171875, -0.020751953125, 0.01708984375, -0.0284423828125, -0.00823974609375, 0.01165771484375, -0.0020294189453125, -0.0250244140625, 0.00732421875, -0.0159912109375, 0.013671875, -0.00897216796875, -0.01348876953125, 0.0307617187...
[ 116, 102588, 34, 1363, 2394, 6635, 15464, 57877, 418, 58745, 454, 4, 17727, 15772, 711, 571, 7, 304, 5036, 705, 9, 206808, 76172, 1542, 1193, 2203, 615, 1250, 4867, 80997, 765, 71864, 297, 314, 933, 1884, 3412, 6261, 1631, 77064, 16648,...
[ 0.0965576171875, 0.185791015625, 0.16064453125, 0.12939453125, 0.18701171875, 0.138671875, 0.218017578125, 0.26611328125, 0.11865234375, 0.0240020751953125, 0.004119873046875, 0.0089111328125, 0.0704345703125, 0.0357666015625, 0.070068359375, 0.06005859375, 0.09613037109375, 0.1815...
embed
10122246_c0
10122246
prolog
0
Title: Relation inside a relation prolog Problem title: Relation inside a relation prolog Tags: prolog Problem: Relation inside a relation prolog can we have a relation inside a relation defined in prolog? like i have a relation defined as below: relation(CctypeInt,[0-{2,3,4}, 1-{2,3,4}, 2-{2}],Ru1),!. now there is one...
Relation inside a relation prolog Relation inside a relation prolog prolog Relation CctypeInt Ru1 ru2 Relation inside a relation prolog can we have a relation inside a relation defined in prolog? like i have a relation defined as below: now there is one more variable which is dependeant on both CctypeInt and Ru1 so i a...
[ 0.006866455078125, 0.0036773681640625, 0.0034637451171875, 0.01080322265625, 0.00732421875, 0.00274658203125, 0.004974365234375, 0.00006341934204101562, 0.018310546875, -0.036376953125, -0.01409912109375, 0.017822265625, -0.010498046875, 0.002899169921875, 0.0272216796875, -0.016113281...
[ 116822, 46132, 41911, 502, 4867, 50986, 4153, 4518, 418, 3114, 304, 831, 765, 10, 61924, 71, 35064, 1286, 77336, 42548, 1236, 313, 238, 18, 47644, 903, 7722 ]
[ 0.2105712890625, 0.1768798828125, 0.249267578125, 0.12841796875, 0.2130126953125, 0.20068359375, 0.0869140625, 0.1190185546875, 0.045196533203125, 0.087890625, 0.047943115234375, 0.0653076171875, 0.0257110595703125, 0.01312255859375, 0.145751953125, 0.008697509765625, 0.0494384765625...
embed
28253960_c1
28253960
prolog
1
7E)". So can anyone help me to fix this error? I got this coding here Code signals: System, System.Collections.Generic, System.Linq, System.Text, SbsSW.SwiPlCs, uwe, Integrating, Prolog, ConsoleApplication2, Program, Main, Environment.SetEnvironmentVariable, SWI_HOME_DIR, the_PATH_to_boot32.prc, boot64.prc, PlEngine.Is...
7E)". So can anyone help me to fix this error? I got this coding here Code signals: System, System.Collections.Generic, System.Linq, System.Text, SbsSW.SwiPlCs, uwe, Integrating, Prolog, ConsoleApplication2, Program, Main, Environment.SetEnvironmentVariable, SWI_HOME_DIR, the_PATH_to_boot32.prc, boot64.prc, PlEngine.Is...
[ 0.009521484375, 0.0228271484375, -0.00537109375, 0.0198974609375, -0.0145263671875, 0.01708984375, -0.00750732421875, -0.0118408203125, 0.0238037109375, -0.033447265625, 0.01422119140625, -0.00982666015625, 0.004974365234375, -0.003387451171875, 0.005615234375, -0.0023651123046875, -...
[ 361, 647, 16, 740, 831, 35672, 4358, 163, 47, 30022, 903, 18499, 32, 87, 4163, 552, 6238, 3688, 28864, 26073, 7, 12353, 78457, 8996, 5256, 135932, 12259, 44982, 174379, 16145, 89023, 2452, 141, 36648, 91969, 1916, 1250, 4867, 1657, 40777,...
[ 0.1910400390625, 0.2386474609375, 0.1973876953125, 0.1307373046875, 0.038238525390625, 0.049560546875, 0.110107421875, 0.047454833984375, 0.02142333984375, 0.1734619140625, 0.1068115234375, 0.255615234375, 0.002349853515625, 0.0143585205078125, 0.0406494140625, 0.1414794921875, 0.138...
embed
70277325_c0
70277325
prolog
0
Title: I want to write some message when the result is &#x27;no&#x27; in gnu prolog Problem title: I want to write some message when the result is &#x27;no&#x27; in gnu prolog Tags: prolog Problem: I want to write some message when the result is 'no' in gnu prolog I have a code and it is being executed successfully. Th...
I want to write some message when the result is &#x27;no&#x27; in gnu prolog I want to write some message when the result is &#x27;no&#x27; in gnu prolog prolog I want to write some message when the result is 'no' in gnu prolog I have a code and it is being executed successfully. The code is executed and the result is ...
[ -0.00023174285888671875, 0.0196533203125, -0.006011962890625, 0.00933837890625, 0.0037078857421875, 0.0264892578125, 0.00537109375, -0.004150390625, -0.00022220611572265625, 0.01312255859375, 0.002288818359375, -0.00811767578125, -0.022216796875, 0.001495361328125, 0.00872802734375, 0....
[ 3444, 33022, 3060, 26008, 3229, 16750, 83, 3768, 157, 104155, 502, 4867, 23, 18151, 71924, 65771, 63736, 1284, 2685, 959, 11249, 831, 3934, 33949, 44, 30607, 3871, 4358 ]
[ 0.1171875, 0.15966796875, 0.0257110595703125, 0.171142578125, 0.1002197265625, 0.1915283203125, 0.08160400390625, 0.125732421875, 0.2459716796875, 0.185791015625, 0.1456298828125, 0.2034912109375, 0.0276031494140625, 0.1400146484375, 0.13671875, 0.118896484375, 0.1485595703125, 0.0...
embed
20517560_c2
20517560
prolog
2
ny_nose]); get_symptom(Line9, [runny_nose]); get_symptom(Line10, [runny_nose]). hypothesis(Patient,cold,Score_Cold) :- (symptom(Patient,fever), Score_Cold is Code signals: Prolog, Programming, Lines, Line1, Line2, Line3, Line4, Line5, Line6, Line7, Line8, Line9, Line10, get_symptom, runny_nose, Line, FindSymptom, Sympt...
ny_nose]); get_symptom(Line9, [runny_nose]); get_symptom(Line10, [runny_nose]). hypothesis(Patient,cold,Score_Cold) :- (symptom(Patient,fever), Score_Cold is Code signals: Prolog, Programming, Lines, Line1, Line2, Line3, Line4, Line5, Line6, Line7, Line8, Line9, Line10, get_symptom, runny_nose, Line, FindSymptom, Sympt...
[ 0.005584716796875, -0.000843048095703125, 0.01385498046875, 0.03125, -0.00799560546875, -0.0008087158203125, 0.00180816650390625, 0.029052734375, -0.005523681640625, -0.0302734375, -0.01019287109375, 0.0019378662109375, -0.01470947265625, -0.006622314453125, -0.01129150390625, -0.00741...
[ 600, 157, 184, 3142, 2046, 4861, 2676, 5928, 93232, 1126, 16428, 299, 963, 4, 194, 170933, 6023, 8335, 118, 2517, 8447, 71, 30854, 78457, 15772, 2242, 814, 168071, 454, 83, 28864, 26073, 7, 12, 1250, 4867, 27958, 214, 16777, 418, 304, ...
[ 0.1796875, 0.2152099609375, 0.1602783203125, 0.05609130859375, 0.0777587890625, 0.044219970703125, 0.1009521484375, 0.120361328125, 0.15625, 0.119140625, 0.09326171875, 0.145751953125, 0.111572265625, 0.03363037109375, 0.028106689453125, 0.2325439453125, 0.2001953125, 0.04763793945...
embed
68420194_c0
68420194
prolog
0
Title: Prolog &quot;switch&quot; statement Problem title: Prolog &quot;switch&quot; statement Tags: meta-predicate, prolog Problem: Prolog "switch" statement How can I implement a switch statement equivalent to a nested set of if_ s? Ideally something like (don't mind the syntax): compatible(X, Y) :- switch X a1 -> dif...
Prolog &quot;switch&quot; statement Prolog &quot;switch&quot; statement meta-predicate prolog Prolog if_ Prolog "switch" statement How can I implement a switch statement equivalent to a nested set of if_ s? Ideally something like (don't mind the syntax): working the same way as this one:
[ 0.0042724609375, 0.00604248046875, 0.01904296875, 0.015869140625, -0.021484375, -0.01043701171875, -0.004241943359375, 0.0157470703125, 0.007781982421875, -0.0103759765625, 0.007354736328125, 0.0289306640625, -0.0225830078125, -0.017333984375, 0.02783203125, 0.016357421875, 0.0015182...
[ 1250, 4867, 7, 131519, 1230, 63805, 23550, 19714, 2063, 502, 2174, 454, 831, 87, 29479, 10, 101089, 183234, 47, 8512, 5423, 91, 41143, 1884, 7086, 6002, 86531, 20697, 5701, 903, 1632 ]
[ 0.148681640625, 0.2421875, 0.05029296875, 0.232421875, 0.017913818359375, 0.25, 0.1441650390625, 0.092529296875, 0.11004638671875, 0.09564208984375, 0.189697265625, 0.123046875, 0.055633544921875, 0.0102691650390625, 0.1829833984375, 0.0244140625, 0.27001953125, 0.1636962890625, ...
embed
33848952_c0
33848952
prolog
0
Title: Prolog syntax error operator expected Problem title: Prolog syntax error operator expected Tags: prolog Problem: Prolog syntax error operator expected It says there's an error operator expected. I know this syntax error is in line 5 but I can't figure it out. I have highlighted that line with ** thx. action(X : ...
Prolog syntax error operator expected Prolog syntax error operator expected prolog Prolog Path Prolog syntax error operator expected It says there's an error operator expected. I know this syntax error is in line 5 but I can't figure it out. I have highlighted that line with ** thx.
[ 0.014892578125, 0.00482177734375, -0.005828857421875, -0.00433349609375, -0.00138092041015625, 0.004486083984375, -0.012939453125, 0.00982666015625, 0.0021514892578125, -0.01708984375, 0.005218505859375, -0.004058837890625, -0.01336669921875, -0.021728515625, 0.0157470703125, -0.001235...
[ 1250, 4867, 6002, 86531, 18499, 39933, 84751, 502, 108421, 17378, 2685, 3714, 903, 13315, 190, 26366, 1810, 127308, 16459, 5675, 425 ]
[ 0.1278076171875, 0.2056884765625, 0.0836181640625, 0.1571044921875, 0.20263671875, 0.25537109375, 0.225830078125, 0.07513427734375, 0.1436767578125, 0.043426513671875, 0.022186279296875, 0.007190704345703125, 0.046844482421875, 0.09918212890625, 0.11767578125, 0.0465087890625, 0.0344...
embed
11509350_c0
11509350
prolog
0
Title: Herbrand universe, Herbrand Base and Herbrand Model of binary tree (prolog) Problem title: Herbrand universe, Herbrand Base and Herbrand Model of binary tree (prolog) Tags: prolog Problem: Herbrand universe, Herbrand Base and Herbrand Model of binary tree (prolog) What is the Herbrand universe, Herbrand Base and...
Herbrand universe, Herbrand Base and Herbrand Model of binary tree (prolog) Herbrand universe, Herbrand Base and Herbrand Model of binary tree (prolog) prolog Herbrand Base Model binary_tree Left Element Right Herbrand universe, Herbrand Base and Herbrand Model of binary tree (prolog) What is the Herbrand universe, Her...
[ 0.0142822265625, 0.00970458984375, -0.0159912109375, 0.005035400390625, 0.0142822265625, 0.01129150390625, -0.010986328125, -0.01287841796875, 0, -0.0361328125, -0.020263671875, -0.032958984375, 0.01190185546875, 0.0234375, 0.015380859375, 0.01409912109375, 0.0206298828125, 0.01287...
[ 1840, 43264, 14997, 13, 4, 44978, 136, 13293, 2394, 6635, 53201, 3454, 4867, 502, 62600, 2480, 48325, 90911, 4865, 83, 70, 111, 12 ]
[ 0.18359375, 0.297607421875, 0.2100830078125, 0.051239013671875, 0.0283660888671875, 0.2216796875, 0.080322265625, 0.2054443359375, 0.1578369140625, 0.111083984375, 0.2213134765625, 0.08062744140625, 0.13671875, 0.055419921875, 0.1845703125, 0.069580078125, 0.10595703125, 0.09783935...
embed
36580773_c0
36580773
prolog
0
Title: Name for &quot;:-&quot; infix operator Problem title: Name for &quot;:-&quot; infix operator Tags: prolog Problem: Name for ":-" infix operator ":-" serves as an infix operator in the Prolog logic programming language that, in the following context, roughly means: H :- B1, B2, ... BN H is provable if bodies B1 t...
Name for &quot;:-&quot; infix operator Name for &quot;:-&quot; infix operator prolog Name Name for ":-" infix operator ":-" serves as an infix operator in the Prolog logic programming language that, in the following context, roughly means: H is provable if bodies B1 through BN are all provable. Somewhat remarkably, in ...
[ 0.053466796875, -0.01202392578125, 0.029296875, 0.02099609375, -0.02001953125, 0.0120849609375, 0.00787353515625, 0.00970458984375, 0.0220947265625, 0.0145263671875, 0.01385498046875, -0.0186767578125, 0.006072998046875, -0.01251220703125, 0.002288818359375, 0.0026397705078125, -0.01...
[ 15757, 100, 41502, 12, 9, 1230, 23, 55923, 39933, 502, 4867, 21265, 237, 1250, 62775, 56037, 46876, 43701, 166904, 26950, 572, 83, 13395, 2661, 2174, 337, 34204, 335, 418, 8305, 30262, 756, 1733, 124789, 95486, 9351, 903, 26582, 3714, 176...
[ 0.1121826171875, 0.076904296875, 0.0987548828125, 0.1865234375, 0.2286376953125, 0.0777587890625, 0.1448974609375, 0.2435302734375, 0.26025390625, 0.1209716796875, 0.205322265625, 0.0928955078125, 0.0064697265625, 0.14404296875, 0.1202392578125, 0.0975341796875, 0.09368896484375, 0...
embed
25349445_c0
25349445
prolog
0
Title: ax^2+bx+c type inequality solve by completing the square using prolog Problem title: ax^2+bx+c type inequality solve by completing the square using prolog Tags: prolog, swi-prolog Problem: ax^2+bx+c type inequality solve by completing the square using prolog When solving f(x)=-3x^2+5x-4 inequality qusetion using...
ax^2+bx+c type inequality solve by completing the square using prolog ax^2+bx+c type inequality solve by completing the square using prolog prolog swi-prolog prolog ax^2+bx+c type inequality solve by completing the square using prolog When solving f(x)=-3x^2+5x-4 inequality qusetion using completing the square method u...
[ 0.017822265625, 0.006866455078125, -0.004730224609375, 0.0126953125, -0.015869140625, 0.0142822265625, 0.0147705078125, 0.01251220703125, -0.007110595703125, 0.00677490234375, -0.0091552734375, 0.0126953125, 0.0096435546875, -0.025146484375, 0.0147705078125, 0.0034637451171875, -0.00...
[ 10, 425, 8353, 304, 1328, 275, 238, 10644, 23, 13, 161789, 86869, 21721, 108047, 17368, 502, 4867, 2452, 3454, 3115, 6496, 1238, 8316, 131815, 11565, 1103, 184, 214, 70, 55300, 3642, 831, 1614, 2816, 15390, 6626, 175921, 201, 18113, 714, ...
[ 0.043548583984375, 0.1165771484375, 0.037933349609375, 0.1431884765625, 0.1429443359375, 0.050537109375, 0.092529296875, 0.1419677734375, 0.059356689453125, 0.1175537109375, 0.1685791015625, 0.11474609375, 0.156005859375, 0.179931640625, 0.013824462890625, 0.1507568359375, 0.21594238...
embed
13274327_c0
13274327
prolog
0
Title: matrix (square) is symmetric about the main diagonal Problem title: matrix (square) is symmetric about the main diagonal Tags: prolog Problem: matrix (square) is symmetric about the main diagonal Define a predicate that determines whether a matrix (square) is symmetric about the main diagonal. The predicate woul...
matrix (square) is symmetric about the main diagonal matrix (square) is symmetric about the main diagonal prolog matrix (square) is symmetric about the main diagonal Define a predicate that determines whether a matrix (square) is symmetric about the main diagonal. The predicate would read about, where Z is a matrix (sq...
[ 0.0002956390380859375, -0.004638671875, 0.017333984375, 0.01531982421875, -0.0128173828125, 0.00335693359375, -0.01202392578125, 0.030029296875, 0.015625, -0.007659912109375, -0.00714111328125, 0.0159912109375, -0.01092529296875, -0.0267333984375, -0.0025787353515625, 0.0166015625, -...
[ 50944, 425, 108047, 83, 230612, 238, 1672, 5201, 207997, 502, 4867, 64552, 1653, 2063, 67, 83324, 36766, 2806, 12301, 567, 6827, 1511, 6528, 12765, 450, 15555, 136, 3365, 316, 105950, 3714, 9842, 138804, 81979 ]
[ 0.2083740234375, 0.128662109375, 0.2115478515625, 0.0704345703125, 0.2783203125, 0.15966796875, 0.100341796875, 0.0791015625, 0.1790771484375, 0.09295654296875, 0.15576171875, 0.0662841796875, 0.174560546875, 0.206298828125, 0.0863037109375, 0.1373291015625, 0.047821044921875, 0.00...
embed
22378144_c0
22378144
prolog
0
Title: Why this Prolog code does not work? Problem title: Why this Prolog code does not work? Tags: prolog Problem: Why this Prolog code does not work? i have a prolog code that finds Kth element of a given list. this code doesnt work. element_at(X,[X|_],1) :- !. element_at(X,[_|T],K) :- element_at(X,T,K-1). but when i...
Why this Prolog code does not work? Why this Prolog code does not work? prolog Why Prolog element_at K-1 Why this Prolog code does not work? i have a prolog code that finds Kth element of a given list. this code doesnt work. but when i modified this code a little bit, then works. why we need such a thing like K1?
[ 0.00872802734375, 0.01483154296875, 0.00180816650390625, -0.0142822265625, -0.0030975341796875, 0.0012969970703125, -0.01708984375, -0.010986328125, -0.0142822265625, -0.03466796875, 0.03955078125, -0.0101318359375, -0.02099609375, -0.00341796875, 0.018798828125, -0.00872802734375, 0...
[ 44084, 903, 1250, 4867, 18151, 14602, 959, 4488, 502, 12830, 257, 341, 5759, 7413, 927, 5303, 22027, 18, 73197, 10176, 43240, 15400, 3871, 13580, 418 ]
[ 0.1217041015625, 0.0966796875, 0.17919921875, 0.2509765625, 0.185302734375, 0.08612060546875, 0.1297607421875, 0.1368408203125, 0.146240234375, 0.1866455078125, 0.1121826171875, 0.1500244140625, 0.187744140625, 0.059844970703125, 0.1668701171875, 0.088134765625, 0.051971435546875, ...
embed
9345394_c0
9345394
prolog
0
Title: Prolog Code - No idea what it does Problem title: Prolog Code - No idea what it does Tags: swi-prolog, prolog Problem: Prolog Code - No idea what it does I was wondering what this code does: :- set_prolog_flag(toplevel_print_options, [quoted(true), portray(true), attributes(portray), max_depth(100)]). I have see...
Prolog Code - No idea what it does Prolog Code - No idea what it does swi-prolog prolog Prolog set_prolog_flag toplevel_print_options max_depth Prolog Code - No idea what it does I was wondering what this code does: I have seen it in some of the sample codes my prof has posted on his website but I have no clue what it ...
[ 0.037841796875, 0.01708984375, 0.00927734375, 0.0196533203125, -0.01129150390625, -0.00836181640625, -0.00142669677734375, 0.00482177734375, 0.0078125, -0.033447265625, -0.0036163330078125, -0.0152587890625, -0.00390625, -0.000354766845703125, 0.000926971435546875, 0.013427734375, -0...
[ 1250, 4867, 28864, 438, 6528, 2367, 442, 14602, 2452, 3454, 502, 5423, 190872, 2663, 67919, 35662, 109585, 18389, 168867, 149016, 903, 18151, 51592, 121413, 15214, 110, 29786, 4358, 129745 ]
[ 0.159423828125, 0.2340087890625, 0.1990966796875, 0.082275390625, 0.1507568359375, 0.0797119140625, 0.09796142578125, 0.115478515625, 0.1292724609375, 0.116455078125, 0.1019287109375, 0.1246337890625, 0.180419921875, 0.0574951171875, 0.1357421875, 0.11181640625, 0.16357421875, 0.09...
embed
13323271_c0
13323271
prolog
0
Title: How to print a set of numbers using repeat/0 in prolog? Problem title: How to print a set of numbers using repeat/0 in prolog? Tags: prolog Problem: How to print a set of numbers using repeat/0 in prolog? in an exercice I have to write a predicate that prints numbers < N using repeat/0, here is what I have tried...
How to print a set of numbers using repeat/0 in prolog? How to print a set of numbers using repeat/0 in prolog? prolog repeat/0 How N-1 How to print a set of numbers using repeat/0 in prolog? in an exercice I have to write a predicate that prints numbers < N using repeat/0, here is what I have tried : but it only print...
[ -0.000545501708984375, 0.00008916854858398438, -0.005706787109375, 0.0123291015625, 0.004486083984375, 0.0135498046875, 0.00872802734375, 0.0157470703125, 0.00933837890625, -0.01385498046875, 0.0034637451171875, -0.004669189453125, -0.003387451171875, -0.0140380859375, 0.034423828125, ...
[ 11249, 47, 28412, 5423, 101935, 17368, 119140, 107838, 23, 502, 4867, 541, 5759, 125415, 765, 33022, 1653, 2063, 67, 4426, 37842, 4734, 34475, 14012, 18878, 9393, 77298, 3642, 29479 ]
[ 0.048797607421875, 0.0158233642578125, 0.1922607421875, 0.1353759765625, 0.151611328125, 0.07318115234375, 0.2479248046875, 0.2476806640625, 0.036834716796875, 0.1552734375, 0.200439453125, 0.0980224609375, 0.1314697265625, 0.188232421875, 0.01080322265625, 0.0716552734375, 0.1055908...
embed
30525146_c0
30525146
prolog
0
Title: How to construct a list of positions for a certain element in a main list? Problem title: How to construct a list of positions for a certain element in a main list? Tags: prolog Problem: How to construct a list of positions for a certain element in a main list? How can I write a predicate list_pos(B,E,L) , that ...
How to construct a list of positions for a certain element in a main list? How to construct a list of positions for a certain element in a main list? prolog How list_pos How to construct a list of positions for a certain element in a main list? How can I write a predicate list_pos(B,E,L) , that returns the positions of...
[ -0.000640869140625, 0.010986328125, -0.00112152099609375, 0.00830078125, -0.0185546875, 0.0238037109375, -0.006561279296875, 0.0228271484375, 0.0308837890625, -0.015869140625, -0.00131988525390625, -0.01470947265625, 0.0211181640625, 0.01556396484375, -0.007232666015625, 0.017822265625...
[ 11249, 47, 64549, 5303, 111, 19069, 7, 100, 24233, 12830, 5201, 23, 502, 4867, 7522, 831, 33022, 1653, 2063, 67, 571, 647, 866, 30646, 241, 335, 339, 212065, 5117, 145407, 32562, 1528, 65771 ]
[ 0.06793212890625, 0.0296630859375, 0.197265625, 0.194091796875, 0.053497314453125, 0.2088623046875, 0.06396484375, 0.042083740234375, 0.048126220703125, 0.1337890625, 0.08660888671875, 0.051422119140625, 0.09075927734375, 0.1513671875, 0.2056884765625, 0.00274658203125, 0.10900878906...
embed
34001941_c0
34001941
prolog
0
Title: Are regular expressions an example of logic programming? Problem title: Are regular expressions an example of logic programming? Tags: logic-programming, regex, prolog Problem: Are regular expressions an example of logic programming? I'm just wondering if regular expressions fit into the definition of what Logic...
Are regular expressions an example of logic programming? Are regular expressions an example of logic programming? logic-programming regex prolog Are regular expressions an example of logic programming? I'm just wondering if regular expressions fit into the definition of what Logic Programming is. It is a set of rules w...
[ 0.00567626953125, 0.01251220703125, 0.017333984375, 0.0196533203125, -0.00191497802734375, 0.0286865234375, -0.0113525390625, 0.0181884765625, -0.003509521484375, -0.04150390625, 0.007049560546875, 0.007598876953125, -0.01080322265625, -0.0159912109375, 0.01300048828125, 0.010314941406...
[ 20324, 125195, 7, 142, 27781, 62775, 56037, 449, 111, 28966, 214, 6835, 3355, 502, 4867, 149016, 11177, 80934, 50592, 238, 27958, 83, 5423, 91736, 34475, 15824, 11180, 19388, 16750, 96819, 41, 1294, 37170, 102678, 6817, 1379 ]
[ 0.23095703125, 0.27685546875, 0.087646484375, 0.0272979736328125, 0.205322265625, 0.261962890625, 0.2183837890625, 0.119384765625, 0.02264404296875, 0.1585693359375, 0.1204833984375, 0.13525390625, 0.1488037109375, 0.09716796875, 0.1767578125, 0.01849365234375, 0.040771484375, 0.09...
embed
47687438_c1
47687438
prolog
1
BlockUnit(ListToReplace, Iterations, Size, 'r', NewList). Unfortunately, if I change placeRedBlocks to this it doesn't work. placeRedBlocks(Length, List) :- findall('b', between(1, Length, _), List), findall(Y, loopReplace(List, Y), _). and I only get: X = [b, b, b, b] What is happening here? Is it possible for it to r...
BlockUnit(ListToReplace, Iterations, Size, 'r', NewList). Unfortunately, if I change placeRedBlocks to this it doesn't work. placeRedBlocks(Length, List) :- findall('b', between(1, Length, _), List), findall(Y, loopReplace(List, Y), _). and I only get: X = [b, b, b, b] What is happening here? Is it possible for it to r...
[ -0.0047607421875, 0.00946044921875, 0.01361083984375, 0.00341796875, -0.006805419921875, 0.00927734375, -0.000518798828125, 0.0037841796875, 0.0308837890625, 0.0157470703125, -0.000530242919921875, 0.01116943359375, 0.03125, -0.026611328125, -0.01080322265625, 0.00457763671875, 0.014...
[ 80231, 85600, 18, 154663, 7763, 4332, 23935, 87, 720, 21094, 80378, 42, 2356, 185397, 15549, 3687, 80852, 166191, 7, 903, 22027, 4488, 5267, 449, 927, 32036, 7413, 5584, 275, 17721, 41600, 77554, 1723, 40956, 990, 4734, 2046, 1193, 2203, ...
[ 0.1859130859375, 0.1646728515625, 0.0579833984375, 0.18310546875, 0.1297607421875, 0.09619140625, 0.1749267578125, 0.031829833984375, 0.2021484375, 0.07586669921875, 0.107177734375, 0.046600341796875, 0.0484619140625, 0.03631591796875, 0.12646484375, 0.17919921875, 0.15869140625, 0...
embed
65000551_c0
65000551
prolog
0
Title: If statement in prolog recursion Problem title: If statement in prolog recursion Tags: recursion, prolog, visual-prolog Problem: If statement in prolog recursion I need to write this code in prolog: void rec_k(int k,int i,int j) { if (!(k<9)) return; if ((i <> j) and (i <> k) and (j <> k)) { writeln(100 * i + 10...
If statement in prolog recursion If statement in prolog recursion recursion prolog visual-prolog rec_k If statement in prolog recursion I need to write this code in prolog: I tried this: Doesn't work, of course.
[ -0.0033416748046875, -0.00927734375, 0.0087890625, 0.002655029296875, 0.004638671875, -0.0004177093505859375, -0.00616455078125, 0.0032196044921875, 0.00335693359375, 0.0078125, 0.006103515625, -0.00860595703125, -0.013427734375, -0.00022792816162109375, 0.007293701171875, -0.008361816...
[ 4263, 63805, 23, 502, 4867, 195625, 1830, 21176, 3454, 21954, 92, 3871, 33022, 903, 18151, 37842, 18, 4488, 15411 ]
[ 0.2109375, 0.2266845703125, 0.0394287109375, 0.1302490234375, 0.218017578125, 0.198974609375, 0.09075927734375, 0.188720703125, 0.08953857421875, 0.0714111328125, 0.10028076171875, 0.050872802734375, 0.057464599609375, 0.0307769775390625, 0.1297607421875, 0.068603515625, 0.0388183593...
embed
5831810_c0
5831810
prolog
0
Title: How to append 1 element in nested list in Prolog? Problem title: How to append 1 element in nested list in Prolog? Tags: append, list, prolog, turbo-prolog Problem: How to append 1 element in nested list in Prolog? I want to append one list element in nested list: predicates append(li,li,li). clauses append([X|Y...
How to append 1 element in nested list in Prolog? How to append 1 element in nested list in Prolog? append list prolog turbo-prolog How Prolog Solution How to append 1 element in nested list in Prolog? I want to append one list element in nested list: For example: Turbo Prolog said: Type Error. How can I do this?
[ -0.0111083984375, 0.00848388671875, 0.00958251953125, 0.00482177734375, -0.00555419921875, 0.02294921875, -0.00823974609375, 0.004913330078125, 0.00933837890625, -0.022705078125, 0.0220947265625, -0.025146484375, -0.009521484375, 0.01275634765625, 0.01507568359375, -0.010498046875, 0...
[ 11249, 47, 114689, 71, 106, 12830, 23, 8512, 5303, 1250, 4867, 502, 94779, 3454, 187895, 3444, 1632, 102228, 60457, 212059 ]
[ 0.053985595703125, 0.01959228515625, 0.173583984375, 0.1158447265625, 0.1153564453125, 0.17138671875, 0.04107666015625, 0.212158203125, 0.1871337890625, 0.1507568359375, 0.2305908203125, 0.0931396484375, 0.1378173828125, 0.0732421875, 0.05438232421875, 0.0193023681640625, 0.092773437...
embed
65208158_c0
65208158
prolog
0
Title: Discrete Logarithm in Prolog Problem title: Discrete Logarithm in Prolog Tags: pumping-lemma, primes, halting-problem, prolog Problem: Discrete Logarithm in Prolog P2() { X = 955725; while (X != 77) { X = (X*12367+3466) mod 4294967296; } } Since each iteration is kind of a function composition, ultimately leadin...
Discrete Logarithm in Prolog Discrete Logarithm in Prolog pumping-lemma primes halting-problem prolog Discrete Logarithm Prolog Discrete Logarithm in Prolog I would like to check which of the two programs will stop: Since each iteration is kind of a function composition, ultimately leading to a power of the function in...
[ 0.00372314453125, -0.0024566650390625, -0.001922607421875, 0.0225830078125, 0.01513671875, 0.0242919921875, -0.000690460205078125, -0.005706787109375, 0.01068115234375, -0.050537109375, 0.0208740234375, 0.030029296875, 0.00057220458984375, 0.007537841796875, 0.007110595703125, -0.00166...
[ 53092, 38417, 13146, 87302, 18337, 1250, 4867, 23, 42874, 214, 6153, 192, 20809, 1870, 1916, 38953, 502, 12765, 6626, 103391, 1221, 7279, 12638, 720, 2320, 32354, 166577, 20654, 105207, 14537, 46132, 12960, 40956, 5809, 51139, 86869, 2967, 20...
[ 0.1357421875, 0.2271728515625, 0.1224365234375, 0.1790771484375, 0.1292724609375, 0.1597900390625, 0.2484130859375, 0.014862060546875, 0.1910400390625, 0.066162109375, 0.137451171875, 0.0908203125, 0.1640625, 0.1553955078125, 0.076416015625, 0.1519775390625, 0.1015625, 0.0920410156...
embed
33422235_c0
33422235
prolog
0
Title: Why does subset(X,[1,2]) not generate all subsets? Problem title: Why does subset(X,[1,2]) not generate all subsets? Tags: prolog Problem: Why does subset(X,[1,2]) not generate all subsets? I'm learning Prolog and it was my understanding that you can often ask the "reverse question", e.g. instead of using member...
Why does subset(X,[1,2]) not generate all subsets? Why does subset(X,[1,2]) not generate all subsets? prolog Why Why does subset(X,[1,2]) not generate all subsets? I'm learning Prolog and it was my understanding that you can often ask the "reverse question", e.g. instead of using member(X,Y) to ask whether X is in Y , ...
[ 0.00628662109375, 0.0162353515625, 0.01409912109375, -0.005279541015625, -0.01483154296875, 0.0174560546875, 0.000438690185546875, 0.00750732421875, 0.0167236328125, 0.017333984375, 0.0019989013671875, 0.002838134765625, -0.011962890625, 0.01470947265625, -0.00921630859375, -0.01263427...
[ 44084, 14602, 1614, 3509, 1542, 133063, 959, 139392, 756, 502, 4867, 1250, 27983, 26458, 107, 37676, 9655, 64457, 32786, 1723, 36766, 1193, 23, 990, 5303, 70541, 43240, 1284, 30646, 2203, 31635, 38969, 10752 ]
[ 0.12646484375, 0.0684814453125, 0.21533203125, 0.256591796875, 0.1353759765625, 0.2298583984375, 0.162841796875, 0.212158203125, 0.1363525390625, 0.0640869140625, 0.1636962890625, 0.093017578125, 0.0548095703125, 0.081787109375, 0.0877685546875, 0.20947265625, 0.13720703125, 0.0220...
embed