Home Php C# Sql C C++ Javascript Python Java Go Android Git Linux Asp.net Django .net Node.js Ios Xcode Cocoa Iphone Mysql Tomcat Mongodb Bash Objective-c Scala Visual-studio Apache Elasticsearch Jar Eclipse Jquery Ruby-on-rails Ruby Rubygems Android-studio Spring Lua Sqlite Emacs Ubuntu Perl Docker Swift Amazon-web-services Svn Html Ajax Xml Java-ee Maven Intellij-idea Rvm Macos Unix Css Ipad Postgresql Css3 Json Windows-server Vue.js Typescript Oracle Hibernate Internet-explorer Github Tensorflow Laravel Symfony Redis Html5 Google-app-engine Nginx Firefox Sqlalchemy Lucene Erlang Flask Vim Solr Webview Facebook Zend-framework Virtualenv Nosql Ide Twitter Safari Flutter Bundle Phonegap Centos Sphinx Actionscript Tornado Register | Login | Edit Tags | New Questions | 繁体 | 简体


10 questions online user: 28

0
votes
answers
35 views
+10

Can Ansible可以觀察Azure中的新目標機器嗎?

0

我自動部署Azure資源組和虛擬機。我希望有一個Ansible Controller能夠識別何時創建新虛擬機,以便它可以在其上運行劇本併爲我配置它們。Can Ansible可以觀察Azure中的新目標機器嗎?

我怎麼Ansible認識到在Azure中

沙发
0
1

沒有創建新虛擬機,Ansible對自己不能做到這一點。

Ansible是一個無代理工具,只有當您(或某個其他外部系統)提出要求時纔會執行該工作。

你有一些選擇:

  • 設置一些監控系統,該系統將監視新虛擬機,並引發Ansible劇本運行
  • 建立一些雲事件(不知道是否有任何Azure中,像CloudWatch的活動在AWS)將觸發Ansible工作
  • 設置動態庫存爲您的劇本(這將列出所有的虛擬機配置和新的),並用cron作業運行劇本
  • 設置ansible-pull您的雲計算虛擬機映像中,所以它拉重在虛擬機啓動和自動提供機器上需要劇本冊
+0

有趣,謝謝。 – 4c74356b41

0
votes
answers
46 views
+10

守則PyCharm運行,但不Jupyter

1

我要打開一個Excel文件,我這樣做:守則PyCharm運行,但不Jupyter

xl_file = pd.ExcelFile('D:mypathmyFile.xls') 

在PyCharm(Python的2.7.8),它完美的作品,但Jupyter(Python的3),我總是這個錯誤:

FileNotFoundError: [Errno 2] No such file or directory 

可能是什麼原因?

沙发
0
1

如果您在除根目錄以外的地方調用jupyter筆記本,可能會發生這種情況。在這種情況下,jupyter可能無法訪問該文件。

嘗試去D:和調用jupyter筆記本,然後重試此操作。另一種選擇是使用筆記本的路徑:

os.path.abspath("__file__") 

然後設置數據集的相對路徑。

編輯:

比方說,你要設置包含筆記本上面的目錄路徑一級。然後,你會怎麼做:

foo = os.path.dirname(os.path.abspath("__file__")) 
relative_path = os.path.join(foo, '..') 
+0

我從Coursera網站打電話給Jupyter,所以我不認爲我可以對第一個選項做很多事情。如何設置相對路徑? – Joe

+0

啊。那麼jupyter在coursera服務器上運行嗎?這可能是你問題的根源。 – amanbirs

+0

我該如何解決這個問題? – Joe

板凳
0
0

之後已經改變爲在這個崗位how to change jupyter start folder?建議,如果文件是此文件夾中,加載它們它不是必要寫的路徑Jupyter啓動文件夾中。這已經足夠了:

xl_file = pd.ExcelFile('myFile.xls') 
0
votes
answers
54 views
+10

爲什麼我的推送通知不斷重複不規則?

0

使用警報管理器和待處理意圖設置的推送通知顯示異常行爲。出於某種原因,在我打開應用程序後,通知出現一分鐘或更少。有時一分鐘不止一次,那麼它暫時不會出現。我的想法是每天發佈一次通知,假設用戶在24小時內沒有訪問我的應用程序。我打算取消任何以前的計時器,並在用戶下一次訪問我的應用程序時啓動一個新的計時器。以下是我的代碼。爲什麼我的推送通知不斷重複不規則?

