strncpy เป็น function สําหรับ copy string จากตัวแปรต้นทางไปใส่ในตัวแปรปลายทาง
char *strncpy(char *dest, const char *src, size_t n)
#include <stdio.h>
#include <string.h>
int main()
{
char src[] = "This is thitiBlog.com";
char dest[50];
memset(dest, '\0', sizeof(dest));
strncpy(dest, src, 10);
printf("Final copied string : %s\n", dest);
return(0);
}
Output:
Final copied string : This is th
วิธีการตรวจสอบว่าตัวแปรเป็น Nothing หรือ ไม่เป็น Nothing ใน vb ทําได้ดังนี้
ในบทความนี้ผมจะอธิบายถึงวิธีการทําให้ ESP8266 เป็น Access point ให้อุปกรณ์อุปกรณ์อื่นๆ ที่เชื่อมต่อ wifi ได้ เช่น computer, smart phone ฯลฯ มาเชื่อมต่อกับ SEP8266 แล้วควบคุม i/o ปิด/เปิด LED ผ่านเว็บ ด้วยวิธีส่งข้อมูลผ่าน HTTP_GET เช่น
Mod_Rewrite คืออะไร?Mod_Rewrite คือ การแปลง url ที่ดูยุ่งยากให้เป็น url ใหม่ตามที่เราต้องการเพื่อประโยชน์หลายอย่าง เช่น การทํา SEO, การซ่อน url ที่แท้จริงของไฟล์ที่เราไม่ต้องการให้คนอื่นรู้ ฯลฯ