473,503 Members | 241 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Getting bytes using set stride.

1 New Member
I have a byte array
b'\x00\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0A`'
what i am trying to do is get lets say 2 values starting at x position every 4 bytes
so the new byte array would be
so if my position was 0 in the stride and I want 2 bytes and the stride is 4 this would be the end result
b'\x00\x01\x04\x05\x08\x09'

basically I want to do this
a[start:end:step]
but i want to grab more then 1 byte with the step.
Nov 28 '13 #1
0 1035

Sign in to post your reply or Sign up for a free account.

Similar topics

0
1623
by: Punit | last post by:
Hi, Could someone please suggest where I am going wrong... Iam using MSXML 3.0 and VC++ but i end up getting blank response XML try { hr =...
2
1172
by: nicolasdban | last post by:
Hi, I'm having a problem trying to get the filesizes of archives given by the list of dirents structures. what i mean is this: to find out the size of any archive i use ftell and it works just...
5
1060
by: Chris Leffer | last post by:
Hi. My application has a textbox that can receive a lengthful string from the user. I need to separate this string into blocks of 50 bytes and process each block to compose a text file. I have...
2
2094
by: pm1ccc | last post by:
Hi, I have written following code and not getting back values in the same form ( i have used phpself) <?php $Fname = $_POST; $Lname = $_POST; $gender = $_POST; $food = $_POST; $quote =...
1
3169
by: simbarashe | last post by:
Hie could someone please help me with getting and using the current page url. I have a function that gets the url, I want to use it with header(location : XXX) but it wont work. The code is as...
2
9468
by: =?Utf-8?B?R3lhbmVuZHJh?= | last post by:
I am using Ajax control(Update Panel) in my web page(ASP.Net 2.0) and putting Report Viewer(Sql Server Reporting Services 2005) Control in it. When I am displaying any report it is coming...
6
1529
manoj9849967222
by: manoj9849967222 | last post by:
Hi All I have a great problem. I have three tables one is "SALES" other one is "Purchase" & "Productid" Now i want to get the closing stock out of it. Say productid is 1.2 ---------...
1
2009
by: ShapeMan | last post by:
I'm trying to export data to a binary file. I have imported the data from a binary file using BinaryReader and everything works as I would have expected. The data after importing is a variety of...
0
1025
by: Christian Heimes | last post by:
Grant Edwards wrote: It's dangerous to mix streams and descriptors. Traditionally freopen() is used to redirect a standard stream to a file: ...
3
3007
by: susheela s | last post by:
Hi. Hers im subtracting two 16bit numbers by using two 8bit num array.In case if first byte of array is less than first byte of second array den i hav to take borrow form second byte of first...
0
7203
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7089
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7282
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7339
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
7463
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
5017
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4678
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3157
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
738
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.