public class Main_Menu extends AppCompatActivity { 


@Override 
protected void onCreate(Bundle savedInstanceState) { 
    super.onCreate(savedInstanceState); 
    setContentView(R.layout.activity_main_menu); 

    this.getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_HIDDEN); 


    Button goToGame1; 

    goToGame1 = (Button) findViewById(R.id.Game1); 
    goToGame1.setOnClickListener(new View.OnClickListener() { 
     @Override 
     public void onClick(View v) { 
      Intent beAtGame1 = new Intent(Main_Menu.this, memory_modes.class); 
      startActivity(beAtGame1); 
     } 
    }); 


Button goToGame2; 

    goToGame2 = (Button) findViewById(R.id.Game2); 
    goToGame2.setOnClickListener(new View.OnClickListener() { 
     @Override 
     public void onClick(View v) { 
      Intent beAtGame2 = new Intent(Main_Menu.this, computation_modes.class); 
      startActivity(beAtGame2); 
     } 
    }); 


Button goToGame3; 

    goToGame3 = (Button) findViewById(R.id.Game3); 
    goToGame3.setOnClickListener(new View.OnClickListener() { 
     @Override 
     public void onClick(View v) { 
      Intent beAtGame3 = new Intent(Main_Menu.this, evaluation_modes.class); 
      startActivity(beAtGame3); 
     } 
    }); 


    Button goToGame4; 

    goToGame4 = (Button) findViewById(R.id.Game4); 
    goToGame4.setOnClickListener(new View.OnClickListener() { 
     @Override 
     public void onClick(View v) { 
      Intent beAtGame4 = new Intent(Main_Menu.this, attention_modes.class); 
      startActivity(beAtGame4); 
     } 
    }); 


    Button goToTrackers; 

    goToTrackers = (Button) findViewById(R.id.Trackers); 
    goToTrackers.setOnClickListener(new View.OnClickListener() { 
     @Override 
     public void onClick(View v) { 
      Intent beAtTrackers = new Intent(Main_Menu.this,trackerMenu.class); 
      startActivity(beAtTrackers); 
     } 
    }); 



    Intent intent = new Intent(Main_Menu.this, Receiver.class); 
    PendingIntent pendingIntent = PendingIntent.getBroadcast(Main_Menu.this, 1, intent, 0); 
    AlarmManager alarm = (AlarmManager)getSystemService(ALARM_SERVICE); 
    alarm.cancel(pendingIntent); 
    alarm.setRepeating(alarm.RTC_WAKEUP, System.currentTimeMillis(), alarm.INTERVAL_DAY, pendingIntent); 


    } 

public void onBackPressed() { 
    Intent intent = new Intent(Intent.ACTION_MAIN); 
    intent.addCategory(Intent.CATEGORY_HOME); 
    intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); 
    startActivity(intent); 
} 

} 

public class Receiver extends BroadcastReceiver { 
@Override 
public void onReceive(Context context, Intent intent) { 
    showNotification(context); 
} 

public void showNotification(Context context) { 
    Intent intent = new Intent(context, Main_Menu.class); 
    PendingIntent pi = PendingIntent.getActivity(context, 1, intent, 0); 
    NotificationCompat.Builder mBuilder = new NotificationCompat.Builder(context) 
      .setSmallIcon(R.drawable.smalliconfinal) 
      .setColor(Color.argb(000,255,177,17)) 
      .setLargeIcon(BitmapFactory.decodeResource(context.getResources(), R.drawable.icon4)) 
      .setContentTitle("Title") 
      .setContentText("Some text."); 
    mBuilder.setLights(0xffffb111, 750, 750); 
    mBuilder.setContentIntent(pi); 
    mBuilder.setDefaults(Notification.DEFAULT_SOUND); 
    mBuilder.setAutoCancel(true); 
    NotificationManager mNotificationManager = (NotificationManager) context.getSystemService(Context.NOTIFICATION_SERVICE); 
    mNotificationManager.notify(1, mBuilder.build()); 
} 

} 

