PM> sqllocaldb.exe stop v11.0
LocalDB instance "v11.0" stopped.
PM> sqllocaldb.exe delete v11.0
LocalDB instance "v11.0" deleted.
Parse JSON in C#
- Post your JSON in http://json2csharp.com/. Take the resulting classes and merge duplicates, and you get:
public class AddressComponent { public string long_name { get; set; } public string short_name { get; set; } public List<string> types { get; set; } } public class Bounds { public Location northeast { get; set; } public Location southwest { get; set; } } public class Location { public double lat { get; set; } public double lng { get; set; } } public class Geometry { public Bounds bounds { get; set; } public Location location { get; set; } public string location_type { get; set; } public Bounds viewport { get; set; } } public class Result { public List<AddressComponent> address_components { get; set; } public string formatted_address { get; set; } public Geometry geometry { get; set; } public bool partial_match { get; set; } public List<string> types { get; set; } } public class RootObject { public List<Result> results { get; set; } public string status { get; set; } } - Deserialize your JSON with Json.NET like so:
var root = JsonConvert.DeserializeObject<RootObject>(result); - There are multiple results returned for your query, so you need to loop through the locations returned like so:
foreach (var singleResult in root.results) { var location = singleResult.geometry.location; var latitude = location.lat; var longitude = location.lng; // Do whatever you want with them. }
Qt Timer
|
Other way is using of built-in method start timer & event TimerEvent.
Header:
Source:
|
Telnet server in IMX6 Linux OS
* mkdir /dev/pts
* mount -t devpts devpts /dev/pts
*telnetd -l /bin/login
* mount -t devpts devpts /dev/pts
*telnetd -l /bin/login
TFTP Server in Ubuntu
- Install following packages.
sudo apt-get install xinetd tftpd tftp - Create /etc/xinetd.d/tftp and put this entry
service tftp { protocol = udp port = 69 socket_type = dgram wait = yes user = nobody server = /usr/sbin/in.tftpd server_args = /tftpboot disable = no } - Create a folder /tftpboot this should match whatever you gave in server_args. mostly it will be tftpboot
sudo mkdir /tftpboot sudo chmod -R 777 /tftpboot sudo chown -R nobody /tftpboot - Restart the xinetd service.
sudo /etc/init.d/xinetd restartNow our tftp server is up and running.## TFTP from TargetGET: tftp -l [local file name] -r [remote file name] -g [server Ip]PUT: tftp -l [local file name] -r [remote file name] -p [server Ip]
Linux Commands
// Share Windows and VMWare
.. Enable and Create Share folder in VM -> Settings -> Share Folder >.......
.. linux command : mkdir /mnt ...if mnt doesn't exit
sudo mount -t vmhgfs .host /mnt
.. Enable and Create Share folder in VM -> Settings -> Share Folder >.......
.. linux command : mkdir /mnt ...if mnt doesn't exit
sudo mount -t vmhgfs .host /mnt
Subscribe to:
Posts (Atom)