Manage PlItems

You may optionally enter a comparison operator (<, <=, >, >=, <> or =) at the beginning of each of your search values to specify how the comparison should be done.

Advanced Search
Displaying 1-10 of 300 results.
IDPlCodelangPlGroupPlItemTitleCode 
 
302Yii2SessionsWerte in Session speichern und lesen\Yii::$app->session->set('user.attribute',$value); \Yii::$app->session->get('user.some_attribute');View Update Delete
292Yii2Yii2-InternalPrüfen ob aktueller User ein Gast istuse Yii; if (! \Yii::$app->user->isGuest) { $result = "User is logged in. User is no guest" }View Update Delete
286Yii2Yii2-ActiveQueryAbfrage mit Subselect<?php /* SQL Example: SELECT * FROM `Cities` WHERE (`postalcode_id` IN (SELECT `id` FROM `postalcodes` WHERE `postalcode`='12345') ) OR (`region_id` IN (SELECT `id` FROM `regions` WHERE `region`='North') ) */ $active_query_postalcodes_For_Subselect = \app\models\Postalcodes::find()->select("id")->where(["postalcodes" => '12345']); // Attention! No "->all()" at the end to create a subselect! $active_query_regions_For_Subselect = \app\models\Regions::find()->select("id")->where(["region" => 'North']); // Attention! No "->all()" at the end to create a subselect! $model = new \app\models\Cities(); $all_Cities_With_IN_and_OR = $model::find() ->where(['in', "postalcode_id", $active_query_postalcodes_For_Subselect]) ->orWhere(['in', "region_id", $active_query_regions_For_Subselect]) ->all(); ?>View Update Delete
253T-SQLMetadatenFremdschlüssel auflistenSELECT [FK_NAME] = obj.name ,[Schema_Name] = sch.name ,[Table] = tab1.name ,[Column] = col1.name ,[Referenced_Schema_Name] = sch2.name ,[Referenced_Table] = tab2.name ,[Referenced_Column] = col2.name FROM sys.foreign_key_columns fkc INNER JOIN sys.objects obj ON obj.object_id = fkc.constraint_object_id INNER JOIN sys.tables tab1 ON tab1.object_id = fkc.parent_object_id INNER JOIN sys.schemas sch ON tab1.schema_id = sch.schema_id INNER JOIN sys.columns col1 ON col1.column_id = parent_column_id AND col1.object_id = tab1.object_id INNER JOIN sys.tables tab2 ON tab2.object_id = fkc.referenced_object_id INNER JOIN sys.columns col2 ON col2.column_id = referenced_column_id AND col2.object_id = tab2.object_id INNER JOIN sys.schemas sch2 ON tab2.schema_id = sch.schema_id View Update Delete
225PHPSysteminfoHostnamen ermittelnecho gethostname(); // prints myComputer1 or srvLinux1View Update Delete
226T-SQLSysteminfoHostnamen ermittelnSELECT HOST_NAME() AS Hostname; -- prints myComputer1 or srvWindows1View Update Delete
227PowerShellSysteminfoHostnamen ermitteln$myHostname = [system.environment]::MachineName; write-host $myHostname; # prints MyComputer1 or srvWindows2View Update Delete
249PythonSysteminfoBetriebssystem ermittelnimport os os.name # nt, posix import platform platform.system() # 'Windows', 'Linux', 'Darwin' platform.release() # Linux, Windows, Windows, Darwin '2.6.22-15-generic', 'Vista' ,'10', '8.11.1' # Example from https://stackoverflow.com/questions/1854/python-what-os-am-i-running-on from sys import platform as _platform if _platform == "linux" or _platform == "linux2": # linux elif _platform == "darwin": # MAC OS X elif _platform == "win32": # Windows elif _platform == "win64": # Windows 64-bitView Update Delete
196PythonJSONJSON Daten ladenimport json myJSONFile = "/tmp/Test/myData.json" json_data = open(myJSONFile) # In Python werden JSON Daten nach dem Laden wie Dictionaries behandelt data_dict = json.load(json_data)View Update Delete
197PythonJSONJSON Daten speichernmyData_dict = {"key1":"value1"} fileObj = open('myData.json', 'w+') jsonDump = json.dumps(myData_dict) fileObj.write(jsonDump) fileObj.close()View Update Delete