U3d能否在inspector面板中将一个变量的值赋予给另一个变量

图片说明图片说明

如图将代码中声明的testY变量,在inspector面板中,实现将testY赋值给speedY,能否实现这样的赋值?

c#
Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
其他相关推荐
UnityEditor 如何在inspector面板上显示另一个inspector

我希望用PropertyAttribute标记来使 一个类里引用的一个组件 或者一个ScriptableObject能在这个组件的inspector中显示 可以方便修改 不知要怎么实现 下面是尝试的一个方案 但是结果并不理想 效果:未引用对象: ![图片说明](https://img-ask.csdn.net/upload/201901/24/1548329518_824331.png) 将引用的对象: ![图片说明](https://img-ask.csdn.net/upload/201901/24/1548329582_558065.png) 引用对象后: ![图片说明](https://img-ask.csdn.net/upload/201901/24/1548329466_868149.png) ``` public class ShowObject: PropertyAttribute { } namespace UnityEditor { [CustomPropertyDrawer(typeof(ShowObject))] public class ShowObjectDraw : PropertyDrawer { //画嵌入的Inspector的Editor Editor objectEditor; //要画的对象 UnityEngine.Object target; //展开 bool open; //PropertyDrawer的高度 float height; //动态锚点 Rect ancot; public override float GetPropertyHeight(SerializedProperty property, GUIContent label) { return height + 5; } public override void OnGUI(Rect position, SerializedProperty property, GUIContent label) { //初始化锚点 ancot =new Rect(position); //初始化高度 height = 17; ancot.height = 17; //如果目标对象存在则画展开框 if (target != null) { open = EditorGUI.InspectorTitlebar(ancot, open, target, true); ancot.yMin += 20; ancot.height += 17; height += 20; } //属性基本赋值框绘制 EditorGUI.ObjectField(ancot, property, label); //目标获取 target = property.objectReferenceValue; //是否展开 if (open ) { objectEditor = Editor.CreateEditor(target); //绘制对象的Inspector——不知道为什么它绘制在 载体组件的后面 导致会挡住 载体组件后面的组件显示 objectEditor.OnInspectorGUI(); } else { objectEditor = null; } } } } ``` 组件对象: ``` public class Team_TypeLogicFSM { [ShowObject] public Type_AIData con; } ``` 有没有知道怎么实现的大佬给个点子 或者EditorGUI中是否有我没发现的方法可以使用的?

Unity3d Inspector面板的显示出问题了

![图片说明](https://img-ask.csdn.net/upload/201708/22/1503390176_591942.png)所有物体的显示都变成这样的格局了。求破,,,,急急急

关于Unity中的PlayerSettings的Inspector面板定制的问题

请问有没有方法可以在PlayerSettings的Inspector面板上加入自己需要的字段,比如我想在Android的Other Settings中加入程序的ID的项。

Unity编辑器扩展自定义Inspector后编辑模式下数据更新不及时

给脚本组件自定义inspector之后,原本可以在编辑器模式中执行的脚本只能在游戏中执行了,准确地说,数据更新不是实时的了,要切出去再切回来才会显示结果。比如我有一个脚本![图片说明](https://img-ask.csdn.net/upload/202005/03/1588445541_579215.png),不自定义inspector时,编辑模式下改变a,b马上会跟随发生变化,而如果我用![图片说明](https://img-ask.csdn.net/upload/202005/03/1588445587_429615.png)自定义脚本的inspector之后,在编辑模式下,b就不能实时跟随改变了,只有在运行游戏时才能实时更新,这是为什么?小白上路,请大佬们不吝赐教。

Unity inspect脚本不显示共有变量

![图片说明](https://img-ask.csdn.net/upload/201703/05/1488705825_417919.png) 用别人的项目倒导进来也这样,为什么?

求助大神,U3D开发问题

开发时遇到一个问题,请问: 1.EditorApplication.projectWindowItemOnGUI是什么时候被调用的? 2.传入的两个参数(string guid, Rect selectionRect)分别又是什么? 3.为何不能将EditorApplication.projectWindowItemOnGUI换成ProjectWindowItemCallback的一个对象? 下面代码第一个是自己写的方法,第二个是U3D的EditorApplication类 ``` public class Script2 { //首先调用此方法 [InitializeOnLoadMethod] static void InitializeOnLoadMethod() { // ProjectWindowItemCallback a = new ProjectWindowItemCallback(string guid, Rect selectionRect); EditorApplication.projectWindowItemOnGUI = delegate (string guid, Rect selectionRect) { if (Selection.activeObject && guid == AssetDatabase.AssetPathToGUID(AssetDatabase.GetAssetPath(Selection.activeObject))) { float width = 50f; selectionRect.x += (selectionRect.width - width); selectionRect.y += 2f; selectionRect.width = width; GUI.color = Color.red; //点击事件 if(GUI.Button(selectionRect, "click")){ Debug.LogFormat("click : {0}", Selection.activeObject.name); } GUI.color = Color.white; } }; } } ``` ``` public sealed class EditorApplication { // // 摘要: // Delegate for OnGUI events for every visible list item in the ProjectWindow. public static ProjectWindowItemCallback projectWindowItemOnGUI; // // 摘要: // Delegate for OnGUI events for every visible list item in the HierarchyWindow. public static HierarchyWindowItemCallback hierarchyWindowItemOnGUI; // // 摘要: // Delegate for generic updates. public static CallbackFunction update; // // 摘要: // Delegate which is called once after all inspectors update. public static CallbackFunction delayCall; // // 摘要: // A callback to be raised when an object in the hierarchy changes. Each time an // object is (or a group of objects are) created, renamed, parented, unparented // or destroyed this callback is raised. [Obsolete("Use EditorApplication.hierarchyChanged")] public static CallbackFunction hierarchyWindowChanged; // // 摘要: // Callback raised whenever the state of the Project window changes. [Obsolete("Use EditorApplication.projectChanged")] public static CallbackFunction projectWindowChanged; // // 摘要: // Callback raised whenever the contents of a window's search box are changed. public static CallbackFunction searchChanged; // // 摘要: // Delegate for changed keyboard modifier keys. public static CallbackFunction modifierKeysChanged; [Obsolete("Use EditorApplication.playModeStateChanged and/or EditorApplication.pauseStateChanged")] public static CallbackFunction playmodeStateChanged; // // 摘要: // Callback raised whenever the user contex-clicks on a property in an Inspector. public static SerializedPropertyCallbackFunction contextualPropertyMenu; public EditorApplication(); // // 摘要: // Is editor currently in play mode? public static bool isPlaying { get; set; } // // 摘要: // Is editor currently compiling scripts? (Read Only) public static bool isCompiling { get; } // // 摘要: // True if the Editor is currently refreshing the AssetDatabase. public static bool isUpdating { get; } // // 摘要: // Is editor currently connected to Unity Remote 4 client app. public static bool isRemoteConnected { get; } // // 摘要: // Returns the scripting runtime version currently used by the Editor. [StaticAccessor("ScriptingManager", StaticAccessorType.DoubleColon)] public static ScriptingRuntimeVersion scriptingRuntimeVersion { get; } // // 摘要: // Path to the Unity editor contents folder. (Read Only) public static string applicationContentsPath { get; } // // 摘要: // Returns the path to the Unity editor application. (Read Only) public static string applicationPath { get; } // // 摘要: // Returns true if the current project was created as a temporary project. public static bool isTemporaryProject { get; } // // 摘要: // The time since the editor was started. (Read Only) public static double timeSinceStartup { get; } // // 摘要: // Is true if the currently open Scene in the editor contains unsaved modifications. [Obsolete("Use Scene.isDirty instead. Use EditorSceneManager.GetScene API to get each open scene")] public static bool isSceneDirty { get; } // // 摘要: // The path of the Scene that the user has currently open (Will be an empty string // if no Scene is currently open). (Read Only) [Obsolete("Use EditorSceneManager to see which scenes are currently loaded")] public static string currentScene { get; set; } // // 摘要: // Is editor currently paused? [StaticAccessor("GetApplication().GetPlayerLoopController()", StaticAccessorType.Dot)] public static bool isPaused { get; set; } // // 摘要: // Is editor either currently in play mode, or about to switch to it? (Read Only) [StaticAccessor("GetApplication()", StaticAccessorType.Dot)] public static bool isPlayingOrWillChangePlaymode { get; } public static event Action quitting; public static event Action<PlayModeStateChange> playModeStateChanged; public static event Action<PauseState> pauseStateChanged; public static event Action projectChanged; public static event Action hierarchyChanged; public static event Func<bool> wantsToQuit; // // 摘要: // Plays system beep sound. [FreeFunction("UnityBeep")] public static void Beep(); // // 摘要: // Set the hierarchy sorting method as dirty. public static void DirtyHierarchyWindowSorting(); // // 摘要: // Switches the editor to Play mode. public static void EnterPlaymode(); // // 摘要: // Invokes the menu item in the specified path. // // 参数: // menuItemPath: public static bool ExecuteMenuItem(string menuItemPath); // // 摘要: // Exit the Unity editor application. // // 参数: // returnValue: public static void Exit(int returnValue); // // 摘要: // Switches the editor to Edit mode. public static void ExitPlaymode(); // // 摘要: // Load the given level additively in play mode asynchronously // // 参数: // path: [Obsolete("Use EditorSceneManager.LoadSceneAsyncInPlayMode instead.")] public static AsyncOperation LoadLevelAdditiveAsyncInPlayMode(string path); // // 摘要: // Load the given level additively in play mode. // // 参数: // path: [Obsolete("Use EditorSceneManager.LoadSceneInPlayMode instead.")] public static void LoadLevelAdditiveInPlayMode(string path); // // 摘要: // Load the given level in play mode asynchronously. // // 参数: // path: [Obsolete("Use EditorSceneManager.LoadSceneAsyncInPlayMode instead.")] public static AsyncOperation LoadLevelAsyncInPlayMode(string path); // // 摘要: // Load the given level in play mode. // // 参数: // path: [Obsolete("Use EditorSceneManager.LoadSceneInPlayMode instead.")] public static void LoadLevelInPlayMode(string path); // // 摘要: // Prevents loading of assemblies when it is inconvenient. [StaticAccessor("GetApplication()", StaticAccessorType.Dot)] public static void LockReloadAssemblies(); // // 摘要: // Explicitly mark the current opened Scene as modified. [Obsolete("Use EditorSceneManager.MarkSceneDirty or EditorSceneManager.MarkAllScenesDirty")] public static void MarkSceneDirty(); // // 摘要: // Create a new absolutely empty Scene. [Obsolete("Use EditorSceneManager.NewScene (NewSceneSetup.EmptyScene)")] public static void NewEmptyScene(); // // 摘要: // Create a new Scene. [Obsolete("Use EditorSceneManager.NewScene (NewSceneSetup.DefaultGameObjects)")] public static void NewScene(); // // 摘要: // Open another project. // // 参数: // projectPath: // The path of a project to open. // // args: // Arguments to pass to command line. public static void OpenProject(string projectPath, params string[] args); // // 摘要: // Opens the Scene at path. // // 参数: // path: [Obsolete("Use EditorSceneManager.OpenScene")] public static bool OpenScene(string path); // // 摘要: // Opens the Scene at path additively. // // 参数: // path: [Obsolete("Use EditorSceneManager.OpenScene")] public static void OpenSceneAdditive(string path); // // 摘要: // Normally, a player loop update will occur in the editor when the Scene has been // modified. This method allows you to queue a player loop update regardless of // whether the Scene has been modified. public static void QueuePlayerLoopUpdate(); public static void RepaintAnimationWindow(); // // 摘要: // Can be used to ensure repaint of the HierarchyWindow. public static void RepaintHierarchyWindow(); // // 摘要: // Can be used to ensure repaint of the ProjectWindow. public static void RepaintProjectWindow(); // // 摘要: // Saves all serializable assets that have not yet been written to disk (eg. Materials). [Obsolete("Use AssetDatabase.SaveAssets instead (UnityUpgradable) -> AssetDatabase.SaveAssets()", true)] public static void SaveAssets(); // // 摘要: // Ask the user if they want to save the open Scene. [Obsolete("Use EditorSceneManager.SaveCurrentModifiedScenesIfUserWantsTo")] public static bool SaveCurrentSceneIfUserWantsTo(); // // 摘要: // Save the open Scene. // // 参数: // path: // The file path to save at. If empty, the current open Scene will be overwritten, // or if never saved before, a save dialog is shown. // // saveAsCopy: // If set to true, the Scene will be saved without changing the currentScene and // without clearing the unsaved changes marker. // // 返回结果: // True if the save succeeded, otherwise false. [Obsolete("Use EditorSceneManager.SaveScene")] public static bool SaveScene(string path, bool saveAsCopy); // // 摘要: // Save the open Scene. // // 参数: // path: // The file path to save at. If empty, the current open Scene will be overwritten, // or if never saved before, a save dialog is shown. // // saveAsCopy: // If set to true, the Scene will be saved without changing the currentScene and // without clearing the unsaved changes marker. // // 返回结果: // True if the save succeeded, otherwise false. [Obsolete("Use EditorSceneManager.SaveScene")] public static bool SaveScene(); // // 摘要: // Save the open Scene. // // 参数: // path: // The file path to save at. If empty, the current open Scene will be overwritten, // or if never saved before, a save dialog is shown. // // saveAsCopy: // If set to true, the Scene will be saved without changing the currentScene and // without clearing the unsaved changes marker. // // 返回结果: // True if the save succeeded, otherwise false. [Obsolete("Use EditorSceneManager.SaveScene")] public static bool SaveScene(string path); // // 摘要: // Sets the path that Unity should store the current temporary project at, when // the project is closed. // // 参数: // path: // The path that the current temporary project should be relocated to when closing // it. [NativeThrows] public static void SetTemporaryProjectKeepPath(string path); // // 摘要: // Perform a single frame step. [StaticAccessor("GetApplication().GetPlayerLoopController()", StaticAccessorType.Dot)] public static void Step(); // // 摘要: // Must be called after LockReloadAssemblies, to reenable loading of assemblies. [StaticAccessor("GetApplication()", StaticAccessorType.Dot)] public static void UnlockReloadAssemblies(); // // 摘要: // Delegate to be called for every visible list item in the ProjectWindow on every // OnGUI event. // // 参数: // guid: // // selectionRect: public delegate void ProjectWindowItemCallback(string guid, Rect selectionRect); // // 摘要: // Delegate to be called for every visible list item in the HierarchyWindow on every // OnGUI event. // // 参数: // instanceID: // // selectionRect: public delegate void HierarchyWindowItemCallback(int instanceID, Rect selectionRect); // // 摘要: // Delegate to be called from EditorApplication callbacks. public delegate void CallbackFunction(); // // 摘要: // Delegate to be called from EditorApplication contextual inspector callbacks. // // 参数: // menu: // The contextual menu which is about to be shown to the user. // // property: // The property for which the contextual menu is shown. public delegate void SerializedPropertyCallbackFunction(GenericMenu menu, SerializedProperty property); } ```

CDH5.6安装报“Inspector did not run sucessfully”错误

在安装过程检查主机正确性时候出现错误如下: 检查器在以下主机上的结果失败: 检查器只在master节点运行,两个slave节点都不运行,报Inspector did not run sucessfully错误,请问是什么原因,谢谢大家!

UnityEditor中如何获取一个脚本下内所有函数

想再编辑器中对一个事件进行赋值,想在Inspector面板上做一个可选脚本内函数的区块,类似下面这种:![图片说明](https://img-ask.csdn.net/upload/201810/31/1540974403_326594.png) 在OnInspectorGUI()中要怎么写?或者you其他实现方法吗

求解unity2018 关于prefab下的文件inspector不会显示问题。

什么在project下面的prefabs文件夹下prefab不能直接显示属性。 有没有方法解决?

如何在pgsql中插入一个值,其中要插入的行等于函数中传递的数组的数量?

<div class="post-text" itemprop="text"> <p>I am trying to pass an array in function in postgres and want to insert rows in a table 'application_upload_demand' by selecting value from 'application_upload'. The rows inserted into table 'application_upload_demand' will be equal to the element of arrays. I have no idea about array in pgsql. Please suggest any thing-</p> <pre><code>CREATE OR REPLACE FUNCTION public.application_upload_demand_insert( appl_nos character varying, appl_num character varying) RETURNS void AS $BODY$ declare appl_nos character varying;array1 text[];arrayTxt text[]; BEGIN FOREACH appl_nos SLICE i IN ARRAY arr LOOP array1[i] = appl_nos[i]; END LOOP; INSERT INTO application_upload_demand(file_name, file_type, documentid, doctype, file_upload, appl_no, upload_date, inspector_remarks,lab_code,div_code, dist_code, loginid ) select file_name, file_type, documentid, doctype, file_upload, appl_no, upload_date, inspector_remarks,lab_code,div_code, dist_code, loginid from application_upload where sno =ANY(arr) and appl_no = appl_num; END $BODY$ LANGUAGE plpgsql VOLATILE COST 100; ALTER FUNCTION public.application_upload_demand_insert(character varying, character varying) OWNER TO postgres; </code></pre> <p>My php code is-&gt;</p> <pre><code>try{ $con-&gt;beginTransaction(); if(isset($_POST['checkbox'])) { $sno=$_POST['checkbox']; $pginsstmt12="SELECT public.application_upload_demand_insert(?,?)"; $newinsdata = $con-&gt;prepare($pginsstmt12); $newinsdata-&gt;bindparam(1,$sno,PDO::PARAM_STR); $newinsdata-&gt;bindparam(2,$hidden_appl_no,PDO::PARAM_STR); $newinsdata-&gt;execute(); } $con-&gt;commit(); }catch(Exception $ex) { $con-&gt;rollBack(); $error=$ex-&gt;getMessage(); } </code></pre> </div>

如何在GO中将float64值修整为特定的小数点? [重复]

<div class="post-text" itemprop="text"> <div class="question-status question-originals-of-duplicate"> <p>This question already has an answer here:</p> <ul> <li> <a href="/questions/39544571/golang-round-to-nearest-0-05" dir="ltr">Golang Round to Nearest 0.05</a> <span class="question-originals-answer-count"> 1 answer </span> </li> </ul> </div> <p>I want to trim latitude and longitude of address upto 5 decimal points. latitude and longitude are of type <strong>float64</strong> I have created a function round the value. My function is like this::</p> <pre><code>func DoubleRoundFive(val float64) float64 { formattedVal := fmt.Sprintf("%.5f", val) roundedVal, _ := strconv.ParseFloat(formattedVal, 64) return roundedVal } </code></pre> <p>Output and usage::</p> <pre><code>DoubleRoundFive(76.70289609999999) </code></pre> <p>Output::</p> <pre><code>76.7029 </code></pre> <p>But I just want to trim the value upto 5 decimal points. I want output as <strong>76.70289</strong> . Is it possible in GO?? I want exact 5 decimal values because I am using this for latitude longitude. This is a GO playground <a href="https://play.golang.org/p/hsEwY3w5NkG" rel="nofollow noreferrer">Link</a></p> </div>

Inspector显示3秒更新,我如何获得新值?

<div class="post-text" itemprop="text"> <p>In index.php I have a javasript, that take JSON data from data.php every 3 sec. Data.php end with this:</p> <blockquote> <p>echo json_encode($row);</p> </blockquote> <p>Inspector in index.php shows a couple of objects (which are refreshed each 3 sec). Say 3 rows in DB, then it will look like this:</p> <blockquote> <p>=&gt;[Object, Object, Object]</p> </blockquote> <p>I can open the above, and it looks like this:</p> <blockquote> <p>0: Object 1: Object 2: Object</p> </blockquote> <p>Each three can be opened again I see my newly updated data (if it change in data.php).</p> <p>How do I pull out information from those objects, so I can use it live on index.php?</p> <p>I should probably add the javascript that import data as well:</p> <pre><code> function populate(){ var items= []; $.ajax({ url: 'data.php', type: 'GET', dataType: 'json', success: function(data){ console.log(data); $.each(data, function(i,v){ items.push('&lt; th &gt;'+v+'&lt; /th &gt;'); }); $('#sampleTable').html(items.join(',')); }, error: function(err){ console.log(err.responseText); } }); } setInterval(function(){ populate(); },3000); </code></pre> </div>

为何OPENSTACK-210模拟环境中执行 openstack compute service list 报错?

本人刚开始学红帽openstack 210的课程,在导入模拟环境到VMware中后,在开启classroom,workstation,power,director,后,在director上以用户stack执行命令 openstack compute service list 时,报错代码如下,请各位大神指点下,谢谢。 ``` [stack@director ~]$ openstack compute service list Discovering versions from the identity service failed when creating the password plugin. Attempting to determine version from URL. SSL exception connecting to https://172.25.249.201:13000/v2.0/tokens: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed ``` 以下是日志信息: ``` May 11 02:35:47 director ironic-inspector: 2019-05-11 02:35:47.107 669 ERROR ironic_inspector.main [-] Periodic clean up of node cache failed May 11 02:35:47 director ironic-inspector: 2019-05-11 02:35:47.107 669 ERROR ironic_inspector.main Traceback (most recent call last): May 11 02:35:47 director ironic-inspector: 2019-05-11 02:35:47.107 669 ERROR ironic_inspector.main File "/usr/lib/python2.7/site-packages/ironic_inspector/main.py", line 325, in periodic_clean_up May 11 02:35:47 director ironic-inspector: 2019-05-11 02:35:47.107 669 ERROR ironic_inspector.main sync_with_ironic() May 11 02:35:47 director ironic-inspector: 2019-05-11 02:35:47.107 669 ERROR ironic_inspector.main File "/usr/lib/python2.7/site-packages/ironic_inspector/main.py", line 333, in sync_with_ironic May 11 02:35:47 director ironic-inspector: 2019-05-11 02:35:47.107 669 ERROR ironic_inspector.main ironic_nodes = ironic.node.list(limit=0) May 11 02:35:47 director ironic-inspector: 2019-05-11 02:35:47.107 669 ERROR ironic_inspector.main File "/usr/lib/python2.7/site-packages/ironicclient/v1/node.py", line 135, in list May 11 02:35:47 director ironic-inspector: 2019-05-11 02:35:47.107 669 ERROR ironic_inspector.main limit=limit) May 11 02:35:47 director ironic-inspector: 2019-05-11 02:35:47.107 669 ERROR ironic_inspector.main File "/usr/lib/python2.7/site-packages/ironicclient/common/base.py", line 129, in _list_pagination May 11 02:35:47 director ironic-inspector: 2019-05-11 02:35:47.107 669 ERROR ironic_inspector.main resp, body = self.api.json_request('GET', url) May 11 02:35:47 director ironic-inspector: 2019-05-11 02:35:47.107 669 ERROR ironic_inspector.main File "/usr/lib/python2.7/site-packages/ironicclient/common/http.py", line 553, in json_request May 11 02:35:47 director ironic-inspector: 2019-05-11 02:35:47.107 669 ERROR ironic_inspector.main resp = self._http_request(url, method, **kwargs) May 11 02:35:47 director ironic-inspector: 2019-05-11 02:35:47.107 669 ERROR ironic_inspector.main File "/usr/lib/python2.7/site-packages/ironicclient/common/http.py", line 190, in wrapper May 11 02:35:47 director ironic-inspector: 2019-05-11 02:35:47.107 669 ERROR ironic_inspector.main return func(self, url, method, **kwargs) May 11 02:35:47 director ironic-inspector: 2019-05-11 02:35:47.107 669 ERROR ironic_inspector.main File "/usr/lib/python2.7/site-packages/ironicclient/common/http.py", line 526, in _http_request May 11 02:35:47 director ironic-inspector: 2019-05-11 02:35:47.107 669 ERROR ironic_inspector.main raise_exc=False, **kwargs) May 11 02:35:47 director ironic-inspector: 2019-05-11 02:35:47.107 669 ERROR ironic_inspector.main File "/usr/lib/python2.7/site-packages/positional/__init__.py", line 101, in inner May 11 02:35:47 director ironic-inspector: 2019-05-11 02:35:47.107 669 ERROR ironic_inspector.main return wrapped(*args, **kwargs) May 11 02:35:47 director ironic-inspector: 2019-05-11 02:35:47.107 669 ERROR ironic_inspector.main File "/usr/lib/python2.7/site-packages/keystoneauth1/session.py", line 462, in request May 11 02:35:47 director ironic-inspector: 2019-05-11 02:35:47.107 669 ERROR ironic_inspector.main auth_headers = self.get_auth_headers(auth) May 11 02:35:47 director ironic-inspector: 2019-05-11 02:35:47.107 669 ERROR ironic_inspector.main File "/usr/lib/python2.7/site-packages/keystoneauth1/session.py", line 733, in get_auth_headers May 11 02:35:47 director ironic-inspector: 2019-05-11 02:35:47.107 669 ERROR ironic_inspector.main return auth.get_headers(self, **kwargs) May 11 02:35:47 director ironic-inspector: 2019-05-11 02:35:47.107 669 ERROR ironic_inspector.main File "/usr/lib/python2.7/site-packages/keystoneauth1/plugin.py", line 90, in get_headers May 11 02:35:47 director ironic-inspector: 2019-05-11 02:35:47.107 669 ERROR ironic_inspector.main token = self.get_token(session) May 11 02:35:47 director ironic-inspector: 2019-05-11 02:35:47.107 669 ERROR ironic_inspector.main File "/usr/lib/python2.7/site-packages/keystoneauth1/identity/base.py", line 90, in get_token May 11 02:35:47 director ironic-inspector: 2019-05-11 02:35:47.107 669 ERROR ironic_inspector.main return self.get_access(session).auth_token May 11 02:35:47 director ironic-inspector: 2019-05-11 02:35:47.107 669 ERROR ironic_inspector.main File "/usr/lib/python2.7/site-packages/keystoneauth1/identity/base.py", line 136, in get_access May 11 02:35:47 director ironic-inspector: 2019-05-11 02:35:47.107 669 ERROR ironic_inspector.main self.auth_ref = self.get_auth_ref(session) May 11 02:35:47 director ironic-inspector: 2019-05-11 02:35:47.107 669 ERROR ironic_inspector.main File "/usr/lib/python2.7/site-packages/keystoneauth1/identity/generic/base.py", line 181, in get_auth_ref May 11 02:35:47 director ironic-inspector: 2019-05-11 02:35:47.107 669 ERROR ironic_inspector.main return self._plugin.get_auth_ref(session, **kwargs) May 11 02:35:47 director ironic-inspector: 2019-05-11 02:35:47.107 669 ERROR ironic_inspector.main File "/usr/lib/python2.7/site-packages/keystoneauth1/identity/v2.py", line 65, in get_auth_ref May 11 02:35:47 director ironic-inspector: 2019-05-11 02:35:47.107 669 ERROR ironic_inspector.main authenticated=False, log=False) May 11 02:35:47 director ironic-inspector: 2019-05-11 02:35:47.107 669 ERROR ironic_inspector.main File "/usr/lib/python2.7/site-packages/keystoneauth1/session.py", line 681, in post May 11 02:35:47 director ironic-inspector: 2019-05-11 02:35:47.107 669 ERROR ironic_inspector.main return self.request(url, 'POST', **kwargs) May 11 02:35:47 director ironic-inspector: 2019-05-11 02:35:47.107 669 ERROR ironic_inspector.main File "/usr/lib/python2.7/site-packages/positional/__init__.py", line 101, in inner May 11 02:35:47 director ironic-inspector: 2019-05-11 02:35:47.107 669 ERROR ironic_inspector.main return wrapped(*args, **kwargs) May 11 02:35:47 director ironic-inspector: 2019-05-11 02:35:47.107 669 ERROR ironic_inspector.main File "/usr/lib/python2.7/site-packages/keystoneauth1/session.py", line 555, in request May 11 02:35:47 director ironic-inspector: 2019-05-11 02:35:47.107 669 ERROR ironic_inspector.main resp = send(**kwargs) May 11 02:35:47 director ironic-inspector: 2019-05-11 02:35:47.107 669 ERROR ironic_inspector.main File "/usr/lib/python2.7/site-packages/keystoneauth1/session.py", line 593, in _send_request May 11 02:35:47 director ironic-inspector: 2019-05-11 02:35:47.107 669 ERROR ironic_inspector.main raise exceptions.SSLError(msg) May 11 02:35:47 director ironic-inspector: 2019-05-11 02:35:47.107 669 ERROR ironic_inspector.main SSLError: SSL exception connecting to https://172.25.249.201:13000/v2.0/tokens: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:579) May 11 02:35:47 director ironic-inspector: 2019-05-11 02:35:47.107 669 ERROR ironic_inspector.main ```

如何使用Inspector在主题的PHP文件中查找HTML?

<div class="post-text" itemprop="text"> <p>I'm working on a Wordpress website for someone and I have a question. I used an inspector (firebug) to check out the html of my site but I need to know where to find that bit of code in the Wordpress theme (Spacing) php files. There's no search all feature and going through all of them separately is ridiculous. </p> <p>I really appreciate any help you can offer!!</p> <p>I found an article on it (<a href="https://wordpress.org/support/topic/search-through-php-files" rel="nofollow">https://wordpress.org/support/topic/search-through-php-files</a>) but there really wasn't a solution. If I can find what I'm looking for in the HTML (it's a menu name by the way), why can't I go find it in the theme files??</p> <p>I don't know if this matters but the HTML is a body class to a couple of div classes to a ul id to li id to an a class. </p> </div>

关于a标签中传递this问题?

我有这样的语句: <a href="#" onclick="deleteRow('${id}',this);">&nbsp;删除</a> 当点击链接时执行方法deleteRow, 但传递过去的this不是当前的<a>,而是一个不清楚的其它东西。我使用Dom Inspector调试时,如果动态去掉href="#",就可以获取真正的<a>。但写成这样: <a onclick="deleteRow('${id}',this);">&nbsp;删除</a> 也不能成功。请大侠出手相助!! [b]问题补充:[/b] to Ham: 老大,这样做直接提示我说页面找不到! <a href="javascript:delete('${id}',this)">删除</a> [b]问题补充:[/b] Ham老大, function deleteRow(obj) { debugger; } 如果我只传递this一个变量过去的话,OK,我能正确获取到<a>,obj.tagName="A": <a href="#" onclick="deleteRow(this);"> 删除</a> 但如果多一个表达式,像这样: <a href="#" onclick="deleteRow('${id}',this);"> 删除</a> 在接收方法中: function deleteRow(id, obj) { debugger; } id是一个计算出来的值,比如是123;但此时obj.tagName=undefined; 不知道是不是表达式的原因,因为如果我直接传值的话,也是obj.tagName="A",也就是能正确获取到<a>. <a href="#" onclick="deleteRow('1234',this);"> 删除</a> [b]问题补充:[/b] 怪就怪我不会发图哈, 我是用VS2005来调试的嘛,所有的属性方法都显示在那里的嘛。也不是所谓的RP问题,我们小组都遇到这个问题没解决所以我冒个泡。。。 麻烦各位移步一下,图在这里: http://love2java.iteye.com/admin/blogs/219091 因为我们的页面纯HTML,但对所编写的表达式是在接收到后台传来的数据后,在专门的表达式处理函数遍历所有的标签再赋值的。我一直找不准问题究竟在哪里的因为是,我用IE Inspector去掉href后再点链接就能正确传送this。 麻烦移步看看,给点建议吧。

unity物体的select icon 显示不出来

![图片说明](https://img-ask.csdn.net/upload/201711/13/1510583274_223643.png) 已经给空物体加了蓝色的select icon,但是显示不出来,给其他物体加icon也显示不出来。 其他项目可以正常显示icon。 去哪里设置,还是说是unity的bug?

从localstorage到POST到PHP变量

<div class="post-text" itemprop="text"> <p>I am executing a somewhat complex code from my point of view. It goes like this: First I am getting a list of numbers from localstorage from another page.</p> <pre><code>&lt;script&gt; var data = JSON.parse(localStorage.getItem('key')); var localData = data.join(", "); </code></pre> <p>Then I am posting data to PHP code on the same page like this:</p> <pre><code>$.ajax({ type: 'post', data: {localData: localData}, dataType: "json", success: function(result){ console.log(result) } }); &lt;/script&gt; </code></pre> <p>And then I want to put the data into a PHP variable and use it like this:</p> <pre><code>&lt;?php $user_id = isset($_POST['localData'])?$_POST['localData']:""; $values = $user_id; echo $values; ?&gt; </code></pre> <p>The network inspector reveals the data is posted like this: localData 3, 5, 6, 8, 9</p> <p>But I can't seem to get the data into the PHP variable and echo it. Please help. </p> </div>

Unity的Editor,如何做到“多个枚举相互影响”?

是这样的,我从网上扒拉了一段代码,摸索下之后,想要搞个脚本在Inspector里有几个枚举提供选择。 但是这几个枚举中的某些组合是不兼容的,所以我打算写成“当某个枚举变量为某个值时,其他枚举变量的值改变”。 只是这样写的时候,发现最后其中一个枚举变量怎么也改变不了,所以想在这里求教下该怎么处理。 ![图片说明](https://img-ask.csdn.net/upload/202006/01/1591007349_764974.png) 以下是问题脚本和问题的Editor脚本 ``` //Problem.cs using UnityEngine; using UnityEngine.UI; public class Problem : MonoBehaviour { public enum AType { a000, a111 } public enum BType { b000, b111, b222 } public enum CType { c000, c111, c222 } public AType AMode = AType.a000; public BType BMode = BType.b000; public CType CMode = CType.c000; } ``` ``` //ProblemEditor.cs using UnityEditor; [CustomEditor(typeof(Problem))] public class ProblemEditor : Editor { Problem ProblemDate; SerializedProperty AModeEditor; SerializedProperty BModeEditor; SerializedProperty CModeEditor; public override void OnInspectorGUI() { ProblemDate = (Problem)target; //检查[AMode],若[AMode]值不是[a111],将[CMode]改为[c000] if (ProblemDate.AMode != Problem.AType.a111) { ProblemDate.CMode = Problem.CType.c000; } //检查[BMode],若[BMode]值不是[b000],将[CMode]值改为[c000] if (ProblemDate.BMode != Problem.BType.b000) { ProblemDate.CMode = Problem.CType.c000; } //检查[CMode],若[CMode]值不是[c000],将[AMode]值改为[a111],将[BMode]值改为[b000] if (ProblemDate.CMode != Problem.CType.c000) { ProblemDate.AMode = Problem.AType.a111; ProblemDate.BMode = Problem.BType.b000; } ProblemDate.AMode = (Problem.AType)EditorGUILayout.EnumPopup("AMode", ProblemDate.AMode); ProblemDate.BMode = (Problem.BType)EditorGUILayout.EnumPopup("BMode", ProblemDate.BMode); ProblemDate.CMode = (Problem.CType)EditorGUILayout.EnumPopup("CMode", ProblemDate.CMode); } } ```

将PHP变量传递给JavaScript以获取AJAX请求

<div class="post-text" itemprop="text"> <p>So my workflow is that onClick of an list element, my JS initiates a PHP AJAX request to build a card object. The $content is a card (similar to KickStarter) of topic data. What I'm trying to do is a pass the 'topic_id' of each topic-instance so that I can then use it in the success function, to then initiate ANOTHER AJAX request (but to Discourse).</p> <p>With attempt 2), I get a null when viewing its value in the web inspector.</p> <p>The AJAX requests (the console.log() of the variable I want to get returns a blank line in the web console):</p> <pre><code>$.post( "/wp-content/mu-plugins/topic-search.php", { topicID: $topicFilter, filterBy: $sortByFilter }, function( data ) { console.log(topic_id); data = data.trim(); if ( data !== "" ) { //get the participants data for avatars $.getJSON('http://ask.example.com/t/' + topic_id + '.json', function() { </code></pre> <hr> <p>The end of topic-search.php, which echoes out the built up card. Script is supposed to return the topic_id variable for use in the success function.</p> <pre><code> } //One attempt: echo $content; // //Another attempt: echo json_encode(array('data' =&gt; $content, 'topic_id' =&gt; $row['topicid']));// } ?&gt; &lt;script&gt; var topic_id = "&lt;?php echo $row['topicid'] ?&gt;"; &lt;/script&gt; </code></pre> <hr> </div>

大学四年自学走来,这些私藏的实用工具/学习网站我贡献出来了

大学四年,看课本是不可能一直看课本的了,对于学习,特别是自学,善于搜索网上的一些资源来辅助,还是非常有必要的,下面我就把这几年私藏的各种资源,网站贡献出来给你们。主要有:电子书搜索、实用工具、在线视频学习网站、非视频学习网站、软件下载、面试/求职必备网站。 注意:文中提到的所有资源,文末我都给你整理好了,你们只管拿去,如果觉得不错,转发、分享就是最大的支持了。 一、电子书搜索 对于大部分程序员...

在中国程序员是青春饭吗?

今年,我也32了 ,为了不给大家误导,咨询了猎头、圈内好友,以及年过35岁的几位老程序员……舍了老脸去揭人家伤疤……希望能给大家以帮助,记得帮我点赞哦。 目录: 你以为的人生 一次又一次的伤害 猎头界的真相 如何应对互联网行业的「中年危机」 一、你以为的人生 刚入行时,拿着傲人的工资,想着好好干,以为我们的人生是这样的: 等真到了那一天,你会发现,你的人生很可能是这样的: ...

springboot+jwt实现token登陆权限认证

一 前言 此篇文章的内容也是学习不久,终于到周末有时间码一篇文章分享知识追寻者的粉丝们,学完本篇文章,读者将对token类的登陆认证流程有个全面的了解,可以动态搭建自己的登陆认证过程;对小项目而已是个轻量级的认证机制,符合开发需求;更多精彩原创内容关注公主号知识追寻者,读者的肯定,就是对作者的创作的最大支持; 二 jwt实现登陆认证流程 用户使用账号和面发出post请求 服务器接受到请求后使用私...

技术大佬:我去,你写的 switch 语句也太老土了吧

昨天早上通过远程的方式 review 了两名新来同事的代码,大部分代码都写得很漂亮,严谨的同时注释也很到位,这令我非常满意。但当我看到他们当中有一个人写的 switch 语句时,还是忍不住破口大骂:“我擦,小王,你丫写的 switch 语句也太老土了吧!” 来看看小王写的代码吧,看完不要骂我装逼啊。 private static String createPlayer(PlayerTypes p...

女程序员,为什么比男程序员少???

昨天看到一档综艺节目,讨论了两个话题:(1)中国学生的数学成绩,平均下来看,会比国外好?为什么?(2)男生的数学成绩,平均下来看,会比女生好?为什么?同时,我又联想到了一个技术圈经常讨...

总结了 150 余个神奇网站,你不来瞅瞅吗?

原博客再更新,可能就没了,之后将持续更新本篇博客。

副业收入是我做程序媛的3倍,工作外的B面人生是怎样的?

提到“程序员”,多数人脑海里首先想到的大约是:为人木讷、薪水超高、工作枯燥…… 然而,当离开工作岗位,撕去层层标签,脱下“程序员”这身外套,有的人生动又有趣,马上展现出了完全不同的A/B面人生! 不论是简单的爱好,还是正经的副业,他们都干得同样出色。偶尔,还能和程序员的特质结合,产生奇妙的“化学反应”。 @Charlotte:平日素颜示人,周末美妆博主 大家都以为程序媛也个个不修边幅,但我们也许...

MySQL数据库面试题(2020最新版)

文章目录数据库基础知识为什么要使用数据库什么是SQL?什么是MySQL?数据库三大范式是什么mysql有关权限的表都有哪几个MySQL的binlog有有几种录入格式?分别有什么区别?数据类型mysql有哪些数据类型引擎MySQL存储引擎MyISAM与InnoDB区别MyISAM索引与InnoDB索引的区别?InnoDB引擎的4大特性存储引擎选择索引什么是索引?索引有哪些优缺点?索引使用场景(重点)...

如果你是老板,你会不会踢了这样的员工?

有个好朋友ZS,是技术总监,昨天问我:“有一个老下属,跟了我很多年,做事勤勤恳恳,主动性也很好。但随着公司的发展,他的进步速度,跟不上团队的步伐了,有点...

我入职阿里后,才知道原来简历这么写

私下里,有不少读者问我:“二哥,如何才能写出一份专业的技术简历呢?我总感觉自己写的简历太烂了,所以投了无数份,都石沉大海了。”说实话,我自己好多年没有写过简历了,但我认识的一个同行,他在阿里,给我说了一些他当年写简历的方法论,我感觉太牛逼了,实在是忍不住,就分享了出来,希望能够帮助到你。 01、简历的本质 作为简历的撰写者,你必须要搞清楚一点,简历的本质是什么,它就是为了来销售你的价值主张的。往深...

程序员写出这样的代码,能不挨骂吗?

当你换槽填坑时,面对一个新的环境。能够快速熟练,上手实现业务需求是关键。但是,哪些因素会影响你快速上手呢?是原有代码写的不够好?还是注释写的不够好?昨夜...

外包程序员的幸福生活

今天给你们讲述一个外包程序员的幸福生活。男主是Z哥,不是在外包公司上班的那种,是一名自由职业者,接外包项目自己干。接下来讲的都是真人真事。 先给大家介绍一下男主,Z哥,老程序员,是我十多年前的老同事,技术大牛,当过CTO,也创过业。因为我俩都爱好喝酒、踢球,再加上住的距离不算远,所以一直也断断续续的联系着,我对Z哥的状况也有大概了解。 Z哥几年前创业失败,后来他开始干起了外包,利用自己的技术能...

优雅的替换if-else语句

场景 日常开发,if-else语句写的不少吧??当逻辑分支非常多的时候,if-else套了一层又一层,虽然业务功能倒是实现了,但是看起来是真的很不优雅,尤其是对于我这种有强迫症的程序"猿",看到这么多if-else,脑袋瓜子就嗡嗡的,总想着解锁新姿势:干掉过多的if-else!!!本文将介绍三板斧手段: 优先判断条件,条件不满足的,逻辑及时中断返回; 采用策略模式+工厂模式; 结合注解,锦...

离职半年了,老东家又发 offer,回不回?

有小伙伴问松哥这个问题,他在上海某公司,在离职了几个月后,前公司的领导联系到他,希望他能够返聘回去,他很纠结要不要回去? 俗话说好马不吃回头草,但是这个小伙伴既然感到纠结了,我觉得至少说明了两个问题:1.曾经的公司还不错;2.现在的日子也不是很如意。否则应该就不会纠结了。 老实说,松哥之前也有过类似的经历,今天就来和小伙伴们聊聊回头草到底吃不吃。 首先一个基本观点,就是离职了也没必要和老东家弄的苦...

2020阿里全球数学大赛:3万名高手、4道题、2天2夜未交卷

阿里巴巴全球数学竞赛( Alibaba Global Mathematics Competition)由马云发起,由中国科学技术协会、阿里巴巴基金会、阿里巴巴达摩院共同举办。大赛不设报名门槛,全世界爱好数学的人都可参与,不论是否出身数学专业、是否投身数学研究。 2020年阿里巴巴达摩院邀请北京大学、剑桥大学、浙江大学等高校的顶尖数学教师组建了出题组。中科院院士、美国艺术与科学院院士、北京国际数学...

为什么你不想学习?只想玩?人是如何一步一步废掉的

不知道是不是只有我这样子,还是你们也有过类似的经历。 上学的时候总有很多光辉历史,学年名列前茅,或者单科目大佬,但是虽然慢慢地长大了,你开始懈怠了,开始废掉了。。。 什么?你说不知道具体的情况是怎么样的? 我来告诉你: 你常常潜意识里或者心理觉得,自己真正的生活或者奋斗还没有开始。总是幻想着自己还拥有大把时间,还有无限的可能,自己还能逆风翻盘,只不是自己还没开始罢了,自己以后肯定会变得特别厉害...

男生更看重女生的身材脸蛋,还是思想?

往往,我们看不进去大段大段的逻辑。深刻的哲理,往往短而精悍,一阵见血。问:产品经理挺漂亮的,有点心动,但不知道合不合得来。男生更看重女生的身材脸蛋,还是...

为什么程序员做外包会被瞧不起?

二哥,有个事想询问下您的意见,您觉得应届生值得去外包吗?公司虽然挺大的,中xx,但待遇感觉挺低,马上要报到,挺纠结的。

当HR压你价,说你只值7K,你该怎么回答?

当HR压你价,说你只值7K时,你可以流畅地回答,记住,是流畅,不能犹豫。 礼貌地说:“7K是吗?了解了。嗯~其实我对贵司的面试官印象很好。只不过,现在我的手头上已经有一份11K的offer。来面试,主要也是自己对贵司挺有兴趣的,所以过来看看……”(未完) 这段话主要是陪HR互诈的同时,从公司兴趣,公司职员印象上,都给予对方正面的肯定,既能提升HR的好感度,又能让谈判气氛融洽,为后面的发挥留足空间。...

面试:第十六章:Java中级开发

HashMap底层实现原理,红黑树,B+树,B树的结构原理 Spring的AOP和IOC是什么?它们常见的使用场景有哪些?Spring事务,事务的属性,传播行为,数据库隔离级别 Spring和SpringMVC,MyBatis以及SpringBoot的注解分别有哪些?SpringMVC的工作原理,SpringBoot框架的优点,MyBatis框架的优点 SpringCould组件有哪些,他们...

早上躺尸,晚上干活:硅谷科技公司这么流行迟到?

硅谷科技公司上班时间OPEN早已不是什么新鲜事,早九晚五是常态,但有很多企业由于不打卡,员工们10点、11点才“姗姗来迟”的情况也屡见不鲜。 这种灵活的考勤制度为人羡慕,甚至近年来,国内某些互联网企业也纷纷效仿。不过,硅谷普遍弹性的上班制度是怎么由来的呢?这种“流行性迟到”真的有那么轻松、悠哉吗? 《动态规划专题班》 课程试听内容: 动态规划的解题要领 动态规划三大类 求最值/计数/可行性 常...

面试阿里p7,被按在地上摩擦,鬼知道我经历了什么?

面试阿里p7被问到的问题(当时我只知道第一个):@Conditional是做什么的?@Conditional多个条件是什么逻辑关系?条件判断在什么时候执...

终于懂了TCP和UDP协议区别

终于懂了TCP和UDP协议区别

Python爬虫,高清美图我全都要(彼岸桌面壁纸)

爬取彼岸桌面网站较为简单,用到了requests、lxml、Beautiful Soup4

无代码时代来临,程序员如何保住饭碗?

编程语言层出不穷,从最初的机器语言到如今2500种以上的高级语言,程序员们大呼“学到头秃”。程序员一边面临编程语言不断推陈出新,一边面临由于许多代码已存在,程序员编写新应用程序时存在重复“搬砖”的现象。 无代码/低代码编程应运而生。无代码/低代码是一种创建应用的方法,它可以让开发者使用最少的编码知识来快速开发应用程序。开发者通过图形界面中,可视化建模来组装和配置应用程序。这样一来,开发者直...

面试了一个 31 岁程序员,让我有所触动,30岁以上的程序员该何去何从?

最近面试了一个31岁8年经验的程序猿,让我有点感慨,大龄程序猿该何去何从。

大三实习生,字节跳动面经分享,已拿Offer

说实话,自己的算法,我一个不会,太难了吧

程序员垃圾简历长什么样?

已经连续五年参加大厂校招、社招的技术面试工作,简历看的不下于万份 这篇文章会用实例告诉你,什么是差的程序员简历! 疫情快要结束了,各个公司也都开始春招了,作为即将红遍大江南北的新晋UP主,那当然要为小伙伴们做点事(手动狗头)。 就在公众号里公开征简历,义务帮大家看,并一一点评。《启舰:春招在即,义务帮大家看看简历吧》 一石激起千层浪,三天收到两百多封简历。 花光了两个星期的所有空闲时...

Java岗开发3年,公司临时抽查算法,离职后这几题我记一辈子

前几天我们公司做了一件蠢事,非常非常愚蠢的事情。我原以为从学校出来之后,除了找工作有测试外,不会有任何与考试有关的事儿。 但是,天有不测风云,公司技术总监、人事总监两位大佬突然降临到我们事业线,叫上我老大,给我们组织了一场别开生面的“考试”。 那是一个风和日丽的下午,我翘着二郎腿,左手端着一杯卡布奇诺,右手抓着我的罗技鼠标,滚动着轮轴,穿梭在头条热点之间。 “淡黄的长裙~蓬松的头发...

大胆预测下未来5年的Web开发

在2019年的ReactiveConf 上,《Elm in Action》的作者Richard Feldman对未来5年Web开发的发展做了预测,很有意思,分享给大家。如果你有机会从头...

立即提问
相关内容推荐