,並從我的清單:

<receiver android:name=".Receiver"></receiver> 

誰知道爲什麼發生此問題?

非常感謝, 謝謝。

沙发
0
1

AlarmManager.setRepeating方法的第二個參數是警報首先熄滅的時間。

您使用這些參數調用此方法:

alarm.setRepeating(alarm.RTC_WAKEUP, System.currentTimeMillis(), alarm.INTERVAL_DAY, pendingIntent); 

這意味着你設置的重複報警,只要你調用方法(當創建Main_Menu活動)熄滅。

從你的描述好像你正在尋找的東西是這樣的:

alarm.setRepeating(AlarmManager.RTC_WAKEUP, (System.currentTimeMillis() + AlarmManager.INTERVAL_DAY), AlarmManager.INTERVAL_DAY, pendingIntent); 
+0

大加讚賞。 – 4u53r

0
votes
answers
33 views
+10

即使戴着耳機也能振鈴鬧鐘

0

在我的機器人的默認鬧鈴上,即使有耳機,鬧鈴也會響起(您可以聽到鬧鐘的音樂)。我使用Android Studio編寫了一個鬧鐘(當它響鈴時使用AlarmManager和mediaPlayer),我想知道如何在我的程序中使用相同的功能。即使戴着耳機也能振鈴鬧鐘

沙发
0
0

要打開揚聲器,此代碼已被使用:

AudioManager audioManager = (AudioManager)getSystemService(AUDIO_SERVICE); 
audioManager.isSpeakerphoneOn(); 
audioManager.setMode(AudioManager.MODE_IN_CALL); 
0
votes
answers
43 views
+10

廣播接收器報警管理器

1

這是我的拳頭應用程序,我試圖使Alarm managerBroadcastReceiver一起使用。廣播接收器報警管理器

我用我希望Alarm manager觸發onReceive()的時間調用函數「SetFutureStartTime()」。但是當時機到來時,什麼也沒有發生。

這是個代碼:

public void SetFutureStartTime(int startHour, int startMin) 
{ 
    Context context = this; 

    m_alarmMgr = (AlarmManager)getSystemService(Context.ALARM_SERVICE); 
    Intent intent = new Intent(context, AlarmReceiver_SendOn.class); 
    intent.setAction("Broadcast"); 
    m_alarmIntent = PendingIntent.getBroadcast(context, 0, intent, 0); 

    // Set the alarm to start at 21:32 PM 
    Calendar calendar = Calendar.getInstance(); 
    calendar.setTimeInMillis(System.currentTimeMillis()); 
    calendar.set(Calendar.HOUR_OF_DAY, startHour); 
    calendar.set(Calendar.MINUTE, startMin); 

    m_alarmMgr.set(AlarmManager.RTC_WAKEUP, calendar.getTimeInMillis(), m_alarmIntent); 
} 

public class AlarmReceiver_SendOn extends BroadcastReceiver 
{ 
    @Override 
    public void onReceive(Context context, Intent intent) { 
     SendTcpMessage(TURN_ON_COMMAND); //I put here break point but nothing happens 
    } 
} 

這是manifast末:

..... 
</activity> 
    <receiver android:name=".MainActivity$AlarmReceiver_SendOn"> 
     <intent-filter> 
      <action android:name="Broadcast"> 
      </action> 
     </intent-filter> 
    </receiver> 
</application> 

我缺少什麼?

+0

是'AlarmReceiver_SendOn'一個內部類的'MainActivity'的,就像清單中顯示的那樣? –

+0

嗨,是的......它在'MainActivity'裏面。 – user1673206

+0

如果你想讓Receiver類成爲一個嵌套類,它必須是'public static'。 –

沙发
0
1

此代碼的工作對我來說: 這個MainActivity

public class MainActivity extends AppCompatActivity { 

    private AlarmManager m_alarmMgr; 

    @Override 
    protected void onCreate(Bundle savedInstanceState) { 
     super.onCreate(savedInstanceState); 
     setContentView(R.layout.activity_main); 
      SetFutureStartTime(19, 25); 
    } 

