~/tags/programmirovanie $
#программирование
15 posts
15 total
· page 1 / 2
In the previous part (Python Bottle Guide (Translation) Part 4 - Creating Content) we considered the main aspects related to the transmitted content, in this part we will consider the data transmitted in requests. Files Cookie, HTTP headers, HTML form fields, and other request data are available through the global request object. This special object always refers to the current request, even in multi-threaded environments where multiple client connections are being processed simultaneously:
Starting from C# 7 version, the language has a feature that allows declaring a local variable that references an array element or a field in an object: int[] simpleArray = {0, 1, 2, 3, 4, 5, 6, 7, 8}; ref int simpleElementRef = ref simpleArra…
Example of a POST request to a service using WebRequest in C#: using System; using System.Net; using System.IO; namespace Tester { class Program { static void Main(string[] args) { Console.WriteLine("RUN Tests for Service:"); //Perform…
One peculiarity of data collection terminals Cipher with Windows CE is that, unlike other TSDs (at least Motorola(Symbol) and Datalogic), standard methods of obtaining a serial number will not work. To get it, you can, but it will be the same for all devices, which personally does not suit me.
In this publication, I will tell you how to output the required number of images (for example, from a database) in a Crystal Report. !!! To make the publication understandable, it is recommended to read the previous article <a href="[[B2]]" target="_blank">Using Crystal Report in C#</a>.<br><br>After trying many methods (mainly described on foreign sites - in Ru-net, this question is not studied very well), I found a working and efficient method for outputting images in a Crystal Report, which involves passing images to the report through a data source.<br><br>To pass images in this way, we simply create a DataTable, where one of the columns (or several) sets the data type to an array of bytes - "System.Byte[]". Then, we simply add images to the cells of this field, converting them to a Byte[] array.<br><br><b>Example of creating such a data source (DataSet):</b></p>
[[B0]]
<p><br><br><b>!!!</b> Note the <b>XmlWriteMode.WriteSchema</b> - without this parameter, the editor will not understand what is in the image fields, because the data schema will not be saved! <br><br>After that, we can create a report form and add the obtained data source in the form of an XML file: Left button on "Database Fields" then Database Expert -> Database Files (select the created XML file by our project).<br><br>Here's what it will look like (when dragging a field onto the form, the images from the table will be displayed, in my case, one image, you can pass sets and link them to data):<br><a href="[[B3]]" class="highslide"><img src="[[B4]]" class="image-bordered image-padded" alt=""></a> <br><br><b>Created report form can be used and passed to it modified data source in this way:</b></p>
[[B1]]
<p><br><br><b>!!!</b> In the future, the data source does not need to be saved to disk, we saved it to disk only to create a report form with a structure of data that will fully match what we will pass to the report from the application.<br><br>Here's the result of the example (I changed only one image in the header, but this method can pass and sets of images linked to data, as I mentioned earlier):<br><a href="[[B5]]" class="highslide"><img src="[[B6]]" class="image-bordered image-padded" alt=""></a> <br><br>Download the original code example here: <br>[attachment=25:reportimage.rar] <br><br>That's it. Questions and good comments are welcome.</p>
Recently encountered a problem where FormWindowState.Maximized did not work everywhere. For example, it stopped working on one of my devices with Windows CE 6.0, and no amount of dancing helped. I spent a long time searching the internet, but found nothing in Russian. I eventually found a guide on an English-language website.
Not long ago, I stumbled upon an article on Habr about TcpListener - it was used to create a Web server. Since there are some tasks that require creating a similar application, it was decided to study the issue and try to recreate what was seen. I rewrote what was in the publication in an application (I always do this before downloading the source code - better for understanding) and ran it, but it didn't work. Actually, it worked, but occasionally - somehow crookedly and not suitable for a real working application. I downloaded the source code - the same thing, it worked but occasionally. <i>Here it works occasionally - means that the client sometimes connected and sometimes didn't connect to the server.</i> I decided to study the issue from scratch. I accumulated some material from the internet, and it all worked out - a testable working application.
It's time to write the second publication on programming reading devices for data collection terminals. In this publication, I will provide an example of programming a laser scanner on Cipher 9300 terminals. Here, I will provide a simple example of creating a program on Windows CE, which will work with the scanner on Cipher 93XX terminals. In general, the original code of this program will be based on examples provided in the programming guide, but with some minor improvements.
I've long wanted to write a guide like this, but somehow never had the time, and finally wrote it, with a whole lot of work involved... Those who want to cram 1C (even on a terminal) using DataWedge (a utility for sending what the scanner reads to the keyboard buffer, specialized for TSD Symbol) can stop reading and do something else that they enjoy. I won't convert anyone to my faith :).
Many developers have encountered this issue when their application works perfectly until the device goes into sleep mode. Or when you need to keep the screen on for a long time without touching the screen (e.g., when you're creating your own navigation system).