Questions tagged [construct]

Construct is a powerful declarative parser for binary data.

It is based on the concept of defining data structures in a declarative manner, rather than procedural code: Simple constructs can be combined hierarchically to form increasingly complex data structures. It's the first library that makes parsing fun, instead of the usual headache it is today. Official documentation: https://construct.readthedocs.io

239 questions
1
vote
1 answer

using conditional CONSTRUCT queries in SPARQL

I am in need of some help regarding SPARQL construct queries. How is it possible to make a CONSTRUCT query with an IF condition to get triples that enable rules representation? Like a CONSTRUCT query that enables us to express the following…
user12532474
1
vote
3 answers

Replacing old C style arrays with modern C++ STL data structures

I implemented a simple class for n-body simulations in C++. However, the class uses a lot of old C style arrays which I want to replace with data structures that the STL offers. Here is the relevant part of my code that I want to improve: struct…
Gilfoyle
  • 3,282
  • 3
  • 47
  • 83
1
vote
1 answer

How to construct class that can replace typedef vector> Type

I am learning classes in C++ and would like to construct my own class instead of using a 2D vector "typedef vector> C_type". I have some code written: class T { public: int a; int b; T(int a, int b) : a(a), b(b){} }; Now…
T. Sabev
  • 51
  • 1
1
vote
1 answer

How to infer values for data structure fields in Python construct?

Here's a simple tag-length-value structure defined using the construct library for Python: Tlv = Struct( 'tag' / Int16ub, 'length' / Int32ub, 'value' / Array(this.length, Byte) ) if __name__ == '__main__': tlv_data = dict(tag=1,…
ralien
  • 1,448
  • 11
  • 24
1
vote
2 answers

SPARQL CONSTRUCT trying to BIND yes/no values from conditional sub query

Continued on from another question here... I have a(n excerpt from a) construct query below that is successfully pulling records as desired. CONSTRUCT { ?publication fb:type ?type; fb:publicationLabel ?publicationLabel; fb:publicationType…
Toolagio
  • 67
  • 9
1
vote
0 answers

How to setup Ubuntu package (as developer)?

I am the developer of Python-Construct module and would like to offer it using apt-get (its already offered on pypi). How can I setup a packaging process? sudo apt-get install python-construct # to enable sudo pip install construct …
ArekBulski
  • 4,520
  • 4
  • 39
  • 61
1
vote
2 answers

Cordova build to Android error

I made an app with Construct 2 and I exported to Intel XDK. Then I exported to cordova and everytime I try to build with "cordova build android" I get this error: ERROR: In FontFamilyFont, unable to find attribute android:t tcIndex FAILED FAILURE:…
1
vote
3 answers

Python construct - parsing a variable number of variable length records

I'm using construct 2.8 to reverse engineer the header of some files created by some long-lost Pascal program. The header is made of a number of different records, some of which are optional, and I'm not sure whether the order is fixed or not. For…
MerseyViking
  • 389
  • 3
  • 19
1
vote
2 answers

Passing parameters to __construct library in Codeigniter

I am really new to Codeigniter, and just learning from scratch. checked the documentation on Creating Libraries but no success on my example: I need to pass a value to __construct library. class: libraries/Myclasses/Bird
Mina Magdy
  • 141
  • 1
  • 15
1
vote
0 answers

Does anyone know CPPEH_RECORD construct?

I reversed one executable file in which I find the CPPEH_RECORD construct. I want to know details about it. But there is no more explanation in google search! Please tell me more about it, or give me some links! Thanks to every body that helps! The…
rodster
  • 111
  • 1
  • 6
1
vote
0 answers

Codeigniter Searchbar

Searchbar is working in codeigniter website but it does not load suggestion products. As I want if someone write 'dell' in searchbay he should get dell laptops suggestions below. and one another thing 'enter' button does not work for search one have…
1
vote
1 answer

How to count number of triplets in ARC2 PHP

I created a CONSTRUCT query in ARC2 PHP, but how is it possible to count how many triplets I have received? $query = ' PREFIX dbpedia-owl: PREFIX owl: PREFIX xsd:…
elka
  • 25
  • 3
1
vote
2 answers

construct method in php laravel is not so clear to me

I'm confused about why we need constructor and can someone explain me about this code from my controller : public function __construct(MerchantService $merchantService, PaymentService $paymentService){ $this->merchantService =…
Manas
  • 3,060
  • 4
  • 27
  • 55
1
vote
0 answers

Construct 2 dynamic audio loading issue

In my app I need to load mp3 audio files at runtime, the names for these files are obtained from json file. I have tried several approaches to play these audio files, following approaches have been tried: 1. Using plain Javascript audio tag. 2. By…
Mahesh
  • 43
  • 1
  • 7
1
vote
2 answers

Assign value directly in php constructor with a external function

Can I assign to a property a value in the constructor, without define any parameter, using for instance an external function? Example function my_external_function() { return 'Good Morning World'; } class MyClass { protected…
thejester
  • 13
  • 5