    public void SetFutureStartTime(int startHour, int startMin) 
    { 
     Context context = this; 

     m_alarmMgr = (AlarmManager)getSystemService(Context.ALARM_SERVICE); 
     Intent intent = new Intent(context, com.asb.test.testapplication.AlarmReceiver_SendOn.class); 
     PendingIntent m_alarmIntent = PendingIntent.getBroadcast(context, (int) System.currentTimeMillis(), intent, 0); 

     // Set the alarm to start at 21:32 PM 
     Calendar calendar = Calendar.getInstance(); 
     calendar.setTimeInMillis(System.currentTimeMillis()); 
     calendar.set(Calendar.HOUR_OF_DAY, startHour); 
     calendar.set(Calendar.MINUTE, startMin); 

     m_alarmMgr.set(AlarmManager.RTC_WAKEUP, calendar.getTimeInMillis(), m_alarmIntent); 
    } 

} 

這是AlarmReceiver_SendOn

public class AlarmReceiver_SendOn extends BroadcastReceiver 
    { 
     @Override 
     public void onReceive(Context context, Intent intent) { 

      Log.i("TAG", "Started >>>>>>>"); 
      //and doing something 

     } 
    } 

這AndroidManifest

<?xml version="1.0" encoding="utf-8"?> 
<manifest xmlns:android="http://schemas.android.com/apk/res/android" 
    package="com.asb.test.testapplication"> 
    <uses-permission android:name="com.android.alarm.permission.SET_ALARM"/> 
    <uses-permission android:name="android.permission.WAKE_LOCK"/> 
    <application 
     android:allowBackup="true" 
     android:icon="@mipmap/ic_launcher" 
     android:label="@string/app_name" 
     android:roundIcon="@mipmap/ic_launcher_round" 
     android:supportsRtl="true" 
     android:theme="@style/AppTheme"> 
     <activity android:name=".MainActivity"> 
      <intent-filter> 
       <action android:name="android.intent.action.MAIN" /> 

       <category android:name="android.intent.category.LAUNCHER" /> 
      </intent-filter> 
     </activity> 

     <receiver android:name=".AlarmReceiver_SendOn"> 
     </receiver> 

    </application> 
</manifest> 
0
votes
answers
57 views
+10

自動確認爲前端測試對話與摩卡

0

這看起來像用茉莉花的方式來自動確認對話框:自動確認爲前端測試對話與摩卡

https://coderwall.com/p/elevha/stubbing-out-confirm-dialogs-in-jasmine

,這將是:

spyOn(window, 'confirm').andReturn(true); 

但是我想不通出去如何做到與摩卡一樣......任何人都知道?我想摩卡並沒有提供一些預先捆綁好的間諜?

沙发
0
0

好了,所以我們使用興農與摩卡,相當於調用就像這樣:

sinon.stub(window, 'confirm').returns(true); 

我們使用的後續因緣配置加載興農:

// Karma configuration 
// Generated on Wed Oct 18 2017 09:34:40 GMT-0700 (PDT) 
'use strict'; 
var path = require('path'); 
// create angular values dynamically for every karma run 
require('./scripts/karma-testing/render-angular-values.js'); 
// run Running a single test file from command line 
//KARMA_SPECS="test/unit/pages/home/controller/home-controller.spec.js" karma start karma.config.local.js 
function getSpecs(specList) { 
    if (specList) { 
     return specList.split(',') 
    } else { 
     return ['test/unit/**/**/*.spec.js'] 
    } 
    } 
//////////////////////////////////////////////////////////////////////////////// 


