473,657 Members | 2,430 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\x0 A`'
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 1052

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

Similar topics

0
1631
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 = m_PSiebelDocument.CreateInstance(MSXML2::CLSID_DOMDocument); if(SUCCEEDED(hr)) {
2
1178
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 fine, well, when i use the list of dirents the size i get is not correct. why?
5
1067
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 the majority of the routine ready, but how can I divide the string into blocks of 50 bytes? Regards, Chris Leffer
2
2114
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 = $_POST;
1
3187
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 follows: The code below is for the first page:session_start is in line 3 <link href="css/jobSheet.css" rel="stylesheet" type="text/css" /> session_start();
2
9479
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 ,But Report Viewer Toolbar is not working Ex Print Command Button and if I try to move to next page I am getting error “The source of the report definition has not been specified “ “
6
1538
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 --------- Purchased---100 qty & Sales-----50 qty 1.3----------Purcahsed---300 qty & sales-----100 qty 1.2--------- Purcahsed--000 qty & sales-----20 qty
1
2014
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 mainly numerical types. I export it using BinaryWriter exactly the same way but get a much larger binary file. My research tells me that the Write method in BinaryWriter prefixes the bytes with the length. How can I avoid this? I'm quite new to...
0
1039
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: http://www.gnu.org/software/libc/manual/html_mono/libc.html#Standard-Streams — Function: FILE * freopen (const char *filename, const char *opentype, FILE *stream)
3
3011
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 array.This i could do ..wat my doubt s suppose if i take 4 elements in array and first byte of first array is less than first byte of second array den im gonna take borrow from second byte of first array,if that second byte of first array is 0 den how can...
0
8402
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8734
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8508
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8608
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7341
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6172
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4164
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
1962
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1627
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.