Menu
Menu
DaniWeb
Log In
Sign Up
Read
Contribute
Meet
Search
Search
About 1,000 results for
arbitrary
- Page 1
Arbitrary Expression
Programming
Software Development
12 Years Ago
by Gen.Asura
… program is an calculator which must be able to calculate
arbitrary
expressions like for example (5.0+8.1)*(2.0…'s just I don't know how to do the
arbitrary
expressions. My calculator so far does all the basic things… as addition/subtraction/multiplication and division, but it must do
arbitrary
expressions. I don't have to do system.input it…
Re: Arbitrary Expression
Programming
Software Development
12 Years Ago
by NormR1
[QUOTE] I don't know how to do the
arbitrary
expressions[/QUOTE] There is a lot of literature that discusses how to parse expressions. This is a topic some people spend weeks studying when learning to write compilers. Perhaps you can get an algorithm from Google or Wikipedia.
read in using fread() for arbitrary length data
Programming
Software Development
16 Years Ago
by cheesy_mel
… line) using fread(), the problem is the record length is
arbitrary
.. e.g. 1 "Joshua" "Rosenthal" "…
size and binarization of an arbitrary file
Programming
Software Development
15 Years Ago
by gyagyus
Hi! I need to find out the size of an
arbitrary
file and then binarize it in C. I can do …
decoding arbitrary byte data
Programming
Software Development
14 Years Ago
by ribot
… the data being transmitted can be encoded characters of any
arbitrary
set (utf-8, latin-1, etc)? 2. If that is…
how to send keystrokes to an arbitrary application?
Programming
Software Development
14 Years Ago
by TheGhost
… explain and teach me how to send keystrokes to an
arbitrary
application? thanks.
How to count the area of an arbitrary polygon
Programming
Software Development
13 Years Ago
by lamtupa
… to write a function that computes the area of an
arbitrary
polygon – so not necessarily a triangle or rectangle, etc. The…
Program that reads an arbitrary numbers of integers
Programming
Software Development
13 Years Ago
by hoganmadman
… am trying to do a program that reads in an
arbitrary
number of lists of integers. SPECIFICS -A valid list of…
Define a class which implements arithmetic with arbitrary precision
Programming
Software Development
13 Years Ago
by svatstika
… of them is: define a class, which implements arithmetic (+, -, /, *) with
arbitrary
precision. This is a new type with just some arithmetic…
Re: Define a class which implements arithmetic with arbitrary precision
Programming
Software Development
13 Years Ago
by mrnutty
First you need to be able to represent data in
arbitrary
length. One way to do that is use a [I]…
Heap Data Structure - Removing an arbitrary item
Programming
Computer Science
12 Years Ago
by blackrobe
… that runs in [TEX]O(logn)[/TEX] and deletes an
arbitrary
element from an [TEX]n[/TEX] element [B]Min-Heap…
Re: Heap Data Structure - Removing an arbitrary item
Programming
Computer Science
12 Years Ago
by blackrobe
… an [TEX]O(logn)[/TEX] time algorithm for deleting an
arbitrary
element for an [ICODE]n[/ICODE] element heap, given the…
Reflection/Casting, create arbitrary Objects.
Programming
Software Development
12 Years Ago
by SasseMan
Hi! I'm writing a unit test where
arbitrary
objects have to be created without knowing anything about the …
Re: Reflection/Casting, create arbitrary Objects.
Programming
Software Development
12 Years Ago
by SasseMan
… via reflection. The point is to just create objects with
arbitrary
instance variables. The test is going to be used to…
Re: Arbitrary Expression
Programming
Software Development
12 Years Ago
by CSloan7597
I would suggest looking at Reverse Polish Notation, which is what most calculators use. Basically, it converts an expression into RPN, a form where all operators come after operands, (postfix) as opposed to in between. Wikipedia shows how a stack data structure can be effectively utilised for this. [url]http://en.wikipedia.org/wiki/…
Re: Arbitrary Expression
Programming
Software Development
12 Years Ago
by stevanity
If your expression contains only { (,),digits,*,+,/,- } then you can use the "Javascript" Engine. Your choice... But I do recommend what others have said. Convert the expression to Postfix and then use a stack to evaluate the expression. That way it would be a fun and joyful experience doing this. Good luck!!
Re: Arbitrary Expression
Programming
Software Development
12 Years Ago
by Gen.Asura
lol thanks guys it did help, it sure as hell wasn't fun trying it but when I got it done and working I've earned a nice german beer.
Re: extracting an arbitrary number of numbers from a string
Programming
Software Development
16 Years Ago
by MattEvans
… at whitespace, because in the parts where there IS an
arbitrary
number of numbers, they are delimited like this: 1/1…
Re: extracting an arbitrary number of numbers from a string
Programming
Software Development
16 Years Ago
by MattEvans
… actually [I]use[/I] it in the situation with the
arbitrary
number of numbers; since, as I mentioned, I forgot that…
Re: Parsing arbitrary file.
Programming
Software Development
13 Years Ago
by griswolf
You want to look at the [URL="http://docs.python.org/library/struct.html"]struct[/URL] module which allows you to parse
arbitrary
sequence of binary types. You need to be aware of big-endian versus little-endian binary layout in the file.
Re: read in using fread() for arbitrary length data
Programming
Software Development
16 Years Ago
by Narue
Why use fread at all? fgets seems to be a better fit for your problem, especially since you're using it [i]anyway[/i] to preprocess the record lengths. The more input requests you make, the slower your code will be, so if optimization in your goal, minimize the number of calls that read from the file. Ideally you would keep a portion of the file…
Re: read in using fread() for arbitrary length data
Programming
Software Development
16 Years Ago
by cheesy_mel
the requirement says that i need to use fread().. actually the fgets() is a "cheat" code for me to get the length of records, and that part seems to be the one that make my program slower as i read the file twice.. so there's no way to get the length of record directly?
Re: read in using fread() for arbitrary length data
Programming
Software Development
16 Years Ago
by Salem
If all you're doing is calculating file access time, what's wrong with just doing random position + random length ? The length of an individual record doesn't seem that important if you're not actually using that record when you're done. All you're going to produce is something like bytes/sec as the answer - right?
Re: read in using fread() for arbitrary length data
Programming
Software Development
16 Years Ago
by Narue
>so there's no way to get the length of record directly? No, but you're already assuming that the maximum length of a record is 99 characters, so I don't really see how the length matters. Why not build the length array as you need it, and instead of storing the record length, store the offset of the record. Something like so: [code] recordLen: …
Re: read in using fread() for arbitrary length data
Programming
Software Development
16 Years Ago
by cheesy_mel
hi Narue, thanks for your help, it really helps me.. :) first time it was 35 secs only to read 500 records, now it's like 5secs++ for 50000 records.. regards, MeL
Re: size and binarization of an arbitrary file
Programming
Software Development
15 Years Ago
by ArkM
What is it - a file [i]binarization[/i]?
Re: size and binarization of an arbitrary file
Programming
Software Development
15 Years Ago
by gyagyus
I've solved the problem already, thx.
Re: how to send keystrokes to an arbitrary application?
Programming
Software Development
14 Years Ago
by VilePlecenta
on msdn you can find information regarding SendMessage(), or keybd_event() you can use WM_KEYDOWN or WM_CHAR Edit: I also posted a simple console based app that sends words to a minimized notepad [url]http://www.daniweb.com/forums/thread256517.html[/url]
Re: how to send keystrokes to an arbitrary application?
Programming
Software Development
14 Years Ago
by TheGhost
the thing is, i dun understand whatever's said in the MSDN website. lol.
Re: how to send keystrokes to an arbitrary application?
Programming
Software Development
14 Years Ago
by VilePlecenta
[QUOTE=TheGhost;1124419]the thing is, i dun understand whatever's said in the MSDN website. lol.[/QUOTE] If you do not understand how a window procedure works, then i would recommend start studying there since it is too extensive to explain here. I will however give you a little insight. [CODE] Syntax WM_KEYDOWN // Window message …
1
2
3
17
Next
Last
Search
Search
Forum Categories
Hardware/Software
Programming
Digital Media
Community Center
Latest Content
Newest Topics
Latest Topics
Latest Posts
Latest Comments
Top Tags
Topics Feed
Social
Forums
Top Members
Meet People
Community Functions
DaniWeb Premium
Newsletter Archive
Markdown Syntax
Community Rules
Developer APIs
Connect API
Forum API Docs
Tools
SEO Backlink Checker
Legal
Terms of Service
Privacy Policy
FAQ
About Us
Advertise
Contact Us
© 2024 DaniWeb® LLC