module.exports = function (config) { 
    var webDriverConfig = { 
    hostname: 'qsghub-nprd-lnx-01', 
    port: 8080 
    }; 
    config.set({ 

    // base path that will be used to resolve all patterns (eg. files, exclude) 
    basePath: '', 

    // frameworks to use 
    // available frameworks: https://npmjs.org/browse/keyword/karma-adapter 
    frameworks: ['mocha', 'chai', 'sinon'], 

    // list of files/patterns to load in the browser 
    files: [ 
     //cdn 
     'https://cdnjs.cloudflare.com/ajax/libs/async/2.1.5/async.min.js', 
     'https://cdnjs.cloudflare.com/ajax/libs/lodash.js/4.17.4/lodash.min.js', 
     'https://cdnjs.cloudflare.com/ajax/libs/node-uuid/1.4.7/uuid.js', 
     'https://cdnjs.cloudflare.com/ajax/libs/bluebird/3.5.0/bluebird.js', 
     'https://ajax.googleapis.com/ajax/libs/jquery/3.2.0/jquery.min.js', 
     'https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js', 
     'https://cdnjs.cloudflare.com/ajax/libs/socket.io/2.0.3/socket.io.js', 
     'https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.6.1/angular.js', 
     'https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.6.1/angular-animate.js', 
     'https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.6.1/angular-route.js', 
     'https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.6.1/angular-sanitize.js', 
     'https://cdnjs.cloudflare.com/ajax/libs/angular-mocks/1.6.1/angular-mocks.js', 

     // local 
     './public/lib/angular-ui-router/release/angular-ui-router.js', 
     './public/lib/ng-csv/build/ng-csv.js', 
     './public/lib/angular-bootstrap/ui-bootstrap-tpls.js', 
     './public/lib/angular-flash-alert/dist/angular-flash.min.js', 
     './node_modules/karma-read-json/karma-read-json.js', 
     './public/app.js', 
     './public/karma-helpers/load-angular-values.js', 
     './public/shared/**/*.js', 
     './public/pages/**/*.js', 
     './public/shared/html/**/*.html', 
     './public/pages/**/view/**/*.html', 
     {pattern: './test/unit/mock-json/*.json', watched: true, served: true, included: false}, 

     // './public/pages/home/controller/home.controller.js', 
     // './public/pages/home/services/**/*.js', 
     // './public/pages/home/specs/home-service.spec.js', 
     //process.env.CDT_KARMA_TEST_PATH || './test/unit/**/**/*.spec.js', 

    ].concat(getSpecs(process.env.KARMA_SPECS)), 

    // list of files to exclude 
    exclude: [], 

    // preprocess matching files before serving them to the browser 
    // available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor 

    preprocessors: { 
     './public/shared/html/**/*.html':['ng-html2js'], 
     './public/shared/js/filter/*.js': ['coverage'], 
     './public/shared/js/services/*.js': ['coverage'], 
     './public/shared/js/directive/*.js': ['coverage'], 
     './public/shared/js/directive/**/*.js': ['coverage'], 
     './public/pages/**/view/**/*.html':['ng-html2js'], 
     './public/pages/**/**/*.js': ['coverage'] 

    }, 

    ngHtml2JsPreprocessor: { 
     // If your build process changes the path to your templates, 
     // use stripPrefix and prependPrefix to adjust it. 
     stripPrefix: 'public/', 
     // prependPrefix: 'public/', 

     // // the name of the Angular module to create 
     moduleName: "templates" 
    }, 

    coverageReporter: { 
     type: 'lcov', 
     dir: 'reports', 
     subdir: 'coverage' 
    }, 

    sonarQubeUnitReporter: { 
     sonarQubeVersion: '5.x', 
     outputFile: 'reports/gunit.xml', 
     useBrowserName: false 
    }, 

    // test results reporter to use 
    // possible values: 'dots', 'progress' 
    // available reporters: https://npmjs.org/browse/keyword/karma-reporter 
    reporters: ['spec','coverage', 'sonarqubeUnit'], 

    // web server port 
    // host: 'localhost', 
    port: 9876, 

    // enable/disable colors in the output (reporters and logs) 
    colors: true, 

    // level of logging 
    // possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG 
    logLevel: config.LOG_INFO, 

    // enable/disable watching file and executing tests whenever any file changes 
    autoWatch: true, 

    // start these browsers 
    // available browser launchers: https://npmjs.org/browse/keyword/karma-launcher 
    // start these browser 
    browsers: ['ChromeHeadless'], 
    // process.env.USER === dftjenkins 

    plugins: [ 
     // we don't need phantomjs, because --headless chrome removes the need for phantomjs 
     'karma-chrome-launcher', 
     'karma-jasmine', 
     'karma-junit-reporter', 
     'karma-chai', 
     'karma-mocha', 
     'karma-sinon', 
     'karma-spec-reporter', 
     'karma-read-json', 
     'karma-coverage', 
     'karma-sonarqube-unit-reporter', 
     'karma-ng-html2js-preprocessor', 
     'karma-webdriver-launcher' 

    ], 

    // Continuous Integration mode 
    // if true, Karma captures browsers, runs the tests and exits 
    singleRun: true, 

    // Concurrency level 
    // how many browser should be started simultaneous 
    concurrency: 5 
    }) 
}; 
0
votes
answers
33 views
+10

