Warning : session_start(): open(/var/lib/php/sessions/sess_ocak10btp58n27te13efao6tjr, O_RDWR) failed: No space left on device (28) in /var/www/tb-usercake/models/config.php on line 51
Warning : session_start(): Failed to read session data: files (path: /var/lib/php/sessions) in /var/www/tb-usercake/models/config.php on line 51
tb/sol_lua_eval.java [14]
12 LINES
Source file
1 package tb;
2
3 import net.luaos.tb.common.Solution;
4
5 /** treats input as Lua expression, evaluates it and returns result (as string) */
6 public class sol_lua_eval extends Solution {
7 public String compute(String input) {
8 // We need a full statement, not just an expression, so we add "return"
9 String code = "return (" + input + ")";
10 return sol_lua.callLuaSolution(sol_lua.createLuaEnvironment(), code, null);
11 }
12 }
download show line numbers
Travelled to 12 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Image recognition results
Snippet ID:
#14
Snippet name:
tb/sol_lua_eval.java
Eternal ID of this version:
#14/1
Text MD5:
a006981982f4337c3b46b52ae0751970
Author:
stefan
Category:
Type:
Source file
Public (visible to everyone):
Yes
Archived (hidden from active list):
No
Created/modified:
Source code size:
424 bytes / 12 lines
Pitched / IR pitched:
No / No
Views / Downloads:
1590 / 432
Referenced in:
[show references]