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
23539327_c1
23539327
prolog
1
get a loop The problem is that the answer for: ?- brother(X, alin). is: X = alex ; X = ciprian ; X = alin ; X = alin ; X = alin ; X = alin ; X = alex ; X = alex ; X = alex ; X = alex ; X = ciprian ; X = ciprian ; X = claudiu ; X = claudiu ; false. I looked through the trace and I understand what the problem is, but I ...
get a loop The problem is that the answer for: ?- brother(X, alin). is: X = alex ; X = ciprian ; X = alin ; X = alin ; X = alin ; X = alin ; X = alex ; X = alex ; X = alex ; X = alex ; X = ciprian ; X = ciprian ; X = claudiu ; X = claudiu ; false. I looked through the trace and I understand what the problem is, but I ...
[ 0.01312255859375, 0.004547119140625, 0.004913330078125, 0.02587890625, -0.007415771484375, 0.0032196044921875, 0.006988525390625, 0.00750732421875, 0.0281982421875, -0.0654296875, 0.017578125, 0.0087890625, 0.009765625, 0.0167236328125, -0.0015106201171875, -0.00238037109375, 0.01251...
[ 2046, 10, 40956, 2967, 83, 450, 70, 35166, 100, 705, 9, 82953, 1542, 4, 109734, 1193, 2203, 662, 425, 6, 25258, 9893, 2819, 86735, 56824, 98320, 5, 144851, 28219, 3714, 86869, 5608, 959, 7722, 27060, 108975, 11001, 1733, 28864, 26073, 1...
[ 0.1514892578125, 0.06390380859375, 0.27587890625, 0.1727294921875, 0.05804443359375, 0.003875732421875, 0.038665771484375, 0.212890625, 0.03759765625, 0.1220703125, 0.10595703125, 0.278076171875, 0.125732421875, 0.01043701171875, 0.290771484375, 0.1585693359375, 0.0439453125, 0.133...
embed
22421995_c0
22421995
prolog
0
Title: What does '!' do in Prolog? Problem title: What does '!' do in Prolog? Tags: prolog Problem: What does '!' do in Prolog? I keep running across this operator. Here is an example, a predicate that uses insertion sort to sort a list of integers. inser(A,[],[A],P). inser(A,[H|L],R,P):- P(A,H),app...
What does '!' do in Prolog? What does '!' do in Prolog? prolog What Prolog What does '!' do in Prolog? I keep running across this operator. Here is an example, a predicate that uses insertion sort to sort a list of integers. I am new to Prolog.
[ 0.02294921875, 0.0096435546875, 0.0294189453125, -0.0164794921875, -0.0177001953125, 0.0225830078125, -0.00775146484375, -0.0120849609375, 0.00518798828125, -0.0069580078125, 0.005340576171875, -0.00049591064453125, -0.00909423828125, -0.01422119140625, -0.003814697265625, 0.0098266601...
[ 4865, 14602, 3768, 74, 38, 54764, 425, 54, 23, 1250, 4867, 32, 502, 242, 25, 13695, 51042, 36880, 903, 39933, 11853, 27781, 1653, 2063, 67, 450, 4527, 241860, 12096, 47, 10, 5303, 111, 892, 26255, 3525 ]
[ 0.1280517578125, 0.1451416015625, 0.239501953125, 0.06011962890625, 0.23095703125, 0.024627685546875, 0.023040771484375, 0.172607421875, 0.1494140625, 0.2447509765625, 0.31884765625, 0.008026123046875, 0.194580078125, 0.03021240234375, 0.069580078125, 0.052459716796875, 0.07995605468...
embed
8903433_c0
8903433
prolog
0
Title: Prolog - Need information on facts Problem title: Prolog - Need information on facts Tags: fact, prolog Problem: Prolog - Need information on facts Say I had a fact such as: bigger(cat,mouse). If I wanted to describe this to someone, would I be correct in saying "cat is the first term within this fact and mouse ...
Prolog - Need information on facts Prolog - Need information on facts fact prolog Prolog Need Prolog - Need information on facts Say I had a fact such as: If I wanted to describe this to someone, would I be correct in saying "cat is the first term within this fact and mouse is the second term" or would I refer to the c...
[ 0.03564453125, 0.00408935546875, -0.00634765625, 0.02783203125, 0.0021209716796875, 0.02099609375, 0.01434326171875, 0.005889892578125, -0.00726318359375, -0.005279541015625, 0.02294921875, -0.004119873046875, -0.036376953125, 0.000530242919921875, -0.001708984375, 0.014892578125, 0....
[ 1250, 4867, 52889, 4677, 98, 15824, 502, 7, 25916, 87, 1902, 36663, 47, 98363, 903, 22008, 2806, 26785, 54433, 4460, 83, 5117, 13579, 28032, 136, 114669, 17932, 707, 15005, 7515, 237, 34627, 5154, 2347 ]
[ 0.122314453125, 0.20849609375, 0.1163330078125, 0.1258544921875, 0.072265625, 0.202880859375, 0.060455322265625, 0.0272369384765625, 0.0321044921875, 0.002197265625, 0.1090087890625, 0.04364013671875, 0.06256103515625, 0.19580078125, 0.06494140625, 0.0751953125, 0.043975830078125, ...
embed
59751189_c0
59751189
prolog
0
Title: Prolog: Convert constant with parentheses to string Problem title: Prolog: Convert constant with parentheses to string Tags: prolog Problem: Prolog: Convert constant with parentheses to string I have question about Prolog. When I have the constant e.g. fib(7) and I want to convert it to a string with atom_codes(...
Prolog: Convert constant with parentheses to string Prolog: Convert constant with parentheses to string prolog Prolog Convert atom_codes Prolog: Convert constant with parentheses to string I have question about Prolog. When I have the constant e.g. fib(7) and I want to convert it to a string with atom_codes(fib(7), A) ...
[ 0.0260009765625, -0.0057373046875, 0.0067138671875, 0.04052734375, -0.0025787353515625, 0.0126953125, -0.0010223388671875, 0.011962890625, 0, -0.04296875, 0.003082275390625, -0.02099609375, -0.01177978515625, 0.020751953125, 0.0150146484375, 0.0072021484375, 0.000514984130859375, 0...
[ 1250, 4867, 12, 1657, 11549, 53697, 678, 49129, 35412, 90, 47, 79315, 502, 34627, 454, 40899, 765, 9655, 70, 809, 275, 36076, 3444, 96760, 10, 1029, 62, 2046, 18499, 100, 351, 54744, 238, 83, 84751, 2967, 831, 17, 54 ]
[ 0.1561279296875, 0.236572265625, 0.02191162109375, 0.03985595703125, 0.1285400390625, 0.2135009765625, 0.0653076171875, 0.13427734375, 0.16015625, 0.09027099609375, 0.0816650390625, 0.2276611328125, 0.0985107421875, 0.217041015625, 0.0146636962890625, 0.1895751953125, 0.0197906494140...
embed
24212451_c0
24212451
prolog
0
Title: How to to set an alarm on SWI-Prolog? Problem title: How to to set an alarm on SWI-Prolog? Tags: window, alarm, prolog, swi-prolog, timer Problem: How to to set an alarm on SWI-Prolog? I'm trying to make something that print something on screen after 5000 miliseconds. I Was using this code, and after 5 seconds t...
How to to set an alarm on SWI-Prolog? How to to set an alarm on SWI-Prolog? window alarm prolog swi-prolog timer How SWI-Prolog use_module How to to set an alarm on SWI-Prolog? I'm trying to make something that print something on screen after 5000 miliseconds. I Was using this code, and after 5 seconds the Prolog shuts...
[ 0.026611328125, 0.0245361328125, 0.01336669921875, 0.01287841796875, -0.00848388671875, 0.0012359619140625, 0.0030059814453125, 0.0224609375, -0.00860595703125, -0.08203125, 0.01361083984375, -0.0045166015625, 0.0068359375, 0.006561279296875, 0.01251220703125, -0.00823974609375, -0.0...
[ 11249, 47, 5423, 142, 28949, 98, 159, 38969, 10752, 4867, 9, 76896, 502, 91, 2452, 3454, 21991, 4527, 83279, 31577, 3249, 9844, 28412, 49119, 7103, 19692, 51102, 191633, 17368, 18151, 190, 94131, 70, 1250, 8633, 933, 7565, 903, 9969, 1340...
[ 0.0648193359375, 0.04718017578125, 0.159423828125, 0.07861328125, 0.304443359375, 0.1025390625, 0.0924072265625, 0.2391357421875, 0.16650390625, 0.2459716796875, 0.02685546875, 0.0997314453125, 0.11669921875, 0.04620361328125, 0.1932373046875, 0.1195068359375, 0.2161865234375, 0.07...
embed
10111625_c0
10111625
prolog
0
Title: what does slash(/) do in prolog? Problem title: what does slash(/) do in prolog? Tags: operators, prolog Problem: what does slash(/) do in prolog? I have this code: set_value(X,Value,[X/_|T],[X/Value|T]). set_value(X,Value,[Y/V|T],[Y/V|NewT):- X\=Y,set_value(X,Value,T,NewT). set_value(X,Value,[],[X/Value]). But ...
what does slash(/) do in prolog? what does slash(/) do in prolog? operators prolog set_value Value NewT what does slash(/) do in prolog? I have this code: But I cannot figure out what does / do. It looks like it pairs variables, but I'm not 100% sure. It definitely isn't division operator. Thanks.
[ 0.0135498046875, 0.0174560546875, 0.0252685546875, -0.0078125, -0.0177001953125, -0.00119781494140625, -0.028076171875, 0.0034332275390625, 0.01953125, -0.004150390625, 0.0174560546875, 0.017578125, -0.001617431640625, -0.0257568359375, -0.0033721923828125, 0.0003643035888671875, 0.0...
[ 2367, 14602, 91, 5544, 132, 64, 16, 54, 23, 502, 4867, 39933, 5423, 27494, 190060, 2356, 618, 18151, 53418, 26366, 1810, 248, 33342, 442, 80836, 7, 77336, 3555, 9077, 58621, 56112, 18, 91853 ]
[ 0.11474609375, 0.124755859375, 0.093994140625, 0.2470703125, 0.1260986328125, 0.251953125, 0.071044921875, 0.138671875, 0.09466552734375, 0.1746826171875, 0.22509765625, 0.1923828125, 0.1544189453125, 0.1319580078125, 0.1600341796875, 0.1199951171875, 0.1436767578125, 0.10162353515...
embed
28613378_c0
28613378
prolog
0
Title: syntax error: expression expected Problem title: syntax error: expression expected Tags: prolog Problem: syntax error: expression expected I'm going through a learn Prolog tutorial . I pulled a single line from the example: happy(yolanda). and put it into an XGP file. When I compile it I get: syntax error: expre...
syntax error: expression expected syntax error: expression expected prolog syntax error: expression expected I'm going through a learn Prolog tutorial . I pulled a single line from the example: happy(yolanda). and put it into an XGP file. When I compile it I get: This same line works ok when I load it into swipl so I g...
[ 0.00738525390625, 0.000431060791015625, 0.005584716796875, 0.00775146484375, -0.0230712890625, 0.0361328125, 0.00946044921875, -0.0031585693359375, 0.0028228759765625, -0.046142578125, -0.0010833740234375, -0.006561279296875, -0.0274658203125, -0.027099609375, 0.0245361328125, 0.000096...
[ 6002, 86531, 18499, 125195, 84751, 502, 4867, 30698, 1250, 57143, 198932, 11001, 13315, 27781, 17723, 1410, 23444, 1193, 32566, 11435, 9969, 1340, 5701, 43240, 3664, 72367, 91, 2452, 2424, 60212, 11675, 2046, 32635, 450, 2412, 83, 23 ]
[ 0.0948486328125, 0.14794921875, 0.16552734375, 0.26220703125, 0.239501953125, 0.134521484375, 0.2049560546875, 0.06646728515625, 0.10791015625, 0.108154296875, 0.02508544921875, 0.05755615234375, 0.1085205078125, 0.10736083984375, 0.228515625, 0.1253662109375, 0.21044921875, 0.0681...
embed
61557633_c0
61557633
prolog
0
Title: How to prevent unification in prolog Problem title: How to prevent unification in prolog Tags: prolog Problem: How to prevent unification in prolog I have a predicate that generates sublists like this, ?- f([1,2,3,#,5,6,7,8,#,10,11,12],L). L = [1,2,3]; L=[5,6,7,8]; L=[10,11,12]; false. When I call it with variab...
How to prevent unification in prolog How to prevent unification in prolog prolog How How to prevent unification in prolog I have a predicate that generates sublists like this, When I call it with variables instead of constants they unify with # ruining the output and stopping them from unifying later. How can I stop he...
[ 0.0027923583984375, 0.0177001953125, 0.01153564453125, -0.0223388671875, -0.0108642578125, -0.01904296875, -0.0172119140625, 0.0203857421875, 0.00250244140625, -0.035888671875, -0.0010528564453125, 0.00885009765625, 0.0177001953125, -0.003753662109375, 0.008544921875, 0.0118408203125, ...
[ 11249, 47, 56282, 51, 41274, 23, 502, 4867, 1653, 2063, 67, 139392, 1614, 6562, 1884, 11782, 678, 77336, 64457, 53697, 40383, 468, 73573, 140992, 7279, 10366, 1295, 151138, 764 ]
[ 0.0693359375, 0.040008544921875, 0.2381591796875, 0.178955078125, 0.2147216796875, 0.0667724609375, 0.149169921875, 0.2257080078125, 0.07904052734375, 0.1064453125, 0.039031982421875, 0.055206298828125, 0.134765625, 0.1551513671875, 0.01409912109375, 0.11041259765625, 0.0179443359375...
embed
11629585_c1
11629585
prolog
1
putOnTable(Y)); clear(X,S), \+ A = putOn(_,X). % Restore suppressed situation arguments restoreSitArg(onTable(X),S,onTable(X,S)). restoreSitArg(on(X,Y),S,on(X,Y,S)). restoreSitArg(clear(X),S,clear(X,S)). block(X):- member(X,[a,b,c,d,e]). % iniTial COndition onTable(a,s0). on(b,a,s0). on(c,b,s0). clear(c,s0). onTable(d...
putOnTable(Y)); clear(X,S), \+ A = putOn(_,X). % Restore suppressed situation arguments restoreSitArg(onTable(X),S,onTable(X,S)). restoreSitArg(on(X,Y),S,on(X,Y,S)). restoreSitArg(clear(X),S,clear(X,S)). block(X):- member(X,[a,b,c,d,e]). % iniTial COndition onTable(a,s0). on(b,a,s0). on(c,b,s0). clear(c,s0). onTable(d...
[ -0.0086669921875, 0.0205078125, 0.01080322265625, 0.004180908203125, 0.0079345703125, 0.01385498046875, 0.01904296875, -0.0035247802734375, 0.0091552734375, -0.025634765625, 0.00848388671875, 0.00897216796875, -0.03515625, 0.0079345703125, 0.0027923583984375, 0.00848388671875, 0.0112...
[ 3884, 20320, 618, 2886, 1723, 3142, 34735, 1542, 294, 1328, 62, 2203, 1745, 853, 45804, 15811, 11856, 297, 16648, 10750, 14359, 107, 217, 7614, 177, 191, 119488, 46389, 32786, 71, 16734, 4607, 1363, 98, 11, 77495, 13, 86827, 1564, 28864, ...
[ 0.188720703125, 0.25439453125, 0.169677734375, 0.228271484375, 0.1505126953125, 0.013946533203125, 0.1954345703125, 0.0906982421875, 0.042633056640625, 0.1156005859375, 0.115234375, 0.018768310546875, 0.04913330078125, 0.0206451416015625, 0.174560546875, 0.089599609375, 0.19812011718...
embed
48034680_c0
48034680
prolog
0
Title: How to install swi Prolog's graphical debugger on Linux (ubuntu) Problem title: How to install swi Prolog's graphical debugger on Linux (ubuntu) Tags: ubuntu, linux, prolog, swi-prolog Problem: How to install swi Prolog's graphical debugger on Linux (ubuntu) I am new to Prolog and when I try to invoke ...
How to install swi Prolog's graphical debugger on Linux (ubuntu) How to install swi Prolog's graphical debugger on Linux (ubuntu) ubuntu linux prolog swi-prolog How Prolog Linux How to install swi Prolog's graphical debugger on Linux (ubuntu) I am new to Prolog and when I try to invoke the graphical debugger ...
[ 0.006591796875, 0.0169677734375, 0.00159454345703125, -0.01092529296875, -0.01055908203125, 0.0029449462890625, 0.0017242431640625, -0.0093994140625, -0.00946044921875, -0.006744384765625, 0.0218505859375, -0.01953125, -0.000762939453125, -0.00823974609375, 0.0068359375, 0.02392578125,...
[ 11249, 47, 20600, 91, 2452, 1250, 4867, 3768, 48461, 289, 8, 978, 21407, 98, 29908, 198996, 11508, 6077, 502, 3454, 3525, 23253, 25632, 18499, 26008, 151206, 24638, 79912, 5983, 50491, 2497, 22246, 3443, 107838, 397, 38969, 594, 5809, 959, ...
[ 0.0433349609375, 0.0311279296875, 0.191162109375, 0.07794189453125, 0.24853515625, 0.18896484375, 0.201904296875, 0.047088623046875, 0.1968994140625, 0.0209808349609375, 0.150146484375, 0.2186279296875, 0.176513671875, 0.0877685546875, 0.2021484375, 0.14990234375, 0.038360595703125, ...
embed
43840503_c0
43840503
prolog
0
Title: How to get list of atom variables from a term in Prolog Problem title: How to get list of atom variables from a term in Prolog Tags: prolog Problem: How to get list of atom variables from a term in Prolog How to get list of atom variables from a term For example- Term = (h-5)* (h-5)+ (k- -2)* (k- -2)- (h-3)* (h-...
How to get list of atom variables from a term in Prolog How to get list of atom variables from a term in Prolog prolog a How Prolog Term h-5 h-3 k-4 get_variables Var_list How to get list of atom variables from a term in Prolog How to get list of atom variables from a term For example- For above term, the answer would ...
[ 0.017333984375, 0.01446533203125, -0.0034332275390625, 0.0191650390625, -0.007476806640625, 0.0057373046875, -0.006866455078125, 0.02197265625, -0.00543212890625, -0.0198974609375, 0.021728515625, 0.01361083984375, 0.00156402587890625, 0.0029296875, 0.000885009765625, 0.0068359375, 0...
[ 11249, 2046, 5303, 111, 34627, 77336, 7, 1295, 13579, 1250, 4867, 502, 2994, 1096, 10342, 8316, 472, 11565, 21690, 19736, 3323, 6562, 23, 36917, 35166, 127, 92 ]
[ 0.012939453125, 0.0888671875, 0.1763916015625, 0.04864501953125, 0.221435546875, 0.255615234375, 0.0877685546875, 0.086181640625, 0.2080078125, 0.137451171875, 0.224853515625, 0.1038818359375, 0.10467529296875, 0.047698974609375, 0.111083984375, 0.1097412109375, 0.007110595703125, ...
embed
12109558_c0
12109558
prolog
0
Title: Simple Prolog generator Problem title: Simple Prolog generator Tags: prolog, generator Problem: Simple Prolog generator I'm big newbie to Prolog and I'm trying to write simple generator which finds the integers below 5. gen(0). gen(X):- X<5 When I run the program with gen(X) it only prints X = 0 and prompts me t...
Simple Prolog generator Simple Prolog generator prolog generator Simple Prolog Simple Prolog generator I'm big newbie to Prolog and I'm trying to write simple generator which finds the integers below 5. When I run the program with gen(X) it only prints X = 0 and prompts me to enter something and when I press enter the ...
[ -0.00653076171875, 0.01055908203125, 0.004791259765625, -0.002960205078125, -0.005401611328125, 0.019775390625, 0.0023193359375, 0.01190185546875, 0.006805419921875, -0.0537109375, -0.0012969970703125, -0.00311279296875, -0.01361083984375, 0.0126953125, 0.0118408203125, -0.003585815429...
[ 60552, 1250, 4867, 145823, 502, 3525, 9014, 31577, 33022, 8781, 7413, 892, 26255, 35064, 1892, 11675, 1528, 678, 9226, 1542, 4734, 28412, 1193, 2203, 757, 105876, 30957, 9844, 24234, 32, 9, 127887, 13438, 11249, 3249, 4049, 139392, 101935, ...
[ 0.171630859375, 0.1441650390625, 0.2369384765625, 0.2509765625, 0.1005859375, 0.0128173828125, 0.0850830078125, 0.045257568359375, 0.0927734375, 0.165771484375, 0.06573486328125, 0.1126708984375, 0.1107177734375, 0.1734619140625, 0.1468505859375, 0.0865478515625, 0.1259765625, 0.01...
embed
53266306_c0
53266306
prolog
0
Title: What&#x27;s the difference between functor, a fact, a predicate and a rule in Prolog? Problem title: What&#x27;s the difference between functor, a fact, a predicate and a rule in Prolog? Tags: terminology, prolog Problem: What's the difference between functor, a fact, a predicate and a rule in Prolog? I would li...
What&#x27;s the difference between functor, a fact, a predicate and a rule in Prolog? What&#x27;s the difference between functor, a fact, a predicate and a rule in Prolog? terminology prolog What Prolog What's the difference between functor, a fact, a predicate and a rule in Prolog? I would like to know the difference ...
[ 0.04150390625, 0.01177978515625, -0.0001068115234375, 0.02294921875, 0.0024566650390625, 0.0186767578125, 0.00872802734375, 0.0018310546875, 0.00131988525390625, -0.00665283203125, -0.000720977783203125, -0.01708984375, -0.009033203125, 0.0028228759765625, -0.00616455078125, 0.01245117...
[ 3768, 70, 60212, 17721, 7477, 18770, 10, 15824, 1653, 2063, 67, 136, 79986, 23, 1250, 4867, 4865, 18614, 25443, 502, 4, 3714, 8382, 69407, 7, 33022, 82953, 66159, 19, 121477, 450, 707 ]
[ 0.0556640625, 0.070068359375, 0.21044921875, 0.10064697265625, 0.205322265625, 0.2666015625, 0.06884765625, 0.231689453125, 0.2041015625, 0.2464599609375, 0.1817626953125, 0.0775146484375, 0.2392578125, 0.075927734375, 0.16064453125, 0.2431640625, 0.008026123046875, 0.0446472167968...
embed
34267551_c0
34267551
prolog
0
Title: Prolog syntax error: illegal start of term Problem title: Prolog syntax error: illegal start of term Tags: syntax-error, prolog Problem: Prolog syntax error: illegal start of term So I'm trying to test my the predicate reduce/4 defined as following: :- op(20,xfy,?=). ERROR: Syntax error: Illegal start of term ER...
Prolog syntax error: illegal start of term Prolog syntax error: illegal start of term syntax-error prolog Prolog ERROR Syntax Illegal Prolog syntax error: illegal start of term So I'm trying to test my the predicate reduce/4 defined as following: but i keep getting this error: I'm new to Prolog so maybe it is something...
[ -0.00799560546875, 0.004364013671875, -0.01055908203125, 0.016845703125, -0.01483154296875, 0.0118408203125, -0.0084228515625, 0.0125732421875, -0.021728515625, -0.025146484375, 0.034423828125, 0.035400390625, 0.00787353515625, -0.01397705078125, 0.01361083984375, -0.00885009765625, ...
[ 1250, 4867, 6002, 86531, 18499, 85325, 4034, 111, 13579, 188800, 502, 151206, 24638, 19010, 891, 86966, 31577, 3034, 1653, 2063, 67, 34390, 17357, 61924, 25632, 13695, 903, 3525, 51139, 110833 ]
[ 0.1766357421875, 0.2587890625, 0.140625, 0.1536865234375, 0.191650390625, 0.2216796875, 0.1553955078125, 0.0811767578125, 0.1900634765625, 0.137939453125, 0.1312255859375, 0.12152099609375, 0.0273284912109375, 0.1083984375, 0.046844482421875, 0.15673828125, 0.025726318359375, 0.112...
embed
76811975_c0
76811975
prolog
0
Title: Bind a grade to a numeric value in Prolog Problem title: Bind a grade to a numeric value in Prolog Tags: prolog, error-handling Problem: Bind a grade to a numeric value in Prolog I need to use Prolog to bind a letter grade for a given integer grade value (>= 90 is a, >= 80 is b, and so on.) evaluate_grade( X , f...
Bind a grade to a numeric value in Prolog Bind a grade to a numeric value in Prolog prolog error-handling Bind Prolog Bind a grade to a numeric value in Prolog I need to use Prolog to bind a letter grade for a given integer grade value (>= 90 is a, >= 80 is b, and so on.) evaluate_grade( X , f ) :- X >= 0.0 , X < 2.0. ...
[ -0.00421142578125, 0.0137939453125, -0.0029449462890625, -0.0059814453125, 0.01312255859375, 0.0286865234375, -0.0135498046875, -0.0133056640625, -0.00665283203125, 0.03076171875, -0.017822265625, 0.00634765625, -0.002105712890625, 0.00775146484375, 0.0002765655517578125, -0.0043334960...
[ 16666, 71, 10, 44000, 47, 54744, 238, 34292, 1250, 4867, 23, 502, 18499, 54885, 3871, 4527, 68557, 31330, 100, 892, 1505, 2740, 2510, 83, 977, 2248, 876, 151575, 13, 44286, 1193, 1238, 89678, 16655, 43240, 5885, 107754, 527, 22008, 30957,...
[ 0.190185546875, 0.07696533203125, 0.034637451171875, 0.258056640625, 0.138916015625, 0.146240234375, 0.062744140625, 0.19091796875, 0.1641845703125, 0.245849609375, 0.0196075439453125, 0.10296630859375, 0.1441650390625, 0.124267578125, 0.044891357421875, 0.038482666015625, 0.23718261...
embed
27221582_c0
27221582
prolog
0
Title: Prolog - member rule using concat Problem title: Prolog - member rule using concat Tags: prolog Problem: Prolog - member rule using concat Can anyone explain how this member rule works using concatenation? I figured concat just returns a new list rather than seeing if a element is in the list. Concat rule is tak...
Prolog - member rule using concat Prolog - member rule using concat prolog concat Prolog Prolog - member rule using concat Can anyone explain how this member rule works using concatenation? I figured concat just returns a new list rather than seeing if a element is in the list. Concat rule is taken from my textbook.
[ 0.01129150390625, 0.0020904541015625, 0.01202392578125, 0.01409912109375, -0.00958251953125, 0.018310546875, -0.00970458984375, 0.0264892578125, 0.010986328125, -0.05908203125, 0.006439208984375, -0.024169921875, 0.02001953125, -0.00250244140625, 0.0084228515625, -0.0059814453125, -0...
[ 1250, 4867, 32786, 79986, 17368, 158, 4460, 502, 73342, 3642, 903, 43240, 33, 2320, 26366, 30646, 3525, 5303, 86681, 2174, 12830, 23, 1657, 39958, 7986, 14137 ]
[ 0.145263671875, 0.2144775390625, 0.2142333984375, 0.1748046875, 0.056884765625, 0.1690673828125, 0.26513671875, 0.0936279296875, 0.09161376953125, 0.04302978515625, 0.031341552734375, 0.10699462890625, 0.1192626953125, 0.037841796875, 0.035888671875, 0.12548828125, 0.0273895263671875...
embed
19954395_c1
19954395
prolog
1
y, _G246) ? creep Call: (8) inherits(toy, _G366) ? creep Exit: (8) inherits(toy, object) ? creep Call: (8) superclass(object, _G246) ? creep Call: (9) inherits(object, _G246) ? creep Fail: (9) inherits(object, _G246) ? creep Redo: (8) superclass(object, _G246) ? creep Call: (9) inherits(object, _G366) ? creep Fail: (9)...
y, _G246) ? creep Call: (8) inherits(toy, _G366) ? creep Exit: (8) inherits(toy, object) ? creep Call: (8) superclass(object, _G246) ? creep Call: (9) inherits(object, _G246) ? creep Fail: (9) inherits(object, _G246) ? creep Redo: (8) superclass(object, _G246) ? creep Call: (9) inherits(object, _G366) ? creep Fail: (9)...
[ 0.025146484375, 0.002044677734375, 0.01104736328125, 0.0218505859375, 0.019287109375, 0.01080322265625, -0.0034637451171875, -0.006500244140625, 0.0027923583984375, 0.003570556640625, 0.0038604736328125, -0.00640869140625, -0.00811767578125, 0.01080322265625, 0.004730224609375, -0.0078...
[ 113, 101, 724, 304, 117413, 705, 49512, 254, 26265, 12, 10021, 23, 3334, 14481, 188, 53, 110144, 5443, 217, 36746, 1601, 67413, 187694, 11438, 190355, 6096, 31, 4, 132, 8696, 1614, 98320, 28864, 26073, 11249, 1250, 4867, 2357, 910 ]
[ 0.1500244140625, 0.0428466796875, 0.0927734375, 0.1141357421875, 0.2578125, 0.033538818359375, 0.2119140625, 0.1392822265625, 0.22119140625, 0.0350341796875, 0.15234375, 0.080078125, 0.17431640625, 0.09466552734375, 0.13623046875, 0.093505859375, 0.2447509765625, 0.1278076171875, ...
embed
58241805_c0
58241805
prolog
0
Title: How to handle associative arrays in Prolog? Problem title: How to handle associative arrays in Prolog? Tags: prolog, associative-array, swi-prolog Problem: How to handle associative arrays in Prolog? I have a Prolog list [['A1', 'I'], ['A1', 'EU'], ['A2', 'EU']] that I would like to transform it into a dictionar...
How to handle associative arrays in Prolog? How to handle associative arrays in Prolog? prolog associative-array swi-prolog How Prolog How to handle associative arrays in Prolog? I have a Prolog list that I would like to transform it into a dictionary like this one How do I create the prolog dictionary (I am using swip...
[ 0.025390625, 0.01416015625, 0.0029754638671875, -0.0018157958984375, -0.004913330078125, -0.0162353515625, -0.007293701171875, 0.004852294921875, 0.00022029876708984375, -0.01226806640625, 0.0380859375, 0.0189208984375, -0.0126953125, -0.00848388671875, 0.01190185546875, -0.00601196289...
[ 11249, 34831, 166027, 272, 10298, 4778, 23, 1250, 4867, 47, 502, 19305, 53, 2452, 3454, 5303, 1884, 27198, 45, 10763, 28282, 6635, 2424, 17203, 22799, 142424, 15190, 26973, 69407 ]
[ 0.066650390625, 0.139404296875, 0.176025390625, 0.1072998046875, 0.1690673828125, 0.142822265625, 0.007843017578125, 0.156982421875, 0.260498046875, 0.0054931640625, 0.114501953125, 0.1209716796875, 0.0670166015625, 0.11279296875, 0.0938720703125, 0.083251953125, 0.001007080078125, ...
embed
72437879_c0
72437879
prolog
0
Title: Magic square prolog Problem title: Magic square prolog Tags: prolog Problem: Magic square prolog I have this code and I want to refactor a section to be more effecient. num(1). num(2). num(3). num(4). num(5). num(6). num(7). num(8). num(9). square(A,B,C,D,E,F,G,H,I):- nums(A,B,C,D,E,F,G,H,I), S1 is A + B + C, S2...
Magic square prolog Magic square prolog prolog Magic Magic square prolog I have this code and I want to refactor a section to be more effecient. The part that I want to reduce is this, I don't know how to use a function and I need to avoid doing something like this where I use a lot of code and instead make a function ...
[ 0.00119781494140625, 0.0201416015625, 0.0240478515625, 0.003143310546875, -0.00390625, 0.004180908203125, -0.037353515625, 0.023681640625, 0.01708984375, 0.00124359130859375, -0.01507568359375, 0.031494140625, -0.0004730224609375, -0.005096435546875, -0.0216064453125, -0.00689697265625...
[ 61707, 108047, 502, 4867, 765, 903, 18151, 3444, 47, 456, 144810, 40059, 186, 1286, 16670, 45964, 2831, 450, 34390, 2301, 18, 3714, 4527, 32354, 3871, 71864, 5915, 3249, 831, 86869, 442, 10846, 124519 ]
[ 0.2130126953125, 0.2169189453125, 0.1446533203125, 0.20556640625, 0.031951904296875, 0.0299835205078125, 0.1578369140625, 0.08837890625, 0.032958984375, 0.09613037109375, 0.220703125, 0.171875, 0.006072998046875, 0.0858154296875, 0.074462890625, 0.09112548828125, 0.07763671875, 0.0...
embed
4411232_c0
4411232
prolog
0
Title: who knows algorithm about stones and backpack? Problem title: who knows algorithm about stones and backpack? Tags: bin-packing, algorithm, np-hard, prolog Problem: who knows algorithm about stones and backpack? maybe somebody knows algorithm, or just what name it has, for putting stones (different weight) into d...
who knows algorithm about stones and backpack? who knows algorithm about stones and backpack? bin-packing algorithm np-hard prolog who knows algorithm about stones and backpack? maybe somebody knows algorithm, or just what name it has, for putting stones (different weight) into different size backpacks? I should do it ...
[ 0.00872802734375, 0.01080322265625, 0.004302978515625, 0.0205078125, 0.005218505859375, 0.01092529296875, 0.0152587890625, 0.01214599609375, 0.0026397705078125, -0.037353515625, 0.0185546875, 0.004058837890625, 0.000217437744140625, 0.0281982421875, 0.007476806640625, -0.00224304199218...
[ 2750, 93002, 234873, 1672, 3474, 1444, 136, 4420, 29102, 2394, 214, 25037, 25612, 502, 4867, 51139, 176256, 9351, 1556, 100, 118620, 238778, 57888, 3934, 12921, 13267, 5608, 54, 23, 1250, 8337, 111, 139049, 7663, 35166, 3642, 831, 3687, 756...
[ 0.0926513671875, 0.173828125, 0.271728515625, 0.1324462890625, 0.223388671875, 0.1829833984375, 0.1258544921875, 0.170166015625, 0.25244140625, 0.148193359375, 0.04730224609375, 0.111572265625, 0.134033203125, 0.119140625, 0.2476806640625, 0.0469970703125, 0.068115234375, 0.0137939...
embed
28450251_c0
28450251
prolog
0
Title: Prolog Connect to vb.net Problem title: Prolog Connect to vb.net Tags: vb.net, ffi, prolog, connection Problem: Prolog Connect to vb.net Hi everyone I am developing an expert system for our thesis. But the problem is that i don't know where to start. My professor suggested to make Prolog as my back end and use a...
Prolog Connect to vb.net Prolog Connect to vb.net vb.net ffi prolog connection Prolog Connect vb.net Prolog Connect to vb.net Hi everyone I am developing an expert system for our thesis. But the problem is that i don't know where to start. My professor suggested to make Prolog as my back end and use another language fo...
[ 0.037109375, 0.013427734375, 0.00860595703125, 0.00933837890625, -0.01361083984375, 0.016845703125, -0.0150146484375, 0.0084228515625, 0.007049560546875, -0.0703125, 0.017822265625, -0.007568359375, -0.007049560546875, 0.00469970703125, 0, -0.024169921875, 0.004364013671875, 0.0135...
[ 1250, 4867, 62448, 47, 86482, 5, 1179, 24500, 502, 94878, 30309, 168698, 26808, 5426, 100, 2446, 159688, 4966, 2967, 2301, 18, 3714, 7440, 4034, 16030, 42459, 297, 3249, 237, 759, 4420, 3564, 4527, 15700, 46876, 38937, 101758, 58136, 12912,...
[ 0.208984375, 0.28466796875, 0.21044921875, 0.169921875, 0.2587890625, 0.050201416015625, 0.20703125, 0.1815185546875, 0.1685791015625, 0.152587890625, 0.0726318359375, 0.0843505859375, 0.135986328125, 0.1334228515625, 0.03631591796875, 0.04669189453125, 0.150634765625, 0.0268096923...
embed
56422500_c0
56422500
prolog
0
Title: Prolog cut &quot;!&quot; operator in erlang Problem title: Prolog cut &quot;!&quot; operator in erlang Tags: prolog, erlang Problem: Prolog cut "!" operator in erlang I have enough solid prolog background and now I am going to develop a code in erlang. Those languages looks enough similar, except the cut "!" ope...
Prolog cut &quot;!&quot; operator in erlang Prolog cut &quot;!&quot; operator in erlang prolog erlang Prolog Prolog cut "!" operator in erlang I have enough solid prolog background and now I am going to develop a code in erlang. Those languages looks enough similar, except the cut "!" operator, which is very useful in ...
[ 0.04638671875, 0.0079345703125, 0.02880859375, -0.002716064453125, 0.004791259765625, 0.00162506103515625, -0.0037841796875, 0.005126953125, 0.00103759765625, -0.018310546875, -0.000949859619140625, -0.00396728515625, 0.00714111328125, -0.0120849609375, 0.0220947265625, 0.0054626464843...
[ 1250, 4867, 59226, 619, 41502, 38, 1230, 39933, 23, 72, 3066, 74, 502, 44, 3890, 765, 20174, 18652, 76615, 5036, 7730, 85493, 18151, 46876, 33342, 21373, 40494, 4552, 80234, 87, 149016, 2174, 2685, 83, 6044, 1543, 132283, 110, 3871 ]
[ 0.1519775390625, 0.257080078125, 0.240478515625, 0.024383544921875, 0.1044921875, 0.1754150390625, 0.05438232421875, 0.25, 0.07147216796875, 0.1507568359375, 0.265625, 0.004241943359375, 0.1240234375, 0.02935791015625, 0.201416015625, 0.012786865234375, 0.067138671875, 0.0830688476...
embed
18877026_c0
18877026
prolog
0
Title: Close file with alias in a program Problem title: Close file with alias in a program Tags: prolog Problem: Close file with alias in a program I have this code in my program: open('myfile.txt',append, Stream,[alias(final)]), some instructions close(final). If i have an error before of the close(final) , when i re...
Close file with alias in a program Close file with alias in a program prolog Close myfile.txt Stream PERMISSION ERROR CANNOT OPEN Close file with alias in a program I have this code in my program: If i have an error before of the close(final) , when i reconsult my code i have this error: How can i do to resolve this pr...
[ 0.0101318359375, 0.01904296875, 0.01483154296875, 0.0020599365234375, -0.0047607421875, 0.000301361083984375, -0.0087890625, 0.0240478515625, -0.0123291015625, 0.0067138671875, 0.01043701171875, 0.0189208984375, 0.000621795654296875, 0.0014801025390625, 0.0284423828125, -0.013610839843...
[ 153335, 11435, 678, 55109, 23, 1528, 502, 4867, 759, 29822, 124326, 115061, 8168, 230498, 151206, 24638, 313, 188324, 618, 180, 65441, 765, 903, 18151, 18499, 8108, 111, 20903, 33870, 16, 456, 147834, 103608, 2967 ]
[ 0.2193603515625, 0.1898193359375, 0.1690673828125, 0.255615234375, 0.059326171875, 0.1842041015625, 0.151611328125, 0.2047119140625, 0.14404296875, 0.24072265625, 0.20751953125, 0.1925048828125, 0.1282958984375, 0.09124755859375, 0.11126708984375, 0.0137481689453125, 0.0517578125, ...
embed
10632099_c0
10632099
prolog
0
Title: prolog issue output every 2 elements Problem title: prolog issue output every 2 elements Tags: prolog Problem: prolog issue output every 2 elements Write a Prolog predicate everynth(N, X) , that outputs every N th element of the list X . ?- everynth(1, [1, 2, 3, 4, 5, 6]). 1 2 3 4 5 6 true. ?- everynth(2, [1, 2,...
prolog issue output every 2 elements prolog issue output every 2 elements prolog prolog issue output every 2 elements Write a Prolog predicate everynth(N, X) , that outputs every N th element of the list X . Here is what I tried, though I don't know to use recursion properly:
[ -0.00775146484375, -0.010009765625, 0.01263427734375, 0.00098419189453125, -0.0025177001953125, 0.05517578125, 0.0167236328125, 0.0002994537353515625, 0.01422119140625, -0.01397705078125, 0.030029296875, -0.03564453125, -0.004180908203125, -0.0167236328125, 0.0048828125, 0.015258789062...
[ 502, 4867, 31089, 140992, 11907, 116, 80854, 601, 18781, 1250, 1653, 2063, 67, 19, 927, 839, 1193, 541, 5675, 12830, 5303, 37842, 3714, 4527, 195625, 1830 ]
[ 0.1402587890625, 0.25244140625, 0.171142578125, 0.201904296875, 0.1826171875, 0.1717529296875, 0.2318115234375, 0.00121307373046875, 0.037109375, 0.162353515625, 0.13720703125, 0.1873779296875, 0.05517578125, 0.06231689453125, 0.2003173828125, 0.1024169921875, 0.1214599609375, 0.14...
embed
52778561_c0
52778561
prolog
0
Title: Prolog program firstlast without recursion? Problem title: Prolog program firstlast without recursion? Tags: prolog, append Problem: Prolog program firstlast without recursion? How would I write a prolog program like the one below that succeeds if the list has the same first and last element but without recursio...
Prolog program firstlast without recursion? Prolog program firstlast without recursion? prolog append Prolog Yes Prolog program firstlast without recursion? How would I write a prolog program like the one below that succeeds if the list has the same first and last element but without recursion using the append predicat...
[ 0.00090789794921875, 0.00921630859375, 0.017578125, 0.0037841796875, 0.005615234375, 0.0026702880859375, 0.0172119140625, 0.0255126953125, 0.0194091796875, -0.044189453125, 0.011962890625, 0.007659912109375, -0.0250244140625, 0.0106201171875, 0.0252685546875, -0.006500244140625, 0.01...
[ 1250, 4867, 1528, 5117, 19777, 15490, 195625, 1830, 502, 114689, 71, 32635, 33022, 35064, 214493, 5303, 1556, 5701, 136, 4568, 12830, 1653, 2063, 67, 4734, 33209, 41 ]
[ 0.17626953125, 0.249755859375, 0.1961669921875, 0.12359619140625, 0.2371826171875, 0.134521484375, 0.19091796875, 0.11468505859375, 0.1396484375, 0.1727294921875, 0.12841796875, 0.0186767578125, 0.09844970703125, 0.004848480224609375, 0.1318359375, 0.139404296875, 0.02374267578125, ...
embed
38241088_c1
38241088
prolog
1
, 7)), slope(0.16514867741462683, pt(3, 8)), slope(0.0, pt(2, 9)), slope(0.7853981633974483, pt(1, 1))] ; L = [_G2260, _G2266, slope(0.3805063771123649, pt(4, 7)), slope(0.16514867741462683, pt(3, 8)), slope(0.0, pt(2, 9)), slope(0.7853981633974483, pt(1, 1))] ; L = [_G2260, _G2266, _G2272, slope(0.3805063771123649, pt...
, 7)), slope(0.16514867741462683, pt(3, 8)), slope(0.0, pt(2, 9)), slope(0.7853981633974483, pt(1, 1))] ; L = [_G2260, _G2266, slope(0.3805063771123649, pt(4, 7)), slope(0.16514867741462683, pt(3, 8)), slope(0.0, pt(2, 9)), slope(0.7853981633974483, pt(1, 1))] ; L = [_G2260, _G2266, _G2272, slope(0.3805063771123649, pt...
[ 0.0169677734375, 0.0125732421875, -0.0166015625, -0.0103759765625, -0.000888824462890625, 0.01434326171875, -0.0042724609375, 0.0027008056640625, 0.004608154296875, 0.01544189453125, 0.01513671875, 0.005279541015625, -0.01171875, -0.003173828125, 0.02392578125, 0.0181884765625, 0.011...
[ 6, 4, 49413, 247, 91, 89059, 132, 102014, 196819, 159645, 170665, 2592, 10837, 184929, 27037, 86827, 65034, 99929, 77816, 134926, 12951, 151616, 2485, 131518, 16360, 161382, 4879, 2819, 339, 2203, 724, 4015, 4598, 14604, 170179, 186035, 9016, ...
[ 0.1082763671875, 0.0548095703125, 0.142822265625, 0.091796875, 0.07373046875, 0.2325439453125, 0.020965576171875, 0.08734130859375, 0.1090087890625, 0.111572265625, 0.1240234375, 0.0232696533203125, 0.044464111328125, 0.1434326171875, 0.1898193359375, 0.0810546875, 0.10516357421875, ...
embed
38379279_c0
38379279
prolog
0
Title: Return value in Prolog Problem title: Return value in Prolog Tags: prolog Problem: Return value in Prolog I find that some 'functions' in Prolog return some value, like min/2 and max/2, etc, even though vast majority return only true or false. Are these called or grouped differently than boolean ones? Also how c...
Return value in Prolog Return value in Prolog prolog Prolog Return value in Prolog I find that some 'functions' in Prolog return some value, like min/2 and max/2, etc, even though vast majority return only true or false. Are these called or grouped differently than boolean ones? Also how can one identify if they are re...
[ 0.029296875, 0.004150390625, 0.01116943359375, 0.006805419921875, -0.006683349609375, 0.0260009765625, 0.00787353515625, -0.0179443359375, 0.0068359375, 0.0123291015625, 0.004669189453125, 0.010986328125, -0.023193359375, -0.0167236328125, 0.0250244140625, 0.00921630859375, -0.001281...
[ 173340, 34292, 23, 1250, 4867, 502, 7413, 137175, 7, 30646, 3060, 881, 12477, 18389, 18410, 144732, 29568, 98320, 35839, 37769, 12921, 337, 31, 34677, 831, 135812, 214, 10, 209806, 32354, 5303 ]
[ 0.25390625, 0.22216796875, 0.045654296875, 0.166015625, 0.26611328125, 0.0911865234375, 0.004150390625, 0.1993408203125, 0.0643310546875, 0.2078857421875, 0.041015625, 0.1671142578125, 0.19091796875, 0.126953125, 0.06036376953125, 0.1077880859375, 0.1328125, 0.143798828125, 0.061...
embed
20218110_c0
20218110
prolog
0
Title: Prolog: Why can&#x27;t I use read(-Term) in a new thread? Problem title: Prolog: Why can&#x27;t I use read(-Term) in a new thread? Tags: multithreading, prolog Problem: Prolog: Why can't I use read(-Term) in a new thread? This is my code: t1 :- read(X), write(X), nl, thread_exit(_). t2 :- write(t2), nl. start :-...
Prolog: Why can&#x27;t I use read(-Term) in a new thread? Prolog: Why can&#x27;t I use read(-Term) in a new thread? multithreading prolog Prolog Why Term thread_exit thread_create Id1 thread_join Prolog: Why can't I use read(-Term) in a new thread? This is my code: There is an error in "read(X)".
[ 0.01513671875, 0.004669189453125, -0.003082275390625, 0.01104736328125, 0.0020904541015625, 0.0068359375, 0.005279541015625, -0.0022430419921875, -0.007080078125, -0.0908203125, 0.029052734375, 0.0113525390625, -0.02197265625, -0.02294921875, 0.0177001953125, -0.017333984375, 0.01434...
[ 1250, 4867, 44084, 831, 3768, 18, 4527, 12301, 132, 9, 35484, 39, 23, 3525, 86997, 3869, 65847, 502, 2994, 23399, 7612, 24799, 418, 513, 18151, 18499, 39116, 1542 ]
[ 0.12060546875, 0.1998291015625, 0.07891845703125, 0.0718994140625, 0.044708251953125, 0.050567626953125, 0.0977783203125, 0.2222900390625, 0.06005859375, 0.0440673828125, 0.2149658203125, 0.1280517578125, 0.044464111328125, 0.092041015625, 0.1856689453125, 0.022064208984375, 0.075683...
embed
14758219_c0
14758219
prolog
0
Title: Traverse a list in Prolog Problem title: Traverse a list in Prolog Tags: prolog Problem: Traverse a list in Prolog I have a problem like this: find all elements in a list such that all element(s) immediately besides it is/are odd numbers. For example ?- find([20,1,2,3,4,5,6,7,8,10], L). L = [20, 2, 4, 6] Normall...
Traverse a list in Prolog Traverse a list in Prolog prolog Traverse Prolog Traverse a list in Prolog I have a problem like this: find all elements in a list such that all element(s) immediately besides it is/are odd numbers. For example Normally in other languages I would traverse the list and check the condition, but ...
[ 0.0012054443359375, 0.0228271484375, -0.003997802734375, 0.004302978515625, 0.002288818359375, 0.0205078125, -0.0213623046875, 0.0024566650390625, 0.0128173828125, -0.037353515625, 0.0172119140625, 0.0238037109375, -0.011474609375, 0.0021514892578125, -0.00087738037109375, 0.0264892578...
[ 4937, 37676, 5303, 1250, 4867, 23, 502, 2967, 7413, 756, 80854, 6044, 12830, 109312, 30338, 988, 83, 1046, 70270, 101935, 46876, 37317, 12765, 35431, 3714, 201950, 106117, 51515 ]
[ 0.13916015625, 0.184814453125, 0.2083740234375, 0.1744384765625, 0.249267578125, 0.0635986328125, 0.11669921875, 0.083740234375, 0.1285400390625, 0.1107177734375, 0.1531982421875, 0.014007568359375, 0.1531982421875, 0.1287841796875, 0.06585693359375, 0.03912353515625, 0.0494079589843...
embed
47559218_c0
47559218
prolog
0
Title: GCD and LCM in prolog Problem title: GCD and LCM in prolog Tags: greatest-common-divisor, prolog, successor-arithmetics Problem: GCD and LCM in prolog Some code could help %addition sum(X,nil,X). sum(X,s(Y),s(Z)) :- sum(X,Y,Z). %Product mult(X,nil,nil). mult(X,s(Y),W) :- mult(X,Y,Z),sum(X,Z,W). I am trying to so...
GCD and LCM in prolog GCD and LCM in prolog greatest-common-divisor prolog successor-arithmetics GCD LCM Product GCD and LCM in prolog Some code could help I am trying to solve a simple problem in prolog "GCD and LCM peano number " I don't know how to start ? How to compare piano's number in prolog Thank you so much fo...
[ -0.0079345703125, 0.018310546875, 0.01287841796875, 0.01611328125, 0.00982666015625, 0.00142669677734375, -0.000018835067749023438, -0.007354736328125, 0.01495361328125, -0.023681640625, 0.010498046875, -0.005950927734375, -0.0238037109375, -0.0128173828125, -0.0026092529296875, 0.0105...
[ 527, 16069, 136, 339, 36498, 23, 502, 4867, 158036, 3796, 428, 51858, 39457, 8962, 73111, 18151, 4358, 86869, 8781, 2967, 724, 280, 3922, 14012, 3714, 4034, 69101, 16569 ]
[ 0.095703125, 0.24658203125, 0.09307861328125, 0.0804443359375, 0.253173828125, 0.05712890625, 0.150390625, 0.218017578125, 0.075439453125, 0.0626220703125, 0.067138671875, 0.162841796875, 0.144287109375, 0.036468505859375, 0.1085205078125, 0.1097412109375, 0.0190582275390625, 0.051...
embed
8492822_c0
8492822
prolog
0
Title: prolog compare SOS Problem title: prolog compare SOS Tags: prolog Problem: prolog compare SOS let say i had this two facts. animal(fifi,10). animal(fofo,20). If i call animal(X,Y). then Prolog will return me X = fifi, Y = 10 ; X = fofo, Y = 20. What I need to do, to let to Prolog only return me the animal X with...
prolog compare SOS prolog compare SOS prolog SOS prolog compare SOS let say i had this two facts. If i call then Prolog will return me What I need to do, to let to Prolog only return me the animal X with the highest value of Y according to the fact? Is there any possible way that it will just display X only for the hig...
[ 0.01953125, -0.003387451171875, -0.005767822265625, -0.002685546875, -0.00537109375, -0.000186920166015625, 0.0152587890625, 0.0025634765625, -0.00579833984375, 0.00157928466796875, 0.00616455078125, 0.01007080078125, -0.0120849609375, -0.0289306640625, 0.0322265625, -0.02978515625, ...
[ 502, 4867, 69101, 74165, 17, 1902, 903, 6626, 15824, 11782, 1250, 1221, 30646, 163, 3871, 54, 2633, 47, 4734, 26249, 1193, 167375, 34292, 990, 59499, 7722, 442, 44116, 100, 136, 25842 ]
[ 0.1368408203125, 0.288818359375, 0.1947021484375, 0.2119140625, 0.002471923828125, 0.07159423828125, 0.061248779296875, 0.09954833984375, 0.1553955078125, 0.1796875, 0.1829833984375, 0.0173492431640625, 0.2021484375, 0.05279541015625, 0.02789306640625, 0.00225830078125, 0.08349609375...
embed
47874548_c1
47874548
prolog
1
Acc,Result). accfindones([2|_],Acc,Acc). find_ones(List,Result):-accfindones(List,[],Result). For example: ?- t([0,1,1,2,1,0,0],[]). True. As required, but, ?- s([0,1,1,2,1,0,0],[]). Loops infinitely... I'm pretty sure the problem is in the second line but I don't know how to rectify it. I think the problem is 't' isn'...
Acc,Result). accfindones([2|_],Acc,Acc). find_ones(List,Result):-accfindones(List,[],Result). For example: ?- t([0,1,1,2,1,0,0],[]). True. As required, but, ?- s([0,1,1,2,1,0,0],[]). Loops infinitely... I'm pretty sure the problem is in the second line but I don't know how to rectify it. I think the problem is 't' isn'...
[ -0.00201416015625, 0.0302734375, 0.00958251953125, 0.01104736328125, -0.00390625, 0.0022430419921875, 0.005279541015625, 0.01263427734375, 0.0164794921875, -0.017333984375, 0.01556396484375, 0.00421142578125, 0.003997802734375, 0.0269775390625, 0.0024261474609375, 0.01123046875, 0.00...
[ 29899, 4332, 7, 7136, 194, 50015, 111607, 25749, 304, 58745, 454, 10060, 7413, 154663, 27781, 705, 9, 808, 132, 2389, 418, 4, 133063, 63527, 87599, 1301, 56065, 1284, 91, 1065, 199694, 54241, 21286, 27, 28875, 2967, 70, 17932, 13315, 2195...
[ 0.1409912109375, 0.0765380859375, 0.10205078125, 0.175537109375, 0.004730224609375, 0.11376953125, 0.138427734375, 0.1968994140625, 0.06427001953125, 0.048828125, 0.0276031494140625, 0.1077880859375, 0.1531982421875, 0.156982421875, 0.0168304443359375, 0.144287109375, 0.1142578125, ...
embed
70743740_c0
70743740
prolog
0
Title: Create rules from text Prolog Problem title: Create rules from text Prolog Tags: prolog Problem: Create rules from text Prolog I have this written sentence: John is a footballer. Mary is an actress. All of Mary's friends are footballers and are blond ( their hair ). All of John's friends are footballers or actor...
Create rules from text Prolog Create rules from text Prolog prolog text Create Prolog Mary Create rules from text Prolog I have this written sentence: How could i create Prolog rules for last two sentences? This is what i have for now:
[ 0.0181884765625, 0.005340576171875, -0.00347900390625, 0.03515625, 0.0027008056640625, 0.01397705078125, 0.0054931640625, 0.01068115234375, 0.00099945068359375, -0.049560546875, -0.01373291015625, -0.0096435546875, 0.00007200241088867188, -0.00897216796875, 0.02783203125, 0.00897216796...
[ 151313, 91736, 1295, 7986, 1250, 4867, 502, 23213, 765, 903, 59121, 149357, 11249, 5809, 28282, 100, 4568, 6626, 5036 ]
[ 0.1365966796875, 0.207763671875, 0.10784912109375, 0.16796875, 0.15234375, 0.222900390625, 0.08001708984375, 0.1884765625, 0.01221466064453125, 0.004009246826171875, 0.046875, 0.1541748046875, 0.038787841796875, 0.050079345703125, 0.1488037109375, 0.04254150390625, 0.1466064453125, ...
embed
36953408_c0
36953408
prolog
0
Title: Sum of powers in Prolog Problem title: Sum of powers in Prolog Tags: recursion, prolog Problem: Sum of powers in Prolog I'm trying to implement a method to work as follows foo(5) = 5^4 + 4^3 + 3^2 + 2^1 + 1^0 = 701 using recursion. I've been trying to follow the logic but I keep getting errors. can someone guide...
Sum of powers in Prolog Sum of powers in Prolog recursion prolog Sum Prolog Sum of powers in Prolog I'm trying to implement a method to work as follows foo(5) = 5^4 + 4^3 + 3^2 + 2^1 + 1^0 = 701 using recursion. I've been trying to follow the logic but I keep getting errors. can someone guide me?
[ 0.004241943359375, 0.01519775390625, 0.00872802734375, 0.00494384765625, -0.003082275390625, -0.007049560546875, -0.017822265625, 0.01519775390625, 0.01177978515625, -0.0279541015625, 0.01251220703125, -0.01190185546875, -0.027587890625, 0.015869140625, 0.020751953125, 0.0155029296875,...
[ 36335, 111, 14537, 7, 23, 1250, 4867, 195625, 1830, 502, 31577, 29479, 55300, 4488, 28960, 5775, 31, 124534, 2203, 190, 8353, 617, 997, 201, 363, 138, 116, 106, 2389, 141869, 17368, 62775, 13695, 18499, 17997 ]
[ 0.21826171875, 0.112548828125, 0.2255859375, 0.1256103515625, 0.06500244140625, 0.1759033203125, 0.26220703125, 0.208251953125, 0.1234130859375, 0.1102294921875, 0.0673828125, 0.12255859375, 0.1470947265625, 0.09521484375, 0.055023193359375, 0.147705078125, 0.193359375, 0.184692382...
embed
26235140_c0
26235140
prolog
0
Title: Prolog graph acyclic Problem title: Prolog graph acyclic Tags: directed-acyclic-graphs, prolog, transitive-closure Problem: Prolog graph acyclic I am trying to write a predicate that writes out all the ways from one node to another in a acyclic graph. If I example have these nodes/edges. node(x,y). node(x,z). no...
Prolog graph acyclic Prolog graph acyclic directed-acyclic-graphs prolog transitive-closure Prolog Prolog graph acyclic I am trying to write a predicate that writes out all the ways from one node to another in a acyclic graph. If I example have these nodes/edges. And then I have tried something like: but somehow I need...
[ 0.00032806396484375, 0.007415771484375, -0.00689697265625, 0.0113525390625, -0.00946044921875, 0.01483154296875, -0.009765625, 0.01483154296875, -0.011474609375, -0.0390625, 0.00494384765625, -0.02197265625, -0.00482177734375, 0.006561279296875, 0.0281982421875, 0.005950927734375, 0....
[ 1250, 4867, 41382, 10, 187830, 238, 8951, 11, 502, 62621, 5844, 170224, 31577, 33022, 1653, 2063, 67, 1810, 756, 48322, 1295, 1632, 110, 112, 47, 15700, 27781, 6097, 988, 297, 4188, 37842, 1884, 209303, 3871, 54, 195625, 4358, 25647 ]
[ 0.1453857421875, 0.2342529296875, 0.209716796875, 0.1083984375, 0.1815185546875, 0.05523681640625, 0.07373046875, 0.04986572265625, 0.10443115234375, 0.093505859375, 0.1129150390625, 0.143310546875, 0.06121826171875, 0.09716796875, 0.12890625, 0.178955078125, 0.082275390625, 0.0607...
embed
52569017_c0
52569017
prolog
0
Title: How is suffix/prefix working internally in prolog? Problem title: How is suffix/prefix working internally in prolog? Tags: prolog Problem: How is suffix/prefix working internally in prolog? Can anyone explain how prolog finds a suffix(L1,L2) or prefix(L1,L2) internally? I know the rule is suffix(L1,L2):- append(...
How is suffix/prefix working internally in prolog? How is suffix/prefix working internally in prolog? prolog How How is suffix/prefix working internally in prolog? Can anyone explain how prolog finds a suffix(L1,L2) or prefix(L1,L2) internally? I know the rule is suffix(L1,L2):- append(_,L2,L1). But, I can't seem to un...
[ 0.01806640625, 0.01055908203125, 0.0022430419921875, 0.006378173828125, -0.02001953125, -0.004913330078125, 0.00494384765625, -0.0008697509765625, 0.007476806640625, -0.0003757476806640625, 0.007659912109375, -0.023681640625, -0.0206298828125, 0.003997802734375, 0.00970458984375, 0.001...
[ 11249, 83, 133784, 425, 64, 4692, 55923, 20697, 70796, 538, 23, 502, 4867, 73342, 3642, 7413, 7, 866, 418, 10461, 183114, 79986, 9, 114689, 71, 454, 304, 17727, 28219, 77336, 101, 339, 136, 7730, 46132, 41, 1294, 1810 ]
[ 0.1114501953125, 0.035491943359375, 0.23046875, 0.1678466796875, 0.0888671875, 0.1419677734375, 0.2462158203125, 0.1524658203125, 0.200927734375, 0.103271484375, 0.059356689453125, 0.164306640625, 0.2470703125, 0.04571533203125, 0.05291748046875, 0.138671875, 0.0222015380859375, 0....
embed
53135546_c0
53135546
prolog
0
Title: Undefined procedure: (=)/4 Problem title: Undefined procedure: (=)/4 Tags: prolog, dcg Problem: Undefined procedure: (=)/4 I want to compare two terms in SWI-Prolog: np(np(DetBaum,NBaum),Morph1)->det(DetBaum,Morph1),n(NBaum,Morph2),Morph1=Morph2. I get the following error message: ERROR: Undefined procedure: (=)...
Undefined procedure: (=)/4 Undefined procedure: (=)/4 prolog dcg Undefined DetBaum NBaum Morph1 Morph2 ERROR However Undefined procedure: (=)/4 I want to compare two terms in SWI-Prolog: I get the following error message: I thought Morph1 and Morph2 are two terms, not four. Am I wrong?
[ 0.0016632080078125, 0.0264892578125, 0.009033203125, 0.0064697265625, -0.004730224609375, -0.00958251953125, 0.00165557861328125, 0.0233154296875, 0.002716064453125, -0.0272216796875, 0.0103759765625, 0.00286865234375, -0.00885009765625, 0.00506591796875, 0.01153564453125, -0.010559082...
[ 79912, 5983, 297, 50491, 78690, 17357, 502, 4867, 104, 238, 177, 579, 8023, 316, 11, 5919, 11727, 418, 304, 151206, 24638, 33306, 3444, 69101, 6626, 69407, 159, 38969, 10752, 25632, 18499, 26008, 17569, 136, 621, 959, 22759, 2022, 44691 ]
[ 0.134765625, 0.2110595703125, 0.0863037109375, 0.2030029296875, 0.114013671875, 0.2462158203125, 0.146484375, 0.216064453125, 0.0155181884765625, 0.0265655517578125, 0.056121826171875, 0.1689453125, 0.1558837890625, 0.0955810546875, 0.017547607421875, 0.1417236328125, 0.2303466796875...
embed
70555588_c1
70555588
prolog
1
_5062) ? creep Exit: (9) (p, q)=(p, q) ? creep Call: (9) (p, q)=(_5066, _5068) ? creep Exit: (9) (p, q)=(p, q) ? creep Call: (9) p=p ? creep Exit: (9) p=p ? creep Call: (9) q=q ? creep Exit: (9) q=q ? creep T Exit: (8) m_Function([(p, q), (p, r)]) Exit: (8) m_Function([(p, q), (p, r)]) ? creep Is their in prolog some ...
_5062) ? creep Exit: (9) (p, q)=(p, q) ? creep Call: (9) (p, q)=(_5066, _5068) ? creep Exit: (9) (p, q)=(p, q) ? creep Call: (9) p=p ? creep Exit: (9) p=p ? creep Call: (9) q=q ? creep Exit: (9) q=q ? creep T Exit: (8) m_Function([(p, q), (p, r)]) Exit: (8) m_Function([(p, q), (p, r)]) ? creep Is their in prolog some ...
[ 0.01031494140625, -0.00054168701171875, 0.006561279296875, 0.01263427734375, -0.01092529296875, 0.0067138671875, 0.01458740234375, -0.01556396484375, 0.00982666015625, -0.0213623046875, 0.033203125, 0.0263671875, -0.0052490234375, 0.006805419921875, -0.00238037109375, -0.00823974609375...
[ 2525, 10837, 49512, 254, 5443, 217, 11438, 8096, 26265, 14604, 90419, 864, 384, 10021, 347, 97249, 1690, 2363, 502, 4867, 27650, 3917, 2472, 756, 44764, 85789, 4527, 86869, 903, 8562, 2967, 28864, 26073, 1250, 38679, 10763, 5303, 39, 27417,...
[ 0.1488037109375, 0.2471923828125, 0.2032470703125, 0.162109375, 0.11962890625, 0.14794921875, 0.1571044921875, 0.1168212890625, 0.18603515625, 0.2362060546875, 0.175048828125, 0.056365966796875, 0.075927734375, 0.06494140625, 0.07647705078125, 0.141845703125, 0.0201416015625, 0.053...
embed
42703045_c0
42703045
prolog
0
Title: how do I approach Prolog Problem title: how do I approach Prolog Tags: prolog, logic-programming, clpfd Problem: how do I approach Prolog I have taken up Prolog course in my university. The coursework requires us to write prolog programs. I am able to write simple programs, however I am finding it little hard to...
how do I approach Prolog how do I approach Prolog prolog logic-programming clpfd Prolog how do I approach Prolog I have taken up Prolog course in my university. The coursework requires us to write prolog programs. I am able to write simple programs, however I am finding it little hard to digest the complex programs. An...
[ 0.0234375, 0.01470947265625, 0.005340576171875, 0.0184326171875, -0.00506591796875, 0.02392578125, 0.004791259765625, -0.01141357421875, 0.007080078125, -0.047607421875, 0.01080322265625, -0.0257568359375, -0.028564453125, 0.0072021484375, 0.0028533935546875, -0.0022735595703125, -0....
[ 3642, 54, 87, 51515, 1250, 4867, 502, 62775, 28966, 214, 33139, 39557, 71, 1257, 15411, 23, 759, 152363, 18244, 144570, 1821, 33022, 103391, 19048, 8781, 49903, 90791, 10176, 7941, 1466, 525, 27140, 157666, 172337, 35187, 28368, 36461, 133, ...
[ 0.0869140625, 0.07635498046875, 0.10748291015625, 0.239013671875, 0.20654296875, 0.298828125, 0.1397705078125, 0.1156005859375, 0.1185302734375, 0.006744384765625, 0.0282745361328125, 0.06378173828125, 0.08148193359375, 0.00823974609375, 0.08135986328125, 0.0196990966796875, 0.022140...
embed
10141600_c0
10141600
prolog
0
Title: How to negate in Prolog Problem title: How to negate in Prolog Tags: prolog Problem: How to negate in Prolog I'm new to PROLOG and am at the very beginning of the exercises on this page . Given the rules parent(X, Y) and male(X), I'm trying to define a rule mother(X, Y) as mother(X, Y) :- not(male(X)), parent(X,...
How to negate in Prolog How to negate in Prolog prolog How Prolog existence_error How to negate in Prolog I'm new to PROLOG and am at the very beginning of the exercises on this page . Given the rules parent(X, Y) and male(X), I'm trying to define a rule mother(X, Y) as However, in GNU Prolog I get the following error:
[ 0.00689697265625, 0.0147705078125, 0.0228271484375, 0.0167236328125, -0.01141357421875, 0.0302734375, 0.0125732421875, -0.00130462646484375, -0.0115966796875, -0.05078125, -0.00390625, -0.0205078125, 0.00482177734375, -0.0145263671875, 0.026611328125, -0.00003910064697265625, 0.01226...
[ 11249, 90584, 13, 23, 1250, 4867, 47, 502, 116311, 188800, 3525, 10514, 47510, 91736, 49129, 1542, 990, 11280, 61924, 79986, 42732, 165132, 25632, 18499 ]
[ 0.045013427734375, 0.2359619140625, 0.1778564453125, 0.05084228515625, 0.190185546875, 0.25830078125, 0.009246826171875, 0.1043701171875, 0.189697265625, 0.1915283203125, 0.003021240234375, 0.114013671875, 0.18310546875, 0.1099853515625, 0.147705078125, 0.04034423828125, 0.0880737304...
embed
6904920_c0
6904920
prolog
0
Title: How to stop prolog goal executing more than once? Problem title: How to stop prolog goal executing more than once? Tags: prolog Problem: How to stop prolog goal executing more than once? I have a fact and a goal like below: disconnected. join :- disconnected, time(T), send(T). Once this goal executes it should m...
How to stop prolog goal executing more than once? How to stop prolog goal executing more than once? prolog How How to stop prolog goal executing more than once? I have a fact and a goal like below: Once this goal executes it should make disconnected false and thus not execute again. I am new to Prolog so I am a bit stu...
[ 0.006439208984375, 0.00469970703125, 0.017333984375, -0.0067138671875, -0.0157470703125, -0.00445556640625, -0.006011962890625, 0.01141357421875, 0.0012359619140625, -0.06494140625, -0.0021820068359375, 0.0023040771484375, -0.014404296875, -0.0089111328125, -0.00191497802734375, 0.0385...
[ 11249, 47, 7279, 502, 4867, 69236, 71924, 214, 1286, 3501, 24145, 15824, 35064, 76556, 903, 90, 5608, 3249, 2837, 135457, 98320, 959, 13, 13438, 3525, 1250, 179933, 8781, 26366, 3095, 25647 ]
[ 0.0926513671875, 0.072021484375, 0.24169921875, 0.1907958984375, 0.26416015625, 0.26416015625, 0.1944580078125, 0.1229248046875, 0.1864013671875, 0.177734375, 0.235107421875, 0.0662841796875, 0.0196380615234375, 0.1036376953125, 0.0162200927734375, 0.043731689453125, 0.02784729003906...
embed
65548602_c0
65548602
prolog
0
Title: Prolog: random permutation Problem title: Prolog: random permutation Tags: swi-prolog, random, prolog, permutation Problem: Prolog: random permutation I'm trying to get random permutation with prolog. But the problem is ?- permutation([1,2,3,4],L). gives always L = [1, 2, 3, 4] as first answer. I could fix this ...
Prolog: random permutation Prolog: random permutation swi-prolog random prolog permutation Prolog Prolog: random permutation I'm trying to get random permutation with prolog. But the problem is gives always L = [1, 2, 3, 4] as first answer. I could fix this by using the query But this gives me always L2 = [1, 2, 4, 3] ...
[ 0.0135498046875, 0.0267333984375, 0.0242919921875, -0.0263671875, -0.0184326171875, 0.006805419921875, -0.0235595703125, -0.0107421875, -0.01312255859375, -0.060791015625, 0.0123291015625, 0.01336669921875, -0.004486083984375, 0.01239013671875, 0.00118255615234375, 0.02197265625, -0....
[ 1250, 4867, 12, 96759, 117, 561, 22062, 91, 2452, 3454, 502, 31577, 2046, 678, 4966, 2967, 76199, 11343, 339, 2203, 68252, 4, 116, 138, 201, 237, 5117, 35166, 5809, 30022, 70, 41, 1294, 163, 304, 5, 831, 10, 23, 159, 38969 ]
[ 0.1807861328125, 0.277099609375, 0.0177154541015625, 0.21630859375, 0.114990234375, 0.1890869140625, 0.1259765625, 0.0416259765625, 0.1865234375, 0.14013671875, 0.162109375, 0.03759765625, 0.0889892578125, 0.055511474609375, 0.0225372314453125, 0.1021728515625, 0.0758056640625, 0.1...
embed
57446578_c0
57446578
prolog
0
Title: Searching an association list by key Problem title: Searching an association list by key Tags: prolog, associations, list Problem: Searching an association list by key I have implemented an association list in swi-prolog and I want to check if a specific key is in the list. The structure of the code that I'm try...
Searching an association list by key Searching an association list by key prolog associations list Searching get_assoc Key List Value Searching an association list by key I have implemented an association list in swi-prolog and I want to check if a specific key is in the list. The structure of the code that I'm trying ...
[ 0.004638671875, 0.000629425048828125, 0.007049560546875, -0.005157470703125, 0.00299072265625, -0.000881195068359375, 0.0301513671875, 0.017578125, 0.01220703125, -0.0145263671875, 0.01507568359375, 0.004913330078125, -0.02001953125, -0.016845703125, 0.00244140625, 0.0035247802734375, ...
[ 33086, 214, 125413, 5303, 390, 22799, 502, 4867, 151747, 2046, 73395, 238, 26824, 32036, 190060, 142, 29479, 91, 2452, 3454, 3444, 47, 12765, 2174, 29458, 83, 23, 45646, 18151, 31577, 25632, 33306, 22027, 18, 4488 ]
[ 0.1806640625, 0.031097412109375, 0.218994140625, 0.1832275390625, 0.0555419921875, 0.2008056640625, 0.10546875, 0.1983642578125, 0.2020263671875, 0.066650390625, 0.1107177734375, 0.101318359375, 0.1387939453125, 0.1466064453125, 0.15673828125, 0.009002685546875, 0.0667724609375, 0....
embed
40608168_c1
40608168
prolog
1
),[1]). gives true If the second variable is uninstantiated, it will find all viable valuations (I have checked that this works) or say no if there are none. Ie: solve(p(1),V). gives V=[1]; yes and solve(and(p(1),neg(p(1)),V). gives no How can I use either sat/1 or solve/2 to define either taut/1 or unsat/1? Example of...
),[1]). gives true If the second variable is uninstantiated, it will find all viable valuations (I have checked that this works) or say no if there are none. Ie: solve(p(1),V). gives V=[1]; yes and solve(and(p(1),neg(p(1)),V). gives no How can I use either sat/1 or solve/2 to define either taut/1 or unsat/1? Example of...
[ 0.006103515625, 0.0081787109375, 0.0020904541015625, -0.0024871826171875, -0.01708984375, 0.00445556640625, 0.004791259765625, -0.0111083984375, -0.007568359375, -0.037841796875, -0.0028533935546875, 0.0093994140625, -0.013427734375, 0.0030517578125, -0.006317138671875, -0.008239746093...
[ 247, 25256, 194, 76199, 29568, 17932, 77336, 83, 51, 143034, 14, 27686, 7413, 756, 279, 2886, 55932, 21094, 12765, 43240, 707, 5154, 110, 2174, 2685, 621, 351, 13, 86869, 254, 27750, 856, 310, 1369, 72272, 2940, 86, 177, 4527, 11736, 11...
[ 0.001953125, 0.076416015625, 0.052978515625, 0.09637451171875, 0.1650390625, 0.1495361328125, 0.22900390625, 0.003082275390625, 0.1383056640625, 0.13916015625, 0.097412109375, 0.0784912109375, 0.1109619140625, 0.08984375, 0.1597900390625, 0.1695556640625, 0.2110595703125, 0.1105957...
embed
15769182_c0
15769182
prolog
0
Title: Prolog - syngeneic lists Problem title: Prolog - syngeneic lists Tags: prolog Problem: Prolog - syngeneic lists Two lists are syngeneic if have the same length and all the elements are the same except first and last. I have managed to do the comparisons between the lengths but how to see if the elements is the s...
Prolog - syngeneic lists Prolog - syngeneic lists prolog Prolog Prolog - syngeneic lists Two lists are syngeneic if have the same length and all the elements are the same except first and last. I have managed to do the comparisons between the lengths but how to see if the elements is the same except first and last of t...
[ -0.022216796875, 0.00714111328125, 0.003662109375, 0.0018310546875, -0.017578125, 0.0162353515625, -0.0032958984375, 0.017822265625, -0.001861572265625, 0.006103515625, 0.0022735595703125, 0.00058746337890625, -0.0031280517578125, 0.0032501220703125, 0.000865936279296875, -0.0106201171...
[ 1250, 4867, 6002, 15292, 1771, 5303, 502, 32964, 7, 621, 2174, 765, 5701, 140909, 756, 80854, 40494, 5117, 4568, 145755, 225490, 17721, 1957, 83, 6626, 18151 ]
[ 0.148681640625, 0.22607421875, 0.16943359375, 0.2249755859375, 0.158447265625, 0.2452392578125, 0.091064453125, 0.09765625, 0.07415771484375, 0.042694091796875, 0.087158203125, 0.0266876220703125, 0.1947021484375, 0.1712646484375, 0.03802490234375, 0.201904296875, 0.1365966796875, ...
embed
62473727_c0
62473727
prolog
0
Title: How to find number of same elements in list Prolog? Problem title: How to find number of same elements in list Prolog? Tags: prolog Problem: How to find number of same elements in list Prolog? I have a question about the topic, I know the list of Prolog works like [head, (tail)] but is there any function or magi...
How to find number of same elements in list Prolog? How to find number of same elements in list Prolog? prolog How Prolog How to find number of same elements in list Prolog? I have a question about the topic, I know the list of Prolog works like [head, (tail)] but is there any function or magical touch(sample codes) to...
[ -0.00156402587890625, 0.01531982421875, 0.0086669921875, -0.0003566741943359375, -0.0004482269287109375, 0.00921630859375, -0.007080078125, -0.0020294189453125, 0.0128173828125, -0.025634765625, -0.006561279296875, -0.0235595703125, 0.0264892578125, 0.01177978515625, -0.00946044921875, ...
[ 11249, 47, 7413, 14012, 111, 5701, 80854, 23, 5303, 1250, 4867, 502, 43240, 1884, 31251, 46741, 32354, 49846, 23996, 433, 33209, 18151, 3917, 2046, 69101, 36998, 12830 ]
[ 0.0584716796875, 0.038421630859375, 0.107666015625, 0.1650390625, 0.059814453125, 0.18994140625, 0.191162109375, 0.083740234375, 0.1844482421875, 0.1646728515625, 0.25146484375, 0.09130859375, 0.05511474609375, 0.030670166015625, 0.0894775390625, 0.13671875, 0.0985107421875, 0.0833...
embed
2152164_c0
2152164
prolog
0
Title: Prolog random and findall buit-ins Problem title: Prolog random and findall buit-ins Tags: prolog Problem: Prolog random and findall buit-ins Ok! last Prolog question for a long time!! I'm trying to pick a response that is picked at random but all I can seem to do is pick the first one out of my tables of respon...
Prolog random and findall buit-ins Prolog random and findall buit-ins prolog Prolog pick_response Sent Prolog random and findall buit-ins Ok! last Prolog question for a long time!! I'm trying to pick a response that is picked at random but all I can seem to do is pick the first one out of my tables of responses (see co...
[ 0.0040283203125, 0.002716064453125, 0.0218505859375, 0.0123291015625, -0.01312255859375, 0.017333984375, 0.01324462890625, -0.030029296875, -0.0245361328125, -0.060546875, 0.03564453125, 0.01416015625, -0.0054931640625, 0.018310546875, 0.00958251953125, 0.01953125, 0.006256103515625,...
[ 1250, 4867, 96759, 136, 7413, 5584, 373, 217, 5425, 502, 39580, 134719, 63999, 9, 4568, 9655, 1733, 1146, 31577, 47, 57553, 171739, 99, 1284, 756, 831, 48903, 54, 5117, 1632, 1810, 759, 23180, 18151, 16940, 111607, 46258, 39, 3642 ]
[ 0.1773681640625, 0.2335205078125, 0.2457275390625, 0.05712890625, 0.1285400390625, 0.17529296875, 0.0872802734375, 0.08221435546875, 0.1231689453125, 0.09674072265625, 0.1812744140625, 0.15771484375, 0.0675048828125, 0.011962890625, 0.0093994140625, 0.035064697265625, 0.0035400390625...
embed
33671167_c0
33671167
prolog
0
Title: Prolog: comparing the respective elements in 2 lists Problem title: Prolog: comparing the respective elements in 2 lists Tags: list, prolog, clpb Problem: Prolog: comparing the respective elements in 2 lists I have 2 lists [x1, x2, ...xn] and [y1, y2, ...yn] of the form {0, 1}^n . I want to generate a new list [...
Prolog: comparing the respective elements in 2 lists Prolog: comparing the respective elements in 2 lists list prolog clpb Prolog Prolog: comparing the respective elements in 2 lists I have 2 lists [x1, x2, ...xn] and [y1, y2, ...yn] of the form {0, 1}^n . I want to generate a new list [a1, a2 ... an] such that ai = xi...
[ -0.0028839111328125, 0.0101318359375, -0.0036163330078125, 0.0177001953125, -0.0111083984375, 0.0303955078125, 0.00860595703125, 0.01312255859375, 0.0118408203125, -0.002716064453125, 0.001953125, 0.006622314453125, -0.00299072265625, -0.01019287109375, -0.0019683837890625, -0.00625610...
[ 1250, 4867, 37397, 214, 107013, 80854, 23, 116, 5303, 502, 254, 275, 87, 765, 425, 418, 1022, 304, 19, 53, 113, 3371, 3173, 2389, 106, 3444, 139392, 3525, 11, 10, 142, 1300, 2203, 25413, 48762, 11180, 100, 11907, 17, 1295, 653, 757, ...
[ 0.181640625, 0.241943359375, 0.2032470703125, 0.0830078125, 0.2244873046875, 0.18603515625, 0.099365234375, 0.160400390625, 0.2266845703125, 0.1248779296875, 0.03826904296875, 0.0802001953125, 0.004425048828125, 0.029998779296875, 0.0158538818359375, 0.06402587890625, 0.03173828125, ...
embed
19613227_c0
19613227
prolog
0
Title: GNU Prolog: Displaying WAM code for query? Problem title: GNU Prolog: Displaying WAM code for query? Tags: prolog, warren-abstract-machine, gnu-prolog Problem: GNU Prolog: Displaying WAM code for query? Is it possible to display the WAM code for a query using GNU Prolog ? I know I can use pl2wam to generate the ...
GNU Prolog: Displaying WAM code for query? GNU Prolog: Displaying WAM code for query? prolog warren-abstract-machine gnu-prolog GNU Prolog Displaying WAM GNU Prolog: Displaying WAM code for query? Is it possible to display the WAM code for a query using GNU Prolog ? I know I can use pl2wam to generate the WAM for the p...
[ 0.041259765625, 0.01043701171875, 0.018798828125, 0.0167236328125, 0.006561279296875, 0.01055908203125, 0.0014495849609375, -0.0081787109375, -0.005706787109375, -0.00970458984375, -0.00732421875, -0.004730224609375, -0.025146484375, -0.00189208984375, -0.008544921875, 0.0172119140625,...
[ 165132, 1250, 4867, 12, 90045, 214, 4336, 594, 18151, 100, 41, 1294, 502, 1631, 982, 2055, 2816, 15390, 103149, 104155, 3454, 2071, 7722, 44116, 70, 17368, 831, 4527, 6456, 304, 634, 39, 139392, 1528, 10484, 51339, 3917, 7639, 903, 11389,...
[ 0.19970703125, 0.1602783203125, 0.2412109375, 0.000152587890625, 0.15966796875, 0.0212554931640625, 0.1822509765625, 0.2098388671875, 0.2333984375, 0.062255859375, 0.1466064453125, 0.1661376953125, 0.0999755859375, 0.050323486328125, 0.118896484375, 0.008270263671875, 0.1409912109375...
embed
77512708_c2
77512708
prolog
2
YetVisited(Y, VISITED), write('Current state: '), write(X), nl, write('Moving to: '), write(Y), nl, dfs(Y, Ypath, [Y|VISITED]). The query I'm using is thus: start(Start), dfs(Start, Path, []). Now, the output that appears is simply a loop. Despite implementing a check for repeated states, dfs simply Code signals: a, th...
YetVisited(Y, VISITED), write('Current state: '), write(X), nl, write('Moving to: '), write(Y), nl, dfs(Y, Ypath, [Y|VISITED]). The query I'm using is thus: start(Start), dfs(Start, Path, []). Now, the output that appears is simply a loop. Despite implementing a check for repeated states, dfs simply Code signals: a, th...
[ 0.006072998046875, 0.0126953125, 0.0050048828125, 0.0308837890625, 0.0087890625, 0.0072021484375, -0.014404296875, -0.00173187255859375, 0.01239013671875, -0.033935546875, 0.0035552978515625, 0.0244140625, -0.0203857421875, 0.00433349609375, -0.01165771484375, 0.0126953125, 0.0072631...
[ 63519, 65331, 14, 3674, 1723, 310, 32938, 66458, 33022, 474, 15724, 11341, 1542, 13169, 9083, 6496, 47, 104, 17447, 990, 128405, 84366, 25216, 397, 41, 1294, 17368, 4911, 4034, 126597, 108421, 140992, 135179, 83, 42856, 40956, 61518, 29479, ...
[ 0.241943359375, 0.22021484375, 0.18115234375, 0.1719970703125, 0.1632080078125, 0.152587890625, 0.192626953125, 0.177490234375, 0.117919921875, 0.0836181640625, 0.1302490234375, 0.148193359375, 0.05181884765625, 0.094482421875, 0.096435546875, 0.1085205078125, 0.130615234375, 0.100...
embed
37735059_c0
37735059
prolog
0
Title: Write text to a buffer in memory in swi-prolog? Problem title: Write text to a buffer in memory in swi-prolog? Tags: prolog, swi-prolog Problem: Write text to a buffer in memory in swi-prolog? This is pretty much what I'm trying to achieve. process(P,Txt) :- % do stuff and write messages to Txt, but not to std o...
Write text to a buffer in memory in swi-prolog? Write text to a buffer in memory in swi-prolog? prolog swi-prolog Write Txt Write text to a buffer in memory in swi-prolog? This is pretty much what I'm trying to achieve. Can I do this with SWI-Prolog? Is there a way to write text to a stream in memory, and output that t...
[ 0.00390625, 0.01806640625, 0.00799560546875, 0.030517578125, -0.007720947265625, 0.00628662109375, 0.0093994140625, -0.00130462646484375, -0.0223388671875, -0.01092529296875, 0.0081787109375, 0.004241943359375, 0.0179443359375, 0.00213623046875, 0.037109375, 0.0167236328125, 0.011047...
[ 601, 18781, 7986, 47, 373, 18234, 23, 98323, 91, 2452, 3454, 4867, 502, 94046, 18, 10, 9, 31577, 69307, 4171, 54, 678, 159, 38969, 10752, 3917, 33022, 75973, 140992, 14432 ]
[ 0.09912109375, 0.1182861328125, 0.22998046875, 0.1429443359375, 0.1143798828125, 0.25634765625, 0.0858154296875, 0.217529296875, 0.017974853515625, 0.183349609375, 0.119873046875, 0.2113037109375, 0.08349609375, 0.153076171875, 0.0987548828125, 0.03045654296875, 0.009796142578125, ...
embed
71696426_c0
71696426
prolog
0
Title: How do i remove reverse dulpicate list from a list in prolog? Problem title: How do i remove reverse dulpicate list from a list in prolog? Tags: prolog Problem: How do i remove reverse dulpicate list from a list in prolog? I'm new to learn the prolog, I want to fulfill the predicate below. removereverse([[1,5],[...
How do i remove reverse dulpicate list from a list in prolog? How do i remove reverse dulpicate list from a list in prolog? prolog a How List Input How do i remove reverse dulpicate list from a list in prolog? I'm new to learn the prolog, I want to fulfill the predicate below. mycode
[ -0.0087890625, 0.01483154296875, 0.016357421875, 0.00836181640625, -0.0206298828125, 0.000614166259765625, 0.00836181640625, 0.023681640625, 0.00811767578125, -0.0096435546875, -0.001739501953125, 0.0157470703125, 0.0213623046875, -0.00439453125, 0.000591278076171875, 0.0167236328125, ...
[ 11249, 54, 17, 87388, 39531, 184, 24532, 51781, 67, 5303, 1295, 502, 4867, 23, 32036, 360, 3525, 211394, 759, 40899 ]
[ 0.072265625, 0.048980712890625, 0.09844970703125, 0.1781005859375, 0.1900634765625, 0.150390625, 0.1334228515625, 0.19091796875, 0.1650390625, 0.1947021484375, 0.1094970703125, 0.1451416015625, 0.2183837890625, 0.03704833984375, 0.1297607421875, 0.00391387939453125, 0.003232955932617...
embed
43431562_c0
43431562
prolog
0
Title: Function to display nth element of a list, is returning false. Problem title: Function to display nth element of a list, is returning false. Tags: recursion, prolog Problem: Function to display nth element of a list, is returning false. I have a function I am using to return the nth element of a list. dispnth([H...
Function to display nth element of a list, is returning false. Function to display nth element of a list, is returning false. recursion prolog Result NewC Function to display nth element of a list, is returning false. I have a function I am using to return the nth element of a list. With an input like dispnth([1, 2, 3,...
[ 0.00579833984375, 0.0076904296875, 0.0242919921875, 0.01171875, 0.004241943359375, 0.0177001953125, 0.0177001953125, -0.00982666015625, 0.00494384765625, -0.007354736328125, 0.017333984375, -0.0439453125, -0.0172119140625, 0.005279541015625, -0.02392578125, -0.0023040771484375, 0.033...
[ 28670, 10763, 44116, 653, 927, 12830, 111, 5303, 30646, 214, 98320, 47, 83, 195625, 1830, 502, 4867, 126684, 2356, 441, 32354, 17368, 107730, 58580, 418, 116, 138, 201, 1193, 5608, 2046, 4966, 20949, 25647 ]
[ 0.1439208984375, 0.0751953125, 0.151123046875, 0.2001953125, 0.203125, 0.173828125, 0.03399658203125, 0.1671142578125, 0.1385498046875, 0.056365966796875, 0.214111328125, 0.023651123046875, 0.012939453125, 0.164794921875, 0.0718994140625, 0.1219482421875, 0.16552734375, 0.129638671...
embed
11360026_c0
11360026
prolog
0
Title: Prolog append with cut operator Problem title: Prolog append with cut operator Tags: prolog-cut, prolog Problem: Prolog append with cut operator What problem can occur when we use append with cut operator? append2([],L,L):-!. append2([H|T],L,[H|TL]):-append2(T,L,TL). I have tried several different inputs, but it...
Prolog append with cut operator Prolog append with cut operator prolog-cut prolog Prolog append2 Prolog append with cut operator What problem can occur when we use append with cut operator? I have tried several different inputs, but it always succeeds.
[ 0.0277099609375, 0.0031280517578125, 0.020263671875, 0.0034637451171875, 0.0084228515625, 0.00118255615234375, 0.004669189453125, 0.020263671875, 0.029541015625, -0.0146484375, 0.006011962890625, -0.0189208984375, -0.0015106201171875, -0.004486083984375, 0.028076171875, -0.002639770507...
[ 1250, 4867, 114689, 71, 678, 59226, 39933, 502, 19774, 304, 2967, 831, 74918, 3229, 4527, 37842, 40368, 12921, 107730, 11343, 214493 ]
[ 0.1337890625, 0.2264404296875, 0.1866455078125, 0.1705322265625, 0.1251220703125, 0.213134765625, 0.2423095703125, 0.08514404296875, 0.19482421875, 0.06463623046875, 0.160888671875, 0.07745361328125, 0.09454345703125, 0.008148193359375, 0.080810546875, 0.074462890625, 0.04638671875, ...
embed
5519608_c1
5519608
prolog
1
undefined (although I'm a bit confused about what 'undefined' means, in a related section it says "inheritance does not take place"). Here's what I get when I run the diamond: ?X = o ?Y = f ?Z = g ?X = o ?Y = f(a) ?Z = a I expected only the first solution, although I'd think that the second solution would at least mak...
undefined (although I'm a bit confused about what 'undefined' means, in a related section it says "inheritance does not take place"). Here's what I get when I run the diamond: ?X = o ?Y = f ?Z = g ?X = o ?Y = f(a) ?Z = a I expected only the first solution, although I'd think that the second solution would at least mak...
[ 0.00543212890625, 0.007080078125, -0.0025634765625, 0.0181884765625, -0.0096435546875, 0.00799560546875, 0.0174560546875, 0.020751953125, 0.0311279296875, 0.003936767578125, -0.0018310546875, 0.000926971435546875, 0.0059814453125, -0.003662109375, -0.01116943359375, -0.0009765625, 0....
[ 9232, 5983, 297, 55681, 59437, 26950, 73, 3334, 217, 7154, 14602, 959, 5646, 3687, 11853, 2046, 11675, 70, 879, 15882, 1542, 36, 1723, 1238, 1511, 706, 11, 10, 84751, 5117, 29806, 17932, 10422, 275, 876, 18, 144142, 1193, 36474, 107950, ...
[ 0.1883544921875, 0.251220703125, 0.1419677734375, 0.014892578125, 0.14208984375, 0.011444091796875, 0.043487548828125, 0.1641845703125, 0.09375, 0.07611083984375, 0.04052734375, 0.1107177734375, 0.0711669921875, 0.190673828125, 0.000885009765625, 0.05670166015625, 0.14208984375, 0....
embed
60580787_c1
60580787
prolog
1
],Y). false. ?- score([robots,hulk,bad_boys__ii],Y). false. Rule written : score([Movies], Money):- findall(Profit,(takings(Movies, Profit)), ListOfProfit), sum_list(ListOfProfit, Money). Related question asking for a recursive answer. Code signals: facts, Sum, air_force_one, american_beauty, american_pie, american_wed...
],Y). false. ?- score([robots,hulk,bad_boys__ii],Y). false. Rule written : score([Movies], Money):- findall(Profit,(takings(Movies, Profit)), ListOfProfit), sum_list(ListOfProfit, Money). Related question asking for a recursive answer. Code signals: facts, Sum, air_force_one, american_beauty, american_pie, american_wed...
[ -0.004425048828125, 0.01446533203125, 0.01507568359375, 0.00958251953125, -0.0322265625, -0.00982666015625, -0.000598907470703125, 0.03662109375, 0.03173828125, -0.025146484375, 0.0012054443359375, -0.015380859375, -0.00579833984375, 0.007568359375, 0.0208740234375, 0.0179443359375, ...
[ 10114, 1723, 194, 98320, 705, 9, 47763, 112662, 7, 28952, 92, 12283, 30885, 1573, 139118, 59121, 187430, 81669, 7413, 5584, 147161, 217, 1865, 5180, 114609, 32036, 132887, 247, 10554, 6562, 154663, 9655, 113292, 195625, 5844, 35166, 28864, 26...
[ 0.041534423828125, 0.13232421875, 0.010589599609375, 0.235595703125, 0.022216796875, 0.0123291015625, 0.26611328125, 0.22216796875, 0.0780029296875, 0.0877685546875, 0.095947265625, 0.119384765625, 0.161865234375, 0.0819091796875, 0.250244140625, 0.13427734375, 0.2073974609375, 0.2...
embed
64697030_c0
64697030
prolog
0
Title: Reversing up to middle in Prolog list Problem title: Reversing up to middle in Prolog list Tags: prolog Problem: Reversing up to middle in Prolog list I want to write a function suppose : half_reverse(L1, L2). This function will reverse the elements of (an odd numbered) list L1 , from 1 to (middle-1) elements an...
Reversing up to middle in Prolog list Reversing up to middle in Prolog list prolog Reversing Prolog half_reverse Reversing up to middle in Prolog list I want to write a function suppose : half_reverse(L1, L2). This function will reverse the elements of (an odd numbered) list L1 , from 1 to (middle-1) elements and (midd...
[ -0.01171875, 0.01092529296875, 0.018310546875, -0.0115966796875, -0.004486083984375, 0.02294921875, -0.00750732421875, -0.00104522705078125, 0.033935546875, -0.002410888671875, 0.00860595703125, 0.017578125, 0.0137939453125, 0.005126953125, 0.022216796875, -0.01708984375, 0.006286621...
[ 853, 7864, 214, 1257, 47, 86991, 1250, 4867, 5303, 23, 502, 23552, 107, 37676, 3444, 33022, 32354, 139124, 866, 418, 339, 10461, 39531, 184, 80854, 70270, 14012, 1295, 106, 22000, 19298, 110218, 21748, 4568, 12830, 4343, 16750, 304, 89536, ...
[ 0.0972900390625, 0.2161865234375, 0.044036865234375, 0.1427001953125, 0.1416015625, 0.22998046875, 0.154052734375, 0.2208251953125, 0.1578369140625, 0.007537841796875, 0.112060546875, 0.1533203125, 0.1015625, 0.257568359375, 0.0361328125, 0.08154296875, 0.163330078125, 0.0476379394...
embed
30175012_c0
30175012
prolog
0
Title: prolog - multiple outputs, same variable Problem title: prolog - multiple outputs, same variable Tags: prolog Problem: prolog - multiple outputs, same variable How do I get the following program to produce the following output: ?- genN(3,R). R=0; R=1; R=2; My current output is just R=0; code: genN(1,0). genN(N,R...
prolog - multiple outputs, same variable prolog - multiple outputs, same variable prolog N-1 prolog - multiple outputs, same variable How do I get the following program to produce the following output: My current output is just R=0; code: newer code: The above program is meant to output numbers from 0 to N-1.
[ -0.004425048828125, 0.0142822265625, -0.01904296875, -0.0029296875, 0.00909423828125, 0.007171630859375, -0.00011777877807617188, 0.007232666015625, 0.00872802734375, -0.02880859375, 0.005096435546875, -0.00179290771484375, 0.00457763671875, -0.007476806640625, 0.0233154296875, -0.0033...
[ 502, 4867, 48716, 140992, 5701, 77336, 7, 541, 5759, 2046, 25632, 1528, 47, 27489, 43581, 1660, 627, 145407, 18151, 56, 36917, 131148, 101935, 1295, 757 ]
[ 0.1898193359375, 0.271728515625, 0.185302734375, 0.258056640625, 0.11260986328125, 0.21923828125, 0.0088348388671875, 0.126708984375, 0.2080078125, 0.06732177734375, 0.07916259765625, 0.180908203125, 0.07733154296875, 0.1368408203125, 0.126953125, 0.027862548828125, 0.09576416015625,...
embed
54339378_c0
54339378
prolog
0
Title: Create Prolog knowledge base in Java using JPL Problem title: Create Prolog knowledge base in Java using JPL Tags: swi-prolog, prolog, jpl, java Problem: Create Prolog knowledge base in Java using JPL I'm trying to wrap my head around the Java-Prolog interface library JPL. I can find plenty of examples where peo...
Create Prolog knowledge base in Java using JPL Create Prolog knowledge base in Java using JPL swi-prolog prolog jpl java JPL Create Prolog Java Create Prolog knowledge base in Java using JPL I'm trying to wrap my head around the Java-Prolog interface library JPL. I can find plenty of examples where people query Prolog ...
[ 0.035400390625, 0.0166015625, 0.00872802734375, 0.015625, 0.00537109375, 0.0142822265625, -0.006378173828125, -0.00848388671875, -0.006256103515625, -0.0240478515625, 0.004791259765625, 0.001983642578125, -0.01434326171875, 0.00653076171875, 0.00848388671875, 0.015380859375, 0.020385...
[ 151313, 1250, 4867, 51359, 3647, 23, 41925, 17368, 821, 21130, 2452, 3454, 502, 1647, 2424, 79, 330, 31577, 137565, 10336, 10932, 10752, 101758, 35773, 1294, 87794, 27781, 3395, 41, 1295, 4677, 110, 64549, 297, 84079, 2806, 54, 903 ]
[ 0.1417236328125, 0.1680908203125, 0.2491455078125, 0.159912109375, 0.2283935546875, 0.054840087890625, 0.2333984375, 0.072998046875, 0.144775390625, 0.232421875, 0.151123046875, 0.1112060546875, 0.112548828125, 0.04339599609375, 0.16064453125, 0.0830078125, 0.051605224609375, 0.009...
embed
20165418_c0
20165418
prolog
0
Title: How do I define a binary operation on a set of numbers in prolog? Problem title: How do I define a binary operation on a set of numbers in prolog? Tags: prolog Problem: How do I define a binary operation on a set of numbers in prolog? How do I define a binary operation on a list in prolog and then check its prop...
How do I define a binary operation on a set of numbers in prolog? How do I define a binary operation on a set of numbers in prolog? prolog How How do I define a binary operation on a set of numbers in prolog? How do I define a binary operation on a list in prolog and then check its properties such as closure , associat...
[ 0.0189208984375, -0.007598876953125, 0.01129150390625, 0.0152587890625, 0.007171630859375, -0.000591278076171875, -0.000957489013671875, 0.005645751953125, 0.020263671875, -0.01153564453125, -0.00897216796875, -0.0079345703125, -0.01416015625, -0.01129150390625, 0.0069580078125, 0.0132...
[ 11249, 61924, 2394, 6635, 41018, 98, 5423, 101935, 502, 4867, 87, 23, 54, 10, 5303, 12765, 6863, 183871, 170224, 166027, 62621, 5844, 182324, 26458, 37842 ]
[ 0.0496826171875, 0.21337890625, 0.1937255859375, 0.180908203125, 0.250244140625, 0.1077880859375, 0.1123046875, 0.1549072265625, 0.1541748046875, 0.2203369140625, 0.035247802734375, 0.04534912109375, 0.02801513671875, 0.0296630859375, 0.1541748046875, 0.1817626953125, 0.0256500244140...
embed
22995777_c0
22995777
prolog
0
Title: Splitting a list into two lists equal in length in Prolog Problem title: Splitting a list into two lists equal in length in Prolog Tags: prolog Problem: Splitting a list into two lists equal in length in Prolog I am writing a predicate in Prolog to divide a list into two equal in length lists. For example : div(...
Splitting a list into two lists equal in length in Prolog Splitting a list into two lists equal in length in Prolog prolog Splitting Prolog Splitting a list into two lists equal in length in Prolog I am writing a predicate in Prolog to divide a list into two equal in length lists. For example : That's my code but it's ...
[ 0.004058837890625, 0.015625, 0.01141357421875, 0.01153564453125, -0.0019073486328125, 0.000843048095703125, -0.0050048828125, 0.0059814453125, 0.005218505859375, -0.0196533203125, 0.0233154296875, 0.005340576171875, -0.005126953125, 0.01495361328125, 0.0174560546875, -0.002151489257812...
[ 46474, 1916, 5303, 3934, 6626, 105950, 140909, 1250, 4867, 502, 23, 32562, 1653, 2063, 67, 101637, 9925, 18151, 959, 20697 ]
[ 0.2073974609375, 0.06842041015625, 0.2078857421875, 0.1131591796875, 0.15380859375, 0.1483154296875, 0.127685546875, 0.1759033203125, 0.210205078125, 0.1116943359375, 0.01953125, 0.04229736328125, 0.09716796875, 0.099609375, 0.049102783203125, 0.162841796875, 0.0059814453125, 0.098...
embed
26526722_c0
26526722
prolog
0
Title: Prolog: Graph representation of list and difference list Problem title: Prolog: Graph representation of list and difference list Tags: difference-lists, list, prolog Problem: Prolog: Graph representation of list and difference list I've been trying to understand how a list and a difference list would look like i...
Prolog: Graph representation of list and difference list Prolog: Graph representation of list and difference list difference-lists list prolog Prolog Graph Prolog: Graph representation of list and difference list I've been trying to understand how a list and a difference list would look like in a graph structure. I und...
[ 0.0125732421875, 0.013916015625, -0.01190185546875, 0.0196533203125, -0.01507568359375, 0.032958984375, -0.0267333984375, 0.0067138671875, 0.0016326904296875, 0.004058837890625, -0.0152587890625, -0.01397705078125, -0.00077056884765625, 0.0279541015625, -0.00836181640625, 0.00650024414...
[ 1250, 4867, 12, 6524, 11727, 18811, 5303, 136, 60212, 1363, 6562, 502, 31577, 28219, 3642, 10, 2806, 6713, 1884, 23, 41382, 45646, 62822, 111, 11, 418, 304, 363, 5, 66, 58745, 831, 18, 27689, 254, 27781, 133063, 82449, 9 ]
[ 0.1339111328125, 0.2239990234375, 0.0232086181640625, 0.17431640625, 0.1756591796875, 0.1839599609375, 0.272705078125, 0.1209716796875, 0.281005859375, 0.03948974609375, 0.2001953125, 0.09228515625, 0.04949951171875, 0.1456298828125, 0.049530029296875, 0.0518798828125, 0.078369140625...
embed
5935133_c0
5935133
prolog
0
Title: Prolog: How to remove every second element of a list Problem title: Prolog: How to remove every second element of a list Tags: prolog, list Problem: Prolog: How to remove every second element of a list I need to write a program in Prolog that should remove every second element of a list. Should work this: [1,2,3...
Prolog: How to remove every second element of a list Prolog: How to remove every second element of a list prolog list Prolog How Prolog: How to remove every second element of a list I need to write a program in Prolog that should remove every second element of a list. Should work this: [1,2,3,4,5,6,7] -> [1,3,5,7] so f...
[ 0.004852294921875, 0.0218505859375, 0.006805419921875, 0.0108642578125, -0.016845703125, 0.0220947265625, -0.0086669921875, 0.017333984375, 0.002227783203125, -0.01806640625, 0.0234375, -0.00286865234375, -0.0211181640625, -0.0074462890625, -0.002777099609375, 0.0262451171875, 0.0195...
[ 1250, 4867, 11249, 47, 87388, 11907, 17932, 12830, 111, 5303, 502, 10, 3871, 33022, 1528, 23, 5608, 151117, 4488, 903, 68252, 155761, 80389, 136555, 33079, 363, 135461, 2060, 30646, 8710, 184 ]
[ 0.16796875, 0.26318359375, 0.0902099609375, 0.05523681640625, 0.214111328125, 0.1630859375, 0.2427978515625, 0.216796875, 0.127197265625, 0.2005615234375, 0.1038818359375, 0.002532958984375, 0.049407958984375, 0.07098388671875, 0.1246337890625, 0.015625, 0.0535888671875, 0.01451110...
embed
69928973_c1
69928973
prolog
1
G)) :- byTrain(X,Z), travel(Z,Y,G). travel(X,Y, go(byPlane(X,Z),G)) :- byPlane(X,Z), travel(Z,Y,G). So My Question is, how to make a rule named path/2. For Example path(X,Y) :- %What to write here... this rule will make an output of which other cities you have to go to get from one place to another , and also how (byCa...
G)) :- byTrain(X,Z), travel(Z,Y,G). travel(X,Y, go(byPlane(X,Z),G)) :- byPlane(X,Z), travel(Z,Y,G). So My Question is, how to make a rule named path/2. For Example path(X,Y) :- %What to write here... this rule will make an output of which other cities you have to go to get from one place to another , and also how (byCa...
[ 0.01214599609375, 0.0111083984375, -0.0128173828125, 0.013916015625, 0.01312255859375, 0.03466796875, -0.0074462890625, -0.01177978515625, 0.01611328125, -0.0380859375, -0.0036163330078125, -0.00811767578125, -0.01153564453125, 0.000774383544921875, -0.02099609375, 0.00567626953125, ...
[ 527, 15772, 390, 28542, 73, 1542, 1511, 26983, 1723, 724, 738, 1272, 78680, 13, 68185, 3642, 3249, 10, 79986, 24, 4806, 60875, 12477, 89536, 1745, 52231, 47, 33022, 3688, 140992, 3129, 3789, 162708, 765, 2046, 1295, 1632, 3687, 15700, 218...
[ 0.0997314453125, 0.05950927734375, 0.12353515625, 0.1597900390625, 0.0760498046875, 0.07110595703125, 0.085205078125, 0.2303466796875, 0.1334228515625, 0.10687255859375, 0.140380859375, 0.0869140625, 0.1021728515625, 0.0151214599609375, 0.0191802978515625, 0.095947265625, 0.102539062...
embed
47290310_c0
47290310
prolog
0
Title: Check value in two lists in prolog Problem title: Check value in two lists in prolog Tags: prolog Problem: Check value in two lists in prolog I want to implement a function to check whether some values are the same in two lists. For example, win([1,2,3,4,5]). win([2,3,4,5,6]. Now I want to compare [2,3,4,5,10] w...
Check value in two lists in prolog Check value in two lists in prolog prolog Check Check value in two lists in prolog I want to implement a function to check whether some values are the same in two lists. For example, win([1,2,3,4,5]). win([2,3,4,5,6]. Now I want to compare [2,3,4,5,10] with above one by one. If there ...
[ -0.01025390625, 0.007354736328125, 0.000762939453125, 0.0146484375, -0.0216064453125, -0.00640869140625, -0.0123291015625, 0.021240234375, 0.01507568359375, 0.00055694580078125, 0.0263671875, 0.04150390625, 0.02392578125, 0.0033416748046875, 0.000904083251953125, -0.01556396484375, 0...
[ 38679, 34292, 23, 6626, 5303, 502, 4867, 7, 3444, 29479, 32354, 12765, 36766, 142424, 621, 5701, 19916, 133063, 363, 80389, 82449, 104629, 69101, 155761, 963, 36917, 1632, 201, 80854, 22631, 32786, 132, 4527, 24763, 14858, 214, 678, 2831 ]
[ 0.1929931640625, 0.2205810546875, 0.0762939453125, 0.1922607421875, 0.2294921875, 0.1646728515625, 0.23486328125, 0.010650634765625, 0.026214599609375, 0.0784912109375, 0.1212158203125, 0.157470703125, 0.05169677734375, 0.146240234375, 0.06475830078125, 0.1690673828125, 0.14025878906...
embed
47850456_c0
47850456
prolog
0
Title: List to Tuples in Prolog Problem title: List to Tuples in Prolog Tags: prolog, list Problem: List to Tuples in Prolog I'm trying to write a clause in Prolog that takes in a list and returns predicates of edges. For example: ?- listpairs([1, 2, 3], X, Y). X = 1 Y = 2; X = 2 Y = 3; This is what I've tried so far a...
List to Tuples in Prolog List to Tuples in Prolog prolog list List Tuples Prolog List to Tuples in Prolog I'm trying to write a clause in Prolog that takes in a list and returns predicates of edges. For example: This is what I've tried so far and haven't been getting anywhere. I would appreciate it if someone could hel...
[ 0.0034637451171875, 0.019287109375, 0.0036163330078125, 0.00738525390625, -0.006011962890625, 0.020263671875, -0.01495361328125, -0.00933837890625, -0.005645751953125, -0.024169921875, 0.00003695487976074219, -0.015625, -0.00799560546875, 0.0125732421875, 0.0025787353515625, 0.02099609...
[ 32036, 47, 1371, 99726, 23, 1250, 4867, 502, 5303, 31577, 33022, 70731, 13, 51776, 30646, 1653, 2063, 111, 121303, 27781, 3293, 83, 2367, 87, 272, 37842, 221, 2060, 38246, 18, 151107, 77947, 4358 ]
[ 0.178466796875, 0.1680908203125, 0.15869140625, 0.2430419921875, 0.03814697265625, 0.142578125, 0.216796875, 0.10589599609375, 0.1690673828125, 0.053924560546875, 0.0186614990234375, 0.117431640625, 0.0250396728515625, 0.003662109375, 0.1180419921875, 0.1153564453125, 0.161376953125,...
embed
50198946_c0
50198946
prolog
0
Title: Member of a list, sum previous members list prolog Problem title: Member of a list, sum previous members list prolog Tags: prolog, list, append, sum Problem: Member of a list, sum previous members list prolog I want to verify if a member of list, is the sum of the previous numbers. Example: [0,1,3,4,18,19]. This...
Member of a list, sum previous members list prolog Member of a list, sum previous members list prolog prolog list append sum Member sum_ Member of a list, sum previous members list prolog I want to verify if a member of list, is the sum of the previous numbers. Example: [0,1,3,4,18,19]. This is TRUE because 0+1+3 = 4 I...
[ -0.0123291015625, 0.014404296875, 0.0247802734375, 0.0234375, -0.032958984375, -0.0115966796875, 0.004974365234375, 0.033203125, 0.043701171875, -0.031982421875, 0.0216064453125, 0.0152587890625, 0.0036468505859375, 0.00848388671875, 0.01416015625, -0.00701904296875, 0.01251220703125...
[ 74057, 111, 10, 5303, 10554, 96362, 43032, 502, 4867, 114689, 71, 3444, 47, 493, 40383, 2174, 32786, 83, 101935, 89536, 2389, 418, 82449, 1819, 2947, 149842, 647, 757, 21748, 85398, 2203, 201, 444, 179933, 3688, 6528, 5 ]
[ 0.25390625, 0.1689453125, 0.0303955078125, 0.236572265625, 0.252685546875, 0.2003173828125, 0.2254638671875, 0.1097412109375, 0.166748046875, 0.1048583984375, 0.01043701171875, 0.0733642578125, 0.027435302734375, 0.1431884765625, 0.1650390625, 0.09027099609375, 0.238525390625, 0.10...
embed
41360051_c0
41360051
prolog
0
Title: Using not equal to operator in Prolog Problem title: Using not equal to operator in Prolog Tags: prolog Problem: Using not equal to operator in Prolog In Prolog my facts are as follows. flows(godavari,andhra). flows(krishna,telangana). flows(krishna,andhra). I want to frame a query for list of rivers that flows ...
Using not equal to operator in Prolog Using not equal to operator in Prolog prolog Using Prolog Using not equal to operator in Prolog In Prolog my facts are as follows. I want to frame a query for list of rivers that flows through andhra but not in telangana. I tried with which lists all the rivers that pass through Y ...
[ 0.0135498046875, 0.00762939453125, 0.0218505859375, 0.017822265625, -0.007049560546875, -0.018798828125, 0.00004458427429199219, -0.005767822265625, -0.0012359619140625, 0.0240478515625, 0.00921630859375, -0.0274658203125, 0.03125, 0.000274658203125, -0.00445556640625, 0.0211181640625,...
[ 345, 959, 105950, 47, 39933, 1250, 4867, 6953, 23, 502, 15824, 123789, 41, 1294, 5303, 96113, 86608, 8305, 136, 11894, 120, 8736, 11, 37842, 27875, 990, 567, 3444, 10922, 5 ]
[ 0.033599853515625, 0.1661376953125, 0.145751953125, 0.0255889892578125, 0.225341796875, 0.1373291015625, 0.227294921875, 0.002227783203125, 0.0212249755859375, 0.08673095703125, 0.085205078125, 0.112548828125, 0.05169677734375, 0.065185546875, 0.08154296875, 0.096435546875, 0.0596313...
embed
41110044_c0
41110044
prolog
0
Title: Prolog, Sorting facts by parameter Problem title: Prolog, Sorting facts by parameter Tags: sorting, prolog Problem: Prolog, Sorting facts by parameter I've been trying to find how I could do this, I'm trying to sort facts like: package(X,Y,N), where N is a number. I want to create a list with the X values, order...
Prolog, Sorting facts by parameter Prolog, Sorting facts by parameter sorting prolog Prolog Sorting Prolog, Sorting facts by parameter I've been trying to find how I could do this, I'm trying to sort facts like: package(X,Y,N), where N is a number. I want to create a list with the X values, ordered by the value of N (l...
[ 0.0247802734375, -0.0146484375, 0.00592041015625, -0.0201416015625, -0.0164794921875, -0.000194549560546875, 0.00982666015625, -0.019287109375, 0.0162353515625, -0.02880859375, 0.01153564453125, -0.008544921875, -0.0252685546875, -0.021728515625, -0.0103759765625, 0.000858306884765625,...
[ 1250, 4867, 53666, 214, 15824, 7, 390, 171859, 12096, 502, 31577, 7413, 3642, 5809, 54, 903, 47, 98169, 1542, 1723, 839, 541, 83, 14012, 3444, 28282, 5303, 678, 1193, 142424, 12989, 34292, 17336, 525, 167375, 4699, 17368, 10110, 9779, 347...
[ 0.183349609375, 0.25146484375, 0.2122802734375, 0.076416015625, 0.2120361328125, 0.06561279296875, 0.08795166015625, 0.2498779296875, 0.2332763671875, 0.1324462890625, 0.073486328125, 0.105712890625, 0.012908935546875, 0.036834716796875, 0.027923583984375, 0.02496337890625, 0.0566406...
embed
21031685_c0
21031685
prolog
0
Title: Sum of the first n numbers in prolog Problem title: Sum of the first n numbers in prolog Tags: turbo-prolog, prolog, visual-prolog Problem: Sum of the first n numbers in prolog Hello can anyone help me compute the sum of the first n numbers. For example n=4 => sum = 10. So far I've wrote this predicates sum(inte...
Sum of the first n numbers in prolog Sum of the first n numbers in prolog turbo-prolog prolog visual-prolog Sum N-1 Sum of the first n numbers in prolog Hello can anyone help me compute the sum of the first n numbers. For example n=4 => sum = 10. So far I've wrote this This one works but I need another implementation. ...
[ -0.0130615234375, 0.00390625, 0.01019287109375, 0.031982421875, -0.0194091796875, 0.005126953125, 0.00010013580322265625, 0.024658203125, 0.012939453125, -0.05078125, 0.00469970703125, -0.00048828125, -0.0167236328125, 0.01361083984375, 0.02783203125, 0.01226806640625, 0.019775390625...
[ 36335, 111, 5117, 653, 101935, 23, 502, 4867, 94779, 3454, 21176, 541, 5759, 70, 35378, 831, 35672, 4358, 163, 9969, 6743, 10554, 27781, 107947, 44357, 2203, 4068, 2060, 272, 54397, 903, 3293, 1632, 43240, 1284, 3871, 15700, 208124, 25647, ...
[ 0.226806640625, 0.0986328125, 0.173095703125, 0.1934814453125, 0.2061767578125, 0.07598876953125, 0.17919921875, 0.254150390625, 0.15771484375, 0.103515625, 0.1519775390625, 0.1390380859375, 0.164306640625, 0.03924560546875, 0.06134033203125, 0.0125732421875, 0.0292816162109375, 0....
embed
2616390_c0
2616390
prolog
0
Title: Are there alternative ways to display a list other than by using loop? Problem title: Are there alternative ways to display a list other than by using loop? Tags: prolog Problem: Are there alternative ways to display a list other than by using loop? I know on how to display a list by using loop . For example, ch...
Are there alternative ways to display a list other than by using loop? Are there alternative ways to display a list other than by using loop? prolog loop Are there alternative ways to display a list other than by using loop? I know on how to display a list by using loop . For example, Unfortunately, I don't know on how...
[ 0.019775390625, 0.00762939453125, 0.009033203125, 0.0057373046875, -0.01373291015625, -0.020751953125, -0.00372314453125, 0.0181884765625, 0.018798828125, -0.0234375, 0.0036773681640625, -0.031494140625, -0.01806640625, 0.004180908203125, 0.011962890625, -0.004791259765625, 0.0351562...
[ 30700, 48322, 47, 44116, 5303, 3789, 3501, 17368, 40956, 2685, 502, 4867, 10, 3714, 3642, 390, 185397, 17997 ]
[ 0.1456298828125, 0.1092529296875, 0.0304107666015625, 0.1766357421875, 0.2003173828125, 0.06195068359375, 0.05645751953125, 0.0936279296875, 0.222412109375, 0.0230712890625, 0.1153564453125, 0.201171875, 0.00537109375, 0.0526123046875, 0.035888671875, 0.057159423828125, 0.05010986328...
embed
64529700_c0
64529700
prolog
0
Title: How to &quot;write a predicate which returns the opposite of a literal&quot; in Prolog? Problem title: How to &quot;write a predicate which returns the opposite of a literal&quot; in Prolog? Tags: prolog Problem: How to "write a predicate which returns the opposite of a literal" in Prolog? How do I write a predi...
How to &quot;write a predicate which returns the opposite of a literal&quot; in Prolog? How to &quot;write a predicate which returns the opposite of a literal&quot; in Prolog? prolog How Prolog How to "write a predicate which returns the opposite of a literal" in Prolog? How do I write a predicate that will return the ...
[ -0.00946044921875, -0.00445556640625, -0.01092529296875, -0.005035400390625, 0, 0.0048828125, 0.0245361328125, 0.01055908203125, -0.00555419921875, 0.00543212890625, -0.0198974609375, 0.003570556640625, -0.01007080078125, -0.01324462890625, 0.014892578125, 0.00823974609375, -0.011291...
[ 11249, 434, 18781, 1653, 2063, 67, 30646, 198274, 111, 15659, 289, 1250, 4867, 47, 3129, 23, 502, 7, 33022, 51339, 41, 10484, 25632, 35166 ]
[ 0.052764892578125, 0.0648193359375, 0.1329345703125, 0.1712646484375, 0.2081298828125, 0.1214599609375, 0.1656494140625, 0.208984375, 0.10089111328125, 0.1453857421875, 0.1021728515625, 0.148681640625, 0.210205078125, 0.02557373046875, 0.03717041015625, 0.048004150390625, 0.045959472...
embed
55775883_c1
55775883
prolog
1
part of body do you feel pain?'),nl,write('1.musclepain,2.abdominalpain'),read(D),(D=1->Ch4='musclepain';(D=2->Ch4='abdominalpain')), write('any other issue'),nl,write('1.jointswelling,2.nausea,3.bloodinstool'),read(E),(E=1->Ch5='jointswelling';(E=2->Ch5='nausea';(E=3->ch5='bloodinstool'))),write(diseas(X,Ch1,Ch2,Ch3,...
part of body do you feel pain?'),nl,write('1.musclepain,2.abdominalpain'),read(D),(D=1->Ch4='musclepain';(D=2->Ch4='abdominalpain')), write('any other issue'),nl,write('1.jointswelling,2.nausea,3.bloodinstool'),read(E),(E=1->Ch5='jointswelling';(E=2->Ch5='nausea';(E=3->ch5='bloodinstool'))),write(diseas(X,Ch1,Ch2,Ch3,...
[ 0.0194091796875, 0.00390625, 0.021484375, 0.02490234375, -0.0006103515625, 0.031494140625, -0.0128173828125, 0.005340576171875, -0.0174560546875, -0.03076171875, 0.0196533203125, 0.016357421875, 0.00921630859375, -0.00811767578125, 0.0035552978515625, 0.00555419921875, 0.000152587890...
[ 2831, 111, 14361, 54, 398, 12319, 24503, 13169, 434, 18781, 2647, 11030, 74908, 5442, 2055, 68131, 289, 39116, 397, 33000, 15982, 617, 55257, 33022, 4848, 3789, 31089, 513, 19256, 4032, 91841, 5425, 89110, 758, 11, 206, 13, 162, 1542, 418...
[ 0.1507568359375, 0.05413818359375, 0.1920166015625, 0.0947265625, 0.1114501953125, 0.22998046875, 0.28369140625, 0.03570556640625, 0.03216552734375, 0.118896484375, 0.0863037109375, 0.118896484375, 0.2117919921875, 0.00335693359375, 0.0190582275390625, 0.113525390625, 0.050537109375,...
embed
43169633_c0
43169633
prolog
0
Title: How to find the index of the permutation Problem title: How to find the index of the permutation Tags: permutation, prolog Problem: How to find the index of the permutation % index(+List, -Idx) Predicate will get List with permutation and I want to know index of permutation For example: ?- index([4,1,3,2],X). X=...
How to find the index of the permutation How to find the index of the permutation permutation prolog How List Idx Predicate How to find the index of the permutation My solution: Why is it wrong? And how can I make incremention of Idx?
[ -0.0029449462890625, 0.0118408203125, 0.0224609375, 0.004669189453125, -0.00170135498046875, 0.0057373046875, -0.0208740234375, -0.001434326171875, 0.006072998046875, -0.041015625, 0.0033111572265625, -0.005218505859375, -0.015869140625, 0.01806640625, -0.00665283203125, 0.001457214355...
[ 11249, 47, 7413, 70, 63262, 111, 117, 561, 22062, 502, 4867, 32036, 24799, 425, 7145, 2063, 29806, 44084, 83, 44691, 3642, 158661, 1830 ]
[ 0.08056640625, 0.08447265625, 0.138916015625, 0.0888671875, 0.26904296875, 0.112060546875, 0.1529541015625, 0.2003173828125, 0.10986328125, 0.1263427734375, 0.1419677734375, 0.1202392578125, 0.1689453125, 0.1845703125, 0.1427001953125, 0.1221923828125, 0.05340576171875, 0.062622070...
embed
64474263_c1
64474263
prolog
1
SUIT = ♣ ; SUIT = ♦ ; SUIT = ♠ ; SUIT = ♥ . */ %! card(NAME) %! card(NAME,RANK,SUIT) card(NAME,RANK,SUIT) :- rank(RANK) , suit(SUIT) , prolog:atom_concat(RANK,SUIT,NAME) . /* */ %! cards(CARDs) . cards(CARDs) :- prolog:bagof(CARD,card(CARD),CARDs) . /* ?- cards(CARDs) . CARDs = [2♣,2♦,2♠,2♥,3♣,3♦,3♠,3♥,4♣,4♦,4♠,4♥,5♣,...
SUIT = ♣ ; SUIT = ♦ ; SUIT = ♠ ; SUIT = ♥ . */ %! card(NAME) %! card(NAME,RANK,SUIT) card(NAME,RANK,SUIT) :- rank(RANK) , suit(SUIT) , prolog:atom_concat(RANK,SUIT,NAME) . /* */ %! cards(CARDs) . cards(CARDs) :- prolog:bagof(CARD,card(CARD),CARDs) . /* ?- cards(CARDs) . CARDs = [2♣,2♦,2♠,2♥,3♣,3♦,3♠,3♥,4♣,4♦,4♠,4♥,5♣,...
[ 0.01806640625, -0.004180908203125, 0.0007171630859375, 0.00775146484375, 0.00145721435546875, 0.00701904296875, -0.0026397705078125, 0.003082275390625, 0.0179443359375, -0.0201416015625, -0.00341796875, 0.020751953125, -0.010009765625, -0.0169677734375, -0.00064849853515625, -0.0173339...
[ 16817, 6371, 2203, 6, 191379, 2819, 67398, 219575, 19338, 661, 64, 1745, 38, 20596, 182512, 16, 132, 4, 30174, 605, 16395, 15772, 30648, 60813, 502, 4867, 12, 11, 5928, 454, 2271, 4460, 5, 1639, 126381, 49444, 7, 120968, 420, 441, 38931...
[ 0.269775390625, 0.255615234375, 0.1373291015625, 0.006195068359375, 0.217041015625, 0.0858154296875, 0.11181640625, 0.137939453125, 0.147216796875, 0.0189971923828125, 0.00408935546875, 0.0963134765625, 0.08734130859375, 0.27001953125, 0.1771240234375, 0.00433349609375, 0.07360839843...
embed
31529755_c1
31529755
prolog
1
)); ((X=john)-> ((isrich(Y))-> (female(X), male(Y)); female(X)); male(X),female(Y)); ((X=harry)-> ((isrich(Y))-> (female(X), male(Y)); female(X)); male(X),female(Y)); ((X=fred)-> ((hasbrunette(Y))-> (female(X), male(Y)); female(X)); male(X),female(Y)). i thought (Statement)->(if true run this statement);(if false run t...
)); ((X=john)-> ((isrich(Y))-> (female(X), male(Y)); female(X)); male(X),female(Y)); ((X=harry)-> ((isrich(Y))-> (female(X), male(Y)); female(X)); male(X),female(Y)); ((X=fred)-> ((hasbrunette(Y))-> (female(X), male(Y)); female(X)); male(X),female(Y)). i thought (Statement)->(if true run this statement);(if false run t...
[ 0.0157470703125, 0.0031890869140625, 0.00653076171875, 0.031005859375, -0.005859375, 0.02001953125, 0.004547119140625, -0.01177978515625, -0.00653076171875, -0.010498046875, -0.01483154296875, -0.011474609375, -0.006256103515625, 0.00823974609375, 0.00970458984375, 0.0234375, 0.01721...
[ 1388, 3142, 60494, 1542, 1369, 66159, 19, 103607, 164, 26932, 1723, 2242, 49100, 247, 11280, 117776, 3467, 1294, 41347, 10557, 11911, 60765, 17569, 135206, 5911, 3190, 29568, 11675, 903, 63805, 98320, 7108, 51515, 23, 1250, 4867, 44084, 83, ...
[ 0.00396728515625, 0.087890625, 0.03717041015625, 0.1148681640625, 0.0289154052734375, 0.135009765625, 0.09710693359375, 0.03985595703125, 0.0621337890625, 0.200927734375, 0.1258544921875, 0.1180419921875, 0.1295166015625, 0.0054931640625, 0.121337890625, 0.14306640625, 0.06591796875,...
embed
27881888_c0
27881888
prolog
0
Title: SWI-Prolog backtracking on a web site Problem title: SWI-Prolog backtracking on a web site Tags: prolog, web Problem: SWI-Prolog backtracking on a web site I want to create an expert system using Prolog. The main requirement is to use SWI-Prolog. I've already created some pages for my service. I want to use back...
SWI-Prolog backtracking on a web site SWI-Prolog backtracking on a web site prolog web SWI-Prolog SWI-Prolog backtracking on a web site I want to create an expert system using Prolog. The main requirement is to use SWI-Prolog. I've already created some pages for my service. I want to use backtracking to generate the qu...
[ 0.029296875, 0.044189453125, 0.00518798828125, -0.00518798828125, -0.0145263671875, 0.01031494140625, 0.006683349609375, 0.0033416748046875, -0.0103759765625, -0.07861328125, 0.023193359375, -0.002105712890625, 0.005035400390625, -0.00135040283203125, 0.0162353515625, -0.00643920898437...
[ 159, 38969, 9, 10752, 4867, 4420, 125728, 214, 98, 1467, 1764, 502, 3444, 28282, 26808, 5426, 17368, 1250, 5201, 64209, 4527, 21771, 75935, 37967, 4516, 139392, 17582, 38937, 56065, 30957, 40, 46029, 4759, 67229, 41, 3642, 678 ]
[ 0.0789794921875, 0.2427978515625, 0.009521484375, 0.1497802734375, 0.2362060546875, 0.20947265625, 0.28564453125, 0.121337890625, 0.0428466796875, 0.1273193359375, 0.127685546875, 0.119140625, 0.04864501953125, 0.1104736328125, 0.181396484375, 0.139404296875, 0.0265960693359375, 0....
embed
7116338_c0
7116338
prolog
0
Title: fastest way to search static facts with swi prolog? Problem title: fastest way to search static facts with swi prolog? Tags: swi-prolog, prolog Problem: fastest way to search static facts with swi prolog? Is there a faster way to compile or index a large number of facts to improve speed? I have roughly 30K facts...
fastest way to search static facts with swi prolog? fastest way to search static facts with swi prolog? swi-prolog prolog Id1 Id2 Grp1 Id3 fastest way to search static facts with swi prolog? Is there a faster way to compile or index a large number of facts to improve speed? I have roughly 30K facts of the form linked(g...
[ 0.00848388671875, -0.01806640625, 0.0213623046875, 0.000514984130859375, -0.01806640625, -0.016357421875, -0.00098419189453125, -0.013671875, 0.013427734375, -0.06201171875, -0.0213623046875, -0.010986328125, -0.0174560546875, -0.01129150390625, -0.01446533203125, -0.000701904296875, ...
[ 4271, 525, 3917, 33938, 201939, 15824, 7, 678, 91, 2452, 502, 4867, 3454, 24799, 418, 304, 13779, 254, 363, 56, 9969, 1340, 63262, 21334, 14012, 52295, 38352, 765, 496, 605, 3173, 3126, 51588, 532, 9790, 7413, 94878, 34475, 3447, 6183, ...
[ 0.1390380859375, 0.1043701171875, 0.12158203125, 0.2034912109375, 0.22998046875, 0.192138671875, 0.09912109375, 0.044830322265625, 0.050445556640625, 0.2032470703125, 0.14990234375, 0.2310791015625, 0.130615234375, 0.0927734375, 0.0146484375, 0.0457763671875, 0.0323486328125, 0.013...
embed
55144088_c0
55144088
prolog
0
Title: up,down,left and right cannot be used when using SWI-Prolog in terminal Problem title: up,down,left and right cannot be used when using SWI-Prolog in terminal Tags: prolog-toplevel, prolog Problem: up,down,left and right cannot be used when using SWI-Prolog in terminal I met a problem when I use prolog(swipl), a...
up,down,left and right cannot be used when using SWI-Prolog in terminal up,down,left and right cannot be used when using SWI-Prolog in terminal prolog-toplevel prolog SWI-Prolog up,down,left and right cannot be used when using SWI-Prolog in terminal I met a problem when I use prolog(swipl), after I type swipl in the te...
[ 0.02197265625, 0.026123046875, 0.01153564453125, 0.004119873046875, -0.0228271484375, -0.00799560546875, 0.01348876953125, 0.0208740234375, -0.013916015625, -0.0091552734375, -0.0023040771484375, -0.00390625, 0.00396728515625, 0.01416015625, 0.006622314453125, -0.0211181640625, -0.01...
[ 1257, 34695, 133, 2480, 136, 7108, 53418, 11814, 17368, 159, 38969, 10752, 4867, 33949, 23, 502, 13784, 67919, 435, 2967, 4527, 2452, 2424, 7103, 10644, 91, 18151, 1884, 8353, 1065, 441, 45831, 3229, 24234, 4, 7565, 25737, 759, 149186, 73...
[ 0.18310546875, 0.1988525390625, 0.03192138671875, 0.1226806640625, 0.04449462890625, 0.166259765625, 0.145751953125, 0.1685791015625, 0.0634765625, 0.050750732421875, 0.227783203125, 0.1409912109375, 0.205810546875, 0.2587890625, 0.032135009765625, 0.1392822265625, 0.0423583984375, ...
embed
21648631_c0
21648631
prolog
0
Title: converting a list that contain an equation Problem title: converting a list that contain an equation Tags: dcg, prolog Problem: converting a list that contain an equation I have a question regarding Prolog. Actually I have a Prolog function that call a list of numbers and signs and I want to convert the list fro...
converting a list that contain an equation converting a list that contain an equation dcg prolog converting a list that contain an equation I have a question regarding Prolog. Actually I have a Prolog function that call a list of numbers and signs and I want to convert the list from post equation to pre equation. for e...
[ 0.01141357421875, -0.01055908203125, -0.005035400390625, 0.0228271484375, -0.00799560546875, 0.00421142578125, -0.0184326171875, 0.013671875, 0.0189208984375, -0.01495361328125, -0.004364013671875, -0.003387451171875, -0.002716064453125, -0.006561279296875, -0.0027008056640625, -0.0047...
[ 96760, 214, 5303, 450, 70541, 28, 5490, 2320, 10, 104, 238, 177, 502, 4867, 142, 1250, 32354, 11782, 101935, 136, 24092, 3444, 1295, 1305, 47, 479, 16750, 4343, 27781 ]
[ 0.1724853515625, 0.06817626953125, 0.2276611328125, 0.04888916015625, 0.164794921875, 0.0594482421875, 0.2418212890625, 0.0916748046875, 0.0194854736328125, 0.030670166015625, 0.04437255859375, 0.1156005859375, 0.126220703125, 0.2137451171875, 0.00958251953125, 0.130126953125, 0.1276...
embed
26032593_c0
26032593
prolog
0
Title: Modulus in Prolog Problem title: Modulus in Prolog Tags: prolog Problem: Modulus in Prolog I am trying to use a conditional statement if N is even do something otherwise do something else. Here is some part of my code where I am doing this: (N,Lines,1):-write(N),nl, ( mod(N,2) = 0 -> write('Hello'),nl,write('Aga...
Modulus in Prolog Modulus in Prolog prolog Modulus Prolog Lines Hello Again Modulus in Prolog I am trying to use a conditional statement if N is even do something otherwise do something else. Here is some part of my code where I am doing this: But even if I give N=6 it goes into foo(N,Lines) i.e else part. It is not go...
[ -0.006561279296875, 0.008544921875, 0.01226806640625, 0.004486083984375, 0.01422119140625, 0.029541015625, 0.038818359375, 0.01806640625, 0.0103759765625, -0.0179443359375, 0.00250244140625, -0.034912109375, 0.0032806396484375, -0.0166015625, 0.0113525390625, 0.00439453125, 0.0070190...
[ 63014, 223, 23, 1250, 4867, 502, 16777, 35378, 110196, 31577, 4527, 35431, 289, 63805, 2174, 541, 83, 3853, 54, 9844, 120262, 37076, 2831, 18151, 8337, 1369, 910, 60899, 3934, 5775, 31, 839, 93232, 959, 7730, 14192, 44691 ]
[ 0.1981201171875, 0.109130859375, 0.04022216796875, 0.1591796875, 0.275390625, 0.089111328125, 0.1329345703125, 0.0968017578125, 0.09130859375, 0.04986572265625, 0.05291748046875, 0.18994140625, 0.1197509765625, 0.1697998046875, 0.1734619140625, 0.1536865234375, 0.0994873046875, 0.1...
embed
26417146_c0
26417146
prolog
0
Title: Sum numbers up to N-M in Prolog Problem title: Sum numbers up to N-M in Prolog Tags: recursion, prolog Problem: Sum numbers up to N-M in Prolog Hey I need to make a function countNM(N,M,S) that sums all the numbers up to N-M (and returns 0 if N is equal to or less than M). I have worked it out and what I have ma...
Sum numbers up to N-M in Prolog Sum numbers up to N-M in Prolog recursion prolog Sum N-M Prolog Sum numbers up to N-M in Prolog Hey I need to make a function countNM(N,M,S) that sums all the numbers up to N-M (and returns 0 if N is equal to or less than M). I have worked it out and what I have makes sense when I work t...
[ -0.0037841796875, 0.015625, 0.0247802734375, 0.006988525390625, -0.00171661376953125, 0.01153564453125, -0.005859375, 0.0169677734375, 0.011474609375, -0.00390625, -0.002593994140625, -0.0172119140625, -0.0015716552734375, 0.0174560546875, 0.02685546875, 0.00009059906005859375, 0.024...
[ 36335, 101935, 1257, 47, 541, 9, 594, 23, 1250, 4867, 195625, 1830, 502, 28240, 3871, 3249, 32354, 54529, 70480, 132, 839, 294, 10554, 756, 30646, 757, 2174, 105950, 40715, 3501, 276, 79786, 1810, 10422, 4488, 10336, 9844, 143034, 27686 ]
[ 0.193359375, 0.18359375, 0.0977783203125, 0.06201171875, 0.1513671875, 0.100830078125, 0.2138671875, 0.0594482421875, 0.1614990234375, 0.2464599609375, 0.157958984375, 0.044586181640625, 0.103759765625, 0.01654052734375, 0.0789794921875, 0.0289764404296875, 0.1678466796875, 0.18090...
embed
5452333_c0
5452333
prolog
0
Title: iterate through alphabet in prolog Problem title: iterate through alphabet in prolog Tags: prolog Problem: iterate through alphabet in prolog Let's say I want to have some rule for comparison similar to isin(0,_). isin(N,List) :- member(N,List), write(N), N1 is N-1, isin(N1,List). but the List will contain alpha...
iterate through alphabet in prolog iterate through alphabet in prolog prolog List N-1 iterate through alphabet in prolog Let's say I want to have some rule for comparison similar to but the List will contain alphabet symbols (e.g. [a,b,d,e,h]). How can I send the next element to the iteration? (so N is a symbol, not a ...
[ 0.000530242919921875, -0.0155029296875, 0.008544921875, 0.037109375, -0.028076171875, 0.0035400390625, 0.0191650390625, 0.0189208984375, -0.000652313232421875, -0.005523681640625, 0.006927490234375, 0.006317138671875, 0.006591796875, 0.00011587142944335938, 0.00118255615234375, 0.00124...
[ 17, 8560, 67, 8305, 229231, 23, 502, 4867, 32036, 541, 5759, 3444, 79986, 225490, 21373, 1284, 70541, 26582, 11, 275, 71, 127, 11249, 25379, 11737, 12830, 47, 720, 2320, 83, 959, 14012, 7722, 3249, 129745 ]
[ 0.042327880859375, 0.24560546875, 0.07110595703125, 0.1551513671875, 0.244384765625, 0.052337646484375, 0.16259765625, 0.2333984375, 0.145751953125, 0.1036376953125, 0.159912109375, 0.04315185546875, 0.1424560546875, 0.1884765625, 0.11328125, 0.007598876953125, 0.081787109375, 0.20...
embed
43412207_c0
43412207
prolog
0
Title: Can someone help me with the Sublist Predicate (Prolog)? Problem title: Can someone help me with the Sublist Predicate (Prolog)? Tags: prolog, sublist Problem: Can someone help me with the Sublist Predicate (Prolog)? I want to implement a predicate sublist1(I1,I2,L,Sub) that takes list L and returns Sub that inc...
Can someone help me with the Sublist Predicate (Prolog)? Can someone help me with the Sublist Predicate (Prolog)? prolog sublist Can Sublist Predicate Prolog sublist1 Sub I2-1 II1 I1-1 II2 Can someone help me with the Sublist Predicate (Prolog)? I want to implement a predicate sublist1(I1,I2,L,Sub) that takes list L an...
[ -0.00168609619140625, -0.015380859375, 0.01495361328125, -0.0040283203125, -0.02587890625, 0.0194091796875, -0.00046539306640625, 0.01287841796875, 0.0159912109375, 0.005767822265625, 0.001251220703125, 0.0174560546875, -0.00665283203125, -0.00384521484375, 0.008056640625, 0.0090942382...
[ 4171, 22008, 4358, 678, 8273, 6562, 7145, 2063, 67, 10752, 4867, 502, 1614, 1250, 418, 87, 146971, 1995, 115727, 304, 3444, 29479, 1653, 568, 866, 96472, 51776, 5303, 339, 30646, 450, 96853, 80854, 63262, 5442, 18151, 98320, 756, 1733, 77...
[ 0.06689453125, 0.0204620361328125, 0.1014404296875, 0.050323486328125, 0.261962890625, 0.2445068359375, 0.1614990234375, 0.1978759765625, 0.0872802734375, 0.1397705078125, 0.2198486328125, 0.1240234375, 0.2276611328125, 0.152099609375, 0.0635986328125, 0.049896240234375, 0.0941162109...
embed
62385117_c0
62385117
prolog
0
Title: Atom Appears in Section T1 Rewrite all a to c Problem title: Atom Appears in Section T1 Rewrite all a to c Tags: prolog Problem: Atom Appears in Section T1 Rewrite all a to c I can do it on the list, but I don't know what to do about the term. The answer I want is as follows. s_atoc(f(f(a)),X) X=f(f(c)) s_atoc(f...
Atom Appears in Section T1 Rewrite all a to c Atom Appears in Section T1 Rewrite all a to c prolog Atom Appears Section Rewrite s_atoc Atom Appears in Section T1 Rewrite all a to c I can do it on the list, but I don't know what to do about the term. The answer I want is as follows.
[ 0.007232666015625, 0.024658203125, -0.001983642578125, 0.0260009765625, 0.013916015625, -0.018310546875, -0.00457763671875, 0.03125, 0.00390625, -0.00811767578125, 0.02099609375, 0.028564453125, 0.01495361328125, 0.03515625, 0.021728515625, 0.0012359619140625, 0.007720947265625, 0....
[ 69728, 5659, 28575, 23, 140978, 384, 418, 853, 434, 18781, 756, 10, 47, 501, 502, 4867, 91, 2832, 238, 831, 54, 442, 98, 70, 5303, 18, 3714, 2367, 1672, 13579, 35166, 3444, 237, 28960 ]
[ 0.271240234375, 0.130615234375, 0.1756591796875, 0.0201873779296875, 0.2110595703125, 0.11962890625, 0.10723876953125, 0.1185302734375, 0.1668701171875, 0.2142333984375, 0.1097412109375, 0.08892822265625, 0.1370849609375, 0.1243896484375, 0.12060546875, 0.1868896484375, 0.04452514648...
embed
45313406_c0
45313406
prolog
0
Title: Getting the cursor&#x27;s current position on the screen in SWI-Prolog Problem title: Getting the cursor&#x27;s current position on the screen in SWI-Prolog Tags: escaping, ascii, cursor, position, prolog Problem: Getting the cursor's current position on the screen in SWI-Prolog Does anyone know how to get the c...
Getting the cursor&#x27;s current position on the screen in SWI-Prolog Getting the cursor&#x27;s current position on the screen in SWI-Prolog escaping ascii cursor position prolog Getting SWI-Prolog Getting the cursor's current position on the screen in SWI-Prolog Does anyone know how to get the cursor's current positi...
[ 0.0098876953125, 0.0284423828125, 0.0018310546875, 0.002349853515625, -0.01495361328125, -0.0001430511474609375, 0.0240478515625, 0.0035400390625, -0.01708984375, -0.03173828125, 0.034423828125, -0.006591796875, -0.019287109375, -0.002288818359375, 0.001373291015625, 0.0062255859375, ...
[ 210732, 13810, 42, 3768, 7, 43581, 19069, 98, 49119, 23, 159, 38969, 10752, 4867, 38940, 10366, 237, 26506, 502, 70, 35672, 3714, 3642, 47, 2046, 25, 9, 125429, 10001, 144281, 18151, 26513, 55681, 29479, 903, 1250 ]
[ 0.1160888671875, 0.22314453125, 0.2138671875, 0.108642578125, 0.001922607421875, 0.251708984375, 0.2169189453125, 0.0142059326171875, 0.206298828125, 0.057464599609375, 0.05908203125, 0.219482421875, 0.146484375, 0.23681640625, 0.1402587890625, 0.0204010009765625, 0.0040283203125, ...
embed
6455531_c0
6455531
prolog
0
Title: Prolog: adding text to the end of a file Problem title: Prolog: adding text to the end of a file Tags: prolog Problem: Prolog: adding text to the end of a file I want to add text to a database in prolog. Something like adding :- tell('a.txt'), write('abc'), told. but not overwriting the a.txt. I've tried using a...
Prolog: adding text to the end of a file Prolog: adding text to the end of a file prolog Prolog a.txt Prolog: adding text to the end of a file I want to add text to a database in prolog. Something like but not overwriting the a.txt. I've tried using append like this: but it didn't work. The listener just give a 'no' re...
[ 0.033203125, 0.01953125, 0.0098876953125, 0.010498046875, -0.010986328125, 0.00194549560546875, -0.004486083984375, 0.020751953125, 0.008056640625, -0.0380859375, 0.000789642333984375, 0.01239013671875, -0.01513671875, 0.01416015625, 0.0341796875, -0.0322265625, 0.015869140625, 0.0...
[ 1250, 4867, 12, 154107, 7986, 47, 70, 3564, 111, 11435, 502, 10, 5, 124326, 3444, 15190, 63399, 1884, 959, 645, 199332, 37842, 114689, 71, 903, 18, 4488, 44632, 56, 157, 57553, 98816, 17368, 2022, 708, 4358, 77947 ]
[ 0.2054443359375, 0.27734375, 0.020843505859375, 0.154541015625, 0.213623046875, 0.1002197265625, 0.0218048095703125, 0.177490234375, 0.072509765625, 0.1876220703125, 0.1728515625, 0.1231689453125, 0.0155181884765625, 0.2060546875, 0.07208251953125, 0.14453125, 0.19091796875, 0.0299...
embed
20852980_c0
20852980
prolog
0
Title: Prolog: &quot;findall&quot; for limited number of solutions Problem title: Prolog: &quot;findall&quot; for limited number of solutions Tags: prolog Problem: Prolog: "findall" for limited number of solutions Say I want to find sum of all solutions to a predicate, I just can use findall(L, find(L), Sols), and just...
Prolog: &quot;findall&quot; for limited number of solutions Prolog: &quot;findall&quot; for limited number of solutions prolog Prolog Sols Prolog: "findall" for limited number of solutions Say I want to find sum of all solutions to a predicate, I just can use and just sum members of Sols. But what if find(L) has a huge...
[ 0.005828857421875, 0.0023193359375, 0.0064697265625, 0.007415771484375, -0.019287109375, 0.00909423828125, -0.00543212890625, 0.0038299560546875, 0.024658203125, -0.054931640625, 0.00604248046875, 0.001983642578125, -0.0003681182861328125, -0.00531005859375, 0.0224609375, 0.02233886718...
[ 1250, 4867, 12, 111607, 5584, 100, 84046, 14012, 51347, 502, 6678, 7, 111, 3444, 47, 7413, 10554, 756, 1653, 2063, 1660, 831, 4527, 43032, 2367, 2174, 132, 866, 1556, 58696, 48310, 51139, 2046, 4734, 5117, 209, 2856, 903, 1821, 2886, 33...
[ 0.1619873046875, 0.243408203125, 0.02423095703125, 0.1741943359375, 0.2646484375, 0.0946044921875, 0.1888427734375, 0.11376953125, 0.2127685546875, 0.1063232421875, 0.21728515625, 0.1173095703125, 0.1015625, 0.09912109375, 0.02398681640625, 0.213623046875, 0.1827392578125, 0.118774...
embed
55399720_c0
55399720
prolog
0
Title: How to trim right whitespaces from String in prolog? Problem title: How to trim right whitespaces from String in prolog? Tags: prolog, trim, whitespace Problem: How to trim right whitespaces from String in prolog? I would like to trim right whitespace from strings for example. "Dog " becomes "Dog" , " " becomes ...
How to trim right whitespaces from String in prolog? How to trim right whitespaces from String in prolog? prolog trim whitespace String How How to trim right whitespaces from String in prolog? I would like to trim right whitespace from strings for example. "Dog " becomes "Dog" , " " becomes "". How could this be achiev...
[ 0.015380859375, 0.045166015625, 0.017333984375, 0.011962890625, -0.01214599609375, 0.000568389892578125, 0.00494384765625, 0.0223388671875, -0.0028076171875, -0.02587890625, 0.00007677078247070312, -0.013427734375, -0.0390625, -0.0150146484375, 0.0020904541015625, 0.0022735595703125, ...
[ 11249, 47, 85247, 7108, 35011, 65421, 7, 1295, 23351, 214, 23, 502, 4867, 1884, 79315, 397, 1663, 24209, 69307, 38969, 1653, 2063, 25737, 165132, 29806 ]
[ 0.05401611328125, 0.0180816650390625, 0.247314453125, 0.2066650390625, 0.183349609375, 0.256591796875, 0.05511474609375, 0.0838623046875, 0.1949462890625, 0.1175537109375, 0.052032470703125, 0.1363525390625, 0.23046875, 0.009033203125, 0.2091064453125, 0.0946044921875, 0.157592773437...
embed
14681542_c0
14681542
prolog
0
Title: How to get sum of list which is inside another list? Problem title: How to get sum of list which is inside another list? Tags: lambda, prolog, swi-prolog Problem: How to get sum of list which is inside another list? I have a list which consists number of lists. I would like to get sum of those lists into another...
How to get sum of list which is inside another list? How to get sum of list which is inside another list? lambda prolog swi-prolog How How to get sum of list which is inside another list? I have a list which consists number of lists. I would like to get sum of those lists into another list. I would like to get an outpu...
[ -0.005462646484375, 0.01611328125, -0.00016689300537109375, 0.012451171875, -0.037353515625, 0.0032958984375, 0.01025390625, 0.0177001953125, 0.01153564453125, -0.043701171875, 0.0036163330078125, -0.0125732421875, -0.002349853515625, 0.01416015625, -0.001922607421875, 0.00260925292968...
[ 11249, 47, 2046, 10554, 111, 5303, 3129, 83, 46132, 15700, 6492, 85, 502, 4867, 2452, 3454, 58055, 14012, 1884, 3934, 140992, 35064, 339, 9323, 3117, 12951, 73342, 3642, 54, 129745 ]
[ 0.07183837890625, 0.07257080078125, 0.1181640625, 0.244140625, 0.1336669921875, 0.2235107421875, 0.07440185546875, 0.09619140625, 0.1905517578125, 0.12255859375, 0.09283447265625, 0.04510498046875, 0.0867919921875, 0.177001953125, 0.151611328125, 0.07916259765625, 0.06072998046875, ...
embed
13613530_c0
13613530
prolog
0
Title: Prolog Rules/Queries Problem title: Prolog Rules/Queries Tags: prolog, rules Problem: Prolog Rules/Queries Given the following facts: people(ana, az, 13). people(sam, ca, 24). people(tom, il, 5). people(ginger, ca, 52). How would I write a prolog rule that answers the following question? Person is the adult if h...
Prolog Rules/Queries Prolog Rules/Queries prolog rules Prolog Rules Queries is_adult Person State Age Prolog Rules/Queries Given the following facts: How would I write a prolog rule that answers the following question? This is what I have so far.... (Thanks in advance I'm new at this)
[ 0.0101318359375, 0.0087890625, 0.00107574462890625, 0.0186767578125, -0.0157470703125, 0.0186767578125, -0.0230712890625, 0.00142669677734375, -0.00299072265625, -0.0242919921875, 0.005462646484375, -0.032470703125, -0.02099609375, 0.00946044921875, 0.025634765625, -0.00848388671875, ...
[ 1250, 4867, 139118, 64, 41732, 10484, 7, 502, 91736, 5813, 83, 181648, 15270, 22836, 72944, 77878, 25632, 15824, 11249, 2806, 87, 33022, 10, 79986, 450, 35166, 9655, 765, 221, 2060, 188774, 3525, 99, 903 ]
[ 0.167724609375, 0.2449951171875, 0.1817626953125, 0.04986572265625, 0.1329345703125, 0.12249755859375, 0.00241851806640625, 0.1572265625, 0.166015625, 0.12445068359375, 0.10650634765625, 0.21240234375, 0.173828125, 0.14404296875, 0.22021484375, 0.0222320556640625, 0.08154296875, 0....
embed
22595064_c0
22595064
prolog
0
Title: prolog How to get a permutaion of a list of a certain data structure .? Problem title: prolog How to get a permutaion of a list of a certain data structure .? Tags: prolog Problem: prolog How to get a permutaion of a list of a certain data structure .? Can Anybody help me get all possible games not just what I a...
prolog How to get a permutaion of a list of a certain data structure .? prolog How to get a permutaion of a list of a certain data structure .? prolog How RoundNumber prolog How to get a permutaion of a list of a certain data structure .? Can Anybody help me get all possible games not just what I achieved here which is...
[ -0.00897216796875, 0.00701904296875, 0.00567626953125, -0.00020885467529296875, -0.021728515625, -0.0155029296875, -0.0244140625, -0.000019311904907226562, 0.01287841796875, -0.0185546875, -0.018798828125, -0.0118408203125, 0.01287841796875, 0.0091552734375, -0.004150390625, 0.00775146...
[ 502, 4867, 11249, 47, 2046, 117, 561, 102, 1830, 5303, 24233, 2053, 45646, 162856, 18444, 26278, 37873, 4358, 756, 7722, 27528, 69307, 3688, 1632, 162515 ]
[ 0.1549072265625, 0.1905517578125, 0.045135498046875, 0.052276611328125, 0.1090087890625, 0.126220703125, 0.2041015625, 0.1324462890625, 0.1239013671875, 0.1298828125, 0.03228759765625, 0.0787353515625, 0.1673583984375, 0.1778564453125, 0.14453125, 0.1591796875, 0.012359619140625, 0...
embed
44258749_c0
44258749
prolog
0
Title: Finding sum of two fractions prolog Problem title: Finding sum of two fractions prolog Tags: prolog, fractions Problem: Finding sum of two fractions prolog How can I calculate the sum of two fractions in Prolog. Lets name the function fracsum(X,Y,Z) with x+y=z (x and y fractions to give z also as fraction). Some...
Finding sum of two fractions prolog Finding sum of two fractions prolog prolog fractions Finding Finding sum of two fractions prolog How can I calculate the sum of two fractions in Prolog. Lets name the function fracsum(X,Y,Z) with x+y=z (x and y fractions to give z also as fraction). Some examples : fracsum(1/9,1/9,Z)...
[ -0.00372314453125, -0.0004749298095703125, 0.006103515625, -0.01361083984375, -0.031005859375, 0.0174560546875, -0.00994873046875, 0.00677490234375, 0.0233154296875, -0.0087890625, 0.0157470703125, 0.0018310546875, 0.00090789794921875, -0.0230712890625, 0.01373291015625, 0.021728515625...
[ 26040, 214, 10554, 111, 6626, 175921, 7, 502, 4867, 831, 87, 74481, 67, 70, 23, 1250, 32354, 588, 4439, 316, 1542, 1723, 1511, 1022, 1328, 53, 1369, 169, 425, 113, 8337, 97, 237, 27781, 22364, 50339, 567, 55257, 104116, 18113, 459, 25...
[ 0.1044921875, 0.0262908935546875, 0.231689453125, 0.0894775390625, 0.209228515625, 0.25830078125, 0.0626220703125, 0.1546630859375, 0.229248046875, 0.038909912109375, 0.0191650390625, 0.15869140625, 0.0662841796875, 0.040252685546875, 0.0657958984375, 0.1658935546875, 0.119873046875,...
embed
15066610_c0
15066610
prolog
0
Title: Prolog finding and removing predicate Problem title: Prolog finding and removing predicate Tags: prolog Problem: Prolog finding and removing predicate I my have code: locdiff([A|T], [A|_], T). locdiff([H|T], L2, [H|T2]) :- locdiff(T, L2, T2). and when i test it with locdiff([(a,1), (b,2), (b,3), (c,3), (c,4)], [...
Prolog finding and removing predicate Prolog finding and removing predicate prolog Prolog Prolog finding and removing predicate I my have code: and when i test it with locdiff([(a,1), (b,2), (b,3), (c,3), (c,4)], [(b,_)], L3) , it only finds and removes one of the [(b,_)] which is (b,2) . I need it to find and remove b...
[ -0.00157928466796875, 0.01165771484375, 0.007598876953125, 0.00994873046875, -0.0162353515625, 0.0218505859375, 0.00009489059448242188, 0.006195068359375, -0.000324249267578125, -0.025634765625, 0.011474609375, -0.005859375, -0.0052490234375, -0.02197265625, 0.01202392578125, 0.0050048...
[ 1250, 4867, 90791, 136, 49146, 1653, 2063, 502, 6496, 67, 759, 765, 18151, 3034, 7001, 152462, 17727, 275, 10461, 21320, 29557, 454, 339, 4734, 7413, 87388, 1632, 70, 378, 3871, 15044, 70541, 4358, 156304 ]
[ 0.2020263671875, 0.268310546875, 0.1563720703125, 0.06072998046875, 0.173828125, 0.2099609375, 0.25537109375, 0.15576171875, 0.010040283203125, 0.117431640625, 0.034942626953125, 0.06396484375, 0.1910400390625, 0.156982421875, 0.1588134765625, 0.256591796875, 0.01055908203125, 0.07...
embed
36250276_c0
36250276
prolog
0
Title: Prolog implementation of nth permutation Problem title: Prolog implementation of nth permutation Tags: prolog Problem: Prolog implementation of nth permutation I'm trying to implement the nth permutation ( nPr => per(n,L,Out) ) but I keep getting a false. Here's what I'm trying to do; per(0,_,[]). per(_,[],[]). ...
Prolog implementation of nth permutation Prolog implementation of nth permutation prolog Prolog Out R-1 Prolog implementation of nth permutation I'm trying to implement the nth permutation ( nPr => per(n,L,Out) ) but I keep getting a false. Here's what I'm trying to do; What am I doing wrong? Also is there (an easier) ...
[ 0.0047607421875, 0.013916015625, 0.0194091796875, -0.006683349609375, -0.012451171875, 0.01007080078125, -0.008544921875, 0.00170135498046875, 0.000835418701171875, -0.025146484375, 0.0166015625, -0.00311279296875, 0.005096435546875, 0.01611328125, -0.00518798828125, 0.016845703125, ...
[ 1250, 4867, 208124, 653, 927, 117, 561, 22062, 502, 13538, 627, 5759, 31577, 29479, 683, 42, 44357, 132, 19, 866, 79858, 1284, 13695, 20949, 98320, 20594, 44691, 99156, 17368, 88303, 23, 1653, 2063, 67 ]
[ 0.1761474609375, 0.2264404296875, 0.157470703125, 0.19873046875, 0.2420654296875, 0.17626953125, 0.1710205078125, 0.07769775390625, 0.1256103515625, 0.1761474609375, 0.09881591796875, 0.1181640625, 0.04083251953125, 0.175537109375, 0.090087890625, 0.13720703125, 0.007720947265625, ...
embed
3326284_c0
3326284
prolog
0
Title: Prolog - find words in matrix Problem title: Prolog - find words in matrix Tags: prolog Problem: Prolog - find words in matrix Given an nxn letter matrix and a list of words, the program should find all the appearances of the words in the matrix and their location. They could appear up-down, right-left and diago...
Prolog - find words in matrix Prolog - find words in matrix prolog Prolog Prolog - find words in matrix Given an nxn letter matrix and a list of words, the program should find all the appearances of the words in the matrix and their location. They could appear up-down, right-left and diagonally (over all 8 directions)....
[ 0.0201416015625, 0.004364013671875, -0.00701904296875, 0.00159454345703125, 0.00151824951171875, 0.01806640625, -0.00067138671875, 0.0308837890625, 0.00836181640625, -0.02587890625, -0.004730224609375, -0.0252685546875, 0.00152587890625, -0.01263427734375, -0.004913330078125, 0.0284423...
[ 1250, 4867, 7413, 34153, 23, 50944, 425, 502, 20, 77878, 19, 31330, 5303, 1528, 5608, 756, 170894, 31913, 5809, 108975, 1257, 34695, 7108, 133, 2480, 207997, 5465, 382, 48225, 2565, 831, 2499, 14012, 20028, 45234, 645, 6324, 5062, 6494, 2...
[ 0.1920166015625, 0.27197265625, 0.15478515625, 0.25341796875, 0.14453125, 0.239013671875, 0.1239013671875, 0.1534423828125, 0.006134033203125, 0.0269927978515625, 0.070068359375, 0.1326904296875, 0.105224609375, 0.1552734375, 0.059356689453125, 0.05426025390625, 0.1513671875, 0.128...
embed
35633122_c0
35633122
prolog
0
Title: Counting the number of elements in a list: how affectation works Problem title: Counting the number of elements in a list: how affectation works Tags: clpfd, prolog Problem: Counting the number of elements in a list: how affectation works I was working on a Prolog problem consisting in counting the number of ele...
Counting the number of elements in a list: how affectation works Counting the number of elements in a list: how affectation works clpfd prolog Counting Counting the number of elements in a list: how affectation works I was working on a Prolog problem consisting in counting the number of elements of a list: I can unders...
[ 0.00104522705078125, 0.01495361328125, -0.00860595703125, 0.006256103515625, 0.0108642578125, 0.0028839111328125, -0.002838134765625, 0.0062255859375, 0.0240478515625, -0.041015625, -0.0026702880859375, -0.0257568359375, 0.002288818359375, 0.0250244140625, 0.0186767578125, -0.012512207...
[ 1311, 128396, 14012, 80854, 23, 5303, 3642, 52490, 2320, 43240, 111, 10, 33139, 39557, 71, 502, 4867, 20697, 1250, 2967, 54529, 214, 831, 28219, 15400, 59121, 1884, 18, 91995, 541, 83, 1193, 21748, 390, 5759 ]
[ 0.1429443359375, 0.1845703125, 0.1566162109375, 0.2152099609375, 0.0648193359375, 0.205810546875, 0.09521484375, 0.2459716796875, 0.1192626953125, 0.16064453125, 0.0128173828125, 0.020050048828125, 0.0198211669921875, 0.051513671875, 0.075439453125, 0.09283447265625, 0.1612548828125,...
embed
65359832_c1
65359832
prolog
1
sum types are needed. I'm just really confused about inputs to grammar clauses like sentence(s(NP,VP)) or verb(v(eats)) (on the Wiki), why the arguments have such abstruse names, and how I can get started with my parser without too much hassle. expr --> [foo]. expr --> list. seq --> expr, seq. seq --> expr. list --> [...
sum types are needed. I'm just really confused about inputs to grammar clauses like sentence(s(NP,VP)) or verb(v(eats)) (on the Wiki), why the arguments have such abstruse names, and how I can get started with my parser without too much hassle. expr --> [foo]. expr --> list. seq --> expr, seq. seq --> expr. list --> [...
[ 0.01470947265625, 0.01708984375, 0.006103515625, 0.0361328125, -0.01092529296875, 0.019775390625, 0.008056640625, 0.00213623046875, 0.0120849609375, -0.004150390625, 0.0235595703125, 0.01708984375, -0.0169677734375, 0.00970458984375, 0.0029449462890625, 0.008056640625, 0.004364013671...
[ 10554, 52895, 621, 44841, 6183, 55681, 5281, 107730, 122092, 147, 70731, 90, 149357, 28814, 41195, 42792, 334, 13, 9821, 39418, 15400, 10750, 7, 6044, 1563, 10058, 184, 123055, 2046, 26859, 678, 366, 2189, 15490, 14700, 42, 129908, 3584, 31...
[ 0.2415771484375, 0.2401123046875, 0.0064697265625, 0.1466064453125, 0.040496826171875, 0.11767578125, 0.076416015625, 0.1630859375, 0.1253662109375, 0.07232666015625, 0.1390380859375, 0.0186920166015625, 0.1453857421875, 0.131103515625, 0.1572265625, 0.177001953125, 0.1484375, 0.11...
embed
4211274_c0
4211274
prolog
0
Title: Representing game board for connect 4 in prolog Problem title: Representing game board for connect 4 in prolog Tags: prolog Problem: Representing game board for connect 4 in prolog I am trying to make an interactive, text-based connect4 game in SWI Prolog, and I'm a little stuck on how to start. What I don't und...
Representing game board for connect 4 in prolog Representing game board for connect 4 in prolog prolog Representing Representing game board for connect 4 in prolog I am trying to make an interactive, text-based connect4 game in SWI Prolog, and I'm a little stuck on how to start. What I don't understand is how to repres...
[ 0.01556396484375, 0.00921630859375, 0.002685546875, 0.01611328125, -0.0123291015625, 0.0009918212890625, -0.00921630859375, 0.03369140625, 0.00872802734375, -0.013671875, -0.0311279296875, -0.007080078125, -0.004852294921875, -0.01153564453125, -0.0208740234375, 0.0184326171875, -0.0...
[ 853, 55247, 214, 6712, 45443, 100, 37067, 201, 23, 502, 4867, 31577, 3249, 212398, 7986, 77007, 617, 159, 38969, 1250, 10176, 179933, 3642, 4034, 28219, 47, 33636, 70, 831, 765, 10298, 4778, 77336, 51592, 73197, 91736, 149201, 77947 ]
[ 0.095703125, 0.2191162109375, 0.0273284912109375, 0.1480712890625, 0.264404296875, 0.06494140625, 0.2042236328125, 0.208740234375, 0.048431396484375, 0.1259765625, 0.2178955078125, 0.041015625, 0.035186767578125, 0.1026611328125, 0.122802734375, 0.06072998046875, 0.19873046875, 0.0...
embed
24477827_c0
24477827
prolog
0
Title: Adding new facts to a file in Prolog Problem title: Adding new facts to a file in Prolog Tags: prolog, sicstus-prolog Problem: Adding new facts to a file in Prolog I have a problem in Prolog regarding adding new facts to the file 'relations.pl'. Every time I get facts I save them and I use tell('relations.pl'). ...
Adding new facts to a file in Prolog Adding new facts to a file in Prolog prolog sicstus-prolog Adding Prolog relations.pl Adding new facts to a file in Prolog I have a problem in Prolog regarding adding new facts to the file 'relations.pl'. Every time I get facts I save them and I use The only problem is that I want t...
[ 0.0174560546875, 0.0137939453125, 0.0191650390625, 0.007781982421875, -0.009765625, -0.00970458984375, -0.0079345703125, 0.012939453125, 0.0084228515625, -0.060546875, 0.00408935546875, 0.02294921875, -0.0250244140625, -0.0081787109375, 0.0159912109375, -0.000782012939453125, 0.00448...
[ 62, 59725, 3525, 15824, 7, 47, 11435, 1250, 4867, 23, 502, 26536, 18253, 3454, 91582, 2424, 2967, 154107, 25653, 5256, 87769, 1733, 2046, 30098, 4527, 3444, 183540, 71864, 3082, 5701, 1286, 2499, 109954, 54 ]
[ 0.117919921875, 0.120849609375, 0.151611328125, 0.20263671875, 0.1292724609375, 0.1053466796875, 0.1966552734375, 0.1695556640625, 0.2489013671875, 0.049102783203125, 0.092529296875, 0.000946044921875, 0.1253662109375, 0.0826416015625, 0.1947021484375, 0.1400146484375, 0.0986328125, ...
embed