| |
| |
| |
|
Page: 1 2 3 4 5 6 7 8
Comments:
<0> so what's the _real_ problem? <1> Cool <1> Not only am I fully caught up <1> I am now several days ahead <2> threat: sorry was on hte phone <2> threat: this can be done if you can use another data steructure too <2> have a lookup table for char frequency, and use a heap <2> with the ordering function set accordingly <2> so in C++'s case look at std::priority_queue or the various functions that turn an std::vector into a heap, along with an std::map that stores the char frequencies <0> did I split off for a bit? I don't recall anyone saying anything about char frequencies <2> then have a functor that you supply to your priority queue or whatever <2> well, number frequencies...for all intents and purposes he could be talking about characters in general no? <0> he hasn't said what he's doing, just that he has this requirement "move" something to the front if it's inserted more often <0> but I don't think he's really considered what he wants <2> right, I thought that's what he wanted to do? <2> oh
<0> if he want's them in order of frequency I think he's gonna have to do something else <2> oh if you have a better suggestion I'm all for it, this is jsut me talking off the top of my head <0> like keep track of how often they've been "inserted" <2> oh, that's what I meant with my std::map suggestion <2> std::map would store that <2> and the ordering in the head set by referring to that <2> head = heap <0> yes, build a histogram, then copy it to a multi-map to get the final ordering <0> (using the number of inserts as the key) <2> oh, that's a better suggestion <0> but since he won't tell us the real problem <0> <shrug> <2> ok threat, ignore my overcomplicated suggestion, vawjr sorted out your problem for you <0> he's apparently ignoring both of us <2> lol <0> we should both just relax and have a Foster's <2> haha, I like your way of thinking <3> threat <3> I found a solution for you <3> http://dumb.ro/x.txt <3> a being the iterator that will point to the already existing element <3> so you'll do if ((itr = find(x.begin(), x.end(), myElm)) != x.end()) x.slice(x.end(), x, itr); <3> .splice <3> not slice :P <3> it will shift the element to the end of the list <3> if myElm is found in x where x is a std::list, then it will be moved to the end of the list <3> that's what threat wants, isn't it threat? <0> I think he's on the beach w/ some Foster's and shrimps on the barbee <3> :)) <4> just in case, what cd proteccion software do u use? <4> i wanna protect my videos <5> what are you talking about? <4> avoid piracy <5> there is no way <5> cat /dev/cdrom > dump.iso <5> done <4> hah thats linux <5> no way to stop ripping the raw image <4> do u know about tz copy protection? <5> can't say I do <6> sk8ing, thanx <5> sk8ing, nu esti o vaca? :D <6> vawjrZZzz-, shrimps? mate I am an australian, they are called prawns <6> vawjrZZzz-, and I have never seen fosters beer at any bottle shop, I believe it is all exported <2> naw mate <2> shrimps and prawns are different things <7> any1 use gcc here? <2> just ask your question <7> what does the "Wall" in "g++ -Wall" mean? <7> i think it's W + all <2> what system are you on <7> win2k <2> cygwin? <8> it means warn for all <7> mingw <7> OHH <8> warn for all errors <7> if i ommit it, what kind of errors are dropped? <2> warnings and errors are different things
<2> dextre1: look at the gcc manpage <7> hmm. ok <2> it's described there exactly what gets turned on <7> thanks <2> (you can google for it) <7> can i compile dlls with this thing? <2> probably <7> right on <2> werd <9> Does anyone know if it is possible to store asm code in a char * then p*** it to __asm__()? <10> uh <10> no <10> but you can do that, change the memory protection for the memory it's allocated in to allow execution, and then jump to the code <3> cn28h, nope :) <9> rdragon there is no way to do something like char *a = "nop;nop;nop"; __asm__(a); <10> oh you also want to ***EMBLE at runtime? heh <10> you'll need an ***embler for that <10> I thought you had a bunch of bytes that was already machine code <2> I'm sure you could sort something out with macros :P <10> dpecks why do you need to ***emble code at run it at runtime? <7> (he wants to make a virus) <2> oh <7> how do i set the "dll" paths for gcc ? <9> dextrel you would think so be no... its for a cl*** project on polymorphic executables <7> the libs are in lib, the includes are in include, the dlls are in bin.. <10> __asm__ is some nonstandard extension keyword - it's not a function you call at runtime <10> dpecks - then why isn't the cl*** teaching you how to run this generated code? <10> isn't that like... the point of the cl***? <10> what are you paying for? <10> (presumably you're not taking it for free) <9> no not at all ,, the cl*** is mostly theory i had a choice either to write a program or do a research paper i decided to program <10> ah <10> well <10> if you really are serious, I would either find an ***embler that you can use in your program <10> or write functions that encode opcodes into a vector<char> or something <10> instructions, rather <7> arg. can some1 help me <9> i think just converting to shellcode using gdb x/bx would be easier <10> then write code to call the code you generated, etc <10> shellcode? <7> i'm trying to register dll paths to the GSL for my project in minGw <10> you know what would be really easy <10> generate code in some script language - like python <10> or some interpreted language <10> then it's trivial <10> the .net languages also support this sorta stuff <10> i don't know what they call it <9> hmmm that would be easy <10> I would generate python or lua code - you'll get nice fast results, and it's rather easy to do <6> what is the best way to insert into a map<int, int> ? map_name.insert(pair<int, int>(1, 3)); ? <10> threat: some_map[1] = 3; <10> or some_map.insert( make_pair(1,3) ); <7> nevermind. i figured it out.. stupid env variables <6> rdragon, ok, make_pair aye <10> std::make_pair is in <utility> <6> rdragon, does element [1] need to exist? <10> no <6> thanx <10> [] will do a .find() on the map, and insert if it doesn't exist <6> in that case I will use some_map[] <6> rdragon, ok <10> and it returns a reference to the element's value <6> thanx <10> so be careful when using [] to retrieve an element from a list <10> if the key doesn't exist, it'll be created <10> if you only want to find, use .find() <6> rdragon, ok, I want the map as a counter, e.g. my_map[key] = my_map[key]++ type thing, although I know how dangous what I have just written is :P <2> threat: <10> ++my_map[key]l <10> ++my_map[key]; <2> nm <10> :) <6> rdragon, and if the key doesnt exist? it will create it? <10> yes
Return to
#c++ or Go to some related
logs:
#AllNiteCafe #chatzone rock.mif
#MissKitten Jh0n-t #asm a channle london TWISTER TRANSISTER verlihub change hostname #c++
|
|