Eclipse颜色不会改变(Eclipse color does not change)
我为Java EE和My Eclipse安装了Eclipse,它们都没有改变字体和颜色。 每次我设置颜色或恢复默认颜色时,颜色都会变回全黑。
对于Eclipse和MyEclipse:
1)我在同一台笔记本电脑上安装了Eclipse for Android,但它没有共享相同的工作场所。 此外,Eclipse for Android运行良好。
2)我在Preference / General / color和fonts中设置字体和颜色。 我确信我已点击“应用”和“确定”。
3)我疯了。 我已经编程了3年,现在我觉得我刚回到学习它的第一天。
I installed Eclipse for Java EE and My Eclipse, and both of them do not change the font and color. Every time I setup the color or restore the default color, the color turns back to all black.
For both Eclipse and MyEclipse:
1)I have a Eclipse for Android in the same laptop but it does not share the same workplace. Also, the Eclipse for Android just work well.
2)I set the font and color in Preference/General/color and fonts. I am sure I already clicked "Apply" and "OK".
3)I am going crazy. I have programmed for 3 years and now I feel I just back to the very first day I learn it.
原文:https://stackoverflow.com/questions/28878363
最满意答案
在
D:\home\site\wwwroot
下的Kudu远程执行控制台中运行npm install tedious
命令。在Azure函数中,所有的代码都应该放在
module.exports
函数中。你应该使用
context.log()
而不是console.log()
。您真的不必在函数的应用程序设置中设置连接设置字符串。
你应该通过调用
context.done()
来告诉运行时你的代码完成了。以下代码适用于我:
var Connection = require('tedious').Connection; var Request = require('tedious').Request; module.exports = function (context, req) { context.log('JavaScript HTTP trigger function processed a request.'); var config = { userName: '<userName>', password: '<password>', server: '<AzureSQLDBName>.database.windows.net', // If you're on Windows Azure, you will need this: options: { database: 'your DB', encrypt: true } }; var connection = new Connection(config); connection.on('connect', function(err) { if (err) { context.log(err); context.res = { status: 500, body: "Unable to establish a connection." }; context.done(); } else { executeStatement(); } }); function executeStatement() { request = new Request("select 42, 'hello world'", function(err, rowCount) { if (err) { context.log(err); context.res = { status: 500, body: "Failed to connect to execute statement." }; context.done(); } else { context.log(rowCount + ' rows'); } }); request.on('row', function(columns) { columns.forEach(function(column) { context.log(column.value); }); context.done(); }); connection.execSql(request); } };
有关更多信息,请参阅Azure函数JavaScript开发人员指南 。
Run the
npm install tedious
command in the Kudu remote execution console underD:\home\site\wwwroot
.In Azure Functions, all of your code should be put inside the
module.exports
function.You should use
context.log()
instead ofconsole.log()
.You really don't have to set the connection settings string in Application settings of the function.
You should inform the runtime when your code has finished by calling
context.done()
.The following code works for me:
var Connection = require('tedious').Connection; var Request = require('tedious').Request; module.exports = function (context, req) { context.log('JavaScript HTTP trigger function processed a request.'); var config = { userName: '<userName>', password: '<password>', server: '<AzureSQLDBName>.database.windows.net', // If you're on Windows Azure, you will need this: options: { database: 'your DB', encrypt: true } }; var connection = new Connection(config); connection.on('connect', function(err) { if (err) { context.log(err); context.res = { status: 500, body: "Unable to establish a connection." }; context.done(); } else { executeStatement(); } }); function executeStatement() { request = new Request("select 42, 'hello world'", function(err, rowCount) { if (err) { context.log(err); context.res = { status: 500, body: "Failed to connect to execute statement." }; context.done(); } else { context.log(rowCount + ' rows'); } }); request.on('row', function(columns) { columns.forEach(function(column) { context.log(column.value); }); context.done(); }); connection.execSql(request); } };
For more information, see Azure Functions JavaScript developer guide.
相关问答
更多-
Azure Functions当前没有SQL作为输入或输出绑定的选项,因此您需要直接使用SqlClient类来建立连接并发出查询。 只要您遵循处理SQL连接的最佳实践(请参阅此示例: C#SQLConnection池 ),您应该默认使用池。 以下是从函数中将记录插入SQL的完整示例: https : //www.codeproject.com/articles/1110663/azure-functions-tutorial-sql-database Azure Functions doesn't curr ...
-
这仅适用于消费(“无服务器”)计划。 使用传统的应用服务计划,您的功能将无法取消配置,并且能够使用连接池,因为它与API应用程序在同一计划上运行。 This would only be applicable in the Consumption ("Serverless") Plan. Using the traditional App Service plan, your function would not be deprovisioned and would be able to make use o ...
-
SQL Data Sync仅在SQL Azure数据库和SQL Server实例之间同步数据。 不支持SQL Azure数据仓库。 https://docs.microsoft.com/en-us/azure/sql-database/sql-database-sync-data 希望这可以帮助。 问候, Alberto Morillo SQL Data Sync synchronizes data between SQL Azure Databases and SQL Server instances o ...
-
不,您将获得Azure功能上的连接池,类似于您在“普通”App Service中获得的连接池。 不会为每个调用重新创建函数实例; 相反,多个后续调用可以由同一实例提供。 每个App Service Plan Instance都有自己的连接池。 当然,如果您处于非常高的负载并且许多实例并行运行,它们将同时命中您的数据库。 即没有跨实例池。 No, you will get the connection pooling on Azure Functions, similar to what you get in ...
-
在D:\home\site\wwwroot下的Kudu远程执行控制台中运行npm install tedious命令。 在Azure函数中,所有的代码都应该放在module.exports函数中。 你应该使用context.log()而不是console.log() 。 您真的不必在函数的应用程序设置中设置连接设置字符串。 你应该通过调用context.done()来告诉运行时你的代码完成了。 以下代码适用于我: var Connection = require('tedious').Connection; ...
-
您拥有Table模型的Cosmos DB帐户。 Table模型在可以使用SQL API发送给它的文档中有一些模式限制( Cosmos数据库输出绑定使用SQL SDK来保存文档)。 如果您想使用输出绑定,请尝试使用Cosmos DB SQL类型的帐户。 You have a Cosmos DB account with the Table model. The Table model has some schema restrictions in the documents you can send to i ...
-
您可以输入任何名称。来自文档的一些信息。 You can enter any name.Some info from Documentation .
-
为什么它无法连接到我的Azure SQL Server数据库?(Why is it failing to connect to my Azure SQL Server Database?)[2023-06-19]
错误代码18456 错误代码18456意味着用户登录失败 正如Amit Sukralia所说,在你的情况下, readonlyuser与数据库级有关,你不能用它来连接服务器。 您可以使用readonlylogin来连接服务器。 你也可以使用SQL Server Management Studio(SSMS)来检查。 Error Code 18456 Error code 18456 means that login failed for user As Amit Sukralia mentioned tha ... -
提供者:本机OLE DB \ SQL Server Native Client 11.0。 身份验证方法:SQL Server身份验证。 如果您不知道管理员用户名和密码,请转到Azure SQL Server并按“概述”。 您将在Server Admin下看到您的用户名。 然后按重置密码并输入新密码。 现在转到SSIS并尝试使用此信息连接到Azure SQL Server。 在这里,Azure SQL Server支持OLE DB连接。 Provider: Native OLE DB\SQL Server ...
-
用于Node.js SQL Azure提供程序的Windows Azure SDK(Windows Azure SDK for Node.js SQL Azure Provider)[2022-10-21]
在这个MSDN论坛上有关于这个主题的讨论。 按照Nate Totten的评论,没有正式的驱动程序,但Joyent的github repo上有一些社区驱动的驱动程序。 我无法找到任何关于此的其他信息。 There's a discussion about this topic, on this MSDN forum. Per Nate Totten's comment, there's no official driver, but there are a few community-driven ones ...