如何将varible传递给一个函数到另一个函数并以纯文本形式调用函数并在纯文本中以角js显示值(how to pass the varible into one function to another function and call the fuction in plain text and show the value in the plain text in angular js)
我在响应中获得十六进制编码值。 我已经为hexc编写代码到ascii但我不知道如何将变量传递给函数并调用函数以在纯文本中显示解码数据。出现错误 - 名称未定义
码
<script> var app = angular.module('myApp', []); app.controller('myCtrl', function ($scope, $http) { $http.get('url', { headers: { 'Authorization': 'Basic a2VybmVs==' } }) .then(function (response) { $scope.names = response.data; }); }); </script> <script> function hex_to_ascii(str1) { var hex = str1.toString(); var str = ''; for (var n = 0; n < hex.length; n += 2) { str += String.fromCharCode(parseInt(hex.substr(n, 2), 16)); } return str; } </script> <h2>hex_to_ascii(names.hexadata)</h2>
im getting hexadecimal encoded value in the response. i have written code for hexa to ascii but i don't know how to pass the variable to the function and call the function to show decoded data in the plain text.getting error - names undefined
code
<script> var app = angular.module('myApp', []); app.controller('myCtrl', function ($scope, $http) { $http.get('url', { headers: { 'Authorization': 'Basic a2VybmVs==' } }) .then(function (response) { $scope.names = response.data; }); }); </script> <script> function hex_to_ascii(str1) { var hex = str1.toString(); var str = ''; for (var n = 0; n < hex.length; n += 2) { str += String.fromCharCode(parseInt(hex.substr(n, 2), 16)); } return str; } </script> <h2>hex_to_ascii(names.hexadata)</h2>
原文:https://stackoverflow.com/questions/41426204
最满意答案
好吧,似乎问题出现是因为nls参数。 必须与nls_session(或数据库)_parameters发生冲突。
我不删除这个问题,因为它可能会帮助别人。
如果有人可以详细解释冲突,请回答。 我会接受答案。
Ok, seems that the Problem occurs because of the nls parameters. There must be a conflict with the nls_session(or database)_parameters .
I don't delete the question, because it may will help someone else.
If someone could explain the conflict in detail, pls answer. I will accept the answer.
相关问答
更多-
你这些显示的文件夹路径有没有在物理磁盤上创建呢?还有就是你用init.ora文件创建的pfile里需要修改几个地方,例如数据库名,添加控制文件等。 另外建议你改变一下语言,这样错误容易看懂。 alter session set nls_language=american;
-
您还可以尝试检查Oracle jdbc驱动程序和Oracle数据库的版本。 就在今天我使用ojdbc6.jar(版本11.2.0.3.0)连接到一个Oracle 9.2.0.4.0服务器时遇到这个问题。 用ojdbc6.jar 11.1.0.7.0替换它解决了这个问题。 You may also try to check the version of the Oracle jdbc driver and Oracle database. Just today I had this issue when us ...
-
您需要在10g数据库中应用补丁集10.2.0.3 。请参阅此链接以了解类似问题 请从metalink下载补丁集 来自metalink的补丁5337014 You need to apply patchset 10.2.0.3 in the 10g database.Kindly refer this link for the similar issue Kindly download the patch set from metalink Patch 5337014 from metalink
-
ORA-00600是一个通用的Oracle消息,表示您的操作的未处理副作用,即Oracle错误。 错误的确切原因可能取决于数据库版本,补丁级别和平台(操作系统风格和版本)。 处理这些事情的正确方法是联系Oracle支持。 如果你没有支持合同,那你可能运气不好。 ORA-00600的性质意味着它们中的一些可以访问非常具体的站点,所以也许没有其他人曾经拥有过它。 但试试谷歌,你永远不会知道...... 瞧! Google为Marc Tempel提供了这个宝石 。 也许它会对你有所帮助。 ORA-00600 is ...
-
如何使用sqldeveloper在oracle 12中设置flag10g?(How to set flag10g in oracle 12 using sqldeveloper?)[2022-05-15]
据我所知, flag10g是SDO_GEOM.VALIDATE_GEOMETRY_WITH_CONTEXT函数或SDO_GEOM.VALIDATE_LAYER_WITH_CONTEXT过程的参数。 有关详细信息,请参阅Spatial and Graph Developer's Guide 。 As far as I know flag10g is a parameter of SDO_GEOM.VALIDATE_GEOMETRY_WITH_CONTEXT function or SDO_GEOM.VALID ... -
我不是DBA。 但是,我正在努力帮助你找到我在互联网上找到的东西。 SCN是系统变更编号 ,Oracle使用它来跟踪重做记录。 可能性: 较旧的数据库版本。 数据库备份期间出错了。 可能解决方案 在不同版本的Oracle中尝试相同的东西。 恢复数据库。 参考文献: - ORA-00904:“COLUMN_NAME”:标识符无效 关于恢复的困惑 SCN - 什么,为什么以及如何? I'm not a DBA. But, I'm trying to help you out what I found over ...
-
好吧,似乎问题出现是因为nls参数。 必须与nls_session(或数据库)_parameters发生冲突。 我不删除这个问题,因为它可能会帮助别人。 如果有人可以详细解释冲突,请回答。 我会接受答案。 Ok, seems that the Problem occurs because of the nls parameters. There must be a conflict with the nls_session(or database)_parameters . I don't delete t ...
-
在TransactionScope中批量插入时出现ORA-00604错误(ORA-00604 error while batch insertion inside TransactionScope)[2023-04-19]
事实证明,这是一个事务超时问题。 在我增加超时后,我已成功插入我的列表: using (TransactionScope transaction = new TransactionScope(TransactionScopeOption.Required, new TimeSpan(0, 30, 0))) //30 minute timeout limit Turns out, it was a transactional timeout probl ... -
error occurred at recursive SQL level 1的消息error occurred at recursive SQL level 1向我建议错误是在触发器中出现的。 我的猜测是有一个AFTER LOGON ON SCHEMA或DATABASE触发器,并且由于某种原因,当您的Web服务器进程尝试连接时它会导致错误。 这是一个如何生成您正在获得的错误的示例。 我有一个名为TINY的表,其中一列只能取值达99: SQL> desc tiny; Name ...
-
向数据库中的表添加列时出现oracle错误(错误:00604)(oracle error while adding column to a table in database (error: 00604))[2022-05-29]
我发现了这个问题! 这是因为我的用户没有权限来创建索引。 我建议任何有相同问题的人来运行查询,看看他们是否有足够的权限去做他们想要的事情: select * from session_privs; I discovered the problem! It's because my user hadn't privilege permission to create indexes. I advice anyone with the same problem to run the query bellow ...