Langsung ke konten utama

Postingan

AX X++ str2Date

From time to time, a user will need to pull a date from a string. More often than not it is from an XML or from some other location. In order to actually use this date passed, it needs to be of data type 'date' so it can be written to fields, used in queries etc.  To do this, a user can use the 'str2Date' function. The str2Date function takes two parameters: datestring = The date in string format. It can be separated by either a dash ('-') or slash ('/') sequence = A three number combo using 1, 2, and 3 where 1 = day, 2 = month, and 3 = year. (e.g. 231 would be MM-YYY-DD, and 321 would be YYYY-MM-YY) If the sequence doesn't match the string or has an error, a '0' will result. Note that its very important to distinguish between day and month as an invalid month (>12) will result in a 0 and if both are <13, the date can translate totally wrong. I've detailed out the results of various scenarios below. Should be pretty self explan
Postingan terbaru

HTML Table

An HTML table is defined with the  <table>  tag. Each table row is defined with the  <tr>  tag. A table header is defined with the  <th>  tag. By default, table headings are bold and centered. A table data/cell is defined with the  <td>  tag. < table  style ="width:100%" >    < tr >      < th > Firstname < /th >      < th > Lastname < /th >        < th > Age < /th >    < /tr >    < tr >      < td > Jill < /td >      < td > Smith < /td >        < td > 50 < /td >    < /tr >    < tr >      < td > Eve < /td >      < td > Jackson < /td >        < td > 94 < /td >    < /tr > < /table > HTML Table - Adding a Border If you do not specify a border for the table, it will be displayed without borders. A border is set using the CSS  border  property: table, th, td  {     border :  1px solid bla

Cara Menghapus Riwayat Pencarian Instagram

Instagram menyimpan pencarian di  Cari & Jelajahi  untuk mempermudah Anda menemukan kembali tagar dan akun favorit dengan cepat. Untuk membersihkan riwayat pencarian: Buka profil Anda dan ketuk  . Ketuk  Pengaturan . Di bawah  Akun , ketuk  Riwayat Pencarian . Ketuk  Bersihkan Riwayat Pencarian . Harap diingat bahwa membersihkan riwayat pencarian bersifat temporer, dan pencarian yang Anda bersihkan mungkin muncul kembali di riwayat Anda setelah Anda mencarinya lagi. Anda juga dapat menyembunyikan akun individu untuk menghapusnya secara permanen dari riwayat pencarian Anda dan agar tidak muncul kembali: Ketuk   lalu ketuk bilah pencarian di bagian atas layar Ketuk  Teratas  atau  Orang , lalu ketuk dan tahan akun yang ingin Anda sembunyikan dari riwayat Ketuk  Sembunyikan Demikian cara untuk membersihkan riwayat pencarian dari Instagram anda.

Propinsi, Kota, Kabupaten, Kecamatan, Kelurahan, Kode Pos Seluruh Indonesia

Jika anda mencari database atau daftar tentang ini, inilah tempat yang tepat : database kecamatan seluruh indonesia, database kota seluruh Indonesia, database kelurahan seluruh Indonesia, database desa seluruh Indonesia, database kabupaten seluruh Indonesia, database propinsi seluruh Indonesia, database kode pos seluruh indonesia, daftar kecamatan seluruh indonesia, daftar kota seluruh Indonesia, daftar kelurahan seluruh Indonesia, daftar desa seluruh Indonesia, daftar kabupaten seluruh Indonesia, daftar propinsi seluruh Indonesia, daftar kode pos seluruh indonesia, save di status anda, siapa tahu butuh, tinggal download. Download disini

Use X++ wildcard (LIKE and NOT LIKE) in X++ select statement

For x++ select statements:  select firstOnly batchHistory      where batchHistory.Caption  LIKE  "*Test*"  For x++ queries:  queryBuildRange.value(*Test*); Note the LIKE instead of a '==' and the wildcards inside of the quotations. All other combinations of wildcard usage will work here. This is the same functionality as what the users would put in the grid filtering(eg. '*TEST*' in the caption field filter on the batch tasks form).  However, if you want to find all Captions that do not have the word Test in them (NOT LIKE, !LIKE), you will have to modify the above example slightly.  For x++ select statements:  select firstOnly batchHistory      where  !( batchHistory.Caption LIKE "*TEST*" ) ;  For x++ queries:  queryBuildRange.value(!*Test*);

Breakpoint in Info.add()

This trick is probably the first every X++ developer learns, so it deserves to be the first on the  list of X++ Debugging Tips and Tricks . Suppose an X++ exception occurs and you want to know why. The error is written to the Infolog. Double-clicking the line in the Infolog window will bring you to the line that threw the exception. Sometimes it is trivial to see the cause just by looking at the code. Other times it is not, and you will need the entire context including the call stack and variables to figure out what the cause is. Set a breakpoint in the  add  method on the  Info  class – and rerun the scenario. When the exception is thrown your breakpoint is hit, and you can perform the autopsy.

To Read and Write From Serial Port C#

using System ; using System . IO . Ports ; using System . Windows . Forms ; namespace SerialPortExample { class SerialPortProgram { // Create the serial port with basic settings private SerialPort port = new SerialPort ( "COM1" , 9600 , Parity . None , 8 , StopBits . One ); [ STAThread ] static void Main ( string [] args ) { // Instatiate this class new SerialPortProgram (); } private SerialPortProgram () { Console . WriteLine ( "Incoming Data:" ); // Attach a method to be called when there // is data waiting in the port's buffer port . DataReceived += new SerialDataReceivedEventHandler ( port_DataReceived ); // Begin communications port . Open (); // Enter an application loop to keep this thread alive Application . Run (); } private void port_DataReceived ( object sender , SerialDataR