Unity3D的IEnumerator用不了

win8.1 Unity2017.1.1f1 IEnumerator提示不存在图片说明

2个回答

using System.Collections;

协程脚本所挂载的物体,必须是激活状态

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
其他相关推荐
求教,Unity3D 如何 截屏高于分辨率 的 texture

比如用unity3D导出的应用跑4K分辨率,想截取左下4分之一屏的 保存一张 texture,分辨率也为4K,有没有大神知道?? 使用ScreenCapture.CaptureScreenshot() 虽然能整体放大数倍,但是无法设置具体的截图范围和大小。 类似以下方法可截取自己设定的位置和大小,但是大小无法大于当前应用运行 的分辨率。 ``` IEnumerator SavePhoto(Rect rect,string name) { yield return new WaitForEndOfFrame(); Texture2D t = new Texture2D(rect.width, rect.height); t.ReadPixels(new Rect(0, 0, rect.width, rect.height), 0, 0, false); //距X左的距离 距Y屏上的距离 // t.ReadPixels(rect, 0, 0, false); t.Apply(); byte[] byts = t.EncodeToJPG(100); File.WriteAllBytes(path_Save + name + ".jpg", byts); } ```

unity3d中克隆的物体包含的属性或组件消失,怎么解决?

unity3d中克隆的物体包含的属性或组件消失,怎么解决? 我想要克隆几个飞机,但是克隆出来的飞机没有包含原有的属性![图片说明](https://img-ask.csdn.net/upload/202006/08/1591582049_796648.jpg) 原本是有一个爆炸的,但是克隆之后就成了这样 ![图片说明](https://img-ask.csdn.net/upload/202006/08/1591582133_55252.jpg) 它自己消失了不知道为啥,这是显示的错误:![图片说明](https://img-ask.csdn.net/upload/202006/08/1591582168_22255.jpg) public class EnemySpawn : MonoBehaviour { public Transform m_enemyPrefab; public Transform m_explosionFX; public float m_life = 1; // Start is called before the first frame update void Start() { StartCoroutine(SpawnEnemy()); } IEnumerator SpawnEnemy() { while (true) { yield return new WaitForSeconds(Random.Range(5, 15)); Instantiate(m_enemyPrefab, transform.position, Quaternion.identity); } } }

关于unity3d与java客户端通信传图片的问题

<p>最近项目中用到了unity,需要在unity中截图,并通过webservices将截图信息传递到java服务器端上。但是在java服务器端上出现了问题,我查了资料不知道如何解决,求指点!!</p> <p> </p> <p>这个是我在unity中写的截取图像的代码,图片信息需要通过WWWFORM上传到java服务器端上</p> <pre name="code" class="c#">public byte[] shot() { int width = Screen.width; int height = Screen.height; Texture2D tex = new Texture2D(width, height, TextureFormat.RGB24, false); byte[] bytes = tex.EncodeToPNG(); return bytes; } public void getScreenshotByUrl(string data) { StartCoroutine(GetScreenshot(data)); } public IEnumerator GetScreenshot(string data) { byte[] result = shot(); IDictionary jsonDic = (IDictionary)Json.Deserialize(data); string normalUrl = (string)jsonDic["normalUrl"]; string time = string.Format("{0:yyyyMMddHHmmss}", DateTime.Now); //创建一个Web表单 WWWForm form = new WWWForm(); form.AddField("arg0", time); form.AddBinaryData("arg1", result); WWW www = new WWW(normalUrl.ToString(), form); yield return www; if (www.error != null) print(www.error); else print("Finished Uploading Screenshot"); }</pre> <p> 这个是在JAVA中的服务器端的webservices代码</p> <pre name="code" class="java"> @Override public int insertPic(String name,byte[] content) throws Exception { System.out.println(content); System.out.println(name); return (Integer) null; }</pre> <p> 这个是后台报的错误</p> <pre name="code" class="java">2012-10-17 10:13:05 org.apache.cxf.phase.PhaseInterceptorChain doDefaultLogging 警告: Interceptor for {http://web.webservice.firems.suresource.com/}LocationWebserviceImplService has thrown exception, unwinding now org.apache.cxf.binding.soap.SoapFault: Error reading XMLStreamReader. at org.apache.cxf.binding.soap.interceptor.ReadHeadersInterceptor.handleMessage(ReadHeadersInterceptor.java:237) at org.apache.cxf.binding.soap.interceptor.ReadHeadersInterceptor.handleMessage(ReadHeadersInterceptor.java:60) at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:263) at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:123) at org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:207) at org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:213) at org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:154) at org.apache.cxf.transport.servlet.CXFNonSpringServlet.invoke(CXFNonSpringServlet.java:128) at org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:185) at org.apache.cxf.transport.servlet.AbstractHTTPServlet.doPost(AbstractHTTPServlet.java:108) at javax.servlet.http.HttpServlet.service(HttpServlet.java:637) at org.apache.cxf.transport.servlet.AbstractHTTPServlet.service(AbstractHTTPServlet.java:164) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:602) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489) at java.lang.Thread.run(Thread.java:662) Caused by: javax.xml.stream.XMLStreamException: ParseError at [row,col]:[2,1] Message: Content is not allowed in prolog. at com.sun.org.apache.xerces.internal.impl.XMLStreamReaderImpl.next(XMLStreamReaderImpl.java:594) at com.sun.org.apache.xerces.internal.impl.XMLStreamReaderImpl.nextTag(XMLStreamReaderImpl.java:1235) at org.apache.cxf.binding.soap.interceptor.ReadHeadersInterceptor.handleMessage(ReadHeadersInterceptor.java:138) ... 27 more</pre>

Unity3D实现倒计时功能时报错NullReferenceException

IEnumerator CountDown() { while (!isCode) { yield return new WaitForSeconds(5.0f); isCode = true; } Debug.Log("timer=" + timer); } private MonoBehaviour monoBehaviour = new MonoBehaviour(); monoBehaviour.StartCoroutine(CountDown());//报错 用的类是public class UIBind : TTUIPage,没有继承MonoBehaviour, 有什么办法能在这个类中实现倒计时功能呢?

将带有空格的Unity3d字符串存储到MYSQL中的VARCHAR字段中

<div class="post-text" itemprop="text"> <p>I'm working on something with Unity3d MySQL Db. I am passing values through <code>$_GET</code> PHP method but I'm having trouble with strings with white spaces when I store them into the assigned tables.</p> <p>Let's say I have an InputField which gets the string I need. Then, I pass the string through the <code>$_GET</code> method, like this:</p> <pre><code>public InputField myInput; public string a; void StoreData() { a = myInput.text; StartCoroutine(store(a)); } IEnumerator store(string str) { WWW connection = new WWW("http://localhost/route/store_company.php?name=" + str); yield return(connection); } </code></pre> <p>So, after connecting to the DB, in the php file I have:</p> <pre><code>$name = $_GET['name']; $query = "INSERT INTO company(id, name) VALUES (NULL, '$name')"; $get_query = mysqli_query($connection, $query); echo '101'; </code></pre> <p>If I type <em>"Example"</em> in the InputField, the VARCHAR column called name will have "Example". But if I type <em>"This is an example",</em> the VARCHAR column just stores the first word ("This") missing the rest of the sentence.</p> <p>I've sat the VARCHAR to 70 (Length). Pretty new using MySQL. ¿How I capture the whole sentence and why don't work if I am passing a string variable?</p> </div>

Unity3D 实时解析XML时报错

获取网络时间: IEnumerator GetTime() { WWW www = new WWW(timeURL); while (!www.isDone) { yield return www; Debug.Log("Doneeeeeeeeeeeeee" + www.text); ParseXml(www); } }` 后得到:` <?xml version="1.0" encoding="GB2312" ?> - <ntsc> - <time> <year>2011</year> <month>7</month> <day>10</day> <Weekday /> <hour>19</hour> <minite>45</minite> <second>37</second> <Millisecond /> </time> </ntsc>` 然后解析时报错: public void ParseXml(WWW www) { XmlDocument xmlDoc = new XmlDocument(); xmlDoc.Load(www.text); XmlElement root = xmlDoc.DocumentElement; XmlNodeList nodeList = root.SelectNodes("/ntsc/time"); foreach (XmlElement xe in nodeList) { foreach (XmlElement x1 in xe.ChildNodes) { if (x1.Name == "year") { Debug.LogError("x1.InnerText" + x1.InnerText); } } } } 报错语句:` xmlDoc.Load(www.text); 请问如何解决,谢谢!`

PDO搜索查询帮助! [unity3D]

<div class="post-text" itemprop="text"> <p>PHP dispdb.php</p> <pre><code>&lt;?php // Configuration $hostname = '1(Ignore this)'; $username = '1(Ignore this)'; $password = '1(Ignore this)'; $database = '1(Ignore this)'; $secretKey = "1(Ignore this)"; try { $dbh = new PDO('mysql:host='. $hostname .';dbname='. $database, $username, $password); } catch(PDOException $e) { echo '&lt;h1&gt;An error has occurred.&lt;/h1&gt;&lt;pre&gt;', $e-&gt;getMessage() ,'&lt;/pre&gt;'; } $realHash = md5($_GET['search'] . $secretKey); if($realHash == $hash){ $sth = $dbh-&gt;query('SELECT * FROM `oidevstool` WHERE `id` =:search ORDER BY `id`'); $sth-&gt;setFetchMode(PDO::FETCH_ASSOC); $result = $sth-&gt;fetchAll(); if(count($result) &gt; 0) { foreach($result as $r) { echo $r['id'] . "/" . $r['title'] . "/" . $r['priority'] . "/" . $r['deadline'] . "/" . $r['comment']; } } } ?&gt; </code></pre> <p>database.cs</p> <pre><code>using UnityEngine; using System.Collections; public class database : MonoBehaviour { private string secretKey = "1(Don't mid this)"; // Edit this value and make sure it's the same as the one stored on the server public string addScoreURL = "1(Don't mid this)"; //be sure to add a ? to your url public string highscoreURL = "http://example.com/dispdb.php?"; public string dataRetrieved; public string search; public string Md5Sum(string strToEncrypt) { System.Text.UTF8Encoding ue = new System.Text.UTF8Encoding(); byte[] bytes = ue.GetBytes(strToEncrypt); // encrypt bytes System.Security.Cryptography.MD5CryptoServiceProvider md5 = new System.Security.Cryptography.MD5CryptoServiceProvider(); byte[] hashBytes = md5.ComputeHash(bytes); // Convert the encrypted bytes back to a string (base 16) string hashString = ""; for (int i = 0; i &lt; hashBytes.Length; i++) { hashString += System.Convert.ToString(hashBytes[i], 16).PadLeft(2, '0'); } return hashString.PadLeft(32, '0'); } // Get the scores from the MySQL DB to display in a GUIText. // remember to use StartCoroutine when calling this function! IEnumerator GetScores() { string hash = Md5Sum(search + secretKey); string post_url = highscoreURL + "search=" + search + "&amp;hash=" + hash; WWW hs_post = new WWW(post_url); WWW hs_get = new WWW(highscoreURL); yield return hs_get; if (hs_get.error != null) { print("There was an error getting the high score: " + hs_get.error); } else { dataRetrieved = hs_get.text; } } void OnGUI() { GUI.Box(new Rect(0, 0, 800, 800), dataRetrieved); search = GUI.TextField(new Rect(805, 0, 200, 30), search); if(GUI.Button(new Rect(805, 35, 200, 30), "Search")) { StartCoroutine(GetScores()); } } } </code></pre> <p>i've looking ways to fix but i couldn't find any help for some reason this doesn't work whenever i pressed searched on Unity3D it didn't even show the "success", eventhough i made when hash are correct get data</p> <p>any chance of someone going to help me? that't will be very appreciated</p> <p>Thankyou. Best Regards</p> </div>

unity中wwwform提交时报400 Bad Request错误怎么解决?

IEnumerator DecorateFun(string Key1, int Price1, string Key2, int Price2, string Url) { WWWForm newForm = new WWWForm(); newForm.AddField(Key1, Price1); newForm.AddField(Key2, Price2); WWW www = new WWW(Url, newForm); Debug.Log(newForm); yield return www; Debug.Log(Url); if (www.error != null) { Debug.Log("111111111111111111111111 " + www.error); } StartCoroutine(DecorateFun("uId",playerInfo.ID, "buySum", 3, analysisJson.PathuId(analysisJson.BuyGrassPath)+ "&buySum = 30"));

UnityWebRequest不发送POST数据

<div class="post-text" itemprop="text"> <p>When Unity sends the POST request it doesn't pass the POST data, so the server returns an error (it gets the server response). I've seen that several people had a similar issue and it got fixed by adding <code>www.chunkedTransfer = false;</code>, however, that doesn't work for me.</p> <p>I've also seen that some people use <code>WWWForm</code> instead of <code>IMultipartFormSection</code>, but I haven't tried it because it is deprecated.</p> <p>I'm using PHP, but I've also tried it with Perl and it didn't work either. When I manually send a POST request everything works normally, so it seems the issue is in Unity. I'm new to Unity, so any help would be appreciated. I'm using the current latest version, 2018.2.18f1 Personal.</p> <p>My code is pretty much the same as the <a href="https://docs.unity3d.com/Manual/UnityWebRequest-SendingForm.html" rel="nofollow noreferrer">official Unity documentation for sending POST request</a>, but apparently it doesn't work. Here is my code:</p> <p>C#:</p> <pre><code>public void Click() { StartCoroutine(PostRequest("http://127.0.0.1/test.php", "help")); } IEnumerator PostRequest(string url, string data) { List&lt;IMultipartFormSection&gt; formData = new List&lt;IMultipartFormSection&gt;(); formData.Add(new MultipartFormDataSection("data=" + data)); UnityWebRequest www = UnityWebRequest.Post(url, formData); www.chunkedTransfer = false; yield return www.SendWebRequest(); if (www.isNetworkError || www.isHttpError) { Debug.Log(www.error); } else { Debug.Log(www.downloadHandler.text); } } </code></pre> <p>PHP:</p> <pre><code>&lt;?php echo "Server received: " . $_POST["data"]; ?&gt; </code></pre> </div>

从Unity写入服务器上的Text文件

<div class="post-text" itemprop="text"> <p>Hi I have been making an app in Unity and I have been trying to add code that will log User actions i.e. they have made a certain game object appear. What I am trying to do is write to a .txt file stored on a server I have the following code which is based on:</p> <pre><code>http://answers.unity3d.com/questions/984290/upload-txt-file-to-server-using-php.html </code></pre> <p>and they suggest it works, for me it is not writing anything to the file.</p> <p>Here is my PHP code (SaveData.php):</p> <pre><code>&lt;?php $Action = $_GET["action"]; $Date = date('Y/m/d H:i:s'); $myFile = "TestingData.txt"; $fh = fopen($myFile, 'a') or die("can't open file"); fwrite($fh,$Action . "," . $Date . " "); fclose($fh); ?&gt; </code></pre> <p>And here is the C# (SaveData.cs) I am attaching to the game objects I change the Action value in the inspector window:</p> <pre><code>using UnityEngine; using System.Collections; public class SaveData : MonoBehaviour { public string postDataURL = "http://arinstructionman.byethost7.com/SaveData.php?"; //add a ? to your url public string Action; void Start() { StartCoroutine(PostData(Action)); } IEnumerator PostData(string action) { string post_url = postDataURL + "action=" + WWW.EscapeURL(action); WWW data_post = new WWW(post_url); yield return data_post; if (data_post.error != null) { print("There was an error saving data: " + data_post.error); } } } </code></pre> <p>If I copy the post_url value and run it in the browser it seems to work fine, can anyone advise what I am doing wrong?</p> <p>post_url output:</p> <pre><code>http://arinstructionman.byethost7.com/SaveData.php?action=Plane+Visible </code></pre> <p>Any help is much appreciated.</p> </div>

保护C#和PHP之间的通信(而不是加密数据)

<div class="post-text" itemprop="text"> <p>I'm developing an Android and iOS game, I need to call the php pages to collect and enter data into the database mysql.</p> <p>Sending and reception of data works properly, the problem is that the data sent is not encrypted, but this I can solve it with the ssl certificates, in order to have all the data send encrypted.</p> <p>The other problem is that with some appropriate programs (example: Charles Proxy) you can see the address pointed to my php file, and consequently you can resubmit the packet over and over again.</p> <p>For example:</p> <p>This is my test.php:</p> <pre><code>$code = $_POST['SecretCode']; if($code == "secretcode") { // Connect to DB and increment 'i' value } </code></pre> <p>This is my C# code in Unity3D:</p> <pre><code>public IEnumerator test() { WWWForm form = new WWWForm(); form.AddField("SecretCode", secretcode); WWW www = new WWW("http://sitename.com/test.php", form); yield return www; if(www.text != "") { // Returned value } } </code></pre> <p>Now, if from my game I call the 'test ()' function, the php called check the security code, and if it is right, will increase the variable on the database.</p> <p>While the game sends this request, Charles Proxy can see the request and therefore I can with Charles resend endlessly the request, increasing endlessly the value in the database.</p> <p>To make you understand better I'll show you a picture that sums it all:</p> <p><a href="http://postimg.org/image/x3owvt5il/" rel="nofollow">http://postimg.org/image/x3owvt5il/</a></p> <p>Finally there is a way to make invisible the php file or make it look unknown? Or just do not change the value on the database if someone tries to repeat these requests?</p> </div>

Unity将图像上载到服务器,但Codeigniter不起作用

<div class="post-text" itemprop="text"> <p>I want to upload an image jpg to my server. I have try but it didn't work.</p> <p>I don't what cause the upload failed.</p> <p>Below the detail code.</p> <p><strong>Unity C#</strong></p> <pre><code>public void TakePicture(int maxSize) { if (NativeCamera.IsCameraBusy()) { Debug.Log("Camera Busy"); return; } else { NativeCamera.Permission permission = NativeCamera.TakePicture((path) =&gt; { Debug.Log("Image path: " + path); if (path != null) { // Create a Texture2D from the captured image Texture2D texture = NativeCamera.LoadImageAtPath(path, maxSize); //snap.SetPixels(tex.GetPixels()); byte[] bytes = File.ReadAllBytes(path); Debug.Log("Bytes:" + bytes); Destroy(texture); StartCoroutine(upload_ocr_image(bytes)); if (texture == null) { Debug.Log("Couldn't load texture from " + path); return; } // Assign texture to a temporary quad and destroy it after 5 seconds GameObject quad = GameObject.CreatePrimitive(PrimitiveType.Quad); quad.transform.position = Camera.main.transform.position + Camera.main.transform.forward * 2.5f; quad.transform.forward = Camera.main.transform.forward; quad.transform.localScale = new Vector3(1f, texture.height / (float)texture.width, 1f); Material material = quad.GetComponent&lt;Renderer&gt;().material; if (!material.shader.isSupported) // happens when Standard shader is not included in the build material.shader = Shader.Find("Legacy Shaders/Diffuse"); material.mainTexture = texture; Destroy(quad, 5f); // If a procedural texture is not destroyed manually, // it will only be freed after a scene change Destroy(texture, 5f); } }, maxSize); Debug.Log("Permission result: " + permission); } } IEnumerator upload_ocr_image(byte[] bytes) { // UtilityScript.GetComponent&lt;utility&gt;().Sand_Clock_Loading(true); // yield return new WaitForSeconds(2.5f); WWWForm formDate = new WWWForm(); formDate.AddField("frameCount", Time.frameCount.ToString()); formDate.AddBinaryData("ocr_image", bytes, "ocr.jpg", "image/jpg"); formDate.AddField("phone_code", "+61"); formDate.AddField("phone_number", "434599859"); using (UnityWebRequest www = UnityWebRequest.Post(web_url.url_upload_ocr_image, formDate)) { yield return www.Send(); //UtilityScript.GetComponent&lt;utility&gt;().Sand_Clock_Loading(false); if (www.isNetworkError) { Debug.Log(www.error); // UtilityScript.GetComponent&lt;utility&gt;().MessageBox_Check_Connection(); } else { Debug.Log(www.downloadHandler.text); } } } </code></pre> <p><strong>And this the code in server codeigniter php.</strong></p> <pre><code>function upload_ocr_image() { $phone_code = $this-&gt;input-&gt;post('phone_code', true); $phone_number = $this-&gt;input-&gt;post('phone_number', true); $allowedType = array(IMAGETYPE_GIF,IMAGETYPE_JPEG,IMAGETYPE_PNG); $imgType = exif_imagetype($_FILES['ocr_image']['tmp_name']); if(!in_array($imgType,$allowedType)) { echo "Images Type Error. Images Type Only : GIF , JPEG, PNG"; exit; } else { //upload original size front end slider $config['upload_path'] = './assets/ocr_image/'; $config['allowed_types'] = 'gif|jpg|png|jpeg'; $config['file_name'] = $phone_code.$phone_number; $config['overwrite'] = FALSE; $config['max_size'] = '8096'; $config['max_width'] = '6000'; $config['max_height'] = '6000'; $this-&gt;load-&gt;library('upload', $config); if(!$this-&gt;upload-&gt;do_upload("ocr_image")) { echo "Maximum File Size Only 2 Mb Or Max Width = 2000 , Height = 2000"; exit; } else { $img_data = $this-&gt;upload-&gt;data(); // Create Thumbnail /* $magicianObj = new imageLib("assets/ocr_image/".$img_data["file_name"].$phone_code.$phone_number); $magicianObj -&gt; resizeImage(80, 80, 0, true); $magicianObj -&gt; saveImage("assets/admin/img/photos/".$img_data["raw_name"]."_thumb".$img_data["file_ext"], 100); $next_id = $next_id.$img_data["file_ext"]; $thumb_name = $img_data["raw_name"]."_thumb".$img_data["file_ext"]; $data = array("photo_name"=&gt;$next_id, "thumb_photo_name"=&gt;$thumb_name, "create_date"=&gt;date("Y-m-d H:i:s")); $this-&gt;db-&gt;insert("gallery_tbl",$data); */ } } } </code></pre> <p><em>No error found. But it always failed.</em></p> <p><strong>This line of code in codeigniter PHP :</strong> </p> <blockquote> <p>if(!$this-&gt;upload-&gt;do_upload("ocr_image"))</p> </blockquote> <p>Always return <strong>true</strong>.</p> <p>How it work ?, How to upload the picture with proper way ?</p> <p><strong>Edited :</strong></p> <p>I use an asset native camera android and ios from unity to take a picture from camera.</p> <p>Thank You</p> </div>

使用C#调用php脚本(Unity)

<div class="post-text" itemprop="text"> <p>I'm fairly new to both Unity and PHP, and I am currently working on a project where I can parse data from a MySQL database to Unity, using PHP.</p> <p>I initially wanted to try and enable a method where the user can perhaps change the php script and enable it to choose a different table of data, however I was advised that it may be safer to list all variables within the php script and call it from Unity accordingly;</p> <p>Display.php</p> <pre><code>$table = mysql_real_escape_string($_GET['table'], $db); if ($table == "shoes") { $query = "SELECT * FROM `shoes` ORDER by `price` ASC LIMIT 10"; elseif ($table == "sneakers") { $query = "SELECT * FROM `sneakers` ORDER by `price` ASC LIMIT 10"; $result = mysql_query($query) or die('Query failed: ' . mysql_error()); $num_results = mysql_num_rows($result); for($i = 0; $i &lt; $num_results; $i++) { $row = mysql_fetch_array($result); echo $row['shopname'] . "\t" . $row['price'] . " "; } </code></pre> <p>I'm having trouble calling the php and choosing the table that I want to select, I am pretty new to this, so I apologise if this seems completely incompetent to you guys.</p> <p>Here is the my Unity Script;</p> <p>HSController.cs</p> <pre><code>void Start() { StartCoroutine(GetScores()); } // remember to use StartCoroutine when calling this function! IEnumerator PostScores(string name, int score) { string hash = Md5Sum(name + score + secretKey); string post_url = addScoreURL + "name=" + WWW.EscapeURL(name) + "&amp;score=" + score + "&amp;hash=" + hash; WWW hs_post = new WWW(post_url); yield return hs_post; // Wait until the download is done if (hs_post.error != null) { print("There was an error posting the high score: " + hs_post.error); } } IEnumerator GetScores() { gameObject.guiText.text = "Loading..."; WWW hs_get = new WWW(highscoreURL); yield return hs_get; if (hs_get.error != null) { print("There was an error getting the high score: " + hs_get.error); } else { gameObject.guiText.text = hs_get.text; // this is a GUIText that will display the scores in game. } } </code></pre> <p>Any help or a point in the right direction would be great!</p> <p>Kind Regards</p> </div>

Unity c#POST到PHP无法正常工作

<div class="post-text" itemprop="text"> <p>I'm having a really annoying problem with php. With c# I send variables to php, and I want php to save it into my database. But the <code>$_POST</code> in php is empty. In Unity I did a <code>Debug.Log</code> of the variables I am sending to php right before it sends to see if it works, and the variables are there. BUT in php when I echo the <code>$_POST</code>, it returns nothing, it's empty and in the database it adds emptiness.</p> <p><strong>Update:</strong> I added an if statement on the php code to see if the post variables are empty, say, it's empty, if they are not empty, update them in the database. BUT it keeps saying the variables are empty. I need to finish this project in 3 days and this is the only problem that I have to fix and I'm done, please help.</p> <p>c#:</p> <pre><code>public IEnumerator replaceData(string toggle1Post, string toggle2Post, string toggle3Post, string toggle4Post, string toggle5Post, string toggle6Post) { WWWForm form = new WWWForm(); form.AddField("toggle1Post", toggle1Post); form.AddField("toggle2Post", toggle2Post); form.AddField("toggle3Post", toggle3Post); form.AddField("toggle4Post", toggle4Post); form.AddField("toggle5Post", toggle5Post); form.AddField("toggle6Post", toggle6Post); WWW www = new WWW(parkingURL, form); yield return www; Debug.Log(www.text); } </code></pre> <p>php:</p> <pre><code>//Make the connection_aborted $conn = new mysqli($server_name, $server_username, $server_password, $dbName); //Check connection_aborted if (!$conn) { die("Connection Failed. ". mysqli_connect_error()); } else { //echo("Connection Success" . "&lt;br&gt;"); } $parkingName1 = "Bus Gate"; $toggle1Post = $_POST['toggle1Post']; $parkingName2 = "Pepsi Gate"; $toggle2Post = $_POST['toggle2Post']; $parkingName3 = "Watson"; $toggle3Post = $_POST['toggle3Post']; $parkingName4 = "PVA"; $toggle4Post = $_POST['toggle4Post']; $parkingName5 = "Gardens"; $toggle5Post = $_POST['toggle5Post']; $parkingName6 = "Omar Mohsen"; $toggle6Post = $_POST['toggle6Post']; if ($toggle1Post != "" || $toggle2Post != "" || $toggle3Post != "" || $toggle4Post != "" || $toggle5Post != "" || $toggle5Post != "") { $sql1 = "UPDATE parking SET Toggle = '$toggle1Post' WHERE gateName = '$parkingName1'"; if (mysqli_query($conn, $sql1)) echo " Updated " . $toggle1Post; else echo "notUpdated: " . mysqli_error($conn); $sql2 = "UPDATE parking SET Toggle = '$toggle2Post' WHERE gateName = '$parkingName2'"; if (mysqli_query($conn, $sql2)) echo " Updated " . $toggle2Post; else echo "notUpdated: " . mysqli_error($conn); $sql3 = "UPDATE parking SET Toggle = '$toggle3Post' WHERE gateName = '$parkingName3'"; if (mysqli_query($conn, $sql3)) echo " Updated " . $toggle3Post; else echo "notUpdated: " . mysqli_error($conn); $sql4 = "UPDATE parking SET Toggle = '$toggle4Post' WHERE gateName = '$parkingName4'"; if (mysqli_query($conn, $sql4)) echo " Updated " . $toggle4Post; else echo "notUpdated: " . mysqli_error($conn); $sql5 = "UPDATE parking SET Toggle = '$toggle5Post' WHERE gateName = '$parkingName5'"; if (mysqli_query($conn, $sql5)) echo " Updated " . $toggle5Post; else echo "notUpdated: " . mysqli_error($conn); $sql6 = "UPDATE parking SET Toggle = '$toggle6Post' WHERE gateName = '$parkingName6'"; if (mysqli_query($conn, $sql6)) echo " Updated " . $toggle6Post; else echo "notUpdated: " . mysqli_error($conn); } else { echo "The variable is empty "; } </code></pre> <p>Update 2: I tried the same code on another computer with unity version 5.4.1f1 and it worked there, on my computer I'm on version 2017.3.0f3 and it does not work.</p> </div>

如何将我的Unity项目连接到ec2实例上的mysql服务器

<div class="post-text" itemprop="text"> <p>I am trying to get data from my MySQL server to my Unity project. I tried to get the data like so:</p> <pre><code>public string awsurl = "ec2-174-129-82-141.compute-1.amazonaws.com/connect_to_server.php"; IEnumerator GetScores() { print("get scores start"); WWW aws_get = new WWW(awsurl); yield return aws_get; print("getscore here"); if (aws_get.error != null) { print("There was an error getting aws: " + aws_get.error); } else { print(aws_get.text); // this is a GUIText that will display the scores in game. } } </code></pre> <p>I have a php script on my server to handle the interaction because I am having trouble using the MySqlConnection library for my unity project. Here is my php script:</p> <pre><code> $address = "localhost" $dbusername = "root"; $dbpassword = "root"; $db_name = "watshoes"; $db_conn = new mysqli($address, $dbusername, $dbpassword, $db_name); if(isset($_POST['username'])) $username = $_POST['username']; if(isset($_POST['user_id'])) $user_id = $_POST['user_id']; if(isset($password)) $password =$_POST['password']; $stmt = $db_conn-&gt;prepare("SELECT image FROM ImageText"); // "s" means the database expects a string $stmt-&gt;bind_param("s", $user_id); if($stmt-&gt;execute()) { /* bind result variables */ $stmt-&gt;bind_result($image); /* fetch value */ $stmt-&gt;fetch(); echo $image; } else { echo "query failed"; } $stmt-&gt;close(); $db_conn-&gt;close(); </code></pre> <p>But every time I run the code I get this error:<code>There was an error getting aws: Failed to connect to ec2-174-129-82-141.compute-1.amazonaws.com port 80: Timed out</code></p> <p>Thanks for looking at the code and please let me know if there is anything else I can do to help.</p> </div>

Unity中的WWW返回空字符串

<div class="post-text" itemprop="text"> <p>Its returning an empty string and I can't seem to figure out why, if you visit the page it outputs fine. (<a href="http://lgdev.site.nfoservers.com/getItems.php" rel="nofollow">http://lgdev.site.nfoservers.com/getItems.php</a>). I'm trying to get all the data, separate it by certain characters, then use the code in the game t operate it and sort it into the correct places. But like I said its returning an empty string instead of the data that's show on the webpage I gave above.</p> <p>Game Code:</p> <pre><code> public void loadItems() { WWWForm form = new WWWForm(); WWW w = new WWW("http://lgdev.site.nfoservers.com/getItems.php", form); StartCoroutine(loadItemsFunc(w)); } IEnumerator loadItemsFunc(WWW w) { yield return w; Debug.Log(w.text); string[] tmpdata1 = w.text.Split(char.Parse("=")); foreach(string data in tmpdata1) { string[] tmpinfo = data.Split(char.Parse("~")); GameObject tmpObj = Instantiate(weapon); tmpObj.GetComponent&lt;weapon&gt;().name = tmpinfo[0]; tmpObj.GetComponent&lt;weapon&gt;().vitalisim = int.Parse(tmpinfo[1]); tmpObj.GetComponent&lt;weapon&gt;().defence = int.Parse(tmpinfo[2]); tmpObj.GetComponent&lt;weapon&gt;().strength = int.Parse(tmpinfo[3]); string[] offsetInfo1 = tmpinfo[5].Split(char.Parse(";")); foreach (string off in offsetInfo1) { string[] offset = off.Split(char.Parse(",")); tmpObj.GetComponent&lt;weapon&gt;().offsetsPos.Add(new Vector3(float.Parse(offset[0]), float.Parse(offset[1]), float.Parse(offset[2]))); tmpObj.GetComponent&lt;weapon&gt;().offetsRot.Add(new Vector3(float.Parse(offset[3]), float.Parse(offset[4]), float.Parse(offset[5]))); tmpObj.GetComponent&lt;weapon&gt;().offetsSize.Add(new Vector3(float.Parse(offset[6]), float.Parse(offset[7]), float.Parse(offset[8]))); } string[] typeInfo = tmpinfo[4].Split(char.Parse(",")); if (tmpinfo[1] == "SwordnShield") { tmpObj.GetComponent&lt;weapon&gt;().anim = swordAndShieldAnimSet; } else if (tmpinfo[1] == "TwoHanded") { tmpObj.GetComponent&lt;weapon&gt;().anim = twoHandedAnimSet; } foreach (string prefab in tmpinfo[6].Split(char.Parse(","))) { tmpObj.GetComponent&lt;weapon&gt;().prefabs.Add(prefab); } } } </code></pre> <p>PHP Code:</p> <p></p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false"> <div class="snippet-code"> <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;?PHP $con = mysql_connect("localhost","user","passs") or ("Cannot connect!" . mysql_error()); if (!$con) die('Could not connect: ' . mysql_error()); mysql_select_db("lgdev_projectzed" , $con) or die ("could not load the database" . mysql_error()); $query = "SELECT * FROM `equipment`"; $check = mysql_query($query) or die(mysql_error()." ".$query); if($check){ } $numrows = mysql_num_rows($check); $text = ""; while ($row = mysql_fetch_array($check, MYSQL_ASSOC)) { $text = $text."".$row["name"]."~".$row["vitalism"]."~".$row["defence"]."~".$row["strength"]."~".$row["type"]."~".$row["offsets"]."~". $row["prefabs"] ."="; } die($text); ?&gt;</code></pre> </div> </div> </div>

如何在不充斥NIC的情况下监视数据库中的更改

<div class="post-text" itemprop="text"> <p>I have a web server which contains a sql database. There are two "users" to this server/database. One is the actual user where they will submit changes through a UnityWebRequest using HTTP:Post. This will make changes to the database.</p> <p>I have another system that is also in Unity, that needs to be notified, or somehow monitor for whenever a change is made to a specific table in a database. I don't know how to monitor the table for changes without constantly making select calls to the database.</p> <p>What I've tried</p> <p>I have a unity function which calls the webserver through HTTP:Post. The webserver goes into an infinite while loop making calls to the database something like </p> <pre><code>$variable = $_REQUEST['variable_to_monitor']; $stmt = $pdo-&gt;prepare("SELECT variable_to_monitor FROM table_name;") while(true){ $stmt-&gt;execute(); results = $stmt-&gt;fetchAll()[0]; if ($variable != results['variable_to_monitor']){ die(results['variable_to_monitor']); } } </code></pre> <p>This holds up the webserver and is making too many calls to the database. </p> <p>I would like for Unity to be able to make a single call to a web server giving it a given state, the web server will compare said state to database until the database changes, then once the db changes respond to unity with the updated state. I want to be able to do this without making a million SELECT calls to a database per second.</p> <p>Unity Code</p> <pre><code> void Update() { if(hasResponse) { hasResponse = false; StartCoroutine(SendRequest()); } } IEnumerator SendRequest(WWWForm form = null, Action&lt;string&gt; callback = null) { if(null == form) form = new WWWForm(); form.AddField("request", "monitor_variable"); form.AddField("variable_to_monitor", this.variable_to_monitor); UnityWebRequest www = UnityWebRequest.Post(url, form); yield return www.SendWebRequest(); if (www.isNetworkError) { Debug.Log("Network Error"); } else if (www.isHttpError) { Debug.Log("Http Error"); } else { if(null == callback) { Debug.Log(www.downloadHandler.text); } else { if (!www.downloadHandler.text.Contains("New Request Started")) { hasResponse = true; callback(www.downloadHandler.text); } else { Debug.Log(www.downloadHandler.text); } } } } </code></pre> </div>

使用bool.ToString()的$ _POST和WWWForm不起作用

<div class="post-text" itemprop="text"> <p>I have been working on making a custom server (probably won't work but I want to give it a try and work on it as a hobby) but I've already run into a problem! What I have the php scripts outputing the commands as text then getting unity to translate that into the c# commands.</p> <p>Here's the ServerCalls.cs:</p> <pre><code>using UnityEngine; using UnityEngine.UI; using System.Collections; using System; using System.Linq; public class ServerCallsScript : MonoBehaviour { private bool isPlayerInRoom = false; public bool autoConnectToLobby; public bool showLobbyGUI; public float width; public float height; public float x; public float y; public enum logTypeEnum { Developer, Debug, Warning, Error }; public logTypeEnum logType = logTypeEnum.Warning; public string MainServerUrl = "https://network-hlapi-myusername.c9.io/serverMain.php"; private string serverText = ""; void Start() { StartCoroutine(ServerCommands()); } void Update() { } void OnGUI() { if (showLobbyGUI) { if(GUI.Button(new Rect(5,80,115,21), "Create Game")) { } GUI.TextField(new Rect(130, 80, 115, 21), "Game1"); if(GUI.Button(new Rect(5, 110, 115, 21), "Join Game")) { } GUI.TextField(new Rect(130, 110, 115, 21),"Game Name"); } } /// &lt;summary&gt; /// This is called as soon as the player opens the scene /// &lt;/summary&gt; public void OnConnectedToServer() { if (logType == logTypeEnum.Debug || logType == logTypeEnum.Developer) { Debug.Log("Successfully Connected To Server at " + DateTime.Now.ToString("hh:mm:ss")); } } /// &lt;summary&gt; /// Called When Player Connects To Lobby. Automatically called if auto-join lobby is enabled /// &lt;/summary&gt; public void OnConnectedToLobby() { if (logType == logTypeEnum.Debug || logType == logTypeEnum.Developer) { Debug.Log("Connected To Lobby at " + DateTime.Now.ToString("hh:mm:ss")); } } public void ShowLobbyGui() { if (logType == logTypeEnum.Debug || logType == logTypeEnum.Developer) { Debug.Log("Showing Lobby Gui"); } } /// &lt;summary&gt; /// Called when the player joins a game /// &lt;/summary&gt; public void OnPlayerJoinedRoom() { if (logType == logTypeEnum.Debug || logType == logTypeEnum.Developer) { Debug.Log("Player Successfully Joined Room at " + DateTime.Now.ToString("hh:mm:ss")); } } IEnumerator ServerCommands() { Debug.Log("Collecting Info from Server..."); WWWForm Mainform = new WWWForm(); Mainform.AddField("isAutoJoinLobby", autoConnectToLobby.ToString()); Mainform.AddField("isShowingLobbyGui", showLobbyGUI.ToString()); Mainform.AddField("hasPlayerJoinedRoom", isPlayerInRoom.ToString()); WWW mainServer = new WWW(MainServerUrl, Mainform); yield return mainServer; serverText = mainServer.text; string[] serverCommands = serverText.Split(' '); if(mainServer.error != null) { Debug.LogError("We encountered an error! Error:" + mainServer.error); } if (serverCommands.Contains("OnConnectedToServer")) { OnConnectedToServer(); } if (serverCommands.Contains("OnConnectedToLobby")) { Debug.Log("OnConnectedToLobby"); OnConnectedToLobby(); } if (serverCommands.Contains("showLobbyGui")) { ShowLobbyGui(); } if (serverCommands.Contains("OnPlayerJoinedRoom")) { OnPlayerJoinedRoom(); } } } </code></pre> <p>For ServerMain.php:</p> <pre><code>&lt;?php $servername = getenv('IP'); $username = getenv('C9_USER'); $password = "I Wouldn't Tell You That Now"; $database = "server"; $dbport = 3306; // Create connection $db = mysql_connect($servername, $username, $password, $dbport)or die("Cant Connect to server"); mysql_select_db($database) or die("Cant connect to database"); $isAutoConnectToLobby = $_POST['isAutoJoinLobby']; $isShowingLobbyGui = $_POST['isShowingLobbyGui']; $hasPlayerJoinedRoom = $_POST['hasPlayerJoinedRoom']; $ClientClickConnectButton = $_POST['ClientClickConnectButton']; echo "OnConnectedToServer "; if ($isAutoConnectToLobby == true){ echo "OnConnectedToLobby "; } if($isShowingLobbyGui == true){ echo "showLobbyGui "; } if($ClientClickConnectButton == true){ sleep(5); //Just to give some time to complete any in-complete operations echo "onClientClickConnectButton "; } if($hasPlayerJoinedRoom == true){ echo "OnPlayerJoinedRoom "; } ?&gt; </code></pre> <p>The problem is that the ServerMain.php script doesn't seem to listen to any of the WWWForm fields. If you add quotes to the if statements in the php script it just goes through all the if statements but if you don't add quotes it doesn't do any of the if statements, even if the public bools are enabled</p> </div>

Coroutines或Php脚本不适用于移动设备

<div class="post-text" itemprop="text"> <p>Hi this is my first query using stack overflow so lets get to it. i am making an android game that uses database that is on a server of a site i am using phpmyadmin to manage mysql and here is how i retrieve data </p> <pre><code>public class Dataretrieve : MonoBehaviour { WWW sitedata; public string[] users; public static string[] Usernames; public static string[] Emails; public static string[] Passwords; public static string[] Icons; // Use this for initialization public void Start(){ StartCoroutine_Auto(StartGettingData); } public IEnumerator StartGettingData () { Debug.Log ("Starting to get values"); sitedata = new WWW ("mysite/database.php"); yield return sitedata; string sitedatatext = sitedata.text; users = sitedatatext.Split (';'); Usernames=new string[users.Length-1]; Emails=new string[users.Length-1]; Passwords=new string[users.Length-1]; Icons=new string[users.Length-1]; for (int i=0; i&lt;users.Length-1; i++) { Usernames[i]=GetData(users[i],"Username:"); Emails[i]=GetData(users[i],"Email:"); Passwords[i]=GetData(users[i],"Password:"); Icons[i]=GetData(users[i],"Icon:"); } Debug.Log ("All Data Retrieved"); StopCoroutine ("StartGettingData"); } string GetData(string data,string index) { string value = data.Substring (data.IndexOf (index) + index.Length); if (value.Contains ("|")) value = value.Remove (value.IndexOf ("|")); return value; } public void values() { Debug.Log ("Start getting values again"); StartCoroutine_Auto(StartGettingData()); StopCoroutine ("StartGettingData"); Debug.Log ("Values Updated again"); } </code></pre> <p>}</p> <p>The problem is it works fine on unity editor but when i run it on built it doesn't get users data</p> <p>here's php code </p> <p></p><div class="snippet" data-lang="js" data-hide="false" data-console="true"> <div class="snippet-code"> <pre class="snippet-code-css lang-css prettyprint-override"><code>$conn=new mysqli($servername,$username,$password,$dbName); if(!$conn) { die("Connection Failled".mysqli_connect_error() ); } $sql="SELECT ID, Email, Password, Username, Icon FROM Login_Variables"; $result = mysqli_query($conn ,$sql); if(mysqli_num_rows($result) &gt; 0) while( $row =mysqli_fetch_assoc($result)) { echo("ID:".$row['ID']."|Email:".$row['Email']."|Password:".$row['Password']."|Username:".$row['Username']."|Icon:".$row['Icon'].";"); }</code></pre> </div> </div> </div>

Python可以这样学(第一季:Python内功修炼)

董付国系列教材《Python程序设计基础》、《Python程序设计(第2版)》、《Python可以这样学》配套视频,讲解Python 3.5.x和3.6.x语法、内置对象用法、选择与循环以及函数设计与使用、lambda表达式用法、字符串与正则表达式应用、面向对象编程、文本文件与二进制文件操作、目录操作与系统运维、异常处理结构。

获取Linux下Ftp目录树并逐步绑定到treeview

在linux下抓取目录树,双击后获取该节点子节点(逐步生成)。另外有两个类,一个是windows下的(一次性获取目录树),一个是linux下的(足部获取目录树)

NS网络模拟和协议仿真源代码

NS网络模拟和协议仿真源代码,包含代码说明及协议分析

简单的NS3网络模拟仿真(计算机网络作业)

简单的NS3网络模拟仿真,内附有PPT演示。论文评述。以及简单的安装教程。

手把手实现Java图书管理系统(附源码)

【超实用课程内容】 本课程演示的是一套基于Java的SSM框架实现的图书管理系统,主要针对计算机相关专业的正在做毕设的学生与需要项目实战练习的java人群。详细介绍了图书管理系统的实现,包括:环境搭建、系统业务、技术实现、项目运行、功能演示、系统扩展等,以通俗易懂的方式,手把手的带你从零开始运行本套图书管理系统,该项目附带全部源码可作为毕设使用。 【课程如何观看?】 PC端:https://edu.csdn.net/course/detail/27513 移动端:CSDN 学院APP(注意不是CSDN APP哦) 本课程为录播课,课程2年有效观看时长,大家可以抓紧时间学习后一起讨论哦~ 【学员专享增值服务】 源码开放 课件、课程案例代码完全开放给你,你可以根据所学知识,自行修改、优化

三个项目玩转深度学习(附1G源码)

从事大数据与人工智能开发与实践约十年,钱老师亲自见证了大数据行业的发展与人工智能的从冷到热。事实证明,计算机技术的发展,算力突破,海量数据,机器人技术等,开启了第四次工业革命的序章。深度学习图像分类一直是人工智能的经典任务,是智慧零售、安防、无人驾驶等机器视觉应用领域的核心技术之一,掌握图像分类技术是机器视觉学习的重中之重。针对现有线上学习的特点与实际需求,我们开发了人工智能案例实战系列课程。打造:以项目案例实践为驱动的课程学习方式,覆盖了智能零售,智慧交通等常见领域,通过基础学习、项目案例实践、社群答疑,三维立体的方式,打造最好的学习效果。

150讲轻松搞定Python网络爬虫

【为什么学爬虫?】 &nbsp; &nbsp; &nbsp; &nbsp;1、爬虫入手容易,但是深入较难,如何写出高效率的爬虫,如何写出灵活性高可扩展的爬虫都是一项技术活。另外在爬虫过程中,经常容易遇到被反爬虫,比如字体反爬、IP识别、验证码等,如何层层攻克难点拿到想要的数据,这门课程,你都能学到! &nbsp; &nbsp; &nbsp; &nbsp;2、如果是作为一个其他行业的开发者,比如app开发,web开发,学习爬虫能让你加强对技术的认知,能够开发出更加安全的软件和网站 【课程设计】 一个完整的爬虫程序,无论大小,总体来说可以分成三个步骤,分别是: 网络请求:模拟浏览器的行为从网上抓取数据。 数据解析:将请求下来的数据进行过滤,提取我们想要的数据。 数据存储:将提取到的数据存储到硬盘或者内存中。比如用mysql数据库或者redis等。 那么本课程也是按照这几个步骤循序渐进的进行讲解,带领学生完整的掌握每个步骤的技术。另外,因为爬虫的多样性,在爬取的过程中可能会发生被反爬、效率低下等。因此我们又增加了两个章节用来提高爬虫程序的灵活性,分别是: 爬虫进阶:包括IP代理,多线程爬虫,图形验证码识别、JS加密解密、动态网页爬虫、字体反爬识别等。 Scrapy和分布式爬虫:Scrapy框架、Scrapy-redis组件、分布式爬虫等。 通过爬虫进阶的知识点我们能应付大量的反爬网站,而Scrapy框架作为一个专业的爬虫框架,使用他可以快速提高我们编写爬虫程序的效率和速度。另外如果一台机器不能满足你的需求,我们可以用分布式爬虫让多台机器帮助你快速爬取数据。 &nbsp; 从基础爬虫到商业化应用爬虫,本套课程满足您的所有需求! 【课程服务】 专属付费社群+每周三讨论会+1v1答疑

cuda开发cutilDLL

包括cutil32.dll、cutil32D.dll、cutil32.lib、cutil32D.lib,以及附带的glew32.lib/freeglut.lib

深度学习原理+项目实战+算法详解+主流框架(套餐)

深度学习系列课程从深度学习基础知识点开始讲解一步步进入神经网络的世界再到卷积和递归神经网络,详解各大经典网络架构。实战部分选择当下最火爆深度学习框架PyTorch与Tensorflow/Keras,全程实战演示框架核心使用与建模方法。项目实战部分选择计算机视觉与自然语言处理领域经典项目,从零开始详解算法原理,debug模式逐行代码解读。适合准备就业和转行的同学们加入学习! 建议按照下列课程顺序来进行学习 (1)掌握深度学习必备经典网络架构 (2)深度框架实战方法 (3)计算机视觉与自然语言处理项目实战。(按照课程排列顺序即可)

Tensorflow与python3.7适配版本

tensorflow与python3.7匹配的最新库,更新了python3.7以后可以自行下载,或者去国外python的扩展包下载界面自行下载。

4小时玩转微信小程序——基础入门与微信支付实战

这是一个门针对零基础学员学习微信小程序开发的视频教学课程。课程采用腾讯官方文档作为教程的唯一技术资料来源。杜绝网络上质量良莠不齐的资料给学员学习带来的障碍。 视频课程按照开发工具的下载、安装、使用、程序结构、视图层、逻辑层、微信小程序等几个部分组织课程,详细讲解整个小程序的开发过程

专为程序员设计的数学课

<p> 限时福利限时福利,<span>15000+程序员的选择!</span> </p> <p> 购课后添加学习助手(微信号:csdn590),按提示消息领取编程大礼包!并获取讲师答疑服务! </p> <p> <br> </p> <p> 套餐中一共包含5门程序员必学的数学课程(共47讲) </p> <p> 课程1:《零基础入门微积分》 </p> <p> 课程2:《数理统计与概率论》 </p> <p> 课程3:《代码学习线性代数》 </p> <p> 课程4:《数据处理的最优化》 </p> <p> 课程5:《马尔可夫随机过程》 </p> <p> <br> </p> <p> 哪些人适合学习这门课程? </p> <p> 1)大学生,平时只学习了数学理论,并未接触如何应用数学解决编程问题; </p> <p> 2)对算法、数据结构掌握程度薄弱的人,数学可以让你更好的理解算法、数据结构原理及应用; </p> <p> 3)看不懂大牛代码设计思想的人,因为所有的程序设计底层逻辑都是数学; </p> <p> 4)想学习新技术,如:人工智能、机器学习、深度学习等,这门课程是你的必修课程; </p> <p> 5)想修炼更好的编程内功,在遇到问题时可以灵活的应用数学思维解决问题。 </p> <p> <br> </p> <p> 在这门「专为程序员设计的数学课」系列课中,我们保证你能收获到这些:<br> <br> <span> </span> </p> <p class="ql-long-24357476"> <span class="ql-author-24357476">①价值300元编程课程大礼包</span> </p> <p class="ql-long-24357476"> <span class="ql-author-24357476">②应用数学优化代码的实操方法</span> </p> <p class="ql-long-24357476"> <span class="ql-author-24357476">③数学理论在编程实战中的应用</span> </p> <p class="ql-long-24357476"> <span class="ql-author-24357476">④程序员必学的5大数学知识</span> </p> <p class="ql-long-24357476"> <span class="ql-author-24357476">⑤人工智能领域必修数学课</span> </p> <p> <br> 备注:此课程只讲程序员所需要的数学,即使你数学基础薄弱,也能听懂,只需要初中的数学知识就足矣。<br> <br> 如何听课? </p> <p> 1、登录CSDN学院 APP 在我的课程中进行学习; </p> <p> 2、登录CSDN学院官网。 </p> <p> <br> </p> <p> 购课后如何领取免费赠送的编程大礼包和加入答疑群? </p> <p> 购课后,添加助教微信:<span> csdn590</span>,按提示领取编程大礼包,或观看付费视频的第一节内容扫码进群答疑交流! </p> <p> <img src="https://img-bss.csdn.net/201912251155398753.jpg" alt=""> </p>

实现简单的文件系统

实验内容: 通过对具体的文件存储空间的管理、文件的物理结构、目录结构和文件操作的实现,加深对文件系统内部功能和实现过程的理解。 要求: 1.在内存中开辟一个虚拟磁盘空间作为文件存储器,在其上实现一个简

机器学习初学者必会的案例精讲

通过六个实际的编码项目,带领同学入门人工智能。这些项目涉及机器学习(回归,分类,聚类),深度学习(神经网络),底层数学算法,Weka数据挖掘,利用Git开源项目实战等。

四分之一悬架模型simulink.7z

首先建立了四分之一车辆悬架系统的数学模型,应用MATLAB/Simulink软件建立该系统的仿真模型,并输入路面激励为随机激励,控制不同的悬架刚度和阻尼,选用最优的参数得到车辆悬架的振动加速度变化曲线

MFC一站式终极全套课程包

该套餐共包含从C小白到C++到MFC的全部课程,整套学下来绝对成为一名C++大牛!!!

C++语言基础视频教程

C++语言基础视频培训课程:本课与主讲者在大学开出的程序设计课程直接对接,准确把握知识点,注重教学视频与实践体系的结合,帮助初学者有效学习。本教程详细介绍C++语言中的封装、数据隐藏、继承、多态的实现等入门知识;主要包括类的声明、对象定义、构造函数和析构函数、运算符重载、继承和派生、多态性实现等。 课程需要有C语言程序设计的基础(可以利用本人开出的《C语言与程序设计》系列课学习)。学习者能够通过实践的方式,学会利用C++语言解决问题,具备进一步学习利用C++开发应用程序的基础。

Java8零基础入门视频教程

这门课程基于主流的java8平台,由浅入深的详细讲解了java SE的开发技术,可以使java方向的入门学员,快速扎实的掌握java开发技术!

HoloLens2开发入门教程

本课程为HoloLens2开发入门教程,讲解部署开发环境,安装VS2019,Unity版本,Windows SDK,创建Unity项目,讲解如何使用MRTK,编辑器模拟手势交互,打包VS工程并编译部署应用到HoloLens上等。

C/C++学习指南全套教程

C/C++学习的全套教程,从基本语法,基本原理,到界面开发、网络开发、Linux开发、安全算法,应用尽用。由毕业于清华大学的业内人士执课,为C/C++编程爱好者的教程。

pokemmo的资源

pokemmo必须的4个rom 分别为绿宝石 火红 心金 黑白 还有汉化补丁 资源不错哦 记得下载

test_head.py

本文件主要是针对使用dlib的imglab标注工具标记的目标检测框和关键点检测而生成的xml文件, 转换为coco数据集格式.

Java面试史上最全的JAVA专业术语面试100问 (前1-50)

前言: 说在前面, 面试题是根据一些朋友去面试提供的,再就是从网上整理了一些。 先更新50道,下一波吧后面的也更出来。 求赞求关注!! 废话也不多说,现在就来看看有哪些面试题 1、面向对象的特点有哪些? 抽象、继承、封装、多态。 2、接口和抽象类有什么联系和区别? 3、重载和重写有什么区别? 4、java有哪些基本数据类型? 5、数组有没有length()方法?String有没有length()方法? 数组没有length()方法,它有length属性。 String有length()方法。 集合求长度用

2019 AI开发者大会

2019 AI开发者大会(AI ProCon 2019)是由中国IT社区CSDN主办的AI技术与产业年度盛会。多年经验淬炼,如今蓄势待发:2019年9月6-7日,大会将有近百位中美顶尖AI专家、知名企业代表以及千余名AI开发者齐聚北京,进行技术解读和产业论证。我们不空谈口号,只谈技术,诚挚邀请AI业内人士一起共铸人工智能新篇章!

linux“开发工具三剑客”速成攻略

工欲善其事,必先利其器。Vim+Git+Makefile是Linux环境下嵌入式开发常用的工具。本专题主要面向初次接触Linux的新手,熟练掌握工作中常用的工具,在以后的学习和工作中提高效率。

DirectX修复工具V4.0增强版

DirectX修复工具(DirectX Repair)是一款系统级工具软件,简便易用。本程序为绿色版,无需安装,可直接运行。 本程序的主要功能是检测当前系统的DirectX状态,如果发现异常则进行修复

20行代码教你用python给证件照换底色

20行代码教你用python给证件照换底色

2019 Python开发者日-培训

本次活动将秉承“只讲技术,拒绝空谈”的理念,邀请十余位身处一线的Python技术专家,重点围绕Web开发、自动化运维、数据分析、人工智能等技术模块,分享真实生产环境中使用Python应对IT挑战的真知灼见。此外,针对不同层次的开发者,大会还安排了深度培训实操环节,为开发者们带来更多深度实战的机会。

我以为我对Mysql事务很熟,直到我遇到了阿里面试官

太惨了,面试又被吊打

相关热词 c#框体中的退出函数 c# 按钮透明背景 c# idl 混编出错 c#在位置0处没有任何行 c# 循环给数组插入数据 c# 多线程死锁的例子 c# 钉钉读取员工排班 c# label 不显示 c#裁剪影像 c#工作进程更新ui
立即提问