PyCharm - 社區版能夠突出顯示php嗎?

2

我想讓pyCharm CE能夠突出顯示php語法。這裏PyCharm - Is community edition able to highlight css/javascript?是一個解決方案,它的工作。有沒有人這樣的PHP語法的XML?謝謝。PyCharm - 社區版能夠突出顯示php嗎?

沙发
0
0

爲什麼選擇PyCharm? PHPStorm與PyCharm類似,但它適用於PHP,它突出了PHP語法。

like this

OR

還有一個編輯器,可以高亮顯示PHP語法和代碼comletion以及 here

我希望這會幫助你。

+0

由於phpstorm沒有CE版本和其他一些原因 –

+0

在這種情況下,PyCharm無法爲您提供PHP語法。 –

+0

有這麼多好的免費PHP編輯器和IDE。我建議嘗試Netbeans PHP,Atom.io和VS Code。 – wp78de

17
votes
answers
38 views
+10

PyCharm auto add import with autocomplete

I am giving PyCharm a try for the first time. Coming from an Eclipse/PyDev environment I have to say so far things have been going well.

There is one feature I am missing that I can't seem to find though and that is as follows:

In the auto-complete list in PyDev, when typing a symbol that doesn't exist in the file's scope it will show a list of modules that it's in. If you select that autocomplete item not only will PyDev complete the symbol for you but it will automatically add the import statement to take care of the dependency as well.

Does this exist in PyCharm?

So far it only seems to autocomplete things already in the scope of the document.

up vote 17 down vote accepted favorite
沙发
+170
+50

請參閱設置 | 編輯 | 一般 | 自動導入

Hrm,這是默認開啟的。無論如何,根據我的問題,給你答案,因為這是正確的。它只是不添加導入,直到我點擊alt +輸入我不認為... - Xealot 2011年6月10日在13:14

如果您認為這是一個錯誤,請務必在youtrack.jetbrains.net/issues/PY提交,並提供重現的步驟。 - CrazyCoder 2011年6月10日13:46

當您使用Control-Option-Space調用自動完成時(在非Mac上可能是Control-Alt-Space),它可以正常工作。這也將從當前文件的外部自動完成符號,並且接受項目將自動為其添加import語句。 - Jakub 2011年6月10日14:06

對,這不是一個bug。但一開始並不一定明顯。 - Xealot 2011年6月12日18:32

事實上,它與IntelliJ的行為不同 - fabspro 2013年6月11日9:08

0
votes
answers
45 views
+10

數據庫連接錯誤

0

我正在tryng在PyCharm我燒瓶項目,以創建一個SQLite數據庫,但我得到這個錯誤 access denied while opening database數據庫連接錯誤

我認爲它的Windows防火牆的問題,但我不知道如何解決它。

謝謝!

沙发
0
0

已解決:我在Windows防火牆中刪除了Pycharm規則,彈出窗口出現,我允許並運行!

0
votes
answers
53 views
+10

是否可以在碼頭羣中使用點,破折號設置服務

0

我有一個帶有點和破折號的主機名。我需要使用該主機名作爲服務名稱。是否可以在碼頭羣中使用點,破折號設置服務

假設我的主機名是Prasanna.abc.in。我想在Docker堆棧文件中將該主機名稱作爲服務名稱。

沙发
0
0

Docker允許您使用「DNS名稱組件」創建服務。這是帶有破折號的字母數字,最多63個字符。 See the hostname spec on wikipedia。這不允許在名稱中使用下劃線或點,因爲它不是主機名組件(點用於分隔多個組件,下劃線將無效)。

對於FQDN,請考慮在您的服務上使用標籤。您將能夠爲該標籤提供主機名的完整值,並通過該標籤進行查詢。