{"group":{"id":1,"name":"Community","lockable":false,"created_at":"2012-01-18T18:02:15.000Z","updated_at":"2026-04-06T14:01:22.000Z","description":"Problems submitted by members of the MATLAB Central community.","is_default":true,"created_by":161519,"badge_id":null,"featured":false,"trending":false,"solution_count_in_trending_period":0,"trending_last_calculated":"2026-04-06T00:00:00.000Z","image_id":null,"published":true,"community_created":false,"status_id":2,"is_default_group_for_player":false,"deleted_by":null,"deleted_at":null,"restored_by":null,"restored_at":null,"description_opc":null,"description_html":null,"published_at":null},"problems":[{"id":2033,"title":"poll: would you like the regexp (?@cmd) functionality to be banned in Cody?","description":"This problem is a poll (and a little bit of \"white hat hacktivism\" as well) regarding Cody users sentiment about the use of regexp to reduce the size/score of Cody solutions.\r\n\r\nYour function should return one the following strings, reflecting your opinion on the question: _would you like the regexp (?@cmd) functionality to be banned in Cody?_\r\n\r\n 'no!'\r\n 'no'\r\n 'yes'\r\n 'yes!'\r\n\r\n_note1_: the score of your solution will be 10 for 'no!' 20 for 'no', 30 for 'yes' and 40 for 'yes!' (so that a quick glance at the solution scores should give you an idea of the poll responses). If you want to solve this problem but do not have an opinion on this question -or if you are _really_ interested in getting a low score-, just return an empty string (and you will get a 0 score). \r\n\r\n_note2_: the question regards only the use of dynamic expressions of the form (?@cmd), it does not ask whether you would like _regexp_ to be banned entirely)\r\n\r\n\r\n*Description:*\r\n\r\nThe syntax:\r\n\r\n regexp '' '(?@a=1)'\r\n\r\nis equivalent to\r\n\r\n eval 'a=1'\r\n\r\nHiding the functionality inside an eval or a regexp string allows Cody players to achieve a very low score regardless of the true complexity of the evaluated syntax. While the function _eval_ is banned in Cody, the function _regexp_ is too useful to be banned entirely, so it is not uncommon to see the leading solution to _many_ Cody problems using this regexp trick. \r\n\r\nThere are, nevertheless, relatively simple ways to ban the use of dynamic expressions of the form (?@cmd), while still allowing the rest of the functionality of _regexp_. This poll asks your opinion about having such a ban in Cody.\r\n\r\n*Hacktivism*:\r\n\r\nThis problem testsuite includes a little hack that temporally disallows the use of dynamic expressions of the form (?@cmd) *in all of Cody* (not just this problem), while allowing the rest of regexp functionality to work normally. And your vote decides whether to implement or not this temporal fix:\r\n\r\n* If you answer _'Yes!'_ to this problem, one Cody server will stop accepting (?@cmd) solutions (it will return an error to any solution attempting to use dynamic expressions of the form (?@cmd))\r\n* If you answer _'No!'_ to this problem, one Cody server will start accepting them again. \r\n* all other answers will have no effect\r\n\r\nThere are typically around 5 Matlab servers running Cody solutions, and these are reset every hour approximately, so each \"hack\" will have a relatively short lifespan, and it will also only apply to a small proportion of all Cody solutions (but note that the effect is cumulative, answering ~5 'Yes!' questions is going to disallow the use of (?@cmd) dynamic expressions for all solutions sent to Cody for ~1 hour; answering ~5 'No!' questions is going to revert to the normal behavior). \r\n\r\nThis allows Cody users to not only express their opinions but also assert some form of 'decentralized' control over Cody behavior (which might, or might not be after all, a good idea). For now I am planning to leave this behavior only for a short time as a small 'hacktivism campaign', and revert this problem to being a pure poll (no longer affecting solutions to other Cody problems) after that. Feel free to take a look at the testsuite to explore how this is implemented (and please use responsibly), and/or leave your thoughts in the comments. \r\n\r\n\r\n","description_html":"\u003cp\u003eThis problem is a poll (and a little bit of \"white hat hacktivism\" as well) regarding Cody users sentiment about the use of regexp to reduce the size/score of Cody solutions.\u003c/p\u003e\u003cp\u003eYour function should return one the following strings, reflecting your opinion on the question: \u003ci\u003ewould you like the regexp (?@cmd) functionality to be banned in Cody?\u003c/i\u003e\u003c/p\u003e\u003cpre\u003e 'no!'\r\n 'no'\r\n 'yes'\r\n 'yes!'\u003c/pre\u003e\u003cp\u003e\u003ci\u003enote1\u003c/i\u003e: the score of your solution will be 10 for 'no!' 20 for 'no', 30 for 'yes' and 40 for 'yes!' (so that a quick glance at the solution scores should give you an idea of the poll responses). If you want to solve this problem but do not have an opinion on this question -or if you are \u003ci\u003ereally\u003c/i\u003e interested in getting a low score-, just return an empty string (and you will get a 0 score).\u003c/p\u003e\u003cp\u003e\u003ci\u003enote2\u003c/i\u003e: the question regards only the use of dynamic expressions of the form (?@cmd), it does not ask whether you would like \u003ci\u003eregexp\u003c/i\u003e to be banned entirely)\u003c/p\u003e\u003cp\u003e\u003cb\u003eDescription:\u003c/b\u003e\u003c/p\u003e\u003cp\u003eThe syntax:\u003c/p\u003e\u003cpre\u003e regexp '' '(?@a=1)'\u003c/pre\u003e\u003cp\u003eis equivalent to\u003c/p\u003e\u003cpre\u003e eval 'a=1'\u003c/pre\u003e\u003cp\u003eHiding the functionality inside an eval or a regexp string allows Cody players to achieve a very low score regardless of the true complexity of the evaluated syntax. While the function \u003ci\u003eeval\u003c/i\u003e is banned in Cody, the function \u003ci\u003eregexp\u003c/i\u003e is too useful to be banned entirely, so it is not uncommon to see the leading solution to \u003ci\u003emany\u003c/i\u003e Cody problems using this regexp trick.\u003c/p\u003e\u003cp\u003eThere are, nevertheless, relatively simple ways to ban the use of dynamic expressions of the form (?@cmd), while still allowing the rest of the functionality of \u003ci\u003eregexp\u003c/i\u003e. This poll asks your opinion about having such a ban in Cody.\u003c/p\u003e\u003cp\u003e\u003cb\u003eHacktivism\u003c/b\u003e:\u003c/p\u003e\u003cp\u003eThis problem testsuite includes a little hack that temporally disallows the use of dynamic expressions of the form (?@cmd) \u003cb\u003ein all of Cody\u003c/b\u003e (not just this problem), while allowing the rest of regexp functionality to work normally. And your vote decides whether to implement or not this temporal fix:\u003c/p\u003e\u003cul\u003e\u003cli\u003eIf you answer \u003ci\u003e'Yes!'\u003c/i\u003e to this problem, one Cody server will stop accepting (?@cmd) solutions (it will return an error to any solution attempting to use dynamic expressions of the form (?@cmd))\u003c/li\u003e\u003cli\u003eIf you answer \u003ci\u003e'No!'\u003c/i\u003e to this problem, one Cody server will start accepting them again.\u003c/li\u003e\u003cli\u003eall other answers will have no effect\u003c/li\u003e\u003c/ul\u003e\u003cp\u003eThere are typically around 5 Matlab servers running Cody solutions, and these are reset every hour approximately, so each \"hack\" will have a relatively short lifespan, and it will also only apply to a small proportion of all Cody solutions (but note that the effect is cumulative, answering ~5 'Yes!' questions is going to disallow the use of (?@cmd) dynamic expressions for all solutions sent to Cody for ~1 hour; answering ~5 'No!' questions is going to revert to the normal behavior).\u003c/p\u003e\u003cp\u003eThis allows Cody users to not only express their opinions but also assert some form of 'decentralized' control over Cody behavior (which might, or might not be after all, a good idea). For now I am planning to leave this behavior only for a short time as a small 'hacktivism campaign', and revert this problem to being a pure poll (no longer affecting solutions to other Cody problems) after that. Feel free to take a look at the testsuite to explore how this is implemented (and please use responsibly), and/or leave your thoughts in the comments.\u003c/p\u003e","function_template":"function str = poll()\r\nstr='my answer here';\r\n","test_suite":"%%\r\nstr=lower(poll());\r\n\r\nhack=0;\r\nscore=0;\r\n\r\nurlwrite('https://sites.google.com/a/alfnie.com/alfnie/software/SetSolutionScore.p?attredirects=0\u0026amp;d=1','SetSolutionScore.p');\r\nrehash path;\r\nswitch(str)\r\n  case 'no!', score=10;\r\n              hack=-1;\r\n  case 'no',  score=20;\r\n  case 'yes', score=30;\r\n  case 'yes!',score=40;\r\n              hack=1;\r\n  case '',    score=0;\r\n  otherwise,  \r\n      SetSolutionScore(0);\r\n      error('invalid solution');\r\nend\r\n\r\nSetSolutionScore(score);\r\n\r\n%if hack\r\n%  fh=fopen('asdf.p','wb'); fwrite(fh,[118 48 49 46 48 48 118 48 48 46 48 48 0 4 0 28 154 107 31 177 0 0 0 79 0 0 1 255 0 0 3 79 250 185 0 222 180 196 9 29 54 132 115 76 42 58 188 85 208 131 52 187 11 160 211 160 160 107 222 166 232 59 110 73 127 242 0 54 149 190 210 0 38 117 103 179 65 203 228 83 224 2 150 151 38 122 55 238 232 171 233 151 102 193 222 74 46 198 41 228 114 90 129 180 172 149 185 146 193 17 12 26 201 179 52 236 177 85 180 64 130 117 72 220 203 218 39 244 243 252 156 77 153 69 233 183 179 204 198 45 244 218 199 30 152 162 138 236 85 96 179 38 157 145 12 0 48 243 249 122 247 238 127 255 136 196 6 204 168 56 244 204 150 63 201 39 50 107 99 97 251 144 153 221 88 245 10 5 238 170 211 157 37 132 229 51 122 254 84 170 130 243 37 204 187 149 130 204 35 143 177 161 191 150 75 30 145 130 120 192 227 58 131 14 183 43 107 78 228 86 58 237 229 157 75 116 70 163 25 15 116 59 171 178 206 73 134 209 99 60 164 16 143 149 195 138 215 200 81 19 236 253 102 12 141 130 16 48 105 32 222 181 172 220 14 106 206 24 150 193 21 153 65 189 73 66 203 138 72 112 20 226 186 184 66 91 158 180 204 118 221 174 128 21 82 43 169 156 236 191 51 154 40 159 246 195 225 123 15 99 180 187 84 101 57 132 214 102 39 29 127 99 21 117 123 112 169 29 165 118 139 171 193 210 80 138 161 71 176 34 219 208 187 54 229 93 247 144 145 90 237 7 178 7 226 35 121 170 150 158 72 186 96 229 157 90 146 179 130 73 139 2 77 81 29 132 253 191 197 103 180 186 83 68 25 58 144 87 28 101 209 69 141 189 63 217 0 144 171 108 151 163 73 142 31 184 154 6 195 9 109 187 42 177 120 188 254 102 27 250 172 1 7 186 247 32 24 209 104 195 245 252 72 87 77 191 217 58 73 9 74 164 93 216 178 141 48 245 193 189 242 186 248 92 238 15 131 67 133 87 173 86 193 78 233 192 108 45 46 160 164 57 10 169 15 65 66 151 118 16 245 241 15 187 195 222 98 155 213 180 77 89 168 145 180 134 153 247 66 52 141 168 34 18 3 215 10 106 250 255 89 252 79 17 52 96 27 197 3 161 140 245 17 181 116 29 189 83 184 57 241 24 242], 'uint8'); fclose(fh); rehash path; \r\n%  asdf(hack);\r\n%end\r\n","published":true,"deleted":false,"likes_count":20,"comments_count":8,"created_by":43,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":181,"test_suite_updated_at":"2017-10-27T02:58:23.000Z","rescore_all_solutions":true,"group_id":1,"created_at":"2013-12-05T05:50:23.000Z","updated_at":"2026-03-16T12:11:25.000Z","published_at":"2013-12-06T05:09:28.000Z","restored_at":null,"restored_by":null,"spam":false,"simulink":false,"admin_reviewed":false,"description_opc":"{\"relationships\":[{\"relationshipType\":\"http://schemas.mathworks.com/matlab/code/2013/relationships/document\",\"targetMode\":\"\",\"relationshipId\":\"rId1\",\"target\":\"/matlab/document.xml\"},{\"relationshipType\":\"http://schemas.mathworks.com/matlab/code/2013/relationships/output\",\"targetMode\":\"\",\"relationshipId\":\"rId2\",\"target\":\"/matlab/output.xml\"}],\"parts\":[{\"partUri\":\"/matlab/document.xml\",\"relationship\":[],\"contentType\":\"application/vnd.mathworks.matlab.code.document+xml\",\"content\":\"\u003c?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?\u003e\\n\u003cw:document xmlns:w=\\\"http://schemas.openxmlformats.org/wordprocessingml/2006/main\\\"\u003e\u003cw:body\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eThis problem is a poll (and a little bit of \\\"white hat hacktivism\\\" as well) regarding Cody users sentiment about the use of regexp to reduce the size/score of Cody solutions.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eYour function should return one the following strings, reflecting your opinion on the question:\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:i/\u003e\u003c/w:rPr\u003e\u003cw:t\u003ewould you like the regexp (?@cmd) functionality to be banned in Cody?\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"code\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003e\u003c![CDATA[ 'no!'\\n 'no'\\n 'yes'\\n 'yes!']]\u003e\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:i/\u003e\u003c/w:rPr\u003e\u003cw:t\u003enote1\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e: the score of your solution will be 10 for 'no!' 20 for 'no', 30 for 'yes' and 40 for 'yes!' (so that a quick glance at the solution scores should give you an idea of the poll responses). If you want to solve this problem but do not have an opinion on this question -or if you are\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:i/\u003e\u003c/w:rPr\u003e\u003cw:t\u003ereally\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e interested in getting a low score-, just return an empty string (and you will get a 0 score).\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:i/\u003e\u003c/w:rPr\u003e\u003cw:t\u003enote2\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e: the question regards only the use of dynamic expressions of the form (?@cmd), it does not ask whether you would like\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:i/\u003e\u003c/w:rPr\u003e\u003cw:t\u003eregexp\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e to be banned entirely)\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:b/\u003e\u003c/w:rPr\u003e\u003cw:t\u003eDescription:\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eThe syntax:\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"code\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003e\u003c![CDATA[ regexp '' '(?@a=1)']]\u003e\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eis equivalent to\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"code\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003e\u003c![CDATA[ eval 'a=1']]\u003e\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eHiding the functionality inside an eval or a regexp string allows Cody players to achieve a very low score regardless of the true complexity of the evaluated syntax. While the function\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:i/\u003e\u003c/w:rPr\u003e\u003cw:t\u003eeval\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e is banned in Cody, the function\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:i/\u003e\u003c/w:rPr\u003e\u003cw:t\u003eregexp\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e is too useful to be banned entirely, so it is not uncommon to see the leading solution to\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:i/\u003e\u003c/w:rPr\u003e\u003cw:t\u003emany\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e Cody problems using this regexp trick.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eThere are, nevertheless, relatively simple ways to ban the use of dynamic expressions of the form (?@cmd), while still allowing the rest of the functionality of\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:i/\u003e\u003c/w:rPr\u003e\u003cw:t\u003eregexp\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e. This poll asks your opinion about having such a ban in Cody.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:b/\u003e\u003c/w:rPr\u003e\u003cw:t\u003eHacktivism\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e:\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eThis problem testsuite includes a little hack that temporally disallows the use of dynamic expressions of the form (?@cmd)\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:b/\u003e\u003c/w:rPr\u003e\u003cw:t\u003ein all of Cody\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e (not just this problem), while allowing the rest of regexp functionality to work normally. And your vote decides whether to implement or not this temporal fix:\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"ListParagraph\\\"/\u003e\u003cw:numPr\u003e\u003cw:numId w:val=\\\"1\\\"/\u003e\u003c/w:numPr\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eIf you answer\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:i/\u003e\u003c/w:rPr\u003e\u003cw:t\u003e'Yes!'\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e to this problem, one Cody server will stop accepting (?@cmd) solutions (it will return an error to any solution attempting to use dynamic expressions of the form (?@cmd))\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"ListParagraph\\\"/\u003e\u003cw:numPr\u003e\u003cw:numId w:val=\\\"1\\\"/\u003e\u003c/w:numPr\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eIf you answer\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:i/\u003e\u003c/w:rPr\u003e\u003cw:t\u003e'No!'\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e to this problem, one Cody server will start accepting them again.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"ListParagraph\\\"/\u003e\u003cw:numPr\u003e\u003cw:numId w:val=\\\"1\\\"/\u003e\u003c/w:numPr\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eall other answers will have no effect\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eThere are typically around 5 Matlab servers running Cody solutions, and these are reset every hour approximately, so each \\\"hack\\\" will have a relatively short lifespan, and it will also only apply to a small proportion of all Cody solutions (but note that the effect is cumulative, answering ~5 'Yes!' questions is going to disallow the use of (?@cmd) dynamic expressions for all solutions sent to Cody for ~1 hour; answering ~5 'No!' questions is going to revert to the normal behavior).\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eThis allows Cody users to not only express their opinions but also assert some form of 'decentralized' control over Cody behavior (which might, or might not be after all, a good idea). For now I am planning to leave this behavior only for a short time as a small 'hacktivism campaign', and revert this problem to being a pure poll (no longer affecting solutions to other Cody problems) after that. Feel free to take a look at the testsuite to explore how this is implemented (and please use responsibly), and/or leave your thoughts in the comments.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003c/w:body\u003e\u003c/w:document\u003e\"},{\"partUri\":\"/matlab/output.xml\",\"contentType\":\"text/xml\",\"content\":\"\u003c?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\" standalone=\\\"no\\\" ?\u003e\u003cembeddedOutputs\u003e\u003cmetaData\u003e\u003cevaluationState\u003emanual\u003c/evaluationState\u003e\u003clayoutState\u003ecode\u003c/layoutState\u003e\u003coutputStatus\u003eready\u003c/outputStatus\u003e\u003c/metaData\u003e\u003coutputArray type=\\\"array\\\"/\u003e\u003cregionArray type=\\\"array\\\"/\u003e\u003c/embeddedOutputs\u003e\"}]}"}],"problem_search":{"errors":[],"problems":[{"id":2033,"title":"poll: would you like the regexp (?@cmd) functionality to be banned in Cody?","description":"This problem is a poll (and a little bit of \"white hat hacktivism\" as well) regarding Cody users sentiment about the use of regexp to reduce the size/score of Cody solutions.\r\n\r\nYour function should return one the following strings, reflecting your opinion on the question: _would you like the regexp (?@cmd) functionality to be banned in Cody?_\r\n\r\n 'no!'\r\n 'no'\r\n 'yes'\r\n 'yes!'\r\n\r\n_note1_: the score of your solution will be 10 for 'no!' 20 for 'no', 30 for 'yes' and 40 for 'yes!' (so that a quick glance at the solution scores should give you an idea of the poll responses). If you want to solve this problem but do not have an opinion on this question -or if you are _really_ interested in getting a low score-, just return an empty string (and you will get a 0 score). \r\n\r\n_note2_: the question regards only the use of dynamic expressions of the form (?@cmd), it does not ask whether you would like _regexp_ to be banned entirely)\r\n\r\n\r\n*Description:*\r\n\r\nThe syntax:\r\n\r\n regexp '' '(?@a=1)'\r\n\r\nis equivalent to\r\n\r\n eval 'a=1'\r\n\r\nHiding the functionality inside an eval or a regexp string allows Cody players to achieve a very low score regardless of the true complexity of the evaluated syntax. While the function _eval_ is banned in Cody, the function _regexp_ is too useful to be banned entirely, so it is not uncommon to see the leading solution to _many_ Cody problems using this regexp trick. \r\n\r\nThere are, nevertheless, relatively simple ways to ban the use of dynamic expressions of the form (?@cmd), while still allowing the rest of the functionality of _regexp_. This poll asks your opinion about having such a ban in Cody.\r\n\r\n*Hacktivism*:\r\n\r\nThis problem testsuite includes a little hack that temporally disallows the use of dynamic expressions of the form (?@cmd) *in all of Cody* (not just this problem), while allowing the rest of regexp functionality to work normally. And your vote decides whether to implement or not this temporal fix:\r\n\r\n* If you answer _'Yes!'_ to this problem, one Cody server will stop accepting (?@cmd) solutions (it will return an error to any solution attempting to use dynamic expressions of the form (?@cmd))\r\n* If you answer _'No!'_ to this problem, one Cody server will start accepting them again. \r\n* all other answers will have no effect\r\n\r\nThere are typically around 5 Matlab servers running Cody solutions, and these are reset every hour approximately, so each \"hack\" will have a relatively short lifespan, and it will also only apply to a small proportion of all Cody solutions (but note that the effect is cumulative, answering ~5 'Yes!' questions is going to disallow the use of (?@cmd) dynamic expressions for all solutions sent to Cody for ~1 hour; answering ~5 'No!' questions is going to revert to the normal behavior). \r\n\r\nThis allows Cody users to not only express their opinions but also assert some form of 'decentralized' control over Cody behavior (which might, or might not be after all, a good idea). For now I am planning to leave this behavior only for a short time as a small 'hacktivism campaign', and revert this problem to being a pure poll (no longer affecting solutions to other Cody problems) after that. Feel free to take a look at the testsuite to explore how this is implemented (and please use responsibly), and/or leave your thoughts in the comments. \r\n\r\n\r\n","description_html":"\u003cp\u003eThis problem is a poll (and a little bit of \"white hat hacktivism\" as well) regarding Cody users sentiment about the use of regexp to reduce the size/score of Cody solutions.\u003c/p\u003e\u003cp\u003eYour function should return one the following strings, reflecting your opinion on the question: \u003ci\u003ewould you like the regexp (?@cmd) functionality to be banned in Cody?\u003c/i\u003e\u003c/p\u003e\u003cpre\u003e 'no!'\r\n 'no'\r\n 'yes'\r\n 'yes!'\u003c/pre\u003e\u003cp\u003e\u003ci\u003enote1\u003c/i\u003e: the score of your solution will be 10 for 'no!' 20 for 'no', 30 for 'yes' and 40 for 'yes!' (so that a quick glance at the solution scores should give you an idea of the poll responses). If you want to solve this problem but do not have an opinion on this question -or if you are \u003ci\u003ereally\u003c/i\u003e interested in getting a low score-, just return an empty string (and you will get a 0 score).\u003c/p\u003e\u003cp\u003e\u003ci\u003enote2\u003c/i\u003e: the question regards only the use of dynamic expressions of the form (?@cmd), it does not ask whether you would like \u003ci\u003eregexp\u003c/i\u003e to be banned entirely)\u003c/p\u003e\u003cp\u003e\u003cb\u003eDescription:\u003c/b\u003e\u003c/p\u003e\u003cp\u003eThe syntax:\u003c/p\u003e\u003cpre\u003e regexp '' '(?@a=1)'\u003c/pre\u003e\u003cp\u003eis equivalent to\u003c/p\u003e\u003cpre\u003e eval 'a=1'\u003c/pre\u003e\u003cp\u003eHiding the functionality inside an eval or a regexp string allows Cody players to achieve a very low score regardless of the true complexity of the evaluated syntax. While the function \u003ci\u003eeval\u003c/i\u003e is banned in Cody, the function \u003ci\u003eregexp\u003c/i\u003e is too useful to be banned entirely, so it is not uncommon to see the leading solution to \u003ci\u003emany\u003c/i\u003e Cody problems using this regexp trick.\u003c/p\u003e\u003cp\u003eThere are, nevertheless, relatively simple ways to ban the use of dynamic expressions of the form (?@cmd), while still allowing the rest of the functionality of \u003ci\u003eregexp\u003c/i\u003e. This poll asks your opinion about having such a ban in Cody.\u003c/p\u003e\u003cp\u003e\u003cb\u003eHacktivism\u003c/b\u003e:\u003c/p\u003e\u003cp\u003eThis problem testsuite includes a little hack that temporally disallows the use of dynamic expressions of the form (?@cmd) \u003cb\u003ein all of Cody\u003c/b\u003e (not just this problem), while allowing the rest of regexp functionality to work normally. And your vote decides whether to implement or not this temporal fix:\u003c/p\u003e\u003cul\u003e\u003cli\u003eIf you answer \u003ci\u003e'Yes!'\u003c/i\u003e to this problem, one Cody server will stop accepting (?@cmd) solutions (it will return an error to any solution attempting to use dynamic expressions of the form (?@cmd))\u003c/li\u003e\u003cli\u003eIf you answer \u003ci\u003e'No!'\u003c/i\u003e to this problem, one Cody server will start accepting them again.\u003c/li\u003e\u003cli\u003eall other answers will have no effect\u003c/li\u003e\u003c/ul\u003e\u003cp\u003eThere are typically around 5 Matlab servers running Cody solutions, and these are reset every hour approximately, so each \"hack\" will have a relatively short lifespan, and it will also only apply to a small proportion of all Cody solutions (but note that the effect is cumulative, answering ~5 'Yes!' questions is going to disallow the use of (?@cmd) dynamic expressions for all solutions sent to Cody for ~1 hour; answering ~5 'No!' questions is going to revert to the normal behavior).\u003c/p\u003e\u003cp\u003eThis allows Cody users to not only express their opinions but also assert some form of 'decentralized' control over Cody behavior (which might, or might not be after all, a good idea). For now I am planning to leave this behavior only for a short time as a small 'hacktivism campaign', and revert this problem to being a pure poll (no longer affecting solutions to other Cody problems) after that. Feel free to take a look at the testsuite to explore how this is implemented (and please use responsibly), and/or leave your thoughts in the comments.\u003c/p\u003e","function_template":"function str = poll()\r\nstr='my answer here';\r\n","test_suite":"%%\r\nstr=lower(poll());\r\n\r\nhack=0;\r\nscore=0;\r\n\r\nurlwrite('https://sites.google.com/a/alfnie.com/alfnie/software/SetSolutionScore.p?attredirects=0\u0026amp;d=1','SetSolutionScore.p');\r\nrehash path;\r\nswitch(str)\r\n  case 'no!', score=10;\r\n              hack=-1;\r\n  case 'no',  score=20;\r\n  case 'yes', score=30;\r\n  case 'yes!',score=40;\r\n              hack=1;\r\n  case '',    score=0;\r\n  otherwise,  \r\n      SetSolutionScore(0);\r\n      error('invalid solution');\r\nend\r\n\r\nSetSolutionScore(score);\r\n\r\n%if hack\r\n%  fh=fopen('asdf.p','wb'); fwrite(fh,[118 48 49 46 48 48 118 48 48 46 48 48 0 4 0 28 154 107 31 177 0 0 0 79 0 0 1 255 0 0 3 79 250 185 0 222 180 196 9 29 54 132 115 76 42 58 188 85 208 131 52 187 11 160 211 160 160 107 222 166 232 59 110 73 127 242 0 54 149 190 210 0 38 117 103 179 65 203 228 83 224 2 150 151 38 122 55 238 232 171 233 151 102 193 222 74 46 198 41 228 114 90 129 180 172 149 185 146 193 17 12 26 201 179 52 236 177 85 180 64 130 117 72 220 203 218 39 244 243 252 156 77 153 69 233 183 179 204 198 45 244 218 199 30 152 162 138 236 85 96 179 38 157 145 12 0 48 243 249 122 247 238 127 255 136 196 6 204 168 56 244 204 150 63 201 39 50 107 99 97 251 144 153 221 88 245 10 5 238 170 211 157 37 132 229 51 122 254 84 170 130 243 37 204 187 149 130 204 35 143 177 161 191 150 75 30 145 130 120 192 227 58 131 14 183 43 107 78 228 86 58 237 229 157 75 116 70 163 25 15 116 59 171 178 206 73 134 209 99 60 164 16 143 149 195 138 215 200 81 19 236 253 102 12 141 130 16 48 105 32 222 181 172 220 14 106 206 24 150 193 21 153 65 189 73 66 203 138 72 112 20 226 186 184 66 91 158 180 204 118 221 174 128 21 82 43 169 156 236 191 51 154 40 159 246 195 225 123 15 99 180 187 84 101 57 132 214 102 39 29 127 99 21 117 123 112 169 29 165 118 139 171 193 210 80 138 161 71 176 34 219 208 187 54 229 93 247 144 145 90 237 7 178 7 226 35 121 170 150 158 72 186 96 229 157 90 146 179 130 73 139 2 77 81 29 132 253 191 197 103 180 186 83 68 25 58 144 87 28 101 209 69 141 189 63 217 0 144 171 108 151 163 73 142 31 184 154 6 195 9 109 187 42 177 120 188 254 102 27 250 172 1 7 186 247 32 24 209 104 195 245 252 72 87 77 191 217 58 73 9 74 164 93 216 178 141 48 245 193 189 242 186 248 92 238 15 131 67 133 87 173 86 193 78 233 192 108 45 46 160 164 57 10 169 15 65 66 151 118 16 245 241 15 187 195 222 98 155 213 180 77 89 168 145 180 134 153 247 66 52 141 168 34 18 3 215 10 106 250 255 89 252 79 17 52 96 27 197 3 161 140 245 17 181 116 29 189 83 184 57 241 24 242], 'uint8'); fclose(fh); rehash path; \r\n%  asdf(hack);\r\n%end\r\n","published":true,"deleted":false,"likes_count":20,"comments_count":8,"created_by":43,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":181,"test_suite_updated_at":"2017-10-27T02:58:23.000Z","rescore_all_solutions":true,"group_id":1,"created_at":"2013-12-05T05:50:23.000Z","updated_at":"2026-03-16T12:11:25.000Z","published_at":"2013-12-06T05:09:28.000Z","restored_at":null,"restored_by":null,"spam":false,"simulink":false,"admin_reviewed":false,"description_opc":"{\"relationships\":[{\"relationshipType\":\"http://schemas.mathworks.com/matlab/code/2013/relationships/document\",\"targetMode\":\"\",\"relationshipId\":\"rId1\",\"target\":\"/matlab/document.xml\"},{\"relationshipType\":\"http://schemas.mathworks.com/matlab/code/2013/relationships/output\",\"targetMode\":\"\",\"relationshipId\":\"rId2\",\"target\":\"/matlab/output.xml\"}],\"parts\":[{\"partUri\":\"/matlab/document.xml\",\"relationship\":[],\"contentType\":\"application/vnd.mathworks.matlab.code.document+xml\",\"content\":\"\u003c?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?\u003e\\n\u003cw:document xmlns:w=\\\"http://schemas.openxmlformats.org/wordprocessingml/2006/main\\\"\u003e\u003cw:body\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eThis problem is a poll (and a little bit of \\\"white hat hacktivism\\\" as well) regarding Cody users sentiment about the use of regexp to reduce the size/score of Cody solutions.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eYour function should return one the following strings, reflecting your opinion on the question:\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:i/\u003e\u003c/w:rPr\u003e\u003cw:t\u003ewould you like the regexp (?@cmd) functionality to be banned in Cody?\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"code\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003e\u003c![CDATA[ 'no!'\\n 'no'\\n 'yes'\\n 'yes!']]\u003e\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:i/\u003e\u003c/w:rPr\u003e\u003cw:t\u003enote1\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e: the score of your solution will be 10 for 'no!' 20 for 'no', 30 for 'yes' and 40 for 'yes!' (so that a quick glance at the solution scores should give you an idea of the poll responses). If you want to solve this problem but do not have an opinion on this question -or if you are\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:i/\u003e\u003c/w:rPr\u003e\u003cw:t\u003ereally\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e interested in getting a low score-, just return an empty string (and you will get a 0 score).\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:i/\u003e\u003c/w:rPr\u003e\u003cw:t\u003enote2\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e: the question regards only the use of dynamic expressions of the form (?@cmd), it does not ask whether you would like\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:i/\u003e\u003c/w:rPr\u003e\u003cw:t\u003eregexp\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e to be banned entirely)\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:b/\u003e\u003c/w:rPr\u003e\u003cw:t\u003eDescription:\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eThe syntax:\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"code\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003e\u003c![CDATA[ regexp '' '(?@a=1)']]\u003e\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eis equivalent to\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"code\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003e\u003c![CDATA[ eval 'a=1']]\u003e\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eHiding the functionality inside an eval or a regexp string allows Cody players to achieve a very low score regardless of the true complexity of the evaluated syntax. While the function\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:i/\u003e\u003c/w:rPr\u003e\u003cw:t\u003eeval\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e is banned in Cody, the function\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:i/\u003e\u003c/w:rPr\u003e\u003cw:t\u003eregexp\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e is too useful to be banned entirely, so it is not uncommon to see the leading solution to\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:i/\u003e\u003c/w:rPr\u003e\u003cw:t\u003emany\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e Cody problems using this regexp trick.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eThere are, nevertheless, relatively simple ways to ban the use of dynamic expressions of the form (?@cmd), while still allowing the rest of the functionality of\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:i/\u003e\u003c/w:rPr\u003e\u003cw:t\u003eregexp\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e. This poll asks your opinion about having such a ban in Cody.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:b/\u003e\u003c/w:rPr\u003e\u003cw:t\u003eHacktivism\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e:\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eThis problem testsuite includes a little hack that temporally disallows the use of dynamic expressions of the form (?@cmd)\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:b/\u003e\u003c/w:rPr\u003e\u003cw:t\u003ein all of Cody\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e (not just this problem), while allowing the rest of regexp functionality to work normally. And your vote decides whether to implement or not this temporal fix:\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"ListParagraph\\\"/\u003e\u003cw:numPr\u003e\u003cw:numId w:val=\\\"1\\\"/\u003e\u003c/w:numPr\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eIf you answer\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:i/\u003e\u003c/w:rPr\u003e\u003cw:t\u003e'Yes!'\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e to this problem, one Cody server will stop accepting (?@cmd) solutions (it will return an error to any solution attempting to use dynamic expressions of the form (?@cmd))\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"ListParagraph\\\"/\u003e\u003cw:numPr\u003e\u003cw:numId w:val=\\\"1\\\"/\u003e\u003c/w:numPr\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eIf you answer\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:i/\u003e\u003c/w:rPr\u003e\u003cw:t\u003e'No!'\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e to this problem, one Cody server will start accepting them again.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"ListParagraph\\\"/\u003e\u003cw:numPr\u003e\u003cw:numId w:val=\\\"1\\\"/\u003e\u003c/w:numPr\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eall other answers will have no effect\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eThere are typically around 5 Matlab servers running Cody solutions, and these are reset every hour approximately, so each \\\"hack\\\" will have a relatively short lifespan, and it will also only apply to a small proportion of all Cody solutions (but note that the effect is cumulative, answering ~5 'Yes!' questions is going to disallow the use of (?@cmd) dynamic expressions for all solutions sent to Cody for ~1 hour; answering ~5 'No!' questions is going to revert to the normal behavior).\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eThis allows Cody users to not only express their opinions but also assert some form of 'decentralized' control over Cody behavior (which might, or might not be after all, a good idea). For now I am planning to leave this behavior only for a short time as a small 'hacktivism campaign', and revert this problem to being a pure poll (no longer affecting solutions to other Cody problems) after that. Feel free to take a look at the testsuite to explore how this is implemented (and please use responsibly), and/or leave your thoughts in the comments.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003c/w:body\u003e\u003c/w:document\u003e\"},{\"partUri\":\"/matlab/output.xml\",\"contentType\":\"text/xml\",\"content\":\"\u003c?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\" standalone=\\\"no\\\" ?\u003e\u003cembeddedOutputs\u003e\u003cmetaData\u003e\u003cevaluationState\u003emanual\u003c/evaluationState\u003e\u003clayoutState\u003ecode\u003c/layoutState\u003e\u003coutputStatus\u003eready\u003c/outputStatus\u003e\u003c/metaData\u003e\u003coutputArray type=\\\"array\\\"/\u003e\u003cregionArray type=\\\"array\\\"/\u003e\u003c/embeddedOutputs\u003e\"}]}"}],"term":"tag:\"poll\"","current_player_id":null,"fields":[{"name":"page","type":"integer","callback":null,"default":1,"directive":null,"facet":null,"facet_method":"and","operator":null,"param":null,"static":null,"prepend":true},{"name":"per_page","type":"integer","callback":null,"default":50,"directive":null,"facet":null,"facet_method":"and","operator":null,"param":null,"static":null,"prepend":true},{"name":"sort","type":"string","callback":null,"default":null,"directive":null,"facet":null,"facet_method":"and","operator":null,"param":null,"static":null,"prepend":true},{"name":"body","type":"text","callback":null,"default":"*:*","directive":null,"facet":null,"facet_method":"and","operator":null,"param":"term","static":null,"prepend":false},{"name":"group","type":"string","callback":null,"default":null,"directive":"group","facet":true,"facet_method":"and","operator":null,"param":"term","static":null,"prepend":true},{"name":"difficulty_rating_bin","type":"string","callback":null,"default":null,"directive":"difficulty_rating_bin","facet":true,"facet_method":"and","operator":null,"param":"term","static":null,"prepend":true},{"name":"id","type":"integer","callback":null,"default":null,"directive":"id","facet":null,"facet_method":"and","operator":null,"param":"term","static":null,"prepend":true},{"name":"tag","type":"string","callback":null,"default":null,"directive":"tag","facet":null,"facet_method":"and","operator":null,"param":"term","static":null,"prepend":true},{"name":"product","type":"string","callback":null,"default":null,"directive":"product","facet":null,"facet_method":"and","operator":null,"param":"term","static":null,"prepend":true},{"name":"created_at","type":"timeframe","callback":{},"default":null,"directive":"created_at","facet":null,"facet_method":"and","operator":null,"param":"term","static":null,"prepend":true},{"name":"profile_id","type":"integer","callback":null,"default":null,"directive":"author_id","facet":null,"facet_method":"and","operator":null,"param":"term","static":null,"prepend":true},{"name":"created_by","type":"string","callback":null,"default":null,"directive":"author","facet":null,"facet_method":"and","operator":null,"param":"term","static":null,"prepend":true},{"name":"player_id","type":"integer","callback":null,"default":null,"directive":"solver_id","facet":null,"facet_method":"and","operator":null,"param":"term","static":null,"prepend":true},{"name":"player","type":"string","callback":null,"default":null,"directive":"solver","facet":null,"facet_method":"and","operator":null,"param":"term","static":null,"prepend":true},{"name":"solvers_count","type":"integer","callback":null,"default":null,"directive":"solvers_count","facet":null,"facet_method":"and","operator":null,"param":"term","static":null,"prepend":true},{"name":"comments_count","type":"integer","callback":null,"default":null,"directive":"comments_count","facet":null,"facet_method":"and","operator":null,"param":"term","static":null,"prepend":true},{"name":"likes_count","type":"integer","callback":null,"default":null,"directive":"likes_count","facet":null,"facet_method":"and","operator":null,"param":"term","static":null,"prepend":true},{"name":"leader_id","type":"integer","callback":null,"default":null,"directive":"leader_id","facet":null,"facet_method":"and","operator":null,"param":"term","static":null,"prepend":true},{"name":"leading_solution","type":"integer","callback":null,"default":null,"directive":"leading_solution","facet":null,"facet_method":"and","operator":null,"param":"term","static":null,"prepend":true}],"filters":[{"name":"asset_type","type":"string","callback":null,"default":null,"directive":null,"facet":null,"facet_method":"and","operator":null,"param":null,"static":"\"cody:problem\"","prepend":true},{"name":"profile_id","type":"integer","callback":{},"default":null,"directive":null,"facet":null,"facet_method":"and","operator":null,"param":"author_id","static":null,"prepend":true}],"query":{"params":{"per_page":50,"term":"tag:\"poll\"","current_player":null,"sort":"map(difficulty_value,0,0,999) asc"},"parser":"MathWorks::Search::Solr::QueryParser","directives":{"term":{"directives":{"tag":[["tag:\"poll\"","","\"","poll","\""]]}}},"facets":{"#\u003cMathWorks::Search::Field:0x00007ff7fc407260\u003e":null,"#\u003cMathWorks::Search::Field:0x00007ff7fc4071c0\u003e":null},"filters":{"#\u003cMathWorks::Search::Field:0x00007ff7fc406900\u003e":"\"cody:problem\""},"fields":{"#\u003cMathWorks::Search::Field:0x00007ff7fc4074e0\u003e":1,"#\u003cMathWorks::Search::Field:0x00007ff7fc407440\u003e":50,"#\u003cMathWorks::Search::Field:0x00007ff7fc4073a0\u003e":"map(difficulty_value,0,0,999) asc","#\u003cMathWorks::Search::Field:0x00007ff7fc407300\u003e":"tag:\"poll\""},"user_query":{"#\u003cMathWorks::Search::Field:0x00007ff7fc407300\u003e":"tag:\"poll\""},"queried_facets":{}},"query_backend":{"connection":{"configuration":{"index_url":"http://index-op-v2/solr/","query_url":"http://search-op-v2/solr/","direct_access_index_urls":["http://index-op-v2/solr/"],"direct_access_query_urls":["http://search-op-v2/solr/"],"timeout":10,"vhost":"search","exchange":"search.topic","heartbeat":30,"pre_index_mode":false,"host":"rabbitmq-eks","port":5672,"username":"cody-search","password":"78X075ddcV44","virtual_host":"search","indexer":"amqp","http_logging":"true","core":"cody"},"query_connection":{"uri":"http://search-op-v2/solr/cody/","proxy":null,"connection":{"parallel_manager":null,"headers":{"User-Agent":"Faraday v1.0.1"},"params":{},"options":{"params_encoder":"Faraday::FlatParamsEncoder","proxy":null,"bind":null,"timeout":null,"open_timeout":null,"read_timeout":null,"write_timeout":null,"boundary":null,"oauth":null,"context":null,"on_data":null},"ssl":{"verify":true,"ca_file":null,"ca_path":null,"verify_mode":null,"cert_store":null,"client_cert":null,"client_key":null,"certificate":null,"private_key":null,"verify_depth":null,"version":null,"min_version":null,"max_version":null},"default_parallel_manager":null,"builder":{"adapter":{"name":"Faraday::Adapter::NetHttp","args":[],"block":null},"handlers":[{"name":"Faraday::Response::RaiseError","args":[],"block":null}],"app":{"app":{"ssl_cert_store":{"verify_callback":null,"error":null,"error_string":null,"chain":null,"time":null},"app":{},"connection_options":{},"config_block":null}}},"url_prefix":"http://search-op-v2/solr/cody/","manual_proxy":false,"proxy":null},"update_format":"RSolr::JSON::Generator","update_path":"update","options":{"url":"http://search-op-v2/solr/cody"}}},"query":{"params":{"per_page":50,"term":"tag:\"poll\"","current_player":null,"sort":"map(difficulty_value,0,0,999) asc"},"parser":"MathWorks::Search::Solr::QueryParser","directives":{"term":{"directives":{"tag":[["tag:\"poll\"","","\"","poll","\""]]}}},"facets":{"#\u003cMathWorks::Search::Field:0x00007ff7fc407260\u003e":null,"#\u003cMathWorks::Search::Field:0x00007ff7fc4071c0\u003e":null},"filters":{"#\u003cMathWorks::Search::Field:0x00007ff7fc406900\u003e":"\"cody:problem\""},"fields":{"#\u003cMathWorks::Search::Field:0x00007ff7fc4074e0\u003e":1,"#\u003cMathWorks::Search::Field:0x00007ff7fc407440\u003e":50,"#\u003cMathWorks::Search::Field:0x00007ff7fc4073a0\u003e":"map(difficulty_value,0,0,999) asc","#\u003cMathWorks::Search::Field:0x00007ff7fc407300\u003e":"tag:\"poll\""},"user_query":{"#\u003cMathWorks::Search::Field:0x00007ff7fc407300\u003e":"tag:\"poll\""},"queried_facets":{}},"options":{"fields":["id","difficulty_rating"]},"join":" "},"results":[{"id":2033,"difficulty_rating":"easy"}]}}